The basic concept is that there is a CoffeeScript class whose instance methods each map to a rule in the grammar.
I went with this approach over other "use CoffeeScript with PEG" methods [1][2] since they affected the unlying way that PEG works.
All of the test pass, but I figured that there might be some things to discuss regarding naming or the API. In general, I tried to refactor or rename things to be more explicit and easier to understand.
FWIW - I tried to push directly to a feature branch on the-gss/ccss-compiler but got an error about not having the correct access.
This is my first attempt at porting one of these.
The basic concept is that there is a CoffeeScript class whose instance methods each map to a rule in the grammar.
I went with this approach over other "use CoffeeScript with PEG" methods [1][2] since they affected the unlying way that PEG works.
All of the test pass, but I figured that there might be some things to discuss regarding naming or the API. In general, I tried to refactor or rename things to be more explicit and easier to understand.
FWIW - I tried to push directly to a feature branch on the-gss/ccss-compiler but got an error about not having the correct access.