24 lines
656 B
TypeScript
24 lines
656 B
TypeScript
|
import Visitor from './visitor.js';
|
||
|
export default class Jinter {
|
||
|
#private;
|
||
|
/**
|
||
|
* The node visitor. This is responsible for walking the AST and executing the nodes.
|
||
|
*/
|
||
|
visitor: Visitor;
|
||
|
/**
|
||
|
* The global scope of the program.
|
||
|
*/
|
||
|
scope: Map<string, any>;
|
||
|
constructor();
|
||
|
defineObject<T>(name: string, obj: T): void;
|
||
|
/**
|
||
|
* Generates an AST from the input.
|
||
|
*/
|
||
|
parseScript(input: string): import("../acorn.js").ExtendNode<import("estree").Program>;
|
||
|
/**
|
||
|
* Evaluates the program.
|
||
|
* @returns The result of the last statement in the program.
|
||
|
*/
|
||
|
evaluate(input: string): any;
|
||
|
}
|