This repository was archived by the owner on Apr 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 457
Expand file tree
/
Copy pathAST.hs
More file actions
6422 lines (5161 loc) · 266 KB
/
AST.hs
File metadata and controls
6422 lines (5161 loc) · 266 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
-- Language definition for Java, generated by ast-generate. Do not edit!
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Language.Java.AST (module Language.Java.AST, getTestCorpusDir) where
import qualified AST.Parse
import qualified AST.Token
import qualified AST.Traversable1.Class
import qualified AST.Unmarshal
import qualified Data.Foldable
import qualified Data.List as Data.OldList
import qualified Data.Maybe as GHC.Maybe
import qualified Data.Text.Internal
import qualified Data.Traversable
import qualified GHC.Base
import qualified GHC.Generics
import qualified GHC.Records
import qualified GHC.Show
import TreeSitter.Java (getTestCorpusDir)
import qualified TreeSitter.Node
import qualified Prelude as GHC.Classes
debugSymbolNames :: [GHC.Base.String]
debugSymbolNames = debugSymbolNames_0
debugSymbolNames_0 :: [GHC.Base.String]
debugSymbolNames_0 =
[ "end",
"identifier",
"decimal_integer_literal",
"hex_integer_literal",
"octal_integer_literal",
"binary_integer_literal",
"decimal_floating_point_literal",
"hex_floating_point_literal",
"true",
"false",
"character_literal",
"string_literal",
"null_literal",
"_(",
"_&",
"_)",
"_=",
"_+=",
"_-=",
"_*=",
"_/=",
"_&=",
"_|=",
"_^=",
"_%=",
"_<<=",
"_>>=",
"_>>>=",
"_>",
"_<",
"_==",
"_>=",
"_<=",
"_!=",
"_&&",
"_||",
"_+",
"_-",
"_*",
"_/",
"_|",
"_^",
"_%",
"_<<",
"_>>",
"_>>>",
"_instanceof",
"_->",
"_,",
"_?",
"_:",
"_!",
"_~",
"_++",
"_--",
"_new",
"_[",
"_]",
"_.",
"_class",
"_::",
"_extends",
"_;",
"_{",
"_}",
"_assert",
"_switch",
"_case",
"_default",
"_do",
"_while",
"_break",
"_continue",
"_return",
"_synchronized",
"_throw",
"_try",
"_catch",
"_finally",
"_if",
"_else",
"_for",
"_@",
"_open",
"_module",
"_requires",
"_exports",
"_to",
"_opens",
"_uses",
"_provides",
"_with",
"_transitive",
"_static",
"_package",
"_import",
"_enum",
"_public",
"_protected",
"_private",
"_abstract",
"_final",
"_strictfp",
"_native",
"_transient",
"_volatile",
"_implements",
"_@interface",
"_interface",
"_byte",
"_short",
"_int",
"_long",
"_char",
"_float",
"_double",
"boolean_type",
"void_type",
"_...",
"_throws",
"this",
"super",
"comment",
"program",
"_literal",
"_expression",
"cast_expression",
"assignment_expression",
"binary_expression",
"instanceof_expression",
"lambda_expression",
"inferred_parameters",
"ternary_expression",
"unary_expression",
"update_expression",
"_primary",
"array_creation_expression",
"dimensions_expr",
"parenthesized_expression",
"class_literal",
"object_creation_expression",
"_unqualified_object_creation_expression",
"field_access",
"array_access",
"method_invocation",
"argument_list",
"method_reference",
"type_arguments",
"wildcard",
"_wildcard_bounds",
"dimensions",
"_statement",
"block",
"expression_statement",
"labeled_statement",
"assert_statement",
"switch_statement",
"switch_block",
"switch_label",
"do_statement",
"break_statement",
"continue_statement",
"return_statement",
"synchronized_statement",
"throw_statement",
"try_statement",
"catch_clause",
"catch_formal_parameter",
"catch_type",
"finally_clause",
"try_with_resources_statement",
"resource_specification",
"resource",
"if_statement",
"while_statement",
"for_statement",
"for_init",
"enhanced_for_statement",
"_annotation",
"marker_annotation",
"annotation",
"annotation_argument_list",
"element_value_pair",
"_element_value",
"element_value_array_initializer",
"_declaration",
"module_declaration",
"module_directive",
"requires_modifier",
"module_name",
"package_declaration",
"import_declaration",
"asterisk",
"enum_declaration",
"enum_body",
"enum_body_declarations",
"enum_constant",
"class_declaration",
"modifiers",
"type_parameters",
"type_parameter",
"type_bound",
"superclass",
"super_interfaces",
"interface_type_list",
"class_body",
"static_initializer",
"constructor_declaration",
"_constructor_declarator",
"constructor_body",
"explicit_constructor_invocation",
"scoped_identifier",
"field_declaration",
"annotation_type_declaration",
"annotation_type_body",
"annotation_type_element_declaration",
"_default_value",
"interface_declaration",
"extends_interfaces",
"interface_body",
"constant_declaration",
"_variable_declarator_list",
"variable_declarator",
"_variable_declarator_id",
"array_initializer",
"_type",
"_unannotated_type",
"annotated_type",
"scoped_type_identifier",
"generic_type",
"array_type",
"integral_type",
"floating_point_type",
"_method_header",
"_method_declarator",
"formal_parameters",
"formal_parameter",
"receiver_parameter",
"spread_parameter",
"throws",
"local_variable_declaration_statement",
"local_variable_declaration",
"method_declaration",
"_program_repeat1",
"_cast_expression_repeat1",
"_inferred_parameters_repeat1",
"_array_creation_expression_repeat1",
"_dimensions_expr_repeat1",
"_class_literal_repeat1",
"_argument_list_repeat1",
"_type_arguments_repeat1",
"_dimensions_repeat1",
"_switch_block_repeat1",
"_try_statement_repeat1",
"_catch_type_repeat1",
"_resource_specification_repeat1",
"_annotation_argument_list_repeat1",
"_element_value_array_initializer_repeat1",
"_module_declaration_repeat1",
"_module_directive_repeat1",
"_module_directive_repeat2",
"_module_directive_repeat3",
"_import_declaration_repeat1",
"_enum_body_repeat1",
"_enum_body_declarations_repeat1",
"_modifiers_repeat1",
"_type_parameters_repeat1",
"_type_bound_repeat1",
"_interface_type_list_repeat1",
"_annotation_type_body_repeat1",
"_interface_body_repeat1",
"__variable_declarator_list_repeat1",
"_array_initializer_repeat1",
"_formal_parameters_repeat1",
"type_identifier"
]
newtype Declaration a = Declaration {getDeclaration :: ((AnnotationTypeDeclaration GHC.Generics.:+: ClassDeclaration GHC.Generics.:+: EnumDeclaration GHC.Generics.:+: ImportDeclaration GHC.Generics.:+: InterfaceDeclaration GHC.Generics.:+: ModuleDeclaration GHC.Generics.:+: PackageDeclaration) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_1.
AST.Traversable1.Class.Traversable1 a_1
)
instance GHC.Records.HasField "ann" (Declaration a_2) a_2 where
getField = AST.Unmarshal.gann GHC.Base.. getDeclaration
deriving instance GHC.Classes.Eq a_3 => GHC.Classes.Eq (Declaration a_3)
deriving instance GHC.Classes.Ord a_4 => GHC.Classes.Ord (Declaration a_4)
deriving instance GHC.Show.Show a_5 => GHC.Show.Show (Declaration a_5)
instance AST.Unmarshal.Unmarshal Declaration
instance Data.Foldable.Foldable Declaration where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Declaration where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Declaration where
traverse = AST.Traversable1.Class.traverseDefault1
newtype Expression a = Expression {getExpression :: ((Primary GHC.Generics.:+: AssignmentExpression GHC.Generics.:+: BinaryExpression GHC.Generics.:+: CastExpression GHC.Generics.:+: Identifier GHC.Generics.:+: InstanceofExpression GHC.Generics.:+: LambdaExpression GHC.Generics.:+: ScopedIdentifier GHC.Generics.:+: TernaryExpression GHC.Generics.:+: UnaryExpression GHC.Generics.:+: UpdateExpression) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_6.
AST.Traversable1.Class.Traversable1 a_6
)
instance GHC.Records.HasField "ann" (Expression a_7) a_7 where
getField = AST.Unmarshal.gann GHC.Base.. getExpression
deriving instance GHC.Classes.Eq a_8 => GHC.Classes.Eq (Expression a_8)
deriving instance GHC.Classes.Ord a_9 => GHC.Classes.Ord (Expression a_9)
deriving instance GHC.Show.Show a_10 => GHC.Show.Show (Expression a_10)
instance AST.Unmarshal.Unmarshal Expression
instance Data.Foldable.Foldable Expression where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Expression where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Expression where
traverse = AST.Traversable1.Class.traverseDefault1
newtype Literal a = Literal {getLiteral :: ((BinaryIntegerLiteral GHC.Generics.:+: CharacterLiteral GHC.Generics.:+: DecimalFloatingPointLiteral GHC.Generics.:+: DecimalIntegerLiteral GHC.Generics.:+: False GHC.Generics.:+: HexFloatingPointLiteral GHC.Generics.:+: HexIntegerLiteral GHC.Generics.:+: NullLiteral GHC.Generics.:+: OctalIntegerLiteral GHC.Generics.:+: StringLiteral GHC.Generics.:+: True) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_11.
AST.Traversable1.Class.Traversable1 a_11
)
instance GHC.Records.HasField "ann" (Literal a_12) a_12 where
getField = AST.Unmarshal.gann GHC.Base.. getLiteral
deriving instance GHC.Classes.Eq a_13 => GHC.Classes.Eq (Literal a_13)
deriving instance GHC.Classes.Ord a_14 => GHC.Classes.Ord (Literal a_14)
deriving instance GHC.Show.Show a_15 => GHC.Show.Show (Literal a_15)
instance AST.Unmarshal.Unmarshal Literal
instance Data.Foldable.Foldable Literal where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Literal where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Literal where
traverse = AST.Traversable1.Class.traverseDefault1
newtype Primary a = Primary {getPrimary :: ((Literal GHC.Generics.:+: ArrayAccess GHC.Generics.:+: ArrayCreationExpression GHC.Generics.:+: ClassLiteral GHC.Generics.:+: FieldAccess GHC.Generics.:+: MethodInvocation GHC.Generics.:+: MethodReference GHC.Generics.:+: ObjectCreationExpression GHC.Generics.:+: ParenthesizedExpression GHC.Generics.:+: This) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_16.
AST.Traversable1.Class.Traversable1 a_16
)
instance GHC.Records.HasField "ann" (Primary a_17) a_17 where
getField = AST.Unmarshal.gann GHC.Base.. getPrimary
deriving instance GHC.Classes.Eq a_18 => GHC.Classes.Eq (Primary a_18)
deriving instance GHC.Classes.Ord a_19 => GHC.Classes.Ord (Primary a_19)
deriving instance GHC.Show.Show a_20 => GHC.Show.Show (Primary a_20)
instance AST.Unmarshal.Unmarshal Primary
instance Data.Foldable.Foldable Primary where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Primary where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Primary where
traverse = AST.Traversable1.Class.traverseDefault1
newtype SimpleType a = SimpleType {getSimpleType :: ((BooleanType GHC.Generics.:+: FloatingPointType GHC.Generics.:+: GenericType GHC.Generics.:+: IntegralType GHC.Generics.:+: ScopedTypeIdentifier GHC.Generics.:+: TypeIdentifier GHC.Generics.:+: VoidType) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_21.
AST.Traversable1.Class.Traversable1 a_21
)
instance GHC.Records.HasField "ann" (SimpleType a_22) a_22 where
getField = AST.Unmarshal.gann GHC.Base.. getSimpleType
deriving instance GHC.Classes.Eq a_23 => GHC.Classes.Eq (SimpleType a_23)
deriving instance GHC.Classes.Ord a_24 => GHC.Classes.Ord (SimpleType a_24)
deriving instance GHC.Show.Show a_25 => GHC.Show.Show (SimpleType a_25)
instance AST.Unmarshal.Unmarshal SimpleType
instance Data.Foldable.Foldable SimpleType where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor SimpleType where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable SimpleType where
traverse = AST.Traversable1.Class.traverseDefault1
newtype Statement a = Statement {getStatement :: ((AnonymousSemicolon GHC.Generics.:+: Declaration GHC.Generics.:+: AssertStatement GHC.Generics.:+: Block GHC.Generics.:+: BreakStatement GHC.Generics.:+: ContinueStatement GHC.Generics.:+: DoStatement GHC.Generics.:+: EnhancedForStatement GHC.Generics.:+: ExpressionStatement GHC.Generics.:+: ForStatement GHC.Generics.:+: IfStatement GHC.Generics.:+: LabeledStatement GHC.Generics.:+: LocalVariableDeclarationStatement GHC.Generics.:+: ReturnStatement GHC.Generics.:+: SwitchStatement GHC.Generics.:+: SynchronizedStatement GHC.Generics.:+: ThrowStatement GHC.Generics.:+: TryStatement GHC.Generics.:+: TryWithResourcesStatement GHC.Generics.:+: WhileStatement) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_26.
AST.Traversable1.Class.Traversable1 a_26
)
instance GHC.Records.HasField "ann" (Statement a_27) a_27 where
getField = AST.Unmarshal.gann GHC.Base.. getStatement
deriving instance GHC.Classes.Eq a_28 => GHC.Classes.Eq (Statement a_28)
deriving instance GHC.Classes.Ord a_29 => GHC.Classes.Ord (Statement a_29)
deriving instance GHC.Show.Show a_30 => GHC.Show.Show (Statement a_30)
instance AST.Unmarshal.Unmarshal Statement
instance Data.Foldable.Foldable Statement where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Statement where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Statement where
traverse = AST.Traversable1.Class.traverseDefault1
newtype Type a = Type {getType :: ((UnannotatedType GHC.Generics.:+: AnnotatedType) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_31.
AST.Traversable1.Class.Traversable1 a_31
)
instance GHC.Records.HasField "ann" (Type a_32) a_32 where
getField = AST.Unmarshal.gann GHC.Base.. getType
deriving instance GHC.Classes.Eq a_33 => GHC.Classes.Eq (Type a_33)
deriving instance GHC.Classes.Ord a_34 => GHC.Classes.Ord (Type a_34)
deriving instance GHC.Show.Show a_35 => GHC.Show.Show (Type a_35)
instance AST.Unmarshal.Unmarshal Type
instance Data.Foldable.Foldable Type where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Type where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Type where
traverse = AST.Traversable1.Class.traverseDefault1
newtype UnannotatedType a = UnannotatedType {getUnannotatedType :: ((SimpleType GHC.Generics.:+: ArrayType) a)}
deriving newtype (AST.Unmarshal.SymbolMatching)
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_36.
AST.Traversable1.Class.Traversable1 a_36
)
instance GHC.Records.HasField "ann" (UnannotatedType a_37) a_37 where
getField = AST.Unmarshal.gann GHC.Base.. getUnannotatedType
deriving instance GHC.Classes.Eq a_38 => GHC.Classes.Eq (UnannotatedType a_38)
deriving instance GHC.Classes.Ord a_39 => GHC.Classes.Ord (UnannotatedType a_39)
deriving instance GHC.Show.Show a_40 => GHC.Show.Show (UnannotatedType a_40)
instance AST.Unmarshal.Unmarshal UnannotatedType
instance Data.Foldable.Foldable UnannotatedType where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor UnannotatedType where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable UnannotatedType where
traverse = AST.Traversable1.Class.traverseDefault1
data AnnotatedType a = AnnotatedType
{ ann :: a,
extraChildren :: (GHC.Base.NonEmpty (AST.Parse.Err ((UnannotatedType GHC.Generics.:+: Annotation GHC.Generics.:+: MarkerAnnotation) a)))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_41.
AST.Traversable1.Class.Traversable1 a_41
)
instance AST.Unmarshal.SymbolMatching AnnotatedType where
matchedSymbols _ = [227]
showFailure _ node_42 =
"expected "
GHC.Base.<> ( "annotated_type"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_42 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_42) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_43 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_44 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_45 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_46 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_43
c1_44 = TreeSitter.Node.nodeStartPoint node_42
TreeSitter.Node.TSPoint
r2_45
c2_46 = TreeSitter.Node.nodeEndPoint node_42
deriving instance GHC.Classes.Eq a_47 => GHC.Classes.Eq (AnnotatedType a_47)
deriving instance GHC.Classes.Ord a_48 => GHC.Classes.Ord (AnnotatedType a_48)
deriving instance GHC.Show.Show a_49 => GHC.Show.Show (AnnotatedType a_49)
instance AST.Unmarshal.Unmarshal AnnotatedType
instance Data.Foldable.Foldable AnnotatedType where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor AnnotatedType where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable AnnotatedType where
traverse = AST.Traversable1.Class.traverseDefault1
data Annotation a = Annotation
{ ann :: a,
arguments :: (AST.Parse.Err (AnnotationArgumentList a)),
name :: (AST.Parse.Err ((Identifier GHC.Generics.:+: ScopedIdentifier) a))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_50.
AST.Traversable1.Class.Traversable1 a_50
)
instance AST.Unmarshal.SymbolMatching Annotation where
matchedSymbols _ = [180]
showFailure _ node_51 =
"expected "
GHC.Base.<> ( "annotation"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_51 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_51) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_52 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_53 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_54 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_55 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_52
c1_53 = TreeSitter.Node.nodeStartPoint node_51
TreeSitter.Node.TSPoint
r2_54
c2_55 = TreeSitter.Node.nodeEndPoint node_51
deriving instance GHC.Classes.Eq a_56 => GHC.Classes.Eq (Annotation a_56)
deriving instance GHC.Classes.Ord a_57 => GHC.Classes.Ord (Annotation a_57)
deriving instance GHC.Show.Show a_58 => GHC.Show.Show (Annotation a_58)
instance AST.Unmarshal.Unmarshal Annotation
instance Data.Foldable.Foldable Annotation where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor Annotation where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable Annotation where
traverse = AST.Traversable1.Class.traverseDefault1
data AnnotationArgumentList a = AnnotationArgumentList
{ ann :: a,
extraChildren :: ([AST.Parse.Err ((Expression GHC.Generics.:+: Annotation GHC.Generics.:+: ElementValueArrayInitializer GHC.Generics.:+: ElementValuePair GHC.Generics.:+: MarkerAnnotation) a)])
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_59.
AST.Traversable1.Class.Traversable1 a_59
)
instance AST.Unmarshal.SymbolMatching AnnotationArgumentList where
matchedSymbols _ = [181]
showFailure _ node_60 =
"expected "
GHC.Base.<> ( "annotation_argument_list"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_60 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_60) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_61 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_62 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_63 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_64 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_61
c1_62 = TreeSitter.Node.nodeStartPoint node_60
TreeSitter.Node.TSPoint
r2_63
c2_64 = TreeSitter.Node.nodeEndPoint node_60
deriving instance GHC.Classes.Eq a_65 => GHC.Classes.Eq (AnnotationArgumentList a_65)
deriving instance GHC.Classes.Ord a_66 => GHC.Classes.Ord (AnnotationArgumentList a_66)
deriving instance GHC.Show.Show a_67 => GHC.Show.Show (AnnotationArgumentList a_67)
instance AST.Unmarshal.Unmarshal AnnotationArgumentList
instance Data.Foldable.Foldable AnnotationArgumentList where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor AnnotationArgumentList where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable AnnotationArgumentList where
traverse = AST.Traversable1.Class.traverseDefault1
data AnnotationTypeBody a = AnnotationTypeBody
{ ann :: a,
extraChildren :: ([AST.Parse.Err ((AnnotationTypeDeclaration GHC.Generics.:+: AnnotationTypeElementDeclaration GHC.Generics.:+: ClassDeclaration GHC.Generics.:+: ConstantDeclaration GHC.Generics.:+: InterfaceDeclaration) a)])
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_68.
AST.Traversable1.Class.Traversable1 a_68
)
instance AST.Unmarshal.SymbolMatching AnnotationTypeBody where
matchedSymbols _ = [214]
showFailure _ node_69 =
"expected "
GHC.Base.<> ( "annotation_type_body"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_69 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_69) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_70 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_71 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_72 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_73 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_70
c1_71 = TreeSitter.Node.nodeStartPoint node_69
TreeSitter.Node.TSPoint
r2_72
c2_73 = TreeSitter.Node.nodeEndPoint node_69
deriving instance GHC.Classes.Eq a_74 => GHC.Classes.Eq (AnnotationTypeBody a_74)
deriving instance GHC.Classes.Ord a_75 => GHC.Classes.Ord (AnnotationTypeBody a_75)
deriving instance GHC.Show.Show a_76 => GHC.Show.Show (AnnotationTypeBody a_76)
instance AST.Unmarshal.Unmarshal AnnotationTypeBody
instance Data.Foldable.Foldable AnnotationTypeBody where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor AnnotationTypeBody where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable AnnotationTypeBody where
traverse = AST.Traversable1.Class.traverseDefault1
data AnnotationTypeDeclaration a = AnnotationTypeDeclaration
{ ann :: a,
body :: (AST.Parse.Err (AnnotationTypeBody a)),
name :: (AST.Parse.Err (Identifier a)),
extraChildren :: (GHC.Maybe.Maybe (AST.Parse.Err (Modifiers a)))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_77.
AST.Traversable1.Class.Traversable1 a_77
)
instance AST.Unmarshal.SymbolMatching AnnotationTypeDeclaration where
matchedSymbols _ = [213]
showFailure _ node_78 =
"expected "
GHC.Base.<> ( "annotation_type_declaration"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_78 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_78) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_79 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_80 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_81 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_82 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_79
c1_80 = TreeSitter.Node.nodeStartPoint node_78
TreeSitter.Node.TSPoint
r2_81
c2_82 = TreeSitter.Node.nodeEndPoint node_78
deriving instance GHC.Classes.Eq a_83 => GHC.Classes.Eq (AnnotationTypeDeclaration a_83)
deriving instance GHC.Classes.Ord a_84 => GHC.Classes.Ord (AnnotationTypeDeclaration a_84)
deriving instance GHC.Show.Show a_85 => GHC.Show.Show (AnnotationTypeDeclaration a_85)
instance AST.Unmarshal.Unmarshal AnnotationTypeDeclaration
instance Data.Foldable.Foldable AnnotationTypeDeclaration where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor AnnotationTypeDeclaration where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable AnnotationTypeDeclaration where
traverse = AST.Traversable1.Class.traverseDefault1
data AnnotationTypeElementDeclaration a = AnnotationTypeElementDeclaration
{ ann :: a,
value :: (GHC.Maybe.Maybe (AST.Parse.Err ((Expression GHC.Generics.:+: Annotation GHC.Generics.:+: ElementValueArrayInitializer GHC.Generics.:+: MarkerAnnotation) a))),
name :: (AST.Parse.Err (Identifier a)),
type' :: (AST.Parse.Err (UnannotatedType a)),
dimensions :: (GHC.Maybe.Maybe (AST.Parse.Err (Dimensions a))),
extraChildren :: (GHC.Maybe.Maybe (AST.Parse.Err (Modifiers a)))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_86.
AST.Traversable1.Class.Traversable1 a_86
)
instance AST.Unmarshal.SymbolMatching AnnotationTypeElementDeclaration where
matchedSymbols _ = [215]
showFailure _ node_87 =
"expected "
GHC.Base.<> ( "annotation_type_element_declaration"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_87 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_87) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_88 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_89 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_90 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_91 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_88
c1_89 = TreeSitter.Node.nodeStartPoint node_87
TreeSitter.Node.TSPoint
r2_90
c2_91 = TreeSitter.Node.nodeEndPoint node_87
deriving instance GHC.Classes.Eq a_92 => GHC.Classes.Eq (AnnotationTypeElementDeclaration a_92)
deriving instance GHC.Classes.Ord a_93 => GHC.Classes.Ord (AnnotationTypeElementDeclaration a_93)
deriving instance GHC.Show.Show a_94 => GHC.Show.Show (AnnotationTypeElementDeclaration a_94)
instance AST.Unmarshal.Unmarshal AnnotationTypeElementDeclaration
instance Data.Foldable.Foldable AnnotationTypeElementDeclaration where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor AnnotationTypeElementDeclaration where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable AnnotationTypeElementDeclaration where
traverse = AST.Traversable1.Class.traverseDefault1
data ArgumentList a = ArgumentList
{ ann :: a,
extraChildren :: ([AST.Parse.Err (Expression a)])
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_95.
AST.Traversable1.Class.Traversable1 a_95
)
instance AST.Unmarshal.SymbolMatching ArgumentList where
matchedSymbols _ = [145]
showFailure _ node_96 =
"expected "
GHC.Base.<> ( "argument_list"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_96 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_96) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_97 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_98 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_99 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_100 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_97
c1_98 = TreeSitter.Node.nodeStartPoint node_96
TreeSitter.Node.TSPoint
r2_99
c2_100 = TreeSitter.Node.nodeEndPoint node_96
deriving instance GHC.Classes.Eq a_101 => GHC.Classes.Eq (ArgumentList a_101)
deriving instance GHC.Classes.Ord a_102 => GHC.Classes.Ord (ArgumentList a_102)
deriving instance GHC.Show.Show a_103 => GHC.Show.Show (ArgumentList a_103)
instance AST.Unmarshal.Unmarshal ArgumentList
instance Data.Foldable.Foldable ArgumentList where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor ArgumentList where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable ArgumentList where
traverse = AST.Traversable1.Class.traverseDefault1
data ArrayAccess a = ArrayAccess
{ ann :: a,
array :: (AST.Parse.Err ((Primary GHC.Generics.:+: Identifier GHC.Generics.:+: ScopedIdentifier) a)),
index :: (AST.Parse.Err (Expression a))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_104.
AST.Traversable1.Class.Traversable1 a_104
)
instance AST.Unmarshal.SymbolMatching ArrayAccess where
matchedSymbols _ = [143]
showFailure _ node_105 =
"expected "
GHC.Base.<> ( "array_access"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_105 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_105) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_106 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_107 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_108 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_109 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_106
c1_107 = TreeSitter.Node.nodeStartPoint node_105
TreeSitter.Node.TSPoint
r2_108
c2_109 = TreeSitter.Node.nodeEndPoint node_105
deriving instance GHC.Classes.Eq a_110 => GHC.Classes.Eq (ArrayAccess a_110)
deriving instance GHC.Classes.Ord a_111 => GHC.Classes.Ord (ArrayAccess a_111)
deriving instance GHC.Show.Show a_112 => GHC.Show.Show (ArrayAccess a_112)
instance AST.Unmarshal.Unmarshal ArrayAccess
instance Data.Foldable.Foldable ArrayAccess where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor ArrayAccess where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable ArrayAccess where
traverse = AST.Traversable1.Class.traverseDefault1
data ArrayCreationExpression a = ArrayCreationExpression
{ ann :: a,
value :: (GHC.Maybe.Maybe (AST.Parse.Err (ArrayInitializer a))),
type' :: (AST.Parse.Err (SimpleType a)),
dimensions :: (GHC.Base.NonEmpty (AST.Parse.Err ((Dimensions GHC.Generics.:+: DimensionsExpr) a)))
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_113.
AST.Traversable1.Class.Traversable1 a_113
)
instance AST.Unmarshal.SymbolMatching ArrayCreationExpression where
matchedSymbols _ = [136]
showFailure _ node_114 =
"expected "
GHC.Base.<> ( "array_creation_expression"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_114 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_114) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_115 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_116 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_117 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_118 GHC.Base.<> "]")))))))))
)
)
)
where
TreeSitter.Node.TSPoint
r1_115
c1_116 = TreeSitter.Node.nodeStartPoint node_114
TreeSitter.Node.TSPoint
r2_117
c2_118 = TreeSitter.Node.nodeEndPoint node_114
deriving instance GHC.Classes.Eq a_119 => GHC.Classes.Eq (ArrayCreationExpression a_119)
deriving instance GHC.Classes.Ord a_120 => GHC.Classes.Ord (ArrayCreationExpression a_120)
deriving instance GHC.Show.Show a_121 => GHC.Show.Show (ArrayCreationExpression a_121)
instance AST.Unmarshal.Unmarshal ArrayCreationExpression
instance Data.Foldable.Foldable ArrayCreationExpression where
foldMap = AST.Traversable1.Class.foldMapDefault1
instance GHC.Base.Functor ArrayCreationExpression where
fmap = AST.Traversable1.Class.fmapDefault1
instance Data.Traversable.Traversable ArrayCreationExpression where
traverse = AST.Traversable1.Class.traverseDefault1
data ArrayInitializer a = ArrayInitializer
{ ann :: a,
extraChildren :: ([AST.Parse.Err ((Expression GHC.Generics.:+: ArrayInitializer) a)])
}
deriving stock (GHC.Generics.Generic, GHC.Generics.Generic1)
deriving anyclass
( forall a_122.
AST.Traversable1.Class.Traversable1 a_122
)
instance AST.Unmarshal.SymbolMatching ArrayInitializer where
matchedSymbols _ = [224]
showFailure _ node_123 =
"expected "
GHC.Base.<> ( "array_initializer"
GHC.Base.<> ( " but got "
GHC.Base.<> ( if TreeSitter.Node.nodeSymbol node_123 GHC.Classes.== 65535
then "ERROR"
else Data.OldList.genericIndex debugSymbolNames (TreeSitter.Node.nodeSymbol node_123) GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r1_124 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c1_125 GHC.Base.<> ("] -" GHC.Base.<> (" [" GHC.Base.<> (GHC.Show.show r2_126 GHC.Base.<> (", " GHC.Base.<> (GHC.Show.show c2_127 GHC.Base.<> "]")))))))))
)
)
)