parser

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

parser package defines the parser for the Authzed Schema DSL.

Index

Constants

This section is empty.

Variables

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.
	Connect(predicate string, other AstNode)

	// MustDecorate decorates this AstNode with the given property and string value, returning
	// the same node.
	MustDecorate(property string, value string) AstNode

	// MustDecorateWithInt decorates this AstNode with the given property and int value, returning
	// the same node.
	MustDecorateWithInt(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.Source, input string) AstNode

Parse parses the given Schema DSL source into a parse tree.

type NodeBuilder

type NodeBuilder func(source input.Source, kind dslshape.NodeType) AstNode

NodeBuilder is a function for building AST nodes.

Jump to

Keyboard shortcuts

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