Documentation ¶
Index ¶
- Variables
- func Eval(lx *Lexer, n *Node) (interface{}, error)
- func Repr(sym int) string
- func Unquote(s string) (string, error)
- type Evaluator
- type Lexer
- type Node
- func (n Node) Format(lx *Lexer) string
- func (n *Node) N(nodes ...*Node) *Node
- func (n *Node) N1(n0 *Node) *Node
- func (n *Node) N2(n0, n1 *Node) *Node
- func (n *Node) N3(n0, n1, n2 *Node) *Node
- func (n *Node) T(tokens ...int) *Node
- func (n *Node) T1(t0 int) *Node
- func (n *Node) T2(t0, t1 int) *Node
- func (n *Node) T3(t0, t1, t2 int) *Node
- func (n Node) Val(lx *Lexer) string
- type NodeType
- type Parser
- type Stack
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeString = [...]string{ ProgramNode: "program", VarNode: "var", ValNode: "val", ExprNode: "expr", InterpNode: "interp", IdentNode: "ident", BoolNode: "bool", IntNode: "int", FloatNode: "float", StringNode: "string", TextNode: "text", ListNode: "list", MapNode: "map", OpNode + negate: "-", OpNode + '+': "+", OpNode + '-': "-", OpNode + '*': "*", OpNode + '/': "/", OpNode + '>': ">", OpNode + '<': "<", OpNode + gte: ">=", OpNode + lte: "<=", OpNode + '!': "!", OpNode + '&': "&", OpNode + '|': "|", }
Functions ¶
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
func (*Evaluator) RegisterBuiltin ¶
type Lexer ¶
Click to show internal directories.
Click to hide internal directories.