Skip to content
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

Use case for "Why did you need an JS AST tree?" #2

Open
ttback opened this issue May 18, 2014 · 0 comments
Open

Use case for "Why did you need an JS AST tree?" #2

ttback opened this issue May 18, 2014 · 0 comments

Comments

@ttback
Copy link

ttback commented May 18, 2014

The key is I'd need to reference back to Erlang's line and col or indexed [startOf, endOf] information and save it as part of the Mozilla AST data structure to be used in a thrid-party web application. Basically some kind of a source map between erlang to js generated.

It was originally why i was checking on the Luuvscript: http://luvv.ie/toolchain.html

Basically the scenario is that I need to be able to execute the code on the web and notify the user that at line 5 of Erlang code, they made an error. I wonder if there is any way you can preserve the range info. It would need to be a JS range: Erlang range map or just directly translating the Erlang AST to Mozilla JS AST before encoding it to JS.

An example of JS AST here: http://esprima.org/demo/parse.html#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant