Constructs a new Interpreter instance with the provided parser and options.
The parsed tokens.
Optional configuration for the interpreter (defaults to DefaultInterpreterOption
).
Getter for the source code being interpreted.
The original source code.
Runs the interpretation of the parsed code, simulating the execution and producing output.
An object containing the internal state of the interpreter, the output produced, and the execution time.
Static
InterpretCreates an instance of the interpreter by parsing the provided code and applying optional configuration.
The source code to interpret.
Optional
options: Partial<IInterpreterOptions>Optional configuration for the interpreter, including parser settings.
A new Interpreter instance.
A class responsible for interpreting parsed code and executing it based on a specific language structure.