compiler

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

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

Compiler compiles an AST schema into a list of entity definitions.

func NewCompiler

func NewCompiler(w bool, sch *ast.Schema) *Compiler

NewCompiler returns a new Compiler instance with the given schema and reference validation flag.

func (*Compiler) Compile

func (t *Compiler) Compile() ([]*base.EntityDefinition, []*base.RuleDefinition, error)

Compile compiles the schema into a list of entity definitions. Returns a slice of EntityDefinition pointers and an error, if any.

Jump to

Keyboard shortcuts

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