compiler

package
v0.0.0-...-5452837 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAmbiguousEnum       = errors.New("ambiguous enum")
	ErrDivisionByZero      = errors.New("division by zero")
	ErrDuplicateDecl       = errors.New("duplicate declaration")
	ErrDuplicateEnum       = errors.New("duplicate enum")
	ErrDuplicateMethod     = errors.New("duplicate method")
	ErrDuplicateType       = errors.New("duplicate type")
	ErrEmptyArray          = errors.New("empty array")
	ErrNoValueEnum         = errors.New("no value enum")
	ErrNotAnEnum           = errors.New("not an enum")
	ErrSmtAssignMismatch   = errors.New("assign mismatch")
	ErrTypeMismatch        = errors.New("type mismatch")
	ErrUndefinedEnum       = errors.New("undefined enum")
	ErrUndefinedIdentifier = errors.New("undefined identifier")
	ErrUndefinedType       = errors.New("undefined type")
)
View Source
var Logger = log.New(os.Stderr, "", 0)

Functions

This section is empty.

Types

type Compiler

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

func New

func New(fsys fs.FS, entryFile string) *Compiler

New creates a new compiler that will use the files from the given filesystem.

func (*Compiler) Compile

func (c *Compiler) Compile() error

type Context

type Context struct {
	Parent *Context
	Data   map[string]ast2.Value
}

func NewContext

func NewContext(parent *Context) *Context

func (*Context) Get

func (c *Context) Get(name string) (ast2.Value, bool)

func (*Context) Set

func (c *Context) Set(name string, value ast2.Value)

Jump to

Keyboard shortcuts

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