Closed Bug 921163 Opened 10 years ago Closed 10 years ago
pretty printing shouldn't lose comments
Right now we use Reflect.jsm to parse our source, which doesn't add comment nodes to its AST, and so when we pass the AST to escodegen, we lose comments. I see three ways to try and fix this, moving forward: 1. Add an option to Reflect.jsm to include comment nodes. 2. We will probably include the Acorn parser in devtools soon, which can optionally include comment nodes. We could use this instead of Reflect.jsm to parse code. 3. Use some post processing hueristics to attempt to place comments back into the code. I am in favor of 2.
This doesn't need to block 913665.
No longer blocks: 913665
Fixed when we introduced https://github.com/mozilla/pretty-fast
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.