environment

package
v0.0.0-...-93a7d75 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 3 Imported by: 0

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 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

Jump to

Keyboard shortcuts

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