See e.g. #2570. Some of the unit tests there with "wrong error message" should be somewhat easy to fix - just correct the error message we have to match CPython's. Others might be trickier, since you'll need to add diagnostics to recognize bad syntax and give a more detailed error than "unexpected token". Also, I think around half of them could be fixed just by adding "invalid syntax" in the message for an unexpected token, since they're just checking for "invalid syntax" anywhere in the message (it's just what CPython uses to mean an unexpected token, I think).
The text was updated successfully, but these errors were encountered:
See e.g. #2570. Some of the unit tests there with "wrong error message" should be somewhat easy to fix - just correct the error message we have to match CPython's. Others might be trickier, since you'll need to add diagnostics to recognize bad syntax and give a more detailed error than "unexpected token". Also, I think around half of them could be fixed just by adding "invalid syntax" in the message for an unexpected token, since they're just checking for "invalid syntax" anywhere in the message (it's just what CPython uses to mean an unexpected token, I think).
The text was updated successfully, but these errors were encountered: