You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse errors are hard to understand. These errors come directly from the PEST grammar, which no Simfony developer will have read. It would be better to accept incomplete program components during parsing and to produce an expressive user-facing error when the AST is generated.
Like, right now if you remove type annotations from your example programs you get something like expected match_pattern but it'd be nicer if we'd parse these things, mark them as "unknown type" and then during AST conversion we'd give the user an error like "No type was specified for x. You need to provide a type annotation, like x: bool."
The scope of this change is unclear, but grammar errors are hard to understand so we never want to show them to users.
The text was updated successfully, but these errors were encountered:
Well, not never. If they input actual nonsense we don't have much choice. But if they write something that "looks like it should work" then we should try to provide our own error message.
For the sake of making this issue closeable, I'd say that if you can remove the type annotations (especially the ::<u8> ones) and the resulting error message tells you to put them back, I'd call this issue closed. But in general, we should strive toward doing this in many different places.
Parse errors are hard to understand. These errors come directly from the PEST grammar, which no Simfony developer will have read. It would be better to accept incomplete program components during parsing and to produce an expressive user-facing error when the AST is generated.
#56 (comment)
The scope of this change is unclear, but grammar errors are hard to understand so we never want to show them to users.
The text was updated successfully, but these errors were encountered: