diff --git a/src/main.ts b/src/main.ts index 919f6ff..d332779 100644 --- a/src/main.ts +++ b/src/main.ts @@ -45,17 +45,6 @@ export default class Jinter { }); } - /** - * Generates an AST from the input. - */ - public parseScript(input: string) { - try { - return parse(input, { ecmaVersion: 2020 }); - } catch (e: any) { - throw new JinterError(e.message); - } - } - /** * Evaluates the program. * @returns The result of the last statement in the program. @@ -72,4 +61,15 @@ export default class Jinter { return this.visitor.run(); } + + /** + * Generates an AST from the input. + */ + public static parseScript(input: string) { + try { + return parse(input, { ecmaVersion: 2020 }); + } catch (e: any) { + throw new JinterError(e.message); + } + } }