-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider soft keyword for various parsing logic
- Loading branch information
1 parent
f591341
commit c64f352
Showing
15 changed files
with
774 additions
and
76 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
crates/ruff_python_parser/resources/inline/ok/except_stmt_as_name_soft_keyword.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
try: ... | ||
except Exception as match: ... | ||
except Exception as case: ... | ||
except Exception as type: ... |
4 changes: 4 additions & 0 deletions
4
crates/ruff_python_parser/resources/inline/ok/from_import_soft_keyword_module_name.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from match import pattern | ||
from type import bar | ||
from case import pattern | ||
from match.type.case import foo |
3 changes: 3 additions & 0 deletions
3
crates/ruff_python_parser/resources/inline/ok/import_as_name_soft_keyword.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import foo as match | ||
import bar as case | ||
import baz as type |
4 changes: 4 additions & 0 deletions
4
crates/ruff_python_parser/resources/inline/ok/match_as_pattern_soft_keyword.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
match foo: | ||
case case: ... | ||
case match: ... | ||
case type: ... |
5 changes: 5 additions & 0 deletions
5
crates/ruff_python_parser/resources/inline/ok/match_attr_pattern_soft_keyword.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
match foo: | ||
case match.bar: ... | ||
case case.bar: ... | ||
case type.bar: ... | ||
case match.case.type.bar.type.case.match: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.