Closed mrdaybird closed 6 months ago
Thanks! This PR looks good.
Can you write a test that failed (or gave a misleading error message) in master, and now works (gives a good error message)?
If it is just a better error message, you can put it into tests/error
.
Added the tests. But to clarify, should I use the 'ast' flag or the 'ast_new' flag for the tests? are they even relevant for testing errors?
This looks great, thanks for fixing it and adding tests. I left some minor comments to fix.
But to clarify, should I use the 'ast' flag or the 'ast_new' flag for the tests? are they even relevant for testing errors?
Use ast
to test syntax errors. Use asr
to test semantic errors.
You have to update reference tests via ./run_tests -u
.
Thanks I noticed a little late. :sweat_smile: Should I rebase as well?
Either polish the commits to a few logical commits and rebase, or just leave it and I'll squash and merge it.
I think you can just squash and merge it. I think I would probably mess things up with the rebase.
Fixes #2339 Modifies how prefix-strings is parsed and tokenized.
Now the compiler gives a syntax error when encountering a identifier(not a prefix) followed by a string literal.