parser

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PRECEDENCE_LOWEST      int
	PRECEDENCE_OR          // logical or
	PRECEDENCE_AND         // logical and
	PRECEDENCE_NOT         // logical not
	PRECEDENCE_EQUALS      // ==
	PRECEDENCE_LESSGREATER // > or <
	PRECEDENCE_SUM         // +
	PRECEDENCE_PRODUCT     // *
	PRECEDENCE_PREFIX      // -X or !X
	PRECEDENCE_CALL        // myFunction(X)
)

precedences

Variables

This section is empty.

Functions

func ParseCondition added in v0.2.2

func ParseCondition(inputStr string) (ast.Condition, error)

ParseCondition parses the input condition string

func SplitKeyValueAnnotations added in v0.2.3

func SplitKeyValueAnnotations(inputStr string) (string, map[string]string)

SplitKeyValueAnnotations splits and returns the optional prefix annotations map, and the remaining portion of the string. Example of annotated string: `k1:v1, k2:v2; remaining portion of string`

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(l *lexer.Lexer, domainTypes []types.Type) *Parser

func (*Parser) Errors

func (p *Parser) Errors() []string

func (*Parser) ParsePolicies

func (p *Parser) ParsePolicies() *ast.Policies

Jump to

Keyboard shortcuts

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