language

package
v0.0.0-...-d92998c Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interpreter

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

Interpreter is a language interpreter

func NewInterpreter

func NewInterpreter(mode InterpreterMode, cache bool) *Interpreter

NewInterpreter creates a new interpreter

func (*Interpreter) GetNodes

func (ir *Interpreter) GetNodes(fileName string, data io.Reader) ([]*models.Node, error)

GetNodes gets the nodes from the given data

func (*Interpreter) Interpret

func (ir *Interpreter) Interpret(fileName string, data io.Reader) (lang.Object, error)

Interpret interprets the given data

type InterpreterMode

type InterpreterMode int

InterpreterMode is the mode of the interpreter

const (
	// ModeDebug writes debug information to file
	ModeDebug InterpreterMode = iota
	// ModeProduction is the default mode
	ModeProduction
	// ModeTest is the test mode
	ModeTest
)

Jump to

Keyboard shortcuts

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