1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
10 private init empty_init
do end
13 n_moduledecl
: nullable AModuledecl,
14 n_imports
: Collection[Object], # Should be Collection[AImport]
15 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
16 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
20 _n_moduledecl
= n_moduledecl
21 if n_moduledecl
!= null then
22 n_moduledecl
.parent
= self
29 for n
in n_extern_code_blocks
do
30 assert n
isa AExternCodeBlock
31 _n_extern_code_blocks
.add
(n
)
34 for n
in n_classdefs
do
35 assert n
isa AClassdef
41 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
43 if _n_moduledecl
== old_child
then
44 if new_child
!= null then
45 new_child
.parent
= self
46 assert new_child
isa AModuledecl
47 _n_moduledecl
= new_child
53 for i
in [0.._n_imports
.length
[ do
54 if _n_imports
[i
] == old_child
then
55 if new_child
!= null then
56 assert new_child
isa AImport
57 _n_imports
[i
] = new_child
58 new_child
.parent
= self
60 _n_imports
.remove_at
(i
)
65 for i
in [0.._n_extern_code_blocks
.length
[ do
66 if _n_extern_code_blocks
[i
] == old_child
then
67 if new_child
!= null then
68 assert new_child
isa AExternCodeBlock
69 _n_extern_code_blocks
[i
] = new_child
70 new_child
.parent
= self
72 _n_extern_code_blocks
.remove_at
(i
)
77 for i
in [0.._n_classdefs
.length
[ do
78 if _n_classdefs
[i
] == old_child
then
79 if new_child
!= null then
80 assert new_child
isa AClassdef
81 _n_classdefs
[i
] = new_child
82 new_child
.parent
= self
84 _n_classdefs
.remove_at
(i
)
91 redef fun n_moduledecl
=(node
)
100 redef fun visit_all
(v
: Visitor)
102 if _n_moduledecl
!= null then
103 v
.enter_visit
(_n_moduledecl
.as(not null))
105 for n
in _n_imports
do
108 for n
in _n_extern_code_blocks
do
111 for n
in _n_classdefs
do
116 redef class AModuledecl
117 private init empty_init
do end
119 init init_amoduledecl
(
120 n_doc
: nullable ADoc,
121 n_kwmodule
: nullable TKwmodule,
122 n_name
: nullable AModuleName,
123 n_annotations
: nullable AAnnotations
128 if n_doc
!= null then
131 _n_kwmodule
= n_kwmodule
.as(not null)
132 n_kwmodule
.parent
= self
133 _n_name
= n_name
.as(not null)
135 _n_annotations
= n_annotations
136 if n_annotations
!= null then
137 n_annotations
.parent
= self
141 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
143 if _n_doc
== old_child
then
144 if new_child
!= null then
145 new_child
.parent
= self
146 assert new_child
isa ADoc
153 if _n_kwmodule
== old_child
then
154 if new_child
!= null then
155 new_child
.parent
= self
156 assert new_child
isa TKwmodule
157 _n_kwmodule
= new_child
163 if _n_name
== old_child
then
164 if new_child
!= null then
165 new_child
.parent
= self
166 assert new_child
isa AModuleName
173 if _n_annotations
== old_child
then
174 if new_child
!= null then
175 new_child
.parent
= self
176 assert new_child
isa AAnnotations
177 _n_annotations
= new_child
179 _n_annotations
= null
185 redef fun n_doc
=(node
)
192 redef fun n_kwmodule
=(node
)
197 redef fun n_name
=(node
)
202 redef fun n_annotations
=(node
)
204 _n_annotations
= node
211 redef fun visit_all
(v
: Visitor)
213 if _n_doc
!= null then
214 v
.enter_visit
(_n_doc
.as(not null))
216 v
.enter_visit
(_n_kwmodule
)
217 v
.enter_visit
(_n_name
)
218 if _n_annotations
!= null then
219 v
.enter_visit
(_n_annotations
.as(not null))
223 redef class AStdImport
224 private init empty_init
do end
226 init init_astdimport
(
227 n_visibility
: nullable AVisibility,
228 n_kwimport
: nullable TKwimport,
229 n_name
: nullable AModuleName,
230 n_annotations
: nullable AAnnotations
234 _n_visibility
= n_visibility
.as(not null)
235 n_visibility
.parent
= self
236 _n_kwimport
= n_kwimport
.as(not null)
237 n_kwimport
.parent
= self
238 _n_name
= n_name
.as(not null)
240 _n_annotations
= n_annotations
241 if n_annotations
!= null then
242 n_annotations
.parent
= self
246 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
248 if _n_visibility
== old_child
then
249 if new_child
!= null then
250 new_child
.parent
= self
251 assert new_child
isa AVisibility
252 _n_visibility
= new_child
258 if _n_kwimport
== old_child
then
259 if new_child
!= null then
260 new_child
.parent
= self
261 assert new_child
isa TKwimport
262 _n_kwimport
= new_child
268 if _n_name
== old_child
then
269 if new_child
!= null then
270 new_child
.parent
= self
271 assert new_child
isa AModuleName
278 if _n_annotations
== old_child
then
279 if new_child
!= null then
280 new_child
.parent
= self
281 assert new_child
isa AAnnotations
282 _n_annotations
= new_child
284 _n_annotations
= null
290 redef fun n_visibility
=(node
)
295 redef fun n_kwimport
=(node
)
300 redef fun n_name
=(node
)
305 redef fun n_annotations
=(node
)
307 _n_annotations
= node
314 redef fun visit_all
(v
: Visitor)
316 v
.enter_visit
(_n_visibility
)
317 v
.enter_visit
(_n_kwimport
)
318 v
.enter_visit
(_n_name
)
319 if _n_annotations
!= null then
320 v
.enter_visit
(_n_annotations
.as(not null))
324 redef class ANoImport
325 private init empty_init
do end
327 init init_anoimport
(
328 n_visibility
: nullable AVisibility,
329 n_kwimport
: nullable TKwimport,
330 n_kwend
: nullable TKwend
334 _n_visibility
= n_visibility
.as(not null)
335 n_visibility
.parent
= self
336 _n_kwimport
= n_kwimport
.as(not null)
337 n_kwimport
.parent
= self
338 _n_kwend
= n_kwend
.as(not null)
339 n_kwend
.parent
= self
342 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
344 if _n_visibility
== old_child
then
345 if new_child
!= null then
346 new_child
.parent
= self
347 assert new_child
isa AVisibility
348 _n_visibility
= new_child
354 if _n_kwimport
== old_child
then
355 if new_child
!= null then
356 new_child
.parent
= self
357 assert new_child
isa TKwimport
358 _n_kwimport
= new_child
364 if _n_kwend
== old_child
then
365 if new_child
!= null then
366 new_child
.parent
= self
367 assert new_child
isa TKwend
376 redef fun n_visibility
=(node
)
381 redef fun n_kwimport
=(node
)
386 redef fun n_kwend
=(node
)
393 redef fun visit_all
(v
: Visitor)
395 v
.enter_visit
(_n_visibility
)
396 v
.enter_visit
(_n_kwimport
)
397 v
.enter_visit
(_n_kwend
)
400 redef class APublicVisibility
401 private init empty_init
do end
403 init init_apublicvisibility
408 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
414 redef fun visit_all
(v
: Visitor)
418 redef class APrivateVisibility
419 private init empty_init
do end
421 init init_aprivatevisibility
(
422 n_kwprivate
: nullable TKwprivate
426 _n_kwprivate
= n_kwprivate
.as(not null)
427 n_kwprivate
.parent
= self
430 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
432 if _n_kwprivate
== old_child
then
433 if new_child
!= null then
434 new_child
.parent
= self
435 assert new_child
isa TKwprivate
436 _n_kwprivate
= new_child
444 redef fun n_kwprivate
=(node
)
451 redef fun visit_all
(v
: Visitor)
453 v
.enter_visit
(_n_kwprivate
)
456 redef class AProtectedVisibility
457 private init empty_init
do end
459 init init_aprotectedvisibility
(
460 n_kwprotected
: nullable TKwprotected
464 _n_kwprotected
= n_kwprotected
.as(not null)
465 n_kwprotected
.parent
= self
468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
470 if _n_kwprotected
== old_child
then
471 if new_child
!= null then
472 new_child
.parent
= self
473 assert new_child
isa TKwprotected
474 _n_kwprotected
= new_child
482 redef fun n_kwprotected
=(node
)
484 _n_kwprotected
= node
489 redef fun visit_all
(v
: Visitor)
491 v
.enter_visit
(_n_kwprotected
)
494 redef class AIntrudeVisibility
495 private init empty_init
do end
497 init init_aintrudevisibility
(
498 n_kwintrude
: nullable TKwintrude
502 _n_kwintrude
= n_kwintrude
.as(not null)
503 n_kwintrude
.parent
= self
506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
508 if _n_kwintrude
== old_child
then
509 if new_child
!= null then
510 new_child
.parent
= self
511 assert new_child
isa TKwintrude
512 _n_kwintrude
= new_child
520 redef fun n_kwintrude
=(node
)
527 redef fun visit_all
(v
: Visitor)
529 v
.enter_visit
(_n_kwintrude
)
532 redef class AStdClassdef
533 private init empty_init
do end
535 init init_astdclassdef
(
536 n_doc
: nullable ADoc,
537 n_kwredef
: nullable TKwredef,
538 n_visibility
: nullable AVisibility,
539 n_classkind
: nullable AClasskind,
540 n_id
: nullable TClassid,
541 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
542 n_annotations
: nullable AAnnotations,
543 n_extern_code_block
: nullable AExternCodeBlock,
544 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
545 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
546 n_kwend
: nullable TKwend
551 if n_doc
!= null then
554 _n_kwredef
= n_kwredef
555 if n_kwredef
!= null then
556 n_kwredef
.parent
= self
558 _n_visibility
= n_visibility
.as(not null)
559 n_visibility
.parent
= self
560 _n_classkind
= n_classkind
.as(not null)
561 n_classkind
.parent
= self
566 for n
in n_formaldefs
do
567 assert n
isa AFormaldef
571 _n_annotations
= n_annotations
572 if n_annotations
!= null then
573 n_annotations
.parent
= self
575 _n_extern_code_block
= n_extern_code_block
576 if n_extern_code_block
!= null then
577 n_extern_code_block
.parent
= self
579 for n
in n_superclasses
do
580 assert n
isa ASuperclass
581 _n_superclasses
.add
(n
)
584 for n
in n_propdefs
do
585 assert n
isa APropdef
589 _n_kwend
= n_kwend
.as(not null)
590 n_kwend
.parent
= self
593 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
595 if _n_doc
== old_child
then
596 if new_child
!= null then
597 new_child
.parent
= self
598 assert new_child
isa ADoc
605 if _n_kwredef
== old_child
then
606 if new_child
!= null then
607 new_child
.parent
= self
608 assert new_child
isa TKwredef
609 _n_kwredef
= new_child
615 if _n_visibility
== old_child
then
616 if new_child
!= null then
617 new_child
.parent
= self
618 assert new_child
isa AVisibility
619 _n_visibility
= new_child
625 if _n_classkind
== old_child
then
626 if new_child
!= null then
627 new_child
.parent
= self
628 assert new_child
isa AClasskind
629 _n_classkind
= new_child
635 if _n_id
== old_child
then
636 if new_child
!= null then
637 new_child
.parent
= self
638 assert new_child
isa TClassid
645 for i
in [0.._n_formaldefs
.length
[ do
646 if _n_formaldefs
[i
] == old_child
then
647 if new_child
!= null then
648 assert new_child
isa AFormaldef
649 _n_formaldefs
[i
] = new_child
650 new_child
.parent
= self
652 _n_formaldefs
.remove_at
(i
)
657 if _n_annotations
== old_child
then
658 if new_child
!= null then
659 new_child
.parent
= self
660 assert new_child
isa AAnnotations
661 _n_annotations
= new_child
663 _n_annotations
= null
667 if _n_extern_code_block
== old_child
then
668 if new_child
!= null then
669 new_child
.parent
= self
670 assert new_child
isa AExternCodeBlock
671 _n_extern_code_block
= new_child
673 _n_extern_code_block
= null
677 for i
in [0.._n_superclasses
.length
[ do
678 if _n_superclasses
[i
] == old_child
then
679 if new_child
!= null then
680 assert new_child
isa ASuperclass
681 _n_superclasses
[i
] = new_child
682 new_child
.parent
= self
684 _n_superclasses
.remove_at
(i
)
689 for i
in [0.._n_propdefs
.length
[ do
690 if _n_propdefs
[i
] == old_child
then
691 if new_child
!= null then
692 assert new_child
isa APropdef
693 _n_propdefs
[i
] = new_child
694 new_child
.parent
= self
696 _n_propdefs
.remove_at
(i
)
701 if _n_kwend
== old_child
then
702 if new_child
!= null then
703 new_child
.parent
= self
704 assert new_child
isa TKwend
713 redef fun n_doc
=(node
)
720 redef fun n_kwredef
=(node
)
727 redef fun n_visibility
=(node
)
732 redef fun n_classkind
=(node
)
737 redef fun n_id
=(node
)
744 redef fun n_annotations
=(node
)
746 _n_annotations
= node
751 redef fun n_extern_code_block
=(node
)
753 _n_extern_code_block
= node
758 redef fun n_kwend
=(node
)
765 redef fun visit_all
(v
: Visitor)
767 if _n_doc
!= null then
768 v
.enter_visit
(_n_doc
.as(not null))
770 if _n_kwredef
!= null then
771 v
.enter_visit
(_n_kwredef
.as(not null))
773 v
.enter_visit
(_n_visibility
)
774 v
.enter_visit
(_n_classkind
)
775 if _n_id
!= null then
776 v
.enter_visit
(_n_id
.as(not null))
778 for n
in _n_formaldefs
do
781 if _n_annotations
!= null then
782 v
.enter_visit
(_n_annotations
.as(not null))
784 if _n_extern_code_block
!= null then
785 v
.enter_visit
(_n_extern_code_block
.as(not null))
787 for n
in _n_superclasses
do
790 for n
in _n_propdefs
do
793 v
.enter_visit
(_n_kwend
)
796 redef class ATopClassdef
797 private init empty_init
do end
799 init init_atopclassdef
(
800 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
804 for n
in n_propdefs
do
805 assert n
isa APropdef
811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
813 for i
in [0.._n_propdefs
.length
[ do
814 if _n_propdefs
[i
] == old_child
then
815 if new_child
!= null then
816 assert new_child
isa APropdef
817 _n_propdefs
[i
] = new_child
818 new_child
.parent
= self
820 _n_propdefs
.remove_at
(i
)
829 redef fun visit_all
(v
: Visitor)
831 for n
in _n_propdefs
do
836 redef class AMainClassdef
837 private init empty_init
do end
839 init init_amainclassdef
(
840 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
844 for n
in n_propdefs
do
845 assert n
isa APropdef
851 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
853 for i
in [0.._n_propdefs
.length
[ do
854 if _n_propdefs
[i
] == old_child
then
855 if new_child
!= null then
856 assert new_child
isa APropdef
857 _n_propdefs
[i
] = new_child
858 new_child
.parent
= self
860 _n_propdefs
.remove_at
(i
)
869 redef fun visit_all
(v
: Visitor)
871 for n
in _n_propdefs
do
876 redef class AConcreteClasskind
877 private init empty_init
do end
879 init init_aconcreteclasskind
(
880 n_kwclass
: nullable TKwclass
884 _n_kwclass
= n_kwclass
.as(not null)
885 n_kwclass
.parent
= self
888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
890 if _n_kwclass
== old_child
then
891 if new_child
!= null then
892 new_child
.parent
= self
893 assert new_child
isa TKwclass
894 _n_kwclass
= new_child
902 redef fun n_kwclass
=(node
)
909 redef fun visit_all
(v
: Visitor)
911 v
.enter_visit
(_n_kwclass
)
914 redef class AAbstractClasskind
915 private init empty_init
do end
917 init init_aabstractclasskind
(
918 n_kwabstract
: nullable TKwabstract,
919 n_kwclass
: nullable TKwclass
923 _n_kwabstract
= n_kwabstract
.as(not null)
924 n_kwabstract
.parent
= self
925 _n_kwclass
= n_kwclass
.as(not null)
926 n_kwclass
.parent
= self
929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
931 if _n_kwabstract
== old_child
then
932 if new_child
!= null then
933 new_child
.parent
= self
934 assert new_child
isa TKwabstract
935 _n_kwabstract
= new_child
941 if _n_kwclass
== old_child
then
942 if new_child
!= null then
943 new_child
.parent
= self
944 assert new_child
isa TKwclass
945 _n_kwclass
= new_child
953 redef fun n_kwabstract
=(node
)
958 redef fun n_kwclass
=(node
)
965 redef fun visit_all
(v
: Visitor)
967 v
.enter_visit
(_n_kwabstract
)
968 v
.enter_visit
(_n_kwclass
)
971 redef class AInterfaceClasskind
972 private init empty_init
do end
974 init init_ainterfaceclasskind
(
975 n_kwinterface
: nullable TKwinterface
979 _n_kwinterface
= n_kwinterface
.as(not null)
980 n_kwinterface
.parent
= self
983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
985 if _n_kwinterface
== old_child
then
986 if new_child
!= null then
987 new_child
.parent
= self
988 assert new_child
isa TKwinterface
989 _n_kwinterface
= new_child
997 redef fun n_kwinterface
=(node
)
999 _n_kwinterface
= node
1004 redef fun visit_all
(v
: Visitor)
1006 v
.enter_visit
(_n_kwinterface
)
1009 redef class AEnumClasskind
1010 private init empty_init
do end
1012 init init_aenumclasskind
(
1013 n_kwenum
: nullable TKwenum
1017 _n_kwenum
= n_kwenum
.as(not null)
1018 n_kwenum
.parent
= self
1021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1023 if _n_kwenum
== old_child
then
1024 if new_child
!= null then
1025 new_child
.parent
= self
1026 assert new_child
isa TKwenum
1027 _n_kwenum
= new_child
1035 redef fun n_kwenum
=(node
)
1042 redef fun visit_all
(v
: Visitor)
1044 v
.enter_visit
(_n_kwenum
)
1047 redef class AExternClasskind
1048 private init empty_init
do end
1050 init init_aexternclasskind
(
1051 n_kwextern
: nullable TKwextern,
1052 n_kwclass
: nullable TKwclass
1056 _n_kwextern
= n_kwextern
.as(not null)
1057 n_kwextern
.parent
= self
1058 _n_kwclass
= n_kwclass
1059 if n_kwclass
!= null then
1060 n_kwclass
.parent
= self
1064 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1066 if _n_kwextern
== old_child
then
1067 if new_child
!= null then
1068 new_child
.parent
= self
1069 assert new_child
isa TKwextern
1070 _n_kwextern
= new_child
1076 if _n_kwclass
== old_child
then
1077 if new_child
!= null then
1078 new_child
.parent
= self
1079 assert new_child
isa TKwclass
1080 _n_kwclass
= new_child
1088 redef fun n_kwextern
=(node
)
1093 redef fun n_kwclass
=(node
)
1096 if node
!= null then
1102 redef fun visit_all
(v
: Visitor)
1104 v
.enter_visit
(_n_kwextern
)
1105 if _n_kwclass
!= null then
1106 v
.enter_visit
(_n_kwclass
.as(not null))
1110 redef class AFormaldef
1111 private init empty_init
do end
1113 init init_aformaldef
(
1114 n_id
: nullable TClassid,
1115 n_type
: nullable AType,
1116 n_annotations
: nullable AAnnotations
1120 _n_id
= n_id
.as(not null)
1123 if n_type
!= null then
1124 n_type
.parent
= self
1126 _n_annotations
= n_annotations
1127 if n_annotations
!= null then
1128 n_annotations
.parent
= self
1132 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1134 if _n_id
== old_child
then
1135 if new_child
!= null then
1136 new_child
.parent
= self
1137 assert new_child
isa TClassid
1144 if _n_type
== old_child
then
1145 if new_child
!= null then
1146 new_child
.parent
= self
1147 assert new_child
isa AType
1154 if _n_annotations
== old_child
then
1155 if new_child
!= null then
1156 new_child
.parent
= self
1157 assert new_child
isa AAnnotations
1158 _n_annotations
= new_child
1160 _n_annotations
= null
1166 redef fun n_id
=(node
)
1171 redef fun n_type
=(node
)
1174 if node
!= null then
1178 redef fun n_annotations
=(node
)
1180 _n_annotations
= node
1181 if node
!= null then
1187 redef fun visit_all
(v
: Visitor)
1189 v
.enter_visit
(_n_id
)
1190 if _n_type
!= null then
1191 v
.enter_visit
(_n_type
.as(not null))
1193 if _n_annotations
!= null then
1194 v
.enter_visit
(_n_annotations
.as(not null))
1198 redef class ASuperclass
1199 private init empty_init
do end
1201 init init_asuperclass
(
1202 n_kwsuper
: nullable TKwsuper,
1203 n_type
: nullable AType,
1204 n_annotations
: nullable AAnnotations
1208 _n_kwsuper
= n_kwsuper
.as(not null)
1209 n_kwsuper
.parent
= self
1210 _n_type
= n_type
.as(not null)
1211 n_type
.parent
= self
1212 _n_annotations
= n_annotations
1213 if n_annotations
!= null then
1214 n_annotations
.parent
= self
1218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1220 if _n_kwsuper
== old_child
then
1221 if new_child
!= null then
1222 new_child
.parent
= self
1223 assert new_child
isa TKwsuper
1224 _n_kwsuper
= new_child
1230 if _n_type
== old_child
then
1231 if new_child
!= null then
1232 new_child
.parent
= self
1233 assert new_child
isa AType
1240 if _n_annotations
== old_child
then
1241 if new_child
!= null then
1242 new_child
.parent
= self
1243 assert new_child
isa AAnnotations
1244 _n_annotations
= new_child
1246 _n_annotations
= null
1252 redef fun n_kwsuper
=(node
)
1257 redef fun n_type
=(node
)
1262 redef fun n_annotations
=(node
)
1264 _n_annotations
= node
1265 if node
!= null then
1271 redef fun visit_all
(v
: Visitor)
1273 v
.enter_visit
(_n_kwsuper
)
1274 v
.enter_visit
(_n_type
)
1275 if _n_annotations
!= null then
1276 v
.enter_visit
(_n_annotations
.as(not null))
1280 redef class AAttrPropdef
1281 private init empty_init
do end
1283 init init_aattrpropdef
(
1284 n_doc
: nullable ADoc,
1285 n_readable
: nullable AAble,
1286 n_writable
: nullable AAble,
1287 n_kwredef
: nullable TKwredef,
1288 n_visibility
: nullable AVisibility,
1289 n_kwvar
: nullable TKwvar,
1290 n_id
: nullable TAttrid,
1291 n_id2
: nullable TId,
1292 n_type
: nullable AType,
1293 n_annotations
: nullable AAnnotations,
1294 n_expr
: nullable AExpr
1299 if n_doc
!= null then
1302 _n_readable
= n_readable
1303 if n_readable
!= null then
1304 n_readable
.parent
= self
1306 _n_writable
= n_writable
1307 if n_writable
!= null then
1308 n_writable
.parent
= self
1310 _n_kwredef
= n_kwredef
1311 if n_kwredef
!= null then
1312 n_kwredef
.parent
= self
1314 _n_visibility
= n_visibility
.as(not null)
1315 n_visibility
.parent
= self
1316 _n_kwvar
= n_kwvar
.as(not null)
1317 n_kwvar
.parent
= self
1319 if n_id
!= null then
1323 if n_id2
!= null then
1327 if n_type
!= null then
1328 n_type
.parent
= self
1330 _n_annotations
= n_annotations
1331 if n_annotations
!= null then
1332 n_annotations
.parent
= self
1335 if n_expr
!= null then
1336 n_expr
.parent
= self
1340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1342 if _n_doc
== old_child
then
1343 if new_child
!= null then
1344 new_child
.parent
= self
1345 assert new_child
isa ADoc
1352 if _n_readable
== old_child
then
1353 if new_child
!= null then
1354 new_child
.parent
= self
1355 assert new_child
isa AAble
1356 _n_readable
= new_child
1362 if _n_writable
== old_child
then
1363 if new_child
!= null then
1364 new_child
.parent
= self
1365 assert new_child
isa AAble
1366 _n_writable
= new_child
1372 if _n_kwredef
== old_child
then
1373 if new_child
!= null then
1374 new_child
.parent
= self
1375 assert new_child
isa TKwredef
1376 _n_kwredef
= new_child
1382 if _n_visibility
== old_child
then
1383 if new_child
!= null then
1384 new_child
.parent
= self
1385 assert new_child
isa AVisibility
1386 _n_visibility
= new_child
1392 if _n_kwvar
== old_child
then
1393 if new_child
!= null then
1394 new_child
.parent
= self
1395 assert new_child
isa TKwvar
1396 _n_kwvar
= new_child
1402 if _n_id
== old_child
then
1403 if new_child
!= null then
1404 new_child
.parent
= self
1405 assert new_child
isa TAttrid
1412 if _n_id2
== old_child
then
1413 if new_child
!= null then
1414 new_child
.parent
= self
1415 assert new_child
isa TId
1422 if _n_type
== old_child
then
1423 if new_child
!= null then
1424 new_child
.parent
= self
1425 assert new_child
isa AType
1432 if _n_annotations
== old_child
then
1433 if new_child
!= null then
1434 new_child
.parent
= self
1435 assert new_child
isa AAnnotations
1436 _n_annotations
= new_child
1438 _n_annotations
= null
1442 if _n_expr
== old_child
then
1443 if new_child
!= null then
1444 new_child
.parent
= self
1445 assert new_child
isa AExpr
1454 redef fun n_doc
=(node
)
1457 if node
!= null then
1461 redef fun n_readable
=(node
)
1464 if node
!= null then
1468 redef fun n_writable
=(node
)
1471 if node
!= null then
1475 redef fun n_kwredef
=(node
)
1478 if node
!= null then
1482 redef fun n_visibility
=(node
)
1484 _n_visibility
= node
1487 redef fun n_kwvar
=(node
)
1492 redef fun n_id
=(node
)
1495 if node
!= null then
1499 redef fun n_id2
=(node
)
1502 if node
!= null then
1506 redef fun n_type
=(node
)
1509 if node
!= null then
1513 redef fun n_annotations
=(node
)
1515 _n_annotations
= node
1516 if node
!= null then
1520 redef fun n_expr
=(node
)
1523 if node
!= null then
1529 redef fun visit_all
(v
: Visitor)
1531 if _n_doc
!= null then
1532 v
.enter_visit
(_n_doc
.as(not null))
1534 if _n_readable
!= null then
1535 v
.enter_visit
(_n_readable
.as(not null))
1537 if _n_writable
!= null then
1538 v
.enter_visit
(_n_writable
.as(not null))
1540 if _n_kwredef
!= null then
1541 v
.enter_visit
(_n_kwredef
.as(not null))
1543 v
.enter_visit
(_n_visibility
)
1544 v
.enter_visit
(_n_kwvar
)
1545 if _n_id
!= null then
1546 v
.enter_visit
(_n_id
.as(not null))
1548 if _n_id2
!= null then
1549 v
.enter_visit
(_n_id2
.as(not null))
1551 if _n_type
!= null then
1552 v
.enter_visit
(_n_type
.as(not null))
1554 if _n_annotations
!= null then
1555 v
.enter_visit
(_n_annotations
.as(not null))
1557 if _n_expr
!= null then
1558 v
.enter_visit
(_n_expr
.as(not null))
1562 redef class AMethPropdef
1563 private init empty_init
do end
1565 init init_amethpropdef
(
1566 n_doc
: nullable ADoc,
1567 n_kwredef
: nullable TKwredef,
1568 n_visibility
: nullable AVisibility,
1569 n_methid
: nullable AMethid,
1570 n_signature
: nullable ASignature
1575 if n_doc
!= null then
1578 _n_kwredef
= n_kwredef
1579 if n_kwredef
!= null then
1580 n_kwredef
.parent
= self
1582 _n_visibility
= n_visibility
.as(not null)
1583 n_visibility
.parent
= self
1584 _n_methid
= n_methid
.as(not null)
1585 n_methid
.parent
= self
1586 _n_signature
= n_signature
.as(not null)
1587 n_signature
.parent
= self
1590 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1592 if _n_doc
== old_child
then
1593 if new_child
!= null then
1594 new_child
.parent
= self
1595 assert new_child
isa ADoc
1602 if _n_kwredef
== old_child
then
1603 if new_child
!= null then
1604 new_child
.parent
= self
1605 assert new_child
isa TKwredef
1606 _n_kwredef
= new_child
1612 if _n_visibility
== old_child
then
1613 if new_child
!= null then
1614 new_child
.parent
= self
1615 assert new_child
isa AVisibility
1616 _n_visibility
= new_child
1622 if _n_methid
== old_child
then
1623 if new_child
!= null then
1624 new_child
.parent
= self
1625 assert new_child
isa AMethid
1626 _n_methid
= new_child
1632 if _n_signature
== old_child
then
1633 if new_child
!= null then
1634 new_child
.parent
= self
1635 assert new_child
isa ASignature
1636 _n_signature
= new_child
1644 redef fun n_doc
=(node
)
1647 if node
!= null then
1651 redef fun n_kwredef
=(node
)
1654 if node
!= null then
1658 redef fun n_visibility
=(node
)
1660 _n_visibility
= node
1663 redef fun n_methid
=(node
)
1668 redef fun n_signature
=(node
)
1675 redef fun visit_all
(v
: Visitor)
1677 if _n_doc
!= null then
1678 v
.enter_visit
(_n_doc
.as(not null))
1680 if _n_kwredef
!= null then
1681 v
.enter_visit
(_n_kwredef
.as(not null))
1683 v
.enter_visit
(_n_visibility
)
1684 v
.enter_visit
(_n_methid
)
1685 v
.enter_visit
(_n_signature
)
1688 redef class ADeferredMethPropdef
1689 private init empty_init
do end
1691 init init_adeferredmethpropdef
(
1692 n_doc
: nullable ADoc,
1693 n_kwredef
: nullable TKwredef,
1694 n_visibility
: nullable AVisibility,
1695 n_kwmeth
: nullable TKwmeth,
1696 n_methid
: nullable AMethid,
1697 n_signature
: nullable ASignature,
1698 n_annotations
: nullable AAnnotations
1703 if n_doc
!= null then
1706 _n_kwredef
= n_kwredef
1707 if n_kwredef
!= null then
1708 n_kwredef
.parent
= self
1710 _n_visibility
= n_visibility
.as(not null)
1711 n_visibility
.parent
= self
1712 _n_kwmeth
= n_kwmeth
.as(not null)
1713 n_kwmeth
.parent
= self
1714 _n_methid
= n_methid
.as(not null)
1715 n_methid
.parent
= self
1716 _n_signature
= n_signature
.as(not null)
1717 n_signature
.parent
= self
1718 _n_annotations
= n_annotations
1719 if n_annotations
!= null then
1720 n_annotations
.parent
= self
1724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1726 if _n_doc
== old_child
then
1727 if new_child
!= null then
1728 new_child
.parent
= self
1729 assert new_child
isa ADoc
1736 if _n_kwredef
== old_child
then
1737 if new_child
!= null then
1738 new_child
.parent
= self
1739 assert new_child
isa TKwredef
1740 _n_kwredef
= new_child
1746 if _n_visibility
== old_child
then
1747 if new_child
!= null then
1748 new_child
.parent
= self
1749 assert new_child
isa AVisibility
1750 _n_visibility
= new_child
1756 if _n_kwmeth
== old_child
then
1757 if new_child
!= null then
1758 new_child
.parent
= self
1759 assert new_child
isa TKwmeth
1760 _n_kwmeth
= new_child
1766 if _n_methid
== old_child
then
1767 if new_child
!= null then
1768 new_child
.parent
= self
1769 assert new_child
isa AMethid
1770 _n_methid
= new_child
1776 if _n_signature
== old_child
then
1777 if new_child
!= null then
1778 new_child
.parent
= self
1779 assert new_child
isa ASignature
1780 _n_signature
= new_child
1786 if _n_annotations
== old_child
then
1787 if new_child
!= null then
1788 new_child
.parent
= self
1789 assert new_child
isa AAnnotations
1790 _n_annotations
= new_child
1792 _n_annotations
= null
1798 redef fun n_doc
=(node
)
1801 if node
!= null then
1805 redef fun n_kwredef
=(node
)
1808 if node
!= null then
1812 redef fun n_visibility
=(node
)
1814 _n_visibility
= node
1817 redef fun n_kwmeth
=(node
)
1822 redef fun n_methid
=(node
)
1827 redef fun n_signature
=(node
)
1832 redef fun n_annotations
=(node
)
1834 _n_annotations
= node
1835 if node
!= null then
1841 redef fun visit_all
(v
: Visitor)
1843 if _n_doc
!= null then
1844 v
.enter_visit
(_n_doc
.as(not null))
1846 if _n_kwredef
!= null then
1847 v
.enter_visit
(_n_kwredef
.as(not null))
1849 v
.enter_visit
(_n_visibility
)
1850 v
.enter_visit
(_n_kwmeth
)
1851 v
.enter_visit
(_n_methid
)
1852 v
.enter_visit
(_n_signature
)
1853 if _n_annotations
!= null then
1854 v
.enter_visit
(_n_annotations
.as(not null))
1858 redef class AInternMethPropdef
1859 private init empty_init
do end
1861 init init_ainternmethpropdef
(
1862 n_doc
: nullable ADoc,
1863 n_kwredef
: nullable TKwredef,
1864 n_visibility
: nullable AVisibility,
1865 n_kwmeth
: nullable TKwmeth,
1866 n_methid
: nullable AMethid,
1867 n_signature
: nullable ASignature
1872 if n_doc
!= null then
1875 _n_kwredef
= n_kwredef
1876 if n_kwredef
!= null then
1877 n_kwredef
.parent
= self
1879 _n_visibility
= n_visibility
.as(not null)
1880 n_visibility
.parent
= self
1881 _n_kwmeth
= n_kwmeth
.as(not null)
1882 n_kwmeth
.parent
= self
1883 _n_methid
= n_methid
.as(not null)
1884 n_methid
.parent
= self
1885 _n_signature
= n_signature
.as(not null)
1886 n_signature
.parent
= self
1889 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1891 if _n_doc
== old_child
then
1892 if new_child
!= null then
1893 new_child
.parent
= self
1894 assert new_child
isa ADoc
1901 if _n_kwredef
== old_child
then
1902 if new_child
!= null then
1903 new_child
.parent
= self
1904 assert new_child
isa TKwredef
1905 _n_kwredef
= new_child
1911 if _n_visibility
== old_child
then
1912 if new_child
!= null then
1913 new_child
.parent
= self
1914 assert new_child
isa AVisibility
1915 _n_visibility
= new_child
1921 if _n_kwmeth
== old_child
then
1922 if new_child
!= null then
1923 new_child
.parent
= self
1924 assert new_child
isa TKwmeth
1925 _n_kwmeth
= new_child
1931 if _n_methid
== old_child
then
1932 if new_child
!= null then
1933 new_child
.parent
= self
1934 assert new_child
isa AMethid
1935 _n_methid
= new_child
1941 if _n_signature
== old_child
then
1942 if new_child
!= null then
1943 new_child
.parent
= self
1944 assert new_child
isa ASignature
1945 _n_signature
= new_child
1953 redef fun n_doc
=(node
)
1956 if node
!= null then
1960 redef fun n_kwredef
=(node
)
1963 if node
!= null then
1967 redef fun n_visibility
=(node
)
1969 _n_visibility
= node
1972 redef fun n_kwmeth
=(node
)
1977 redef fun n_methid
=(node
)
1982 redef fun n_signature
=(node
)
1989 redef fun visit_all
(v
: Visitor)
1991 if _n_doc
!= null then
1992 v
.enter_visit
(_n_doc
.as(not null))
1994 if _n_kwredef
!= null then
1995 v
.enter_visit
(_n_kwredef
.as(not null))
1997 v
.enter_visit
(_n_visibility
)
1998 v
.enter_visit
(_n_kwmeth
)
1999 v
.enter_visit
(_n_methid
)
2000 v
.enter_visit
(_n_signature
)
2003 redef class AExternMethPropdef
2004 private init empty_init
do end
2006 init init_aexternmethpropdef
(
2007 n_doc
: nullable ADoc,
2008 n_kwredef
: nullable TKwredef,
2009 n_visibility
: nullable AVisibility,
2010 n_kwmeth
: nullable TKwmeth,
2011 n_methid
: nullable AMethid,
2012 n_signature
: nullable ASignature,
2013 n_extern
: nullable TString,
2014 n_extern_calls
: nullable AExternCalls,
2015 n_extern_code_block
: nullable AExternCodeBlock
2020 if n_doc
!= null then
2023 _n_kwredef
= n_kwredef
2024 if n_kwredef
!= null then
2025 n_kwredef
.parent
= self
2027 _n_visibility
= n_visibility
.as(not null)
2028 n_visibility
.parent
= self
2029 _n_kwmeth
= n_kwmeth
.as(not null)
2030 n_kwmeth
.parent
= self
2031 _n_methid
= n_methid
.as(not null)
2032 n_methid
.parent
= self
2033 _n_signature
= n_signature
.as(not null)
2034 n_signature
.parent
= self
2035 _n_extern
= n_extern
2036 if n_extern
!= null then
2037 n_extern
.parent
= self
2039 _n_extern_calls
= n_extern_calls
2040 if n_extern_calls
!= null then
2041 n_extern_calls
.parent
= self
2043 _n_extern_code_block
= n_extern_code_block
2044 if n_extern_code_block
!= null then
2045 n_extern_code_block
.parent
= self
2049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2051 if _n_doc
== old_child
then
2052 if new_child
!= null then
2053 new_child
.parent
= self
2054 assert new_child
isa ADoc
2061 if _n_kwredef
== old_child
then
2062 if new_child
!= null then
2063 new_child
.parent
= self
2064 assert new_child
isa TKwredef
2065 _n_kwredef
= new_child
2071 if _n_visibility
== old_child
then
2072 if new_child
!= null then
2073 new_child
.parent
= self
2074 assert new_child
isa AVisibility
2075 _n_visibility
= new_child
2081 if _n_kwmeth
== old_child
then
2082 if new_child
!= null then
2083 new_child
.parent
= self
2084 assert new_child
isa TKwmeth
2085 _n_kwmeth
= new_child
2091 if _n_methid
== old_child
then
2092 if new_child
!= null then
2093 new_child
.parent
= self
2094 assert new_child
isa AMethid
2095 _n_methid
= new_child
2101 if _n_signature
== old_child
then
2102 if new_child
!= null then
2103 new_child
.parent
= self
2104 assert new_child
isa ASignature
2105 _n_signature
= new_child
2111 if _n_extern
== old_child
then
2112 if new_child
!= null then
2113 new_child
.parent
= self
2114 assert new_child
isa TString
2115 _n_extern
= new_child
2121 if _n_extern_calls
== old_child
then
2122 if new_child
!= null then
2123 new_child
.parent
= self
2124 assert new_child
isa AExternCalls
2125 _n_extern_calls
= new_child
2127 _n_extern_calls
= null
2131 if _n_extern_code_block
== old_child
then
2132 if new_child
!= null then
2133 new_child
.parent
= self
2134 assert new_child
isa AExternCodeBlock
2135 _n_extern_code_block
= new_child
2137 _n_extern_code_block
= null
2143 redef fun n_doc
=(node
)
2146 if node
!= null then
2150 redef fun n_kwredef
=(node
)
2153 if node
!= null then
2157 redef fun n_visibility
=(node
)
2159 _n_visibility
= node
2162 redef fun n_kwmeth
=(node
)
2167 redef fun n_methid
=(node
)
2172 redef fun n_signature
=(node
)
2177 redef fun n_extern
=(node
)
2180 if node
!= null then
2184 redef fun n_extern_calls
=(node
)
2186 _n_extern_calls
= node
2187 if node
!= null then
2191 redef fun n_extern_code_block
=(node
)
2193 _n_extern_code_block
= node
2194 if node
!= null then
2200 redef fun visit_all
(v
: Visitor)
2202 if _n_doc
!= null then
2203 v
.enter_visit
(_n_doc
.as(not null))
2205 if _n_kwredef
!= null then
2206 v
.enter_visit
(_n_kwredef
.as(not null))
2208 v
.enter_visit
(_n_visibility
)
2209 v
.enter_visit
(_n_kwmeth
)
2210 v
.enter_visit
(_n_methid
)
2211 v
.enter_visit
(_n_signature
)
2212 if _n_extern
!= null then
2213 v
.enter_visit
(_n_extern
.as(not null))
2215 if _n_extern_calls
!= null then
2216 v
.enter_visit
(_n_extern_calls
.as(not null))
2218 if _n_extern_code_block
!= null then
2219 v
.enter_visit
(_n_extern_code_block
.as(not null))
2223 redef class AConcreteMethPropdef
2224 private init empty_init
do end
2226 init init_aconcretemethpropdef
(
2227 n_doc
: nullable ADoc,
2228 n_kwredef
: nullable TKwredef,
2229 n_visibility
: nullable AVisibility,
2230 n_kwmeth
: nullable TKwmeth,
2231 n_methid
: nullable AMethid,
2232 n_signature
: nullable ASignature,
2233 n_annotations
: nullable AAnnotations,
2234 n_block
: nullable AExpr
2239 if n_doc
!= null then
2242 _n_kwredef
= n_kwredef
2243 if n_kwredef
!= null then
2244 n_kwredef
.parent
= self
2246 _n_visibility
= n_visibility
.as(not null)
2247 n_visibility
.parent
= self
2248 _n_kwmeth
= n_kwmeth
.as(not null)
2249 n_kwmeth
.parent
= self
2250 _n_methid
= n_methid
.as(not null)
2251 n_methid
.parent
= self
2252 _n_signature
= n_signature
.as(not null)
2253 n_signature
.parent
= self
2254 _n_annotations
= n_annotations
2255 if n_annotations
!= null then
2256 n_annotations
.parent
= self
2259 if n_block
!= null then
2260 n_block
.parent
= self
2264 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2266 if _n_doc
== old_child
then
2267 if new_child
!= null then
2268 new_child
.parent
= self
2269 assert new_child
isa ADoc
2276 if _n_kwredef
== old_child
then
2277 if new_child
!= null then
2278 new_child
.parent
= self
2279 assert new_child
isa TKwredef
2280 _n_kwredef
= new_child
2286 if _n_visibility
== old_child
then
2287 if new_child
!= null then
2288 new_child
.parent
= self
2289 assert new_child
isa AVisibility
2290 _n_visibility
= new_child
2296 if _n_kwmeth
== old_child
then
2297 if new_child
!= null then
2298 new_child
.parent
= self
2299 assert new_child
isa TKwmeth
2300 _n_kwmeth
= new_child
2306 if _n_methid
== old_child
then
2307 if new_child
!= null then
2308 new_child
.parent
= self
2309 assert new_child
isa AMethid
2310 _n_methid
= new_child
2316 if _n_signature
== old_child
then
2317 if new_child
!= null then
2318 new_child
.parent
= self
2319 assert new_child
isa ASignature
2320 _n_signature
= new_child
2326 if _n_annotations
== old_child
then
2327 if new_child
!= null then
2328 new_child
.parent
= self
2329 assert new_child
isa AAnnotations
2330 _n_annotations
= new_child
2332 _n_annotations
= null
2336 if _n_block
== old_child
then
2337 if new_child
!= null then
2338 new_child
.parent
= self
2339 assert new_child
isa AExpr
2340 _n_block
= new_child
2348 redef fun n_doc
=(node
)
2351 if node
!= null then
2355 redef fun n_kwredef
=(node
)
2358 if node
!= null then
2362 redef fun n_visibility
=(node
)
2364 _n_visibility
= node
2367 redef fun n_kwmeth
=(node
)
2372 redef fun n_methid
=(node
)
2377 redef fun n_signature
=(node
)
2382 redef fun n_annotations
=(node
)
2384 _n_annotations
= node
2385 if node
!= null then
2389 redef fun n_block
=(node
)
2392 if node
!= null then
2398 redef fun visit_all
(v
: Visitor)
2400 if _n_doc
!= null then
2401 v
.enter_visit
(_n_doc
.as(not null))
2403 if _n_kwredef
!= null then
2404 v
.enter_visit
(_n_kwredef
.as(not null))
2406 v
.enter_visit
(_n_visibility
)
2407 v
.enter_visit
(_n_kwmeth
)
2408 v
.enter_visit
(_n_methid
)
2409 v
.enter_visit
(_n_signature
)
2410 if _n_annotations
!= null then
2411 v
.enter_visit
(_n_annotations
.as(not null))
2413 if _n_block
!= null then
2414 v
.enter_visit
(_n_block
.as(not null))
2418 redef class AConcreteInitPropdef
2419 private init empty_init
do end
2421 init init_aconcreteinitpropdef
(
2422 n_doc
: nullable ADoc,
2423 n_kwredef
: nullable TKwredef,
2424 n_visibility
: nullable AVisibility,
2425 n_kwinit
: nullable TKwinit,
2426 n_methid
: nullable AMethid,
2427 n_signature
: nullable ASignature,
2428 n_annotations
: nullable AAnnotations,
2429 n_block
: nullable AExpr
2434 if n_doc
!= null then
2437 _n_kwredef
= n_kwredef
2438 if n_kwredef
!= null then
2439 n_kwredef
.parent
= self
2441 _n_visibility
= n_visibility
.as(not null)
2442 n_visibility
.parent
= self
2443 _n_kwinit
= n_kwinit
.as(not null)
2444 n_kwinit
.parent
= self
2445 _n_methid
= n_methid
2446 if n_methid
!= null then
2447 n_methid
.parent
= self
2449 _n_signature
= n_signature
.as(not null)
2450 n_signature
.parent
= self
2451 _n_annotations
= n_annotations
2452 if n_annotations
!= null then
2453 n_annotations
.parent
= self
2456 if n_block
!= null then
2457 n_block
.parent
= self
2461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2463 if _n_doc
== old_child
then
2464 if new_child
!= null then
2465 new_child
.parent
= self
2466 assert new_child
isa ADoc
2473 if _n_kwredef
== old_child
then
2474 if new_child
!= null then
2475 new_child
.parent
= self
2476 assert new_child
isa TKwredef
2477 _n_kwredef
= new_child
2483 if _n_visibility
== old_child
then
2484 if new_child
!= null then
2485 new_child
.parent
= self
2486 assert new_child
isa AVisibility
2487 _n_visibility
= new_child
2493 if _n_kwinit
== old_child
then
2494 if new_child
!= null then
2495 new_child
.parent
= self
2496 assert new_child
isa TKwinit
2497 _n_kwinit
= new_child
2503 if _n_methid
== old_child
then
2504 if new_child
!= null then
2505 new_child
.parent
= self
2506 assert new_child
isa AMethid
2507 _n_methid
= new_child
2513 if _n_signature
== old_child
then
2514 if new_child
!= null then
2515 new_child
.parent
= self
2516 assert new_child
isa ASignature
2517 _n_signature
= new_child
2523 if _n_annotations
== old_child
then
2524 if new_child
!= null then
2525 new_child
.parent
= self
2526 assert new_child
isa AAnnotations
2527 _n_annotations
= new_child
2529 _n_annotations
= null
2533 if _n_block
== old_child
then
2534 if new_child
!= null then
2535 new_child
.parent
= self
2536 assert new_child
isa AExpr
2537 _n_block
= new_child
2545 redef fun n_doc
=(node
)
2548 if node
!= null then
2552 redef fun n_kwredef
=(node
)
2555 if node
!= null then
2559 redef fun n_visibility
=(node
)
2561 _n_visibility
= node
2564 redef fun n_kwinit
=(node
)
2569 redef fun n_methid
=(node
)
2572 if node
!= null then
2576 redef fun n_signature
=(node
)
2581 redef fun n_annotations
=(node
)
2583 _n_annotations
= node
2584 if node
!= null then
2588 redef fun n_block
=(node
)
2591 if node
!= null then
2597 redef fun visit_all
(v
: Visitor)
2599 if _n_doc
!= null then
2600 v
.enter_visit
(_n_doc
.as(not null))
2602 if _n_kwredef
!= null then
2603 v
.enter_visit
(_n_kwredef
.as(not null))
2605 v
.enter_visit
(_n_visibility
)
2606 v
.enter_visit
(_n_kwinit
)
2607 if _n_methid
!= null then
2608 v
.enter_visit
(_n_methid
.as(not null))
2610 v
.enter_visit
(_n_signature
)
2611 if _n_annotations
!= null then
2612 v
.enter_visit
(_n_annotations
.as(not null))
2614 if _n_block
!= null then
2615 v
.enter_visit
(_n_block
.as(not null))
2619 redef class AExternInitPropdef
2620 private init empty_init
do end
2622 init init_aexterninitpropdef
(
2623 n_doc
: nullable ADoc,
2624 n_kwredef
: nullable TKwredef,
2625 n_visibility
: nullable AVisibility,
2626 n_kwnew
: nullable TKwnew,
2627 n_methid
: nullable AMethid,
2628 n_signature
: nullable ASignature,
2629 n_extern
: nullable TString,
2630 n_extern_calls
: nullable AExternCalls,
2631 n_extern_code_block
: nullable AExternCodeBlock
2636 if n_doc
!= null then
2639 _n_kwredef
= n_kwredef
2640 if n_kwredef
!= null then
2641 n_kwredef
.parent
= self
2643 _n_visibility
= n_visibility
.as(not null)
2644 n_visibility
.parent
= self
2645 _n_kwnew
= n_kwnew
.as(not null)
2646 n_kwnew
.parent
= self
2647 _n_methid
= n_methid
2648 if n_methid
!= null then
2649 n_methid
.parent
= self
2651 _n_signature
= n_signature
.as(not null)
2652 n_signature
.parent
= self
2653 _n_extern
= n_extern
2654 if n_extern
!= null then
2655 n_extern
.parent
= self
2657 _n_extern_calls
= n_extern_calls
2658 if n_extern_calls
!= null then
2659 n_extern_calls
.parent
= self
2661 _n_extern_code_block
= n_extern_code_block
2662 if n_extern_code_block
!= null then
2663 n_extern_code_block
.parent
= self
2667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2669 if _n_doc
== old_child
then
2670 if new_child
!= null then
2671 new_child
.parent
= self
2672 assert new_child
isa ADoc
2679 if _n_kwredef
== old_child
then
2680 if new_child
!= null then
2681 new_child
.parent
= self
2682 assert new_child
isa TKwredef
2683 _n_kwredef
= new_child
2689 if _n_visibility
== old_child
then
2690 if new_child
!= null then
2691 new_child
.parent
= self
2692 assert new_child
isa AVisibility
2693 _n_visibility
= new_child
2699 if _n_kwnew
== old_child
then
2700 if new_child
!= null then
2701 new_child
.parent
= self
2702 assert new_child
isa TKwnew
2703 _n_kwnew
= new_child
2709 if _n_methid
== old_child
then
2710 if new_child
!= null then
2711 new_child
.parent
= self
2712 assert new_child
isa AMethid
2713 _n_methid
= new_child
2719 if _n_signature
== old_child
then
2720 if new_child
!= null then
2721 new_child
.parent
= self
2722 assert new_child
isa ASignature
2723 _n_signature
= new_child
2729 if _n_extern
== old_child
then
2730 if new_child
!= null then
2731 new_child
.parent
= self
2732 assert new_child
isa TString
2733 _n_extern
= new_child
2739 if _n_extern_calls
== old_child
then
2740 if new_child
!= null then
2741 new_child
.parent
= self
2742 assert new_child
isa AExternCalls
2743 _n_extern_calls
= new_child
2745 _n_extern_calls
= null
2749 if _n_extern_code_block
== old_child
then
2750 if new_child
!= null then
2751 new_child
.parent
= self
2752 assert new_child
isa AExternCodeBlock
2753 _n_extern_code_block
= new_child
2755 _n_extern_code_block
= null
2761 redef fun n_doc
=(node
)
2764 if node
!= null then
2768 redef fun n_kwredef
=(node
)
2771 if node
!= null then
2775 redef fun n_visibility
=(node
)
2777 _n_visibility
= node
2780 redef fun n_kwnew
=(node
)
2785 redef fun n_methid
=(node
)
2788 if node
!= null then
2792 redef fun n_signature
=(node
)
2797 redef fun n_extern
=(node
)
2800 if node
!= null then
2804 redef fun n_extern_calls
=(node
)
2806 _n_extern_calls
= node
2807 if node
!= null then
2811 redef fun n_extern_code_block
=(node
)
2813 _n_extern_code_block
= node
2814 if node
!= null then
2820 redef fun visit_all
(v
: Visitor)
2822 if _n_doc
!= null then
2823 v
.enter_visit
(_n_doc
.as(not null))
2825 if _n_kwredef
!= null then
2826 v
.enter_visit
(_n_kwredef
.as(not null))
2828 v
.enter_visit
(_n_visibility
)
2829 v
.enter_visit
(_n_kwnew
)
2830 if _n_methid
!= null then
2831 v
.enter_visit
(_n_methid
.as(not null))
2833 v
.enter_visit
(_n_signature
)
2834 if _n_extern
!= null then
2835 v
.enter_visit
(_n_extern
.as(not null))
2837 if _n_extern_calls
!= null then
2838 v
.enter_visit
(_n_extern_calls
.as(not null))
2840 if _n_extern_code_block
!= null then
2841 v
.enter_visit
(_n_extern_code_block
.as(not null))
2845 redef class AMainMethPropdef
2846 private init empty_init
do end
2848 init init_amainmethpropdef
(
2849 n_kwredef
: nullable TKwredef,
2850 n_block
: nullable AExpr
2854 _n_kwredef
= n_kwredef
2855 if n_kwredef
!= null then
2856 n_kwredef
.parent
= self
2859 if n_block
!= null then
2860 n_block
.parent
= self
2864 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2866 if _n_kwredef
== old_child
then
2867 if new_child
!= null then
2868 new_child
.parent
= self
2869 assert new_child
isa TKwredef
2870 _n_kwredef
= new_child
2876 if _n_block
== old_child
then
2877 if new_child
!= null then
2878 new_child
.parent
= self
2879 assert new_child
isa AExpr
2880 _n_block
= new_child
2888 redef fun n_kwredef
=(node
)
2891 if node
!= null then
2895 redef fun n_block
=(node
)
2898 if node
!= null then
2904 redef fun visit_all
(v
: Visitor)
2906 if _n_kwredef
!= null then
2907 v
.enter_visit
(_n_kwredef
.as(not null))
2909 if _n_block
!= null then
2910 v
.enter_visit
(_n_block
.as(not null))
2914 redef class ATypePropdef
2915 private init empty_init
do end
2917 init init_atypepropdef
(
2918 n_doc
: nullable ADoc,
2919 n_kwredef
: nullable TKwredef,
2920 n_visibility
: nullable AVisibility,
2921 n_kwtype
: nullable TKwtype,
2922 n_id
: nullable TClassid,
2923 n_type
: nullable AType,
2924 n_annotations
: nullable AAnnotations
2929 if n_doc
!= null then
2932 _n_kwredef
= n_kwredef
2933 if n_kwredef
!= null then
2934 n_kwredef
.parent
= self
2936 _n_visibility
= n_visibility
.as(not null)
2937 n_visibility
.parent
= self
2938 _n_kwtype
= n_kwtype
.as(not null)
2939 n_kwtype
.parent
= self
2940 _n_id
= n_id
.as(not null)
2942 _n_type
= n_type
.as(not null)
2943 n_type
.parent
= self
2944 _n_annotations
= n_annotations
2945 if n_annotations
!= null then
2946 n_annotations
.parent
= self
2950 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2952 if _n_doc
== old_child
then
2953 if new_child
!= null then
2954 new_child
.parent
= self
2955 assert new_child
isa ADoc
2962 if _n_kwredef
== old_child
then
2963 if new_child
!= null then
2964 new_child
.parent
= self
2965 assert new_child
isa TKwredef
2966 _n_kwredef
= new_child
2972 if _n_visibility
== old_child
then
2973 if new_child
!= null then
2974 new_child
.parent
= self
2975 assert new_child
isa AVisibility
2976 _n_visibility
= new_child
2982 if _n_kwtype
== old_child
then
2983 if new_child
!= null then
2984 new_child
.parent
= self
2985 assert new_child
isa TKwtype
2986 _n_kwtype
= new_child
2992 if _n_id
== old_child
then
2993 if new_child
!= null then
2994 new_child
.parent
= self
2995 assert new_child
isa TClassid
3002 if _n_type
== old_child
then
3003 if new_child
!= null then
3004 new_child
.parent
= self
3005 assert new_child
isa AType
3012 if _n_annotations
== old_child
then
3013 if new_child
!= null then
3014 new_child
.parent
= self
3015 assert new_child
isa AAnnotations
3016 _n_annotations
= new_child
3018 _n_annotations
= null
3024 redef fun n_doc
=(node
)
3027 if node
!= null then
3031 redef fun n_kwredef
=(node
)
3034 if node
!= null then
3038 redef fun n_visibility
=(node
)
3040 _n_visibility
= node
3043 redef fun n_kwtype
=(node
)
3048 redef fun n_id
=(node
)
3053 redef fun n_type
=(node
)
3058 redef fun n_annotations
=(node
)
3060 _n_annotations
= node
3061 if node
!= null then
3067 redef fun visit_all
(v
: Visitor)
3069 if _n_doc
!= null then
3070 v
.enter_visit
(_n_doc
.as(not null))
3072 if _n_kwredef
!= null then
3073 v
.enter_visit
(_n_kwredef
.as(not null))
3075 v
.enter_visit
(_n_visibility
)
3076 v
.enter_visit
(_n_kwtype
)
3077 v
.enter_visit
(_n_id
)
3078 v
.enter_visit
(_n_type
)
3079 if _n_annotations
!= null then
3080 v
.enter_visit
(_n_annotations
.as(not null))
3084 redef class AReadAble
3085 private init empty_init
do end
3087 init init_areadable
(
3088 n_kwredef
: nullable TKwredef,
3089 n_kwreadable
: nullable TKwreadable
3093 _n_kwredef
= n_kwredef
3094 if n_kwredef
!= null then
3095 n_kwredef
.parent
= self
3097 _n_kwreadable
= n_kwreadable
.as(not null)
3098 n_kwreadable
.parent
= self
3101 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3103 if _n_kwredef
== old_child
then
3104 if new_child
!= null then
3105 new_child
.parent
= self
3106 assert new_child
isa TKwredef
3107 _n_kwredef
= new_child
3113 if _n_kwreadable
== old_child
then
3114 if new_child
!= null then
3115 new_child
.parent
= self
3116 assert new_child
isa TKwreadable
3117 _n_kwreadable
= new_child
3125 redef fun n_kwredef
=(node
)
3128 if node
!= null then
3132 redef fun n_kwreadable
=(node
)
3134 _n_kwreadable
= node
3139 redef fun visit_all
(v
: Visitor)
3141 if _n_kwredef
!= null then
3142 v
.enter_visit
(_n_kwredef
.as(not null))
3144 v
.enter_visit
(_n_kwreadable
)
3147 redef class AWriteAble
3148 private init empty_init
do end
3150 init init_awriteable
(
3151 n_kwredef
: nullable TKwredef,
3152 n_visibility
: nullable AVisibility,
3153 n_kwwritable
: nullable TKwwritable
3157 _n_kwredef
= n_kwredef
3158 if n_kwredef
!= null then
3159 n_kwredef
.parent
= self
3161 _n_visibility
= n_visibility
3162 if n_visibility
!= null then
3163 n_visibility
.parent
= self
3165 _n_kwwritable
= n_kwwritable
.as(not null)
3166 n_kwwritable
.parent
= self
3169 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3171 if _n_kwredef
== old_child
then
3172 if new_child
!= null then
3173 new_child
.parent
= self
3174 assert new_child
isa TKwredef
3175 _n_kwredef
= new_child
3181 if _n_visibility
== old_child
then
3182 if new_child
!= null then
3183 new_child
.parent
= self
3184 assert new_child
isa AVisibility
3185 _n_visibility
= new_child
3187 _n_visibility
= null
3191 if _n_kwwritable
== old_child
then
3192 if new_child
!= null then
3193 new_child
.parent
= self
3194 assert new_child
isa TKwwritable
3195 _n_kwwritable
= new_child
3203 redef fun n_kwredef
=(node
)
3206 if node
!= null then
3210 redef fun n_visibility
=(node
)
3212 _n_visibility
= node
3213 if node
!= null then
3217 redef fun n_kwwritable
=(node
)
3219 _n_kwwritable
= node
3224 redef fun visit_all
(v
: Visitor)
3226 if _n_kwredef
!= null then
3227 v
.enter_visit
(_n_kwredef
.as(not null))
3229 if _n_visibility
!= null then
3230 v
.enter_visit
(_n_visibility
.as(not null))
3232 v
.enter_visit
(_n_kwwritable
)
3235 redef class AIdMethid
3236 private init empty_init
do end
3238 init init_aidmethid
(
3243 _n_id
= n_id
.as(not null)
3247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3249 if _n_id
== old_child
then
3250 if new_child
!= null then
3251 new_child
.parent
= self
3252 assert new_child
isa TId
3261 redef fun n_id
=(node
)
3268 redef fun visit_all
(v
: Visitor)
3270 v
.enter_visit
(_n_id
)
3273 redef class APlusMethid
3274 private init empty_init
do end
3276 init init_aplusmethid
(
3277 n_plus
: nullable TPlus
3281 _n_plus
= n_plus
.as(not null)
3282 n_plus
.parent
= self
3285 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3287 if _n_plus
== old_child
then
3288 if new_child
!= null then
3289 new_child
.parent
= self
3290 assert new_child
isa TPlus
3299 redef fun n_plus
=(node
)
3306 redef fun visit_all
(v
: Visitor)
3308 v
.enter_visit
(_n_plus
)
3311 redef class AMinusMethid
3312 private init empty_init
do end
3314 init init_aminusmethid
(
3315 n_minus
: nullable TMinus
3319 _n_minus
= n_minus
.as(not null)
3320 n_minus
.parent
= self
3323 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3325 if _n_minus
== old_child
then
3326 if new_child
!= null then
3327 new_child
.parent
= self
3328 assert new_child
isa TMinus
3329 _n_minus
= new_child
3337 redef fun n_minus
=(node
)
3344 redef fun visit_all
(v
: Visitor)
3346 v
.enter_visit
(_n_minus
)
3349 redef class AStarMethid
3350 private init empty_init
do end
3352 init init_astarmethid
(
3353 n_star
: nullable TStar
3357 _n_star
= n_star
.as(not null)
3358 n_star
.parent
= self
3361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3363 if _n_star
== old_child
then
3364 if new_child
!= null then
3365 new_child
.parent
= self
3366 assert new_child
isa TStar
3375 redef fun n_star
=(node
)
3382 redef fun visit_all
(v
: Visitor)
3384 v
.enter_visit
(_n_star
)
3387 redef class ASlashMethid
3388 private init empty_init
do end
3390 init init_aslashmethid
(
3391 n_slash
: nullable TSlash
3395 _n_slash
= n_slash
.as(not null)
3396 n_slash
.parent
= self
3399 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3401 if _n_slash
== old_child
then
3402 if new_child
!= null then
3403 new_child
.parent
= self
3404 assert new_child
isa TSlash
3405 _n_slash
= new_child
3413 redef fun n_slash
=(node
)
3420 redef fun visit_all
(v
: Visitor)
3422 v
.enter_visit
(_n_slash
)
3425 redef class APercentMethid
3426 private init empty_init
do end
3428 init init_apercentmethid
(
3429 n_percent
: nullable TPercent
3433 _n_percent
= n_percent
.as(not null)
3434 n_percent
.parent
= self
3437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3439 if _n_percent
== old_child
then
3440 if new_child
!= null then
3441 new_child
.parent
= self
3442 assert new_child
isa TPercent
3443 _n_percent
= new_child
3451 redef fun n_percent
=(node
)
3458 redef fun visit_all
(v
: Visitor)
3460 v
.enter_visit
(_n_percent
)
3463 redef class AEqMethid
3464 private init empty_init
do end
3466 init init_aeqmethid
(
3471 _n_eq
= n_eq
.as(not null)
3475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3477 if _n_eq
== old_child
then
3478 if new_child
!= null then
3479 new_child
.parent
= self
3480 assert new_child
isa TEq
3489 redef fun n_eq
=(node
)
3496 redef fun visit_all
(v
: Visitor)
3498 v
.enter_visit
(_n_eq
)
3501 redef class ANeMethid
3502 private init empty_init
do end
3504 init init_anemethid
(
3509 _n_ne
= n_ne
.as(not null)
3513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3515 if _n_ne
== old_child
then
3516 if new_child
!= null then
3517 new_child
.parent
= self
3518 assert new_child
isa TNe
3527 redef fun n_ne
=(node
)
3534 redef fun visit_all
(v
: Visitor)
3536 v
.enter_visit
(_n_ne
)
3539 redef class ALeMethid
3540 private init empty_init
do end
3542 init init_alemethid
(
3547 _n_le
= n_le
.as(not null)
3551 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3553 if _n_le
== old_child
then
3554 if new_child
!= null then
3555 new_child
.parent
= self
3556 assert new_child
isa TLe
3565 redef fun n_le
=(node
)
3572 redef fun visit_all
(v
: Visitor)
3574 v
.enter_visit
(_n_le
)
3577 redef class AGeMethid
3578 private init empty_init
do end
3580 init init_agemethid
(
3585 _n_ge
= n_ge
.as(not null)
3589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3591 if _n_ge
== old_child
then
3592 if new_child
!= null then
3593 new_child
.parent
= self
3594 assert new_child
isa TGe
3603 redef fun n_ge
=(node
)
3610 redef fun visit_all
(v
: Visitor)
3612 v
.enter_visit
(_n_ge
)
3615 redef class ALtMethid
3616 private init empty_init
do end
3618 init init_altmethid
(
3623 _n_lt
= n_lt
.as(not null)
3627 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3629 if _n_lt
== old_child
then
3630 if new_child
!= null then
3631 new_child
.parent
= self
3632 assert new_child
isa TLt
3641 redef fun n_lt
=(node
)
3648 redef fun visit_all
(v
: Visitor)
3650 v
.enter_visit
(_n_lt
)
3653 redef class AGtMethid
3654 private init empty_init
do end
3656 init init_agtmethid
(
3661 _n_gt
= n_gt
.as(not null)
3665 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3667 if _n_gt
== old_child
then
3668 if new_child
!= null then
3669 new_child
.parent
= self
3670 assert new_child
isa TGt
3679 redef fun n_gt
=(node
)
3686 redef fun visit_all
(v
: Visitor)
3688 v
.enter_visit
(_n_gt
)
3691 redef class ALlMethid
3692 private init empty_init
do end
3694 init init_allmethid
(
3699 _n_ll
= n_ll
.as(not null)
3703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3705 if _n_ll
== old_child
then
3706 if new_child
!= null then
3707 new_child
.parent
= self
3708 assert new_child
isa TLl
3717 redef fun n_ll
=(node
)
3724 redef fun visit_all
(v
: Visitor)
3726 v
.enter_visit
(_n_ll
)
3729 redef class AGgMethid
3730 private init empty_init
do end
3732 init init_aggmethid
(
3737 _n_gg
= n_gg
.as(not null)
3741 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3743 if _n_gg
== old_child
then
3744 if new_child
!= null then
3745 new_child
.parent
= self
3746 assert new_child
isa TGg
3755 redef fun n_gg
=(node
)
3762 redef fun visit_all
(v
: Visitor)
3764 v
.enter_visit
(_n_gg
)
3767 redef class ABraMethid
3768 private init empty_init
do end
3770 init init_abramethid
(
3771 n_obra
: nullable TObra,
3772 n_cbra
: nullable TCbra
3776 _n_obra
= n_obra
.as(not null)
3777 n_obra
.parent
= self
3778 _n_cbra
= n_cbra
.as(not null)
3779 n_cbra
.parent
= self
3782 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3784 if _n_obra
== old_child
then
3785 if new_child
!= null then
3786 new_child
.parent
= self
3787 assert new_child
isa TObra
3794 if _n_cbra
== old_child
then
3795 if new_child
!= null then
3796 new_child
.parent
= self
3797 assert new_child
isa TCbra
3806 redef fun n_obra
=(node
)
3811 redef fun n_cbra
=(node
)
3818 redef fun visit_all
(v
: Visitor)
3820 v
.enter_visit
(_n_obra
)
3821 v
.enter_visit
(_n_cbra
)
3824 redef class AStarshipMethid
3825 private init empty_init
do end
3827 init init_astarshipmethid
(
3828 n_starship
: nullable TStarship
3832 _n_starship
= n_starship
.as(not null)
3833 n_starship
.parent
= self
3836 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3838 if _n_starship
== old_child
then
3839 if new_child
!= null then
3840 new_child
.parent
= self
3841 assert new_child
isa TStarship
3842 _n_starship
= new_child
3850 redef fun n_starship
=(node
)
3857 redef fun visit_all
(v
: Visitor)
3859 v
.enter_visit
(_n_starship
)
3862 redef class AAssignMethid
3863 private init empty_init
do end
3865 init init_aassignmethid
(
3867 n_assign
: nullable TAssign
3871 _n_id
= n_id
.as(not null)
3873 _n_assign
= n_assign
.as(not null)
3874 n_assign
.parent
= self
3877 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3879 if _n_id
== old_child
then
3880 if new_child
!= null then
3881 new_child
.parent
= self
3882 assert new_child
isa TId
3889 if _n_assign
== old_child
then
3890 if new_child
!= null then
3891 new_child
.parent
= self
3892 assert new_child
isa TAssign
3893 _n_assign
= new_child
3901 redef fun n_id
=(node
)
3906 redef fun n_assign
=(node
)
3913 redef fun visit_all
(v
: Visitor)
3915 v
.enter_visit
(_n_id
)
3916 v
.enter_visit
(_n_assign
)
3919 redef class ABraassignMethid
3920 private init empty_init
do end
3922 init init_abraassignmethid
(
3923 n_obra
: nullable TObra,
3924 n_cbra
: nullable TCbra,
3925 n_assign
: nullable TAssign
3929 _n_obra
= n_obra
.as(not null)
3930 n_obra
.parent
= self
3931 _n_cbra
= n_cbra
.as(not null)
3932 n_cbra
.parent
= self
3933 _n_assign
= n_assign
.as(not null)
3934 n_assign
.parent
= self
3937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3939 if _n_obra
== old_child
then
3940 if new_child
!= null then
3941 new_child
.parent
= self
3942 assert new_child
isa TObra
3949 if _n_cbra
== old_child
then
3950 if new_child
!= null then
3951 new_child
.parent
= self
3952 assert new_child
isa TCbra
3959 if _n_assign
== old_child
then
3960 if new_child
!= null then
3961 new_child
.parent
= self
3962 assert new_child
isa TAssign
3963 _n_assign
= new_child
3971 redef fun n_obra
=(node
)
3976 redef fun n_cbra
=(node
)
3981 redef fun n_assign
=(node
)
3988 redef fun visit_all
(v
: Visitor)
3990 v
.enter_visit
(_n_obra
)
3991 v
.enter_visit
(_n_cbra
)
3992 v
.enter_visit
(_n_assign
)
3995 redef class ASignature
3996 private init empty_init
do end
3998 init init_asignature
(
3999 n_opar
: nullable TOpar,
4000 n_params
: Collection[Object], # Should be Collection[AParam]
4001 n_cpar
: nullable TCpar,
4002 n_type
: nullable AType
4007 if n_opar
!= null then
4008 n_opar
.parent
= self
4010 for n
in n_params
do
4016 if n_cpar
!= null then
4017 n_cpar
.parent
= self
4020 if n_type
!= null then
4021 n_type
.parent
= self
4025 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4027 if _n_opar
== old_child
then
4028 if new_child
!= null then
4029 new_child
.parent
= self
4030 assert new_child
isa TOpar
4037 for i
in [0.._n_params
.length
[ do
4038 if _n_params
[i
] == old_child
then
4039 if new_child
!= null then
4040 assert new_child
isa AParam
4041 _n_params
[i
] = new_child
4042 new_child
.parent
= self
4044 _n_params
.remove_at
(i
)
4049 if _n_cpar
== old_child
then
4050 if new_child
!= null then
4051 new_child
.parent
= self
4052 assert new_child
isa TCpar
4059 if _n_type
== old_child
then
4060 if new_child
!= null then
4061 new_child
.parent
= self
4062 assert new_child
isa AType
4071 redef fun n_opar
=(node
)
4074 if node
!= null then
4078 redef fun n_cpar
=(node
)
4081 if node
!= null then
4085 redef fun n_type
=(node
)
4088 if node
!= null then
4094 redef fun visit_all
(v
: Visitor)
4096 if _n_opar
!= null then
4097 v
.enter_visit
(_n_opar
.as(not null))
4099 for n
in _n_params
do
4102 if _n_cpar
!= null then
4103 v
.enter_visit
(_n_cpar
.as(not null))
4105 if _n_type
!= null then
4106 v
.enter_visit
(_n_type
.as(not null))
4111 private init empty_init
do end
4115 n_type
: nullable AType,
4116 n_dotdotdot
: nullable TDotdotdot,
4117 n_annotations
: nullable AAnnotations
4121 _n_id
= n_id
.as(not null)
4124 if n_type
!= null then
4125 n_type
.parent
= self
4127 _n_dotdotdot
= n_dotdotdot
4128 if n_dotdotdot
!= null then
4129 n_dotdotdot
.parent
= self
4131 _n_annotations
= n_annotations
4132 if n_annotations
!= null then
4133 n_annotations
.parent
= self
4137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4139 if _n_id
== old_child
then
4140 if new_child
!= null then
4141 new_child
.parent
= self
4142 assert new_child
isa TId
4149 if _n_type
== old_child
then
4150 if new_child
!= null then
4151 new_child
.parent
= self
4152 assert new_child
isa AType
4159 if _n_dotdotdot
== old_child
then
4160 if new_child
!= null then
4161 new_child
.parent
= self
4162 assert new_child
isa TDotdotdot
4163 _n_dotdotdot
= new_child
4169 if _n_annotations
== old_child
then
4170 if new_child
!= null then
4171 new_child
.parent
= self
4172 assert new_child
isa AAnnotations
4173 _n_annotations
= new_child
4175 _n_annotations
= null
4181 redef fun n_id
=(node
)
4186 redef fun n_type
=(node
)
4189 if node
!= null then
4193 redef fun n_dotdotdot
=(node
)
4196 if node
!= null then
4200 redef fun n_annotations
=(node
)
4202 _n_annotations
= node
4203 if node
!= null then
4209 redef fun visit_all
(v
: Visitor)
4211 v
.enter_visit
(_n_id
)
4212 if _n_type
!= null then
4213 v
.enter_visit
(_n_type
.as(not null))
4215 if _n_dotdotdot
!= null then
4216 v
.enter_visit
(_n_dotdotdot
.as(not null))
4218 if _n_annotations
!= null then
4219 v
.enter_visit
(_n_annotations
.as(not null))
4224 private init empty_init
do end
4227 n_kwnullable
: nullable TKwnullable,
4228 n_id
: nullable TClassid,
4229 n_types
: Collection[Object], # Should be Collection[AType]
4230 n_annotations
: nullable AAnnotations
4234 _n_kwnullable
= n_kwnullable
4235 if n_kwnullable
!= null then
4236 n_kwnullable
.parent
= self
4238 _n_id
= n_id
.as(not null)
4245 _n_annotations
= n_annotations
4246 if n_annotations
!= null then
4247 n_annotations
.parent
= self
4251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4253 if _n_kwnullable
== old_child
then
4254 if new_child
!= null then
4255 new_child
.parent
= self
4256 assert new_child
isa TKwnullable
4257 _n_kwnullable
= new_child
4259 _n_kwnullable
= null
4263 if _n_id
== old_child
then
4264 if new_child
!= null then
4265 new_child
.parent
= self
4266 assert new_child
isa TClassid
4273 for i
in [0.._n_types
.length
[ do
4274 if _n_types
[i
] == old_child
then
4275 if new_child
!= null then
4276 assert new_child
isa AType
4277 _n_types
[i
] = new_child
4278 new_child
.parent
= self
4280 _n_types
.remove_at
(i
)
4285 if _n_annotations
== old_child
then
4286 if new_child
!= null then
4287 new_child
.parent
= self
4288 assert new_child
isa AAnnotations
4289 _n_annotations
= new_child
4291 _n_annotations
= null
4297 redef fun n_kwnullable
=(node
)
4299 _n_kwnullable
= node
4300 if node
!= null then
4304 redef fun n_id
=(node
)
4309 redef fun n_annotations
=(node
)
4311 _n_annotations
= node
4312 if node
!= null then
4318 redef fun visit_all
(v
: Visitor)
4320 if _n_kwnullable
!= null then
4321 v
.enter_visit
(_n_kwnullable
.as(not null))
4323 v
.enter_visit
(_n_id
)
4324 for n
in _n_types
do
4327 if _n_annotations
!= null then
4328 v
.enter_visit
(_n_annotations
.as(not null))
4333 private init empty_init
do end
4336 n_kwlabel
: nullable TKwlabel,
4341 _n_kwlabel
= n_kwlabel
.as(not null)
4342 n_kwlabel
.parent
= self
4343 _n_id
= n_id
.as(not null)
4347 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4349 if _n_kwlabel
== old_child
then
4350 if new_child
!= null then
4351 new_child
.parent
= self
4352 assert new_child
isa TKwlabel
4353 _n_kwlabel
= new_child
4359 if _n_id
== old_child
then
4360 if new_child
!= null then
4361 new_child
.parent
= self
4362 assert new_child
isa TId
4371 redef fun n_kwlabel
=(node
)
4376 redef fun n_id
=(node
)
4383 redef fun visit_all
(v
: Visitor)
4385 v
.enter_visit
(_n_kwlabel
)
4386 v
.enter_visit
(_n_id
)
4389 redef class ABlockExpr
4390 private init empty_init
do end
4392 init init_ablockexpr
(
4393 n_expr
: Collection[Object], # Should be Collection[AExpr]
4394 n_kwend
: nullable TKwend
4404 if n_kwend
!= null then
4405 n_kwend
.parent
= self
4409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4411 for i
in [0.._n_expr
.length
[ do
4412 if _n_expr
[i
] == old_child
then
4413 if new_child
!= null then
4414 assert new_child
isa AExpr
4415 _n_expr
[i
] = new_child
4416 new_child
.parent
= self
4418 _n_expr
.remove_at
(i
)
4423 if _n_kwend
== old_child
then
4424 if new_child
!= null then
4425 new_child
.parent
= self
4426 assert new_child
isa TKwend
4427 _n_kwend
= new_child
4435 redef fun n_kwend
=(node
)
4438 if node
!= null then
4444 redef fun visit_all
(v
: Visitor)
4449 if _n_kwend
!= null then
4450 v
.enter_visit
(_n_kwend
.as(not null))
4454 redef class AVardeclExpr
4455 private init empty_init
do end
4457 init init_avardeclexpr
(
4458 n_kwvar
: nullable TKwvar,
4460 n_type
: nullable AType,
4461 n_assign
: nullable TAssign,
4462 n_expr
: nullable AExpr,
4463 n_annotations
: nullable AAnnotations
4467 _n_kwvar
= n_kwvar
.as(not null)
4468 n_kwvar
.parent
= self
4469 _n_id
= n_id
.as(not null)
4472 if n_type
!= null then
4473 n_type
.parent
= self
4475 _n_assign
= n_assign
4476 if n_assign
!= null then
4477 n_assign
.parent
= self
4480 if n_expr
!= null then
4481 n_expr
.parent
= self
4483 _n_annotations
= n_annotations
4484 if n_annotations
!= null then
4485 n_annotations
.parent
= self
4489 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4491 if _n_kwvar
== old_child
then
4492 if new_child
!= null then
4493 new_child
.parent
= self
4494 assert new_child
isa TKwvar
4495 _n_kwvar
= new_child
4501 if _n_id
== old_child
then
4502 if new_child
!= null then
4503 new_child
.parent
= self
4504 assert new_child
isa TId
4511 if _n_type
== old_child
then
4512 if new_child
!= null then
4513 new_child
.parent
= self
4514 assert new_child
isa AType
4521 if _n_assign
== old_child
then
4522 if new_child
!= null then
4523 new_child
.parent
= self
4524 assert new_child
isa TAssign
4525 _n_assign
= new_child
4531 if _n_expr
== old_child
then
4532 if new_child
!= null then
4533 new_child
.parent
= self
4534 assert new_child
isa AExpr
4541 if _n_annotations
== old_child
then
4542 if new_child
!= null then
4543 new_child
.parent
= self
4544 assert new_child
isa AAnnotations
4545 _n_annotations
= new_child
4547 _n_annotations
= null
4553 redef fun n_kwvar
=(node
)
4558 redef fun n_id
=(node
)
4563 redef fun n_type
=(node
)
4566 if node
!= null then
4570 redef fun n_assign
=(node
)
4573 if node
!= null then
4577 redef fun n_expr
=(node
)
4580 if node
!= null then
4584 redef fun n_annotations
=(node
)
4586 _n_annotations
= node
4587 if node
!= null then
4593 redef fun visit_all
(v
: Visitor)
4595 v
.enter_visit
(_n_kwvar
)
4596 v
.enter_visit
(_n_id
)
4597 if _n_type
!= null then
4598 v
.enter_visit
(_n_type
.as(not null))
4600 if _n_assign
!= null then
4601 v
.enter_visit
(_n_assign
.as(not null))
4603 if _n_expr
!= null then
4604 v
.enter_visit
(_n_expr
.as(not null))
4606 if _n_annotations
!= null then
4607 v
.enter_visit
(_n_annotations
.as(not null))
4611 redef class AReturnExpr
4612 private init empty_init
do end
4614 init init_areturnexpr
(
4615 n_kwreturn
: nullable TKwreturn,
4616 n_expr
: nullable AExpr
4620 _n_kwreturn
= n_kwreturn
4621 if n_kwreturn
!= null then
4622 n_kwreturn
.parent
= self
4625 if n_expr
!= null then
4626 n_expr
.parent
= self
4630 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4632 if _n_kwreturn
== old_child
then
4633 if new_child
!= null then
4634 new_child
.parent
= self
4635 assert new_child
isa TKwreturn
4636 _n_kwreturn
= new_child
4642 if _n_expr
== old_child
then
4643 if new_child
!= null then
4644 new_child
.parent
= self
4645 assert new_child
isa AExpr
4654 redef fun n_kwreturn
=(node
)
4657 if node
!= null then
4661 redef fun n_expr
=(node
)
4664 if node
!= null then
4670 redef fun visit_all
(v
: Visitor)
4672 if _n_kwreturn
!= null then
4673 v
.enter_visit
(_n_kwreturn
.as(not null))
4675 if _n_expr
!= null then
4676 v
.enter_visit
(_n_expr
.as(not null))
4680 redef class ABreakExpr
4681 private init empty_init
do end
4683 init init_abreakexpr
(
4684 n_kwbreak
: nullable TKwbreak,
4685 n_label
: nullable ALabel,
4686 n_expr
: nullable AExpr
4690 _n_kwbreak
= n_kwbreak
.as(not null)
4691 n_kwbreak
.parent
= self
4693 if n_label
!= null then
4694 n_label
.parent
= self
4697 if n_expr
!= null then
4698 n_expr
.parent
= self
4702 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4704 if _n_kwbreak
== old_child
then
4705 if new_child
!= null then
4706 new_child
.parent
= self
4707 assert new_child
isa TKwbreak
4708 _n_kwbreak
= new_child
4714 if _n_label
== old_child
then
4715 if new_child
!= null then
4716 new_child
.parent
= self
4717 assert new_child
isa ALabel
4718 _n_label
= new_child
4724 if _n_expr
== old_child
then
4725 if new_child
!= null then
4726 new_child
.parent
= self
4727 assert new_child
isa AExpr
4736 redef fun n_kwbreak
=(node
)
4741 redef fun n_label
=(node
)
4744 if node
!= null then
4748 redef fun n_expr
=(node
)
4751 if node
!= null then
4757 redef fun visit_all
(v
: Visitor)
4759 v
.enter_visit
(_n_kwbreak
)
4760 if _n_label
!= null then
4761 v
.enter_visit
(_n_label
.as(not null))
4763 if _n_expr
!= null then
4764 v
.enter_visit
(_n_expr
.as(not null))
4768 redef class AAbortExpr
4769 private init empty_init
do end
4771 init init_aabortexpr
(
4772 n_kwabort
: nullable TKwabort
4776 _n_kwabort
= n_kwabort
.as(not null)
4777 n_kwabort
.parent
= self
4780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4782 if _n_kwabort
== old_child
then
4783 if new_child
!= null then
4784 new_child
.parent
= self
4785 assert new_child
isa TKwabort
4786 _n_kwabort
= new_child
4794 redef fun n_kwabort
=(node
)
4801 redef fun visit_all
(v
: Visitor)
4803 v
.enter_visit
(_n_kwabort
)
4806 redef class AContinueExpr
4807 private init empty_init
do end
4809 init init_acontinueexpr
(
4810 n_kwcontinue
: nullable TKwcontinue,
4811 n_label
: nullable ALabel,
4812 n_expr
: nullable AExpr
4816 _n_kwcontinue
= n_kwcontinue
4817 if n_kwcontinue
!= null then
4818 n_kwcontinue
.parent
= self
4821 if n_label
!= null then
4822 n_label
.parent
= self
4825 if n_expr
!= null then
4826 n_expr
.parent
= self
4830 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4832 if _n_kwcontinue
== old_child
then
4833 if new_child
!= null then
4834 new_child
.parent
= self
4835 assert new_child
isa TKwcontinue
4836 _n_kwcontinue
= new_child
4838 _n_kwcontinue
= null
4842 if _n_label
== old_child
then
4843 if new_child
!= null then
4844 new_child
.parent
= self
4845 assert new_child
isa ALabel
4846 _n_label
= new_child
4852 if _n_expr
== old_child
then
4853 if new_child
!= null then
4854 new_child
.parent
= self
4855 assert new_child
isa AExpr
4864 redef fun n_kwcontinue
=(node
)
4866 _n_kwcontinue
= node
4867 if node
!= null then
4871 redef fun n_label
=(node
)
4874 if node
!= null then
4878 redef fun n_expr
=(node
)
4881 if node
!= null then
4887 redef fun visit_all
(v
: Visitor)
4889 if _n_kwcontinue
!= null then
4890 v
.enter_visit
(_n_kwcontinue
.as(not null))
4892 if _n_label
!= null then
4893 v
.enter_visit
(_n_label
.as(not null))
4895 if _n_expr
!= null then
4896 v
.enter_visit
(_n_expr
.as(not null))
4901 private init empty_init
do end
4904 n_kwdo
: nullable TKwdo,
4905 n_block
: nullable AExpr,
4906 n_label
: nullable ALabel
4910 _n_kwdo
= n_kwdo
.as(not null)
4911 n_kwdo
.parent
= self
4913 if n_block
!= null then
4914 n_block
.parent
= self
4917 if n_label
!= null then
4918 n_label
.parent
= self
4922 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4924 if _n_kwdo
== old_child
then
4925 if new_child
!= null then
4926 new_child
.parent
= self
4927 assert new_child
isa TKwdo
4934 if _n_block
== old_child
then
4935 if new_child
!= null then
4936 new_child
.parent
= self
4937 assert new_child
isa AExpr
4938 _n_block
= new_child
4944 if _n_label
== old_child
then
4945 if new_child
!= null then
4946 new_child
.parent
= self
4947 assert new_child
isa ALabel
4948 _n_label
= new_child
4956 redef fun n_kwdo
=(node
)
4961 redef fun n_block
=(node
)
4964 if node
!= null then
4968 redef fun n_label
=(node
)
4971 if node
!= null then
4977 redef fun visit_all
(v
: Visitor)
4979 v
.enter_visit
(_n_kwdo
)
4980 if _n_block
!= null then
4981 v
.enter_visit
(_n_block
.as(not null))
4983 if _n_label
!= null then
4984 v
.enter_visit
(_n_label
.as(not null))
4989 private init empty_init
do end
4992 n_kwif
: nullable TKwif,
4993 n_expr
: nullable AExpr,
4994 n_then
: nullable AExpr,
4995 n_else
: nullable AExpr
4999 _n_kwif
= n_kwif
.as(not null)
5000 n_kwif
.parent
= self
5001 _n_expr
= n_expr
.as(not null)
5002 n_expr
.parent
= self
5004 if n_then
!= null then
5005 n_then
.parent
= self
5008 if n_else
!= null then
5009 n_else
.parent
= self
5013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5015 if _n_kwif
== old_child
then
5016 if new_child
!= null then
5017 new_child
.parent
= self
5018 assert new_child
isa TKwif
5025 if _n_expr
== old_child
then
5026 if new_child
!= null then
5027 new_child
.parent
= self
5028 assert new_child
isa AExpr
5035 if _n_then
== old_child
then
5036 if new_child
!= null then
5037 new_child
.parent
= self
5038 assert new_child
isa AExpr
5045 if _n_else
== old_child
then
5046 if new_child
!= null then
5047 new_child
.parent
= self
5048 assert new_child
isa AExpr
5057 redef fun n_kwif
=(node
)
5062 redef fun n_expr
=(node
)
5067 redef fun n_then
=(node
)
5070 if node
!= null then
5074 redef fun n_else
=(node
)
5077 if node
!= null then
5083 redef fun visit_all
(v
: Visitor)
5085 v
.enter_visit
(_n_kwif
)
5086 v
.enter_visit
(_n_expr
)
5087 if _n_then
!= null then
5088 v
.enter_visit
(_n_then
.as(not null))
5090 if _n_else
!= null then
5091 v
.enter_visit
(_n_else
.as(not null))
5095 redef class AIfexprExpr
5096 private init empty_init
do end
5098 init init_aifexprexpr
(
5099 n_kwif
: nullable TKwif,
5100 n_expr
: nullable AExpr,
5101 n_kwthen
: nullable TKwthen,
5102 n_then
: nullable AExpr,
5103 n_kwelse
: nullable TKwelse,
5104 n_else
: nullable AExpr
5108 _n_kwif
= n_kwif
.as(not null)
5109 n_kwif
.parent
= self
5110 _n_expr
= n_expr
.as(not null)
5111 n_expr
.parent
= self
5112 _n_kwthen
= n_kwthen
.as(not null)
5113 n_kwthen
.parent
= self
5114 _n_then
= n_then
.as(not null)
5115 n_then
.parent
= self
5116 _n_kwelse
= n_kwelse
.as(not null)
5117 n_kwelse
.parent
= self
5118 _n_else
= n_else
.as(not null)
5119 n_else
.parent
= self
5122 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5124 if _n_kwif
== old_child
then
5125 if new_child
!= null then
5126 new_child
.parent
= self
5127 assert new_child
isa TKwif
5134 if _n_expr
== old_child
then
5135 if new_child
!= null then
5136 new_child
.parent
= self
5137 assert new_child
isa AExpr
5144 if _n_kwthen
== old_child
then
5145 if new_child
!= null then
5146 new_child
.parent
= self
5147 assert new_child
isa TKwthen
5148 _n_kwthen
= new_child
5154 if _n_then
== old_child
then
5155 if new_child
!= null then
5156 new_child
.parent
= self
5157 assert new_child
isa AExpr
5164 if _n_kwelse
== old_child
then
5165 if new_child
!= null then
5166 new_child
.parent
= self
5167 assert new_child
isa TKwelse
5168 _n_kwelse
= new_child
5174 if _n_else
== old_child
then
5175 if new_child
!= null then
5176 new_child
.parent
= self
5177 assert new_child
isa AExpr
5186 redef fun n_kwif
=(node
)
5191 redef fun n_expr
=(node
)
5196 redef fun n_kwthen
=(node
)
5201 redef fun n_then
=(node
)
5206 redef fun n_kwelse
=(node
)
5211 redef fun n_else
=(node
)
5218 redef fun visit_all
(v
: Visitor)
5220 v
.enter_visit
(_n_kwif
)
5221 v
.enter_visit
(_n_expr
)
5222 v
.enter_visit
(_n_kwthen
)
5223 v
.enter_visit
(_n_then
)
5224 v
.enter_visit
(_n_kwelse
)
5225 v
.enter_visit
(_n_else
)
5228 redef class AWhileExpr
5229 private init empty_init
do end
5231 init init_awhileexpr
(
5232 n_kwwhile
: nullable TKwwhile,
5233 n_expr
: nullable AExpr,
5234 n_kwdo
: nullable TKwdo,
5235 n_block
: nullable AExpr,
5236 n_label
: nullable ALabel
5240 _n_kwwhile
= n_kwwhile
.as(not null)
5241 n_kwwhile
.parent
= self
5242 _n_expr
= n_expr
.as(not null)
5243 n_expr
.parent
= self
5244 _n_kwdo
= n_kwdo
.as(not null)
5245 n_kwdo
.parent
= self
5247 if n_block
!= null then
5248 n_block
.parent
= self
5251 if n_label
!= null then
5252 n_label
.parent
= self
5256 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5258 if _n_kwwhile
== old_child
then
5259 if new_child
!= null then
5260 new_child
.parent
= self
5261 assert new_child
isa TKwwhile
5262 _n_kwwhile
= new_child
5268 if _n_expr
== old_child
then
5269 if new_child
!= null then
5270 new_child
.parent
= self
5271 assert new_child
isa AExpr
5278 if _n_kwdo
== old_child
then
5279 if new_child
!= null then
5280 new_child
.parent
= self
5281 assert new_child
isa TKwdo
5288 if _n_block
== old_child
then
5289 if new_child
!= null then
5290 new_child
.parent
= self
5291 assert new_child
isa AExpr
5292 _n_block
= new_child
5298 if _n_label
== old_child
then
5299 if new_child
!= null then
5300 new_child
.parent
= self
5301 assert new_child
isa ALabel
5302 _n_label
= new_child
5310 redef fun n_kwwhile
=(node
)
5315 redef fun n_expr
=(node
)
5320 redef fun n_kwdo
=(node
)
5325 redef fun n_block
=(node
)
5328 if node
!= null then
5332 redef fun n_label
=(node
)
5335 if node
!= null then
5341 redef fun visit_all
(v
: Visitor)
5343 v
.enter_visit
(_n_kwwhile
)
5344 v
.enter_visit
(_n_expr
)
5345 v
.enter_visit
(_n_kwdo
)
5346 if _n_block
!= null then
5347 v
.enter_visit
(_n_block
.as(not null))
5349 if _n_label
!= null then
5350 v
.enter_visit
(_n_label
.as(not null))
5354 redef class ALoopExpr
5355 private init empty_init
do end
5357 init init_aloopexpr
(
5358 n_kwloop
: nullable TKwloop,
5359 n_block
: nullable AExpr,
5360 n_label
: nullable ALabel
5364 _n_kwloop
= n_kwloop
.as(not null)
5365 n_kwloop
.parent
= self
5367 if n_block
!= null then
5368 n_block
.parent
= self
5371 if n_label
!= null then
5372 n_label
.parent
= self
5376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5378 if _n_kwloop
== old_child
then
5379 if new_child
!= null then
5380 new_child
.parent
= self
5381 assert new_child
isa TKwloop
5382 _n_kwloop
= new_child
5388 if _n_block
== old_child
then
5389 if new_child
!= null then
5390 new_child
.parent
= self
5391 assert new_child
isa AExpr
5392 _n_block
= new_child
5398 if _n_label
== old_child
then
5399 if new_child
!= null then
5400 new_child
.parent
= self
5401 assert new_child
isa ALabel
5402 _n_label
= new_child
5410 redef fun n_kwloop
=(node
)
5415 redef fun n_block
=(node
)
5418 if node
!= null then
5422 redef fun n_label
=(node
)
5425 if node
!= null then
5431 redef fun visit_all
(v
: Visitor)
5433 v
.enter_visit
(_n_kwloop
)
5434 if _n_block
!= null then
5435 v
.enter_visit
(_n_block
.as(not null))
5437 if _n_label
!= null then
5438 v
.enter_visit
(_n_label
.as(not null))
5442 redef class AForExpr
5443 private init empty_init
do end
5445 init init_aforexpr
(
5446 n_kwfor
: nullable TKwfor,
5447 n_ids
: Collection[Object], # Should be Collection[TId]
5448 n_expr
: nullable AExpr,
5449 n_kwdo
: nullable TKwdo,
5450 n_block
: nullable AExpr,
5451 n_label
: nullable ALabel
5455 _n_kwfor
= n_kwfor
.as(not null)
5456 n_kwfor
.parent
= self
5462 _n_expr
= n_expr
.as(not null)
5463 n_expr
.parent
= self
5464 _n_kwdo
= n_kwdo
.as(not null)
5465 n_kwdo
.parent
= self
5467 if n_block
!= null then
5468 n_block
.parent
= self
5471 if n_label
!= null then
5472 n_label
.parent
= self
5476 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5478 if _n_kwfor
== old_child
then
5479 if new_child
!= null then
5480 new_child
.parent
= self
5481 assert new_child
isa TKwfor
5482 _n_kwfor
= new_child
5488 for i
in [0.._n_ids
.length
[ do
5489 if _n_ids
[i
] == old_child
then
5490 if new_child
!= null then
5491 assert new_child
isa TId
5492 _n_ids
[i
] = new_child
5493 new_child
.parent
= self
5500 if _n_expr
== old_child
then
5501 if new_child
!= null then
5502 new_child
.parent
= self
5503 assert new_child
isa AExpr
5510 if _n_kwdo
== old_child
then
5511 if new_child
!= null then
5512 new_child
.parent
= self
5513 assert new_child
isa TKwdo
5520 if _n_block
== old_child
then
5521 if new_child
!= null then
5522 new_child
.parent
= self
5523 assert new_child
isa AExpr
5524 _n_block
= new_child
5530 if _n_label
== old_child
then
5531 if new_child
!= null then
5532 new_child
.parent
= self
5533 assert new_child
isa ALabel
5534 _n_label
= new_child
5542 redef fun n_kwfor
=(node
)
5547 redef fun n_expr
=(node
)
5552 redef fun n_kwdo
=(node
)
5557 redef fun n_block
=(node
)
5560 if node
!= null then
5564 redef fun n_label
=(node
)
5567 if node
!= null then
5573 redef fun visit_all
(v
: Visitor)
5575 v
.enter_visit
(_n_kwfor
)
5579 v
.enter_visit
(_n_expr
)
5580 v
.enter_visit
(_n_kwdo
)
5581 if _n_block
!= null then
5582 v
.enter_visit
(_n_block
.as(not null))
5584 if _n_label
!= null then
5585 v
.enter_visit
(_n_label
.as(not null))
5589 redef class AAssertExpr
5590 private init empty_init
do end
5592 init init_aassertexpr
(
5593 n_kwassert
: nullable TKwassert,
5595 n_expr
: nullable AExpr,
5596 n_else
: nullable AExpr
5600 _n_kwassert
= n_kwassert
.as(not null)
5601 n_kwassert
.parent
= self
5603 if n_id
!= null then
5606 _n_expr
= n_expr
.as(not null)
5607 n_expr
.parent
= self
5609 if n_else
!= null then
5610 n_else
.parent
= self
5614 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5616 if _n_kwassert
== old_child
then
5617 if new_child
!= null then
5618 new_child
.parent
= self
5619 assert new_child
isa TKwassert
5620 _n_kwassert
= new_child
5626 if _n_id
== old_child
then
5627 if new_child
!= null then
5628 new_child
.parent
= self
5629 assert new_child
isa TId
5636 if _n_expr
== old_child
then
5637 if new_child
!= null then
5638 new_child
.parent
= self
5639 assert new_child
isa AExpr
5646 if _n_else
== old_child
then
5647 if new_child
!= null then
5648 new_child
.parent
= self
5649 assert new_child
isa AExpr
5658 redef fun n_kwassert
=(node
)
5663 redef fun n_id
=(node
)
5666 if node
!= null then
5670 redef fun n_expr
=(node
)
5675 redef fun n_else
=(node
)
5678 if node
!= null then
5684 redef fun visit_all
(v
: Visitor)
5686 v
.enter_visit
(_n_kwassert
)
5687 if _n_id
!= null then
5688 v
.enter_visit
(_n_id
.as(not null))
5690 v
.enter_visit
(_n_expr
)
5691 if _n_else
!= null then
5692 v
.enter_visit
(_n_else
.as(not null))
5696 redef class AOnceExpr
5697 private init empty_init
do end
5699 init init_aonceexpr
(
5700 n_kwonce
: nullable TKwonce,
5701 n_expr
: nullable AExpr
5705 _n_kwonce
= n_kwonce
.as(not null)
5706 n_kwonce
.parent
= self
5707 _n_expr
= n_expr
.as(not null)
5708 n_expr
.parent
= self
5711 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5713 if _n_kwonce
== old_child
then
5714 if new_child
!= null then
5715 new_child
.parent
= self
5716 assert new_child
isa TKwonce
5717 _n_kwonce
= new_child
5723 if _n_expr
== old_child
then
5724 if new_child
!= null then
5725 new_child
.parent
= self
5726 assert new_child
isa AExpr
5735 redef fun n_kwonce
=(node
)
5740 redef fun n_expr
=(node
)
5747 redef fun visit_all
(v
: Visitor)
5749 v
.enter_visit
(_n_kwonce
)
5750 v
.enter_visit
(_n_expr
)
5753 redef class ASendExpr
5754 private init empty_init
do end
5756 init init_asendexpr
(
5757 n_expr
: nullable AExpr
5761 _n_expr
= n_expr
.as(not null)
5762 n_expr
.parent
= self
5765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5767 if _n_expr
== old_child
then
5768 if new_child
!= null then
5769 new_child
.parent
= self
5770 assert new_child
isa AExpr
5779 redef fun n_expr
=(node
)
5786 redef fun visit_all
(v
: Visitor)
5788 v
.enter_visit
(_n_expr
)
5791 redef class ABinopExpr
5792 private init empty_init
do end
5794 init init_abinopexpr
(
5795 n_expr
: nullable AExpr,
5796 n_expr2
: nullable AExpr
5800 _n_expr
= n_expr
.as(not null)
5801 n_expr
.parent
= self
5802 _n_expr2
= n_expr2
.as(not null)
5803 n_expr2
.parent
= self
5806 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5808 if _n_expr
== old_child
then
5809 if new_child
!= null then
5810 new_child
.parent
= self
5811 assert new_child
isa AExpr
5818 if _n_expr2
== old_child
then
5819 if new_child
!= null then
5820 new_child
.parent
= self
5821 assert new_child
isa AExpr
5822 _n_expr2
= new_child
5830 redef fun n_expr
=(node
)
5835 redef fun n_expr2
=(node
)
5842 redef fun visit_all
(v
: Visitor)
5844 v
.enter_visit
(_n_expr
)
5845 v
.enter_visit
(_n_expr2
)
5849 private init empty_init
do end
5852 n_expr
: nullable AExpr,
5853 n_expr2
: nullable AExpr
5857 _n_expr
= n_expr
.as(not null)
5858 n_expr
.parent
= self
5859 _n_expr2
= n_expr2
.as(not null)
5860 n_expr2
.parent
= self
5863 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5865 if _n_expr
== old_child
then
5866 if new_child
!= null then
5867 new_child
.parent
= self
5868 assert new_child
isa AExpr
5875 if _n_expr2
== old_child
then
5876 if new_child
!= null then
5877 new_child
.parent
= self
5878 assert new_child
isa AExpr
5879 _n_expr2
= new_child
5887 redef fun n_expr
=(node
)
5892 redef fun n_expr2
=(node
)
5899 redef fun visit_all
(v
: Visitor)
5901 v
.enter_visit
(_n_expr
)
5902 v
.enter_visit
(_n_expr2
)
5905 redef class AAndExpr
5906 private init empty_init
do end
5908 init init_aandexpr
(
5909 n_expr
: nullable AExpr,
5910 n_expr2
: nullable AExpr
5914 _n_expr
= n_expr
.as(not null)
5915 n_expr
.parent
= self
5916 _n_expr2
= n_expr2
.as(not null)
5917 n_expr2
.parent
= self
5920 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5922 if _n_expr
== old_child
then
5923 if new_child
!= null then
5924 new_child
.parent
= self
5925 assert new_child
isa AExpr
5932 if _n_expr2
== old_child
then
5933 if new_child
!= null then
5934 new_child
.parent
= self
5935 assert new_child
isa AExpr
5936 _n_expr2
= new_child
5944 redef fun n_expr
=(node
)
5949 redef fun n_expr2
=(node
)
5956 redef fun visit_all
(v
: Visitor)
5958 v
.enter_visit
(_n_expr
)
5959 v
.enter_visit
(_n_expr2
)
5962 redef class AOrElseExpr
5963 private init empty_init
do end
5965 init init_aorelseexpr
(
5966 n_expr
: nullable AExpr,
5967 n_expr2
: nullable AExpr
5971 _n_expr
= n_expr
.as(not null)
5972 n_expr
.parent
= self
5973 _n_expr2
= n_expr2
.as(not null)
5974 n_expr2
.parent
= self
5977 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5979 if _n_expr
== old_child
then
5980 if new_child
!= null then
5981 new_child
.parent
= self
5982 assert new_child
isa AExpr
5989 if _n_expr2
== old_child
then
5990 if new_child
!= null then
5991 new_child
.parent
= self
5992 assert new_child
isa AExpr
5993 _n_expr2
= new_child
6001 redef fun n_expr
=(node
)
6006 redef fun n_expr2
=(node
)
6013 redef fun visit_all
(v
: Visitor)
6015 v
.enter_visit
(_n_expr
)
6016 v
.enter_visit
(_n_expr2
)
6019 redef class AImpliesExpr
6020 private init empty_init
do end
6022 init init_aimpliesexpr
(
6023 n_expr
: nullable AExpr,
6024 n_expr2
: nullable AExpr
6028 _n_expr
= n_expr
.as(not null)
6029 n_expr
.parent
= self
6030 _n_expr2
= n_expr2
.as(not null)
6031 n_expr2
.parent
= self
6034 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6036 if _n_expr
== old_child
then
6037 if new_child
!= null then
6038 new_child
.parent
= self
6039 assert new_child
isa AExpr
6046 if _n_expr2
== old_child
then
6047 if new_child
!= null then
6048 new_child
.parent
= self
6049 assert new_child
isa AExpr
6050 _n_expr2
= new_child
6058 redef fun n_expr
=(node
)
6063 redef fun n_expr2
=(node
)
6070 redef fun visit_all
(v
: Visitor)
6072 v
.enter_visit
(_n_expr
)
6073 v
.enter_visit
(_n_expr2
)
6076 redef class ANotExpr
6077 private init empty_init
do end
6079 init init_anotexpr
(
6080 n_kwnot
: nullable TKwnot,
6081 n_expr
: nullable AExpr
6085 _n_kwnot
= n_kwnot
.as(not null)
6086 n_kwnot
.parent
= self
6087 _n_expr
= n_expr
.as(not null)
6088 n_expr
.parent
= self
6091 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6093 if _n_kwnot
== old_child
then
6094 if new_child
!= null then
6095 new_child
.parent
= self
6096 assert new_child
isa TKwnot
6097 _n_kwnot
= new_child
6103 if _n_expr
== old_child
then
6104 if new_child
!= null then
6105 new_child
.parent
= self
6106 assert new_child
isa AExpr
6115 redef fun n_kwnot
=(node
)
6120 redef fun n_expr
=(node
)
6127 redef fun visit_all
(v
: Visitor)
6129 v
.enter_visit
(_n_kwnot
)
6130 v
.enter_visit
(_n_expr
)
6134 private init empty_init
do end
6137 n_expr
: nullable AExpr,
6138 n_expr2
: nullable AExpr
6142 _n_expr
= n_expr
.as(not null)
6143 n_expr
.parent
= self
6144 _n_expr2
= n_expr2
.as(not null)
6145 n_expr2
.parent
= self
6148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6150 if _n_expr
== old_child
then
6151 if new_child
!= null then
6152 new_child
.parent
= self
6153 assert new_child
isa AExpr
6160 if _n_expr2
== old_child
then
6161 if new_child
!= null then
6162 new_child
.parent
= self
6163 assert new_child
isa AExpr
6164 _n_expr2
= new_child
6172 redef fun n_expr
=(node
)
6177 redef fun n_expr2
=(node
)
6184 redef fun visit_all
(v
: Visitor)
6186 v
.enter_visit
(_n_expr
)
6187 v
.enter_visit
(_n_expr2
)
6191 private init empty_init
do end
6194 n_expr
: nullable AExpr,
6195 n_expr2
: nullable AExpr
6199 _n_expr
= n_expr
.as(not null)
6200 n_expr
.parent
= self
6201 _n_expr2
= n_expr2
.as(not null)
6202 n_expr2
.parent
= self
6205 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6207 if _n_expr
== old_child
then
6208 if new_child
!= null then
6209 new_child
.parent
= self
6210 assert new_child
isa AExpr
6217 if _n_expr2
== old_child
then
6218 if new_child
!= null then
6219 new_child
.parent
= self
6220 assert new_child
isa AExpr
6221 _n_expr2
= new_child
6229 redef fun n_expr
=(node
)
6234 redef fun n_expr2
=(node
)
6241 redef fun visit_all
(v
: Visitor)
6243 v
.enter_visit
(_n_expr
)
6244 v
.enter_visit
(_n_expr2
)
6248 private init empty_init
do end
6251 n_expr
: nullable AExpr,
6252 n_expr2
: nullable AExpr
6256 _n_expr
= n_expr
.as(not null)
6257 n_expr
.parent
= self
6258 _n_expr2
= n_expr2
.as(not null)
6259 n_expr2
.parent
= self
6262 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6264 if _n_expr
== old_child
then
6265 if new_child
!= null then
6266 new_child
.parent
= self
6267 assert new_child
isa AExpr
6274 if _n_expr2
== old_child
then
6275 if new_child
!= null then
6276 new_child
.parent
= self
6277 assert new_child
isa AExpr
6278 _n_expr2
= new_child
6286 redef fun n_expr
=(node
)
6291 redef fun n_expr2
=(node
)
6298 redef fun visit_all
(v
: Visitor)
6300 v
.enter_visit
(_n_expr
)
6301 v
.enter_visit
(_n_expr2
)
6305 private init empty_init
do end
6308 n_expr
: nullable AExpr,
6309 n_expr2
: nullable AExpr
6313 _n_expr
= n_expr
.as(not null)
6314 n_expr
.parent
= self
6315 _n_expr2
= n_expr2
.as(not null)
6316 n_expr2
.parent
= self
6319 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6321 if _n_expr
== old_child
then
6322 if new_child
!= null then
6323 new_child
.parent
= self
6324 assert new_child
isa AExpr
6331 if _n_expr2
== old_child
then
6332 if new_child
!= null then
6333 new_child
.parent
= self
6334 assert new_child
isa AExpr
6335 _n_expr2
= new_child
6343 redef fun n_expr
=(node
)
6348 redef fun n_expr2
=(node
)
6355 redef fun visit_all
(v
: Visitor)
6357 v
.enter_visit
(_n_expr
)
6358 v
.enter_visit
(_n_expr2
)
6362 private init empty_init
do end
6365 n_expr
: nullable AExpr,
6366 n_expr2
: nullable AExpr
6370 _n_expr
= n_expr
.as(not null)
6371 n_expr
.parent
= self
6372 _n_expr2
= n_expr2
.as(not null)
6373 n_expr2
.parent
= self
6376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6378 if _n_expr
== old_child
then
6379 if new_child
!= null then
6380 new_child
.parent
= self
6381 assert new_child
isa AExpr
6388 if _n_expr2
== old_child
then
6389 if new_child
!= null then
6390 new_child
.parent
= self
6391 assert new_child
isa AExpr
6392 _n_expr2
= new_child
6400 redef fun n_expr
=(node
)
6405 redef fun n_expr2
=(node
)
6412 redef fun visit_all
(v
: Visitor)
6414 v
.enter_visit
(_n_expr
)
6415 v
.enter_visit
(_n_expr2
)
6419 private init empty_init
do end
6422 n_expr
: nullable AExpr,
6423 n_expr2
: nullable AExpr
6427 _n_expr
= n_expr
.as(not null)
6428 n_expr
.parent
= self
6429 _n_expr2
= n_expr2
.as(not null)
6430 n_expr2
.parent
= self
6433 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6435 if _n_expr
== old_child
then
6436 if new_child
!= null then
6437 new_child
.parent
= self
6438 assert new_child
isa AExpr
6445 if _n_expr2
== old_child
then
6446 if new_child
!= null then
6447 new_child
.parent
= self
6448 assert new_child
isa AExpr
6449 _n_expr2
= new_child
6457 redef fun n_expr
=(node
)
6462 redef fun n_expr2
=(node
)
6469 redef fun visit_all
(v
: Visitor)
6471 v
.enter_visit
(_n_expr
)
6472 v
.enter_visit
(_n_expr2
)
6476 private init empty_init
do end
6479 n_expr
: nullable AExpr,
6480 n_expr2
: nullable AExpr
6484 _n_expr
= n_expr
.as(not null)
6485 n_expr
.parent
= self
6486 _n_expr2
= n_expr2
.as(not null)
6487 n_expr2
.parent
= self
6490 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6492 if _n_expr
== old_child
then
6493 if new_child
!= null then
6494 new_child
.parent
= self
6495 assert new_child
isa AExpr
6502 if _n_expr2
== old_child
then
6503 if new_child
!= null then
6504 new_child
.parent
= self
6505 assert new_child
isa AExpr
6506 _n_expr2
= new_child
6514 redef fun n_expr
=(node
)
6519 redef fun n_expr2
=(node
)
6526 redef fun visit_all
(v
: Visitor)
6528 v
.enter_visit
(_n_expr
)
6529 v
.enter_visit
(_n_expr2
)
6533 private init empty_init
do end
6536 n_expr
: nullable AExpr,
6537 n_expr2
: nullable AExpr
6541 _n_expr
= n_expr
.as(not null)
6542 n_expr
.parent
= self
6543 _n_expr2
= n_expr2
.as(not null)
6544 n_expr2
.parent
= self
6547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6549 if _n_expr
== old_child
then
6550 if new_child
!= null then
6551 new_child
.parent
= self
6552 assert new_child
isa AExpr
6559 if _n_expr2
== old_child
then
6560 if new_child
!= null then
6561 new_child
.parent
= self
6562 assert new_child
isa AExpr
6563 _n_expr2
= new_child
6571 redef fun n_expr
=(node
)
6576 redef fun n_expr2
=(node
)
6583 redef fun visit_all
(v
: Visitor)
6585 v
.enter_visit
(_n_expr
)
6586 v
.enter_visit
(_n_expr2
)
6590 private init empty_init
do end
6593 n_expr
: nullable AExpr,
6594 n_expr2
: nullable AExpr
6598 _n_expr
= n_expr
.as(not null)
6599 n_expr
.parent
= self
6600 _n_expr2
= n_expr2
.as(not null)
6601 n_expr2
.parent
= self
6604 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6606 if _n_expr
== old_child
then
6607 if new_child
!= null then
6608 new_child
.parent
= self
6609 assert new_child
isa AExpr
6616 if _n_expr2
== old_child
then
6617 if new_child
!= null then
6618 new_child
.parent
= self
6619 assert new_child
isa AExpr
6620 _n_expr2
= new_child
6628 redef fun n_expr
=(node
)
6633 redef fun n_expr2
=(node
)
6640 redef fun visit_all
(v
: Visitor)
6642 v
.enter_visit
(_n_expr
)
6643 v
.enter_visit
(_n_expr2
)
6646 redef class AIsaExpr
6647 private init empty_init
do end
6649 init init_aisaexpr
(
6650 n_expr
: nullable AExpr,
6651 n_type
: nullable AType
6655 _n_expr
= n_expr
.as(not null)
6656 n_expr
.parent
= self
6657 _n_type
= n_type
.as(not null)
6658 n_type
.parent
= self
6661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6663 if _n_expr
== old_child
then
6664 if new_child
!= null then
6665 new_child
.parent
= self
6666 assert new_child
isa AExpr
6673 if _n_type
== old_child
then
6674 if new_child
!= null then
6675 new_child
.parent
= self
6676 assert new_child
isa AType
6685 redef fun n_expr
=(node
)
6690 redef fun n_type
=(node
)
6697 redef fun visit_all
(v
: Visitor)
6699 v
.enter_visit
(_n_expr
)
6700 v
.enter_visit
(_n_type
)
6703 redef class APlusExpr
6704 private init empty_init
do end
6706 init init_aplusexpr
(
6707 n_expr
: nullable AExpr,
6708 n_expr2
: nullable AExpr
6712 _n_expr
= n_expr
.as(not null)
6713 n_expr
.parent
= self
6714 _n_expr2
= n_expr2
.as(not null)
6715 n_expr2
.parent
= self
6718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6720 if _n_expr
== old_child
then
6721 if new_child
!= null then
6722 new_child
.parent
= self
6723 assert new_child
isa AExpr
6730 if _n_expr2
== old_child
then
6731 if new_child
!= null then
6732 new_child
.parent
= self
6733 assert new_child
isa AExpr
6734 _n_expr2
= new_child
6742 redef fun n_expr
=(node
)
6747 redef fun n_expr2
=(node
)
6754 redef fun visit_all
(v
: Visitor)
6756 v
.enter_visit
(_n_expr
)
6757 v
.enter_visit
(_n_expr2
)
6760 redef class AMinusExpr
6761 private init empty_init
do end
6763 init init_aminusexpr
(
6764 n_expr
: nullable AExpr,
6765 n_expr2
: nullable AExpr
6769 _n_expr
= n_expr
.as(not null)
6770 n_expr
.parent
= self
6771 _n_expr2
= n_expr2
.as(not null)
6772 n_expr2
.parent
= self
6775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6777 if _n_expr
== old_child
then
6778 if new_child
!= null then
6779 new_child
.parent
= self
6780 assert new_child
isa AExpr
6787 if _n_expr2
== old_child
then
6788 if new_child
!= null then
6789 new_child
.parent
= self
6790 assert new_child
isa AExpr
6791 _n_expr2
= new_child
6799 redef fun n_expr
=(node
)
6804 redef fun n_expr2
=(node
)
6811 redef fun visit_all
(v
: Visitor)
6813 v
.enter_visit
(_n_expr
)
6814 v
.enter_visit
(_n_expr2
)
6817 redef class AStarshipExpr
6818 private init empty_init
do end
6820 init init_astarshipexpr
(
6821 n_expr
: nullable AExpr,
6822 n_expr2
: nullable AExpr
6826 _n_expr
= n_expr
.as(not null)
6827 n_expr
.parent
= self
6828 _n_expr2
= n_expr2
.as(not null)
6829 n_expr2
.parent
= self
6832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6834 if _n_expr
== old_child
then
6835 if new_child
!= null then
6836 new_child
.parent
= self
6837 assert new_child
isa AExpr
6844 if _n_expr2
== old_child
then
6845 if new_child
!= null then
6846 new_child
.parent
= self
6847 assert new_child
isa AExpr
6848 _n_expr2
= new_child
6856 redef fun n_expr
=(node
)
6861 redef fun n_expr2
=(node
)
6868 redef fun visit_all
(v
: Visitor)
6870 v
.enter_visit
(_n_expr
)
6871 v
.enter_visit
(_n_expr2
)
6874 redef class AStarExpr
6875 private init empty_init
do end
6877 init init_astarexpr
(
6878 n_expr
: nullable AExpr,
6879 n_expr2
: nullable AExpr
6883 _n_expr
= n_expr
.as(not null)
6884 n_expr
.parent
= self
6885 _n_expr2
= n_expr2
.as(not null)
6886 n_expr2
.parent
= self
6889 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6891 if _n_expr
== old_child
then
6892 if new_child
!= null then
6893 new_child
.parent
= self
6894 assert new_child
isa AExpr
6901 if _n_expr2
== old_child
then
6902 if new_child
!= null then
6903 new_child
.parent
= self
6904 assert new_child
isa AExpr
6905 _n_expr2
= new_child
6913 redef fun n_expr
=(node
)
6918 redef fun n_expr2
=(node
)
6925 redef fun visit_all
(v
: Visitor)
6927 v
.enter_visit
(_n_expr
)
6928 v
.enter_visit
(_n_expr2
)
6931 redef class ASlashExpr
6932 private init empty_init
do end
6934 init init_aslashexpr
(
6935 n_expr
: nullable AExpr,
6936 n_expr2
: nullable AExpr
6940 _n_expr
= n_expr
.as(not null)
6941 n_expr
.parent
= self
6942 _n_expr2
= n_expr2
.as(not null)
6943 n_expr2
.parent
= self
6946 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6948 if _n_expr
== old_child
then
6949 if new_child
!= null then
6950 new_child
.parent
= self
6951 assert new_child
isa AExpr
6958 if _n_expr2
== old_child
then
6959 if new_child
!= null then
6960 new_child
.parent
= self
6961 assert new_child
isa AExpr
6962 _n_expr2
= new_child
6970 redef fun n_expr
=(node
)
6975 redef fun n_expr2
=(node
)
6982 redef fun visit_all
(v
: Visitor)
6984 v
.enter_visit
(_n_expr
)
6985 v
.enter_visit
(_n_expr2
)
6988 redef class APercentExpr
6989 private init empty_init
do end
6991 init init_apercentexpr
(
6992 n_expr
: nullable AExpr,
6993 n_expr2
: nullable AExpr
6997 _n_expr
= n_expr
.as(not null)
6998 n_expr
.parent
= self
6999 _n_expr2
= n_expr2
.as(not null)
7000 n_expr2
.parent
= self
7003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7005 if _n_expr
== old_child
then
7006 if new_child
!= null then
7007 new_child
.parent
= self
7008 assert new_child
isa AExpr
7015 if _n_expr2
== old_child
then
7016 if new_child
!= null then
7017 new_child
.parent
= self
7018 assert new_child
isa AExpr
7019 _n_expr2
= new_child
7027 redef fun n_expr
=(node
)
7032 redef fun n_expr2
=(node
)
7039 redef fun visit_all
(v
: Visitor)
7041 v
.enter_visit
(_n_expr
)
7042 v
.enter_visit
(_n_expr2
)
7045 redef class AUminusExpr
7046 private init empty_init
do end
7048 init init_auminusexpr
(
7049 n_minus
: nullable TMinus,
7050 n_expr
: nullable AExpr
7054 _n_minus
= n_minus
.as(not null)
7055 n_minus
.parent
= self
7056 _n_expr
= n_expr
.as(not null)
7057 n_expr
.parent
= self
7060 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7062 if _n_minus
== old_child
then
7063 if new_child
!= null then
7064 new_child
.parent
= self
7065 assert new_child
isa TMinus
7066 _n_minus
= new_child
7072 if _n_expr
== old_child
then
7073 if new_child
!= null then
7074 new_child
.parent
= self
7075 assert new_child
isa AExpr
7084 redef fun n_minus
=(node
)
7089 redef fun n_expr
=(node
)
7096 redef fun visit_all
(v
: Visitor)
7098 v
.enter_visit
(_n_minus
)
7099 v
.enter_visit
(_n_expr
)
7102 redef class ANewExpr
7103 private init empty_init
do end
7105 init init_anewexpr
(
7106 n_kwnew
: nullable TKwnew,
7107 n_type
: nullable AType,
7109 n_args
: nullable AExprs
7113 _n_kwnew
= n_kwnew
.as(not null)
7114 n_kwnew
.parent
= self
7115 _n_type
= n_type
.as(not null)
7116 n_type
.parent
= self
7118 if n_id
!= null then
7121 _n_args
= n_args
.as(not null)
7122 n_args
.parent
= self
7125 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7127 if _n_kwnew
== old_child
then
7128 if new_child
!= null then
7129 new_child
.parent
= self
7130 assert new_child
isa TKwnew
7131 _n_kwnew
= new_child
7137 if _n_type
== old_child
then
7138 if new_child
!= null then
7139 new_child
.parent
= self
7140 assert new_child
isa AType
7147 if _n_id
== old_child
then
7148 if new_child
!= null then
7149 new_child
.parent
= self
7150 assert new_child
isa TId
7157 if _n_args
== old_child
then
7158 if new_child
!= null then
7159 new_child
.parent
= self
7160 assert new_child
isa AExprs
7169 redef fun n_kwnew
=(node
)
7174 redef fun n_type
=(node
)
7179 redef fun n_id
=(node
)
7182 if node
!= null then
7186 redef fun n_args
=(node
)
7193 redef fun visit_all
(v
: Visitor)
7195 v
.enter_visit
(_n_kwnew
)
7196 v
.enter_visit
(_n_type
)
7197 if _n_id
!= null then
7198 v
.enter_visit
(_n_id
.as(not null))
7200 v
.enter_visit
(_n_args
)
7203 redef class AAttrExpr
7204 private init empty_init
do end
7206 init init_aattrexpr
(
7207 n_expr
: nullable AExpr,
7208 n_id
: nullable TAttrid
7212 _n_expr
= n_expr
.as(not null)
7213 n_expr
.parent
= self
7214 _n_id
= n_id
.as(not null)
7218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7220 if _n_expr
== old_child
then
7221 if new_child
!= null then
7222 new_child
.parent
= self
7223 assert new_child
isa AExpr
7230 if _n_id
== old_child
then
7231 if new_child
!= null then
7232 new_child
.parent
= self
7233 assert new_child
isa TAttrid
7242 redef fun n_expr
=(node
)
7247 redef fun n_id
=(node
)
7254 redef fun visit_all
(v
: Visitor)
7256 v
.enter_visit
(_n_expr
)
7257 v
.enter_visit
(_n_id
)
7260 redef class AAttrAssignExpr
7261 private init empty_init
do end
7263 init init_aattrassignexpr
(
7264 n_expr
: nullable AExpr,
7265 n_id
: nullable TAttrid,
7266 n_assign
: nullable TAssign,
7267 n_value
: nullable AExpr
7271 _n_expr
= n_expr
.as(not null)
7272 n_expr
.parent
= self
7273 _n_id
= n_id
.as(not null)
7275 _n_assign
= n_assign
.as(not null)
7276 n_assign
.parent
= self
7277 _n_value
= n_value
.as(not null)
7278 n_value
.parent
= self
7281 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7283 if _n_expr
== old_child
then
7284 if new_child
!= null then
7285 new_child
.parent
= self
7286 assert new_child
isa AExpr
7293 if _n_id
== old_child
then
7294 if new_child
!= null then
7295 new_child
.parent
= self
7296 assert new_child
isa TAttrid
7303 if _n_assign
== old_child
then
7304 if new_child
!= null then
7305 new_child
.parent
= self
7306 assert new_child
isa TAssign
7307 _n_assign
= new_child
7313 if _n_value
== old_child
then
7314 if new_child
!= null then
7315 new_child
.parent
= self
7316 assert new_child
isa AExpr
7317 _n_value
= new_child
7325 redef fun n_expr
=(node
)
7330 redef fun n_id
=(node
)
7335 redef fun n_assign
=(node
)
7340 redef fun n_value
=(node
)
7347 redef fun visit_all
(v
: Visitor)
7349 v
.enter_visit
(_n_expr
)
7350 v
.enter_visit
(_n_id
)
7351 v
.enter_visit
(_n_assign
)
7352 v
.enter_visit
(_n_value
)
7355 redef class AAttrReassignExpr
7356 private init empty_init
do end
7358 init init_aattrreassignexpr
(
7359 n_expr
: nullable AExpr,
7360 n_id
: nullable TAttrid,
7361 n_assign_op
: nullable AAssignOp,
7362 n_value
: nullable AExpr
7366 _n_expr
= n_expr
.as(not null)
7367 n_expr
.parent
= self
7368 _n_id
= n_id
.as(not null)
7370 _n_assign_op
= n_assign_op
.as(not null)
7371 n_assign_op
.parent
= self
7372 _n_value
= n_value
.as(not null)
7373 n_value
.parent
= self
7376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7378 if _n_expr
== old_child
then
7379 if new_child
!= null then
7380 new_child
.parent
= self
7381 assert new_child
isa AExpr
7388 if _n_id
== old_child
then
7389 if new_child
!= null then
7390 new_child
.parent
= self
7391 assert new_child
isa TAttrid
7398 if _n_assign_op
== old_child
then
7399 if new_child
!= null then
7400 new_child
.parent
= self
7401 assert new_child
isa AAssignOp
7402 _n_assign_op
= new_child
7408 if _n_value
== old_child
then
7409 if new_child
!= null then
7410 new_child
.parent
= self
7411 assert new_child
isa AExpr
7412 _n_value
= new_child
7420 redef fun n_expr
=(node
)
7425 redef fun n_id
=(node
)
7430 redef fun n_assign_op
=(node
)
7435 redef fun n_value
=(node
)
7442 redef fun visit_all
(v
: Visitor)
7444 v
.enter_visit
(_n_expr
)
7445 v
.enter_visit
(_n_id
)
7446 v
.enter_visit
(_n_assign_op
)
7447 v
.enter_visit
(_n_value
)
7450 redef class ACallExpr
7451 private init empty_init
do end
7453 init init_acallexpr
(
7454 n_expr
: nullable AExpr,
7456 n_args
: nullable AExprs
7460 _n_expr
= n_expr
.as(not null)
7461 n_expr
.parent
= self
7462 _n_id
= n_id
.as(not null)
7464 _n_args
= n_args
.as(not null)
7465 n_args
.parent
= self
7468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7470 if _n_expr
== old_child
then
7471 if new_child
!= null then
7472 new_child
.parent
= self
7473 assert new_child
isa AExpr
7480 if _n_id
== old_child
then
7481 if new_child
!= null then
7482 new_child
.parent
= self
7483 assert new_child
isa TId
7490 if _n_args
== old_child
then
7491 if new_child
!= null then
7492 new_child
.parent
= self
7493 assert new_child
isa AExprs
7502 redef fun n_expr
=(node
)
7507 redef fun n_id
=(node
)
7512 redef fun n_args
=(node
)
7519 redef fun visit_all
(v
: Visitor)
7521 v
.enter_visit
(_n_expr
)
7522 v
.enter_visit
(_n_id
)
7523 v
.enter_visit
(_n_args
)
7526 redef class ACallAssignExpr
7527 private init empty_init
do end
7529 init init_acallassignexpr
(
7530 n_expr
: nullable AExpr,
7532 n_args
: nullable AExprs,
7533 n_assign
: nullable TAssign,
7534 n_value
: nullable AExpr
7538 _n_expr
= n_expr
.as(not null)
7539 n_expr
.parent
= self
7540 _n_id
= n_id
.as(not null)
7542 _n_args
= n_args
.as(not null)
7543 n_args
.parent
= self
7544 _n_assign
= n_assign
.as(not null)
7545 n_assign
.parent
= self
7546 _n_value
= n_value
.as(not null)
7547 n_value
.parent
= self
7550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7552 if _n_expr
== old_child
then
7553 if new_child
!= null then
7554 new_child
.parent
= self
7555 assert new_child
isa AExpr
7562 if _n_id
== old_child
then
7563 if new_child
!= null then
7564 new_child
.parent
= self
7565 assert new_child
isa TId
7572 if _n_args
== old_child
then
7573 if new_child
!= null then
7574 new_child
.parent
= self
7575 assert new_child
isa AExprs
7582 if _n_assign
== old_child
then
7583 if new_child
!= null then
7584 new_child
.parent
= self
7585 assert new_child
isa TAssign
7586 _n_assign
= new_child
7592 if _n_value
== old_child
then
7593 if new_child
!= null then
7594 new_child
.parent
= self
7595 assert new_child
isa AExpr
7596 _n_value
= new_child
7604 redef fun n_expr
=(node
)
7609 redef fun n_id
=(node
)
7614 redef fun n_args
=(node
)
7619 redef fun n_assign
=(node
)
7624 redef fun n_value
=(node
)
7631 redef fun visit_all
(v
: Visitor)
7633 v
.enter_visit
(_n_expr
)
7634 v
.enter_visit
(_n_id
)
7635 v
.enter_visit
(_n_args
)
7636 v
.enter_visit
(_n_assign
)
7637 v
.enter_visit
(_n_value
)
7640 redef class ACallReassignExpr
7641 private init empty_init
do end
7643 init init_acallreassignexpr
(
7644 n_expr
: nullable AExpr,
7646 n_args
: nullable AExprs,
7647 n_assign_op
: nullable AAssignOp,
7648 n_value
: nullable AExpr
7652 _n_expr
= n_expr
.as(not null)
7653 n_expr
.parent
= self
7654 _n_id
= n_id
.as(not null)
7656 _n_args
= n_args
.as(not null)
7657 n_args
.parent
= self
7658 _n_assign_op
= n_assign_op
.as(not null)
7659 n_assign_op
.parent
= self
7660 _n_value
= n_value
.as(not null)
7661 n_value
.parent
= self
7664 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7666 if _n_expr
== old_child
then
7667 if new_child
!= null then
7668 new_child
.parent
= self
7669 assert new_child
isa AExpr
7676 if _n_id
== old_child
then
7677 if new_child
!= null then
7678 new_child
.parent
= self
7679 assert new_child
isa TId
7686 if _n_args
== old_child
then
7687 if new_child
!= null then
7688 new_child
.parent
= self
7689 assert new_child
isa AExprs
7696 if _n_assign_op
== old_child
then
7697 if new_child
!= null then
7698 new_child
.parent
= self
7699 assert new_child
isa AAssignOp
7700 _n_assign_op
= new_child
7706 if _n_value
== old_child
then
7707 if new_child
!= null then
7708 new_child
.parent
= self
7709 assert new_child
isa AExpr
7710 _n_value
= new_child
7718 redef fun n_expr
=(node
)
7723 redef fun n_id
=(node
)
7728 redef fun n_args
=(node
)
7733 redef fun n_assign_op
=(node
)
7738 redef fun n_value
=(node
)
7745 redef fun visit_all
(v
: Visitor)
7747 v
.enter_visit
(_n_expr
)
7748 v
.enter_visit
(_n_id
)
7749 v
.enter_visit
(_n_args
)
7750 v
.enter_visit
(_n_assign_op
)
7751 v
.enter_visit
(_n_value
)
7754 redef class ASuperExpr
7755 private init empty_init
do end
7757 init init_asuperexpr
(
7758 n_qualified
: nullable AQualified,
7759 n_kwsuper
: nullable TKwsuper,
7760 n_args
: nullable AExprs
7764 _n_qualified
= n_qualified
7765 if n_qualified
!= null then
7766 n_qualified
.parent
= self
7768 _n_kwsuper
= n_kwsuper
.as(not null)
7769 n_kwsuper
.parent
= self
7770 _n_args
= n_args
.as(not null)
7771 n_args
.parent
= self
7774 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7776 if _n_qualified
== old_child
then
7777 if new_child
!= null then
7778 new_child
.parent
= self
7779 assert new_child
isa AQualified
7780 _n_qualified
= new_child
7786 if _n_kwsuper
== old_child
then
7787 if new_child
!= null then
7788 new_child
.parent
= self
7789 assert new_child
isa TKwsuper
7790 _n_kwsuper
= new_child
7796 if _n_args
== old_child
then
7797 if new_child
!= null then
7798 new_child
.parent
= self
7799 assert new_child
isa AExprs
7808 redef fun n_qualified
=(node
)
7811 if node
!= null then
7815 redef fun n_kwsuper
=(node
)
7820 redef fun n_args
=(node
)
7827 redef fun visit_all
(v
: Visitor)
7829 if _n_qualified
!= null then
7830 v
.enter_visit
(_n_qualified
.as(not null))
7832 v
.enter_visit
(_n_kwsuper
)
7833 v
.enter_visit
(_n_args
)
7836 redef class AInitExpr
7837 private init empty_init
do end
7839 init init_ainitexpr
(
7840 n_expr
: nullable AExpr,
7841 n_kwinit
: nullable TKwinit,
7842 n_args
: nullable AExprs
7846 _n_expr
= n_expr
.as(not null)
7847 n_expr
.parent
= self
7848 _n_kwinit
= n_kwinit
.as(not null)
7849 n_kwinit
.parent
= self
7850 _n_args
= n_args
.as(not null)
7851 n_args
.parent
= self
7854 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7856 if _n_expr
== old_child
then
7857 if new_child
!= null then
7858 new_child
.parent
= self
7859 assert new_child
isa AExpr
7866 if _n_kwinit
== old_child
then
7867 if new_child
!= null then
7868 new_child
.parent
= self
7869 assert new_child
isa TKwinit
7870 _n_kwinit
= new_child
7876 if _n_args
== old_child
then
7877 if new_child
!= null then
7878 new_child
.parent
= self
7879 assert new_child
isa AExprs
7888 redef fun n_expr
=(node
)
7893 redef fun n_kwinit
=(node
)
7898 redef fun n_args
=(node
)
7905 redef fun visit_all
(v
: Visitor)
7907 v
.enter_visit
(_n_expr
)
7908 v
.enter_visit
(_n_kwinit
)
7909 v
.enter_visit
(_n_args
)
7912 redef class ABraExpr
7913 private init empty_init
do end
7915 init init_abraexpr
(
7916 n_expr
: nullable AExpr,
7917 n_args
: nullable AExprs
7921 _n_expr
= n_expr
.as(not null)
7922 n_expr
.parent
= self
7923 _n_args
= n_args
.as(not null)
7924 n_args
.parent
= self
7927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7929 if _n_expr
== old_child
then
7930 if new_child
!= null then
7931 new_child
.parent
= self
7932 assert new_child
isa AExpr
7939 if _n_args
== old_child
then
7940 if new_child
!= null then
7941 new_child
.parent
= self
7942 assert new_child
isa AExprs
7951 redef fun n_expr
=(node
)
7956 redef fun n_args
=(node
)
7963 redef fun visit_all
(v
: Visitor)
7965 v
.enter_visit
(_n_expr
)
7966 v
.enter_visit
(_n_args
)
7969 redef class ABraAssignExpr
7970 private init empty_init
do end
7972 init init_abraassignexpr
(
7973 n_expr
: nullable AExpr,
7974 n_args
: nullable AExprs,
7975 n_assign
: nullable TAssign,
7976 n_value
: nullable AExpr
7980 _n_expr
= n_expr
.as(not null)
7981 n_expr
.parent
= self
7982 _n_args
= n_args
.as(not null)
7983 n_args
.parent
= self
7984 _n_assign
= n_assign
.as(not null)
7985 n_assign
.parent
= self
7986 _n_value
= n_value
.as(not null)
7987 n_value
.parent
= self
7990 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7992 if _n_expr
== old_child
then
7993 if new_child
!= null then
7994 new_child
.parent
= self
7995 assert new_child
isa AExpr
8002 if _n_args
== old_child
then
8003 if new_child
!= null then
8004 new_child
.parent
= self
8005 assert new_child
isa AExprs
8012 if _n_assign
== old_child
then
8013 if new_child
!= null then
8014 new_child
.parent
= self
8015 assert new_child
isa TAssign
8016 _n_assign
= new_child
8022 if _n_value
== old_child
then
8023 if new_child
!= null then
8024 new_child
.parent
= self
8025 assert new_child
isa AExpr
8026 _n_value
= new_child
8034 redef fun n_expr
=(node
)
8039 redef fun n_args
=(node
)
8044 redef fun n_assign
=(node
)
8049 redef fun n_value
=(node
)
8056 redef fun visit_all
(v
: Visitor)
8058 v
.enter_visit
(_n_expr
)
8059 v
.enter_visit
(_n_args
)
8060 v
.enter_visit
(_n_assign
)
8061 v
.enter_visit
(_n_value
)
8064 redef class ABraReassignExpr
8065 private init empty_init
do end
8067 init init_abrareassignexpr
(
8068 n_expr
: nullable AExpr,
8069 n_args
: nullable AExprs,
8070 n_assign_op
: nullable AAssignOp,
8071 n_value
: nullable AExpr
8075 _n_expr
= n_expr
.as(not null)
8076 n_expr
.parent
= self
8077 _n_args
= n_args
.as(not null)
8078 n_args
.parent
= self
8079 _n_assign_op
= n_assign_op
.as(not null)
8080 n_assign_op
.parent
= self
8081 _n_value
= n_value
.as(not null)
8082 n_value
.parent
= self
8085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8087 if _n_expr
== old_child
then
8088 if new_child
!= null then
8089 new_child
.parent
= self
8090 assert new_child
isa AExpr
8097 if _n_args
== old_child
then
8098 if new_child
!= null then
8099 new_child
.parent
= self
8100 assert new_child
isa AExprs
8107 if _n_assign_op
== old_child
then
8108 if new_child
!= null then
8109 new_child
.parent
= self
8110 assert new_child
isa AAssignOp
8111 _n_assign_op
= new_child
8117 if _n_value
== old_child
then
8118 if new_child
!= null then
8119 new_child
.parent
= self
8120 assert new_child
isa AExpr
8121 _n_value
= new_child
8129 redef fun n_expr
=(node
)
8134 redef fun n_args
=(node
)
8139 redef fun n_assign_op
=(node
)
8144 redef fun n_value
=(node
)
8151 redef fun visit_all
(v
: Visitor)
8153 v
.enter_visit
(_n_expr
)
8154 v
.enter_visit
(_n_args
)
8155 v
.enter_visit
(_n_assign_op
)
8156 v
.enter_visit
(_n_value
)
8159 redef class AVarExpr
8160 private init empty_init
do end
8162 init init_avarexpr
(
8167 _n_id
= n_id
.as(not null)
8171 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8173 if _n_id
== old_child
then
8174 if new_child
!= null then
8175 new_child
.parent
= self
8176 assert new_child
isa TId
8185 redef fun n_id
=(node
)
8192 redef fun visit_all
(v
: Visitor)
8194 v
.enter_visit
(_n_id
)
8197 redef class AVarAssignExpr
8198 private init empty_init
do end
8200 init init_avarassignexpr
(
8202 n_assign
: nullable TAssign,
8203 n_value
: nullable AExpr
8207 _n_id
= n_id
.as(not null)
8209 _n_assign
= n_assign
.as(not null)
8210 n_assign
.parent
= self
8211 _n_value
= n_value
.as(not null)
8212 n_value
.parent
= self
8215 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8217 if _n_id
== old_child
then
8218 if new_child
!= null then
8219 new_child
.parent
= self
8220 assert new_child
isa TId
8227 if _n_assign
== old_child
then
8228 if new_child
!= null then
8229 new_child
.parent
= self
8230 assert new_child
isa TAssign
8231 _n_assign
= new_child
8237 if _n_value
== old_child
then
8238 if new_child
!= null then
8239 new_child
.parent
= self
8240 assert new_child
isa AExpr
8241 _n_value
= new_child
8249 redef fun n_id
=(node
)
8254 redef fun n_assign
=(node
)
8259 redef fun n_value
=(node
)
8266 redef fun visit_all
(v
: Visitor)
8268 v
.enter_visit
(_n_id
)
8269 v
.enter_visit
(_n_assign
)
8270 v
.enter_visit
(_n_value
)
8273 redef class AVarReassignExpr
8274 private init empty_init
do end
8276 init init_avarreassignexpr
(
8278 n_assign_op
: nullable AAssignOp,
8279 n_value
: nullable AExpr
8283 _n_id
= n_id
.as(not null)
8285 _n_assign_op
= n_assign_op
.as(not null)
8286 n_assign_op
.parent
= self
8287 _n_value
= n_value
.as(not null)
8288 n_value
.parent
= self
8291 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8293 if _n_id
== old_child
then
8294 if new_child
!= null then
8295 new_child
.parent
= self
8296 assert new_child
isa TId
8303 if _n_assign_op
== old_child
then
8304 if new_child
!= null then
8305 new_child
.parent
= self
8306 assert new_child
isa AAssignOp
8307 _n_assign_op
= new_child
8313 if _n_value
== old_child
then
8314 if new_child
!= null then
8315 new_child
.parent
= self
8316 assert new_child
isa AExpr
8317 _n_value
= new_child
8325 redef fun n_id
=(node
)
8330 redef fun n_assign_op
=(node
)
8335 redef fun n_value
=(node
)
8342 redef fun visit_all
(v
: Visitor)
8344 v
.enter_visit
(_n_id
)
8345 v
.enter_visit
(_n_assign_op
)
8346 v
.enter_visit
(_n_value
)
8349 redef class ARangeExpr
8350 private init empty_init
do end
8352 init init_arangeexpr
(
8353 n_expr
: nullable AExpr,
8354 n_expr2
: nullable AExpr,
8355 n_annotations
: nullable AAnnotations
8359 _n_expr
= n_expr
.as(not null)
8360 n_expr
.parent
= self
8361 _n_expr2
= n_expr2
.as(not null)
8362 n_expr2
.parent
= self
8363 _n_annotations
= n_annotations
8364 if n_annotations
!= null then
8365 n_annotations
.parent
= self
8369 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8371 if _n_expr
== old_child
then
8372 if new_child
!= null then
8373 new_child
.parent
= self
8374 assert new_child
isa AExpr
8381 if _n_expr2
== old_child
then
8382 if new_child
!= null then
8383 new_child
.parent
= self
8384 assert new_child
isa AExpr
8385 _n_expr2
= new_child
8391 if _n_annotations
== old_child
then
8392 if new_child
!= null then
8393 new_child
.parent
= self
8394 assert new_child
isa AAnnotations
8395 _n_annotations
= new_child
8397 _n_annotations
= null
8403 redef fun n_expr
=(node
)
8408 redef fun n_expr2
=(node
)
8413 redef fun n_annotations
=(node
)
8415 _n_annotations
= node
8416 if node
!= null then
8422 redef fun visit_all
(v
: Visitor)
8424 v
.enter_visit
(_n_expr
)
8425 v
.enter_visit
(_n_expr2
)
8426 if _n_annotations
!= null then
8427 v
.enter_visit
(_n_annotations
.as(not null))
8431 redef class ACrangeExpr
8432 private init empty_init
do end
8434 init init_acrangeexpr
(
8435 n_obra
: nullable TObra,
8436 n_expr
: nullable AExpr,
8437 n_expr2
: nullable AExpr,
8438 n_cbra
: nullable TCbra,
8439 n_annotations
: nullable AAnnotations
8443 _n_obra
= n_obra
.as(not null)
8444 n_obra
.parent
= self
8445 _n_expr
= n_expr
.as(not null)
8446 n_expr
.parent
= self
8447 _n_expr2
= n_expr2
.as(not null)
8448 n_expr2
.parent
= self
8449 _n_cbra
= n_cbra
.as(not null)
8450 n_cbra
.parent
= self
8451 _n_annotations
= n_annotations
8452 if n_annotations
!= null then
8453 n_annotations
.parent
= self
8457 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8459 if _n_obra
== old_child
then
8460 if new_child
!= null then
8461 new_child
.parent
= self
8462 assert new_child
isa TObra
8469 if _n_expr
== old_child
then
8470 if new_child
!= null then
8471 new_child
.parent
= self
8472 assert new_child
isa AExpr
8479 if _n_expr2
== old_child
then
8480 if new_child
!= null then
8481 new_child
.parent
= self
8482 assert new_child
isa AExpr
8483 _n_expr2
= new_child
8489 if _n_cbra
== old_child
then
8490 if new_child
!= null then
8491 new_child
.parent
= self
8492 assert new_child
isa TCbra
8499 if _n_annotations
== old_child
then
8500 if new_child
!= null then
8501 new_child
.parent
= self
8502 assert new_child
isa AAnnotations
8503 _n_annotations
= new_child
8505 _n_annotations
= null
8511 redef fun n_obra
=(node
)
8516 redef fun n_expr
=(node
)
8521 redef fun n_expr2
=(node
)
8526 redef fun n_cbra
=(node
)
8531 redef fun n_annotations
=(node
)
8533 _n_annotations
= node
8534 if node
!= null then
8540 redef fun visit_all
(v
: Visitor)
8542 v
.enter_visit
(_n_obra
)
8543 v
.enter_visit
(_n_expr
)
8544 v
.enter_visit
(_n_expr2
)
8545 v
.enter_visit
(_n_cbra
)
8546 if _n_annotations
!= null then
8547 v
.enter_visit
(_n_annotations
.as(not null))
8551 redef class AOrangeExpr
8552 private init empty_init
do end
8554 init init_aorangeexpr
(
8555 n_obra
: nullable TObra,
8556 n_expr
: nullable AExpr,
8557 n_expr2
: nullable AExpr,
8558 n_cbra
: nullable TObra,
8559 n_annotations
: nullable AAnnotations
8563 _n_obra
= n_obra
.as(not null)
8564 n_obra
.parent
= self
8565 _n_expr
= n_expr
.as(not null)
8566 n_expr
.parent
= self
8567 _n_expr2
= n_expr2
.as(not null)
8568 n_expr2
.parent
= self
8569 _n_cbra
= n_cbra
.as(not null)
8570 n_cbra
.parent
= self
8571 _n_annotations
= n_annotations
8572 if n_annotations
!= null then
8573 n_annotations
.parent
= self
8577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8579 if _n_obra
== old_child
then
8580 if new_child
!= null then
8581 new_child
.parent
= self
8582 assert new_child
isa TObra
8589 if _n_expr
== old_child
then
8590 if new_child
!= null then
8591 new_child
.parent
= self
8592 assert new_child
isa AExpr
8599 if _n_expr2
== old_child
then
8600 if new_child
!= null then
8601 new_child
.parent
= self
8602 assert new_child
isa AExpr
8603 _n_expr2
= new_child
8609 if _n_cbra
== old_child
then
8610 if new_child
!= null then
8611 new_child
.parent
= self
8612 assert new_child
isa TObra
8619 if _n_annotations
== old_child
then
8620 if new_child
!= null then
8621 new_child
.parent
= self
8622 assert new_child
isa AAnnotations
8623 _n_annotations
= new_child
8625 _n_annotations
= null
8631 redef fun n_obra
=(node
)
8636 redef fun n_expr
=(node
)
8641 redef fun n_expr2
=(node
)
8646 redef fun n_cbra
=(node
)
8651 redef fun n_annotations
=(node
)
8653 _n_annotations
= node
8654 if node
!= null then
8660 redef fun visit_all
(v
: Visitor)
8662 v
.enter_visit
(_n_obra
)
8663 v
.enter_visit
(_n_expr
)
8664 v
.enter_visit
(_n_expr2
)
8665 v
.enter_visit
(_n_cbra
)
8666 if _n_annotations
!= null then
8667 v
.enter_visit
(_n_annotations
.as(not null))
8671 redef class AArrayExpr
8672 private init empty_init
do end
8674 init init_aarrayexpr
(
8675 n_exprs
: nullable AExprs,
8676 n_annotations
: nullable AAnnotations
8680 _n_exprs
= n_exprs
.as(not null)
8681 n_exprs
.parent
= self
8682 _n_annotations
= n_annotations
8683 if n_annotations
!= null then
8684 n_annotations
.parent
= self
8688 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8690 if _n_exprs
== old_child
then
8691 if new_child
!= null then
8692 new_child
.parent
= self
8693 assert new_child
isa AExprs
8694 _n_exprs
= new_child
8700 if _n_annotations
== old_child
then
8701 if new_child
!= null then
8702 new_child
.parent
= self
8703 assert new_child
isa AAnnotations
8704 _n_annotations
= new_child
8706 _n_annotations
= null
8712 redef fun n_exprs
=(node
)
8717 redef fun n_annotations
=(node
)
8719 _n_annotations
= node
8720 if node
!= null then
8726 redef fun visit_all
(v
: Visitor)
8728 v
.enter_visit
(_n_exprs
)
8729 if _n_annotations
!= null then
8730 v
.enter_visit
(_n_annotations
.as(not null))
8734 redef class ASelfExpr
8735 private init empty_init
do end
8737 init init_aselfexpr
(
8738 n_kwself
: nullable TKwself,
8739 n_annotations
: nullable AAnnotations
8743 _n_kwself
= n_kwself
.as(not null)
8744 n_kwself
.parent
= self
8745 _n_annotations
= n_annotations
8746 if n_annotations
!= null then
8747 n_annotations
.parent
= self
8751 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8753 if _n_kwself
== old_child
then
8754 if new_child
!= null then
8755 new_child
.parent
= self
8756 assert new_child
isa TKwself
8757 _n_kwself
= new_child
8763 if _n_annotations
== old_child
then
8764 if new_child
!= null then
8765 new_child
.parent
= self
8766 assert new_child
isa AAnnotations
8767 _n_annotations
= new_child
8769 _n_annotations
= null
8775 redef fun n_kwself
=(node
)
8780 redef fun n_annotations
=(node
)
8782 _n_annotations
= node
8783 if node
!= null then
8789 redef fun visit_all
(v
: Visitor)
8791 v
.enter_visit
(_n_kwself
)
8792 if _n_annotations
!= null then
8793 v
.enter_visit
(_n_annotations
.as(not null))
8797 redef class AImplicitSelfExpr
8798 private init empty_init
do end
8800 init init_aimplicitselfexpr
8805 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8811 redef fun visit_all
(v
: Visitor)
8815 redef class ATrueExpr
8816 private init empty_init
do end
8818 init init_atrueexpr
(
8819 n_kwtrue
: nullable TKwtrue,
8820 n_annotations
: nullable AAnnotations
8824 _n_kwtrue
= n_kwtrue
.as(not null)
8825 n_kwtrue
.parent
= self
8826 _n_annotations
= n_annotations
8827 if n_annotations
!= null then
8828 n_annotations
.parent
= self
8832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8834 if _n_kwtrue
== old_child
then
8835 if new_child
!= null then
8836 new_child
.parent
= self
8837 assert new_child
isa TKwtrue
8838 _n_kwtrue
= new_child
8844 if _n_annotations
== old_child
then
8845 if new_child
!= null then
8846 new_child
.parent
= self
8847 assert new_child
isa AAnnotations
8848 _n_annotations
= new_child
8850 _n_annotations
= null
8856 redef fun n_kwtrue
=(node
)
8861 redef fun n_annotations
=(node
)
8863 _n_annotations
= node
8864 if node
!= null then
8870 redef fun visit_all
(v
: Visitor)
8872 v
.enter_visit
(_n_kwtrue
)
8873 if _n_annotations
!= null then
8874 v
.enter_visit
(_n_annotations
.as(not null))
8878 redef class AFalseExpr
8879 private init empty_init
do end
8881 init init_afalseexpr
(
8882 n_kwfalse
: nullable TKwfalse,
8883 n_annotations
: nullable AAnnotations
8887 _n_kwfalse
= n_kwfalse
.as(not null)
8888 n_kwfalse
.parent
= self
8889 _n_annotations
= n_annotations
8890 if n_annotations
!= null then
8891 n_annotations
.parent
= self
8895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8897 if _n_kwfalse
== old_child
then
8898 if new_child
!= null then
8899 new_child
.parent
= self
8900 assert new_child
isa TKwfalse
8901 _n_kwfalse
= new_child
8907 if _n_annotations
== old_child
then
8908 if new_child
!= null then
8909 new_child
.parent
= self
8910 assert new_child
isa AAnnotations
8911 _n_annotations
= new_child
8913 _n_annotations
= null
8919 redef fun n_kwfalse
=(node
)
8924 redef fun n_annotations
=(node
)
8926 _n_annotations
= node
8927 if node
!= null then
8933 redef fun visit_all
(v
: Visitor)
8935 v
.enter_visit
(_n_kwfalse
)
8936 if _n_annotations
!= null then
8937 v
.enter_visit
(_n_annotations
.as(not null))
8941 redef class ANullExpr
8942 private init empty_init
do end
8944 init init_anullexpr
(
8945 n_kwnull
: nullable TKwnull,
8946 n_annotations
: nullable AAnnotations
8950 _n_kwnull
= n_kwnull
.as(not null)
8951 n_kwnull
.parent
= self
8952 _n_annotations
= n_annotations
8953 if n_annotations
!= null then
8954 n_annotations
.parent
= self
8958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8960 if _n_kwnull
== old_child
then
8961 if new_child
!= null then
8962 new_child
.parent
= self
8963 assert new_child
isa TKwnull
8964 _n_kwnull
= new_child
8970 if _n_annotations
== old_child
then
8971 if new_child
!= null then
8972 new_child
.parent
= self
8973 assert new_child
isa AAnnotations
8974 _n_annotations
= new_child
8976 _n_annotations
= null
8982 redef fun n_kwnull
=(node
)
8987 redef fun n_annotations
=(node
)
8989 _n_annotations
= node
8990 if node
!= null then
8996 redef fun visit_all
(v
: Visitor)
8998 v
.enter_visit
(_n_kwnull
)
8999 if _n_annotations
!= null then
9000 v
.enter_visit
(_n_annotations
.as(not null))
9004 redef class AIntExpr
9005 private init empty_init
do end
9007 init init_aintexpr
(
9008 n_number
: nullable TNumber,
9009 n_annotations
: nullable AAnnotations
9013 _n_number
= n_number
.as(not null)
9014 n_number
.parent
= self
9015 _n_annotations
= n_annotations
9016 if n_annotations
!= null then
9017 n_annotations
.parent
= self
9021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9023 if _n_number
== old_child
then
9024 if new_child
!= null then
9025 new_child
.parent
= self
9026 assert new_child
isa TNumber
9027 _n_number
= new_child
9033 if _n_annotations
== old_child
then
9034 if new_child
!= null then
9035 new_child
.parent
= self
9036 assert new_child
isa AAnnotations
9037 _n_annotations
= new_child
9039 _n_annotations
= null
9045 redef fun n_number
=(node
)
9050 redef fun n_annotations
=(node
)
9052 _n_annotations
= node
9053 if node
!= null then
9059 redef fun visit_all
(v
: Visitor)
9061 v
.enter_visit
(_n_number
)
9062 if _n_annotations
!= null then
9063 v
.enter_visit
(_n_annotations
.as(not null))
9067 redef class AFloatExpr
9068 private init empty_init
do end
9070 init init_afloatexpr
(
9071 n_float
: nullable TFloat,
9072 n_annotations
: nullable AAnnotations
9076 _n_float
= n_float
.as(not null)
9077 n_float
.parent
= self
9078 _n_annotations
= n_annotations
9079 if n_annotations
!= null then
9080 n_annotations
.parent
= self
9084 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9086 if _n_float
== old_child
then
9087 if new_child
!= null then
9088 new_child
.parent
= self
9089 assert new_child
isa TFloat
9090 _n_float
= new_child
9096 if _n_annotations
== old_child
then
9097 if new_child
!= null then
9098 new_child
.parent
= self
9099 assert new_child
isa AAnnotations
9100 _n_annotations
= new_child
9102 _n_annotations
= null
9108 redef fun n_float
=(node
)
9113 redef fun n_annotations
=(node
)
9115 _n_annotations
= node
9116 if node
!= null then
9122 redef fun visit_all
(v
: Visitor)
9124 v
.enter_visit
(_n_float
)
9125 if _n_annotations
!= null then
9126 v
.enter_visit
(_n_annotations
.as(not null))
9130 redef class ACharExpr
9131 private init empty_init
do end
9133 init init_acharexpr
(
9134 n_char
: nullable TChar,
9135 n_annotations
: nullable AAnnotations
9139 _n_char
= n_char
.as(not null)
9140 n_char
.parent
= self
9141 _n_annotations
= n_annotations
9142 if n_annotations
!= null then
9143 n_annotations
.parent
= self
9147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9149 if _n_char
== old_child
then
9150 if new_child
!= null then
9151 new_child
.parent
= self
9152 assert new_child
isa TChar
9159 if _n_annotations
== old_child
then
9160 if new_child
!= null then
9161 new_child
.parent
= self
9162 assert new_child
isa AAnnotations
9163 _n_annotations
= new_child
9165 _n_annotations
= null
9171 redef fun n_char
=(node
)
9176 redef fun n_annotations
=(node
)
9178 _n_annotations
= node
9179 if node
!= null then
9185 redef fun visit_all
(v
: Visitor)
9187 v
.enter_visit
(_n_char
)
9188 if _n_annotations
!= null then
9189 v
.enter_visit
(_n_annotations
.as(not null))
9193 redef class AStringExpr
9194 private init empty_init
do end
9196 init init_astringexpr
(
9197 n_string
: nullable TString,
9198 n_annotations
: nullable AAnnotations
9202 _n_string
= n_string
.as(not null)
9203 n_string
.parent
= self
9204 _n_annotations
= n_annotations
9205 if n_annotations
!= null then
9206 n_annotations
.parent
= self
9210 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9212 if _n_string
== old_child
then
9213 if new_child
!= null then
9214 new_child
.parent
= self
9215 assert new_child
isa TString
9216 _n_string
= new_child
9222 if _n_annotations
== old_child
then
9223 if new_child
!= null then
9224 new_child
.parent
= self
9225 assert new_child
isa AAnnotations
9226 _n_annotations
= new_child
9228 _n_annotations
= null
9234 redef fun n_string
=(node
)
9239 redef fun n_annotations
=(node
)
9241 _n_annotations
= node
9242 if node
!= null then
9248 redef fun visit_all
(v
: Visitor)
9250 v
.enter_visit
(_n_string
)
9251 if _n_annotations
!= null then
9252 v
.enter_visit
(_n_annotations
.as(not null))
9256 redef class AStartStringExpr
9257 private init empty_init
do end
9259 init init_astartstringexpr
(
9260 n_string
: nullable TStartString
9264 _n_string
= n_string
.as(not null)
9265 n_string
.parent
= self
9268 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9270 if _n_string
== old_child
then
9271 if new_child
!= null then
9272 new_child
.parent
= self
9273 assert new_child
isa TStartString
9274 _n_string
= new_child
9282 redef fun n_string
=(node
)
9289 redef fun visit_all
(v
: Visitor)
9291 v
.enter_visit
(_n_string
)
9294 redef class AMidStringExpr
9295 private init empty_init
do end
9297 init init_amidstringexpr
(
9298 n_string
: nullable TMidString
9302 _n_string
= n_string
.as(not null)
9303 n_string
.parent
= self
9306 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9308 if _n_string
== old_child
then
9309 if new_child
!= null then
9310 new_child
.parent
= self
9311 assert new_child
isa TMidString
9312 _n_string
= new_child
9320 redef fun n_string
=(node
)
9327 redef fun visit_all
(v
: Visitor)
9329 v
.enter_visit
(_n_string
)
9332 redef class AEndStringExpr
9333 private init empty_init
do end
9335 init init_aendstringexpr
(
9336 n_string
: nullable TEndString
9340 _n_string
= n_string
.as(not null)
9341 n_string
.parent
= self
9344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9346 if _n_string
== old_child
then
9347 if new_child
!= null then
9348 new_child
.parent
= self
9349 assert new_child
isa TEndString
9350 _n_string
= new_child
9358 redef fun n_string
=(node
)
9365 redef fun visit_all
(v
: Visitor)
9367 v
.enter_visit
(_n_string
)
9370 redef class ASuperstringExpr
9371 private init empty_init
do end
9373 init init_asuperstringexpr
(
9374 n_exprs
: Collection[Object], # Should be Collection[AExpr]
9375 n_annotations
: nullable AAnnotations
9384 _n_annotations
= n_annotations
9385 if n_annotations
!= null then
9386 n_annotations
.parent
= self
9390 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9392 for i
in [0.._n_exprs
.length
[ do
9393 if _n_exprs
[i
] == old_child
then
9394 if new_child
!= null then
9395 assert new_child
isa AExpr
9396 _n_exprs
[i
] = new_child
9397 new_child
.parent
= self
9399 _n_exprs
.remove_at
(i
)
9404 if _n_annotations
== old_child
then
9405 if new_child
!= null then
9406 new_child
.parent
= self
9407 assert new_child
isa AAnnotations
9408 _n_annotations
= new_child
9410 _n_annotations
= null
9416 redef fun n_annotations
=(node
)
9418 _n_annotations
= node
9419 if node
!= null then
9425 redef fun visit_all
(v
: Visitor)
9427 for n
in _n_exprs
do
9430 if _n_annotations
!= null then
9431 v
.enter_visit
(_n_annotations
.as(not null))
9435 redef class AParExpr
9436 private init empty_init
do end
9438 init init_aparexpr
(
9439 n_opar
: nullable TOpar,
9440 n_expr
: nullable AExpr,
9441 n_cpar
: nullable TCpar,
9442 n_annotations
: nullable AAnnotations
9446 _n_opar
= n_opar
.as(not null)
9447 n_opar
.parent
= self
9448 _n_expr
= n_expr
.as(not null)
9449 n_expr
.parent
= self
9450 _n_cpar
= n_cpar
.as(not null)
9451 n_cpar
.parent
= self
9452 _n_annotations
= n_annotations
9453 if n_annotations
!= null then
9454 n_annotations
.parent
= self
9458 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9460 if _n_opar
== old_child
then
9461 if new_child
!= null then
9462 new_child
.parent
= self
9463 assert new_child
isa TOpar
9470 if _n_expr
== old_child
then
9471 if new_child
!= null then
9472 new_child
.parent
= self
9473 assert new_child
isa AExpr
9480 if _n_cpar
== old_child
then
9481 if new_child
!= null then
9482 new_child
.parent
= self
9483 assert new_child
isa TCpar
9490 if _n_annotations
== old_child
then
9491 if new_child
!= null then
9492 new_child
.parent
= self
9493 assert new_child
isa AAnnotations
9494 _n_annotations
= new_child
9496 _n_annotations
= null
9502 redef fun n_opar
=(node
)
9507 redef fun n_expr
=(node
)
9512 redef fun n_cpar
=(node
)
9517 redef fun n_annotations
=(node
)
9519 _n_annotations
= node
9520 if node
!= null then
9526 redef fun visit_all
(v
: Visitor)
9528 v
.enter_visit
(_n_opar
)
9529 v
.enter_visit
(_n_expr
)
9530 v
.enter_visit
(_n_cpar
)
9531 if _n_annotations
!= null then
9532 v
.enter_visit
(_n_annotations
.as(not null))
9536 redef class AAsCastExpr
9537 private init empty_init
do end
9539 init init_aascastexpr
(
9540 n_expr
: nullable AExpr,
9541 n_kwas
: nullable TKwas,
9542 n_opar
: nullable TOpar,
9543 n_type
: nullable AType,
9544 n_cpar
: nullable TCpar
9548 _n_expr
= n_expr
.as(not null)
9549 n_expr
.parent
= self
9550 _n_kwas
= n_kwas
.as(not null)
9551 n_kwas
.parent
= self
9552 _n_opar
= n_opar
.as(not null)
9553 n_opar
.parent
= self
9554 _n_type
= n_type
.as(not null)
9555 n_type
.parent
= self
9556 _n_cpar
= n_cpar
.as(not null)
9557 n_cpar
.parent
= self
9560 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9562 if _n_expr
== old_child
then
9563 if new_child
!= null then
9564 new_child
.parent
= self
9565 assert new_child
isa AExpr
9572 if _n_kwas
== old_child
then
9573 if new_child
!= null then
9574 new_child
.parent
= self
9575 assert new_child
isa TKwas
9582 if _n_opar
== old_child
then
9583 if new_child
!= null then
9584 new_child
.parent
= self
9585 assert new_child
isa TOpar
9592 if _n_type
== old_child
then
9593 if new_child
!= null then
9594 new_child
.parent
= self
9595 assert new_child
isa AType
9602 if _n_cpar
== old_child
then
9603 if new_child
!= null then
9604 new_child
.parent
= self
9605 assert new_child
isa TCpar
9614 redef fun n_expr
=(node
)
9619 redef fun n_kwas
=(node
)
9624 redef fun n_opar
=(node
)
9629 redef fun n_type
=(node
)
9634 redef fun n_cpar
=(node
)
9641 redef fun visit_all
(v
: Visitor)
9643 v
.enter_visit
(_n_expr
)
9644 v
.enter_visit
(_n_kwas
)
9645 v
.enter_visit
(_n_opar
)
9646 v
.enter_visit
(_n_type
)
9647 v
.enter_visit
(_n_cpar
)
9650 redef class AAsNotnullExpr
9651 private init empty_init
do end
9653 init init_aasnotnullexpr
(
9654 n_expr
: nullable AExpr,
9655 n_kwas
: nullable TKwas,
9656 n_opar
: nullable TOpar,
9657 n_kwnot
: nullable TKwnot,
9658 n_kwnull
: nullable TKwnull,
9659 n_cpar
: nullable TCpar
9663 _n_expr
= n_expr
.as(not null)
9664 n_expr
.parent
= self
9665 _n_kwas
= n_kwas
.as(not null)
9666 n_kwas
.parent
= self
9667 _n_opar
= n_opar
.as(not null)
9668 n_opar
.parent
= self
9669 _n_kwnot
= n_kwnot
.as(not null)
9670 n_kwnot
.parent
= self
9671 _n_kwnull
= n_kwnull
.as(not null)
9672 n_kwnull
.parent
= self
9673 _n_cpar
= n_cpar
.as(not null)
9674 n_cpar
.parent
= self
9677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9679 if _n_expr
== old_child
then
9680 if new_child
!= null then
9681 new_child
.parent
= self
9682 assert new_child
isa AExpr
9689 if _n_kwas
== old_child
then
9690 if new_child
!= null then
9691 new_child
.parent
= self
9692 assert new_child
isa TKwas
9699 if _n_opar
== old_child
then
9700 if new_child
!= null then
9701 new_child
.parent
= self
9702 assert new_child
isa TOpar
9709 if _n_kwnot
== old_child
then
9710 if new_child
!= null then
9711 new_child
.parent
= self
9712 assert new_child
isa TKwnot
9713 _n_kwnot
= new_child
9719 if _n_kwnull
== old_child
then
9720 if new_child
!= null then
9721 new_child
.parent
= self
9722 assert new_child
isa TKwnull
9723 _n_kwnull
= new_child
9729 if _n_cpar
== old_child
then
9730 if new_child
!= null then
9731 new_child
.parent
= self
9732 assert new_child
isa TCpar
9741 redef fun n_expr
=(node
)
9746 redef fun n_kwas
=(node
)
9751 redef fun n_opar
=(node
)
9756 redef fun n_kwnot
=(node
)
9761 redef fun n_kwnull
=(node
)
9766 redef fun n_cpar
=(node
)
9773 redef fun visit_all
(v
: Visitor)
9775 v
.enter_visit
(_n_expr
)
9776 v
.enter_visit
(_n_kwas
)
9777 v
.enter_visit
(_n_opar
)
9778 v
.enter_visit
(_n_kwnot
)
9779 v
.enter_visit
(_n_kwnull
)
9780 v
.enter_visit
(_n_cpar
)
9783 redef class AIssetAttrExpr
9784 private init empty_init
do end
9786 init init_aissetattrexpr
(
9787 n_kwisset
: nullable TKwisset,
9788 n_expr
: nullable AExpr,
9789 n_id
: nullable TAttrid
9793 _n_kwisset
= n_kwisset
.as(not null)
9794 n_kwisset
.parent
= self
9795 _n_expr
= n_expr
.as(not null)
9796 n_expr
.parent
= self
9797 _n_id
= n_id
.as(not null)
9801 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9803 if _n_kwisset
== old_child
then
9804 if new_child
!= null then
9805 new_child
.parent
= self
9806 assert new_child
isa TKwisset
9807 _n_kwisset
= new_child
9813 if _n_expr
== old_child
then
9814 if new_child
!= null then
9815 new_child
.parent
= self
9816 assert new_child
isa AExpr
9823 if _n_id
== old_child
then
9824 if new_child
!= null then
9825 new_child
.parent
= self
9826 assert new_child
isa TAttrid
9835 redef fun n_kwisset
=(node
)
9840 redef fun n_expr
=(node
)
9845 redef fun n_id
=(node
)
9852 redef fun visit_all
(v
: Visitor)
9854 v
.enter_visit
(_n_kwisset
)
9855 v
.enter_visit
(_n_expr
)
9856 v
.enter_visit
(_n_id
)
9859 redef class ADebugTypeExpr
9860 private init empty_init
do end
9862 init init_adebugtypeexpr
(
9863 n_kwdebug
: nullable TKwdebug,
9864 n_kwtype
: nullable TKwtype,
9865 n_expr
: nullable AExpr,
9866 n_type
: nullable AType
9870 _n_kwdebug
= n_kwdebug
.as(not null)
9871 n_kwdebug
.parent
= self
9872 _n_kwtype
= n_kwtype
.as(not null)
9873 n_kwtype
.parent
= self
9874 _n_expr
= n_expr
.as(not null)
9875 n_expr
.parent
= self
9876 _n_type
= n_type
.as(not null)
9877 n_type
.parent
= self
9880 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9882 if _n_kwdebug
== old_child
then
9883 if new_child
!= null then
9884 new_child
.parent
= self
9885 assert new_child
isa TKwdebug
9886 _n_kwdebug
= new_child
9892 if _n_kwtype
== old_child
then
9893 if new_child
!= null then
9894 new_child
.parent
= self
9895 assert new_child
isa TKwtype
9896 _n_kwtype
= new_child
9902 if _n_expr
== old_child
then
9903 if new_child
!= null then
9904 new_child
.parent
= self
9905 assert new_child
isa AExpr
9912 if _n_type
== old_child
then
9913 if new_child
!= null then
9914 new_child
.parent
= self
9915 assert new_child
isa AType
9924 redef fun n_kwdebug
=(node
)
9929 redef fun n_kwtype
=(node
)
9934 redef fun n_expr
=(node
)
9939 redef fun n_type
=(node
)
9946 redef fun visit_all
(v
: Visitor)
9948 v
.enter_visit
(_n_kwdebug
)
9949 v
.enter_visit
(_n_kwtype
)
9950 v
.enter_visit
(_n_expr
)
9951 v
.enter_visit
(_n_type
)
9954 redef class AListExprs
9955 private init empty_init
do end
9957 init init_alistexprs
(
9958 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9969 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9971 for i
in [0.._n_exprs
.length
[ do
9972 if _n_exprs
[i
] == old_child
then
9973 if new_child
!= null then
9974 assert new_child
isa AExpr
9975 _n_exprs
[i
] = new_child
9976 new_child
.parent
= self
9978 _n_exprs
.remove_at
(i
)
9987 redef fun visit_all
(v
: Visitor)
9989 for n
in _n_exprs
do
9994 redef class AParExprs
9995 private init empty_init
do end
9997 init init_aparexprs
(
9998 n_opar
: nullable TOpar,
9999 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10000 n_cpar
: nullable TCpar
10004 _n_opar
= n_opar
.as(not null)
10005 n_opar
.parent
= self
10006 for n
in n_exprs
do
10011 _n_cpar
= n_cpar
.as(not null)
10012 n_cpar
.parent
= self
10015 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10017 if _n_opar
== old_child
then
10018 if new_child
!= null then
10019 new_child
.parent
= self
10020 assert new_child
isa TOpar
10021 _n_opar
= new_child
10027 for i
in [0.._n_exprs
.length
[ do
10028 if _n_exprs
[i
] == old_child
then
10029 if new_child
!= null then
10030 assert new_child
isa AExpr
10031 _n_exprs
[i
] = new_child
10032 new_child
.parent
= self
10034 _n_exprs
.remove_at
(i
)
10039 if _n_cpar
== old_child
then
10040 if new_child
!= null then
10041 new_child
.parent
= self
10042 assert new_child
isa TCpar
10043 _n_cpar
= new_child
10051 redef fun n_opar
=(node
)
10056 redef fun n_cpar
=(node
)
10063 redef fun visit_all
(v
: Visitor)
10065 v
.enter_visit
(_n_opar
)
10066 for n
in _n_exprs
do
10069 v
.enter_visit
(_n_cpar
)
10072 redef class ABraExprs
10073 private init empty_init
do end
10075 init init_abraexprs
(
10076 n_obra
: nullable TObra,
10077 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10078 n_cbra
: nullable TCbra
10082 _n_obra
= n_obra
.as(not null)
10083 n_obra
.parent
= self
10084 for n
in n_exprs
do
10089 _n_cbra
= n_cbra
.as(not null)
10090 n_cbra
.parent
= self
10093 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10095 if _n_obra
== old_child
then
10096 if new_child
!= null then
10097 new_child
.parent
= self
10098 assert new_child
isa TObra
10099 _n_obra
= new_child
10105 for i
in [0.._n_exprs
.length
[ do
10106 if _n_exprs
[i
] == old_child
then
10107 if new_child
!= null then
10108 assert new_child
isa AExpr
10109 _n_exprs
[i
] = new_child
10110 new_child
.parent
= self
10112 _n_exprs
.remove_at
(i
)
10117 if _n_cbra
== old_child
then
10118 if new_child
!= null then
10119 new_child
.parent
= self
10120 assert new_child
isa TCbra
10121 _n_cbra
= new_child
10129 redef fun n_obra
=(node
)
10134 redef fun n_cbra
=(node
)
10141 redef fun visit_all
(v
: Visitor)
10143 v
.enter_visit
(_n_obra
)
10144 for n
in _n_exprs
do
10147 v
.enter_visit
(_n_cbra
)
10150 redef class APlusAssignOp
10151 private init empty_init
do end
10153 init init_aplusassignop
(
10154 n_pluseq
: nullable TPluseq
10158 _n_pluseq
= n_pluseq
.as(not null)
10159 n_pluseq
.parent
= self
10162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10164 if _n_pluseq
== old_child
then
10165 if new_child
!= null then
10166 new_child
.parent
= self
10167 assert new_child
isa TPluseq
10168 _n_pluseq
= new_child
10176 redef fun n_pluseq
=(node
)
10183 redef fun visit_all
(v
: Visitor)
10185 v
.enter_visit
(_n_pluseq
)
10188 redef class AMinusAssignOp
10189 private init empty_init
do end
10191 init init_aminusassignop
(
10192 n_minuseq
: nullable TMinuseq
10196 _n_minuseq
= n_minuseq
.as(not null)
10197 n_minuseq
.parent
= self
10200 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10202 if _n_minuseq
== old_child
then
10203 if new_child
!= null then
10204 new_child
.parent
= self
10205 assert new_child
isa TMinuseq
10206 _n_minuseq
= new_child
10214 redef fun n_minuseq
=(node
)
10221 redef fun visit_all
(v
: Visitor)
10223 v
.enter_visit
(_n_minuseq
)
10226 redef class AModuleName
10227 private init empty_init
do end
10229 init init_amodulename
(
10230 n_quad
: nullable TQuad,
10231 n_path
: Collection[Object], # Should be Collection[TId]
10237 if n_quad
!= null then
10238 n_quad
.parent
= self
10245 _n_id
= n_id
.as(not null)
10249 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10251 if _n_quad
== old_child
then
10252 if new_child
!= null then
10253 new_child
.parent
= self
10254 assert new_child
isa TQuad
10255 _n_quad
= new_child
10261 for i
in [0.._n_path
.length
[ do
10262 if _n_path
[i
] == old_child
then
10263 if new_child
!= null then
10264 assert new_child
isa TId
10265 _n_path
[i
] = new_child
10266 new_child
.parent
= self
10268 _n_path
.remove_at
(i
)
10273 if _n_id
== old_child
then
10274 if new_child
!= null then
10275 new_child
.parent
= self
10276 assert new_child
isa TId
10285 redef fun n_quad
=(node
)
10288 if node
!= null then
10292 redef fun n_id
=(node
)
10299 redef fun visit_all
(v
: Visitor)
10301 if _n_quad
!= null then
10302 v
.enter_visit
(_n_quad
.as(not null))
10304 for n
in _n_path
do
10307 v
.enter_visit
(_n_id
)
10310 redef class AExternCalls
10311 private init empty_init
do end
10313 init init_aexterncalls
(
10314 n_kwimport
: nullable TKwimport,
10315 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
10319 _n_kwimport
= n_kwimport
.as(not null)
10320 n_kwimport
.parent
= self
10321 for n
in n_extern_calls
do
10322 assert n
isa AExternCall
10323 _n_extern_calls
.add
(n
)
10328 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10330 if _n_kwimport
== old_child
then
10331 if new_child
!= null then
10332 new_child
.parent
= self
10333 assert new_child
isa TKwimport
10334 _n_kwimport
= new_child
10340 for i
in [0.._n_extern_calls
.length
[ do
10341 if _n_extern_calls
[i
] == old_child
then
10342 if new_child
!= null then
10343 assert new_child
isa AExternCall
10344 _n_extern_calls
[i
] = new_child
10345 new_child
.parent
= self
10347 _n_extern_calls
.remove_at
(i
)
10354 redef fun n_kwimport
=(node
)
10361 redef fun visit_all
(v
: Visitor)
10363 v
.enter_visit
(_n_kwimport
)
10364 for n
in _n_extern_calls
do
10369 redef class AExternCall
10370 private init empty_init
do end
10372 init init_aexterncall
10377 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10383 redef fun visit_all
(v
: Visitor)
10387 redef class ASuperExternCall
10388 private init empty_init
do end
10390 init init_asuperexterncall
(
10391 n_kwsuper
: nullable TKwsuper
10395 _n_kwsuper
= n_kwsuper
.as(not null)
10396 n_kwsuper
.parent
= self
10399 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10401 if _n_kwsuper
== old_child
then
10402 if new_child
!= null then
10403 new_child
.parent
= self
10404 assert new_child
isa TKwsuper
10405 _n_kwsuper
= new_child
10413 redef fun n_kwsuper
=(node
)
10420 redef fun visit_all
(v
: Visitor)
10422 v
.enter_visit
(_n_kwsuper
)
10425 redef class ALocalPropExternCall
10426 private init empty_init
do end
10428 init init_alocalpropexterncall
(
10429 n_methid
: nullable AMethid
10433 _n_methid
= n_methid
.as(not null)
10434 n_methid
.parent
= self
10437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10439 if _n_methid
== old_child
then
10440 if new_child
!= null then
10441 new_child
.parent
= self
10442 assert new_child
isa AMethid
10443 _n_methid
= new_child
10451 redef fun n_methid
=(node
)
10458 redef fun visit_all
(v
: Visitor)
10460 v
.enter_visit
(_n_methid
)
10463 redef class AFullPropExternCall
10464 private init empty_init
do end
10466 init init_afullpropexterncall
(
10467 n_classid
: nullable TClassid,
10468 n_quad
: nullable TQuad,
10469 n_methid
: nullable AMethid
10473 _n_classid
= n_classid
.as(not null)
10474 n_classid
.parent
= self
10476 if n_quad
!= null then
10477 n_quad
.parent
= self
10479 _n_methid
= n_methid
.as(not null)
10480 n_methid
.parent
= self
10483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10485 if _n_classid
== old_child
then
10486 if new_child
!= null then
10487 new_child
.parent
= self
10488 assert new_child
isa TClassid
10489 _n_classid
= new_child
10495 if _n_quad
== old_child
then
10496 if new_child
!= null then
10497 new_child
.parent
= self
10498 assert new_child
isa TQuad
10499 _n_quad
= new_child
10505 if _n_methid
== old_child
then
10506 if new_child
!= null then
10507 new_child
.parent
= self
10508 assert new_child
isa AMethid
10509 _n_methid
= new_child
10517 redef fun n_classid
=(node
)
10522 redef fun n_quad
=(node
)
10525 if node
!= null then
10529 redef fun n_methid
=(node
)
10536 redef fun visit_all
(v
: Visitor)
10538 v
.enter_visit
(_n_classid
)
10539 if _n_quad
!= null then
10540 v
.enter_visit
(_n_quad
.as(not null))
10542 v
.enter_visit
(_n_methid
)
10545 redef class AInitPropExternCall
10546 private init empty_init
do end
10548 init init_ainitpropexterncall
(
10549 n_classid
: nullable TClassid
10553 _n_classid
= n_classid
.as(not null)
10554 n_classid
.parent
= self
10557 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10559 if _n_classid
== old_child
then
10560 if new_child
!= null then
10561 new_child
.parent
= self
10562 assert new_child
isa TClassid
10563 _n_classid
= new_child
10571 redef fun n_classid
=(node
)
10578 redef fun visit_all
(v
: Visitor)
10580 v
.enter_visit
(_n_classid
)
10583 redef class ACastAsExternCall
10584 private init empty_init
do end
10586 init init_acastasexterncall
(
10587 n_from_type
: nullable AType,
10588 n_kwas
: nullable TKwas,
10589 n_to_type
: nullable AType
10593 _n_from_type
= n_from_type
.as(not null)
10594 n_from_type
.parent
= self
10595 _n_kwas
= n_kwas
.as(not null)
10596 n_kwas
.parent
= self
10597 _n_to_type
= n_to_type
.as(not null)
10598 n_to_type
.parent
= self
10601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10603 if _n_from_type
== old_child
then
10604 if new_child
!= null then
10605 new_child
.parent
= self
10606 assert new_child
isa AType
10607 _n_from_type
= new_child
10613 if _n_kwas
== old_child
then
10614 if new_child
!= null then
10615 new_child
.parent
= self
10616 assert new_child
isa TKwas
10617 _n_kwas
= new_child
10623 if _n_to_type
== old_child
then
10624 if new_child
!= null then
10625 new_child
.parent
= self
10626 assert new_child
isa AType
10627 _n_to_type
= new_child
10635 redef fun n_from_type
=(node
)
10637 _n_from_type
= node
10640 redef fun n_kwas
=(node
)
10645 redef fun n_to_type
=(node
)
10652 redef fun visit_all
(v
: Visitor)
10654 v
.enter_visit
(_n_from_type
)
10655 v
.enter_visit
(_n_kwas
)
10656 v
.enter_visit
(_n_to_type
)
10659 redef class AAsNullableExternCall
10660 private init empty_init
do end
10662 init init_aasnullableexterncall
(
10663 n_type
: nullable AType,
10664 n_kwas
: nullable TKwas,
10665 n_kwnullable
: nullable TKwnullable
10669 _n_type
= n_type
.as(not null)
10670 n_type
.parent
= self
10671 _n_kwas
= n_kwas
.as(not null)
10672 n_kwas
.parent
= self
10673 _n_kwnullable
= n_kwnullable
.as(not null)
10674 n_kwnullable
.parent
= self
10677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10679 if _n_type
== old_child
then
10680 if new_child
!= null then
10681 new_child
.parent
= self
10682 assert new_child
isa AType
10683 _n_type
= new_child
10689 if _n_kwas
== old_child
then
10690 if new_child
!= null then
10691 new_child
.parent
= self
10692 assert new_child
isa TKwas
10693 _n_kwas
= new_child
10699 if _n_kwnullable
== old_child
then
10700 if new_child
!= null then
10701 new_child
.parent
= self
10702 assert new_child
isa TKwnullable
10703 _n_kwnullable
= new_child
10711 redef fun n_type
=(node
)
10716 redef fun n_kwas
=(node
)
10721 redef fun n_kwnullable
=(node
)
10723 _n_kwnullable
= node
10728 redef fun visit_all
(v
: Visitor)
10730 v
.enter_visit
(_n_type
)
10731 v
.enter_visit
(_n_kwas
)
10732 v
.enter_visit
(_n_kwnullable
)
10735 redef class AAsNotNullableExternCall
10736 private init empty_init
do end
10738 init init_aasnotnullableexterncall
(
10739 n_type
: nullable AType,
10740 n_kwas
: nullable TKwas,
10741 n_kwnot
: nullable TKwnot,
10742 n_kwnullable
: nullable TKwnullable
10746 _n_type
= n_type
.as(not null)
10747 n_type
.parent
= self
10748 _n_kwas
= n_kwas
.as(not null)
10749 n_kwas
.parent
= self
10750 _n_kwnot
= n_kwnot
.as(not null)
10751 n_kwnot
.parent
= self
10752 _n_kwnullable
= n_kwnullable
.as(not null)
10753 n_kwnullable
.parent
= self
10756 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10758 if _n_type
== old_child
then
10759 if new_child
!= null then
10760 new_child
.parent
= self
10761 assert new_child
isa AType
10762 _n_type
= new_child
10768 if _n_kwas
== old_child
then
10769 if new_child
!= null then
10770 new_child
.parent
= self
10771 assert new_child
isa TKwas
10772 _n_kwas
= new_child
10778 if _n_kwnot
== old_child
then
10779 if new_child
!= null then
10780 new_child
.parent
= self
10781 assert new_child
isa TKwnot
10782 _n_kwnot
= new_child
10788 if _n_kwnullable
== old_child
then
10789 if new_child
!= null then
10790 new_child
.parent
= self
10791 assert new_child
isa TKwnullable
10792 _n_kwnullable
= new_child
10800 redef fun n_type
=(node
)
10805 redef fun n_kwas
=(node
)
10810 redef fun n_kwnot
=(node
)
10815 redef fun n_kwnullable
=(node
)
10817 _n_kwnullable
= node
10822 redef fun visit_all
(v
: Visitor)
10824 v
.enter_visit
(_n_type
)
10825 v
.enter_visit
(_n_kwas
)
10826 v
.enter_visit
(_n_kwnot
)
10827 v
.enter_visit
(_n_kwnullable
)
10830 redef class AInLanguage
10831 private init empty_init
do end
10833 init init_ainlanguage
(
10834 n_kwin
: nullable TKwin,
10835 n_string
: nullable TString
10839 _n_kwin
= n_kwin
.as(not null)
10840 n_kwin
.parent
= self
10841 _n_string
= n_string
.as(not null)
10842 n_string
.parent
= self
10845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10847 if _n_kwin
== old_child
then
10848 if new_child
!= null then
10849 new_child
.parent
= self
10850 assert new_child
isa TKwin
10851 _n_kwin
= new_child
10857 if _n_string
== old_child
then
10858 if new_child
!= null then
10859 new_child
.parent
= self
10860 assert new_child
isa TString
10861 _n_string
= new_child
10869 redef fun n_kwin
=(node
)
10874 redef fun n_string
=(node
)
10881 redef fun visit_all
(v
: Visitor)
10883 v
.enter_visit
(_n_kwin
)
10884 v
.enter_visit
(_n_string
)
10887 redef class AExternCodeBlock
10888 private init empty_init
do end
10890 init init_aexterncodeblock
(
10891 n_in_language
: nullable AInLanguage,
10892 n_extern_code_segment
: nullable TExternCodeSegment
10896 _n_in_language
= n_in_language
10897 if n_in_language
!= null then
10898 n_in_language
.parent
= self
10900 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
10901 n_extern_code_segment
.parent
= self
10904 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10906 if _n_in_language
== old_child
then
10907 if new_child
!= null then
10908 new_child
.parent
= self
10909 assert new_child
isa AInLanguage
10910 _n_in_language
= new_child
10912 _n_in_language
= null
10916 if _n_extern_code_segment
== old_child
then
10917 if new_child
!= null then
10918 new_child
.parent
= self
10919 assert new_child
isa TExternCodeSegment
10920 _n_extern_code_segment
= new_child
10928 redef fun n_in_language
=(node
)
10930 _n_in_language
= node
10931 if node
!= null then
10935 redef fun n_extern_code_segment
=(node
)
10937 _n_extern_code_segment
= node
10942 redef fun visit_all
(v
: Visitor)
10944 if _n_in_language
!= null then
10945 v
.enter_visit
(_n_in_language
.as(not null))
10947 v
.enter_visit
(_n_extern_code_segment
)
10950 redef class AQualified
10951 private init empty_init
do end
10953 init init_aqualified
(
10954 n_id
: Collection[Object], # Should be Collection[TId]
10955 n_classid
: nullable TClassid
10964 _n_classid
= n_classid
10965 if n_classid
!= null then
10966 n_classid
.parent
= self
10970 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10972 for i
in [0.._n_id
.length
[ do
10973 if _n_id
[i
] == old_child
then
10974 if new_child
!= null then
10975 assert new_child
isa TId
10976 _n_id
[i
] = new_child
10977 new_child
.parent
= self
10984 if _n_classid
== old_child
then
10985 if new_child
!= null then
10986 new_child
.parent
= self
10987 assert new_child
isa TClassid
10988 _n_classid
= new_child
10996 redef fun n_classid
=(node
)
10999 if node
!= null then
11005 redef fun visit_all
(v
: Visitor)
11010 if _n_classid
!= null then
11011 v
.enter_visit
(_n_classid
.as(not null))
11016 private init empty_init
do end
11019 n_comment
: Collection[Object] # Should be Collection[TComment]
11023 for n
in n_comment
do
11024 assert n
isa TComment
11030 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11032 for i
in [0.._n_comment
.length
[ do
11033 if _n_comment
[i
] == old_child
then
11034 if new_child
!= null then
11035 assert new_child
isa TComment
11036 _n_comment
[i
] = new_child
11037 new_child
.parent
= self
11039 _n_comment
.remove_at
(i
)
11048 redef fun visit_all
(v
: Visitor)
11050 for n
in _n_comment
do
11055 redef class AAnnotations
11056 private init empty_init
do end
11058 init init_aannotations
(
11059 n_at
: nullable TAt,
11060 n_opar
: nullable TOpar,
11061 n_items
: Collection[Object], # Should be Collection[AAnnotation]
11062 n_cpar
: nullable TCpar
11067 if n_at
!= null then
11071 if n_opar
!= null then
11072 n_opar
.parent
= self
11074 for n
in n_items
do
11075 assert n
isa AAnnotation
11080 if n_cpar
!= null then
11081 n_cpar
.parent
= self
11085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11087 if _n_at
== old_child
then
11088 if new_child
!= null then
11089 new_child
.parent
= self
11090 assert new_child
isa TAt
11097 if _n_opar
== old_child
then
11098 if new_child
!= null then
11099 new_child
.parent
= self
11100 assert new_child
isa TOpar
11101 _n_opar
= new_child
11107 for i
in [0.._n_items
.length
[ do
11108 if _n_items
[i
] == old_child
then
11109 if new_child
!= null then
11110 assert new_child
isa AAnnotation
11111 _n_items
[i
] = new_child
11112 new_child
.parent
= self
11114 _n_items
.remove_at
(i
)
11119 if _n_cpar
== old_child
then
11120 if new_child
!= null then
11121 new_child
.parent
= self
11122 assert new_child
isa TCpar
11123 _n_cpar
= new_child
11131 redef fun n_at
=(node
)
11134 if node
!= null then
11138 redef fun n_opar
=(node
)
11141 if node
!= null then
11145 redef fun n_cpar
=(node
)
11148 if node
!= null then
11154 redef fun visit_all
(v
: Visitor)
11156 if _n_at
!= null then
11157 v
.enter_visit
(_n_at
.as(not null))
11159 if _n_opar
!= null then
11160 v
.enter_visit
(_n_opar
.as(not null))
11162 for n
in _n_items
do
11165 if _n_cpar
!= null then
11166 v
.enter_visit
(_n_cpar
.as(not null))
11170 redef class AAnnotation
11171 private init empty_init
do end
11173 init init_aannotation
(
11174 n_atid
: nullable AAtid,
11175 n_opar
: nullable TOpar,
11176 n_args
: Collection[Object], # Should be Collection[AAtArg]
11177 n_cpar
: nullable TCpar,
11178 n_annotations
: nullable AAnnotations
11182 _n_atid
= n_atid
.as(not null)
11183 n_atid
.parent
= self
11185 if n_opar
!= null then
11186 n_opar
.parent
= self
11189 assert n
isa AAtArg
11194 if n_cpar
!= null then
11195 n_cpar
.parent
= self
11197 _n_annotations
= n_annotations
11198 if n_annotations
!= null then
11199 n_annotations
.parent
= self
11203 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11205 if _n_atid
== old_child
then
11206 if new_child
!= null then
11207 new_child
.parent
= self
11208 assert new_child
isa AAtid
11209 _n_atid
= new_child
11215 if _n_opar
== old_child
then
11216 if new_child
!= null then
11217 new_child
.parent
= self
11218 assert new_child
isa TOpar
11219 _n_opar
= new_child
11225 for i
in [0.._n_args
.length
[ do
11226 if _n_args
[i
] == old_child
then
11227 if new_child
!= null then
11228 assert new_child
isa AAtArg
11229 _n_args
[i
] = new_child
11230 new_child
.parent
= self
11232 _n_args
.remove_at
(i
)
11237 if _n_cpar
== old_child
then
11238 if new_child
!= null then
11239 new_child
.parent
= self
11240 assert new_child
isa TCpar
11241 _n_cpar
= new_child
11247 if _n_annotations
== old_child
then
11248 if new_child
!= null then
11249 new_child
.parent
= self
11250 assert new_child
isa AAnnotations
11251 _n_annotations
= new_child
11253 _n_annotations
= null
11259 redef fun n_atid
=(node
)
11264 redef fun n_opar
=(node
)
11267 if node
!= null then
11271 redef fun n_cpar
=(node
)
11274 if node
!= null then
11278 redef fun n_annotations
=(node
)
11280 _n_annotations
= node
11281 if node
!= null then
11287 redef fun visit_all
(v
: Visitor)
11289 v
.enter_visit
(_n_atid
)
11290 if _n_opar
!= null then
11291 v
.enter_visit
(_n_opar
.as(not null))
11293 for n
in _n_args
do
11296 if _n_cpar
!= null then
11297 v
.enter_visit
(_n_cpar
.as(not null))
11299 if _n_annotations
!= null then
11300 v
.enter_visit
(_n_annotations
.as(not null))
11304 redef class ATypeAtArg
11305 private init empty_init
do end
11307 init init_atypeatarg
(
11308 n_type
: nullable AType
11312 _n_type
= n_type
.as(not null)
11313 n_type
.parent
= self
11316 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11318 if _n_type
== old_child
then
11319 if new_child
!= null then
11320 new_child
.parent
= self
11321 assert new_child
isa AType
11322 _n_type
= new_child
11330 redef fun n_type
=(node
)
11337 redef fun visit_all
(v
: Visitor)
11339 v
.enter_visit
(_n_type
)
11342 redef class AExprAtArg
11343 private init empty_init
do end
11345 init init_aexpratarg
(
11346 n_expr
: nullable AExpr
11350 _n_expr
= n_expr
.as(not null)
11351 n_expr
.parent
= self
11354 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11356 if _n_expr
== old_child
then
11357 if new_child
!= null then
11358 new_child
.parent
= self
11359 assert new_child
isa AExpr
11360 _n_expr
= new_child
11368 redef fun n_expr
=(node
)
11375 redef fun visit_all
(v
: Visitor)
11377 v
.enter_visit
(_n_expr
)
11380 redef class AAtAtArg
11381 private init empty_init
do end
11383 init init_aatatarg
(
11384 n_annotations
: nullable AAnnotations
11388 _n_annotations
= n_annotations
.as(not null)
11389 n_annotations
.parent
= self
11392 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11394 if _n_annotations
== old_child
then
11395 if new_child
!= null then
11396 new_child
.parent
= self
11397 assert new_child
isa AAnnotations
11398 _n_annotations
= new_child
11406 redef fun n_annotations
=(node
)
11408 _n_annotations
= node
11413 redef fun visit_all
(v
: Visitor)
11415 v
.enter_visit
(_n_annotations
)
11418 redef class AIdAtid
11419 private init empty_init
do end
11421 init init_aidatid
(
11426 _n_id
= n_id
.as(not null)
11430 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11432 if _n_id
== old_child
then
11433 if new_child
!= null then
11434 new_child
.parent
= self
11435 assert new_child
isa TId
11444 redef fun n_id
=(node
)
11451 redef fun visit_all
(v
: Visitor)
11453 v
.enter_visit
(_n_id
)
11456 redef class AKwexternAtid
11457 private init empty_init
do end
11459 init init_akwexternatid
(
11460 n_id
: nullable TKwextern
11464 _n_id
= n_id
.as(not null)
11468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11470 if _n_id
== old_child
then
11471 if new_child
!= null then
11472 new_child
.parent
= self
11473 assert new_child
isa TKwextern
11482 redef fun n_id
=(node
)
11489 redef fun visit_all
(v
: Visitor)
11491 v
.enter_visit
(_n_id
)
11494 redef class AKwinternAtid
11495 private init empty_init
do end
11497 init init_akwinternatid
(
11498 n_id
: nullable TKwintern
11502 _n_id
= n_id
.as(not null)
11506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11508 if _n_id
== old_child
then
11509 if new_child
!= null then
11510 new_child
.parent
= self
11511 assert new_child
isa TKwintern
11520 redef fun n_id
=(node
)
11527 redef fun visit_all
(v
: Visitor)
11529 v
.enter_visit
(_n_id
)
11532 redef class AKwreadableAtid
11533 private init empty_init
do end
11535 init init_akwreadableatid
(
11536 n_id
: nullable TKwreadable
11540 _n_id
= n_id
.as(not null)
11544 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11546 if _n_id
== old_child
then
11547 if new_child
!= null then
11548 new_child
.parent
= self
11549 assert new_child
isa TKwreadable
11558 redef fun n_id
=(node
)
11565 redef fun visit_all
(v
: Visitor)
11567 v
.enter_visit
(_n_id
)
11570 redef class AKwwritableAtid
11571 private init empty_init
do end
11573 init init_akwwritableatid
(
11574 n_id
: nullable TKwwritable
11578 _n_id
= n_id
.as(not null)
11582 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11584 if _n_id
== old_child
then
11585 if new_child
!= null then
11586 new_child
.parent
= self
11587 assert new_child
isa TKwwritable
11596 redef fun n_id
=(node
)
11603 redef fun visit_all
(v
: Visitor)
11605 v
.enter_visit
(_n_id
)
11608 redef class AKwimportAtid
11609 private init empty_init
do end
11611 init init_akwimportatid
(
11612 n_id
: nullable TKwimport
11616 _n_id
= n_id
.as(not null)
11620 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11622 if _n_id
== old_child
then
11623 if new_child
!= null then
11624 new_child
.parent
= self
11625 assert new_child
isa TKwimport
11634 redef fun n_id
=(node
)
11641 redef fun visit_all
(v
: Visitor)
11643 v
.enter_visit
(_n_id
)
11648 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11650 if _n_base
== old_child
then
11651 if new_child
== null then
11653 new_child
.parent
= self
11654 assert new_child
isa AModule
11655 _n_base
= new_child
11657 old_child
.parent
= null
11662 redef fun visit_all
(v
: Visitor)
11664 if _n_base
!= null then
11665 v
.enter_visit
(_n_base
.as(not null))
11667 v
.enter_visit
(_n_eof
)