gss / parser

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

Use the-gss/error-reporter #14

Closed paulyoung closed 10 years ago

paulyoung commented 10 years ago

This is still a little bit work in progress but I wanted to get some eyes on it.

paulyoung commented 10 years ago

Build is failing for node 0.8

paulyoung commented 10 years ago

These latest changes mean that manually thrown errors and cryptic PEG errors both get handled the same way:

Error on line 1, column 20: Expected "/*", "//", ";", [0-9], comment, end of line or whitespace but "." found.

1 : [a] == [b] !strong0.5
^ : -------------------^

That extra content really makes it a lot easier to understand what went wrong.

paulyoung commented 10 years ago

Forgot to add that I tried writing a rule that would allow me to manually throw an error for that case but I couldn't figure out an appropriate regex that wouldn't clash with the valid rule.