Versions in this module Expand all Collapse all v0 v0.2.2 Jun 16, 2023 Changes in this version + func Walk(v Visitor, n Node) + type ArrayLiteral struct + LeftBracket file.Idx + RightBracket file.Idx + Value []Expression + func (al *ArrayLiteral) Idx0() file.Idx + func (al *ArrayLiteral) Idx1() file.Idx + type AssignExpression struct + Left Expression + Operator token.Token + Right Expression + func (ae *AssignExpression) Idx0() file.Idx + func (ae *AssignExpression) Idx1() file.Idx + type BadExpression struct + From file.Idx + To file.Idx + func (be *BadExpression) Idx0() file.Idx + func (be *BadExpression) Idx1() file.Idx + type BadStatement struct + From file.Idx + To file.Idx + func (bs *BadStatement) Idx0() file.Idx + func (bs *BadStatement) Idx1() file.Idx + type BinaryExpression struct + Comparison bool + Left Expression + Operator token.Token + Right Expression + func (be *BinaryExpression) Idx0() file.Idx + func (be *BinaryExpression) Idx1() file.Idx + type BlockStatement struct + LeftBrace file.Idx + List []Statement + RightBrace file.Idx + func (bs *BlockStatement) Idx0() file.Idx + func (bs *BlockStatement) Idx1() file.Idx + type BooleanLiteral struct + Idx file.Idx + Literal string + Value bool + func (bl *BooleanLiteral) Idx0() file.Idx + func (bl *BooleanLiteral) Idx1() file.Idx + type BracketExpression struct + Left Expression + LeftBracket file.Idx + Member Expression + RightBracket file.Idx + func (be *BracketExpression) Idx0() file.Idx + func (be *BracketExpression) Idx1() file.Idx + type BranchStatement struct + Idx file.Idx + Label *Identifier + Token token.Token + func (bs *BranchStatement) Idx0() file.Idx + func (bs *BranchStatement) Idx1() file.Idx + type CallExpression struct + ArgumentList []Expression + Callee Expression + LeftParenthesis file.Idx + RightParenthesis file.Idx + func (ce *CallExpression) Idx0() file.Idx + func (ce *CallExpression) Idx1() file.Idx + type CaseStatement struct + Case file.Idx + Consequent []Statement + Test Expression + func (cs *CaseStatement) Idx0() file.Idx + func (cs *CaseStatement) Idx1() file.Idx + type CatchStatement struct + Body Statement + Catch file.Idx + Parameter *Identifier + func (cs *CatchStatement) Idx0() file.Idx + func (cs *CatchStatement) Idx1() file.Idx + type Comment struct + Begin file.Idx + Position CommentPosition + Text string + func NewComment(text string, idx file.Idx) *Comment + func (c Comment) String() string + type CommentMap map[Node][]*Comment + func (cm CommentMap) AddComment(node Node, comment *Comment) + func (cm CommentMap) AddComments(node Node, comments []*Comment, position CommentPosition) + func (cm CommentMap) MoveComments(from, to Node, position CommentPosition) + func (cm CommentMap) Size() int + type CommentPosition int + const COLON + const DO + const FINAL + const FOR + const IF + const KEY + const LEADING + const TBD + const TRAILING + const WHILE + const WITH + func (cp CommentPosition) String() string + type Comments struct + CommentMap CommentMap + Comments []*Comment + Current Expression + func NewComments() *Comments + func (c *Comments) AddComment(comment *Comment) + func (c *Comments) AfterBlock() + func (c *Comments) AtLineBreak() + func (c *Comments) Fetch() []*Comment + func (c *Comments) FetchAll() []*Comment + func (c *Comments) MarkComments(position CommentPosition) + func (c *Comments) MarkPrimary() + func (c *Comments) PostProcessNode(node Node) + func (c *Comments) ResetLineBreak() + func (c *Comments) SetExpression(node Expression) + func (c *Comments) String() string + func (c *Comments) Unset() + type ConditionalExpression struct + Alternate Expression + Consequent Expression + Test Expression + func (ce *ConditionalExpression) Idx0() file.Idx + func (ce *ConditionalExpression) Idx1() file.Idx + type DebuggerStatement struct + Debugger file.Idx + func (ds *DebuggerStatement) Idx0() file.Idx + func (ds *DebuggerStatement) Idx1() file.Idx + type Declaration interface + type DoWhileStatement struct + Body Statement + Do file.Idx + Test Expression + func (dws *DoWhileStatement) Idx0() file.Idx + func (dws *DoWhileStatement) Idx1() file.Idx + type DotExpression struct + Identifier *Identifier + Left Expression + func (de *DotExpression) Idx0() file.Idx + func (de *DotExpression) Idx1() file.Idx + type EmptyExpression struct + Begin file.Idx + End file.Idx + func (ee *EmptyExpression) Idx0() file.Idx + func (ee *EmptyExpression) Idx1() file.Idx + type EmptyStatement struct + Semicolon file.Idx + func (es *EmptyStatement) Idx0() file.Idx + func (es *EmptyStatement) Idx1() file.Idx + type Expression interface + type ExpressionStatement struct + Expression Expression + func (es *ExpressionStatement) Idx0() file.Idx + func (es *ExpressionStatement) Idx1() file.Idx + type ForInStatement struct + Body Statement + For file.Idx + Into Expression + Source Expression + func (fis *ForInStatement) Idx0() file.Idx + func (fis *ForInStatement) Idx1() file.Idx + type ForStatement struct + Body Statement + For file.Idx + Initializer Expression + Test Expression + Update Expression + func (fs *ForStatement) Idx0() file.Idx + func (fs *ForStatement) Idx1() file.Idx + type FunctionDeclaration struct + Function *FunctionLiteral + type FunctionLiteral struct + Body Statement + DeclarationList []Declaration + Function file.Idx + Name *Identifier + ParameterList *ParameterList + Source string + func (fl *FunctionLiteral) Idx0() file.Idx + func (fl *FunctionLiteral) Idx1() file.Idx + type FunctionStatement struct + Function *FunctionLiteral + func (fs *FunctionStatement) Idx0() file.Idx + func (fs *FunctionStatement) Idx1() file.Idx + type Identifier struct + Idx file.Idx + Name string + func (i *Identifier) Idx0() file.Idx + func (i *Identifier) Idx1() file.Idx + type IfStatement struct + Alternate Statement + Consequent Statement + If file.Idx + Test Expression + func (is *IfStatement) Idx0() file.Idx + func (is *IfStatement) Idx1() file.Idx + type LabelledStatement struct + Colon file.Idx + Label *Identifier + Statement Statement + func (ls *LabelledStatement) Idx0() file.Idx + func (ls *LabelledStatement) Idx1() file.Idx + type NewExpression struct + ArgumentList []Expression + Callee Expression + LeftParenthesis file.Idx + New file.Idx + RightParenthesis file.Idx + func (ne *NewExpression) Idx0() file.Idx + func (ne *NewExpression) Idx1() file.Idx + type Node interface + Idx0 func() file.Idx + Idx1 func() file.Idx + type NullLiteral struct + Idx file.Idx + Literal string + func (nl *NullLiteral) Idx0() file.Idx + func (nl *NullLiteral) Idx1() file.Idx + type NumberLiteral struct + Idx file.Idx + Literal string + Value interface{} + func (nl *NumberLiteral) Idx0() file.Idx + func (nl *NumberLiteral) Idx1() file.Idx + type ObjectLiteral struct + LeftBrace file.Idx + RightBrace file.Idx + Value []Property + func (ol *ObjectLiteral) Idx0() file.Idx + func (ol *ObjectLiteral) Idx1() file.Idx + type ParameterList struct + Closing file.Idx + List []*Identifier + Opening file.Idx + type Program struct + Body []Statement + Comments CommentMap + DeclarationList []Declaration + File *file.File + func (p *Program) Idx0() file.Idx + func (p *Program) Idx1() file.Idx + type Property struct + Key string + Kind string + Value Expression + type RegExpLiteral struct + Flags string + Idx file.Idx + Literal string + Pattern string + Value string + func (rl *RegExpLiteral) Idx0() file.Idx + func (rl *RegExpLiteral) Idx1() file.Idx + type ReturnStatement struct + Argument Expression + Return file.Idx + func (rs *ReturnStatement) Idx0() file.Idx + func (rs *ReturnStatement) Idx1() file.Idx + type SequenceExpression struct + Sequence []Expression + func (se *SequenceExpression) Idx0() file.Idx + func (se *SequenceExpression) Idx1() file.Idx + type Statement interface + type StringLiteral struct + Idx file.Idx + Literal string + Value string + func (sl *StringLiteral) Idx0() file.Idx + func (sl *StringLiteral) Idx1() file.Idx + type SwitchStatement struct + Body []*CaseStatement + Default int + Discriminant Expression + Switch file.Idx + func (ss *SwitchStatement) Idx0() file.Idx + func (ss *SwitchStatement) Idx1() file.Idx + type ThisExpression struct + Idx file.Idx + func (te *ThisExpression) Idx0() file.Idx + func (te *ThisExpression) Idx1() file.Idx + type ThrowStatement struct + Argument Expression + Throw file.Idx + func (ts *ThrowStatement) Idx0() file.Idx + func (ts *ThrowStatement) Idx1() file.Idx + type TryStatement struct + Body Statement + Catch *CatchStatement + Finally Statement + Try file.Idx + func (ts *TryStatement) Idx0() file.Idx + func (ts *TryStatement) Idx1() file.Idx + type UnaryExpression struct + Idx file.Idx + Operand Expression + Operator token.Token + Postfix bool + func (ue *UnaryExpression) Idx0() file.Idx + func (ue *UnaryExpression) Idx1() file.Idx + type VariableDeclaration struct + List []*VariableExpression + Var file.Idx + type VariableExpression struct + Idx file.Idx + Initializer Expression + Name string + func (ve *VariableExpression) Idx0() file.Idx + func (ve *VariableExpression) Idx1() file.Idx + type VariableStatement struct + List []Expression + Var file.Idx + func (vs *VariableStatement) Idx0() file.Idx + func (vs *VariableStatement) Idx1() file.Idx + type Visitor interface + Enter func(n Node) (v Visitor) + Exit func(n Node) + type WhileStatement struct + Body Statement + Test Expression + While file.Idx + func (ws *WhileStatement) Idx0() file.Idx + func (ws *WhileStatement) Idx1() file.Idx + type WithStatement struct + Body Statement + Object Expression + With file.Idx + func (ws *WithStatement) Idx0() file.Idx + func (ws *WithStatement) Idx1() file.Idx