Import `regexp/syntax` into generated lexer
ztcollazo opened this issue · comments
Zachary Collazo commented
Hello. I am building a lexer and parser using participle, and I read the part about generating Go code from a stateful lexer and decided to try it. So far, it has worked like a charm, except for one small thing. Every time I generate the lexer, I have to manually go in and import regexp/syntax
so that it stops erroring. I was wondering if this could be added to the template, even conditionally. Thanks in advance.
Alec Thomas commented
It would be good to have an example of the code and error you're seeing, as I can't replicate this with _examples/thrift.
Alec Thomas commented
Dug through the code and found it, thanks for the report.