type ArrayLiteral struct { LeftBracket file.Idx RightBracket file.Idx Value []Expression }
func (self *ArrayLiteral) Idx0() file.Idx
func (self *ArrayLiteral) Idx1() file.Idx
type ArrayPattern struct { LeftBracket file.Idx RightBracket file.Idx Elements []Expression Rest Expression }
func (self *ArrayPattern) Idx0() file.Idx
func (self *ArrayPattern) Idx1() file.Idx
type ArrowFunctionLiteral struct { Start file.Idx ParameterList *ParameterList Body ConciseBody Source string DeclarationList []*VariableDeclaration Async bool }
func (self *ArrowFunctionLiteral) Idx0() file.Idx
func (self *ArrowFunctionLiteral) Idx1() file.Idx
type AssignExpression struct { Operator token.Token Left Expression Right Expression }
func (self *AssignExpression) Idx0() file.Idx
func (self *AssignExpression) Idx1() file.Idx
type AwaitExpression struct { Await file.Idx Argument Expression }
func (self *AwaitExpression) Idx0() file.Idx
func (self *AwaitExpression) Idx1() file.Idx
type BadExpression struct { From file.Idx To file.Idx }
func (self *BadExpression) Idx0() file.Idx
func (self *BadExpression) Idx1() file.Idx
type BadStatement struct { From file.Idx To file.Idx }
func (self *BadStatement) Idx0() file.Idx
func (self *BadStatement) Idx1() file.Idx
type BinaryExpression struct { Operator token.Token Left Expression Right Expression Comparison bool }
func (self *BinaryExpression) Idx0() file.Idx
func (self *BinaryExpression) Idx1() file.Idx
type Binding struct { Target BindingTarget Initializer Expression }
func (self *Binding) Idx0() file.Idx
func (self *Binding) Idx1() file.Idx
type BindingTarget interface { Expression // contains filtered or unexported methods }
type BlockStatement struct { LeftBrace file.Idx List []Statement RightBrace file.Idx }
func (self *BlockStatement) Idx0() file.Idx
func (self *BlockStatement) Idx1() file.Idx
type BooleanLiteral struct { Idx file.Idx Literal string Value bool }
func (self *BooleanLiteral) Idx0() file.Idx
func (self *BooleanLiteral) Idx1() file.Idx
type BracketExpression struct { Left Expression Member Expression LeftBracket file.Idx RightBracket file.Idx }
func (self *BracketExpression) Idx0() file.Idx
func (self *BracketExpression) Idx1() file.Idx
type BranchStatement struct { Idx file.Idx Token token.Token Label *Identifier }
func (self *BranchStatement) Idx0() file.Idx
func (self *BranchStatement) Idx1() file.Idx
type CallExpression struct { Callee Expression LeftParenthesis file.Idx ArgumentList []Expression RightParenthesis file.Idx }
func (self *CallExpression) Idx0() file.Idx
func (self *CallExpression) Idx1() file.Idx
type CaseStatement struct { Case file.Idx Test Expression Consequent []Statement }
func (self *CaseStatement) Idx0() file.Idx
func (self *CaseStatement) Idx1() file.Idx
type CatchStatement struct { Catch file.Idx Parameter BindingTarget Body *BlockStatement }
func (self *CatchStatement) Idx0() file.Idx
func (self *CatchStatement) Idx1() file.Idx
type ClassDeclaration struct { Class *ClassLiteral }
func (self *ClassDeclaration) Idx0() file.Idx
func (self *ClassDeclaration) Idx1() file.Idx
type ClassElement interface { Node // contains filtered or unexported methods }
type ClassLiteral struct { Class file.Idx RightBrace file.Idx Name *Identifier SuperClass Expression Body []ClassElement Source string }
func (self *ClassLiteral) Idx0() file.Idx
func (self *ClassLiteral) Idx1() file.Idx
type ClassStaticBlock struct { Static file.Idx Block *BlockStatement Source string DeclarationList []*VariableDeclaration }
func (self *ClassStaticBlock) Idx0() file.Idx
func (self *ClassStaticBlock) Idx1() file.Idx
type ConciseBody interface { Node // contains filtered or unexported methods }
type ConditionalExpression struct { Test Expression Consequent Expression Alternate Expression }
func (self *ConditionalExpression) Idx0() file.Idx
func (self *ConditionalExpression) Idx1() file.Idx
type DebuggerStatement struct { Debugger file.Idx }
func (self *DebuggerStatement) Idx0() file.Idx
func (self *DebuggerStatement) Idx1() file.Idx
type DoWhileStatement struct { Do file.Idx Test Expression Body Statement RightParenthesis file.Idx }
func (self *DoWhileStatement) Idx0() file.Idx
func (self *DoWhileStatement) Idx1() file.Idx
type DotExpression struct { Left Expression Identifier Identifier }
func (self *DotExpression) Idx0() file.Idx
func (self *DotExpression) Idx1() file.Idx
type EmptyStatement struct { Semicolon file.Idx }
func (self *EmptyStatement) Idx0() file.Idx
func (self *EmptyStatement) Idx1() file.Idx
All expression nodes implement the Expression interface.
type Expression interface { Node // contains filtered or unexported methods }
type ExpressionBody struct { Expression Expression }
func (self *ExpressionBody) Idx0() file.Idx
func (self *ExpressionBody) Idx1() file.Idx
type ExpressionStatement struct { Expression Expression }
func (self *ExpressionStatement) Idx0() file.Idx
func (self *ExpressionStatement) Idx1() file.Idx
type FieldDefinition struct { Idx file.Idx Key Expression Initializer Expression Computed bool Static bool }
func (self *FieldDefinition) Idx0() file.Idx
func (self *FieldDefinition) Idx1() file.Idx
type ForDeclaration struct { Idx file.Idx IsConst bool Target BindingTarget }
func (self *ForDeclaration) Idx0() file.Idx
func (self *ForDeclaration) Idx1() file.Idx
type ForInStatement struct { For file.Idx Into ForInto Source Expression Body Statement }
func (self *ForInStatement) Idx0() file.Idx
func (self *ForInStatement) Idx1() file.Idx
type ForInto interface { Node // contains filtered or unexported methods }
type ForIntoExpression struct { Expression Expression }
func (self *ForIntoExpression) Idx0() file.Idx
func (self *ForIntoExpression) Idx1() file.Idx
type ForIntoVar struct { Binding *Binding }
func (self *ForIntoVar) Idx0() file.Idx
func (self *ForIntoVar) Idx1() file.Idx
type ForLoopInitializer interface { Node // contains filtered or unexported methods }
type ForLoopInitializerExpression struct { Expression Expression }
func (self *ForLoopInitializerExpression) Idx0() file.Idx
func (self *ForLoopInitializerExpression) Idx1() file.Idx
type ForLoopInitializerLexicalDecl struct { LexicalDeclaration LexicalDeclaration }
func (self *ForLoopInitializerLexicalDecl) Idx0() file.Idx
func (self *ForLoopInitializerLexicalDecl) Idx1() file.Idx
type ForLoopInitializerVarDeclList struct { Var file.Idx List []*Binding }
func (self *ForLoopInitializerVarDeclList) Idx0() file.Idx
func (self *ForLoopInitializerVarDeclList) Idx1() file.Idx
type ForOfStatement struct { For file.Idx Into ForInto Source Expression Body Statement }
func (self *ForOfStatement) Idx0() file.Idx
func (self *ForOfStatement) Idx1() file.Idx
type ForStatement struct { For file.Idx Initializer ForLoopInitializer Update Expression Test Expression Body Statement }
func (self *ForStatement) Idx0() file.Idx
func (self *ForStatement) Idx1() file.Idx
type FunctionDeclaration struct { Function *FunctionLiteral }
func (self *FunctionDeclaration) Idx0() file.Idx
func (self *FunctionDeclaration) Idx1() file.Idx
type FunctionLiteral struct { Function file.Idx Name *Identifier ParameterList *ParameterList Body *BlockStatement Source string DeclarationList []*VariableDeclaration Async, Generator bool }
func (self *FunctionLiteral) Idx0() file.Idx
func (self *FunctionLiteral) Idx1() file.Idx
type Identifier struct { Name unistring.String Idx file.Idx }
func (self *Identifier) Idx0() file.Idx
func (self *Identifier) Idx1() file.Idx
type IfStatement struct { If file.Idx Test Expression Consequent Statement Alternate Statement }
func (self *IfStatement) Idx0() file.Idx
func (self *IfStatement) Idx1() file.Idx
type LabelledStatement struct { Label *Identifier Colon file.Idx Statement Statement }
func (self *LabelledStatement) Idx0() file.Idx
func (self *LabelledStatement) Idx1() file.Idx
type LexicalDeclaration struct { Idx file.Idx Token token.Token List []*Binding }
func (self *LexicalDeclaration) Idx0() file.Idx
func (self *LexicalDeclaration) Idx1() file.Idx
type MetaProperty struct { Meta, Property *Identifier Idx file.Idx }
func (self *MetaProperty) Idx0() file.Idx
func (self *MetaProperty) Idx1() file.Idx
type MethodDefinition struct { Idx file.Idx Key Expression Kind PropertyKind // "method", "get" or "set" Body *FunctionLiteral Computed bool Static bool }
func (self *MethodDefinition) Idx0() file.Idx
func (self *MethodDefinition) Idx1() file.Idx
type NewExpression struct { New file.Idx Callee Expression LeftParenthesis file.Idx ArgumentList []Expression RightParenthesis file.Idx }
func (self *NewExpression) Idx0() file.Idx
func (self *NewExpression) Idx1() file.Idx
All nodes implement the Node interface.
type Node interface { Idx0() file.Idx // The index of the first character belonging to the node Idx1() file.Idx // The index of the first character immediately after the node }
type NullLiteral struct { Idx file.Idx Literal string }
func (self *NullLiteral) Idx0() file.Idx
func (self *NullLiteral) Idx1() file.Idx
type NumberLiteral struct { Idx file.Idx Literal string Value interface{} }
func (self *NumberLiteral) Idx0() file.Idx
func (self *NumberLiteral) Idx1() file.Idx
type ObjectLiteral struct { LeftBrace file.Idx RightBrace file.Idx Value []Property }
func (self *ObjectLiteral) Idx0() file.Idx
func (self *ObjectLiteral) Idx1() file.Idx
type ObjectPattern struct { LeftBrace file.Idx RightBrace file.Idx Properties []Property Rest Expression }
func (self *ObjectPattern) Idx0() file.Idx
func (self *ObjectPattern) Idx1() file.Idx
type Optional struct { Expression }
type OptionalChain struct { Expression }
type ParameterList struct { Opening file.Idx List []*Binding Rest Expression Closing file.Idx }
func (self *ParameterList) Idx0() file.Idx
func (self *ParameterList) Idx1() file.Idx
type Pattern interface { BindingTarget // contains filtered or unexported methods }
type PrivateDotExpression struct { Left Expression Identifier PrivateIdentifier }
func (self *PrivateDotExpression) Idx0() file.Idx
func (self *PrivateDotExpression) Idx1() file.Idx
type PrivateIdentifier struct { Identifier }
type Program struct { Body []Statement DeclarationList []*VariableDeclaration File *file.File }
func (self *Program) Idx0() file.Idx
func (self *Program) Idx1() file.Idx
type Property interface { Expression // contains filtered or unexported methods }
type PropertyKeyed struct { Key Expression Kind PropertyKind Value Expression Computed bool }
func (self *PropertyKeyed) Idx0() file.Idx
func (self *PropertyKeyed) Idx1() file.Idx
type PropertyKind string
const ( PropertyKindValue PropertyKind = "value" PropertyKindGet PropertyKind = "get" PropertyKindSet PropertyKind = "set" PropertyKindMethod PropertyKind = "method" )
type PropertyShort struct { Name Identifier Initializer Expression }
func (self *PropertyShort) Idx0() file.Idx
func (self *PropertyShort) Idx1() file.Idx
type RegExpLiteral struct { Idx file.Idx Literal string Pattern string Flags string }
func (self *RegExpLiteral) Idx0() file.Idx
func (self *RegExpLiteral) Idx1() file.Idx
type ReturnStatement struct { Return file.Idx Argument Expression }
func (self *ReturnStatement) Idx0() file.Idx
func (self *ReturnStatement) Idx1() file.Idx
type SequenceExpression struct { Sequence []Expression }
func (self *SequenceExpression) Idx0() file.Idx
func (self *SequenceExpression) Idx1() file.Idx
type SpreadElement struct { Expression }
All statement nodes implement the Statement interface.
type Statement interface { Node // contains filtered or unexported methods }
type StringLiteral struct { Idx file.Idx Literal string Value unistring.String }
func (self *StringLiteral) Idx0() file.Idx
func (self *StringLiteral) Idx1() file.Idx
type SuperExpression struct { Idx file.Idx }
func (self *SuperExpression) Idx0() file.Idx
func (self *SuperExpression) Idx1() file.Idx
type SwitchStatement struct { Switch file.Idx Discriminant Expression Default int Body []*CaseStatement RightBrace file.Idx }
func (self *SwitchStatement) Idx0() file.Idx
func (self *SwitchStatement) Idx1() file.Idx
type TemplateElement struct { Idx file.Idx Literal string Parsed unistring.String Valid bool }
func (self *TemplateElement) Idx0() file.Idx
func (self *TemplateElement) Idx1() file.Idx
type TemplateLiteral struct { OpenQuote file.Idx CloseQuote file.Idx Tag Expression Elements []*TemplateElement Expressions []Expression }
func (self *TemplateLiteral) Idx0() file.Idx
func (self *TemplateLiteral) Idx1() file.Idx
type ThisExpression struct { Idx file.Idx }
func (self *ThisExpression) Idx0() file.Idx
func (self *ThisExpression) Idx1() file.Idx
type ThrowStatement struct { Throw file.Idx Argument Expression }
func (self *ThrowStatement) Idx0() file.Idx
func (self *ThrowStatement) Idx1() file.Idx
type TryStatement struct { Try file.Idx Body *BlockStatement Catch *CatchStatement Finally *BlockStatement }
func (self *TryStatement) Idx0() file.Idx
func (self *TryStatement) Idx1() file.Idx
type UnaryExpression struct { Operator token.Token Idx file.Idx // If a prefix operation Operand Expression Postfix bool }
func (self *UnaryExpression) Idx0() file.Idx
func (self *UnaryExpression) Idx1() file.Idx
type VariableDeclaration struct { Var file.Idx List []*Binding }
func (self *VariableDeclaration) Idx0() file.Idx
func (self *VariableDeclaration) Idx1() file.Idx
type VariableStatement struct { Var file.Idx List []*Binding }
func (self *VariableStatement) Idx0() file.Idx
func (self *VariableStatement) Idx1() file.Idx
type WhileStatement struct { While file.Idx Test Expression Body Statement }
func (self *WhileStatement) Idx0() file.Idx
func (self *WhileStatement) Idx1() file.Idx
type WithStatement struct { With file.Idx Object Expression Body Statement }
func (self *WithStatement) Idx0() file.Idx
func (self *WithStatement) Idx1() file.Idx
type YieldExpression struct { Yield file.Idx Argument Expression Delegate bool }
func (self *YieldExpression) Idx0() file.Idx
func (self *YieldExpression) Idx1() file.Idx