Documentation ¶
Index ¶
- type Environment
- func (e *Environment) CheckSymbolTable(name string) bool
- func (e *Environment) DeclareVariable(name string, value interface{}) error
- func (e *Environment) GetFunction(name string) (function.Function, bool)
- func (e *Environment) GetVariable(name string) (interface{}, bool)
- func (e *Environment) IsFunction(name string) bool
- func (e *Environment) IsVariable(name string) bool
- func (e *Environment) SetDefaultFunctions() error
- func (e *Environment) SetFunction(function function.Function) error
- func (e *Environment) SetNumberVariable(name string, value decimal.Decimal) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment of evaluator
func (*Environment) CheckSymbolTable ¶
func (e *Environment) CheckSymbolTable(name string) bool
CheckSymbolTable if variable is registed in symbol table
func (*Environment) DeclareVariable ¶
func (e *Environment) DeclareVariable(name string, value interface{}) error
DeclareVariable in the environment
func (*Environment) GetFunction ¶
func (e *Environment) GetFunction(name string) (function.Function, bool)
GetFunction from the environment
func (*Environment) GetVariable ¶
func (e *Environment) GetVariable(name string) (interface{}, bool)
GetVariable from the environment
func (*Environment) IsFunction ¶
func (e *Environment) IsFunction(name string) bool
IsFunction check if name is variable
func (*Environment) IsVariable ¶
func (e *Environment) IsVariable(name string) bool
IsVariable check if name is variable
func (*Environment) SetDefaultFunctions ¶
func (e *Environment) SetDefaultFunctions() error
SetDefaultFunctions to environment
func (*Environment) SetFunction ¶
func (e *Environment) SetFunction(function function.Function) error
SetFunction to Evaluator
func (*Environment) SetNumberVariable ¶
func (e *Environment) SetNumberVariable(name string, value decimal.Decimal) error
SetNumberVariable in the environment
Click to show internal directories.
Click to hide internal directories.