Documentation ¶
Index ¶
Constants ¶
View Source
const ( INTEGER_OBJ = "INTEGER" FLOAT_OBJ = "FLOAT" DECIMAL_OBJ = "DECIMAL" BOOLEAN_OBJ = "BOOLEAN" RETURN_OBJ = "RETURN" ERROR_OBJ = "ERROR" NULL_OBJ = "NULL" FUNCTION_OBJ = "FUNCTION" STRING_OBJ = "STRING" BUILTIN_OBJ = "BUILTIN" ARRAY_OBJ = "ARRAY" HASH_OBJ = "HASH" BREAK_OBJ = "BREAK" SKIP_OBJ = "SKIP" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment() *Environment
func NewLocalEnvironment ¶
func NewLocalEnvironment(outer *Environment) *Environment
func (*Environment) GetMainEnv ¶ added in v0.0.3
func (e *Environment) GetMainEnv() *Environment
func (*Environment) GetOuterEnv ¶ added in v0.0.3
func (e *Environment) GetOuterEnv() *Environment
func (*Environment) GetTargetEnv ¶ added in v0.0.6
func (e *Environment) GetTargetEnv(name string) *Environment
GetTargetEnv returns the environment that contains the variable with the given name If the variable is not found, it returns nil This is used to check if a variable is declared in the current scope or not
type Function ¶
type Function struct { Parameters []*ast.Identifier Body *ast.BlockStatement // The environment in which the function was defined, This allow a closure Env *Environment }
Click to show internal directories.
Click to hide internal directories.