ast

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2022 License: AGPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Node
	F *Function
}

func (*Filter) ToString

func (fs *Filter) ToString() string

type Function

type Function struct {
	Node
	Name       token.Token
	Parameters []interface{}
}

func (*Function) ToString

func (fs *Function) ToString() string

type Node

type Node interface {
	ToString() string
}

Filter ::= Function Function ::= <IDENTIFIER> "(" Parameters ")" Parameters ::= Function |

<IDENTIFIER> |
<IDENTIFIER> "," ValueList

ParameterList :== Value |

Value "," ParameterList

Value ::= <STRING> | <INT> | <NUMBER>

PARSE RULES: - There are 2 types of functions (LOGICAL OPERATOR, FIELD OPERATORS) - They can be further subdivided into -- UNARY : Single Parameter -- BINARY : 2 Parameters

  • They can have an optional final parameter, that would allow for passing extra conditions to be passed into the interpreted so as to allow for different types of processing

SYNTAX CHECKER - FUNCTIONS can be: -- LOGICAL UNARY not(eq(..,..)) -- LOGICAL BINARY and(eq(...), eq(...)) -- FIELD OPERATORS eq(...,...), neq, contains, gt, lt, gte, lte, etc

FUNCTION UNARY: example not - ACCEPTS one parameter of type function

type ParseError

type ParseError struct {
	Node
	Message string
}

func (*ParseError) ToString

func (pes *ParseError) ToString() string

type Value

type Value struct {
	Node
	V token.Token
}

func (*Value) ToString

func (vs *Value) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL