1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
10 private init empty_init
do end
13 n_moduledecl
: nullable AModuledecl,
14 n_imports
: Collection[Object], # Should be Collection[AImport]
15 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
16 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
20 _n_moduledecl
= n_moduledecl
21 if n_moduledecl
!= null then
22 n_moduledecl
.parent
= self
29 for n
in n_extern_code_blocks
do
30 assert n
isa AExternCodeBlock
31 _n_extern_code_blocks
.add
(n
)
34 for n
in n_classdefs
do
35 assert n
isa AClassdef
41 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
43 if _n_moduledecl
== old_child
then
44 if new_child
!= null then
45 new_child
.parent
= self
46 assert new_child
isa AModuledecl
47 _n_moduledecl
= new_child
53 for i
in [0.._n_imports
.length
[ do
54 if _n_imports
[i
] == old_child
then
55 if new_child
!= null then
56 assert new_child
isa AImport
57 _n_imports
[i
] = new_child
58 new_child
.parent
= self
60 _n_imports
.remove_at
(i
)
65 for i
in [0.._n_extern_code_blocks
.length
[ do
66 if _n_extern_code_blocks
[i
] == old_child
then
67 if new_child
!= null then
68 assert new_child
isa AExternCodeBlock
69 _n_extern_code_blocks
[i
] = new_child
70 new_child
.parent
= self
72 _n_extern_code_blocks
.remove_at
(i
)
77 for i
in [0.._n_classdefs
.length
[ do
78 if _n_classdefs
[i
] == old_child
then
79 if new_child
!= null then
80 assert new_child
isa AClassdef
81 _n_classdefs
[i
] = new_child
82 new_child
.parent
= self
84 _n_classdefs
.remove_at
(i
)
91 redef fun n_moduledecl
=(node
)
100 redef fun visit_all
(v
: Visitor)
102 if _n_moduledecl
!= null then
103 v
.enter_visit
(_n_moduledecl
.as(not null))
105 for n
in _n_imports
do
108 for n
in _n_extern_code_blocks
do
111 for n
in _n_classdefs
do
116 redef class AModuledecl
117 private init empty_init
do end
119 init init_amoduledecl
(
120 n_doc
: nullable ADoc,
121 n_kwmodule
: nullable TKwmodule,
122 n_name
: nullable AModuleName,
123 n_annotations
: nullable AAnnotations
128 if n_doc
!= null then
131 _n_kwmodule
= n_kwmodule
.as(not null)
132 n_kwmodule
.parent
= self
133 _n_name
= n_name
.as(not null)
135 _n_annotations
= n_annotations
136 if n_annotations
!= null then
137 n_annotations
.parent
= self
141 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
143 if _n_doc
== old_child
then
144 if new_child
!= null then
145 new_child
.parent
= self
146 assert new_child
isa ADoc
153 if _n_kwmodule
== old_child
then
154 if new_child
!= null then
155 new_child
.parent
= self
156 assert new_child
isa TKwmodule
157 _n_kwmodule
= new_child
163 if _n_name
== old_child
then
164 if new_child
!= null then
165 new_child
.parent
= self
166 assert new_child
isa AModuleName
173 if _n_annotations
== old_child
then
174 if new_child
!= null then
175 new_child
.parent
= self
176 assert new_child
isa AAnnotations
177 _n_annotations
= new_child
179 _n_annotations
= null
185 redef fun n_doc
=(node
)
192 redef fun n_kwmodule
=(node
)
197 redef fun n_name
=(node
)
202 redef fun n_annotations
=(node
)
204 _n_annotations
= node
211 redef fun visit_all
(v
: Visitor)
213 if _n_doc
!= null then
214 v
.enter_visit
(_n_doc
.as(not null))
216 v
.enter_visit
(_n_kwmodule
)
217 v
.enter_visit
(_n_name
)
218 if _n_annotations
!= null then
219 v
.enter_visit
(_n_annotations
.as(not null))
223 redef class AStdImport
224 private init empty_init
do end
226 init init_astdimport
(
227 n_visibility
: nullable AVisibility,
228 n_kwimport
: nullable TKwimport,
229 n_name
: nullable AModuleName,
230 n_annotations
: nullable AAnnotations
234 _n_visibility
= n_visibility
.as(not null)
235 n_visibility
.parent
= self
236 _n_kwimport
= n_kwimport
.as(not null)
237 n_kwimport
.parent
= self
238 _n_name
= n_name
.as(not null)
240 _n_annotations
= n_annotations
241 if n_annotations
!= null then
242 n_annotations
.parent
= self
246 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
248 if _n_visibility
== old_child
then
249 if new_child
!= null then
250 new_child
.parent
= self
251 assert new_child
isa AVisibility
252 _n_visibility
= new_child
258 if _n_kwimport
== old_child
then
259 if new_child
!= null then
260 new_child
.parent
= self
261 assert new_child
isa TKwimport
262 _n_kwimport
= new_child
268 if _n_name
== old_child
then
269 if new_child
!= null then
270 new_child
.parent
= self
271 assert new_child
isa AModuleName
278 if _n_annotations
== old_child
then
279 if new_child
!= null then
280 new_child
.parent
= self
281 assert new_child
isa AAnnotations
282 _n_annotations
= new_child
284 _n_annotations
= null
290 redef fun n_visibility
=(node
)
295 redef fun n_kwimport
=(node
)
300 redef fun n_name
=(node
)
305 redef fun n_annotations
=(node
)
307 _n_annotations
= node
314 redef fun visit_all
(v
: Visitor)
316 v
.enter_visit
(_n_visibility
)
317 v
.enter_visit
(_n_kwimport
)
318 v
.enter_visit
(_n_name
)
319 if _n_annotations
!= null then
320 v
.enter_visit
(_n_annotations
.as(not null))
324 redef class ANoImport
325 private init empty_init
do end
327 init init_anoimport
(
328 n_visibility
: nullable AVisibility,
329 n_kwimport
: nullable TKwimport,
330 n_kwend
: nullable TKwend
334 _n_visibility
= n_visibility
.as(not null)
335 n_visibility
.parent
= self
336 _n_kwimport
= n_kwimport
.as(not null)
337 n_kwimport
.parent
= self
338 _n_kwend
= n_kwend
.as(not null)
339 n_kwend
.parent
= self
342 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
344 if _n_visibility
== old_child
then
345 if new_child
!= null then
346 new_child
.parent
= self
347 assert new_child
isa AVisibility
348 _n_visibility
= new_child
354 if _n_kwimport
== old_child
then
355 if new_child
!= null then
356 new_child
.parent
= self
357 assert new_child
isa TKwimport
358 _n_kwimport
= new_child
364 if _n_kwend
== old_child
then
365 if new_child
!= null then
366 new_child
.parent
= self
367 assert new_child
isa TKwend
376 redef fun n_visibility
=(node
)
381 redef fun n_kwimport
=(node
)
386 redef fun n_kwend
=(node
)
393 redef fun visit_all
(v
: Visitor)
395 v
.enter_visit
(_n_visibility
)
396 v
.enter_visit
(_n_kwimport
)
397 v
.enter_visit
(_n_kwend
)
400 redef class APublicVisibility
401 private init empty_init
do end
403 init init_apublicvisibility
408 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
414 redef fun visit_all
(v
: Visitor)
418 redef class APrivateVisibility
419 private init empty_init
do end
421 init init_aprivatevisibility
(
422 n_kwprivate
: nullable TKwprivate
426 _n_kwprivate
= n_kwprivate
.as(not null)
427 n_kwprivate
.parent
= self
430 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
432 if _n_kwprivate
== old_child
then
433 if new_child
!= null then
434 new_child
.parent
= self
435 assert new_child
isa TKwprivate
436 _n_kwprivate
= new_child
444 redef fun n_kwprivate
=(node
)
451 redef fun visit_all
(v
: Visitor)
453 v
.enter_visit
(_n_kwprivate
)
456 redef class AProtectedVisibility
457 private init empty_init
do end
459 init init_aprotectedvisibility
(
460 n_kwprotected
: nullable TKwprotected
464 _n_kwprotected
= n_kwprotected
.as(not null)
465 n_kwprotected
.parent
= self
468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
470 if _n_kwprotected
== old_child
then
471 if new_child
!= null then
472 new_child
.parent
= self
473 assert new_child
isa TKwprotected
474 _n_kwprotected
= new_child
482 redef fun n_kwprotected
=(node
)
484 _n_kwprotected
= node
489 redef fun visit_all
(v
: Visitor)
491 v
.enter_visit
(_n_kwprotected
)
494 redef class AIntrudeVisibility
495 private init empty_init
do end
497 init init_aintrudevisibility
(
498 n_kwintrude
: nullable TKwintrude
502 _n_kwintrude
= n_kwintrude
.as(not null)
503 n_kwintrude
.parent
= self
506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
508 if _n_kwintrude
== old_child
then
509 if new_child
!= null then
510 new_child
.parent
= self
511 assert new_child
isa TKwintrude
512 _n_kwintrude
= new_child
520 redef fun n_kwintrude
=(node
)
527 redef fun visit_all
(v
: Visitor)
529 v
.enter_visit
(_n_kwintrude
)
532 redef class AStdClassdef
533 private init empty_init
do end
535 init init_astdclassdef
(
536 n_doc
: nullable ADoc,
537 n_kwredef
: nullable TKwredef,
538 n_visibility
: nullable AVisibility,
539 n_classkind
: nullable AClasskind,
540 n_id
: nullable TClassid,
541 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
542 n_annotations
: nullable AAnnotations,
543 n_extern_code_block
: nullable AExternCodeBlock,
544 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
545 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
546 n_kwend
: nullable TKwend
551 if n_doc
!= null then
554 _n_kwredef
= n_kwredef
555 if n_kwredef
!= null then
556 n_kwredef
.parent
= self
558 _n_visibility
= n_visibility
.as(not null)
559 n_visibility
.parent
= self
560 _n_classkind
= n_classkind
.as(not null)
561 n_classkind
.parent
= self
566 for n
in n_formaldefs
do
567 assert n
isa AFormaldef
571 _n_annotations
= n_annotations
572 if n_annotations
!= null then
573 n_annotations
.parent
= self
575 _n_extern_code_block
= n_extern_code_block
576 if n_extern_code_block
!= null then
577 n_extern_code_block
.parent
= self
579 for n
in n_superclasses
do
580 assert n
isa ASuperclass
581 _n_superclasses
.add
(n
)
584 for n
in n_propdefs
do
585 assert n
isa APropdef
589 _n_kwend
= n_kwend
.as(not null)
590 n_kwend
.parent
= self
593 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
595 if _n_doc
== old_child
then
596 if new_child
!= null then
597 new_child
.parent
= self
598 assert new_child
isa ADoc
605 if _n_kwredef
== old_child
then
606 if new_child
!= null then
607 new_child
.parent
= self
608 assert new_child
isa TKwredef
609 _n_kwredef
= new_child
615 if _n_visibility
== old_child
then
616 if new_child
!= null then
617 new_child
.parent
= self
618 assert new_child
isa AVisibility
619 _n_visibility
= new_child
625 if _n_classkind
== old_child
then
626 if new_child
!= null then
627 new_child
.parent
= self
628 assert new_child
isa AClasskind
629 _n_classkind
= new_child
635 if _n_id
== old_child
then
636 if new_child
!= null then
637 new_child
.parent
= self
638 assert new_child
isa TClassid
645 for i
in [0.._n_formaldefs
.length
[ do
646 if _n_formaldefs
[i
] == old_child
then
647 if new_child
!= null then
648 assert new_child
isa AFormaldef
649 _n_formaldefs
[i
] = new_child
650 new_child
.parent
= self
652 _n_formaldefs
.remove_at
(i
)
657 if _n_annotations
== old_child
then
658 if new_child
!= null then
659 new_child
.parent
= self
660 assert new_child
isa AAnnotations
661 _n_annotations
= new_child
663 _n_annotations
= null
667 if _n_extern_code_block
== old_child
then
668 if new_child
!= null then
669 new_child
.parent
= self
670 assert new_child
isa AExternCodeBlock
671 _n_extern_code_block
= new_child
673 _n_extern_code_block
= null
677 for i
in [0.._n_superclasses
.length
[ do
678 if _n_superclasses
[i
] == old_child
then
679 if new_child
!= null then
680 assert new_child
isa ASuperclass
681 _n_superclasses
[i
] = new_child
682 new_child
.parent
= self
684 _n_superclasses
.remove_at
(i
)
689 for i
in [0.._n_propdefs
.length
[ do
690 if _n_propdefs
[i
] == old_child
then
691 if new_child
!= null then
692 assert new_child
isa APropdef
693 _n_propdefs
[i
] = new_child
694 new_child
.parent
= self
696 _n_propdefs
.remove_at
(i
)
701 if _n_kwend
== old_child
then
702 if new_child
!= null then
703 new_child
.parent
= self
704 assert new_child
isa TKwend
713 redef fun n_doc
=(node
)
720 redef fun n_kwredef
=(node
)
727 redef fun n_visibility
=(node
)
732 redef fun n_classkind
=(node
)
737 redef fun n_id
=(node
)
744 redef fun n_annotations
=(node
)
746 _n_annotations
= node
751 redef fun n_extern_code_block
=(node
)
753 _n_extern_code_block
= node
758 redef fun n_kwend
=(node
)
765 redef fun visit_all
(v
: Visitor)
767 if _n_doc
!= null then
768 v
.enter_visit
(_n_doc
.as(not null))
770 if _n_kwredef
!= null then
771 v
.enter_visit
(_n_kwredef
.as(not null))
773 v
.enter_visit
(_n_visibility
)
774 v
.enter_visit
(_n_classkind
)
775 if _n_id
!= null then
776 v
.enter_visit
(_n_id
.as(not null))
778 for n
in _n_formaldefs
do
781 if _n_annotations
!= null then
782 v
.enter_visit
(_n_annotations
.as(not null))
784 if _n_extern_code_block
!= null then
785 v
.enter_visit
(_n_extern_code_block
.as(not null))
787 for n
in _n_superclasses
do
790 for n
in _n_propdefs
do
793 v
.enter_visit
(_n_kwend
)
796 redef class ATopClassdef
797 private init empty_init
do end
799 init init_atopclassdef
(
800 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
804 for n
in n_propdefs
do
805 assert n
isa APropdef
811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
813 for i
in [0.._n_propdefs
.length
[ do
814 if _n_propdefs
[i
] == old_child
then
815 if new_child
!= null then
816 assert new_child
isa APropdef
817 _n_propdefs
[i
] = new_child
818 new_child
.parent
= self
820 _n_propdefs
.remove_at
(i
)
829 redef fun visit_all
(v
: Visitor)
831 for n
in _n_propdefs
do
836 redef class AMainClassdef
837 private init empty_init
do end
839 init init_amainclassdef
(
840 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
844 for n
in n_propdefs
do
845 assert n
isa APropdef
851 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
853 for i
in [0.._n_propdefs
.length
[ do
854 if _n_propdefs
[i
] == old_child
then
855 if new_child
!= null then
856 assert new_child
isa APropdef
857 _n_propdefs
[i
] = new_child
858 new_child
.parent
= self
860 _n_propdefs
.remove_at
(i
)
869 redef fun visit_all
(v
: Visitor)
871 for n
in _n_propdefs
do
876 redef class AConcreteClasskind
877 private init empty_init
do end
879 init init_aconcreteclasskind
(
880 n_kwclass
: nullable TKwclass
884 _n_kwclass
= n_kwclass
.as(not null)
885 n_kwclass
.parent
= self
888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
890 if _n_kwclass
== old_child
then
891 if new_child
!= null then
892 new_child
.parent
= self
893 assert new_child
isa TKwclass
894 _n_kwclass
= new_child
902 redef fun n_kwclass
=(node
)
909 redef fun visit_all
(v
: Visitor)
911 v
.enter_visit
(_n_kwclass
)
914 redef class AAbstractClasskind
915 private init empty_init
do end
917 init init_aabstractclasskind
(
918 n_kwabstract
: nullable TKwabstract,
919 n_kwclass
: nullable TKwclass
923 _n_kwabstract
= n_kwabstract
.as(not null)
924 n_kwabstract
.parent
= self
925 _n_kwclass
= n_kwclass
.as(not null)
926 n_kwclass
.parent
= self
929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
931 if _n_kwabstract
== old_child
then
932 if new_child
!= null then
933 new_child
.parent
= self
934 assert new_child
isa TKwabstract
935 _n_kwabstract
= new_child
941 if _n_kwclass
== old_child
then
942 if new_child
!= null then
943 new_child
.parent
= self
944 assert new_child
isa TKwclass
945 _n_kwclass
= new_child
953 redef fun n_kwabstract
=(node
)
958 redef fun n_kwclass
=(node
)
965 redef fun visit_all
(v
: Visitor)
967 v
.enter_visit
(_n_kwabstract
)
968 v
.enter_visit
(_n_kwclass
)
971 redef class AInterfaceClasskind
972 private init empty_init
do end
974 init init_ainterfaceclasskind
(
975 n_kwinterface
: nullable TKwinterface
979 _n_kwinterface
= n_kwinterface
.as(not null)
980 n_kwinterface
.parent
= self
983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
985 if _n_kwinterface
== old_child
then
986 if new_child
!= null then
987 new_child
.parent
= self
988 assert new_child
isa TKwinterface
989 _n_kwinterface
= new_child
997 redef fun n_kwinterface
=(node
)
999 _n_kwinterface
= node
1004 redef fun visit_all
(v
: Visitor)
1006 v
.enter_visit
(_n_kwinterface
)
1009 redef class AEnumClasskind
1010 private init empty_init
do end
1012 init init_aenumclasskind
(
1013 n_kwenum
: nullable TKwenum
1017 _n_kwenum
= n_kwenum
.as(not null)
1018 n_kwenum
.parent
= self
1021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1023 if _n_kwenum
== old_child
then
1024 if new_child
!= null then
1025 new_child
.parent
= self
1026 assert new_child
isa TKwenum
1027 _n_kwenum
= new_child
1035 redef fun n_kwenum
=(node
)
1042 redef fun visit_all
(v
: Visitor)
1044 v
.enter_visit
(_n_kwenum
)
1047 redef class AExternClasskind
1048 private init empty_init
do end
1050 init init_aexternclasskind
(
1051 n_kwextern
: nullable TKwextern,
1052 n_kwclass
: nullable TKwclass
1056 _n_kwextern
= n_kwextern
.as(not null)
1057 n_kwextern
.parent
= self
1058 _n_kwclass
= n_kwclass
1059 if n_kwclass
!= null then
1060 n_kwclass
.parent
= self
1064 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1066 if _n_kwextern
== old_child
then
1067 if new_child
!= null then
1068 new_child
.parent
= self
1069 assert new_child
isa TKwextern
1070 _n_kwextern
= new_child
1076 if _n_kwclass
== old_child
then
1077 if new_child
!= null then
1078 new_child
.parent
= self
1079 assert new_child
isa TKwclass
1080 _n_kwclass
= new_child
1088 redef fun n_kwextern
=(node
)
1093 redef fun n_kwclass
=(node
)
1096 if node
!= null then
1102 redef fun visit_all
(v
: Visitor)
1104 v
.enter_visit
(_n_kwextern
)
1105 if _n_kwclass
!= null then
1106 v
.enter_visit
(_n_kwclass
.as(not null))
1110 redef class AFormaldef
1111 private init empty_init
do end
1113 init init_aformaldef
(
1114 n_id
: nullable TClassid,
1115 n_type
: nullable AType,
1116 n_annotations
: nullable AAnnotations
1120 _n_id
= n_id
.as(not null)
1123 if n_type
!= null then
1124 n_type
.parent
= self
1126 _n_annotations
= n_annotations
1127 if n_annotations
!= null then
1128 n_annotations
.parent
= self
1132 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1134 if _n_id
== old_child
then
1135 if new_child
!= null then
1136 new_child
.parent
= self
1137 assert new_child
isa TClassid
1144 if _n_type
== old_child
then
1145 if new_child
!= null then
1146 new_child
.parent
= self
1147 assert new_child
isa AType
1154 if _n_annotations
== old_child
then
1155 if new_child
!= null then
1156 new_child
.parent
= self
1157 assert new_child
isa AAnnotations
1158 _n_annotations
= new_child
1160 _n_annotations
= null
1166 redef fun n_id
=(node
)
1171 redef fun n_type
=(node
)
1174 if node
!= null then
1178 redef fun n_annotations
=(node
)
1180 _n_annotations
= node
1181 if node
!= null then
1187 redef fun visit_all
(v
: Visitor)
1189 v
.enter_visit
(_n_id
)
1190 if _n_type
!= null then
1191 v
.enter_visit
(_n_type
.as(not null))
1193 if _n_annotations
!= null then
1194 v
.enter_visit
(_n_annotations
.as(not null))
1198 redef class ASuperclass
1199 private init empty_init
do end
1201 init init_asuperclass
(
1202 n_kwsuper
: nullable TKwsuper,
1203 n_type
: nullable AType,
1204 n_annotations
: nullable AAnnotations
1208 _n_kwsuper
= n_kwsuper
.as(not null)
1209 n_kwsuper
.parent
= self
1210 _n_type
= n_type
.as(not null)
1211 n_type
.parent
= self
1212 _n_annotations
= n_annotations
1213 if n_annotations
!= null then
1214 n_annotations
.parent
= self
1218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1220 if _n_kwsuper
== old_child
then
1221 if new_child
!= null then
1222 new_child
.parent
= self
1223 assert new_child
isa TKwsuper
1224 _n_kwsuper
= new_child
1230 if _n_type
== old_child
then
1231 if new_child
!= null then
1232 new_child
.parent
= self
1233 assert new_child
isa AType
1240 if _n_annotations
== old_child
then
1241 if new_child
!= null then
1242 new_child
.parent
= self
1243 assert new_child
isa AAnnotations
1244 _n_annotations
= new_child
1246 _n_annotations
= null
1252 redef fun n_kwsuper
=(node
)
1257 redef fun n_type
=(node
)
1262 redef fun n_annotations
=(node
)
1264 _n_annotations
= node
1265 if node
!= null then
1271 redef fun visit_all
(v
: Visitor)
1273 v
.enter_visit
(_n_kwsuper
)
1274 v
.enter_visit
(_n_type
)
1275 if _n_annotations
!= null then
1276 v
.enter_visit
(_n_annotations
.as(not null))
1280 redef class AAttrPropdef
1281 private init empty_init
do end
1283 init init_aattrpropdef
(
1284 n_doc
: nullable ADoc,
1285 n_readable
: nullable AAble,
1286 n_writable
: nullable AAble,
1287 n_kwredef
: nullable TKwredef,
1288 n_visibility
: nullable AVisibility,
1289 n_kwvar
: nullable TKwvar,
1290 n_id
: nullable TAttrid,
1291 n_id2
: nullable TId,
1292 n_type
: nullable AType,
1293 n_annotations
: nullable AAnnotations,
1294 n_expr
: nullable AExpr
1299 if n_doc
!= null then
1302 _n_readable
= n_readable
1303 if n_readable
!= null then
1304 n_readable
.parent
= self
1306 _n_writable
= n_writable
1307 if n_writable
!= null then
1308 n_writable
.parent
= self
1310 _n_kwredef
= n_kwredef
1311 if n_kwredef
!= null then
1312 n_kwredef
.parent
= self
1314 _n_visibility
= n_visibility
.as(not null)
1315 n_visibility
.parent
= self
1316 _n_kwvar
= n_kwvar
.as(not null)
1317 n_kwvar
.parent
= self
1319 if n_id
!= null then
1323 if n_id2
!= null then
1327 if n_type
!= null then
1328 n_type
.parent
= self
1330 _n_annotations
= n_annotations
1331 if n_annotations
!= null then
1332 n_annotations
.parent
= self
1335 if n_expr
!= null then
1336 n_expr
.parent
= self
1340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1342 if _n_doc
== old_child
then
1343 if new_child
!= null then
1344 new_child
.parent
= self
1345 assert new_child
isa ADoc
1352 if _n_readable
== old_child
then
1353 if new_child
!= null then
1354 new_child
.parent
= self
1355 assert new_child
isa AAble
1356 _n_readable
= new_child
1362 if _n_writable
== old_child
then
1363 if new_child
!= null then
1364 new_child
.parent
= self
1365 assert new_child
isa AAble
1366 _n_writable
= new_child
1372 if _n_kwredef
== old_child
then
1373 if new_child
!= null then
1374 new_child
.parent
= self
1375 assert new_child
isa TKwredef
1376 _n_kwredef
= new_child
1382 if _n_visibility
== old_child
then
1383 if new_child
!= null then
1384 new_child
.parent
= self
1385 assert new_child
isa AVisibility
1386 _n_visibility
= new_child
1392 if _n_kwvar
== old_child
then
1393 if new_child
!= null then
1394 new_child
.parent
= self
1395 assert new_child
isa TKwvar
1396 _n_kwvar
= new_child
1402 if _n_id
== old_child
then
1403 if new_child
!= null then
1404 new_child
.parent
= self
1405 assert new_child
isa TAttrid
1412 if _n_id2
== old_child
then
1413 if new_child
!= null then
1414 new_child
.parent
= self
1415 assert new_child
isa TId
1422 if _n_type
== old_child
then
1423 if new_child
!= null then
1424 new_child
.parent
= self
1425 assert new_child
isa AType
1432 if _n_annotations
== old_child
then
1433 if new_child
!= null then
1434 new_child
.parent
= self
1435 assert new_child
isa AAnnotations
1436 _n_annotations
= new_child
1438 _n_annotations
= null
1442 if _n_expr
== old_child
then
1443 if new_child
!= null then
1444 new_child
.parent
= self
1445 assert new_child
isa AExpr
1454 redef fun n_doc
=(node
)
1457 if node
!= null then
1461 redef fun n_readable
=(node
)
1464 if node
!= null then
1468 redef fun n_writable
=(node
)
1471 if node
!= null then
1475 redef fun n_kwredef
=(node
)
1478 if node
!= null then
1482 redef fun n_visibility
=(node
)
1484 _n_visibility
= node
1487 redef fun n_kwvar
=(node
)
1492 redef fun n_id
=(node
)
1495 if node
!= null then
1499 redef fun n_id2
=(node
)
1502 if node
!= null then
1506 redef fun n_type
=(node
)
1509 if node
!= null then
1513 redef fun n_annotations
=(node
)
1515 _n_annotations
= node
1516 if node
!= null then
1520 redef fun n_expr
=(node
)
1523 if node
!= null then
1529 redef fun visit_all
(v
: Visitor)
1531 if _n_doc
!= null then
1532 v
.enter_visit
(_n_doc
.as(not null))
1534 if _n_readable
!= null then
1535 v
.enter_visit
(_n_readable
.as(not null))
1537 if _n_writable
!= null then
1538 v
.enter_visit
(_n_writable
.as(not null))
1540 if _n_kwredef
!= null then
1541 v
.enter_visit
(_n_kwredef
.as(not null))
1543 v
.enter_visit
(_n_visibility
)
1544 v
.enter_visit
(_n_kwvar
)
1545 if _n_id
!= null then
1546 v
.enter_visit
(_n_id
.as(not null))
1548 if _n_id2
!= null then
1549 v
.enter_visit
(_n_id2
.as(not null))
1551 if _n_type
!= null then
1552 v
.enter_visit
(_n_type
.as(not null))
1554 if _n_annotations
!= null then
1555 v
.enter_visit
(_n_annotations
.as(not null))
1557 if _n_expr
!= null then
1558 v
.enter_visit
(_n_expr
.as(not null))
1562 redef class AMethPropdef
1563 private init empty_init
do end
1565 init init_amethpropdef
(
1566 n_doc
: nullable ADoc,
1567 n_kwredef
: nullable TKwredef,
1568 n_visibility
: nullable AVisibility,
1569 n_methid
: nullable AMethid,
1570 n_signature
: nullable ASignature
1575 if n_doc
!= null then
1578 _n_kwredef
= n_kwredef
1579 if n_kwredef
!= null then
1580 n_kwredef
.parent
= self
1582 _n_visibility
= n_visibility
.as(not null)
1583 n_visibility
.parent
= self
1584 _n_methid
= n_methid
.as(not null)
1585 n_methid
.parent
= self
1586 _n_signature
= n_signature
.as(not null)
1587 n_signature
.parent
= self
1590 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1592 if _n_doc
== old_child
then
1593 if new_child
!= null then
1594 new_child
.parent
= self
1595 assert new_child
isa ADoc
1602 if _n_kwredef
== old_child
then
1603 if new_child
!= null then
1604 new_child
.parent
= self
1605 assert new_child
isa TKwredef
1606 _n_kwredef
= new_child
1612 if _n_visibility
== old_child
then
1613 if new_child
!= null then
1614 new_child
.parent
= self
1615 assert new_child
isa AVisibility
1616 _n_visibility
= new_child
1622 if _n_methid
== old_child
then
1623 if new_child
!= null then
1624 new_child
.parent
= self
1625 assert new_child
isa AMethid
1626 _n_methid
= new_child
1632 if _n_signature
== old_child
then
1633 if new_child
!= null then
1634 new_child
.parent
= self
1635 assert new_child
isa ASignature
1636 _n_signature
= new_child
1644 redef fun n_doc
=(node
)
1647 if node
!= null then
1651 redef fun n_kwredef
=(node
)
1654 if node
!= null then
1658 redef fun n_visibility
=(node
)
1660 _n_visibility
= node
1663 redef fun n_methid
=(node
)
1668 redef fun n_signature
=(node
)
1675 redef fun visit_all
(v
: Visitor)
1677 if _n_doc
!= null then
1678 v
.enter_visit
(_n_doc
.as(not null))
1680 if _n_kwredef
!= null then
1681 v
.enter_visit
(_n_kwredef
.as(not null))
1683 v
.enter_visit
(_n_visibility
)
1684 v
.enter_visit
(_n_methid
)
1685 v
.enter_visit
(_n_signature
)
1688 redef class ADeferredMethPropdef
1689 private init empty_init
do end
1691 init init_adeferredmethpropdef
(
1692 n_doc
: nullable ADoc,
1693 n_kwredef
: nullable TKwredef,
1694 n_visibility
: nullable AVisibility,
1695 n_kwmeth
: nullable TKwmeth,
1696 n_methid
: nullable AMethid,
1697 n_signature
: nullable ASignature,
1698 n_annotations
: nullable AAnnotations
1703 if n_doc
!= null then
1706 _n_kwredef
= n_kwredef
1707 if n_kwredef
!= null then
1708 n_kwredef
.parent
= self
1710 _n_visibility
= n_visibility
.as(not null)
1711 n_visibility
.parent
= self
1712 _n_kwmeth
= n_kwmeth
.as(not null)
1713 n_kwmeth
.parent
= self
1714 _n_methid
= n_methid
.as(not null)
1715 n_methid
.parent
= self
1716 _n_signature
= n_signature
.as(not null)
1717 n_signature
.parent
= self
1718 _n_annotations
= n_annotations
1719 if n_annotations
!= null then
1720 n_annotations
.parent
= self
1724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1726 if _n_doc
== old_child
then
1727 if new_child
!= null then
1728 new_child
.parent
= self
1729 assert new_child
isa ADoc
1736 if _n_kwredef
== old_child
then
1737 if new_child
!= null then
1738 new_child
.parent
= self
1739 assert new_child
isa TKwredef
1740 _n_kwredef
= new_child
1746 if _n_visibility
== old_child
then
1747 if new_child
!= null then
1748 new_child
.parent
= self
1749 assert new_child
isa AVisibility
1750 _n_visibility
= new_child
1756 if _n_kwmeth
== old_child
then
1757 if new_child
!= null then
1758 new_child
.parent
= self
1759 assert new_child
isa TKwmeth
1760 _n_kwmeth
= new_child
1766 if _n_methid
== old_child
then
1767 if new_child
!= null then
1768 new_child
.parent
= self
1769 assert new_child
isa AMethid
1770 _n_methid
= new_child
1776 if _n_signature
== old_child
then
1777 if new_child
!= null then
1778 new_child
.parent
= self
1779 assert new_child
isa ASignature
1780 _n_signature
= new_child
1786 if _n_annotations
== old_child
then
1787 if new_child
!= null then
1788 new_child
.parent
= self
1789 assert new_child
isa AAnnotations
1790 _n_annotations
= new_child
1792 _n_annotations
= null
1798 redef fun n_doc
=(node
)
1801 if node
!= null then
1805 redef fun n_kwredef
=(node
)
1808 if node
!= null then
1812 redef fun n_visibility
=(node
)
1814 _n_visibility
= node
1817 redef fun n_kwmeth
=(node
)
1822 redef fun n_methid
=(node
)
1827 redef fun n_signature
=(node
)
1832 redef fun n_annotations
=(node
)
1834 _n_annotations
= node
1835 if node
!= null then
1841 redef fun visit_all
(v
: Visitor)
1843 if _n_doc
!= null then
1844 v
.enter_visit
(_n_doc
.as(not null))
1846 if _n_kwredef
!= null then
1847 v
.enter_visit
(_n_kwredef
.as(not null))
1849 v
.enter_visit
(_n_visibility
)
1850 v
.enter_visit
(_n_kwmeth
)
1851 v
.enter_visit
(_n_methid
)
1852 v
.enter_visit
(_n_signature
)
1853 if _n_annotations
!= null then
1854 v
.enter_visit
(_n_annotations
.as(not null))
1858 redef class AInternMethPropdef
1859 private init empty_init
do end
1861 init init_ainternmethpropdef
(
1862 n_doc
: nullable ADoc,
1863 n_kwredef
: nullable TKwredef,
1864 n_visibility
: nullable AVisibility,
1865 n_kwmeth
: nullable TKwmeth,
1866 n_methid
: nullable AMethid,
1867 n_signature
: nullable ASignature
1872 if n_doc
!= null then
1875 _n_kwredef
= n_kwredef
1876 if n_kwredef
!= null then
1877 n_kwredef
.parent
= self
1879 _n_visibility
= n_visibility
.as(not null)
1880 n_visibility
.parent
= self
1881 _n_kwmeth
= n_kwmeth
.as(not null)
1882 n_kwmeth
.parent
= self
1883 _n_methid
= n_methid
.as(not null)
1884 n_methid
.parent
= self
1885 _n_signature
= n_signature
.as(not null)
1886 n_signature
.parent
= self
1889 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1891 if _n_doc
== old_child
then
1892 if new_child
!= null then
1893 new_child
.parent
= self
1894 assert new_child
isa ADoc
1901 if _n_kwredef
== old_child
then
1902 if new_child
!= null then
1903 new_child
.parent
= self
1904 assert new_child
isa TKwredef
1905 _n_kwredef
= new_child
1911 if _n_visibility
== old_child
then
1912 if new_child
!= null then
1913 new_child
.parent
= self
1914 assert new_child
isa AVisibility
1915 _n_visibility
= new_child
1921 if _n_kwmeth
== old_child
then
1922 if new_child
!= null then
1923 new_child
.parent
= self
1924 assert new_child
isa TKwmeth
1925 _n_kwmeth
= new_child
1931 if _n_methid
== old_child
then
1932 if new_child
!= null then
1933 new_child
.parent
= self
1934 assert new_child
isa AMethid
1935 _n_methid
= new_child
1941 if _n_signature
== old_child
then
1942 if new_child
!= null then
1943 new_child
.parent
= self
1944 assert new_child
isa ASignature
1945 _n_signature
= new_child
1953 redef fun n_doc
=(node
)
1956 if node
!= null then
1960 redef fun n_kwredef
=(node
)
1963 if node
!= null then
1967 redef fun n_visibility
=(node
)
1969 _n_visibility
= node
1972 redef fun n_kwmeth
=(node
)
1977 redef fun n_methid
=(node
)
1982 redef fun n_signature
=(node
)
1989 redef fun visit_all
(v
: Visitor)
1991 if _n_doc
!= null then
1992 v
.enter_visit
(_n_doc
.as(not null))
1994 if _n_kwredef
!= null then
1995 v
.enter_visit
(_n_kwredef
.as(not null))
1997 v
.enter_visit
(_n_visibility
)
1998 v
.enter_visit
(_n_kwmeth
)
1999 v
.enter_visit
(_n_methid
)
2000 v
.enter_visit
(_n_signature
)
2003 redef class AExternMethPropdef
2004 private init empty_init
do end
2006 init init_aexternmethpropdef
(
2007 n_doc
: nullable ADoc,
2008 n_kwredef
: nullable TKwredef,
2009 n_visibility
: nullable AVisibility,
2010 n_kwmeth
: nullable TKwmeth,
2011 n_methid
: nullable AMethid,
2012 n_signature
: nullable ASignature,
2013 n_extern
: nullable TString,
2014 n_extern_calls
: nullable AExternCalls,
2015 n_extern_code_block
: nullable AExternCodeBlock
2020 if n_doc
!= null then
2023 _n_kwredef
= n_kwredef
2024 if n_kwredef
!= null then
2025 n_kwredef
.parent
= self
2027 _n_visibility
= n_visibility
.as(not null)
2028 n_visibility
.parent
= self
2029 _n_kwmeth
= n_kwmeth
.as(not null)
2030 n_kwmeth
.parent
= self
2031 _n_methid
= n_methid
.as(not null)
2032 n_methid
.parent
= self
2033 _n_signature
= n_signature
.as(not null)
2034 n_signature
.parent
= self
2035 _n_extern
= n_extern
2036 if n_extern
!= null then
2037 n_extern
.parent
= self
2039 _n_extern_calls
= n_extern_calls
2040 if n_extern_calls
!= null then
2041 n_extern_calls
.parent
= self
2043 _n_extern_code_block
= n_extern_code_block
2044 if n_extern_code_block
!= null then
2045 n_extern_code_block
.parent
= self
2049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2051 if _n_doc
== old_child
then
2052 if new_child
!= null then
2053 new_child
.parent
= self
2054 assert new_child
isa ADoc
2061 if _n_kwredef
== old_child
then
2062 if new_child
!= null then
2063 new_child
.parent
= self
2064 assert new_child
isa TKwredef
2065 _n_kwredef
= new_child
2071 if _n_visibility
== old_child
then
2072 if new_child
!= null then
2073 new_child
.parent
= self
2074 assert new_child
isa AVisibility
2075 _n_visibility
= new_child
2081 if _n_kwmeth
== old_child
then
2082 if new_child
!= null then
2083 new_child
.parent
= self
2084 assert new_child
isa TKwmeth
2085 _n_kwmeth
= new_child
2091 if _n_methid
== old_child
then
2092 if new_child
!= null then
2093 new_child
.parent
= self
2094 assert new_child
isa AMethid
2095 _n_methid
= new_child
2101 if _n_signature
== old_child
then
2102 if new_child
!= null then
2103 new_child
.parent
= self
2104 assert new_child
isa ASignature
2105 _n_signature
= new_child
2111 if _n_extern
== old_child
then
2112 if new_child
!= null then
2113 new_child
.parent
= self
2114 assert new_child
isa TString
2115 _n_extern
= new_child
2121 if _n_extern_calls
== old_child
then
2122 if new_child
!= null then
2123 new_child
.parent
= self
2124 assert new_child
isa AExternCalls
2125 _n_extern_calls
= new_child
2127 _n_extern_calls
= null
2131 if _n_extern_code_block
== old_child
then
2132 if new_child
!= null then
2133 new_child
.parent
= self
2134 assert new_child
isa AExternCodeBlock
2135 _n_extern_code_block
= new_child
2137 _n_extern_code_block
= null
2143 redef fun n_doc
=(node
)
2146 if node
!= null then
2150 redef fun n_kwredef
=(node
)
2153 if node
!= null then
2157 redef fun n_visibility
=(node
)
2159 _n_visibility
= node
2162 redef fun n_kwmeth
=(node
)
2167 redef fun n_methid
=(node
)
2172 redef fun n_signature
=(node
)
2177 redef fun n_extern
=(node
)
2180 if node
!= null then
2184 redef fun n_extern_calls
=(node
)
2186 _n_extern_calls
= node
2187 if node
!= null then
2191 redef fun n_extern_code_block
=(node
)
2193 _n_extern_code_block
= node
2194 if node
!= null then
2200 redef fun visit_all
(v
: Visitor)
2202 if _n_doc
!= null then
2203 v
.enter_visit
(_n_doc
.as(not null))
2205 if _n_kwredef
!= null then
2206 v
.enter_visit
(_n_kwredef
.as(not null))
2208 v
.enter_visit
(_n_visibility
)
2209 v
.enter_visit
(_n_kwmeth
)
2210 v
.enter_visit
(_n_methid
)
2211 v
.enter_visit
(_n_signature
)
2212 if _n_extern
!= null then
2213 v
.enter_visit
(_n_extern
.as(not null))
2215 if _n_extern_calls
!= null then
2216 v
.enter_visit
(_n_extern_calls
.as(not null))
2218 if _n_extern_code_block
!= null then
2219 v
.enter_visit
(_n_extern_code_block
.as(not null))
2223 redef class AConcreteMethPropdef
2224 private init empty_init
do end
2226 init init_aconcretemethpropdef
(
2227 n_doc
: nullable ADoc,
2228 n_kwredef
: nullable TKwredef,
2229 n_visibility
: nullable AVisibility,
2230 n_kwmeth
: nullable TKwmeth,
2231 n_methid
: nullable AMethid,
2232 n_signature
: nullable ASignature,
2233 n_annotations
: nullable AAnnotations,
2234 n_block
: nullable AExpr
2239 if n_doc
!= null then
2242 _n_kwredef
= n_kwredef
2243 if n_kwredef
!= null then
2244 n_kwredef
.parent
= self
2246 _n_visibility
= n_visibility
.as(not null)
2247 n_visibility
.parent
= self
2248 _n_kwmeth
= n_kwmeth
.as(not null)
2249 n_kwmeth
.parent
= self
2250 _n_methid
= n_methid
.as(not null)
2251 n_methid
.parent
= self
2252 _n_signature
= n_signature
.as(not null)
2253 n_signature
.parent
= self
2254 _n_annotations
= n_annotations
2255 if n_annotations
!= null then
2256 n_annotations
.parent
= self
2259 if n_block
!= null then
2260 n_block
.parent
= self
2264 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2266 if _n_doc
== old_child
then
2267 if new_child
!= null then
2268 new_child
.parent
= self
2269 assert new_child
isa ADoc
2276 if _n_kwredef
== old_child
then
2277 if new_child
!= null then
2278 new_child
.parent
= self
2279 assert new_child
isa TKwredef
2280 _n_kwredef
= new_child
2286 if _n_visibility
== old_child
then
2287 if new_child
!= null then
2288 new_child
.parent
= self
2289 assert new_child
isa AVisibility
2290 _n_visibility
= new_child
2296 if _n_kwmeth
== old_child
then
2297 if new_child
!= null then
2298 new_child
.parent
= self
2299 assert new_child
isa TKwmeth
2300 _n_kwmeth
= new_child
2306 if _n_methid
== old_child
then
2307 if new_child
!= null then
2308 new_child
.parent
= self
2309 assert new_child
isa AMethid
2310 _n_methid
= new_child
2316 if _n_signature
== old_child
then
2317 if new_child
!= null then
2318 new_child
.parent
= self
2319 assert new_child
isa ASignature
2320 _n_signature
= new_child
2326 if _n_annotations
== old_child
then
2327 if new_child
!= null then
2328 new_child
.parent
= self
2329 assert new_child
isa AAnnotations
2330 _n_annotations
= new_child
2332 _n_annotations
= null
2336 if _n_block
== old_child
then
2337 if new_child
!= null then
2338 new_child
.parent
= self
2339 assert new_child
isa AExpr
2340 _n_block
= new_child
2348 redef fun n_doc
=(node
)
2351 if node
!= null then
2355 redef fun n_kwredef
=(node
)
2358 if node
!= null then
2362 redef fun n_visibility
=(node
)
2364 _n_visibility
= node
2367 redef fun n_kwmeth
=(node
)
2372 redef fun n_methid
=(node
)
2377 redef fun n_signature
=(node
)
2382 redef fun n_annotations
=(node
)
2384 _n_annotations
= node
2385 if node
!= null then
2389 redef fun n_block
=(node
)
2392 if node
!= null then
2398 redef fun visit_all
(v
: Visitor)
2400 if _n_doc
!= null then
2401 v
.enter_visit
(_n_doc
.as(not null))
2403 if _n_kwredef
!= null then
2404 v
.enter_visit
(_n_kwredef
.as(not null))
2406 v
.enter_visit
(_n_visibility
)
2407 v
.enter_visit
(_n_kwmeth
)
2408 v
.enter_visit
(_n_methid
)
2409 v
.enter_visit
(_n_signature
)
2410 if _n_annotations
!= null then
2411 v
.enter_visit
(_n_annotations
.as(not null))
2413 if _n_block
!= null then
2414 v
.enter_visit
(_n_block
.as(not null))
2418 redef class AConcreteInitPropdef
2419 private init empty_init
do end
2421 init init_aconcreteinitpropdef
(
2422 n_doc
: nullable ADoc,
2423 n_kwredef
: nullable TKwredef,
2424 n_visibility
: nullable AVisibility,
2425 n_kwinit
: nullable TKwinit,
2426 n_methid
: nullable AMethid,
2427 n_signature
: nullable ASignature,
2428 n_annotations
: nullable AAnnotations,
2429 n_block
: nullable AExpr
2434 if n_doc
!= null then
2437 _n_kwredef
= n_kwredef
2438 if n_kwredef
!= null then
2439 n_kwredef
.parent
= self
2441 _n_visibility
= n_visibility
.as(not null)
2442 n_visibility
.parent
= self
2443 _n_kwinit
= n_kwinit
.as(not null)
2444 n_kwinit
.parent
= self
2445 _n_methid
= n_methid
2446 if n_methid
!= null then
2447 n_methid
.parent
= self
2449 _n_signature
= n_signature
.as(not null)
2450 n_signature
.parent
= self
2451 _n_annotations
= n_annotations
2452 if n_annotations
!= null then
2453 n_annotations
.parent
= self
2456 if n_block
!= null then
2457 n_block
.parent
= self
2461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2463 if _n_doc
== old_child
then
2464 if new_child
!= null then
2465 new_child
.parent
= self
2466 assert new_child
isa ADoc
2473 if _n_kwredef
== old_child
then
2474 if new_child
!= null then
2475 new_child
.parent
= self
2476 assert new_child
isa TKwredef
2477 _n_kwredef
= new_child
2483 if _n_visibility
== old_child
then
2484 if new_child
!= null then
2485 new_child
.parent
= self
2486 assert new_child
isa AVisibility
2487 _n_visibility
= new_child
2493 if _n_kwinit
== old_child
then
2494 if new_child
!= null then
2495 new_child
.parent
= self
2496 assert new_child
isa TKwinit
2497 _n_kwinit
= new_child
2503 if _n_methid
== old_child
then
2504 if new_child
!= null then
2505 new_child
.parent
= self
2506 assert new_child
isa AMethid
2507 _n_methid
= new_child
2513 if _n_signature
== old_child
then
2514 if new_child
!= null then
2515 new_child
.parent
= self
2516 assert new_child
isa ASignature
2517 _n_signature
= new_child
2523 if _n_annotations
== old_child
then
2524 if new_child
!= null then
2525 new_child
.parent
= self
2526 assert new_child
isa AAnnotations
2527 _n_annotations
= new_child
2529 _n_annotations
= null
2533 if _n_block
== old_child
then
2534 if new_child
!= null then
2535 new_child
.parent
= self
2536 assert new_child
isa AExpr
2537 _n_block
= new_child
2545 redef fun n_doc
=(node
)
2548 if node
!= null then
2552 redef fun n_kwredef
=(node
)
2555 if node
!= null then
2559 redef fun n_visibility
=(node
)
2561 _n_visibility
= node
2564 redef fun n_kwinit
=(node
)
2569 redef fun n_methid
=(node
)
2572 if node
!= null then
2576 redef fun n_signature
=(node
)
2581 redef fun n_annotations
=(node
)
2583 _n_annotations
= node
2584 if node
!= null then
2588 redef fun n_block
=(node
)
2591 if node
!= null then
2597 redef fun visit_all
(v
: Visitor)
2599 if _n_doc
!= null then
2600 v
.enter_visit
(_n_doc
.as(not null))
2602 if _n_kwredef
!= null then
2603 v
.enter_visit
(_n_kwredef
.as(not null))
2605 v
.enter_visit
(_n_visibility
)
2606 v
.enter_visit
(_n_kwinit
)
2607 if _n_methid
!= null then
2608 v
.enter_visit
(_n_methid
.as(not null))
2610 v
.enter_visit
(_n_signature
)
2611 if _n_annotations
!= null then
2612 v
.enter_visit
(_n_annotations
.as(not null))
2614 if _n_block
!= null then
2615 v
.enter_visit
(_n_block
.as(not null))
2619 redef class AExternInitPropdef
2620 private init empty_init
do end
2622 init init_aexterninitpropdef
(
2623 n_doc
: nullable ADoc,
2624 n_kwredef
: nullable TKwredef,
2625 n_visibility
: nullable AVisibility,
2626 n_kwnew
: nullable TKwnew,
2627 n_methid
: nullable AMethid,
2628 n_signature
: nullable ASignature,
2629 n_extern
: nullable TString,
2630 n_extern_calls
: nullable AExternCalls,
2631 n_extern_code_block
: nullable AExternCodeBlock
2636 if n_doc
!= null then
2639 _n_kwredef
= n_kwredef
2640 if n_kwredef
!= null then
2641 n_kwredef
.parent
= self
2643 _n_visibility
= n_visibility
.as(not null)
2644 n_visibility
.parent
= self
2645 _n_kwnew
= n_kwnew
.as(not null)
2646 n_kwnew
.parent
= self
2647 _n_methid
= n_methid
2648 if n_methid
!= null then
2649 n_methid
.parent
= self
2651 _n_signature
= n_signature
.as(not null)
2652 n_signature
.parent
= self
2653 _n_extern
= n_extern
2654 if n_extern
!= null then
2655 n_extern
.parent
= self
2657 _n_extern_calls
= n_extern_calls
2658 if n_extern_calls
!= null then
2659 n_extern_calls
.parent
= self
2661 _n_extern_code_block
= n_extern_code_block
2662 if n_extern_code_block
!= null then
2663 n_extern_code_block
.parent
= self
2667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2669 if _n_doc
== old_child
then
2670 if new_child
!= null then
2671 new_child
.parent
= self
2672 assert new_child
isa ADoc
2679 if _n_kwredef
== old_child
then
2680 if new_child
!= null then
2681 new_child
.parent
= self
2682 assert new_child
isa TKwredef
2683 _n_kwredef
= new_child
2689 if _n_visibility
== old_child
then
2690 if new_child
!= null then
2691 new_child
.parent
= self
2692 assert new_child
isa AVisibility
2693 _n_visibility
= new_child
2699 if _n_kwnew
== old_child
then
2700 if new_child
!= null then
2701 new_child
.parent
= self
2702 assert new_child
isa TKwnew
2703 _n_kwnew
= new_child
2709 if _n_methid
== old_child
then
2710 if new_child
!= null then
2711 new_child
.parent
= self
2712 assert new_child
isa AMethid
2713 _n_methid
= new_child
2719 if _n_signature
== old_child
then
2720 if new_child
!= null then
2721 new_child
.parent
= self
2722 assert new_child
isa ASignature
2723 _n_signature
= new_child
2729 if _n_extern
== old_child
then
2730 if new_child
!= null then
2731 new_child
.parent
= self
2732 assert new_child
isa TString
2733 _n_extern
= new_child
2739 if _n_extern_calls
== old_child
then
2740 if new_child
!= null then
2741 new_child
.parent
= self
2742 assert new_child
isa AExternCalls
2743 _n_extern_calls
= new_child
2745 _n_extern_calls
= null
2749 if _n_extern_code_block
== old_child
then
2750 if new_child
!= null then
2751 new_child
.parent
= self
2752 assert new_child
isa AExternCodeBlock
2753 _n_extern_code_block
= new_child
2755 _n_extern_code_block
= null
2761 redef fun n_doc
=(node
)
2764 if node
!= null then
2768 redef fun n_kwredef
=(node
)
2771 if node
!= null then
2775 redef fun n_visibility
=(node
)
2777 _n_visibility
= node
2780 redef fun n_kwnew
=(node
)
2785 redef fun n_methid
=(node
)
2788 if node
!= null then
2792 redef fun n_signature
=(node
)
2797 redef fun n_extern
=(node
)
2800 if node
!= null then
2804 redef fun n_extern_calls
=(node
)
2806 _n_extern_calls
= node
2807 if node
!= null then
2811 redef fun n_extern_code_block
=(node
)
2813 _n_extern_code_block
= node
2814 if node
!= null then
2820 redef fun visit_all
(v
: Visitor)
2822 if _n_doc
!= null then
2823 v
.enter_visit
(_n_doc
.as(not null))
2825 if _n_kwredef
!= null then
2826 v
.enter_visit
(_n_kwredef
.as(not null))
2828 v
.enter_visit
(_n_visibility
)
2829 v
.enter_visit
(_n_kwnew
)
2830 if _n_methid
!= null then
2831 v
.enter_visit
(_n_methid
.as(not null))
2833 v
.enter_visit
(_n_signature
)
2834 if _n_extern
!= null then
2835 v
.enter_visit
(_n_extern
.as(not null))
2837 if _n_extern_calls
!= null then
2838 v
.enter_visit
(_n_extern_calls
.as(not null))
2840 if _n_extern_code_block
!= null then
2841 v
.enter_visit
(_n_extern_code_block
.as(not null))
2845 redef class AMainMethPropdef
2846 private init empty_init
do end
2848 init init_amainmethpropdef
(
2849 n_kwredef
: nullable TKwredef,
2850 n_block
: nullable AExpr
2854 _n_kwredef
= n_kwredef
2855 if n_kwredef
!= null then
2856 n_kwredef
.parent
= self
2859 if n_block
!= null then
2860 n_block
.parent
= self
2864 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2866 if _n_kwredef
== old_child
then
2867 if new_child
!= null then
2868 new_child
.parent
= self
2869 assert new_child
isa TKwredef
2870 _n_kwredef
= new_child
2876 if _n_block
== old_child
then
2877 if new_child
!= null then
2878 new_child
.parent
= self
2879 assert new_child
isa AExpr
2880 _n_block
= new_child
2888 redef fun n_kwredef
=(node
)
2891 if node
!= null then
2895 redef fun n_block
=(node
)
2898 if node
!= null then
2904 redef fun visit_all
(v
: Visitor)
2906 if _n_kwredef
!= null then
2907 v
.enter_visit
(_n_kwredef
.as(not null))
2909 if _n_block
!= null then
2910 v
.enter_visit
(_n_block
.as(not null))
2914 redef class ATypePropdef
2915 private init empty_init
do end
2917 init init_atypepropdef
(
2918 n_doc
: nullable ADoc,
2919 n_kwredef
: nullable TKwredef,
2920 n_visibility
: nullable AVisibility,
2921 n_kwtype
: nullable TKwtype,
2922 n_id
: nullable TClassid,
2923 n_type
: nullable AType,
2924 n_annotations
: nullable AAnnotations
2929 if n_doc
!= null then
2932 _n_kwredef
= n_kwredef
2933 if n_kwredef
!= null then
2934 n_kwredef
.parent
= self
2936 _n_visibility
= n_visibility
.as(not null)
2937 n_visibility
.parent
= self
2938 _n_kwtype
= n_kwtype
.as(not null)
2939 n_kwtype
.parent
= self
2940 _n_id
= n_id
.as(not null)
2942 _n_type
= n_type
.as(not null)
2943 n_type
.parent
= self
2944 _n_annotations
= n_annotations
2945 if n_annotations
!= null then
2946 n_annotations
.parent
= self
2950 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2952 if _n_doc
== old_child
then
2953 if new_child
!= null then
2954 new_child
.parent
= self
2955 assert new_child
isa ADoc
2962 if _n_kwredef
== old_child
then
2963 if new_child
!= null then
2964 new_child
.parent
= self
2965 assert new_child
isa TKwredef
2966 _n_kwredef
= new_child
2972 if _n_visibility
== old_child
then
2973 if new_child
!= null then
2974 new_child
.parent
= self
2975 assert new_child
isa AVisibility
2976 _n_visibility
= new_child
2982 if _n_kwtype
== old_child
then
2983 if new_child
!= null then
2984 new_child
.parent
= self
2985 assert new_child
isa TKwtype
2986 _n_kwtype
= new_child
2992 if _n_id
== old_child
then
2993 if new_child
!= null then
2994 new_child
.parent
= self
2995 assert new_child
isa TClassid
3002 if _n_type
== old_child
then
3003 if new_child
!= null then
3004 new_child
.parent
= self
3005 assert new_child
isa AType
3012 if _n_annotations
== old_child
then
3013 if new_child
!= null then
3014 new_child
.parent
= self
3015 assert new_child
isa AAnnotations
3016 _n_annotations
= new_child
3018 _n_annotations
= null
3024 redef fun n_doc
=(node
)
3027 if node
!= null then
3031 redef fun n_kwredef
=(node
)
3034 if node
!= null then
3038 redef fun n_visibility
=(node
)
3040 _n_visibility
= node
3043 redef fun n_kwtype
=(node
)
3048 redef fun n_id
=(node
)
3053 redef fun n_type
=(node
)
3058 redef fun n_annotations
=(node
)
3060 _n_annotations
= node
3061 if node
!= null then
3067 redef fun visit_all
(v
: Visitor)
3069 if _n_doc
!= null then
3070 v
.enter_visit
(_n_doc
.as(not null))
3072 if _n_kwredef
!= null then
3073 v
.enter_visit
(_n_kwredef
.as(not null))
3075 v
.enter_visit
(_n_visibility
)
3076 v
.enter_visit
(_n_kwtype
)
3077 v
.enter_visit
(_n_id
)
3078 v
.enter_visit
(_n_type
)
3079 if _n_annotations
!= null then
3080 v
.enter_visit
(_n_annotations
.as(not null))
3084 redef class AReadAble
3085 private init empty_init
do end
3087 init init_areadable
(
3088 n_kwredef
: nullable TKwredef,
3089 n_kwreadable
: nullable TKwreadable
3093 _n_kwredef
= n_kwredef
3094 if n_kwredef
!= null then
3095 n_kwredef
.parent
= self
3097 _n_kwreadable
= n_kwreadable
.as(not null)
3098 n_kwreadable
.parent
= self
3101 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3103 if _n_kwredef
== old_child
then
3104 if new_child
!= null then
3105 new_child
.parent
= self
3106 assert new_child
isa TKwredef
3107 _n_kwredef
= new_child
3113 if _n_kwreadable
== old_child
then
3114 if new_child
!= null then
3115 new_child
.parent
= self
3116 assert new_child
isa TKwreadable
3117 _n_kwreadable
= new_child
3125 redef fun n_kwredef
=(node
)
3128 if node
!= null then
3132 redef fun n_kwreadable
=(node
)
3134 _n_kwreadable
= node
3139 redef fun visit_all
(v
: Visitor)
3141 if _n_kwredef
!= null then
3142 v
.enter_visit
(_n_kwredef
.as(not null))
3144 v
.enter_visit
(_n_kwreadable
)
3147 redef class AWriteAble
3148 private init empty_init
do end
3150 init init_awriteable
(
3151 n_kwredef
: nullable TKwredef,
3152 n_visibility
: nullable AVisibility,
3153 n_kwwritable
: nullable TKwwritable
3157 _n_kwredef
= n_kwredef
3158 if n_kwredef
!= null then
3159 n_kwredef
.parent
= self
3161 _n_visibility
= n_visibility
3162 if n_visibility
!= null then
3163 n_visibility
.parent
= self
3165 _n_kwwritable
= n_kwwritable
.as(not null)
3166 n_kwwritable
.parent
= self
3169 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3171 if _n_kwredef
== old_child
then
3172 if new_child
!= null then
3173 new_child
.parent
= self
3174 assert new_child
isa TKwredef
3175 _n_kwredef
= new_child
3181 if _n_visibility
== old_child
then
3182 if new_child
!= null then
3183 new_child
.parent
= self
3184 assert new_child
isa AVisibility
3185 _n_visibility
= new_child
3187 _n_visibility
= null
3191 if _n_kwwritable
== old_child
then
3192 if new_child
!= null then
3193 new_child
.parent
= self
3194 assert new_child
isa TKwwritable
3195 _n_kwwritable
= new_child
3203 redef fun n_kwredef
=(node
)
3206 if node
!= null then
3210 redef fun n_visibility
=(node
)
3212 _n_visibility
= node
3213 if node
!= null then
3217 redef fun n_kwwritable
=(node
)
3219 _n_kwwritable
= node
3224 redef fun visit_all
(v
: Visitor)
3226 if _n_kwredef
!= null then
3227 v
.enter_visit
(_n_kwredef
.as(not null))
3229 if _n_visibility
!= null then
3230 v
.enter_visit
(_n_visibility
.as(not null))
3232 v
.enter_visit
(_n_kwwritable
)
3235 redef class AIdMethid
3236 private init empty_init
do end
3238 init init_aidmethid
(
3243 _n_id
= n_id
.as(not null)
3247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3249 if _n_id
== old_child
then
3250 if new_child
!= null then
3251 new_child
.parent
= self
3252 assert new_child
isa TId
3261 redef fun n_id
=(node
)
3268 redef fun visit_all
(v
: Visitor)
3270 v
.enter_visit
(_n_id
)
3273 redef class APlusMethid
3274 private init empty_init
do end
3276 init init_aplusmethid
(
3277 n_plus
: nullable TPlus
3281 _n_plus
= n_plus
.as(not null)
3282 n_plus
.parent
= self
3285 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3287 if _n_plus
== old_child
then
3288 if new_child
!= null then
3289 new_child
.parent
= self
3290 assert new_child
isa TPlus
3299 redef fun n_plus
=(node
)
3306 redef fun visit_all
(v
: Visitor)
3308 v
.enter_visit
(_n_plus
)
3311 redef class AMinusMethid
3312 private init empty_init
do end
3314 init init_aminusmethid
(
3315 n_minus
: nullable TMinus
3319 _n_minus
= n_minus
.as(not null)
3320 n_minus
.parent
= self
3323 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3325 if _n_minus
== old_child
then
3326 if new_child
!= null then
3327 new_child
.parent
= self
3328 assert new_child
isa TMinus
3329 _n_minus
= new_child
3337 redef fun n_minus
=(node
)
3344 redef fun visit_all
(v
: Visitor)
3346 v
.enter_visit
(_n_minus
)
3349 redef class AStarMethid
3350 private init empty_init
do end
3352 init init_astarmethid
(
3353 n_star
: nullable TStar
3357 _n_star
= n_star
.as(not null)
3358 n_star
.parent
= self
3361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3363 if _n_star
== old_child
then
3364 if new_child
!= null then
3365 new_child
.parent
= self
3366 assert new_child
isa TStar
3375 redef fun n_star
=(node
)
3382 redef fun visit_all
(v
: Visitor)
3384 v
.enter_visit
(_n_star
)
3387 redef class ASlashMethid
3388 private init empty_init
do end
3390 init init_aslashmethid
(
3391 n_slash
: nullable TSlash
3395 _n_slash
= n_slash
.as(not null)
3396 n_slash
.parent
= self
3399 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3401 if _n_slash
== old_child
then
3402 if new_child
!= null then
3403 new_child
.parent
= self
3404 assert new_child
isa TSlash
3405 _n_slash
= new_child
3413 redef fun n_slash
=(node
)
3420 redef fun visit_all
(v
: Visitor)
3422 v
.enter_visit
(_n_slash
)
3425 redef class APercentMethid
3426 private init empty_init
do end
3428 init init_apercentmethid
(
3429 n_percent
: nullable TPercent
3433 _n_percent
= n_percent
.as(not null)
3434 n_percent
.parent
= self
3437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3439 if _n_percent
== old_child
then
3440 if new_child
!= null then
3441 new_child
.parent
= self
3442 assert new_child
isa TPercent
3443 _n_percent
= new_child
3451 redef fun n_percent
=(node
)
3458 redef fun visit_all
(v
: Visitor)
3460 v
.enter_visit
(_n_percent
)
3463 redef class AEqMethid
3464 private init empty_init
do end
3466 init init_aeqmethid
(
3471 _n_eq
= n_eq
.as(not null)
3475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3477 if _n_eq
== old_child
then
3478 if new_child
!= null then
3479 new_child
.parent
= self
3480 assert new_child
isa TEq
3489 redef fun n_eq
=(node
)
3496 redef fun visit_all
(v
: Visitor)
3498 v
.enter_visit
(_n_eq
)
3501 redef class ANeMethid
3502 private init empty_init
do end
3504 init init_anemethid
(
3509 _n_ne
= n_ne
.as(not null)
3513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3515 if _n_ne
== old_child
then
3516 if new_child
!= null then
3517 new_child
.parent
= self
3518 assert new_child
isa TNe
3527 redef fun n_ne
=(node
)
3534 redef fun visit_all
(v
: Visitor)
3536 v
.enter_visit
(_n_ne
)
3539 redef class ALeMethid
3540 private init empty_init
do end
3542 init init_alemethid
(
3547 _n_le
= n_le
.as(not null)
3551 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3553 if _n_le
== old_child
then
3554 if new_child
!= null then
3555 new_child
.parent
= self
3556 assert new_child
isa TLe
3565 redef fun n_le
=(node
)
3572 redef fun visit_all
(v
: Visitor)
3574 v
.enter_visit
(_n_le
)
3577 redef class AGeMethid
3578 private init empty_init
do end
3580 init init_agemethid
(
3585 _n_ge
= n_ge
.as(not null)
3589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3591 if _n_ge
== old_child
then
3592 if new_child
!= null then
3593 new_child
.parent
= self
3594 assert new_child
isa TGe
3603 redef fun n_ge
=(node
)
3610 redef fun visit_all
(v
: Visitor)
3612 v
.enter_visit
(_n_ge
)
3615 redef class ALtMethid
3616 private init empty_init
do end
3618 init init_altmethid
(
3623 _n_lt
= n_lt
.as(not null)
3627 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3629 if _n_lt
== old_child
then
3630 if new_child
!= null then
3631 new_child
.parent
= self
3632 assert new_child
isa TLt
3641 redef fun n_lt
=(node
)
3648 redef fun visit_all
(v
: Visitor)
3650 v
.enter_visit
(_n_lt
)
3653 redef class AGtMethid
3654 private init empty_init
do end
3656 init init_agtmethid
(
3661 _n_gt
= n_gt
.as(not null)
3665 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3667 if _n_gt
== old_child
then
3668 if new_child
!= null then
3669 new_child
.parent
= self
3670 assert new_child
isa TGt
3679 redef fun n_gt
=(node
)
3686 redef fun visit_all
(v
: Visitor)
3688 v
.enter_visit
(_n_gt
)
3691 redef class ALlMethid
3692 private init empty_init
do end
3694 init init_allmethid
(
3699 _n_ll
= n_ll
.as(not null)
3703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3705 if _n_ll
== old_child
then
3706 if new_child
!= null then
3707 new_child
.parent
= self
3708 assert new_child
isa TLl
3717 redef fun n_ll
=(node
)
3724 redef fun visit_all
(v
: Visitor)
3726 v
.enter_visit
(_n_ll
)
3729 redef class AGgMethid
3730 private init empty_init
do end
3732 init init_aggmethid
(
3737 _n_gg
= n_gg
.as(not null)
3741 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3743 if _n_gg
== old_child
then
3744 if new_child
!= null then
3745 new_child
.parent
= self
3746 assert new_child
isa TGg
3755 redef fun n_gg
=(node
)
3762 redef fun visit_all
(v
: Visitor)
3764 v
.enter_visit
(_n_gg
)
3767 redef class ABraMethid
3768 private init empty_init
do end
3770 init init_abramethid
(
3771 n_obra
: nullable TObra,
3772 n_cbra
: nullable TCbra
3776 _n_obra
= n_obra
.as(not null)
3777 n_obra
.parent
= self
3778 _n_cbra
= n_cbra
.as(not null)
3779 n_cbra
.parent
= self
3782 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3784 if _n_obra
== old_child
then
3785 if new_child
!= null then
3786 new_child
.parent
= self
3787 assert new_child
isa TObra
3794 if _n_cbra
== old_child
then
3795 if new_child
!= null then
3796 new_child
.parent
= self
3797 assert new_child
isa TCbra
3806 redef fun n_obra
=(node
)
3811 redef fun n_cbra
=(node
)
3818 redef fun visit_all
(v
: Visitor)
3820 v
.enter_visit
(_n_obra
)
3821 v
.enter_visit
(_n_cbra
)
3824 redef class AStarshipMethid
3825 private init empty_init
do end
3827 init init_astarshipmethid
(
3828 n_starship
: nullable TStarship
3832 _n_starship
= n_starship
.as(not null)
3833 n_starship
.parent
= self
3836 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3838 if _n_starship
== old_child
then
3839 if new_child
!= null then
3840 new_child
.parent
= self
3841 assert new_child
isa TStarship
3842 _n_starship
= new_child
3850 redef fun n_starship
=(node
)
3857 redef fun visit_all
(v
: Visitor)
3859 v
.enter_visit
(_n_starship
)
3862 redef class AAssignMethid
3863 private init empty_init
do end
3865 init init_aassignmethid
(
3867 n_assign
: nullable TAssign
3871 _n_id
= n_id
.as(not null)
3873 _n_assign
= n_assign
.as(not null)
3874 n_assign
.parent
= self
3877 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3879 if _n_id
== old_child
then
3880 if new_child
!= null then
3881 new_child
.parent
= self
3882 assert new_child
isa TId
3889 if _n_assign
== old_child
then
3890 if new_child
!= null then
3891 new_child
.parent
= self
3892 assert new_child
isa TAssign
3893 _n_assign
= new_child
3901 redef fun n_id
=(node
)
3906 redef fun n_assign
=(node
)
3913 redef fun visit_all
(v
: Visitor)
3915 v
.enter_visit
(_n_id
)
3916 v
.enter_visit
(_n_assign
)
3919 redef class ABraassignMethid
3920 private init empty_init
do end
3922 init init_abraassignmethid
(
3923 n_obra
: nullable TObra,
3924 n_cbra
: nullable TCbra,
3925 n_assign
: nullable TAssign
3929 _n_obra
= n_obra
.as(not null)
3930 n_obra
.parent
= self
3931 _n_cbra
= n_cbra
.as(not null)
3932 n_cbra
.parent
= self
3933 _n_assign
= n_assign
.as(not null)
3934 n_assign
.parent
= self
3937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3939 if _n_obra
== old_child
then
3940 if new_child
!= null then
3941 new_child
.parent
= self
3942 assert new_child
isa TObra
3949 if _n_cbra
== old_child
then
3950 if new_child
!= null then
3951 new_child
.parent
= self
3952 assert new_child
isa TCbra
3959 if _n_assign
== old_child
then
3960 if new_child
!= null then
3961 new_child
.parent
= self
3962 assert new_child
isa TAssign
3963 _n_assign
= new_child
3971 redef fun n_obra
=(node
)
3976 redef fun n_cbra
=(node
)
3981 redef fun n_assign
=(node
)
3988 redef fun visit_all
(v
: Visitor)
3990 v
.enter_visit
(_n_obra
)
3991 v
.enter_visit
(_n_cbra
)
3992 v
.enter_visit
(_n_assign
)
3995 redef class ASignature
3996 private init empty_init
do end
3998 init init_asignature
(
3999 n_opar
: nullable TOpar,
4000 n_params
: Collection[Object], # Should be Collection[AParam]
4001 n_cpar
: nullable TCpar,
4002 n_type
: nullable AType
4007 if n_opar
!= null then
4008 n_opar
.parent
= self
4010 for n
in n_params
do
4016 if n_cpar
!= null then
4017 n_cpar
.parent
= self
4020 if n_type
!= null then
4021 n_type
.parent
= self
4025 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4027 if _n_opar
== old_child
then
4028 if new_child
!= null then
4029 new_child
.parent
= self
4030 assert new_child
isa TOpar
4037 for i
in [0.._n_params
.length
[ do
4038 if _n_params
[i
] == old_child
then
4039 if new_child
!= null then
4040 assert new_child
isa AParam
4041 _n_params
[i
] = new_child
4042 new_child
.parent
= self
4044 _n_params
.remove_at
(i
)
4049 if _n_cpar
== old_child
then
4050 if new_child
!= null then
4051 new_child
.parent
= self
4052 assert new_child
isa TCpar
4059 if _n_type
== old_child
then
4060 if new_child
!= null then
4061 new_child
.parent
= self
4062 assert new_child
isa AType
4071 redef fun n_opar
=(node
)
4074 if node
!= null then
4078 redef fun n_cpar
=(node
)
4081 if node
!= null then
4085 redef fun n_type
=(node
)
4088 if node
!= null then
4094 redef fun visit_all
(v
: Visitor)
4096 if _n_opar
!= null then
4097 v
.enter_visit
(_n_opar
.as(not null))
4099 for n
in _n_params
do
4102 if _n_cpar
!= null then
4103 v
.enter_visit
(_n_cpar
.as(not null))
4105 if _n_type
!= null then
4106 v
.enter_visit
(_n_type
.as(not null))
4111 private init empty_init
do end
4115 n_type
: nullable AType,
4116 n_dotdotdot
: nullable TDotdotdot,
4117 n_annotations
: nullable AAnnotations
4121 _n_id
= n_id
.as(not null)
4124 if n_type
!= null then
4125 n_type
.parent
= self
4127 _n_dotdotdot
= n_dotdotdot
4128 if n_dotdotdot
!= null then
4129 n_dotdotdot
.parent
= self
4131 _n_annotations
= n_annotations
4132 if n_annotations
!= null then
4133 n_annotations
.parent
= self
4137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4139 if _n_id
== old_child
then
4140 if new_child
!= null then
4141 new_child
.parent
= self
4142 assert new_child
isa TId
4149 if _n_type
== old_child
then
4150 if new_child
!= null then
4151 new_child
.parent
= self
4152 assert new_child
isa AType
4159 if _n_dotdotdot
== old_child
then
4160 if new_child
!= null then
4161 new_child
.parent
= self
4162 assert new_child
isa TDotdotdot
4163 _n_dotdotdot
= new_child
4169 if _n_annotations
== old_child
then
4170 if new_child
!= null then
4171 new_child
.parent
= self
4172 assert new_child
isa AAnnotations
4173 _n_annotations
= new_child
4175 _n_annotations
= null
4181 redef fun n_id
=(node
)
4186 redef fun n_type
=(node
)
4189 if node
!= null then
4193 redef fun n_dotdotdot
=(node
)
4196 if node
!= null then
4200 redef fun n_annotations
=(node
)
4202 _n_annotations
= node
4203 if node
!= null then
4209 redef fun visit_all
(v
: Visitor)
4211 v
.enter_visit
(_n_id
)
4212 if _n_type
!= null then
4213 v
.enter_visit
(_n_type
.as(not null))
4215 if _n_dotdotdot
!= null then
4216 v
.enter_visit
(_n_dotdotdot
.as(not null))
4218 if _n_annotations
!= null then
4219 v
.enter_visit
(_n_annotations
.as(not null))
4224 private init empty_init
do end
4227 n_kwnullable
: nullable TKwnullable,
4228 n_id
: nullable TClassid,
4229 n_types
: Collection[Object], # Should be Collection[AType]
4230 n_annotations
: nullable AAnnotations
4234 _n_kwnullable
= n_kwnullable
4235 if n_kwnullable
!= null then
4236 n_kwnullable
.parent
= self
4238 _n_id
= n_id
.as(not null)
4245 _n_annotations
= n_annotations
4246 if n_annotations
!= null then
4247 n_annotations
.parent
= self
4251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4253 if _n_kwnullable
== old_child
then
4254 if new_child
!= null then
4255 new_child
.parent
= self
4256 assert new_child
isa TKwnullable
4257 _n_kwnullable
= new_child
4259 _n_kwnullable
= null
4263 if _n_id
== old_child
then
4264 if new_child
!= null then
4265 new_child
.parent
= self
4266 assert new_child
isa TClassid
4273 for i
in [0.._n_types
.length
[ do
4274 if _n_types
[i
] == old_child
then
4275 if new_child
!= null then
4276 assert new_child
isa AType
4277 _n_types
[i
] = new_child
4278 new_child
.parent
= self
4280 _n_types
.remove_at
(i
)
4285 if _n_annotations
== old_child
then
4286 if new_child
!= null then
4287 new_child
.parent
= self
4288 assert new_child
isa AAnnotations
4289 _n_annotations
= new_child
4291 _n_annotations
= null
4297 redef fun n_kwnullable
=(node
)
4299 _n_kwnullable
= node
4300 if node
!= null then
4304 redef fun n_id
=(node
)
4309 redef fun n_annotations
=(node
)
4311 _n_annotations
= node
4312 if node
!= null then
4318 redef fun visit_all
(v
: Visitor)
4320 if _n_kwnullable
!= null then
4321 v
.enter_visit
(_n_kwnullable
.as(not null))
4323 v
.enter_visit
(_n_id
)
4324 for n
in _n_types
do
4327 if _n_annotations
!= null then
4328 v
.enter_visit
(_n_annotations
.as(not null))
4333 private init empty_init
do end
4336 n_kwlabel
: nullable TKwlabel,
4341 _n_kwlabel
= n_kwlabel
.as(not null)
4342 n_kwlabel
.parent
= self
4343 _n_id
= n_id
.as(not null)
4347 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4349 if _n_kwlabel
== old_child
then
4350 if new_child
!= null then
4351 new_child
.parent
= self
4352 assert new_child
isa TKwlabel
4353 _n_kwlabel
= new_child
4359 if _n_id
== old_child
then
4360 if new_child
!= null then
4361 new_child
.parent
= self
4362 assert new_child
isa TId
4371 redef fun n_kwlabel
=(node
)
4376 redef fun n_id
=(node
)
4383 redef fun visit_all
(v
: Visitor)
4385 v
.enter_visit
(_n_kwlabel
)
4386 v
.enter_visit
(_n_id
)
4389 redef class ABlockExpr
4390 private init empty_init
do end
4392 init init_ablockexpr
(
4393 n_expr
: Collection[Object], # Should be Collection[AExpr]
4394 n_kwend
: nullable TKwend
4404 if n_kwend
!= null then
4405 n_kwend
.parent
= self
4409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4411 for i
in [0.._n_expr
.length
[ do
4412 if _n_expr
[i
] == old_child
then
4413 if new_child
!= null then
4414 assert new_child
isa AExpr
4415 _n_expr
[i
] = new_child
4416 new_child
.parent
= self
4418 _n_expr
.remove_at
(i
)
4423 if _n_kwend
== old_child
then
4424 if new_child
!= null then
4425 new_child
.parent
= self
4426 assert new_child
isa TKwend
4427 _n_kwend
= new_child
4435 redef fun n_kwend
=(node
)
4438 if node
!= null then
4444 redef fun visit_all
(v
: Visitor)
4449 if _n_kwend
!= null then
4450 v
.enter_visit
(_n_kwend
.as(not null))
4454 redef class AVardeclExpr
4455 private init empty_init
do end
4457 init init_avardeclexpr
(
4458 n_kwvar
: nullable TKwvar,
4460 n_type
: nullable AType,
4461 n_assign
: nullable TAssign,
4462 n_expr
: nullable AExpr,
4463 n_annotations
: nullable AAnnotations
4467 _n_kwvar
= n_kwvar
.as(not null)
4468 n_kwvar
.parent
= self
4469 _n_id
= n_id
.as(not null)
4472 if n_type
!= null then
4473 n_type
.parent
= self
4475 _n_assign
= n_assign
4476 if n_assign
!= null then
4477 n_assign
.parent
= self
4480 if n_expr
!= null then
4481 n_expr
.parent
= self
4483 _n_annotations
= n_annotations
4484 if n_annotations
!= null then
4485 n_annotations
.parent
= self
4489 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4491 if _n_kwvar
== old_child
then
4492 if new_child
!= null then
4493 new_child
.parent
= self
4494 assert new_child
isa TKwvar
4495 _n_kwvar
= new_child
4501 if _n_id
== old_child
then
4502 if new_child
!= null then
4503 new_child
.parent
= self
4504 assert new_child
isa TId
4511 if _n_type
== old_child
then
4512 if new_child
!= null then
4513 new_child
.parent
= self
4514 assert new_child
isa AType
4521 if _n_assign
== old_child
then
4522 if new_child
!= null then
4523 new_child
.parent
= self
4524 assert new_child
isa TAssign
4525 _n_assign
= new_child
4531 if _n_expr
== old_child
then
4532 if new_child
!= null then
4533 new_child
.parent
= self
4534 assert new_child
isa AExpr
4541 if _n_annotations
== old_child
then
4542 if new_child
!= null then
4543 new_child
.parent
= self
4544 assert new_child
isa AAnnotations
4545 _n_annotations
= new_child
4547 _n_annotations
= null
4553 redef fun n_kwvar
=(node
)
4558 redef fun n_id
=(node
)
4563 redef fun n_type
=(node
)
4566 if node
!= null then
4570 redef fun n_assign
=(node
)
4573 if node
!= null then
4577 redef fun n_expr
=(node
)
4580 if node
!= null then
4584 redef fun n_annotations
=(node
)
4586 _n_annotations
= node
4587 if node
!= null then
4593 redef fun visit_all
(v
: Visitor)
4595 v
.enter_visit
(_n_kwvar
)
4596 v
.enter_visit
(_n_id
)
4597 if _n_type
!= null then
4598 v
.enter_visit
(_n_type
.as(not null))
4600 if _n_assign
!= null then
4601 v
.enter_visit
(_n_assign
.as(not null))
4603 if _n_expr
!= null then
4604 v
.enter_visit
(_n_expr
.as(not null))
4606 if _n_annotations
!= null then
4607 v
.enter_visit
(_n_annotations
.as(not null))
4611 redef class AReturnExpr
4612 private init empty_init
do end
4614 init init_areturnexpr
(
4615 n_kwreturn
: nullable TKwreturn,
4616 n_expr
: nullable AExpr
4620 _n_kwreturn
= n_kwreturn
4621 if n_kwreturn
!= null then
4622 n_kwreturn
.parent
= self
4625 if n_expr
!= null then
4626 n_expr
.parent
= self
4630 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4632 if _n_kwreturn
== old_child
then
4633 if new_child
!= null then
4634 new_child
.parent
= self
4635 assert new_child
isa TKwreturn
4636 _n_kwreturn
= new_child
4642 if _n_expr
== old_child
then
4643 if new_child
!= null then
4644 new_child
.parent
= self
4645 assert new_child
isa AExpr
4654 redef fun n_kwreturn
=(node
)
4657 if node
!= null then
4661 redef fun n_expr
=(node
)
4664 if node
!= null then
4670 redef fun visit_all
(v
: Visitor)
4672 if _n_kwreturn
!= null then
4673 v
.enter_visit
(_n_kwreturn
.as(not null))
4675 if _n_expr
!= null then
4676 v
.enter_visit
(_n_expr
.as(not null))
4680 redef class ABreakExpr
4681 private init empty_init
do end
4683 init init_abreakexpr
(
4684 n_kwbreak
: nullable TKwbreak,
4685 n_label
: nullable ALabel,
4686 n_expr
: nullable AExpr
4690 _n_kwbreak
= n_kwbreak
.as(not null)
4691 n_kwbreak
.parent
= self
4693 if n_label
!= null then
4694 n_label
.parent
= self
4697 if n_expr
!= null then
4698 n_expr
.parent
= self
4702 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4704 if _n_kwbreak
== old_child
then
4705 if new_child
!= null then
4706 new_child
.parent
= self
4707 assert new_child
isa TKwbreak
4708 _n_kwbreak
= new_child
4714 if _n_label
== old_child
then
4715 if new_child
!= null then
4716 new_child
.parent
= self
4717 assert new_child
isa ALabel
4718 _n_label
= new_child
4724 if _n_expr
== old_child
then
4725 if new_child
!= null then
4726 new_child
.parent
= self
4727 assert new_child
isa AExpr
4736 redef fun n_kwbreak
=(node
)
4741 redef fun n_label
=(node
)
4744 if node
!= null then
4748 redef fun n_expr
=(node
)
4751 if node
!= null then
4757 redef fun visit_all
(v
: Visitor)
4759 v
.enter_visit
(_n_kwbreak
)
4760 if _n_label
!= null then
4761 v
.enter_visit
(_n_label
.as(not null))
4763 if _n_expr
!= null then
4764 v
.enter_visit
(_n_expr
.as(not null))
4768 redef class AAbortExpr
4769 private init empty_init
do end
4771 init init_aabortexpr
(
4772 n_kwabort
: nullable TKwabort
4776 _n_kwabort
= n_kwabort
.as(not null)
4777 n_kwabort
.parent
= self
4780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4782 if _n_kwabort
== old_child
then
4783 if new_child
!= null then
4784 new_child
.parent
= self
4785 assert new_child
isa TKwabort
4786 _n_kwabort
= new_child
4794 redef fun n_kwabort
=(node
)
4801 redef fun visit_all
(v
: Visitor)
4803 v
.enter_visit
(_n_kwabort
)
4806 redef class AContinueExpr
4807 private init empty_init
do end
4809 init init_acontinueexpr
(
4810 n_kwcontinue
: nullable TKwcontinue,
4811 n_label
: nullable ALabel,
4812 n_expr
: nullable AExpr
4816 _n_kwcontinue
= n_kwcontinue
4817 if n_kwcontinue
!= null then
4818 n_kwcontinue
.parent
= self
4821 if n_label
!= null then
4822 n_label
.parent
= self
4825 if n_expr
!= null then
4826 n_expr
.parent
= self
4830 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4832 if _n_kwcontinue
== old_child
then
4833 if new_child
!= null then
4834 new_child
.parent
= self
4835 assert new_child
isa TKwcontinue
4836 _n_kwcontinue
= new_child
4838 _n_kwcontinue
= null
4842 if _n_label
== old_child
then
4843 if new_child
!= null then
4844 new_child
.parent
= self
4845 assert new_child
isa ALabel
4846 _n_label
= new_child
4852 if _n_expr
== old_child
then
4853 if new_child
!= null then
4854 new_child
.parent
= self
4855 assert new_child
isa AExpr
4864 redef fun n_kwcontinue
=(node
)
4866 _n_kwcontinue
= node
4867 if node
!= null then
4871 redef fun n_label
=(node
)
4874 if node
!= null then
4878 redef fun n_expr
=(node
)
4881 if node
!= null then
4887 redef fun visit_all
(v
: Visitor)
4889 if _n_kwcontinue
!= null then
4890 v
.enter_visit
(_n_kwcontinue
.as(not null))
4892 if _n_label
!= null then
4893 v
.enter_visit
(_n_label
.as(not null))
4895 if _n_expr
!= null then
4896 v
.enter_visit
(_n_expr
.as(not null))
4901 private init empty_init
do end
4904 n_kwdo
: nullable TKwdo,
4905 n_block
: nullable AExpr,
4906 n_label
: nullable ALabel
4910 _n_kwdo
= n_kwdo
.as(not null)
4911 n_kwdo
.parent
= self
4913 if n_block
!= null then
4914 n_block
.parent
= self
4917 if n_label
!= null then
4918 n_label
.parent
= self
4922 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4924 if _n_kwdo
== old_child
then
4925 if new_child
!= null then
4926 new_child
.parent
= self
4927 assert new_child
isa TKwdo
4934 if _n_block
== old_child
then
4935 if new_child
!= null then
4936 new_child
.parent
= self
4937 assert new_child
isa AExpr
4938 _n_block
= new_child
4944 if _n_label
== old_child
then
4945 if new_child
!= null then
4946 new_child
.parent
= self
4947 assert new_child
isa ALabel
4948 _n_label
= new_child
4956 redef fun n_kwdo
=(node
)
4961 redef fun n_block
=(node
)
4964 if node
!= null then
4968 redef fun n_label
=(node
)
4971 if node
!= null then
4977 redef fun visit_all
(v
: Visitor)
4979 v
.enter_visit
(_n_kwdo
)
4980 if _n_block
!= null then
4981 v
.enter_visit
(_n_block
.as(not null))
4983 if _n_label
!= null then
4984 v
.enter_visit
(_n_label
.as(not null))
4989 private init empty_init
do end
4992 n_kwif
: nullable TKwif,
4993 n_expr
: nullable AExpr,
4994 n_then
: nullable AExpr,
4995 n_else
: nullable AExpr
4999 _n_kwif
= n_kwif
.as(not null)
5000 n_kwif
.parent
= self
5001 _n_expr
= n_expr
.as(not null)
5002 n_expr
.parent
= self
5004 if n_then
!= null then
5005 n_then
.parent
= self
5008 if n_else
!= null then
5009 n_else
.parent
= self
5013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5015 if _n_kwif
== old_child
then
5016 if new_child
!= null then
5017 new_child
.parent
= self
5018 assert new_child
isa TKwif
5025 if _n_expr
== old_child
then
5026 if new_child
!= null then
5027 new_child
.parent
= self
5028 assert new_child
isa AExpr
5035 if _n_then
== old_child
then
5036 if new_child
!= null then
5037 new_child
.parent
= self
5038 assert new_child
isa AExpr
5045 if _n_else
== old_child
then
5046 if new_child
!= null then
5047 new_child
.parent
= self
5048 assert new_child
isa AExpr
5057 redef fun n_kwif
=(node
)
5062 redef fun n_expr
=(node
)
5067 redef fun n_then
=(node
)
5070 if node
!= null then
5074 redef fun n_else
=(node
)
5077 if node
!= null then
5083 redef fun visit_all
(v
: Visitor)
5085 v
.enter_visit
(_n_kwif
)
5086 v
.enter_visit
(_n_expr
)
5087 if _n_then
!= null then
5088 v
.enter_visit
(_n_then
.as(not null))
5090 if _n_else
!= null then
5091 v
.enter_visit
(_n_else
.as(not null))
5095 redef class AIfexprExpr
5096 private init empty_init
do end
5098 init init_aifexprexpr
(
5099 n_kwif
: nullable TKwif,
5100 n_expr
: nullable AExpr,
5101 n_kwthen
: nullable TKwthen,
5102 n_then
: nullable AExpr,
5103 n_kwelse
: nullable TKwelse,
5104 n_else
: nullable AExpr
5108 _n_kwif
= n_kwif
.as(not null)
5109 n_kwif
.parent
= self
5110 _n_expr
= n_expr
.as(not null)
5111 n_expr
.parent
= self
5112 _n_kwthen
= n_kwthen
.as(not null)
5113 n_kwthen
.parent
= self
5114 _n_then
= n_then
.as(not null)
5115 n_then
.parent
= self
5116 _n_kwelse
= n_kwelse
.as(not null)
5117 n_kwelse
.parent
= self
5118 _n_else
= n_else
.as(not null)
5119 n_else
.parent
= self
5122 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5124 if _n_kwif
== old_child
then
5125 if new_child
!= null then
5126 new_child
.parent
= self
5127 assert new_child
isa TKwif
5134 if _n_expr
== old_child
then
5135 if new_child
!= null then
5136 new_child
.parent
= self
5137 assert new_child
isa AExpr
5144 if _n_kwthen
== old_child
then
5145 if new_child
!= null then
5146 new_child
.parent
= self
5147 assert new_child
isa TKwthen
5148 _n_kwthen
= new_child
5154 if _n_then
== old_child
then
5155 if new_child
!= null then
5156 new_child
.parent
= self
5157 assert new_child
isa AExpr
5164 if _n_kwelse
== old_child
then
5165 if new_child
!= null then
5166 new_child
.parent
= self
5167 assert new_child
isa TKwelse
5168 _n_kwelse
= new_child
5174 if _n_else
== old_child
then
5175 if new_child
!= null then
5176 new_child
.parent
= self
5177 assert new_child
isa AExpr
5186 redef fun n_kwif
=(node
)
5191 redef fun n_expr
=(node
)
5196 redef fun n_kwthen
=(node
)
5201 redef fun n_then
=(node
)
5206 redef fun n_kwelse
=(node
)
5211 redef fun n_else
=(node
)
5218 redef fun visit_all
(v
: Visitor)
5220 v
.enter_visit
(_n_kwif
)
5221 v
.enter_visit
(_n_expr
)
5222 v
.enter_visit
(_n_kwthen
)
5223 v
.enter_visit
(_n_then
)
5224 v
.enter_visit
(_n_kwelse
)
5225 v
.enter_visit
(_n_else
)
5228 redef class AWhileExpr
5229 private init empty_init
do end
5231 init init_awhileexpr
(
5232 n_kwwhile
: nullable TKwwhile,
5233 n_expr
: nullable AExpr,
5234 n_kwdo
: nullable TKwdo,
5235 n_block
: nullable AExpr,
5236 n_label
: nullable ALabel
5240 _n_kwwhile
= n_kwwhile
.as(not null)
5241 n_kwwhile
.parent
= self
5242 _n_expr
= n_expr
.as(not null)
5243 n_expr
.parent
= self
5244 _n_kwdo
= n_kwdo
.as(not null)
5245 n_kwdo
.parent
= self
5247 if n_block
!= null then
5248 n_block
.parent
= self
5251 if n_label
!= null then
5252 n_label
.parent
= self
5256 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5258 if _n_kwwhile
== old_child
then
5259 if new_child
!= null then
5260 new_child
.parent
= self
5261 assert new_child
isa TKwwhile
5262 _n_kwwhile
= new_child
5268 if _n_expr
== old_child
then
5269 if new_child
!= null then
5270 new_child
.parent
= self
5271 assert new_child
isa AExpr
5278 if _n_kwdo
== old_child
then
5279 if new_child
!= null then
5280 new_child
.parent
= self
5281 assert new_child
isa TKwdo
5288 if _n_block
== old_child
then
5289 if new_child
!= null then
5290 new_child
.parent
= self
5291 assert new_child
isa AExpr
5292 _n_block
= new_child
5298 if _n_label
== old_child
then
5299 if new_child
!= null then
5300 new_child
.parent
= self
5301 assert new_child
isa ALabel
5302 _n_label
= new_child
5310 redef fun n_kwwhile
=(node
)
5315 redef fun n_expr
=(node
)
5320 redef fun n_kwdo
=(node
)
5325 redef fun n_block
=(node
)
5328 if node
!= null then
5332 redef fun n_label
=(node
)
5335 if node
!= null then
5341 redef fun visit_all
(v
: Visitor)
5343 v
.enter_visit
(_n_kwwhile
)
5344 v
.enter_visit
(_n_expr
)
5345 v
.enter_visit
(_n_kwdo
)
5346 if _n_block
!= null then
5347 v
.enter_visit
(_n_block
.as(not null))
5349 if _n_label
!= null then
5350 v
.enter_visit
(_n_label
.as(not null))
5354 redef class ALoopExpr
5355 private init empty_init
do end
5357 init init_aloopexpr
(
5358 n_kwloop
: nullable TKwloop,
5359 n_block
: nullable AExpr,
5360 n_label
: nullable ALabel
5364 _n_kwloop
= n_kwloop
.as(not null)
5365 n_kwloop
.parent
= self
5367 if n_block
!= null then
5368 n_block
.parent
= self
5371 if n_label
!= null then
5372 n_label
.parent
= self
5376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5378 if _n_kwloop
== old_child
then
5379 if new_child
!= null then
5380 new_child
.parent
= self
5381 assert new_child
isa TKwloop
5382 _n_kwloop
= new_child
5388 if _n_block
== old_child
then
5389 if new_child
!= null then
5390 new_child
.parent
= self
5391 assert new_child
isa AExpr
5392 _n_block
= new_child
5398 if _n_label
== old_child
then
5399 if new_child
!= null then
5400 new_child
.parent
= self
5401 assert new_child
isa ALabel
5402 _n_label
= new_child
5410 redef fun n_kwloop
=(node
)
5415 redef fun n_block
=(node
)
5418 if node
!= null then
5422 redef fun n_label
=(node
)
5425 if node
!= null then
5431 redef fun visit_all
(v
: Visitor)
5433 v
.enter_visit
(_n_kwloop
)
5434 if _n_block
!= null then
5435 v
.enter_visit
(_n_block
.as(not null))
5437 if _n_label
!= null then
5438 v
.enter_visit
(_n_label
.as(not null))
5442 redef class AForExpr
5443 private init empty_init
do end
5445 init init_aforexpr
(
5446 n_kwfor
: nullable TKwfor,
5447 n_ids
: Collection[Object], # Should be Collection[TId]
5448 n_expr
: nullable AExpr,
5449 n_kwdo
: nullable TKwdo,
5450 n_block
: nullable AExpr,
5451 n_label
: nullable ALabel
5455 _n_kwfor
= n_kwfor
.as(not null)
5456 n_kwfor
.parent
= self
5462 _n_expr
= n_expr
.as(not null)
5463 n_expr
.parent
= self
5464 _n_kwdo
= n_kwdo
.as(not null)
5465 n_kwdo
.parent
= self
5467 if n_block
!= null then
5468 n_block
.parent
= self
5471 if n_label
!= null then
5472 n_label
.parent
= self
5476 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5478 if _n_kwfor
== old_child
then
5479 if new_child
!= null then
5480 new_child
.parent
= self
5481 assert new_child
isa TKwfor
5482 _n_kwfor
= new_child
5488 for i
in [0.._n_ids
.length
[ do
5489 if _n_ids
[i
] == old_child
then
5490 if new_child
!= null then
5491 assert new_child
isa TId
5492 _n_ids
[i
] = new_child
5493 new_child
.parent
= self
5500 if _n_expr
== old_child
then
5501 if new_child
!= null then
5502 new_child
.parent
= self
5503 assert new_child
isa AExpr
5510 if _n_kwdo
== old_child
then
5511 if new_child
!= null then
5512 new_child
.parent
= self
5513 assert new_child
isa TKwdo
5520 if _n_block
== old_child
then
5521 if new_child
!= null then
5522 new_child
.parent
= self
5523 assert new_child
isa AExpr
5524 _n_block
= new_child
5530 if _n_label
== old_child
then
5531 if new_child
!= null then
5532 new_child
.parent
= self
5533 assert new_child
isa ALabel
5534 _n_label
= new_child
5542 redef fun n_kwfor
=(node
)
5547 redef fun n_expr
=(node
)
5552 redef fun n_kwdo
=(node
)
5557 redef fun n_block
=(node
)
5560 if node
!= null then
5564 redef fun n_label
=(node
)
5567 if node
!= null then
5573 redef fun visit_all
(v
: Visitor)
5575 v
.enter_visit
(_n_kwfor
)
5579 v
.enter_visit
(_n_expr
)
5580 v
.enter_visit
(_n_kwdo
)
5581 if _n_block
!= null then
5582 v
.enter_visit
(_n_block
.as(not null))
5584 if _n_label
!= null then
5585 v
.enter_visit
(_n_label
.as(not null))
5589 redef class AAssertExpr
5590 private init empty_init
do end
5592 init init_aassertexpr
(
5593 n_kwassert
: nullable TKwassert,
5595 n_expr
: nullable AExpr,
5596 n_else
: nullable AExpr
5600 _n_kwassert
= n_kwassert
.as(not null)
5601 n_kwassert
.parent
= self
5603 if n_id
!= null then
5606 _n_expr
= n_expr
.as(not null)
5607 n_expr
.parent
= self
5609 if n_else
!= null then
5610 n_else
.parent
= self
5614 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5616 if _n_kwassert
== old_child
then
5617 if new_child
!= null then
5618 new_child
.parent
= self
5619 assert new_child
isa TKwassert
5620 _n_kwassert
= new_child
5626 if _n_id
== old_child
then
5627 if new_child
!= null then
5628 new_child
.parent
= self
5629 assert new_child
isa TId
5636 if _n_expr
== old_child
then
5637 if new_child
!= null then
5638 new_child
.parent
= self
5639 assert new_child
isa AExpr
5646 if _n_else
== old_child
then
5647 if new_child
!= null then
5648 new_child
.parent
= self
5649 assert new_child
isa AExpr
5658 redef fun n_kwassert
=(node
)
5663 redef fun n_id
=(node
)
5666 if node
!= null then
5670 redef fun n_expr
=(node
)
5675 redef fun n_else
=(node
)
5678 if node
!= null then
5684 redef fun visit_all
(v
: Visitor)
5686 v
.enter_visit
(_n_kwassert
)
5687 if _n_id
!= null then
5688 v
.enter_visit
(_n_id
.as(not null))
5690 v
.enter_visit
(_n_expr
)
5691 if _n_else
!= null then
5692 v
.enter_visit
(_n_else
.as(not null))
5696 redef class AOnceExpr
5697 private init empty_init
do end
5699 init init_aonceexpr
(
5700 n_kwonce
: nullable TKwonce,
5701 n_expr
: nullable AExpr
5705 _n_kwonce
= n_kwonce
.as(not null)
5706 n_kwonce
.parent
= self
5707 _n_expr
= n_expr
.as(not null)
5708 n_expr
.parent
= self
5711 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5713 if _n_kwonce
== old_child
then
5714 if new_child
!= null then
5715 new_child
.parent
= self
5716 assert new_child
isa TKwonce
5717 _n_kwonce
= new_child
5723 if _n_expr
== old_child
then
5724 if new_child
!= null then
5725 new_child
.parent
= self
5726 assert new_child
isa AExpr
5735 redef fun n_kwonce
=(node
)
5740 redef fun n_expr
=(node
)
5747 redef fun visit_all
(v
: Visitor)
5749 v
.enter_visit
(_n_kwonce
)
5750 v
.enter_visit
(_n_expr
)
5753 redef class ASendExpr
5754 private init empty_init
do end
5756 init init_asendexpr
(
5757 n_expr
: nullable AExpr
5761 _n_expr
= n_expr
.as(not null)
5762 n_expr
.parent
= self
5765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5767 if _n_expr
== old_child
then
5768 if new_child
!= null then
5769 new_child
.parent
= self
5770 assert new_child
isa AExpr
5779 redef fun n_expr
=(node
)
5786 redef fun visit_all
(v
: Visitor)
5788 v
.enter_visit
(_n_expr
)
5791 redef class ABinopExpr
5792 private init empty_init
do end
5794 init init_abinopexpr
(
5795 n_expr
: nullable AExpr,
5796 n_expr2
: nullable AExpr
5800 _n_expr
= n_expr
.as(not null)
5801 n_expr
.parent
= self
5802 _n_expr2
= n_expr2
.as(not null)
5803 n_expr2
.parent
= self
5806 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5808 if _n_expr
== old_child
then
5809 if new_child
!= null then
5810 new_child
.parent
= self
5811 assert new_child
isa AExpr
5818 if _n_expr2
== old_child
then
5819 if new_child
!= null then
5820 new_child
.parent
= self
5821 assert new_child
isa AExpr
5822 _n_expr2
= new_child
5830 redef fun n_expr
=(node
)
5835 redef fun n_expr2
=(node
)
5842 redef fun visit_all
(v
: Visitor)
5844 v
.enter_visit
(_n_expr
)
5845 v
.enter_visit
(_n_expr2
)
5849 private init empty_init
do end
5852 n_expr
: nullable AExpr,
5853 n_expr2
: nullable AExpr
5857 _n_expr
= n_expr
.as(not null)
5858 n_expr
.parent
= self
5859 _n_expr2
= n_expr2
.as(not null)
5860 n_expr2
.parent
= self
5863 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5865 if _n_expr
== old_child
then
5866 if new_child
!= null then
5867 new_child
.parent
= self
5868 assert new_child
isa AExpr
5875 if _n_expr2
== old_child
then
5876 if new_child
!= null then
5877 new_child
.parent
= self
5878 assert new_child
isa AExpr
5879 _n_expr2
= new_child
5887 redef fun n_expr
=(node
)
5892 redef fun n_expr2
=(node
)
5899 redef fun visit_all
(v
: Visitor)
5901 v
.enter_visit
(_n_expr
)
5902 v
.enter_visit
(_n_expr2
)
5905 redef class AAndExpr
5906 private init empty_init
do end
5908 init init_aandexpr
(
5909 n_expr
: nullable AExpr,
5910 n_expr2
: nullable AExpr
5914 _n_expr
= n_expr
.as(not null)
5915 n_expr
.parent
= self
5916 _n_expr2
= n_expr2
.as(not null)
5917 n_expr2
.parent
= self
5920 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5922 if _n_expr
== old_child
then
5923 if new_child
!= null then
5924 new_child
.parent
= self
5925 assert new_child
isa AExpr
5932 if _n_expr2
== old_child
then
5933 if new_child
!= null then
5934 new_child
.parent
= self
5935 assert new_child
isa AExpr
5936 _n_expr2
= new_child
5944 redef fun n_expr
=(node
)
5949 redef fun n_expr2
=(node
)
5956 redef fun visit_all
(v
: Visitor)
5958 v
.enter_visit
(_n_expr
)
5959 v
.enter_visit
(_n_expr2
)
5962 redef class AOrElseExpr
5963 private init empty_init
do end
5965 init init_aorelseexpr
(
5966 n_expr
: nullable AExpr,
5967 n_expr2
: nullable AExpr
5971 _n_expr
= n_expr
.as(not null)
5972 n_expr
.parent
= self
5973 _n_expr2
= n_expr2
.as(not null)
5974 n_expr2
.parent
= self
5977 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5979 if _n_expr
== old_child
then
5980 if new_child
!= null then
5981 new_child
.parent
= self
5982 assert new_child
isa AExpr
5989 if _n_expr2
== old_child
then
5990 if new_child
!= null then
5991 new_child
.parent
= self
5992 assert new_child
isa AExpr
5993 _n_expr2
= new_child
6001 redef fun n_expr
=(node
)
6006 redef fun n_expr2
=(node
)
6013 redef fun visit_all
(v
: Visitor)
6015 v
.enter_visit
(_n_expr
)
6016 v
.enter_visit
(_n_expr2
)
6019 redef class AImpliesExpr
6020 private init empty_init
do end
6022 init init_aimpliesexpr
(
6023 n_expr
: nullable AExpr,
6024 n_expr2
: nullable AExpr
6028 _n_expr
= n_expr
.as(not null)
6029 n_expr
.parent
= self
6030 _n_expr2
= n_expr2
.as(not null)
6031 n_expr2
.parent
= self
6034 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6036 if _n_expr
== old_child
then
6037 if new_child
!= null then
6038 new_child
.parent
= self
6039 assert new_child
isa AExpr
6046 if _n_expr2
== old_child
then
6047 if new_child
!= null then
6048 new_child
.parent
= self
6049 assert new_child
isa AExpr
6050 _n_expr2
= new_child
6058 redef fun n_expr
=(node
)
6063 redef fun n_expr2
=(node
)
6070 redef fun visit_all
(v
: Visitor)
6072 v
.enter_visit
(_n_expr
)
6073 v
.enter_visit
(_n_expr2
)
6076 redef class ANotExpr
6077 private init empty_init
do end
6079 init init_anotexpr
(
6080 n_kwnot
: nullable TKwnot,
6081 n_expr
: nullable AExpr
6085 _n_kwnot
= n_kwnot
.as(not null)
6086 n_kwnot
.parent
= self
6087 _n_expr
= n_expr
.as(not null)
6088 n_expr
.parent
= self
6091 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6093 if _n_kwnot
== old_child
then
6094 if new_child
!= null then
6095 new_child
.parent
= self
6096 assert new_child
isa TKwnot
6097 _n_kwnot
= new_child
6103 if _n_expr
== old_child
then
6104 if new_child
!= null then
6105 new_child
.parent
= self
6106 assert new_child
isa AExpr
6115 redef fun n_kwnot
=(node
)
6120 redef fun n_expr
=(node
)
6127 redef fun visit_all
(v
: Visitor)
6129 v
.enter_visit
(_n_kwnot
)
6130 v
.enter_visit
(_n_expr
)
6134 private init empty_init
do end
6137 n_expr
: nullable AExpr,
6138 n_expr2
: nullable AExpr
6142 _n_expr
= n_expr
.as(not null)
6143 n_expr
.parent
= self
6144 _n_expr2
= n_expr2
.as(not null)
6145 n_expr2
.parent
= self
6148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6150 if _n_expr
== old_child
then
6151 if new_child
!= null then
6152 new_child
.parent
= self
6153 assert new_child
isa AExpr
6160 if _n_expr2
== old_child
then
6161 if new_child
!= null then
6162 new_child
.parent
= self
6163 assert new_child
isa AExpr
6164 _n_expr2
= new_child
6172 redef fun n_expr
=(node
)
6177 redef fun n_expr2
=(node
)
6184 redef fun visit_all
(v
: Visitor)
6186 v
.enter_visit
(_n_expr
)
6187 v
.enter_visit
(_n_expr2
)
6191 private init empty_init
do end
6194 n_expr
: nullable AExpr,
6195 n_expr2
: nullable AExpr
6199 _n_expr
= n_expr
.as(not null)
6200 n_expr
.parent
= self
6201 _n_expr2
= n_expr2
.as(not null)
6202 n_expr2
.parent
= self
6205 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6207 if _n_expr
== old_child
then
6208 if new_child
!= null then
6209 new_child
.parent
= self
6210 assert new_child
isa AExpr
6217 if _n_expr2
== old_child
then
6218 if new_child
!= null then
6219 new_child
.parent
= self
6220 assert new_child
isa AExpr
6221 _n_expr2
= new_child
6229 redef fun n_expr
=(node
)
6234 redef fun n_expr2
=(node
)
6241 redef fun visit_all
(v
: Visitor)
6243 v
.enter_visit
(_n_expr
)
6244 v
.enter_visit
(_n_expr2
)
6248 private init empty_init
do end
6251 n_expr
: nullable AExpr,
6252 n_expr2
: nullable AExpr
6256 _n_expr
= n_expr
.as(not null)
6257 n_expr
.parent
= self
6258 _n_expr2
= n_expr2
.as(not null)
6259 n_expr2
.parent
= self
6262 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6264 if _n_expr
== old_child
then
6265 if new_child
!= null then
6266 new_child
.parent
= self
6267 assert new_child
isa AExpr
6274 if _n_expr2
== old_child
then
6275 if new_child
!= null then
6276 new_child
.parent
= self
6277 assert new_child
isa AExpr
6278 _n_expr2
= new_child
6286 redef fun n_expr
=(node
)
6291 redef fun n_expr2
=(node
)
6298 redef fun visit_all
(v
: Visitor)
6300 v
.enter_visit
(_n_expr
)
6301 v
.enter_visit
(_n_expr2
)
6305 private init empty_init
do end
6308 n_expr
: nullable AExpr,
6309 n_expr2
: nullable AExpr
6313 _n_expr
= n_expr
.as(not null)
6314 n_expr
.parent
= self
6315 _n_expr2
= n_expr2
.as(not null)
6316 n_expr2
.parent
= self
6319 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6321 if _n_expr
== old_child
then
6322 if new_child
!= null then
6323 new_child
.parent
= self
6324 assert new_child
isa AExpr
6331 if _n_expr2
== old_child
then
6332 if new_child
!= null then
6333 new_child
.parent
= self
6334 assert new_child
isa AExpr
6335 _n_expr2
= new_child
6343 redef fun n_expr
=(node
)
6348 redef fun n_expr2
=(node
)
6355 redef fun visit_all
(v
: Visitor)
6357 v
.enter_visit
(_n_expr
)
6358 v
.enter_visit
(_n_expr2
)
6362 private init empty_init
do end
6365 n_expr
: nullable AExpr,
6366 n_expr2
: nullable AExpr
6370 _n_expr
= n_expr
.as(not null)
6371 n_expr
.parent
= self
6372 _n_expr2
= n_expr2
.as(not null)
6373 n_expr2
.parent
= self
6376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6378 if _n_expr
== old_child
then
6379 if new_child
!= null then
6380 new_child
.parent
= self
6381 assert new_child
isa AExpr
6388 if _n_expr2
== old_child
then
6389 if new_child
!= null then
6390 new_child
.parent
= self
6391 assert new_child
isa AExpr
6392 _n_expr2
= new_child
6400 redef fun n_expr
=(node
)
6405 redef fun n_expr2
=(node
)
6412 redef fun visit_all
(v
: Visitor)
6414 v
.enter_visit
(_n_expr
)
6415 v
.enter_visit
(_n_expr2
)
6419 private init empty_init
do end
6422 n_expr
: nullable AExpr,
6423 n_expr2
: nullable AExpr
6427 _n_expr
= n_expr
.as(not null)
6428 n_expr
.parent
= self
6429 _n_expr2
= n_expr2
.as(not null)
6430 n_expr2
.parent
= self
6433 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6435 if _n_expr
== old_child
then
6436 if new_child
!= null then
6437 new_child
.parent
= self
6438 assert new_child
isa AExpr
6445 if _n_expr2
== old_child
then
6446 if new_child
!= null then
6447 new_child
.parent
= self
6448 assert new_child
isa AExpr
6449 _n_expr2
= new_child
6457 redef fun n_expr
=(node
)
6462 redef fun n_expr2
=(node
)
6469 redef fun visit_all
(v
: Visitor)
6471 v
.enter_visit
(_n_expr
)
6472 v
.enter_visit
(_n_expr2
)
6476 private init empty_init
do end
6479 n_expr
: nullable AExpr,
6480 n_expr2
: nullable AExpr
6484 _n_expr
= n_expr
.as(not null)
6485 n_expr
.parent
= self
6486 _n_expr2
= n_expr2
.as(not null)
6487 n_expr2
.parent
= self
6490 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6492 if _n_expr
== old_child
then
6493 if new_child
!= null then
6494 new_child
.parent
= self
6495 assert new_child
isa AExpr
6502 if _n_expr2
== old_child
then
6503 if new_child
!= null then
6504 new_child
.parent
= self
6505 assert new_child
isa AExpr
6506 _n_expr2
= new_child
6514 redef fun n_expr
=(node
)
6519 redef fun n_expr2
=(node
)
6526 redef fun visit_all
(v
: Visitor)
6528 v
.enter_visit
(_n_expr
)
6529 v
.enter_visit
(_n_expr2
)
6533 private init empty_init
do end
6536 n_expr
: nullable AExpr,
6537 n_expr2
: nullable AExpr
6541 _n_expr
= n_expr
.as(not null)
6542 n_expr
.parent
= self
6543 _n_expr2
= n_expr2
.as(not null)
6544 n_expr2
.parent
= self
6547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6549 if _n_expr
== old_child
then
6550 if new_child
!= null then
6551 new_child
.parent
= self
6552 assert new_child
isa AExpr
6559 if _n_expr2
== old_child
then
6560 if new_child
!= null then
6561 new_child
.parent
= self
6562 assert new_child
isa AExpr
6563 _n_expr2
= new_child
6571 redef fun n_expr
=(node
)
6576 redef fun n_expr2
=(node
)
6583 redef fun visit_all
(v
: Visitor)
6585 v
.enter_visit
(_n_expr
)
6586 v
.enter_visit
(_n_expr2
)
6589 redef class AIsaExpr
6590 private init empty_init
do end
6592 init init_aisaexpr
(
6593 n_expr
: nullable AExpr,
6594 n_type
: nullable AType
6598 _n_expr
= n_expr
.as(not null)
6599 n_expr
.parent
= self
6600 _n_type
= n_type
.as(not null)
6601 n_type
.parent
= self
6604 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6606 if _n_expr
== old_child
then
6607 if new_child
!= null then
6608 new_child
.parent
= self
6609 assert new_child
isa AExpr
6616 if _n_type
== old_child
then
6617 if new_child
!= null then
6618 new_child
.parent
= self
6619 assert new_child
isa AType
6628 redef fun n_expr
=(node
)
6633 redef fun n_type
=(node
)
6640 redef fun visit_all
(v
: Visitor)
6642 v
.enter_visit
(_n_expr
)
6643 v
.enter_visit
(_n_type
)
6646 redef class APlusExpr
6647 private init empty_init
do end
6649 init init_aplusexpr
(
6650 n_expr
: nullable AExpr,
6651 n_expr2
: nullable AExpr
6655 _n_expr
= n_expr
.as(not null)
6656 n_expr
.parent
= self
6657 _n_expr2
= n_expr2
.as(not null)
6658 n_expr2
.parent
= self
6661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6663 if _n_expr
== old_child
then
6664 if new_child
!= null then
6665 new_child
.parent
= self
6666 assert new_child
isa AExpr
6673 if _n_expr2
== old_child
then
6674 if new_child
!= null then
6675 new_child
.parent
= self
6676 assert new_child
isa AExpr
6677 _n_expr2
= new_child
6685 redef fun n_expr
=(node
)
6690 redef fun n_expr2
=(node
)
6697 redef fun visit_all
(v
: Visitor)
6699 v
.enter_visit
(_n_expr
)
6700 v
.enter_visit
(_n_expr2
)
6703 redef class AMinusExpr
6704 private init empty_init
do end
6706 init init_aminusexpr
(
6707 n_expr
: nullable AExpr,
6708 n_expr2
: nullable AExpr
6712 _n_expr
= n_expr
.as(not null)
6713 n_expr
.parent
= self
6714 _n_expr2
= n_expr2
.as(not null)
6715 n_expr2
.parent
= self
6718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6720 if _n_expr
== old_child
then
6721 if new_child
!= null then
6722 new_child
.parent
= self
6723 assert new_child
isa AExpr
6730 if _n_expr2
== old_child
then
6731 if new_child
!= null then
6732 new_child
.parent
= self
6733 assert new_child
isa AExpr
6734 _n_expr2
= new_child
6742 redef fun n_expr
=(node
)
6747 redef fun n_expr2
=(node
)
6754 redef fun visit_all
(v
: Visitor)
6756 v
.enter_visit
(_n_expr
)
6757 v
.enter_visit
(_n_expr2
)
6760 redef class AStarshipExpr
6761 private init empty_init
do end
6763 init init_astarshipexpr
(
6764 n_expr
: nullable AExpr,
6765 n_expr2
: nullable AExpr
6769 _n_expr
= n_expr
.as(not null)
6770 n_expr
.parent
= self
6771 _n_expr2
= n_expr2
.as(not null)
6772 n_expr2
.parent
= self
6775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6777 if _n_expr
== old_child
then
6778 if new_child
!= null then
6779 new_child
.parent
= self
6780 assert new_child
isa AExpr
6787 if _n_expr2
== old_child
then
6788 if new_child
!= null then
6789 new_child
.parent
= self
6790 assert new_child
isa AExpr
6791 _n_expr2
= new_child
6799 redef fun n_expr
=(node
)
6804 redef fun n_expr2
=(node
)
6811 redef fun visit_all
(v
: Visitor)
6813 v
.enter_visit
(_n_expr
)
6814 v
.enter_visit
(_n_expr2
)
6817 redef class AStarExpr
6818 private init empty_init
do end
6820 init init_astarexpr
(
6821 n_expr
: nullable AExpr,
6822 n_expr2
: nullable AExpr
6826 _n_expr
= n_expr
.as(not null)
6827 n_expr
.parent
= self
6828 _n_expr2
= n_expr2
.as(not null)
6829 n_expr2
.parent
= self
6832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6834 if _n_expr
== old_child
then
6835 if new_child
!= null then
6836 new_child
.parent
= self
6837 assert new_child
isa AExpr
6844 if _n_expr2
== old_child
then
6845 if new_child
!= null then
6846 new_child
.parent
= self
6847 assert new_child
isa AExpr
6848 _n_expr2
= new_child
6856 redef fun n_expr
=(node
)
6861 redef fun n_expr2
=(node
)
6868 redef fun visit_all
(v
: Visitor)
6870 v
.enter_visit
(_n_expr
)
6871 v
.enter_visit
(_n_expr2
)
6874 redef class ASlashExpr
6875 private init empty_init
do end
6877 init init_aslashexpr
(
6878 n_expr
: nullable AExpr,
6879 n_expr2
: nullable AExpr
6883 _n_expr
= n_expr
.as(not null)
6884 n_expr
.parent
= self
6885 _n_expr2
= n_expr2
.as(not null)
6886 n_expr2
.parent
= self
6889 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6891 if _n_expr
== old_child
then
6892 if new_child
!= null then
6893 new_child
.parent
= self
6894 assert new_child
isa AExpr
6901 if _n_expr2
== old_child
then
6902 if new_child
!= null then
6903 new_child
.parent
= self
6904 assert new_child
isa AExpr
6905 _n_expr2
= new_child
6913 redef fun n_expr
=(node
)
6918 redef fun n_expr2
=(node
)
6925 redef fun visit_all
(v
: Visitor)
6927 v
.enter_visit
(_n_expr
)
6928 v
.enter_visit
(_n_expr2
)
6931 redef class APercentExpr
6932 private init empty_init
do end
6934 init init_apercentexpr
(
6935 n_expr
: nullable AExpr,
6936 n_expr2
: nullable AExpr
6940 _n_expr
= n_expr
.as(not null)
6941 n_expr
.parent
= self
6942 _n_expr2
= n_expr2
.as(not null)
6943 n_expr2
.parent
= self
6946 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6948 if _n_expr
== old_child
then
6949 if new_child
!= null then
6950 new_child
.parent
= self
6951 assert new_child
isa AExpr
6958 if _n_expr2
== old_child
then
6959 if new_child
!= null then
6960 new_child
.parent
= self
6961 assert new_child
isa AExpr
6962 _n_expr2
= new_child
6970 redef fun n_expr
=(node
)
6975 redef fun n_expr2
=(node
)
6982 redef fun visit_all
(v
: Visitor)
6984 v
.enter_visit
(_n_expr
)
6985 v
.enter_visit
(_n_expr2
)
6988 redef class AUminusExpr
6989 private init empty_init
do end
6991 init init_auminusexpr
(
6992 n_minus
: nullable TMinus,
6993 n_expr
: nullable AExpr
6997 _n_minus
= n_minus
.as(not null)
6998 n_minus
.parent
= self
6999 _n_expr
= n_expr
.as(not null)
7000 n_expr
.parent
= self
7003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7005 if _n_minus
== old_child
then
7006 if new_child
!= null then
7007 new_child
.parent
= self
7008 assert new_child
isa TMinus
7009 _n_minus
= new_child
7015 if _n_expr
== old_child
then
7016 if new_child
!= null then
7017 new_child
.parent
= self
7018 assert new_child
isa AExpr
7027 redef fun n_minus
=(node
)
7032 redef fun n_expr
=(node
)
7039 redef fun visit_all
(v
: Visitor)
7041 v
.enter_visit
(_n_minus
)
7042 v
.enter_visit
(_n_expr
)
7045 redef class ANewExpr
7046 private init empty_init
do end
7048 init init_anewexpr
(
7049 n_kwnew
: nullable TKwnew,
7050 n_type
: nullable AType,
7052 n_args
: nullable AExprs
7056 _n_kwnew
= n_kwnew
.as(not null)
7057 n_kwnew
.parent
= self
7058 _n_type
= n_type
.as(not null)
7059 n_type
.parent
= self
7061 if n_id
!= null then
7064 _n_args
= n_args
.as(not null)
7065 n_args
.parent
= self
7068 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7070 if _n_kwnew
== old_child
then
7071 if new_child
!= null then
7072 new_child
.parent
= self
7073 assert new_child
isa TKwnew
7074 _n_kwnew
= new_child
7080 if _n_type
== old_child
then
7081 if new_child
!= null then
7082 new_child
.parent
= self
7083 assert new_child
isa AType
7090 if _n_id
== old_child
then
7091 if new_child
!= null then
7092 new_child
.parent
= self
7093 assert new_child
isa TId
7100 if _n_args
== old_child
then
7101 if new_child
!= null then
7102 new_child
.parent
= self
7103 assert new_child
isa AExprs
7112 redef fun n_kwnew
=(node
)
7117 redef fun n_type
=(node
)
7122 redef fun n_id
=(node
)
7125 if node
!= null then
7129 redef fun n_args
=(node
)
7136 redef fun visit_all
(v
: Visitor)
7138 v
.enter_visit
(_n_kwnew
)
7139 v
.enter_visit
(_n_type
)
7140 if _n_id
!= null then
7141 v
.enter_visit
(_n_id
.as(not null))
7143 v
.enter_visit
(_n_args
)
7146 redef class AAttrExpr
7147 private init empty_init
do end
7149 init init_aattrexpr
(
7150 n_expr
: nullable AExpr,
7151 n_id
: nullable TAttrid
7155 _n_expr
= n_expr
.as(not null)
7156 n_expr
.parent
= self
7157 _n_id
= n_id
.as(not null)
7161 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7163 if _n_expr
== old_child
then
7164 if new_child
!= null then
7165 new_child
.parent
= self
7166 assert new_child
isa AExpr
7173 if _n_id
== old_child
then
7174 if new_child
!= null then
7175 new_child
.parent
= self
7176 assert new_child
isa TAttrid
7185 redef fun n_expr
=(node
)
7190 redef fun n_id
=(node
)
7197 redef fun visit_all
(v
: Visitor)
7199 v
.enter_visit
(_n_expr
)
7200 v
.enter_visit
(_n_id
)
7203 redef class AAttrAssignExpr
7204 private init empty_init
do end
7206 init init_aattrassignexpr
(
7207 n_expr
: nullable AExpr,
7208 n_id
: nullable TAttrid,
7209 n_assign
: nullable TAssign,
7210 n_value
: nullable AExpr
7214 _n_expr
= n_expr
.as(not null)
7215 n_expr
.parent
= self
7216 _n_id
= n_id
.as(not null)
7218 _n_assign
= n_assign
.as(not null)
7219 n_assign
.parent
= self
7220 _n_value
= n_value
.as(not null)
7221 n_value
.parent
= self
7224 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7226 if _n_expr
== old_child
then
7227 if new_child
!= null then
7228 new_child
.parent
= self
7229 assert new_child
isa AExpr
7236 if _n_id
== old_child
then
7237 if new_child
!= null then
7238 new_child
.parent
= self
7239 assert new_child
isa TAttrid
7246 if _n_assign
== old_child
then
7247 if new_child
!= null then
7248 new_child
.parent
= self
7249 assert new_child
isa TAssign
7250 _n_assign
= new_child
7256 if _n_value
== old_child
then
7257 if new_child
!= null then
7258 new_child
.parent
= self
7259 assert new_child
isa AExpr
7260 _n_value
= new_child
7268 redef fun n_expr
=(node
)
7273 redef fun n_id
=(node
)
7278 redef fun n_assign
=(node
)
7283 redef fun n_value
=(node
)
7290 redef fun visit_all
(v
: Visitor)
7292 v
.enter_visit
(_n_expr
)
7293 v
.enter_visit
(_n_id
)
7294 v
.enter_visit
(_n_assign
)
7295 v
.enter_visit
(_n_value
)
7298 redef class AAttrReassignExpr
7299 private init empty_init
do end
7301 init init_aattrreassignexpr
(
7302 n_expr
: nullable AExpr,
7303 n_id
: nullable TAttrid,
7304 n_assign_op
: nullable AAssignOp,
7305 n_value
: nullable AExpr
7309 _n_expr
= n_expr
.as(not null)
7310 n_expr
.parent
= self
7311 _n_id
= n_id
.as(not null)
7313 _n_assign_op
= n_assign_op
.as(not null)
7314 n_assign_op
.parent
= self
7315 _n_value
= n_value
.as(not null)
7316 n_value
.parent
= self
7319 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7321 if _n_expr
== old_child
then
7322 if new_child
!= null then
7323 new_child
.parent
= self
7324 assert new_child
isa AExpr
7331 if _n_id
== old_child
then
7332 if new_child
!= null then
7333 new_child
.parent
= self
7334 assert new_child
isa TAttrid
7341 if _n_assign_op
== old_child
then
7342 if new_child
!= null then
7343 new_child
.parent
= self
7344 assert new_child
isa AAssignOp
7345 _n_assign_op
= new_child
7351 if _n_value
== old_child
then
7352 if new_child
!= null then
7353 new_child
.parent
= self
7354 assert new_child
isa AExpr
7355 _n_value
= new_child
7363 redef fun n_expr
=(node
)
7368 redef fun n_id
=(node
)
7373 redef fun n_assign_op
=(node
)
7378 redef fun n_value
=(node
)
7385 redef fun visit_all
(v
: Visitor)
7387 v
.enter_visit
(_n_expr
)
7388 v
.enter_visit
(_n_id
)
7389 v
.enter_visit
(_n_assign_op
)
7390 v
.enter_visit
(_n_value
)
7393 redef class ACallExpr
7394 private init empty_init
do end
7396 init init_acallexpr
(
7397 n_expr
: nullable AExpr,
7399 n_args
: nullable AExprs
7403 _n_expr
= n_expr
.as(not null)
7404 n_expr
.parent
= self
7405 _n_id
= n_id
.as(not null)
7407 _n_args
= n_args
.as(not null)
7408 n_args
.parent
= self
7411 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7413 if _n_expr
== old_child
then
7414 if new_child
!= null then
7415 new_child
.parent
= self
7416 assert new_child
isa AExpr
7423 if _n_id
== old_child
then
7424 if new_child
!= null then
7425 new_child
.parent
= self
7426 assert new_child
isa TId
7433 if _n_args
== old_child
then
7434 if new_child
!= null then
7435 new_child
.parent
= self
7436 assert new_child
isa AExprs
7445 redef fun n_expr
=(node
)
7450 redef fun n_id
=(node
)
7455 redef fun n_args
=(node
)
7462 redef fun visit_all
(v
: Visitor)
7464 v
.enter_visit
(_n_expr
)
7465 v
.enter_visit
(_n_id
)
7466 v
.enter_visit
(_n_args
)
7469 redef class ACallAssignExpr
7470 private init empty_init
do end
7472 init init_acallassignexpr
(
7473 n_expr
: nullable AExpr,
7475 n_args
: nullable AExprs,
7476 n_assign
: nullable TAssign,
7477 n_value
: nullable AExpr
7481 _n_expr
= n_expr
.as(not null)
7482 n_expr
.parent
= self
7483 _n_id
= n_id
.as(not null)
7485 _n_args
= n_args
.as(not null)
7486 n_args
.parent
= self
7487 _n_assign
= n_assign
.as(not null)
7488 n_assign
.parent
= self
7489 _n_value
= n_value
.as(not null)
7490 n_value
.parent
= self
7493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7495 if _n_expr
== old_child
then
7496 if new_child
!= null then
7497 new_child
.parent
= self
7498 assert new_child
isa AExpr
7505 if _n_id
== old_child
then
7506 if new_child
!= null then
7507 new_child
.parent
= self
7508 assert new_child
isa TId
7515 if _n_args
== old_child
then
7516 if new_child
!= null then
7517 new_child
.parent
= self
7518 assert new_child
isa AExprs
7525 if _n_assign
== old_child
then
7526 if new_child
!= null then
7527 new_child
.parent
= self
7528 assert new_child
isa TAssign
7529 _n_assign
= new_child
7535 if _n_value
== old_child
then
7536 if new_child
!= null then
7537 new_child
.parent
= self
7538 assert new_child
isa AExpr
7539 _n_value
= new_child
7547 redef fun n_expr
=(node
)
7552 redef fun n_id
=(node
)
7557 redef fun n_args
=(node
)
7562 redef fun n_assign
=(node
)
7567 redef fun n_value
=(node
)
7574 redef fun visit_all
(v
: Visitor)
7576 v
.enter_visit
(_n_expr
)
7577 v
.enter_visit
(_n_id
)
7578 v
.enter_visit
(_n_args
)
7579 v
.enter_visit
(_n_assign
)
7580 v
.enter_visit
(_n_value
)
7583 redef class ACallReassignExpr
7584 private init empty_init
do end
7586 init init_acallreassignexpr
(
7587 n_expr
: nullable AExpr,
7589 n_args
: nullable AExprs,
7590 n_assign_op
: nullable AAssignOp,
7591 n_value
: nullable AExpr
7595 _n_expr
= n_expr
.as(not null)
7596 n_expr
.parent
= self
7597 _n_id
= n_id
.as(not null)
7599 _n_args
= n_args
.as(not null)
7600 n_args
.parent
= self
7601 _n_assign_op
= n_assign_op
.as(not null)
7602 n_assign_op
.parent
= self
7603 _n_value
= n_value
.as(not null)
7604 n_value
.parent
= self
7607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7609 if _n_expr
== old_child
then
7610 if new_child
!= null then
7611 new_child
.parent
= self
7612 assert new_child
isa AExpr
7619 if _n_id
== old_child
then
7620 if new_child
!= null then
7621 new_child
.parent
= self
7622 assert new_child
isa TId
7629 if _n_args
== old_child
then
7630 if new_child
!= null then
7631 new_child
.parent
= self
7632 assert new_child
isa AExprs
7639 if _n_assign_op
== old_child
then
7640 if new_child
!= null then
7641 new_child
.parent
= self
7642 assert new_child
isa AAssignOp
7643 _n_assign_op
= new_child
7649 if _n_value
== old_child
then
7650 if new_child
!= null then
7651 new_child
.parent
= self
7652 assert new_child
isa AExpr
7653 _n_value
= new_child
7661 redef fun n_expr
=(node
)
7666 redef fun n_id
=(node
)
7671 redef fun n_args
=(node
)
7676 redef fun n_assign_op
=(node
)
7681 redef fun n_value
=(node
)
7688 redef fun visit_all
(v
: Visitor)
7690 v
.enter_visit
(_n_expr
)
7691 v
.enter_visit
(_n_id
)
7692 v
.enter_visit
(_n_args
)
7693 v
.enter_visit
(_n_assign_op
)
7694 v
.enter_visit
(_n_value
)
7697 redef class ASuperExpr
7698 private init empty_init
do end
7700 init init_asuperexpr
(
7701 n_qualified
: nullable AQualified,
7702 n_kwsuper
: nullable TKwsuper,
7703 n_args
: nullable AExprs
7707 _n_qualified
= n_qualified
7708 if n_qualified
!= null then
7709 n_qualified
.parent
= self
7711 _n_kwsuper
= n_kwsuper
.as(not null)
7712 n_kwsuper
.parent
= self
7713 _n_args
= n_args
.as(not null)
7714 n_args
.parent
= self
7717 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7719 if _n_qualified
== old_child
then
7720 if new_child
!= null then
7721 new_child
.parent
= self
7722 assert new_child
isa AQualified
7723 _n_qualified
= new_child
7729 if _n_kwsuper
== old_child
then
7730 if new_child
!= null then
7731 new_child
.parent
= self
7732 assert new_child
isa TKwsuper
7733 _n_kwsuper
= new_child
7739 if _n_args
== old_child
then
7740 if new_child
!= null then
7741 new_child
.parent
= self
7742 assert new_child
isa AExprs
7751 redef fun n_qualified
=(node
)
7754 if node
!= null then
7758 redef fun n_kwsuper
=(node
)
7763 redef fun n_args
=(node
)
7770 redef fun visit_all
(v
: Visitor)
7772 if _n_qualified
!= null then
7773 v
.enter_visit
(_n_qualified
.as(not null))
7775 v
.enter_visit
(_n_kwsuper
)
7776 v
.enter_visit
(_n_args
)
7779 redef class AInitExpr
7780 private init empty_init
do end
7782 init init_ainitexpr
(
7783 n_expr
: nullable AExpr,
7784 n_kwinit
: nullable TKwinit,
7785 n_args
: nullable AExprs
7789 _n_expr
= n_expr
.as(not null)
7790 n_expr
.parent
= self
7791 _n_kwinit
= n_kwinit
.as(not null)
7792 n_kwinit
.parent
= self
7793 _n_args
= n_args
.as(not null)
7794 n_args
.parent
= self
7797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7799 if _n_expr
== old_child
then
7800 if new_child
!= null then
7801 new_child
.parent
= self
7802 assert new_child
isa AExpr
7809 if _n_kwinit
== old_child
then
7810 if new_child
!= null then
7811 new_child
.parent
= self
7812 assert new_child
isa TKwinit
7813 _n_kwinit
= new_child
7819 if _n_args
== old_child
then
7820 if new_child
!= null then
7821 new_child
.parent
= self
7822 assert new_child
isa AExprs
7831 redef fun n_expr
=(node
)
7836 redef fun n_kwinit
=(node
)
7841 redef fun n_args
=(node
)
7848 redef fun visit_all
(v
: Visitor)
7850 v
.enter_visit
(_n_expr
)
7851 v
.enter_visit
(_n_kwinit
)
7852 v
.enter_visit
(_n_args
)
7855 redef class ABraExpr
7856 private init empty_init
do end
7858 init init_abraexpr
(
7859 n_expr
: nullable AExpr,
7860 n_args
: nullable AExprs
7864 _n_expr
= n_expr
.as(not null)
7865 n_expr
.parent
= self
7866 _n_args
= n_args
.as(not null)
7867 n_args
.parent
= self
7870 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7872 if _n_expr
== old_child
then
7873 if new_child
!= null then
7874 new_child
.parent
= self
7875 assert new_child
isa AExpr
7882 if _n_args
== old_child
then
7883 if new_child
!= null then
7884 new_child
.parent
= self
7885 assert new_child
isa AExprs
7894 redef fun n_expr
=(node
)
7899 redef fun n_args
=(node
)
7906 redef fun visit_all
(v
: Visitor)
7908 v
.enter_visit
(_n_expr
)
7909 v
.enter_visit
(_n_args
)
7912 redef class ABraAssignExpr
7913 private init empty_init
do end
7915 init init_abraassignexpr
(
7916 n_expr
: nullable AExpr,
7917 n_args
: nullable AExprs,
7918 n_assign
: nullable TAssign,
7919 n_value
: nullable AExpr
7923 _n_expr
= n_expr
.as(not null)
7924 n_expr
.parent
= self
7925 _n_args
= n_args
.as(not null)
7926 n_args
.parent
= self
7927 _n_assign
= n_assign
.as(not null)
7928 n_assign
.parent
= self
7929 _n_value
= n_value
.as(not null)
7930 n_value
.parent
= self
7933 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7935 if _n_expr
== old_child
then
7936 if new_child
!= null then
7937 new_child
.parent
= self
7938 assert new_child
isa AExpr
7945 if _n_args
== old_child
then
7946 if new_child
!= null then
7947 new_child
.parent
= self
7948 assert new_child
isa AExprs
7955 if _n_assign
== old_child
then
7956 if new_child
!= null then
7957 new_child
.parent
= self
7958 assert new_child
isa TAssign
7959 _n_assign
= new_child
7965 if _n_value
== old_child
then
7966 if new_child
!= null then
7967 new_child
.parent
= self
7968 assert new_child
isa AExpr
7969 _n_value
= new_child
7977 redef fun n_expr
=(node
)
7982 redef fun n_args
=(node
)
7987 redef fun n_assign
=(node
)
7992 redef fun n_value
=(node
)
7999 redef fun visit_all
(v
: Visitor)
8001 v
.enter_visit
(_n_expr
)
8002 v
.enter_visit
(_n_args
)
8003 v
.enter_visit
(_n_assign
)
8004 v
.enter_visit
(_n_value
)
8007 redef class ABraReassignExpr
8008 private init empty_init
do end
8010 init init_abrareassignexpr
(
8011 n_expr
: nullable AExpr,
8012 n_args
: nullable AExprs,
8013 n_assign_op
: nullable AAssignOp,
8014 n_value
: nullable AExpr
8018 _n_expr
= n_expr
.as(not null)
8019 n_expr
.parent
= self
8020 _n_args
= n_args
.as(not null)
8021 n_args
.parent
= self
8022 _n_assign_op
= n_assign_op
.as(not null)
8023 n_assign_op
.parent
= self
8024 _n_value
= n_value
.as(not null)
8025 n_value
.parent
= self
8028 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8030 if _n_expr
== old_child
then
8031 if new_child
!= null then
8032 new_child
.parent
= self
8033 assert new_child
isa AExpr
8040 if _n_args
== old_child
then
8041 if new_child
!= null then
8042 new_child
.parent
= self
8043 assert new_child
isa AExprs
8050 if _n_assign_op
== old_child
then
8051 if new_child
!= null then
8052 new_child
.parent
= self
8053 assert new_child
isa AAssignOp
8054 _n_assign_op
= new_child
8060 if _n_value
== old_child
then
8061 if new_child
!= null then
8062 new_child
.parent
= self
8063 assert new_child
isa AExpr
8064 _n_value
= new_child
8072 redef fun n_expr
=(node
)
8077 redef fun n_args
=(node
)
8082 redef fun n_assign_op
=(node
)
8087 redef fun n_value
=(node
)
8094 redef fun visit_all
(v
: Visitor)
8096 v
.enter_visit
(_n_expr
)
8097 v
.enter_visit
(_n_args
)
8098 v
.enter_visit
(_n_assign_op
)
8099 v
.enter_visit
(_n_value
)
8102 redef class AVarExpr
8103 private init empty_init
do end
8105 init init_avarexpr
(
8110 _n_id
= n_id
.as(not null)
8114 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8116 if _n_id
== old_child
then
8117 if new_child
!= null then
8118 new_child
.parent
= self
8119 assert new_child
isa TId
8128 redef fun n_id
=(node
)
8135 redef fun visit_all
(v
: Visitor)
8137 v
.enter_visit
(_n_id
)
8140 redef class AVarAssignExpr
8141 private init empty_init
do end
8143 init init_avarassignexpr
(
8145 n_assign
: nullable TAssign,
8146 n_value
: nullable AExpr
8150 _n_id
= n_id
.as(not null)
8152 _n_assign
= n_assign
.as(not null)
8153 n_assign
.parent
= self
8154 _n_value
= n_value
.as(not null)
8155 n_value
.parent
= self
8158 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8160 if _n_id
== old_child
then
8161 if new_child
!= null then
8162 new_child
.parent
= self
8163 assert new_child
isa TId
8170 if _n_assign
== old_child
then
8171 if new_child
!= null then
8172 new_child
.parent
= self
8173 assert new_child
isa TAssign
8174 _n_assign
= new_child
8180 if _n_value
== old_child
then
8181 if new_child
!= null then
8182 new_child
.parent
= self
8183 assert new_child
isa AExpr
8184 _n_value
= new_child
8192 redef fun n_id
=(node
)
8197 redef fun n_assign
=(node
)
8202 redef fun n_value
=(node
)
8209 redef fun visit_all
(v
: Visitor)
8211 v
.enter_visit
(_n_id
)
8212 v
.enter_visit
(_n_assign
)
8213 v
.enter_visit
(_n_value
)
8216 redef class AVarReassignExpr
8217 private init empty_init
do end
8219 init init_avarreassignexpr
(
8221 n_assign_op
: nullable AAssignOp,
8222 n_value
: nullable AExpr
8226 _n_id
= n_id
.as(not null)
8228 _n_assign_op
= n_assign_op
.as(not null)
8229 n_assign_op
.parent
= self
8230 _n_value
= n_value
.as(not null)
8231 n_value
.parent
= self
8234 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8236 if _n_id
== old_child
then
8237 if new_child
!= null then
8238 new_child
.parent
= self
8239 assert new_child
isa TId
8246 if _n_assign_op
== old_child
then
8247 if new_child
!= null then
8248 new_child
.parent
= self
8249 assert new_child
isa AAssignOp
8250 _n_assign_op
= new_child
8256 if _n_value
== old_child
then
8257 if new_child
!= null then
8258 new_child
.parent
= self
8259 assert new_child
isa AExpr
8260 _n_value
= new_child
8268 redef fun n_id
=(node
)
8273 redef fun n_assign_op
=(node
)
8278 redef fun n_value
=(node
)
8285 redef fun visit_all
(v
: Visitor)
8287 v
.enter_visit
(_n_id
)
8288 v
.enter_visit
(_n_assign_op
)
8289 v
.enter_visit
(_n_value
)
8292 redef class ARangeExpr
8293 private init empty_init
do end
8295 init init_arangeexpr
(
8296 n_expr
: nullable AExpr,
8297 n_expr2
: nullable AExpr,
8298 n_annotations
: nullable AAnnotations
8302 _n_expr
= n_expr
.as(not null)
8303 n_expr
.parent
= self
8304 _n_expr2
= n_expr2
.as(not null)
8305 n_expr2
.parent
= self
8306 _n_annotations
= n_annotations
8307 if n_annotations
!= null then
8308 n_annotations
.parent
= self
8312 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8314 if _n_expr
== old_child
then
8315 if new_child
!= null then
8316 new_child
.parent
= self
8317 assert new_child
isa AExpr
8324 if _n_expr2
== old_child
then
8325 if new_child
!= null then
8326 new_child
.parent
= self
8327 assert new_child
isa AExpr
8328 _n_expr2
= new_child
8334 if _n_annotations
== old_child
then
8335 if new_child
!= null then
8336 new_child
.parent
= self
8337 assert new_child
isa AAnnotations
8338 _n_annotations
= new_child
8340 _n_annotations
= null
8346 redef fun n_expr
=(node
)
8351 redef fun n_expr2
=(node
)
8356 redef fun n_annotations
=(node
)
8358 _n_annotations
= node
8359 if node
!= null then
8365 redef fun visit_all
(v
: Visitor)
8367 v
.enter_visit
(_n_expr
)
8368 v
.enter_visit
(_n_expr2
)
8369 if _n_annotations
!= null then
8370 v
.enter_visit
(_n_annotations
.as(not null))
8374 redef class ACrangeExpr
8375 private init empty_init
do end
8377 init init_acrangeexpr
(
8378 n_obra
: nullable TObra,
8379 n_expr
: nullable AExpr,
8380 n_expr2
: nullable AExpr,
8381 n_cbra
: nullable TCbra,
8382 n_annotations
: nullable AAnnotations
8386 _n_obra
= n_obra
.as(not null)
8387 n_obra
.parent
= self
8388 _n_expr
= n_expr
.as(not null)
8389 n_expr
.parent
= self
8390 _n_expr2
= n_expr2
.as(not null)
8391 n_expr2
.parent
= self
8392 _n_cbra
= n_cbra
.as(not null)
8393 n_cbra
.parent
= self
8394 _n_annotations
= n_annotations
8395 if n_annotations
!= null then
8396 n_annotations
.parent
= self
8400 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8402 if _n_obra
== old_child
then
8403 if new_child
!= null then
8404 new_child
.parent
= self
8405 assert new_child
isa TObra
8412 if _n_expr
== old_child
then
8413 if new_child
!= null then
8414 new_child
.parent
= self
8415 assert new_child
isa AExpr
8422 if _n_expr2
== old_child
then
8423 if new_child
!= null then
8424 new_child
.parent
= self
8425 assert new_child
isa AExpr
8426 _n_expr2
= new_child
8432 if _n_cbra
== old_child
then
8433 if new_child
!= null then
8434 new_child
.parent
= self
8435 assert new_child
isa TCbra
8442 if _n_annotations
== old_child
then
8443 if new_child
!= null then
8444 new_child
.parent
= self
8445 assert new_child
isa AAnnotations
8446 _n_annotations
= new_child
8448 _n_annotations
= null
8454 redef fun n_obra
=(node
)
8459 redef fun n_expr
=(node
)
8464 redef fun n_expr2
=(node
)
8469 redef fun n_cbra
=(node
)
8474 redef fun n_annotations
=(node
)
8476 _n_annotations
= node
8477 if node
!= null then
8483 redef fun visit_all
(v
: Visitor)
8485 v
.enter_visit
(_n_obra
)
8486 v
.enter_visit
(_n_expr
)
8487 v
.enter_visit
(_n_expr2
)
8488 v
.enter_visit
(_n_cbra
)
8489 if _n_annotations
!= null then
8490 v
.enter_visit
(_n_annotations
.as(not null))
8494 redef class AOrangeExpr
8495 private init empty_init
do end
8497 init init_aorangeexpr
(
8498 n_obra
: nullable TObra,
8499 n_expr
: nullable AExpr,
8500 n_expr2
: nullable AExpr,
8501 n_cbra
: nullable TObra,
8502 n_annotations
: nullable AAnnotations
8506 _n_obra
= n_obra
.as(not null)
8507 n_obra
.parent
= self
8508 _n_expr
= n_expr
.as(not null)
8509 n_expr
.parent
= self
8510 _n_expr2
= n_expr2
.as(not null)
8511 n_expr2
.parent
= self
8512 _n_cbra
= n_cbra
.as(not null)
8513 n_cbra
.parent
= self
8514 _n_annotations
= n_annotations
8515 if n_annotations
!= null then
8516 n_annotations
.parent
= self
8520 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8522 if _n_obra
== old_child
then
8523 if new_child
!= null then
8524 new_child
.parent
= self
8525 assert new_child
isa TObra
8532 if _n_expr
== old_child
then
8533 if new_child
!= null then
8534 new_child
.parent
= self
8535 assert new_child
isa AExpr
8542 if _n_expr2
== old_child
then
8543 if new_child
!= null then
8544 new_child
.parent
= self
8545 assert new_child
isa AExpr
8546 _n_expr2
= new_child
8552 if _n_cbra
== old_child
then
8553 if new_child
!= null then
8554 new_child
.parent
= self
8555 assert new_child
isa TObra
8562 if _n_annotations
== old_child
then
8563 if new_child
!= null then
8564 new_child
.parent
= self
8565 assert new_child
isa AAnnotations
8566 _n_annotations
= new_child
8568 _n_annotations
= null
8574 redef fun n_obra
=(node
)
8579 redef fun n_expr
=(node
)
8584 redef fun n_expr2
=(node
)
8589 redef fun n_cbra
=(node
)
8594 redef fun n_annotations
=(node
)
8596 _n_annotations
= node
8597 if node
!= null then
8603 redef fun visit_all
(v
: Visitor)
8605 v
.enter_visit
(_n_obra
)
8606 v
.enter_visit
(_n_expr
)
8607 v
.enter_visit
(_n_expr2
)
8608 v
.enter_visit
(_n_cbra
)
8609 if _n_annotations
!= null then
8610 v
.enter_visit
(_n_annotations
.as(not null))
8614 redef class AArrayExpr
8615 private init empty_init
do end
8617 init init_aarrayexpr
(
8618 n_exprs
: nullable AExprs,
8619 n_annotations
: nullable AAnnotations
8623 _n_exprs
= n_exprs
.as(not null)
8624 n_exprs
.parent
= self
8625 _n_annotations
= n_annotations
8626 if n_annotations
!= null then
8627 n_annotations
.parent
= self
8631 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8633 if _n_exprs
== old_child
then
8634 if new_child
!= null then
8635 new_child
.parent
= self
8636 assert new_child
isa AExprs
8637 _n_exprs
= new_child
8643 if _n_annotations
== old_child
then
8644 if new_child
!= null then
8645 new_child
.parent
= self
8646 assert new_child
isa AAnnotations
8647 _n_annotations
= new_child
8649 _n_annotations
= null
8655 redef fun n_exprs
=(node
)
8660 redef fun n_annotations
=(node
)
8662 _n_annotations
= node
8663 if node
!= null then
8669 redef fun visit_all
(v
: Visitor)
8671 v
.enter_visit
(_n_exprs
)
8672 if _n_annotations
!= null then
8673 v
.enter_visit
(_n_annotations
.as(not null))
8677 redef class ASelfExpr
8678 private init empty_init
do end
8680 init init_aselfexpr
(
8681 n_kwself
: nullable TKwself,
8682 n_annotations
: nullable AAnnotations
8686 _n_kwself
= n_kwself
.as(not null)
8687 n_kwself
.parent
= self
8688 _n_annotations
= n_annotations
8689 if n_annotations
!= null then
8690 n_annotations
.parent
= self
8694 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8696 if _n_kwself
== old_child
then
8697 if new_child
!= null then
8698 new_child
.parent
= self
8699 assert new_child
isa TKwself
8700 _n_kwself
= new_child
8706 if _n_annotations
== old_child
then
8707 if new_child
!= null then
8708 new_child
.parent
= self
8709 assert new_child
isa AAnnotations
8710 _n_annotations
= new_child
8712 _n_annotations
= null
8718 redef fun n_kwself
=(node
)
8723 redef fun n_annotations
=(node
)
8725 _n_annotations
= node
8726 if node
!= null then
8732 redef fun visit_all
(v
: Visitor)
8734 v
.enter_visit
(_n_kwself
)
8735 if _n_annotations
!= null then
8736 v
.enter_visit
(_n_annotations
.as(not null))
8740 redef class AImplicitSelfExpr
8741 private init empty_init
do end
8743 init init_aimplicitselfexpr
8748 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8754 redef fun visit_all
(v
: Visitor)
8758 redef class ATrueExpr
8759 private init empty_init
do end
8761 init init_atrueexpr
(
8762 n_kwtrue
: nullable TKwtrue,
8763 n_annotations
: nullable AAnnotations
8767 _n_kwtrue
= n_kwtrue
.as(not null)
8768 n_kwtrue
.parent
= self
8769 _n_annotations
= n_annotations
8770 if n_annotations
!= null then
8771 n_annotations
.parent
= self
8775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8777 if _n_kwtrue
== old_child
then
8778 if new_child
!= null then
8779 new_child
.parent
= self
8780 assert new_child
isa TKwtrue
8781 _n_kwtrue
= new_child
8787 if _n_annotations
== old_child
then
8788 if new_child
!= null then
8789 new_child
.parent
= self
8790 assert new_child
isa AAnnotations
8791 _n_annotations
= new_child
8793 _n_annotations
= null
8799 redef fun n_kwtrue
=(node
)
8804 redef fun n_annotations
=(node
)
8806 _n_annotations
= node
8807 if node
!= null then
8813 redef fun visit_all
(v
: Visitor)
8815 v
.enter_visit
(_n_kwtrue
)
8816 if _n_annotations
!= null then
8817 v
.enter_visit
(_n_annotations
.as(not null))
8821 redef class AFalseExpr
8822 private init empty_init
do end
8824 init init_afalseexpr
(
8825 n_kwfalse
: nullable TKwfalse,
8826 n_annotations
: nullable AAnnotations
8830 _n_kwfalse
= n_kwfalse
.as(not null)
8831 n_kwfalse
.parent
= self
8832 _n_annotations
= n_annotations
8833 if n_annotations
!= null then
8834 n_annotations
.parent
= self
8838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8840 if _n_kwfalse
== old_child
then
8841 if new_child
!= null then
8842 new_child
.parent
= self
8843 assert new_child
isa TKwfalse
8844 _n_kwfalse
= new_child
8850 if _n_annotations
== old_child
then
8851 if new_child
!= null then
8852 new_child
.parent
= self
8853 assert new_child
isa AAnnotations
8854 _n_annotations
= new_child
8856 _n_annotations
= null
8862 redef fun n_kwfalse
=(node
)
8867 redef fun n_annotations
=(node
)
8869 _n_annotations
= node
8870 if node
!= null then
8876 redef fun visit_all
(v
: Visitor)
8878 v
.enter_visit
(_n_kwfalse
)
8879 if _n_annotations
!= null then
8880 v
.enter_visit
(_n_annotations
.as(not null))
8884 redef class ANullExpr
8885 private init empty_init
do end
8887 init init_anullexpr
(
8888 n_kwnull
: nullable TKwnull,
8889 n_annotations
: nullable AAnnotations
8893 _n_kwnull
= n_kwnull
.as(not null)
8894 n_kwnull
.parent
= self
8895 _n_annotations
= n_annotations
8896 if n_annotations
!= null then
8897 n_annotations
.parent
= self
8901 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8903 if _n_kwnull
== old_child
then
8904 if new_child
!= null then
8905 new_child
.parent
= self
8906 assert new_child
isa TKwnull
8907 _n_kwnull
= new_child
8913 if _n_annotations
== old_child
then
8914 if new_child
!= null then
8915 new_child
.parent
= self
8916 assert new_child
isa AAnnotations
8917 _n_annotations
= new_child
8919 _n_annotations
= null
8925 redef fun n_kwnull
=(node
)
8930 redef fun n_annotations
=(node
)
8932 _n_annotations
= node
8933 if node
!= null then
8939 redef fun visit_all
(v
: Visitor)
8941 v
.enter_visit
(_n_kwnull
)
8942 if _n_annotations
!= null then
8943 v
.enter_visit
(_n_annotations
.as(not null))
8947 redef class AIntExpr
8948 private init empty_init
do end
8950 init init_aintexpr
(
8951 n_number
: nullable TNumber,
8952 n_annotations
: nullable AAnnotations
8956 _n_number
= n_number
.as(not null)
8957 n_number
.parent
= self
8958 _n_annotations
= n_annotations
8959 if n_annotations
!= null then
8960 n_annotations
.parent
= self
8964 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8966 if _n_number
== old_child
then
8967 if new_child
!= null then
8968 new_child
.parent
= self
8969 assert new_child
isa TNumber
8970 _n_number
= new_child
8976 if _n_annotations
== old_child
then
8977 if new_child
!= null then
8978 new_child
.parent
= self
8979 assert new_child
isa AAnnotations
8980 _n_annotations
= new_child
8982 _n_annotations
= null
8988 redef fun n_number
=(node
)
8993 redef fun n_annotations
=(node
)
8995 _n_annotations
= node
8996 if node
!= null then
9002 redef fun visit_all
(v
: Visitor)
9004 v
.enter_visit
(_n_number
)
9005 if _n_annotations
!= null then
9006 v
.enter_visit
(_n_annotations
.as(not null))
9010 redef class AFloatExpr
9011 private init empty_init
do end
9013 init init_afloatexpr
(
9014 n_float
: nullable TFloat,
9015 n_annotations
: nullable AAnnotations
9019 _n_float
= n_float
.as(not null)
9020 n_float
.parent
= self
9021 _n_annotations
= n_annotations
9022 if n_annotations
!= null then
9023 n_annotations
.parent
= self
9027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9029 if _n_float
== old_child
then
9030 if new_child
!= null then
9031 new_child
.parent
= self
9032 assert new_child
isa TFloat
9033 _n_float
= new_child
9039 if _n_annotations
== old_child
then
9040 if new_child
!= null then
9041 new_child
.parent
= self
9042 assert new_child
isa AAnnotations
9043 _n_annotations
= new_child
9045 _n_annotations
= null
9051 redef fun n_float
=(node
)
9056 redef fun n_annotations
=(node
)
9058 _n_annotations
= node
9059 if node
!= null then
9065 redef fun visit_all
(v
: Visitor)
9067 v
.enter_visit
(_n_float
)
9068 if _n_annotations
!= null then
9069 v
.enter_visit
(_n_annotations
.as(not null))
9073 redef class ACharExpr
9074 private init empty_init
do end
9076 init init_acharexpr
(
9077 n_char
: nullable TChar,
9078 n_annotations
: nullable AAnnotations
9082 _n_char
= n_char
.as(not null)
9083 n_char
.parent
= self
9084 _n_annotations
= n_annotations
9085 if n_annotations
!= null then
9086 n_annotations
.parent
= self
9090 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9092 if _n_char
== old_child
then
9093 if new_child
!= null then
9094 new_child
.parent
= self
9095 assert new_child
isa TChar
9102 if _n_annotations
== old_child
then
9103 if new_child
!= null then
9104 new_child
.parent
= self
9105 assert new_child
isa AAnnotations
9106 _n_annotations
= new_child
9108 _n_annotations
= null
9114 redef fun n_char
=(node
)
9119 redef fun n_annotations
=(node
)
9121 _n_annotations
= node
9122 if node
!= null then
9128 redef fun visit_all
(v
: Visitor)
9130 v
.enter_visit
(_n_char
)
9131 if _n_annotations
!= null then
9132 v
.enter_visit
(_n_annotations
.as(not null))
9136 redef class AStringExpr
9137 private init empty_init
do end
9139 init init_astringexpr
(
9140 n_string
: nullable TString,
9141 n_annotations
: nullable AAnnotations
9145 _n_string
= n_string
.as(not null)
9146 n_string
.parent
= self
9147 _n_annotations
= n_annotations
9148 if n_annotations
!= null then
9149 n_annotations
.parent
= self
9153 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9155 if _n_string
== old_child
then
9156 if new_child
!= null then
9157 new_child
.parent
= self
9158 assert new_child
isa TString
9159 _n_string
= new_child
9165 if _n_annotations
== old_child
then
9166 if new_child
!= null then
9167 new_child
.parent
= self
9168 assert new_child
isa AAnnotations
9169 _n_annotations
= new_child
9171 _n_annotations
= null
9177 redef fun n_string
=(node
)
9182 redef fun n_annotations
=(node
)
9184 _n_annotations
= node
9185 if node
!= null then
9191 redef fun visit_all
(v
: Visitor)
9193 v
.enter_visit
(_n_string
)
9194 if _n_annotations
!= null then
9195 v
.enter_visit
(_n_annotations
.as(not null))
9199 redef class AStartStringExpr
9200 private init empty_init
do end
9202 init init_astartstringexpr
(
9203 n_string
: nullable TStartString
9207 _n_string
= n_string
.as(not null)
9208 n_string
.parent
= self
9211 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9213 if _n_string
== old_child
then
9214 if new_child
!= null then
9215 new_child
.parent
= self
9216 assert new_child
isa TStartString
9217 _n_string
= new_child
9225 redef fun n_string
=(node
)
9232 redef fun visit_all
(v
: Visitor)
9234 v
.enter_visit
(_n_string
)
9237 redef class AMidStringExpr
9238 private init empty_init
do end
9240 init init_amidstringexpr
(
9241 n_string
: nullable TMidString
9245 _n_string
= n_string
.as(not null)
9246 n_string
.parent
= self
9249 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9251 if _n_string
== old_child
then
9252 if new_child
!= null then
9253 new_child
.parent
= self
9254 assert new_child
isa TMidString
9255 _n_string
= new_child
9263 redef fun n_string
=(node
)
9270 redef fun visit_all
(v
: Visitor)
9272 v
.enter_visit
(_n_string
)
9275 redef class AEndStringExpr
9276 private init empty_init
do end
9278 init init_aendstringexpr
(
9279 n_string
: nullable TEndString
9283 _n_string
= n_string
.as(not null)
9284 n_string
.parent
= self
9287 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9289 if _n_string
== old_child
then
9290 if new_child
!= null then
9291 new_child
.parent
= self
9292 assert new_child
isa TEndString
9293 _n_string
= new_child
9301 redef fun n_string
=(node
)
9308 redef fun visit_all
(v
: Visitor)
9310 v
.enter_visit
(_n_string
)
9313 redef class ASuperstringExpr
9314 private init empty_init
do end
9316 init init_asuperstringexpr
(
9317 n_exprs
: Collection[Object], # Should be Collection[AExpr]
9318 n_annotations
: nullable AAnnotations
9327 _n_annotations
= n_annotations
9328 if n_annotations
!= null then
9329 n_annotations
.parent
= self
9333 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9335 for i
in [0.._n_exprs
.length
[ do
9336 if _n_exprs
[i
] == old_child
then
9337 if new_child
!= null then
9338 assert new_child
isa AExpr
9339 _n_exprs
[i
] = new_child
9340 new_child
.parent
= self
9342 _n_exprs
.remove_at
(i
)
9347 if _n_annotations
== old_child
then
9348 if new_child
!= null then
9349 new_child
.parent
= self
9350 assert new_child
isa AAnnotations
9351 _n_annotations
= new_child
9353 _n_annotations
= null
9359 redef fun n_annotations
=(node
)
9361 _n_annotations
= node
9362 if node
!= null then
9368 redef fun visit_all
(v
: Visitor)
9370 for n
in _n_exprs
do
9373 if _n_annotations
!= null then
9374 v
.enter_visit
(_n_annotations
.as(not null))
9378 redef class AParExpr
9379 private init empty_init
do end
9381 init init_aparexpr
(
9382 n_opar
: nullable TOpar,
9383 n_expr
: nullable AExpr,
9384 n_cpar
: nullable TCpar,
9385 n_annotations
: nullable AAnnotations
9389 _n_opar
= n_opar
.as(not null)
9390 n_opar
.parent
= self
9391 _n_expr
= n_expr
.as(not null)
9392 n_expr
.parent
= self
9393 _n_cpar
= n_cpar
.as(not null)
9394 n_cpar
.parent
= self
9395 _n_annotations
= n_annotations
9396 if n_annotations
!= null then
9397 n_annotations
.parent
= self
9401 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9403 if _n_opar
== old_child
then
9404 if new_child
!= null then
9405 new_child
.parent
= self
9406 assert new_child
isa TOpar
9413 if _n_expr
== old_child
then
9414 if new_child
!= null then
9415 new_child
.parent
= self
9416 assert new_child
isa AExpr
9423 if _n_cpar
== old_child
then
9424 if new_child
!= null then
9425 new_child
.parent
= self
9426 assert new_child
isa TCpar
9433 if _n_annotations
== old_child
then
9434 if new_child
!= null then
9435 new_child
.parent
= self
9436 assert new_child
isa AAnnotations
9437 _n_annotations
= new_child
9439 _n_annotations
= null
9445 redef fun n_opar
=(node
)
9450 redef fun n_expr
=(node
)
9455 redef fun n_cpar
=(node
)
9460 redef fun n_annotations
=(node
)
9462 _n_annotations
= node
9463 if node
!= null then
9469 redef fun visit_all
(v
: Visitor)
9471 v
.enter_visit
(_n_opar
)
9472 v
.enter_visit
(_n_expr
)
9473 v
.enter_visit
(_n_cpar
)
9474 if _n_annotations
!= null then
9475 v
.enter_visit
(_n_annotations
.as(not null))
9479 redef class AAsCastExpr
9480 private init empty_init
do end
9482 init init_aascastexpr
(
9483 n_expr
: nullable AExpr,
9484 n_kwas
: nullable TKwas,
9485 n_opar
: nullable TOpar,
9486 n_type
: nullable AType,
9487 n_cpar
: nullable TCpar
9491 _n_expr
= n_expr
.as(not null)
9492 n_expr
.parent
= self
9493 _n_kwas
= n_kwas
.as(not null)
9494 n_kwas
.parent
= self
9495 _n_opar
= n_opar
.as(not null)
9496 n_opar
.parent
= self
9497 _n_type
= n_type
.as(not null)
9498 n_type
.parent
= self
9499 _n_cpar
= n_cpar
.as(not null)
9500 n_cpar
.parent
= self
9503 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9505 if _n_expr
== old_child
then
9506 if new_child
!= null then
9507 new_child
.parent
= self
9508 assert new_child
isa AExpr
9515 if _n_kwas
== old_child
then
9516 if new_child
!= null then
9517 new_child
.parent
= self
9518 assert new_child
isa TKwas
9525 if _n_opar
== old_child
then
9526 if new_child
!= null then
9527 new_child
.parent
= self
9528 assert new_child
isa TOpar
9535 if _n_type
== old_child
then
9536 if new_child
!= null then
9537 new_child
.parent
= self
9538 assert new_child
isa AType
9545 if _n_cpar
== old_child
then
9546 if new_child
!= null then
9547 new_child
.parent
= self
9548 assert new_child
isa TCpar
9557 redef fun n_expr
=(node
)
9562 redef fun n_kwas
=(node
)
9567 redef fun n_opar
=(node
)
9572 redef fun n_type
=(node
)
9577 redef fun n_cpar
=(node
)
9584 redef fun visit_all
(v
: Visitor)
9586 v
.enter_visit
(_n_expr
)
9587 v
.enter_visit
(_n_kwas
)
9588 v
.enter_visit
(_n_opar
)
9589 v
.enter_visit
(_n_type
)
9590 v
.enter_visit
(_n_cpar
)
9593 redef class AAsNotnullExpr
9594 private init empty_init
do end
9596 init init_aasnotnullexpr
(
9597 n_expr
: nullable AExpr,
9598 n_kwas
: nullable TKwas,
9599 n_opar
: nullable TOpar,
9600 n_kwnot
: nullable TKwnot,
9601 n_kwnull
: nullable TKwnull,
9602 n_cpar
: nullable TCpar
9606 _n_expr
= n_expr
.as(not null)
9607 n_expr
.parent
= self
9608 _n_kwas
= n_kwas
.as(not null)
9609 n_kwas
.parent
= self
9610 _n_opar
= n_opar
.as(not null)
9611 n_opar
.parent
= self
9612 _n_kwnot
= n_kwnot
.as(not null)
9613 n_kwnot
.parent
= self
9614 _n_kwnull
= n_kwnull
.as(not null)
9615 n_kwnull
.parent
= self
9616 _n_cpar
= n_cpar
.as(not null)
9617 n_cpar
.parent
= self
9620 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9622 if _n_expr
== old_child
then
9623 if new_child
!= null then
9624 new_child
.parent
= self
9625 assert new_child
isa AExpr
9632 if _n_kwas
== old_child
then
9633 if new_child
!= null then
9634 new_child
.parent
= self
9635 assert new_child
isa TKwas
9642 if _n_opar
== old_child
then
9643 if new_child
!= null then
9644 new_child
.parent
= self
9645 assert new_child
isa TOpar
9652 if _n_kwnot
== old_child
then
9653 if new_child
!= null then
9654 new_child
.parent
= self
9655 assert new_child
isa TKwnot
9656 _n_kwnot
= new_child
9662 if _n_kwnull
== old_child
then
9663 if new_child
!= null then
9664 new_child
.parent
= self
9665 assert new_child
isa TKwnull
9666 _n_kwnull
= new_child
9672 if _n_cpar
== old_child
then
9673 if new_child
!= null then
9674 new_child
.parent
= self
9675 assert new_child
isa TCpar
9684 redef fun n_expr
=(node
)
9689 redef fun n_kwas
=(node
)
9694 redef fun n_opar
=(node
)
9699 redef fun n_kwnot
=(node
)
9704 redef fun n_kwnull
=(node
)
9709 redef fun n_cpar
=(node
)
9716 redef fun visit_all
(v
: Visitor)
9718 v
.enter_visit
(_n_expr
)
9719 v
.enter_visit
(_n_kwas
)
9720 v
.enter_visit
(_n_opar
)
9721 v
.enter_visit
(_n_kwnot
)
9722 v
.enter_visit
(_n_kwnull
)
9723 v
.enter_visit
(_n_cpar
)
9726 redef class AIssetAttrExpr
9727 private init empty_init
do end
9729 init init_aissetattrexpr
(
9730 n_kwisset
: nullable TKwisset,
9731 n_expr
: nullable AExpr,
9732 n_id
: nullable TAttrid
9736 _n_kwisset
= n_kwisset
.as(not null)
9737 n_kwisset
.parent
= self
9738 _n_expr
= n_expr
.as(not null)
9739 n_expr
.parent
= self
9740 _n_id
= n_id
.as(not null)
9744 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9746 if _n_kwisset
== old_child
then
9747 if new_child
!= null then
9748 new_child
.parent
= self
9749 assert new_child
isa TKwisset
9750 _n_kwisset
= new_child
9756 if _n_expr
== old_child
then
9757 if new_child
!= null then
9758 new_child
.parent
= self
9759 assert new_child
isa AExpr
9766 if _n_id
== old_child
then
9767 if new_child
!= null then
9768 new_child
.parent
= self
9769 assert new_child
isa TAttrid
9778 redef fun n_kwisset
=(node
)
9783 redef fun n_expr
=(node
)
9788 redef fun n_id
=(node
)
9795 redef fun visit_all
(v
: Visitor)
9797 v
.enter_visit
(_n_kwisset
)
9798 v
.enter_visit
(_n_expr
)
9799 v
.enter_visit
(_n_id
)
9802 redef class ADebugTypeExpr
9803 private init empty_init
do end
9805 init init_adebugtypeexpr
(
9806 n_kwdebug
: nullable TKwdebug,
9807 n_kwtype
: nullable TKwtype,
9808 n_expr
: nullable AExpr,
9809 n_type
: nullable AType
9813 _n_kwdebug
= n_kwdebug
.as(not null)
9814 n_kwdebug
.parent
= self
9815 _n_kwtype
= n_kwtype
.as(not null)
9816 n_kwtype
.parent
= self
9817 _n_expr
= n_expr
.as(not null)
9818 n_expr
.parent
= self
9819 _n_type
= n_type
.as(not null)
9820 n_type
.parent
= self
9823 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9825 if _n_kwdebug
== old_child
then
9826 if new_child
!= null then
9827 new_child
.parent
= self
9828 assert new_child
isa TKwdebug
9829 _n_kwdebug
= new_child
9835 if _n_kwtype
== old_child
then
9836 if new_child
!= null then
9837 new_child
.parent
= self
9838 assert new_child
isa TKwtype
9839 _n_kwtype
= new_child
9845 if _n_expr
== old_child
then
9846 if new_child
!= null then
9847 new_child
.parent
= self
9848 assert new_child
isa AExpr
9855 if _n_type
== old_child
then
9856 if new_child
!= null then
9857 new_child
.parent
= self
9858 assert new_child
isa AType
9867 redef fun n_kwdebug
=(node
)
9872 redef fun n_kwtype
=(node
)
9877 redef fun n_expr
=(node
)
9882 redef fun n_type
=(node
)
9889 redef fun visit_all
(v
: Visitor)
9891 v
.enter_visit
(_n_kwdebug
)
9892 v
.enter_visit
(_n_kwtype
)
9893 v
.enter_visit
(_n_expr
)
9894 v
.enter_visit
(_n_type
)
9897 redef class AListExprs
9898 private init empty_init
do end
9900 init init_alistexprs
(
9901 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9912 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9914 for i
in [0.._n_exprs
.length
[ do
9915 if _n_exprs
[i
] == old_child
then
9916 if new_child
!= null then
9917 assert new_child
isa AExpr
9918 _n_exprs
[i
] = new_child
9919 new_child
.parent
= self
9921 _n_exprs
.remove_at
(i
)
9930 redef fun visit_all
(v
: Visitor)
9932 for n
in _n_exprs
do
9937 redef class AParExprs
9938 private init empty_init
do end
9940 init init_aparexprs
(
9941 n_opar
: nullable TOpar,
9942 n_exprs
: Collection[Object], # Should be Collection[AExpr]
9943 n_cpar
: nullable TCpar
9947 _n_opar
= n_opar
.as(not null)
9948 n_opar
.parent
= self
9954 _n_cpar
= n_cpar
.as(not null)
9955 n_cpar
.parent
= self
9958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9960 if _n_opar
== old_child
then
9961 if new_child
!= null then
9962 new_child
.parent
= self
9963 assert new_child
isa TOpar
9970 for i
in [0.._n_exprs
.length
[ do
9971 if _n_exprs
[i
] == old_child
then
9972 if new_child
!= null then
9973 assert new_child
isa AExpr
9974 _n_exprs
[i
] = new_child
9975 new_child
.parent
= self
9977 _n_exprs
.remove_at
(i
)
9982 if _n_cpar
== old_child
then
9983 if new_child
!= null then
9984 new_child
.parent
= self
9985 assert new_child
isa TCpar
9994 redef fun n_opar
=(node
)
9999 redef fun n_cpar
=(node
)
10006 redef fun visit_all
(v
: Visitor)
10008 v
.enter_visit
(_n_opar
)
10009 for n
in _n_exprs
do
10012 v
.enter_visit
(_n_cpar
)
10015 redef class ABraExprs
10016 private init empty_init
do end
10018 init init_abraexprs
(
10019 n_obra
: nullable TObra,
10020 n_exprs
: Collection[Object], # Should be Collection[AExpr]
10021 n_cbra
: nullable TCbra
10025 _n_obra
= n_obra
.as(not null)
10026 n_obra
.parent
= self
10027 for n
in n_exprs
do
10032 _n_cbra
= n_cbra
.as(not null)
10033 n_cbra
.parent
= self
10036 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10038 if _n_obra
== old_child
then
10039 if new_child
!= null then
10040 new_child
.parent
= self
10041 assert new_child
isa TObra
10042 _n_obra
= new_child
10048 for i
in [0.._n_exprs
.length
[ do
10049 if _n_exprs
[i
] == old_child
then
10050 if new_child
!= null then
10051 assert new_child
isa AExpr
10052 _n_exprs
[i
] = new_child
10053 new_child
.parent
= self
10055 _n_exprs
.remove_at
(i
)
10060 if _n_cbra
== old_child
then
10061 if new_child
!= null then
10062 new_child
.parent
= self
10063 assert new_child
isa TCbra
10064 _n_cbra
= new_child
10072 redef fun n_obra
=(node
)
10077 redef fun n_cbra
=(node
)
10084 redef fun visit_all
(v
: Visitor)
10086 v
.enter_visit
(_n_obra
)
10087 for n
in _n_exprs
do
10090 v
.enter_visit
(_n_cbra
)
10093 redef class APlusAssignOp
10094 private init empty_init
do end
10096 init init_aplusassignop
(
10097 n_pluseq
: nullable TPluseq
10101 _n_pluseq
= n_pluseq
.as(not null)
10102 n_pluseq
.parent
= self
10105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10107 if _n_pluseq
== old_child
then
10108 if new_child
!= null then
10109 new_child
.parent
= self
10110 assert new_child
isa TPluseq
10111 _n_pluseq
= new_child
10119 redef fun n_pluseq
=(node
)
10126 redef fun visit_all
(v
: Visitor)
10128 v
.enter_visit
(_n_pluseq
)
10131 redef class AMinusAssignOp
10132 private init empty_init
do end
10134 init init_aminusassignop
(
10135 n_minuseq
: nullable TMinuseq
10139 _n_minuseq
= n_minuseq
.as(not null)
10140 n_minuseq
.parent
= self
10143 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10145 if _n_minuseq
== old_child
then
10146 if new_child
!= null then
10147 new_child
.parent
= self
10148 assert new_child
isa TMinuseq
10149 _n_minuseq
= new_child
10157 redef fun n_minuseq
=(node
)
10164 redef fun visit_all
(v
: Visitor)
10166 v
.enter_visit
(_n_minuseq
)
10169 redef class AModuleName
10170 private init empty_init
do end
10172 init init_amodulename
(
10173 n_quad
: nullable TQuad,
10174 n_path
: Collection[Object], # Should be Collection[TId]
10180 if n_quad
!= null then
10181 n_quad
.parent
= self
10188 _n_id
= n_id
.as(not null)
10192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10194 if _n_quad
== old_child
then
10195 if new_child
!= null then
10196 new_child
.parent
= self
10197 assert new_child
isa TQuad
10198 _n_quad
= new_child
10204 for i
in [0.._n_path
.length
[ do
10205 if _n_path
[i
] == old_child
then
10206 if new_child
!= null then
10207 assert new_child
isa TId
10208 _n_path
[i
] = new_child
10209 new_child
.parent
= self
10211 _n_path
.remove_at
(i
)
10216 if _n_id
== old_child
then
10217 if new_child
!= null then
10218 new_child
.parent
= self
10219 assert new_child
isa TId
10228 redef fun n_quad
=(node
)
10231 if node
!= null then
10235 redef fun n_id
=(node
)
10242 redef fun visit_all
(v
: Visitor)
10244 if _n_quad
!= null then
10245 v
.enter_visit
(_n_quad
.as(not null))
10247 for n
in _n_path
do
10250 v
.enter_visit
(_n_id
)
10253 redef class AExternCalls
10254 private init empty_init
do end
10256 init init_aexterncalls
(
10257 n_kwimport
: nullable TKwimport,
10258 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
10262 _n_kwimport
= n_kwimport
.as(not null)
10263 n_kwimport
.parent
= self
10264 for n
in n_extern_calls
do
10265 assert n
isa AExternCall
10266 _n_extern_calls
.add
(n
)
10271 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10273 if _n_kwimport
== old_child
then
10274 if new_child
!= null then
10275 new_child
.parent
= self
10276 assert new_child
isa TKwimport
10277 _n_kwimport
= new_child
10283 for i
in [0.._n_extern_calls
.length
[ do
10284 if _n_extern_calls
[i
] == old_child
then
10285 if new_child
!= null then
10286 assert new_child
isa AExternCall
10287 _n_extern_calls
[i
] = new_child
10288 new_child
.parent
= self
10290 _n_extern_calls
.remove_at
(i
)
10297 redef fun n_kwimport
=(node
)
10304 redef fun visit_all
(v
: Visitor)
10306 v
.enter_visit
(_n_kwimport
)
10307 for n
in _n_extern_calls
do
10312 redef class AExternCall
10313 private init empty_init
do end
10315 init init_aexterncall
10320 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10326 redef fun visit_all
(v
: Visitor)
10330 redef class ASuperExternCall
10331 private init empty_init
do end
10333 init init_asuperexterncall
(
10334 n_kwsuper
: nullable TKwsuper
10338 _n_kwsuper
= n_kwsuper
.as(not null)
10339 n_kwsuper
.parent
= self
10342 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10344 if _n_kwsuper
== old_child
then
10345 if new_child
!= null then
10346 new_child
.parent
= self
10347 assert new_child
isa TKwsuper
10348 _n_kwsuper
= new_child
10356 redef fun n_kwsuper
=(node
)
10363 redef fun visit_all
(v
: Visitor)
10365 v
.enter_visit
(_n_kwsuper
)
10368 redef class ALocalPropExternCall
10369 private init empty_init
do end
10371 init init_alocalpropexterncall
(
10372 n_methid
: nullable AMethid
10376 _n_methid
= n_methid
.as(not null)
10377 n_methid
.parent
= self
10380 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10382 if _n_methid
== old_child
then
10383 if new_child
!= null then
10384 new_child
.parent
= self
10385 assert new_child
isa AMethid
10386 _n_methid
= new_child
10394 redef fun n_methid
=(node
)
10401 redef fun visit_all
(v
: Visitor)
10403 v
.enter_visit
(_n_methid
)
10406 redef class AFullPropExternCall
10407 private init empty_init
do end
10409 init init_afullpropexterncall
(
10410 n_type
: nullable AType,
10411 n_dot
: nullable TDot,
10412 n_methid
: nullable AMethid
10416 _n_type
= n_type
.as(not null)
10417 n_type
.parent
= self
10419 if n_dot
!= null then
10420 n_dot
.parent
= self
10422 _n_methid
= n_methid
.as(not null)
10423 n_methid
.parent
= self
10426 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10428 if _n_type
== old_child
then
10429 if new_child
!= null then
10430 new_child
.parent
= self
10431 assert new_child
isa AType
10432 _n_type
= new_child
10438 if _n_dot
== old_child
then
10439 if new_child
!= null then
10440 new_child
.parent
= self
10441 assert new_child
isa TDot
10448 if _n_methid
== old_child
then
10449 if new_child
!= null then
10450 new_child
.parent
= self
10451 assert new_child
isa AMethid
10452 _n_methid
= new_child
10460 redef fun n_type
=(node
)
10465 redef fun n_dot
=(node
)
10468 if node
!= null then
10472 redef fun n_methid
=(node
)
10479 redef fun visit_all
(v
: Visitor)
10481 v
.enter_visit
(_n_type
)
10482 if _n_dot
!= null then
10483 v
.enter_visit
(_n_dot
.as(not null))
10485 v
.enter_visit
(_n_methid
)
10488 redef class AInitPropExternCall
10489 private init empty_init
do end
10491 init init_ainitpropexterncall
(
10492 n_type
: nullable AType
10496 _n_type
= n_type
.as(not null)
10497 n_type
.parent
= self
10500 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10502 if _n_type
== old_child
then
10503 if new_child
!= null then
10504 new_child
.parent
= self
10505 assert new_child
isa AType
10506 _n_type
= new_child
10514 redef fun n_type
=(node
)
10521 redef fun visit_all
(v
: Visitor)
10523 v
.enter_visit
(_n_type
)
10526 redef class ACastAsExternCall
10527 private init empty_init
do end
10529 init init_acastasexterncall
(
10530 n_from_type
: nullable AType,
10531 n_dot
: nullable TDot,
10532 n_kwas
: nullable TKwas,
10533 n_to_type
: nullable AType
10537 _n_from_type
= n_from_type
.as(not null)
10538 n_from_type
.parent
= self
10540 if n_dot
!= null then
10541 n_dot
.parent
= self
10543 _n_kwas
= n_kwas
.as(not null)
10544 n_kwas
.parent
= self
10545 _n_to_type
= n_to_type
.as(not null)
10546 n_to_type
.parent
= self
10549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10551 if _n_from_type
== old_child
then
10552 if new_child
!= null then
10553 new_child
.parent
= self
10554 assert new_child
isa AType
10555 _n_from_type
= new_child
10561 if _n_dot
== old_child
then
10562 if new_child
!= null then
10563 new_child
.parent
= self
10564 assert new_child
isa TDot
10571 if _n_kwas
== old_child
then
10572 if new_child
!= null then
10573 new_child
.parent
= self
10574 assert new_child
isa TKwas
10575 _n_kwas
= new_child
10581 if _n_to_type
== old_child
then
10582 if new_child
!= null then
10583 new_child
.parent
= self
10584 assert new_child
isa AType
10585 _n_to_type
= new_child
10593 redef fun n_from_type
=(node
)
10595 _n_from_type
= node
10598 redef fun n_dot
=(node
)
10601 if node
!= null then
10605 redef fun n_kwas
=(node
)
10610 redef fun n_to_type
=(node
)
10617 redef fun visit_all
(v
: Visitor)
10619 v
.enter_visit
(_n_from_type
)
10620 if _n_dot
!= null then
10621 v
.enter_visit
(_n_dot
.as(not null))
10623 v
.enter_visit
(_n_kwas
)
10624 v
.enter_visit
(_n_to_type
)
10627 redef class AAsNullableExternCall
10628 private init empty_init
do end
10630 init init_aasnullableexterncall
(
10631 n_type
: nullable AType,
10632 n_kwas
: nullable TKwas,
10633 n_kwnullable
: nullable TKwnullable
10637 _n_type
= n_type
.as(not null)
10638 n_type
.parent
= self
10639 _n_kwas
= n_kwas
.as(not null)
10640 n_kwas
.parent
= self
10641 _n_kwnullable
= n_kwnullable
.as(not null)
10642 n_kwnullable
.parent
= self
10645 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10647 if _n_type
== old_child
then
10648 if new_child
!= null then
10649 new_child
.parent
= self
10650 assert new_child
isa AType
10651 _n_type
= new_child
10657 if _n_kwas
== old_child
then
10658 if new_child
!= null then
10659 new_child
.parent
= self
10660 assert new_child
isa TKwas
10661 _n_kwas
= new_child
10667 if _n_kwnullable
== old_child
then
10668 if new_child
!= null then
10669 new_child
.parent
= self
10670 assert new_child
isa TKwnullable
10671 _n_kwnullable
= new_child
10679 redef fun n_type
=(node
)
10684 redef fun n_kwas
=(node
)
10689 redef fun n_kwnullable
=(node
)
10691 _n_kwnullable
= node
10696 redef fun visit_all
(v
: Visitor)
10698 v
.enter_visit
(_n_type
)
10699 v
.enter_visit
(_n_kwas
)
10700 v
.enter_visit
(_n_kwnullable
)
10703 redef class AAsNotNullableExternCall
10704 private init empty_init
do end
10706 init init_aasnotnullableexterncall
(
10707 n_type
: nullable AType,
10708 n_kwas
: nullable TKwas,
10709 n_kwnot
: nullable TKwnot,
10710 n_kwnullable
: nullable TKwnullable
10714 _n_type
= n_type
.as(not null)
10715 n_type
.parent
= self
10716 _n_kwas
= n_kwas
.as(not null)
10717 n_kwas
.parent
= self
10718 _n_kwnot
= n_kwnot
.as(not null)
10719 n_kwnot
.parent
= self
10720 _n_kwnullable
= n_kwnullable
.as(not null)
10721 n_kwnullable
.parent
= self
10724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10726 if _n_type
== old_child
then
10727 if new_child
!= null then
10728 new_child
.parent
= self
10729 assert new_child
isa AType
10730 _n_type
= new_child
10736 if _n_kwas
== old_child
then
10737 if new_child
!= null then
10738 new_child
.parent
= self
10739 assert new_child
isa TKwas
10740 _n_kwas
= new_child
10746 if _n_kwnot
== old_child
then
10747 if new_child
!= null then
10748 new_child
.parent
= self
10749 assert new_child
isa TKwnot
10750 _n_kwnot
= new_child
10756 if _n_kwnullable
== old_child
then
10757 if new_child
!= null then
10758 new_child
.parent
= self
10759 assert new_child
isa TKwnullable
10760 _n_kwnullable
= new_child
10768 redef fun n_type
=(node
)
10773 redef fun n_kwas
=(node
)
10778 redef fun n_kwnot
=(node
)
10783 redef fun n_kwnullable
=(node
)
10785 _n_kwnullable
= node
10790 redef fun visit_all
(v
: Visitor)
10792 v
.enter_visit
(_n_type
)
10793 v
.enter_visit
(_n_kwas
)
10794 v
.enter_visit
(_n_kwnot
)
10795 v
.enter_visit
(_n_kwnullable
)
10798 redef class AInLanguage
10799 private init empty_init
do end
10801 init init_ainlanguage
(
10802 n_kwin
: nullable TKwin,
10803 n_string
: nullable TString
10807 _n_kwin
= n_kwin
.as(not null)
10808 n_kwin
.parent
= self
10809 _n_string
= n_string
.as(not null)
10810 n_string
.parent
= self
10813 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10815 if _n_kwin
== old_child
then
10816 if new_child
!= null then
10817 new_child
.parent
= self
10818 assert new_child
isa TKwin
10819 _n_kwin
= new_child
10825 if _n_string
== old_child
then
10826 if new_child
!= null then
10827 new_child
.parent
= self
10828 assert new_child
isa TString
10829 _n_string
= new_child
10837 redef fun n_kwin
=(node
)
10842 redef fun n_string
=(node
)
10849 redef fun visit_all
(v
: Visitor)
10851 v
.enter_visit
(_n_kwin
)
10852 v
.enter_visit
(_n_string
)
10855 redef class AExternCodeBlock
10856 private init empty_init
do end
10858 init init_aexterncodeblock
(
10859 n_in_language
: nullable AInLanguage,
10860 n_extern_code_segment
: nullable TExternCodeSegment
10864 _n_in_language
= n_in_language
10865 if n_in_language
!= null then
10866 n_in_language
.parent
= self
10868 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
10869 n_extern_code_segment
.parent
= self
10872 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10874 if _n_in_language
== old_child
then
10875 if new_child
!= null then
10876 new_child
.parent
= self
10877 assert new_child
isa AInLanguage
10878 _n_in_language
= new_child
10880 _n_in_language
= null
10884 if _n_extern_code_segment
== old_child
then
10885 if new_child
!= null then
10886 new_child
.parent
= self
10887 assert new_child
isa TExternCodeSegment
10888 _n_extern_code_segment
= new_child
10896 redef fun n_in_language
=(node
)
10898 _n_in_language
= node
10899 if node
!= null then
10903 redef fun n_extern_code_segment
=(node
)
10905 _n_extern_code_segment
= node
10910 redef fun visit_all
(v
: Visitor)
10912 if _n_in_language
!= null then
10913 v
.enter_visit
(_n_in_language
.as(not null))
10915 v
.enter_visit
(_n_extern_code_segment
)
10918 redef class AQualified
10919 private init empty_init
do end
10921 init init_aqualified
(
10922 n_id
: Collection[Object], # Should be Collection[TId]
10923 n_classid
: nullable TClassid
10932 _n_classid
= n_classid
10933 if n_classid
!= null then
10934 n_classid
.parent
= self
10938 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
10940 for i
in [0.._n_id
.length
[ do
10941 if _n_id
[i
] == old_child
then
10942 if new_child
!= null then
10943 assert new_child
isa TId
10944 _n_id
[i
] = new_child
10945 new_child
.parent
= self
10952 if _n_classid
== old_child
then
10953 if new_child
!= null then
10954 new_child
.parent
= self
10955 assert new_child
isa TClassid
10956 _n_classid
= new_child
10964 redef fun n_classid
=(node
)
10967 if node
!= null then
10973 redef fun visit_all
(v
: Visitor)
10978 if _n_classid
!= null then
10979 v
.enter_visit
(_n_classid
.as(not null))
10984 private init empty_init
do end
10987 n_comment
: Collection[Object] # Should be Collection[TComment]
10991 for n
in n_comment
do
10992 assert n
isa TComment
10998 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11000 for i
in [0.._n_comment
.length
[ do
11001 if _n_comment
[i
] == old_child
then
11002 if new_child
!= null then
11003 assert new_child
isa TComment
11004 _n_comment
[i
] = new_child
11005 new_child
.parent
= self
11007 _n_comment
.remove_at
(i
)
11016 redef fun visit_all
(v
: Visitor)
11018 for n
in _n_comment
do
11023 redef class AAnnotations
11024 private init empty_init
do end
11026 init init_aannotations
(
11027 n_at
: nullable TAt,
11028 n_opar
: nullable TOpar,
11029 n_items
: Collection[Object], # Should be Collection[AAnnotation]
11030 n_cpar
: nullable TCpar
11035 if n_at
!= null then
11039 if n_opar
!= null then
11040 n_opar
.parent
= self
11042 for n
in n_items
do
11043 assert n
isa AAnnotation
11048 if n_cpar
!= null then
11049 n_cpar
.parent
= self
11053 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11055 if _n_at
== old_child
then
11056 if new_child
!= null then
11057 new_child
.parent
= self
11058 assert new_child
isa TAt
11065 if _n_opar
== old_child
then
11066 if new_child
!= null then
11067 new_child
.parent
= self
11068 assert new_child
isa TOpar
11069 _n_opar
= new_child
11075 for i
in [0.._n_items
.length
[ do
11076 if _n_items
[i
] == old_child
then
11077 if new_child
!= null then
11078 assert new_child
isa AAnnotation
11079 _n_items
[i
] = new_child
11080 new_child
.parent
= self
11082 _n_items
.remove_at
(i
)
11087 if _n_cpar
== old_child
then
11088 if new_child
!= null then
11089 new_child
.parent
= self
11090 assert new_child
isa TCpar
11091 _n_cpar
= new_child
11099 redef fun n_at
=(node
)
11102 if node
!= null then
11106 redef fun n_opar
=(node
)
11109 if node
!= null then
11113 redef fun n_cpar
=(node
)
11116 if node
!= null then
11122 redef fun visit_all
(v
: Visitor)
11124 if _n_at
!= null then
11125 v
.enter_visit
(_n_at
.as(not null))
11127 if _n_opar
!= null then
11128 v
.enter_visit
(_n_opar
.as(not null))
11130 for n
in _n_items
do
11133 if _n_cpar
!= null then
11134 v
.enter_visit
(_n_cpar
.as(not null))
11138 redef class AAnnotation
11139 private init empty_init
do end
11141 init init_aannotation
(
11142 n_atid
: nullable AAtid,
11143 n_opar
: nullable TOpar,
11144 n_args
: Collection[Object], # Should be Collection[AAtArg]
11145 n_cpar
: nullable TCpar,
11146 n_annotations
: nullable AAnnotations
11150 _n_atid
= n_atid
.as(not null)
11151 n_atid
.parent
= self
11153 if n_opar
!= null then
11154 n_opar
.parent
= self
11157 assert n
isa AAtArg
11162 if n_cpar
!= null then
11163 n_cpar
.parent
= self
11165 _n_annotations
= n_annotations
11166 if n_annotations
!= null then
11167 n_annotations
.parent
= self
11171 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11173 if _n_atid
== old_child
then
11174 if new_child
!= null then
11175 new_child
.parent
= self
11176 assert new_child
isa AAtid
11177 _n_atid
= new_child
11183 if _n_opar
== old_child
then
11184 if new_child
!= null then
11185 new_child
.parent
= self
11186 assert new_child
isa TOpar
11187 _n_opar
= new_child
11193 for i
in [0.._n_args
.length
[ do
11194 if _n_args
[i
] == old_child
then
11195 if new_child
!= null then
11196 assert new_child
isa AAtArg
11197 _n_args
[i
] = new_child
11198 new_child
.parent
= self
11200 _n_args
.remove_at
(i
)
11205 if _n_cpar
== old_child
then
11206 if new_child
!= null then
11207 new_child
.parent
= self
11208 assert new_child
isa TCpar
11209 _n_cpar
= new_child
11215 if _n_annotations
== old_child
then
11216 if new_child
!= null then
11217 new_child
.parent
= self
11218 assert new_child
isa AAnnotations
11219 _n_annotations
= new_child
11221 _n_annotations
= null
11227 redef fun n_atid
=(node
)
11232 redef fun n_opar
=(node
)
11235 if node
!= null then
11239 redef fun n_cpar
=(node
)
11242 if node
!= null then
11246 redef fun n_annotations
=(node
)
11248 _n_annotations
= node
11249 if node
!= null then
11255 redef fun visit_all
(v
: Visitor)
11257 v
.enter_visit
(_n_atid
)
11258 if _n_opar
!= null then
11259 v
.enter_visit
(_n_opar
.as(not null))
11261 for n
in _n_args
do
11264 if _n_cpar
!= null then
11265 v
.enter_visit
(_n_cpar
.as(not null))
11267 if _n_annotations
!= null then
11268 v
.enter_visit
(_n_annotations
.as(not null))
11272 redef class ATypeAtArg
11273 private init empty_init
do end
11275 init init_atypeatarg
(
11276 n_type
: nullable AType
11280 _n_type
= n_type
.as(not null)
11281 n_type
.parent
= self
11284 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11286 if _n_type
== old_child
then
11287 if new_child
!= null then
11288 new_child
.parent
= self
11289 assert new_child
isa AType
11290 _n_type
= new_child
11298 redef fun n_type
=(node
)
11305 redef fun visit_all
(v
: Visitor)
11307 v
.enter_visit
(_n_type
)
11310 redef class AExprAtArg
11311 private init empty_init
do end
11313 init init_aexpratarg
(
11314 n_expr
: nullable AExpr
11318 _n_expr
= n_expr
.as(not null)
11319 n_expr
.parent
= self
11322 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11324 if _n_expr
== old_child
then
11325 if new_child
!= null then
11326 new_child
.parent
= self
11327 assert new_child
isa AExpr
11328 _n_expr
= new_child
11336 redef fun n_expr
=(node
)
11343 redef fun visit_all
(v
: Visitor)
11345 v
.enter_visit
(_n_expr
)
11348 redef class AAtAtArg
11349 private init empty_init
do end
11351 init init_aatatarg
(
11352 n_annotations
: nullable AAnnotations
11356 _n_annotations
= n_annotations
.as(not null)
11357 n_annotations
.parent
= self
11360 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11362 if _n_annotations
== old_child
then
11363 if new_child
!= null then
11364 new_child
.parent
= self
11365 assert new_child
isa AAnnotations
11366 _n_annotations
= new_child
11374 redef fun n_annotations
=(node
)
11376 _n_annotations
= node
11381 redef fun visit_all
(v
: Visitor)
11383 v
.enter_visit
(_n_annotations
)
11386 redef class AIdAtid
11387 private init empty_init
do end
11389 init init_aidatid
(
11394 _n_id
= n_id
.as(not null)
11398 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11400 if _n_id
== old_child
then
11401 if new_child
!= null then
11402 new_child
.parent
= self
11403 assert new_child
isa TId
11412 redef fun n_id
=(node
)
11419 redef fun visit_all
(v
: Visitor)
11421 v
.enter_visit
(_n_id
)
11424 redef class AKwexternAtid
11425 private init empty_init
do end
11427 init init_akwexternatid
(
11428 n_id
: nullable TKwextern
11432 _n_id
= n_id
.as(not null)
11436 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11438 if _n_id
== old_child
then
11439 if new_child
!= null then
11440 new_child
.parent
= self
11441 assert new_child
isa TKwextern
11450 redef fun n_id
=(node
)
11457 redef fun visit_all
(v
: Visitor)
11459 v
.enter_visit
(_n_id
)
11462 redef class AKwinternAtid
11463 private init empty_init
do end
11465 init init_akwinternatid
(
11466 n_id
: nullable TKwintern
11470 _n_id
= n_id
.as(not null)
11474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11476 if _n_id
== old_child
then
11477 if new_child
!= null then
11478 new_child
.parent
= self
11479 assert new_child
isa TKwintern
11488 redef fun n_id
=(node
)
11495 redef fun visit_all
(v
: Visitor)
11497 v
.enter_visit
(_n_id
)
11500 redef class AKwreadableAtid
11501 private init empty_init
do end
11503 init init_akwreadableatid
(
11504 n_id
: nullable TKwreadable
11508 _n_id
= n_id
.as(not null)
11512 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11514 if _n_id
== old_child
then
11515 if new_child
!= null then
11516 new_child
.parent
= self
11517 assert new_child
isa TKwreadable
11526 redef fun n_id
=(node
)
11533 redef fun visit_all
(v
: Visitor)
11535 v
.enter_visit
(_n_id
)
11538 redef class AKwwritableAtid
11539 private init empty_init
do end
11541 init init_akwwritableatid
(
11542 n_id
: nullable TKwwritable
11546 _n_id
= n_id
.as(not null)
11550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11552 if _n_id
== old_child
then
11553 if new_child
!= null then
11554 new_child
.parent
= self
11555 assert new_child
isa TKwwritable
11564 redef fun n_id
=(node
)
11571 redef fun visit_all
(v
: Visitor)
11573 v
.enter_visit
(_n_id
)
11576 redef class AKwimportAtid
11577 private init empty_init
do end
11579 init init_akwimportatid
(
11580 n_id
: nullable TKwimport
11584 _n_id
= n_id
.as(not null)
11588 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11590 if _n_id
== old_child
then
11591 if new_child
!= null then
11592 new_child
.parent
= self
11593 assert new_child
isa TKwimport
11602 redef fun n_id
=(node
)
11609 redef fun visit_all
(v
: Visitor)
11611 v
.enter_visit
(_n_id
)
11616 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
11618 if _n_base
== old_child
then
11619 if new_child
== null then
11621 new_child
.parent
= self
11622 assert new_child
isa AModule
11623 _n_base
= new_child
11625 old_child
.parent
= null
11630 redef fun visit_all
(v
: Visitor)
11632 if _n_base
!= null then
11633 v
.enter_visit
(_n_base
.as(not null))
11635 v
.enter_visit
(_n_eof
)