Comparing version 2.0.0 to 2.1.0
@@ -0,0 +0,0 @@ import Jinter from './main.js'; |
@@ -0,0 +0,0 @@ import Jinter from './main.js'; |
@@ -15,2 +15,6 @@ import Visitor from './visitor.js'; | ||
/** | ||
* Generates an AST from the input. | ||
*/ | ||
parseScript(input: string): import("../acorn.js").ExtendNode<import("estree").Program>; | ||
/** | ||
* Evaluates the program. | ||
@@ -17,0 +21,0 @@ * @returns The result of the last statement in the program. |
@@ -44,2 +44,13 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
/** | ||
* Generates an AST from the input. | ||
*/ | ||
parseScript(input) { | ||
try { | ||
return parse(input, { ecmaVersion: 2020 }); | ||
} | ||
catch (e) { | ||
throw new JinterError(e.message); | ||
} | ||
} | ||
/** | ||
* Evaluates the program. | ||
@@ -46,0 +57,0 @@ * @returns The result of the last statement in the program. |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import { namedFunction } from '../utils/index.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import ESTree from 'estree'; |
@@ -0,0 +0,0 @@ export default class BaseJSNode { |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import { namedFunction } from '../utils/index.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import { namedFunction } from '../utils/index.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -27,2 +27,3 @@ export { default as ArrayExpression } from './ArrayExpression.js'; | ||
export { default as SwitchStatement } from './SwitchStatement.js'; | ||
export { default as TemplateLiteral } from './TemplateLiteral.js'; | ||
export { default as ThisExpression } from './ThisExpression.js'; | ||
@@ -29,0 +30,0 @@ export { default as ThrowStatement } from './ThrowStatement.js'; |
@@ -28,2 +28,3 @@ // This file is auto-generated by ./scripts/build-nodes-map.js. | ||
export { default as SwitchStatement } from './SwitchStatement.js'; | ||
export { default as TemplateLiteral } from './TemplateLiteral.js'; | ||
export { default as ThisExpression } from './ThisExpression.js'; | ||
@@ -30,0 +31,0 @@ export { default as ThrowStatement } from './ThrowStatement.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import type ESTree from 'estree'; |
@@ -0,0 +0,0 @@ import BaseJSNode from './BaseJSNode.js'; |
@@ -0,0 +0,0 @@ import ESTree from 'estree'; |
@@ -0,0 +0,0 @@ export const namedFunction = (name, fn) => Object.defineProperty(fn, 'name', { value: name }); |
@@ -0,0 +0,0 @@ import type { Node } from 'estree'; |
@@ -0,0 +0,0 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { |
{ | ||
"name": "jintr", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "A tiny JavaScript interpreter written in TypeScript.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -0,0 +0,0 @@ [actions]: https://github.com/LuanRT/Jinter/actions |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
175280
85
2488