forked from argotorg/fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc.snap
More file actions
447 lines (447 loc) · 15 KB
/
Copy pathfunc.snap
File metadata and controls
447 lines (447 loc) · 15 KB
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
---
source: crates/parser/tests/syntax_node.rs
assertion_line: 15
expression: node
input_file: test_files/syntax_node/items/func.fe
---
Root@0..436
ItemList@0..435
Item@0..30
Func@0..30
PubKw@0..3 "pub"
WhiteSpace@3..4 " "
FnKw@4..6 "fn"
WhiteSpace@6..7 " "
FuncSignature@7..12
Ident@7..10 "foo"
FuncParamList@10..12
LParen@10..11 "("
RParen@11..12 ")"
WhiteSpace@12..13 " "
BlockExpr@13..30
LBrace@13..14 "{"
Newline@14..15 "\n"
WhiteSpace@15..19 " "
LetStmt@19..28
LetKw@19..22 "let"
WhiteSpace@22..23 " "
PathPat@23..24
Path@23..24
PathSegment@23..24
Ident@23..24 "x"
WhiteSpace@24..25 " "
Eq@25..26 "="
WhiteSpace@26..27 " "
LitExpr@27..28
Lit@27..28
Int@27..28 "1"
Newline@28..29 "\n"
RBrace@29..30 "}"
Newline@30..32 "\n\n"
Item@32..80
Func@32..80
FnKw@32..34 "fn"
WhiteSpace@34..35 " "
FuncSignature@35..70
Ident@35..38 "bar"
FuncParamList@38..63
LParen@38..39 "("
FnParam@39..47
Ident@39..42 "bar"
Colon@42..43 ":"
WhiteSpace@43..44 " "
PathType@44..47
Path@44..47
PathSegment@44..47
Ident@44..47 "i32"
Comma@47..48 ","
WhiteSpace@48..49 " "
FnParam@49..62
MutKw@49..52 "mut"
WhiteSpace@52..53 " "
Ident@53..56 "baz"
Colon@56..57 ":"
WhiteSpace@57..58 " "
PathType@58..62
Path@58..62
PathSegment@58..62
Ident@58..62 "u256"
RParen@62..63 ")"
WhiteSpace@63..64 " "
Arrow@64..66 "->"
WhiteSpace@66..67 " "
PathType@67..70
Path@67..70
PathSegment@67..70
Ident@67..70 "i32"
WhiteSpace@70..71 " "
BlockExpr@71..80
LBrace@71..72 "{"
Newline@72..73 "\n"
WhiteSpace@73..77 " "
ExprStmt@77..78
LitExpr@77..78
Lit@77..78
Int@77..78 "1"
Newline@78..79 "\n"
RBrace@79..80 "}"
Newline@80..82 "\n\n"
Item@82..161
Func@82..161
FnKw@82..84 "fn"
WhiteSpace@84..85 " "
FuncSignature@85..151
Ident@85..88 "baz"
FuncParamList@88..144
LParen@88..89 "("
FnParam@89..102
Ident@89..93 "from"
Colon@93..94 ":"
WhiteSpace@94..95 " "
PathType@95..102
Path@95..102
PathSegment@95..102
Ident@95..102 "address"
Comma@102..103 ","
WhiteSpace@103..104 " "
FnParam@104..119
MutKw@104..107 "mut"
WhiteSpace@107..108 " "
Ident@108..110 "to"
Colon@110..111 ":"
WhiteSpace@111..112 " "
PathType@112..119
Path@112..119
PathSegment@112..119
Ident@112..119 "address"
Comma@119..120 ","
WhiteSpace@120..121 " "
FnParam@121..132
Underscore@121..122 "_"
WhiteSpace@122..123 " "
Ident@123..126 "val"
Colon@126..127 ":"
WhiteSpace@127..128 " "
PathType@128..132
Path@128..132
PathSegment@128..132
Ident@128..132 "u256"
Comma@132..133 ","
WhiteSpace@133..134 " "
FnParam@134..143
Underscore@134..135 "_"
WhiteSpace@135..136 " "
Underscore@136..137 "_"
Colon@137..138 ":"
WhiteSpace@138..139 " "
PathType@139..143
Path@139..143
PathSegment@139..143
Ident@139..143 "u256"
RParen@143..144 ")"
WhiteSpace@144..145 " "
Arrow@145..147 "->"
WhiteSpace@147..148 " "
PathType@148..151
Path@148..151
PathSegment@148..151
Ident@148..151 "i32"
WhiteSpace@151..152 " "
BlockExpr@152..161
LBrace@152..153 "{"
Newline@153..154 "\n"
WhiteSpace@154..158 " "
ExprStmt@158..159
LitExpr@158..159
Lit@158..159
Int@158..159 "1"
Newline@159..160 "\n"
RBrace@160..161 "}"
Newline@161..163 "\n\n"
Item@163..279
Func@163..279
FnKw@163..165 "fn"
WhiteSpace@165..166 " "
FuncSignature@166..268
Ident@166..175 "generics1"
GenericParamList@175..188
Lt@175..176 "<"
TypeGenericParam@176..184
Ident@176..177 "T"
TypeBoundList@177..184
Colon@177..178 ":"
WhiteSpace@178..179 " "
TypeBound@179..184
TraitRef@179..184
Path@179..184
PathSegment@179..184
Ident@179..184 "Trait"
Comma@184..185 ","
WhiteSpace@185..186 " "
TypeGenericParam@186..187
Ident@186..187 "U"
Gt@187..188 ">"
FuncParamList@188..208
LParen@188..189 "("
FnParam@189..193
Ident@189..190 "t"
Colon@190..191 ":"
WhiteSpace@191..192 " "
PathType@192..193
Path@192..193
PathSegment@192..193
Ident@192..193 "T"
Comma@193..194 ","
WhiteSpace@194..195 " "
FnParam@195..207
Ident@195..196 "u"
Colon@196..197 ":"
WhiteSpace@197..198 " "
PathType@198..207
Path@198..207
PathSegment@198..207
Ident@198..204 "Option"
GenericArgList@204..207
Lt@204..205 "<"
TypeGenericArg@205..206
PathType@205..206
Path@205..206
PathSegment@205..206
Ident@205..206 "U"
Gt@206..207 ">"
RParen@207..208 ")"
WhiteSpace@208..209 " "
Arrow@209..211 "->"
WhiteSpace@211..212 " "
PathType@212..213
Path@212..213
PathSegment@212..213
Ident@212..213 "T"
Newline@213..214 "\n"
WhiteSpace@214..218 " "
WhereClause@218..268
WhereKw@218..223 "where"
WhiteSpace@223..224 " "
WherePredicate@224..240
PathType@224..233
Path@224..233
PathSegment@224..233
Ident@224..230 "Result"
GenericArgList@230..233
Lt@230..231 "<"
TypeGenericArg@231..232
PathType@231..232
Path@231..232
PathSegment@231..232
Ident@231..232 "T"
Gt@232..233 ">"
TypeBoundList@233..240
Colon@233..234 ":"
WhiteSpace@234..235 " "
TypeBound@235..240
TraitRef@235..240
Path@235..240
PathSegment@235..240
Ident@235..240 "Trait"
Comma@240..241 ","
Newline@241..242 "\n"
WhiteSpace@242..252 " "
WherePredicate@252..268
PathType@252..261
Path@252..261
PathSegment@252..261
Ident@252..258 "Option"
GenericArgList@258..261
Lt@258..259 "<"
TypeGenericArg@259..260
PathType@259..260
Path@259..260
PathSegment@259..260
Ident@259..260 "U"
Gt@260..261 ">"
TypeBoundList@261..268
Colon@261..262 ":"
WhiteSpace@262..263 " "
TypeBound@263..268
TraitRef@263..268
Path@263..268
PathSegment@263..268
Ident@263..268 "Clone"
Newline@268..270 "\n\n"
BlockExpr@270..279
LBrace@270..271 "{"
Newline@271..272 "\n"
WhiteSpace@272..276 " "
ExprStmt@276..277
PathExpr@276..277
Path@276..277
PathSegment@276..277
Ident@276..277 "t"
Newline@277..278 "\n"
RBrace@278..279 "}"
Newline@279..281 "\n\n"
Item@281..334
Func@281..334
FnKw@281..283 "fn"
WhiteSpace@283..284 " "
FuncSignature@284..331
Ident@284..288 "decl"
GenericParamList@288..294
Lt@288..289 "<"
TypeGenericParam@289..290
Ident@289..290 "T"
Comma@290..291 ","
WhiteSpace@291..292 " "
TypeGenericParam@292..293
Ident@292..293 "U"
Gt@293..294 ">"
FuncParamList@294..313
LParen@294..295 "("
FnParam@295..312
Ident@295..296 "t"
Colon@296..297 ":"
WhiteSpace@297..298 " "
PathType@298..312
Path@298..312
PathSegment@298..312
Ident@298..306 "MyStruct"
GenericArgList@306..312
Lt@306..307 "<"
TypeGenericArg@307..308
PathType@307..308
Path@307..308
PathSegment@307..308
Ident@307..308 "T"
Comma@308..309 ","
WhiteSpace@309..310 " "
TypeGenericArg@310..311
PathType@310..311
Path@310..311
PathSegment@310..311
Ident@310..311 "U"
Gt@311..312 ">"
RParen@312..313 ")"
WhiteSpace@313..314 " "
Arrow@314..316 "->"
WhiteSpace@316..317 " "
PathType@317..331
Path@317..331
PathSegment@317..331
Ident@317..323 "Result"
GenericArgList@323..331
Lt@323..324 "<"
TypeGenericArg@324..325
PathType@324..325
Path@324..325
PathSegment@324..325
Ident@324..325 "T"
Comma@325..326 ","
WhiteSpace@326..327 " "
TypeGenericArg@327..330
PathType@327..330
Path@327..330
PathSegment@327..330
Ident@327..330 "Err"
Gt@330..331 ">"
WhiteSpace@331..332 " "
BlockExpr@332..334
LBrace@332..333 "{"
RBrace@333..334 "}"
Newline@334..336 "\n\n"
Item@336..435
Func@336..435
FnKw@336..338 "fn"
WhiteSpace@338..339 " "
FuncSignature@339..383
Ident@339..340 "f"
GenericParamList@340..343
Lt@340..341 "<"
TypeGenericParam@341..342
Ident@341..342 "T"
Gt@342..343 ">"
FuncParamList@343..349
LParen@343..344 "("
FnParam@344..348
Underscore@344..345 "_"
Colon@345..346 ":"
WhiteSpace@346..347 " "
PathType@347..348
Path@347..348
PathSegment@347..348
Ident@347..348 "T"
RParen@348..349 ")"
Newline@349..350 "\n"
WhereClause@350..383
WhereKw@350..355 "where"
WhiteSpace@355..356 " "
WherePredicate@356..383
PathType@356..357
Path@356..357
PathSegment@356..357
Ident@356..357 "T"
TypeBoundList@357..383
Colon@357..358 ":"
WhiteSpace@358..359 " "
TypeBound@359..383
TraitRef@359..383
Path@359..383
PathSegment@359..383
Ident@359..371 "IntoIterator"
GenericArgList@371..383
Lt@371..372 "<"
AssocTypeGenericArg@372..382
Ident@372..376 "Item"
WhiteSpace@376..377 " "
Eq@377..378 "="
WhiteSpace@378..379 " "
PathType@379..382
Path@379..382
PathSegment@379..382
Ident@379..382 "i32"
Gt@382..383 ">"
WhiteSpace@383..384 " "
BlockExpr@384..435
LBrace@384..385 "{"
Newline@385..386 "\n"
WhiteSpace@386..390 " "
LetStmt@390..433
LetKw@390..393 "let"
WhiteSpace@393..394 " "
PathPat@394..395
Path@394..395
PathSegment@394..395
Ident@394..395 "x"
Colon@395..396 ":"
WhiteSpace@396..397 " "
PathType@397..428
Path@397..428
PathSegment@397..422
QualifiedType@397..422
Lt@397..398 "<"
PathType@398..409
Path@398..409
PathSegment@398..399
Ident@398..399 "T"
Colon2@399..401 "::"
PathSegment@401..409
Ident@401..409 "IntoIter"
WhiteSpace@409..410 " "
AsKw@410..412 "as"
WhiteSpace@412..413 " "
TraitRef@413..421
Path@413..421
PathSegment@413..421
Ident@413..421 "Iterator"
Gt@421..422 ">"
Colon2@422..424 "::"
PathSegment@424..428
Ident@424..428 "Item"
WhiteSpace@428..429 " "
Eq@429..430 "="
WhiteSpace@430..431 " "
LitExpr@431..433
Lit@431..433
Int@431..433 "10"
Newline@433..434 "\n"
RBrace@434..435 "}"
Newline@435..436 "\n"