Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct { Debug bool // contains filtered or unexported fields }
func NewWithState ¶
func NewWithState(symbolTable *SymbolTable, constants []object.Object) *Compiler
type EmittedInstruction ¶
type Symbol ¶
type Symbol struct { Name string Scope SymbolScope Index int }
type SymbolScope ¶
type SymbolScope string
const ( BuiltinScope SymbolScope = "BUILTIN" GlobalScope SymbolScope = "GLOBAL" LocalScope SymbolScope = "LOCAL" FreeScope SymbolScope = "FREE" )
type SymbolTable ¶
type SymbolTable struct { Outer *SymbolTable FreeSymbols []Symbol // contains filtered or unexported fields }
func NewEnclosedSymbolTable ¶
func NewEnclosedSymbolTable(outer *SymbolTable) *SymbolTable
func NewSymbolTable ¶
func NewSymbolTable() *SymbolTable
func (*SymbolTable) Define ¶
func (s *SymbolTable) Define(name string) Symbol
func (*SymbolTable) DefineBuiltin ¶
func (s *SymbolTable) DefineBuiltin(index int, name string) Symbol
func (*SymbolTable) DefineFree ¶
func (s *SymbolTable) DefineFree(original Symbol) Symbol
Click to show internal directories.
Click to hide internal directories.