Documentation ¶
Overview ¶
Package lexer build a query tree from the search strategy.
Index ¶
- func PreProcess(query string, options LexOptions) string
- func ProcessInfixOperators(queries map[int]string, operators string) (map[string]map[int]string, error)
- func ProcessNamedOperators(queries map[int]string, operator string) (map[string]map[int]string, error)
- func ProcessPrefixOperators(queries map[int]string, operator string) (map[string]map[int]string, error)
- type LexOptions
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreProcess ¶
func PreProcess(query string, options LexOptions) string
PreProcess attempts to remove the starting numbers from a query and will trim each line in a query if there are any additional, unnecessary spaces. The output should be a fairly clean search strategy.
func ProcessInfixOperators ¶
func ProcessInfixOperators(queries map[int]string, operators string) (map[string]map[int]string, error)
ProcessInfixOperators replaces the references in an infix query with the actual query string.
Types ¶
type LexOptions ¶
type LexOptions struct {
FormatParenthesis bool
}
LexOptions allows for configuration of how the query string is lexed.
type Node ¶
Node contains the encoding of the query as a tree.
func ExpandQuery ¶
ExpandQuery takes a query that has been processed and expands it into a tree.
Click to show internal directories.
Click to hide internal directories.