52 lines
1.5 KiB
Plaintext
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,
|
|
},
|
|
),
|
|
],
|
|
},
|
|
),
|
|
],
|
|
},
|
|
)
|
|
```
|
|
|