Documentation
¶
Overview ¶
Package ast pipeline ast node
Index ¶
- func NodeStartPos(node *Node) token.LnColPos
- type ArithmeticExpr
- type AssignmentExpr
- type AstNode
- 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 ListLiteral
- type MapLiteral
- 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 *ListLiteral) *Node
- func WrapMapLiteral(node *MapLiteral) *Node
- func WrapNilLiteral(node *NilLiteral) *Node
- func WrapParenExpr(node *ParenExpr) *Node
- func WrapSliceExpr(node *SliceExpr) *Node
- func WrapStringLiteral(node *StringLiteral) *Node
- func WrapUnaryExpr(node *UnaryExpr) *Node
- func WrapeBlockStmt(node *BlockStmt) *Node
- func (n *Node) ArithmeticExpr() *ArithmeticExpr
- func (n *Node) AssignmentExpr() *AssignmentExpr
- func (n *Node) AttrExpr() *AttrExpr
- func (n *Node) BlockStmt() *BlockStmt
- func (n *Node) BoolLiteral() *BoolLiteral
- func (n *Node) BreakStmt() *BreakStmt
- func (n *Node) CallExpr() *CallExpr
- func (n *Node) ConditionalExpr() *ConditionalExpr
- func (n *Node) ContinueStmt() *ContinueStmt
- func (n *Node) FloatLiteral() *FloatLiteral
- func (n *Node) ForInStmt() *ForInStmt
- func (n *Node) ForStmt() *ForStmt
- func (n *Node) Identifier() *Identifier
- func (n *Node) IfelseStmt() *IfelseStmt
- func (n *Node) InExpr() *InExpr
- func (n *Node) IndexExpr() *IndexExpr
- func (n *Node) IntegerLiteral() *IntegerLiteral
- func (n *Node) ListLiteral() *ListLiteral
- func (n *Node) MapLiteral() *MapLiteral
- func (n *Node) NilLiteral() *NilLiteral
- func (n *Node) ParenExpr() *ParenExpr
- func (n *Node) SliceExpr() *SliceExpr
- func (n *Node) StartPos() token.LnColPos
- func (n *Node) String() string
- func (n *Node) StringLiteral() *StringLiteral
- func (n *Node) UnaryExpr() *UnaryExpr
- type NodeType
- type Op
- type ParenExpr
- type SliceExpr
- 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 ListLiteral ¶ added in v0.3.0
func (*ListLiteral) IsExpr ¶ added in v0.3.0
func (e *ListLiteral) IsExpr() bool
func (*ListLiteral) String ¶ added in v0.3.0
func (e *ListLiteral) String() string
type MapLiteral ¶ added in v0.3.0
type MapLiteral struct { KeyValeList [][2]*Node // key,value list LBrace token.LnColPos RBrace token.LnColPos }
func (*MapLiteral) IsExpr ¶ added in v0.3.0
func (e *MapLiteral) IsExpr() bool
func (*MapLiteral) String ¶ added in v0.3.0
func (e *MapLiteral) 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 // contains filtered or unexported fields }
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 *ListLiteral) *Node
func WrapMapLiteral ¶ added in v0.3.0
func WrapMapLiteral(node *MapLiteral) *Node
func WrapNilLiteral ¶
func WrapNilLiteral(node *NilLiteral) *Node
func WrapParenExpr ¶
func WrapSliceExpr ¶ added in v0.3.0
func WrapStringLiteral ¶
func WrapStringLiteral(node *StringLiteral) *Node
func WrapUnaryExpr ¶ added in v0.2.6
func WrapeBlockStmt ¶
func (*Node) ArithmeticExpr ¶
func (n *Node) ArithmeticExpr() *ArithmeticExpr
func (*Node) AssignmentExpr ¶
func (n *Node) AssignmentExpr() *AssignmentExpr
func (*Node) BoolLiteral ¶
func (n *Node) BoolLiteral() *BoolLiteral
func (*Node) ConditionalExpr ¶
func (n *Node) ConditionalExpr() *ConditionalExpr
func (*Node) ContinueStmt ¶
func (n *Node) ContinueStmt() *ContinueStmt
func (*Node) FloatLiteral ¶
func (n *Node) FloatLiteral() *FloatLiteral
func (*Node) Identifier ¶
func (n *Node) Identifier() *Identifier
func (*Node) IfelseStmt ¶
func (n *Node) IfelseStmt() *IfelseStmt
func (*Node) IntegerLiteral ¶
func (n *Node) IntegerLiteral() *IntegerLiteral
func (*Node) ListLiteral ¶ added in v0.3.0
func (n *Node) ListLiteral() *ListLiteral
func (*Node) MapLiteral ¶ added in v0.3.0
func (n *Node) MapLiteral() *MapLiteral
func (*Node) NilLiteral ¶
func (n *Node) NilLiteral() *NilLiteral
func (*Node) StringLiteral ¶
func (n *Node) StringLiteral() *StringLiteral
type NodeType ¶
type NodeType uint
const ( // expr. TypeInvalid NodeType = iota TypeIdentifier TypeStringLiteral TypeIntegerLiteral TypeFloatLiteral TypeBoolLiteral TypeNilLiteral TypeListLiteral TypeMapLiteral TypeInExpr TypeParenExpr TypeAttrExpr TypeIndexExpr TypeUnaryExpr TypeArithmeticExpr TypeConditionalExpr TypeAssignmentExpr TypeCallExpr TypeSliceExpr // stmt. TypeBlockStmt TypeIfelseStmt TypeForStmt TypeForInStmt TypeContinueStmt TypeBreakStmt )
type SliceExpr ¶ added in v0.3.0
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.