FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/rust/schema/ast.py at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
489
(489)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
rust
/
schema
/
ast.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
829 lines (645 loc) · 22 KB
Breadcrumbs
codeql
/
rust
/
schema
/
ast.py
Copy path
File metadata and controls
829 lines (645 loc) · 22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# Generated by `ast-generator`, do not edit by hand.
from
.
prelude
import
*
class
TypeItem
(
AstNode
, ):
pass
class
AsmOperand
(
AstNode
, ):
pass
class
AsmPiece
(
AstNode
, ):
pass
class
AssocItem
(
AstNode
, ):
pass
class
CfgPredicate
(
AstNode
, ):
pass
class
Expr
(
AstNode
, ):
pass
class
ExternItem
(
AstNode
, ):
pass
class
FieldList
(
AstNode
, ):
pass
class
GenericArg
(
AstNode
, ):
pass
class
GenericParam
(
AstNode
, ):
pass
class
Meta
(
AstNode
, ):
pass
class
Pat
(
AstNode
, ):
pass
class
Stmt
(
AstNode
, ):
pass
class
TypeRepr
(
AstNode
, ):
pass
class
UseBoundGenericArg
(
AstNode
, ):
pass
class
Item
(
Stmt
, ):
pass
class
Abi
(
AstNode
, ):
abi_string
:
optional
[
string
]
class
ArgList
(
AstNode
, ):
args
:
list
[
"Expr"
]
|
child
class
ArrayExprInternal
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
exprs
:
list
[
"Expr"
]
|
child
is_semicolon
:
predicate
class
ArrayTypeRepr
(
TypeRepr
, ):
const_arg
:
optional
[
"ConstArg"
]
|
child
element_type_repr
:
optional
[
"TypeRepr"
]
|
child
class
AsmClobberAbi
(
AsmPiece
, ):
attrs
:
list
[
"Attr"
]
|
child
class
AsmConst
(
AsmOperand
, ):
expr
:
optional
[
"Expr"
]
|
child
is_const
:
predicate
class
AsmDirSpec
(
AstNode
, ):
pass
class
AsmExpr
(
Expr
,
Item
, ):
asm_pieces
:
list
[
"AsmPiece"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
template
:
list
[
"Expr"
]
|
child
class
AsmLabel
(
AsmOperand
, ):
block_expr
:
optional
[
"BlockExpr"
]
|
child
class
AsmOperandExpr
(
AstNode
, ):
in_expr
:
optional
[
"Expr"
]
|
child
out_expr
:
optional
[
"Expr"
]
|
child
class
AsmOperandNamed
(
AsmPiece
, ):
asm_operand
:
optional
[
"AsmOperand"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
name
:
optional
[
"Name"
]
|
child
class
AsmOption
(
AstNode
, ):
is_raw
:
predicate
class
AsmOptionsList
(
AsmPiece
, ):
asm_options
:
list
[
"AsmOption"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
class
AsmRegOperand
(
AsmOperand
, ):
asm_dir_spec
:
optional
[
"AsmDirSpec"
]
|
child
asm_operand_expr
:
optional
[
"AsmOperandExpr"
]
|
child
asm_reg_spec
:
optional
[
"AsmRegSpec"
]
|
child
class
AsmRegSpec
(
AstNode
, ):
identifier
:
optional
[
"NameRef"
]
|
child
class
AsmSym
(
AsmOperand
, ):
path
:
optional
[
"Path"
]
|
child
class
AssocItemList
(
AstNode
, ):
assoc_items
:
list
[
"AssocItem"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
class
AssocTypeArg
(
GenericArg
, ):
const_arg
:
optional
[
"ConstArg"
]
|
child
generic_arg_list
:
optional
[
"GenericArgList"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
param_list
:
optional
[
"ParamList"
]
|
child
ret_type
:
optional
[
"RetTypeRepr"
]
|
child
return_type_syntax
:
optional
[
"ReturnTypeSyntax"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
Attr
(
AstNode
, ):
meta
:
optional
[
"Meta"
]
|
child
class
AwaitExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
BecomeExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
BinaryExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
lhs
:
optional
[
"Expr"
]
|
child
operator_name
:
optional
[
string
]
rhs
:
optional
[
"Expr"
]
|
child
class
BlockExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
is_async
:
predicate
is_const
:
predicate
is_gen
:
predicate
is_move
:
predicate
is_unsafe
:
predicate
label
:
optional
[
"Label"
]
|
child
stmt_list
:
optional
[
"StmtList"
]
|
child
try_block_modifier
:
optional
[
"TryBlockModifier"
]
|
child
class
BoxPat
(
Pat
, ):
pat
:
optional
[
"Pat"
]
|
child
class
BreakExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
lifetime
:
optional
[
"Lifetime"
]
|
child
class
CallExpr
(
Expr
, ):
arg_list
:
optional
[
"ArgList"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
function
:
optional
[
"Expr"
]
|
child
class
CastExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
CfgAtom
(
CfgPredicate
, ):
pass
class
CfgAttrMeta
(
Meta
, ):
cfg_predicate
:
optional
[
"CfgPredicate"
]
|
child
metas
:
list
[
"Meta"
]
|
child
class
CfgComposite
(
CfgPredicate
, ):
cfg_predicates
:
list
[
"CfgPredicate"
]
|
child
class
CfgMeta
(
Meta
, ):
cfg_predicate
:
optional
[
"CfgPredicate"
]
|
child
class
ClosureExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
closure_body
:
optional
[
"Expr"
]
|
child
for_binder
:
optional
[
"ForBinder"
]
|
child
is_async
:
predicate
is_const
:
predicate
is_gen
:
predicate
is_move
:
predicate
is_static
:
predicate
param_list
:
optional
[
"ParamList"
]
|
child
ret_type
:
optional
[
"RetTypeRepr"
]
|
child
class
Const
(
AssocItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
body
:
optional
[
"Expr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
is_const
:
predicate
is_default
:
predicate
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
ConstArg
(
GenericArg
, ):
expr
:
optional
[
"Expr"
]
|
child
class
ConstBlockPat
(
Pat
, ):
block_expr
:
optional
[
"BlockExpr"
]
|
child
is_const
:
predicate
class
ConstParam
(
GenericParam
, ):
attrs
:
list
[
"Attr"
]
|
child
default_val
:
optional
[
"ConstArg"
]
|
child
is_const
:
predicate
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
ContinueExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
lifetime
:
optional
[
"Lifetime"
]
|
child
class
DerefPat
(
Pat
, ):
pat
:
optional
[
"Pat"
]
|
child
class
DynTraitTypeRepr
(
TypeRepr
, ):
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
Enum
(
TypeItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
name
:
optional
[
"Name"
]
|
child
variant_list
:
optional
[
"VariantList"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
ExprStmt
(
Stmt
, ):
expr
:
optional
[
"Expr"
]
|
child
class
ExternBlock
(
Item
, ):
abi
:
optional
[
"Abi"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
extern_item_list
:
optional
[
"ExternItemList"
]
|
child
is_unsafe
:
predicate
class
ExternCrate
(
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
rename
:
optional
[
"Rename"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
ExternItemList
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
extern_items
:
list
[
"ExternItem"
]
|
child
class
FieldExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
container
:
optional
[
"Expr"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
class
Function
(
AssocItem
,
ExternItem
,
Item
, ):
abi
:
optional
[
"Abi"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
function_body
:
optional
[
"BlockExpr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
is_async
:
predicate
is_const
:
predicate
is_default
:
predicate
is_gen
:
predicate
is_unsafe
:
predicate
name
:
optional
[
"Name"
]
|
child
param_list
:
optional
[
"ParamList"
]
|
child
ret_type
:
optional
[
"RetTypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
FnPtrTypeRepr
(
TypeRepr
, ):
abi
:
optional
[
"Abi"
]
|
child
is_async
:
predicate
is_const
:
predicate
is_unsafe
:
predicate
param_list
:
optional
[
"ParamList"
]
|
child
ret_type
:
optional
[
"RetTypeRepr"
]
|
child
class
ForBinder
(
AstNode
, ):
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
class
ForExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
iterable
:
optional
[
"Expr"
]
|
child
label
:
optional
[
"Label"
]
|
child
loop_body
:
optional
[
"BlockExpr"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
class
ForTypeRepr
(
TypeRepr
, ):
for_binder
:
optional
[
"ForBinder"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
FormatArgsArg
(
AstNode
, ):
expr
:
optional
[
"Expr"
]
|
child
name
:
optional
[
"Name"
]
|
child
class
FormatArgsExpr
(
Expr
, ):
args
:
list
[
"FormatArgsArg"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
template
:
optional
[
"Expr"
]
|
child
class
GenericArgList
(
AstNode
, ):
generic_args
:
list
[
"GenericArg"
]
|
child
class
GenericParamList
(
AstNode
, ):
generic_params
:
list
[
"GenericParam"
]
|
child
class
IdentPat
(
Pat
, ):
attrs
:
list
[
"Attr"
]
|
child
is_mut
:
predicate
is_ref
:
predicate
name
:
optional
[
"Name"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
class
IfExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
condition
:
optional
[
"Expr"
]
|
child
else_
:
optional
[
"Expr"
]
|
child
then
:
optional
[
"BlockExpr"
]
|
child
class
Impl
(
Item
, ):
assoc_item_list
:
optional
[
"AssocItemList"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
is_const
:
predicate
is_default
:
predicate
is_unsafe
:
predicate
self_ty
:
optional
[
"TypeRepr"
]
|
child
trait_ty
:
optional
[
"TypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
ImplRestriction
(
AstNode
, ):
visibility_inner
:
optional
[
"VisibilityInner"
]
|
child
class
ImplTraitTypeRepr
(
TypeRepr
, ):
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
IncludeBytesExpr
(
Expr
, ):
pass
class
IndexExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
base
:
optional
[
"Expr"
]
|
child
index
:
optional
[
"Expr"
]
|
child
class
InferTypeRepr
(
TypeRepr
, ):
pass
class
ItemList
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
items
:
list
[
"Item"
]
|
child
class
KeyValueMeta
(
Meta
, ):
expr
:
optional
[
"Expr"
]
|
child
path
:
optional
[
"Path"
]
|
child
class
Label
(
AstNode
, ):
lifetime
:
optional
[
"Lifetime"
]
|
child
class
LetElse
(
AstNode
, ):
block_expr
:
optional
[
"BlockExpr"
]
|
child
class
LetExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
scrutinee
:
optional
[
"Expr"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
class
LetStmt
(
Stmt
, ):
attrs
:
list
[
"Attr"
]
|
child
initializer
:
optional
[
"Expr"
]
|
child
let_else
:
optional
[
"LetElse"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
Lifetime
(
UseBoundGenericArg
, ):
text
:
optional
[
string
]
class
LifetimeArg
(
GenericArg
, ):
lifetime
:
optional
[
"Lifetime"
]
|
child
class
LifetimeParam
(
GenericParam
, ):
attrs
:
list
[
"Attr"
]
|
child
lifetime
:
optional
[
"Lifetime"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
LiteralExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
text_value
:
optional
[
string
]
class
LiteralPat
(
Pat
, ):
literal
:
optional
[
"LiteralExpr"
]
|
child
class
LoopExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
label
:
optional
[
"Label"
]
|
child
loop_body
:
optional
[
"BlockExpr"
]
|
child
class
MacroCall
(
AssocItem
,
ExternItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
path
:
optional
[
"Path"
]
|
child
token_tree
:
optional
[
"TokenTree"
]
|
child
class
MacroDef
(
Item
, ):
args
:
optional
[
"TokenTree"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
body
:
optional
[
"TokenTree"
]
|
child
name
:
optional
[
"Name"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
MacroExpr
(
Expr
, ):
macro_call
:
optional
[
"MacroCall"
]
|
child
class
MacroItems
(
AstNode
, ):
items
:
list
[
"Item"
]
|
child
class
MacroPat
(
Pat
, ):
macro_call
:
optional
[
"MacroCall"
]
|
child
class
MacroRules
(
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
name
:
optional
[
"Name"
]
|
child
token_tree
:
optional
[
"TokenTree"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
MacroTypeRepr
(
TypeRepr
, ):
macro_call
:
optional
[
"MacroCall"
]
|
child
class
MatchArm
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
guard
:
optional
[
"MatchGuard"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
class
MatchArmList
(
AstNode
, ):
arms
:
list
[
"MatchArm"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
class
MatchExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
scrutinee
:
optional
[
"Expr"
]
|
child
match_arm_list
:
optional
[
"MatchArmList"
]
|
child
class
MatchGuard
(
AstNode
, ):
condition
:
optional
[
"Expr"
]
|
child
class
MethodCallExpr
(
Expr
, ):
arg_list
:
optional
[
"ArgList"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
generic_arg_list
:
optional
[
"GenericArgList"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
receiver
:
optional
[
"Expr"
]
|
child
class
Module
(
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
item_list
:
optional
[
"ItemList"
]
|
child
name
:
optional
[
"Name"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
MutRestriction
(
AstNode
, ):
is_mut
:
predicate
visibility_inner
:
optional
[
"VisibilityInner"
]
|
child
class
Name
(
AstNode
, ):
text
:
optional
[
string
]
class
NameRef
(
UseBoundGenericArg
, ):
text
:
optional
[
string
]
class
NeverTypeRepr
(
TypeRepr
, ):
pass
class
NotNull
(
Pat
, ):
pass
class
OffsetOfExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
fields
:
list
[
"NameRef"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
OrPat
(
Pat
, ):
pats
:
list
[
"Pat"
]
|
child
class
Param
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
ParamList
(
AstNode
, ):
params
:
list
[
"Param"
]
|
child
self_param
:
optional
[
"SelfParam"
]
|
child
class
ParenExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
ParenPat
(
Pat
, ):
pat
:
optional
[
"Pat"
]
|
child
class
ParenTypeRepr
(
TypeRepr
, ):
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
ParenthesizedArgList
(
AstNode
, ):
type_args
:
list
[
"TypeArg"
]
|
child
class
Path
(
AstNode
, ):
qualifier
:
optional
[
"Path"
]
|
child
segment
:
optional
[
"PathSegment"
]
|
child
class
PathExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
path
:
optional
[
"Path"
]
|
child
class
PathMeta
(
Meta
, ):
path
:
optional
[
"Path"
]
|
child
class
PathPat
(
Pat
, ):
path
:
optional
[
"Path"
]
|
child
class
PathSegment
(
AstNode
, ):
generic_arg_list
:
optional
[
"GenericArgList"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
parenthesized_arg_list
:
optional
[
"ParenthesizedArgList"
]
|
child
ret_type
:
optional
[
"RetTypeRepr"
]
|
child
return_type_syntax
:
optional
[
"ReturnTypeSyntax"
]
|
child
class
PathTypeRepr
(
TypeRepr
, ):
path
:
optional
[
"Path"
]
|
child
class
PatternTypeRepr
(
TypeRepr
, ):
pat
:
optional
[
"Pat"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
PrefixExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
operator_name
:
optional
[
string
]
class
PtrTypeRepr
(
TypeRepr
, ):
is_const
:
predicate
is_mut
:
predicate
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
RangeExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
end
:
optional
[
"Expr"
]
|
child
operator_name
:
optional
[
string
]
start
:
optional
[
"Expr"
]
|
child
class
RangePat
(
Pat
, ):
end
:
optional
[
"Pat"
]
|
child
operator_name
:
optional
[
string
]
start
:
optional
[
"Pat"
]
|
child
class
StructExpr
(
Expr
, ):
path
:
optional
[
"Path"
]
|
child
struct_expr_field_list
:
optional
[
"StructExprFieldList"
]
|
child
class
StructExprField
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
class
StructExprFieldList
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
fields
:
list
[
"StructExprField"
]
|
child
spread
:
optional
[
"Expr"
]
|
child
class
StructField
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
default_val
:
optional
[
"ConstArg"
]
|
child
is_unsafe
:
predicate
mut_restriction
:
optional
[
"MutRestriction"
]
|
child
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
StructFieldList
(
FieldList
, ):
fields
:
list
[
"StructField"
]
|
child
class
StructPat
(
Pat
, ):
path
:
optional
[
"Path"
]
|
child
struct_pat_field_list
:
optional
[
"StructPatFieldList"
]
|
child
class
StructPatField
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
identifier
:
optional
[
"NameRef"
]
|
child
pat
:
optional
[
"Pat"
]
|
child
class
StructPatFieldList
(
AstNode
, ):
fields
:
list
[
"StructPatField"
]
|
child
rest_pat
:
optional
[
"RestPat"
]
|
child
class
RefExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
is_const
:
predicate
is_mut
:
predicate
is_raw
:
predicate
class
RefPat
(
Pat
, ):
is_mut
:
predicate
pat
:
optional
[
"Pat"
]
|
child
class
RefTypeRepr
(
TypeRepr
, ):
is_mut
:
predicate
lifetime
:
optional
[
"Lifetime"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
Rename
(
AstNode
, ):
name
:
optional
[
"Name"
]
|
child
class
RestPat
(
Pat
, ):
attrs
:
list
[
"Attr"
]
|
child
class
RetTypeRepr
(
AstNode
, ):
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
ReturnExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
ReturnTypeSyntax
(
AstNode
, ):
pass
class
SelfParam
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
is_ref
:
predicate
is_mut
:
predicate
lifetime
:
optional
[
"Lifetime"
]
|
child
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
SlicePat
(
Pat
, ):
pats
:
list
[
"Pat"
]
|
child
class
SliceTypeRepr
(
TypeRepr
, ):
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
SourceFile
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
items
:
list
[
"Item"
]
|
child
class
Static
(
ExternItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
body
:
optional
[
"Expr"
]
|
child
is_mut
:
predicate
is_static
:
predicate
is_unsafe
:
predicate
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
StmtList
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
statements
:
list
[
"Stmt"
]
|
child
tail_expr
:
optional
[
"Expr"
]
|
child
class
Struct
(
TypeItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
field_list
:
optional
[
"FieldList"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
name
:
optional
[
"Name"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
TokenTree
(
AstNode
, ):
pass
class
TokenTreeMeta
(
Meta
, ):
path
:
optional
[
"Path"
]
|
child
token_tree
:
optional
[
"TokenTree"
]
|
child
class
Trait
(
Item
, ):
assoc_item_list
:
optional
[
"AssocItemList"
]
|
child
attrs
:
list
[
"Attr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
impl_restriction
:
optional
[
"ImplRestriction"
]
|
child
is_auto
:
predicate
is_unsafe
:
predicate
name
:
optional
[
"Name"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
TryBlockModifier
(
AstNode
, ):
is_try
:
predicate
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
TryExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
TupleExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
fields
:
list
[
"Expr"
]
|
child
class
TupleField
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
mut_restriction
:
optional
[
"MutRestriction"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
TupleFieldList
(
FieldList
, ):
fields
:
list
[
"TupleField"
]
|
child
class
TuplePat
(
Pat
, ):
fields
:
list
[
"Pat"
]
|
child
class
TupleStructPat
(
Pat
, ):
fields
:
list
[
"Pat"
]
|
child
path
:
optional
[
"Path"
]
|
child
class
TupleTypeRepr
(
TypeRepr
, ):
fields
:
list
[
"TypeRepr"
]
|
child
class
TypeAlias
(
AssocItem
,
ExternItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
is_default
:
predicate
name
:
optional
[
"Name"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
TypeArg
(
GenericArg
, ):
type_repr
:
optional
[
"TypeRepr"
]
|
child
class
TypeBound
(
AstNode
, ):
for_binder
:
optional
[
"ForBinder"
]
|
child
is_async
:
predicate
is_const
:
predicate
lifetime
:
optional
[
"Lifetime"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
use_bound_generic_args
:
optional
[
"UseBoundGenericArgs"
]
|
child
class
TypeBoundList
(
AstNode
, ):
bounds
:
list
[
"TypeBound"
]
|
child
class
TypeParam
(
GenericParam
, ):
attrs
:
list
[
"Attr"
]
|
child
default_type
:
optional
[
"TypeRepr"
]
|
child
name
:
optional
[
"Name"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
UnderscoreExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
class
Union
(
TypeItem
,
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
generic_param_list
:
optional
[
"GenericParamList"
]
|
child
name
:
optional
[
"Name"
]
|
child
struct_field_list
:
optional
[
"StructFieldList"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
where_clause
:
optional
[
"WhereClause"
]
|
child
class
UnsafeMeta
(
Meta
, ):
is_unsafe
:
predicate
meta
:
optional
[
"Meta"
]
|
child
class
Use
(
Item
, ):
attrs
:
list
[
"Attr"
]
|
child
use_tree
:
optional
[
"UseTree"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
UseBoundGenericArgs
(
AstNode
, ):
use_bound_generic_args
:
list
[
"UseBoundGenericArg"
]
|
child
class
UseTree
(
AstNode
, ):
is_glob
:
predicate
path
:
optional
[
"Path"
]
|
child
rename
:
optional
[
"Rename"
]
|
child
use_tree_list
:
optional
[
"UseTreeList"
]
|
child
class
UseTreeList
(
AstNode
, ):
use_trees
:
list
[
"UseTree"
]
|
child
class
Variant
(
AstNode
, ):
attrs
:
list
[
"Attr"
]
|
child
const_arg
:
optional
[
"ConstArg"
]
|
child
field_list
:
optional
[
"FieldList"
]
|
child
name
:
optional
[
"Name"
]
|
child
visibility
:
optional
[
"Visibility"
]
|
child
class
VariantList
(
AstNode
, ):
variants
:
list
[
"Variant"
]
|
child
class
Visibility
(
AstNode
, ):
visibility_inner
:
optional
[
"VisibilityInner"
]
|
child
class
VisibilityInner
(
AstNode
, ):
path
:
optional
[
"Path"
]
|
child
class
WhereClause
(
AstNode
, ):
predicates
:
list
[
"WherePred"
]
|
child
class
WherePred
(
AstNode
, ):
for_binder
:
optional
[
"ForBinder"
]
|
child
lifetime
:
optional
[
"Lifetime"
]
|
child
type_repr
:
optional
[
"TypeRepr"
]
|
child
type_bound_list
:
optional
[
"TypeBoundList"
]
|
child
class
WhileExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
condition
:
optional
[
"Expr"
]
|
child
label
:
optional
[
"Label"
]
|
child
loop_body
:
optional
[
"BlockExpr"
]
|
child
class
WildcardPat
(
Pat
, ):
pass
class
YeetExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
class
YieldExpr
(
Expr
, ):
attrs
:
list
[
"Attr"
]
|
child
expr
:
optional
[
"Expr"
]
|
child
Back
|
FazBrowse Home
|
New Git URL