Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AGGREGATE_TYPES = []tokens.Kind{ tokens.KeywordList, tokens.KeywordDict, tokens.KeywordRecord, }
View Source
var ErrParse = errors.New("parse error")
View Source
var PRIMITIVE_TYPES = []tokens.Kind{ tokens.KeywordString, tokens.KeywordNumber, tokens.KeywordBoolean, tokens.KeywordTrinary, tokens.KeywordDocument, }
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewParserFromString ¶
NewParserFromString creates a new parser from a string (convenience function)
type Precedence ¶
type Precedence uint8
Precedence levels for Pratt parser
const ( LOWEST Precedence = iota PIPELINE // |> TERNARY // ? : OR // or XOR // xor AND // and EQUALITY // == != is COMPARISON // > < >= <= matches contains in SUM // + - PRODUCT // * / % UNARY // !x -x +x not CALL // myFunction(X) INDEX // array[index], obj.field PRIMARY // base precedence for primary expressions )
Source Files
¶
- access.go
- block.go
- call.go
- cast.go
- collection.go
- comment.go
- err.go
- export_rule.go
- export_shape.go
- expression.go
- fact.go
- fqn.go
- import.go
- infix.go
- is.go
- lambda.go
- left_curly.go
- let.go
- literal.go
- lookups.go
- namespace.go
- not.go
- parse.go
- parser.go
- pipeline.go
- policy.go
- policy_metadata_description.go
- policy_metadata_tag.go
- policy_metadata_title.go
- policy_metadata_version.go
- precedence.go
- primary.go
- program.go
- rule.go
- shape.go
- statement.go
- ternary.go
- transform.go
- typeref.go
- unary.go
- use.go
Click to show internal directories.
Click to hide internal directories.