Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompilationScope ¶
type CompilationScope struct {
// contains filtered or unexported fields
}
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func NewWithState ¶
func NewWithState(s *SymbolTable, constants []object.Object) *Compiler
type EmittedInstruction ¶
type Symbol ¶
type Symbol struct { Name string Scope SymbolScope Index int }
type SymbolScope ¶
type SymbolScope string
const ( LocalScope SymbolScope = "LOCAL" GlobalScope SymbolScope = "GLOBAL" BuiltinScope SymbolScope = "BUILTIN" 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
Click to show internal directories.
Click to hide internal directories.