runtime

package
v0.0.0-...-4ed146b Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runtime

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

Runtime is a struct that is used to evaluate an AST.

func New

func New(sourceText string) *Runtime

New creates a new ready to evaluate runtime that will evaluate the given source text.

func (*Runtime) Evaluate

func (r *Runtime) Evaluate() error

Evaluate evaluates the runtime's AST.

type ScriptRecord

type ScriptRecord struct {
	Realm          *realm.Realm
	Environment    binding.Environment
	ECMAScriptCode *ast.Script
	HostDefined    interface{}
}

ScriptRecord encapsulates information about a script being evaluated. ScriptRecord is specified in 15.1.8.

func (*ScriptRecord) Type

func (r *ScriptRecord) Type() lang.Type

Type returns lang.TypeInternal.

func (*ScriptRecord) Value

func (r *ScriptRecord) Value() interface{}

Value returns the ScriptRecord itself.

Directories

Path Synopsis
job
Package lang contains all ECMAScript-specified language values, i.e.
Package lang contains all ECMAScript-specified language values, i.e.

Jump to

Keyboard shortcuts

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