Documentation
¶
Index ¶
- func Dump(node Node) string
- func Patch(node *Node, newNode Node)
- func Walk(node *Node, visitor Visitor)
- type ArrayNode
- type BinaryNode
- type BoolNode
- type BuiltinNode
- type ClosureNode
- type ConditionalNode
- type ConstantNode
- type FloatNode
- type FunctionNode
- type IdentifierNode
- type IndexNode
- type IntegerNode
- type MapNode
- type MatchesNode
- type MethodNode
- type NilNode
- type Node
- type PairNode
- type PointerNode
- type PropertyNode
- type SliceNode
- type StringNode
- type UnaryNode
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayNode ¶
type ArrayNode struct {
Nodes []Node
// contains filtered or unexported fields
}
func (*ArrayNode) SetLocation ¶
type BinaryNode ¶
type BinaryNode struct {
Operator string
Left Node
Right Node
// contains filtered or unexported fields
}
func (*BinaryNode) SetLocation ¶
type BoolNode ¶
type BoolNode struct {
Value bool
// contains filtered or unexported fields
}
func (*BoolNode) SetLocation ¶
type BuiltinNode ¶
func (*BuiltinNode) SetLocation ¶
type ClosureNode ¶
type ClosureNode struct {
Node Node
// contains filtered or unexported fields
}
func (*ClosureNode) SetLocation ¶
type ConditionalNode ¶
type ConditionalNode struct {
Cond Node
Exp1 Node
Exp2 Node
// contains filtered or unexported fields
}
func (*ConditionalNode) SetLocation ¶
type ConstantNode ¶
type ConstantNode struct {
Value interface{}
// contains filtered or unexported fields
}
func (*ConstantNode) SetLocation ¶
type FloatNode ¶
type FloatNode struct {
Value float64
// contains filtered or unexported fields
}
func (*FloatNode) SetLocation ¶
type FunctionNode ¶
type FunctionNode struct {
Name string
Arguments []Node
Fast bool
// contains filtered or unexported fields
}
func (*FunctionNode) SetLocation ¶
type IdentifierNode ¶
type IdentifierNode struct {
Value string
// contains filtered or unexported fields
}
func (*IdentifierNode) SetLocation ¶
type IndexNode ¶
func (*IndexNode) SetLocation ¶
type IntegerNode ¶
type IntegerNode struct {
Value int
// contains filtered or unexported fields
}
func (*IntegerNode) SetLocation ¶
type MapNode ¶
type MapNode struct {
Pairs []Node
// contains filtered or unexported fields
}
func (*MapNode) SetLocation ¶
type MatchesNode ¶
type MatchesNode struct {
Regexp *regexp.Regexp
Left Node
Right Node
// contains filtered or unexported fields
}
func (*MatchesNode) SetLocation ¶
type MethodNode ¶
type MethodNode struct {
Node Node
Method string
Arguments []Node
// contains filtered or unexported fields
}
func (*MethodNode) SetLocation ¶
type NilNode ¶
type NilNode struct {
// contains filtered or unexported fields
}
func (*NilNode) SetLocation ¶
type Node ¶
type Node interface {
Location() file.Location
SetLocation(file.Location)
Type() reflect.Type
SetType(reflect.Type)
}
Node represents items of abstract syntax tree.
type PairNode ¶
func (*PairNode) SetLocation ¶
type PointerNode ¶
type PointerNode struct {
// contains filtered or unexported fields
}
func (*PointerNode) SetLocation ¶
type PropertyNode ¶
func (*PropertyNode) SetLocation ¶
type SliceNode ¶
func (*SliceNode) SetLocation ¶
type StringNode ¶
type StringNode struct {
Value string
// contains filtered or unexported fields
}
func (*StringNode) SetLocation ¶
type UnaryNode ¶
func (*UnaryNode) SetLocation ¶
Click to show internal directories.
Click to hide internal directories.