1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
9 # Parent of the node in the AST
10 readable writable var _parent
: nullable ANode
12 # Remove a child from the AST
13 fun remove_child
(child
: ANode)
15 replace_child
(child
, null)
18 # Replace a child with an other node in the AST
19 fun replace_child
(old_child
: ANode, new_child
: nullable ANode) is abstract
21 # Replace itself with an other node in the AST
22 fun replace_with
(node
: ANode)
24 if (_parent
!= null) then
25 _parent
.replace_child
(self, node
)
29 # Visit all nodes in order.
30 # Thus, call "v.visit(e)" for each node e
31 fun visit_all
(v
: Visitor) is abstract
33 # Visit all nodes in reverse order.
34 # Thus, call "v.visit(e)" for each node e starting from the last child
35 fun visit_all_reverse
(v
: Visitor) is abstract
39 redef fun visit_all
(v
: Visitor) do end
40 redef fun visit_all_reverse
(v
: Visitor) do end
41 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode) do end
45 # The first token of the production node
46 readable writable var _first_token
: nullable Token
48 # The last token of the production node
49 readable writable var _last_token
: nullable Token
51 redef fun replace_with
(n
: ANode)
55 n
.first_token
= first_token
56 n
.last_token
= last_token
61 # Abstract standard visitor
63 # What the visitor do when a node is visited
64 # Concrete visitors should redefine this method.
65 protected fun visit
(e
: nullable ANode) is abstract
67 # Ask the visitor to visit a given node.
68 # Usually automatically called by visit_all* methods.
69 # This methos should not be redefined
70 fun enter_visit
(e
: nullable ANode)
72 var old
= _current_node
78 # The current visited node
79 readable var _current_node
: nullable ANode = null
83 redef fun n_packagedecl
=(n
)
91 private init empty_init
do end
94 n_packagedecl
: nullable APackagedecl,
95 n_imports
: Collection[Object], # Should be Collection[AImport]
96 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
100 _n_packagedecl
= n_packagedecl
101 if n_packagedecl
!= null then
102 n_packagedecl
.parent
= self
104 for n
in n_imports
do
109 for n
in n_classdefs
do
110 assert n
isa AClassdef
116 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
118 if _n_packagedecl
== old_child
then
119 if new_child
!= null then
120 new_child
.parent
= self
121 assert new_child
isa APackagedecl
122 _n_packagedecl
= new_child
124 _n_packagedecl
= null
128 for i
in [0.._n_imports
.length
[ do
129 if _n_imports
[i
] == old_child
then
130 if new_child
!= null then
131 assert new_child
isa AImport
132 _n_imports
[i
] = new_child
133 new_child
.parent
= self
135 _n_imports
.remove_at
(i
)
140 for i
in [0.._n_classdefs
.length
[ do
141 if _n_classdefs
[i
] == old_child
then
142 if new_child
!= null then
143 assert new_child
isa AClassdef
144 _n_classdefs
[i
] = new_child
145 new_child
.parent
= self
147 _n_classdefs
.remove_at
(i
)
154 redef fun visit_all
(v
: Visitor)
156 if _n_packagedecl
!= null then
157 v
.enter_visit
(_n_packagedecl
.as(not null))
159 for n
in _n_imports
do
162 for n
in _n_classdefs
do
167 redef fun visit_all_reverse
(v
: Visitor)
169 if _n_packagedecl
!= null then
170 v
.enter_visit
(_n_packagedecl
.as(not null))
173 var i
= _n_imports
.length
175 v
.enter_visit
(_n_imports
[i
])
180 var i
= _n_classdefs
.length
182 v
.enter_visit
(_n_classdefs
[i
])
188 redef class APackagedecl
196 redef fun n_kwpackage
=(n
)
207 private init empty_init
do end
209 init init_apackagedecl
(
210 n_doc
: nullable ADoc,
211 n_kwpackage
: nullable TKwpackage,
217 if n_doc
!= null then
220 _n_kwpackage
= n_kwpackage
.as(not null)
221 n_kwpackage
.parent
= self
222 _n_id
= n_id
.as(not null)
226 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
228 if _n_doc
== old_child
then
229 if new_child
!= null then
230 new_child
.parent
= self
231 assert new_child
isa ADoc
238 if _n_kwpackage
== old_child
then
239 if new_child
!= null then
240 new_child
.parent
= self
241 assert new_child
isa TKwpackage
242 _n_kwpackage
= new_child
248 if _n_id
== old_child
then
249 if new_child
!= null then
250 new_child
.parent
= self
251 assert new_child
isa TId
260 redef fun visit_all
(v
: Visitor)
262 if _n_doc
!= null then
263 v
.enter_visit
(_n_doc
.as(not null))
265 v
.enter_visit
(_n_kwpackage
)
269 redef fun visit_all_reverse
(v
: Visitor)
271 if _n_doc
!= null then
272 v
.enter_visit
(_n_doc
.as(not null))
274 v
.enter_visit
(_n_kwpackage
)
278 redef class AStdImport
279 redef fun n_visibility
=(n
)
284 redef fun n_kwimport
=(n
)
295 private init empty_init
do end
297 init init_astdimport
(
298 n_visibility
: nullable AVisibility,
299 n_kwimport
: nullable TKwimport,
304 _n_visibility
= n_visibility
.as(not null)
305 n_visibility
.parent
= self
306 _n_kwimport
= n_kwimport
.as(not null)
307 n_kwimport
.parent
= self
308 _n_id
= n_id
.as(not null)
312 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
314 if _n_visibility
== old_child
then
315 if new_child
!= null then
316 new_child
.parent
= self
317 assert new_child
isa AVisibility
318 _n_visibility
= new_child
324 if _n_kwimport
== old_child
then
325 if new_child
!= null then
326 new_child
.parent
= self
327 assert new_child
isa TKwimport
328 _n_kwimport
= new_child
334 if _n_id
== old_child
then
335 if new_child
!= null then
336 new_child
.parent
= self
337 assert new_child
isa TId
346 redef fun visit_all
(v
: Visitor)
348 v
.enter_visit
(_n_visibility
)
349 v
.enter_visit
(_n_kwimport
)
353 redef fun visit_all_reverse
(v
: Visitor)
355 v
.enter_visit
(_n_visibility
)
356 v
.enter_visit
(_n_kwimport
)
360 redef class ANoImport
361 redef fun n_visibility
=(n
)
366 redef fun n_kwimport
=(n
)
371 redef fun n_kwend
=(n
)
377 private init empty_init
do end
379 init init_anoimport
(
380 n_visibility
: nullable AVisibility,
381 n_kwimport
: nullable TKwimport,
382 n_kwend
: nullable TKwend
386 _n_visibility
= n_visibility
.as(not null)
387 n_visibility
.parent
= self
388 _n_kwimport
= n_kwimport
.as(not null)
389 n_kwimport
.parent
= self
390 _n_kwend
= n_kwend
.as(not null)
391 n_kwend
.parent
= self
394 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
396 if _n_visibility
== old_child
then
397 if new_child
!= null then
398 new_child
.parent
= self
399 assert new_child
isa AVisibility
400 _n_visibility
= new_child
406 if _n_kwimport
== old_child
then
407 if new_child
!= null then
408 new_child
.parent
= self
409 assert new_child
isa TKwimport
410 _n_kwimport
= new_child
416 if _n_kwend
== old_child
then
417 if new_child
!= null then
418 new_child
.parent
= self
419 assert new_child
isa TKwend
428 redef fun visit_all
(v
: Visitor)
430 v
.enter_visit
(_n_visibility
)
431 v
.enter_visit
(_n_kwimport
)
432 v
.enter_visit
(_n_kwend
)
435 redef fun visit_all_reverse
(v
: Visitor)
437 v
.enter_visit
(_n_visibility
)
438 v
.enter_visit
(_n_kwimport
)
439 v
.enter_visit
(_n_kwend
)
442 redef class APublicVisibility
444 private init empty_init
do end
446 init init_apublicvisibility
451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
455 redef fun visit_all
(v
: Visitor)
459 redef fun visit_all_reverse
(v
: Visitor)
463 redef class APrivateVisibility
464 redef fun n_kwprivate
=(n
)
470 private init empty_init
do end
472 init init_aprivatevisibility
(
473 n_kwprivate
: nullable TKwprivate
477 _n_kwprivate
= n_kwprivate
.as(not null)
478 n_kwprivate
.parent
= self
481 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
483 if _n_kwprivate
== old_child
then
484 if new_child
!= null then
485 new_child
.parent
= self
486 assert new_child
isa TKwprivate
487 _n_kwprivate
= new_child
495 redef fun visit_all
(v
: Visitor)
497 v
.enter_visit
(_n_kwprivate
)
500 redef fun visit_all_reverse
(v
: Visitor)
502 v
.enter_visit
(_n_kwprivate
)
505 redef class AProtectedVisibility
506 redef fun n_kwprotected
=(n
)
512 private init empty_init
do end
514 init init_aprotectedvisibility
(
515 n_kwprotected
: nullable TKwprotected
519 _n_kwprotected
= n_kwprotected
.as(not null)
520 n_kwprotected
.parent
= self
523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
525 if _n_kwprotected
== old_child
then
526 if new_child
!= null then
527 new_child
.parent
= self
528 assert new_child
isa TKwprotected
529 _n_kwprotected
= new_child
537 redef fun visit_all
(v
: Visitor)
539 v
.enter_visit
(_n_kwprotected
)
542 redef fun visit_all_reverse
(v
: Visitor)
544 v
.enter_visit
(_n_kwprotected
)
547 redef class AIntrudeVisibility
548 redef fun n_kwintrude
=(n
)
554 private init empty_init
do end
556 init init_aintrudevisibility
(
557 n_kwintrude
: nullable TKwintrude
561 _n_kwintrude
= n_kwintrude
.as(not null)
562 n_kwintrude
.parent
= self
565 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
567 if _n_kwintrude
== old_child
then
568 if new_child
!= null then
569 new_child
.parent
= self
570 assert new_child
isa TKwintrude
571 _n_kwintrude
= new_child
579 redef fun visit_all
(v
: Visitor)
581 v
.enter_visit
(_n_kwintrude
)
584 redef fun visit_all_reverse
(v
: Visitor)
586 v
.enter_visit
(_n_kwintrude
)
589 redef class AStdClassdef
597 redef fun n_kwredef
=(n
)
604 redef fun n_visibility
=(n
)
609 redef fun n_classkind
=(n
)
622 private init empty_init
do end
624 init init_astdclassdef
(
625 n_doc
: nullable ADoc,
626 n_kwredef
: nullable TKwredef,
627 n_visibility
: nullable AVisibility,
628 n_classkind
: nullable AClasskind,
629 n_id
: nullable TClassid,
630 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
631 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
632 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
637 if n_doc
!= null then
640 _n_kwredef
= n_kwredef
641 if n_kwredef
!= null then
642 n_kwredef
.parent
= self
644 _n_visibility
= n_visibility
.as(not null)
645 n_visibility
.parent
= self
646 _n_classkind
= n_classkind
.as(not null)
647 n_classkind
.parent
= self
652 for n
in n_formaldefs
do
653 assert n
isa AFormaldef
657 for n
in n_superclasses
do
658 assert n
isa ASuperclass
659 _n_superclasses
.add
(n
)
662 for n
in n_propdefs
do
663 assert n
isa APropdef
669 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
671 if _n_doc
== old_child
then
672 if new_child
!= null then
673 new_child
.parent
= self
674 assert new_child
isa ADoc
681 if _n_kwredef
== old_child
then
682 if new_child
!= null then
683 new_child
.parent
= self
684 assert new_child
isa TKwredef
685 _n_kwredef
= new_child
691 if _n_visibility
== old_child
then
692 if new_child
!= null then
693 new_child
.parent
= self
694 assert new_child
isa AVisibility
695 _n_visibility
= new_child
701 if _n_classkind
== old_child
then
702 if new_child
!= null then
703 new_child
.parent
= self
704 assert new_child
isa AClasskind
705 _n_classkind
= new_child
711 if _n_id
== old_child
then
712 if new_child
!= null then
713 new_child
.parent
= self
714 assert new_child
isa TClassid
721 for i
in [0.._n_formaldefs
.length
[ do
722 if _n_formaldefs
[i
] == old_child
then
723 if new_child
!= null then
724 assert new_child
isa AFormaldef
725 _n_formaldefs
[i
] = new_child
726 new_child
.parent
= self
728 _n_formaldefs
.remove_at
(i
)
733 for i
in [0.._n_superclasses
.length
[ do
734 if _n_superclasses
[i
] == old_child
then
735 if new_child
!= null then
736 assert new_child
isa ASuperclass
737 _n_superclasses
[i
] = new_child
738 new_child
.parent
= self
740 _n_superclasses
.remove_at
(i
)
745 for i
in [0.._n_propdefs
.length
[ do
746 if _n_propdefs
[i
] == old_child
then
747 if new_child
!= null then
748 assert new_child
isa APropdef
749 _n_propdefs
[i
] = new_child
750 new_child
.parent
= self
752 _n_propdefs
.remove_at
(i
)
759 redef fun visit_all
(v
: Visitor)
761 if _n_doc
!= null then
762 v
.enter_visit
(_n_doc
.as(not null))
764 if _n_kwredef
!= null then
765 v
.enter_visit
(_n_kwredef
.as(not null))
767 v
.enter_visit
(_n_visibility
)
768 v
.enter_visit
(_n_classkind
)
769 if _n_id
!= null then
770 v
.enter_visit
(_n_id
.as(not null))
772 for n
in _n_formaldefs
do
775 for n
in _n_superclasses
do
778 for n
in _n_propdefs
do
783 redef fun visit_all_reverse
(v
: Visitor)
785 if _n_doc
!= null then
786 v
.enter_visit
(_n_doc
.as(not null))
788 if _n_kwredef
!= null then
789 v
.enter_visit
(_n_kwredef
.as(not null))
791 v
.enter_visit
(_n_visibility
)
792 v
.enter_visit
(_n_classkind
)
793 if _n_id
!= null then
794 v
.enter_visit
(_n_id
.as(not null))
797 var i
= _n_formaldefs
.length
799 v
.enter_visit
(_n_formaldefs
[i
])
804 var i
= _n_superclasses
.length
806 v
.enter_visit
(_n_superclasses
[i
])
811 var i
= _n_propdefs
.length
813 v
.enter_visit
(_n_propdefs
[i
])
819 redef class ATopClassdef
821 private init empty_init
do end
823 init init_atopclassdef
(
824 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
828 for n
in n_propdefs
do
829 assert n
isa APropdef
835 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
837 for i
in [0.._n_propdefs
.length
[ do
838 if _n_propdefs
[i
] == old_child
then
839 if new_child
!= null then
840 assert new_child
isa APropdef
841 _n_propdefs
[i
] = new_child
842 new_child
.parent
= self
844 _n_propdefs
.remove_at
(i
)
851 redef fun visit_all
(v
: Visitor)
853 for n
in _n_propdefs
do
858 redef fun visit_all_reverse
(v
: Visitor)
861 var i
= _n_propdefs
.length
863 v
.enter_visit
(_n_propdefs
[i
])
869 redef class AMainClassdef
871 private init empty_init
do end
873 init init_amainclassdef
(
874 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
878 for n
in n_propdefs
do
879 assert n
isa APropdef
885 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
887 for i
in [0.._n_propdefs
.length
[ do
888 if _n_propdefs
[i
] == old_child
then
889 if new_child
!= null then
890 assert new_child
isa APropdef
891 _n_propdefs
[i
] = new_child
892 new_child
.parent
= self
894 _n_propdefs
.remove_at
(i
)
901 redef fun visit_all
(v
: Visitor)
903 for n
in _n_propdefs
do
908 redef fun visit_all_reverse
(v
: Visitor)
911 var i
= _n_propdefs
.length
913 v
.enter_visit
(_n_propdefs
[i
])
919 redef class AConcreteClasskind
920 redef fun n_kwclass
=(n
)
926 private init empty_init
do end
928 init init_aconcreteclasskind
(
929 n_kwclass
: nullable TKwclass
933 _n_kwclass
= n_kwclass
.as(not null)
934 n_kwclass
.parent
= self
937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
939 if _n_kwclass
== old_child
then
940 if new_child
!= null then
941 new_child
.parent
= self
942 assert new_child
isa TKwclass
943 _n_kwclass
= new_child
951 redef fun visit_all
(v
: Visitor)
953 v
.enter_visit
(_n_kwclass
)
956 redef fun visit_all_reverse
(v
: Visitor)
958 v
.enter_visit
(_n_kwclass
)
961 redef class AAbstractClasskind
962 redef fun n_kwabstract
=(n
)
967 redef fun n_kwclass
=(n
)
973 private init empty_init
do end
975 init init_aabstractclasskind
(
976 n_kwabstract
: nullable TKwabstract,
977 n_kwclass
: nullable TKwclass
981 _n_kwabstract
= n_kwabstract
.as(not null)
982 n_kwabstract
.parent
= self
983 _n_kwclass
= n_kwclass
.as(not null)
984 n_kwclass
.parent
= self
987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
989 if _n_kwabstract
== old_child
then
990 if new_child
!= null then
991 new_child
.parent
= self
992 assert new_child
isa TKwabstract
993 _n_kwabstract
= new_child
999 if _n_kwclass
== old_child
then
1000 if new_child
!= null then
1001 new_child
.parent
= self
1002 assert new_child
isa TKwclass
1003 _n_kwclass
= new_child
1011 redef fun visit_all
(v
: Visitor)
1013 v
.enter_visit
(_n_kwabstract
)
1014 v
.enter_visit
(_n_kwclass
)
1017 redef fun visit_all_reverse
(v
: Visitor)
1019 v
.enter_visit
(_n_kwabstract
)
1020 v
.enter_visit
(_n_kwclass
)
1023 redef class AInterfaceClasskind
1024 redef fun n_kwinterface
=(n
)
1030 private init empty_init
do end
1032 init init_ainterfaceclasskind
(
1033 n_kwinterface
: nullable TKwinterface
1037 _n_kwinterface
= n_kwinterface
.as(not null)
1038 n_kwinterface
.parent
= self
1041 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1043 if _n_kwinterface
== old_child
then
1044 if new_child
!= null then
1045 new_child
.parent
= self
1046 assert new_child
isa TKwinterface
1047 _n_kwinterface
= new_child
1055 redef fun visit_all
(v
: Visitor)
1057 v
.enter_visit
(_n_kwinterface
)
1060 redef fun visit_all_reverse
(v
: Visitor)
1062 v
.enter_visit
(_n_kwinterface
)
1065 redef class AUniversalClasskind
1066 redef fun n_kwuniversal
=(n
)
1072 private init empty_init
do end
1074 init init_auniversalclasskind
(
1075 n_kwuniversal
: nullable TKwuniversal
1079 _n_kwuniversal
= n_kwuniversal
.as(not null)
1080 n_kwuniversal
.parent
= self
1083 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1085 if _n_kwuniversal
== old_child
then
1086 if new_child
!= null then
1087 new_child
.parent
= self
1088 assert new_child
isa TKwuniversal
1089 _n_kwuniversal
= new_child
1097 redef fun visit_all
(v
: Visitor)
1099 v
.enter_visit
(_n_kwuniversal
)
1102 redef fun visit_all_reverse
(v
: Visitor)
1104 v
.enter_visit
(_n_kwuniversal
)
1107 redef class AFormaldef
1113 redef fun n_type
=(n
)
1121 private init empty_init
do end
1123 init init_aformaldef
(
1124 n_id
: nullable TClassid,
1125 n_type
: nullable AType
1129 _n_id
= n_id
.as(not null)
1132 if n_type
!= null then
1133 n_type
.parent
= self
1137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1139 if _n_id
== old_child
then
1140 if new_child
!= null then
1141 new_child
.parent
= self
1142 assert new_child
isa TClassid
1149 if _n_type
== old_child
then
1150 if new_child
!= null then
1151 new_child
.parent
= self
1152 assert new_child
isa AType
1161 redef fun visit_all
(v
: Visitor)
1163 v
.enter_visit
(_n_id
)
1164 if _n_type
!= null then
1165 v
.enter_visit
(_n_type
.as(not null))
1169 redef fun visit_all_reverse
(v
: Visitor)
1171 v
.enter_visit
(_n_id
)
1172 if _n_type
!= null then
1173 v
.enter_visit
(_n_type
.as(not null))
1177 redef class ASuperclass
1178 redef fun n_kwspecial
=(n
)
1183 redef fun n_type
=(n
)
1189 private init empty_init
do end
1191 init init_asuperclass
(
1192 n_kwspecial
: nullable TKwspecial,
1193 n_type
: nullable AType
1197 _n_kwspecial
= n_kwspecial
.as(not null)
1198 n_kwspecial
.parent
= self
1199 _n_type
= n_type
.as(not null)
1200 n_type
.parent
= self
1203 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1205 if _n_kwspecial
== old_child
then
1206 if new_child
!= null then
1207 new_child
.parent
= self
1208 assert new_child
isa TKwspecial
1209 _n_kwspecial
= new_child
1215 if _n_type
== old_child
then
1216 if new_child
!= null then
1217 new_child
.parent
= self
1218 assert new_child
isa AType
1227 redef fun visit_all
(v
: Visitor)
1229 v
.enter_visit
(_n_kwspecial
)
1230 v
.enter_visit
(_n_type
)
1233 redef fun visit_all_reverse
(v
: Visitor)
1235 v
.enter_visit
(_n_kwspecial
)
1236 v
.enter_visit
(_n_type
)
1239 redef class AAttrPropdef
1247 redef fun n_readable
=(n
)
1254 redef fun n_writable
=(n
)
1261 redef fun n_kwredef
=(n
)
1268 redef fun n_visibility
=(n
)
1273 redef fun n_kwattr
=(n
)
1280 redef fun n_kwvar
=(n
)
1292 redef fun n_type
=(n
)
1299 redef fun n_expr
=(n
)
1307 private init empty_init
do end
1309 init init_aattrpropdef
(
1310 n_doc
: nullable ADoc,
1311 n_readable
: nullable AAble,
1312 n_writable
: nullable AAble,
1313 n_kwredef
: nullable TKwredef,
1314 n_visibility
: nullable AVisibility,
1315 n_kwattr
: nullable TKwattr,
1316 n_kwvar
: nullable TKwvar,
1317 n_id
: nullable TAttrid,
1318 n_type
: nullable AType,
1319 n_expr
: nullable AExpr
1324 if n_doc
!= null then
1327 _n_readable
= n_readable
1328 if n_readable
!= null then
1329 n_readable
.parent
= self
1331 _n_writable
= n_writable
1332 if n_writable
!= null then
1333 n_writable
.parent
= self
1335 _n_kwredef
= n_kwredef
1336 if n_kwredef
!= null then
1337 n_kwredef
.parent
= self
1339 _n_visibility
= n_visibility
.as(not null)
1340 n_visibility
.parent
= self
1341 _n_kwattr
= n_kwattr
1342 if n_kwattr
!= null then
1343 n_kwattr
.parent
= self
1346 if n_kwvar
!= null then
1347 n_kwvar
.parent
= self
1349 _n_id
= n_id
.as(not null)
1352 if n_type
!= null then
1353 n_type
.parent
= self
1356 if n_expr
!= null then
1357 n_expr
.parent
= self
1361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1363 if _n_doc
== old_child
then
1364 if new_child
!= null then
1365 new_child
.parent
= self
1366 assert new_child
isa ADoc
1373 if _n_readable
== old_child
then
1374 if new_child
!= null then
1375 new_child
.parent
= self
1376 assert new_child
isa AAble
1377 _n_readable
= new_child
1383 if _n_writable
== old_child
then
1384 if new_child
!= null then
1385 new_child
.parent
= self
1386 assert new_child
isa AAble
1387 _n_writable
= new_child
1393 if _n_kwredef
== old_child
then
1394 if new_child
!= null then
1395 new_child
.parent
= self
1396 assert new_child
isa TKwredef
1397 _n_kwredef
= new_child
1403 if _n_visibility
== old_child
then
1404 if new_child
!= null then
1405 new_child
.parent
= self
1406 assert new_child
isa AVisibility
1407 _n_visibility
= new_child
1413 if _n_kwattr
== old_child
then
1414 if new_child
!= null then
1415 new_child
.parent
= self
1416 assert new_child
isa TKwattr
1417 _n_kwattr
= new_child
1423 if _n_kwvar
== old_child
then
1424 if new_child
!= null then
1425 new_child
.parent
= self
1426 assert new_child
isa TKwvar
1427 _n_kwvar
= new_child
1433 if _n_id
== old_child
then
1434 if new_child
!= null then
1435 new_child
.parent
= self
1436 assert new_child
isa TAttrid
1443 if _n_type
== old_child
then
1444 if new_child
!= null then
1445 new_child
.parent
= self
1446 assert new_child
isa AType
1453 if _n_expr
== old_child
then
1454 if new_child
!= null then
1455 new_child
.parent
= self
1456 assert new_child
isa AExpr
1465 redef fun visit_all
(v
: Visitor)
1467 if _n_doc
!= null then
1468 v
.enter_visit
(_n_doc
.as(not null))
1470 if _n_readable
!= null then
1471 v
.enter_visit
(_n_readable
.as(not null))
1473 if _n_writable
!= null then
1474 v
.enter_visit
(_n_writable
.as(not null))
1476 if _n_kwredef
!= null then
1477 v
.enter_visit
(_n_kwredef
.as(not null))
1479 v
.enter_visit
(_n_visibility
)
1480 if _n_kwattr
!= null then
1481 v
.enter_visit
(_n_kwattr
.as(not null))
1483 if _n_kwvar
!= null then
1484 v
.enter_visit
(_n_kwvar
.as(not null))
1486 v
.enter_visit
(_n_id
)
1487 if _n_type
!= null then
1488 v
.enter_visit
(_n_type
.as(not null))
1490 if _n_expr
!= null then
1491 v
.enter_visit
(_n_expr
.as(not null))
1495 redef fun visit_all_reverse
(v
: Visitor)
1497 if _n_doc
!= null then
1498 v
.enter_visit
(_n_doc
.as(not null))
1500 if _n_readable
!= null then
1501 v
.enter_visit
(_n_readable
.as(not null))
1503 if _n_writable
!= null then
1504 v
.enter_visit
(_n_writable
.as(not null))
1506 if _n_kwredef
!= null then
1507 v
.enter_visit
(_n_kwredef
.as(not null))
1509 v
.enter_visit
(_n_visibility
)
1510 if _n_kwattr
!= null then
1511 v
.enter_visit
(_n_kwattr
.as(not null))
1513 if _n_kwvar
!= null then
1514 v
.enter_visit
(_n_kwvar
.as(not null))
1516 v
.enter_visit
(_n_id
)
1517 if _n_type
!= null then
1518 v
.enter_visit
(_n_type
.as(not null))
1520 if _n_expr
!= null then
1521 v
.enter_visit
(_n_expr
.as(not null))
1525 redef class AMethPropdef
1533 redef fun n_kwredef
=(n
)
1540 redef fun n_visibility
=(n
)
1545 redef fun n_methid
=(n
)
1550 redef fun n_signature
=(n
)
1556 private init empty_init
do end
1558 init init_amethpropdef
(
1559 n_doc
: nullable ADoc,
1560 n_kwredef
: nullable TKwredef,
1561 n_visibility
: nullable AVisibility,
1562 n_methid
: nullable AMethid,
1563 n_signature
: nullable ASignature
1568 if n_doc
!= null then
1571 _n_kwredef
= n_kwredef
1572 if n_kwredef
!= null then
1573 n_kwredef
.parent
= self
1575 _n_visibility
= n_visibility
.as(not null)
1576 n_visibility
.parent
= self
1577 _n_methid
= n_methid
.as(not null)
1578 n_methid
.parent
= self
1579 _n_signature
= n_signature
.as(not null)
1580 n_signature
.parent
= self
1583 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1585 if _n_doc
== old_child
then
1586 if new_child
!= null then
1587 new_child
.parent
= self
1588 assert new_child
isa ADoc
1595 if _n_kwredef
== old_child
then
1596 if new_child
!= null then
1597 new_child
.parent
= self
1598 assert new_child
isa TKwredef
1599 _n_kwredef
= new_child
1605 if _n_visibility
== old_child
then
1606 if new_child
!= null then
1607 new_child
.parent
= self
1608 assert new_child
isa AVisibility
1609 _n_visibility
= new_child
1615 if _n_methid
== old_child
then
1616 if new_child
!= null then
1617 new_child
.parent
= self
1618 assert new_child
isa AMethid
1619 _n_methid
= new_child
1625 if _n_signature
== old_child
then
1626 if new_child
!= null then
1627 new_child
.parent
= self
1628 assert new_child
isa ASignature
1629 _n_signature
= new_child
1637 redef fun visit_all
(v
: Visitor)
1639 if _n_doc
!= null then
1640 v
.enter_visit
(_n_doc
.as(not null))
1642 if _n_kwredef
!= null then
1643 v
.enter_visit
(_n_kwredef
.as(not null))
1645 v
.enter_visit
(_n_visibility
)
1646 v
.enter_visit
(_n_methid
)
1647 v
.enter_visit
(_n_signature
)
1650 redef fun visit_all_reverse
(v
: Visitor)
1652 if _n_doc
!= null then
1653 v
.enter_visit
(_n_doc
.as(not null))
1655 if _n_kwredef
!= null then
1656 v
.enter_visit
(_n_kwredef
.as(not null))
1658 v
.enter_visit
(_n_visibility
)
1659 v
.enter_visit
(_n_methid
)
1660 v
.enter_visit
(_n_signature
)
1663 redef class ADeferredMethPropdef
1671 redef fun n_kwredef
=(n
)
1678 redef fun n_visibility
=(n
)
1683 redef fun n_kwmeth
=(n
)
1688 redef fun n_methid
=(n
)
1693 redef fun n_signature
=(n
)
1699 private init empty_init
do end
1701 init init_adeferredmethpropdef
(
1702 n_doc
: nullable ADoc,
1703 n_kwredef
: nullable TKwredef,
1704 n_visibility
: nullable AVisibility,
1705 n_kwmeth
: nullable TKwmeth,
1706 n_methid
: nullable AMethid,
1707 n_signature
: nullable ASignature
1712 if n_doc
!= null then
1715 _n_kwredef
= n_kwredef
1716 if n_kwredef
!= null then
1717 n_kwredef
.parent
= self
1719 _n_visibility
= n_visibility
.as(not null)
1720 n_visibility
.parent
= self
1721 _n_kwmeth
= n_kwmeth
.as(not null)
1722 n_kwmeth
.parent
= self
1723 _n_methid
= n_methid
.as(not null)
1724 n_methid
.parent
= self
1725 _n_signature
= n_signature
.as(not null)
1726 n_signature
.parent
= self
1729 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1731 if _n_doc
== old_child
then
1732 if new_child
!= null then
1733 new_child
.parent
= self
1734 assert new_child
isa ADoc
1741 if _n_kwredef
== old_child
then
1742 if new_child
!= null then
1743 new_child
.parent
= self
1744 assert new_child
isa TKwredef
1745 _n_kwredef
= new_child
1751 if _n_visibility
== old_child
then
1752 if new_child
!= null then
1753 new_child
.parent
= self
1754 assert new_child
isa AVisibility
1755 _n_visibility
= new_child
1761 if _n_kwmeth
== old_child
then
1762 if new_child
!= null then
1763 new_child
.parent
= self
1764 assert new_child
isa TKwmeth
1765 _n_kwmeth
= new_child
1771 if _n_methid
== old_child
then
1772 if new_child
!= null then
1773 new_child
.parent
= self
1774 assert new_child
isa AMethid
1775 _n_methid
= new_child
1781 if _n_signature
== old_child
then
1782 if new_child
!= null then
1783 new_child
.parent
= self
1784 assert new_child
isa ASignature
1785 _n_signature
= new_child
1793 redef fun visit_all
(v
: Visitor)
1795 if _n_doc
!= null then
1796 v
.enter_visit
(_n_doc
.as(not null))
1798 if _n_kwredef
!= null then
1799 v
.enter_visit
(_n_kwredef
.as(not null))
1801 v
.enter_visit
(_n_visibility
)
1802 v
.enter_visit
(_n_kwmeth
)
1803 v
.enter_visit
(_n_methid
)
1804 v
.enter_visit
(_n_signature
)
1807 redef fun visit_all_reverse
(v
: Visitor)
1809 if _n_doc
!= null then
1810 v
.enter_visit
(_n_doc
.as(not null))
1812 if _n_kwredef
!= null then
1813 v
.enter_visit
(_n_kwredef
.as(not null))
1815 v
.enter_visit
(_n_visibility
)
1816 v
.enter_visit
(_n_kwmeth
)
1817 v
.enter_visit
(_n_methid
)
1818 v
.enter_visit
(_n_signature
)
1821 redef class AInternMethPropdef
1829 redef fun n_kwredef
=(n
)
1836 redef fun n_visibility
=(n
)
1841 redef fun n_kwmeth
=(n
)
1846 redef fun n_methid
=(n
)
1851 redef fun n_signature
=(n
)
1857 private init empty_init
do end
1859 init init_ainternmethpropdef
(
1860 n_doc
: nullable ADoc,
1861 n_kwredef
: nullable TKwredef,
1862 n_visibility
: nullable AVisibility,
1863 n_kwmeth
: nullable TKwmeth,
1864 n_methid
: nullable AMethid,
1865 n_signature
: nullable ASignature
1870 if n_doc
!= null then
1873 _n_kwredef
= n_kwredef
1874 if n_kwredef
!= null then
1875 n_kwredef
.parent
= self
1877 _n_visibility
= n_visibility
.as(not null)
1878 n_visibility
.parent
= self
1879 _n_kwmeth
= n_kwmeth
.as(not null)
1880 n_kwmeth
.parent
= self
1881 _n_methid
= n_methid
.as(not null)
1882 n_methid
.parent
= self
1883 _n_signature
= n_signature
.as(not null)
1884 n_signature
.parent
= self
1887 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1889 if _n_doc
== old_child
then
1890 if new_child
!= null then
1891 new_child
.parent
= self
1892 assert new_child
isa ADoc
1899 if _n_kwredef
== old_child
then
1900 if new_child
!= null then
1901 new_child
.parent
= self
1902 assert new_child
isa TKwredef
1903 _n_kwredef
= new_child
1909 if _n_visibility
== old_child
then
1910 if new_child
!= null then
1911 new_child
.parent
= self
1912 assert new_child
isa AVisibility
1913 _n_visibility
= new_child
1919 if _n_kwmeth
== old_child
then
1920 if new_child
!= null then
1921 new_child
.parent
= self
1922 assert new_child
isa TKwmeth
1923 _n_kwmeth
= new_child
1929 if _n_methid
== old_child
then
1930 if new_child
!= null then
1931 new_child
.parent
= self
1932 assert new_child
isa AMethid
1933 _n_methid
= new_child
1939 if _n_signature
== old_child
then
1940 if new_child
!= null then
1941 new_child
.parent
= self
1942 assert new_child
isa ASignature
1943 _n_signature
= new_child
1951 redef fun visit_all
(v
: Visitor)
1953 if _n_doc
!= null then
1954 v
.enter_visit
(_n_doc
.as(not null))
1956 if _n_kwredef
!= null then
1957 v
.enter_visit
(_n_kwredef
.as(not null))
1959 v
.enter_visit
(_n_visibility
)
1960 v
.enter_visit
(_n_kwmeth
)
1961 v
.enter_visit
(_n_methid
)
1962 v
.enter_visit
(_n_signature
)
1965 redef fun visit_all_reverse
(v
: Visitor)
1967 if _n_doc
!= null then
1968 v
.enter_visit
(_n_doc
.as(not null))
1970 if _n_kwredef
!= null then
1971 v
.enter_visit
(_n_kwredef
.as(not null))
1973 v
.enter_visit
(_n_visibility
)
1974 v
.enter_visit
(_n_kwmeth
)
1975 v
.enter_visit
(_n_methid
)
1976 v
.enter_visit
(_n_signature
)
1979 redef class AExternMethPropdef
1987 redef fun n_kwredef
=(n
)
1994 redef fun n_visibility
=(n
)
1999 redef fun n_kwmeth
=(n
)
2004 redef fun n_methid
=(n
)
2009 redef fun n_signature
=(n
)
2014 redef fun n_extern
=(n
)
2022 private init empty_init
do end
2024 init init_aexternmethpropdef
(
2025 n_doc
: nullable ADoc,
2026 n_kwredef
: nullable TKwredef,
2027 n_visibility
: nullable AVisibility,
2028 n_kwmeth
: nullable TKwmeth,
2029 n_methid
: nullable AMethid,
2030 n_signature
: nullable ASignature,
2031 n_extern
: nullable TString
2036 if n_doc
!= null then
2039 _n_kwredef
= n_kwredef
2040 if n_kwredef
!= null then
2041 n_kwredef
.parent
= self
2043 _n_visibility
= n_visibility
.as(not null)
2044 n_visibility
.parent
= self
2045 _n_kwmeth
= n_kwmeth
.as(not null)
2046 n_kwmeth
.parent
= self
2047 _n_methid
= n_methid
.as(not null)
2048 n_methid
.parent
= self
2049 _n_signature
= n_signature
.as(not null)
2050 n_signature
.parent
= self
2051 _n_extern
= n_extern
2052 if n_extern
!= null then
2053 n_extern
.parent
= self
2057 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2059 if _n_doc
== old_child
then
2060 if new_child
!= null then
2061 new_child
.parent
= self
2062 assert new_child
isa ADoc
2069 if _n_kwredef
== old_child
then
2070 if new_child
!= null then
2071 new_child
.parent
= self
2072 assert new_child
isa TKwredef
2073 _n_kwredef
= new_child
2079 if _n_visibility
== old_child
then
2080 if new_child
!= null then
2081 new_child
.parent
= self
2082 assert new_child
isa AVisibility
2083 _n_visibility
= new_child
2089 if _n_kwmeth
== old_child
then
2090 if new_child
!= null then
2091 new_child
.parent
= self
2092 assert new_child
isa TKwmeth
2093 _n_kwmeth
= new_child
2099 if _n_methid
== old_child
then
2100 if new_child
!= null then
2101 new_child
.parent
= self
2102 assert new_child
isa AMethid
2103 _n_methid
= new_child
2109 if _n_signature
== old_child
then
2110 if new_child
!= null then
2111 new_child
.parent
= self
2112 assert new_child
isa ASignature
2113 _n_signature
= new_child
2119 if _n_extern
== old_child
then
2120 if new_child
!= null then
2121 new_child
.parent
= self
2122 assert new_child
isa TString
2123 _n_extern
= new_child
2131 redef fun visit_all
(v
: Visitor)
2133 if _n_doc
!= null then
2134 v
.enter_visit
(_n_doc
.as(not null))
2136 if _n_kwredef
!= null then
2137 v
.enter_visit
(_n_kwredef
.as(not null))
2139 v
.enter_visit
(_n_visibility
)
2140 v
.enter_visit
(_n_kwmeth
)
2141 v
.enter_visit
(_n_methid
)
2142 v
.enter_visit
(_n_signature
)
2143 if _n_extern
!= null then
2144 v
.enter_visit
(_n_extern
.as(not null))
2148 redef fun visit_all_reverse
(v
: Visitor)
2150 if _n_doc
!= null then
2151 v
.enter_visit
(_n_doc
.as(not null))
2153 if _n_kwredef
!= null then
2154 v
.enter_visit
(_n_kwredef
.as(not null))
2156 v
.enter_visit
(_n_visibility
)
2157 v
.enter_visit
(_n_kwmeth
)
2158 v
.enter_visit
(_n_methid
)
2159 v
.enter_visit
(_n_signature
)
2160 if _n_extern
!= null then
2161 v
.enter_visit
(_n_extern
.as(not null))
2165 redef class AConcreteMethPropdef
2173 redef fun n_kwredef
=(n
)
2180 redef fun n_visibility
=(n
)
2185 redef fun n_kwmeth
=(n
)
2190 redef fun n_methid
=(n
)
2195 redef fun n_signature
=(n
)
2200 redef fun n_block
=(n
)
2208 private init empty_init
do end
2210 init init_aconcretemethpropdef
(
2211 n_doc
: nullable ADoc,
2212 n_kwredef
: nullable TKwredef,
2213 n_visibility
: nullable AVisibility,
2214 n_kwmeth
: nullable TKwmeth,
2215 n_methid
: nullable AMethid,
2216 n_signature
: nullable ASignature,
2217 n_block
: nullable AExpr
2222 if n_doc
!= null then
2225 _n_kwredef
= n_kwredef
2226 if n_kwredef
!= null then
2227 n_kwredef
.parent
= self
2229 _n_visibility
= n_visibility
.as(not null)
2230 n_visibility
.parent
= self
2231 _n_kwmeth
= n_kwmeth
.as(not null)
2232 n_kwmeth
.parent
= self
2233 _n_methid
= n_methid
.as(not null)
2234 n_methid
.parent
= self
2235 _n_signature
= n_signature
.as(not null)
2236 n_signature
.parent
= self
2238 if n_block
!= null then
2239 n_block
.parent
= self
2243 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2245 if _n_doc
== old_child
then
2246 if new_child
!= null then
2247 new_child
.parent
= self
2248 assert new_child
isa ADoc
2255 if _n_kwredef
== old_child
then
2256 if new_child
!= null then
2257 new_child
.parent
= self
2258 assert new_child
isa TKwredef
2259 _n_kwredef
= new_child
2265 if _n_visibility
== old_child
then
2266 if new_child
!= null then
2267 new_child
.parent
= self
2268 assert new_child
isa AVisibility
2269 _n_visibility
= new_child
2275 if _n_kwmeth
== old_child
then
2276 if new_child
!= null then
2277 new_child
.parent
= self
2278 assert new_child
isa TKwmeth
2279 _n_kwmeth
= new_child
2285 if _n_methid
== old_child
then
2286 if new_child
!= null then
2287 new_child
.parent
= self
2288 assert new_child
isa AMethid
2289 _n_methid
= new_child
2295 if _n_signature
== old_child
then
2296 if new_child
!= null then
2297 new_child
.parent
= self
2298 assert new_child
isa ASignature
2299 _n_signature
= new_child
2305 if _n_block
== old_child
then
2306 if new_child
!= null then
2307 new_child
.parent
= self
2308 assert new_child
isa AExpr
2309 _n_block
= new_child
2317 redef fun visit_all
(v
: Visitor)
2319 if _n_doc
!= null then
2320 v
.enter_visit
(_n_doc
.as(not null))
2322 if _n_kwredef
!= null then
2323 v
.enter_visit
(_n_kwredef
.as(not null))
2325 v
.enter_visit
(_n_visibility
)
2326 v
.enter_visit
(_n_kwmeth
)
2327 v
.enter_visit
(_n_methid
)
2328 v
.enter_visit
(_n_signature
)
2329 if _n_block
!= null then
2330 v
.enter_visit
(_n_block
.as(not null))
2334 redef fun visit_all_reverse
(v
: Visitor)
2336 if _n_doc
!= null then
2337 v
.enter_visit
(_n_doc
.as(not null))
2339 if _n_kwredef
!= null then
2340 v
.enter_visit
(_n_kwredef
.as(not null))
2342 v
.enter_visit
(_n_visibility
)
2343 v
.enter_visit
(_n_kwmeth
)
2344 v
.enter_visit
(_n_methid
)
2345 v
.enter_visit
(_n_signature
)
2346 if _n_block
!= null then
2347 v
.enter_visit
(_n_block
.as(not null))
2351 redef class AConcreteInitPropdef
2359 redef fun n_kwredef
=(n
)
2366 redef fun n_visibility
=(n
)
2371 redef fun n_kwinit
=(n
)
2376 redef fun n_methid
=(n
)
2383 redef fun n_signature
=(n
)
2388 redef fun n_block
=(n
)
2396 private init empty_init
do end
2398 init init_aconcreteinitpropdef
(
2399 n_doc
: nullable ADoc,
2400 n_kwredef
: nullable TKwredef,
2401 n_visibility
: nullable AVisibility,
2402 n_kwinit
: nullable TKwinit,
2403 n_methid
: nullable AMethid,
2404 n_signature
: nullable ASignature,
2405 n_block
: nullable AExpr
2410 if n_doc
!= null then
2413 _n_kwredef
= n_kwredef
2414 if n_kwredef
!= null then
2415 n_kwredef
.parent
= self
2417 _n_visibility
= n_visibility
.as(not null)
2418 n_visibility
.parent
= self
2419 _n_kwinit
= n_kwinit
.as(not null)
2420 n_kwinit
.parent
= self
2421 _n_methid
= n_methid
2422 if n_methid
!= null then
2423 n_methid
.parent
= self
2425 _n_signature
= n_signature
.as(not null)
2426 n_signature
.parent
= self
2428 if n_block
!= null then
2429 n_block
.parent
= self
2433 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2435 if _n_doc
== old_child
then
2436 if new_child
!= null then
2437 new_child
.parent
= self
2438 assert new_child
isa ADoc
2445 if _n_kwredef
== old_child
then
2446 if new_child
!= null then
2447 new_child
.parent
= self
2448 assert new_child
isa TKwredef
2449 _n_kwredef
= new_child
2455 if _n_visibility
== old_child
then
2456 if new_child
!= null then
2457 new_child
.parent
= self
2458 assert new_child
isa AVisibility
2459 _n_visibility
= new_child
2465 if _n_kwinit
== old_child
then
2466 if new_child
!= null then
2467 new_child
.parent
= self
2468 assert new_child
isa TKwinit
2469 _n_kwinit
= new_child
2475 if _n_methid
== old_child
then
2476 if new_child
!= null then
2477 new_child
.parent
= self
2478 assert new_child
isa AMethid
2479 _n_methid
= new_child
2485 if _n_signature
== old_child
then
2486 if new_child
!= null then
2487 new_child
.parent
= self
2488 assert new_child
isa ASignature
2489 _n_signature
= new_child
2495 if _n_block
== old_child
then
2496 if new_child
!= null then
2497 new_child
.parent
= self
2498 assert new_child
isa AExpr
2499 _n_block
= new_child
2507 redef fun visit_all
(v
: Visitor)
2509 if _n_doc
!= null then
2510 v
.enter_visit
(_n_doc
.as(not null))
2512 if _n_kwredef
!= null then
2513 v
.enter_visit
(_n_kwredef
.as(not null))
2515 v
.enter_visit
(_n_visibility
)
2516 v
.enter_visit
(_n_kwinit
)
2517 if _n_methid
!= null then
2518 v
.enter_visit
(_n_methid
.as(not null))
2520 v
.enter_visit
(_n_signature
)
2521 if _n_block
!= null then
2522 v
.enter_visit
(_n_block
.as(not null))
2526 redef fun visit_all_reverse
(v
: Visitor)
2528 if _n_doc
!= null then
2529 v
.enter_visit
(_n_doc
.as(not null))
2531 if _n_kwredef
!= null then
2532 v
.enter_visit
(_n_kwredef
.as(not null))
2534 v
.enter_visit
(_n_visibility
)
2535 v
.enter_visit
(_n_kwinit
)
2536 if _n_methid
!= null then
2537 v
.enter_visit
(_n_methid
.as(not null))
2539 v
.enter_visit
(_n_signature
)
2540 if _n_block
!= null then
2541 v
.enter_visit
(_n_block
.as(not null))
2545 redef class AMainMethPropdef
2546 redef fun n_kwredef
=(n
)
2553 redef fun n_block
=(n
)
2561 private init empty_init
do end
2563 init init_amainmethpropdef
(
2564 n_kwredef
: nullable TKwredef,
2565 n_block
: nullable AExpr
2569 _n_kwredef
= n_kwredef
2570 if n_kwredef
!= null then
2571 n_kwredef
.parent
= self
2574 if n_block
!= null then
2575 n_block
.parent
= self
2579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2581 if _n_kwredef
== old_child
then
2582 if new_child
!= null then
2583 new_child
.parent
= self
2584 assert new_child
isa TKwredef
2585 _n_kwredef
= new_child
2591 if _n_block
== old_child
then
2592 if new_child
!= null then
2593 new_child
.parent
= self
2594 assert new_child
isa AExpr
2595 _n_block
= new_child
2603 redef fun visit_all
(v
: Visitor)
2605 if _n_kwredef
!= null then
2606 v
.enter_visit
(_n_kwredef
.as(not null))
2608 if _n_block
!= null then
2609 v
.enter_visit
(_n_block
.as(not null))
2613 redef fun visit_all_reverse
(v
: Visitor)
2615 if _n_kwredef
!= null then
2616 v
.enter_visit
(_n_kwredef
.as(not null))
2618 if _n_block
!= null then
2619 v
.enter_visit
(_n_block
.as(not null))
2623 redef class ATypePropdef
2631 redef fun n_kwredef
=(n
)
2638 redef fun n_visibility
=(n
)
2643 redef fun n_kwtype
=(n
)
2653 redef fun n_type
=(n
)
2659 private init empty_init
do end
2661 init init_atypepropdef
(
2662 n_doc
: nullable ADoc,
2663 n_kwredef
: nullable TKwredef,
2664 n_visibility
: nullable AVisibility,
2665 n_kwtype
: nullable TKwtype,
2666 n_id
: nullable TClassid,
2667 n_type
: nullable AType
2672 if n_doc
!= null then
2675 _n_kwredef
= n_kwredef
2676 if n_kwredef
!= null then
2677 n_kwredef
.parent
= self
2679 _n_visibility
= n_visibility
.as(not null)
2680 n_visibility
.parent
= self
2681 _n_kwtype
= n_kwtype
.as(not null)
2682 n_kwtype
.parent
= self
2683 _n_id
= n_id
.as(not null)
2685 _n_type
= n_type
.as(not null)
2686 n_type
.parent
= self
2689 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2691 if _n_doc
== old_child
then
2692 if new_child
!= null then
2693 new_child
.parent
= self
2694 assert new_child
isa ADoc
2701 if _n_kwredef
== old_child
then
2702 if new_child
!= null then
2703 new_child
.parent
= self
2704 assert new_child
isa TKwredef
2705 _n_kwredef
= new_child
2711 if _n_visibility
== old_child
then
2712 if new_child
!= null then
2713 new_child
.parent
= self
2714 assert new_child
isa AVisibility
2715 _n_visibility
= new_child
2721 if _n_kwtype
== old_child
then
2722 if new_child
!= null then
2723 new_child
.parent
= self
2724 assert new_child
isa TKwtype
2725 _n_kwtype
= new_child
2731 if _n_id
== old_child
then
2732 if new_child
!= null then
2733 new_child
.parent
= self
2734 assert new_child
isa TClassid
2741 if _n_type
== old_child
then
2742 if new_child
!= null then
2743 new_child
.parent
= self
2744 assert new_child
isa AType
2753 redef fun visit_all
(v
: Visitor)
2755 if _n_doc
!= null then
2756 v
.enter_visit
(_n_doc
.as(not null))
2758 if _n_kwredef
!= null then
2759 v
.enter_visit
(_n_kwredef
.as(not null))
2761 v
.enter_visit
(_n_visibility
)
2762 v
.enter_visit
(_n_kwtype
)
2763 v
.enter_visit
(_n_id
)
2764 v
.enter_visit
(_n_type
)
2767 redef fun visit_all_reverse
(v
: Visitor)
2769 if _n_doc
!= null then
2770 v
.enter_visit
(_n_doc
.as(not null))
2772 if _n_kwredef
!= null then
2773 v
.enter_visit
(_n_kwredef
.as(not null))
2775 v
.enter_visit
(_n_visibility
)
2776 v
.enter_visit
(_n_kwtype
)
2777 v
.enter_visit
(_n_id
)
2778 v
.enter_visit
(_n_type
)
2781 redef class AReadAble
2782 redef fun n_kwredef
=(n
)
2789 redef fun n_kwreadable
=(n
)
2795 private init empty_init
do end
2797 init init_areadable
(
2798 n_kwredef
: nullable TKwredef,
2799 n_kwreadable
: nullable TKwreadable
2803 _n_kwredef
= n_kwredef
2804 if n_kwredef
!= null then
2805 n_kwredef
.parent
= self
2807 _n_kwreadable
= n_kwreadable
.as(not null)
2808 n_kwreadable
.parent
= self
2811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2813 if _n_kwredef
== old_child
then
2814 if new_child
!= null then
2815 new_child
.parent
= self
2816 assert new_child
isa TKwredef
2817 _n_kwredef
= new_child
2823 if _n_kwreadable
== old_child
then
2824 if new_child
!= null then
2825 new_child
.parent
= self
2826 assert new_child
isa TKwreadable
2827 _n_kwreadable
= new_child
2835 redef fun visit_all
(v
: Visitor)
2837 if _n_kwredef
!= null then
2838 v
.enter_visit
(_n_kwredef
.as(not null))
2840 v
.enter_visit
(_n_kwreadable
)
2843 redef fun visit_all_reverse
(v
: Visitor)
2845 if _n_kwredef
!= null then
2846 v
.enter_visit
(_n_kwredef
.as(not null))
2848 v
.enter_visit
(_n_kwreadable
)
2851 redef class AWriteAble
2852 redef fun n_kwredef
=(n
)
2859 redef fun n_kwwritable
=(n
)
2865 private init empty_init
do end
2867 init init_awriteable
(
2868 n_kwredef
: nullable TKwredef,
2869 n_kwwritable
: nullable TKwwritable
2873 _n_kwredef
= n_kwredef
2874 if n_kwredef
!= null then
2875 n_kwredef
.parent
= self
2877 _n_kwwritable
= n_kwwritable
.as(not null)
2878 n_kwwritable
.parent
= self
2881 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2883 if _n_kwredef
== old_child
then
2884 if new_child
!= null then
2885 new_child
.parent
= self
2886 assert new_child
isa TKwredef
2887 _n_kwredef
= new_child
2893 if _n_kwwritable
== old_child
then
2894 if new_child
!= null then
2895 new_child
.parent
= self
2896 assert new_child
isa TKwwritable
2897 _n_kwwritable
= new_child
2905 redef fun visit_all
(v
: Visitor)
2907 if _n_kwredef
!= null then
2908 v
.enter_visit
(_n_kwredef
.as(not null))
2910 v
.enter_visit
(_n_kwwritable
)
2913 redef fun visit_all_reverse
(v
: Visitor)
2915 if _n_kwredef
!= null then
2916 v
.enter_visit
(_n_kwredef
.as(not null))
2918 v
.enter_visit
(_n_kwwritable
)
2921 redef class AIdMethid
2928 private init empty_init
do end
2930 init init_aidmethid
(
2935 _n_id
= n_id
.as(not null)
2939 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2941 if _n_id
== old_child
then
2942 if new_child
!= null then
2943 new_child
.parent
= self
2944 assert new_child
isa TId
2953 redef fun visit_all
(v
: Visitor)
2955 v
.enter_visit
(_n_id
)
2958 redef fun visit_all_reverse
(v
: Visitor)
2960 v
.enter_visit
(_n_id
)
2963 redef class APlusMethid
2964 redef fun n_plus
=(n
)
2970 private init empty_init
do end
2972 init init_aplusmethid
(
2973 n_plus
: nullable TPlus
2977 _n_plus
= n_plus
.as(not null)
2978 n_plus
.parent
= self
2981 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2983 if _n_plus
== old_child
then
2984 if new_child
!= null then
2985 new_child
.parent
= self
2986 assert new_child
isa TPlus
2995 redef fun visit_all
(v
: Visitor)
2997 v
.enter_visit
(_n_plus
)
3000 redef fun visit_all_reverse
(v
: Visitor)
3002 v
.enter_visit
(_n_plus
)
3005 redef class AMinusMethid
3006 redef fun n_minus
=(n
)
3012 private init empty_init
do end
3014 init init_aminusmethid
(
3015 n_minus
: nullable TMinus
3019 _n_minus
= n_minus
.as(not null)
3020 n_minus
.parent
= self
3023 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3025 if _n_minus
== old_child
then
3026 if new_child
!= null then
3027 new_child
.parent
= self
3028 assert new_child
isa TMinus
3029 _n_minus
= new_child
3037 redef fun visit_all
(v
: Visitor)
3039 v
.enter_visit
(_n_minus
)
3042 redef fun visit_all_reverse
(v
: Visitor)
3044 v
.enter_visit
(_n_minus
)
3047 redef class AStarMethid
3048 redef fun n_star
=(n
)
3054 private init empty_init
do end
3056 init init_astarmethid
(
3057 n_star
: nullable TStar
3061 _n_star
= n_star
.as(not null)
3062 n_star
.parent
= self
3065 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3067 if _n_star
== old_child
then
3068 if new_child
!= null then
3069 new_child
.parent
= self
3070 assert new_child
isa TStar
3079 redef fun visit_all
(v
: Visitor)
3081 v
.enter_visit
(_n_star
)
3084 redef fun visit_all_reverse
(v
: Visitor)
3086 v
.enter_visit
(_n_star
)
3089 redef class ASlashMethid
3090 redef fun n_slash
=(n
)
3096 private init empty_init
do end
3098 init init_aslashmethid
(
3099 n_slash
: nullable TSlash
3103 _n_slash
= n_slash
.as(not null)
3104 n_slash
.parent
= self
3107 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3109 if _n_slash
== old_child
then
3110 if new_child
!= null then
3111 new_child
.parent
= self
3112 assert new_child
isa TSlash
3113 _n_slash
= new_child
3121 redef fun visit_all
(v
: Visitor)
3123 v
.enter_visit
(_n_slash
)
3126 redef fun visit_all_reverse
(v
: Visitor)
3128 v
.enter_visit
(_n_slash
)
3131 redef class APercentMethid
3132 redef fun n_percent
=(n
)
3138 private init empty_init
do end
3140 init init_apercentmethid
(
3141 n_percent
: nullable TPercent
3145 _n_percent
= n_percent
.as(not null)
3146 n_percent
.parent
= self
3149 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3151 if _n_percent
== old_child
then
3152 if new_child
!= null then
3153 new_child
.parent
= self
3154 assert new_child
isa TPercent
3155 _n_percent
= new_child
3163 redef fun visit_all
(v
: Visitor)
3165 v
.enter_visit
(_n_percent
)
3168 redef fun visit_all_reverse
(v
: Visitor)
3170 v
.enter_visit
(_n_percent
)
3173 redef class AEqMethid
3180 private init empty_init
do end
3182 init init_aeqmethid
(
3187 _n_eq
= n_eq
.as(not null)
3191 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3193 if _n_eq
== old_child
then
3194 if new_child
!= null then
3195 new_child
.parent
= self
3196 assert new_child
isa TEq
3205 redef fun visit_all
(v
: Visitor)
3207 v
.enter_visit
(_n_eq
)
3210 redef fun visit_all_reverse
(v
: Visitor)
3212 v
.enter_visit
(_n_eq
)
3215 redef class ANeMethid
3222 private init empty_init
do end
3224 init init_anemethid
(
3229 _n_ne
= n_ne
.as(not null)
3233 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3235 if _n_ne
== old_child
then
3236 if new_child
!= null then
3237 new_child
.parent
= self
3238 assert new_child
isa TNe
3247 redef fun visit_all
(v
: Visitor)
3249 v
.enter_visit
(_n_ne
)
3252 redef fun visit_all_reverse
(v
: Visitor)
3254 v
.enter_visit
(_n_ne
)
3257 redef class ALeMethid
3264 private init empty_init
do end
3266 init init_alemethid
(
3271 _n_le
= n_le
.as(not null)
3275 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3277 if _n_le
== old_child
then
3278 if new_child
!= null then
3279 new_child
.parent
= self
3280 assert new_child
isa TLe
3289 redef fun visit_all
(v
: Visitor)
3291 v
.enter_visit
(_n_le
)
3294 redef fun visit_all_reverse
(v
: Visitor)
3296 v
.enter_visit
(_n_le
)
3299 redef class AGeMethid
3306 private init empty_init
do end
3308 init init_agemethid
(
3313 _n_ge
= n_ge
.as(not null)
3317 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3319 if _n_ge
== old_child
then
3320 if new_child
!= null then
3321 new_child
.parent
= self
3322 assert new_child
isa TGe
3331 redef fun visit_all
(v
: Visitor)
3333 v
.enter_visit
(_n_ge
)
3336 redef fun visit_all_reverse
(v
: Visitor)
3338 v
.enter_visit
(_n_ge
)
3341 redef class ALtMethid
3348 private init empty_init
do end
3350 init init_altmethid
(
3355 _n_lt
= n_lt
.as(not null)
3359 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3361 if _n_lt
== old_child
then
3362 if new_child
!= null then
3363 new_child
.parent
= self
3364 assert new_child
isa TLt
3373 redef fun visit_all
(v
: Visitor)
3375 v
.enter_visit
(_n_lt
)
3378 redef fun visit_all_reverse
(v
: Visitor)
3380 v
.enter_visit
(_n_lt
)
3383 redef class AGtMethid
3390 private init empty_init
do end
3392 init init_agtmethid
(
3397 _n_gt
= n_gt
.as(not null)
3401 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3403 if _n_gt
== old_child
then
3404 if new_child
!= null then
3405 new_child
.parent
= self
3406 assert new_child
isa TGt
3415 redef fun visit_all
(v
: Visitor)
3417 v
.enter_visit
(_n_gt
)
3420 redef fun visit_all_reverse
(v
: Visitor)
3422 v
.enter_visit
(_n_gt
)
3425 redef class ABraMethid
3426 redef fun n_obra
=(n
)
3431 redef fun n_cbra
=(n
)
3437 private init empty_init
do end
3439 init init_abramethid
(
3440 n_obra
: nullable TObra,
3441 n_cbra
: nullable TCbra
3445 _n_obra
= n_obra
.as(not null)
3446 n_obra
.parent
= self
3447 _n_cbra
= n_cbra
.as(not null)
3448 n_cbra
.parent
= self
3451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3453 if _n_obra
== old_child
then
3454 if new_child
!= null then
3455 new_child
.parent
= self
3456 assert new_child
isa TObra
3463 if _n_cbra
== old_child
then
3464 if new_child
!= null then
3465 new_child
.parent
= self
3466 assert new_child
isa TCbra
3475 redef fun visit_all
(v
: Visitor)
3477 v
.enter_visit
(_n_obra
)
3478 v
.enter_visit
(_n_cbra
)
3481 redef fun visit_all_reverse
(v
: Visitor)
3483 v
.enter_visit
(_n_obra
)
3484 v
.enter_visit
(_n_cbra
)
3487 redef class AStarshipMethid
3488 redef fun n_starship
=(n
)
3494 private init empty_init
do end
3496 init init_astarshipmethid
(
3497 n_starship
: nullable TStarship
3501 _n_starship
= n_starship
.as(not null)
3502 n_starship
.parent
= self
3505 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3507 if _n_starship
== old_child
then
3508 if new_child
!= null then
3509 new_child
.parent
= self
3510 assert new_child
isa TStarship
3511 _n_starship
= new_child
3519 redef fun visit_all
(v
: Visitor)
3521 v
.enter_visit
(_n_starship
)
3524 redef fun visit_all_reverse
(v
: Visitor)
3526 v
.enter_visit
(_n_starship
)
3529 redef class AAssignMethid
3535 redef fun n_assign
=(n
)
3541 private init empty_init
do end
3543 init init_aassignmethid
(
3545 n_assign
: nullable TAssign
3549 _n_id
= n_id
.as(not null)
3551 _n_assign
= n_assign
.as(not null)
3552 n_assign
.parent
= self
3555 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3557 if _n_id
== old_child
then
3558 if new_child
!= null then
3559 new_child
.parent
= self
3560 assert new_child
isa TId
3567 if _n_assign
== old_child
then
3568 if new_child
!= null then
3569 new_child
.parent
= self
3570 assert new_child
isa TAssign
3571 _n_assign
= new_child
3579 redef fun visit_all
(v
: Visitor)
3581 v
.enter_visit
(_n_id
)
3582 v
.enter_visit
(_n_assign
)
3585 redef fun visit_all_reverse
(v
: Visitor)
3587 v
.enter_visit
(_n_id
)
3588 v
.enter_visit
(_n_assign
)
3591 redef class ABraassignMethid
3592 redef fun n_obra
=(n
)
3597 redef fun n_cbra
=(n
)
3602 redef fun n_assign
=(n
)
3608 private init empty_init
do end
3610 init init_abraassignmethid
(
3611 n_obra
: nullable TObra,
3612 n_cbra
: nullable TCbra,
3613 n_assign
: nullable TAssign
3617 _n_obra
= n_obra
.as(not null)
3618 n_obra
.parent
= self
3619 _n_cbra
= n_cbra
.as(not null)
3620 n_cbra
.parent
= self
3621 _n_assign
= n_assign
.as(not null)
3622 n_assign
.parent
= self
3625 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3627 if _n_obra
== old_child
then
3628 if new_child
!= null then
3629 new_child
.parent
= self
3630 assert new_child
isa TObra
3637 if _n_cbra
== old_child
then
3638 if new_child
!= null then
3639 new_child
.parent
= self
3640 assert new_child
isa TCbra
3647 if _n_assign
== old_child
then
3648 if new_child
!= null then
3649 new_child
.parent
= self
3650 assert new_child
isa TAssign
3651 _n_assign
= new_child
3659 redef fun visit_all
(v
: Visitor)
3661 v
.enter_visit
(_n_obra
)
3662 v
.enter_visit
(_n_cbra
)
3663 v
.enter_visit
(_n_assign
)
3666 redef fun visit_all_reverse
(v
: Visitor)
3668 v
.enter_visit
(_n_obra
)
3669 v
.enter_visit
(_n_cbra
)
3670 v
.enter_visit
(_n_assign
)
3673 redef class ASignature
3674 redef fun n_type
=(n
)
3682 private init empty_init
do end
3684 init init_asignature
(
3685 n_params
: Collection[Object], # Should be Collection[AParam]
3686 n_type
: nullable AType,
3687 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3691 for n
in n_params
do
3697 if n_type
!= null then
3698 n_type
.parent
= self
3700 for n
in n_closure_decls
do
3701 assert n
isa AClosureDecl
3702 _n_closure_decls
.add
(n
)
3707 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3709 for i
in [0.._n_params
.length
[ do
3710 if _n_params
[i
] == old_child
then
3711 if new_child
!= null then
3712 assert new_child
isa AParam
3713 _n_params
[i
] = new_child
3714 new_child
.parent
= self
3716 _n_params
.remove_at
(i
)
3721 if _n_type
== old_child
then
3722 if new_child
!= null then
3723 new_child
.parent
= self
3724 assert new_child
isa AType
3731 for i
in [0.._n_closure_decls
.length
[ do
3732 if _n_closure_decls
[i
] == old_child
then
3733 if new_child
!= null then
3734 assert new_child
isa AClosureDecl
3735 _n_closure_decls
[i
] = new_child
3736 new_child
.parent
= self
3738 _n_closure_decls
.remove_at
(i
)
3745 redef fun visit_all
(v
: Visitor)
3747 for n
in _n_params
do
3750 if _n_type
!= null then
3751 v
.enter_visit
(_n_type
.as(not null))
3753 for n
in _n_closure_decls
do
3758 redef fun visit_all_reverse
(v
: Visitor)
3761 var i
= _n_params
.length
3763 v
.enter_visit
(_n_params
[i
])
3767 if _n_type
!= null then
3768 v
.enter_visit
(_n_type
.as(not null))
3771 var i
= _n_closure_decls
.length
3773 v
.enter_visit
(_n_closure_decls
[i
])
3785 redef fun n_type
=(n
)
3792 redef fun n_dotdotdot
=(n
)
3800 private init empty_init
do end
3804 n_type
: nullable AType,
3805 n_dotdotdot
: nullable TDotdotdot
3809 _n_id
= n_id
.as(not null)
3812 if n_type
!= null then
3813 n_type
.parent
= self
3815 _n_dotdotdot
= n_dotdotdot
3816 if n_dotdotdot
!= null then
3817 n_dotdotdot
.parent
= self
3821 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3823 if _n_id
== old_child
then
3824 if new_child
!= null then
3825 new_child
.parent
= self
3826 assert new_child
isa TId
3833 if _n_type
== old_child
then
3834 if new_child
!= null then
3835 new_child
.parent
= self
3836 assert new_child
isa AType
3843 if _n_dotdotdot
== old_child
then
3844 if new_child
!= null then
3845 new_child
.parent
= self
3846 assert new_child
isa TDotdotdot
3847 _n_dotdotdot
= new_child
3855 redef fun visit_all
(v
: Visitor)
3857 v
.enter_visit
(_n_id
)
3858 if _n_type
!= null then
3859 v
.enter_visit
(_n_type
.as(not null))
3861 if _n_dotdotdot
!= null then
3862 v
.enter_visit
(_n_dotdotdot
.as(not null))
3866 redef fun visit_all_reverse
(v
: Visitor)
3868 v
.enter_visit
(_n_id
)
3869 if _n_type
!= null then
3870 v
.enter_visit
(_n_type
.as(not null))
3872 if _n_dotdotdot
!= null then
3873 v
.enter_visit
(_n_dotdotdot
.as(not null))
3877 redef class AClosureDecl
3878 redef fun n_kwwith
=(n
)
3883 redef fun n_kwbreak
=(n
)
3895 redef fun n_signature
=(n
)
3900 redef fun n_expr
=(n
)
3908 private init empty_init
do end
3910 init init_aclosuredecl
(
3911 n_kwwith
: nullable TKwwith,
3912 n_kwbreak
: nullable TKwbreak,
3914 n_signature
: nullable ASignature,
3915 n_expr
: nullable AExpr
3919 _n_kwwith
= n_kwwith
.as(not null)
3920 n_kwwith
.parent
= self
3921 _n_kwbreak
= n_kwbreak
3922 if n_kwbreak
!= null then
3923 n_kwbreak
.parent
= self
3925 _n_id
= n_id
.as(not null)
3927 _n_signature
= n_signature
.as(not null)
3928 n_signature
.parent
= self
3930 if n_expr
!= null then
3931 n_expr
.parent
= self
3935 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3937 if _n_kwwith
== old_child
then
3938 if new_child
!= null then
3939 new_child
.parent
= self
3940 assert new_child
isa TKwwith
3941 _n_kwwith
= new_child
3947 if _n_kwbreak
== old_child
then
3948 if new_child
!= null then
3949 new_child
.parent
= self
3950 assert new_child
isa TKwbreak
3951 _n_kwbreak
= new_child
3957 if _n_id
== old_child
then
3958 if new_child
!= null then
3959 new_child
.parent
= self
3960 assert new_child
isa TId
3967 if _n_signature
== old_child
then
3968 if new_child
!= null then
3969 new_child
.parent
= self
3970 assert new_child
isa ASignature
3971 _n_signature
= new_child
3977 if _n_expr
== old_child
then
3978 if new_child
!= null then
3979 new_child
.parent
= self
3980 assert new_child
isa AExpr
3989 redef fun visit_all
(v
: Visitor)
3991 v
.enter_visit
(_n_kwwith
)
3992 if _n_kwbreak
!= null then
3993 v
.enter_visit
(_n_kwbreak
.as(not null))
3995 v
.enter_visit
(_n_id
)
3996 v
.enter_visit
(_n_signature
)
3997 if _n_expr
!= null then
3998 v
.enter_visit
(_n_expr
.as(not null))
4002 redef fun visit_all_reverse
(v
: Visitor)
4004 v
.enter_visit
(_n_kwwith
)
4005 if _n_kwbreak
!= null then
4006 v
.enter_visit
(_n_kwbreak
.as(not null))
4008 v
.enter_visit
(_n_id
)
4009 v
.enter_visit
(_n_signature
)
4010 if _n_expr
!= null then
4011 v
.enter_visit
(_n_expr
.as(not null))
4016 redef fun n_kwnullable
=(n
)
4029 private init empty_init
do end
4032 n_kwnullable
: nullable TKwnullable,
4033 n_id
: nullable TClassid,
4034 n_types
: Collection[Object] # Should be Collection[AType]
4038 _n_kwnullable
= n_kwnullable
4039 if n_kwnullable
!= null then
4040 n_kwnullable
.parent
= self
4042 _n_id
= n_id
.as(not null)
4051 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4053 if _n_kwnullable
== old_child
then
4054 if new_child
!= null then
4055 new_child
.parent
= self
4056 assert new_child
isa TKwnullable
4057 _n_kwnullable
= new_child
4059 _n_kwnullable
= null
4063 if _n_id
== old_child
then
4064 if new_child
!= null then
4065 new_child
.parent
= self
4066 assert new_child
isa TClassid
4073 for i
in [0.._n_types
.length
[ do
4074 if _n_types
[i
] == old_child
then
4075 if new_child
!= null then
4076 assert new_child
isa AType
4077 _n_types
[i
] = new_child
4078 new_child
.parent
= self
4080 _n_types
.remove_at
(i
)
4087 redef fun visit_all
(v
: Visitor)
4089 if _n_kwnullable
!= null then
4090 v
.enter_visit
(_n_kwnullable
.as(not null))
4092 v
.enter_visit
(_n_id
)
4093 for n
in _n_types
do
4098 redef fun visit_all_reverse
(v
: Visitor)
4100 if _n_kwnullable
!= null then
4101 v
.enter_visit
(_n_kwnullable
.as(not null))
4103 v
.enter_visit
(_n_id
)
4105 var i
= _n_types
.length
4107 v
.enter_visit
(_n_types
[i
])
4114 redef fun n_kwlabel
=(n
)
4125 private init empty_init
do end
4128 n_kwlabel
: nullable TKwlabel,
4133 _n_kwlabel
= n_kwlabel
.as(not null)
4134 n_kwlabel
.parent
= self
4135 _n_id
= n_id
.as(not null)
4139 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4141 if _n_kwlabel
== old_child
then
4142 if new_child
!= null then
4143 new_child
.parent
= self
4144 assert new_child
isa TKwlabel
4145 _n_kwlabel
= new_child
4151 if _n_id
== old_child
then
4152 if new_child
!= null then
4153 new_child
.parent
= self
4154 assert new_child
isa TId
4163 redef fun visit_all
(v
: Visitor)
4165 v
.enter_visit
(_n_kwlabel
)
4166 v
.enter_visit
(_n_id
)
4169 redef fun visit_all_reverse
(v
: Visitor)
4171 v
.enter_visit
(_n_kwlabel
)
4172 v
.enter_visit
(_n_id
)
4175 redef class ABlockExpr
4177 private init empty_init
do end
4179 init init_ablockexpr
(
4180 n_expr
: Collection[Object] # Should be Collection[AExpr]
4191 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4193 for i
in [0.._n_expr
.length
[ do
4194 if _n_expr
[i
] == old_child
then
4195 if new_child
!= null then
4196 assert new_child
isa AExpr
4197 _n_expr
[i
] = new_child
4198 new_child
.parent
= self
4200 _n_expr
.remove_at
(i
)
4207 redef fun visit_all
(v
: Visitor)
4214 redef fun visit_all_reverse
(v
: Visitor)
4217 var i
= _n_expr
.length
4219 v
.enter_visit
(_n_expr
[i
])
4225 redef class AVardeclExpr
4226 redef fun n_kwvar
=(n
)
4236 redef fun n_type
=(n
)
4243 redef fun n_assign
=(n
)
4250 redef fun n_expr
=(n
)
4258 private init empty_init
do end
4260 init init_avardeclexpr
(
4261 n_kwvar
: nullable TKwvar,
4263 n_type
: nullable AType,
4264 n_assign
: nullable TAssign,
4265 n_expr
: nullable AExpr
4269 _n_kwvar
= n_kwvar
.as(not null)
4270 n_kwvar
.parent
= self
4271 _n_id
= n_id
.as(not null)
4274 if n_type
!= null then
4275 n_type
.parent
= self
4277 _n_assign
= n_assign
4278 if n_assign
!= null then
4279 n_assign
.parent
= self
4282 if n_expr
!= null then
4283 n_expr
.parent
= self
4287 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4289 if _n_kwvar
== old_child
then
4290 if new_child
!= null then
4291 new_child
.parent
= self
4292 assert new_child
isa TKwvar
4293 _n_kwvar
= new_child
4299 if _n_id
== old_child
then
4300 if new_child
!= null then
4301 new_child
.parent
= self
4302 assert new_child
isa TId
4309 if _n_type
== old_child
then
4310 if new_child
!= null then
4311 new_child
.parent
= self
4312 assert new_child
isa AType
4319 if _n_assign
== old_child
then
4320 if new_child
!= null then
4321 new_child
.parent
= self
4322 assert new_child
isa TAssign
4323 _n_assign
= new_child
4329 if _n_expr
== old_child
then
4330 if new_child
!= null then
4331 new_child
.parent
= self
4332 assert new_child
isa AExpr
4341 redef fun visit_all
(v
: Visitor)
4343 v
.enter_visit
(_n_kwvar
)
4344 v
.enter_visit
(_n_id
)
4345 if _n_type
!= null then
4346 v
.enter_visit
(_n_type
.as(not null))
4348 if _n_assign
!= null then
4349 v
.enter_visit
(_n_assign
.as(not null))
4351 if _n_expr
!= null then
4352 v
.enter_visit
(_n_expr
.as(not null))
4356 redef fun visit_all_reverse
(v
: Visitor)
4358 v
.enter_visit
(_n_kwvar
)
4359 v
.enter_visit
(_n_id
)
4360 if _n_type
!= null then
4361 v
.enter_visit
(_n_type
.as(not null))
4363 if _n_assign
!= null then
4364 v
.enter_visit
(_n_assign
.as(not null))
4366 if _n_expr
!= null then
4367 v
.enter_visit
(_n_expr
.as(not null))
4371 redef class AReturnExpr
4372 redef fun n_kwreturn
=(n
)
4377 redef fun n_expr
=(n
)
4385 private init empty_init
do end
4387 init init_areturnexpr
(
4388 n_kwreturn
: nullable TKwreturn,
4389 n_expr
: nullable AExpr
4393 _n_kwreturn
= n_kwreturn
.as(not null)
4394 n_kwreturn
.parent
= self
4396 if n_expr
!= null then
4397 n_expr
.parent
= self
4401 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4403 if _n_kwreturn
== old_child
then
4404 if new_child
!= null then
4405 new_child
.parent
= self
4406 assert new_child
isa TKwreturn
4407 _n_kwreturn
= new_child
4413 if _n_expr
== old_child
then
4414 if new_child
!= null then
4415 new_child
.parent
= self
4416 assert new_child
isa AExpr
4425 redef fun visit_all
(v
: Visitor)
4427 v
.enter_visit
(_n_kwreturn
)
4428 if _n_expr
!= null then
4429 v
.enter_visit
(_n_expr
.as(not null))
4433 redef fun visit_all_reverse
(v
: Visitor)
4435 v
.enter_visit
(_n_kwreturn
)
4436 if _n_expr
!= null then
4437 v
.enter_visit
(_n_expr
.as(not null))
4441 redef class ABreakExpr
4442 redef fun n_kwbreak
=(n
)
4447 redef fun n_label
=(n
)
4454 redef fun n_expr
=(n
)
4462 private init empty_init
do end
4464 init init_abreakexpr
(
4465 n_kwbreak
: nullable TKwbreak,
4466 n_label
: nullable ALabel,
4467 n_expr
: nullable AExpr
4471 _n_kwbreak
= n_kwbreak
.as(not null)
4472 n_kwbreak
.parent
= self
4474 if n_label
!= null then
4475 n_label
.parent
= self
4478 if n_expr
!= null then
4479 n_expr
.parent
= self
4483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4485 if _n_kwbreak
== old_child
then
4486 if new_child
!= null then
4487 new_child
.parent
= self
4488 assert new_child
isa TKwbreak
4489 _n_kwbreak
= new_child
4495 if _n_label
== old_child
then
4496 if new_child
!= null then
4497 new_child
.parent
= self
4498 assert new_child
isa ALabel
4499 _n_label
= new_child
4505 if _n_expr
== old_child
then
4506 if new_child
!= null then
4507 new_child
.parent
= self
4508 assert new_child
isa AExpr
4517 redef fun visit_all
(v
: Visitor)
4519 v
.enter_visit
(_n_kwbreak
)
4520 if _n_label
!= null then
4521 v
.enter_visit
(_n_label
.as(not null))
4523 if _n_expr
!= null then
4524 v
.enter_visit
(_n_expr
.as(not null))
4528 redef fun visit_all_reverse
(v
: Visitor)
4530 v
.enter_visit
(_n_kwbreak
)
4531 if _n_label
!= null then
4532 v
.enter_visit
(_n_label
.as(not null))
4534 if _n_expr
!= null then
4535 v
.enter_visit
(_n_expr
.as(not null))
4539 redef class AAbortExpr
4540 redef fun n_kwabort
=(n
)
4546 private init empty_init
do end
4548 init init_aabortexpr
(
4549 n_kwabort
: nullable TKwabort
4553 _n_kwabort
= n_kwabort
.as(not null)
4554 n_kwabort
.parent
= self
4557 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4559 if _n_kwabort
== old_child
then
4560 if new_child
!= null then
4561 new_child
.parent
= self
4562 assert new_child
isa TKwabort
4563 _n_kwabort
= new_child
4571 redef fun visit_all
(v
: Visitor)
4573 v
.enter_visit
(_n_kwabort
)
4576 redef fun visit_all_reverse
(v
: Visitor)
4578 v
.enter_visit
(_n_kwabort
)
4581 redef class AContinueExpr
4582 redef fun n_kwcontinue
=(n
)
4587 redef fun n_label
=(n
)
4594 redef fun n_expr
=(n
)
4602 private init empty_init
do end
4604 init init_acontinueexpr
(
4605 n_kwcontinue
: nullable TKwcontinue,
4606 n_label
: nullable ALabel,
4607 n_expr
: nullable AExpr
4611 _n_kwcontinue
= n_kwcontinue
.as(not null)
4612 n_kwcontinue
.parent
= self
4614 if n_label
!= null then
4615 n_label
.parent
= self
4618 if n_expr
!= null then
4619 n_expr
.parent
= self
4623 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4625 if _n_kwcontinue
== old_child
then
4626 if new_child
!= null then
4627 new_child
.parent
= self
4628 assert new_child
isa TKwcontinue
4629 _n_kwcontinue
= new_child
4635 if _n_label
== old_child
then
4636 if new_child
!= null then
4637 new_child
.parent
= self
4638 assert new_child
isa ALabel
4639 _n_label
= new_child
4645 if _n_expr
== old_child
then
4646 if new_child
!= null then
4647 new_child
.parent
= self
4648 assert new_child
isa AExpr
4657 redef fun visit_all
(v
: Visitor)
4659 v
.enter_visit
(_n_kwcontinue
)
4660 if _n_label
!= null then
4661 v
.enter_visit
(_n_label
.as(not null))
4663 if _n_expr
!= null then
4664 v
.enter_visit
(_n_expr
.as(not null))
4668 redef fun visit_all_reverse
(v
: Visitor)
4670 v
.enter_visit
(_n_kwcontinue
)
4671 if _n_label
!= null then
4672 v
.enter_visit
(_n_label
.as(not null))
4674 if _n_expr
!= null then
4675 v
.enter_visit
(_n_expr
.as(not null))
4680 redef fun n_kwdo
=(n
)
4685 redef fun n_block
=(n
)
4692 redef fun n_label
=(n
)
4700 private init empty_init
do end
4703 n_kwdo
: nullable TKwdo,
4704 n_block
: nullable AExpr,
4705 n_label
: nullable ALabel
4709 _n_kwdo
= n_kwdo
.as(not null)
4710 n_kwdo
.parent
= self
4712 if n_block
!= null then
4713 n_block
.parent
= self
4716 if n_label
!= null then
4717 n_label
.parent
= self
4721 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4723 if _n_kwdo
== old_child
then
4724 if new_child
!= null then
4725 new_child
.parent
= self
4726 assert new_child
isa TKwdo
4733 if _n_block
== old_child
then
4734 if new_child
!= null then
4735 new_child
.parent
= self
4736 assert new_child
isa AExpr
4737 _n_block
= new_child
4743 if _n_label
== old_child
then
4744 if new_child
!= null then
4745 new_child
.parent
= self
4746 assert new_child
isa ALabel
4747 _n_label
= new_child
4755 redef fun visit_all
(v
: Visitor)
4757 v
.enter_visit
(_n_kwdo
)
4758 if _n_block
!= null then
4759 v
.enter_visit
(_n_block
.as(not null))
4761 if _n_label
!= null then
4762 v
.enter_visit
(_n_label
.as(not null))
4766 redef fun visit_all_reverse
(v
: Visitor)
4768 v
.enter_visit
(_n_kwdo
)
4769 if _n_block
!= null then
4770 v
.enter_visit
(_n_block
.as(not null))
4772 if _n_label
!= null then
4773 v
.enter_visit
(_n_label
.as(not null))
4778 redef fun n_kwif
=(n
)
4783 redef fun n_expr
=(n
)
4788 redef fun n_then
=(n
)
4795 redef fun n_else
=(n
)
4803 private init empty_init
do end
4806 n_kwif
: nullable TKwif,
4807 n_expr
: nullable AExpr,
4808 n_then
: nullable AExpr,
4809 n_else
: nullable AExpr
4813 _n_kwif
= n_kwif
.as(not null)
4814 n_kwif
.parent
= self
4815 _n_expr
= n_expr
.as(not null)
4816 n_expr
.parent
= self
4818 if n_then
!= null then
4819 n_then
.parent
= self
4822 if n_else
!= null then
4823 n_else
.parent
= self
4827 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4829 if _n_kwif
== old_child
then
4830 if new_child
!= null then
4831 new_child
.parent
= self
4832 assert new_child
isa TKwif
4839 if _n_expr
== old_child
then
4840 if new_child
!= null then
4841 new_child
.parent
= self
4842 assert new_child
isa AExpr
4849 if _n_then
== old_child
then
4850 if new_child
!= null then
4851 new_child
.parent
= self
4852 assert new_child
isa AExpr
4859 if _n_else
== old_child
then
4860 if new_child
!= null then
4861 new_child
.parent
= self
4862 assert new_child
isa AExpr
4871 redef fun visit_all
(v
: Visitor)
4873 v
.enter_visit
(_n_kwif
)
4874 v
.enter_visit
(_n_expr
)
4875 if _n_then
!= null then
4876 v
.enter_visit
(_n_then
.as(not null))
4878 if _n_else
!= null then
4879 v
.enter_visit
(_n_else
.as(not null))
4883 redef fun visit_all_reverse
(v
: Visitor)
4885 v
.enter_visit
(_n_kwif
)
4886 v
.enter_visit
(_n_expr
)
4887 if _n_then
!= null then
4888 v
.enter_visit
(_n_then
.as(not null))
4890 if _n_else
!= null then
4891 v
.enter_visit
(_n_else
.as(not null))
4895 redef class AIfexprExpr
4896 redef fun n_kwif
=(n
)
4901 redef fun n_expr
=(n
)
4906 redef fun n_kwthen
=(n
)
4911 redef fun n_then
=(n
)
4916 redef fun n_kwelse
=(n
)
4921 redef fun n_else
=(n
)
4927 private init empty_init
do end
4929 init init_aifexprexpr
(
4930 n_kwif
: nullable TKwif,
4931 n_expr
: nullable AExpr,
4932 n_kwthen
: nullable TKwthen,
4933 n_then
: nullable AExpr,
4934 n_kwelse
: nullable TKwelse,
4935 n_else
: nullable AExpr
4939 _n_kwif
= n_kwif
.as(not null)
4940 n_kwif
.parent
= self
4941 _n_expr
= n_expr
.as(not null)
4942 n_expr
.parent
= self
4943 _n_kwthen
= n_kwthen
.as(not null)
4944 n_kwthen
.parent
= self
4945 _n_then
= n_then
.as(not null)
4946 n_then
.parent
= self
4947 _n_kwelse
= n_kwelse
.as(not null)
4948 n_kwelse
.parent
= self
4949 _n_else
= n_else
.as(not null)
4950 n_else
.parent
= self
4953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4955 if _n_kwif
== old_child
then
4956 if new_child
!= null then
4957 new_child
.parent
= self
4958 assert new_child
isa TKwif
4965 if _n_expr
== old_child
then
4966 if new_child
!= null then
4967 new_child
.parent
= self
4968 assert new_child
isa AExpr
4975 if _n_kwthen
== old_child
then
4976 if new_child
!= null then
4977 new_child
.parent
= self
4978 assert new_child
isa TKwthen
4979 _n_kwthen
= new_child
4985 if _n_then
== old_child
then
4986 if new_child
!= null then
4987 new_child
.parent
= self
4988 assert new_child
isa AExpr
4995 if _n_kwelse
== old_child
then
4996 if new_child
!= null then
4997 new_child
.parent
= self
4998 assert new_child
isa TKwelse
4999 _n_kwelse
= new_child
5005 if _n_else
== old_child
then
5006 if new_child
!= null then
5007 new_child
.parent
= self
5008 assert new_child
isa AExpr
5017 redef fun visit_all
(v
: Visitor)
5019 v
.enter_visit
(_n_kwif
)
5020 v
.enter_visit
(_n_expr
)
5021 v
.enter_visit
(_n_kwthen
)
5022 v
.enter_visit
(_n_then
)
5023 v
.enter_visit
(_n_kwelse
)
5024 v
.enter_visit
(_n_else
)
5027 redef fun visit_all_reverse
(v
: Visitor)
5029 v
.enter_visit
(_n_kwif
)
5030 v
.enter_visit
(_n_expr
)
5031 v
.enter_visit
(_n_kwthen
)
5032 v
.enter_visit
(_n_then
)
5033 v
.enter_visit
(_n_kwelse
)
5034 v
.enter_visit
(_n_else
)
5037 redef class AWhileExpr
5038 redef fun n_kwwhile
=(n
)
5043 redef fun n_expr
=(n
)
5048 redef fun n_kwdo
=(n
)
5053 redef fun n_block
=(n
)
5060 redef fun n_label
=(n
)
5068 private init empty_init
do end
5070 init init_awhileexpr
(
5071 n_kwwhile
: nullable TKwwhile,
5072 n_expr
: nullable AExpr,
5073 n_kwdo
: nullable TKwdo,
5074 n_block
: nullable AExpr,
5075 n_label
: nullable ALabel
5079 _n_kwwhile
= n_kwwhile
.as(not null)
5080 n_kwwhile
.parent
= self
5081 _n_expr
= n_expr
.as(not null)
5082 n_expr
.parent
= self
5083 _n_kwdo
= n_kwdo
.as(not null)
5084 n_kwdo
.parent
= self
5086 if n_block
!= null then
5087 n_block
.parent
= self
5090 if n_label
!= null then
5091 n_label
.parent
= self
5095 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5097 if _n_kwwhile
== old_child
then
5098 if new_child
!= null then
5099 new_child
.parent
= self
5100 assert new_child
isa TKwwhile
5101 _n_kwwhile
= new_child
5107 if _n_expr
== old_child
then
5108 if new_child
!= null then
5109 new_child
.parent
= self
5110 assert new_child
isa AExpr
5117 if _n_kwdo
== old_child
then
5118 if new_child
!= null then
5119 new_child
.parent
= self
5120 assert new_child
isa TKwdo
5127 if _n_block
== old_child
then
5128 if new_child
!= null then
5129 new_child
.parent
= self
5130 assert new_child
isa AExpr
5131 _n_block
= new_child
5137 if _n_label
== old_child
then
5138 if new_child
!= null then
5139 new_child
.parent
= self
5140 assert new_child
isa ALabel
5141 _n_label
= new_child
5149 redef fun visit_all
(v
: Visitor)
5151 v
.enter_visit
(_n_kwwhile
)
5152 v
.enter_visit
(_n_expr
)
5153 v
.enter_visit
(_n_kwdo
)
5154 if _n_block
!= null then
5155 v
.enter_visit
(_n_block
.as(not null))
5157 if _n_label
!= null then
5158 v
.enter_visit
(_n_label
.as(not null))
5162 redef fun visit_all_reverse
(v
: Visitor)
5164 v
.enter_visit
(_n_kwwhile
)
5165 v
.enter_visit
(_n_expr
)
5166 v
.enter_visit
(_n_kwdo
)
5167 if _n_block
!= null then
5168 v
.enter_visit
(_n_block
.as(not null))
5170 if _n_label
!= null then
5171 v
.enter_visit
(_n_label
.as(not null))
5175 redef class AForExpr
5176 redef fun n_kwfor
=(n
)
5186 redef fun n_expr
=(n
)
5191 redef fun n_kwdo
=(n
)
5196 redef fun n_block
=(n
)
5203 redef fun n_label
=(n
)
5211 private init empty_init
do end
5213 init init_aforexpr
(
5214 n_kwfor
: nullable TKwfor,
5216 n_expr
: nullable AExpr,
5217 n_kwdo
: nullable TKwdo,
5218 n_block
: nullable AExpr,
5219 n_label
: nullable ALabel
5223 _n_kwfor
= n_kwfor
.as(not null)
5224 n_kwfor
.parent
= self
5225 _n_id
= n_id
.as(not null)
5227 _n_expr
= n_expr
.as(not null)
5228 n_expr
.parent
= self
5229 _n_kwdo
= n_kwdo
.as(not null)
5230 n_kwdo
.parent
= self
5232 if n_block
!= null then
5233 n_block
.parent
= self
5236 if n_label
!= null then
5237 n_label
.parent
= self
5241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5243 if _n_kwfor
== old_child
then
5244 if new_child
!= null then
5245 new_child
.parent
= self
5246 assert new_child
isa TKwfor
5247 _n_kwfor
= new_child
5253 if _n_id
== old_child
then
5254 if new_child
!= null then
5255 new_child
.parent
= self
5256 assert new_child
isa TId
5263 if _n_expr
== old_child
then
5264 if new_child
!= null then
5265 new_child
.parent
= self
5266 assert new_child
isa AExpr
5273 if _n_kwdo
== old_child
then
5274 if new_child
!= null then
5275 new_child
.parent
= self
5276 assert new_child
isa TKwdo
5283 if _n_block
== old_child
then
5284 if new_child
!= null then
5285 new_child
.parent
= self
5286 assert new_child
isa AExpr
5287 _n_block
= new_child
5293 if _n_label
== old_child
then
5294 if new_child
!= null then
5295 new_child
.parent
= self
5296 assert new_child
isa ALabel
5297 _n_label
= new_child
5305 redef fun visit_all
(v
: Visitor)
5307 v
.enter_visit
(_n_kwfor
)
5308 v
.enter_visit
(_n_id
)
5309 v
.enter_visit
(_n_expr
)
5310 v
.enter_visit
(_n_kwdo
)
5311 if _n_block
!= null then
5312 v
.enter_visit
(_n_block
.as(not null))
5314 if _n_label
!= null then
5315 v
.enter_visit
(_n_label
.as(not null))
5319 redef fun visit_all_reverse
(v
: Visitor)
5321 v
.enter_visit
(_n_kwfor
)
5322 v
.enter_visit
(_n_id
)
5323 v
.enter_visit
(_n_expr
)
5324 v
.enter_visit
(_n_kwdo
)
5325 if _n_block
!= null then
5326 v
.enter_visit
(_n_block
.as(not null))
5328 if _n_label
!= null then
5329 v
.enter_visit
(_n_label
.as(not null))
5333 redef class AAssertExpr
5334 redef fun n_kwassert
=(n
)
5346 redef fun n_expr
=(n
)
5352 private init empty_init
do end
5354 init init_aassertexpr
(
5355 n_kwassert
: nullable TKwassert,
5357 n_expr
: nullable AExpr
5361 _n_kwassert
= n_kwassert
.as(not null)
5362 n_kwassert
.parent
= self
5364 if n_id
!= null then
5367 _n_expr
= n_expr
.as(not null)
5368 n_expr
.parent
= self
5371 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5373 if _n_kwassert
== old_child
then
5374 if new_child
!= null then
5375 new_child
.parent
= self
5376 assert new_child
isa TKwassert
5377 _n_kwassert
= new_child
5383 if _n_id
== old_child
then
5384 if new_child
!= null then
5385 new_child
.parent
= self
5386 assert new_child
isa TId
5393 if _n_expr
== old_child
then
5394 if new_child
!= null then
5395 new_child
.parent
= self
5396 assert new_child
isa AExpr
5405 redef fun visit_all
(v
: Visitor)
5407 v
.enter_visit
(_n_kwassert
)
5408 if _n_id
!= null then
5409 v
.enter_visit
(_n_id
.as(not null))
5411 v
.enter_visit
(_n_expr
)
5414 redef fun visit_all_reverse
(v
: Visitor)
5416 v
.enter_visit
(_n_kwassert
)
5417 if _n_id
!= null then
5418 v
.enter_visit
(_n_id
.as(not null))
5420 v
.enter_visit
(_n_expr
)
5423 redef class AOnceExpr
5424 redef fun n_kwonce
=(n
)
5429 redef fun n_expr
=(n
)
5435 private init empty_init
do end
5437 init init_aonceexpr
(
5438 n_kwonce
: nullable TKwonce,
5439 n_expr
: nullable AExpr
5443 _n_kwonce
= n_kwonce
.as(not null)
5444 n_kwonce
.parent
= self
5445 _n_expr
= n_expr
.as(not null)
5446 n_expr
.parent
= self
5449 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5451 if _n_kwonce
== old_child
then
5452 if new_child
!= null then
5453 new_child
.parent
= self
5454 assert new_child
isa TKwonce
5455 _n_kwonce
= new_child
5461 if _n_expr
== old_child
then
5462 if new_child
!= null then
5463 new_child
.parent
= self
5464 assert new_child
isa AExpr
5473 redef fun visit_all
(v
: Visitor)
5475 v
.enter_visit
(_n_kwonce
)
5476 v
.enter_visit
(_n_expr
)
5479 redef fun visit_all_reverse
(v
: Visitor)
5481 v
.enter_visit
(_n_kwonce
)
5482 v
.enter_visit
(_n_expr
)
5485 redef class ASendExpr
5486 redef fun n_expr
=(n
)
5492 private init empty_init
do end
5494 init init_asendexpr
(
5495 n_expr
: nullable AExpr
5499 _n_expr
= n_expr
.as(not null)
5500 n_expr
.parent
= self
5503 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5505 if _n_expr
== old_child
then
5506 if new_child
!= null then
5507 new_child
.parent
= self
5508 assert new_child
isa AExpr
5517 redef fun visit_all
(v
: Visitor)
5519 v
.enter_visit
(_n_expr
)
5522 redef fun visit_all_reverse
(v
: Visitor)
5524 v
.enter_visit
(_n_expr
)
5527 redef class ABinopExpr
5528 redef fun n_expr
=(n
)
5533 redef fun n_expr2
=(n
)
5539 private init empty_init
do end
5541 init init_abinopexpr
(
5542 n_expr
: nullable AExpr,
5543 n_expr2
: nullable AExpr
5547 _n_expr
= n_expr
.as(not null)
5548 n_expr
.parent
= self
5549 _n_expr2
= n_expr2
.as(not null)
5550 n_expr2
.parent
= self
5553 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5555 if _n_expr
== old_child
then
5556 if new_child
!= null then
5557 new_child
.parent
= self
5558 assert new_child
isa AExpr
5565 if _n_expr2
== old_child
then
5566 if new_child
!= null then
5567 new_child
.parent
= self
5568 assert new_child
isa AExpr
5569 _n_expr2
= new_child
5577 redef fun visit_all
(v
: Visitor)
5579 v
.enter_visit
(_n_expr
)
5580 v
.enter_visit
(_n_expr2
)
5583 redef fun visit_all_reverse
(v
: Visitor)
5585 v
.enter_visit
(_n_expr
)
5586 v
.enter_visit
(_n_expr2
)
5590 redef fun n_expr
=(n
)
5595 redef fun n_expr2
=(n
)
5601 private init empty_init
do end
5604 n_expr
: nullable AExpr,
5605 n_expr2
: nullable AExpr
5609 _n_expr
= n_expr
.as(not null)
5610 n_expr
.parent
= self
5611 _n_expr2
= n_expr2
.as(not null)
5612 n_expr2
.parent
= self
5615 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5617 if _n_expr
== old_child
then
5618 if new_child
!= null then
5619 new_child
.parent
= self
5620 assert new_child
isa AExpr
5627 if _n_expr2
== old_child
then
5628 if new_child
!= null then
5629 new_child
.parent
= self
5630 assert new_child
isa AExpr
5631 _n_expr2
= new_child
5639 redef fun visit_all
(v
: Visitor)
5641 v
.enter_visit
(_n_expr
)
5642 v
.enter_visit
(_n_expr2
)
5645 redef fun visit_all_reverse
(v
: Visitor)
5647 v
.enter_visit
(_n_expr
)
5648 v
.enter_visit
(_n_expr2
)
5651 redef class AAndExpr
5652 redef fun n_expr
=(n
)
5657 redef fun n_expr2
=(n
)
5663 private init empty_init
do end
5665 init init_aandexpr
(
5666 n_expr
: nullable AExpr,
5667 n_expr2
: nullable AExpr
5671 _n_expr
= n_expr
.as(not null)
5672 n_expr
.parent
= self
5673 _n_expr2
= n_expr2
.as(not null)
5674 n_expr2
.parent
= self
5677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5679 if _n_expr
== old_child
then
5680 if new_child
!= null then
5681 new_child
.parent
= self
5682 assert new_child
isa AExpr
5689 if _n_expr2
== old_child
then
5690 if new_child
!= null then
5691 new_child
.parent
= self
5692 assert new_child
isa AExpr
5693 _n_expr2
= new_child
5701 redef fun visit_all
(v
: Visitor)
5703 v
.enter_visit
(_n_expr
)
5704 v
.enter_visit
(_n_expr2
)
5707 redef fun visit_all_reverse
(v
: Visitor)
5709 v
.enter_visit
(_n_expr
)
5710 v
.enter_visit
(_n_expr2
)
5713 redef class ANotExpr
5714 redef fun n_kwnot
=(n
)
5719 redef fun n_expr
=(n
)
5725 private init empty_init
do end
5727 init init_anotexpr
(
5728 n_kwnot
: nullable TKwnot,
5729 n_expr
: nullable AExpr
5733 _n_kwnot
= n_kwnot
.as(not null)
5734 n_kwnot
.parent
= self
5735 _n_expr
= n_expr
.as(not null)
5736 n_expr
.parent
= self
5739 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5741 if _n_kwnot
== old_child
then
5742 if new_child
!= null then
5743 new_child
.parent
= self
5744 assert new_child
isa TKwnot
5745 _n_kwnot
= new_child
5751 if _n_expr
== old_child
then
5752 if new_child
!= null then
5753 new_child
.parent
= self
5754 assert new_child
isa AExpr
5763 redef fun visit_all
(v
: Visitor)
5765 v
.enter_visit
(_n_kwnot
)
5766 v
.enter_visit
(_n_expr
)
5769 redef fun visit_all_reverse
(v
: Visitor)
5771 v
.enter_visit
(_n_kwnot
)
5772 v
.enter_visit
(_n_expr
)
5776 redef fun n_expr
=(n
)
5781 redef fun n_expr2
=(n
)
5787 private init empty_init
do end
5790 n_expr
: nullable AExpr,
5791 n_expr2
: nullable AExpr
5795 _n_expr
= n_expr
.as(not null)
5796 n_expr
.parent
= self
5797 _n_expr2
= n_expr2
.as(not null)
5798 n_expr2
.parent
= self
5801 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5803 if _n_expr
== old_child
then
5804 if new_child
!= null then
5805 new_child
.parent
= self
5806 assert new_child
isa AExpr
5813 if _n_expr2
== old_child
then
5814 if new_child
!= null then
5815 new_child
.parent
= self
5816 assert new_child
isa AExpr
5817 _n_expr2
= new_child
5825 redef fun visit_all
(v
: Visitor)
5827 v
.enter_visit
(_n_expr
)
5828 v
.enter_visit
(_n_expr2
)
5831 redef fun visit_all_reverse
(v
: Visitor)
5833 v
.enter_visit
(_n_expr
)
5834 v
.enter_visit
(_n_expr2
)
5838 redef fun n_expr
=(n
)
5843 redef fun n_expr2
=(n
)
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 visit_all
(v
: Visitor)
5889 v
.enter_visit
(_n_expr
)
5890 v
.enter_visit
(_n_expr2
)
5893 redef fun visit_all_reverse
(v
: Visitor)
5895 v
.enter_visit
(_n_expr
)
5896 v
.enter_visit
(_n_expr2
)
5900 redef fun n_expr
=(n
)
5905 redef fun n_expr2
=(n
)
5911 private init empty_init
do end
5914 n_expr
: nullable AExpr,
5915 n_expr2
: nullable AExpr
5919 _n_expr
= n_expr
.as(not null)
5920 n_expr
.parent
= self
5921 _n_expr2
= n_expr2
.as(not null)
5922 n_expr2
.parent
= self
5925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5927 if _n_expr
== old_child
then
5928 if new_child
!= null then
5929 new_child
.parent
= self
5930 assert new_child
isa AExpr
5937 if _n_expr2
== old_child
then
5938 if new_child
!= null then
5939 new_child
.parent
= self
5940 assert new_child
isa AExpr
5941 _n_expr2
= new_child
5949 redef fun visit_all
(v
: Visitor)
5951 v
.enter_visit
(_n_expr
)
5952 v
.enter_visit
(_n_expr2
)
5955 redef fun visit_all_reverse
(v
: Visitor)
5957 v
.enter_visit
(_n_expr
)
5958 v
.enter_visit
(_n_expr2
)
5962 redef fun n_expr
=(n
)
5967 redef fun n_expr2
=(n
)
5973 private init empty_init
do end
5976 n_expr
: nullable AExpr,
5977 n_expr2
: nullable AExpr
5981 _n_expr
= n_expr
.as(not null)
5982 n_expr
.parent
= self
5983 _n_expr2
= n_expr2
.as(not null)
5984 n_expr2
.parent
= self
5987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5989 if _n_expr
== old_child
then
5990 if new_child
!= null then
5991 new_child
.parent
= self
5992 assert new_child
isa AExpr
5999 if _n_expr2
== old_child
then
6000 if new_child
!= null then
6001 new_child
.parent
= self
6002 assert new_child
isa AExpr
6003 _n_expr2
= new_child
6011 redef fun visit_all
(v
: Visitor)
6013 v
.enter_visit
(_n_expr
)
6014 v
.enter_visit
(_n_expr2
)
6017 redef fun visit_all_reverse
(v
: Visitor)
6019 v
.enter_visit
(_n_expr
)
6020 v
.enter_visit
(_n_expr2
)
6024 redef fun n_expr
=(n
)
6029 redef fun n_expr2
=(n
)
6035 private init empty_init
do end
6038 n_expr
: nullable AExpr,
6039 n_expr2
: nullable AExpr
6043 _n_expr
= n_expr
.as(not null)
6044 n_expr
.parent
= self
6045 _n_expr2
= n_expr2
.as(not null)
6046 n_expr2
.parent
= self
6049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6051 if _n_expr
== old_child
then
6052 if new_child
!= null then
6053 new_child
.parent
= self
6054 assert new_child
isa AExpr
6061 if _n_expr2
== old_child
then
6062 if new_child
!= null then
6063 new_child
.parent
= self
6064 assert new_child
isa AExpr
6065 _n_expr2
= new_child
6073 redef fun visit_all
(v
: Visitor)
6075 v
.enter_visit
(_n_expr
)
6076 v
.enter_visit
(_n_expr2
)
6079 redef fun visit_all_reverse
(v
: Visitor)
6081 v
.enter_visit
(_n_expr
)
6082 v
.enter_visit
(_n_expr2
)
6086 redef fun n_expr
=(n
)
6091 redef fun n_expr2
=(n
)
6097 private init empty_init
do end
6100 n_expr
: nullable AExpr,
6101 n_expr2
: nullable AExpr
6105 _n_expr
= n_expr
.as(not null)
6106 n_expr
.parent
= self
6107 _n_expr2
= n_expr2
.as(not null)
6108 n_expr2
.parent
= self
6111 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6113 if _n_expr
== old_child
then
6114 if new_child
!= null then
6115 new_child
.parent
= self
6116 assert new_child
isa AExpr
6123 if _n_expr2
== old_child
then
6124 if new_child
!= null then
6125 new_child
.parent
= self
6126 assert new_child
isa AExpr
6127 _n_expr2
= new_child
6135 redef fun visit_all
(v
: Visitor)
6137 v
.enter_visit
(_n_expr
)
6138 v
.enter_visit
(_n_expr2
)
6141 redef fun visit_all_reverse
(v
: Visitor)
6143 v
.enter_visit
(_n_expr
)
6144 v
.enter_visit
(_n_expr2
)
6148 redef fun n_expr
=(n
)
6153 redef fun n_expr2
=(n
)
6159 private init empty_init
do end
6162 n_expr
: nullable AExpr,
6163 n_expr2
: nullable AExpr
6167 _n_expr
= n_expr
.as(not null)
6168 n_expr
.parent
= self
6169 _n_expr2
= n_expr2
.as(not null)
6170 n_expr2
.parent
= self
6173 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6175 if _n_expr
== old_child
then
6176 if new_child
!= null then
6177 new_child
.parent
= self
6178 assert new_child
isa AExpr
6185 if _n_expr2
== old_child
then
6186 if new_child
!= null then
6187 new_child
.parent
= self
6188 assert new_child
isa AExpr
6189 _n_expr2
= new_child
6197 redef fun visit_all
(v
: Visitor)
6199 v
.enter_visit
(_n_expr
)
6200 v
.enter_visit
(_n_expr2
)
6203 redef fun visit_all_reverse
(v
: Visitor)
6205 v
.enter_visit
(_n_expr
)
6206 v
.enter_visit
(_n_expr2
)
6209 redef class AIsaExpr
6210 redef fun n_expr
=(n
)
6215 redef fun n_type
=(n
)
6221 private init empty_init
do end
6223 init init_aisaexpr
(
6224 n_expr
: nullable AExpr,
6225 n_type
: nullable AType
6229 _n_expr
= n_expr
.as(not null)
6230 n_expr
.parent
= self
6231 _n_type
= n_type
.as(not null)
6232 n_type
.parent
= self
6235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6237 if _n_expr
== old_child
then
6238 if new_child
!= null then
6239 new_child
.parent
= self
6240 assert new_child
isa AExpr
6247 if _n_type
== old_child
then
6248 if new_child
!= null then
6249 new_child
.parent
= self
6250 assert new_child
isa AType
6259 redef fun visit_all
(v
: Visitor)
6261 v
.enter_visit
(_n_expr
)
6262 v
.enter_visit
(_n_type
)
6265 redef fun visit_all_reverse
(v
: Visitor)
6267 v
.enter_visit
(_n_expr
)
6268 v
.enter_visit
(_n_type
)
6271 redef class APlusExpr
6272 redef fun n_expr
=(n
)
6277 redef fun n_expr2
=(n
)
6283 private init empty_init
do end
6285 init init_aplusexpr
(
6286 n_expr
: nullable AExpr,
6287 n_expr2
: nullable AExpr
6291 _n_expr
= n_expr
.as(not null)
6292 n_expr
.parent
= self
6293 _n_expr2
= n_expr2
.as(not null)
6294 n_expr2
.parent
= self
6297 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6299 if _n_expr
== old_child
then
6300 if new_child
!= null then
6301 new_child
.parent
= self
6302 assert new_child
isa AExpr
6309 if _n_expr2
== old_child
then
6310 if new_child
!= null then
6311 new_child
.parent
= self
6312 assert new_child
isa AExpr
6313 _n_expr2
= new_child
6321 redef fun visit_all
(v
: Visitor)
6323 v
.enter_visit
(_n_expr
)
6324 v
.enter_visit
(_n_expr2
)
6327 redef fun visit_all_reverse
(v
: Visitor)
6329 v
.enter_visit
(_n_expr
)
6330 v
.enter_visit
(_n_expr2
)
6333 redef class AMinusExpr
6334 redef fun n_expr
=(n
)
6339 redef fun n_expr2
=(n
)
6345 private init empty_init
do end
6347 init init_aminusexpr
(
6348 n_expr
: nullable AExpr,
6349 n_expr2
: nullable AExpr
6353 _n_expr
= n_expr
.as(not null)
6354 n_expr
.parent
= self
6355 _n_expr2
= n_expr2
.as(not null)
6356 n_expr2
.parent
= self
6359 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6361 if _n_expr
== old_child
then
6362 if new_child
!= null then
6363 new_child
.parent
= self
6364 assert new_child
isa AExpr
6371 if _n_expr2
== old_child
then
6372 if new_child
!= null then
6373 new_child
.parent
= self
6374 assert new_child
isa AExpr
6375 _n_expr2
= new_child
6383 redef fun visit_all
(v
: Visitor)
6385 v
.enter_visit
(_n_expr
)
6386 v
.enter_visit
(_n_expr2
)
6389 redef fun visit_all_reverse
(v
: Visitor)
6391 v
.enter_visit
(_n_expr
)
6392 v
.enter_visit
(_n_expr2
)
6395 redef class AStarshipExpr
6396 redef fun n_expr
=(n
)
6401 redef fun n_expr2
=(n
)
6407 private init empty_init
do end
6409 init init_astarshipexpr
(
6410 n_expr
: nullable AExpr,
6411 n_expr2
: nullable AExpr
6415 _n_expr
= n_expr
.as(not null)
6416 n_expr
.parent
= self
6417 _n_expr2
= n_expr2
.as(not null)
6418 n_expr2
.parent
= self
6421 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6423 if _n_expr
== old_child
then
6424 if new_child
!= null then
6425 new_child
.parent
= self
6426 assert new_child
isa AExpr
6433 if _n_expr2
== old_child
then
6434 if new_child
!= null then
6435 new_child
.parent
= self
6436 assert new_child
isa AExpr
6437 _n_expr2
= new_child
6445 redef fun visit_all
(v
: Visitor)
6447 v
.enter_visit
(_n_expr
)
6448 v
.enter_visit
(_n_expr2
)
6451 redef fun visit_all_reverse
(v
: Visitor)
6453 v
.enter_visit
(_n_expr
)
6454 v
.enter_visit
(_n_expr2
)
6457 redef class AStarExpr
6458 redef fun n_expr
=(n
)
6463 redef fun n_expr2
=(n
)
6469 private init empty_init
do end
6471 init init_astarexpr
(
6472 n_expr
: nullable AExpr,
6473 n_expr2
: nullable AExpr
6477 _n_expr
= n_expr
.as(not null)
6478 n_expr
.parent
= self
6479 _n_expr2
= n_expr2
.as(not null)
6480 n_expr2
.parent
= self
6483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6485 if _n_expr
== old_child
then
6486 if new_child
!= null then
6487 new_child
.parent
= self
6488 assert new_child
isa AExpr
6495 if _n_expr2
== old_child
then
6496 if new_child
!= null then
6497 new_child
.parent
= self
6498 assert new_child
isa AExpr
6499 _n_expr2
= new_child
6507 redef fun visit_all
(v
: Visitor)
6509 v
.enter_visit
(_n_expr
)
6510 v
.enter_visit
(_n_expr2
)
6513 redef fun visit_all_reverse
(v
: Visitor)
6515 v
.enter_visit
(_n_expr
)
6516 v
.enter_visit
(_n_expr2
)
6519 redef class ASlashExpr
6520 redef fun n_expr
=(n
)
6525 redef fun n_expr2
=(n
)
6531 private init empty_init
do end
6533 init init_aslashexpr
(
6534 n_expr
: nullable AExpr,
6535 n_expr2
: nullable AExpr
6539 _n_expr
= n_expr
.as(not null)
6540 n_expr
.parent
= self
6541 _n_expr2
= n_expr2
.as(not null)
6542 n_expr2
.parent
= self
6545 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6547 if _n_expr
== old_child
then
6548 if new_child
!= null then
6549 new_child
.parent
= self
6550 assert new_child
isa AExpr
6557 if _n_expr2
== old_child
then
6558 if new_child
!= null then
6559 new_child
.parent
= self
6560 assert new_child
isa AExpr
6561 _n_expr2
= new_child
6569 redef fun visit_all
(v
: Visitor)
6571 v
.enter_visit
(_n_expr
)
6572 v
.enter_visit
(_n_expr2
)
6575 redef fun visit_all_reverse
(v
: Visitor)
6577 v
.enter_visit
(_n_expr
)
6578 v
.enter_visit
(_n_expr2
)
6581 redef class APercentExpr
6582 redef fun n_expr
=(n
)
6587 redef fun n_expr2
=(n
)
6593 private init empty_init
do end
6595 init init_apercentexpr
(
6596 n_expr
: nullable AExpr,
6597 n_expr2
: nullable AExpr
6601 _n_expr
= n_expr
.as(not null)
6602 n_expr
.parent
= self
6603 _n_expr2
= n_expr2
.as(not null)
6604 n_expr2
.parent
= self
6607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6609 if _n_expr
== old_child
then
6610 if new_child
!= null then
6611 new_child
.parent
= self
6612 assert new_child
isa AExpr
6619 if _n_expr2
== old_child
then
6620 if new_child
!= null then
6621 new_child
.parent
= self
6622 assert new_child
isa AExpr
6623 _n_expr2
= new_child
6631 redef fun visit_all
(v
: Visitor)
6633 v
.enter_visit
(_n_expr
)
6634 v
.enter_visit
(_n_expr2
)
6637 redef fun visit_all_reverse
(v
: Visitor)
6639 v
.enter_visit
(_n_expr
)
6640 v
.enter_visit
(_n_expr2
)
6643 redef class AUminusExpr
6644 redef fun n_minus
=(n
)
6649 redef fun n_expr
=(n
)
6655 private init empty_init
do end
6657 init init_auminusexpr
(
6658 n_minus
: nullable TMinus,
6659 n_expr
: nullable AExpr
6663 _n_minus
= n_minus
.as(not null)
6664 n_minus
.parent
= self
6665 _n_expr
= n_expr
.as(not null)
6666 n_expr
.parent
= self
6669 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6671 if _n_minus
== old_child
then
6672 if new_child
!= null then
6673 new_child
.parent
= self
6674 assert new_child
isa TMinus
6675 _n_minus
= new_child
6681 if _n_expr
== old_child
then
6682 if new_child
!= null then
6683 new_child
.parent
= self
6684 assert new_child
isa AExpr
6693 redef fun visit_all
(v
: Visitor)
6695 v
.enter_visit
(_n_minus
)
6696 v
.enter_visit
(_n_expr
)
6699 redef fun visit_all_reverse
(v
: Visitor)
6701 v
.enter_visit
(_n_minus
)
6702 v
.enter_visit
(_n_expr
)
6705 redef class ANewExpr
6706 redef fun n_kwnew
=(n
)
6711 redef fun n_type
=(n
)
6724 private init empty_init
do end
6726 init init_anewexpr
(
6727 n_kwnew
: nullable TKwnew,
6728 n_type
: nullable AType,
6730 n_args
: Collection[Object] # Should be Collection[AExpr]
6734 _n_kwnew
= n_kwnew
.as(not null)
6735 n_kwnew
.parent
= self
6736 _n_type
= n_type
.as(not null)
6737 n_type
.parent
= self
6739 if n_id
!= null then
6749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6751 if _n_kwnew
== old_child
then
6752 if new_child
!= null then
6753 new_child
.parent
= self
6754 assert new_child
isa TKwnew
6755 _n_kwnew
= new_child
6761 if _n_type
== old_child
then
6762 if new_child
!= null then
6763 new_child
.parent
= self
6764 assert new_child
isa AType
6771 if _n_id
== old_child
then
6772 if new_child
!= null then
6773 new_child
.parent
= self
6774 assert new_child
isa TId
6781 for i
in [0.._n_args
.length
[ do
6782 if _n_args
[i
] == old_child
then
6783 if new_child
!= null then
6784 assert new_child
isa AExpr
6785 _n_args
[i
] = new_child
6786 new_child
.parent
= self
6788 _n_args
.remove_at
(i
)
6795 redef fun visit_all
(v
: Visitor)
6797 v
.enter_visit
(_n_kwnew
)
6798 v
.enter_visit
(_n_type
)
6799 if _n_id
!= null then
6800 v
.enter_visit
(_n_id
.as(not null))
6807 redef fun visit_all_reverse
(v
: Visitor)
6809 v
.enter_visit
(_n_kwnew
)
6810 v
.enter_visit
(_n_type
)
6811 if _n_id
!= null then
6812 v
.enter_visit
(_n_id
.as(not null))
6815 var i
= _n_args
.length
6817 v
.enter_visit
(_n_args
[i
])
6823 redef class AAttrExpr
6824 redef fun n_expr
=(n
)
6835 private init empty_init
do end
6837 init init_aattrexpr
(
6838 n_expr
: nullable AExpr,
6839 n_id
: nullable TAttrid
6843 _n_expr
= n_expr
.as(not null)
6844 n_expr
.parent
= self
6845 _n_id
= n_id
.as(not null)
6849 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6851 if _n_expr
== old_child
then
6852 if new_child
!= null then
6853 new_child
.parent
= self
6854 assert new_child
isa AExpr
6861 if _n_id
== old_child
then
6862 if new_child
!= null then
6863 new_child
.parent
= self
6864 assert new_child
isa TAttrid
6873 redef fun visit_all
(v
: Visitor)
6875 v
.enter_visit
(_n_expr
)
6876 v
.enter_visit
(_n_id
)
6879 redef fun visit_all_reverse
(v
: Visitor)
6881 v
.enter_visit
(_n_expr
)
6882 v
.enter_visit
(_n_id
)
6885 redef class AAttrAssignExpr
6886 redef fun n_expr
=(n
)
6896 redef fun n_assign
=(n
)
6901 redef fun n_value
=(n
)
6907 private init empty_init
do end
6909 init init_aattrassignexpr
(
6910 n_expr
: nullable AExpr,
6911 n_id
: nullable TAttrid,
6912 n_assign
: nullable TAssign,
6913 n_value
: nullable AExpr
6917 _n_expr
= n_expr
.as(not null)
6918 n_expr
.parent
= self
6919 _n_id
= n_id
.as(not null)
6921 _n_assign
= n_assign
.as(not null)
6922 n_assign
.parent
= self
6923 _n_value
= n_value
.as(not null)
6924 n_value
.parent
= self
6927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6929 if _n_expr
== old_child
then
6930 if new_child
!= null then
6931 new_child
.parent
= self
6932 assert new_child
isa AExpr
6939 if _n_id
== old_child
then
6940 if new_child
!= null then
6941 new_child
.parent
= self
6942 assert new_child
isa TAttrid
6949 if _n_assign
== old_child
then
6950 if new_child
!= null then
6951 new_child
.parent
= self
6952 assert new_child
isa TAssign
6953 _n_assign
= new_child
6959 if _n_value
== old_child
then
6960 if new_child
!= null then
6961 new_child
.parent
= self
6962 assert new_child
isa AExpr
6963 _n_value
= new_child
6971 redef fun visit_all
(v
: Visitor)
6973 v
.enter_visit
(_n_expr
)
6974 v
.enter_visit
(_n_id
)
6975 v
.enter_visit
(_n_assign
)
6976 v
.enter_visit
(_n_value
)
6979 redef fun visit_all_reverse
(v
: Visitor)
6981 v
.enter_visit
(_n_expr
)
6982 v
.enter_visit
(_n_id
)
6983 v
.enter_visit
(_n_assign
)
6984 v
.enter_visit
(_n_value
)
6987 redef class AAttrReassignExpr
6988 redef fun n_expr
=(n
)
6998 redef fun n_assign_op
=(n
)
7003 redef fun n_value
=(n
)
7009 private init empty_init
do end
7011 init init_aattrreassignexpr
(
7012 n_expr
: nullable AExpr,
7013 n_id
: nullable TAttrid,
7014 n_assign_op
: nullable AAssignOp,
7015 n_value
: nullable AExpr
7019 _n_expr
= n_expr
.as(not null)
7020 n_expr
.parent
= self
7021 _n_id
= n_id
.as(not null)
7023 _n_assign_op
= n_assign_op
.as(not null)
7024 n_assign_op
.parent
= self
7025 _n_value
= n_value
.as(not null)
7026 n_value
.parent
= self
7029 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7031 if _n_expr
== old_child
then
7032 if new_child
!= null then
7033 new_child
.parent
= self
7034 assert new_child
isa AExpr
7041 if _n_id
== old_child
then
7042 if new_child
!= null then
7043 new_child
.parent
= self
7044 assert new_child
isa TAttrid
7051 if _n_assign_op
== old_child
then
7052 if new_child
!= null then
7053 new_child
.parent
= self
7054 assert new_child
isa AAssignOp
7055 _n_assign_op
= new_child
7061 if _n_value
== old_child
then
7062 if new_child
!= null then
7063 new_child
.parent
= self
7064 assert new_child
isa AExpr
7065 _n_value
= new_child
7073 redef fun visit_all
(v
: Visitor)
7075 v
.enter_visit
(_n_expr
)
7076 v
.enter_visit
(_n_id
)
7077 v
.enter_visit
(_n_assign_op
)
7078 v
.enter_visit
(_n_value
)
7081 redef fun visit_all_reverse
(v
: Visitor)
7083 v
.enter_visit
(_n_expr
)
7084 v
.enter_visit
(_n_id
)
7085 v
.enter_visit
(_n_assign_op
)
7086 v
.enter_visit
(_n_value
)
7089 redef class ACallExpr
7090 redef fun n_expr
=(n
)
7101 private init empty_init
do end
7103 init init_acallexpr
(
7104 n_expr
: nullable AExpr,
7106 n_args
: Collection[Object], # Should be Collection[AExpr]
7107 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7111 _n_expr
= n_expr
.as(not null)
7112 n_expr
.parent
= self
7113 _n_id
= n_id
.as(not null)
7120 for n
in n_closure_defs
do
7121 assert n
isa AClosureDef
7122 _n_closure_defs
.add
(n
)
7127 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7129 if _n_expr
== old_child
then
7130 if new_child
!= null then
7131 new_child
.parent
= self
7132 assert new_child
isa AExpr
7139 if _n_id
== old_child
then
7140 if new_child
!= null then
7141 new_child
.parent
= self
7142 assert new_child
isa TId
7149 for i
in [0.._n_args
.length
[ do
7150 if _n_args
[i
] == old_child
then
7151 if new_child
!= null then
7152 assert new_child
isa AExpr
7153 _n_args
[i
] = new_child
7154 new_child
.parent
= self
7156 _n_args
.remove_at
(i
)
7161 for i
in [0.._n_closure_defs
.length
[ do
7162 if _n_closure_defs
[i
] == old_child
then
7163 if new_child
!= null then
7164 assert new_child
isa AClosureDef
7165 _n_closure_defs
[i
] = new_child
7166 new_child
.parent
= self
7168 _n_closure_defs
.remove_at
(i
)
7175 redef fun visit_all
(v
: Visitor)
7177 v
.enter_visit
(_n_expr
)
7178 v
.enter_visit
(_n_id
)
7182 for n
in _n_closure_defs
do
7187 redef fun visit_all_reverse
(v
: Visitor)
7189 v
.enter_visit
(_n_expr
)
7190 v
.enter_visit
(_n_id
)
7192 var i
= _n_args
.length
7194 v
.enter_visit
(_n_args
[i
])
7199 var i
= _n_closure_defs
.length
7201 v
.enter_visit
(_n_closure_defs
[i
])
7207 redef class ACallAssignExpr
7208 redef fun n_expr
=(n
)
7218 redef fun n_assign
=(n
)
7223 redef fun n_value
=(n
)
7229 private init empty_init
do end
7231 init init_acallassignexpr
(
7232 n_expr
: nullable AExpr,
7234 n_args
: Collection[Object], # Should be Collection[AExpr]
7235 n_assign
: nullable TAssign,
7236 n_value
: nullable AExpr
7240 _n_expr
= n_expr
.as(not null)
7241 n_expr
.parent
= self
7242 _n_id
= n_id
.as(not null)
7249 _n_assign
= n_assign
.as(not null)
7250 n_assign
.parent
= self
7251 _n_value
= n_value
.as(not null)
7252 n_value
.parent
= self
7255 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7257 if _n_expr
== old_child
then
7258 if new_child
!= null then
7259 new_child
.parent
= self
7260 assert new_child
isa AExpr
7267 if _n_id
== old_child
then
7268 if new_child
!= null then
7269 new_child
.parent
= self
7270 assert new_child
isa TId
7277 for i
in [0.._n_args
.length
[ do
7278 if _n_args
[i
] == old_child
then
7279 if new_child
!= null then
7280 assert new_child
isa AExpr
7281 _n_args
[i
] = new_child
7282 new_child
.parent
= self
7284 _n_args
.remove_at
(i
)
7289 if _n_assign
== old_child
then
7290 if new_child
!= null then
7291 new_child
.parent
= self
7292 assert new_child
isa TAssign
7293 _n_assign
= new_child
7299 if _n_value
== old_child
then
7300 if new_child
!= null then
7301 new_child
.parent
= self
7302 assert new_child
isa AExpr
7303 _n_value
= new_child
7311 redef fun visit_all
(v
: Visitor)
7313 v
.enter_visit
(_n_expr
)
7314 v
.enter_visit
(_n_id
)
7318 v
.enter_visit
(_n_assign
)
7319 v
.enter_visit
(_n_value
)
7322 redef fun visit_all_reverse
(v
: Visitor)
7324 v
.enter_visit
(_n_expr
)
7325 v
.enter_visit
(_n_id
)
7327 var i
= _n_args
.length
7329 v
.enter_visit
(_n_args
[i
])
7333 v
.enter_visit
(_n_assign
)
7334 v
.enter_visit
(_n_value
)
7337 redef class ACallReassignExpr
7338 redef fun n_expr
=(n
)
7348 redef fun n_assign_op
=(n
)
7353 redef fun n_value
=(n
)
7359 private init empty_init
do end
7361 init init_acallreassignexpr
(
7362 n_expr
: nullable AExpr,
7364 n_args
: Collection[Object], # Should be Collection[AExpr]
7365 n_assign_op
: nullable AAssignOp,
7366 n_value
: nullable AExpr
7370 _n_expr
= n_expr
.as(not null)
7371 n_expr
.parent
= self
7372 _n_id
= n_id
.as(not null)
7379 _n_assign_op
= n_assign_op
.as(not null)
7380 n_assign_op
.parent
= self
7381 _n_value
= n_value
.as(not null)
7382 n_value
.parent
= self
7385 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7387 if _n_expr
== old_child
then
7388 if new_child
!= null then
7389 new_child
.parent
= self
7390 assert new_child
isa AExpr
7397 if _n_id
== old_child
then
7398 if new_child
!= null then
7399 new_child
.parent
= self
7400 assert new_child
isa TId
7407 for i
in [0.._n_args
.length
[ do
7408 if _n_args
[i
] == old_child
then
7409 if new_child
!= null then
7410 assert new_child
isa AExpr
7411 _n_args
[i
] = new_child
7412 new_child
.parent
= self
7414 _n_args
.remove_at
(i
)
7419 if _n_assign_op
== old_child
then
7420 if new_child
!= null then
7421 new_child
.parent
= self
7422 assert new_child
isa AAssignOp
7423 _n_assign_op
= new_child
7429 if _n_value
== old_child
then
7430 if new_child
!= null then
7431 new_child
.parent
= self
7432 assert new_child
isa AExpr
7433 _n_value
= new_child
7441 redef fun visit_all
(v
: Visitor)
7443 v
.enter_visit
(_n_expr
)
7444 v
.enter_visit
(_n_id
)
7448 v
.enter_visit
(_n_assign_op
)
7449 v
.enter_visit
(_n_value
)
7452 redef fun visit_all_reverse
(v
: Visitor)
7454 v
.enter_visit
(_n_expr
)
7455 v
.enter_visit
(_n_id
)
7457 var i
= _n_args
.length
7459 v
.enter_visit
(_n_args
[i
])
7463 v
.enter_visit
(_n_assign_op
)
7464 v
.enter_visit
(_n_value
)
7467 redef class ASuperExpr
7468 redef fun n_qualified
=(n
)
7475 redef fun n_kwsuper
=(n
)
7481 private init empty_init
do end
7483 init init_asuperexpr
(
7484 n_qualified
: nullable AQualified,
7485 n_kwsuper
: nullable TKwsuper,
7486 n_args
: Collection[Object] # Should be Collection[AExpr]
7490 _n_qualified
= n_qualified
7491 if n_qualified
!= null then
7492 n_qualified
.parent
= self
7494 _n_kwsuper
= n_kwsuper
.as(not null)
7495 n_kwsuper
.parent
= self
7503 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7505 if _n_qualified
== old_child
then
7506 if new_child
!= null then
7507 new_child
.parent
= self
7508 assert new_child
isa AQualified
7509 _n_qualified
= new_child
7515 if _n_kwsuper
== old_child
then
7516 if new_child
!= null then
7517 new_child
.parent
= self
7518 assert new_child
isa TKwsuper
7519 _n_kwsuper
= new_child
7525 for i
in [0.._n_args
.length
[ do
7526 if _n_args
[i
] == old_child
then
7527 if new_child
!= null then
7528 assert new_child
isa AExpr
7529 _n_args
[i
] = new_child
7530 new_child
.parent
= self
7532 _n_args
.remove_at
(i
)
7539 redef fun visit_all
(v
: Visitor)
7541 if _n_qualified
!= null then
7542 v
.enter_visit
(_n_qualified
.as(not null))
7544 v
.enter_visit
(_n_kwsuper
)
7550 redef fun visit_all_reverse
(v
: Visitor)
7552 if _n_qualified
!= null then
7553 v
.enter_visit
(_n_qualified
.as(not null))
7555 v
.enter_visit
(_n_kwsuper
)
7557 var i
= _n_args
.length
7559 v
.enter_visit
(_n_args
[i
])
7565 redef class AInitExpr
7566 redef fun n_expr
=(n
)
7571 redef fun n_kwinit
=(n
)
7577 private init empty_init
do end
7579 init init_ainitexpr
(
7580 n_expr
: nullable AExpr,
7581 n_kwinit
: nullable TKwinit,
7582 n_args
: Collection[Object] # Should be Collection[AExpr]
7586 _n_expr
= n_expr
.as(not null)
7587 n_expr
.parent
= self
7588 _n_kwinit
= n_kwinit
.as(not null)
7589 n_kwinit
.parent
= self
7597 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7599 if _n_expr
== old_child
then
7600 if new_child
!= null then
7601 new_child
.parent
= self
7602 assert new_child
isa AExpr
7609 if _n_kwinit
== old_child
then
7610 if new_child
!= null then
7611 new_child
.parent
= self
7612 assert new_child
isa TKwinit
7613 _n_kwinit
= new_child
7619 for i
in [0.._n_args
.length
[ do
7620 if _n_args
[i
] == old_child
then
7621 if new_child
!= null then
7622 assert new_child
isa AExpr
7623 _n_args
[i
] = new_child
7624 new_child
.parent
= self
7626 _n_args
.remove_at
(i
)
7633 redef fun visit_all
(v
: Visitor)
7635 v
.enter_visit
(_n_expr
)
7636 v
.enter_visit
(_n_kwinit
)
7642 redef fun visit_all_reverse
(v
: Visitor)
7644 v
.enter_visit
(_n_expr
)
7645 v
.enter_visit
(_n_kwinit
)
7647 var i
= _n_args
.length
7649 v
.enter_visit
(_n_args
[i
])
7655 redef class ABraExpr
7656 redef fun n_expr
=(n
)
7662 private init empty_init
do end
7664 init init_abraexpr
(
7665 n_expr
: nullable AExpr,
7666 n_args
: Collection[Object], # Should be Collection[AExpr]
7667 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7671 _n_expr
= n_expr
.as(not null)
7672 n_expr
.parent
= self
7678 for n
in n_closure_defs
do
7679 assert n
isa AClosureDef
7680 _n_closure_defs
.add
(n
)
7685 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7687 if _n_expr
== old_child
then
7688 if new_child
!= null then
7689 new_child
.parent
= self
7690 assert new_child
isa AExpr
7697 for i
in [0.._n_args
.length
[ do
7698 if _n_args
[i
] == old_child
then
7699 if new_child
!= null then
7700 assert new_child
isa AExpr
7701 _n_args
[i
] = new_child
7702 new_child
.parent
= self
7704 _n_args
.remove_at
(i
)
7709 for i
in [0.._n_closure_defs
.length
[ do
7710 if _n_closure_defs
[i
] == old_child
then
7711 if new_child
!= null then
7712 assert new_child
isa AClosureDef
7713 _n_closure_defs
[i
] = new_child
7714 new_child
.parent
= self
7716 _n_closure_defs
.remove_at
(i
)
7723 redef fun visit_all
(v
: Visitor)
7725 v
.enter_visit
(_n_expr
)
7729 for n
in _n_closure_defs
do
7734 redef fun visit_all_reverse
(v
: Visitor)
7736 v
.enter_visit
(_n_expr
)
7738 var i
= _n_args
.length
7740 v
.enter_visit
(_n_args
[i
])
7745 var i
= _n_closure_defs
.length
7747 v
.enter_visit
(_n_closure_defs
[i
])
7753 redef class ABraAssignExpr
7754 redef fun n_expr
=(n
)
7759 redef fun n_assign
=(n
)
7764 redef fun n_value
=(n
)
7770 private init empty_init
do end
7772 init init_abraassignexpr
(
7773 n_expr
: nullable AExpr,
7774 n_args
: Collection[Object], # Should be Collection[AExpr]
7775 n_assign
: nullable TAssign,
7776 n_value
: nullable AExpr
7780 _n_expr
= n_expr
.as(not null)
7781 n_expr
.parent
= self
7787 _n_assign
= n_assign
.as(not null)
7788 n_assign
.parent
= self
7789 _n_value
= n_value
.as(not null)
7790 n_value
.parent
= self
7793 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7795 if _n_expr
== old_child
then
7796 if new_child
!= null then
7797 new_child
.parent
= self
7798 assert new_child
isa AExpr
7805 for i
in [0.._n_args
.length
[ do
7806 if _n_args
[i
] == old_child
then
7807 if new_child
!= null then
7808 assert new_child
isa AExpr
7809 _n_args
[i
] = new_child
7810 new_child
.parent
= self
7812 _n_args
.remove_at
(i
)
7817 if _n_assign
== old_child
then
7818 if new_child
!= null then
7819 new_child
.parent
= self
7820 assert new_child
isa TAssign
7821 _n_assign
= new_child
7827 if _n_value
== old_child
then
7828 if new_child
!= null then
7829 new_child
.parent
= self
7830 assert new_child
isa AExpr
7831 _n_value
= new_child
7839 redef fun visit_all
(v
: Visitor)
7841 v
.enter_visit
(_n_expr
)
7845 v
.enter_visit
(_n_assign
)
7846 v
.enter_visit
(_n_value
)
7849 redef fun visit_all_reverse
(v
: Visitor)
7851 v
.enter_visit
(_n_expr
)
7853 var i
= _n_args
.length
7855 v
.enter_visit
(_n_args
[i
])
7859 v
.enter_visit
(_n_assign
)
7860 v
.enter_visit
(_n_value
)
7863 redef class ABraReassignExpr
7864 redef fun n_expr
=(n
)
7869 redef fun n_assign_op
=(n
)
7874 redef fun n_value
=(n
)
7880 private init empty_init
do end
7882 init init_abrareassignexpr
(
7883 n_expr
: nullable AExpr,
7884 n_args
: Collection[Object], # Should be Collection[AExpr]
7885 n_assign_op
: nullable AAssignOp,
7886 n_value
: nullable AExpr
7890 _n_expr
= n_expr
.as(not null)
7891 n_expr
.parent
= self
7897 _n_assign_op
= n_assign_op
.as(not null)
7898 n_assign_op
.parent
= self
7899 _n_value
= n_value
.as(not null)
7900 n_value
.parent
= self
7903 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7905 if _n_expr
== old_child
then
7906 if new_child
!= null then
7907 new_child
.parent
= self
7908 assert new_child
isa AExpr
7915 for i
in [0.._n_args
.length
[ do
7916 if _n_args
[i
] == old_child
then
7917 if new_child
!= null then
7918 assert new_child
isa AExpr
7919 _n_args
[i
] = new_child
7920 new_child
.parent
= self
7922 _n_args
.remove_at
(i
)
7927 if _n_assign_op
== old_child
then
7928 if new_child
!= null then
7929 new_child
.parent
= self
7930 assert new_child
isa AAssignOp
7931 _n_assign_op
= new_child
7937 if _n_value
== old_child
then
7938 if new_child
!= null then
7939 new_child
.parent
= self
7940 assert new_child
isa AExpr
7941 _n_value
= new_child
7949 redef fun visit_all
(v
: Visitor)
7951 v
.enter_visit
(_n_expr
)
7955 v
.enter_visit
(_n_assign_op
)
7956 v
.enter_visit
(_n_value
)
7959 redef fun visit_all_reverse
(v
: Visitor)
7961 v
.enter_visit
(_n_expr
)
7963 var i
= _n_args
.length
7965 v
.enter_visit
(_n_args
[i
])
7969 v
.enter_visit
(_n_assign_op
)
7970 v
.enter_visit
(_n_value
)
7973 redef class AClosureCallExpr
7980 private init empty_init
do end
7982 init init_aclosurecallexpr
(
7984 n_args
: Collection[Object], # Should be Collection[AExpr]
7985 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7989 _n_id
= n_id
.as(not null)
7996 for n
in n_closure_defs
do
7997 assert n
isa AClosureDef
7998 _n_closure_defs
.add
(n
)
8003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8005 if _n_id
== old_child
then
8006 if new_child
!= null then
8007 new_child
.parent
= self
8008 assert new_child
isa TId
8015 for i
in [0.._n_args
.length
[ do
8016 if _n_args
[i
] == old_child
then
8017 if new_child
!= null then
8018 assert new_child
isa AExpr
8019 _n_args
[i
] = new_child
8020 new_child
.parent
= self
8022 _n_args
.remove_at
(i
)
8027 for i
in [0.._n_closure_defs
.length
[ do
8028 if _n_closure_defs
[i
] == old_child
then
8029 if new_child
!= null then
8030 assert new_child
isa AClosureDef
8031 _n_closure_defs
[i
] = new_child
8032 new_child
.parent
= self
8034 _n_closure_defs
.remove_at
(i
)
8041 redef fun visit_all
(v
: Visitor)
8043 v
.enter_visit
(_n_id
)
8047 for n
in _n_closure_defs
do
8052 redef fun visit_all_reverse
(v
: Visitor)
8054 v
.enter_visit
(_n_id
)
8056 var i
= _n_args
.length
8058 v
.enter_visit
(_n_args
[i
])
8063 var i
= _n_closure_defs
.length
8065 v
.enter_visit
(_n_closure_defs
[i
])
8071 redef class AVarExpr
8078 private init empty_init
do end
8080 init init_avarexpr
(
8085 _n_id
= n_id
.as(not null)
8089 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8091 if _n_id
== old_child
then
8092 if new_child
!= null then
8093 new_child
.parent
= self
8094 assert new_child
isa TId
8103 redef fun visit_all
(v
: Visitor)
8105 v
.enter_visit
(_n_id
)
8108 redef fun visit_all_reverse
(v
: Visitor)
8110 v
.enter_visit
(_n_id
)
8113 redef class AVarAssignExpr
8119 redef fun n_assign
=(n
)
8124 redef fun n_value
=(n
)
8130 private init empty_init
do end
8132 init init_avarassignexpr
(
8134 n_assign
: nullable TAssign,
8135 n_value
: nullable AExpr
8139 _n_id
= n_id
.as(not null)
8141 _n_assign
= n_assign
.as(not null)
8142 n_assign
.parent
= self
8143 _n_value
= n_value
.as(not null)
8144 n_value
.parent
= self
8147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8149 if _n_id
== old_child
then
8150 if new_child
!= null then
8151 new_child
.parent
= self
8152 assert new_child
isa TId
8159 if _n_assign
== old_child
then
8160 if new_child
!= null then
8161 new_child
.parent
= self
8162 assert new_child
isa TAssign
8163 _n_assign
= new_child
8169 if _n_value
== old_child
then
8170 if new_child
!= null then
8171 new_child
.parent
= self
8172 assert new_child
isa AExpr
8173 _n_value
= new_child
8181 redef fun visit_all
(v
: Visitor)
8183 v
.enter_visit
(_n_id
)
8184 v
.enter_visit
(_n_assign
)
8185 v
.enter_visit
(_n_value
)
8188 redef fun visit_all_reverse
(v
: Visitor)
8190 v
.enter_visit
(_n_id
)
8191 v
.enter_visit
(_n_assign
)
8192 v
.enter_visit
(_n_value
)
8195 redef class AVarReassignExpr
8201 redef fun n_assign_op
=(n
)
8206 redef fun n_value
=(n
)
8212 private init empty_init
do end
8214 init init_avarreassignexpr
(
8216 n_assign_op
: nullable AAssignOp,
8217 n_value
: nullable AExpr
8221 _n_id
= n_id
.as(not null)
8223 _n_assign_op
= n_assign_op
.as(not null)
8224 n_assign_op
.parent
= self
8225 _n_value
= n_value
.as(not null)
8226 n_value
.parent
= self
8229 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8231 if _n_id
== old_child
then
8232 if new_child
!= null then
8233 new_child
.parent
= self
8234 assert new_child
isa TId
8241 if _n_assign_op
== old_child
then
8242 if new_child
!= null then
8243 new_child
.parent
= self
8244 assert new_child
isa AAssignOp
8245 _n_assign_op
= new_child
8251 if _n_value
== old_child
then
8252 if new_child
!= null then
8253 new_child
.parent
= self
8254 assert new_child
isa AExpr
8255 _n_value
= new_child
8263 redef fun visit_all
(v
: Visitor)
8265 v
.enter_visit
(_n_id
)
8266 v
.enter_visit
(_n_assign_op
)
8267 v
.enter_visit
(_n_value
)
8270 redef fun visit_all_reverse
(v
: Visitor)
8272 v
.enter_visit
(_n_id
)
8273 v
.enter_visit
(_n_assign_op
)
8274 v
.enter_visit
(_n_value
)
8277 redef class ARangeExpr
8278 redef fun n_expr
=(n
)
8283 redef fun n_expr2
=(n
)
8289 private init empty_init
do end
8291 init init_arangeexpr
(
8292 n_expr
: nullable AExpr,
8293 n_expr2
: nullable AExpr
8297 _n_expr
= n_expr
.as(not null)
8298 n_expr
.parent
= self
8299 _n_expr2
= n_expr2
.as(not null)
8300 n_expr2
.parent
= self
8303 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8305 if _n_expr
== old_child
then
8306 if new_child
!= null then
8307 new_child
.parent
= self
8308 assert new_child
isa AExpr
8315 if _n_expr2
== old_child
then
8316 if new_child
!= null then
8317 new_child
.parent
= self
8318 assert new_child
isa AExpr
8319 _n_expr2
= new_child
8327 redef fun visit_all
(v
: Visitor)
8329 v
.enter_visit
(_n_expr
)
8330 v
.enter_visit
(_n_expr2
)
8333 redef fun visit_all_reverse
(v
: Visitor)
8335 v
.enter_visit
(_n_expr
)
8336 v
.enter_visit
(_n_expr2
)
8339 redef class ACrangeExpr
8340 redef fun n_expr
=(n
)
8345 redef fun n_expr2
=(n
)
8351 private init empty_init
do end
8353 init init_acrangeexpr
(
8354 n_expr
: nullable AExpr,
8355 n_expr2
: nullable AExpr
8359 _n_expr
= n_expr
.as(not null)
8360 n_expr
.parent
= self
8361 _n_expr2
= n_expr2
.as(not null)
8362 n_expr2
.parent
= self
8365 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8367 if _n_expr
== old_child
then
8368 if new_child
!= null then
8369 new_child
.parent
= self
8370 assert new_child
isa AExpr
8377 if _n_expr2
== old_child
then
8378 if new_child
!= null then
8379 new_child
.parent
= self
8380 assert new_child
isa AExpr
8381 _n_expr2
= new_child
8389 redef fun visit_all
(v
: Visitor)
8391 v
.enter_visit
(_n_expr
)
8392 v
.enter_visit
(_n_expr2
)
8395 redef fun visit_all_reverse
(v
: Visitor)
8397 v
.enter_visit
(_n_expr
)
8398 v
.enter_visit
(_n_expr2
)
8401 redef class AOrangeExpr
8402 redef fun n_expr
=(n
)
8407 redef fun n_expr2
=(n
)
8413 private init empty_init
do end
8415 init init_aorangeexpr
(
8416 n_expr
: nullable AExpr,
8417 n_expr2
: nullable AExpr
8421 _n_expr
= n_expr
.as(not null)
8422 n_expr
.parent
= self
8423 _n_expr2
= n_expr2
.as(not null)
8424 n_expr2
.parent
= self
8427 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8429 if _n_expr
== old_child
then
8430 if new_child
!= null then
8431 new_child
.parent
= self
8432 assert new_child
isa AExpr
8439 if _n_expr2
== old_child
then
8440 if new_child
!= null then
8441 new_child
.parent
= self
8442 assert new_child
isa AExpr
8443 _n_expr2
= new_child
8451 redef fun visit_all
(v
: Visitor)
8453 v
.enter_visit
(_n_expr
)
8454 v
.enter_visit
(_n_expr2
)
8457 redef fun visit_all_reverse
(v
: Visitor)
8459 v
.enter_visit
(_n_expr
)
8460 v
.enter_visit
(_n_expr2
)
8463 redef class AArrayExpr
8465 private init empty_init
do end
8467 init init_aarrayexpr
(
8468 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8479 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8481 for i
in [0.._n_exprs
.length
[ do
8482 if _n_exprs
[i
] == old_child
then
8483 if new_child
!= null then
8484 assert new_child
isa AExpr
8485 _n_exprs
[i
] = new_child
8486 new_child
.parent
= self
8488 _n_exprs
.remove_at
(i
)
8495 redef fun visit_all
(v
: Visitor)
8497 for n
in _n_exprs
do
8502 redef fun visit_all_reverse
(v
: Visitor)
8505 var i
= _n_exprs
.length
8507 v
.enter_visit
(_n_exprs
[i
])
8513 redef class ASelfExpr
8514 redef fun n_kwself
=(n
)
8520 private init empty_init
do end
8522 init init_aselfexpr
(
8523 n_kwself
: nullable TKwself
8527 _n_kwself
= n_kwself
.as(not null)
8528 n_kwself
.parent
= self
8531 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8533 if _n_kwself
== old_child
then
8534 if new_child
!= null then
8535 new_child
.parent
= self
8536 assert new_child
isa TKwself
8537 _n_kwself
= new_child
8545 redef fun visit_all
(v
: Visitor)
8547 v
.enter_visit
(_n_kwself
)
8550 redef fun visit_all_reverse
(v
: Visitor)
8552 v
.enter_visit
(_n_kwself
)
8555 redef class AImplicitSelfExpr
8557 private init empty_init
do end
8559 init init_aimplicitselfexpr
8564 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8568 redef fun visit_all
(v
: Visitor)
8572 redef fun visit_all_reverse
(v
: Visitor)
8576 redef class ATrueExpr
8577 redef fun n_kwtrue
=(n
)
8583 private init empty_init
do end
8585 init init_atrueexpr
(
8586 n_kwtrue
: nullable TKwtrue
8590 _n_kwtrue
= n_kwtrue
.as(not null)
8591 n_kwtrue
.parent
= self
8594 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8596 if _n_kwtrue
== old_child
then
8597 if new_child
!= null then
8598 new_child
.parent
= self
8599 assert new_child
isa TKwtrue
8600 _n_kwtrue
= new_child
8608 redef fun visit_all
(v
: Visitor)
8610 v
.enter_visit
(_n_kwtrue
)
8613 redef fun visit_all_reverse
(v
: Visitor)
8615 v
.enter_visit
(_n_kwtrue
)
8618 redef class AFalseExpr
8619 redef fun n_kwfalse
=(n
)
8625 private init empty_init
do end
8627 init init_afalseexpr
(
8628 n_kwfalse
: nullable TKwfalse
8632 _n_kwfalse
= n_kwfalse
.as(not null)
8633 n_kwfalse
.parent
= self
8636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8638 if _n_kwfalse
== old_child
then
8639 if new_child
!= null then
8640 new_child
.parent
= self
8641 assert new_child
isa TKwfalse
8642 _n_kwfalse
= new_child
8650 redef fun visit_all
(v
: Visitor)
8652 v
.enter_visit
(_n_kwfalse
)
8655 redef fun visit_all_reverse
(v
: Visitor)
8657 v
.enter_visit
(_n_kwfalse
)
8660 redef class ANullExpr
8661 redef fun n_kwnull
=(n
)
8667 private init empty_init
do end
8669 init init_anullexpr
(
8670 n_kwnull
: nullable TKwnull
8674 _n_kwnull
= n_kwnull
.as(not null)
8675 n_kwnull
.parent
= self
8678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8680 if _n_kwnull
== old_child
then
8681 if new_child
!= null then
8682 new_child
.parent
= self
8683 assert new_child
isa TKwnull
8684 _n_kwnull
= new_child
8692 redef fun visit_all
(v
: Visitor)
8694 v
.enter_visit
(_n_kwnull
)
8697 redef fun visit_all_reverse
(v
: Visitor)
8699 v
.enter_visit
(_n_kwnull
)
8702 redef class AIntExpr
8703 redef fun n_number
=(n
)
8709 private init empty_init
do end
8711 init init_aintexpr
(
8712 n_number
: nullable TNumber
8716 _n_number
= n_number
.as(not null)
8717 n_number
.parent
= self
8720 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8722 if _n_number
== old_child
then
8723 if new_child
!= null then
8724 new_child
.parent
= self
8725 assert new_child
isa TNumber
8726 _n_number
= new_child
8734 redef fun visit_all
(v
: Visitor)
8736 v
.enter_visit
(_n_number
)
8739 redef fun visit_all_reverse
(v
: Visitor)
8741 v
.enter_visit
(_n_number
)
8744 redef class AFloatExpr
8745 redef fun n_float
=(n
)
8751 private init empty_init
do end
8753 init init_afloatexpr
(
8754 n_float
: nullable TFloat
8758 _n_float
= n_float
.as(not null)
8759 n_float
.parent
= self
8762 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8764 if _n_float
== old_child
then
8765 if new_child
!= null then
8766 new_child
.parent
= self
8767 assert new_child
isa TFloat
8768 _n_float
= new_child
8776 redef fun visit_all
(v
: Visitor)
8778 v
.enter_visit
(_n_float
)
8781 redef fun visit_all_reverse
(v
: Visitor)
8783 v
.enter_visit
(_n_float
)
8786 redef class ACharExpr
8787 redef fun n_char
=(n
)
8793 private init empty_init
do end
8795 init init_acharexpr
(
8796 n_char
: nullable TChar
8800 _n_char
= n_char
.as(not null)
8801 n_char
.parent
= self
8804 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8806 if _n_char
== old_child
then
8807 if new_child
!= null then
8808 new_child
.parent
= self
8809 assert new_child
isa TChar
8818 redef fun visit_all
(v
: Visitor)
8820 v
.enter_visit
(_n_char
)
8823 redef fun visit_all_reverse
(v
: Visitor)
8825 v
.enter_visit
(_n_char
)
8828 redef class AStringExpr
8829 redef fun n_string
=(n
)
8835 private init empty_init
do end
8837 init init_astringexpr
(
8838 n_string
: nullable TString
8842 _n_string
= n_string
.as(not null)
8843 n_string
.parent
= self
8846 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8848 if _n_string
== old_child
then
8849 if new_child
!= null then
8850 new_child
.parent
= self
8851 assert new_child
isa TString
8852 _n_string
= new_child
8860 redef fun visit_all
(v
: Visitor)
8862 v
.enter_visit
(_n_string
)
8865 redef fun visit_all_reverse
(v
: Visitor)
8867 v
.enter_visit
(_n_string
)
8870 redef class AStartStringExpr
8871 redef fun n_string
=(n
)
8877 private init empty_init
do end
8879 init init_astartstringexpr
(
8880 n_string
: nullable TStartString
8884 _n_string
= n_string
.as(not null)
8885 n_string
.parent
= self
8888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8890 if _n_string
== old_child
then
8891 if new_child
!= null then
8892 new_child
.parent
= self
8893 assert new_child
isa TStartString
8894 _n_string
= new_child
8902 redef fun visit_all
(v
: Visitor)
8904 v
.enter_visit
(_n_string
)
8907 redef fun visit_all_reverse
(v
: Visitor)
8909 v
.enter_visit
(_n_string
)
8912 redef class AMidStringExpr
8913 redef fun n_string
=(n
)
8919 private init empty_init
do end
8921 init init_amidstringexpr
(
8922 n_string
: nullable TMidString
8926 _n_string
= n_string
.as(not null)
8927 n_string
.parent
= self
8930 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8932 if _n_string
== old_child
then
8933 if new_child
!= null then
8934 new_child
.parent
= self
8935 assert new_child
isa TMidString
8936 _n_string
= new_child
8944 redef fun visit_all
(v
: Visitor)
8946 v
.enter_visit
(_n_string
)
8949 redef fun visit_all_reverse
(v
: Visitor)
8951 v
.enter_visit
(_n_string
)
8954 redef class AEndStringExpr
8955 redef fun n_string
=(n
)
8961 private init empty_init
do end
8963 init init_aendstringexpr
(
8964 n_string
: nullable TEndString
8968 _n_string
= n_string
.as(not null)
8969 n_string
.parent
= self
8972 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8974 if _n_string
== old_child
then
8975 if new_child
!= null then
8976 new_child
.parent
= self
8977 assert new_child
isa TEndString
8978 _n_string
= new_child
8986 redef fun visit_all
(v
: Visitor)
8988 v
.enter_visit
(_n_string
)
8991 redef fun visit_all_reverse
(v
: Visitor)
8993 v
.enter_visit
(_n_string
)
8996 redef class ASuperstringExpr
8998 private init empty_init
do end
9000 init init_asuperstringexpr
(
9001 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9012 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9014 for i
in [0.._n_exprs
.length
[ do
9015 if _n_exprs
[i
] == old_child
then
9016 if new_child
!= null then
9017 assert new_child
isa AExpr
9018 _n_exprs
[i
] = new_child
9019 new_child
.parent
= self
9021 _n_exprs
.remove_at
(i
)
9028 redef fun visit_all
(v
: Visitor)
9030 for n
in _n_exprs
do
9035 redef fun visit_all_reverse
(v
: Visitor)
9038 var i
= _n_exprs
.length
9040 v
.enter_visit
(_n_exprs
[i
])
9046 redef class AParExpr
9047 redef fun n_expr
=(n
)
9053 private init empty_init
do end
9055 init init_aparexpr
(
9056 n_expr
: nullable AExpr
9060 _n_expr
= n_expr
.as(not null)
9061 n_expr
.parent
= self
9064 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9066 if _n_expr
== old_child
then
9067 if new_child
!= null then
9068 new_child
.parent
= self
9069 assert new_child
isa AExpr
9078 redef fun visit_all
(v
: Visitor)
9080 v
.enter_visit
(_n_expr
)
9083 redef fun visit_all_reverse
(v
: Visitor)
9085 v
.enter_visit
(_n_expr
)
9088 redef class AAsCastExpr
9089 redef fun n_expr
=(n
)
9094 redef fun n_kwas
=(n
)
9099 redef fun n_type
=(n
)
9105 private init empty_init
do end
9107 init init_aascastexpr
(
9108 n_expr
: nullable AExpr,
9109 n_kwas
: nullable TKwas,
9110 n_type
: nullable AType
9114 _n_expr
= n_expr
.as(not null)
9115 n_expr
.parent
= self
9116 _n_kwas
= n_kwas
.as(not null)
9117 n_kwas
.parent
= self
9118 _n_type
= n_type
.as(not null)
9119 n_type
.parent
= self
9122 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9124 if _n_expr
== old_child
then
9125 if new_child
!= null then
9126 new_child
.parent
= self
9127 assert new_child
isa AExpr
9134 if _n_kwas
== old_child
then
9135 if new_child
!= null then
9136 new_child
.parent
= self
9137 assert new_child
isa TKwas
9144 if _n_type
== old_child
then
9145 if new_child
!= null then
9146 new_child
.parent
= self
9147 assert new_child
isa AType
9156 redef fun visit_all
(v
: Visitor)
9158 v
.enter_visit
(_n_expr
)
9159 v
.enter_visit
(_n_kwas
)
9160 v
.enter_visit
(_n_type
)
9163 redef fun visit_all_reverse
(v
: Visitor)
9165 v
.enter_visit
(_n_expr
)
9166 v
.enter_visit
(_n_kwas
)
9167 v
.enter_visit
(_n_type
)
9170 redef class AAsNotnullExpr
9171 redef fun n_expr
=(n
)
9176 redef fun n_kwas
=(n
)
9181 redef fun n_kwnot
=(n
)
9186 redef fun n_kwnull
=(n
)
9192 private init empty_init
do end
9194 init init_aasnotnullexpr
(
9195 n_expr
: nullable AExpr,
9196 n_kwas
: nullable TKwas,
9197 n_kwnot
: nullable TKwnot,
9198 n_kwnull
: nullable TKwnull
9202 _n_expr
= n_expr
.as(not null)
9203 n_expr
.parent
= self
9204 _n_kwas
= n_kwas
.as(not null)
9205 n_kwas
.parent
= self
9206 _n_kwnot
= n_kwnot
.as(not null)
9207 n_kwnot
.parent
= self
9208 _n_kwnull
= n_kwnull
.as(not null)
9209 n_kwnull
.parent
= self
9212 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9214 if _n_expr
== old_child
then
9215 if new_child
!= null then
9216 new_child
.parent
= self
9217 assert new_child
isa AExpr
9224 if _n_kwas
== old_child
then
9225 if new_child
!= null then
9226 new_child
.parent
= self
9227 assert new_child
isa TKwas
9234 if _n_kwnot
== old_child
then
9235 if new_child
!= null then
9236 new_child
.parent
= self
9237 assert new_child
isa TKwnot
9238 _n_kwnot
= new_child
9244 if _n_kwnull
== old_child
then
9245 if new_child
!= null then
9246 new_child
.parent
= self
9247 assert new_child
isa TKwnull
9248 _n_kwnull
= new_child
9256 redef fun visit_all
(v
: Visitor)
9258 v
.enter_visit
(_n_expr
)
9259 v
.enter_visit
(_n_kwas
)
9260 v
.enter_visit
(_n_kwnot
)
9261 v
.enter_visit
(_n_kwnull
)
9264 redef fun visit_all_reverse
(v
: Visitor)
9266 v
.enter_visit
(_n_expr
)
9267 v
.enter_visit
(_n_kwas
)
9268 v
.enter_visit
(_n_kwnot
)
9269 v
.enter_visit
(_n_kwnull
)
9272 redef class AIssetAttrExpr
9273 redef fun n_kwisset
=(n
)
9278 redef fun n_expr
=(n
)
9289 private init empty_init
do end
9291 init init_aissetattrexpr
(
9292 n_kwisset
: nullable TKwisset,
9293 n_expr
: nullable AExpr,
9294 n_id
: nullable TAttrid
9298 _n_kwisset
= n_kwisset
.as(not null)
9299 n_kwisset
.parent
= self
9300 _n_expr
= n_expr
.as(not null)
9301 n_expr
.parent
= self
9302 _n_id
= n_id
.as(not null)
9306 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9308 if _n_kwisset
== old_child
then
9309 if new_child
!= null then
9310 new_child
.parent
= self
9311 assert new_child
isa TKwisset
9312 _n_kwisset
= new_child
9318 if _n_expr
== old_child
then
9319 if new_child
!= null then
9320 new_child
.parent
= self
9321 assert new_child
isa AExpr
9328 if _n_id
== old_child
then
9329 if new_child
!= null then
9330 new_child
.parent
= self
9331 assert new_child
isa TAttrid
9340 redef fun visit_all
(v
: Visitor)
9342 v
.enter_visit
(_n_kwisset
)
9343 v
.enter_visit
(_n_expr
)
9344 v
.enter_visit
(_n_id
)
9347 redef fun visit_all_reverse
(v
: Visitor)
9349 v
.enter_visit
(_n_kwisset
)
9350 v
.enter_visit
(_n_expr
)
9351 v
.enter_visit
(_n_id
)
9354 redef class APlusAssignOp
9355 redef fun n_pluseq
=(n
)
9361 private init empty_init
do end
9363 init init_aplusassignop
(
9364 n_pluseq
: nullable TPluseq
9368 _n_pluseq
= n_pluseq
.as(not null)
9369 n_pluseq
.parent
= self
9372 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9374 if _n_pluseq
== old_child
then
9375 if new_child
!= null then
9376 new_child
.parent
= self
9377 assert new_child
isa TPluseq
9378 _n_pluseq
= new_child
9386 redef fun visit_all
(v
: Visitor)
9388 v
.enter_visit
(_n_pluseq
)
9391 redef fun visit_all_reverse
(v
: Visitor)
9393 v
.enter_visit
(_n_pluseq
)
9396 redef class AMinusAssignOp
9397 redef fun n_minuseq
=(n
)
9403 private init empty_init
do end
9405 init init_aminusassignop
(
9406 n_minuseq
: nullable TMinuseq
9410 _n_minuseq
= n_minuseq
.as(not null)
9411 n_minuseq
.parent
= self
9414 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9416 if _n_minuseq
== old_child
then
9417 if new_child
!= null then
9418 new_child
.parent
= self
9419 assert new_child
isa TMinuseq
9420 _n_minuseq
= new_child
9428 redef fun visit_all
(v
: Visitor)
9430 v
.enter_visit
(_n_minuseq
)
9433 redef fun visit_all_reverse
(v
: Visitor)
9435 v
.enter_visit
(_n_minuseq
)
9438 redef class AClosureDef
9439 redef fun n_kwwith
=(n
)
9444 redef fun n_kwdo
=(n
)
9449 redef fun n_expr
=(n
)
9456 redef fun n_label
=(n
)
9464 private init empty_init
do end
9466 init init_aclosuredef
(
9467 n_kwwith
: nullable TKwwith,
9468 n_id
: Collection[Object], # Should be Collection[TId]
9469 n_kwdo
: nullable TKwdo,
9470 n_expr
: nullable AExpr,
9471 n_label
: nullable ALabel
9475 _n_kwwith
= n_kwwith
.as(not null)
9476 n_kwwith
.parent
= self
9482 _n_kwdo
= n_kwdo
.as(not null)
9483 n_kwdo
.parent
= self
9485 if n_expr
!= null then
9486 n_expr
.parent
= self
9489 if n_label
!= null then
9490 n_label
.parent
= self
9494 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9496 if _n_kwwith
== old_child
then
9497 if new_child
!= null then
9498 new_child
.parent
= self
9499 assert new_child
isa TKwwith
9500 _n_kwwith
= new_child
9506 for i
in [0.._n_id
.length
[ do
9507 if _n_id
[i
] == old_child
then
9508 if new_child
!= null then
9509 assert new_child
isa TId
9510 _n_id
[i
] = new_child
9511 new_child
.parent
= self
9518 if _n_kwdo
== old_child
then
9519 if new_child
!= null then
9520 new_child
.parent
= self
9521 assert new_child
isa TKwdo
9528 if _n_expr
== old_child
then
9529 if new_child
!= null then
9530 new_child
.parent
= self
9531 assert new_child
isa AExpr
9538 if _n_label
== old_child
then
9539 if new_child
!= null then
9540 new_child
.parent
= self
9541 assert new_child
isa ALabel
9542 _n_label
= new_child
9550 redef fun visit_all
(v
: Visitor)
9552 v
.enter_visit
(_n_kwwith
)
9556 v
.enter_visit
(_n_kwdo
)
9557 if _n_expr
!= null then
9558 v
.enter_visit
(_n_expr
.as(not null))
9560 if _n_label
!= null then
9561 v
.enter_visit
(_n_label
.as(not null))
9565 redef fun visit_all_reverse
(v
: Visitor)
9567 v
.enter_visit
(_n_kwwith
)
9569 var i
= _n_id
.length
9571 v
.enter_visit
(_n_id
[i
])
9575 v
.enter_visit
(_n_kwdo
)
9576 if _n_expr
!= null then
9577 v
.enter_visit
(_n_expr
.as(not null))
9579 if _n_label
!= null then
9580 v
.enter_visit
(_n_label
.as(not null))
9584 redef class AQualified
9585 redef fun n_classid
=(n
)
9593 private init empty_init
do end
9595 init init_aqualified
(
9596 n_id
: Collection[Object], # Should be Collection[TId]
9597 n_classid
: nullable TClassid
9606 _n_classid
= n_classid
9607 if n_classid
!= null then
9608 n_classid
.parent
= self
9612 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9614 for i
in [0.._n_id
.length
[ do
9615 if _n_id
[i
] == old_child
then
9616 if new_child
!= null then
9617 assert new_child
isa TId
9618 _n_id
[i
] = new_child
9619 new_child
.parent
= self
9626 if _n_classid
== old_child
then
9627 if new_child
!= null then
9628 new_child
.parent
= self
9629 assert new_child
isa TClassid
9630 _n_classid
= new_child
9638 redef fun visit_all
(v
: Visitor)
9643 if _n_classid
!= null then
9644 v
.enter_visit
(_n_classid
.as(not null))
9648 redef fun visit_all_reverse
(v
: Visitor)
9651 var i
= _n_id
.length
9653 v
.enter_visit
(_n_id
[i
])
9657 if _n_classid
!= null then
9658 v
.enter_visit
(_n_classid
.as(not null))
9664 private init empty_init
do end
9667 n_comment
: Collection[Object] # Should be Collection[TComment]
9671 for n
in n_comment
do
9672 assert n
isa TComment
9678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9680 for i
in [0.._n_comment
.length
[ do
9681 if _n_comment
[i
] == old_child
then
9682 if new_child
!= null then
9683 assert new_child
isa TComment
9684 _n_comment
[i
] = new_child
9685 new_child
.parent
= self
9687 _n_comment
.remove_at
(i
)
9694 redef fun visit_all
(v
: Visitor)
9696 for n
in _n_comment
do
9701 redef fun visit_all_reverse
(v
: Visitor)
9704 var i
= _n_comment
.length
9706 v
.enter_visit
(_n_comment
[i
])
9715 n_base
: nullable AModule,
9722 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9724 if _n_base
== old_child
then
9725 if new_child
== null then
9727 new_child
.parent
= self
9728 assert new_child
isa AModule
9731 old_child
.parent
= null
9736 redef fun visit_all
(v
: Visitor)
9738 if _n_base
!= null then
9739 v
.enter_visit
(_n_base
.as(not null))
9741 v
.enter_visit
(_n_eof
)
9744 redef fun visit_all_reverse
(v
: Visitor)
9746 v
.enter_visit
(_n_eof
)
9747 if _n_base
!= null then
9748 v
.enter_visit
(_n_base
.as(not null))