enso/lib/rust/parser
Kaz Wesley 8771855993
Fix failure to parse an invalid syntax case (#11754)
Fix failure to parse a syntax case involving unexpected usage of annotated expressions (fixes #11691).

The root cause of the bug was usage of the `matches!` macro in a situation where a `match` statement should have been used to enforce exhaustiveness.

- I have corrected the bug, and reviewed all usages of the `matches!` macro. I didn't find any other *incorrect* usages of `matches!`, but I found and replaced some potentially *fragile* uses. I also simplified some unnecessary uses of `matches!`, replacing them with expressions that are more-obviously correct.
- Stricter parsing: It is now a syntax error for an inline annotation to occur in the RHS of an application (e.g. `fn @Tail_Call recur`)--the precedence in this case may be surprising, so parentheses should be used around the annotated expression.

`parse_all_enso_files.sh`: This PR does not affect any AST in the .enso corpus.
2024-12-05 20:16:40 +00:00
..
debug Fix failure to parse an invalid syntax case (#11754) 2024-12-05 20:16:40 +00:00
doc-parser Move documentation into documentable types (#11441) 2024-11-04 15:33:53 +00:00
generate-java Distinguish assignment/thunk by statement context (#11324) 2024-10-18 17:54:55 +00:00
jni Distinguish assignment/thunk by statement context (#11324) 2024-10-18 17:54:55 +00:00
schema Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00
src Fix failure to parse an invalid syntax case (#11754) 2024-12-05 20:16:40 +00:00
Cargo.toml Remove all usages of unstable rust features (#10813) 2024-08-22 14:09:17 +00:00