compiler

package
v0.0.0-...-a7237ab Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PREC_NONE       = iota
	PREC_ASSIGNMENT // =
	PREC_OR         // or
	PREC_AND        // and
	PREC_EQUALITY   // == !=
	PREC_COMPARISON // < > <= >=
	PREC_TERM       // + -
	PREC_FACTOR     // * /
	PREC_UNARY      // ! -
	PREC_CALL       // . ()
	PREC_PRIMARY
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

type Compiler struct {
	value.DebugInfo
	// contains filtered or unexported fields
}

func NewCompiler

func NewCompiler(s *scanner.Scanner, fileName string) *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile() (*value.Function, []string, *map[*value.Function]value.DebugInfo)

type ParseFunc

type ParseFunc func(c *Compiler, canAssign bool)

type ParseRule

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

Jump to

Keyboard shortcuts

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