Files
ruff/crates/ruff_python_parser/tests/snapshots/valid_syntax@statement__with.py.snap
Victor Hugo Gomes 78ee6441a7 Replace LALRPOP parser with hand-written parser
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-03-07 16:44:46 +05:30

52 lines
1.5 KiB
Plaintext

---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/valid/statement/with.py
---
## AST
```
Module(
ModModule {
range: 0..22,
body: [
With(
StmtWith {
range: 0..21,
is_async: false,
items: [
WithItem {
range: 5..11,
context_expr: NumberLiteral(
ExprNumberLiteral {
range: 5..6,
value: Int(
1,
),
},
),
optional_vars: Some(
Name(
ExprName {
range: 10..11,
id: "x",
ctx: Store,
},
),
),
},
],
body: [
Pass(
StmtPass {
range: 17..21,
},
),
],
},
),
],
},
)
```