PiotrDabkowski / pyjsparser

Fast JavaScript parser for Python.
MIT License
246 stars 37 forks source link

Add basic comments support to the AST #15

Closed xmo-odoo closed 7 years ago

xmo-odoo commented 7 years ago

Cf #14

Follows the Recast comment-attachment structure[0], though only implements a small subset in a straightforwardly hacky manner, and does not come close to implementing the entire comment-attachment structure or algorithm:

[0] dev's reasoning about some comments being ambiguous in Esprima's structure/extension makes sense to me: https://github.com/jquery/esprima/issues/1024#issuecomment-74179681 https://github.com/benjamn/recast/issues/159#issuecomment-76054246

PiotrDabkowski commented 7 years ago

Thank you very much! Seems to work for now. Maybe I will update the pyesprima according to the newest esprima.js version if I find some time.