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

Convert grammar.pegjs into grammar.pegcoffee #321

Closed lydell closed 10 years ago

lydell commented 10 years ago

I think this is a good start, but there are some things I don’t really like:

Still, this is a step in the right direction. I just don’t feel like forking both the plugin and pegjs to improve them too right now—to tired from this conversion and tricky debugging ....

lydell commented 10 years ago

Looks like the the Travis build fails on Node 0.11—sigh—do you understand why?

michaelficarra commented 10 years ago

Thanks, this is great progress.

Looks like the the Travis build fails on Node 0.11—sigh—do you understand why?

Don't worry about it. It's currently broken due to https://github.com/michaelficarra/CoffeeScriptRedux/issues/319

common bug that bit me was [...]

jashkenas/coffeescript interface takes an options object as its second parameter, which may have a locals member (called inScope in CSR because we don't strive for interface parity) that lists names that should be considered already in scope. Ask the plugin maintainer to start using that.

andreineculau commented 10 years ago

A short digression.

I'm not sure what the ultimate goal is with this conversion, but one could also just strip the grammar of actions, and with the help of https://github.com/andreineculau/pegjs-override-action consolidate the actions in a standalone module.

lydell commented 10 years ago

@michaelficarra could you please have a look at the latest commit. It is a big improvement.

lydell commented 10 years ago

@michaelficarra Can we try to get this merged? Any change to the grammar is either blocked by this, or requires this PR to be updated.