Open jamesjuett opened 2 years ago
This error is caused by the cpp_parser
, which is generated by the grammar file. In this case, because it is harder to modify the grammar file. The best alternative is to play a trick in Program
text.
My fix is to always add a newline to the end of text
in SourceFile
. It will not cause any issues in most cases. The only side effect this fix will cause is when there is a syntax error in the last line of code.
the bug has been handled in getSourceReference
. See follow up in pull request.
Repro: