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,
4003 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
4008 if n_opar
!= null then
4009 n_opar
.parent
= self
4011 for n
in n_params
do
4017 if n_cpar
!= null then
4018 n_cpar
.parent
= self
4021 if n_type
!= null then
4022 n_type
.parent
= self
4024 for n
in n_closure_decls
do
4025 assert n
isa AClosureDecl
4026 _n_closure_decls
.add
(n
)
4031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4033 if _n_opar
== old_child
then
4034 if new_child
!= null then
4035 new_child
.parent
= self
4036 assert new_child
isa TOpar
4043 for i
in [0.._n_params
.length
[ do
4044 if _n_params
[i
] == old_child
then
4045 if new_child
!= null then
4046 assert new_child
isa AParam
4047 _n_params
[i
] = new_child
4048 new_child
.parent
= self
4050 _n_params
.remove_at
(i
)
4055 if _n_cpar
== old_child
then
4056 if new_child
!= null then
4057 new_child
.parent
= self
4058 assert new_child
isa TCpar
4065 if _n_type
== old_child
then
4066 if new_child
!= null then
4067 new_child
.parent
= self
4068 assert new_child
isa AType
4075 for i
in [0.._n_closure_decls
.length
[ do
4076 if _n_closure_decls
[i
] == old_child
then
4077 if new_child
!= null then
4078 assert new_child
isa AClosureDecl
4079 _n_closure_decls
[i
] = new_child
4080 new_child
.parent
= self
4082 _n_closure_decls
.remove_at
(i
)
4089 redef fun n_opar
=(node
)
4092 if node
!= null then
4096 redef fun n_cpar
=(node
)
4099 if node
!= null then
4103 redef fun n_type
=(node
)
4106 if node
!= null then
4112 redef fun visit_all
(v
: Visitor)
4114 if _n_opar
!= null then
4115 v
.enter_visit
(_n_opar
.as(not null))
4117 for n
in _n_params
do
4120 if _n_cpar
!= null then
4121 v
.enter_visit
(_n_cpar
.as(not null))
4123 if _n_type
!= null then
4124 v
.enter_visit
(_n_type
.as(not null))
4126 for n
in _n_closure_decls
do
4132 private init empty_init
do end
4136 n_type
: nullable AType,
4137 n_dotdotdot
: nullable TDotdotdot,
4138 n_annotations
: nullable AAnnotations
4142 _n_id
= n_id
.as(not null)
4145 if n_type
!= null then
4146 n_type
.parent
= self
4148 _n_dotdotdot
= n_dotdotdot
4149 if n_dotdotdot
!= null then
4150 n_dotdotdot
.parent
= self
4152 _n_annotations
= n_annotations
4153 if n_annotations
!= null then
4154 n_annotations
.parent
= self
4158 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4160 if _n_id
== old_child
then
4161 if new_child
!= null then
4162 new_child
.parent
= self
4163 assert new_child
isa TId
4170 if _n_type
== old_child
then
4171 if new_child
!= null then
4172 new_child
.parent
= self
4173 assert new_child
isa AType
4180 if _n_dotdotdot
== old_child
then
4181 if new_child
!= null then
4182 new_child
.parent
= self
4183 assert new_child
isa TDotdotdot
4184 _n_dotdotdot
= new_child
4190 if _n_annotations
== old_child
then
4191 if new_child
!= null then
4192 new_child
.parent
= self
4193 assert new_child
isa AAnnotations
4194 _n_annotations
= new_child
4196 _n_annotations
= null
4202 redef fun n_id
=(node
)
4207 redef fun n_type
=(node
)
4210 if node
!= null then
4214 redef fun n_dotdotdot
=(node
)
4217 if node
!= null then
4221 redef fun n_annotations
=(node
)
4223 _n_annotations
= node
4224 if node
!= null then
4230 redef fun visit_all
(v
: Visitor)
4232 v
.enter_visit
(_n_id
)
4233 if _n_type
!= null then
4234 v
.enter_visit
(_n_type
.as(not null))
4236 if _n_dotdotdot
!= null then
4237 v
.enter_visit
(_n_dotdotdot
.as(not null))
4239 if _n_annotations
!= null then
4240 v
.enter_visit
(_n_annotations
.as(not null))
4244 redef class AClosureDecl
4245 private init empty_init
do end
4247 init init_aclosuredecl
(
4248 n_kwbreak
: nullable TKwbreak,
4249 n_bang
: nullable TBang,
4251 n_signature
: nullable ASignature,
4252 n_expr
: nullable AExpr
4256 _n_kwbreak
= n_kwbreak
4257 if n_kwbreak
!= null then
4258 n_kwbreak
.parent
= self
4260 _n_bang
= n_bang
.as(not null)
4261 n_bang
.parent
= self
4262 _n_id
= n_id
.as(not null)
4264 _n_signature
= n_signature
.as(not null)
4265 n_signature
.parent
= self
4267 if n_expr
!= null then
4268 n_expr
.parent
= self
4272 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4274 if _n_kwbreak
== old_child
then
4275 if new_child
!= null then
4276 new_child
.parent
= self
4277 assert new_child
isa TKwbreak
4278 _n_kwbreak
= new_child
4284 if _n_bang
== old_child
then
4285 if new_child
!= null then
4286 new_child
.parent
= self
4287 assert new_child
isa TBang
4294 if _n_id
== old_child
then
4295 if new_child
!= null then
4296 new_child
.parent
= self
4297 assert new_child
isa TId
4304 if _n_signature
== old_child
then
4305 if new_child
!= null then
4306 new_child
.parent
= self
4307 assert new_child
isa ASignature
4308 _n_signature
= new_child
4314 if _n_expr
== old_child
then
4315 if new_child
!= null then
4316 new_child
.parent
= self
4317 assert new_child
isa AExpr
4326 redef fun n_kwbreak
=(node
)
4329 if node
!= null then
4333 redef fun n_bang
=(node
)
4338 redef fun n_id
=(node
)
4343 redef fun n_signature
=(node
)
4348 redef fun n_expr
=(node
)
4351 if node
!= null then
4357 redef fun visit_all
(v
: Visitor)
4359 if _n_kwbreak
!= null then
4360 v
.enter_visit
(_n_kwbreak
.as(not null))
4362 v
.enter_visit
(_n_bang
)
4363 v
.enter_visit
(_n_id
)
4364 v
.enter_visit
(_n_signature
)
4365 if _n_expr
!= null then
4366 v
.enter_visit
(_n_expr
.as(not null))
4371 private init empty_init
do end
4374 n_kwnullable
: nullable TKwnullable,
4375 n_id
: nullable TClassid,
4376 n_types
: Collection[Object], # Should be Collection[AType]
4377 n_annotations
: nullable AAnnotations
4381 _n_kwnullable
= n_kwnullable
4382 if n_kwnullable
!= null then
4383 n_kwnullable
.parent
= self
4385 _n_id
= n_id
.as(not null)
4392 _n_annotations
= n_annotations
4393 if n_annotations
!= null then
4394 n_annotations
.parent
= self
4398 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4400 if _n_kwnullable
== old_child
then
4401 if new_child
!= null then
4402 new_child
.parent
= self
4403 assert new_child
isa TKwnullable
4404 _n_kwnullable
= new_child
4406 _n_kwnullable
= null
4410 if _n_id
== old_child
then
4411 if new_child
!= null then
4412 new_child
.parent
= self
4413 assert new_child
isa TClassid
4420 for i
in [0.._n_types
.length
[ do
4421 if _n_types
[i
] == old_child
then
4422 if new_child
!= null then
4423 assert new_child
isa AType
4424 _n_types
[i
] = new_child
4425 new_child
.parent
= self
4427 _n_types
.remove_at
(i
)
4432 if _n_annotations
== old_child
then
4433 if new_child
!= null then
4434 new_child
.parent
= self
4435 assert new_child
isa AAnnotations
4436 _n_annotations
= new_child
4438 _n_annotations
= null
4444 redef fun n_kwnullable
=(node
)
4446 _n_kwnullable
= node
4447 if node
!= null then
4451 redef fun n_id
=(node
)
4456 redef fun n_annotations
=(node
)
4458 _n_annotations
= node
4459 if node
!= null then
4465 redef fun visit_all
(v
: Visitor)
4467 if _n_kwnullable
!= null then
4468 v
.enter_visit
(_n_kwnullable
.as(not null))
4470 v
.enter_visit
(_n_id
)
4471 for n
in _n_types
do
4474 if _n_annotations
!= null then
4475 v
.enter_visit
(_n_annotations
.as(not null))
4480 private init empty_init
do end
4483 n_kwlabel
: nullable TKwlabel,
4488 _n_kwlabel
= n_kwlabel
.as(not null)
4489 n_kwlabel
.parent
= self
4490 _n_id
= n_id
.as(not null)
4494 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4496 if _n_kwlabel
== old_child
then
4497 if new_child
!= null then
4498 new_child
.parent
= self
4499 assert new_child
isa TKwlabel
4500 _n_kwlabel
= new_child
4506 if _n_id
== old_child
then
4507 if new_child
!= null then
4508 new_child
.parent
= self
4509 assert new_child
isa TId
4518 redef fun n_kwlabel
=(node
)
4523 redef fun n_id
=(node
)
4530 redef fun visit_all
(v
: Visitor)
4532 v
.enter_visit
(_n_kwlabel
)
4533 v
.enter_visit
(_n_id
)
4536 redef class ABlockExpr
4537 private init empty_init
do end
4539 init init_ablockexpr
(
4540 n_expr
: Collection[Object], # Should be Collection[AExpr]
4541 n_kwend
: nullable TKwend
4551 if n_kwend
!= null then
4552 n_kwend
.parent
= self
4556 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4558 for i
in [0.._n_expr
.length
[ do
4559 if _n_expr
[i
] == old_child
then
4560 if new_child
!= null then
4561 assert new_child
isa AExpr
4562 _n_expr
[i
] = new_child
4563 new_child
.parent
= self
4565 _n_expr
.remove_at
(i
)
4570 if _n_kwend
== old_child
then
4571 if new_child
!= null then
4572 new_child
.parent
= self
4573 assert new_child
isa TKwend
4574 _n_kwend
= new_child
4582 redef fun n_kwend
=(node
)
4585 if node
!= null then
4591 redef fun visit_all
(v
: Visitor)
4596 if _n_kwend
!= null then
4597 v
.enter_visit
(_n_kwend
.as(not null))
4601 redef class AVardeclExpr
4602 private init empty_init
do end
4604 init init_avardeclexpr
(
4605 n_kwvar
: nullable TKwvar,
4607 n_type
: nullable AType,
4608 n_assign
: nullable TAssign,
4609 n_expr
: nullable AExpr,
4610 n_annotations
: nullable AAnnotations
4614 _n_kwvar
= n_kwvar
.as(not null)
4615 n_kwvar
.parent
= self
4616 _n_id
= n_id
.as(not null)
4619 if n_type
!= null then
4620 n_type
.parent
= self
4622 _n_assign
= n_assign
4623 if n_assign
!= null then
4624 n_assign
.parent
= self
4627 if n_expr
!= null then
4628 n_expr
.parent
= self
4630 _n_annotations
= n_annotations
4631 if n_annotations
!= null then
4632 n_annotations
.parent
= self
4636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4638 if _n_kwvar
== old_child
then
4639 if new_child
!= null then
4640 new_child
.parent
= self
4641 assert new_child
isa TKwvar
4642 _n_kwvar
= new_child
4648 if _n_id
== old_child
then
4649 if new_child
!= null then
4650 new_child
.parent
= self
4651 assert new_child
isa TId
4658 if _n_type
== old_child
then
4659 if new_child
!= null then
4660 new_child
.parent
= self
4661 assert new_child
isa AType
4668 if _n_assign
== old_child
then
4669 if new_child
!= null then
4670 new_child
.parent
= self
4671 assert new_child
isa TAssign
4672 _n_assign
= new_child
4678 if _n_expr
== old_child
then
4679 if new_child
!= null then
4680 new_child
.parent
= self
4681 assert new_child
isa AExpr
4688 if _n_annotations
== old_child
then
4689 if new_child
!= null then
4690 new_child
.parent
= self
4691 assert new_child
isa AAnnotations
4692 _n_annotations
= new_child
4694 _n_annotations
= null
4700 redef fun n_kwvar
=(node
)
4705 redef fun n_id
=(node
)
4710 redef fun n_type
=(node
)
4713 if node
!= null then
4717 redef fun n_assign
=(node
)
4720 if node
!= null then
4724 redef fun n_expr
=(node
)
4727 if node
!= null then
4731 redef fun n_annotations
=(node
)
4733 _n_annotations
= node
4734 if node
!= null then
4740 redef fun visit_all
(v
: Visitor)
4742 v
.enter_visit
(_n_kwvar
)
4743 v
.enter_visit
(_n_id
)
4744 if _n_type
!= null then
4745 v
.enter_visit
(_n_type
.as(not null))
4747 if _n_assign
!= null then
4748 v
.enter_visit
(_n_assign
.as(not null))
4750 if _n_expr
!= null then
4751 v
.enter_visit
(_n_expr
.as(not null))
4753 if _n_annotations
!= null then
4754 v
.enter_visit
(_n_annotations
.as(not null))
4758 redef class AReturnExpr
4759 private init empty_init
do end
4761 init init_areturnexpr
(
4762 n_kwreturn
: nullable TKwreturn,
4763 n_expr
: nullable AExpr
4767 _n_kwreturn
= n_kwreturn
4768 if n_kwreturn
!= null then
4769 n_kwreturn
.parent
= self
4772 if n_expr
!= null then
4773 n_expr
.parent
= self
4777 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4779 if _n_kwreturn
== old_child
then
4780 if new_child
!= null then
4781 new_child
.parent
= self
4782 assert new_child
isa TKwreturn
4783 _n_kwreturn
= new_child
4789 if _n_expr
== old_child
then
4790 if new_child
!= null then
4791 new_child
.parent
= self
4792 assert new_child
isa AExpr
4801 redef fun n_kwreturn
=(node
)
4804 if node
!= null then
4808 redef fun n_expr
=(node
)
4811 if node
!= null then
4817 redef fun visit_all
(v
: Visitor)
4819 if _n_kwreturn
!= null then
4820 v
.enter_visit
(_n_kwreturn
.as(not null))
4822 if _n_expr
!= null then
4823 v
.enter_visit
(_n_expr
.as(not null))
4827 redef class ABreakExpr
4828 private init empty_init
do end
4830 init init_abreakexpr
(
4831 n_kwbreak
: nullable TKwbreak,
4832 n_label
: nullable ALabel,
4833 n_expr
: nullable AExpr
4837 _n_kwbreak
= n_kwbreak
.as(not null)
4838 n_kwbreak
.parent
= self
4840 if n_label
!= null then
4841 n_label
.parent
= self
4844 if n_expr
!= null then
4845 n_expr
.parent
= self
4849 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4851 if _n_kwbreak
== old_child
then
4852 if new_child
!= null then
4853 new_child
.parent
= self
4854 assert new_child
isa TKwbreak
4855 _n_kwbreak
= new_child
4861 if _n_label
== old_child
then
4862 if new_child
!= null then
4863 new_child
.parent
= self
4864 assert new_child
isa ALabel
4865 _n_label
= new_child
4871 if _n_expr
== old_child
then
4872 if new_child
!= null then
4873 new_child
.parent
= self
4874 assert new_child
isa AExpr
4883 redef fun n_kwbreak
=(node
)
4888 redef fun n_label
=(node
)
4891 if node
!= null then
4895 redef fun n_expr
=(node
)
4898 if node
!= null then
4904 redef fun visit_all
(v
: Visitor)
4906 v
.enter_visit
(_n_kwbreak
)
4907 if _n_label
!= null then
4908 v
.enter_visit
(_n_label
.as(not null))
4910 if _n_expr
!= null then
4911 v
.enter_visit
(_n_expr
.as(not null))
4915 redef class AAbortExpr
4916 private init empty_init
do end
4918 init init_aabortexpr
(
4919 n_kwabort
: nullable TKwabort
4923 _n_kwabort
= n_kwabort
.as(not null)
4924 n_kwabort
.parent
= self
4927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4929 if _n_kwabort
== old_child
then
4930 if new_child
!= null then
4931 new_child
.parent
= self
4932 assert new_child
isa TKwabort
4933 _n_kwabort
= new_child
4941 redef fun n_kwabort
=(node
)
4948 redef fun visit_all
(v
: Visitor)
4950 v
.enter_visit
(_n_kwabort
)
4953 redef class AContinueExpr
4954 private init empty_init
do end
4956 init init_acontinueexpr
(
4957 n_kwcontinue
: nullable TKwcontinue,
4958 n_label
: nullable ALabel,
4959 n_expr
: nullable AExpr
4963 _n_kwcontinue
= n_kwcontinue
4964 if n_kwcontinue
!= null then
4965 n_kwcontinue
.parent
= self
4968 if n_label
!= null then
4969 n_label
.parent
= self
4972 if n_expr
!= null then
4973 n_expr
.parent
= self
4977 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4979 if _n_kwcontinue
== old_child
then
4980 if new_child
!= null then
4981 new_child
.parent
= self
4982 assert new_child
isa TKwcontinue
4983 _n_kwcontinue
= new_child
4985 _n_kwcontinue
= null
4989 if _n_label
== old_child
then
4990 if new_child
!= null then
4991 new_child
.parent
= self
4992 assert new_child
isa ALabel
4993 _n_label
= new_child
4999 if _n_expr
== old_child
then
5000 if new_child
!= null then
5001 new_child
.parent
= self
5002 assert new_child
isa AExpr
5011 redef fun n_kwcontinue
=(node
)
5013 _n_kwcontinue
= node
5014 if node
!= null then
5018 redef fun n_label
=(node
)
5021 if node
!= null then
5025 redef fun n_expr
=(node
)
5028 if node
!= null then
5034 redef fun visit_all
(v
: Visitor)
5036 if _n_kwcontinue
!= null then
5037 v
.enter_visit
(_n_kwcontinue
.as(not null))
5039 if _n_label
!= null then
5040 v
.enter_visit
(_n_label
.as(not null))
5042 if _n_expr
!= null then
5043 v
.enter_visit
(_n_expr
.as(not null))
5048 private init empty_init
do end
5051 n_kwdo
: nullable TKwdo,
5052 n_block
: nullable AExpr,
5053 n_label
: nullable ALabel
5057 _n_kwdo
= n_kwdo
.as(not null)
5058 n_kwdo
.parent
= self
5060 if n_block
!= null then
5061 n_block
.parent
= self
5064 if n_label
!= null then
5065 n_label
.parent
= self
5069 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5071 if _n_kwdo
== old_child
then
5072 if new_child
!= null then
5073 new_child
.parent
= self
5074 assert new_child
isa TKwdo
5081 if _n_block
== old_child
then
5082 if new_child
!= null then
5083 new_child
.parent
= self
5084 assert new_child
isa AExpr
5085 _n_block
= new_child
5091 if _n_label
== old_child
then
5092 if new_child
!= null then
5093 new_child
.parent
= self
5094 assert new_child
isa ALabel
5095 _n_label
= new_child
5103 redef fun n_kwdo
=(node
)
5108 redef fun n_block
=(node
)
5111 if node
!= null then
5115 redef fun n_label
=(node
)
5118 if node
!= null then
5124 redef fun visit_all
(v
: Visitor)
5126 v
.enter_visit
(_n_kwdo
)
5127 if _n_block
!= null then
5128 v
.enter_visit
(_n_block
.as(not null))
5130 if _n_label
!= null then
5131 v
.enter_visit
(_n_label
.as(not null))
5136 private init empty_init
do end
5139 n_kwif
: nullable TKwif,
5140 n_expr
: nullable AExpr,
5141 n_then
: nullable AExpr,
5142 n_else
: nullable AExpr
5146 _n_kwif
= n_kwif
.as(not null)
5147 n_kwif
.parent
= self
5148 _n_expr
= n_expr
.as(not null)
5149 n_expr
.parent
= self
5151 if n_then
!= null then
5152 n_then
.parent
= self
5155 if n_else
!= null then
5156 n_else
.parent
= self
5160 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5162 if _n_kwif
== old_child
then
5163 if new_child
!= null then
5164 new_child
.parent
= self
5165 assert new_child
isa TKwif
5172 if _n_expr
== old_child
then
5173 if new_child
!= null then
5174 new_child
.parent
= self
5175 assert new_child
isa AExpr
5182 if _n_then
== old_child
then
5183 if new_child
!= null then
5184 new_child
.parent
= self
5185 assert new_child
isa AExpr
5192 if _n_else
== old_child
then
5193 if new_child
!= null then
5194 new_child
.parent
= self
5195 assert new_child
isa AExpr
5204 redef fun n_kwif
=(node
)
5209 redef fun n_expr
=(node
)
5214 redef fun n_then
=(node
)
5217 if node
!= null then
5221 redef fun n_else
=(node
)
5224 if node
!= null then
5230 redef fun visit_all
(v
: Visitor)
5232 v
.enter_visit
(_n_kwif
)
5233 v
.enter_visit
(_n_expr
)
5234 if _n_then
!= null then
5235 v
.enter_visit
(_n_then
.as(not null))
5237 if _n_else
!= null then
5238 v
.enter_visit
(_n_else
.as(not null))
5242 redef class AIfexprExpr
5243 private init empty_init
do end
5245 init init_aifexprexpr
(
5246 n_kwif
: nullable TKwif,
5247 n_expr
: nullable AExpr,
5248 n_kwthen
: nullable TKwthen,
5249 n_then
: nullable AExpr,
5250 n_kwelse
: nullable TKwelse,
5251 n_else
: nullable AExpr
5255 _n_kwif
= n_kwif
.as(not null)
5256 n_kwif
.parent
= self
5257 _n_expr
= n_expr
.as(not null)
5258 n_expr
.parent
= self
5259 _n_kwthen
= n_kwthen
.as(not null)
5260 n_kwthen
.parent
= self
5261 _n_then
= n_then
.as(not null)
5262 n_then
.parent
= self
5263 _n_kwelse
= n_kwelse
.as(not null)
5264 n_kwelse
.parent
= self
5265 _n_else
= n_else
.as(not null)
5266 n_else
.parent
= self
5269 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5271 if _n_kwif
== old_child
then
5272 if new_child
!= null then
5273 new_child
.parent
= self
5274 assert new_child
isa TKwif
5281 if _n_expr
== old_child
then
5282 if new_child
!= null then
5283 new_child
.parent
= self
5284 assert new_child
isa AExpr
5291 if _n_kwthen
== old_child
then
5292 if new_child
!= null then
5293 new_child
.parent
= self
5294 assert new_child
isa TKwthen
5295 _n_kwthen
= new_child
5301 if _n_then
== old_child
then
5302 if new_child
!= null then
5303 new_child
.parent
= self
5304 assert new_child
isa AExpr
5311 if _n_kwelse
== old_child
then
5312 if new_child
!= null then
5313 new_child
.parent
= self
5314 assert new_child
isa TKwelse
5315 _n_kwelse
= new_child
5321 if _n_else
== old_child
then
5322 if new_child
!= null then
5323 new_child
.parent
= self
5324 assert new_child
isa AExpr
5333 redef fun n_kwif
=(node
)
5338 redef fun n_expr
=(node
)
5343 redef fun n_kwthen
=(node
)
5348 redef fun n_then
=(node
)
5353 redef fun n_kwelse
=(node
)
5358 redef fun n_else
=(node
)
5365 redef fun visit_all
(v
: Visitor)
5367 v
.enter_visit
(_n_kwif
)
5368 v
.enter_visit
(_n_expr
)
5369 v
.enter_visit
(_n_kwthen
)
5370 v
.enter_visit
(_n_then
)
5371 v
.enter_visit
(_n_kwelse
)
5372 v
.enter_visit
(_n_else
)
5375 redef class AWhileExpr
5376 private init empty_init
do end
5378 init init_awhileexpr
(
5379 n_kwwhile
: nullable TKwwhile,
5380 n_expr
: nullable AExpr,
5381 n_kwdo
: nullable TKwdo,
5382 n_block
: nullable AExpr,
5383 n_label
: nullable ALabel
5387 _n_kwwhile
= n_kwwhile
.as(not null)
5388 n_kwwhile
.parent
= self
5389 _n_expr
= n_expr
.as(not null)
5390 n_expr
.parent
= self
5391 _n_kwdo
= n_kwdo
.as(not null)
5392 n_kwdo
.parent
= self
5394 if n_block
!= null then
5395 n_block
.parent
= self
5398 if n_label
!= null then
5399 n_label
.parent
= self
5403 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5405 if _n_kwwhile
== old_child
then
5406 if new_child
!= null then
5407 new_child
.parent
= self
5408 assert new_child
isa TKwwhile
5409 _n_kwwhile
= new_child
5415 if _n_expr
== old_child
then
5416 if new_child
!= null then
5417 new_child
.parent
= self
5418 assert new_child
isa AExpr
5425 if _n_kwdo
== old_child
then
5426 if new_child
!= null then
5427 new_child
.parent
= self
5428 assert new_child
isa TKwdo
5435 if _n_block
== old_child
then
5436 if new_child
!= null then
5437 new_child
.parent
= self
5438 assert new_child
isa AExpr
5439 _n_block
= new_child
5445 if _n_label
== old_child
then
5446 if new_child
!= null then
5447 new_child
.parent
= self
5448 assert new_child
isa ALabel
5449 _n_label
= new_child
5457 redef fun n_kwwhile
=(node
)
5462 redef fun n_expr
=(node
)
5467 redef fun n_kwdo
=(node
)
5472 redef fun n_block
=(node
)
5475 if node
!= null then
5479 redef fun n_label
=(node
)
5482 if node
!= null then
5488 redef fun visit_all
(v
: Visitor)
5490 v
.enter_visit
(_n_kwwhile
)
5491 v
.enter_visit
(_n_expr
)
5492 v
.enter_visit
(_n_kwdo
)
5493 if _n_block
!= null then
5494 v
.enter_visit
(_n_block
.as(not null))
5496 if _n_label
!= null then
5497 v
.enter_visit
(_n_label
.as(not null))
5501 redef class ALoopExpr
5502 private init empty_init
do end
5504 init init_aloopexpr
(
5505 n_kwloop
: nullable TKwloop,
5506 n_block
: nullable AExpr,
5507 n_label
: nullable ALabel
5511 _n_kwloop
= n_kwloop
.as(not null)
5512 n_kwloop
.parent
= self
5514 if n_block
!= null then
5515 n_block
.parent
= self
5518 if n_label
!= null then
5519 n_label
.parent
= self
5523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5525 if _n_kwloop
== old_child
then
5526 if new_child
!= null then
5527 new_child
.parent
= self
5528 assert new_child
isa TKwloop
5529 _n_kwloop
= new_child
5535 if _n_block
== old_child
then
5536 if new_child
!= null then
5537 new_child
.parent
= self
5538 assert new_child
isa AExpr
5539 _n_block
= new_child
5545 if _n_label
== old_child
then
5546 if new_child
!= null then
5547 new_child
.parent
= self
5548 assert new_child
isa ALabel
5549 _n_label
= new_child
5557 redef fun n_kwloop
=(node
)
5562 redef fun n_block
=(node
)
5565 if node
!= null then
5569 redef fun n_label
=(node
)
5572 if node
!= null then
5578 redef fun visit_all
(v
: Visitor)
5580 v
.enter_visit
(_n_kwloop
)
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 AForExpr
5590 private init empty_init
do end
5592 init init_aforexpr
(
5593 n_kwfor
: nullable TKwfor,
5594 n_ids
: Collection[Object], # Should be Collection[TId]
5595 n_expr
: nullable AExpr,
5596 n_kwdo
: nullable TKwdo,
5597 n_block
: nullable AExpr,
5598 n_label
: nullable ALabel
5602 _n_kwfor
= n_kwfor
.as(not null)
5603 n_kwfor
.parent
= self
5609 _n_expr
= n_expr
.as(not null)
5610 n_expr
.parent
= self
5611 _n_kwdo
= n_kwdo
.as(not null)
5612 n_kwdo
.parent
= self
5614 if n_block
!= null then
5615 n_block
.parent
= self
5618 if n_label
!= null then
5619 n_label
.parent
= self
5623 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5625 if _n_kwfor
== old_child
then
5626 if new_child
!= null then
5627 new_child
.parent
= self
5628 assert new_child
isa TKwfor
5629 _n_kwfor
= new_child
5635 for i
in [0.._n_ids
.length
[ do
5636 if _n_ids
[i
] == old_child
then
5637 if new_child
!= null then
5638 assert new_child
isa TId
5639 _n_ids
[i
] = new_child
5640 new_child
.parent
= self
5647 if _n_expr
== old_child
then
5648 if new_child
!= null then
5649 new_child
.parent
= self
5650 assert new_child
isa AExpr
5657 if _n_kwdo
== old_child
then
5658 if new_child
!= null then
5659 new_child
.parent
= self
5660 assert new_child
isa TKwdo
5667 if _n_block
== old_child
then
5668 if new_child
!= null then
5669 new_child
.parent
= self
5670 assert new_child
isa AExpr
5671 _n_block
= new_child
5677 if _n_label
== old_child
then
5678 if new_child
!= null then
5679 new_child
.parent
= self
5680 assert new_child
isa ALabel
5681 _n_label
= new_child
5689 redef fun n_kwfor
=(node
)
5694 redef fun n_expr
=(node
)
5699 redef fun n_kwdo
=(node
)
5704 redef fun n_block
=(node
)
5707 if node
!= null then
5711 redef fun n_label
=(node
)
5714 if node
!= null then
5720 redef fun visit_all
(v
: Visitor)
5722 v
.enter_visit
(_n_kwfor
)
5726 v
.enter_visit
(_n_expr
)
5727 v
.enter_visit
(_n_kwdo
)
5728 if _n_block
!= null then
5729 v
.enter_visit
(_n_block
.as(not null))
5731 if _n_label
!= null then
5732 v
.enter_visit
(_n_label
.as(not null))
5736 redef class AAssertExpr
5737 private init empty_init
do end
5739 init init_aassertexpr
(
5740 n_kwassert
: nullable TKwassert,
5742 n_expr
: nullable AExpr,
5743 n_else
: nullable AExpr
5747 _n_kwassert
= n_kwassert
.as(not null)
5748 n_kwassert
.parent
= self
5750 if n_id
!= null then
5753 _n_expr
= n_expr
.as(not null)
5754 n_expr
.parent
= self
5756 if n_else
!= null then
5757 n_else
.parent
= self
5761 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5763 if _n_kwassert
== old_child
then
5764 if new_child
!= null then
5765 new_child
.parent
= self
5766 assert new_child
isa TKwassert
5767 _n_kwassert
= new_child
5773 if _n_id
== old_child
then
5774 if new_child
!= null then
5775 new_child
.parent
= self
5776 assert new_child
isa TId
5783 if _n_expr
== old_child
then
5784 if new_child
!= null then
5785 new_child
.parent
= self
5786 assert new_child
isa AExpr
5793 if _n_else
== old_child
then
5794 if new_child
!= null then
5795 new_child
.parent
= self
5796 assert new_child
isa AExpr
5805 redef fun n_kwassert
=(node
)
5810 redef fun n_id
=(node
)
5813 if node
!= null then
5817 redef fun n_expr
=(node
)
5822 redef fun n_else
=(node
)
5825 if node
!= null then
5831 redef fun visit_all
(v
: Visitor)
5833 v
.enter_visit
(_n_kwassert
)
5834 if _n_id
!= null then
5835 v
.enter_visit
(_n_id
.as(not null))
5837 v
.enter_visit
(_n_expr
)
5838 if _n_else
!= null then
5839 v
.enter_visit
(_n_else
.as(not null))
5843 redef class AOnceExpr
5844 private init empty_init
do end
5846 init init_aonceexpr
(
5847 n_kwonce
: nullable TKwonce,
5848 n_expr
: nullable AExpr
5852 _n_kwonce
= n_kwonce
.as(not null)
5853 n_kwonce
.parent
= self
5854 _n_expr
= n_expr
.as(not null)
5855 n_expr
.parent
= self
5858 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5860 if _n_kwonce
== old_child
then
5861 if new_child
!= null then
5862 new_child
.parent
= self
5863 assert new_child
isa TKwonce
5864 _n_kwonce
= new_child
5870 if _n_expr
== old_child
then
5871 if new_child
!= null then
5872 new_child
.parent
= self
5873 assert new_child
isa AExpr
5882 redef fun n_kwonce
=(node
)
5887 redef fun n_expr
=(node
)
5894 redef fun visit_all
(v
: Visitor)
5896 v
.enter_visit
(_n_kwonce
)
5897 v
.enter_visit
(_n_expr
)
5900 redef class ASendExpr
5901 private init empty_init
do end
5903 init init_asendexpr
(
5904 n_expr
: nullable AExpr
5908 _n_expr
= n_expr
.as(not null)
5909 n_expr
.parent
= self
5912 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5914 if _n_expr
== old_child
then
5915 if new_child
!= null then
5916 new_child
.parent
= self
5917 assert new_child
isa AExpr
5926 redef fun n_expr
=(node
)
5933 redef fun visit_all
(v
: Visitor)
5935 v
.enter_visit
(_n_expr
)
5938 redef class ABinopExpr
5939 private init empty_init
do end
5941 init init_abinopexpr
(
5942 n_expr
: nullable AExpr,
5943 n_expr2
: nullable AExpr
5947 _n_expr
= n_expr
.as(not null)
5948 n_expr
.parent
= self
5949 _n_expr2
= n_expr2
.as(not null)
5950 n_expr2
.parent
= self
5953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5955 if _n_expr
== old_child
then
5956 if new_child
!= null then
5957 new_child
.parent
= self
5958 assert new_child
isa AExpr
5965 if _n_expr2
== old_child
then
5966 if new_child
!= null then
5967 new_child
.parent
= self
5968 assert new_child
isa AExpr
5969 _n_expr2
= new_child
5977 redef fun n_expr
=(node
)
5982 redef fun n_expr2
=(node
)
5989 redef fun visit_all
(v
: Visitor)
5991 v
.enter_visit
(_n_expr
)
5992 v
.enter_visit
(_n_expr2
)
5996 private init empty_init
do end
5999 n_expr
: nullable AExpr,
6000 n_expr2
: nullable AExpr
6004 _n_expr
= n_expr
.as(not null)
6005 n_expr
.parent
= self
6006 _n_expr2
= n_expr2
.as(not null)
6007 n_expr2
.parent
= self
6010 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6012 if _n_expr
== old_child
then
6013 if new_child
!= null then
6014 new_child
.parent
= self
6015 assert new_child
isa AExpr
6022 if _n_expr2
== old_child
then
6023 if new_child
!= null then
6024 new_child
.parent
= self
6025 assert new_child
isa AExpr
6026 _n_expr2
= new_child
6034 redef fun n_expr
=(node
)
6039 redef fun n_expr2
=(node
)
6046 redef fun visit_all
(v
: Visitor)
6048 v
.enter_visit
(_n_expr
)
6049 v
.enter_visit
(_n_expr2
)
6052 redef class AAndExpr
6053 private init empty_init
do end
6055 init init_aandexpr
(
6056 n_expr
: nullable AExpr,
6057 n_expr2
: nullable AExpr
6061 _n_expr
= n_expr
.as(not null)
6062 n_expr
.parent
= self
6063 _n_expr2
= n_expr2
.as(not null)
6064 n_expr2
.parent
= self
6067 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6069 if _n_expr
== old_child
then
6070 if new_child
!= null then
6071 new_child
.parent
= self
6072 assert new_child
isa AExpr
6079 if _n_expr2
== old_child
then
6080 if new_child
!= null then
6081 new_child
.parent
= self
6082 assert new_child
isa AExpr
6083 _n_expr2
= new_child
6091 redef fun n_expr
=(node
)
6096 redef fun n_expr2
=(node
)
6103 redef fun visit_all
(v
: Visitor)
6105 v
.enter_visit
(_n_expr
)
6106 v
.enter_visit
(_n_expr2
)
6109 redef class AOrElseExpr
6110 private init empty_init
do end
6112 init init_aorelseexpr
(
6113 n_expr
: nullable AExpr,
6114 n_expr2
: nullable AExpr
6118 _n_expr
= n_expr
.as(not null)
6119 n_expr
.parent
= self
6120 _n_expr2
= n_expr2
.as(not null)
6121 n_expr2
.parent
= self
6124 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6126 if _n_expr
== old_child
then
6127 if new_child
!= null then
6128 new_child
.parent
= self
6129 assert new_child
isa AExpr
6136 if _n_expr2
== old_child
then
6137 if new_child
!= null then
6138 new_child
.parent
= self
6139 assert new_child
isa AExpr
6140 _n_expr2
= new_child
6148 redef fun n_expr
=(node
)
6153 redef fun n_expr2
=(node
)
6160 redef fun visit_all
(v
: Visitor)
6162 v
.enter_visit
(_n_expr
)
6163 v
.enter_visit
(_n_expr2
)
6166 redef class ANotExpr
6167 private init empty_init
do end
6169 init init_anotexpr
(
6170 n_kwnot
: nullable TKwnot,
6171 n_expr
: nullable AExpr
6175 _n_kwnot
= n_kwnot
.as(not null)
6176 n_kwnot
.parent
= self
6177 _n_expr
= n_expr
.as(not null)
6178 n_expr
.parent
= self
6181 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6183 if _n_kwnot
== old_child
then
6184 if new_child
!= null then
6185 new_child
.parent
= self
6186 assert new_child
isa TKwnot
6187 _n_kwnot
= new_child
6193 if _n_expr
== old_child
then
6194 if new_child
!= null then
6195 new_child
.parent
= self
6196 assert new_child
isa AExpr
6205 redef fun n_kwnot
=(node
)
6210 redef fun n_expr
=(node
)
6217 redef fun visit_all
(v
: Visitor)
6219 v
.enter_visit
(_n_kwnot
)
6220 v
.enter_visit
(_n_expr
)
6224 private init empty_init
do end
6227 n_expr
: nullable AExpr,
6228 n_expr2
: nullable AExpr
6232 _n_expr
= n_expr
.as(not null)
6233 n_expr
.parent
= self
6234 _n_expr2
= n_expr2
.as(not null)
6235 n_expr2
.parent
= self
6238 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6240 if _n_expr
== old_child
then
6241 if new_child
!= null then
6242 new_child
.parent
= self
6243 assert new_child
isa AExpr
6250 if _n_expr2
== old_child
then
6251 if new_child
!= null then
6252 new_child
.parent
= self
6253 assert new_child
isa AExpr
6254 _n_expr2
= new_child
6262 redef fun n_expr
=(node
)
6267 redef fun n_expr2
=(node
)
6274 redef fun visit_all
(v
: Visitor)
6276 v
.enter_visit
(_n_expr
)
6277 v
.enter_visit
(_n_expr2
)
6281 private init empty_init
do end
6284 n_expr
: nullable AExpr,
6285 n_expr2
: nullable AExpr
6289 _n_expr
= n_expr
.as(not null)
6290 n_expr
.parent
= self
6291 _n_expr2
= n_expr2
.as(not null)
6292 n_expr2
.parent
= self
6295 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6297 if _n_expr
== old_child
then
6298 if new_child
!= null then
6299 new_child
.parent
= self
6300 assert new_child
isa AExpr
6307 if _n_expr2
== old_child
then
6308 if new_child
!= null then
6309 new_child
.parent
= self
6310 assert new_child
isa AExpr
6311 _n_expr2
= new_child
6319 redef fun n_expr
=(node
)
6324 redef fun n_expr2
=(node
)
6331 redef fun visit_all
(v
: Visitor)
6333 v
.enter_visit
(_n_expr
)
6334 v
.enter_visit
(_n_expr2
)
6338 private init empty_init
do end
6341 n_expr
: nullable AExpr,
6342 n_expr2
: nullable AExpr
6346 _n_expr
= n_expr
.as(not null)
6347 n_expr
.parent
= self
6348 _n_expr2
= n_expr2
.as(not null)
6349 n_expr2
.parent
= self
6352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6354 if _n_expr
== old_child
then
6355 if new_child
!= null then
6356 new_child
.parent
= self
6357 assert new_child
isa AExpr
6364 if _n_expr2
== old_child
then
6365 if new_child
!= null then
6366 new_child
.parent
= self
6367 assert new_child
isa AExpr
6368 _n_expr2
= new_child
6376 redef fun n_expr
=(node
)
6381 redef fun n_expr2
=(node
)
6388 redef fun visit_all
(v
: Visitor)
6390 v
.enter_visit
(_n_expr
)
6391 v
.enter_visit
(_n_expr2
)
6395 private init empty_init
do end
6398 n_expr
: nullable AExpr,
6399 n_expr2
: nullable AExpr
6403 _n_expr
= n_expr
.as(not null)
6404 n_expr
.parent
= self
6405 _n_expr2
= n_expr2
.as(not null)
6406 n_expr2
.parent
= self
6409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6411 if _n_expr
== old_child
then
6412 if new_child
!= null then
6413 new_child
.parent
= self
6414 assert new_child
isa AExpr
6421 if _n_expr2
== old_child
then
6422 if new_child
!= null then
6423 new_child
.parent
= self
6424 assert new_child
isa AExpr
6425 _n_expr2
= new_child
6433 redef fun n_expr
=(node
)
6438 redef fun n_expr2
=(node
)
6445 redef fun visit_all
(v
: Visitor)
6447 v
.enter_visit
(_n_expr
)
6448 v
.enter_visit
(_n_expr2
)
6452 private init empty_init
do end
6455 n_expr
: nullable AExpr,
6456 n_expr2
: nullable AExpr
6460 _n_expr
= n_expr
.as(not null)
6461 n_expr
.parent
= self
6462 _n_expr2
= n_expr2
.as(not null)
6463 n_expr2
.parent
= self
6466 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6468 if _n_expr
== old_child
then
6469 if new_child
!= null then
6470 new_child
.parent
= self
6471 assert new_child
isa AExpr
6478 if _n_expr2
== old_child
then
6479 if new_child
!= null then
6480 new_child
.parent
= self
6481 assert new_child
isa AExpr
6482 _n_expr2
= new_child
6490 redef fun n_expr
=(node
)
6495 redef fun n_expr2
=(node
)
6502 redef fun visit_all
(v
: Visitor)
6504 v
.enter_visit
(_n_expr
)
6505 v
.enter_visit
(_n_expr2
)
6509 private init empty_init
do end
6512 n_expr
: nullable AExpr,
6513 n_expr2
: nullable AExpr
6517 _n_expr
= n_expr
.as(not null)
6518 n_expr
.parent
= self
6519 _n_expr2
= n_expr2
.as(not null)
6520 n_expr2
.parent
= self
6523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6525 if _n_expr
== old_child
then
6526 if new_child
!= null then
6527 new_child
.parent
= self
6528 assert new_child
isa AExpr
6535 if _n_expr2
== old_child
then
6536 if new_child
!= null then
6537 new_child
.parent
= self
6538 assert new_child
isa AExpr
6539 _n_expr2
= new_child
6547 redef fun n_expr
=(node
)
6552 redef fun n_expr2
=(node
)
6559 redef fun visit_all
(v
: Visitor)
6561 v
.enter_visit
(_n_expr
)
6562 v
.enter_visit
(_n_expr2
)
6566 private init empty_init
do end
6569 n_expr
: nullable AExpr,
6570 n_expr2
: nullable AExpr
6574 _n_expr
= n_expr
.as(not null)
6575 n_expr
.parent
= self
6576 _n_expr2
= n_expr2
.as(not null)
6577 n_expr2
.parent
= self
6580 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6582 if _n_expr
== old_child
then
6583 if new_child
!= null then
6584 new_child
.parent
= self
6585 assert new_child
isa AExpr
6592 if _n_expr2
== old_child
then
6593 if new_child
!= null then
6594 new_child
.parent
= self
6595 assert new_child
isa AExpr
6596 _n_expr2
= new_child
6604 redef fun n_expr
=(node
)
6609 redef fun n_expr2
=(node
)
6616 redef fun visit_all
(v
: Visitor)
6618 v
.enter_visit
(_n_expr
)
6619 v
.enter_visit
(_n_expr2
)
6623 private init empty_init
do end
6626 n_expr
: nullable AExpr,
6627 n_expr2
: nullable AExpr
6631 _n_expr
= n_expr
.as(not null)
6632 n_expr
.parent
= self
6633 _n_expr2
= n_expr2
.as(not null)
6634 n_expr2
.parent
= self
6637 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6639 if _n_expr
== old_child
then
6640 if new_child
!= null then
6641 new_child
.parent
= self
6642 assert new_child
isa AExpr
6649 if _n_expr2
== old_child
then
6650 if new_child
!= null then
6651 new_child
.parent
= self
6652 assert new_child
isa AExpr
6653 _n_expr2
= new_child
6661 redef fun n_expr
=(node
)
6666 redef fun n_expr2
=(node
)
6673 redef fun visit_all
(v
: Visitor)
6675 v
.enter_visit
(_n_expr
)
6676 v
.enter_visit
(_n_expr2
)
6680 private init empty_init
do end
6683 n_expr
: nullable AExpr,
6684 n_expr2
: nullable AExpr
6688 _n_expr
= n_expr
.as(not null)
6689 n_expr
.parent
= self
6690 _n_expr2
= n_expr2
.as(not null)
6691 n_expr2
.parent
= self
6694 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6696 if _n_expr
== old_child
then
6697 if new_child
!= null then
6698 new_child
.parent
= self
6699 assert new_child
isa AExpr
6706 if _n_expr2
== old_child
then
6707 if new_child
!= null then
6708 new_child
.parent
= self
6709 assert new_child
isa AExpr
6710 _n_expr2
= new_child
6718 redef fun n_expr
=(node
)
6723 redef fun n_expr2
=(node
)
6730 redef fun visit_all
(v
: Visitor)
6732 v
.enter_visit
(_n_expr
)
6733 v
.enter_visit
(_n_expr2
)
6736 redef class AIsaExpr
6737 private init empty_init
do end
6739 init init_aisaexpr
(
6740 n_expr
: nullable AExpr,
6741 n_type
: nullable AType
6745 _n_expr
= n_expr
.as(not null)
6746 n_expr
.parent
= self
6747 _n_type
= n_type
.as(not null)
6748 n_type
.parent
= self
6751 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6753 if _n_expr
== old_child
then
6754 if new_child
!= null then
6755 new_child
.parent
= self
6756 assert new_child
isa AExpr
6763 if _n_type
== old_child
then
6764 if new_child
!= null then
6765 new_child
.parent
= self
6766 assert new_child
isa AType
6775 redef fun n_expr
=(node
)
6780 redef fun n_type
=(node
)
6787 redef fun visit_all
(v
: Visitor)
6789 v
.enter_visit
(_n_expr
)
6790 v
.enter_visit
(_n_type
)
6793 redef class APlusExpr
6794 private init empty_init
do end
6796 init init_aplusexpr
(
6797 n_expr
: nullable AExpr,
6798 n_expr2
: nullable AExpr
6802 _n_expr
= n_expr
.as(not null)
6803 n_expr
.parent
= self
6804 _n_expr2
= n_expr2
.as(not null)
6805 n_expr2
.parent
= self
6808 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6810 if _n_expr
== old_child
then
6811 if new_child
!= null then
6812 new_child
.parent
= self
6813 assert new_child
isa AExpr
6820 if _n_expr2
== old_child
then
6821 if new_child
!= null then
6822 new_child
.parent
= self
6823 assert new_child
isa AExpr
6824 _n_expr2
= new_child
6832 redef fun n_expr
=(node
)
6837 redef fun n_expr2
=(node
)
6844 redef fun visit_all
(v
: Visitor)
6846 v
.enter_visit
(_n_expr
)
6847 v
.enter_visit
(_n_expr2
)
6850 redef class AMinusExpr
6851 private init empty_init
do end
6853 init init_aminusexpr
(
6854 n_expr
: nullable AExpr,
6855 n_expr2
: nullable AExpr
6859 _n_expr
= n_expr
.as(not null)
6860 n_expr
.parent
= self
6861 _n_expr2
= n_expr2
.as(not null)
6862 n_expr2
.parent
= self
6865 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6867 if _n_expr
== old_child
then
6868 if new_child
!= null then
6869 new_child
.parent
= self
6870 assert new_child
isa AExpr
6877 if _n_expr2
== old_child
then
6878 if new_child
!= null then
6879 new_child
.parent
= self
6880 assert new_child
isa AExpr
6881 _n_expr2
= new_child
6889 redef fun n_expr
=(node
)
6894 redef fun n_expr2
=(node
)
6901 redef fun visit_all
(v
: Visitor)
6903 v
.enter_visit
(_n_expr
)
6904 v
.enter_visit
(_n_expr2
)
6907 redef class AStarshipExpr
6908 private init empty_init
do end
6910 init init_astarshipexpr
(
6911 n_expr
: nullable AExpr,
6912 n_expr2
: nullable AExpr
6916 _n_expr
= n_expr
.as(not null)
6917 n_expr
.parent
= self
6918 _n_expr2
= n_expr2
.as(not null)
6919 n_expr2
.parent
= self
6922 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6924 if _n_expr
== old_child
then
6925 if new_child
!= null then
6926 new_child
.parent
= self
6927 assert new_child
isa AExpr
6934 if _n_expr2
== old_child
then
6935 if new_child
!= null then
6936 new_child
.parent
= self
6937 assert new_child
isa AExpr
6938 _n_expr2
= new_child
6946 redef fun n_expr
=(node
)
6951 redef fun n_expr2
=(node
)
6958 redef fun visit_all
(v
: Visitor)
6960 v
.enter_visit
(_n_expr
)
6961 v
.enter_visit
(_n_expr2
)
6964 redef class AStarExpr
6965 private init empty_init
do end
6967 init init_astarexpr
(
6968 n_expr
: nullable AExpr,
6969 n_expr2
: nullable AExpr
6973 _n_expr
= n_expr
.as(not null)
6974 n_expr
.parent
= self
6975 _n_expr2
= n_expr2
.as(not null)
6976 n_expr2
.parent
= self
6979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6981 if _n_expr
== old_child
then
6982 if new_child
!= null then
6983 new_child
.parent
= self
6984 assert new_child
isa AExpr
6991 if _n_expr2
== old_child
then
6992 if new_child
!= null then
6993 new_child
.parent
= self
6994 assert new_child
isa AExpr
6995 _n_expr2
= new_child
7003 redef fun n_expr
=(node
)
7008 redef fun n_expr2
=(node
)
7015 redef fun visit_all
(v
: Visitor)
7017 v
.enter_visit
(_n_expr
)
7018 v
.enter_visit
(_n_expr2
)
7021 redef class ASlashExpr
7022 private init empty_init
do end
7024 init init_aslashexpr
(
7025 n_expr
: nullable AExpr,
7026 n_expr2
: nullable AExpr
7030 _n_expr
= n_expr
.as(not null)
7031 n_expr
.parent
= self
7032 _n_expr2
= n_expr2
.as(not null)
7033 n_expr2
.parent
= self
7036 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7038 if _n_expr
== old_child
then
7039 if new_child
!= null then
7040 new_child
.parent
= self
7041 assert new_child
isa AExpr
7048 if _n_expr2
== old_child
then
7049 if new_child
!= null then
7050 new_child
.parent
= self
7051 assert new_child
isa AExpr
7052 _n_expr2
= new_child
7060 redef fun n_expr
=(node
)
7065 redef fun n_expr2
=(node
)
7072 redef fun visit_all
(v
: Visitor)
7074 v
.enter_visit
(_n_expr
)
7075 v
.enter_visit
(_n_expr2
)
7078 redef class APercentExpr
7079 private init empty_init
do end
7081 init init_apercentexpr
(
7082 n_expr
: nullable AExpr,
7083 n_expr2
: nullable AExpr
7087 _n_expr
= n_expr
.as(not null)
7088 n_expr
.parent
= self
7089 _n_expr2
= n_expr2
.as(not null)
7090 n_expr2
.parent
= self
7093 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7095 if _n_expr
== old_child
then
7096 if new_child
!= null then
7097 new_child
.parent
= self
7098 assert new_child
isa AExpr
7105 if _n_expr2
== old_child
then
7106 if new_child
!= null then
7107 new_child
.parent
= self
7108 assert new_child
isa AExpr
7109 _n_expr2
= new_child
7117 redef fun n_expr
=(node
)
7122 redef fun n_expr2
=(node
)
7129 redef fun visit_all
(v
: Visitor)
7131 v
.enter_visit
(_n_expr
)
7132 v
.enter_visit
(_n_expr2
)
7135 redef class AUminusExpr
7136 private init empty_init
do end
7138 init init_auminusexpr
(
7139 n_minus
: nullable TMinus,
7140 n_expr
: nullable AExpr
7144 _n_minus
= n_minus
.as(not null)
7145 n_minus
.parent
= self
7146 _n_expr
= n_expr
.as(not null)
7147 n_expr
.parent
= self
7150 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7152 if _n_minus
== old_child
then
7153 if new_child
!= null then
7154 new_child
.parent
= self
7155 assert new_child
isa TMinus
7156 _n_minus
= new_child
7162 if _n_expr
== old_child
then
7163 if new_child
!= null then
7164 new_child
.parent
= self
7165 assert new_child
isa AExpr
7174 redef fun n_minus
=(node
)
7179 redef fun n_expr
=(node
)
7186 redef fun visit_all
(v
: Visitor)
7188 v
.enter_visit
(_n_minus
)
7189 v
.enter_visit
(_n_expr
)
7192 redef class ANewExpr
7193 private init empty_init
do end
7195 init init_anewexpr
(
7196 n_kwnew
: nullable TKwnew,
7197 n_type
: nullable AType,
7199 n_args
: nullable AExprs
7203 _n_kwnew
= n_kwnew
.as(not null)
7204 n_kwnew
.parent
= self
7205 _n_type
= n_type
.as(not null)
7206 n_type
.parent
= self
7208 if n_id
!= null then
7211 _n_args
= n_args
.as(not null)
7212 n_args
.parent
= self
7215 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7217 if _n_kwnew
== old_child
then
7218 if new_child
!= null then
7219 new_child
.parent
= self
7220 assert new_child
isa TKwnew
7221 _n_kwnew
= new_child
7227 if _n_type
== old_child
then
7228 if new_child
!= null then
7229 new_child
.parent
= self
7230 assert new_child
isa AType
7237 if _n_id
== old_child
then
7238 if new_child
!= null then
7239 new_child
.parent
= self
7240 assert new_child
isa TId
7247 if _n_args
== old_child
then
7248 if new_child
!= null then
7249 new_child
.parent
= self
7250 assert new_child
isa AExprs
7259 redef fun n_kwnew
=(node
)
7264 redef fun n_type
=(node
)
7269 redef fun n_id
=(node
)
7272 if node
!= null then
7276 redef fun n_args
=(node
)
7283 redef fun visit_all
(v
: Visitor)
7285 v
.enter_visit
(_n_kwnew
)
7286 v
.enter_visit
(_n_type
)
7287 if _n_id
!= null then
7288 v
.enter_visit
(_n_id
.as(not null))
7290 v
.enter_visit
(_n_args
)
7293 redef class AAttrExpr
7294 private init empty_init
do end
7296 init init_aattrexpr
(
7297 n_expr
: nullable AExpr,
7298 n_id
: nullable TAttrid
7302 _n_expr
= n_expr
.as(not null)
7303 n_expr
.parent
= self
7304 _n_id
= n_id
.as(not null)
7308 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7310 if _n_expr
== old_child
then
7311 if new_child
!= null then
7312 new_child
.parent
= self
7313 assert new_child
isa AExpr
7320 if _n_id
== old_child
then
7321 if new_child
!= null then
7322 new_child
.parent
= self
7323 assert new_child
isa TAttrid
7332 redef fun n_expr
=(node
)
7337 redef fun n_id
=(node
)
7344 redef fun visit_all
(v
: Visitor)
7346 v
.enter_visit
(_n_expr
)
7347 v
.enter_visit
(_n_id
)
7350 redef class AAttrAssignExpr
7351 private init empty_init
do end
7353 init init_aattrassignexpr
(
7354 n_expr
: nullable AExpr,
7355 n_id
: nullable TAttrid,
7356 n_assign
: nullable TAssign,
7357 n_value
: nullable AExpr
7361 _n_expr
= n_expr
.as(not null)
7362 n_expr
.parent
= self
7363 _n_id
= n_id
.as(not null)
7365 _n_assign
= n_assign
.as(not null)
7366 n_assign
.parent
= self
7367 _n_value
= n_value
.as(not null)
7368 n_value
.parent
= self
7371 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7373 if _n_expr
== old_child
then
7374 if new_child
!= null then
7375 new_child
.parent
= self
7376 assert new_child
isa AExpr
7383 if _n_id
== old_child
then
7384 if new_child
!= null then
7385 new_child
.parent
= self
7386 assert new_child
isa TAttrid
7393 if _n_assign
== old_child
then
7394 if new_child
!= null then
7395 new_child
.parent
= self
7396 assert new_child
isa TAssign
7397 _n_assign
= new_child
7403 if _n_value
== old_child
then
7404 if new_child
!= null then
7405 new_child
.parent
= self
7406 assert new_child
isa AExpr
7407 _n_value
= new_child
7415 redef fun n_expr
=(node
)
7420 redef fun n_id
=(node
)
7425 redef fun n_assign
=(node
)
7430 redef fun n_value
=(node
)
7437 redef fun visit_all
(v
: Visitor)
7439 v
.enter_visit
(_n_expr
)
7440 v
.enter_visit
(_n_id
)
7441 v
.enter_visit
(_n_assign
)
7442 v
.enter_visit
(_n_value
)
7445 redef class AAttrReassignExpr
7446 private init empty_init
do end
7448 init init_aattrreassignexpr
(
7449 n_expr
: nullable AExpr,
7450 n_id
: nullable TAttrid,
7451 n_assign_op
: nullable AAssignOp,
7452 n_value
: nullable AExpr
7456 _n_expr
= n_expr
.as(not null)
7457 n_expr
.parent
= self
7458 _n_id
= n_id
.as(not null)
7460 _n_assign_op
= n_assign_op
.as(not null)
7461 n_assign_op
.parent
= self
7462 _n_value
= n_value
.as(not null)
7463 n_value
.parent
= self
7466 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7468 if _n_expr
== old_child
then
7469 if new_child
!= null then
7470 new_child
.parent
= self
7471 assert new_child
isa AExpr
7478 if _n_id
== old_child
then
7479 if new_child
!= null then
7480 new_child
.parent
= self
7481 assert new_child
isa TAttrid
7488 if _n_assign_op
== old_child
then
7489 if new_child
!= null then
7490 new_child
.parent
= self
7491 assert new_child
isa AAssignOp
7492 _n_assign_op
= new_child
7498 if _n_value
== old_child
then
7499 if new_child
!= null then
7500 new_child
.parent
= self
7501 assert new_child
isa AExpr
7502 _n_value
= new_child
7510 redef fun n_expr
=(node
)
7515 redef fun n_id
=(node
)
7520 redef fun n_assign_op
=(node
)
7525 redef fun n_value
=(node
)
7532 redef fun visit_all
(v
: Visitor)
7534 v
.enter_visit
(_n_expr
)
7535 v
.enter_visit
(_n_id
)
7536 v
.enter_visit
(_n_assign_op
)
7537 v
.enter_visit
(_n_value
)
7540 redef class ACallExpr
7541 private init empty_init
do end
7543 init init_acallexpr
(
7544 n_expr
: nullable AExpr,
7546 n_args
: nullable AExprs,
7547 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7551 _n_expr
= n_expr
.as(not null)
7552 n_expr
.parent
= self
7553 _n_id
= n_id
.as(not null)
7555 _n_args
= n_args
.as(not null)
7556 n_args
.parent
= self
7557 for n
in n_closure_defs
do
7558 assert n
isa AClosureDef
7559 _n_closure_defs
.add
(n
)
7564 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7566 if _n_expr
== old_child
then
7567 if new_child
!= null then
7568 new_child
.parent
= self
7569 assert new_child
isa AExpr
7576 if _n_id
== old_child
then
7577 if new_child
!= null then
7578 new_child
.parent
= self
7579 assert new_child
isa TId
7586 if _n_args
== old_child
then
7587 if new_child
!= null then
7588 new_child
.parent
= self
7589 assert new_child
isa AExprs
7596 for i
in [0.._n_closure_defs
.length
[ do
7597 if _n_closure_defs
[i
] == old_child
then
7598 if new_child
!= null then
7599 assert new_child
isa AClosureDef
7600 _n_closure_defs
[i
] = new_child
7601 new_child
.parent
= self
7603 _n_closure_defs
.remove_at
(i
)
7610 redef fun n_expr
=(node
)
7615 redef fun n_id
=(node
)
7620 redef fun n_args
=(node
)
7627 redef fun visit_all
(v
: Visitor)
7629 v
.enter_visit
(_n_expr
)
7630 v
.enter_visit
(_n_id
)
7631 v
.enter_visit
(_n_args
)
7632 for n
in _n_closure_defs
do
7637 redef class ACallAssignExpr
7638 private init empty_init
do end
7640 init init_acallassignexpr
(
7641 n_expr
: nullable AExpr,
7643 n_args
: nullable AExprs,
7644 n_assign
: nullable TAssign,
7645 n_value
: nullable AExpr
7649 _n_expr
= n_expr
.as(not null)
7650 n_expr
.parent
= self
7651 _n_id
= n_id
.as(not null)
7653 _n_args
= n_args
.as(not null)
7654 n_args
.parent
= self
7655 _n_assign
= n_assign
.as(not null)
7656 n_assign
.parent
= self
7657 _n_value
= n_value
.as(not null)
7658 n_value
.parent
= self
7661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7663 if _n_expr
== old_child
then
7664 if new_child
!= null then
7665 new_child
.parent
= self
7666 assert new_child
isa AExpr
7673 if _n_id
== old_child
then
7674 if new_child
!= null then
7675 new_child
.parent
= self
7676 assert new_child
isa TId
7683 if _n_args
== old_child
then
7684 if new_child
!= null then
7685 new_child
.parent
= self
7686 assert new_child
isa AExprs
7693 if _n_assign
== old_child
then
7694 if new_child
!= null then
7695 new_child
.parent
= self
7696 assert new_child
isa TAssign
7697 _n_assign
= new_child
7703 if _n_value
== old_child
then
7704 if new_child
!= null then
7705 new_child
.parent
= self
7706 assert new_child
isa AExpr
7707 _n_value
= new_child
7715 redef fun n_expr
=(node
)
7720 redef fun n_id
=(node
)
7725 redef fun n_args
=(node
)
7730 redef fun n_assign
=(node
)
7735 redef fun n_value
=(node
)
7742 redef fun visit_all
(v
: Visitor)
7744 v
.enter_visit
(_n_expr
)
7745 v
.enter_visit
(_n_id
)
7746 v
.enter_visit
(_n_args
)
7747 v
.enter_visit
(_n_assign
)
7748 v
.enter_visit
(_n_value
)
7751 redef class ACallReassignExpr
7752 private init empty_init
do end
7754 init init_acallreassignexpr
(
7755 n_expr
: nullable AExpr,
7757 n_args
: nullable AExprs,
7758 n_assign_op
: nullable AAssignOp,
7759 n_value
: nullable AExpr
7763 _n_expr
= n_expr
.as(not null)
7764 n_expr
.parent
= self
7765 _n_id
= n_id
.as(not null)
7767 _n_args
= n_args
.as(not null)
7768 n_args
.parent
= self
7769 _n_assign_op
= n_assign_op
.as(not null)
7770 n_assign_op
.parent
= self
7771 _n_value
= n_value
.as(not null)
7772 n_value
.parent
= self
7775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7777 if _n_expr
== old_child
then
7778 if new_child
!= null then
7779 new_child
.parent
= self
7780 assert new_child
isa AExpr
7787 if _n_id
== old_child
then
7788 if new_child
!= null then
7789 new_child
.parent
= self
7790 assert new_child
isa TId
7797 if _n_args
== old_child
then
7798 if new_child
!= null then
7799 new_child
.parent
= self
7800 assert new_child
isa AExprs
7807 if _n_assign_op
== old_child
then
7808 if new_child
!= null then
7809 new_child
.parent
= self
7810 assert new_child
isa AAssignOp
7811 _n_assign_op
= new_child
7817 if _n_value
== old_child
then
7818 if new_child
!= null then
7819 new_child
.parent
= self
7820 assert new_child
isa AExpr
7821 _n_value
= new_child
7829 redef fun n_expr
=(node
)
7834 redef fun n_id
=(node
)
7839 redef fun n_args
=(node
)
7844 redef fun n_assign_op
=(node
)
7849 redef fun n_value
=(node
)
7856 redef fun visit_all
(v
: Visitor)
7858 v
.enter_visit
(_n_expr
)
7859 v
.enter_visit
(_n_id
)
7860 v
.enter_visit
(_n_args
)
7861 v
.enter_visit
(_n_assign_op
)
7862 v
.enter_visit
(_n_value
)
7865 redef class ASuperExpr
7866 private init empty_init
do end
7868 init init_asuperexpr
(
7869 n_qualified
: nullable AQualified,
7870 n_kwsuper
: nullable TKwsuper,
7871 n_args
: nullable AExprs
7875 _n_qualified
= n_qualified
7876 if n_qualified
!= null then
7877 n_qualified
.parent
= self
7879 _n_kwsuper
= n_kwsuper
.as(not null)
7880 n_kwsuper
.parent
= self
7881 _n_args
= n_args
.as(not null)
7882 n_args
.parent
= self
7885 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7887 if _n_qualified
== old_child
then
7888 if new_child
!= null then
7889 new_child
.parent
= self
7890 assert new_child
isa AQualified
7891 _n_qualified
= new_child
7897 if _n_kwsuper
== old_child
then
7898 if new_child
!= null then
7899 new_child
.parent
= self
7900 assert new_child
isa TKwsuper
7901 _n_kwsuper
= new_child
7907 if _n_args
== old_child
then
7908 if new_child
!= null then
7909 new_child
.parent
= self
7910 assert new_child
isa AExprs
7919 redef fun n_qualified
=(node
)
7922 if node
!= null then
7926 redef fun n_kwsuper
=(node
)
7931 redef fun n_args
=(node
)
7938 redef fun visit_all
(v
: Visitor)
7940 if _n_qualified
!= null then
7941 v
.enter_visit
(_n_qualified
.as(not null))
7943 v
.enter_visit
(_n_kwsuper
)
7944 v
.enter_visit
(_n_args
)
7947 redef class AInitExpr
7948 private init empty_init
do end
7950 init init_ainitexpr
(
7951 n_expr
: nullable AExpr,
7952 n_kwinit
: nullable TKwinit,
7953 n_args
: nullable AExprs
7957 _n_expr
= n_expr
.as(not null)
7958 n_expr
.parent
= self
7959 _n_kwinit
= n_kwinit
.as(not null)
7960 n_kwinit
.parent
= self
7961 _n_args
= n_args
.as(not null)
7962 n_args
.parent
= self
7965 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7967 if _n_expr
== old_child
then
7968 if new_child
!= null then
7969 new_child
.parent
= self
7970 assert new_child
isa AExpr
7977 if _n_kwinit
== old_child
then
7978 if new_child
!= null then
7979 new_child
.parent
= self
7980 assert new_child
isa TKwinit
7981 _n_kwinit
= new_child
7987 if _n_args
== old_child
then
7988 if new_child
!= null then
7989 new_child
.parent
= self
7990 assert new_child
isa AExprs
7999 redef fun n_expr
=(node
)
8004 redef fun n_kwinit
=(node
)
8009 redef fun n_args
=(node
)
8016 redef fun visit_all
(v
: Visitor)
8018 v
.enter_visit
(_n_expr
)
8019 v
.enter_visit
(_n_kwinit
)
8020 v
.enter_visit
(_n_args
)
8023 redef class ABraExpr
8024 private init empty_init
do end
8026 init init_abraexpr
(
8027 n_expr
: nullable AExpr,
8028 n_args
: nullable AExprs,
8029 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8033 _n_expr
= n_expr
.as(not null)
8034 n_expr
.parent
= self
8035 _n_args
= n_args
.as(not null)
8036 n_args
.parent
= self
8037 for n
in n_closure_defs
do
8038 assert n
isa AClosureDef
8039 _n_closure_defs
.add
(n
)
8044 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8046 if _n_expr
== old_child
then
8047 if new_child
!= null then
8048 new_child
.parent
= self
8049 assert new_child
isa AExpr
8056 if _n_args
== old_child
then
8057 if new_child
!= null then
8058 new_child
.parent
= self
8059 assert new_child
isa AExprs
8066 for i
in [0.._n_closure_defs
.length
[ do
8067 if _n_closure_defs
[i
] == old_child
then
8068 if new_child
!= null then
8069 assert new_child
isa AClosureDef
8070 _n_closure_defs
[i
] = new_child
8071 new_child
.parent
= self
8073 _n_closure_defs
.remove_at
(i
)
8080 redef fun n_expr
=(node
)
8085 redef fun n_args
=(node
)
8092 redef fun visit_all
(v
: Visitor)
8094 v
.enter_visit
(_n_expr
)
8095 v
.enter_visit
(_n_args
)
8096 for n
in _n_closure_defs
do
8101 redef class ABraAssignExpr
8102 private init empty_init
do end
8104 init init_abraassignexpr
(
8105 n_expr
: nullable AExpr,
8106 n_args
: nullable AExprs,
8107 n_assign
: nullable TAssign,
8108 n_value
: nullable AExpr
8112 _n_expr
= n_expr
.as(not null)
8113 n_expr
.parent
= self
8114 _n_args
= n_args
.as(not null)
8115 n_args
.parent
= self
8116 _n_assign
= n_assign
.as(not null)
8117 n_assign
.parent
= self
8118 _n_value
= n_value
.as(not null)
8119 n_value
.parent
= self
8122 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8124 if _n_expr
== old_child
then
8125 if new_child
!= null then
8126 new_child
.parent
= self
8127 assert new_child
isa AExpr
8134 if _n_args
== old_child
then
8135 if new_child
!= null then
8136 new_child
.parent
= self
8137 assert new_child
isa AExprs
8144 if _n_assign
== old_child
then
8145 if new_child
!= null then
8146 new_child
.parent
= self
8147 assert new_child
isa TAssign
8148 _n_assign
= new_child
8154 if _n_value
== old_child
then
8155 if new_child
!= null then
8156 new_child
.parent
= self
8157 assert new_child
isa AExpr
8158 _n_value
= new_child
8166 redef fun n_expr
=(node
)
8171 redef fun n_args
=(node
)
8176 redef fun n_assign
=(node
)
8181 redef fun n_value
=(node
)
8188 redef fun visit_all
(v
: Visitor)
8190 v
.enter_visit
(_n_expr
)
8191 v
.enter_visit
(_n_args
)
8192 v
.enter_visit
(_n_assign
)
8193 v
.enter_visit
(_n_value
)
8196 redef class ABraReassignExpr
8197 private init empty_init
do end
8199 init init_abrareassignexpr
(
8200 n_expr
: nullable AExpr,
8201 n_args
: nullable AExprs,
8202 n_assign_op
: nullable AAssignOp,
8203 n_value
: nullable AExpr
8207 _n_expr
= n_expr
.as(not null)
8208 n_expr
.parent
= self
8209 _n_args
= n_args
.as(not null)
8210 n_args
.parent
= self
8211 _n_assign_op
= n_assign_op
.as(not null)
8212 n_assign_op
.parent
= self
8213 _n_value
= n_value
.as(not null)
8214 n_value
.parent
= self
8217 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8219 if _n_expr
== old_child
then
8220 if new_child
!= null then
8221 new_child
.parent
= self
8222 assert new_child
isa AExpr
8229 if _n_args
== old_child
then
8230 if new_child
!= null then
8231 new_child
.parent
= self
8232 assert new_child
isa AExprs
8239 if _n_assign_op
== old_child
then
8240 if new_child
!= null then
8241 new_child
.parent
= self
8242 assert new_child
isa AAssignOp
8243 _n_assign_op
= new_child
8249 if _n_value
== old_child
then
8250 if new_child
!= null then
8251 new_child
.parent
= self
8252 assert new_child
isa AExpr
8253 _n_value
= new_child
8261 redef fun n_expr
=(node
)
8266 redef fun n_args
=(node
)
8271 redef fun n_assign_op
=(node
)
8276 redef fun n_value
=(node
)
8283 redef fun visit_all
(v
: Visitor)
8285 v
.enter_visit
(_n_expr
)
8286 v
.enter_visit
(_n_args
)
8287 v
.enter_visit
(_n_assign_op
)
8288 v
.enter_visit
(_n_value
)
8291 redef class AClosureCallExpr
8292 private init empty_init
do end
8294 init init_aclosurecallexpr
(
8296 n_args
: nullable AExprs,
8297 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8301 _n_id
= n_id
.as(not null)
8303 _n_args
= n_args
.as(not null)
8304 n_args
.parent
= self
8305 for n
in n_closure_defs
do
8306 assert n
isa AClosureDef
8307 _n_closure_defs
.add
(n
)
8312 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8314 if _n_id
== old_child
then
8315 if new_child
!= null then
8316 new_child
.parent
= self
8317 assert new_child
isa TId
8324 if _n_args
== old_child
then
8325 if new_child
!= null then
8326 new_child
.parent
= self
8327 assert new_child
isa AExprs
8334 for i
in [0.._n_closure_defs
.length
[ do
8335 if _n_closure_defs
[i
] == old_child
then
8336 if new_child
!= null then
8337 assert new_child
isa AClosureDef
8338 _n_closure_defs
[i
] = new_child
8339 new_child
.parent
= self
8341 _n_closure_defs
.remove_at
(i
)
8348 redef fun n_id
=(node
)
8353 redef fun n_args
=(node
)
8360 redef fun visit_all
(v
: Visitor)
8362 v
.enter_visit
(_n_id
)
8363 v
.enter_visit
(_n_args
)
8364 for n
in _n_closure_defs
do
8369 redef class AVarExpr
8370 private init empty_init
do end
8372 init init_avarexpr
(
8377 _n_id
= n_id
.as(not null)
8381 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8383 if _n_id
== old_child
then
8384 if new_child
!= null then
8385 new_child
.parent
= self
8386 assert new_child
isa TId
8395 redef fun n_id
=(node
)
8402 redef fun visit_all
(v
: Visitor)
8404 v
.enter_visit
(_n_id
)
8407 redef class AVarAssignExpr
8408 private init empty_init
do end
8410 init init_avarassignexpr
(
8412 n_assign
: nullable TAssign,
8413 n_value
: nullable AExpr
8417 _n_id
= n_id
.as(not null)
8419 _n_assign
= n_assign
.as(not null)
8420 n_assign
.parent
= self
8421 _n_value
= n_value
.as(not null)
8422 n_value
.parent
= self
8425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8427 if _n_id
== old_child
then
8428 if new_child
!= null then
8429 new_child
.parent
= self
8430 assert new_child
isa TId
8437 if _n_assign
== old_child
then
8438 if new_child
!= null then
8439 new_child
.parent
= self
8440 assert new_child
isa TAssign
8441 _n_assign
= new_child
8447 if _n_value
== old_child
then
8448 if new_child
!= null then
8449 new_child
.parent
= self
8450 assert new_child
isa AExpr
8451 _n_value
= new_child
8459 redef fun n_id
=(node
)
8464 redef fun n_assign
=(node
)
8469 redef fun n_value
=(node
)
8476 redef fun visit_all
(v
: Visitor)
8478 v
.enter_visit
(_n_id
)
8479 v
.enter_visit
(_n_assign
)
8480 v
.enter_visit
(_n_value
)
8483 redef class AVarReassignExpr
8484 private init empty_init
do end
8486 init init_avarreassignexpr
(
8488 n_assign_op
: nullable AAssignOp,
8489 n_value
: nullable AExpr
8493 _n_id
= n_id
.as(not null)
8495 _n_assign_op
= n_assign_op
.as(not null)
8496 n_assign_op
.parent
= self
8497 _n_value
= n_value
.as(not null)
8498 n_value
.parent
= self
8501 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8503 if _n_id
== old_child
then
8504 if new_child
!= null then
8505 new_child
.parent
= self
8506 assert new_child
isa TId
8513 if _n_assign_op
== old_child
then
8514 if new_child
!= null then
8515 new_child
.parent
= self
8516 assert new_child
isa AAssignOp
8517 _n_assign_op
= new_child
8523 if _n_value
== old_child
then
8524 if new_child
!= null then
8525 new_child
.parent
= self
8526 assert new_child
isa AExpr
8527 _n_value
= new_child
8535 redef fun n_id
=(node
)
8540 redef fun n_assign_op
=(node
)
8545 redef fun n_value
=(node
)
8552 redef fun visit_all
(v
: Visitor)
8554 v
.enter_visit
(_n_id
)
8555 v
.enter_visit
(_n_assign_op
)
8556 v
.enter_visit
(_n_value
)
8559 redef class ARangeExpr
8560 private init empty_init
do end
8562 init init_arangeexpr
(
8563 n_expr
: nullable AExpr,
8564 n_expr2
: nullable AExpr,
8565 n_annotations
: nullable AAnnotations
8569 _n_expr
= n_expr
.as(not null)
8570 n_expr
.parent
= self
8571 _n_expr2
= n_expr2
.as(not null)
8572 n_expr2
.parent
= self
8573 _n_annotations
= n_annotations
8574 if n_annotations
!= null then
8575 n_annotations
.parent
= self
8579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8581 if _n_expr
== old_child
then
8582 if new_child
!= null then
8583 new_child
.parent
= self
8584 assert new_child
isa AExpr
8591 if _n_expr2
== old_child
then
8592 if new_child
!= null then
8593 new_child
.parent
= self
8594 assert new_child
isa AExpr
8595 _n_expr2
= new_child
8601 if _n_annotations
== old_child
then
8602 if new_child
!= null then
8603 new_child
.parent
= self
8604 assert new_child
isa AAnnotations
8605 _n_annotations
= new_child
8607 _n_annotations
= null
8613 redef fun n_expr
=(node
)
8618 redef fun n_expr2
=(node
)
8623 redef fun n_annotations
=(node
)
8625 _n_annotations
= node
8626 if node
!= null then
8632 redef fun visit_all
(v
: Visitor)
8634 v
.enter_visit
(_n_expr
)
8635 v
.enter_visit
(_n_expr2
)
8636 if _n_annotations
!= null then
8637 v
.enter_visit
(_n_annotations
.as(not null))
8641 redef class ACrangeExpr
8642 private init empty_init
do end
8644 init init_acrangeexpr
(
8645 n_obra
: nullable TObra,
8646 n_expr
: nullable AExpr,
8647 n_expr2
: nullable AExpr,
8648 n_cbra
: nullable TCbra,
8649 n_annotations
: nullable AAnnotations
8653 _n_obra
= n_obra
.as(not null)
8654 n_obra
.parent
= self
8655 _n_expr
= n_expr
.as(not null)
8656 n_expr
.parent
= self
8657 _n_expr2
= n_expr2
.as(not null)
8658 n_expr2
.parent
= self
8659 _n_cbra
= n_cbra
.as(not null)
8660 n_cbra
.parent
= self
8661 _n_annotations
= n_annotations
8662 if n_annotations
!= null then
8663 n_annotations
.parent
= self
8667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8669 if _n_obra
== old_child
then
8670 if new_child
!= null then
8671 new_child
.parent
= self
8672 assert new_child
isa TObra
8679 if _n_expr
== old_child
then
8680 if new_child
!= null then
8681 new_child
.parent
= self
8682 assert new_child
isa AExpr
8689 if _n_expr2
== old_child
then
8690 if new_child
!= null then
8691 new_child
.parent
= self
8692 assert new_child
isa AExpr
8693 _n_expr2
= new_child
8699 if _n_cbra
== old_child
then
8700 if new_child
!= null then
8701 new_child
.parent
= self
8702 assert new_child
isa TCbra
8709 if _n_annotations
== old_child
then
8710 if new_child
!= null then
8711 new_child
.parent
= self
8712 assert new_child
isa AAnnotations
8713 _n_annotations
= new_child
8715 _n_annotations
= null
8721 redef fun n_obra
=(node
)
8726 redef fun n_expr
=(node
)
8731 redef fun n_expr2
=(node
)
8736 redef fun n_cbra
=(node
)
8741 redef fun n_annotations
=(node
)
8743 _n_annotations
= node
8744 if node
!= null then
8750 redef fun visit_all
(v
: Visitor)
8752 v
.enter_visit
(_n_obra
)
8753 v
.enter_visit
(_n_expr
)
8754 v
.enter_visit
(_n_expr2
)
8755 v
.enter_visit
(_n_cbra
)
8756 if _n_annotations
!= null then
8757 v
.enter_visit
(_n_annotations
.as(not null))
8761 redef class AOrangeExpr
8762 private init empty_init
do end
8764 init init_aorangeexpr
(
8765 n_obra
: nullable TObra,
8766 n_expr
: nullable AExpr,
8767 n_expr2
: nullable AExpr,
8768 n_cbra
: nullable TObra,
8769 n_annotations
: nullable AAnnotations
8773 _n_obra
= n_obra
.as(not null)
8774 n_obra
.parent
= self
8775 _n_expr
= n_expr
.as(not null)
8776 n_expr
.parent
= self
8777 _n_expr2
= n_expr2
.as(not null)
8778 n_expr2
.parent
= self
8779 _n_cbra
= n_cbra
.as(not null)
8780 n_cbra
.parent
= self
8781 _n_annotations
= n_annotations
8782 if n_annotations
!= null then
8783 n_annotations
.parent
= self
8787 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8789 if _n_obra
== old_child
then
8790 if new_child
!= null then
8791 new_child
.parent
= self
8792 assert new_child
isa TObra
8799 if _n_expr
== old_child
then
8800 if new_child
!= null then
8801 new_child
.parent
= self
8802 assert new_child
isa AExpr
8809 if _n_expr2
== old_child
then
8810 if new_child
!= null then
8811 new_child
.parent
= self
8812 assert new_child
isa AExpr
8813 _n_expr2
= new_child
8819 if _n_cbra
== old_child
then
8820 if new_child
!= null then
8821 new_child
.parent
= self
8822 assert new_child
isa TObra
8829 if _n_annotations
== old_child
then
8830 if new_child
!= null then
8831 new_child
.parent
= self
8832 assert new_child
isa AAnnotations
8833 _n_annotations
= new_child
8835 _n_annotations
= null
8841 redef fun n_obra
=(node
)
8846 redef fun n_expr
=(node
)
8851 redef fun n_expr2
=(node
)
8856 redef fun n_cbra
=(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_obra
)
8873 v
.enter_visit
(_n_expr
)
8874 v
.enter_visit
(_n_expr2
)
8875 v
.enter_visit
(_n_cbra
)
8876 if _n_annotations
!= null then
8877 v
.enter_visit
(_n_annotations
.as(not null))
8881 redef class AArrayExpr
8882 private init empty_init
do end
8884 init init_aarrayexpr
(
8885 n_exprs
: nullable AExprs,
8886 n_annotations
: nullable AAnnotations
8890 _n_exprs
= n_exprs
.as(not null)
8891 n_exprs
.parent
= self
8892 _n_annotations
= n_annotations
8893 if n_annotations
!= null then
8894 n_annotations
.parent
= self
8898 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8900 if _n_exprs
== old_child
then
8901 if new_child
!= null then
8902 new_child
.parent
= self
8903 assert new_child
isa AExprs
8904 _n_exprs
= new_child
8910 if _n_annotations
== old_child
then
8911 if new_child
!= null then
8912 new_child
.parent
= self
8913 assert new_child
isa AAnnotations
8914 _n_annotations
= new_child
8916 _n_annotations
= null
8922 redef fun n_exprs
=(node
)
8927 redef fun n_annotations
=(node
)
8929 _n_annotations
= node
8930 if node
!= null then
8936 redef fun visit_all
(v
: Visitor)
8938 v
.enter_visit
(_n_exprs
)
8939 if _n_annotations
!= null then
8940 v
.enter_visit
(_n_annotations
.as(not null))
8944 redef class ASelfExpr
8945 private init empty_init
do end
8947 init init_aselfexpr
(
8948 n_kwself
: nullable TKwself,
8949 n_annotations
: nullable AAnnotations
8953 _n_kwself
= n_kwself
.as(not null)
8954 n_kwself
.parent
= self
8955 _n_annotations
= n_annotations
8956 if n_annotations
!= null then
8957 n_annotations
.parent
= self
8961 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8963 if _n_kwself
== old_child
then
8964 if new_child
!= null then
8965 new_child
.parent
= self
8966 assert new_child
isa TKwself
8967 _n_kwself
= new_child
8973 if _n_annotations
== old_child
then
8974 if new_child
!= null then
8975 new_child
.parent
= self
8976 assert new_child
isa AAnnotations
8977 _n_annotations
= new_child
8979 _n_annotations
= null
8985 redef fun n_kwself
=(node
)
8990 redef fun n_annotations
=(node
)
8992 _n_annotations
= node
8993 if node
!= null then
8999 redef fun visit_all
(v
: Visitor)
9001 v
.enter_visit
(_n_kwself
)
9002 if _n_annotations
!= null then
9003 v
.enter_visit
(_n_annotations
.as(not null))
9007 redef class AImplicitSelfExpr
9008 private init empty_init
do end
9010 init init_aimplicitselfexpr
9015 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9021 redef fun visit_all
(v
: Visitor)
9025 redef class ATrueExpr
9026 private init empty_init
do end
9028 init init_atrueexpr
(
9029 n_kwtrue
: nullable TKwtrue,
9030 n_annotations
: nullable AAnnotations
9034 _n_kwtrue
= n_kwtrue
.as(not null)
9035 n_kwtrue
.parent
= self
9036 _n_annotations
= n_annotations
9037 if n_annotations
!= null then
9038 n_annotations
.parent
= self
9042 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9044 if _n_kwtrue
== old_child
then
9045 if new_child
!= null then
9046 new_child
.parent
= self
9047 assert new_child
isa TKwtrue
9048 _n_kwtrue
= new_child
9054 if _n_annotations
== old_child
then
9055 if new_child
!= null then
9056 new_child
.parent
= self
9057 assert new_child
isa AAnnotations
9058 _n_annotations
= new_child
9060 _n_annotations
= null
9066 redef fun n_kwtrue
=(node
)
9071 redef fun n_annotations
=(node
)
9073 _n_annotations
= node
9074 if node
!= null then
9080 redef fun visit_all
(v
: Visitor)
9082 v
.enter_visit
(_n_kwtrue
)
9083 if _n_annotations
!= null then
9084 v
.enter_visit
(_n_annotations
.as(not null))
9088 redef class AFalseExpr
9089 private init empty_init
do end
9091 init init_afalseexpr
(
9092 n_kwfalse
: nullable TKwfalse,
9093 n_annotations
: nullable AAnnotations
9097 _n_kwfalse
= n_kwfalse
.as(not null)
9098 n_kwfalse
.parent
= self
9099 _n_annotations
= n_annotations
9100 if n_annotations
!= null then
9101 n_annotations
.parent
= self
9105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9107 if _n_kwfalse
== old_child
then
9108 if new_child
!= null then
9109 new_child
.parent
= self
9110 assert new_child
isa TKwfalse
9111 _n_kwfalse
= new_child
9117 if _n_annotations
== old_child
then
9118 if new_child
!= null then
9119 new_child
.parent
= self
9120 assert new_child
isa AAnnotations
9121 _n_annotations
= new_child
9123 _n_annotations
= null
9129 redef fun n_kwfalse
=(node
)
9134 redef fun n_annotations
=(node
)
9136 _n_annotations
= node
9137 if node
!= null then
9143 redef fun visit_all
(v
: Visitor)
9145 v
.enter_visit
(_n_kwfalse
)
9146 if _n_annotations
!= null then
9147 v
.enter_visit
(_n_annotations
.as(not null))
9151 redef class ANullExpr
9152 private init empty_init
do end
9154 init init_anullexpr
(
9155 n_kwnull
: nullable TKwnull,
9156 n_annotations
: nullable AAnnotations
9160 _n_kwnull
= n_kwnull
.as(not null)
9161 n_kwnull
.parent
= self
9162 _n_annotations
= n_annotations
9163 if n_annotations
!= null then
9164 n_annotations
.parent
= self
9168 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9170 if _n_kwnull
== old_child
then
9171 if new_child
!= null then
9172 new_child
.parent
= self
9173 assert new_child
isa TKwnull
9174 _n_kwnull
= new_child
9180 if _n_annotations
== old_child
then
9181 if new_child
!= null then
9182 new_child
.parent
= self
9183 assert new_child
isa AAnnotations
9184 _n_annotations
= new_child
9186 _n_annotations
= null
9192 redef fun n_kwnull
=(node
)
9197 redef fun n_annotations
=(node
)
9199 _n_annotations
= node
9200 if node
!= null then
9206 redef fun visit_all
(v
: Visitor)
9208 v
.enter_visit
(_n_kwnull
)
9209 if _n_annotations
!= null then
9210 v
.enter_visit
(_n_annotations
.as(not null))
9214 redef class AIntExpr
9215 private init empty_init
do end
9217 init init_aintexpr
(
9218 n_number
: nullable TNumber,
9219 n_annotations
: nullable AAnnotations
9223 _n_number
= n_number
.as(not null)
9224 n_number
.parent
= self
9225 _n_annotations
= n_annotations
9226 if n_annotations
!= null then
9227 n_annotations
.parent
= self
9231 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9233 if _n_number
== old_child
then
9234 if new_child
!= null then
9235 new_child
.parent
= self
9236 assert new_child
isa TNumber
9237 _n_number
= new_child
9243 if _n_annotations
== old_child
then
9244 if new_child
!= null then
9245 new_child
.parent
= self
9246 assert new_child
isa AAnnotations
9247 _n_annotations
= new_child
9249 _n_annotations
= null
9255 redef fun n_number
=(node
)
9260 redef fun n_annotations
=(node
)
9262 _n_annotations
= node
9263 if node
!= null then
9269 redef fun visit_all
(v
: Visitor)
9271 v
.enter_visit
(_n_number
)
9272 if _n_annotations
!= null then
9273 v
.enter_visit
(_n_annotations
.as(not null))
9277 redef class AFloatExpr
9278 private init empty_init
do end
9280 init init_afloatexpr
(
9281 n_float
: nullable TFloat,
9282 n_annotations
: nullable AAnnotations
9286 _n_float
= n_float
.as(not null)
9287 n_float
.parent
= self
9288 _n_annotations
= n_annotations
9289 if n_annotations
!= null then
9290 n_annotations
.parent
= self
9294 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9296 if _n_float
== old_child
then
9297 if new_child
!= null then
9298 new_child
.parent
= self
9299 assert new_child
isa TFloat
9300 _n_float
= new_child
9306 if _n_annotations
== old_child
then
9307 if new_child
!= null then
9308 new_child
.parent
= self
9309 assert new_child
isa AAnnotations
9310 _n_annotations
= new_child
9312 _n_annotations
= null
9318 redef fun n_float
=(node
)
9323 redef fun n_annotations
=(node
)
9325 _n_annotations
= node
9326 if node
!= null then
9332 redef fun visit_all
(v
: Visitor)
9334 v
.enter_visit
(_n_float
)
9335 if _n_annotations
!= null then
9336 v
.enter_visit
(_n_annotations
.as(not null))
9340 redef class ACharExpr
9341 private init empty_init
do end
9343 init init_acharexpr
(
9344 n_char
: nullable TChar,
9345 n_annotations
: nullable AAnnotations
9349 _n_char
= n_char
.as(not null)
9350 n_char
.parent
= self
9351 _n_annotations
= n_annotations
9352 if n_annotations
!= null then
9353 n_annotations
.parent
= self
9357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9359 if _n_char
== old_child
then
9360 if new_child
!= null then
9361 new_child
.parent
= self
9362 assert new_child
isa TChar
9369 if _n_annotations
== old_child
then
9370 if new_child
!= null then
9371 new_child
.parent
= self
9372 assert new_child
isa AAnnotations
9373 _n_annotations
= new_child
9375 _n_annotations
= null
9381 redef fun n_char
=(node
)
9386 redef fun n_annotations
=(node
)
9388 _n_annotations
= node
9389 if node
!= null then
9395 redef fun visit_all
(v
: Visitor)
9397 v
.enter_visit
(_n_char
)
9398 if _n_annotations
!= null then
9399 v
.enter_visit
(_n_annotations
.as(not null))
9403 redef class AStringExpr
9404 private init empty_init
do end
9406 init init_astringexpr
(
9407 n_string
: nullable TString,
9408 n_annotations
: nullable AAnnotations
9412 _n_string
= n_string
.as(not null)
9413 n_string
.parent
= self
9414 _n_annotations
= n_annotations
9415 if n_annotations
!= null then
9416 n_annotations
.parent
= self
9420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9422 if _n_string
== old_child
then
9423 if new_child
!= null then
9424 new_child
.parent
= self
9425 assert new_child
isa TString
9426 _n_string
= new_child
9432 if _n_annotations
== old_child
then
9433 if new_child
!= null then
9434 new_child
.parent
= self
9435 assert new_child
isa AAnnotations
9436 _n_annotations
= new_child
9438 _n_annotations
= null
9444 redef fun n_string
=(node
)
9449 redef fun n_annotations
=(node
)
9451 _n_annotations
= node
9452 if node
!= null then
9458 redef fun visit_all
(v
: Visitor)
9460 v
.enter_visit
(_n_string
)
9461 if _n_annotations
!= null then
9462 v
.enter_visit
(_n_annotations
.as(not null))
9466 redef class AStartStringExpr
9467 private init empty_init
do end
9469 init init_astartstringexpr
(
9470 n_string
: nullable TStartString
9474 _n_string
= n_string
.as(not null)
9475 n_string
.parent
= self
9478 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9480 if _n_string
== old_child
then
9481 if new_child
!= null then
9482 new_child
.parent
= self
9483 assert new_child
isa TStartString
9484 _n_string
= new_child
9492 redef fun n_string
=(node
)
9499 redef fun visit_all
(v
: Visitor)
9501 v
.enter_visit
(_n_string
)
9504 redef class AMidStringExpr
9505 private init empty_init
do end
9507 init init_amidstringexpr
(
9508 n_string
: nullable TMidString
9512 _n_string
= n_string
.as(not null)
9513 n_string
.parent
= self
9516 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9518 if _n_string
== old_child
then
9519 if new_child
!= null then
9520 new_child
.parent
= self
9521 assert new_child
isa TMidString
9522 _n_string
= new_child
9530 redef fun n_string
=(node
)
9537 redef fun visit_all
(v
: Visitor)
9539 v
.enter_visit
(_n_string
)
9542 redef class AEndStringExpr
9543 private init empty_init
do end
9545 init init_aendstringexpr
(
9546 n_string
: nullable TEndString
9550 _n_string
= n_string
.as(not null)
9551 n_string
.parent
= self
9554 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9556 if _n_string
== old_child
then
9557 if new_child
!= null then
9558 new_child
.parent
= self
9559 assert new_child
isa TEndString
9560 _n_string
= new_child
9568 redef fun n_string
=(node
)
9575 redef fun visit_all
(v
: Visitor)
9577 v
.enter_visit
(_n_string
)
9580 redef class ASuperstringExpr
9581 private init empty_init
do end
9583 init init_asuperstringexpr
(
9584 n_exprs
: Collection[Object], # Should be Collection[AExpr]
9585 n_annotations
: nullable AAnnotations
9594 _n_annotations
= n_annotations
9595 if n_annotations
!= null then
9596 n_annotations
.parent
= self
9600 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9602 for i
in [0.._n_exprs
.length
[ do
9603 if _n_exprs
[i
] == old_child
then
9604 if new_child
!= null then
9605 assert new_child
isa AExpr
9606 _n_exprs
[i
] = new_child
9607 new_child
.parent
= self
9609 _n_exprs
.remove_at
(i
)
9614 if _n_annotations
== old_child
then
9615 if new_child
!= null then
9616 new_child
.parent
= self
9617 assert new_child
isa AAnnotations
9618 _n_annotations
= new_child
9620 _n_annotations
= null
9626 redef fun n_annotations
=(node
)
9628 _n_annotations
= node
9629 if node
!= null then
9635 redef fun visit_all
(v
: Visitor)
9637 for n
in _n_exprs
do
9640 if _n_annotations
!= null then
9641 v
.enter_visit
(_n_annotations
.as(not null))
9645 redef class AParExpr
9646 private init empty_init
do end
9648 init init_aparexpr
(
9649 n_opar
: nullable TOpar,
9650 n_expr
: nullable AExpr,
9651 n_cpar
: nullable TCpar,
9652 n_annotations
: nullable AAnnotations
9656 _n_opar
= n_opar
.as(not null)
9657 n_opar
.parent
= self
9658 _n_expr
= n_expr
.as(not null)
9659 n_expr
.parent
= self
9660 _n_cpar
= n_cpar
.as(not null)
9661 n_cpar
.parent
= self
9662 _n_annotations
= n_annotations
9663 if n_annotations
!= null then
9664 n_annotations
.parent
= self
9668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9670 if _n_opar
== old_child
then
9671 if new_child
!= null then
9672 new_child
.parent
= self
9673 assert new_child
isa TOpar
9680 if _n_expr
== old_child
then
9681 if new_child
!= null then
9682 new_child
.parent
= self
9683 assert new_child
isa AExpr
9690 if _n_cpar
== old_child
then
9691 if new_child
!= null then
9692 new_child
.parent
= self
9693 assert new_child
isa TCpar
9700 if _n_annotations
== old_child
then
9701 if new_child
!= null then
9702 new_child
.parent
= self
9703 assert new_child
isa AAnnotations
9704 _n_annotations
= new_child
9706 _n_annotations
= null
9712 redef fun n_opar
=(node
)
9717 redef fun n_expr
=(node
)
9722 redef fun n_cpar
=(node
)
9727 redef fun n_annotations
=(node
)
9729 _n_annotations
= node
9730 if node
!= null then
9736 redef fun visit_all
(v
: Visitor)
9738 v
.enter_visit
(_n_opar
)
9739 v
.enter_visit
(_n_expr
)
9740 v
.enter_visit
(_n_cpar
)
9741 if _n_annotations
!= null then
9742 v
.enter_visit
(_n_annotations
.as(not null))
9746 redef class AAsCastExpr
9747 private init empty_init
do end
9749 init init_aascastexpr
(
9750 n_expr
: nullable AExpr,
9751 n_kwas
: nullable TKwas,
9752 n_opar
: nullable TOpar,
9753 n_type
: nullable AType,
9754 n_cpar
: nullable TCpar
9758 _n_expr
= n_expr
.as(not null)
9759 n_expr
.parent
= self
9760 _n_kwas
= n_kwas
.as(not null)
9761 n_kwas
.parent
= self
9762 _n_opar
= n_opar
.as(not null)
9763 n_opar
.parent
= self
9764 _n_type
= n_type
.as(not null)
9765 n_type
.parent
= self
9766 _n_cpar
= n_cpar
.as(not null)
9767 n_cpar
.parent
= self
9770 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9772 if _n_expr
== old_child
then
9773 if new_child
!= null then
9774 new_child
.parent
= self
9775 assert new_child
isa AExpr
9782 if _n_kwas
== old_child
then
9783 if new_child
!= null then
9784 new_child
.parent
= self
9785 assert new_child
isa TKwas
9792 if _n_opar
== old_child
then
9793 if new_child
!= null then
9794 new_child
.parent
= self
9795 assert new_child
isa TOpar
9802 if _n_type
== old_child
then
9803 if new_child
!= null then
9804 new_child
.parent
= self
9805 assert new_child
isa AType
9812 if _n_cpar
== old_child
then
9813 if new_child
!= null then
9814 new_child
.parent
= self
9815 assert new_child
isa TCpar
9824 redef fun n_expr
=(node
)
9829 redef fun n_kwas
=(node
)
9834 redef fun n_opar
=(node
)
9839 redef fun n_type
=(node
)
9844 redef fun n_cpar
=(node
)
9851 redef fun visit_all
(v
: Visitor)
9853 v
.enter_visit
(_n_expr
)
9854 v
.enter_visit
(_n_kwas
)
9855 v
.enter_visit
(_n_opar
)
9856 v
.enter_visit
(_n_type
)
9857 v
.enter_visit
(_n_cpar
)
9860 redef class AAsNotnullExpr
9861 private init empty_init
do end
9863 init init_aasnotnullexpr
(
9864 n_expr
: nullable AExpr,
9865 n_kwas
: nullable TKwas,
9866 n_opar
: nullable TOpar,
9867 n_kwnot
: nullable TKwnot,
9868 n_kwnull
: nullable TKwnull,
9869 n_cpar
: nullable TCpar
9873 _n_expr
= n_expr
.as(not null)
9874 n_expr
.parent
= self
9875 _n_kwas
= n_kwas
.as(not null)
9876 n_kwas
.parent
= self
9877 _n_opar
= n_opar
.as(not null)
9878 n_opar
.parent
= self
9879 _n_kwnot
= n_kwnot
.as(not null)
9880 n_kwnot
.parent
= self
9881 _n_kwnull
= n_kwnull
.as(not null)
9882 n_kwnull
.parent
= self
9883 _n_cpar
= n_cpar
.as(not null)
9884 n_cpar
.parent
= self
9887 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9889 if _n_expr
== old_child
then
9890 if new_child
!= null then
9891 new_child
.parent
= self
9892 assert new_child
isa AExpr
9899 if _n_kwas
== old_child
then
9900 if new_child
!= null then
9901 new_child
.parent
= self
9902 assert new_child
isa TKwas
9909 if _n_opar
== old_child
then
9910 if new_child
!= null then
9911 new_child
.parent
= self
9912 assert new_child
isa TOpar
9919 if _n_kwnot
== old_child
then
9920 if new_child
!= null then
9921 new_child
.parent
= self
9922 assert new_child
isa TKwnot
9923 _n_kwnot
= new_child
9929 if _n_kwnull
== old_child
then
9930 if new_child
!= null then
9931 new_child
.parent
= self
9932 assert new_child
isa TKwnull
9933 _n_kwnull
= new_child
9939 if _n_cpar
== old_child
then
9940 if new_child
!= null then
9941 new_child
.parent
= self
9942 assert new_child
isa TCpar
9951 redef fun n_expr
=(node
)
9956 redef fun n_kwas
=(node
)
9961 redef fun n_opar
=(node
)
9966 redef fun n_kwnot
=(node
)
9971 redef fun n_kwnull
=(node
)
9976 redef fun n_cpar
=(node
)
9983 redef fun visit_all
(v
: Visitor)
9985 v
.enter_visit
(_n_expr
)
9986 v
.enter_visit
(_n_kwas
)
9987 v
.enter_visit
(_n_opar
)
9988 v
.enter_visit
(_n_kwnot
)
9989 v
.enter_visit
(_n_kwnull
)
9990 v
.enter_visit
(_n_cpar
)
9993 redef class AIssetAttrExpr
9994 private init empty_init
do end
9996 init init_aissetattrexpr
(
9997 n_kwisset
: nullable TKwisset,
9998 n_expr
: nullable AExpr,
9999 n_id
: nullable TAttrid
10003 _n_kwisset
= n_kwisset
.as(not null)
10004 n_kwisset
.parent
= self
10005 _n_expr
= n_expr
.as(not null)
10006 n_expr
.parent
= self
10007 _n_id
= n_id
.as(not null)
10011 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10013 if _n_kwisset
== old_child
then
10014 if new_child
!= null then
10015 new_child
.parent
= self
10016 assert new_child
isa TKwisset
10017 _n_kwisset
= new_child
10023 if _n_expr
== old_child
then
10024 if new_child
!= null then
10025 new_child
.parent
= self
10026 assert new_child
isa AExpr
10027 _n_expr
= new_child
10033 if _n_id
== old_child
then
10034 if new_child
!= null then
10035 new_child
.parent
= self
10036 assert new_child
isa TAttrid
10045 redef fun n_kwisset
=(node
)
10050 redef fun n_expr
=(node
)
10055 redef fun n_id
=(node
)
10062 redef fun visit_all
(v
: Visitor)
10064 v
.enter_visit
(_n_kwisset
)
10065 v
.enter_visit
(_n_expr
)
10066 v
.enter_visit
(_n_id
)
10069 redef class ADebugTypeExpr
10070 private init empty_init
do end
10072 init init_adebugtypeexpr
(
10073 n_kwdebug
: nullable TKwdebug,
10074 n_kwtype
: nullable TKwtype,
10075 n_expr
: nullable AExpr,
10076 n_type
: nullable AType
10080 _n_kwdebug
= n_kwdebug
.as(not null)
10081 n_kwdebug
.parent
= self
10082 _n_kwtype
= n_kwtype
.as(not null)
10083 n_kwtype
.parent
= self
10084 _n_expr
= n_expr
.as(not null)
10085 n_expr
.parent
= self
10086 _n_type
= n_type
.as(not null)
10087 n_type
.parent
= self
10090 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10092 if _n_kwdebug
== old_child
then
10093 if new_child
!= null then
10094 new_child
.parent
= self
10095 assert new_child
isa TKwdebug
10096 _n_kwdebug
= new_child
10102 if _n_kwtype
== old_child
then
10103 if new_child
!= null then
10104 new_child
.parent
= self
10105 assert new_child
isa TKwtype
10106 _n_kwtype
= new_child
10112 if _n_expr
== old_child
then
10113 if new_child
!= null then
10114 new_child
.parent
= self
10115 assert new_child
isa AExpr
10116 _n_expr
= new_child
10122 if _n_type
== old_child
then
10123 if new_child
!= null then
10124 new_child
.parent
= self
10125 assert new_child
isa AType
10126 _n_type
= new_child
10134 redef fun n_kwdebug
=(node
)
10139 redef fun n_kwtype
=(node
)
10144 redef fun n_expr
=(node
)
10149 redef fun n_type
=(node
)
10156 redef fun visit_all
(v
: Visitor)
10158 v
.enter_visit
(_n_kwdebug
)
10159 v
.enter_visit
(_n_kwtype
)
10160 v
.enter_visit
(_n_expr
)
10161 v
.enter_visit
(_n_type
)
10164 redef class AListExprs
10165 private init empty_init
do end
10167 init init_alistexprs
(
10168 n_exprs
: Collection[Object] # Should be Collection[AExpr]
10172 for n
in n_exprs
do
10179 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10181 for i
in [0.._n_exprs
.length
[ do
10182 if _n_exprs
[i
] == old_child
then
10183 if new_child
!= null then
10184 assert new_child
isa AExpr
10185 _n_exprs
[i
] = new_child
10186 new_child
.parent
= self
10188 _n_exprs
.remove_at
(i
)
10197 redef fun visit_all
(v
: Visitor)
10199 for n
in _n_exprs
do
10204 redef class AParExprs
10205 private init empty_init
do end
10207 init init_aparexprs
(
10208 n_opar
: nullable TOpar,
10209 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10210 n_cpar
: nullable TCpar
10214 _n_opar
= n_opar
.as(not null)
10215 n_opar
.parent
= self
10216 for n
in n_exprs
do
10221 _n_cpar
= n_cpar
.as(not null)
10222 n_cpar
.parent
= self
10225 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10227 if _n_opar
== old_child
then
10228 if new_child
!= null then
10229 new_child
.parent
= self
10230 assert new_child
isa TOpar
10231 _n_opar
= new_child
10237 for i
in [0.._n_exprs
.length
[ do
10238 if _n_exprs
[i
] == old_child
then
10239 if new_child
!= null then
10240 assert new_child
isa AExpr
10241 _n_exprs
[i
] = new_child
10242 new_child
.parent
= self
10244 _n_exprs
.remove_at
(i
)
10249 if _n_cpar
== old_child
then
10250 if new_child
!= null then
10251 new_child
.parent
= self
10252 assert new_child
isa TCpar
10253 _n_cpar
= new_child
10261 redef fun n_opar
=(node
)
10266 redef fun n_cpar
=(node
)
10273 redef fun visit_all
(v
: Visitor)
10275 v
.enter_visit
(_n_opar
)
10276 for n
in _n_exprs
do
10279 v
.enter_visit
(_n_cpar
)
10282 redef class ABraExprs
10283 private init empty_init
do end
10285 init init_abraexprs
(
10286 n_obra
: nullable TObra,
10287 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10288 n_cbra
: nullable TCbra
10292 _n_obra
= n_obra
.as(not null)
10293 n_obra
.parent
= self
10294 for n
in n_exprs
do
10299 _n_cbra
= n_cbra
.as(not null)
10300 n_cbra
.parent
= self
10303 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10305 if _n_obra
== old_child
then
10306 if new_child
!= null then
10307 new_child
.parent
= self
10308 assert new_child
isa TObra
10309 _n_obra
= new_child
10315 for i
in [0.._n_exprs
.length
[ do
10316 if _n_exprs
[i
] == old_child
then
10317 if new_child
!= null then
10318 assert new_child
isa AExpr
10319 _n_exprs
[i
] = new_child
10320 new_child
.parent
= self
10322 _n_exprs
.remove_at
(i
)
10327 if _n_cbra
== old_child
then
10328 if new_child
!= null then
10329 new_child
.parent
= self
10330 assert new_child
isa TCbra
10331 _n_cbra
= new_child
10339 redef fun n_obra
=(node
)
10344 redef fun n_cbra
=(node
)
10351 redef fun visit_all
(v
: Visitor)
10353 v
.enter_visit
(_n_obra
)
10354 for n
in _n_exprs
do
10357 v
.enter_visit
(_n_cbra
)
10360 redef class APlusAssignOp
10361 private init empty_init
do end
10363 init init_aplusassignop
(
10364 n_pluseq
: nullable TPluseq
10368 _n_pluseq
= n_pluseq
.as(not null)
10369 n_pluseq
.parent
= self
10372 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10374 if _n_pluseq
== old_child
then
10375 if new_child
!= null then
10376 new_child
.parent
= self
10377 assert new_child
isa TPluseq
10378 _n_pluseq
= new_child
10386 redef fun n_pluseq
=(node
)
10393 redef fun visit_all
(v
: Visitor)
10395 v
.enter_visit
(_n_pluseq
)
10398 redef class AMinusAssignOp
10399 private init empty_init
do end
10401 init init_aminusassignop
(
10402 n_minuseq
: nullable TMinuseq
10406 _n_minuseq
= n_minuseq
.as(not null)
10407 n_minuseq
.parent
= self
10410 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10412 if _n_minuseq
== old_child
then
10413 if new_child
!= null then
10414 new_child
.parent
= self
10415 assert new_child
isa TMinuseq
10416 _n_minuseq
= new_child
10424 redef fun n_minuseq
=(node
)
10431 redef fun visit_all
(v
: Visitor)
10433 v
.enter_visit
(_n_minuseq
)
10436 redef class AClosureDef
10437 private init empty_init
do end
10439 init init_aclosuredef
(
10440 n_bang
: nullable TBang,
10441 n_id
: nullable AClosureId,
10442 n_ids
: Collection[Object], # Should be Collection[TId]
10443 n_kwdo
: nullable TKwdo,
10444 n_expr
: nullable AExpr,
10445 n_label
: nullable ALabel
10449 _n_bang
= n_bang
.as(not null)
10450 n_bang
.parent
= self
10451 _n_id
= n_id
.as(not null)
10459 if n_kwdo
!= null then
10460 n_kwdo
.parent
= self
10463 if n_expr
!= null then
10464 n_expr
.parent
= self
10467 if n_label
!= null then
10468 n_label
.parent
= self
10472 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10474 if _n_bang
== old_child
then
10475 if new_child
!= null then
10476 new_child
.parent
= self
10477 assert new_child
isa TBang
10478 _n_bang
= new_child
10484 if _n_id
== old_child
then
10485 if new_child
!= null then
10486 new_child
.parent
= self
10487 assert new_child
isa AClosureId
10494 for i
in [0.._n_ids
.length
[ do
10495 if _n_ids
[i
] == old_child
then
10496 if new_child
!= null then
10497 assert new_child
isa TId
10498 _n_ids
[i
] = new_child
10499 new_child
.parent
= self
10501 _n_ids
.remove_at
(i
)
10506 if _n_kwdo
== old_child
then
10507 if new_child
!= null then
10508 new_child
.parent
= self
10509 assert new_child
isa TKwdo
10510 _n_kwdo
= new_child
10516 if _n_expr
== old_child
then
10517 if new_child
!= null then
10518 new_child
.parent
= self
10519 assert new_child
isa AExpr
10520 _n_expr
= new_child
10526 if _n_label
== old_child
then
10527 if new_child
!= null then
10528 new_child
.parent
= self
10529 assert new_child
isa ALabel
10530 _n_label
= new_child
10538 redef fun n_bang
=(node
)
10543 redef fun n_id
=(node
)
10548 redef fun n_kwdo
=(node
)
10551 if node
!= null then
10555 redef fun n_expr
=(node
)
10558 if node
!= null then
10562 redef fun n_label
=(node
)
10565 if node
!= null then
10571 redef fun visit_all
(v
: Visitor)
10573 v
.enter_visit
(_n_bang
)
10574 v
.enter_visit
(_n_id
)
10578 if _n_kwdo
!= null then
10579 v
.enter_visit
(_n_kwdo
.as(not null))
10581 if _n_expr
!= null then
10582 v
.enter_visit
(_n_expr
.as(not null))
10584 if _n_label
!= null then
10585 v
.enter_visit
(_n_label
.as(not null))
10589 redef class ASimpleClosureId
10590 private init empty_init
do end
10592 init init_asimpleclosureid
(
10597 _n_id
= n_id
.as(not null)
10601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10603 if _n_id
== old_child
then
10604 if new_child
!= null then
10605 new_child
.parent
= self
10606 assert new_child
isa TId
10615 redef fun n_id
=(node
)
10622 redef fun visit_all
(v
: Visitor)
10624 v
.enter_visit
(_n_id
)
10627 redef class ABreakClosureId
10628 private init empty_init
do end
10630 init init_abreakclosureid
(
10631 n_kwbreak
: nullable TKwbreak
10635 _n_kwbreak
= n_kwbreak
.as(not null)
10636 n_kwbreak
.parent
= self
10639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10641 if _n_kwbreak
== old_child
then
10642 if new_child
!= null then
10643 new_child
.parent
= self
10644 assert new_child
isa TKwbreak
10645 _n_kwbreak
= new_child
10653 redef fun n_kwbreak
=(node
)
10660 redef fun visit_all
(v
: Visitor)
10662 v
.enter_visit
(_n_kwbreak
)
10665 redef class AModuleName
10666 private init empty_init
do end
10668 init init_amodulename
(
10669 n_quad
: nullable TQuad,
10670 n_path
: Collection[Object], # Should be Collection[TId]
10676 if n_quad
!= null then
10677 n_quad
.parent
= self
10684 _n_id
= n_id
.as(not null)
10688 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10690 if _n_quad
== old_child
then
10691 if new_child
!= null then
10692 new_child
.parent
= self
10693 assert new_child
isa TQuad
10694 _n_quad
= new_child
10700 for i
in [0.._n_path
.length
[ do
10701 if _n_path
[i
] == old_child
then
10702 if new_child
!= null then
10703 assert new_child
isa TId
10704 _n_path
[i
] = new_child
10705 new_child
.parent
= self
10707 _n_path
.remove_at
(i
)
10712 if _n_id
== old_child
then
10713 if new_child
!= null then
10714 new_child
.parent
= self
10715 assert new_child
isa TId
10724 redef fun n_quad
=(node
)
10727 if node
!= null then
10731 redef fun n_id
=(node
)
10738 redef fun visit_all
(v
: Visitor)
10740 if _n_quad
!= null then
10741 v
.enter_visit
(_n_quad
.as(not null))
10743 for n
in _n_path
do
10746 v
.enter_visit
(_n_id
)
10749 redef class AExternCalls
10750 private init empty_init
do end
10752 init init_aexterncalls
(
10753 n_kwimport
: nullable TKwimport,
10754 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
10758 _n_kwimport
= n_kwimport
.as(not null)
10759 n_kwimport
.parent
= self
10760 for n
in n_extern_calls
do
10761 assert n
isa AExternCall
10762 _n_extern_calls
.add
(n
)
10767 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10769 if _n_kwimport
== old_child
then
10770 if new_child
!= null then
10771 new_child
.parent
= self
10772 assert new_child
isa TKwimport
10773 _n_kwimport
= new_child
10779 for i
in [0.._n_extern_calls
.length
[ do
10780 if _n_extern_calls
[i
] == old_child
then
10781 if new_child
!= null then
10782 assert new_child
isa AExternCall
10783 _n_extern_calls
[i
] = new_child
10784 new_child
.parent
= self
10786 _n_extern_calls
.remove_at
(i
)
10793 redef fun n_kwimport
=(node
)
10800 redef fun visit_all
(v
: Visitor)
10802 v
.enter_visit
(_n_kwimport
)
10803 for n
in _n_extern_calls
do
10808 redef class AExternCall
10809 private init empty_init
do end
10811 init init_aexterncall
10816 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10822 redef fun visit_all
(v
: Visitor)
10826 redef class ASuperExternCall
10827 private init empty_init
do end
10829 init init_asuperexterncall
(
10830 n_kwsuper
: nullable TKwsuper
10834 _n_kwsuper
= n_kwsuper
.as(not null)
10835 n_kwsuper
.parent
= self
10838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10840 if _n_kwsuper
== old_child
then
10841 if new_child
!= null then
10842 new_child
.parent
= self
10843 assert new_child
isa TKwsuper
10844 _n_kwsuper
= new_child
10852 redef fun n_kwsuper
=(node
)
10859 redef fun visit_all
(v
: Visitor)
10861 v
.enter_visit
(_n_kwsuper
)
10864 redef class ALocalPropExternCall
10865 private init empty_init
do end
10867 init init_alocalpropexterncall
(
10868 n_methid
: nullable AMethid
10872 _n_methid
= n_methid
.as(not null)
10873 n_methid
.parent
= self
10876 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10878 if _n_methid
== old_child
then
10879 if new_child
!= null then
10880 new_child
.parent
= self
10881 assert new_child
isa AMethid
10882 _n_methid
= new_child
10890 redef fun n_methid
=(node
)
10897 redef fun visit_all
(v
: Visitor)
10899 v
.enter_visit
(_n_methid
)
10902 redef class AFullPropExternCall
10903 private init empty_init
do end
10905 init init_afullpropexterncall
(
10906 n_classid
: nullable TClassid,
10907 n_quad
: nullable TQuad,
10908 n_methid
: nullable AMethid
10912 _n_classid
= n_classid
.as(not null)
10913 n_classid
.parent
= self
10915 if n_quad
!= null then
10916 n_quad
.parent
= self
10918 _n_methid
= n_methid
.as(not null)
10919 n_methid
.parent
= self
10922 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10924 if _n_classid
== old_child
then
10925 if new_child
!= null then
10926 new_child
.parent
= self
10927 assert new_child
isa TClassid
10928 _n_classid
= new_child
10934 if _n_quad
== old_child
then
10935 if new_child
!= null then
10936 new_child
.parent
= self
10937 assert new_child
isa TQuad
10938 _n_quad
= new_child
10944 if _n_methid
== old_child
then
10945 if new_child
!= null then
10946 new_child
.parent
= self
10947 assert new_child
isa AMethid
10948 _n_methid
= new_child
10956 redef fun n_classid
=(node
)
10961 redef fun n_quad
=(node
)
10964 if node
!= null then
10968 redef fun n_methid
=(node
)
10975 redef fun visit_all
(v
: Visitor)
10977 v
.enter_visit
(_n_classid
)
10978 if _n_quad
!= null then
10979 v
.enter_visit
(_n_quad
.as(not null))
10981 v
.enter_visit
(_n_methid
)
10984 redef class AInitPropExternCall
10985 private init empty_init
do end
10987 init init_ainitpropexterncall
(
10988 n_classid
: nullable TClassid
10992 _n_classid
= n_classid
.as(not null)
10993 n_classid
.parent
= self
10996 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10998 if _n_classid
== old_child
then
10999 if new_child
!= null then
11000 new_child
.parent
= self
11001 assert new_child
isa TClassid
11002 _n_classid
= new_child
11010 redef fun n_classid
=(node
)
11017 redef fun visit_all
(v
: Visitor)
11019 v
.enter_visit
(_n_classid
)
11022 redef class ACastAsExternCall
11023 private init empty_init
do end
11025 init init_acastasexterncall
(
11026 n_from_type
: nullable AType,
11027 n_kwas
: nullable TKwas,
11028 n_to_type
: nullable AType
11032 _n_from_type
= n_from_type
.as(not null)
11033 n_from_type
.parent
= self
11034 _n_kwas
= n_kwas
.as(not null)
11035 n_kwas
.parent
= self
11036 _n_to_type
= n_to_type
.as(not null)
11037 n_to_type
.parent
= self
11040 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11042 if _n_from_type
== old_child
then
11043 if new_child
!= null then
11044 new_child
.parent
= self
11045 assert new_child
isa AType
11046 _n_from_type
= new_child
11052 if _n_kwas
== old_child
then
11053 if new_child
!= null then
11054 new_child
.parent
= self
11055 assert new_child
isa TKwas
11056 _n_kwas
= new_child
11062 if _n_to_type
== old_child
then
11063 if new_child
!= null then
11064 new_child
.parent
= self
11065 assert new_child
isa AType
11066 _n_to_type
= new_child
11074 redef fun n_from_type
=(node
)
11076 _n_from_type
= node
11079 redef fun n_kwas
=(node
)
11084 redef fun n_to_type
=(node
)
11091 redef fun visit_all
(v
: Visitor)
11093 v
.enter_visit
(_n_from_type
)
11094 v
.enter_visit
(_n_kwas
)
11095 v
.enter_visit
(_n_to_type
)
11098 redef class AAsNullableExternCall
11099 private init empty_init
do end
11101 init init_aasnullableexterncall
(
11102 n_type
: nullable AType,
11103 n_kwas
: nullable TKwas,
11104 n_kwnullable
: nullable TKwnullable
11108 _n_type
= n_type
.as(not null)
11109 n_type
.parent
= self
11110 _n_kwas
= n_kwas
.as(not null)
11111 n_kwas
.parent
= self
11112 _n_kwnullable
= n_kwnullable
.as(not null)
11113 n_kwnullable
.parent
= self
11116 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11118 if _n_type
== old_child
then
11119 if new_child
!= null then
11120 new_child
.parent
= self
11121 assert new_child
isa AType
11122 _n_type
= new_child
11128 if _n_kwas
== old_child
then
11129 if new_child
!= null then
11130 new_child
.parent
= self
11131 assert new_child
isa TKwas
11132 _n_kwas
= new_child
11138 if _n_kwnullable
== old_child
then
11139 if new_child
!= null then
11140 new_child
.parent
= self
11141 assert new_child
isa TKwnullable
11142 _n_kwnullable
= new_child
11150 redef fun n_type
=(node
)
11155 redef fun n_kwas
=(node
)
11160 redef fun n_kwnullable
=(node
)
11162 _n_kwnullable
= node
11167 redef fun visit_all
(v
: Visitor)
11169 v
.enter_visit
(_n_type
)
11170 v
.enter_visit
(_n_kwas
)
11171 v
.enter_visit
(_n_kwnullable
)
11174 redef class AAsNotNullableExternCall
11175 private init empty_init
do end
11177 init init_aasnotnullableexterncall
(
11178 n_type
: nullable AType,
11179 n_kwas
: nullable TKwas,
11180 n_kwnot
: nullable TKwnot,
11181 n_kwnullable
: nullable TKwnullable
11185 _n_type
= n_type
.as(not null)
11186 n_type
.parent
= self
11187 _n_kwas
= n_kwas
.as(not null)
11188 n_kwas
.parent
= self
11189 _n_kwnot
= n_kwnot
.as(not null)
11190 n_kwnot
.parent
= self
11191 _n_kwnullable
= n_kwnullable
.as(not null)
11192 n_kwnullable
.parent
= self
11195 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11197 if _n_type
== old_child
then
11198 if new_child
!= null then
11199 new_child
.parent
= self
11200 assert new_child
isa AType
11201 _n_type
= new_child
11207 if _n_kwas
== old_child
then
11208 if new_child
!= null then
11209 new_child
.parent
= self
11210 assert new_child
isa TKwas
11211 _n_kwas
= new_child
11217 if _n_kwnot
== old_child
then
11218 if new_child
!= null then
11219 new_child
.parent
= self
11220 assert new_child
isa TKwnot
11221 _n_kwnot
= new_child
11227 if _n_kwnullable
== old_child
then
11228 if new_child
!= null then
11229 new_child
.parent
= self
11230 assert new_child
isa TKwnullable
11231 _n_kwnullable
= new_child
11239 redef fun n_type
=(node
)
11244 redef fun n_kwas
=(node
)
11249 redef fun n_kwnot
=(node
)
11254 redef fun n_kwnullable
=(node
)
11256 _n_kwnullable
= node
11261 redef fun visit_all
(v
: Visitor)
11263 v
.enter_visit
(_n_type
)
11264 v
.enter_visit
(_n_kwas
)
11265 v
.enter_visit
(_n_kwnot
)
11266 v
.enter_visit
(_n_kwnullable
)
11269 redef class AInLanguage
11270 private init empty_init
do end
11272 init init_ainlanguage
(
11273 n_kwin
: nullable TKwin,
11274 n_string
: nullable TString
11278 _n_kwin
= n_kwin
.as(not null)
11279 n_kwin
.parent
= self
11280 _n_string
= n_string
.as(not null)
11281 n_string
.parent
= self
11284 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11286 if _n_kwin
== old_child
then
11287 if new_child
!= null then
11288 new_child
.parent
= self
11289 assert new_child
isa TKwin
11290 _n_kwin
= new_child
11296 if _n_string
== old_child
then
11297 if new_child
!= null then
11298 new_child
.parent
= self
11299 assert new_child
isa TString
11300 _n_string
= new_child
11308 redef fun n_kwin
=(node
)
11313 redef fun n_string
=(node
)
11320 redef fun visit_all
(v
: Visitor)
11322 v
.enter_visit
(_n_kwin
)
11323 v
.enter_visit
(_n_string
)
11326 redef class AExternCodeBlock
11327 private init empty_init
do end
11329 init init_aexterncodeblock
(
11330 n_in_language
: nullable AInLanguage,
11331 n_extern_code_segment
: nullable TExternCodeSegment
11335 _n_in_language
= n_in_language
11336 if n_in_language
!= null then
11337 n_in_language
.parent
= self
11339 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
11340 n_extern_code_segment
.parent
= self
11343 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11345 if _n_in_language
== old_child
then
11346 if new_child
!= null then
11347 new_child
.parent
= self
11348 assert new_child
isa AInLanguage
11349 _n_in_language
= new_child
11351 _n_in_language
= null
11355 if _n_extern_code_segment
== old_child
then
11356 if new_child
!= null then
11357 new_child
.parent
= self
11358 assert new_child
isa TExternCodeSegment
11359 _n_extern_code_segment
= new_child
11367 redef fun n_in_language
=(node
)
11369 _n_in_language
= node
11370 if node
!= null then
11374 redef fun n_extern_code_segment
=(node
)
11376 _n_extern_code_segment
= node
11381 redef fun visit_all
(v
: Visitor)
11383 if _n_in_language
!= null then
11384 v
.enter_visit
(_n_in_language
.as(not null))
11386 v
.enter_visit
(_n_extern_code_segment
)
11389 redef class AQualified
11390 private init empty_init
do end
11392 init init_aqualified
(
11393 n_id
: Collection[Object], # Should be Collection[TId]
11394 n_classid
: nullable TClassid
11403 _n_classid
= n_classid
11404 if n_classid
!= null then
11405 n_classid
.parent
= self
11409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11411 for i
in [0.._n_id
.length
[ do
11412 if _n_id
[i
] == old_child
then
11413 if new_child
!= null then
11414 assert new_child
isa TId
11415 _n_id
[i
] = new_child
11416 new_child
.parent
= self
11423 if _n_classid
== old_child
then
11424 if new_child
!= null then
11425 new_child
.parent
= self
11426 assert new_child
isa TClassid
11427 _n_classid
= new_child
11435 redef fun n_classid
=(node
)
11438 if node
!= null then
11444 redef fun visit_all
(v
: Visitor)
11449 if _n_classid
!= null then
11450 v
.enter_visit
(_n_classid
.as(not null))
11455 private init empty_init
do end
11458 n_comment
: Collection[Object] # Should be Collection[TComment]
11462 for n
in n_comment
do
11463 assert n
isa TComment
11469 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11471 for i
in [0.._n_comment
.length
[ do
11472 if _n_comment
[i
] == old_child
then
11473 if new_child
!= null then
11474 assert new_child
isa TComment
11475 _n_comment
[i
] = new_child
11476 new_child
.parent
= self
11478 _n_comment
.remove_at
(i
)
11487 redef fun visit_all
(v
: Visitor)
11489 for n
in _n_comment
do
11494 redef class AAnnotations
11495 private init empty_init
do end
11497 init init_aannotations
(
11498 n_at
: nullable TAt,
11499 n_opar
: nullable TOpar,
11500 n_items
: Collection[Object], # Should be Collection[AAnnotation]
11501 n_cpar
: nullable TCpar
11506 if n_at
!= null then
11510 if n_opar
!= null then
11511 n_opar
.parent
= self
11513 for n
in n_items
do
11514 assert n
isa AAnnotation
11519 if n_cpar
!= null then
11520 n_cpar
.parent
= self
11524 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11526 if _n_at
== old_child
then
11527 if new_child
!= null then
11528 new_child
.parent
= self
11529 assert new_child
isa TAt
11536 if _n_opar
== old_child
then
11537 if new_child
!= null then
11538 new_child
.parent
= self
11539 assert new_child
isa TOpar
11540 _n_opar
= new_child
11546 for i
in [0.._n_items
.length
[ do
11547 if _n_items
[i
] == old_child
then
11548 if new_child
!= null then
11549 assert new_child
isa AAnnotation
11550 _n_items
[i
] = new_child
11551 new_child
.parent
= self
11553 _n_items
.remove_at
(i
)
11558 if _n_cpar
== old_child
then
11559 if new_child
!= null then
11560 new_child
.parent
= self
11561 assert new_child
isa TCpar
11562 _n_cpar
= new_child
11570 redef fun n_at
=(node
)
11573 if node
!= null then
11577 redef fun n_opar
=(node
)
11580 if node
!= null then
11584 redef fun n_cpar
=(node
)
11587 if node
!= null then
11593 redef fun visit_all
(v
: Visitor)
11595 if _n_at
!= null then
11596 v
.enter_visit
(_n_at
.as(not null))
11598 if _n_opar
!= null then
11599 v
.enter_visit
(_n_opar
.as(not null))
11601 for n
in _n_items
do
11604 if _n_cpar
!= null then
11605 v
.enter_visit
(_n_cpar
.as(not null))
11609 redef class AAnnotation
11610 private init empty_init
do end
11612 init init_aannotation
(
11613 n_atid
: nullable AAtid,
11614 n_opar
: nullable TOpar,
11615 n_args
: Collection[Object], # Should be Collection[AAtArg]
11616 n_cpar
: nullable TCpar,
11617 n_annotations
: nullable AAnnotations
11621 _n_atid
= n_atid
.as(not null)
11622 n_atid
.parent
= self
11624 if n_opar
!= null then
11625 n_opar
.parent
= self
11628 assert n
isa AAtArg
11633 if n_cpar
!= null then
11634 n_cpar
.parent
= self
11636 _n_annotations
= n_annotations
11637 if n_annotations
!= null then
11638 n_annotations
.parent
= self
11642 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11644 if _n_atid
== old_child
then
11645 if new_child
!= null then
11646 new_child
.parent
= self
11647 assert new_child
isa AAtid
11648 _n_atid
= new_child
11654 if _n_opar
== old_child
then
11655 if new_child
!= null then
11656 new_child
.parent
= self
11657 assert new_child
isa TOpar
11658 _n_opar
= new_child
11664 for i
in [0.._n_args
.length
[ do
11665 if _n_args
[i
] == old_child
then
11666 if new_child
!= null then
11667 assert new_child
isa AAtArg
11668 _n_args
[i
] = new_child
11669 new_child
.parent
= self
11671 _n_args
.remove_at
(i
)
11676 if _n_cpar
== old_child
then
11677 if new_child
!= null then
11678 new_child
.parent
= self
11679 assert new_child
isa TCpar
11680 _n_cpar
= new_child
11686 if _n_annotations
== old_child
then
11687 if new_child
!= null then
11688 new_child
.parent
= self
11689 assert new_child
isa AAnnotations
11690 _n_annotations
= new_child
11692 _n_annotations
= null
11698 redef fun n_atid
=(node
)
11703 redef fun n_opar
=(node
)
11706 if node
!= null then
11710 redef fun n_cpar
=(node
)
11713 if node
!= null then
11717 redef fun n_annotations
=(node
)
11719 _n_annotations
= node
11720 if node
!= null then
11726 redef fun visit_all
(v
: Visitor)
11728 v
.enter_visit
(_n_atid
)
11729 if _n_opar
!= null then
11730 v
.enter_visit
(_n_opar
.as(not null))
11732 for n
in _n_args
do
11735 if _n_cpar
!= null then
11736 v
.enter_visit
(_n_cpar
.as(not null))
11738 if _n_annotations
!= null then
11739 v
.enter_visit
(_n_annotations
.as(not null))
11743 redef class ATypeAtArg
11744 private init empty_init
do end
11746 init init_atypeatarg
(
11747 n_type
: nullable AType
11751 _n_type
= n_type
.as(not null)
11752 n_type
.parent
= self
11755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11757 if _n_type
== old_child
then
11758 if new_child
!= null then
11759 new_child
.parent
= self
11760 assert new_child
isa AType
11761 _n_type
= new_child
11769 redef fun n_type
=(node
)
11776 redef fun visit_all
(v
: Visitor)
11778 v
.enter_visit
(_n_type
)
11781 redef class AExprAtArg
11782 private init empty_init
do end
11784 init init_aexpratarg
(
11785 n_expr
: nullable AExpr
11789 _n_expr
= n_expr
.as(not null)
11790 n_expr
.parent
= self
11793 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11795 if _n_expr
== old_child
then
11796 if new_child
!= null then
11797 new_child
.parent
= self
11798 assert new_child
isa AExpr
11799 _n_expr
= new_child
11807 redef fun n_expr
=(node
)
11814 redef fun visit_all
(v
: Visitor)
11816 v
.enter_visit
(_n_expr
)
11819 redef class AAtAtArg
11820 private init empty_init
do end
11822 init init_aatatarg
(
11823 n_annotations
: nullable AAnnotations
11827 _n_annotations
= n_annotations
.as(not null)
11828 n_annotations
.parent
= self
11831 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11833 if _n_annotations
== old_child
then
11834 if new_child
!= null then
11835 new_child
.parent
= self
11836 assert new_child
isa AAnnotations
11837 _n_annotations
= new_child
11845 redef fun n_annotations
=(node
)
11847 _n_annotations
= node
11852 redef fun visit_all
(v
: Visitor)
11854 v
.enter_visit
(_n_annotations
)
11857 redef class AIdAtid
11858 private init empty_init
do end
11860 init init_aidatid
(
11865 _n_id
= n_id
.as(not null)
11869 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11871 if _n_id
== old_child
then
11872 if new_child
!= null then
11873 new_child
.parent
= self
11874 assert new_child
isa TId
11883 redef fun n_id
=(node
)
11890 redef fun visit_all
(v
: Visitor)
11892 v
.enter_visit
(_n_id
)
11895 redef class AKwexternAtid
11896 private init empty_init
do end
11898 init init_akwexternatid
(
11899 n_id
: nullable TKwextern
11903 _n_id
= n_id
.as(not null)
11907 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11909 if _n_id
== old_child
then
11910 if new_child
!= null then
11911 new_child
.parent
= self
11912 assert new_child
isa TKwextern
11921 redef fun n_id
=(node
)
11928 redef fun visit_all
(v
: Visitor)
11930 v
.enter_visit
(_n_id
)
11933 redef class AKwinternAtid
11934 private init empty_init
do end
11936 init init_akwinternatid
(
11937 n_id
: nullable TKwintern
11941 _n_id
= n_id
.as(not null)
11945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11947 if _n_id
== old_child
then
11948 if new_child
!= null then
11949 new_child
.parent
= self
11950 assert new_child
isa TKwintern
11959 redef fun n_id
=(node
)
11966 redef fun visit_all
(v
: Visitor)
11968 v
.enter_visit
(_n_id
)
11971 redef class AKwreadableAtid
11972 private init empty_init
do end
11974 init init_akwreadableatid
(
11975 n_id
: nullable TKwreadable
11979 _n_id
= n_id
.as(not null)
11983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11985 if _n_id
== old_child
then
11986 if new_child
!= null then
11987 new_child
.parent
= self
11988 assert new_child
isa TKwreadable
11997 redef fun n_id
=(node
)
12004 redef fun visit_all
(v
: Visitor)
12006 v
.enter_visit
(_n_id
)
12009 redef class AKwwritableAtid
12010 private init empty_init
do end
12012 init init_akwwritableatid
(
12013 n_id
: nullable TKwwritable
12017 _n_id
= n_id
.as(not null)
12021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12023 if _n_id
== old_child
then
12024 if new_child
!= null then
12025 new_child
.parent
= self
12026 assert new_child
isa TKwwritable
12035 redef fun n_id
=(node
)
12042 redef fun visit_all
(v
: Visitor)
12044 v
.enter_visit
(_n_id
)
12047 redef class AKwimportAtid
12048 private init empty_init
do end
12050 init init_akwimportatid
(
12051 n_id
: nullable TKwimport
12055 _n_id
= n_id
.as(not null)
12059 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12061 if _n_id
== old_child
then
12062 if new_child
!= null then
12063 new_child
.parent
= self
12064 assert new_child
isa TKwimport
12073 redef fun n_id
=(node
)
12080 redef fun visit_all
(v
: Visitor)
12082 v
.enter_visit
(_n_id
)
12087 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12089 if _n_base
== old_child
then
12090 if new_child
== null then
12092 new_child
.parent
= self
12093 assert new_child
isa AModule
12094 _n_base
= new_child
12096 old_child
.parent
= null
12101 redef fun visit_all
(v
: Visitor)
12103 if _n_base
!= null then
12104 v
.enter_visit
(_n_base
.as(not null))
12106 v
.enter_visit
(_n_eof
)