diff options
4 files changed, 484 insertions, 96 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs index 2536bac80..1488e12a4 100644 --- a/crates/libsyntax2/src/grammar/expressions/atom.rs +++ b/crates/libsyntax2/src/grammar/expressions/atom.rs | |||
@@ -108,6 +108,10 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker { | |||
108 | let mut saw_expr = false; | 108 | let mut saw_expr = false; |
109 | while !p.at(EOF) && !p.at(R_PAREN) { | 109 | while !p.at(EOF) && !p.at(R_PAREN) { |
110 | saw_expr = true; | 110 | saw_expr = true; |
111 | if !EXPR_FIRST.contains(p.current()) { | ||
112 | p.error("expected expression"); | ||
113 | break; | ||
114 | } | ||
111 | expr(p); | 115 | expr(p); |
112 | if !p.at(R_PAREN) { | 116 | if !p.at(R_PAREN) { |
113 | saw_comma = true; | 117 | saw_comma = true; |
diff --git a/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.rs b/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.rs new file mode 100644 index 000000000..6c2e95c02 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.rs | |||
@@ -0,0 +1,7 @@ | |||
1 | fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {} | ||
2 | |||
3 | fn main() { | ||
4 | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>; | ||
5 | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>; | ||
6 | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>; | ||
7 | } | ||
diff --git a/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.txt b/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.txt new file mode 100644 index 000000000..195c12e08 --- /dev/null +++ b/crates/libsyntax2/tests/data/parser/err/0024_many_type_parens.txt | |||
@@ -0,0 +1,310 @@ | |||
1 | ROOT@[0; 240) | ||
2 | FN_DEF@[0; 53) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 4) | ||
6 | IDENT@[3; 4) "f" | ||
7 | TYPE_PARAM_LIST@[4; 48) | ||
8 | L_ANGLE@[4; 5) | ||
9 | TYPE_PARAM@[5; 47) | ||
10 | NAME@[5; 6) | ||
11 | IDENT@[5; 6) "T" | ||
12 | COLON@[6; 7) | ||
13 | WHITESPACE@[7; 8) | ||
14 | L_PAREN@[8; 9) | ||
15 | PATH_TYPE@[9; 13) | ||
16 | PATH@[9; 13) | ||
17 | PATH_SEGMENT@[9; 13) | ||
18 | NAME_REF@[9; 13) | ||
19 | IDENT@[9; 13) "Copy" | ||
20 | R_PAREN@[13; 14) | ||
21 | WHITESPACE@[14; 15) | ||
22 | PLUS@[15; 16) | ||
23 | WHITESPACE@[16; 17) | ||
24 | L_PAREN@[17; 18) | ||
25 | QUESTION@[18; 19) | ||
26 | PATH_TYPE@[19; 24) | ||
27 | PATH@[19; 24) | ||
28 | PATH_SEGMENT@[19; 24) | ||
29 | NAME_REF@[19; 24) | ||
30 | IDENT@[19; 24) "Sized" | ||
31 | R_PAREN@[24; 25) | ||
32 | WHITESPACE@[25; 26) | ||
33 | PLUS@[26; 27) | ||
34 | WHITESPACE@[27; 28) | ||
35 | L_PAREN@[28; 29) | ||
36 | FOR_TYPE@[29; 46) | ||
37 | FOR_KW@[29; 32) | ||
38 | TYPE_PARAM_LIST@[32; 36) | ||
39 | L_ANGLE@[32; 33) | ||
40 | LIFETIME_PARAM@[33; 35) | ||
41 | LIFETIME@[33; 35) "'a" | ||
42 | R_ANGLE@[35; 36) | ||
43 | WHITESPACE@[36; 37) | ||
44 | PATH_TYPE@[37; 46) | ||
45 | PATH@[37; 46) | ||
46 | PATH_SEGMENT@[37; 46) | ||
47 | NAME_REF@[37; 42) | ||
48 | IDENT@[37; 42) "Trait" | ||
49 | TYPE_ARG_LIST@[42; 46) | ||
50 | L_ANGLE@[42; 43) | ||
51 | LIFETIME_ARG@[43; 45) | ||
52 | LIFETIME@[43; 45) "'a" | ||
53 | R_ANGLE@[45; 46) | ||
54 | R_PAREN@[46; 47) | ||
55 | R_ANGLE@[47; 48) | ||
56 | PARAM_LIST@[48; 50) | ||
57 | L_PAREN@[48; 49) | ||
58 | R_PAREN@[49; 50) | ||
59 | WHITESPACE@[50; 51) | ||
60 | BLOCK@[51; 53) | ||
61 | L_CURLY@[51; 52) | ||
62 | R_CURLY@[52; 53) | ||
63 | WHITESPACE@[53; 55) | ||
64 | FN_DEF@[55; 239) | ||
65 | FN_KW@[55; 57) | ||
66 | WHITESPACE@[57; 58) | ||
67 | NAME@[58; 62) | ||
68 | IDENT@[58; 62) "main" | ||
69 | PARAM_LIST@[62; 64) | ||
70 | L_PAREN@[62; 63) | ||
71 | R_PAREN@[63; 64) | ||
72 | WHITESPACE@[64; 65) | ||
73 | BLOCK@[65; 239) | ||
74 | L_CURLY@[65; 66) | ||
75 | WHITESPACE@[66; 71) | ||
76 | LET_STMT@[71; 121) | ||
77 | LET_KW@[71; 74) | ||
78 | WHITESPACE@[74; 75) | ||
79 | PLACEHOLDER_PAT@[75; 76) | ||
80 | UNDERSCORE@[75; 76) | ||
81 | COLON@[76; 77) | ||
82 | WHITESPACE@[77; 78) | ||
83 | PATH_TYPE@[78; 121) | ||
84 | PATH@[78; 88) | ||
85 | PATH_SEGMENT@[78; 88) | ||
86 | NAME_REF@[78; 81) | ||
87 | IDENT@[78; 81) "Box" | ||
88 | TYPE_ARG_LIST@[81; 88) | ||
89 | L_ANGLE@[81; 82) | ||
90 | TYPE_ARG@[82; 88) | ||
91 | PAREN_TYPE@[82; 88) | ||
92 | L_PAREN@[82; 83) | ||
93 | PATH_TYPE@[83; 87) | ||
94 | PATH@[83; 87) | ||
95 | PATH_SEGMENT@[83; 87) | ||
96 | NAME_REF@[83; 87) | ||
97 | IDENT@[83; 87) "Copy" | ||
98 | R_PAREN@[87; 88) | ||
99 | err: `expected COMMA` | ||
100 | err: `expected R_ANGLE` | ||
101 | WHITESPACE@[88; 89) | ||
102 | PLUS@[89; 90) | ||
103 | WHITESPACE@[90; 91) | ||
104 | L_PAREN@[91; 92) | ||
105 | QUESTION@[92; 93) | ||
106 | PATH_TYPE@[93; 98) | ||
107 | PATH@[93; 98) | ||
108 | PATH_SEGMENT@[93; 98) | ||
109 | NAME_REF@[93; 98) | ||
110 | IDENT@[93; 98) "Sized" | ||
111 | R_PAREN@[98; 99) | ||
112 | WHITESPACE@[99; 100) | ||
113 | PLUS@[100; 101) | ||
114 | WHITESPACE@[101; 102) | ||
115 | L_PAREN@[102; 103) | ||
116 | FOR_TYPE@[103; 120) | ||
117 | FOR_KW@[103; 106) | ||
118 | TYPE_PARAM_LIST@[106; 110) | ||
119 | L_ANGLE@[106; 107) | ||
120 | LIFETIME_PARAM@[107; 109) | ||
121 | LIFETIME@[107; 109) "'a" | ||
122 | R_ANGLE@[109; 110) | ||
123 | WHITESPACE@[110; 111) | ||
124 | PATH_TYPE@[111; 120) | ||
125 | PATH@[111; 120) | ||
126 | PATH_SEGMENT@[111; 120) | ||
127 | NAME_REF@[111; 116) | ||
128 | IDENT@[111; 116) "Trait" | ||
129 | TYPE_ARG_LIST@[116; 120) | ||
130 | L_ANGLE@[116; 117) | ||
131 | LIFETIME_ARG@[117; 119) | ||
132 | LIFETIME@[117; 119) "'a" | ||
133 | R_ANGLE@[119; 120) | ||
134 | R_PAREN@[120; 121) | ||
135 | err: `expected SEMI` | ||
136 | err: `expected expression` | ||
137 | EXPR_STMT@[121; 123) | ||
138 | ERROR@[121; 122) | ||
139 | R_ANGLE@[121; 122) | ||
140 | SEMI@[122; 123) | ||
141 | WHITESPACE@[123; 128) | ||
142 | LET_STMT@[128; 141) | ||
143 | LET_KW@[128; 131) | ||
144 | WHITESPACE@[131; 132) | ||
145 | PLACEHOLDER_PAT@[132; 133) | ||
146 | UNDERSCORE@[132; 133) | ||
147 | COLON@[133; 134) | ||
148 | WHITESPACE@[134; 135) | ||
149 | PATH_TYPE@[135; 141) | ||
150 | PATH@[135; 141) | ||
151 | PATH_SEGMENT@[135; 141) | ||
152 | NAME_REF@[135; 138) | ||
153 | IDENT@[135; 138) "Box" | ||
154 | TYPE_ARG_LIST@[138; 141) | ||
155 | L_ANGLE@[138; 139) | ||
156 | TYPE_ARG@[139; 141) | ||
157 | PAREN_TYPE@[139; 141) | ||
158 | L_PAREN@[139; 140) | ||
159 | err: `expected type` | ||
160 | ERROR@[140; 141) | ||
161 | QUESTION@[140; 141) | ||
162 | err: `expected R_PAREN` | ||
163 | err: `expected COMMA` | ||
164 | err: `expected R_ANGLE` | ||
165 | err: `expected SEMI` | ||
166 | EXPR_STMT@[141; 146) | ||
167 | PATH_EXPR@[141; 146) | ||
168 | PATH@[141; 146) | ||
169 | PATH_SEGMENT@[141; 146) | ||
170 | NAME_REF@[141; 146) | ||
171 | IDENT@[141; 146) "Sized" | ||
172 | err: `expected SEMI` | ||
173 | err: `expected expression` | ||
174 | EXPR_STMT@[146; 147) | ||
175 | ERROR@[146; 147) | ||
176 | R_PAREN@[146; 147) | ||
177 | err: `expected SEMI` | ||
178 | WHITESPACE@[147; 148) | ||
179 | err: `expected expression` | ||
180 | EXPR_STMT@[148; 149) | ||
181 | ERROR@[148; 149) | ||
182 | PLUS@[148; 149) | ||
183 | err: `expected SEMI` | ||
184 | WHITESPACE@[149; 150) | ||
185 | EXPR_STMT@[150; 151) | ||
186 | PAREN_EXPR@[150; 151) | ||
187 | L_PAREN@[150; 151) | ||
188 | err: `expected expression` | ||
189 | err: `expected R_PAREN` | ||
190 | err: `expected SEMI` | ||
191 | EXPR_STMT@[151; 157) | ||
192 | FOR_EXPR@[151; 157) | ||
193 | FOR_KW@[151; 154) | ||
194 | err: `expected pattern` | ||
195 | ERROR@[154; 155) | ||
196 | L_ANGLE@[154; 155) | ||
197 | err: `expected IN_KW` | ||
198 | err: `expected expression` | ||
199 | ERROR@[155; 157) | ||
200 | LIFETIME@[155; 157) "'a" | ||
201 | err: `expected a block` | ||
202 | err: `expected expression` | ||
203 | EXPR_STMT@[157; 158) | ||
204 | ERROR@[157; 158) | ||
205 | R_ANGLE@[157; 158) | ||
206 | err: `expected SEMI` | ||
207 | WHITESPACE@[158; 159) | ||
208 | EXPR_STMT@[159; 180) | ||
209 | BIN_EXPR@[159; 180) | ||
210 | BIN_EXPR@[159; 178) | ||
211 | BIN_EXPR@[159; 169) | ||
212 | BIN_EXPR@[159; 167) | ||
213 | PATH_EXPR@[159; 164) | ||
214 | PATH@[159; 164) | ||
215 | PATH_SEGMENT@[159; 164) | ||
216 | NAME_REF@[159; 164) | ||
217 | IDENT@[159; 164) "Trait" | ||
218 | L_ANGLE@[164; 165) | ||
219 | err: `expected expression` | ||
220 | ERROR@[165; 167) | ||
221 | LIFETIME@[165; 167) "'a" | ||
222 | R_ANGLE@[167; 168) | ||
223 | err: `expected expression` | ||
224 | ERROR@[168; 169) | ||
225 | R_PAREN@[168; 169) | ||
226 | WHITESPACE@[169; 170) | ||
227 | PLUS@[170; 171) | ||
228 | WHITESPACE@[171; 172) | ||
229 | PAREN_EXPR@[172; 178) | ||
230 | L_PAREN@[172; 173) | ||
231 | PATH_EXPR@[173; 177) | ||
232 | PATH@[173; 177) | ||
233 | PATH_SEGMENT@[173; 177) | ||
234 | NAME_REF@[173; 177) | ||
235 | IDENT@[173; 177) "Copy" | ||
236 | R_PAREN@[177; 178) | ||
237 | R_ANGLE@[178; 179) | ||
238 | err: `expected expression` | ||
239 | ERROR@[179; 180) | ||
240 | SEMI@[179; 180) | ||
241 | err: `expected SEMI` | ||
242 | WHITESPACE@[180; 185) | ||
243 | LET_STMT@[185; 235) | ||
244 | LET_KW@[185; 188) | ||
245 | WHITESPACE@[188; 189) | ||
246 | PLACEHOLDER_PAT@[189; 190) | ||
247 | UNDERSCORE@[189; 190) | ||
248 | COLON@[190; 191) | ||
249 | WHITESPACE@[191; 192) | ||
250 | PATH_TYPE@[192; 235) | ||
251 | PATH@[192; 215) | ||
252 | PATH_SEGMENT@[192; 215) | ||
253 | NAME_REF@[192; 195) | ||
254 | IDENT@[192; 195) "Box" | ||
255 | TYPE_ARG_LIST@[195; 215) | ||
256 | L_ANGLE@[195; 196) | ||
257 | TYPE_ARG@[196; 215) | ||
258 | PAREN_TYPE@[196; 215) | ||
259 | L_PAREN@[196; 197) | ||
260 | FOR_TYPE@[197; 214) | ||
261 | FOR_KW@[197; 200) | ||
262 | TYPE_PARAM_LIST@[200; 204) | ||
263 | L_ANGLE@[200; 201) | ||
264 | LIFETIME_PARAM@[201; 203) | ||
265 | LIFETIME@[201; 203) "'a" | ||
266 | R_ANGLE@[203; 204) | ||
267 | WHITESPACE@[204; 205) | ||
268 | PATH_TYPE@[205; 214) | ||
269 | PATH@[205; 214) | ||
270 | PATH_SEGMENT@[205; 214) | ||
271 | NAME_REF@[205; 210) | ||
272 | IDENT@[205; 210) "Trait" | ||
273 | TYPE_ARG_LIST@[210; 214) | ||
274 | L_ANGLE@[210; 211) | ||
275 | LIFETIME_ARG@[211; 213) | ||
276 | LIFETIME@[211; 213) "'a" | ||
277 | R_ANGLE@[213; 214) | ||
278 | R_PAREN@[214; 215) | ||
279 | err: `expected COMMA` | ||
280 | err: `expected R_ANGLE` | ||
281 | WHITESPACE@[215; 216) | ||
282 | PLUS@[216; 217) | ||
283 | WHITESPACE@[217; 218) | ||
284 | L_PAREN@[218; 219) | ||
285 | PATH_TYPE@[219; 223) | ||
286 | PATH@[219; 223) | ||
287 | PATH_SEGMENT@[219; 223) | ||
288 | NAME_REF@[219; 223) | ||
289 | IDENT@[219; 223) "Copy" | ||
290 | R_PAREN@[223; 224) | ||
291 | WHITESPACE@[224; 225) | ||
292 | PLUS@[225; 226) | ||
293 | WHITESPACE@[226; 227) | ||
294 | L_PAREN@[227; 228) | ||
295 | QUESTION@[228; 229) | ||
296 | PATH_TYPE@[229; 234) | ||
297 | PATH@[229; 234) | ||
298 | PATH_SEGMENT@[229; 234) | ||
299 | NAME_REF@[229; 234) | ||
300 | IDENT@[229; 234) "Sized" | ||
301 | R_PAREN@[234; 235) | ||
302 | err: `expected SEMI` | ||
303 | err: `expected expression` | ||
304 | EXPR_STMT@[235; 237) | ||
305 | ERROR@[235; 236) | ||
306 | R_ANGLE@[235; 236) | ||
307 | SEMI@[236; 237) | ||
308 | WHITESPACE@[237; 238) | ||
309 | R_CURLY@[238; 239) | ||
310 | WHITESPACE@[239; 240) | ||
diff --git a/crates/libsyntax2/tests/data/parser/ok/0034_macro_2.0.txt b/crates/libsyntax2/tests/data/parser/ok/0034_macro_2.0.txt index 1a8ca761d..74af9d71b 100644 --- a/crates/libsyntax2/tests/data/parser/ok/0034_macro_2.0.txt +++ b/crates/libsyntax2/tests/data/parser/ok/0034_macro_2.0.txt | |||
@@ -79,119 +79,186 @@ ROOT@[0; 350) | |||
79 | IDENT@[134; 139) "macro" | 79 | IDENT@[134; 139) "macro" |
80 | err: `expected SEMI` | 80 | err: `expected SEMI` |
81 | WHITESPACE@[139; 140) | 81 | WHITESPACE@[139; 140) |
82 | EXPR_STMT@[140; 203) | 82 | EXPR_STMT@[140; 154) |
83 | CALL_EXPR@[140; 203) | 83 | CALL_EXPR@[140; 154) |
84 | PATH_EXPR@[140; 150) | 84 | PATH_EXPR@[140; 150) |
85 | PATH@[140; 150) | 85 | PATH@[140; 150) |
86 | PATH_SEGMENT@[140; 150) | 86 | PATH_SEGMENT@[140; 150) |
87 | NAME_REF@[140; 150) | 87 | NAME_REF@[140; 150) |
88 | IDENT@[140; 150) "test_merge" | 88 | IDENT@[140; 150) "test_merge" |
89 | ARG_LIST@[150; 203) | 89 | ARG_LIST@[150; 154) |
90 | L_PAREN@[150; 151) | 90 | L_PAREN@[150; 151) |
91 | ARRAY_EXPR@[151; 202) | 91 | ARRAY_EXPR@[151; 154) |
92 | L_BRACK@[151; 152) | 92 | L_BRACK@[151; 152) |
93 | err: `expected expression` | 93 | err: `expected expression` |
94 | ERROR@[152; 153) | 94 | ERROR@[152; 153) |
95 | DOLLAR@[152; 153) | 95 | DOLLAR@[152; 153) |
96 | err: `expected COMMA` | 96 | err: `expected COMMA` |
97 | TUPLE_EXPR@[153; 166) | 97 | PAREN_EXPR@[153; 154) |
98 | L_PAREN@[153; 154) | 98 | L_PAREN@[153; 154) |
99 | err: `expected expression` | 99 | err: `expected expression` |
100 | ERROR@[154; 155) | 100 | err: `expected R_PAREN` |
101 | DOLLAR@[154; 155) | 101 | err: `expected COMMA` |
102 | err: `expected COMMA` | 102 | err: `expected expression` |
103 | PATH_EXPR@[155; 160) | 103 | err: `expected R_BRACK` |
104 | PATH@[155; 160) | 104 | err: `expected COMMA` |
105 | PATH_SEGMENT@[155; 160) | 105 | err: `expected SEMI` |
106 | NAME_REF@[155; 160) | 106 | err: `expected expression` |
107 | IDENT@[155; 160) "input" | 107 | EXPR_STMT@[154; 155) |
108 | err: `expected COMMA` | 108 | ERROR@[154; 155) |
109 | err: `expected expression` | 109 | DOLLAR@[154; 155) |
110 | ERROR@[160; 161) | 110 | err: `expected SEMI` |
111 | COLON@[160; 161) | 111 | EXPR_STMT@[155; 160) |
112 | err: `expected COMMA` | 112 | PATH_EXPR@[155; 160) |
113 | PATH_EXPR@[161; 165) | 113 | PATH@[155; 160) |
114 | PATH@[161; 165) | 114 | PATH_SEGMENT@[155; 160) |
115 | PATH_SEGMENT@[161; 165) | 115 | NAME_REF@[155; 160) |
116 | NAME_REF@[161; 165) | 116 | IDENT@[155; 160) "input" |
117 | IDENT@[161; 165) "expr" | 117 | err: `expected SEMI` |
118 | R_PAREN@[165; 166) | 118 | err: `expected expression` |
119 | COMMA@[166; 167) | 119 | EXPR_STMT@[160; 161) |
120 | PREFIX_EXPR@[167; 170) | 120 | ERROR@[160; 161) |
121 | STAR@[167; 168) | 121 | COLON@[160; 161) |
122 | WHITESPACE@[168; 169) | 122 | err: `expected SEMI` |
123 | EXPR_STMT@[161; 165) | ||
124 | PATH_EXPR@[161; 165) | ||
125 | PATH@[161; 165) | ||
126 | PATH_SEGMENT@[161; 165) | ||
127 | NAME_REF@[161; 165) | ||
128 | IDENT@[161; 165) "expr" | ||
129 | err: `expected SEMI` | ||
123 | err: `expected expression` | 130 | err: `expected expression` |
124 | ERROR@[169; 170) | 131 | EXPR_STMT@[165; 166) |
125 | DOLLAR@[169; 170) | 132 | ERROR@[165; 166) |
126 | err: `expected COMMA` | 133 | R_PAREN@[165; 166) |
127 | BIN_EXPR@[170; 175) | 134 | err: `expected SEMI` |
128 | PAREN_EXPR@[170; 173) | 135 | err: `expected expression` |
129 | L_PAREN@[170; 171) | 136 | EXPR_STMT@[166; 167) |
130 | err: `expected expression` | 137 | ERROR@[166; 167) |
131 | ERROR@[171; 172) | 138 | COMMA@[166; 167) |
132 | COMMA@[171; 172) | 139 | err: `expected SEMI` |
133 | R_PAREN@[172; 173) | 140 | EXPR_STMT@[167; 170) |
134 | STAR@[173; 174) | 141 | PREFIX_EXPR@[167; 170) |
142 | STAR@[167; 168) | ||
143 | WHITESPACE@[168; 169) | ||
144 | err: `expected expression` | ||
145 | ERROR@[169; 170) | ||
146 | DOLLAR@[169; 170) | ||
147 | err: `expected SEMI` | ||
148 | EXPR_STMT@[170; 171) | ||
149 | PAREN_EXPR@[170; 171) | ||
150 | L_PAREN@[170; 171) | ||
151 | err: `expected expression` | ||
152 | err: `expected R_PAREN` | ||
153 | err: `expected SEMI` | ||
154 | err: `expected expression` | ||
155 | EXPR_STMT@[171; 172) | ||
156 | ERROR@[171; 172) | ||
157 | COMMA@[171; 172) | ||
158 | err: `expected SEMI` | ||
159 | err: `expected expression` | ||
160 | EXPR_STMT@[172; 173) | ||
161 | ERROR@[172; 173) | ||
162 | R_PAREN@[172; 173) | ||
163 | err: `expected SEMI` | ||
164 | EXPR_STMT@[173; 175) | ||
165 | PREFIX_EXPR@[173; 175) | ||
166 | STAR@[173; 174) | ||
167 | err: `expected expression` | ||
168 | ERROR@[174; 175) | ||
169 | R_BRACK@[174; 175) | ||
170 | err: `expected SEMI` | ||
171 | err: `expected expression` | ||
172 | EXPR_STMT@[175; 176) | ||
173 | ERROR@[175; 176) | ||
174 | COMMA@[175; 176) | ||
175 | err: `expected SEMI` | ||
176 | WHITESPACE@[176; 177) | ||
177 | EXPR_STMT@[177; 180) | ||
178 | ARRAY_EXPR@[177; 180) | ||
179 | L_BRACK@[177; 178) | ||
180 | err: `expected expression` | ||
181 | ERROR@[178; 179) | ||
182 | DOLLAR@[178; 179) | ||
183 | err: `expected COMMA` | ||
184 | PAREN_EXPR@[179; 180) | ||
185 | L_PAREN@[179; 180) | ||
186 | err: `expected expression` | ||
187 | err: `expected R_PAREN` | ||
188 | err: `expected COMMA` | ||
189 | err: `expected expression` | ||
190 | err: `expected R_BRACK` | ||
191 | err: `expected SEMI` | ||
192 | err: `expected expression` | ||
193 | EXPR_STMT@[180; 181) | ||
194 | ERROR@[180; 181) | ||
195 | DOLLAR@[180; 181) | ||
196 | err: `expected SEMI` | ||
197 | EXPR_STMT@[181; 187) | ||
198 | PATH_EXPR@[181; 187) | ||
199 | PATH@[181; 187) | ||
200 | PATH_SEGMENT@[181; 187) | ||
201 | NAME_REF@[181; 187) | ||
202 | IDENT@[181; 187) "output" | ||
203 | err: `expected SEMI` | ||
135 | err: `expected expression` | 204 | err: `expected expression` |
136 | ERROR@[174; 175) | 205 | EXPR_STMT@[187; 188) |
137 | R_BRACK@[174; 175) | 206 | ERROR@[187; 188) |
138 | COMMA@[175; 176) | 207 | COLON@[187; 188) |
139 | WHITESPACE@[176; 177) | 208 | err: `expected SEMI` |
140 | ARRAY_EXPR@[177; 202) | 209 | EXPR_STMT@[188; 192) |
141 | L_BRACK@[177; 178) | 210 | PATH_EXPR@[188; 192) |
211 | PATH@[188; 192) | ||
212 | PATH_SEGMENT@[188; 192) | ||
213 | NAME_REF@[188; 192) | ||
214 | IDENT@[188; 192) "expr" | ||
215 | err: `expected SEMI` | ||
142 | err: `expected expression` | 216 | err: `expected expression` |
143 | ERROR@[178; 179) | 217 | EXPR_STMT@[192; 193) |
144 | DOLLAR@[178; 179) | 218 | ERROR@[192; 193) |
145 | err: `expected COMMA` | 219 | R_PAREN@[192; 193) |
146 | TUPLE_EXPR@[179; 193) | 220 | err: `expected SEMI` |
147 | L_PAREN@[179; 180) | 221 | err: `expected expression` |
148 | err: `expected expression` | 222 | EXPR_STMT@[193; 194) |
149 | ERROR@[180; 181) | 223 | ERROR@[193; 194) |
150 | DOLLAR@[180; 181) | 224 | COMMA@[193; 194) |
151 | err: `expected COMMA` | 225 | err: `expected SEMI` |
152 | PATH_EXPR@[181; 187) | 226 | EXPR_STMT@[194; 197) |
153 | PATH@[181; 187) | 227 | PREFIX_EXPR@[194; 197) |
154 | PATH_SEGMENT@[181; 187) | 228 | STAR@[194; 195) |
155 | NAME_REF@[181; 187) | 229 | WHITESPACE@[195; 196) |
156 | IDENT@[181; 187) "output" | 230 | err: `expected expression` |
157 | err: `expected COMMA` | 231 | ERROR@[196; 197) |
158 | err: `expected expression` | 232 | DOLLAR@[196; 197) |
159 | ERROR@[187; 188) | 233 | err: `expected SEMI` |
160 | COLON@[187; 188) | 234 | EXPR_STMT@[197; 198) |
161 | err: `expected COMMA` | 235 | PAREN_EXPR@[197; 198) |
162 | PATH_EXPR@[188; 192) | 236 | L_PAREN@[197; 198) |
163 | PATH@[188; 192) | 237 | err: `expected expression` |
164 | PATH_SEGMENT@[188; 192) | 238 | err: `expected R_PAREN` |
165 | NAME_REF@[188; 192) | 239 | err: `expected SEMI` |
166 | IDENT@[188; 192) "expr" | 240 | err: `expected expression` |
167 | R_PAREN@[192; 193) | 241 | EXPR_STMT@[198; 199) |
168 | COMMA@[193; 194) | 242 | ERROR@[198; 199) |
169 | PREFIX_EXPR@[194; 197) | 243 | COMMA@[198; 199) |
170 | STAR@[194; 195) | 244 | err: `expected SEMI` |
171 | WHITESPACE@[195; 196) | 245 | err: `expected expression` |
172 | err: `expected expression` | 246 | EXPR_STMT@[199; 200) |
173 | ERROR@[196; 197) | 247 | ERROR@[199; 200) |
174 | DOLLAR@[196; 197) | 248 | R_PAREN@[199; 200) |
175 | err: `expected COMMA` | 249 | err: `expected SEMI` |
176 | BIN_EXPR@[197; 202) | 250 | EXPR_STMT@[200; 202) |
177 | PAREN_EXPR@[197; 200) | 251 | PREFIX_EXPR@[200; 202) |
178 | L_PAREN@[197; 198) | 252 | STAR@[200; 201) |
179 | err: `expected expression` | 253 | err: `expected expression` |
180 | ERROR@[198; 199) | 254 | ERROR@[201; 202) |
181 | COMMA@[198; 199) | 255 | R_BRACK@[201; 202) |
182 | R_PAREN@[199; 200) | ||
183 | STAR@[200; 201) | ||
184 | err: `expected expression` | ||
185 | ERROR@[201; 202) | ||
186 | R_BRACK@[201; 202) | ||
187 | err: `expected COMMA` | ||
188 | err: `expected expression` | ||
189 | err: `expected R_BRACK` | ||
190 | err: `expected COMMA` | ||
191 | err: `expected expression` | ||
192 | err: `expected R_BRACK` | ||
193 | R_PAREN@[202; 203) | ||
194 | err: `expected SEMI` | 256 | err: `expected SEMI` |
257 | err: `expected expression` | ||
258 | EXPR_STMT@[202; 203) | ||
259 | ERROR@[202; 203) | ||
260 | R_PAREN@[202; 203) | ||
261 | err: `expected SEMI` | ||
195 | WHITESPACE@[203; 204) | 262 | WHITESPACE@[203; 204) |
196 | BLOCK_EXPR@[204; 346) | 263 | BLOCK_EXPR@[204; 346) |
197 | BLOCK@[204; 346) | 264 | BLOCK@[204; 346) |