CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

Escaping spec language interferes with reported line numbers #12

Closed seizethedave closed 7 years ago

seizethedave commented 7 years ago

That is, if I use

{{
import "...";
}}

and get a syntax error later in the spec, the reported line number is off by approximately the number of lines occupied by the spec syntax escape.

Calvin-L commented 7 years ago

Ugh good point.

This is an instance of PLY's terrible interface. I think in parse.py, the t_EXTERNCODETOKEN rule needs to update t.lexer.lineno appropriately, like t_newline does.