Documentation
¶
Index ¶
- type ArrayExpression
- type ArrayPattern
- type ArrowFunctionExpression
- type AssignmentExpression
- type AssignmentPattern
- type AssignmentProperty
- type AwaitExpression
- type BigIntLiteral
- type BinaryExpression
- type BlockStatement
- type BreakStatement
- type CallExpression
- type CatchClause
- type ChainExpression
- type ClassBody
- type ClassDeclaration
- type ClassExpression
- type ConditionalExpression
- type ContinueStatement
- type ConvertCtx
- type ConvertScope
- type ConvertScopeFlag
- type DebuggerStatement
- type Declaration
- type Decorator
- type Directive
- type DoWhileStatement
- type EmptyStatement
- type ExportAllDeclaration
- type ExportDefaultDeclaration
- type ExportNamedDeclaration
- type ExportSpecifier
- type Expression
- type ExpressionStatement
- type ForInStatement
- type ForOfStatement
- type ForStatement
- type FunctionDeclaration
- type FunctionExpression
- type Identifier
- type IfStatement
- type ImportDeclaration
- type ImportDefaultSpecifier
- type ImportExpression
- type ImportNamespaceSpecifier
- type ImportSpecifier
- type JSXAttribute
- type JSXClosingElement
- type JSXClosingFragment
- type JSXElement
- type JSXEmptyExpression
- type JSXExpressionContainer
- type JSXFragment
- type JSXIdentifier
- type JSXMemberExpression
- type JSXNamespacedName
- type JSXOpeningElement
- type JSXOpeningFragment
- type JSXSpreadAttribute
- type JSXSpreadChild
- type JSXText
- type LabeledStatement
- type Literal
- type LogicalExpression
- type MemberExpression
- type MetaProperty
- type MethodDefinition
- type ModuleDeclaration
- type NewExpression
- type Node
- type ObjectExpression
- type ObjectPattern
- type Pattern
- type Position
- type PrivateIdentifier
- type Program
- type Property
- type PropertyDefinition
- type RegExpLiteral
- type Regexp
- type RestElement
- type ReturnStatement
- type SequenceExpression
- type SpreadElement
- type SrcLoc
- func CalcLoc(node parser.Node, s *span.Source, ctx *ConvertCtx) *SrcLoc
- func FirstLoc(s *span.Source, ctx *ConvertCtx, locs ...span.Range) (span.Range, *SrcLoc)
- func LastLoc(s *span.Source, ctx *ConvertCtx, locs ...span.Range) (span.Range, *SrcLoc)
- func TplLocWithTag(n *parser.TplExpr, s *span.Source, ctx *ConvertCtx) *SrcLoc
- type Statement
- type StaticBlock
- type Super
- type SwitchCase
- type SwitchStatement
- type TSAnyKeyword
- type TSArrayPattern
- type TSArrayType
- type TSArrowFunctionExpression
- type TSAsExpression
- type TSBigIntKeyword
- type TSBooleanKeyword
- type TSCallExpression
- type TSCallSignatureDeclaration
- type TSClassDeclaration
- type TSClassExpression
- type TSConditionalType
- type TSConstructSignatureDeclaration
- type TSConstructorType
- type TSDeclareFunction
- type TSEnumDeclaration
- type TSEnumMember
- type TSExportAssignment
- type TSExpressionWithTypeArguments
- type TSExternalModuleReference
- type TSFunctionDeclaration
- type TSFunctionExpression
- type TSFunctionType
- type TSIdentifier
- type TSImportEqualsDeclaration
- type TSImportType
- type TSIndexSignature
- type TSIndexedAccessType
- type TSInferType
- type TSInterfaceBody
- type TSInterfaceDeclaration
- type TSIntersectionType
- type TSIntrinsicKeyword
- type TSLiteralType
- type TSMappedType
- type TSMethodDefinition
- type TSMethodSignature
- type TSModuleDeclaration
- type TSNamedTupleMember
- type TSNamespaceExportDeclaration
- type TSNeverKeyword
- type TSNewExpression
- type TSNonNullExpression
- type TSNullKeyword
- type TSNumberKeyword
- type TSObjectKeyword
- type TSObjectPattern
- type TSOptionalType
- type TSParameterProperty
- type TSParenthesizedType
- type TSPropertyDefinition
- type TSPropertySignature
- type TSQualifiedName
- type TSRestElement
- type TSRestType
- type TSStringKeyword
- type TSSymbolKeyword
- type TSTaggedTemplateExpression
- type TSThisType
- type TSTupleType
- type TSTypeAliasDeclaration
- type TSTypeAnnotation
- type TSTypeAssertion
- type TSTypeLiteral
- type TSTypeOperator
- type TSTypeParameter
- type TSTypeParameterDeclaration
- type TSTypeParameterInstantiation
- type TSTypePredicate
- type TSTypeQuery
- type TSTypeReference
- type TSUndefinedKeyword
- type TSUnionType
- type TSUnknownKeyword
- type TSVariableDeclaration
- type TSVoidKeyword
- type TSXOpeningElement
- type TaggedTemplateExpression
- type TemplateElement
- type TemplateElementValue
- type TemplateLiteral
- type ThisExpression
- type ThrowStatement
- type TryStatement
- type UnaryExpression
- type UpdateExpression
- type VariableDeclaration
- type VariableDeclarator
- type WhileStatement
- type WithStatement
- type YieldExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayExpression ¶
type ArrayExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Elements []Expression `json:"elements"` }
https://github.com/estree/estree/blob/master/es5.md#arrayexpression
type ArrayPattern ¶
type ArrayPattern struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Elements []Node `json:"elements"` }
https://github.com/estree/estree/blob/master/es2015.md#arraypattern
type ArrowFunctionExpression ¶
type ArrowFunctionExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id *Identifier `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` Expression bool `json:"expression"` }
https://github.com/estree/estree/blob/master/es2015.md#arrowfunctionexpression
type AssignmentExpression ¶
type AssignmentExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Operator string `json:"operator"` Left Node `json:"left"` Right Expression `json:"right"` }
https://github.com/estree/estree/blob/master/es5.md#assignmentexpression
type AssignmentPattern ¶
type AssignmentPattern struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Left Node `json:"left"` Right Node `json:"right"` }
https://github.com/estree/estree/blob/master/es2015.md#assignmentpattern
type AssignmentProperty ¶
type AssignmentProperty struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Method bool `json:"method"` Shorthand bool `json:"shorthand"` Computed bool `json:"computed"` Value Pattern `json:"value"` Kind string `json:"kind"` }
https://github.com/estree/estree/blob/master/es2015.md#objectpattern
type AwaitExpression ¶
type AwaitExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` }
https://github.com/estree/estree/blob/master/es2017.md#awaitexpression
type BigIntLiteral ¶
type BigIntLiteral struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Value interface{} `json:"value"` // string | boolean | null | number | RegExp | bigint(es2020) Raw string `json:"raw"` Bigint string `json:"bigint"` }
https://github.com/estree/estree/blob/master/es2020.md#bigintliteral
type BinaryExpression ¶
type BinaryExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Operator string `json:"operator"` Left Expression `json:"left"` Right Expression `json:"right"` }
https://github.com/estree/estree/blob/master/es5.md#binaryexpression
type BlockStatement ¶
type BlockStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Body []Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#blockstatement
type BreakStatement ¶
type BreakStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Label Expression `json:"label"` }
https://github.com/estree/estree/blob/master/es5.md#breakstatement
type CallExpression ¶
type CallExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Callee Expression `json:"callee"` Arguments []Expression `json:"arguments"` Optional bool `json:"optional"` }
https://github.com/estree/estree/blob/master/es5.md#callexpression
type CatchClause ¶
type CatchClause struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Param Pattern `json:"param"` // `Pattern | null` from es2019 Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#catchclause
type ChainExpression ¶
type ChainExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expression Expression `json:"expression"` // CallExpression | MemberExpression }
https://github.com/estree/estree/blob/master/es2020.md#chainexpression
type ClassBody ¶
type ClassBody struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Body []Expression `json:"body"` // MethodDefinition | PropertyDefinition | StaticBlock }
https://github.com/estree/estree/blob/master/es2015.md#classbody
type ClassDeclaration ¶
type ClassDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` SuperClass Expression `json:"superClass"` Body Expression `json:"body"` Abstract bool `json:"abstract"` Declare bool `json:"declare"` Decorators []Node `json:"decorators"` }
https://github.com/estree/estree/blob/master/es2015.md#classdeclaration
type ClassExpression ¶
type ClassExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` SuperClass Expression `json:"superClass"` Body Expression `json:"body"` Abstract bool `json:"abstract"` }
https://github.com/estree/estree/blob/master/es2015.md#classexpression
type ConditionalExpression ¶
type ConditionalExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Test Expression `json:"test"` Consequent Expression `json:"consequent"` Alternate Expression `json:"alternate"` }
https://github.com/estree/estree/blob/master/es5.md#conditionalexpression
type ContinueStatement ¶
type ContinueStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Label Expression `json:"label"` }
https://github.com/estree/estree/blob/master/es5.md#continuestatement
type ConvertCtx ¶
type ConvertCtx struct { Parser *parser.Parser Scope *ConvertScope LineCol bool }
func NewConvertCtx ¶
func NewConvertCtx(p *parser.Parser) *ConvertCtx
type ConvertScope ¶
type ConvertScope struct { Up *ConvertScope Flag ConvertScopeFlag }
type ConvertScopeFlag ¶
type ConvertScopeFlag uint64
const ( CSF_NONE ConvertScopeFlag = 0 CSF_INTERFACE ConvertScopeFlag = 1 << iota )
func (ConvertScopeFlag) Off ¶
func (f ConvertScopeFlag) Off(flag ConvertScopeFlag) ConvertScopeFlag
func (ConvertScopeFlag) On ¶
func (f ConvertScopeFlag) On(flag ConvertScopeFlag) ConvertScopeFlag
type DebuggerStatement ¶
type Declaration ¶
type Declaration interface{}
type Decorator ¶
type Decorator struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expression Expression `json:"expression"` }
type Directive ¶
type Directive struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expression Expression `json:"expression"` Directive string `json:"directive"` }
https://github.com/estree/estree/blob/master/es5.md#directive
type DoWhileStatement ¶
type DoWhileStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Test Expression `json:"test"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#dowhilestatement
type EmptyStatement ¶
type ExportAllDeclaration ¶
type ExportAllDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Exported Expression `json:"exported"` Source Expression `json:"source"` }
https://github.com/estree/estree/blob/master/es2015.md#exportalldeclaration
type ExportDefaultDeclaration ¶
type ExportDefaultDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` // AnonymousDefaultExportedFunctionDeclaration | FunctionDeclaration | AnonymousDefaultExportedClassDeclaration | ClassDeclaration | Expression Declaration Node `json:"declaration"` }
type ExportNamedDeclaration ¶
type ExportNamedDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Declaration Declaration `json:"declaration"` // Declaration | null Specifiers []Node `json:"specifiers"` Source Expression `json:"source"` // Literal | null ExportKind string `json:"exportKind"` }
https://github.com/estree/estree/blob/master/es2015.md#exportnameddeclaration
type ExportSpecifier ¶
type ExportSpecifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Local Expression `json:"local"` Exported Expression `json:"exported"` ExportKind string `json:"exportKind"` }
https://github.com/estree/estree/blob/master/es2015.md#exportspecifier
type Expression ¶
type Expression interface{}
type ExpressionStatement ¶
type ExpressionStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expression Expression `json:"expression"` }
https://github.com/estree/estree/blob/master/es5.md#expressionstatement
type ForInStatement ¶
type ForInStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Left Node `json:"left"` Right Expression `json:"right"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#forinstatement
type ForOfStatement ¶
type ForOfStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Left Node `json:"left"` Right Expression `json:"right"` Body Statement `json:"body"` Await bool `json:"await"` }
https://github.com/estree/estree/blob/master/es2015.md#forofstatement
type ForStatement ¶
type ForStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Init Node `json:"init"` // VariableDeclaration | Expression | null Test Expression `json:"test"` Update Expression `json:"update"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#forstatement
type FunctionDeclaration ¶
type FunctionDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` }
https://github.com/estree/estree/blob/master/es5.md#functiondeclaration
type FunctionExpression ¶
type FunctionExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` Expression bool `json:"expression"` }
https://github.com/estree/estree/blob/master/es5.md#functionexpression
type Identifier ¶
type Identifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Name string `json:"name"` }
https://github.com/estree/estree/blob/master/es5.md#identifier
type IfStatement ¶
type IfStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Test Expression `json:"test"` Consequent Statement `json:"consequent"` Alternate Statement `json:"alternate"` }
https://github.com/estree/estree/blob/master/es5.md#ifstatement
type ImportDeclaration ¶
type ImportDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Specifiers []Node `json:"specifiers"` // [ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier ] Source Expression `json:"source"` ImportKind string `json:"importKind"` }
https://github.com/estree/estree/blob/master/es2015.md#importdeclaration
type ImportDefaultSpecifier ¶
type ImportDefaultSpecifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Local Node `json:"local"` }
https://github.com/estree/estree/blob/master/es2015.md#importdefaultspecifier
type ImportExpression ¶
type ImportExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Source Expression `json:"source"` }
https://github.com/estree/estree/blob/master/es2020.md#importexpression
type ImportNamespaceSpecifier ¶
type ImportNamespaceSpecifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Local Node `json:"local"` }
https://github.com/estree/estree/blob/master/es2015.md#importnamespacespecifier
type ImportSpecifier ¶
type ImportSpecifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Local Node `json:"local"` Imported Node `json:"imported"` ImportKind string `json:"importKind"` }
https://github.com/estree/estree/blob/master/es2015.md#importspecifier
type JSXAttribute ¶
type JSXClosingElement ¶
type JSXClosingFragment ¶
type JSXElement ¶
type JSXEmptyExpression ¶
type JSXExpressionContainer ¶
type JSXFragment ¶
type JSXIdentifier ¶
type JSXMemberExpression ¶
type JSXNamespacedName ¶
type JSXOpeningElement ¶
type JSXOpeningFragment ¶
type JSXSpreadAttribute ¶
type JSXSpreadAttribute struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` }
type JSXSpreadChild ¶
type LabeledStatement ¶
type LabeledStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Label Expression `json:"label"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#labeledstatement
type Literal ¶
type LogicalExpression ¶
type LogicalExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Operator string `json:"operator"` Left Expression `json:"left"` Right Expression `json:"right"` }
https://github.com/estree/estree/blob/master/es5.md#logicalexpression
type MemberExpression ¶
type MemberExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Object Expression `json:"object"` Property Expression `json:"property"` Computed bool `json:"computed"` Optional bool `json:"optional"` }
https://github.com/estree/estree/blob/master/es5.md#memberexpression
type MetaProperty ¶
type MetaProperty struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Meta Expression `json:"meta"` Property Expression `json:"property"` }
https://github.com/estree/estree/blob/master/es2015.md#metaproperty
type MethodDefinition ¶
type MethodDefinition struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Value Expression `json:"value"` Kind string `json:"kind"` // "constructor" | "method" | "get" | "set" Computed bool `json:"computed"` Static bool `json:"static"` Decorators []Node `json:"decorators"` }
https://github.com/estree/estree/blob/master/es2015.md#methoddefinition
type ModuleDeclaration ¶
type ModuleDeclaration interface{}
type NewExpression ¶
type NewExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Callee Expression `json:"callee"` Arguments []Expression `json:"arguments"` }
https://github.com/estree/estree/blob/master/es5.md#newexpression
type Node ¶
type Node interface{}
func ConvertTsTyp ¶
func ConvertTsTyp(node parser.Node, ctx *ConvertCtx) Node
type ObjectExpression ¶
type ObjectExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Properties []Node `json:"properties"` // Property | SpreadElement }
https://github.com/estree/estree/blob/master/es5.md#objectexpression
type ObjectPattern ¶
type ObjectPattern struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Properties []Node `json:"properties"` }
https://github.com/estree/estree/blob/master/es2015.md#objectpattern
type Pattern ¶
type Pattern interface{}
https://github.com/estree/estree/blob/master/es2015.md#patterns
type PrivateIdentifier ¶
type PrivateIdentifier struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Name string `json:"name"` }
https://github.com/estree/estree/blob/master/es2022.md#privateidentifier
type Program ¶
type Program struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` SourceType string `json:"sourceType"` // "script" | "module" Body []Node `json:"body"` // [ Directive | Statement ] }
https://github.com/estree/estree/blob/master/es5.md#programs
func ConvertProg ¶
func ConvertProg(n *parser.Prog, ctx *ConvertCtx) *Program
type Property ¶
type Property struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Value Expression `json:"value"` Kind string `json:"kind"` Method bool `json:"method"` Shorthand bool `json:"shorthand"` Computed bool `json:"computed"` }
https://github.com/estree/estree/blob/master/es2015.md#expressions
type PropertyDefinition ¶
type PropertyDefinition struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Value Expression `json:"value"` Computed bool `json:"computed"` Static bool `json:"static"` Decorators []Node `json:"decorators"` }
https://github.com/estree/estree/blob/master/es2022.md#propertydefinition
type RegExpLiteral ¶
type RegExpLiteral struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Value interface{} `json:"value"` Regexp *Regexp `json:"regexp"` }
https://github.com/estree/estree/blob/master/es5.md#regexpliteral
type RestElement ¶
type RestElement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Pattern `json:"argument"` }
https://github.com/estree/estree/blob/master/es2015.md#restelement
type ReturnStatement ¶
type ReturnStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` }
https://github.com/estree/estree/blob/master/es5.md#returnstatement
type SequenceExpression ¶
type SequenceExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expressions []Expression `json:"expressions"` }
https://github.com/estree/estree/blob/master/es5.md#sequenceexpression
type SpreadElement ¶
type SpreadElement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` }
https://github.com/estree/estree/blob/master/es2015.md#expressions
type SrcLoc ¶
func TplLocWithTag ¶ added in v0.0.10
type StaticBlock ¶
type StaticBlock struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Body []Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es2022.md#staticblock
type Super ¶
type Super struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` }
https://github.com/estree/estree/blob/master/es2015.md#expressions
type SwitchCase ¶
type SwitchCase struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Test Expression `json:"test"` Consequent []Statement `json:"consequent"` }
https://github.com/estree/estree/blob/master/es5.md#switchcase
type SwitchStatement ¶
type SwitchStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Discriminant Expression `json:"discriminant"` Cases []*SwitchCase `json:"cases"` }
https://github.com/estree/estree/blob/master/es5.md#switchstatement
type TSAnyKeyword ¶
type TSArrayPattern ¶
type TSArrayType ¶
type TSArrowFunctionExpression ¶
type TSArrowFunctionExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id *Identifier `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` Expression bool `json:"expression"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSAsExpression ¶
type TSBigIntKeyword ¶
type TSBooleanKeyword ¶
type TSCallExpression ¶
type TSCallExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Callee Expression `json:"callee"` Arguments []Expression `json:"arguments"` Optional bool `json:"optional"` TypeParameters Node `json:"typeParameters"` }
type TSCallSignatureDeclaration ¶
type TSCallSignatureDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSClassDeclaration ¶
type TSClassDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` TypeParameters Node `json:"typeParameters"` SuperClass Expression `json:"superClass"` SuperTypeParameters Node `json:"superTypeParameters"` Implements []Node `json:"implements"` Body Expression `json:"body"` Declare bool `json:"declare"` Decorators []Node `json:"decorators"` Abstract bool `json:"abstract"` }
type TSClassExpression ¶
type TSClassExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` TypeParameters Node `json:"typeParameters"` SuperClass Expression `json:"superClass"` SuperTypeParameters Node `json:"superTypeParameters"` Implements []Node `json:"implements"` Body Expression `json:"body"` Decorators []Node `json:"decorators"` Abstract bool `json:"abstract"` }
type TSConditionalType ¶
type TSConstructSignatureDeclaration ¶
type TSConstructSignatureDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` Abstract bool `json:"abstract"` }
type TSConstructorType ¶
type TSConstructorType struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` Abstract bool `json:"abstract"` }
type TSDeclareFunction ¶
type TSDeclareFunction struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSEnumDeclaration ¶
type TSEnumMember ¶
type TSExportAssignment ¶
type TSExportAssignment struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Expression Expression `json:"expression"` }
type TSFunctionDeclaration ¶
type TSFunctionDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSFunctionExpression ¶
type TSFunctionExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Body Node `json:"body"` Generator bool `json:"generator"` Async bool `json:"async"` Expression bool `json:"expression"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSFunctionType ¶
type TSFunctionType struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Node `json:"id"` Params []Node `json:"params"` Generator bool `json:"generator"` Async bool `json:"async"` TypeParameters Node `json:"typeParameters"` ReturnType Node `json:"returnType"` }
type TSIdentifier ¶
type TSImportType ¶
type TSIndexSignature ¶
type TSIndexSignature struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Static bool `json:"static"` Abstract bool `json:"abstract"` Optional bool `json:"optional"` Readonly bool `json:"readonly"` Declare bool `json:"declare"` Accessibility string `json:"accessibility"` Parameters []Node `json:"parameters"` TypeAnnotation Node `json:"typeAnnotation"` Decorators []Node `json:"decorators"` }
type TSIndexedAccessType ¶
type TSInferType ¶
type TSInterfaceBody ¶
type TSInterfaceDeclaration ¶
type TSInterfaceDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` TypeParameters Node `json:"typeParameters"` Extends []Node `json:"extends"` Body Expression `json:"body"` Declare bool `json:"declare"` }
type TSIntersectionType ¶
type TSIntrinsicKeyword ¶
type TSLiteralType ¶
type TSMappedType ¶
type TSMappedType struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Readonly interface{} `json:"readonly"` Optional interface{} `json:"optional"` TypeParameter Node `json:"typeParameter"` NameType Node `json:"nameType"` TypeAnnotation Node `json:"typeAnnotation"` }
type TSMethodDefinition ¶
type TSMethodDefinition struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Value Expression `json:"value"` Kind string `json:"kind"` // "constructor" | "method" | "get" | "set" Computed bool `json:"computed"` Static bool `json:"static"` Optional bool `json:"optional"` Definite bool `json:"definite"` Override bool `json:"override"` Abstract bool `json:"abstract"` Readonly bool `json:"readonly"` Accessibility string `json:"accessibility"` Decorators []Node `json:"decorators"` }
type TSMethodSignature ¶
type TSModuleDeclaration ¶
type TSNamedTupleMember ¶
type TSNamespaceExportDeclaration ¶
type TSNamespaceExportDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Expression `json:"id"` }
type TSNeverKeyword ¶
type TSNewExpression ¶
type TSNewExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Callee Expression `json:"callee"` Arguments []Expression `json:"arguments"` TypeParameters Node `json:"typeParameters"` }
type TSNonNullExpression ¶
type TSNullKeyword ¶
type TSNumberKeyword ¶
type TSObjectKeyword ¶
type TSObjectPattern ¶
type TSOptionalType ¶
type TSParameterProperty ¶
type TSParameterProperty struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Parameter Node `json:"parameter"` Readonly bool `json:"readonly"` Accessibility string `json:"accessibility"` Override bool `json:"override"` Decorators []Node `json:"decorators"` }
represets the properties defined via constructor params
type TSParenthesizedType ¶
type TSPropertyDefinition ¶
type TSPropertyDefinition struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Expression `json:"key"` Value Expression `json:"value"` Computed bool `json:"computed"` Static bool `json:"static"` Abstract bool `json:"abstract"` Optional bool `json:"optional"` Definite bool `json:"definite"` Readonly bool `json:"readonly"` Override bool `json:"override"` Declare bool `json:"declare"` Accessibility string `json:"accessibility"` TypeAnnotation Node `json:"typeAnnotation"` Decorators []Node `json:"decorators"` }
type TSPropertySignature ¶
type TSPropertySignature struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Key Node `json:"key"` Computed bool `json:"computed"` Optional bool `json:"optional"` TypeAnnotation Node `json:"typeAnnotation"` Kind string `json:"kind"` Readonly bool `json:"readonly"` }
used as the member of `TSTypeLiteral`
type TSQualifiedName ¶
type TSQualifiedName struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Left Expression `json:"left"` Right Expression `json:"right"` }
type TSRestElement ¶
type TSRestType ¶
type TSStringKeyword ¶
type TSSymbolKeyword ¶
type TSTaggedTemplateExpression ¶
type TSTaggedTemplateExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Tag Expression `json:"tag"` Quasi Expression `json:"quasi"` TypeParameters Node `json:"typeParameters"` }
type TSThisType ¶
type TSTupleType ¶
type TSTypeAliasDeclaration ¶
type TSTypeAnnotation ¶
type TSTypeAssertion ¶
type TSTypeLiteral ¶
type TSTypeOperator ¶
type TSTypeParameter ¶
type TSTypePredicate ¶
type TSTypeQuery ¶
type TSTypeReference ¶
type TSUndefinedKeyword ¶
type TSUnionType ¶
type TSUnknownKeyword ¶
type TSVariableDeclaration ¶
type TSVoidKeyword ¶
type TSXOpeningElement ¶
type TaggedTemplateExpression ¶
type TaggedTemplateExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Tag Expression `json:"tag"` Quasi Expression `json:"quasi"` }
https://github.com/estree/estree/blob/master/es2015.md#taggedtemplateexpression
type TemplateElement ¶
type TemplateElement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Tail bool `json:"tail"` Value *TemplateElementValue `json:"value"` }
https://github.com/estree/estree/blob/master/es2015.md#templateelement
type TemplateElementValue ¶
type TemplateLiteral ¶
type TemplateLiteral struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Quasis []Expression `json:"quasis"` Expressions []Expression `json:"expressions"` }
https://github.com/estree/estree/blob/master/es2015.md#templateliteral
type ThisExpression ¶
type ThrowStatement ¶
type ThrowStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` }
https://github.com/estree/estree/blob/master/es5.md#throwstatement
type TryStatement ¶
type TryStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Block Statement `json:"block"` Handler Expression `json:"handler"` Finalizer Statement `json:"finalizer"` }
https://github.com/estree/estree/blob/master/es5.md#trystatement
type UnaryExpression ¶
type UnaryExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Operator string `json:"operator"` // "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" Prefix bool `json:"prefix"` Argument Expression `json:"argument"` }
https://github.com/estree/estree/blob/master/es5.md#unaryexpression
type UpdateExpression ¶
type UpdateExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Operator string `json:"operator"` // "++" | "--" Argument Expression `json:"argument"` Prefix bool `json:"prefix"` }
https://github.com/estree/estree/blob/master/es5.md#updateexpression
type VariableDeclaration ¶
type VariableDeclaration struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Kind string `json:"kind"` Declarations []*VariableDeclarator `json:"declarations"` }
https://github.com/estree/estree/blob/master/es5.md#variabledeclaration
type VariableDeclarator ¶
type VariableDeclarator struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Id Pattern `json:"id"` Init Expression `json:"init"` }
https://github.com/estree/estree/blob/master/es5.md#variabledeclarator
type WhileStatement ¶
type WhileStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Test Expression `json:"test"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#whilestatement
type WithStatement ¶
type WithStatement struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Object Expression `json:"object"` Body Statement `json:"body"` }
https://github.com/estree/estree/blob/master/es5.md#withstatement
type YieldExpression ¶
type YieldExpression struct { Type string `json:"type"` Start int `json:"start"` End int `json:"end"` Loc *SrcLoc `json:"loc"` Argument Expression `json:"argument"` Delegate bool `json:"delegate"` }
https://github.com/estree/estree/blob/master/es2015.md#yieldexpression