js

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Contains runner and getter/setter functions for the execution of JS scripts within an otto.Otto VM.

Any additional supported languages should follow the rough structure of this package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ExternalConsoleLogStdout io.Writer = os.Stdout
	ExternalConsoleLogStderr io.Writer = os.Stderr
)

These can be set when testing to check output.

Functions

func RunScript

func RunScript(code code.Code, jsonMap json_map.JsonMapInt) (data json_map.JsonMapInt, err error)

Run the given script, with the given json_map.JsonMapInt and return the new json_map.JsonMapInt for the scope.

Order of execution

• The JOM is created.

• The VM is created.

• The builtins and the JOM is passed into the environment.

• Interrupt for the halting problem is setup.

• The script is run.

• The environment is De-JOM-ified.

• The new json_map.JsonMapInt is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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