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 AImpliesExpr
6167 private init empty_init
do end
6169 init init_aimpliesexpr
(
6170 n_expr
: nullable AExpr,
6171 n_expr2
: nullable AExpr
6175 _n_expr
= n_expr
.as(not null)
6176 n_expr
.parent
= self
6177 _n_expr2
= n_expr2
.as(not null)
6178 n_expr2
.parent
= self
6181 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6183 if _n_expr
== old_child
then
6184 if new_child
!= null then
6185 new_child
.parent
= self
6186 assert new_child
isa AExpr
6193 if _n_expr2
== old_child
then
6194 if new_child
!= null then
6195 new_child
.parent
= self
6196 assert new_child
isa AExpr
6197 _n_expr2
= new_child
6205 redef fun n_expr
=(node
)
6210 redef fun n_expr2
=(node
)
6217 redef fun visit_all
(v
: Visitor)
6219 v
.enter_visit
(_n_expr
)
6220 v
.enter_visit
(_n_expr2
)
6223 redef class ANotExpr
6224 private init empty_init
do end
6226 init init_anotexpr
(
6227 n_kwnot
: nullable TKwnot,
6228 n_expr
: nullable AExpr
6232 _n_kwnot
= n_kwnot
.as(not null)
6233 n_kwnot
.parent
= self
6234 _n_expr
= n_expr
.as(not null)
6235 n_expr
.parent
= self
6238 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6240 if _n_kwnot
== old_child
then
6241 if new_child
!= null then
6242 new_child
.parent
= self
6243 assert new_child
isa TKwnot
6244 _n_kwnot
= new_child
6250 if _n_expr
== old_child
then
6251 if new_child
!= null then
6252 new_child
.parent
= self
6253 assert new_child
isa AExpr
6262 redef fun n_kwnot
=(node
)
6267 redef fun n_expr
=(node
)
6274 redef fun visit_all
(v
: Visitor)
6276 v
.enter_visit
(_n_kwnot
)
6277 v
.enter_visit
(_n_expr
)
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
)
6737 private init empty_init
do end
6740 n_expr
: nullable AExpr,
6741 n_expr2
: nullable AExpr
6745 _n_expr
= n_expr
.as(not null)
6746 n_expr
.parent
= self
6747 _n_expr2
= n_expr2
.as(not null)
6748 n_expr2
.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_expr2
== old_child
then
6764 if new_child
!= null then
6765 new_child
.parent
= self
6766 assert new_child
isa AExpr
6767 _n_expr2
= new_child
6775 redef fun n_expr
=(node
)
6780 redef fun n_expr2
=(node
)
6787 redef fun visit_all
(v
: Visitor)
6789 v
.enter_visit
(_n_expr
)
6790 v
.enter_visit
(_n_expr2
)
6793 redef class AIsaExpr
6794 private init empty_init
do end
6796 init init_aisaexpr
(
6797 n_expr
: nullable AExpr,
6798 n_type
: nullable AType
6802 _n_expr
= n_expr
.as(not null)
6803 n_expr
.parent
= self
6804 _n_type
= n_type
.as(not null)
6805 n_type
.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_type
== old_child
then
6821 if new_child
!= null then
6822 new_child
.parent
= self
6823 assert new_child
isa AType
6832 redef fun n_expr
=(node
)
6837 redef fun n_type
=(node
)
6844 redef fun visit_all
(v
: Visitor)
6846 v
.enter_visit
(_n_expr
)
6847 v
.enter_visit
(_n_type
)
6850 redef class APlusExpr
6851 private init empty_init
do end
6853 init init_aplusexpr
(
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 AMinusExpr
6908 private init empty_init
do end
6910 init init_aminusexpr
(
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 AStarshipExpr
6965 private init empty_init
do end
6967 init init_astarshipexpr
(
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 AStarExpr
7022 private init empty_init
do end
7024 init init_astarexpr
(
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 ASlashExpr
7079 private init empty_init
do end
7081 init init_aslashexpr
(
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 APercentExpr
7136 private init empty_init
do end
7138 init init_apercentexpr
(
7139 n_expr
: nullable AExpr,
7140 n_expr2
: nullable AExpr
7144 _n_expr
= n_expr
.as(not null)
7145 n_expr
.parent
= self
7146 _n_expr2
= n_expr2
.as(not null)
7147 n_expr2
.parent
= self
7150 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7152 if _n_expr
== old_child
then
7153 if new_child
!= null then
7154 new_child
.parent
= self
7155 assert new_child
isa AExpr
7162 if _n_expr2
== old_child
then
7163 if new_child
!= null then
7164 new_child
.parent
= self
7165 assert new_child
isa AExpr
7166 _n_expr2
= new_child
7174 redef fun n_expr
=(node
)
7179 redef fun n_expr2
=(node
)
7186 redef fun visit_all
(v
: Visitor)
7188 v
.enter_visit
(_n_expr
)
7189 v
.enter_visit
(_n_expr2
)
7192 redef class AUminusExpr
7193 private init empty_init
do end
7195 init init_auminusexpr
(
7196 n_minus
: nullable TMinus,
7197 n_expr
: nullable AExpr
7201 _n_minus
= n_minus
.as(not null)
7202 n_minus
.parent
= self
7203 _n_expr
= n_expr
.as(not null)
7204 n_expr
.parent
= self
7207 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7209 if _n_minus
== old_child
then
7210 if new_child
!= null then
7211 new_child
.parent
= self
7212 assert new_child
isa TMinus
7213 _n_minus
= new_child
7219 if _n_expr
== old_child
then
7220 if new_child
!= null then
7221 new_child
.parent
= self
7222 assert new_child
isa AExpr
7231 redef fun n_minus
=(node
)
7236 redef fun n_expr
=(node
)
7243 redef fun visit_all
(v
: Visitor)
7245 v
.enter_visit
(_n_minus
)
7246 v
.enter_visit
(_n_expr
)
7249 redef class ANewExpr
7250 private init empty_init
do end
7252 init init_anewexpr
(
7253 n_kwnew
: nullable TKwnew,
7254 n_type
: nullable AType,
7256 n_args
: nullable AExprs
7260 _n_kwnew
= n_kwnew
.as(not null)
7261 n_kwnew
.parent
= self
7262 _n_type
= n_type
.as(not null)
7263 n_type
.parent
= self
7265 if n_id
!= null then
7268 _n_args
= n_args
.as(not null)
7269 n_args
.parent
= self
7272 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7274 if _n_kwnew
== old_child
then
7275 if new_child
!= null then
7276 new_child
.parent
= self
7277 assert new_child
isa TKwnew
7278 _n_kwnew
= new_child
7284 if _n_type
== old_child
then
7285 if new_child
!= null then
7286 new_child
.parent
= self
7287 assert new_child
isa AType
7294 if _n_id
== old_child
then
7295 if new_child
!= null then
7296 new_child
.parent
= self
7297 assert new_child
isa TId
7304 if _n_args
== old_child
then
7305 if new_child
!= null then
7306 new_child
.parent
= self
7307 assert new_child
isa AExprs
7316 redef fun n_kwnew
=(node
)
7321 redef fun n_type
=(node
)
7326 redef fun n_id
=(node
)
7329 if node
!= null then
7333 redef fun n_args
=(node
)
7340 redef fun visit_all
(v
: Visitor)
7342 v
.enter_visit
(_n_kwnew
)
7343 v
.enter_visit
(_n_type
)
7344 if _n_id
!= null then
7345 v
.enter_visit
(_n_id
.as(not null))
7347 v
.enter_visit
(_n_args
)
7350 redef class AAttrExpr
7351 private init empty_init
do end
7353 init init_aattrexpr
(
7354 n_expr
: nullable AExpr,
7355 n_id
: nullable TAttrid
7359 _n_expr
= n_expr
.as(not null)
7360 n_expr
.parent
= self
7361 _n_id
= n_id
.as(not null)
7365 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7367 if _n_expr
== old_child
then
7368 if new_child
!= null then
7369 new_child
.parent
= self
7370 assert new_child
isa AExpr
7377 if _n_id
== old_child
then
7378 if new_child
!= null then
7379 new_child
.parent
= self
7380 assert new_child
isa TAttrid
7389 redef fun n_expr
=(node
)
7394 redef fun n_id
=(node
)
7401 redef fun visit_all
(v
: Visitor)
7403 v
.enter_visit
(_n_expr
)
7404 v
.enter_visit
(_n_id
)
7407 redef class AAttrAssignExpr
7408 private init empty_init
do end
7410 init init_aattrassignexpr
(
7411 n_expr
: nullable AExpr,
7412 n_id
: nullable TAttrid,
7413 n_assign
: nullable TAssign,
7414 n_value
: nullable AExpr
7418 _n_expr
= n_expr
.as(not null)
7419 n_expr
.parent
= self
7420 _n_id
= n_id
.as(not null)
7422 _n_assign
= n_assign
.as(not null)
7423 n_assign
.parent
= self
7424 _n_value
= n_value
.as(not null)
7425 n_value
.parent
= self
7428 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7430 if _n_expr
== old_child
then
7431 if new_child
!= null then
7432 new_child
.parent
= self
7433 assert new_child
isa AExpr
7440 if _n_id
== old_child
then
7441 if new_child
!= null then
7442 new_child
.parent
= self
7443 assert new_child
isa TAttrid
7450 if _n_assign
== old_child
then
7451 if new_child
!= null then
7452 new_child
.parent
= self
7453 assert new_child
isa TAssign
7454 _n_assign
= new_child
7460 if _n_value
== old_child
then
7461 if new_child
!= null then
7462 new_child
.parent
= self
7463 assert new_child
isa AExpr
7464 _n_value
= new_child
7472 redef fun n_expr
=(node
)
7477 redef fun n_id
=(node
)
7482 redef fun n_assign
=(node
)
7487 redef fun n_value
=(node
)
7494 redef fun visit_all
(v
: Visitor)
7496 v
.enter_visit
(_n_expr
)
7497 v
.enter_visit
(_n_id
)
7498 v
.enter_visit
(_n_assign
)
7499 v
.enter_visit
(_n_value
)
7502 redef class AAttrReassignExpr
7503 private init empty_init
do end
7505 init init_aattrreassignexpr
(
7506 n_expr
: nullable AExpr,
7507 n_id
: nullable TAttrid,
7508 n_assign_op
: nullable AAssignOp,
7509 n_value
: nullable AExpr
7513 _n_expr
= n_expr
.as(not null)
7514 n_expr
.parent
= self
7515 _n_id
= n_id
.as(not null)
7517 _n_assign_op
= n_assign_op
.as(not null)
7518 n_assign_op
.parent
= self
7519 _n_value
= n_value
.as(not null)
7520 n_value
.parent
= self
7523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7525 if _n_expr
== old_child
then
7526 if new_child
!= null then
7527 new_child
.parent
= self
7528 assert new_child
isa AExpr
7535 if _n_id
== old_child
then
7536 if new_child
!= null then
7537 new_child
.parent
= self
7538 assert new_child
isa TAttrid
7545 if _n_assign_op
== old_child
then
7546 if new_child
!= null then
7547 new_child
.parent
= self
7548 assert new_child
isa AAssignOp
7549 _n_assign_op
= new_child
7555 if _n_value
== old_child
then
7556 if new_child
!= null then
7557 new_child
.parent
= self
7558 assert new_child
isa AExpr
7559 _n_value
= new_child
7567 redef fun n_expr
=(node
)
7572 redef fun n_id
=(node
)
7577 redef fun n_assign_op
=(node
)
7582 redef fun n_value
=(node
)
7589 redef fun visit_all
(v
: Visitor)
7591 v
.enter_visit
(_n_expr
)
7592 v
.enter_visit
(_n_id
)
7593 v
.enter_visit
(_n_assign_op
)
7594 v
.enter_visit
(_n_value
)
7597 redef class ACallExpr
7598 private init empty_init
do end
7600 init init_acallexpr
(
7601 n_expr
: nullable AExpr,
7603 n_args
: nullable AExprs,
7604 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7608 _n_expr
= n_expr
.as(not null)
7609 n_expr
.parent
= self
7610 _n_id
= n_id
.as(not null)
7612 _n_args
= n_args
.as(not null)
7613 n_args
.parent
= self
7614 for n
in n_closure_defs
do
7615 assert n
isa AClosureDef
7616 _n_closure_defs
.add
(n
)
7621 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7623 if _n_expr
== old_child
then
7624 if new_child
!= null then
7625 new_child
.parent
= self
7626 assert new_child
isa AExpr
7633 if _n_id
== old_child
then
7634 if new_child
!= null then
7635 new_child
.parent
= self
7636 assert new_child
isa TId
7643 if _n_args
== old_child
then
7644 if new_child
!= null then
7645 new_child
.parent
= self
7646 assert new_child
isa AExprs
7653 for i
in [0.._n_closure_defs
.length
[ do
7654 if _n_closure_defs
[i
] == old_child
then
7655 if new_child
!= null then
7656 assert new_child
isa AClosureDef
7657 _n_closure_defs
[i
] = new_child
7658 new_child
.parent
= self
7660 _n_closure_defs
.remove_at
(i
)
7667 redef fun n_expr
=(node
)
7672 redef fun n_id
=(node
)
7677 redef fun n_args
=(node
)
7684 redef fun visit_all
(v
: Visitor)
7686 v
.enter_visit
(_n_expr
)
7687 v
.enter_visit
(_n_id
)
7688 v
.enter_visit
(_n_args
)
7689 for n
in _n_closure_defs
do
7694 redef class ACallAssignExpr
7695 private init empty_init
do end
7697 init init_acallassignexpr
(
7698 n_expr
: nullable AExpr,
7700 n_args
: nullable AExprs,
7701 n_assign
: nullable TAssign,
7702 n_value
: nullable AExpr
7706 _n_expr
= n_expr
.as(not null)
7707 n_expr
.parent
= self
7708 _n_id
= n_id
.as(not null)
7710 _n_args
= n_args
.as(not null)
7711 n_args
.parent
= self
7712 _n_assign
= n_assign
.as(not null)
7713 n_assign
.parent
= self
7714 _n_value
= n_value
.as(not null)
7715 n_value
.parent
= self
7718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7720 if _n_expr
== old_child
then
7721 if new_child
!= null then
7722 new_child
.parent
= self
7723 assert new_child
isa AExpr
7730 if _n_id
== old_child
then
7731 if new_child
!= null then
7732 new_child
.parent
= self
7733 assert new_child
isa TId
7740 if _n_args
== old_child
then
7741 if new_child
!= null then
7742 new_child
.parent
= self
7743 assert new_child
isa AExprs
7750 if _n_assign
== old_child
then
7751 if new_child
!= null then
7752 new_child
.parent
= self
7753 assert new_child
isa TAssign
7754 _n_assign
= new_child
7760 if _n_value
== old_child
then
7761 if new_child
!= null then
7762 new_child
.parent
= self
7763 assert new_child
isa AExpr
7764 _n_value
= new_child
7772 redef fun n_expr
=(node
)
7777 redef fun n_id
=(node
)
7782 redef fun n_args
=(node
)
7787 redef fun n_assign
=(node
)
7792 redef fun n_value
=(node
)
7799 redef fun visit_all
(v
: Visitor)
7801 v
.enter_visit
(_n_expr
)
7802 v
.enter_visit
(_n_id
)
7803 v
.enter_visit
(_n_args
)
7804 v
.enter_visit
(_n_assign
)
7805 v
.enter_visit
(_n_value
)
7808 redef class ACallReassignExpr
7809 private init empty_init
do end
7811 init init_acallreassignexpr
(
7812 n_expr
: nullable AExpr,
7814 n_args
: nullable AExprs,
7815 n_assign_op
: nullable AAssignOp,
7816 n_value
: nullable AExpr
7820 _n_expr
= n_expr
.as(not null)
7821 n_expr
.parent
= self
7822 _n_id
= n_id
.as(not null)
7824 _n_args
= n_args
.as(not null)
7825 n_args
.parent
= self
7826 _n_assign_op
= n_assign_op
.as(not null)
7827 n_assign_op
.parent
= self
7828 _n_value
= n_value
.as(not null)
7829 n_value
.parent
= self
7832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7834 if _n_expr
== old_child
then
7835 if new_child
!= null then
7836 new_child
.parent
= self
7837 assert new_child
isa AExpr
7844 if _n_id
== old_child
then
7845 if new_child
!= null then
7846 new_child
.parent
= self
7847 assert new_child
isa TId
7854 if _n_args
== old_child
then
7855 if new_child
!= null then
7856 new_child
.parent
= self
7857 assert new_child
isa AExprs
7864 if _n_assign_op
== old_child
then
7865 if new_child
!= null then
7866 new_child
.parent
= self
7867 assert new_child
isa AAssignOp
7868 _n_assign_op
= new_child
7874 if _n_value
== old_child
then
7875 if new_child
!= null then
7876 new_child
.parent
= self
7877 assert new_child
isa AExpr
7878 _n_value
= new_child
7886 redef fun n_expr
=(node
)
7891 redef fun n_id
=(node
)
7896 redef fun n_args
=(node
)
7901 redef fun n_assign_op
=(node
)
7906 redef fun n_value
=(node
)
7913 redef fun visit_all
(v
: Visitor)
7915 v
.enter_visit
(_n_expr
)
7916 v
.enter_visit
(_n_id
)
7917 v
.enter_visit
(_n_args
)
7918 v
.enter_visit
(_n_assign_op
)
7919 v
.enter_visit
(_n_value
)
7922 redef class ASuperExpr
7923 private init empty_init
do end
7925 init init_asuperexpr
(
7926 n_qualified
: nullable AQualified,
7927 n_kwsuper
: nullable TKwsuper,
7928 n_args
: nullable AExprs
7932 _n_qualified
= n_qualified
7933 if n_qualified
!= null then
7934 n_qualified
.parent
= self
7936 _n_kwsuper
= n_kwsuper
.as(not null)
7937 n_kwsuper
.parent
= self
7938 _n_args
= n_args
.as(not null)
7939 n_args
.parent
= self
7942 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7944 if _n_qualified
== old_child
then
7945 if new_child
!= null then
7946 new_child
.parent
= self
7947 assert new_child
isa AQualified
7948 _n_qualified
= new_child
7954 if _n_kwsuper
== old_child
then
7955 if new_child
!= null then
7956 new_child
.parent
= self
7957 assert new_child
isa TKwsuper
7958 _n_kwsuper
= new_child
7964 if _n_args
== old_child
then
7965 if new_child
!= null then
7966 new_child
.parent
= self
7967 assert new_child
isa AExprs
7976 redef fun n_qualified
=(node
)
7979 if node
!= null then
7983 redef fun n_kwsuper
=(node
)
7988 redef fun n_args
=(node
)
7995 redef fun visit_all
(v
: Visitor)
7997 if _n_qualified
!= null then
7998 v
.enter_visit
(_n_qualified
.as(not null))
8000 v
.enter_visit
(_n_kwsuper
)
8001 v
.enter_visit
(_n_args
)
8004 redef class AInitExpr
8005 private init empty_init
do end
8007 init init_ainitexpr
(
8008 n_expr
: nullable AExpr,
8009 n_kwinit
: nullable TKwinit,
8010 n_args
: nullable AExprs
8014 _n_expr
= n_expr
.as(not null)
8015 n_expr
.parent
= self
8016 _n_kwinit
= n_kwinit
.as(not null)
8017 n_kwinit
.parent
= self
8018 _n_args
= n_args
.as(not null)
8019 n_args
.parent
= self
8022 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8024 if _n_expr
== old_child
then
8025 if new_child
!= null then
8026 new_child
.parent
= self
8027 assert new_child
isa AExpr
8034 if _n_kwinit
== old_child
then
8035 if new_child
!= null then
8036 new_child
.parent
= self
8037 assert new_child
isa TKwinit
8038 _n_kwinit
= new_child
8044 if _n_args
== old_child
then
8045 if new_child
!= null then
8046 new_child
.parent
= self
8047 assert new_child
isa AExprs
8056 redef fun n_expr
=(node
)
8061 redef fun n_kwinit
=(node
)
8066 redef fun n_args
=(node
)
8073 redef fun visit_all
(v
: Visitor)
8075 v
.enter_visit
(_n_expr
)
8076 v
.enter_visit
(_n_kwinit
)
8077 v
.enter_visit
(_n_args
)
8080 redef class ABraExpr
8081 private init empty_init
do end
8083 init init_abraexpr
(
8084 n_expr
: nullable AExpr,
8085 n_args
: nullable AExprs,
8086 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8090 _n_expr
= n_expr
.as(not null)
8091 n_expr
.parent
= self
8092 _n_args
= n_args
.as(not null)
8093 n_args
.parent
= self
8094 for n
in n_closure_defs
do
8095 assert n
isa AClosureDef
8096 _n_closure_defs
.add
(n
)
8101 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8103 if _n_expr
== old_child
then
8104 if new_child
!= null then
8105 new_child
.parent
= self
8106 assert new_child
isa AExpr
8113 if _n_args
== old_child
then
8114 if new_child
!= null then
8115 new_child
.parent
= self
8116 assert new_child
isa AExprs
8123 for i
in [0.._n_closure_defs
.length
[ do
8124 if _n_closure_defs
[i
] == old_child
then
8125 if new_child
!= null then
8126 assert new_child
isa AClosureDef
8127 _n_closure_defs
[i
] = new_child
8128 new_child
.parent
= self
8130 _n_closure_defs
.remove_at
(i
)
8137 redef fun n_expr
=(node
)
8142 redef fun n_args
=(node
)
8149 redef fun visit_all
(v
: Visitor)
8151 v
.enter_visit
(_n_expr
)
8152 v
.enter_visit
(_n_args
)
8153 for n
in _n_closure_defs
do
8158 redef class ABraAssignExpr
8159 private init empty_init
do end
8161 init init_abraassignexpr
(
8162 n_expr
: nullable AExpr,
8163 n_args
: nullable AExprs,
8164 n_assign
: nullable TAssign,
8165 n_value
: nullable AExpr
8169 _n_expr
= n_expr
.as(not null)
8170 n_expr
.parent
= self
8171 _n_args
= n_args
.as(not null)
8172 n_args
.parent
= self
8173 _n_assign
= n_assign
.as(not null)
8174 n_assign
.parent
= self
8175 _n_value
= n_value
.as(not null)
8176 n_value
.parent
= self
8179 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8181 if _n_expr
== old_child
then
8182 if new_child
!= null then
8183 new_child
.parent
= self
8184 assert new_child
isa AExpr
8191 if _n_args
== old_child
then
8192 if new_child
!= null then
8193 new_child
.parent
= self
8194 assert new_child
isa AExprs
8201 if _n_assign
== old_child
then
8202 if new_child
!= null then
8203 new_child
.parent
= self
8204 assert new_child
isa TAssign
8205 _n_assign
= new_child
8211 if _n_value
== old_child
then
8212 if new_child
!= null then
8213 new_child
.parent
= self
8214 assert new_child
isa AExpr
8215 _n_value
= new_child
8223 redef fun n_expr
=(node
)
8228 redef fun n_args
=(node
)
8233 redef fun n_assign
=(node
)
8238 redef fun n_value
=(node
)
8245 redef fun visit_all
(v
: Visitor)
8247 v
.enter_visit
(_n_expr
)
8248 v
.enter_visit
(_n_args
)
8249 v
.enter_visit
(_n_assign
)
8250 v
.enter_visit
(_n_value
)
8253 redef class ABraReassignExpr
8254 private init empty_init
do end
8256 init init_abrareassignexpr
(
8257 n_expr
: nullable AExpr,
8258 n_args
: nullable AExprs,
8259 n_assign_op
: nullable AAssignOp,
8260 n_value
: nullable AExpr
8264 _n_expr
= n_expr
.as(not null)
8265 n_expr
.parent
= self
8266 _n_args
= n_args
.as(not null)
8267 n_args
.parent
= self
8268 _n_assign_op
= n_assign_op
.as(not null)
8269 n_assign_op
.parent
= self
8270 _n_value
= n_value
.as(not null)
8271 n_value
.parent
= self
8274 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8276 if _n_expr
== old_child
then
8277 if new_child
!= null then
8278 new_child
.parent
= self
8279 assert new_child
isa AExpr
8286 if _n_args
== old_child
then
8287 if new_child
!= null then
8288 new_child
.parent
= self
8289 assert new_child
isa AExprs
8296 if _n_assign_op
== old_child
then
8297 if new_child
!= null then
8298 new_child
.parent
= self
8299 assert new_child
isa AAssignOp
8300 _n_assign_op
= new_child
8306 if _n_value
== old_child
then
8307 if new_child
!= null then
8308 new_child
.parent
= self
8309 assert new_child
isa AExpr
8310 _n_value
= new_child
8318 redef fun n_expr
=(node
)
8323 redef fun n_args
=(node
)
8328 redef fun n_assign_op
=(node
)
8333 redef fun n_value
=(node
)
8340 redef fun visit_all
(v
: Visitor)
8342 v
.enter_visit
(_n_expr
)
8343 v
.enter_visit
(_n_args
)
8344 v
.enter_visit
(_n_assign_op
)
8345 v
.enter_visit
(_n_value
)
8348 redef class AClosureCallExpr
8349 private init empty_init
do end
8351 init init_aclosurecallexpr
(
8353 n_args
: nullable AExprs,
8354 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8358 _n_id
= n_id
.as(not null)
8360 _n_args
= n_args
.as(not null)
8361 n_args
.parent
= self
8362 for n
in n_closure_defs
do
8363 assert n
isa AClosureDef
8364 _n_closure_defs
.add
(n
)
8369 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8371 if _n_id
== old_child
then
8372 if new_child
!= null then
8373 new_child
.parent
= self
8374 assert new_child
isa TId
8381 if _n_args
== old_child
then
8382 if new_child
!= null then
8383 new_child
.parent
= self
8384 assert new_child
isa AExprs
8391 for i
in [0.._n_closure_defs
.length
[ do
8392 if _n_closure_defs
[i
] == old_child
then
8393 if new_child
!= null then
8394 assert new_child
isa AClosureDef
8395 _n_closure_defs
[i
] = new_child
8396 new_child
.parent
= self
8398 _n_closure_defs
.remove_at
(i
)
8405 redef fun n_id
=(node
)
8410 redef fun n_args
=(node
)
8417 redef fun visit_all
(v
: Visitor)
8419 v
.enter_visit
(_n_id
)
8420 v
.enter_visit
(_n_args
)
8421 for n
in _n_closure_defs
do
8426 redef class AVarExpr
8427 private init empty_init
do end
8429 init init_avarexpr
(
8434 _n_id
= n_id
.as(not null)
8438 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8440 if _n_id
== old_child
then
8441 if new_child
!= null then
8442 new_child
.parent
= self
8443 assert new_child
isa TId
8452 redef fun n_id
=(node
)
8459 redef fun visit_all
(v
: Visitor)
8461 v
.enter_visit
(_n_id
)
8464 redef class AVarAssignExpr
8465 private init empty_init
do end
8467 init init_avarassignexpr
(
8469 n_assign
: nullable TAssign,
8470 n_value
: nullable AExpr
8474 _n_id
= n_id
.as(not null)
8476 _n_assign
= n_assign
.as(not null)
8477 n_assign
.parent
= self
8478 _n_value
= n_value
.as(not null)
8479 n_value
.parent
= self
8482 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8484 if _n_id
== old_child
then
8485 if new_child
!= null then
8486 new_child
.parent
= self
8487 assert new_child
isa TId
8494 if _n_assign
== old_child
then
8495 if new_child
!= null then
8496 new_child
.parent
= self
8497 assert new_child
isa TAssign
8498 _n_assign
= new_child
8504 if _n_value
== old_child
then
8505 if new_child
!= null then
8506 new_child
.parent
= self
8507 assert new_child
isa AExpr
8508 _n_value
= new_child
8516 redef fun n_id
=(node
)
8521 redef fun n_assign
=(node
)
8526 redef fun n_value
=(node
)
8533 redef fun visit_all
(v
: Visitor)
8535 v
.enter_visit
(_n_id
)
8536 v
.enter_visit
(_n_assign
)
8537 v
.enter_visit
(_n_value
)
8540 redef class AVarReassignExpr
8541 private init empty_init
do end
8543 init init_avarreassignexpr
(
8545 n_assign_op
: nullable AAssignOp,
8546 n_value
: nullable AExpr
8550 _n_id
= n_id
.as(not null)
8552 _n_assign_op
= n_assign_op
.as(not null)
8553 n_assign_op
.parent
= self
8554 _n_value
= n_value
.as(not null)
8555 n_value
.parent
= self
8558 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8560 if _n_id
== old_child
then
8561 if new_child
!= null then
8562 new_child
.parent
= self
8563 assert new_child
isa TId
8570 if _n_assign_op
== old_child
then
8571 if new_child
!= null then
8572 new_child
.parent
= self
8573 assert new_child
isa AAssignOp
8574 _n_assign_op
= new_child
8580 if _n_value
== old_child
then
8581 if new_child
!= null then
8582 new_child
.parent
= self
8583 assert new_child
isa AExpr
8584 _n_value
= new_child
8592 redef fun n_id
=(node
)
8597 redef fun n_assign_op
=(node
)
8602 redef fun n_value
=(node
)
8609 redef fun visit_all
(v
: Visitor)
8611 v
.enter_visit
(_n_id
)
8612 v
.enter_visit
(_n_assign_op
)
8613 v
.enter_visit
(_n_value
)
8616 redef class ARangeExpr
8617 private init empty_init
do end
8619 init init_arangeexpr
(
8620 n_expr
: nullable AExpr,
8621 n_expr2
: nullable AExpr,
8622 n_annotations
: nullable AAnnotations
8626 _n_expr
= n_expr
.as(not null)
8627 n_expr
.parent
= self
8628 _n_expr2
= n_expr2
.as(not null)
8629 n_expr2
.parent
= self
8630 _n_annotations
= n_annotations
8631 if n_annotations
!= null then
8632 n_annotations
.parent
= self
8636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8638 if _n_expr
== old_child
then
8639 if new_child
!= null then
8640 new_child
.parent
= self
8641 assert new_child
isa AExpr
8648 if _n_expr2
== old_child
then
8649 if new_child
!= null then
8650 new_child
.parent
= self
8651 assert new_child
isa AExpr
8652 _n_expr2
= new_child
8658 if _n_annotations
== old_child
then
8659 if new_child
!= null then
8660 new_child
.parent
= self
8661 assert new_child
isa AAnnotations
8662 _n_annotations
= new_child
8664 _n_annotations
= null
8670 redef fun n_expr
=(node
)
8675 redef fun n_expr2
=(node
)
8680 redef fun n_annotations
=(node
)
8682 _n_annotations
= node
8683 if node
!= null then
8689 redef fun visit_all
(v
: Visitor)
8691 v
.enter_visit
(_n_expr
)
8692 v
.enter_visit
(_n_expr2
)
8693 if _n_annotations
!= null then
8694 v
.enter_visit
(_n_annotations
.as(not null))
8698 redef class ACrangeExpr
8699 private init empty_init
do end
8701 init init_acrangeexpr
(
8702 n_obra
: nullable TObra,
8703 n_expr
: nullable AExpr,
8704 n_expr2
: nullable AExpr,
8705 n_cbra
: nullable TCbra,
8706 n_annotations
: nullable AAnnotations
8710 _n_obra
= n_obra
.as(not null)
8711 n_obra
.parent
= self
8712 _n_expr
= n_expr
.as(not null)
8713 n_expr
.parent
= self
8714 _n_expr2
= n_expr2
.as(not null)
8715 n_expr2
.parent
= self
8716 _n_cbra
= n_cbra
.as(not null)
8717 n_cbra
.parent
= self
8718 _n_annotations
= n_annotations
8719 if n_annotations
!= null then
8720 n_annotations
.parent
= self
8724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8726 if _n_obra
== old_child
then
8727 if new_child
!= null then
8728 new_child
.parent
= self
8729 assert new_child
isa TObra
8736 if _n_expr
== old_child
then
8737 if new_child
!= null then
8738 new_child
.parent
= self
8739 assert new_child
isa AExpr
8746 if _n_expr2
== old_child
then
8747 if new_child
!= null then
8748 new_child
.parent
= self
8749 assert new_child
isa AExpr
8750 _n_expr2
= new_child
8756 if _n_cbra
== old_child
then
8757 if new_child
!= null then
8758 new_child
.parent
= self
8759 assert new_child
isa TCbra
8766 if _n_annotations
== old_child
then
8767 if new_child
!= null then
8768 new_child
.parent
= self
8769 assert new_child
isa AAnnotations
8770 _n_annotations
= new_child
8772 _n_annotations
= null
8778 redef fun n_obra
=(node
)
8783 redef fun n_expr
=(node
)
8788 redef fun n_expr2
=(node
)
8793 redef fun n_cbra
=(node
)
8798 redef fun n_annotations
=(node
)
8800 _n_annotations
= node
8801 if node
!= null then
8807 redef fun visit_all
(v
: Visitor)
8809 v
.enter_visit
(_n_obra
)
8810 v
.enter_visit
(_n_expr
)
8811 v
.enter_visit
(_n_expr2
)
8812 v
.enter_visit
(_n_cbra
)
8813 if _n_annotations
!= null then
8814 v
.enter_visit
(_n_annotations
.as(not null))
8818 redef class AOrangeExpr
8819 private init empty_init
do end
8821 init init_aorangeexpr
(
8822 n_obra
: nullable TObra,
8823 n_expr
: nullable AExpr,
8824 n_expr2
: nullable AExpr,
8825 n_cbra
: nullable TObra,
8826 n_annotations
: nullable AAnnotations
8830 _n_obra
= n_obra
.as(not null)
8831 n_obra
.parent
= self
8832 _n_expr
= n_expr
.as(not null)
8833 n_expr
.parent
= self
8834 _n_expr2
= n_expr2
.as(not null)
8835 n_expr2
.parent
= self
8836 _n_cbra
= n_cbra
.as(not null)
8837 n_cbra
.parent
= self
8838 _n_annotations
= n_annotations
8839 if n_annotations
!= null then
8840 n_annotations
.parent
= self
8844 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8846 if _n_obra
== old_child
then
8847 if new_child
!= null then
8848 new_child
.parent
= self
8849 assert new_child
isa TObra
8856 if _n_expr
== old_child
then
8857 if new_child
!= null then
8858 new_child
.parent
= self
8859 assert new_child
isa AExpr
8866 if _n_expr2
== old_child
then
8867 if new_child
!= null then
8868 new_child
.parent
= self
8869 assert new_child
isa AExpr
8870 _n_expr2
= new_child
8876 if _n_cbra
== old_child
then
8877 if new_child
!= null then
8878 new_child
.parent
= self
8879 assert new_child
isa TObra
8886 if _n_annotations
== old_child
then
8887 if new_child
!= null then
8888 new_child
.parent
= self
8889 assert new_child
isa AAnnotations
8890 _n_annotations
= new_child
8892 _n_annotations
= null
8898 redef fun n_obra
=(node
)
8903 redef fun n_expr
=(node
)
8908 redef fun n_expr2
=(node
)
8913 redef fun n_cbra
=(node
)
8918 redef fun n_annotations
=(node
)
8920 _n_annotations
= node
8921 if node
!= null then
8927 redef fun visit_all
(v
: Visitor)
8929 v
.enter_visit
(_n_obra
)
8930 v
.enter_visit
(_n_expr
)
8931 v
.enter_visit
(_n_expr2
)
8932 v
.enter_visit
(_n_cbra
)
8933 if _n_annotations
!= null then
8934 v
.enter_visit
(_n_annotations
.as(not null))
8938 redef class AArrayExpr
8939 private init empty_init
do end
8941 init init_aarrayexpr
(
8942 n_exprs
: nullable AExprs,
8943 n_annotations
: nullable AAnnotations
8947 _n_exprs
= n_exprs
.as(not null)
8948 n_exprs
.parent
= self
8949 _n_annotations
= n_annotations
8950 if n_annotations
!= null then
8951 n_annotations
.parent
= self
8955 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8957 if _n_exprs
== old_child
then
8958 if new_child
!= null then
8959 new_child
.parent
= self
8960 assert new_child
isa AExprs
8961 _n_exprs
= new_child
8967 if _n_annotations
== old_child
then
8968 if new_child
!= null then
8969 new_child
.parent
= self
8970 assert new_child
isa AAnnotations
8971 _n_annotations
= new_child
8973 _n_annotations
= null
8979 redef fun n_exprs
=(node
)
8984 redef fun n_annotations
=(node
)
8986 _n_annotations
= node
8987 if node
!= null then
8993 redef fun visit_all
(v
: Visitor)
8995 v
.enter_visit
(_n_exprs
)
8996 if _n_annotations
!= null then
8997 v
.enter_visit
(_n_annotations
.as(not null))
9001 redef class ASelfExpr
9002 private init empty_init
do end
9004 init init_aselfexpr
(
9005 n_kwself
: nullable TKwself,
9006 n_annotations
: nullable AAnnotations
9010 _n_kwself
= n_kwself
.as(not null)
9011 n_kwself
.parent
= self
9012 _n_annotations
= n_annotations
9013 if n_annotations
!= null then
9014 n_annotations
.parent
= self
9018 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9020 if _n_kwself
== old_child
then
9021 if new_child
!= null then
9022 new_child
.parent
= self
9023 assert new_child
isa TKwself
9024 _n_kwself
= new_child
9030 if _n_annotations
== old_child
then
9031 if new_child
!= null then
9032 new_child
.parent
= self
9033 assert new_child
isa AAnnotations
9034 _n_annotations
= new_child
9036 _n_annotations
= null
9042 redef fun n_kwself
=(node
)
9047 redef fun n_annotations
=(node
)
9049 _n_annotations
= node
9050 if node
!= null then
9056 redef fun visit_all
(v
: Visitor)
9058 v
.enter_visit
(_n_kwself
)
9059 if _n_annotations
!= null then
9060 v
.enter_visit
(_n_annotations
.as(not null))
9064 redef class AImplicitSelfExpr
9065 private init empty_init
do end
9067 init init_aimplicitselfexpr
9072 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9078 redef fun visit_all
(v
: Visitor)
9082 redef class ATrueExpr
9083 private init empty_init
do end
9085 init init_atrueexpr
(
9086 n_kwtrue
: nullable TKwtrue,
9087 n_annotations
: nullable AAnnotations
9091 _n_kwtrue
= n_kwtrue
.as(not null)
9092 n_kwtrue
.parent
= self
9093 _n_annotations
= n_annotations
9094 if n_annotations
!= null then
9095 n_annotations
.parent
= self
9099 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9101 if _n_kwtrue
== old_child
then
9102 if new_child
!= null then
9103 new_child
.parent
= self
9104 assert new_child
isa TKwtrue
9105 _n_kwtrue
= new_child
9111 if _n_annotations
== old_child
then
9112 if new_child
!= null then
9113 new_child
.parent
= self
9114 assert new_child
isa AAnnotations
9115 _n_annotations
= new_child
9117 _n_annotations
= null
9123 redef fun n_kwtrue
=(node
)
9128 redef fun n_annotations
=(node
)
9130 _n_annotations
= node
9131 if node
!= null then
9137 redef fun visit_all
(v
: Visitor)
9139 v
.enter_visit
(_n_kwtrue
)
9140 if _n_annotations
!= null then
9141 v
.enter_visit
(_n_annotations
.as(not null))
9145 redef class AFalseExpr
9146 private init empty_init
do end
9148 init init_afalseexpr
(
9149 n_kwfalse
: nullable TKwfalse,
9150 n_annotations
: nullable AAnnotations
9154 _n_kwfalse
= n_kwfalse
.as(not null)
9155 n_kwfalse
.parent
= self
9156 _n_annotations
= n_annotations
9157 if n_annotations
!= null then
9158 n_annotations
.parent
= self
9162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9164 if _n_kwfalse
== old_child
then
9165 if new_child
!= null then
9166 new_child
.parent
= self
9167 assert new_child
isa TKwfalse
9168 _n_kwfalse
= new_child
9174 if _n_annotations
== old_child
then
9175 if new_child
!= null then
9176 new_child
.parent
= self
9177 assert new_child
isa AAnnotations
9178 _n_annotations
= new_child
9180 _n_annotations
= null
9186 redef fun n_kwfalse
=(node
)
9191 redef fun n_annotations
=(node
)
9193 _n_annotations
= node
9194 if node
!= null then
9200 redef fun visit_all
(v
: Visitor)
9202 v
.enter_visit
(_n_kwfalse
)
9203 if _n_annotations
!= null then
9204 v
.enter_visit
(_n_annotations
.as(not null))
9208 redef class ANullExpr
9209 private init empty_init
do end
9211 init init_anullexpr
(
9212 n_kwnull
: nullable TKwnull,
9213 n_annotations
: nullable AAnnotations
9217 _n_kwnull
= n_kwnull
.as(not null)
9218 n_kwnull
.parent
= self
9219 _n_annotations
= n_annotations
9220 if n_annotations
!= null then
9221 n_annotations
.parent
= self
9225 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9227 if _n_kwnull
== old_child
then
9228 if new_child
!= null then
9229 new_child
.parent
= self
9230 assert new_child
isa TKwnull
9231 _n_kwnull
= new_child
9237 if _n_annotations
== old_child
then
9238 if new_child
!= null then
9239 new_child
.parent
= self
9240 assert new_child
isa AAnnotations
9241 _n_annotations
= new_child
9243 _n_annotations
= null
9249 redef fun n_kwnull
=(node
)
9254 redef fun n_annotations
=(node
)
9256 _n_annotations
= node
9257 if node
!= null then
9263 redef fun visit_all
(v
: Visitor)
9265 v
.enter_visit
(_n_kwnull
)
9266 if _n_annotations
!= null then
9267 v
.enter_visit
(_n_annotations
.as(not null))
9271 redef class AIntExpr
9272 private init empty_init
do end
9274 init init_aintexpr
(
9275 n_number
: nullable TNumber,
9276 n_annotations
: nullable AAnnotations
9280 _n_number
= n_number
.as(not null)
9281 n_number
.parent
= self
9282 _n_annotations
= n_annotations
9283 if n_annotations
!= null then
9284 n_annotations
.parent
= self
9288 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9290 if _n_number
== old_child
then
9291 if new_child
!= null then
9292 new_child
.parent
= self
9293 assert new_child
isa TNumber
9294 _n_number
= new_child
9300 if _n_annotations
== old_child
then
9301 if new_child
!= null then
9302 new_child
.parent
= self
9303 assert new_child
isa AAnnotations
9304 _n_annotations
= new_child
9306 _n_annotations
= null
9312 redef fun n_number
=(node
)
9317 redef fun n_annotations
=(node
)
9319 _n_annotations
= node
9320 if node
!= null then
9326 redef fun visit_all
(v
: Visitor)
9328 v
.enter_visit
(_n_number
)
9329 if _n_annotations
!= null then
9330 v
.enter_visit
(_n_annotations
.as(not null))
9334 redef class AFloatExpr
9335 private init empty_init
do end
9337 init init_afloatexpr
(
9338 n_float
: nullable TFloat,
9339 n_annotations
: nullable AAnnotations
9343 _n_float
= n_float
.as(not null)
9344 n_float
.parent
= self
9345 _n_annotations
= n_annotations
9346 if n_annotations
!= null then
9347 n_annotations
.parent
= self
9351 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9353 if _n_float
== old_child
then
9354 if new_child
!= null then
9355 new_child
.parent
= self
9356 assert new_child
isa TFloat
9357 _n_float
= new_child
9363 if _n_annotations
== old_child
then
9364 if new_child
!= null then
9365 new_child
.parent
= self
9366 assert new_child
isa AAnnotations
9367 _n_annotations
= new_child
9369 _n_annotations
= null
9375 redef fun n_float
=(node
)
9380 redef fun n_annotations
=(node
)
9382 _n_annotations
= node
9383 if node
!= null then
9389 redef fun visit_all
(v
: Visitor)
9391 v
.enter_visit
(_n_float
)
9392 if _n_annotations
!= null then
9393 v
.enter_visit
(_n_annotations
.as(not null))
9397 redef class ACharExpr
9398 private init empty_init
do end
9400 init init_acharexpr
(
9401 n_char
: nullable TChar,
9402 n_annotations
: nullable AAnnotations
9406 _n_char
= n_char
.as(not null)
9407 n_char
.parent
= self
9408 _n_annotations
= n_annotations
9409 if n_annotations
!= null then
9410 n_annotations
.parent
= self
9414 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9416 if _n_char
== old_child
then
9417 if new_child
!= null then
9418 new_child
.parent
= self
9419 assert new_child
isa TChar
9426 if _n_annotations
== old_child
then
9427 if new_child
!= null then
9428 new_child
.parent
= self
9429 assert new_child
isa AAnnotations
9430 _n_annotations
= new_child
9432 _n_annotations
= null
9438 redef fun n_char
=(node
)
9443 redef fun n_annotations
=(node
)
9445 _n_annotations
= node
9446 if node
!= null then
9452 redef fun visit_all
(v
: Visitor)
9454 v
.enter_visit
(_n_char
)
9455 if _n_annotations
!= null then
9456 v
.enter_visit
(_n_annotations
.as(not null))
9460 redef class AStringExpr
9461 private init empty_init
do end
9463 init init_astringexpr
(
9464 n_string
: nullable TString,
9465 n_annotations
: nullable AAnnotations
9469 _n_string
= n_string
.as(not null)
9470 n_string
.parent
= self
9471 _n_annotations
= n_annotations
9472 if n_annotations
!= null then
9473 n_annotations
.parent
= self
9477 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9479 if _n_string
== old_child
then
9480 if new_child
!= null then
9481 new_child
.parent
= self
9482 assert new_child
isa TString
9483 _n_string
= new_child
9489 if _n_annotations
== old_child
then
9490 if new_child
!= null then
9491 new_child
.parent
= self
9492 assert new_child
isa AAnnotations
9493 _n_annotations
= new_child
9495 _n_annotations
= null
9501 redef fun n_string
=(node
)
9506 redef fun n_annotations
=(node
)
9508 _n_annotations
= node
9509 if node
!= null then
9515 redef fun visit_all
(v
: Visitor)
9517 v
.enter_visit
(_n_string
)
9518 if _n_annotations
!= null then
9519 v
.enter_visit
(_n_annotations
.as(not null))
9523 redef class AStartStringExpr
9524 private init empty_init
do end
9526 init init_astartstringexpr
(
9527 n_string
: nullable TStartString
9531 _n_string
= n_string
.as(not null)
9532 n_string
.parent
= self
9535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9537 if _n_string
== old_child
then
9538 if new_child
!= null then
9539 new_child
.parent
= self
9540 assert new_child
isa TStartString
9541 _n_string
= new_child
9549 redef fun n_string
=(node
)
9556 redef fun visit_all
(v
: Visitor)
9558 v
.enter_visit
(_n_string
)
9561 redef class AMidStringExpr
9562 private init empty_init
do end
9564 init init_amidstringexpr
(
9565 n_string
: nullable TMidString
9569 _n_string
= n_string
.as(not null)
9570 n_string
.parent
= self
9573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9575 if _n_string
== old_child
then
9576 if new_child
!= null then
9577 new_child
.parent
= self
9578 assert new_child
isa TMidString
9579 _n_string
= new_child
9587 redef fun n_string
=(node
)
9594 redef fun visit_all
(v
: Visitor)
9596 v
.enter_visit
(_n_string
)
9599 redef class AEndStringExpr
9600 private init empty_init
do end
9602 init init_aendstringexpr
(
9603 n_string
: nullable TEndString
9607 _n_string
= n_string
.as(not null)
9608 n_string
.parent
= self
9611 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9613 if _n_string
== old_child
then
9614 if new_child
!= null then
9615 new_child
.parent
= self
9616 assert new_child
isa TEndString
9617 _n_string
= new_child
9625 redef fun n_string
=(node
)
9632 redef fun visit_all
(v
: Visitor)
9634 v
.enter_visit
(_n_string
)
9637 redef class ASuperstringExpr
9638 private init empty_init
do end
9640 init init_asuperstringexpr
(
9641 n_exprs
: Collection[Object], # Should be Collection[AExpr]
9642 n_annotations
: nullable AAnnotations
9651 _n_annotations
= n_annotations
9652 if n_annotations
!= null then
9653 n_annotations
.parent
= self
9657 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9659 for i
in [0.._n_exprs
.length
[ do
9660 if _n_exprs
[i
] == old_child
then
9661 if new_child
!= null then
9662 assert new_child
isa AExpr
9663 _n_exprs
[i
] = new_child
9664 new_child
.parent
= self
9666 _n_exprs
.remove_at
(i
)
9671 if _n_annotations
== old_child
then
9672 if new_child
!= null then
9673 new_child
.parent
= self
9674 assert new_child
isa AAnnotations
9675 _n_annotations
= new_child
9677 _n_annotations
= null
9683 redef fun n_annotations
=(node
)
9685 _n_annotations
= node
9686 if node
!= null then
9692 redef fun visit_all
(v
: Visitor)
9694 for n
in _n_exprs
do
9697 if _n_annotations
!= null then
9698 v
.enter_visit
(_n_annotations
.as(not null))
9702 redef class AParExpr
9703 private init empty_init
do end
9705 init init_aparexpr
(
9706 n_opar
: nullable TOpar,
9707 n_expr
: nullable AExpr,
9708 n_cpar
: nullable TCpar,
9709 n_annotations
: nullable AAnnotations
9713 _n_opar
= n_opar
.as(not null)
9714 n_opar
.parent
= self
9715 _n_expr
= n_expr
.as(not null)
9716 n_expr
.parent
= self
9717 _n_cpar
= n_cpar
.as(not null)
9718 n_cpar
.parent
= self
9719 _n_annotations
= n_annotations
9720 if n_annotations
!= null then
9721 n_annotations
.parent
= self
9725 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9727 if _n_opar
== old_child
then
9728 if new_child
!= null then
9729 new_child
.parent
= self
9730 assert new_child
isa TOpar
9737 if _n_expr
== old_child
then
9738 if new_child
!= null then
9739 new_child
.parent
= self
9740 assert new_child
isa AExpr
9747 if _n_cpar
== old_child
then
9748 if new_child
!= null then
9749 new_child
.parent
= self
9750 assert new_child
isa TCpar
9757 if _n_annotations
== old_child
then
9758 if new_child
!= null then
9759 new_child
.parent
= self
9760 assert new_child
isa AAnnotations
9761 _n_annotations
= new_child
9763 _n_annotations
= null
9769 redef fun n_opar
=(node
)
9774 redef fun n_expr
=(node
)
9779 redef fun n_cpar
=(node
)
9784 redef fun n_annotations
=(node
)
9786 _n_annotations
= node
9787 if node
!= null then
9793 redef fun visit_all
(v
: Visitor)
9795 v
.enter_visit
(_n_opar
)
9796 v
.enter_visit
(_n_expr
)
9797 v
.enter_visit
(_n_cpar
)
9798 if _n_annotations
!= null then
9799 v
.enter_visit
(_n_annotations
.as(not null))
9803 redef class AAsCastExpr
9804 private init empty_init
do end
9806 init init_aascastexpr
(
9807 n_expr
: nullable AExpr,
9808 n_kwas
: nullable TKwas,
9809 n_opar
: nullable TOpar,
9810 n_type
: nullable AType,
9811 n_cpar
: nullable TCpar
9815 _n_expr
= n_expr
.as(not null)
9816 n_expr
.parent
= self
9817 _n_kwas
= n_kwas
.as(not null)
9818 n_kwas
.parent
= self
9819 _n_opar
= n_opar
.as(not null)
9820 n_opar
.parent
= self
9821 _n_type
= n_type
.as(not null)
9822 n_type
.parent
= self
9823 _n_cpar
= n_cpar
.as(not null)
9824 n_cpar
.parent
= self
9827 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9829 if _n_expr
== old_child
then
9830 if new_child
!= null then
9831 new_child
.parent
= self
9832 assert new_child
isa AExpr
9839 if _n_kwas
== old_child
then
9840 if new_child
!= null then
9841 new_child
.parent
= self
9842 assert new_child
isa TKwas
9849 if _n_opar
== old_child
then
9850 if new_child
!= null then
9851 new_child
.parent
= self
9852 assert new_child
isa TOpar
9859 if _n_type
== old_child
then
9860 if new_child
!= null then
9861 new_child
.parent
= self
9862 assert new_child
isa AType
9869 if _n_cpar
== old_child
then
9870 if new_child
!= null then
9871 new_child
.parent
= self
9872 assert new_child
isa TCpar
9881 redef fun n_expr
=(node
)
9886 redef fun n_kwas
=(node
)
9891 redef fun n_opar
=(node
)
9896 redef fun n_type
=(node
)
9901 redef fun n_cpar
=(node
)
9908 redef fun visit_all
(v
: Visitor)
9910 v
.enter_visit
(_n_expr
)
9911 v
.enter_visit
(_n_kwas
)
9912 v
.enter_visit
(_n_opar
)
9913 v
.enter_visit
(_n_type
)
9914 v
.enter_visit
(_n_cpar
)
9917 redef class AAsNotnullExpr
9918 private init empty_init
do end
9920 init init_aasnotnullexpr
(
9921 n_expr
: nullable AExpr,
9922 n_kwas
: nullable TKwas,
9923 n_opar
: nullable TOpar,
9924 n_kwnot
: nullable TKwnot,
9925 n_kwnull
: nullable TKwnull,
9926 n_cpar
: nullable TCpar
9930 _n_expr
= n_expr
.as(not null)
9931 n_expr
.parent
= self
9932 _n_kwas
= n_kwas
.as(not null)
9933 n_kwas
.parent
= self
9934 _n_opar
= n_opar
.as(not null)
9935 n_opar
.parent
= self
9936 _n_kwnot
= n_kwnot
.as(not null)
9937 n_kwnot
.parent
= self
9938 _n_kwnull
= n_kwnull
.as(not null)
9939 n_kwnull
.parent
= self
9940 _n_cpar
= n_cpar
.as(not null)
9941 n_cpar
.parent
= self
9944 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9946 if _n_expr
== old_child
then
9947 if new_child
!= null then
9948 new_child
.parent
= self
9949 assert new_child
isa AExpr
9956 if _n_kwas
== old_child
then
9957 if new_child
!= null then
9958 new_child
.parent
= self
9959 assert new_child
isa TKwas
9966 if _n_opar
== old_child
then
9967 if new_child
!= null then
9968 new_child
.parent
= self
9969 assert new_child
isa TOpar
9976 if _n_kwnot
== old_child
then
9977 if new_child
!= null then
9978 new_child
.parent
= self
9979 assert new_child
isa TKwnot
9980 _n_kwnot
= new_child
9986 if _n_kwnull
== old_child
then
9987 if new_child
!= null then
9988 new_child
.parent
= self
9989 assert new_child
isa TKwnull
9990 _n_kwnull
= new_child
9996 if _n_cpar
== old_child
then
9997 if new_child
!= null then
9998 new_child
.parent
= self
9999 assert new_child
isa TCpar
10000 _n_cpar
= new_child
10008 redef fun n_expr
=(node
)
10013 redef fun n_kwas
=(node
)
10018 redef fun n_opar
=(node
)
10023 redef fun n_kwnot
=(node
)
10028 redef fun n_kwnull
=(node
)
10033 redef fun n_cpar
=(node
)
10040 redef fun visit_all
(v
: Visitor)
10042 v
.enter_visit
(_n_expr
)
10043 v
.enter_visit
(_n_kwas
)
10044 v
.enter_visit
(_n_opar
)
10045 v
.enter_visit
(_n_kwnot
)
10046 v
.enter_visit
(_n_kwnull
)
10047 v
.enter_visit
(_n_cpar
)
10050 redef class AIssetAttrExpr
10051 private init empty_init
do end
10053 init init_aissetattrexpr
(
10054 n_kwisset
: nullable TKwisset,
10055 n_expr
: nullable AExpr,
10056 n_id
: nullable TAttrid
10060 _n_kwisset
= n_kwisset
.as(not null)
10061 n_kwisset
.parent
= self
10062 _n_expr
= n_expr
.as(not null)
10063 n_expr
.parent
= self
10064 _n_id
= n_id
.as(not null)
10068 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10070 if _n_kwisset
== old_child
then
10071 if new_child
!= null then
10072 new_child
.parent
= self
10073 assert new_child
isa TKwisset
10074 _n_kwisset
= new_child
10080 if _n_expr
== old_child
then
10081 if new_child
!= null then
10082 new_child
.parent
= self
10083 assert new_child
isa AExpr
10084 _n_expr
= new_child
10090 if _n_id
== old_child
then
10091 if new_child
!= null then
10092 new_child
.parent
= self
10093 assert new_child
isa TAttrid
10102 redef fun n_kwisset
=(node
)
10107 redef fun n_expr
=(node
)
10112 redef fun n_id
=(node
)
10119 redef fun visit_all
(v
: Visitor)
10121 v
.enter_visit
(_n_kwisset
)
10122 v
.enter_visit
(_n_expr
)
10123 v
.enter_visit
(_n_id
)
10126 redef class ADebugTypeExpr
10127 private init empty_init
do end
10129 init init_adebugtypeexpr
(
10130 n_kwdebug
: nullable TKwdebug,
10131 n_kwtype
: nullable TKwtype,
10132 n_expr
: nullable AExpr,
10133 n_type
: nullable AType
10137 _n_kwdebug
= n_kwdebug
.as(not null)
10138 n_kwdebug
.parent
= self
10139 _n_kwtype
= n_kwtype
.as(not null)
10140 n_kwtype
.parent
= self
10141 _n_expr
= n_expr
.as(not null)
10142 n_expr
.parent
= self
10143 _n_type
= n_type
.as(not null)
10144 n_type
.parent
= self
10147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10149 if _n_kwdebug
== old_child
then
10150 if new_child
!= null then
10151 new_child
.parent
= self
10152 assert new_child
isa TKwdebug
10153 _n_kwdebug
= new_child
10159 if _n_kwtype
== old_child
then
10160 if new_child
!= null then
10161 new_child
.parent
= self
10162 assert new_child
isa TKwtype
10163 _n_kwtype
= new_child
10169 if _n_expr
== old_child
then
10170 if new_child
!= null then
10171 new_child
.parent
= self
10172 assert new_child
isa AExpr
10173 _n_expr
= new_child
10179 if _n_type
== old_child
then
10180 if new_child
!= null then
10181 new_child
.parent
= self
10182 assert new_child
isa AType
10183 _n_type
= new_child
10191 redef fun n_kwdebug
=(node
)
10196 redef fun n_kwtype
=(node
)
10201 redef fun n_expr
=(node
)
10206 redef fun n_type
=(node
)
10213 redef fun visit_all
(v
: Visitor)
10215 v
.enter_visit
(_n_kwdebug
)
10216 v
.enter_visit
(_n_kwtype
)
10217 v
.enter_visit
(_n_expr
)
10218 v
.enter_visit
(_n_type
)
10221 redef class AListExprs
10222 private init empty_init
do end
10224 init init_alistexprs
(
10225 n_exprs
: Collection[Object] # Should be Collection[AExpr]
10229 for n
in n_exprs
do
10236 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10238 for i
in [0.._n_exprs
.length
[ do
10239 if _n_exprs
[i
] == old_child
then
10240 if new_child
!= null then
10241 assert new_child
isa AExpr
10242 _n_exprs
[i
] = new_child
10243 new_child
.parent
= self
10245 _n_exprs
.remove_at
(i
)
10254 redef fun visit_all
(v
: Visitor)
10256 for n
in _n_exprs
do
10261 redef class AParExprs
10262 private init empty_init
do end
10264 init init_aparexprs
(
10265 n_opar
: nullable TOpar,
10266 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10267 n_cpar
: nullable TCpar
10271 _n_opar
= n_opar
.as(not null)
10272 n_opar
.parent
= self
10273 for n
in n_exprs
do
10278 _n_cpar
= n_cpar
.as(not null)
10279 n_cpar
.parent
= self
10282 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10284 if _n_opar
== old_child
then
10285 if new_child
!= null then
10286 new_child
.parent
= self
10287 assert new_child
isa TOpar
10288 _n_opar
= new_child
10294 for i
in [0.._n_exprs
.length
[ do
10295 if _n_exprs
[i
] == old_child
then
10296 if new_child
!= null then
10297 assert new_child
isa AExpr
10298 _n_exprs
[i
] = new_child
10299 new_child
.parent
= self
10301 _n_exprs
.remove_at
(i
)
10306 if _n_cpar
== old_child
then
10307 if new_child
!= null then
10308 new_child
.parent
= self
10309 assert new_child
isa TCpar
10310 _n_cpar
= new_child
10318 redef fun n_opar
=(node
)
10323 redef fun n_cpar
=(node
)
10330 redef fun visit_all
(v
: Visitor)
10332 v
.enter_visit
(_n_opar
)
10333 for n
in _n_exprs
do
10336 v
.enter_visit
(_n_cpar
)
10339 redef class ABraExprs
10340 private init empty_init
do end
10342 init init_abraexprs
(
10343 n_obra
: nullable TObra,
10344 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10345 n_cbra
: nullable TCbra
10349 _n_obra
= n_obra
.as(not null)
10350 n_obra
.parent
= self
10351 for n
in n_exprs
do
10356 _n_cbra
= n_cbra
.as(not null)
10357 n_cbra
.parent
= self
10360 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10362 if _n_obra
== old_child
then
10363 if new_child
!= null then
10364 new_child
.parent
= self
10365 assert new_child
isa TObra
10366 _n_obra
= new_child
10372 for i
in [0.._n_exprs
.length
[ do
10373 if _n_exprs
[i
] == old_child
then
10374 if new_child
!= null then
10375 assert new_child
isa AExpr
10376 _n_exprs
[i
] = new_child
10377 new_child
.parent
= self
10379 _n_exprs
.remove_at
(i
)
10384 if _n_cbra
== old_child
then
10385 if new_child
!= null then
10386 new_child
.parent
= self
10387 assert new_child
isa TCbra
10388 _n_cbra
= new_child
10396 redef fun n_obra
=(node
)
10401 redef fun n_cbra
=(node
)
10408 redef fun visit_all
(v
: Visitor)
10410 v
.enter_visit
(_n_obra
)
10411 for n
in _n_exprs
do
10414 v
.enter_visit
(_n_cbra
)
10417 redef class APlusAssignOp
10418 private init empty_init
do end
10420 init init_aplusassignop
(
10421 n_pluseq
: nullable TPluseq
10425 _n_pluseq
= n_pluseq
.as(not null)
10426 n_pluseq
.parent
= self
10429 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10431 if _n_pluseq
== old_child
then
10432 if new_child
!= null then
10433 new_child
.parent
= self
10434 assert new_child
isa TPluseq
10435 _n_pluseq
= new_child
10443 redef fun n_pluseq
=(node
)
10450 redef fun visit_all
(v
: Visitor)
10452 v
.enter_visit
(_n_pluseq
)
10455 redef class AMinusAssignOp
10456 private init empty_init
do end
10458 init init_aminusassignop
(
10459 n_minuseq
: nullable TMinuseq
10463 _n_minuseq
= n_minuseq
.as(not null)
10464 n_minuseq
.parent
= self
10467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10469 if _n_minuseq
== old_child
then
10470 if new_child
!= null then
10471 new_child
.parent
= self
10472 assert new_child
isa TMinuseq
10473 _n_minuseq
= new_child
10481 redef fun n_minuseq
=(node
)
10488 redef fun visit_all
(v
: Visitor)
10490 v
.enter_visit
(_n_minuseq
)
10493 redef class AClosureDef
10494 private init empty_init
do end
10496 init init_aclosuredef
(
10497 n_bang
: nullable TBang,
10498 n_id
: nullable AClosureId,
10499 n_ids
: Collection[Object], # Should be Collection[TId]
10500 n_kwdo
: nullable TKwdo,
10501 n_expr
: nullable AExpr,
10502 n_label
: nullable ALabel
10506 _n_bang
= n_bang
.as(not null)
10507 n_bang
.parent
= self
10508 _n_id
= n_id
.as(not null)
10516 if n_kwdo
!= null then
10517 n_kwdo
.parent
= self
10520 if n_expr
!= null then
10521 n_expr
.parent
= self
10524 if n_label
!= null then
10525 n_label
.parent
= self
10529 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10531 if _n_bang
== old_child
then
10532 if new_child
!= null then
10533 new_child
.parent
= self
10534 assert new_child
isa TBang
10535 _n_bang
= new_child
10541 if _n_id
== old_child
then
10542 if new_child
!= null then
10543 new_child
.parent
= self
10544 assert new_child
isa AClosureId
10551 for i
in [0.._n_ids
.length
[ do
10552 if _n_ids
[i
] == old_child
then
10553 if new_child
!= null then
10554 assert new_child
isa TId
10555 _n_ids
[i
] = new_child
10556 new_child
.parent
= self
10558 _n_ids
.remove_at
(i
)
10563 if _n_kwdo
== old_child
then
10564 if new_child
!= null then
10565 new_child
.parent
= self
10566 assert new_child
isa TKwdo
10567 _n_kwdo
= new_child
10573 if _n_expr
== old_child
then
10574 if new_child
!= null then
10575 new_child
.parent
= self
10576 assert new_child
isa AExpr
10577 _n_expr
= new_child
10583 if _n_label
== old_child
then
10584 if new_child
!= null then
10585 new_child
.parent
= self
10586 assert new_child
isa ALabel
10587 _n_label
= new_child
10595 redef fun n_bang
=(node
)
10600 redef fun n_id
=(node
)
10605 redef fun n_kwdo
=(node
)
10608 if node
!= null then
10612 redef fun n_expr
=(node
)
10615 if node
!= null then
10619 redef fun n_label
=(node
)
10622 if node
!= null then
10628 redef fun visit_all
(v
: Visitor)
10630 v
.enter_visit
(_n_bang
)
10631 v
.enter_visit
(_n_id
)
10635 if _n_kwdo
!= null then
10636 v
.enter_visit
(_n_kwdo
.as(not null))
10638 if _n_expr
!= null then
10639 v
.enter_visit
(_n_expr
.as(not null))
10641 if _n_label
!= null then
10642 v
.enter_visit
(_n_label
.as(not null))
10646 redef class ASimpleClosureId
10647 private init empty_init
do end
10649 init init_asimpleclosureid
(
10654 _n_id
= n_id
.as(not null)
10658 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10660 if _n_id
== old_child
then
10661 if new_child
!= null then
10662 new_child
.parent
= self
10663 assert new_child
isa TId
10672 redef fun n_id
=(node
)
10679 redef fun visit_all
(v
: Visitor)
10681 v
.enter_visit
(_n_id
)
10684 redef class ABreakClosureId
10685 private init empty_init
do end
10687 init init_abreakclosureid
(
10688 n_kwbreak
: nullable TKwbreak
10692 _n_kwbreak
= n_kwbreak
.as(not null)
10693 n_kwbreak
.parent
= self
10696 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10698 if _n_kwbreak
== old_child
then
10699 if new_child
!= null then
10700 new_child
.parent
= self
10701 assert new_child
isa TKwbreak
10702 _n_kwbreak
= new_child
10710 redef fun n_kwbreak
=(node
)
10717 redef fun visit_all
(v
: Visitor)
10719 v
.enter_visit
(_n_kwbreak
)
10722 redef class AModuleName
10723 private init empty_init
do end
10725 init init_amodulename
(
10726 n_quad
: nullable TQuad,
10727 n_path
: Collection[Object], # Should be Collection[TId]
10733 if n_quad
!= null then
10734 n_quad
.parent
= self
10741 _n_id
= n_id
.as(not null)
10745 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10747 if _n_quad
== old_child
then
10748 if new_child
!= null then
10749 new_child
.parent
= self
10750 assert new_child
isa TQuad
10751 _n_quad
= new_child
10757 for i
in [0.._n_path
.length
[ do
10758 if _n_path
[i
] == old_child
then
10759 if new_child
!= null then
10760 assert new_child
isa TId
10761 _n_path
[i
] = new_child
10762 new_child
.parent
= self
10764 _n_path
.remove_at
(i
)
10769 if _n_id
== old_child
then
10770 if new_child
!= null then
10771 new_child
.parent
= self
10772 assert new_child
isa TId
10781 redef fun n_quad
=(node
)
10784 if node
!= null then
10788 redef fun n_id
=(node
)
10795 redef fun visit_all
(v
: Visitor)
10797 if _n_quad
!= null then
10798 v
.enter_visit
(_n_quad
.as(not null))
10800 for n
in _n_path
do
10803 v
.enter_visit
(_n_id
)
10806 redef class AExternCalls
10807 private init empty_init
do end
10809 init init_aexterncalls
(
10810 n_kwimport
: nullable TKwimport,
10811 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
10815 _n_kwimport
= n_kwimport
.as(not null)
10816 n_kwimport
.parent
= self
10817 for n
in n_extern_calls
do
10818 assert n
isa AExternCall
10819 _n_extern_calls
.add
(n
)
10824 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10826 if _n_kwimport
== old_child
then
10827 if new_child
!= null then
10828 new_child
.parent
= self
10829 assert new_child
isa TKwimport
10830 _n_kwimport
= new_child
10836 for i
in [0.._n_extern_calls
.length
[ do
10837 if _n_extern_calls
[i
] == old_child
then
10838 if new_child
!= null then
10839 assert new_child
isa AExternCall
10840 _n_extern_calls
[i
] = new_child
10841 new_child
.parent
= self
10843 _n_extern_calls
.remove_at
(i
)
10850 redef fun n_kwimport
=(node
)
10857 redef fun visit_all
(v
: Visitor)
10859 v
.enter_visit
(_n_kwimport
)
10860 for n
in _n_extern_calls
do
10865 redef class AExternCall
10866 private init empty_init
do end
10868 init init_aexterncall
10873 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10879 redef fun visit_all
(v
: Visitor)
10883 redef class ASuperExternCall
10884 private init empty_init
do end
10886 init init_asuperexterncall
(
10887 n_kwsuper
: nullable TKwsuper
10891 _n_kwsuper
= n_kwsuper
.as(not null)
10892 n_kwsuper
.parent
= self
10895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10897 if _n_kwsuper
== old_child
then
10898 if new_child
!= null then
10899 new_child
.parent
= self
10900 assert new_child
isa TKwsuper
10901 _n_kwsuper
= new_child
10909 redef fun n_kwsuper
=(node
)
10916 redef fun visit_all
(v
: Visitor)
10918 v
.enter_visit
(_n_kwsuper
)
10921 redef class ALocalPropExternCall
10922 private init empty_init
do end
10924 init init_alocalpropexterncall
(
10925 n_methid
: nullable AMethid
10929 _n_methid
= n_methid
.as(not null)
10930 n_methid
.parent
= self
10933 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10935 if _n_methid
== old_child
then
10936 if new_child
!= null then
10937 new_child
.parent
= self
10938 assert new_child
isa AMethid
10939 _n_methid
= new_child
10947 redef fun n_methid
=(node
)
10954 redef fun visit_all
(v
: Visitor)
10956 v
.enter_visit
(_n_methid
)
10959 redef class AFullPropExternCall
10960 private init empty_init
do end
10962 init init_afullpropexterncall
(
10963 n_classid
: nullable TClassid,
10964 n_quad
: nullable TQuad,
10965 n_methid
: nullable AMethid
10969 _n_classid
= n_classid
.as(not null)
10970 n_classid
.parent
= self
10972 if n_quad
!= null then
10973 n_quad
.parent
= self
10975 _n_methid
= n_methid
.as(not null)
10976 n_methid
.parent
= self
10979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10981 if _n_classid
== old_child
then
10982 if new_child
!= null then
10983 new_child
.parent
= self
10984 assert new_child
isa TClassid
10985 _n_classid
= new_child
10991 if _n_quad
== old_child
then
10992 if new_child
!= null then
10993 new_child
.parent
= self
10994 assert new_child
isa TQuad
10995 _n_quad
= new_child
11001 if _n_methid
== old_child
then
11002 if new_child
!= null then
11003 new_child
.parent
= self
11004 assert new_child
isa AMethid
11005 _n_methid
= new_child
11013 redef fun n_classid
=(node
)
11018 redef fun n_quad
=(node
)
11021 if node
!= null then
11025 redef fun n_methid
=(node
)
11032 redef fun visit_all
(v
: Visitor)
11034 v
.enter_visit
(_n_classid
)
11035 if _n_quad
!= null then
11036 v
.enter_visit
(_n_quad
.as(not null))
11038 v
.enter_visit
(_n_methid
)
11041 redef class AInitPropExternCall
11042 private init empty_init
do end
11044 init init_ainitpropexterncall
(
11045 n_classid
: nullable TClassid
11049 _n_classid
= n_classid
.as(not null)
11050 n_classid
.parent
= self
11053 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11055 if _n_classid
== old_child
then
11056 if new_child
!= null then
11057 new_child
.parent
= self
11058 assert new_child
isa TClassid
11059 _n_classid
= new_child
11067 redef fun n_classid
=(node
)
11074 redef fun visit_all
(v
: Visitor)
11076 v
.enter_visit
(_n_classid
)
11079 redef class ACastAsExternCall
11080 private init empty_init
do end
11082 init init_acastasexterncall
(
11083 n_from_type
: nullable AType,
11084 n_kwas
: nullable TKwas,
11085 n_to_type
: nullable AType
11089 _n_from_type
= n_from_type
.as(not null)
11090 n_from_type
.parent
= self
11091 _n_kwas
= n_kwas
.as(not null)
11092 n_kwas
.parent
= self
11093 _n_to_type
= n_to_type
.as(not null)
11094 n_to_type
.parent
= self
11097 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11099 if _n_from_type
== old_child
then
11100 if new_child
!= null then
11101 new_child
.parent
= self
11102 assert new_child
isa AType
11103 _n_from_type
= new_child
11109 if _n_kwas
== old_child
then
11110 if new_child
!= null then
11111 new_child
.parent
= self
11112 assert new_child
isa TKwas
11113 _n_kwas
= new_child
11119 if _n_to_type
== old_child
then
11120 if new_child
!= null then
11121 new_child
.parent
= self
11122 assert new_child
isa AType
11123 _n_to_type
= new_child
11131 redef fun n_from_type
=(node
)
11133 _n_from_type
= node
11136 redef fun n_kwas
=(node
)
11141 redef fun n_to_type
=(node
)
11148 redef fun visit_all
(v
: Visitor)
11150 v
.enter_visit
(_n_from_type
)
11151 v
.enter_visit
(_n_kwas
)
11152 v
.enter_visit
(_n_to_type
)
11155 redef class AAsNullableExternCall
11156 private init empty_init
do end
11158 init init_aasnullableexterncall
(
11159 n_type
: nullable AType,
11160 n_kwas
: nullable TKwas,
11161 n_kwnullable
: nullable TKwnullable
11165 _n_type
= n_type
.as(not null)
11166 n_type
.parent
= self
11167 _n_kwas
= n_kwas
.as(not null)
11168 n_kwas
.parent
= self
11169 _n_kwnullable
= n_kwnullable
.as(not null)
11170 n_kwnullable
.parent
= self
11173 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11175 if _n_type
== old_child
then
11176 if new_child
!= null then
11177 new_child
.parent
= self
11178 assert new_child
isa AType
11179 _n_type
= new_child
11185 if _n_kwas
== old_child
then
11186 if new_child
!= null then
11187 new_child
.parent
= self
11188 assert new_child
isa TKwas
11189 _n_kwas
= new_child
11195 if _n_kwnullable
== old_child
then
11196 if new_child
!= null then
11197 new_child
.parent
= self
11198 assert new_child
isa TKwnullable
11199 _n_kwnullable
= new_child
11207 redef fun n_type
=(node
)
11212 redef fun n_kwas
=(node
)
11217 redef fun n_kwnullable
=(node
)
11219 _n_kwnullable
= node
11224 redef fun visit_all
(v
: Visitor)
11226 v
.enter_visit
(_n_type
)
11227 v
.enter_visit
(_n_kwas
)
11228 v
.enter_visit
(_n_kwnullable
)
11231 redef class AAsNotNullableExternCall
11232 private init empty_init
do end
11234 init init_aasnotnullableexterncall
(
11235 n_type
: nullable AType,
11236 n_kwas
: nullable TKwas,
11237 n_kwnot
: nullable TKwnot,
11238 n_kwnullable
: nullable TKwnullable
11242 _n_type
= n_type
.as(not null)
11243 n_type
.parent
= self
11244 _n_kwas
= n_kwas
.as(not null)
11245 n_kwas
.parent
= self
11246 _n_kwnot
= n_kwnot
.as(not null)
11247 n_kwnot
.parent
= self
11248 _n_kwnullable
= n_kwnullable
.as(not null)
11249 n_kwnullable
.parent
= self
11252 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11254 if _n_type
== old_child
then
11255 if new_child
!= null then
11256 new_child
.parent
= self
11257 assert new_child
isa AType
11258 _n_type
= new_child
11264 if _n_kwas
== old_child
then
11265 if new_child
!= null then
11266 new_child
.parent
= self
11267 assert new_child
isa TKwas
11268 _n_kwas
= new_child
11274 if _n_kwnot
== old_child
then
11275 if new_child
!= null then
11276 new_child
.parent
= self
11277 assert new_child
isa TKwnot
11278 _n_kwnot
= new_child
11284 if _n_kwnullable
== old_child
then
11285 if new_child
!= null then
11286 new_child
.parent
= self
11287 assert new_child
isa TKwnullable
11288 _n_kwnullable
= new_child
11296 redef fun n_type
=(node
)
11301 redef fun n_kwas
=(node
)
11306 redef fun n_kwnot
=(node
)
11311 redef fun n_kwnullable
=(node
)
11313 _n_kwnullable
= node
11318 redef fun visit_all
(v
: Visitor)
11320 v
.enter_visit
(_n_type
)
11321 v
.enter_visit
(_n_kwas
)
11322 v
.enter_visit
(_n_kwnot
)
11323 v
.enter_visit
(_n_kwnullable
)
11326 redef class AInLanguage
11327 private init empty_init
do end
11329 init init_ainlanguage
(
11330 n_kwin
: nullable TKwin,
11331 n_string
: nullable TString
11335 _n_kwin
= n_kwin
.as(not null)
11336 n_kwin
.parent
= self
11337 _n_string
= n_string
.as(not null)
11338 n_string
.parent
= self
11341 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11343 if _n_kwin
== old_child
then
11344 if new_child
!= null then
11345 new_child
.parent
= self
11346 assert new_child
isa TKwin
11347 _n_kwin
= new_child
11353 if _n_string
== old_child
then
11354 if new_child
!= null then
11355 new_child
.parent
= self
11356 assert new_child
isa TString
11357 _n_string
= new_child
11365 redef fun n_kwin
=(node
)
11370 redef fun n_string
=(node
)
11377 redef fun visit_all
(v
: Visitor)
11379 v
.enter_visit
(_n_kwin
)
11380 v
.enter_visit
(_n_string
)
11383 redef class AExternCodeBlock
11384 private init empty_init
do end
11386 init init_aexterncodeblock
(
11387 n_in_language
: nullable AInLanguage,
11388 n_extern_code_segment
: nullable TExternCodeSegment
11392 _n_in_language
= n_in_language
11393 if n_in_language
!= null then
11394 n_in_language
.parent
= self
11396 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
11397 n_extern_code_segment
.parent
= self
11400 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11402 if _n_in_language
== old_child
then
11403 if new_child
!= null then
11404 new_child
.parent
= self
11405 assert new_child
isa AInLanguage
11406 _n_in_language
= new_child
11408 _n_in_language
= null
11412 if _n_extern_code_segment
== old_child
then
11413 if new_child
!= null then
11414 new_child
.parent
= self
11415 assert new_child
isa TExternCodeSegment
11416 _n_extern_code_segment
= new_child
11424 redef fun n_in_language
=(node
)
11426 _n_in_language
= node
11427 if node
!= null then
11431 redef fun n_extern_code_segment
=(node
)
11433 _n_extern_code_segment
= node
11438 redef fun visit_all
(v
: Visitor)
11440 if _n_in_language
!= null then
11441 v
.enter_visit
(_n_in_language
.as(not null))
11443 v
.enter_visit
(_n_extern_code_segment
)
11446 redef class AQualified
11447 private init empty_init
do end
11449 init init_aqualified
(
11450 n_id
: Collection[Object], # Should be Collection[TId]
11451 n_classid
: nullable TClassid
11460 _n_classid
= n_classid
11461 if n_classid
!= null then
11462 n_classid
.parent
= self
11466 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11468 for i
in [0.._n_id
.length
[ do
11469 if _n_id
[i
] == old_child
then
11470 if new_child
!= null then
11471 assert new_child
isa TId
11472 _n_id
[i
] = new_child
11473 new_child
.parent
= self
11480 if _n_classid
== old_child
then
11481 if new_child
!= null then
11482 new_child
.parent
= self
11483 assert new_child
isa TClassid
11484 _n_classid
= new_child
11492 redef fun n_classid
=(node
)
11495 if node
!= null then
11501 redef fun visit_all
(v
: Visitor)
11506 if _n_classid
!= null then
11507 v
.enter_visit
(_n_classid
.as(not null))
11512 private init empty_init
do end
11515 n_comment
: Collection[Object] # Should be Collection[TComment]
11519 for n
in n_comment
do
11520 assert n
isa TComment
11526 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11528 for i
in [0.._n_comment
.length
[ do
11529 if _n_comment
[i
] == old_child
then
11530 if new_child
!= null then
11531 assert new_child
isa TComment
11532 _n_comment
[i
] = new_child
11533 new_child
.parent
= self
11535 _n_comment
.remove_at
(i
)
11544 redef fun visit_all
(v
: Visitor)
11546 for n
in _n_comment
do
11551 redef class AAnnotations
11552 private init empty_init
do end
11554 init init_aannotations
(
11555 n_at
: nullable TAt,
11556 n_opar
: nullable TOpar,
11557 n_items
: Collection[Object], # Should be Collection[AAnnotation]
11558 n_cpar
: nullable TCpar
11563 if n_at
!= null then
11567 if n_opar
!= null then
11568 n_opar
.parent
= self
11570 for n
in n_items
do
11571 assert n
isa AAnnotation
11576 if n_cpar
!= null then
11577 n_cpar
.parent
= self
11581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11583 if _n_at
== old_child
then
11584 if new_child
!= null then
11585 new_child
.parent
= self
11586 assert new_child
isa TAt
11593 if _n_opar
== old_child
then
11594 if new_child
!= null then
11595 new_child
.parent
= self
11596 assert new_child
isa TOpar
11597 _n_opar
= new_child
11603 for i
in [0.._n_items
.length
[ do
11604 if _n_items
[i
] == old_child
then
11605 if new_child
!= null then
11606 assert new_child
isa AAnnotation
11607 _n_items
[i
] = new_child
11608 new_child
.parent
= self
11610 _n_items
.remove_at
(i
)
11615 if _n_cpar
== old_child
then
11616 if new_child
!= null then
11617 new_child
.parent
= self
11618 assert new_child
isa TCpar
11619 _n_cpar
= new_child
11627 redef fun n_at
=(node
)
11630 if node
!= null then
11634 redef fun n_opar
=(node
)
11637 if node
!= null then
11641 redef fun n_cpar
=(node
)
11644 if node
!= null then
11650 redef fun visit_all
(v
: Visitor)
11652 if _n_at
!= null then
11653 v
.enter_visit
(_n_at
.as(not null))
11655 if _n_opar
!= null then
11656 v
.enter_visit
(_n_opar
.as(not null))
11658 for n
in _n_items
do
11661 if _n_cpar
!= null then
11662 v
.enter_visit
(_n_cpar
.as(not null))
11666 redef class AAnnotation
11667 private init empty_init
do end
11669 init init_aannotation
(
11670 n_atid
: nullable AAtid,
11671 n_opar
: nullable TOpar,
11672 n_args
: Collection[Object], # Should be Collection[AAtArg]
11673 n_cpar
: nullable TCpar,
11674 n_annotations
: nullable AAnnotations
11678 _n_atid
= n_atid
.as(not null)
11679 n_atid
.parent
= self
11681 if n_opar
!= null then
11682 n_opar
.parent
= self
11685 assert n
isa AAtArg
11690 if n_cpar
!= null then
11691 n_cpar
.parent
= self
11693 _n_annotations
= n_annotations
11694 if n_annotations
!= null then
11695 n_annotations
.parent
= self
11699 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11701 if _n_atid
== old_child
then
11702 if new_child
!= null then
11703 new_child
.parent
= self
11704 assert new_child
isa AAtid
11705 _n_atid
= new_child
11711 if _n_opar
== old_child
then
11712 if new_child
!= null then
11713 new_child
.parent
= self
11714 assert new_child
isa TOpar
11715 _n_opar
= new_child
11721 for i
in [0.._n_args
.length
[ do
11722 if _n_args
[i
] == old_child
then
11723 if new_child
!= null then
11724 assert new_child
isa AAtArg
11725 _n_args
[i
] = new_child
11726 new_child
.parent
= self
11728 _n_args
.remove_at
(i
)
11733 if _n_cpar
== old_child
then
11734 if new_child
!= null then
11735 new_child
.parent
= self
11736 assert new_child
isa TCpar
11737 _n_cpar
= new_child
11743 if _n_annotations
== old_child
then
11744 if new_child
!= null then
11745 new_child
.parent
= self
11746 assert new_child
isa AAnnotations
11747 _n_annotations
= new_child
11749 _n_annotations
= null
11755 redef fun n_atid
=(node
)
11760 redef fun n_opar
=(node
)
11763 if node
!= null then
11767 redef fun n_cpar
=(node
)
11770 if node
!= null then
11774 redef fun n_annotations
=(node
)
11776 _n_annotations
= node
11777 if node
!= null then
11783 redef fun visit_all
(v
: Visitor)
11785 v
.enter_visit
(_n_atid
)
11786 if _n_opar
!= null then
11787 v
.enter_visit
(_n_opar
.as(not null))
11789 for n
in _n_args
do
11792 if _n_cpar
!= null then
11793 v
.enter_visit
(_n_cpar
.as(not null))
11795 if _n_annotations
!= null then
11796 v
.enter_visit
(_n_annotations
.as(not null))
11800 redef class ATypeAtArg
11801 private init empty_init
do end
11803 init init_atypeatarg
(
11804 n_type
: nullable AType
11808 _n_type
= n_type
.as(not null)
11809 n_type
.parent
= self
11812 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11814 if _n_type
== old_child
then
11815 if new_child
!= null then
11816 new_child
.parent
= self
11817 assert new_child
isa AType
11818 _n_type
= new_child
11826 redef fun n_type
=(node
)
11833 redef fun visit_all
(v
: Visitor)
11835 v
.enter_visit
(_n_type
)
11838 redef class AExprAtArg
11839 private init empty_init
do end
11841 init init_aexpratarg
(
11842 n_expr
: nullable AExpr
11846 _n_expr
= n_expr
.as(not null)
11847 n_expr
.parent
= self
11850 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11852 if _n_expr
== old_child
then
11853 if new_child
!= null then
11854 new_child
.parent
= self
11855 assert new_child
isa AExpr
11856 _n_expr
= new_child
11864 redef fun n_expr
=(node
)
11871 redef fun visit_all
(v
: Visitor)
11873 v
.enter_visit
(_n_expr
)
11876 redef class AAtAtArg
11877 private init empty_init
do end
11879 init init_aatatarg
(
11880 n_annotations
: nullable AAnnotations
11884 _n_annotations
= n_annotations
.as(not null)
11885 n_annotations
.parent
= self
11888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11890 if _n_annotations
== old_child
then
11891 if new_child
!= null then
11892 new_child
.parent
= self
11893 assert new_child
isa AAnnotations
11894 _n_annotations
= new_child
11902 redef fun n_annotations
=(node
)
11904 _n_annotations
= node
11909 redef fun visit_all
(v
: Visitor)
11911 v
.enter_visit
(_n_annotations
)
11914 redef class AIdAtid
11915 private init empty_init
do end
11917 init init_aidatid
(
11922 _n_id
= n_id
.as(not null)
11926 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11928 if _n_id
== old_child
then
11929 if new_child
!= null then
11930 new_child
.parent
= self
11931 assert new_child
isa TId
11940 redef fun n_id
=(node
)
11947 redef fun visit_all
(v
: Visitor)
11949 v
.enter_visit
(_n_id
)
11952 redef class AKwexternAtid
11953 private init empty_init
do end
11955 init init_akwexternatid
(
11956 n_id
: nullable TKwextern
11960 _n_id
= n_id
.as(not null)
11964 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11966 if _n_id
== old_child
then
11967 if new_child
!= null then
11968 new_child
.parent
= self
11969 assert new_child
isa TKwextern
11978 redef fun n_id
=(node
)
11985 redef fun visit_all
(v
: Visitor)
11987 v
.enter_visit
(_n_id
)
11990 redef class AKwinternAtid
11991 private init empty_init
do end
11993 init init_akwinternatid
(
11994 n_id
: nullable TKwintern
11998 _n_id
= n_id
.as(not null)
12002 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12004 if _n_id
== old_child
then
12005 if new_child
!= null then
12006 new_child
.parent
= self
12007 assert new_child
isa TKwintern
12016 redef fun n_id
=(node
)
12023 redef fun visit_all
(v
: Visitor)
12025 v
.enter_visit
(_n_id
)
12028 redef class AKwreadableAtid
12029 private init empty_init
do end
12031 init init_akwreadableatid
(
12032 n_id
: nullable TKwreadable
12036 _n_id
= n_id
.as(not null)
12040 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12042 if _n_id
== old_child
then
12043 if new_child
!= null then
12044 new_child
.parent
= self
12045 assert new_child
isa TKwreadable
12054 redef fun n_id
=(node
)
12061 redef fun visit_all
(v
: Visitor)
12063 v
.enter_visit
(_n_id
)
12066 redef class AKwwritableAtid
12067 private init empty_init
do end
12069 init init_akwwritableatid
(
12070 n_id
: nullable TKwwritable
12074 _n_id
= n_id
.as(not null)
12078 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12080 if _n_id
== old_child
then
12081 if new_child
!= null then
12082 new_child
.parent
= self
12083 assert new_child
isa TKwwritable
12092 redef fun n_id
=(node
)
12099 redef fun visit_all
(v
: Visitor)
12101 v
.enter_visit
(_n_id
)
12104 redef class AKwimportAtid
12105 private init empty_init
do end
12107 init init_akwimportatid
(
12108 n_id
: nullable TKwimport
12112 _n_id
= n_id
.as(not null)
12116 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12118 if _n_id
== old_child
then
12119 if new_child
!= null then
12120 new_child
.parent
= self
12121 assert new_child
isa TKwimport
12130 redef fun n_id
=(node
)
12137 redef fun visit_all
(v
: Visitor)
12139 v
.enter_visit
(_n_id
)
12144 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
12146 if _n_base
== old_child
then
12147 if new_child
== null then
12149 new_child
.parent
= self
12150 assert new_child
isa AModule
12151 _n_base
= new_child
12153 old_child
.parent
= null
12158 redef fun visit_all
(v
: Visitor)
12160 if _n_base
!= null then
12161 v
.enter_visit
(_n_base
.as(not null))
12163 v
.enter_visit
(_n_eof
)