-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Specific Errors for Common Cases #309
Comments
Another good error to emit would be if you are using a keyword somewhere by mistake for example:
This gives the following error message:
where it would generally be more helpful to have an error message along the lines of |
Found another example with the
|
Once #510 is merged we now have introduced an error for when doc comments are used on parameters, modules, and return memebers. This error would also be a good candidate for ErrorRecovery with a specific message. |
For attributes we should add notes about what an attribute can be applied to when it's put on the wrong thing. |
With the new parser, we emit a general syntax that describes what the parser found, and what valid things should of been there instead. This is fine for general cases, but there are many common syntax errors that we should add more specific error messages for. For instance:
Striking the right balance between addressing common cases without over-doing it will be non-trivial.
But if anyone runs into a common syntax error that they think warrants a specific error message, feel free to post it here!
The text was updated successfully, but these errors were encountered: