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

Parity with Esprima #6

Open
zaach opened this issue Jun 3, 2012 · 4 comments
Open

Parity with Esprima #6

zaach opened this issue Jun 3, 2012 · 4 comments
Assignees

Comments

@zaach
Copy link
Owner

zaach commented Jun 3, 2012

Esprima has some extra goodies on top of Mozilla's AST, such as a token list, ranges, and comments. There are also bugs with the current location information collected in reflect.js that need to be corrected.

@ghost ghost assigned zaach Jun 3, 2012
@ozten
Copy link

ozten commented Jun 18, 2012

If you do this piecemeal... Comments would be my #1 vote.

@zaach
Copy link
Owner Author

zaach commented Jun 18, 2012

@ozten Comments are now supported as of 0.1.1 :)

The ast will have a comments array with the character position of the comment (as per this example).

@ozten
Copy link

ozten commented Jun 19, 2012

Ah, you might want to document the options argument to parse. I see now, using {comment: true} I get the comments and can use range to see if they should be before or after the element. Nice work!

@BlackVegetable
Copy link

What would it take (downstream perhaps) to have the parser keep the comments in-place in its internal representation such that Stringify would output them right as they were?

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

3 participants