[Bug][move-compiler] Tiny parser degradation with PR 14792 #15133
Labels
bug
Something isn't working
compiler-errormessage
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
🐛 Bug
PR 14792 changes the way comma lists are parsed slightly, causing test case output
third_party/move/move-compiler-2/tests/more-v1/parser/unexpected_token_after_ability_function_constraint.exp
to get slightly worse. The diff is here:The problem is that subterm parsing ends and recovery is not attempted until at the list level, where either a comma or a
>
is expected.This could be addressed by returning expected tokens along with the returned subterm, so that when we reach an impasse we could add those tokens to the list shown to the user. It might involve a widespread change to the parser (returning expected next tokens along with a successfully parsed item), but probably would greatly improve user experience.
The text was updated successfully, but these errors were encountered: