Add an implicit concatenation flag to string and bytes constants (#6512)

## Summary

Per the discussion in
https://github.com/astral-sh/ruff/discussions/6183, this PR adds an
`implicit_concatenated` flag to the string and bytes constant variants.
It's not actually _used_ anywhere as of this PR, but it is covered by
the tests.

Specifically, we now use a struct for the string and bytes cases, along
with the `Expr::FString` node. That struct holds the value, plus the
flag:

```rust
#[derive(Clone, Debug, PartialEq, is_macro::Is)]
pub enum Constant {
    Str(StringConstant),
    Bytes(BytesConstant),
    ...
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct StringConstant {
    /// The string value as resolved by the parser (i.e., without quotes, or escape sequences, or
    /// implicit concatenations).
    pub value: String,
    /// Whether the string contains multiple string tokens that were implicitly concatenated.
    pub implicit_concatenated: bool,
}

impl Deref for StringConstant {
    type Target = str;
    fn deref(&self) -> &Self::Target {
        self.value.as_str()
    }
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct BytesConstant {
    /// The bytes value as resolved by the parser (i.e., without quotes, or escape sequences, or
    /// implicit concatenations).
    pub value: Vec<u8>,
    /// Whether the string contains multiple string tokens that were implicitly concatenated.
    pub implicit_concatenated: bool,
}

impl Deref for BytesConstant {
    type Target = [u8];
    fn deref(&self) -> &Self::Target {
        self.value.as_slice()
    }
}
```

## Test Plan

`cargo test`
This commit is contained in:
Charlie Marsh 2023-08-14 09:46:54 -04:00 committed by GitHub
parent fc0c9507d0
commit f16e780e0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 1252 additions and 761 deletions

View file

@ -11,7 +11,10 @@ Dict(
ExprConstant {
range: 1..4,
value: Str(
"a",
StringConstant {
value: "a",
implicit_concatenated: false,
},
),
kind: None,
},
@ -23,7 +26,10 @@ Dict(
ExprConstant {
range: 16..19,
value: Str(
"d",
StringConstant {
value: "d",
implicit_concatenated: false,
},
),
kind: None,
},
@ -35,7 +41,10 @@ Dict(
ExprConstant {
range: 6..9,
value: Str(
"b",
StringConstant {
value: "b",
implicit_concatenated: false,
},
),
kind: None,
},
@ -51,7 +60,10 @@ Dict(
ExprConstant {
range: 21..24,
value: Str(
"e",
StringConstant {
value: "e",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -12,7 +12,10 @@ Call(
ExprConstant {
range: 0..3,
value: Str(
" ",
StringConstant {
value: " ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -68,7 +71,10 @@ Call(
ExprConstant {
range: 43..53,
value: Str(
"LIMIT %d",
StringConstant {
value: "LIMIT %d",
implicit_concatenated: false,
},
),
kind: None,
},
@ -109,7 +115,10 @@ Call(
ExprConstant {
range: 91..102,
value: Str(
"OFFSET %d",
StringConstant {
value: "OFFSET %d",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -15,7 +15,10 @@ expression: parse_ast
ExprConstant {
range: 8..14,
value: Str(
"test",
StringConstant {
value: "test",
implicit_concatenated: false,
},
),
kind: None,
},
@ -100,7 +103,10 @@ expression: parse_ast
ExprConstant {
range: 81..88,
value: Str(
"label",
StringConstant {
value: "label",
implicit_concatenated: false,
},
),
kind: None,
},
@ -112,7 +118,10 @@ expression: parse_ast
ExprConstant {
range: 90..96,
value: Str(
"test",
StringConstant {
value: "test",
implicit_concatenated: false,
},
),
kind: None,
},
@ -131,7 +140,10 @@ expression: parse_ast
ExprConstant {
range: 118..125,
value: Str(
"label",
StringConstant {
value: "label",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -117,7 +117,10 @@ expression: "parse_suite(source, \"<test>\").unwrap()"
ExprConstant {
range: 80..89,
value: Str(
"default",
StringConstant {
value: "default",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -14,12 +14,16 @@ expression: parse_ast
ExprConstant {
range: 2..13,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: false,
},
),
kind: None,
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -23,7 +23,10 @@ expression: parse_ast
ExprConstant {
range: 8..20,
value: Str(
"positional",
StringConstant {
value: "positional",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -23,7 +23,10 @@ expression: parse_ast
ExprConstant {
range: 6..19,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -23,7 +23,10 @@ expression: parse_ast
ExprConstant {
range: 6..19,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..13,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -82,7 +82,10 @@ expression: "parse_suite(source, \"<test>\").unwrap()"
ExprConstant {
range: 48..61,
value: Str(
"ForwardRefY",
StringConstant {
value: "ForwardRefY",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -522,7 +522,10 @@ expression: parse_ast
ExprConstant {
range: 484..489,
value: Str(
"seq",
StringConstant {
value: "seq",
implicit_concatenated: false,
},
),
kind: None,
},
@ -552,7 +555,10 @@ expression: parse_ast
ExprConstant {
range: 518..523,
value: Str(
"map",
StringConstant {
value: "map",
implicit_concatenated: false,
},
),
kind: None,
},
@ -857,7 +863,10 @@ expression: parse_ast
ExprConstant {
range: 664..667,
value: Str(
"X",
StringConstant {
value: "X",
implicit_concatenated: false,
},
),
kind: None,
},
@ -1617,7 +1626,10 @@ expression: parse_ast
ExprConstant {
range: 1287..1292,
value: Str(
"foo",
StringConstant {
value: "foo",
implicit_concatenated: false,
},
),
kind: None,
},
@ -2565,7 +2577,10 @@ expression: parse_ast
ExprConstant {
range: 2036..2038,
value: Str(
"",
StringConstant {
value: "",
implicit_concatenated: false,
},
),
kind: None,
},
@ -2611,7 +2626,10 @@ expression: parse_ast
ExprConstant {
range: 2064..2066,
value: Str(
"",
StringConstant {
value: "",
implicit_concatenated: false,
},
),
kind: None,
},
@ -3251,7 +3269,10 @@ expression: parse_ast
ExprConstant {
range: 2449..2452,
value: Str(
"X",
StringConstant {
value: "X",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -87,7 +87,10 @@ expression: parse_ast
ExprConstant {
range: 64..71,
value: Str(
"caught ",
StringConstant {
value: "caught ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -126,6 +129,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
],
@ -181,7 +185,10 @@ expression: parse_ast
ExprConstant {
range: 116..123,
value: Str(
"caught ",
StringConstant {
value: "caught ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -220,6 +227,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
],

View file

@ -28,7 +28,10 @@ expression: parse_ast
ExprConstant {
range: 30..34,
value: Str(
"eg",
StringConstant {
value: "eg",
implicit_concatenated: false,
},
),
kind: None,
},
@ -203,7 +206,10 @@ expression: parse_ast
ExprConstant {
range: 135..142,
value: Str(
"caught ",
StringConstant {
value: "caught ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -245,7 +251,10 @@ expression: parse_ast
ExprConstant {
range: 151..164,
value: Str(
" with nested ",
StringConstant {
value: " with nested ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -276,6 +285,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
],
@ -331,7 +341,10 @@ expression: parse_ast
ExprConstant {
range: 215..222,
value: Str(
"caught ",
StringConstant {
value: "caught ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -373,7 +386,10 @@ expression: parse_ast
ExprConstant {
range: 231..244,
value: Str(
" with nested ",
StringConstant {
value: " with nested ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -404,6 +420,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
],

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..15,
value: Str(
"\u{8}",
StringConstant {
value: "\u{8}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..9,
value: Str(
"\u{7}",
StringConstant {
value: "\u{7}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..21,
value: Str(
"\r",
StringConstant {
value: "\r",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..45,
value: Str(
"\u{89}",
StringConstant {
value: "\u{89}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..12,
value: Str(
"\u{7f}",
StringConstant {
value: "\u{7f}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,264 +10,267 @@ expression: parse_ast
ExprConstant {
range: 0..738,
value: Bytes(
[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
190,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
236,
237,
238,
239,
240,
241,
242,
243,
244,
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255,
],
BytesConstant {
value: [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
190,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
236,
237,
238,
239,
240,
241,
242,
243,
244,
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..12,
value: Str(
"\u{1b}",
StringConstant {
value: "\u{1b}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,18 +10,21 @@ expression: parse_ast
ExprConstant {
range: 0..13,
value: Bytes(
[
111,
109,
107,
109,
111,
107,
92,
88,
97,
97,
],
BytesConstant {
value: [
111,
109,
107,
109,
111,
107,
92,
88,
97,
97,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,13 +10,16 @@ expression: parse_ast
ExprConstant {
range: 0..14,
value: Bytes(
[
35,
97,
4,
83,
52,
],
BytesConstant {
value: [
35,
97,
4,
83,
52,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..15,
value: Str(
"\u{c}",
StringConstant {
value: "\u{c}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 2..5,
value: Str(
"aaa",
StringConstant {
value: "aaa",
implicit_concatenated: false,
},
),
kind: None,
},
@ -38,7 +41,10 @@ expression: parse_ast
ExprConstant {
range: 10..13,
value: Str(
"ccc",
StringConstant {
value: "ccc",
implicit_concatenated: false,
},
),
kind: None,
},
@ -62,12 +68,16 @@ expression: parse_ast
ExprConstant {
range: 18..21,
value: Str(
"eee",
StringConstant {
value: "eee",
implicit_concatenated: false,
},
),
kind: None,
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 2..4,
value: Str(
"\\",
StringConstant {
value: "\\",
implicit_concatenated: false,
},
),
kind: None,
},
@ -35,6 +38,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 2..4,
value: Str(
"\n",
StringConstant {
value: "\n",
implicit_concatenated: false,
},
),
kind: None,
},
@ -35,6 +38,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 3..5,
value: Str(
"\\\n",
StringConstant {
value: "\\\n",
implicit_concatenated: false,
},
),
kind: None,
},
@ -35,6 +38,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -7,7 +7,10 @@ expression: parse_ast
ExprConstant {
range: 2..6,
value: Str(
"mix ",
StringConstant {
value: "mix ",
implicit_concatenated: false,
},
),
kind: None,
},
@ -36,7 +39,10 @@ expression: parse_ast
ExprConstant {
range: 13..28,
value: Str(
" with text and ",
StringConstant {
value: " with text and ",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -29,12 +29,16 @@ expression: parse_ast
ExprConstant {
range: 9..12,
value: Str(
">10",
StringConstant {
value: ">10",
implicit_concatenated: false,
},
),
kind: None,
},
),
],
implicit_concatenated: false,
},
),
),

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 4..5,
value: Str(
"\n",
StringConstant {
value: "\n",
implicit_concatenated: false,
},
),
kind: None,
},
@ -35,6 +38,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..9,
value: Str(
"\u{88}",
StringConstant {
value: "\u{88}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -14,12 +14,16 @@ expression: parse_ast
ExprConstant {
range: 1..16,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},
),
],
implicit_concatenated: true,
},
),
},

View file

@ -14,12 +14,16 @@ expression: parse_ast
ExprConstant {
range: 1..16,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},
),
],
implicit_concatenated: true,
},
),
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 1..16,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},
@ -26,7 +29,10 @@ expression: parse_ast
ExprConstant {
range: 17..20,
value: Str(
"!",
StringConstant {
value: "!",
implicit_concatenated: false,
},
),
kind: None,
},
@ -37,6 +43,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: true,
},
),
},

View file

@ -0,0 +1,63 @@
---
source: crates/ruff_python_parser/src/string.rs
expression: parse_ast
---
[
Expr(
StmtExpr {
range: 0..31,
value: FString(
ExprFString {
range: 0..31,
values: [
Constant(
ExprConstant {
range: 1..16,
value: Str(
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},
),
FormattedValue(
ExprFormattedValue {
range: 16..21,
value: Constant(
ExprConstant {
range: 17..20,
value: Str(
StringConstant {
value: "!",
implicit_concatenated: false,
},
),
kind: None,
},
),
debug_text: None,
conversion: None,
format_spec: None,
},
),
Constant(
ExprConstant {
range: 24..30,
value: Str(
StringConstant {
value: "again!",
implicit_concatenated: true,
},
),
kind: None,
},
),
],
implicit_concatenated: true,
},
),
},
),
]

View file

@ -37,7 +37,10 @@ expression: parse_ast
ExprConstant {
range: 10..17,
value: Str(
"{foo}",
StringConstant {
value: "{foo}",
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -0,0 +1,50 @@
---
source: crates/ruff_python_parser/src/string.rs
expression: parse_ast
---
[
FormattedValue(
ExprFormattedValue {
range: 2..15,
value: Name(
ExprName {
range: 3..6,
id: "foo",
ctx: Load,
},
),
debug_text: None,
conversion: None,
format_spec: Some(
FString(
ExprFString {
range: 7..14,
values: [
FormattedValue(
ExprFormattedValue {
range: 7..14,
value: Constant(
ExprConstant {
range: 8..13,
value: Str(
StringConstant {
value: "",
implicit_concatenated: true,
},
),
kind: None,
},
),
debug_text: None,
conversion: None,
format_spec: None,
},
),
],
implicit_concatenated: false,
},
),
),
},
),
]

View file

@ -36,6 +36,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
),

View file

@ -0,0 +1,50 @@
---
source: crates/ruff_python_parser/src/string.rs
expression: parse_ast
---
[
FormattedValue(
ExprFormattedValue {
range: 2..12,
value: Name(
ExprName {
range: 3..6,
id: "foo",
ctx: Load,
},
),
debug_text: None,
conversion: None,
format_spec: Some(
FString(
ExprFString {
range: 7..11,
values: [
FormattedValue(
ExprFormattedValue {
range: 7..11,
value: Constant(
ExprConstant {
range: 8..10,
value: Str(
StringConstant {
value: "",
implicit_concatenated: false,
},
),
kind: None,
},
),
debug_text: None,
conversion: None,
format_spec: None,
},
),
],
implicit_concatenated: false,
},
),
),
},
),
]

View file

@ -24,12 +24,16 @@ expression: parse_ast
ExprConstant {
range: 7..11,
value: Str(
"spec",
StringConstant {
value: "spec",
implicit_concatenated: false,
},
),
kind: None,
},
),
],
implicit_concatenated: false,
},
),
),

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..16,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..20,
value: Str(
"Hello, world!",
StringConstant {
value: "Hello, world!",
implicit_concatenated: false,
},
),
kind: Some(
"u",

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 2..17,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: Some(
"u",
@ -22,6 +25,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: true,
},
),
},

View file

@ -14,7 +14,10 @@ expression: parse_ast
ExprConstant {
range: 2..21,
value: Str(
"Hello world!",
StringConstant {
value: "Hello world!",
implicit_concatenated: true,
},
),
kind: Some(
"u",
@ -22,6 +25,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: true,
},
),
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..17,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: None,
},

View file

@ -10,7 +10,10 @@ expression: parse_ast
ExprConstant {
range: 0..17,
value: Str(
"Hello world",
StringConstant {
value: "Hello world",
implicit_concatenated: true,
},
),
kind: Some(
"u",

View file

@ -10,12 +10,15 @@ expression: parse_ast
ExprConstant {
range: 0..8,
value: Bytes(
[
92,
120,
49,
122,
],
BytesConstant {
value: [
92,
120,
49,
122,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -10,10 +10,13 @@ expression: parse_ast
ExprConstant {
range: 0..6,
value: Bytes(
[
92,
92,
],
BytesConstant {
value: [
92,
92,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -26,6 +26,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},

View file

@ -10,264 +10,267 @@ expression: parse_ast
ExprConstant {
range: 0..738,
value: Bytes(
[
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
190,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
236,
237,
238,
239,
240,
241,
242,
243,
244,
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255,
],
BytesConstant {
value: [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
190,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
236,
237,
238,
239,
240,
241,
242,
243,
244,
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255,
],
implicit_concatenated: false,
},
),
kind: None,
},

View file

@ -26,6 +26,7 @@ expression: parse_ast
},
),
],
implicit_concatenated: false,
},
),
},