michaelficarra / CoffeeScriptRedux

:sweat: rewrite of the CoffeeScript compiler with proper compiler design principles and a focus on robustness and extensibility
https://michaelficarra.github.com/CoffeeScriptRedux/
BSD 3-Clause "New" or "Revised" License
1.84k stars 110 forks source link

Fix offset calculation for parsed nodes. #339

Closed eventualbuddha closed 9 years ago

eventualbuddha commented 9 years ago

Closes #335.

This builds on #117 by ensuring that not only are line & column information corrected to account for control characters inserted by the preprocessor, but offset information is too. Unfortunately this expands the hack that overrides the code generated by PEGjs, but it seemed the cleanest and most performant way to solve the problem.