evaluator

package
v0.0.0-...-239939c Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestEval

func TestEval(codeString string) treeNodes.SmalltalkObjectInterface

func TestEvalWithScope

func TestEvalWithScope(codeString string, scope *treeNodes.Scope) treeNodes.SmalltalkObjectInterface

Types

type Evaluator

type Evaluator struct {
	// contains filtered or unexported fields
}

func NewEvaluatorWithGlobalScope

func NewEvaluatorWithGlobalScope(global *treeNodes.Scope) *Evaluator

func NewSmalltalkVM

func NewSmalltalkVM() *Evaluator

real world API

func NewSmalltalkWorkspace

func NewSmalltalkWorkspace() *Evaluator

func NewTestEvaluator

func NewTestEvaluator() *Evaluator

testing stuff

func (*Evaluator) EvaluateProgram

func (*Evaluator) EvaluateToBool

func (e *Evaluator) EvaluateToBool(programString string) bool

func (*Evaluator) EvaluateToFloat64

func (e *Evaluator) EvaluateToFloat64(programString string) float64

func (*Evaluator) EvaluateToInt64

func (e *Evaluator) EvaluateToInt64(programString string) int64

func (*Evaluator) EvaluateToInterface

func (e *Evaluator) EvaluateToInterface(programString string) interface{}

func (*Evaluator) EvaluateToString

func (e *Evaluator) EvaluateToString(programString string) string

func (*Evaluator) FindValueByName

func (e *Evaluator) FindValueByName(name string) (treeNodes.SmalltalkObjectInterface, bool)

func (*Evaluator) GetGlobalScope

func (e *Evaluator) GetGlobalScope() *treeNodes.Scope

func (*Evaluator) RunProgram

func (e *Evaluator) RunProgram(programString string) treeNodes.SmalltalkObjectInterface

func (*Evaluator) SetBoolVar

func (e *Evaluator) SetBoolVar(name string, value bool) treeNodes.SmalltalkObjectInterface

func (*Evaluator) SetGlobalScope

func (e *Evaluator) SetGlobalScope(scope *treeNodes.Scope) *Evaluator

func (*Evaluator) SetNumberVar

func (e *Evaluator) SetNumberVar(name string, value float64) treeNodes.SmalltalkObjectInterface

func (*Evaluator) SetStringVar

func (e *Evaluator) SetStringVar(name string, value string) treeNodes.SmalltalkObjectInterface

func (*Evaluator) SetVar

scope-related delegations

Jump to

Keyboard shortcuts

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