Documentation ¶
Index ¶
- Constants
- type ArrayEnv
- func (a *ArrayEnv) Clone() Environment
- func (a *ArrayEnv) Get(name string) interface{}
- func (a *ArrayEnv) GetNest(nest, index int) interface{}
- func (a *ArrayEnv) GetPool() *pool.Pool
- func (a *ArrayEnv) NewJob(fn func()) bool
- func (a *ArrayEnv) Put(name string, _ interface{})
- func (a *ArrayEnv) PutNest(nest, index int, value interface{})
- func (a *ArrayEnv) PutNew(name string, _ interface{})
- func (a *ArrayEnv) SetOuter(e Environment)
- func (a *ArrayEnv) Symbols() *Symbols
- func (a *ArrayEnv) WaitJob() bool
- func (a *ArrayEnv) Where(name string) Environment
- type Environment
- type GlobalEnv
- func (r *GlobalEnv) Assign(index int, value interface{})
- func (r *GlobalEnv) Clone() Environment
- func (r *GlobalEnv) Get(name string) interface{}
- func (r *GlobalEnv) GetNest(nest, index int) interface{}
- func (r *GlobalEnv) GetPool() *pool.Pool
- func (r *GlobalEnv) NewJob(fn func()) bool
- func (r *GlobalEnv) Put(name string, value interface{})
- func (r *GlobalEnv) PutNest(nest, index int, value interface{})
- func (r *GlobalEnv) PutNew(name string, value interface{})
- func (r *GlobalEnv) SetOuter(e Environment)
- func (r *GlobalEnv) Symbols() *Symbols
- func (r *GlobalEnv) WaitJob() bool
- func (r *GlobalEnv) Where(name string) Environment
- type Location
- type Symbols
- func (s *Symbols) Add(key string) int
- func (s *Symbols) Append(other *Symbols)
- func (s *Symbols) Find(key string) (int, bool)
- func (s *Symbols) Get(key string) *Location
- func (s *Symbols) GetNest(key string, nest int) *Location
- func (s *Symbols) Put(key string) *Location
- func (s *Symbols) PutNew(key string) int
- func (s *Symbols) Size() int
Constants ¶
View Source
const ( DefaultPoolSize = 0x20 DefaultEnvSize = 0xff )
View Source
const ( TRUE = 1 FALSE = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayEnv ¶
type ArrayEnv struct { Values []interface{} Outer Environment GoPool *pool.Pool }
ArrayEnv 适用于自定义函数内部的环境 为什么这里敢直接写死数组大小 在创建函数内环境之前会 Lookup 实际需求大小 根据需求 size 创建
func NewArrayEnv ¶
func NewArrayEnv(size int, p *pool.Pool, out Environment) *ArrayEnv
func (*ArrayEnv) Clone ¶
func (a *ArrayEnv) Clone() Environment
func (*ArrayEnv) SetOuter ¶
func (a *ArrayEnv) SetOuter(e Environment)
func (*ArrayEnv) Where ¶
func (a *ArrayEnv) Where(name string) Environment
type Environment ¶
type Environment interface { Put(name string, value interface{}) Get(name string) interface{} SetOuter(e Environment) Symbols() *Symbols PutNest(nest, index int, value interface{}) GetNest(nest, index int) interface{} PutNew(name string, value interface{}) Where(name string) Environment GetPool() *pool.Pool NewJob(fn func()) bool WaitJob() bool Clone() Environment }
type GlobalEnv ¶
type GlobalEnv struct { Names *Symbols // contains filtered or unexported fields }
func (*GlobalEnv) Clone ¶
func (r *GlobalEnv) Clone() Environment
func (*GlobalEnv) SetOuter ¶
func (r *GlobalEnv) SetOuter(e Environment)
func (*GlobalEnv) Where ¶
func (r *GlobalEnv) Where(name string) Environment
type Location ¶
func NewLocation ¶
Click to show internal directories.
Click to hide internal directories.