values

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 4 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MK_ARRAY

func MK_ARRAY(value []shared.RuntimeValue) shared.RuntimeValue

func MK_BOOL

func MK_BOOL(value bool) shared.RuntimeValue

func MK_CLASS

func MK_CLASS(name string, body []ast.Stmt, constructor *ast.ClassMethod, declarationEnv *environment.Environment) shared.RuntimeValue

func MK_CLASS_INSTANCE

func MK_CLASS_INSTANCE(class *ClassValue, publics map[string]bool, data *environment.Environment) shared.RuntimeValue

func MK_NATIVE_FN

func MK_NATIVE_FN(fn NativeFunction) shared.RuntimeValue

func MK_NIL

func MK_NIL() shared.RuntimeValue

func MK_NUMBER

func MK_NUMBER(value float64) shared.RuntimeValue

func MK_OBJECT

func MK_OBJECT(value map[string]*shared.RuntimeValue) shared.RuntimeValue

func MK_STRING

func MK_STRING(value string) shared.RuntimeValue

Types

type ClassInstanceValue

type ClassInstanceValue struct {
	Type    shared.ValueType
	Class   ClassValue
	Publics map[string]bool
	Data    *environment.Environment
}

type ClassValue

type ClassValue struct {
	Type           shared.ValueType
	Value          any
	Name           string
	Body           []ast.Stmt
	DeclarationEnv *environment.Environment
	Constructor    *ast.ClassMethod
}

type FunctionValue

type FunctionValue struct {
	Type           shared.ValueType
	Value          any
	Name           string
	Params         []string
	DeclarationEnv *environment.Environment
	Body           []ast.Stmt
}

Jump to

Keyboard shortcuts

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