Use CompactString for Identifier (#12101)

This commit is contained in:
Micha Reiser 2024-07-01 10:06:02 +02:00 committed by GitHub
parent db6ee74cbe
commit 5109b50bb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
474 changed files with 4953 additions and 4776 deletions

View file

@ -1,11 +1,11 @@
---
source: crates/ruff_python_parser/src/parser/tests.rs
expression: expr
expression: parsed.expr()
---
Name(
ExprName {
range: 0..5,
id: "first",
id: Name("first"),
ctx: Load,
},
)

View file

@ -1,6 +1,6 @@
---
source: crates/ruff_python_parser/src/parser/tests.rs
expression: parse_ast
expression: parsed.syntax()
---
Module(
ModModule {
@ -15,7 +15,7 @@ Module(
left: Name(
ExprName {
range: 27..28,
id: "a",
id: Name("a"),
ctx: Load,
},
),
@ -23,7 +23,7 @@ Module(
right: Name(
ExprName {
range: 39..40,
id: "b",
id: Name("b"),
ctx: Load,
},
),
@ -128,7 +128,7 @@ Module(
is_async: false,
decorator_list: [],
name: Identifier {
id: "foo",
id: Name("foo"),
range: 570..573,
},
type_params: None,
@ -152,7 +152,7 @@ Module(
left: Name(
ExprName {
range: 598..599,
id: "a",
id: Name("a"),
ctx: Load,
},
),
@ -163,7 +163,7 @@ Module(
Name(
ExprName {
range: 619..620,
id: "b",
id: Name("b"),
ctx: Load,
},
),
@ -204,7 +204,7 @@ Module(
target: Name(
ExprName {
range: 715..716,
id: "a",
id: Name("a"),
ctx: Store,
},
),
@ -214,7 +214,7 @@ Module(
func: Name(
ExprName {
range: 720..725,
id: "range",
id: Name("range"),
ctx: Load,
},
),
@ -253,7 +253,7 @@ Module(
Name(
ExprName {
range: 739..741,
id: "p1",
id: Name("p1"),
ctx: Store,
},
),
@ -273,14 +273,14 @@ Module(
target: Name(
ExprName {
range: 749..751,
id: "p2",
id: Name("p2"),
ctx: Store,
},
),
annotation: Name(
ExprName {
range: 753..756,
id: "str",
id: Name("str"),
ctx: Load,
},
),
@ -303,7 +303,7 @@ Module(
Name(
ExprName {
range: 764..767,
id: "foo",
id: Name("foo"),
ctx: Store,
},
),
@ -331,7 +331,7 @@ Module(
Name(
ExprName {
range: 792..795,
id: "foo",
id: Name("foo"),
ctx: Store,
},
),

View file

@ -1,6 +1,6 @@
---
source: crates/ruff_python_parser/src/parser/tests.rs
expression: parse_ast
expression: suite
---
[
Assign(
@ -10,7 +10,7 @@ expression: parse_ast
Name(
ExprName {
range: 0..1,
id: "x",
id: Name("x"),
ctx: Store,
},
),