JS-Interpreter
JS-Interpreter copied to clipboard
A sandboxed JavaScript interpreter in JavaScript.
The following code should return `[true, true, true true]` but in fact returns `[true, false, false, true]`: ```JS "use strict"; function F() { /* does nothing */ }; F.prototype =...
If you want to be pedantically ES5.1 compatible, then the following code should alert "[object Arguments]" instead of "foo,bar": ```js (function(){ alert(arguments.toString()) })("foo", "bar") ```
JS-Interpreter sometimes returns the wrong completion value following a throw. For example, the following code has completion value `undefined` according to the ES5.1 spec: ```js 42; try { throw "foo"...
Using the require system in [BlocklyCraft/ScriptCraft](https://github.com/bgon/BlocklyCraft), which runs in the JVM via Nashorn (OpenJDK 1.8), I can place **acorn.js** and **interpreter.js** in `src/main/js/modules/`, add the line `var acorn = require('acorn');`...
Hello @NeilFraser I am the member of [cdnjs](https://github.com/cdnjs/cdnjs) project. We want to host this library. Please help us add git tag. Git tag can help us to know your release...
Tried to implement try, catch, finally. It captures the correct control flow. I added some helper methods for testing as well as some tweaks so I could run the tests...
To run the tests: `npm install -g mocha` `npm install chai` `mocha tests/`
Add nodejs support. It can be used like ``` var code = fs.readFileSync('./code/fib.js'); var Interpreter = require('./interpreter'); var myInterpreter = new Interpreter(code); myInterpreter.run(); console.log('value:', myInterpreter.value.data); ``` and then `node run.js`...
Typescript declaration for the JSInterpreter class.
Hi, I want to propose to add the following functions to the interpreter. They allow users to use the interpreter more easily. Excuse the coffee-script, you can use js2.coffee to...