-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ES6 and beyond #186
Comments
The limiting factor is not Acorn (though updating it might not be a bad idea anyway), but that JS Intrpreter itself only understands ES5.1. So being able to parse Nevertheless, since no one seems to have opened a "please support ES6" issue yet, I'll repurpose your report accordingly. |
Thank you for your answer Link here: I don't know if it's a good idea . Happy Weekend ! |
Just make sure you specify the appropriate options to Acorn so that it will parse ES5 only. |
@cpcallen |
This is a question for @NeilFraser—but I suspect the answer is no, because this will eventually be part of the roadmap of another project (which is actually funded, unlike this one), so in a few years we will have a much better solution. In the mean time, I would suggest using an ES6->5 transpiler. I have heard that Babel can do this. |
Thanks @cpcallen. Actually my use case for this library is to create a JavaScript "visualiser" (similar to devtools), not sure babel can help with this as it will change that actual code i want to visualise. |
Same here, I have tried using source maps to correct this, but they don't seem to come out correctly. |
Just to confirm, *I* have no interest in developing and maintaining an ES6+
version. It would be a step backwards for my projects in that the download
times would increase.
However, I recognize that there is a genuine need for ES6+ support in other
projects and I'd fully support anyone who wishes to fork the project
accordingly.
Sent (awkwardly) from an Android device.
…On Wed, 8 Apr 2020, 19:53 KSean222, ***@***.***> wrote:
Same here, I have tried using source maps to correct this, but they don't
seem to come out correctly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#186 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB5E4A4JTJ42ZQACWAQUM3RLUE6NANCNFSM4LU5LUOA>
.
|
@KSean222 What do you mean by
|
@sag1v https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map |
Yeah i know, but how do you think it to sync them? Sounds interesting |
I tried using https://github.com/mozilla/source-map @sag1v |
What is the name of the funded project? |
Code City. But do note: "will eventually be part of the roadmap"—in its present form Code City is actually a less-complete JavaScript implementation than JS Interpreter is. |
I'm very interested in this, as it would be useful for creating a client-side step debugger for Theia IDE. In theory, how much work are we talking to make this happen? Would it require a major re-write of the interpreter? Or is it just adding ES-6 specific features? |
@bendavis78: It would be a considerable amount of work. ES6 is quite a bit larger language than ES5.1, and ES2020 is even more so. I don't think it necessarily requires a throw-it-away-and-start-from-scratch rewrite: it could certainly be done incrementally—but by the time it was done very little of the original code base will remain. |
...
I saw the lib, acorn.js's version just 0.4.1 ....
If I use the high version ecmascript code , for example :
It will throw an error ...
The last version of acorn.js is 7.1.0 ,but Js-Interpreter only 0.x
Too terrible
The text was updated successfully, but these errors were encountered: