Documentation ¶
Index ¶
- type ArrayLit
- type AssignStmt
- type BadExpr
- type BadStmt
- type BinaryExpr
- type BlockStmt
- type BoolLit
- type BranchStmt
- type CallExpr
- type CharLit
- type CondExpr
- type EmptyStmt
- type ErrorExpr
- type Expr
- type ExprStmt
- type File
- type FloatLit
- type ForInStmt
- type ForStmt
- type FuncLit
- type FuncType
- type Ident
- type IdentList
- type IfStmt
- type ImmutableExpr
- type ImportExpr
- type IncDecStmt
- type IndexExpr
- type IntLit
- type MapElementLit
- type MapLit
- type Node
- type ParenExpr
- type ReturnStmt
- type SelectorExpr
- type SliceExpr
- type Stmt
- type StringLit
- type UnaryExpr
- type UndefinedLit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLit ¶
ArrayLit represents an array literal.
type AssignStmt ¶
AssignStmt represents an assignment statement.
func (*AssignStmt) End ¶
func (s *AssignStmt) End() source.Pos
End returns the position of first character immediately after the node.
func (*AssignStmt) Pos ¶
func (s *AssignStmt) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*AssignStmt) String ¶
func (s *AssignStmt) String() string
type BadExpr ¶
BadExpr represents a bad expression.
type BadStmt ¶
BadStmt represents a bad statement.
type BinaryExpr ¶
BinaryExpr represents a binary operator expression.
func (*BinaryExpr) End ¶
func (e *BinaryExpr) End() source.Pos
End returns the position of first character immediately after the node.
func (*BinaryExpr) Pos ¶
func (e *BinaryExpr) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*BinaryExpr) String ¶
func (e *BinaryExpr) String() string
type BlockStmt ¶
BlockStmt represents a block statement.
type BoolLit ¶
BoolLit represents a boolean literal.
type BranchStmt ¶
BranchStmt represents a branch statement.
func (*BranchStmt) End ¶
func (s *BranchStmt) End() source.Pos
End returns the position of first character immediately after the node.
func (*BranchStmt) Pos ¶
func (s *BranchStmt) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*BranchStmt) String ¶
func (s *BranchStmt) String() string
type CallExpr ¶
CallExpr represents a function call expression.
type CharLit ¶
CharLit represents a character literal.
type CondExpr ¶
CondExpr represents a ternary conditional expression.
type EmptyStmt ¶
EmptyStmt represents an empty statement.
type ErrorExpr ¶
ErrorExpr represents an error expression
type Expr ¶
type Expr interface { Node // contains filtered or unexported methods }
Expr represents an expression node in the AST.
type ExprStmt ¶
type ExprStmt struct {
Expr Expr
}
ExprStmt represents an expression statement.
type File ¶
File represents a file unit.
type FloatLit ¶
FloatLit represents a floating point literal.
type ForInStmt ¶
ForInStmt represents a for-in statement.
type ForStmt ¶
ForStmt represents a for statement.
type FuncLit ¶
FuncLit represents a function literal.
type FuncType ¶
FuncType represents a function type definition.
type Ident ¶
Ident represents an identifier.
type IdentList ¶
IdentList represents a list of identifiers.
type IfStmt ¶
type IfStmt struct { IfPos source.Pos Init Stmt Cond Expr Body *BlockStmt Else Stmt // else branch; or nil }
IfStmt represents an if statement.
type ImmutableExpr ¶
ImmutableExpr represents an immutable expression
func (*ImmutableExpr) End ¶
func (e *ImmutableExpr) End() source.Pos
End returns the position of first character immediately after the node.
func (*ImmutableExpr) Pos ¶
func (e *ImmutableExpr) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*ImmutableExpr) String ¶
func (e *ImmutableExpr) String() string
type ImportExpr ¶
ImportExpr represents an import expression
func (*ImportExpr) End ¶
func (e *ImportExpr) End() source.Pos
End returns the position of first character immediately after the node.
func (*ImportExpr) Pos ¶
func (e *ImportExpr) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*ImportExpr) String ¶
func (e *ImportExpr) String() string
type IncDecStmt ¶
IncDecStmt represents increment or decrement statement.
func (*IncDecStmt) End ¶
func (s *IncDecStmt) End() source.Pos
End returns the position of first character immediately after the node.
func (*IncDecStmt) Pos ¶
func (s *IncDecStmt) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*IncDecStmt) String ¶
func (s *IncDecStmt) String() string
type IndexExpr ¶
IndexExpr represents an index expression.
type IntLit ¶
IntLit represents an integer literal.
type MapElementLit ¶
MapElementLit represents a map element.
func (*MapElementLit) End ¶
func (e *MapElementLit) End() source.Pos
End returns the position of first character immediately after the node.
func (*MapElementLit) Pos ¶
func (e *MapElementLit) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*MapElementLit) String ¶
func (e *MapElementLit) String() string
type MapLit ¶
type MapLit struct { LBrace source.Pos Elements []*MapElementLit RBrace source.Pos }
MapLit represents a map literal.
type Node ¶
type Node interface { // Pos returns the position of first character belonging to the node. Pos() source.Pos // End returns the position of first character immediately after the node. End() source.Pos // String returns a string representation of the node. String() string }
Node represents a node in the AST.
type ParenExpr ¶
ParenExpr represents a parenthesis wrapped expression.
type ReturnStmt ¶
ReturnStmt represents a return statement.
func (*ReturnStmt) End ¶
func (s *ReturnStmt) End() source.Pos
End returns the position of first character immediately after the node.
func (*ReturnStmt) Pos ¶
func (s *ReturnStmt) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*ReturnStmt) String ¶
func (s *ReturnStmt) String() string
type SelectorExpr ¶
SelectorExpr represents a selector expression.
func (*SelectorExpr) End ¶
func (e *SelectorExpr) End() source.Pos
End returns the position of first character immediately after the node.
func (*SelectorExpr) Pos ¶
func (e *SelectorExpr) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*SelectorExpr) String ¶
func (e *SelectorExpr) String() string
type SliceExpr ¶
SliceExpr represents a slice expression.
type Stmt ¶
type Stmt interface { Node // contains filtered or unexported methods }
Stmt represents a statement in the AST.
type StringLit ¶
StringLit represents a string literal.
type UnaryExpr ¶
UnaryExpr represents an unary operator expression.
type UndefinedLit ¶
UndefinedLit represents an undefined literal.
func (*UndefinedLit) End ¶
func (e *UndefinedLit) End() source.Pos
End returns the position of first character immediately after the node.
func (*UndefinedLit) Pos ¶
func (e *UndefinedLit) Pos() source.Pos
Pos returns the position of first character belonging to the node.
func (*UndefinedLit) String ¶
func (e *UndefinedLit) String() string
Source Files ¶
- array_lit.go
- assign_stmt.go
- ast.go
- bad_expr.go
- bad_stmt.go
- binary_expr.go
- block_stmt.go
- bool_lit.go
- branch_stmt.go
- call_expr.go
- char_lit.go
- cond_expr.go
- empty_stmt.go
- error_expr.go
- expr.go
- expr_stmt.go
- file.go
- float_lit.go
- for_in_stmt.go
- for_stmt.go
- func_lit.go
- func_type.go
- ident.go
- ident_list.go
- if_stmt.go
- immutable_expr.go
- import_expr.go
- inc_dec_stmt.go
- index_expr.go
- int_lit.go
- map_element_lit.go
- map_lit.go
- node.go
- paren_expr.go
- return_stmt.go
- selector_expr.go
- slice_expr.go
- stmt.go
- string_lit.go
- unary_expr.go
- undefined_lit.go