Documentation
¶
Overview ¶
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Package ast is a model package that represents the implemented ECMAScript grammar and its abstract syntax tree.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Code generated by "aststring"; DO NOT EDIT.
Index ¶
- func PrefixToString(val interface{}, prefix string) string
- func ToString(node ParseNode) string
- type AdditiveExpression
- type ArgumentList
- type Arguments
- type ArrayBindingPattern
- type ArrayLiteral
- type ArrowFunction
- type ArrowParameters
- type AssignmentExpression
- type AsyncArrowBindingIdentifier
- type AsyncArrowFunction
- type AsyncConciseBody
- type AsyncFunctionBody
- type AsyncFunctionDeclaration
- type AsyncFunctionExpression
- type AsyncGeneratorBody
- type AsyncGeneratorDeclaration
- type AsyncGeneratorExpression
- type AsyncGeneratorMethod
- type AsyncMethod
- type AwaitExpression
- type BindingElement
- type BindingElementList
- type BindingElisionElement
- type BindingIdentifier
- type BindingList
- type BindingPattern
- type BindingProperty
- type BindingPropertyList
- type BindingRestElement
- type BindingRestProperty
- type BitwiseANDExpression
- type BitwiseORExpression
- type BitwiseXORExpression
- type Block
- type BlockStatement
- type BreakStatement
- type BreakableStatement
- type CallExpression
- type CaseBlock
- type CaseClause
- type Catch
- type CatchParameter
- type ClassBody
- type ClassDeclaration
- type ClassElement
- type ClassElementList
- type ClassExpression
- type ClassHeritage
- type ClassTail
- type ComputedPropertyName
- type ConciseBody
- type ConditionalExpression
- type ContinueStatement
- type CoverCallExpressionAndAsyncArrowHead
- type CoverInitializedName
- type CoverParenthesizedExpressionAndArrowParameterList
- type DebuggerStatement
- type Declaration
- type DefaultClause
- type ElementList
- type Elision
- type EmptyStatement
- type EqualityExpression
- type ExponentiationExpression
- type Expression
- type ExpressionStatement
- type Finally
- type ForBinding
- type ForDeclaration
- type FormalParameter
- type FormalParameterList
- type FormalParameters
- type FunctionBody
- type FunctionDeclaration
- type FunctionExpression
- type FunctionRestParameter
- type FunctionStatementList
- type GeneratorBody
- type GeneratorDeclaration
- type GeneratorExpression
- type GeneratorMethod
- type HoistableDeclaration
- type Identifier
- type IdentifierReference
- type IfStatement
- type Initializer
- type IterationStatement
- type LabelIdentifier
- type LabelledItem
- type LabelledStatement
- type LeftHandSideExpression
- type LetOrConst
- type LexicalBinding
- type LexicalDeclaration
- type Literal
- type LiteralPropertyName
- type LogicalANDExpression
- type LogicalORExpression
- type MemberExpression
- type MetaProperty
- type MethodDefinition
- type MultiplicativeExpression
- type NewExpression
- type NewTarget
- type NumericLiteral
- type ObjectBindingPattern
- type ObjectLiteral
- type ParseNode
- type PrimaryExpression
- type PropertyDefinition
- type PropertyDefinitionList
- type PropertyName
- type PropertySetParameterList
- type RegularExpressionLiteral
- type RelationalExpression
- type ReturnStatement
- type Script
- type ScriptBody
- type ShiftExpression
- type SingleNameBinding
- type SpreadElement
- type Statement
- type StatementList
- type StatementListItem
- type SubstitutionTemplate
- type SuperCall
- type SuperProperty
- type SwitchStatement
- type TemplateLiteral
- type TemplateMiddleList
- type TemplateSpans
- type ThrowStatement
- type TryStatement
- type UnaryExpression
- type UniqueFormalParameters
- type UpdateExpression
- type VariableDeclaration
- type VariableDeclarationList
- type VariableStatement
- type WithStatement
- type YieldExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrefixToString ¶
PrefixToString converts the given val to a string using fmt's %v and prepends the prefix. The result is then returned.
Types ¶
type AdditiveExpression ¶
type AdditiveExpression struct { MultiplicativeExpression *MultiplicativeExpression AdditiveExpression *AdditiveExpression Plus bool Minus bool }
AdditiveExpression represents a AdditiveExpression node.
func (*AdditiveExpression) String ¶
func (node *AdditiveExpression) String() string
type ArgumentList ¶
type ArgumentList struct { AssignmentExpression *AssignmentExpression Ellipsis bool ArgumentList *ArgumentList Comma bool }
ArgumentList represents a ArgumentList node.
func (*ArgumentList) String ¶
func (node *ArgumentList) String() string
type Arguments ¶
type Arguments struct { ArgumentList *ArgumentList Comma bool }
Arguments represents a Arguments node.
type ArrayBindingPattern ¶
type ArrayBindingPattern struct { Elision *Elision BindingRestElement *BindingRestElement BindingElementList *BindingElementList Comma bool }
ArrayBindingPattern represents a ArrayBindingPattern node.
func (*ArrayBindingPattern) String ¶
func (node *ArrayBindingPattern) String() string
type ArrayLiteral ¶
type ArrayLiteral struct { Elision *Elision ElementList *ElementList Comma bool }
ArrayLiteral represents a ArrayLiteral node.
func (*ArrayLiteral) String ¶
func (node *ArrayLiteral) String() string
type ArrowFunction ¶
type ArrowFunction struct { ArrowParameters *ArrowParameters ConciseBody *ConciseBody }
ArrowFunction represents a ArrowFunction.
func (*ArrowFunction) String ¶
func (node *ArrowFunction) String() string
type ArrowParameters ¶
type ArrowParameters struct { BindingIdentifier *BindingIdentifier CoverParenthesizedExpressionAndArrowParameterList *CoverParenthesizedExpressionAndArrowParameterList }
ArrowParameters represents a ArrowParameters.
func (*ArrowParameters) String ¶
func (node *ArrowParameters) String() string
type AssignmentExpression ¶
type AssignmentExpression struct { ConditionalExpression *ConditionalExpression YieldExpression *YieldExpression ArrowFunction *ArrowFunction AsyncArrowFunction *AsyncArrowFunction LeftHandSideExpression *LeftHandSideExpression Assign bool AssignmentOperator string AssignmentExpression *AssignmentExpression }
AssignmentExpression represents a AssignmentExpression node.
func (*AssignmentExpression) String ¶
func (node *AssignmentExpression) String() string
type AsyncArrowBindingIdentifier ¶
type AsyncArrowBindingIdentifier struct {
BindingIdentifier *BindingIdentifier
}
AsyncArrowBindingIdentifier represents a AsyncArrowBindingIdentifier.
func (*AsyncArrowBindingIdentifier) String ¶
func (node *AsyncArrowBindingIdentifier) String() string
type AsyncArrowFunction ¶
type AsyncArrowFunction struct { AsyncArrowBindingIdentifier *AsyncArrowBindingIdentifier AsyncConciseBody *AsyncConciseBody CoverCallExpressionAndAsyncArrowHead *CoverCallExpressionAndAsyncArrowHead }
AsyncArrowFunction represents a AsyncArrowFunction.
func (*AsyncArrowFunction) String ¶
func (node *AsyncArrowFunction) String() string
type AsyncConciseBody ¶
type AsyncConciseBody struct { AssignmentExpression *AssignmentExpression AsyncFunctionBody *AsyncFunctionBody }
AsyncConciseBody represents a AsyncConciseBody.
func (*AsyncConciseBody) String ¶
func (node *AsyncConciseBody) String() string
type AsyncFunctionBody ¶
type AsyncFunctionBody struct {
FunctionBody *FunctionBody
}
AsyncFunctionBody represents a AsyncFunctionBody.
func (*AsyncFunctionBody) String ¶
func (node *AsyncFunctionBody) String() string
type AsyncFunctionDeclaration ¶
type AsyncFunctionDeclaration struct { BindingIdentifier *BindingIdentifier AsyncFunctionBody *AsyncFunctionBody FormalParameters *FormalParameters }
AsyncFunctionDeclaration represents a AsyncFunctionDeclaration node.
func (*AsyncFunctionDeclaration) String ¶
func (node *AsyncFunctionDeclaration) String() string
type AsyncFunctionExpression ¶
type AsyncFunctionExpression struct { FormalParameters *FormalParameters AsyncFunctionBody *AsyncFunctionBody BindingIdentifier *BindingIdentifier }
AsyncFunctionExpression represents a AsyncFunctionExpression node.
func (*AsyncFunctionExpression) String ¶
func (node *AsyncFunctionExpression) String() string
type AsyncGeneratorBody ¶
type AsyncGeneratorBody struct {
FunctionBody *FunctionBody
}
AsyncGeneratorBody represents a AsyncGeneratorBody.
func (*AsyncGeneratorBody) String ¶
func (node *AsyncGeneratorBody) String() string
type AsyncGeneratorDeclaration ¶
type AsyncGeneratorDeclaration struct { BindingIdentifier *BindingIdentifier AsyncGeneratorBody *AsyncGeneratorBody FormalParameters *FormalParameters }
AsyncGeneratorDeclaration represents a AsyncGeneratorDeclaration node.
func (*AsyncGeneratorDeclaration) String ¶
func (node *AsyncGeneratorDeclaration) String() string
type AsyncGeneratorExpression ¶
type AsyncGeneratorExpression struct { BindingIdentifier *BindingIdentifier FormalParameters *FormalParameters AsyncGeneratorBody *AsyncGeneratorBody }
AsyncGeneratorExpression represents a AsyncGeneratorExpression node.
func (*AsyncGeneratorExpression) String ¶
func (node *AsyncGeneratorExpression) String() string
type AsyncGeneratorMethod ¶
type AsyncGeneratorMethod struct { PropertyName *PropertyName UniqueFormalParameters *UniqueFormalParameters AsyncGeneratorBody *AsyncGeneratorBody }
AsyncGeneratorMethod represents a AsyncGeneratorMethod.
func (*AsyncGeneratorMethod) String ¶
func (node *AsyncGeneratorMethod) String() string
type AsyncMethod ¶
type AsyncMethod struct { PropertyName *PropertyName UniqueFormalParameters *UniqueFormalParameters AsyncFunctionBody *AsyncFunctionBody }
AsyncMethod represents a AsyncMethod.
func (*AsyncMethod) String ¶
func (node *AsyncMethod) String() string
type AwaitExpression ¶
type AwaitExpression struct {
UnaryExpression *UnaryExpression
}
AwaitExpression represents a AwaitExpression node.
func (*AwaitExpression) String ¶
func (node *AwaitExpression) String() string
type BindingElement ¶
type BindingElement struct { SingleNameBinding *SingleNameBinding BindingPattern *BindingPattern Initializer *Initializer }
BindingElement represents a BindingElement node.
func (*BindingElement) String ¶
func (node *BindingElement) String() string
type BindingElementList ¶
type BindingElementList struct { BindingElisionElement []*BindingElisionElement Comma bool }
BindingElementList represents a BindingElementList node.
func (*BindingElementList) String ¶
func (node *BindingElementList) String() string
type BindingElisionElement ¶
type BindingElisionElement struct { Elision *Elision BindingElement *BindingElement }
BindingElisionElement represents a BindingElisionElement node.
func (*BindingElisionElement) String ¶
func (node *BindingElisionElement) String() string
type BindingIdentifier ¶
type BindingIdentifier struct { Identifier *Identifier Yield bool Await bool }
BindingIdentifier represents a BindingIdentifier node.
func (*BindingIdentifier) String ¶
func (node *BindingIdentifier) String() string
type BindingList ¶
type BindingList struct {
LexicalBindings []*LexicalBinding
}
BindingList represents a BindingList node.
func (*BindingList) String ¶
func (node *BindingList) String() string
type BindingPattern ¶
type BindingPattern struct { ObjectBindingPattern *ObjectBindingPattern ArrayBindingPattern *ArrayBindingPattern }
BindingPattern represents a BindingPattern node.
func (*BindingPattern) String ¶
func (node *BindingPattern) String() string
type BindingProperty ¶
type BindingProperty struct { SingleNameBinding *SingleNameBinding PropertyName *PropertyName BindingElement *BindingElement }
BindingProperty represents a BindingProperty node.
func (*BindingProperty) String ¶
func (node *BindingProperty) String() string
type BindingPropertyList ¶
type BindingPropertyList struct {
BindingProperties []*BindingProperty
}
BindingPropertyList represents a BindingPropertyList node.
func (*BindingPropertyList) String ¶
func (node *BindingPropertyList) String() string
type BindingRestElement ¶
type BindingRestElement struct { BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern }
BindingRestElement represents a BindingRestElement node.
func (*BindingRestElement) String ¶
func (node *BindingRestElement) String() string
type BindingRestProperty ¶
type BindingRestProperty struct {
BindingIdentifier *BindingIdentifier
}
BindingRestProperty represents a BindingRestProperty node.
func (*BindingRestProperty) String ¶
func (node *BindingRestProperty) String() string
type BitwiseANDExpression ¶
type BitwiseANDExpression struct { BitwiseANDExpression *BitwiseANDExpression EqualityExpression *EqualityExpression }
BitwiseANDExpression represents a BitwiseANDExpression node.
func (*BitwiseANDExpression) String ¶
func (node *BitwiseANDExpression) String() string
type BitwiseORExpression ¶
type BitwiseORExpression struct { BitwiseORExpression *BitwiseORExpression BitwiseXORExpression *BitwiseXORExpression }
BitwiseORExpression represents a BitwiseORExpression node.
func (*BitwiseORExpression) String ¶
func (node *BitwiseORExpression) String() string
type BitwiseXORExpression ¶
type BitwiseXORExpression struct { BitwiseANDExpression *BitwiseANDExpression BitwiseXORExpression *BitwiseXORExpression }
BitwiseXORExpression represents a BitwiseXORExpression node.
func (*BitwiseXORExpression) String ¶
func (node *BitwiseXORExpression) String() string
type BlockStatement ¶
type BlockStatement struct {
Block *Block
}
BlockStatement represents a BlockStatement node.
func (*BlockStatement) String ¶
func (node *BlockStatement) String() string
type BreakStatement ¶
type BreakStatement struct {
LabelIdentifier *LabelIdentifier
}
BreakStatement represents a BreakStatement node.
func (*BreakStatement) String ¶
func (node *BreakStatement) String() string
type BreakableStatement ¶
type BreakableStatement struct { IterationStatement *IterationStatement SwitchStatement *SwitchStatement }
BreakableStatement represents a BreakableStatement node.
func (*BreakableStatement) String ¶
func (node *BreakableStatement) String() string
type CallExpression ¶
type CallExpression struct { CoverCallExpressionAndAsyncArrowHead *CoverCallExpressionAndAsyncArrowHead SuperCall *SuperCall CallExpression *CallExpression Arguments *Arguments Expression *Expression IdentifierName string TemplateLiteral *TemplateLiteral }
CallExpression represents a CallExpression node.
func (*CallExpression) String ¶
func (node *CallExpression) String() string
type CaseBlock ¶
type CaseBlock struct { CaseClauses []*CaseClause DefaultClause *DefaultClause }
CaseBlock represents a CaseBlock node.
type CaseClause ¶
type CaseClause struct { Expression *Expression StatementList *StatementList }
CaseClause represents a CaseClause node.
func (*CaseClause) String ¶
func (node *CaseClause) String() string
type Catch ¶
type Catch struct { CatchParameter *CatchParameter Block *Block }
Catch represents a Catch node.
type CatchParameter ¶
type CatchParameter struct { BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern }
CatchParameter represents a CatchParameter node.
func (*CatchParameter) String ¶
func (node *CatchParameter) String() string
type ClassBody ¶
type ClassBody struct {
ClassElementList *ClassElementList
}
ClassBody represents a ClassBody node.
type ClassDeclaration ¶
type ClassDeclaration struct { BindingIdentifier *BindingIdentifier ClassTail *ClassTail }
ClassDeclaration represents a ClassDeclaration node.
func (*ClassDeclaration) String ¶
func (node *ClassDeclaration) String() string
type ClassElement ¶
type ClassElement struct { MethodDefinition *MethodDefinition Static bool }
ClassElement represents a ClassElement node.
func (*ClassElement) String ¶
func (node *ClassElement) String() string
type ClassElementList ¶
type ClassElementList struct {
ClassElements []*ClassElement
}
ClassElementList represents a ClassElementList node.
func (*ClassElementList) String ¶
func (node *ClassElementList) String() string
type ClassExpression ¶
type ClassExpression struct { BindingIdentifier *BindingIdentifier ClassTail *ClassTail }
ClassExpression represents a ClassExpression node.
func (*ClassExpression) String ¶
func (node *ClassExpression) String() string
type ClassHeritage ¶
type ClassHeritage struct {
LeftHandSideExpression *LeftHandSideExpression
}
ClassHeritage represents a ClassHeritage node.
func (*ClassHeritage) String ¶
func (node *ClassHeritage) String() string
type ClassTail ¶
type ClassTail struct { ClassHeritage *ClassHeritage ClassBody *ClassBody }
ClassTail represents a ClassTail node.
type ComputedPropertyName ¶
type ComputedPropertyName struct {
AssignmentExpression *AssignmentExpression
}
ComputedPropertyName represents a ComputedPropertyName node.
func (*ComputedPropertyName) String ¶
func (node *ComputedPropertyName) String() string
type ConciseBody ¶
type ConciseBody struct { AssignmentExpression *AssignmentExpression FunctionBody *FunctionBody }
ConciseBody represents a ConciseBody.
func (*ConciseBody) String ¶
func (node *ConciseBody) String() string
type ConditionalExpression ¶
type ConditionalExpression struct { LogicalORExpression *LogicalORExpression AssignmentExpression1 *AssignmentExpression AssignmentExpression2 *AssignmentExpression }
ConditionalExpression represents a ConditionalExpression node.
func (*ConditionalExpression) String ¶
func (node *ConditionalExpression) String() string
type ContinueStatement ¶
type ContinueStatement struct {
LabelIdentifier *LabelIdentifier
}
ContinueStatement represents a ContinueStatement node.
func (*ContinueStatement) String ¶
func (node *ContinueStatement) String() string
type CoverCallExpressionAndAsyncArrowHead ¶
type CoverCallExpressionAndAsyncArrowHead struct { MemberExpression *MemberExpression Arguments *Arguments }
CoverCallExpressionAndAsyncArrowHead represents a CoverCallExpressionAndAsyncArrowHead.
func (*CoverCallExpressionAndAsyncArrowHead) String ¶
func (node *CoverCallExpressionAndAsyncArrowHead) String() string
type CoverInitializedName ¶
type CoverInitializedName struct { IdentifierReference *IdentifierReference Initializer *Initializer }
CoverInitializedName represents a CoverInitializedName node.
func (*CoverInitializedName) String ¶
func (node *CoverInitializedName) String() string
type CoverParenthesizedExpressionAndArrowParameterList ¶
type CoverParenthesizedExpressionAndArrowParameterList struct { Expression *Expression BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern Comma bool Ellipsis bool }
CoverParenthesizedExpressionAndArrowParameterList represents a CoverParenthesizedExpressionAndArrowParameterList.
func (*CoverParenthesizedExpressionAndArrowParameterList) String ¶
func (node *CoverParenthesizedExpressionAndArrowParameterList) String() string
type DebuggerStatement ¶
type DebuggerStatement struct { }
DebuggerStatement represents a DebuggerStatement node.
func (*DebuggerStatement) String ¶
func (node *DebuggerStatement) String() string
type Declaration ¶
type Declaration struct { HoistableDeclaration *HoistableDeclaration ClassDeclaration *ClassDeclaration LexicalDeclaration *LexicalDeclaration }
Declaration represents a Declaration node.
func (*Declaration) String ¶
func (node *Declaration) String() string
type DefaultClause ¶
type DefaultClause struct {
StatementList *StatementList
}
DefaultClause represents a DefaultClause node.
func (*DefaultClause) String ¶
func (node *DefaultClause) String() string
type ElementList ¶
type ElementList struct { Elision *Elision AssignmentExpression *AssignmentExpression SpreadElement *SpreadElement ElementList *ElementList Comma bool }
ElementList represents a ElementList node.
func (*ElementList) String ¶
func (node *ElementList) String() string
type EmptyStatement ¶
type EmptyStatement struct { }
EmptyStatement represents a EmptyStatement node.
func (*EmptyStatement) String ¶
func (node *EmptyStatement) String() string
type EqualityExpression ¶
type EqualityExpression struct { EqualityExpression *EqualityExpression RelationalExpression *RelationalExpression Equals bool StrictEquals bool NotEquals bool StrictNotEquals bool }
EqualityExpression represents a EqualityExpression node.
func (*EqualityExpression) String ¶
func (node *EqualityExpression) String() string
type ExponentiationExpression ¶
type ExponentiationExpression struct { UnaryExpression *UnaryExpression UpdateExpression *UpdateExpression ExponentiationExpression *ExponentiationExpression }
ExponentiationExpression represents a ExponentiationExpression node.
func (*ExponentiationExpression) String ¶
func (node *ExponentiationExpression) String() string
type Expression ¶
type Expression struct {
AssignmentExpressions []*AssignmentExpression
}
Expression represents a Expression node.
func (*Expression) String ¶
func (node *Expression) String() string
type ExpressionStatement ¶
type ExpressionStatement struct {
Expression *Expression
}
ExpressionStatement represents a ExpressionStatement node.
func (*ExpressionStatement) String ¶
func (node *ExpressionStatement) String() string
type ForBinding ¶
type ForBinding struct { BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern }
ForBinding represents a ForBinding node.
func (*ForBinding) String ¶
func (node *ForBinding) String() string
type ForDeclaration ¶
type ForDeclaration struct { LetOrConst *LetOrConst ForBinding *ForBinding }
ForDeclaration represents a ForDeclaration node.
func (*ForDeclaration) String ¶
func (node *ForDeclaration) String() string
type FormalParameter ¶
type FormalParameter struct {
BindingElement *BindingElement
}
FormalParameter represents a FormalParameter.
func (*FormalParameter) String ¶
func (node *FormalParameter) String() string
type FormalParameterList ¶
type FormalParameterList struct {
FormalParameters []*FormalParameter
}
FormalParameterList represents a FormalParameterList.
func (*FormalParameterList) String ¶
func (node *FormalParameterList) String() string
type FormalParameters ¶
type FormalParameters struct { FunctionRestParameter *FunctionRestParameter FormalParameterList *FormalParameterList Comma bool }
FormalParameters represents a FormalParameters.
func (*FormalParameters) String ¶
func (node *FormalParameters) String() string
type FunctionBody ¶
type FunctionBody struct {
FunctionStatementList *FunctionStatementList
}
FunctionBody represents a FunctionBody.
func (*FunctionBody) String ¶
func (node *FunctionBody) String() string
type FunctionDeclaration ¶
type FunctionDeclaration struct { BindingIdentifier *BindingIdentifier FormalParameters *FormalParameters FunctionBody *FunctionBody }
FunctionDeclaration represents a FunctionDeclaration node.
func (*FunctionDeclaration) String ¶
func (node *FunctionDeclaration) String() string
type FunctionExpression ¶
type FunctionExpression struct { BindingIdentifier *BindingIdentifier FormalParameters *FormalParameters FunctionBody *FunctionBody }
FunctionExpression represents a FunctionExpression node.
func (*FunctionExpression) String ¶
func (node *FunctionExpression) String() string
type FunctionRestParameter ¶
type FunctionRestParameter struct {
BindingRestElement *BindingRestElement
}
FunctionRestParameter represents a FunctionRestParameter.
func (*FunctionRestParameter) String ¶
func (node *FunctionRestParameter) String() string
type FunctionStatementList ¶
type FunctionStatementList struct {
StatementList *StatementList
}
FunctionStatementList represents a FunctionStatementList.
func (*FunctionStatementList) String ¶
func (node *FunctionStatementList) String() string
type GeneratorBody ¶
type GeneratorBody struct {
FunctionBody *FunctionBody
}
GeneratorBody represents a GeneratorBody.
func (*GeneratorBody) String ¶
func (node *GeneratorBody) String() string
type GeneratorDeclaration ¶
type GeneratorDeclaration struct { BindingIdentifier *BindingIdentifier FormalParameters *FormalParameters GeneratorBody *GeneratorBody }
GeneratorDeclaration represents a GeneratorDeclaration node.
func (*GeneratorDeclaration) String ¶
func (node *GeneratorDeclaration) String() string
type GeneratorExpression ¶
type GeneratorExpression struct { BindingIdentifier *BindingIdentifier FormalParameters *FormalParameters GeneratorBody *GeneratorBody }
GeneratorExpression represents a GeneratorExpression node.
func (*GeneratorExpression) String ¶
func (node *GeneratorExpression) String() string
type GeneratorMethod ¶
type GeneratorMethod struct { PropertyName *PropertyName UniqueFormalParameters *UniqueFormalParameters GeneratorBody *GeneratorBody }
GeneratorMethod represents a GeneratorMethod.
func (*GeneratorMethod) String ¶
func (node *GeneratorMethod) String() string
type HoistableDeclaration ¶
type HoistableDeclaration struct { FunctionDeclaration *FunctionDeclaration GeneratorDeclaration *GeneratorDeclaration AsyncFunctionDeclaration *AsyncFunctionDeclaration AsyncGeneratorDeclaration *AsyncGeneratorDeclaration }
HoistableDeclaration represents a HoistableDeclaration node.
func (*HoistableDeclaration) String ¶
func (node *HoistableDeclaration) String() string
type Identifier ¶
type Identifier struct {
IdentifierName string
}
Identifier represents a Identifier node.
func (*Identifier) String ¶
func (node *Identifier) String() string
type IdentifierReference ¶
type IdentifierReference struct { Identifier *Identifier Yield bool Await bool }
IdentifierReference represents a IdentifierReference node.
func (*IdentifierReference) String ¶
func (node *IdentifierReference) String() string
type IfStatement ¶
type IfStatement struct { Expression *Expression Statement *Statement ElseStatement *Statement }
IfStatement represents a IfStatement node.
func (*IfStatement) String ¶
func (node *IfStatement) String() string
type Initializer ¶
type Initializer struct {
AssignmentExpression *AssignmentExpression
}
Initializer represents a Initializer node.
func (*Initializer) String ¶
func (node *Initializer) String() string
type IterationStatement ¶
type IterationStatement struct { Statement *Statement Expression1 *Expression Expression2 *Expression Expression3 *Expression VariableDeclarationList *VariableDeclarationList LexicalDeclaration *LexicalDeclaration LeftHandSideExpression *LeftHandSideExpression ForBinding *ForBinding ForDeclaration *ForDeclaration AssignmentExpression *AssignmentExpression Do bool While bool For bool In bool Var bool Of bool Await bool }
IterationStatement represents a IterationStatement node.
func (*IterationStatement) String ¶
func (node *IterationStatement) String() string
type LabelIdentifier ¶
type LabelIdentifier struct { Identifier *Identifier Yield bool Await bool }
LabelIdentifier represents a LabelIdentifier node.
func (*LabelIdentifier) String ¶
func (node *LabelIdentifier) String() string
type LabelledItem ¶
type LabelledItem struct { Statement *Statement FunctionDeclaration *FunctionDeclaration }
LabelledItem represents a LabelledItem node.
func (*LabelledItem) String ¶
func (node *LabelledItem) String() string
type LabelledStatement ¶
type LabelledStatement struct { LabelIdentifier *LabelIdentifier LabelledItem *LabelledItem }
LabelledStatement represents a LabelledStatement node.
func (*LabelledStatement) String ¶
func (node *LabelledStatement) String() string
type LeftHandSideExpression ¶
type LeftHandSideExpression struct { NewExpression *NewExpression CallExpression *CallExpression }
LeftHandSideExpression represents a LeftHandSideExpression node.
func (*LeftHandSideExpression) String ¶
func (node *LeftHandSideExpression) String() string
type LetOrConst ¶
LetOrConst represents a LetOrConst node.
func (*LetOrConst) String ¶
func (node *LetOrConst) String() string
type LexicalBinding ¶
type LexicalBinding struct { BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern Initializer *Initializer }
LexicalBinding represents a LexicalBinding node.
func (*LexicalBinding) String ¶
func (node *LexicalBinding) String() string
type LexicalDeclaration ¶
type LexicalDeclaration struct { LetOrConst *LetOrConst BindingList *BindingList }
LexicalDeclaration represents a LexicalDeclaration node.
func (*LexicalDeclaration) String ¶
func (node *LexicalDeclaration) String() string
type Literal ¶
type Literal struct { NullLiteral string BooleanLiteral string NumericLiteral *NumericLiteral StringLiteral string }
Literal represents a Literal node.
type LiteralPropertyName ¶
type LiteralPropertyName struct { IdentifierName string StringLiteral string NumericLiteral *NumericLiteral }
LiteralPropertyName represents a LiteralPropertyName node.
func (*LiteralPropertyName) String ¶
func (node *LiteralPropertyName) String() string
type LogicalANDExpression ¶
type LogicalANDExpression struct { BitwiseORExpression *BitwiseORExpression LogicalANDExpression *LogicalANDExpression }
LogicalANDExpression represents a LogicalANDExpression node.
func (*LogicalANDExpression) String ¶
func (node *LogicalANDExpression) String() string
type LogicalORExpression ¶
type LogicalORExpression struct { LogicalANDExpression *LogicalANDExpression LogicalORExpression *LogicalORExpression }
LogicalORExpression represents a LogicalORExpression node.
func (*LogicalORExpression) String ¶
func (node *LogicalORExpression) String() string
type MemberExpression ¶
type MemberExpression struct { PrimaryExpression *PrimaryExpression MemberExpression *MemberExpression Expression *Expression IdentifierName string TemplateLiteral *TemplateLiteral SuperProperty *SuperProperty MetaProperty *MetaProperty Arguments *Arguments }
MemberExpression represents a MemberExpression node.
func (*MemberExpression) String ¶
func (node *MemberExpression) String() string
type MetaProperty ¶
type MetaProperty struct {
NewTarget *NewTarget
}
MetaProperty represents a MetaProperty node.
func (*MetaProperty) String ¶
func (node *MetaProperty) String() string
type MethodDefinition ¶
type MethodDefinition struct { PropertyName *PropertyName UniqueFormalPatameters *UniqueFormalParameters FunctionBody *FunctionBody GeneratorMethod *GeneratorMethod AsyncMethod *AsyncMethod AsyncGeneratorMethod *AsyncGeneratorMethod PropertySetParameterList *PropertySetParameterList Get bool Set bool }
MethodDefinition represents a MethodDefinition.
func (*MethodDefinition) String ¶
func (node *MethodDefinition) String() string
type MultiplicativeExpression ¶
type MultiplicativeExpression struct { ExponentiationExpression *ExponentiationExpression MultiplicativeExpression *MultiplicativeExpression Asterisk bool Slash bool Modulo bool }
MultiplicativeExpression represents a MultiplicativeExpression node.
func (*MultiplicativeExpression) String ¶
func (node *MultiplicativeExpression) String() string
type NewExpression ¶
type NewExpression struct { MemberExpression *MemberExpression NewExpression *NewExpression }
NewExpression represents a NewExpression node.
func (*NewExpression) String ¶
func (node *NewExpression) String() string
type NumericLiteral ¶
type NumericLiteral struct { DecimalLiteral string BinaryIntegerLiteral string OctalIntegerLiteral string HexIntegerLiteral string }
NumericLiteral represents a NumericLiteral node.
func (*NumericLiteral) String ¶
func (node *NumericLiteral) String() string
type ObjectBindingPattern ¶
type ObjectBindingPattern struct { BindingRestProperty *BindingRestProperty BindingPropertyList *BindingPropertyList Comma bool }
ObjectBindingPattern represents a ObjectBindingPattern node.
func (*ObjectBindingPattern) String ¶
func (node *ObjectBindingPattern) String() string
type ObjectLiteral ¶
type ObjectLiteral struct { PropertyDefinitionList *PropertyDefinitionList Comma bool }
ObjectLiteral represents a ObjectLiteral node.
func (*ObjectLiteral) String ¶
func (node *ObjectLiteral) String() string
type PrimaryExpression ¶
type PrimaryExpression struct { This bool IdentifierReference *IdentifierReference Literal *Literal ArrayLiteral *ArrayLiteral ObjectLiteral *ObjectLiteral FunctionExpression *FunctionExpression ClassExpression *ClassExpression GeneratorExpression *GeneratorExpression AsyncFunctionExpression *AsyncFunctionExpression AsyncGeneratorExpression *AsyncGeneratorExpression RegularExpressionLiteral *RegularExpressionLiteral TemplateLiteral *TemplateLiteral CoverParenthesizedExpressionAndArrowParameterList *CoverParenthesizedExpressionAndArrowParameterList }
PrimaryExpression represents a PrimaryExpression node.
func (*PrimaryExpression) String ¶
func (node *PrimaryExpression) String() string
type PropertyDefinition ¶
type PropertyDefinition struct { Colon bool Ellipsis bool IdentifierReference *IdentifierReference CoverInitializedName *CoverInitializedName PropertyName *PropertyName AssignmentExpression *AssignmentExpression MethodDefinition *MethodDefinition }
PropertyDefinition represents a PropertyDefinition node.
func (*PropertyDefinition) String ¶
func (node *PropertyDefinition) String() string
type PropertyDefinitionList ¶
type PropertyDefinitionList struct {
PropertyDefinitions []*PropertyDefinition
}
PropertyDefinitionList represents a PropertyDefinitionList node.
func (*PropertyDefinitionList) String ¶
func (node *PropertyDefinitionList) String() string
type PropertyName ¶
type PropertyName struct { LiteralPropertyName *LiteralPropertyName ComputedPropertyName *ComputedPropertyName }
PropertyName represents a PropertyName node.
func (*PropertyName) String ¶
func (node *PropertyName) String() string
type PropertySetParameterList ¶
type PropertySetParameterList struct {
FormalParameter *FormalParameter
}
PropertySetParameterList represents a PropertySetParameterList.
func (*PropertySetParameterList) String ¶
func (node *PropertySetParameterList) String() string
type RegularExpressionLiteral ¶
RegularExpressionLiteral represents a RegularExpressionLiteral node.
func (*RegularExpressionLiteral) String ¶
func (node *RegularExpressionLiteral) String() string
type RelationalExpression ¶
type RelationalExpression struct { ShiftExpression *ShiftExpression RelationalExpression *RelationalExpression LessThan bool GreaterThan bool LessThanOrEqualTo bool GreaterThanOrEqualTo bool Instanceof bool In bool }
RelationalExpression represents a RelationalExpression node.
func (*RelationalExpression) String ¶
func (node *RelationalExpression) String() string
type ReturnStatement ¶
type ReturnStatement struct {
Expression *Expression
}
ReturnStatement represents a ReturnStatement node.
func (*ReturnStatement) String ¶
func (node *ReturnStatement) String() string
type Script ¶
type Script struct {
ScriptBody *ScriptBody
}
Script represents a Script node.
type ScriptBody ¶
type ScriptBody struct {
StatementList *StatementList
}
ScriptBody represents a ScriptBody node.
func (*ScriptBody) String ¶
func (node *ScriptBody) String() string
type ShiftExpression ¶
type ShiftExpression struct { ShiftExpression *ShiftExpression AdditiveExpression *AdditiveExpression LeftShift bool RightShift bool UnsignedRightShift bool }
ShiftExpression represents a ShiftExpression node.
func (*ShiftExpression) String ¶
func (node *ShiftExpression) String() string
type SingleNameBinding ¶
type SingleNameBinding struct { BindingIdentifier *BindingIdentifier Initializer *Initializer }
SingleNameBinding represents a SingleNameBinding node.
func (*SingleNameBinding) String ¶
func (node *SingleNameBinding) String() string
type SpreadElement ¶
type SpreadElement struct {
AssignmentExpression *AssignmentExpression
}
SpreadElement represents a SpreadElement node.
func (*SpreadElement) String ¶
func (node *SpreadElement) String() string
type Statement ¶
type Statement struct { BlockStatement *BlockStatement VariableStatement *VariableStatement EmptyStatement *EmptyStatement ExpressionStatement *ExpressionStatement IfStatement *IfStatement BreakableStatement *BreakableStatement ContinueStatement *ContinueStatement BreakStatement *BreakStatement ReturnStatement *ReturnStatement WithStatement *WithStatement LabelledStatement *LabelledStatement ThrowStatement *ThrowStatement TryStatement *TryStatement DebuggerStatement *DebuggerStatement }
Statement represents a Statement node.
type StatementList ¶
type StatementList struct {
StatementListItems []*StatementListItem
}
StatementList represents a StatementList node.
func (*StatementList) String ¶
func (node *StatementList) String() string
type StatementListItem ¶
type StatementListItem struct { Statement *Statement Declaration *Declaration }
StatementListItem represents a StatementListItem node.
func (*StatementListItem) String ¶
func (node *StatementListItem) String() string
type SubstitutionTemplate ¶
type SubstitutionTemplate struct { TemplateHead string Expression *Expression TemplateSpans *TemplateSpans }
SubstitutionTemplate represents a SubstitutionTemplate node.
func (*SubstitutionTemplate) String ¶
func (node *SubstitutionTemplate) String() string
type SuperCall ¶
type SuperCall struct {
Arguments *Arguments
}
SuperCall represents a SuperCall node.
type SuperProperty ¶
type SuperProperty struct { Expression *Expression IdentifierName string }
SuperProperty represents a SuperProperty node.
func (*SuperProperty) String ¶
func (node *SuperProperty) String() string
type SwitchStatement ¶
type SwitchStatement struct { Expression *Expression CaseBlock *CaseBlock }
SwitchStatement represents a SwitchStatement node.
func (*SwitchStatement) String ¶
func (node *SwitchStatement) String() string
type TemplateLiteral ¶
type TemplateLiteral struct { NoSubstitutionTemplate string SubstitutionTemplate *SubstitutionTemplate }
TemplateLiteral represents a TemplateLiteral node.
func (*TemplateLiteral) String ¶
func (node *TemplateLiteral) String() string
type TemplateMiddleList ¶
type TemplateMiddleList struct { TemplateMiddle string Expression *Expression TemplateMiddleList *TemplateMiddleList }
TemplateMiddleList represents a TemplateMiddleList node.
func (*TemplateMiddleList) String ¶
func (node *TemplateMiddleList) String() string
type TemplateSpans ¶
type TemplateSpans struct { TemplateTail string TemplateMiddleList *TemplateMiddleList }
TemplateSpans represents a TemplateSpans node.
func (*TemplateSpans) String ¶
func (node *TemplateSpans) String() string
type ThrowStatement ¶
type ThrowStatement struct {
Expression *Expression
}
ThrowStatement represents a ThrowStatement node.
func (*ThrowStatement) String ¶
func (node *ThrowStatement) String() string
type TryStatement ¶
TryStatement represents a TryStatement node.
func (*TryStatement) String ¶
func (node *TryStatement) String() string
type UnaryExpression ¶
type UnaryExpression struct { UpdateExpression *UpdateExpression UnaryExpression *UnaryExpression AwaitExpression *AwaitExpression Delete bool Void bool Typeof bool Plus bool Minus bool Tilde bool ExclamationMark bool }
UnaryExpression represents a UnaryExpression node.
func (*UnaryExpression) String ¶
func (node *UnaryExpression) String() string
type UniqueFormalParameters ¶
type UniqueFormalParameters struct {
FormalParameters *FormalParameters
}
UniqueFormalParameters represents a UniqueFormalParameters.
func (*UniqueFormalParameters) String ¶
func (node *UniqueFormalParameters) String() string
type UpdateExpression ¶
type UpdateExpression struct { LeftHandSideExpression *LeftHandSideExpression UnaryExpression *UnaryExpression PlusPlus bool MinusMinus bool }
UpdateExpression represents a UpdateExpression node.
func (*UpdateExpression) String ¶
func (node *UpdateExpression) String() string
type VariableDeclaration ¶
type VariableDeclaration struct { BindingIdentifier *BindingIdentifier BindingPattern *BindingPattern Initializer *Initializer }
VariableDeclaration represents a VariableDeclaration node.
func (*VariableDeclaration) String ¶
func (node *VariableDeclaration) String() string
type VariableDeclarationList ¶
type VariableDeclarationList struct {
VariableDeclarations []*VariableDeclaration
}
VariableDeclarationList represents a VariableDeclarationList node.
func (*VariableDeclarationList) String ¶
func (node *VariableDeclarationList) String() string
type VariableStatement ¶
type VariableStatement struct {
VariableDeclarationList *VariableDeclarationList
}
VariableStatement represents a VariableStatement node.
func (*VariableStatement) String ¶
func (node *VariableStatement) String() string
type WithStatement ¶
type WithStatement struct { Expression *Expression Statement *Statement }
WithStatement represents a WithStatement node.
func (*WithStatement) String ¶
func (node *WithStatement) String() string
type YieldExpression ¶
type YieldExpression struct { AssignmentExpression *AssignmentExpression Asterisk bool }
YieldExpression represents a YieldExpression node.
func (*YieldExpression) String ¶
func (node *YieldExpression) String() string
Source Files
¶
- ast.go
- binding.go
- binding_string.go
- declaration.go
- declaration_string.go
- doc.go
- expression.go
- expression_string.go
- function.go
- function_string.go
- identifier.go
- identifier_string.go
- literal.go
- literal_string.go
- other.go
- other_string.go
- parse_node.go
- script.go
- script_string.go
- statement.go
- statement_string.go