mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-31 15:48:24 +00:00
Add expression context parsing
This commit is contained in:
parent
efad01d976
commit
0cd0a0adc8
29 changed files with 1024 additions and 581 deletions
|
@ -4,25 +4,29 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AnnAssign {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -30,14 +34,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
annotation: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "int",
|
||||
|
@ -46,14 +52,16 @@ expression: parse_ast
|
|||
},
|
||||
value: Some(
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
]
|
|
@ -4,37 +4,43 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -47,26 +53,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -76,14 +86,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -93,14 +105,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,25 +4,29 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: For {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -30,26 +34,30 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
iter: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -59,14 +67,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -76,14 +86,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -98,14 +110,16 @@ expression: parse_ast
|
|||
},
|
||||
body: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 21,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
|
|
|
@ -4,38 +4,44 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: List {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -43,14 +49,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -63,26 +71,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -92,14 +104,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -109,14 +123,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,26 +4,30 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -32,25 +36,29 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ListComp {
|
||||
elt: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -60,14 +68,16 @@ expression: parse_ast
|
|||
generators: [
|
||||
Comprehension {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -75,26 +85,30 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
iter: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -104,14 +118,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 21,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 22,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 22,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -121,14 +137,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 24,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,26 +4,30 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -32,26 +36,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -61,14 +69,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -78,14 +88,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,36 +4,42 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: If {
|
||||
test: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: NamedExpr {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -41,14 +47,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -61,14 +69,16 @@ expression: parse_ast
|
|||
},
|
||||
body: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
|
|
|
@ -4,26 +4,30 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -32,25 +36,29 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 27,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: SetComp {
|
||||
elt: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -60,14 +68,16 @@ expression: parse_ast
|
|||
generators: [
|
||||
Comprehension {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -75,26 +85,30 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
iter: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -104,14 +118,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 21,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 22,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 22,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -121,14 +137,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 24,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 25,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,38 +4,44 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 20,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 20,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -43,25 +49,29 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -77,26 +87,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -106,14 +120,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -123,14 +139,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,37 +4,43 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -42,14 +48,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
slice: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -61,26 +69,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -90,14 +102,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -107,14 +121,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,38 +4,44 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 19,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -43,14 +49,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -63,26 +71,30 @@ expression: parse_ast
|
|||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -92,14 +104,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -109,14 +123,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,27 +4,31 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: With {
|
||||
items: [
|
||||
Withitem {
|
||||
context_expr: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -35,14 +39,16 @@ expression: parse_ast
|
|||
},
|
||||
optional_vars: Some(
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -54,14 +60,16 @@ expression: parse_ast
|
|||
],
|
||||
body: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
|
|
|
@ -4,36 +4,42 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -46,26 +52,30 @@ expression: parse_ast
|
|||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -75,14 +85,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -92,14 +104,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 15,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,25 +4,29 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -31,14 +35,16 @@ expression: parse_ast
|
|||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,36 +4,42 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 18,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
target: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -41,14 +47,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
slice: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
@ -60,26 +68,30 @@ expression: parse_ast
|
|||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -89,14 +101,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
@ -106,14 +120,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 16,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 17,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
|
|
@ -4,37 +4,43 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
column: 5,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
|
|
@ -4,26 +4,30 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
|
|
@ -4,37 +4,43 @@ expression: parse_ast
|
|||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
column: 5,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
value: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
|
@ -42,14 +48,16 @@ expression: parse_ast
|
|||
},
|
||||
},
|
||||
slice: Located {
|
||||
start: Location {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
|
|
|
@ -65,7 +65,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -62,7 +62,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
Located {
|
||||
|
@ -79,11 +79,11 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y2",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
@ -121,7 +121,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "a",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -48,7 +48,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -97,7 +97,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -48,7 +48,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -115,7 +115,7 @@ Located {
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
iter: Located {
|
||||
|
|
|
@ -45,7 +45,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "a",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
Located {
|
||||
|
@ -62,11 +62,11 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
custom: (),
|
||||
node: Name {
|
||||
id: "b",
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue