environment

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

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 New

func New() *Environment

New Environment

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL