-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Right now just case without match produces:
>>> case 1:
File "<python-input-0>", line 1
case 1:
^
SyntaxError: invalid syntaxI propose to add a better hint:
>>> case 1:
File "<python-input-0>", line 1
case 1:
^
SyntaxError: case statement must be inside match statementI have a PR ready.
I also have several other ideas about better error messages for match and case :)
Linked PRs
namurphy
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-featureA feature request or enhancementA feature request or enhancement