+1 for Esprima.

Any of you not following sweet.js, which uses Esprima, sweet.js is Tim Disney at al. doing hygienic macros for JS. Infix operator macros just came in via a github contributor. It is among other things a validation of sorts, or at least a testimonial, for Esprima.

/be

Bill McCloskey wrote:
I think it makes a lot more sense for this sort of code to go in a parser like 
Esprima. I was just looking at Esprima, and it already does almost everything 
you need. Besides producing the big array of comments, it includes location 
information for the comments and for each parse node. A really simple tool 
could iterate over all the top-level declarations and see if there are any 
comments that start after the last declaration and before the next one. Then it 
could associate that comment with the next declaration.
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to