parser

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

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,
	// 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.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