gss / parser

Constraint Cascading Style Sheets compiler
MIT License
48 stars 6 forks source link

Port PEG JavaScript to CoffeeScript. #8

Closed paulyoung closed 10 years ago

paulyoung commented 10 years ago

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.

paulyoung commented 10 years ago

This also addresses #7.

paulyoung commented 10 years ago

Closed in favor of #9.