-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathAstGenerated.qll
More file actions
2095 lines (1531 loc) · 75.7 KB
/
AstGenerated.qll
File metadata and controls
2095 lines (1531 loc) · 75.7 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
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
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* This library file is auto-generated by 'semmle/query_gen.py'.
* WARNING: Any modifications to this file will be lost.
* Relations can be changed by modifying master.py.
*/
overlay[local]
module;
import python
/** INTERNAL: See the class `Add` for further information. */
class Add_ extends @py_Add, Operator {
override string toString() { result = "Add" }
}
/** INTERNAL: See the class `And` for further information. */
class And_ extends @py_And, Boolop {
override string toString() { result = "And" }
}
/** INTERNAL: See the class `AnnAssign` for further information. */
class AnnAssign_ extends @py_AnnAssign, Stmt {
/** Gets the value of this annotated assignment. */
Expr getValue() { py_exprs(result, _, this, 1) }
/** Gets the annotation of this annotated assignment. */
Expr getAnnotation() { py_exprs(result, _, this, 2) }
/** Gets the target of this annotated assignment. */
Expr getTarget() { py_exprs(result, _, this, 3) }
override string toString() { result = "AnnAssign" }
}
/** INTERNAL: See the class `Assert` for further information. */
class Assert_ extends @py_Assert, Stmt {
/** Gets the value being tested of this assert statement. */
Expr getTest() { py_exprs(result, _, this, 1) }
/** Gets the failure message of this assert statement. */
Expr getMsg() { py_exprs(result, _, this, 2) }
override string toString() { result = "Assert" }
}
/** INTERNAL: See the class `Assign` for further information. */
class Assign_ extends @py_Assign, Stmt {
/** Gets the value of this assignment statement. */
Expr getValue() { py_exprs(result, _, this, 1) }
/** Gets the targets of this assignment statement. */
ExprList getTargets() { py_expr_lists(result, this, 2) }
/** Gets the nth target of this assignment statement. */
Expr getTarget(int index) { result = this.getTargets().getItem(index) }
/** Gets a target of this assignment statement. */
Expr getATarget() { result = this.getTargets().getAnItem() }
override string toString() { result = "Assign" }
}
/** INTERNAL: See the class `AssignExpr` for further information. */
class AssignExpr_ extends @py_AssignExpr, Expr {
/** Gets the value of this assignment expression. */
Expr getValue() { py_exprs(result, _, this, 2) }
/** Gets the target of this assignment expression. */
Expr getTarget() { py_exprs(result, _, this, 3) }
override string toString() { result = "AssignExpr" }
}
/** INTERNAL: See the class `Attribute` for further information. */
class Attribute_ extends @py_Attribute, Expr {
/** Gets the object of this attribute expression. */
Expr getValue() { py_exprs(result, _, this, 2) }
/** Gets the attribute name of this attribute expression. */
string getAttr() { py_strs(result, this, 3) }
/** Gets the context of this attribute expression. */
ExprContext getCtx() { py_expr_contexts(result, _, this) }
override string toString() { result = "Attribute" }
}
/** INTERNAL: See the class `AugAssign` for further information. */
class AugAssign_ extends @py_AugAssign, Stmt {
/** Gets the operation of this augmented assignment statement. */
BinaryExpr getOperation() { py_exprs(result, _, this, 1) }
override string toString() { result = "AugAssign" }
}
/** INTERNAL: See the class `AugLoad` for further information. */
class AugLoad_ extends @py_AugLoad, ExprContext {
override string toString() { result = "AugLoad" }
}
/** INTERNAL: See the class `AugStore` for further information. */
class AugStore_ extends @py_AugStore, ExprContext {
override string toString() { result = "AugStore" }
}
/** INTERNAL: See the class `Await` for further information. */
class Await_ extends @py_Await, Expr {
/** Gets the expression waited upon of this await expression. */
Expr getValue() { py_exprs(result, _, this, 2) }
override string toString() { result = "Await" }
}
/** INTERNAL: See the class `BinaryExpr` for further information. */
class BinaryExpr_ extends @py_BinaryExpr, Expr {
/** Gets the left sub-expression of this binary expression. */
Expr getLeft() { py_exprs(result, _, this, 2) }
/** Gets the operator of this binary expression. */
Operator getOp() { py_operators(result, _, this) }
/** Gets the right sub-expression of this binary expression. */
Expr getRight() { py_exprs(result, _, this, 4) }
override ExprParent getParent() { py_exprs(this, _, result, _) }
override string toString() { result = "BinaryExpr" }
}
/** INTERNAL: See the class `BitAnd` for further information. */
class BitAnd_ extends @py_BitAnd, Operator {
override string toString() { result = "BitAnd" }
}
/** INTERNAL: See the class `BitOr` for further information. */
class BitOr_ extends @py_BitOr, Operator {
override string toString() { result = "BitOr" }
}
/** INTERNAL: See the class `BitXor` for further information. */
class BitXor_ extends @py_BitXor, Operator {
override string toString() { result = "BitXor" }
}
/** INTERNAL: See the class `BoolExpr` for further information. */
class BoolExpr_ extends @py_BoolExpr, Expr {
/** Gets the operator of this boolean expression. */
Boolop getOp() { py_boolops(result, _, this) }
/** Gets the sub-expressions of this boolean expression. */
ExprList getValues() { py_expr_lists(result, this, 3) }
/** Gets the nth sub-expression of this boolean expression. */
Expr getValue(int index) { result = this.getValues().getItem(index) }
/** Gets a sub-expression of this boolean expression. */
Expr getAValue() { result = this.getValues().getAnItem() }
override string toString() { result = "BoolExpr" }
}
/** INTERNAL: See the class `Break` for further information. */
class Break_ extends @py_Break, Stmt {
override string toString() { result = "Break" }
}
/** INTERNAL: See the class `Bytes` for further information. */
class Bytes_ extends @py_Bytes, Expr {
/** Gets the value of this bytes expression. */
string getS() { py_bytes(result, this, 2) }
/** Gets the prefix of this bytes expression. */
string getPrefix() { py_bytes(result, this, 3) }
/** Gets the implicitly_concatenated_parts of this bytes expression. */
StringPartList getImplicitlyConcatenatedParts() { py_StringPart_lists(result, this) }
/** Gets the nth implicitly_concatenated_part of this bytes expression. */
StringPart getImplicitlyConcatenatedPart(int index) {
result = this.getImplicitlyConcatenatedParts().getItem(index)
}
/** Gets an implicitly_concatenated_part of this bytes expression. */
StringPart getAnImplicitlyConcatenatedPart() {
result = this.getImplicitlyConcatenatedParts().getAnItem()
}
override string toString() { result = "Bytes" }
}
/** INTERNAL: See the class `BytesOrStr` for further information. */
class BytesOrStr_ extends @py_Bytes_or_Str {
/** Gets a textual representation of this element. */
string toString() { result = "BytesOrStr" }
}
/** INTERNAL: See the class `Call` for further information. */
class Call_ extends @py_Call, Expr {
/** Gets the callable of this call expression. */
Expr getFunc() { py_exprs(result, _, this, 2) }
/** Gets the positional arguments of this call expression. */
ExprList getPositionalArgs() { py_expr_lists(result, this, 3) }
/** Gets the nth positional argument of this call expression. */
Expr getPositionalArg(int index) { result = this.getPositionalArgs().getItem(index) }
/** Gets a positional argument of this call expression. */
Expr getAPositionalArg() { result = this.getPositionalArgs().getAnItem() }
/** Gets the named arguments of this call expression. */
DictItemList getNamedArgs() { py_dict_item_lists(result, this) }
/** Gets the nth named argument of this call expression. */
DictItem getNamedArg(int index) { result = this.getNamedArgs().getItem(index) }
/** Gets a named argument of this call expression. */
DictItem getANamedArg() { result = this.getNamedArgs().getAnItem() }
override string toString() { result = "Call" }
}
/** INTERNAL: See the class `Case` for further information. */
class Case_ extends @py_Case, Stmt {
/** Gets the pattern of this case statement. */
Pattern getPattern() { py_patterns(result, _, this, 1) }
/** Gets the guard of this case statement. */
Expr getGuard() { py_exprs(result, _, this, 2) }
/** Gets the body of this case statement. */
StmtList getBody() { py_stmt_lists(result, this, 3) }
/** Gets the nth statement of this case statement. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this case statement. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
override string toString() { result = "Case" }
}
/** INTERNAL: See the class `Class` for further information. */
class Class_ extends @py_Class {
/** Gets the name of this class. */
string getName() { py_strs(result, this, 0) }
/** Gets the body of this class. */
StmtList getBody() { py_stmt_lists(result, this, 1) }
/** Gets the nth statement of this class. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this class. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
/** Gets a parent of this class */
ClassExpr getParent() { py_Classes(this, result) }
/** Gets a textual representation of this element. */
string toString() { result = "Class" }
}
/** INTERNAL: See the class `ClassExpr` for further information. */
class ClassExpr_ extends @py_ClassExpr, Expr {
/** Gets the name of this class definition. */
string getName() { py_strs(result, this, 2) }
/** Gets the bases of this class definition. */
ExprList getBases() { py_expr_lists(result, this, 3) }
/** Gets the nth base of this class definition. */
Expr getBase(int index) { result = this.getBases().getItem(index) }
/** Gets a base of this class definition. */
Expr getABase() { result = this.getBases().getAnItem() }
/** Gets the keyword arguments of this class definition. */
DictItemList getKeywords() { py_dict_item_lists(result, this) }
/** Gets the nth keyword argument of this class definition. */
DictItem getKeyword(int index) { result = this.getKeywords().getItem(index) }
/** Gets a keyword argument of this class definition. */
DictItem getAKeyword() { result = this.getKeywords().getAnItem() }
/** Gets the class scope of this class definition. */
Class getInnerScope() { py_Classes(result, this) }
/** Gets the type parameters of this class definition. */
TypeParameterList getTypeParameters() { py_type_parameter_lists(result, this) }
/** Gets the nth type parameter of this class definition. */
TypeParameter getTypeParameter(int index) { result = this.getTypeParameters().getItem(index) }
/** Gets a type parameter of this class definition. */
TypeParameter getATypeParameter() { result = this.getTypeParameters().getAnItem() }
override string toString() { result = "ClassExpr" }
}
/** INTERNAL: See the class `Compare` for further information. */
class Compare_ extends @py_Compare, Expr {
/** Gets the left sub-expression of this compare expression. */
Expr getLeft() { py_exprs(result, _, this, 2) }
/** Gets the comparison operators of this compare expression. */
CmpopList getOps() { py_cmpop_lists(result, this) }
/** Gets the nth comparison operator of this compare expression. */
Cmpop getOp(int index) { result = this.getOps().getItem(index) }
/** Gets a comparison operator of this compare expression. */
Cmpop getAnOp() { result = this.getOps().getAnItem() }
/** Gets the right sub-expressions of this compare expression. */
ExprList getComparators() { py_expr_lists(result, this, 4) }
/** Gets the nth right sub-expression of this compare expression. */
Expr getComparator(int index) { result = this.getComparators().getItem(index) }
/** Gets a right sub-expression of this compare expression. */
Expr getAComparator() { result = this.getComparators().getAnItem() }
override string toString() { result = "Compare" }
}
/** INTERNAL: See the class `Continue` for further information. */
class Continue_ extends @py_Continue, Stmt {
override string toString() { result = "Continue" }
}
/** INTERNAL: See the class `Del` for further information. */
class Del_ extends @py_Del, ExprContext {
override string toString() { result = "Del" }
}
/** INTERNAL: See the class `Delete` for further information. */
class Delete_ extends @py_Delete, Stmt {
/** Gets the targets of this delete statement. */
ExprList getTargets() { py_expr_lists(result, this, 1) }
/** Gets the nth target of this delete statement. */
Expr getTarget(int index) { result = this.getTargets().getItem(index) }
/** Gets a target of this delete statement. */
Expr getATarget() { result = this.getTargets().getAnItem() }
override string toString() { result = "Delete" }
}
/** INTERNAL: See the class `Dict` for further information. */
class Dict_ extends @py_Dict, Expr {
/** Gets the items of this dictionary expression. */
DictItemList getItems() { py_dict_item_lists(result, this) }
/** Gets the nth item of this dictionary expression. */
DictItem getItem(int index) { result = this.getItems().getItem(index) }
/** Gets an item of this dictionary expression. */
DictItem getAnItem() { result = this.getItems().getAnItem() }
override string toString() { result = "Dict" }
}
/** INTERNAL: See the class `DictComp` for further information. */
class DictComp_ extends @py_DictComp, Expr {
/** Gets the implementation of this dictionary comprehension. */
Function getFunction() { py_Functions(result, this) }
/** Gets the iterable of this dictionary comprehension. */
Expr getIterable() { py_exprs(result, _, this, 3) }
override string toString() { result = "DictComp" }
}
/** INTERNAL: See the class `DictUnpacking` for further information. */
class DictUnpacking_ extends @py_DictUnpacking, DictItem {
/** Gets the location of this dictionary unpacking. */
override Location getLocation() { py_locations(result, this) }
/** Gets the value of this dictionary unpacking. */
Expr getValue() { py_exprs(result, _, this, 1) }
override string toString() { result = "DictUnpacking" }
}
/** INTERNAL: See the class `Div` for further information. */
class Div_ extends @py_Div, Operator {
override string toString() { result = "Div" }
}
/** INTERNAL: See the class `Ellipsis` for further information. */
class Ellipsis_ extends @py_Ellipsis, Expr {
override string toString() { result = "Ellipsis" }
}
/** INTERNAL: See the class `Eq` for further information. */
class Eq_ extends @py_Eq, Cmpop {
override string toString() { result = "Eq" }
}
/** INTERNAL: See the class `ExceptGroupStmt` for further information. */
class ExceptGroupStmt_ extends @py_ExceptGroupStmt, Stmt {
/** Gets the type of this except group block. */
Expr getType() { py_exprs(result, _, this, 1) }
/** Gets the name of this except group block. */
Expr getName() { py_exprs(result, _, this, 2) }
/** Gets the body of this except group block. */
StmtList getBody() { py_stmt_lists(result, this, 3) }
/** Gets the nth statement of this except group block. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this except group block. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
override string toString() { result = "ExceptGroupStmt" }
}
/** INTERNAL: See the class `ExceptStmt` for further information. */
class ExceptStmt_ extends @py_ExceptStmt, Stmt {
/** Gets the type of this except block. */
Expr getType() { py_exprs(result, _, this, 1) }
/** Gets the name of this except block. */
Expr getName() { py_exprs(result, _, this, 2) }
/** Gets the body of this except block. */
StmtList getBody() { py_stmt_lists(result, this, 3) }
/** Gets the nth statement of this except block. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this except block. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
override string toString() { result = "ExceptStmt" }
}
/** INTERNAL: See the class `Exec` for further information. */
class Exec_ extends @py_Exec, Stmt {
/** Gets the body of this exec statement. */
Expr getBody() { py_exprs(result, _, this, 1) }
/** Gets the globals of this exec statement. */
Expr getGlobals() { py_exprs(result, _, this, 2) }
/** Gets the locals of this exec statement. */
Expr getLocals() { py_exprs(result, _, this, 3) }
override string toString() { result = "Exec" }
}
/** INTERNAL: See the class `ExprStmt` for further information. */
class ExprStmt_ extends @py_Expr_stmt, Stmt {
/** Gets the value of this expr statement. */
Expr getValue() { py_exprs(result, _, this, 1) }
override string toString() { result = "ExprStmt" }
}
/** INTERNAL: See the class `Filter` for further information. */
class Filter_ extends @py_Filter, Expr {
/** Gets the filtered value of this template filter expression. */
Expr getValue() { py_exprs(result, _, this, 2) }
/** Gets the filter of this template filter expression. */
Expr getFilter() { py_exprs(result, _, this, 3) }
override string toString() { result = "Filter" }
}
/** INTERNAL: See the class `FloorDiv` for further information. */
class FloorDiv_ extends @py_FloorDiv, Operator {
override string toString() { result = "FloorDiv" }
}
/** INTERNAL: See the class `For` for further information. */
class For_ extends @py_For, Stmt {
/** Gets the target of this for statement. */
Expr getTarget() { py_exprs(result, _, this, 1) }
/** Gets the iterable of this for statement. */
Expr getIter() { py_exprs(result, _, this, 2) }
/** Gets the body of this for statement. */
StmtList getBody() { py_stmt_lists(result, this, 3) }
/** Gets the nth statement of this for statement. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this for statement. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
/** Gets the else block of this for statement. */
StmtList getOrelse() { py_stmt_lists(result, this, 4) }
/** Gets the nth else statement of this for statement. */
Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) }
/** Gets an else statement of this for statement. */
Stmt getAnOrelse() { result = this.getOrelse().getAnItem() }
/** Whether the async property of this for statement is true. */
predicate isAsync() { py_bools(this, 5) }
override string toString() { result = "For" }
}
/** INTERNAL: See the class `FormattedValue` for further information. */
class FormattedValue_ extends @py_FormattedValue, Expr {
/** Gets the expression to be formatted of this formatted value. */
Expr getValue() { py_exprs(result, _, this, 2) }
/** Gets the type conversion of this formatted value. */
string getConversion() { py_strs(result, this, 3) }
/** Gets the format specifier of this formatted value. */
Fstring getFormatSpec() { py_exprs(result, _, this, 4) }
override string toString() { result = "FormattedValue" }
}
/** INTERNAL: See the class `Function` for further information. */
class Function_ extends @py_Function {
/** Gets the name of this function. */
string getName() { py_strs(result, this, 0) }
/** Gets the positional parameter list of this function. */
ParameterList getArgs() { py_parameter_lists(result, this) }
/** Gets the nth positional parameter of this function. */
Parameter getArg(int index) { result = this.getArgs().getItem(index) }
/** Gets a positional parameter of this function. */
Parameter getAnArg() { result = this.getArgs().getAnItem() }
/** Gets the tuple (*) parameter of this function. */
Expr getVararg() { py_exprs(result, _, this, 2) }
/** Gets the keyword-only parameter list of this function. */
ExprList getKwonlyargs() { py_expr_lists(result, this, 3) }
/** Gets the nth keyword-only parameter of this function. */
Expr getKwonlyarg(int index) { result = this.getKwonlyargs().getItem(index) }
/** Gets a keyword-only parameter of this function. */
Expr getAKwonlyarg() { result = this.getKwonlyargs().getAnItem() }
/** Gets the dictionary (**) parameter of this function. */
Expr getKwarg() { py_exprs(result, _, this, 4) }
/** Gets the body of this function. */
StmtList getBody() { py_stmt_lists(result, this, 5) }
/** Gets the nth statement of this function. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets a statement of this function. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
/** Whether the async property of this function is true. */
predicate isAsync() { py_bools(this, 6) }
/** Gets the type parameters of this function. */
TypeParameterList getTypeParameters() { py_type_parameter_lists(result, this) }
/** Gets the nth type parameter of this function. */
TypeParameter getTypeParameter(int index) { result = this.getTypeParameters().getItem(index) }
/** Gets a type parameter of this function. */
TypeParameter getATypeParameter() { result = this.getTypeParameters().getAnItem() }
/** Gets a parent of this function */
FunctionParent getParent() { py_Functions(this, result) }
/** Gets a textual representation of this element. */
string toString() { result = "Function" }
}
/** INTERNAL: See the class `FunctionExpr` for further information. */
class FunctionExpr_ extends @py_FunctionExpr, Expr {
/** Gets the name of this function definition. */
string getName() { py_strs(result, this, 2) }
/** Gets the parameters of this function definition. */
Arguments getArgs() { py_arguments(result, this) }
/** Gets the return annotation of this function definition. */
Expr getReturns() { py_exprs(result, _, this, 4) }
/** Gets the function scope of this function definition. */
Function getInnerScope() { py_Functions(result, this) }
override string toString() { result = "FunctionExpr" }
}
/** INTERNAL: See the class `FunctionParent` for further information. */
class FunctionParent_ extends @py_Function_parent {
/** Gets a textual representation of this element. */
string toString() { result = "FunctionParent" }
}
/** INTERNAL: See the class `GeneratorExp` for further information. */
class GeneratorExp_ extends @py_GeneratorExp, Expr {
/** Gets the implementation of this generator expression. */
Function getFunction() { py_Functions(result, this) }
/** Gets the iterable of this generator expression. */
Expr getIterable() { py_exprs(result, _, this, 3) }
override string toString() { result = "GeneratorExp" }
}
/** INTERNAL: See the class `Global` for further information. */
class Global_ extends @py_Global, Stmt {
/** Gets the names of this global statement. */
StringList getNames() { py_str_lists(result, this) }
/** Gets the nth name of this global statement. */
string getName(int index) { result = this.getNames().getItem(index) }
/** Gets a name of this global statement. */
string getAName() { result = this.getNames().getAnItem() }
override string toString() { result = "Global" }
}
/** INTERNAL: See the class `Gt` for further information. */
class Gt_ extends @py_Gt, Cmpop {
override string toString() { result = "Gt" }
}
/** INTERNAL: See the class `GtE` for further information. */
class GtE_ extends @py_GtE, Cmpop {
override string toString() { result = "GtE" }
}
/** INTERNAL: See the class `Guard` for further information. */
class Guard_ extends @py_Guard, Expr {
/** Gets the test of this guard expression. */
Expr getTest() { py_exprs(result, _, this, 2) }
override string toString() { result = "Guard" }
}
/** INTERNAL: See the class `If` for further information. */
class If_ extends @py_If, Stmt {
/** Gets the test of this if statement. */
Expr getTest() { py_exprs(result, _, this, 1) }
/** Gets the if-true block of this if statement. */
StmtList getBody() { py_stmt_lists(result, this, 2) }
/** Gets the nth if-true statement of this if statement. */
Stmt getStmt(int index) { result = this.getBody().getItem(index) }
/** Gets an if-true statement of this if statement. */
Stmt getAStmt() { result = this.getBody().getAnItem() }
/** Gets the if-false block of this if statement. */
StmtList getOrelse() { py_stmt_lists(result, this, 3) }
/** Gets the nth if-false statement of this if statement. */
Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) }
/** Gets an if-false statement of this if statement. */
Stmt getAnOrelse() { result = this.getOrelse().getAnItem() }
override string toString() { result = "If" }
}
/** INTERNAL: See the class `IfExp` for further information. */
class IfExp_ extends @py_IfExp, Expr {
/** Gets the test of this if expression. */
Expr getTest() { py_exprs(result, _, this, 2) }
/** Gets the if-true expression of this if expression. */
Expr getBody() { py_exprs(result, _, this, 3) }
/** Gets the if-false expression of this if expression. */
Expr getOrelse() { py_exprs(result, _, this, 4) }
override string toString() { result = "IfExp" }
}
/** INTERNAL: See the class `Import` for further information. */
class Import_ extends @py_Import, Stmt {
/** Gets the alias list of this import statement. */
AliasList getNames() { py_alias_lists(result, this) }
/** Gets the nth alias of this import statement. */
Alias getName(int index) { result = this.getNames().getItem(index) }
/** Gets an alias of this import statement. */
Alias getAName() { result = this.getNames().getAnItem() }
/** Whether the lazy property of this import statement is true. */
predicate isLazy() { py_bools(this, 2) }
override string toString() { result = "Import" }
}
/** INTERNAL: See the class `ImportExpr` for further information. */
class ImportExpr_ extends @py_ImportExpr, Expr {
/** Gets the level of this import expression. */
int getLevel() { py_ints(result, this) }
/** Gets the name of this import expression. */
string getName() { py_strs(result, this, 3) }
/** Whether the top level property of this import expression is true. */
predicate isTop() { py_bools(this, 4) }
override string toString() { result = "ImportExpr" }
}
/** INTERNAL: See the class `ImportStar` for further information. */
class ImportStar_ extends @py_ImportStar, Stmt {
/** Gets the module of this import * statement. */
Expr getModule() { py_exprs(result, _, this, 1) }
/** Whether the lazy property of this import * statement is true. */
predicate isLazy() { py_bools(this, 2) }
override string toString() { result = "ImportStar" }
}
/** INTERNAL: See the class `ImportMember` for further information. */
class ImportMember_ extends @py_ImportMember, Expr {
/** Gets the module of this from import. */
Expr getModule() { py_exprs(result, _, this, 2) }
/** Gets the name of this from import. */
string getName() { py_strs(result, this, 3) }
override string toString() { result = "ImportMember" }
}
/** INTERNAL: See the class `In` for further information. */
class In_ extends @py_In, Cmpop {
override string toString() { result = "In" }
}
/** INTERNAL: See the class `Invert` for further information. */
class Invert_ extends @py_Invert, Unaryop {
override string toString() { result = "Invert" }
}
/** INTERNAL: See the class `Is` for further information. */
class Is_ extends @py_Is, Cmpop {
override string toString() { result = "Is" }
}
/** INTERNAL: See the class `IsNot` for further information. */
class IsNot_ extends @py_IsNot, Cmpop {
override string toString() { result = "IsNot" }
}
/** INTERNAL: See the class `Fstring` for further information. */
class Fstring_ extends @py_Fstring, Expr {
/** Gets the values of this formatted string literal. */
ExprList getValues() { py_expr_lists(result, this, 2) }
/** Gets the nth value of this formatted string literal. */
Expr getValue(int index) { result = this.getValues().getItem(index) }
/** Gets a value of this formatted string literal. */
Expr getAValue() { result = this.getValues().getAnItem() }
override ExprParent getParent() { py_exprs(this, _, result, _) }
override string toString() { result = "Fstring" }
}
/** INTERNAL: See the class `JoinedTemplateString` for further information. */
class JoinedTemplateString_ extends @py_JoinedTemplateString, Expr {
/** Gets the strings of this joined template string. */
TemplateStringList getStrings() { py_TemplateString_lists(result, this) }
/** Gets the nth string of this joined template string. */
TemplateString getString(int index) { result = this.getStrings().getItem(index) }
/** Gets a string of this joined template string. */
TemplateString getAString() { result = this.getStrings().getAnItem() }
override string toString() { result = "JoinedTemplateString" }
}
/** INTERNAL: See the class `KeyValuePair` for further information. */
class KeyValuePair_ extends @py_KeyValuePair, DictItem {
/** Gets the location of this key-value pair. */
override Location getLocation() { py_locations(result, this) }
/** Gets the value of this key-value pair. */
Expr getValue() { py_exprs(result, _, this, 1) }
/** Gets the key of this key-value pair. */
Expr getKey() { py_exprs(result, _, this, 2) }
override string toString() { result = "KeyValuePair" }
}
/** INTERNAL: See the class `LShift` for further information. */
class LShift_ extends @py_LShift, Operator {
override string toString() { result = "LShift" }
}
/** INTERNAL: See the class `Lambda` for further information. */
class Lambda_ extends @py_Lambda, Expr {
/** Gets the arguments of this lambda expression. */
Arguments getArgs() { py_arguments(result, this) }
/** Gets the function scope of this lambda expression. */
Function getInnerScope() { py_Functions(result, this) }
override string toString() { result = "Lambda" }
}
/** INTERNAL: See the class `List` for further information. */
class List_ extends @py_List, Expr {
/** Gets the element list of this list expression. */
ExprList getElts() { py_expr_lists(result, this, 2) }
/** Gets the nth element of this list expression. */
Expr getElt(int index) { result = this.getElts().getItem(index) }
/** Gets an element of this list expression. */
Expr getAnElt() { result = this.getElts().getAnItem() }
/** Gets the context of this list expression. */
ExprContext getCtx() { py_expr_contexts(result, _, this) }
override string toString() { result = "List" }
}
/** INTERNAL: See the class `ListComp` for further information. */
class ListComp_ extends @py_ListComp, Expr {
/** Gets the implementation of this list comprehension. */
Function getFunction() { py_Functions(result, this) }
/** Gets the iterable of this list comprehension. */
Expr getIterable() { py_exprs(result, _, this, 3) }
/** Gets the generators of this list comprehension. */
ComprehensionList getGenerators() { py_comprehension_lists(result, this) }
/** Gets the nth generator of this list comprehension. */
Comprehension getGenerator(int index) { result = this.getGenerators().getItem(index) }
/** Gets a generator of this list comprehension. */
Comprehension getAGenerator() { result = this.getGenerators().getAnItem() }
/** Gets the elements of this list comprehension. */
Expr getElt() { py_exprs(result, _, this, 5) }
override string toString() { result = "ListComp" }
}
/** INTERNAL: See the class `Load` for further information. */
class Load_ extends @py_Load, ExprContext {
override string toString() { result = "Load" }
}
/** INTERNAL: See the class `Lt` for further information. */
class Lt_ extends @py_Lt, Cmpop {
override string toString() { result = "Lt" }
}
/** INTERNAL: See the class `LtE` for further information. */
class LtE_ extends @py_LtE, Cmpop {
override string toString() { result = "LtE" }
}
/** INTERNAL: See the class `MatMult` for further information. */
class MatMult_ extends @py_MatMult, Operator {
override string toString() { result = "MatMult" }
}
/** INTERNAL: See the class `MatchStmt` for further information. */
class MatchStmt_ extends @py_MatchStmt, Stmt {
/** Gets the subject of this match statement. */
Expr getSubject() { py_exprs(result, _, this, 1) }
/** Gets the cases of this match statement. */
StmtList getCases() { py_stmt_lists(result, this, 2) }
/** Gets the nth case of this match statement. */
Stmt getCase(int index) { result = this.getCases().getItem(index) }
/** Gets a case of this match statement. */
Stmt getACase() { result = this.getCases().getAnItem() }
override string toString() { result = "MatchStmt" }
}
/** INTERNAL: See the class `MatchAsPattern` for further information. */
class MatchAsPattern_ extends @py_MatchAsPattern, Pattern {
/** Gets the pattern of this matchaspattern pattern. */
Pattern getPattern() { py_patterns(result, _, this, 2) }
/** Gets the alias of this matchaspattern pattern. */
Expr getAlias() { py_exprs(result, _, this, 3) }
override string toString() { result = "MatchAsPattern" }
}
/** INTERNAL: See the class `MatchCapturePattern` for further information. */
class MatchCapturePattern_ extends @py_MatchCapturePattern, Pattern {
/** Gets the variable of this matchcapturepattern pattern. */
Expr getVariable() { py_exprs(result, _, this, 2) }
override string toString() { result = "MatchCapturePattern" }
}
/** INTERNAL: See the class `MatchClassPattern` for further information. */
class MatchClassPattern_ extends @py_MatchClassPattern, Pattern {
/** Gets the class of this matchclasspattern pattern. */
Expr getClass() { py_exprs(result, _, this, 2) }
/** Gets the class_name of this matchclasspattern pattern. */
Expr getClassName() { py_exprs(result, _, this, 3) }
/** Gets the positional of this matchclasspattern pattern. */
PatternList getPositional() { py_pattern_lists(result, this, 4) }
/** Gets the nth positional of this matchclasspattern pattern. */
Pattern getPositional(int index) { result = this.getPositional().getItem(index) }
/** Gets a positional of this matchclasspattern pattern. */
Pattern getAPositional() { result = this.getPositional().getAnItem() }
/** Gets the keyword of this matchclasspattern pattern. */
PatternList getKeyword() { py_pattern_lists(result, this, 5) }
/** Gets the nth keyword of this matchclasspattern pattern. */
Pattern getKeyword(int index) { result = this.getKeyword().getItem(index) }
/** Gets a keyword of this matchclasspattern pattern. */
Pattern getAKeyword() { result = this.getKeyword().getAnItem() }
override string toString() { result = "MatchClassPattern" }
}
/** INTERNAL: See the class `MatchDoubleStarPattern` for further information. */
class MatchDoubleStarPattern_ extends @py_MatchDoubleStarPattern, Pattern {
/** Gets the target of this matchdoublestarpattern pattern. */
Pattern getTarget() { py_patterns(result, _, this, 2) }
override string toString() { result = "MatchDoubleStarPattern" }
}
/** INTERNAL: See the class `MatchKeyValuePattern` for further information. */
class MatchKeyValuePattern_ extends @py_MatchKeyValuePattern, Pattern {
/** Gets the key of this matchkeyvaluepattern pattern. */
Pattern getKey() { py_patterns(result, _, this, 2) }
/** Gets the value of this matchkeyvaluepattern pattern. */
Pattern getValue() { py_patterns(result, _, this, 3) }
override string toString() { result = "MatchKeyValuePattern" }
}
/** INTERNAL: See the class `MatchKeywordPattern` for further information. */
class MatchKeywordPattern_ extends @py_MatchKeywordPattern, Pattern {
/** Gets the attribute of this matchkeywordpattern pattern. */
Expr getAttribute() { py_exprs(result, _, this, 2) }
/** Gets the value of this matchkeywordpattern pattern. */
Pattern getValue() { py_patterns(result, _, this, 3) }
override string toString() { result = "MatchKeywordPattern" }
}
/** INTERNAL: See the class `MatchLiteralPattern` for further information. */
class MatchLiteralPattern_ extends @py_MatchLiteralPattern, Pattern {
/** Gets the literal of this matchliteralpattern pattern. */
Expr getLiteral() { py_exprs(result, _, this, 2) }
override string toString() { result = "MatchLiteralPattern" }
}
/** INTERNAL: See the class `MatchMappingPattern` for further information. */
class MatchMappingPattern_ extends @py_MatchMappingPattern, Pattern {
/** Gets the mappings of this matchmappingpattern pattern. */
PatternList getMappings() { py_pattern_lists(result, this, 2) }
/** Gets the nth mapping of this matchmappingpattern pattern. */
Pattern getMapping(int index) { result = this.getMappings().getItem(index) }
/** Gets a mapping of this matchmappingpattern pattern. */
Pattern getAMapping() { result = this.getMappings().getAnItem() }
override string toString() { result = "MatchMappingPattern" }
}
/** INTERNAL: See the class `MatchOrPattern` for further information. */