Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptimizeBinaryFunction ¶
func OptimizeBinaryFunction(token *lex.Token, left *context.Node, right *context.Node, f BinaryFunction) (*context.Node, error)
OptimizeBinaryFunction will if both left and right nodes are constants return a constant node with the result of some function. If either are not constant then a new node will be created with the supplied handler attached.
func OptimizeUnaryFunction ¶
func OptimizeUnaryFunction(token *lex.Token, left *context.Node, f UnaryFunction) (*context.Node, error)
OptimizeUnaryFunction will if the left node is a constant return a constant node with the result of some function. If it isn't a constant then a new node will be created with the supplied handler attached.
Types ¶
type BinaryFunction ¶
Function that performs an operation on two Values
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseExpression ¶
Top level for normal arithmetic
Click to show internal directories.
Click to hide internal directories.