Documentation
¶
Overview ¶
parser package defines the parser for the Authzed Schema DSL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ComputeExpressionOperators = []binaryOpDefinition{ {lexer.TokenTypeMinus, dslshape.NodeTypeExclusionExpression}, {lexer.TokenTypeAnd, dslshape.NodeTypeIntersectExpression}, {lexer.TokenTypePlus, dslshape.NodeTypeUnionExpression}, }
ComputeExpressionOperators defines the binary operators in precedence order.
Functions ¶
This section is empty.
Types ¶
type AstNode ¶
type AstNode interface {
// Connect connects this AstNode to another AstNode with the given predicate,
// and returns the same AstNode.
Connect(predicate string, other AstNode) AstNode
// Decorate decorates this AstNode with the given property and string value,
// and returns the same AstNode.
Decorate(property string, value string) AstNode
// Decorate decorates this AstNode with the given property and int value,
// and returns the same AstNode.
DecorateWithInt(property string, value int) AstNode
}
AstNode defines an interface for working with nodes created by this parser.
func Parse ¶
func Parse(builder NodeBuilder, source input.InputSource, input string) AstNode
Parse parses the given Schema DSL source into a parse tree.
type NodeBuilder ¶
type NodeBuilder func(source input.InputSource, kind dslshape.NodeType) AstNode
NodeBuilder is a function for building AST nodes.
Click to show internal directories.
Click to hide internal directories.