Documentation ¶
Overview ¶
Package ast pipeline ast node
Index ¶
- func NodeStartPos(node *Node) token.LnColPos
- type ArithmeticExpr
- type AssignmentExpr
- type AttrExpr
- type BlockStmt
- type BoolLiteral
- type BreakStmt
- type CallExpr
- type ConditionalExpr
- type ContinueStmt
- type DType
- type FloatLiteral
- type ForInStmt
- type ForStmt
- type FuncArgList
- type Identifier
- type IfList
- type IfStmtElem
- type IfelseStmt
- type InExpr
- type IndexExpr
- type IntegerLiteral
- type KwArgs
- type ListInitExpr
- type MapInitExpr
- type NilLiteral
- type Node
- func WrapArithmeticExpr(node *ArithmeticExpr) *Node
- func WrapAssignmentStmt(node *AssignmentExpr) *Node
- func WrapAttrExpr(node *AttrExpr) *Node
- func WrapBoolLiteral(node *BoolLiteral) *Node
- func WrapBreakStmt(node *BreakStmt) *Node
- func WrapCallExpr(node *CallExpr) *Node
- func WrapConditionExpr(node *ConditionalExpr) *Node
- func WrapContinueStmt(node *ContinueStmt) *Node
- func WrapFloatLiteral(node *FloatLiteral) *Node
- func WrapForInStmt(node *ForInStmt) *Node
- func WrapForStmt(node *ForStmt) *Node
- func WrapIdentifier(node *Identifier) *Node
- func WrapIfelseStmt(node *IfelseStmt) *Node
- func WrapInExpr(node *InExpr) *Node
- func WrapIndexExpr(node *IndexExpr) *Node
- func WrapIntegerLiteral(node *IntegerLiteral) *Node
- func WrapListInitExpr(node *ListInitExpr) *Node
- func WrapMapInitExpr(node *MapInitExpr) *Node
- func WrapNilLiteral(node *NilLiteral) *Node
- func WrapParenExpr(node *ParenExpr) *Node
- func WrapStringLiteral(node *StringLiteral) *Node
- func WrapUnaryExpr(node *UnaryExpr) *Node
- func WrapeBlockStmt(node *BlockStmt) *Node
- type NodeType
- type Op
- type ParenExpr
- type Stmts
- type StringLiteral
- type UnaryExpr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeStartPos ¶
Types ¶
type ArithmeticExpr ¶
func (*ArithmeticExpr) IsExpr ¶
func (e *ArithmeticExpr) IsExpr() bool
func (*ArithmeticExpr) String ¶
func (e *ArithmeticExpr) String() string
type AssignmentExpr ¶
func (*AssignmentExpr) IsExpr ¶
func (e *AssignmentExpr) IsExpr() bool
func (*AssignmentExpr) String ¶
func (e *AssignmentExpr) String() string
type BoolLiteral ¶
func (*BoolLiteral) String ¶
func (e *BoolLiteral) String() string
type CallExpr ¶
type ConditionalExpr ¶
func (*ConditionalExpr) IsExpr ¶
func (e *ConditionalExpr) IsExpr() bool
func (*ConditionalExpr) String ¶
func (e *ConditionalExpr) String() string
type ContinueStmt ¶
func (*ContinueStmt) String ¶
func (e *ContinueStmt) String() string
type FloatLiteral ¶
func (*FloatLiteral) IsExpr ¶
func (e *FloatLiteral) IsExpr() bool
func (*FloatLiteral) String ¶
func (e *FloatLiteral) String() string
type ForInStmt ¶
type ForStmt ¶
type FuncArgList ¶
type FuncArgList []*Node
type Identifier ¶
func (*Identifier) IsExpr ¶
func (e *Identifier) IsExpr() bool
func (*Identifier) String ¶
func (e *Identifier) String() string
type IfStmtElem ¶
func (*IfStmtElem) String ¶
func (e *IfStmtElem) String() string
type IfelseStmt ¶
func (*IfelseStmt) IsExpr ¶
func (e *IfelseStmt) IsExpr() bool
func (*IfelseStmt) String ¶
func (e *IfelseStmt) String() string
type IndexExpr ¶
type IntegerLiteral ¶
func (*IntegerLiteral) IsExpr ¶
func (e *IntegerLiteral) IsExpr() bool
func (*IntegerLiteral) String ¶
func (e *IntegerLiteral) String() string
type ListInitExpr ¶
func (*ListInitExpr) IsExpr ¶
func (e *ListInitExpr) IsExpr() bool
func (*ListInitExpr) String ¶
func (e *ListInitExpr) String() string
type MapInitExpr ¶
type MapInitExpr struct { KeyValeList [][2]*Node // key,value list LBrace token.LnColPos RBrace token.LnColPos }
func (*MapInitExpr) IsExpr ¶
func (e *MapInitExpr) IsExpr() bool
func (*MapInitExpr) String ¶
func (e *MapInitExpr) String() string
type NilLiteral ¶
func (*NilLiteral) IsExpr ¶
func (e *NilLiteral) IsExpr() bool
func (*NilLiteral) String ¶
func (e *NilLiteral) String() string
type Node ¶
type Node struct { // node type NodeType NodeType // expr Identifier *Identifier StringLiteral *StringLiteral IntegerLiteral *IntegerLiteral FloatLiteral *FloatLiteral BoolLiteral *BoolLiteral NilLiteral *NilLiteral ListInitExpr *ListInitExpr MapInitExpr *MapInitExpr ParenExpr *ParenExpr AttrExpr *AttrExpr IndexExpr *IndexExpr InExpr *InExpr UnaryExpr *UnaryExpr ArithmeticExpr *ArithmeticExpr ConditionalExpr *ConditionalExpr AssignmentExpr *AssignmentExpr CallExpr *CallExpr // stmt BlockStmt *BlockStmt IfelseStmt *IfelseStmt ForStmt *ForStmt ForInStmt *ForInStmt ContinueStmt *ContinueStmt BreakStmt *BreakStmt }
func WrapArithmeticExpr ¶
func WrapArithmeticExpr(node *ArithmeticExpr) *Node
func WrapAssignmentStmt ¶ added in v0.2.6
func WrapAssignmentStmt(node *AssignmentExpr) *Node
func WrapAttrExpr ¶
func WrapBoolLiteral ¶
func WrapBoolLiteral(node *BoolLiteral) *Node
func WrapBreakStmt ¶
func WrapCallExpr ¶
func WrapConditionExpr ¶
func WrapConditionExpr(node *ConditionalExpr) *Node
func WrapContinueStmt ¶
func WrapContinueStmt(node *ContinueStmt) *Node
func WrapFloatLiteral ¶
func WrapFloatLiteral(node *FloatLiteral) *Node
func WrapForInStmt ¶
func WrapForStmt ¶
func WrapIdentifier ¶
func WrapIdentifier(node *Identifier) *Node
func WrapIfelseStmt ¶
func WrapIfelseStmt(node *IfelseStmt) *Node
func WrapInExpr ¶ added in v0.2.5
func WrapIndexExpr ¶
func WrapIntegerLiteral ¶
func WrapIntegerLiteral(node *IntegerLiteral) *Node
func WrapListInitExpr ¶
func WrapListInitExpr(node *ListInitExpr) *Node
func WrapMapInitExpr ¶
func WrapMapInitExpr(node *MapInitExpr) *Node
func WrapNilLiteral ¶
func WrapNilLiteral(node *NilLiteral) *Node
func WrapParenExpr ¶
func WrapStringLiteral ¶
func WrapStringLiteral(node *StringLiteral) *Node
func WrapUnaryExpr ¶ added in v0.2.6
func WrapeBlockStmt ¶
type NodeType ¶
type NodeType uint
const ( // expr. TypeInvalid NodeType = iota TypeIdentifier TypeStringLiteral TypeIntegerLiteral TypeFloatLiteral TypeBoolLiteral TypeNilLiteral TypeListInitExpr TypeMapInitExpr TypeInExpr TypeParenExpr TypeAttrExpr TypeIndexExpr TypeUnaryExpr TypeArithmeticExpr TypeConditionalExpr TypeAssignmentExpr TypeCallExpr // stmt. TypeBlockStmt TypeIfelseStmt TypeForStmt TypeForInStmt TypeContinueStmt TypeBreakStmt )
type StringLiteral ¶
func (*StringLiteral) IsExpr ¶
func (e *StringLiteral) IsExpr() bool
func (*StringLiteral) String ¶
func (e *StringLiteral) String() string
Click to show internal directories.
Click to hide internal directories.