Remove Stmt::TryStar (#6566)
## Summary Instead, we set an `is_star` flag on `Stmt::Try`. This is similar to the pattern we've migrated towards for `Stmt::For` (removing `Stmt::AsyncFor`) and friends. While these are significant differences for an interpreter, we tend to handle these cases identically or nearly identically. ## Test Plan `cargo test`
This commit is contained in:
@@ -243,6 +243,7 @@ expression: parse_ast
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
is_star: false,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
@@ -3,8 +3,8 @@ source: crates/ruff_python_parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
TryStar(
|
||||
StmtTryStar {
|
||||
Try(
|
||||
StmtTry {
|
||||
range: 0..260,
|
||||
body: [
|
||||
Raise(
|
||||
@@ -436,6 +436,7 @@ expression: parse_ast
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
is_star: true,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user