Documentation
¶
Index ¶
- Constants
- func Tokenize(src string) [][]string
- type Env
- func (env *Env) AdvancePc()
- func (env *Env) AssignReturnedVal(val *Value)
- func (env *Env) AssignVar(varName string, val *Value)
- func (env *Env) Express(expr string) *Value
- func (env *Env) GetFrame() *Frame
- func (env *Env) GetVarVal(varName string) *Value
- func (env *Env) GotoLabelByName(name string)
- func (env *Env) NewFrame(funcName string, args []*Value) *Frame
- func (env *Env) PopFrame() *Frame
- func (env *Env) PushFrame(funcName string, args []*Value)
- type Frame
- type List
- type ListNode
- type Map
- type Value
Constants ¶
View Source
const ( ValueTypeNil = "nil" ValueTypeInt = "int" ValueTypeStr = "str" ValueTypeList = "list" ValueTypeMap = "map" )
Value Types ..
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
Labels map[string]int
Vars map[string]*Value // global vars
Funcs map[string]*funcDetail
Pc int
Out func(interface{}, string)
In func() string
// contains filtered or unexported fields
}
Env ..
type List ¶
List ..
Click to show internal directories.
Click to hide internal directories.