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) SetDefaultVariables() error
- func (e *Environment) SetFloat32Variable(name string, value float32) error
- func (e *Environment) SetFloatVariable(name string, value float64) error
- func (e *Environment) SetFunction(function function.Function) error
- func (e *Environment) SetInt32Variable(name string, value int32) error
- func (e *Environment) SetIntVariable(name string, value int64) 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 registered 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) SetDefaultVariables ¶ added in v0.0.2
func (e *Environment) SetDefaultVariables() error
SetDefaultVariables to environment
func (*Environment) SetFloat32Variable ¶ added in v0.0.2
func (e *Environment) SetFloat32Variable(name string, value float32) error
SetFloat32Variable in the environment
func (*Environment) SetFloatVariable ¶ added in v0.0.2
func (e *Environment) SetFloatVariable(name string, value float64) error
SetFloatVariable in the environment
func (*Environment) SetFunction ¶
func (e *Environment) SetFunction(function function.Function) error
SetFunction to Evaluator
func (*Environment) SetInt32Variable ¶ added in v0.0.2
func (e *Environment) SetInt32Variable(name string, value int32) error
SetInt32Variable in the environment
func (*Environment) SetIntVariable ¶ added in v0.0.2
func (e *Environment) SetIntVariable(name string, value int64) error
SetIntVariable in the environment
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.