sterpe / coffee-fmt

gofmt for coffee
MIT License
9 stars 4 forks source link

figure out why formatting src/rewrite.coffee fails with parse error. #6

Closed sterpe closed 9 years ago

sterpe commented 9 years ago

Must be related to changes to lexer under some condition.

sterpe commented 9 years ago

Okay cause determined.

for some reason changes to the lexer have broken parsing of arrays where the array elements are split across newlines as happens in the final 20 lines of the rewriter.coffee in several places...this is probably related to not stripping newlines (to preserver formatting).

However this seems to be related to overall indentation level since just copying and pasting the final 20 lines of rewriter into a clean file is fine....?

Not fine, actually for some reason the three line separated arrays are incorrectly indented, these seems to be some lexer goofiness

sterpe commented 9 years ago

Changes to MULTIDENT regex were causative.