Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInsertChildToNode = errors.New("failed to insert child to node") ErrToExpressionNoLeftNode = errors.New("no left node") ErrToExpressionNoRightNode = errors.New("no right node") ErrToExpressionUnknownNodeKind = errors.New("unknown node kind") ErrInvalidSyntax = errors.New("invalid syntax") ErrInvalidSyntaxUnbalancedParentheses = &SyntaxError{message: "unbalanced parentheses", cause: ErrInvalidSyntax} ErrInvalidSyntaxNotNoFollowingExpr = &SyntaxError{message: "NOT expression have no following expression to negate", cause: ErrInvalidSyntax} ErrInvalidSyntaxNotInvalidFollowing = &SyntaxError{message: "NOT expression is followed by keyword", cause: ErrInvalidSyntax} ErrInvalidSyntaxAndNoLeftExpr = &SyntaxError{message: "AND expression have no left branch", cause: ErrInvalidSyntax} ErrInvalidSyntaxAndNoRightExpr = &SyntaxError{message: "AND expression have no right branch", cause: ErrInvalidSyntax} ErrInvalidSyntaxAndInvalidFollowing = &SyntaxError{message: "AND expression is is followed by unsupported keyword", cause: ErrInvalidSyntax} ErrInvalidSyntaxOrNoLeftExpr = &SyntaxError{message: "OR expression have no left branch", cause: ErrInvalidSyntax} ErrInvalidSyntaxOrNoRightExpr = &SyntaxError{message: "OR expression have no right branch", cause: ErrInvalidSyntax} ErrInvalidSyntaxOrInvalidFollowing = &SyntaxError{message: "OR expression is is followed by unsupported keyword", cause: ErrInvalidSyntax} )
View Source
var ( ErrTreeInsertIntoLeaf = errors.New("leaf can have no child nodes") ErrTreeInsertIntoFullNode = errors.New("node is at child nodes limit") )
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser interface {
// Parse returns expression tree, represeting input token sequence
Parse(input lexer.TokenStream) (expression.Expression, error)
}
Parser is used to transform lexer output to expression tree to be matched against
type ParserError ¶
type ParserError struct {
// contains filtered or unexported fields
}
func (*ParserError) Error ¶
func (e *ParserError) Error() string
func (*ParserError) Unwrap ¶
func (e *ParserError) Unwrap() error
type SyntaxError ¶
type SyntaxError struct {
// contains filtered or unexported fields
}
func (*SyntaxError) Error ¶
func (e *SyntaxError) Error() string
func (*SyntaxError) Unwrap ¶
func (e *SyntaxError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.