Versions in this module Expand all Collapse all v0 v0.0.4 Jun 23, 2022 v0.0.3 Jun 22, 2022 v0.0.2 Jun 22, 2022 v0.0.1 Jun 9, 2022 Changes in this version + func Walk(n Node, f func(Node)) + type BinaryNode struct + Args [2]Node + OpStr string + Operator item + func (b *BinaryNode) Check(t *Tree) error + func (b *BinaryNode) Return() models.FuncType + func (b *BinaryNode) String() string + func (b *BinaryNode) StringAST() string + func (b *BinaryNode) Tags() (Tags, error) + type ExprNode struct + Text string + Tree *Tree + func (s *ExprNode) Check(*Tree) error + func (s *ExprNode) Return() models.FuncType + func (s *ExprNode) String() string + func (s *ExprNode) StringAST() string + func (s *ExprNode) Tags() (Tags, error) + type Func struct + Args []models.FuncType + Check func(*Tree, *FuncNode) error + F interface{} + MapFunc bool + PrefixEnabled bool + PrefixKey bool + Return models.FuncType + Tags func([]Node) (Tags, error) + VArgs bool + VArgsOmit bool + VArgsPos int + VariantReturn bool + type FuncNode struct + Args []Node + F *Func + Name string + Prefix string + func (f *FuncNode) Check(t *Tree) error + func (f *FuncNode) Return() models.FuncType + func (f *FuncNode) String() string + func (f *FuncNode) StringAST() string + func (f *FuncNode) Tags() (Tags, error) + type Node interface + Check func(*Tree) error + Position func() Pos + Return func() models.FuncType + String func() string + StringAST func() string + Tags func() (Tags, error) + Type func() NodeType + type NodeType int + const NodeBinary + const NodeExpr + const NodeFunc + const NodeNumber + const NodePrefix + const NodeString + const NodeUnary + func (t NodeType) Type() NodeType + type NumberNode struct + Float64 float64 + IsFloat bool + IsUint bool + Text string + Uint64 uint64 + func (n *NumberNode) Check(*Tree) error + func (n *NumberNode) Return() models.FuncType + func (n *NumberNode) String() string + func (n *NumberNode) StringAST() string + func (n *NumberNode) Tags() (Tags, error) + type Pos int + func (p Pos) Position() Pos + type PrefixNode struct + Arg Node + Text string + func (p *PrefixNode) Check(t *Tree) error + func (p *PrefixNode) Return() models.FuncType + func (p *PrefixNode) String() string + func (p *PrefixNode) StringAST() string + func (p *PrefixNode) Tags() (Tags, error) + type StringNode struct + Quoted string + Text string + func (s *StringNode) Check(*Tree) error + func (s *StringNode) Return() models.FuncType + func (s *StringNode) String() string + func (s *StringNode) StringAST() string + func (s *StringNode) Tags() (Tags, error) + type Tags map[string]struct + func (t Tags) Equal(o Tags) bool + func (t Tags) Intersection(o Tags) Tags + func (t Tags) String() string + func (t Tags) Subset(o Tags) bool + type Tree struct + Root Node + Text string + func New(funcs ...map[string]Func) *Tree + func Parse(text string, funcs ...map[string]Func) (t *Tree, err error) + func ParseSub(text string, funcs ...map[string]Func) (t *Tree, err error) + func (t *Tree) A() Node + func (t *Tree) C() Node + func (t *Tree) E() Node + func (t *Tree) F() Node + func (t *Tree) Func() (f *FuncNode) + func (t *Tree) GetFunction(name string) (v Func, ok bool) + func (t *Tree) M() Node + func (t *Tree) O() Node + func (t *Tree) P() Node + func (t *Tree) Parse(text string, funcs ...map[string]Func) (err error) + func (t *Tree) SetFunction(name string, F interface{}) error + func (t *Tree) String() string + type UnaryNode struct + Arg Node + OpStr string + Operator item + func (u *UnaryNode) Check(t *Tree) error + func (u *UnaryNode) Return() models.FuncType + func (u *UnaryNode) String() string + func (u *UnaryNode) StringAST() string + func (u *UnaryNode) Tags() (Tags, error)