NeilFraser / JS-Interpreter

A sandboxed JavaScript interpreter in JavaScript.
Apache License 2.0
1.96k stars 352 forks source link

The JS-Interpreter Self-interpreter Demo does not work #229

Closed ChrisAcrobat closed 2 years ago

ChrisAcrobat commented 2 years ago

JS-Interpreter Self-interpreter Demo

  1. Follow the instructions.
  2. Returns acorn.js:229 Uncaught SyntaxError: Unexpected token (123:71) at acorn.js:229.
cpcallen commented 2 years ago

Hmm. Seems the compiler is generating ES6; the offending expression is: b={EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError}.

cpcallen commented 2 years ago

I note that this bug seems to have been introduced in commit 145805f.

NeilFraser commented 2 years ago

Fixed. The compiled version used to be generated using the online Closure Compiler Service. However, recently this has stopped working for large compilations, due to App Engine runtime limits. I switched to using the downloadable JAR file, but neglected to add the ES5 output flag.

Thanks for reporting this regression.