Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNodeStack ¶
func NewNodeStack(bufSize int) *nodeStack
func NewStringStack ¶
func NewStringStack(bufSize int) *stringStack
Types ¶
type Expression ¶
type Expression struct {
// contains filtered or unexported fields
}
Expression represents the boolean expression tree and allows basic operation on this
func InfixToExp ¶
func InfixToExp(infixExp string) (*Expression, error)
InfixToExp uses Golang text/scanner and Shunting-yard algorithm to parse expression to tree
func (*Expression) FindStatement ¶
func (e *Expression) FindStatement(key string) *Node
FindStatement returns the node which contains the key
func (*Expression) RemoveStatement ¶
func (e *Expression) RemoveStatement(key string) error
RemoveStatement finds a key in the expression and remove it from the tree return err if key can be found the first node will be removed
func (*Expression) ToQuery ¶
func (e *Expression) ToQuery() string
ToQuery returns query from the tree
Click to show internal directories.
Click to hide internal directories.