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 redef fun replace_with
(n
: ANode)
53 # Abstract standard visitor
55 # What the visitor do when a node is visited
56 # Concrete visitors should redefine this method.
57 protected fun visit
(e
: nullable ANode) is abstract
59 # Ask the visitor to visit a given node.
60 # Usually automatically called by visit_all* methods.
61 # This methos should not be redefined
62 fun enter_visit
(e
: nullable ANode)
64 var old
= _current_node
70 # The current visited node
71 readable var _current_node
: nullable ANode = null
75 redef fun n_packagedecl
=(n
)
83 private init empty_init
do end
86 n_packagedecl
: nullable APackagedecl,
87 n_imports
: Collection[Object], # Should be Collection[AImport]
88 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
92 _n_packagedecl
= n_packagedecl
93 if n_packagedecl
!= null then
94 n_packagedecl
.parent
= self
101 for n
in n_classdefs
do
102 assert n
isa AClassdef
108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
110 if _n_packagedecl
== old_child
then
111 if new_child
!= null then
112 new_child
.parent
= self
113 assert new_child
isa APackagedecl
114 _n_packagedecl
= new_child
116 _n_packagedecl
= null
120 for i
in [0.._n_imports
.length
[ do
121 if _n_imports
[i
] == old_child
then
122 if new_child
!= null then
123 assert new_child
isa AImport
124 _n_imports
[i
] = new_child
125 new_child
.parent
= self
127 _n_imports
.remove_at
(i
)
132 for i
in [0.._n_classdefs
.length
[ do
133 if _n_classdefs
[i
] == old_child
then
134 if new_child
!= null then
135 assert new_child
isa AClassdef
136 _n_classdefs
[i
] = new_child
137 new_child
.parent
= self
139 _n_classdefs
.remove_at
(i
)
146 redef fun visit_all
(v
: Visitor)
148 if _n_packagedecl
!= null then
149 v
.enter_visit
(_n_packagedecl
.as(not null))
151 for n
in _n_imports
do
154 for n
in _n_classdefs
do
159 redef fun visit_all_reverse
(v
: Visitor)
161 if _n_packagedecl
!= null then
162 v
.enter_visit
(_n_packagedecl
.as(not null))
165 var i
= _n_imports
.length
167 v
.enter_visit
(_n_imports
[i
])
172 var i
= _n_classdefs
.length
174 v
.enter_visit
(_n_classdefs
[i
])
180 redef class APackagedecl
188 redef fun n_kwpackage
=(n
)
199 private init empty_init
do end
201 init init_apackagedecl
(
202 n_doc
: nullable ADoc,
203 n_kwpackage
: nullable TKwpackage,
209 if n_doc
!= null then
212 _n_kwpackage
= n_kwpackage
.as(not null)
213 n_kwpackage
.parent
= self
214 _n_id
= n_id
.as(not null)
218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
220 if _n_doc
== old_child
then
221 if new_child
!= null then
222 new_child
.parent
= self
223 assert new_child
isa ADoc
230 if _n_kwpackage
== old_child
then
231 if new_child
!= null then
232 new_child
.parent
= self
233 assert new_child
isa TKwpackage
234 _n_kwpackage
= new_child
240 if _n_id
== old_child
then
241 if new_child
!= null then
242 new_child
.parent
= self
243 assert new_child
isa TId
252 redef fun visit_all
(v
: Visitor)
254 if _n_doc
!= null then
255 v
.enter_visit
(_n_doc
.as(not null))
257 v
.enter_visit
(_n_kwpackage
)
261 redef fun visit_all_reverse
(v
: Visitor)
263 if _n_doc
!= null then
264 v
.enter_visit
(_n_doc
.as(not null))
266 v
.enter_visit
(_n_kwpackage
)
270 redef class AStdImport
271 redef fun n_visibility
=(n
)
276 redef fun n_kwimport
=(n
)
287 private init empty_init
do end
289 init init_astdimport
(
290 n_visibility
: nullable AVisibility,
291 n_kwimport
: nullable TKwimport,
296 _n_visibility
= n_visibility
.as(not null)
297 n_visibility
.parent
= self
298 _n_kwimport
= n_kwimport
.as(not null)
299 n_kwimport
.parent
= self
300 _n_id
= n_id
.as(not null)
304 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
306 if _n_visibility
== old_child
then
307 if new_child
!= null then
308 new_child
.parent
= self
309 assert new_child
isa AVisibility
310 _n_visibility
= new_child
316 if _n_kwimport
== old_child
then
317 if new_child
!= null then
318 new_child
.parent
= self
319 assert new_child
isa TKwimport
320 _n_kwimport
= new_child
326 if _n_id
== old_child
then
327 if new_child
!= null then
328 new_child
.parent
= self
329 assert new_child
isa TId
338 redef fun visit_all
(v
: Visitor)
340 v
.enter_visit
(_n_visibility
)
341 v
.enter_visit
(_n_kwimport
)
345 redef fun visit_all_reverse
(v
: Visitor)
347 v
.enter_visit
(_n_visibility
)
348 v
.enter_visit
(_n_kwimport
)
352 redef class ANoImport
353 redef fun n_visibility
=(n
)
358 redef fun n_kwimport
=(n
)
363 redef fun n_kwend
=(n
)
369 private init empty_init
do end
371 init init_anoimport
(
372 n_visibility
: nullable AVisibility,
373 n_kwimport
: nullable TKwimport,
374 n_kwend
: nullable TKwend
378 _n_visibility
= n_visibility
.as(not null)
379 n_visibility
.parent
= self
380 _n_kwimport
= n_kwimport
.as(not null)
381 n_kwimport
.parent
= self
382 _n_kwend
= n_kwend
.as(not null)
383 n_kwend
.parent
= self
386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
388 if _n_visibility
== old_child
then
389 if new_child
!= null then
390 new_child
.parent
= self
391 assert new_child
isa AVisibility
392 _n_visibility
= new_child
398 if _n_kwimport
== old_child
then
399 if new_child
!= null then
400 new_child
.parent
= self
401 assert new_child
isa TKwimport
402 _n_kwimport
= new_child
408 if _n_kwend
== old_child
then
409 if new_child
!= null then
410 new_child
.parent
= self
411 assert new_child
isa TKwend
420 redef fun visit_all
(v
: Visitor)
422 v
.enter_visit
(_n_visibility
)
423 v
.enter_visit
(_n_kwimport
)
424 v
.enter_visit
(_n_kwend
)
427 redef fun visit_all_reverse
(v
: Visitor)
429 v
.enter_visit
(_n_visibility
)
430 v
.enter_visit
(_n_kwimport
)
431 v
.enter_visit
(_n_kwend
)
434 redef class APublicVisibility
436 private init empty_init
do end
438 init init_apublicvisibility
443 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
447 redef fun visit_all
(v
: Visitor)
451 redef fun visit_all_reverse
(v
: Visitor)
455 redef class APrivateVisibility
456 redef fun n_kwprivate
=(n
)
462 private init empty_init
do end
464 init init_aprivatevisibility
(
465 n_kwprivate
: nullable TKwprivate
469 _n_kwprivate
= n_kwprivate
.as(not null)
470 n_kwprivate
.parent
= self
473 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
475 if _n_kwprivate
== old_child
then
476 if new_child
!= null then
477 new_child
.parent
= self
478 assert new_child
isa TKwprivate
479 _n_kwprivate
= new_child
487 redef fun visit_all
(v
: Visitor)
489 v
.enter_visit
(_n_kwprivate
)
492 redef fun visit_all_reverse
(v
: Visitor)
494 v
.enter_visit
(_n_kwprivate
)
497 redef class AProtectedVisibility
498 redef fun n_kwprotected
=(n
)
504 private init empty_init
do end
506 init init_aprotectedvisibility
(
507 n_kwprotected
: nullable TKwprotected
511 _n_kwprotected
= n_kwprotected
.as(not null)
512 n_kwprotected
.parent
= self
515 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
517 if _n_kwprotected
== old_child
then
518 if new_child
!= null then
519 new_child
.parent
= self
520 assert new_child
isa TKwprotected
521 _n_kwprotected
= new_child
529 redef fun visit_all
(v
: Visitor)
531 v
.enter_visit
(_n_kwprotected
)
534 redef fun visit_all_reverse
(v
: Visitor)
536 v
.enter_visit
(_n_kwprotected
)
539 redef class AIntrudeVisibility
540 redef fun n_kwintrude
=(n
)
546 private init empty_init
do end
548 init init_aintrudevisibility
(
549 n_kwintrude
: nullable TKwintrude
553 _n_kwintrude
= n_kwintrude
.as(not null)
554 n_kwintrude
.parent
= self
557 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
559 if _n_kwintrude
== old_child
then
560 if new_child
!= null then
561 new_child
.parent
= self
562 assert new_child
isa TKwintrude
563 _n_kwintrude
= new_child
571 redef fun visit_all
(v
: Visitor)
573 v
.enter_visit
(_n_kwintrude
)
576 redef fun visit_all_reverse
(v
: Visitor)
578 v
.enter_visit
(_n_kwintrude
)
581 redef class AStdClassdef
589 redef fun n_kwredef
=(n
)
596 redef fun n_visibility
=(n
)
601 redef fun n_classkind
=(n
)
614 private init empty_init
do end
616 init init_astdclassdef
(
617 n_doc
: nullable ADoc,
618 n_kwredef
: nullable TKwredef,
619 n_visibility
: nullable AVisibility,
620 n_classkind
: nullable AClasskind,
621 n_id
: nullable TClassid,
622 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
623 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
624 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
629 if n_doc
!= null then
632 _n_kwredef
= n_kwredef
633 if n_kwredef
!= null then
634 n_kwredef
.parent
= self
636 _n_visibility
= n_visibility
.as(not null)
637 n_visibility
.parent
= self
638 _n_classkind
= n_classkind
.as(not null)
639 n_classkind
.parent
= self
644 for n
in n_formaldefs
do
645 assert n
isa AFormaldef
649 for n
in n_superclasses
do
650 assert n
isa ASuperclass
651 _n_superclasses
.add
(n
)
654 for n
in n_propdefs
do
655 assert n
isa APropdef
661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
663 if _n_doc
== old_child
then
664 if new_child
!= null then
665 new_child
.parent
= self
666 assert new_child
isa ADoc
673 if _n_kwredef
== old_child
then
674 if new_child
!= null then
675 new_child
.parent
= self
676 assert new_child
isa TKwredef
677 _n_kwredef
= new_child
683 if _n_visibility
== old_child
then
684 if new_child
!= null then
685 new_child
.parent
= self
686 assert new_child
isa AVisibility
687 _n_visibility
= new_child
693 if _n_classkind
== old_child
then
694 if new_child
!= null then
695 new_child
.parent
= self
696 assert new_child
isa AClasskind
697 _n_classkind
= new_child
703 if _n_id
== old_child
then
704 if new_child
!= null then
705 new_child
.parent
= self
706 assert new_child
isa TClassid
713 for i
in [0.._n_formaldefs
.length
[ do
714 if _n_formaldefs
[i
] == old_child
then
715 if new_child
!= null then
716 assert new_child
isa AFormaldef
717 _n_formaldefs
[i
] = new_child
718 new_child
.parent
= self
720 _n_formaldefs
.remove_at
(i
)
725 for i
in [0.._n_superclasses
.length
[ do
726 if _n_superclasses
[i
] == old_child
then
727 if new_child
!= null then
728 assert new_child
isa ASuperclass
729 _n_superclasses
[i
] = new_child
730 new_child
.parent
= self
732 _n_superclasses
.remove_at
(i
)
737 for i
in [0.._n_propdefs
.length
[ do
738 if _n_propdefs
[i
] == old_child
then
739 if new_child
!= null then
740 assert new_child
isa APropdef
741 _n_propdefs
[i
] = new_child
742 new_child
.parent
= self
744 _n_propdefs
.remove_at
(i
)
751 redef fun visit_all
(v
: Visitor)
753 if _n_doc
!= null then
754 v
.enter_visit
(_n_doc
.as(not null))
756 if _n_kwredef
!= null then
757 v
.enter_visit
(_n_kwredef
.as(not null))
759 v
.enter_visit
(_n_visibility
)
760 v
.enter_visit
(_n_classkind
)
761 if _n_id
!= null then
762 v
.enter_visit
(_n_id
.as(not null))
764 for n
in _n_formaldefs
do
767 for n
in _n_superclasses
do
770 for n
in _n_propdefs
do
775 redef fun visit_all_reverse
(v
: Visitor)
777 if _n_doc
!= null then
778 v
.enter_visit
(_n_doc
.as(not null))
780 if _n_kwredef
!= null then
781 v
.enter_visit
(_n_kwredef
.as(not null))
783 v
.enter_visit
(_n_visibility
)
784 v
.enter_visit
(_n_classkind
)
785 if _n_id
!= null then
786 v
.enter_visit
(_n_id
.as(not null))
789 var i
= _n_formaldefs
.length
791 v
.enter_visit
(_n_formaldefs
[i
])
796 var i
= _n_superclasses
.length
798 v
.enter_visit
(_n_superclasses
[i
])
803 var i
= _n_propdefs
.length
805 v
.enter_visit
(_n_propdefs
[i
])
811 redef class ATopClassdef
813 private init empty_init
do end
815 init init_atopclassdef
(
816 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
820 for n
in n_propdefs
do
821 assert n
isa APropdef
827 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
829 for i
in [0.._n_propdefs
.length
[ do
830 if _n_propdefs
[i
] == old_child
then
831 if new_child
!= null then
832 assert new_child
isa APropdef
833 _n_propdefs
[i
] = new_child
834 new_child
.parent
= self
836 _n_propdefs
.remove_at
(i
)
843 redef fun visit_all
(v
: Visitor)
845 for n
in _n_propdefs
do
850 redef fun visit_all_reverse
(v
: Visitor)
853 var i
= _n_propdefs
.length
855 v
.enter_visit
(_n_propdefs
[i
])
861 redef class AMainClassdef
863 private init empty_init
do end
865 init init_amainclassdef
(
866 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
870 for n
in n_propdefs
do
871 assert n
isa APropdef
877 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
879 for i
in [0.._n_propdefs
.length
[ do
880 if _n_propdefs
[i
] == old_child
then
881 if new_child
!= null then
882 assert new_child
isa APropdef
883 _n_propdefs
[i
] = new_child
884 new_child
.parent
= self
886 _n_propdefs
.remove_at
(i
)
893 redef fun visit_all
(v
: Visitor)
895 for n
in _n_propdefs
do
900 redef fun visit_all_reverse
(v
: Visitor)
903 var i
= _n_propdefs
.length
905 v
.enter_visit
(_n_propdefs
[i
])
911 redef class AConcreteClasskind
912 redef fun n_kwclass
=(n
)
918 private init empty_init
do end
920 init init_aconcreteclasskind
(
921 n_kwclass
: nullable TKwclass
925 _n_kwclass
= n_kwclass
.as(not null)
926 n_kwclass
.parent
= self
929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
931 if _n_kwclass
== old_child
then
932 if new_child
!= null then
933 new_child
.parent
= self
934 assert new_child
isa TKwclass
935 _n_kwclass
= new_child
943 redef fun visit_all
(v
: Visitor)
945 v
.enter_visit
(_n_kwclass
)
948 redef fun visit_all_reverse
(v
: Visitor)
950 v
.enter_visit
(_n_kwclass
)
953 redef class AAbstractClasskind
954 redef fun n_kwabstract
=(n
)
959 redef fun n_kwclass
=(n
)
965 private init empty_init
do end
967 init init_aabstractclasskind
(
968 n_kwabstract
: nullable TKwabstract,
969 n_kwclass
: nullable TKwclass
973 _n_kwabstract
= n_kwabstract
.as(not null)
974 n_kwabstract
.parent
= self
975 _n_kwclass
= n_kwclass
.as(not null)
976 n_kwclass
.parent
= self
979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
981 if _n_kwabstract
== old_child
then
982 if new_child
!= null then
983 new_child
.parent
= self
984 assert new_child
isa TKwabstract
985 _n_kwabstract
= new_child
991 if _n_kwclass
== old_child
then
992 if new_child
!= null then
993 new_child
.parent
= self
994 assert new_child
isa TKwclass
995 _n_kwclass
= new_child
1003 redef fun visit_all
(v
: Visitor)
1005 v
.enter_visit
(_n_kwabstract
)
1006 v
.enter_visit
(_n_kwclass
)
1009 redef fun visit_all_reverse
(v
: Visitor)
1011 v
.enter_visit
(_n_kwabstract
)
1012 v
.enter_visit
(_n_kwclass
)
1015 redef class AInterfaceClasskind
1016 redef fun n_kwinterface
=(n
)
1022 private init empty_init
do end
1024 init init_ainterfaceclasskind
(
1025 n_kwinterface
: nullable TKwinterface
1029 _n_kwinterface
= n_kwinterface
.as(not null)
1030 n_kwinterface
.parent
= self
1033 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1035 if _n_kwinterface
== old_child
then
1036 if new_child
!= null then
1037 new_child
.parent
= self
1038 assert new_child
isa TKwinterface
1039 _n_kwinterface
= new_child
1047 redef fun visit_all
(v
: Visitor)
1049 v
.enter_visit
(_n_kwinterface
)
1052 redef fun visit_all_reverse
(v
: Visitor)
1054 v
.enter_visit
(_n_kwinterface
)
1057 redef class AUniversalClasskind
1058 redef fun n_kwuniversal
=(n
)
1064 private init empty_init
do end
1066 init init_auniversalclasskind
(
1067 n_kwuniversal
: nullable TKwuniversal
1071 _n_kwuniversal
= n_kwuniversal
.as(not null)
1072 n_kwuniversal
.parent
= self
1075 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1077 if _n_kwuniversal
== old_child
then
1078 if new_child
!= null then
1079 new_child
.parent
= self
1080 assert new_child
isa TKwuniversal
1081 _n_kwuniversal
= new_child
1089 redef fun visit_all
(v
: Visitor)
1091 v
.enter_visit
(_n_kwuniversal
)
1094 redef fun visit_all_reverse
(v
: Visitor)
1096 v
.enter_visit
(_n_kwuniversal
)
1099 redef class AFormaldef
1105 redef fun n_type
=(n
)
1113 private init empty_init
do end
1115 init init_aformaldef
(
1116 n_id
: nullable TClassid,
1117 n_type
: nullable AType
1121 _n_id
= n_id
.as(not null)
1124 if n_type
!= null then
1125 n_type
.parent
= self
1129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1131 if _n_id
== old_child
then
1132 if new_child
!= null then
1133 new_child
.parent
= self
1134 assert new_child
isa TClassid
1141 if _n_type
== old_child
then
1142 if new_child
!= null then
1143 new_child
.parent
= self
1144 assert new_child
isa AType
1153 redef fun visit_all
(v
: Visitor)
1155 v
.enter_visit
(_n_id
)
1156 if _n_type
!= null then
1157 v
.enter_visit
(_n_type
.as(not null))
1161 redef fun visit_all_reverse
(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 class ASuperclass
1170 redef fun n_kwspecial
=(n
)
1175 redef fun n_type
=(n
)
1181 private init empty_init
do end
1183 init init_asuperclass
(
1184 n_kwspecial
: nullable TKwspecial,
1185 n_type
: nullable AType
1189 _n_kwspecial
= n_kwspecial
.as(not null)
1190 n_kwspecial
.parent
= self
1191 _n_type
= n_type
.as(not null)
1192 n_type
.parent
= self
1195 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1197 if _n_kwspecial
== old_child
then
1198 if new_child
!= null then
1199 new_child
.parent
= self
1200 assert new_child
isa TKwspecial
1201 _n_kwspecial
= new_child
1207 if _n_type
== old_child
then
1208 if new_child
!= null then
1209 new_child
.parent
= self
1210 assert new_child
isa AType
1219 redef fun visit_all
(v
: Visitor)
1221 v
.enter_visit
(_n_kwspecial
)
1222 v
.enter_visit
(_n_type
)
1225 redef fun visit_all_reverse
(v
: Visitor)
1227 v
.enter_visit
(_n_kwspecial
)
1228 v
.enter_visit
(_n_type
)
1231 redef class AAttrPropdef
1239 redef fun n_readable
=(n
)
1246 redef fun n_writable
=(n
)
1253 redef fun n_kwredef
=(n
)
1260 redef fun n_visibility
=(n
)
1265 redef fun n_kwattr
=(n
)
1272 redef fun n_kwvar
=(n
)
1284 redef fun n_type
=(n
)
1291 redef fun n_expr
=(n
)
1299 private init empty_init
do end
1301 init init_aattrpropdef
(
1302 n_doc
: nullable ADoc,
1303 n_readable
: nullable AAble,
1304 n_writable
: nullable AAble,
1305 n_kwredef
: nullable TKwredef,
1306 n_visibility
: nullable AVisibility,
1307 n_kwattr
: nullable TKwattr,
1308 n_kwvar
: nullable TKwvar,
1309 n_id
: nullable TAttrid,
1310 n_type
: nullable AType,
1311 n_expr
: nullable AExpr
1316 if n_doc
!= null then
1319 _n_readable
= n_readable
1320 if n_readable
!= null then
1321 n_readable
.parent
= self
1323 _n_writable
= n_writable
1324 if n_writable
!= null then
1325 n_writable
.parent
= self
1327 _n_kwredef
= n_kwredef
1328 if n_kwredef
!= null then
1329 n_kwredef
.parent
= self
1331 _n_visibility
= n_visibility
.as(not null)
1332 n_visibility
.parent
= self
1333 _n_kwattr
= n_kwattr
1334 if n_kwattr
!= null then
1335 n_kwattr
.parent
= self
1338 if n_kwvar
!= null then
1339 n_kwvar
.parent
= self
1341 _n_id
= n_id
.as(not null)
1344 if n_type
!= null then
1345 n_type
.parent
= self
1348 if n_expr
!= null then
1349 n_expr
.parent
= self
1353 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1355 if _n_doc
== old_child
then
1356 if new_child
!= null then
1357 new_child
.parent
= self
1358 assert new_child
isa ADoc
1365 if _n_readable
== old_child
then
1366 if new_child
!= null then
1367 new_child
.parent
= self
1368 assert new_child
isa AAble
1369 _n_readable
= new_child
1375 if _n_writable
== old_child
then
1376 if new_child
!= null then
1377 new_child
.parent
= self
1378 assert new_child
isa AAble
1379 _n_writable
= new_child
1385 if _n_kwredef
== old_child
then
1386 if new_child
!= null then
1387 new_child
.parent
= self
1388 assert new_child
isa TKwredef
1389 _n_kwredef
= new_child
1395 if _n_visibility
== old_child
then
1396 if new_child
!= null then
1397 new_child
.parent
= self
1398 assert new_child
isa AVisibility
1399 _n_visibility
= new_child
1405 if _n_kwattr
== old_child
then
1406 if new_child
!= null then
1407 new_child
.parent
= self
1408 assert new_child
isa TKwattr
1409 _n_kwattr
= new_child
1415 if _n_kwvar
== old_child
then
1416 if new_child
!= null then
1417 new_child
.parent
= self
1418 assert new_child
isa TKwvar
1419 _n_kwvar
= new_child
1425 if _n_id
== old_child
then
1426 if new_child
!= null then
1427 new_child
.parent
= self
1428 assert new_child
isa TAttrid
1435 if _n_type
== old_child
then
1436 if new_child
!= null then
1437 new_child
.parent
= self
1438 assert new_child
isa AType
1445 if _n_expr
== old_child
then
1446 if new_child
!= null then
1447 new_child
.parent
= self
1448 assert new_child
isa AExpr
1457 redef fun visit_all
(v
: Visitor)
1459 if _n_doc
!= null then
1460 v
.enter_visit
(_n_doc
.as(not null))
1462 if _n_readable
!= null then
1463 v
.enter_visit
(_n_readable
.as(not null))
1465 if _n_writable
!= null then
1466 v
.enter_visit
(_n_writable
.as(not null))
1468 if _n_kwredef
!= null then
1469 v
.enter_visit
(_n_kwredef
.as(not null))
1471 v
.enter_visit
(_n_visibility
)
1472 if _n_kwattr
!= null then
1473 v
.enter_visit
(_n_kwattr
.as(not null))
1475 if _n_kwvar
!= null then
1476 v
.enter_visit
(_n_kwvar
.as(not null))
1478 v
.enter_visit
(_n_id
)
1479 if _n_type
!= null then
1480 v
.enter_visit
(_n_type
.as(not null))
1482 if _n_expr
!= null then
1483 v
.enter_visit
(_n_expr
.as(not null))
1487 redef fun visit_all_reverse
(v
: Visitor)
1489 if _n_doc
!= null then
1490 v
.enter_visit
(_n_doc
.as(not null))
1492 if _n_readable
!= null then
1493 v
.enter_visit
(_n_readable
.as(not null))
1495 if _n_writable
!= null then
1496 v
.enter_visit
(_n_writable
.as(not null))
1498 if _n_kwredef
!= null then
1499 v
.enter_visit
(_n_kwredef
.as(not null))
1501 v
.enter_visit
(_n_visibility
)
1502 if _n_kwattr
!= null then
1503 v
.enter_visit
(_n_kwattr
.as(not null))
1505 if _n_kwvar
!= null then
1506 v
.enter_visit
(_n_kwvar
.as(not null))
1508 v
.enter_visit
(_n_id
)
1509 if _n_type
!= null then
1510 v
.enter_visit
(_n_type
.as(not null))
1512 if _n_expr
!= null then
1513 v
.enter_visit
(_n_expr
.as(not null))
1517 redef class AMethPropdef
1525 redef fun n_kwredef
=(n
)
1532 redef fun n_visibility
=(n
)
1537 redef fun n_methid
=(n
)
1542 redef fun n_signature
=(n
)
1548 private init empty_init
do end
1550 init init_amethpropdef
(
1551 n_doc
: nullable ADoc,
1552 n_kwredef
: nullable TKwredef,
1553 n_visibility
: nullable AVisibility,
1554 n_methid
: nullable AMethid,
1555 n_signature
: nullable ASignature
1560 if n_doc
!= null then
1563 _n_kwredef
= n_kwredef
1564 if n_kwredef
!= null then
1565 n_kwredef
.parent
= self
1567 _n_visibility
= n_visibility
.as(not null)
1568 n_visibility
.parent
= self
1569 _n_methid
= n_methid
.as(not null)
1570 n_methid
.parent
= self
1571 _n_signature
= n_signature
.as(not null)
1572 n_signature
.parent
= self
1575 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1577 if _n_doc
== old_child
then
1578 if new_child
!= null then
1579 new_child
.parent
= self
1580 assert new_child
isa ADoc
1587 if _n_kwredef
== old_child
then
1588 if new_child
!= null then
1589 new_child
.parent
= self
1590 assert new_child
isa TKwredef
1591 _n_kwredef
= new_child
1597 if _n_visibility
== old_child
then
1598 if new_child
!= null then
1599 new_child
.parent
= self
1600 assert new_child
isa AVisibility
1601 _n_visibility
= new_child
1607 if _n_methid
== old_child
then
1608 if new_child
!= null then
1609 new_child
.parent
= self
1610 assert new_child
isa AMethid
1611 _n_methid
= new_child
1617 if _n_signature
== old_child
then
1618 if new_child
!= null then
1619 new_child
.parent
= self
1620 assert new_child
isa ASignature
1621 _n_signature
= new_child
1629 redef fun visit_all
(v
: Visitor)
1631 if _n_doc
!= null then
1632 v
.enter_visit
(_n_doc
.as(not null))
1634 if _n_kwredef
!= null then
1635 v
.enter_visit
(_n_kwredef
.as(not null))
1637 v
.enter_visit
(_n_visibility
)
1638 v
.enter_visit
(_n_methid
)
1639 v
.enter_visit
(_n_signature
)
1642 redef fun visit_all_reverse
(v
: Visitor)
1644 if _n_doc
!= null then
1645 v
.enter_visit
(_n_doc
.as(not null))
1647 if _n_kwredef
!= null then
1648 v
.enter_visit
(_n_kwredef
.as(not null))
1650 v
.enter_visit
(_n_visibility
)
1651 v
.enter_visit
(_n_methid
)
1652 v
.enter_visit
(_n_signature
)
1655 redef class ADeferredMethPropdef
1663 redef fun n_kwredef
=(n
)
1670 redef fun n_visibility
=(n
)
1675 redef fun n_kwmeth
=(n
)
1680 redef fun n_methid
=(n
)
1685 redef fun n_signature
=(n
)
1691 private init empty_init
do end
1693 init init_adeferredmethpropdef
(
1694 n_doc
: nullable ADoc,
1695 n_kwredef
: nullable TKwredef,
1696 n_visibility
: nullable AVisibility,
1697 n_kwmeth
: nullable TKwmeth,
1698 n_methid
: nullable AMethid,
1699 n_signature
: nullable ASignature
1704 if n_doc
!= null then
1707 _n_kwredef
= n_kwredef
1708 if n_kwredef
!= null then
1709 n_kwredef
.parent
= self
1711 _n_visibility
= n_visibility
.as(not null)
1712 n_visibility
.parent
= self
1713 _n_kwmeth
= n_kwmeth
.as(not null)
1714 n_kwmeth
.parent
= self
1715 _n_methid
= n_methid
.as(not null)
1716 n_methid
.parent
= self
1717 _n_signature
= n_signature
.as(not null)
1718 n_signature
.parent
= self
1721 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1723 if _n_doc
== old_child
then
1724 if new_child
!= null then
1725 new_child
.parent
= self
1726 assert new_child
isa ADoc
1733 if _n_kwredef
== old_child
then
1734 if new_child
!= null then
1735 new_child
.parent
= self
1736 assert new_child
isa TKwredef
1737 _n_kwredef
= new_child
1743 if _n_visibility
== old_child
then
1744 if new_child
!= null then
1745 new_child
.parent
= self
1746 assert new_child
isa AVisibility
1747 _n_visibility
= new_child
1753 if _n_kwmeth
== old_child
then
1754 if new_child
!= null then
1755 new_child
.parent
= self
1756 assert new_child
isa TKwmeth
1757 _n_kwmeth
= new_child
1763 if _n_methid
== old_child
then
1764 if new_child
!= null then
1765 new_child
.parent
= self
1766 assert new_child
isa AMethid
1767 _n_methid
= new_child
1773 if _n_signature
== old_child
then
1774 if new_child
!= null then
1775 new_child
.parent
= self
1776 assert new_child
isa ASignature
1777 _n_signature
= new_child
1785 redef fun visit_all
(v
: Visitor)
1787 if _n_doc
!= null then
1788 v
.enter_visit
(_n_doc
.as(not null))
1790 if _n_kwredef
!= null then
1791 v
.enter_visit
(_n_kwredef
.as(not null))
1793 v
.enter_visit
(_n_visibility
)
1794 v
.enter_visit
(_n_kwmeth
)
1795 v
.enter_visit
(_n_methid
)
1796 v
.enter_visit
(_n_signature
)
1799 redef fun visit_all_reverse
(v
: Visitor)
1801 if _n_doc
!= null then
1802 v
.enter_visit
(_n_doc
.as(not null))
1804 if _n_kwredef
!= null then
1805 v
.enter_visit
(_n_kwredef
.as(not null))
1807 v
.enter_visit
(_n_visibility
)
1808 v
.enter_visit
(_n_kwmeth
)
1809 v
.enter_visit
(_n_methid
)
1810 v
.enter_visit
(_n_signature
)
1813 redef class AInternMethPropdef
1821 redef fun n_kwredef
=(n
)
1828 redef fun n_visibility
=(n
)
1833 redef fun n_kwmeth
=(n
)
1838 redef fun n_methid
=(n
)
1843 redef fun n_signature
=(n
)
1849 private init empty_init
do end
1851 init init_ainternmethpropdef
(
1852 n_doc
: nullable ADoc,
1853 n_kwredef
: nullable TKwredef,
1854 n_visibility
: nullable AVisibility,
1855 n_kwmeth
: nullable TKwmeth,
1856 n_methid
: nullable AMethid,
1857 n_signature
: nullable ASignature
1862 if n_doc
!= null then
1865 _n_kwredef
= n_kwredef
1866 if n_kwredef
!= null then
1867 n_kwredef
.parent
= self
1869 _n_visibility
= n_visibility
.as(not null)
1870 n_visibility
.parent
= self
1871 _n_kwmeth
= n_kwmeth
.as(not null)
1872 n_kwmeth
.parent
= self
1873 _n_methid
= n_methid
.as(not null)
1874 n_methid
.parent
= self
1875 _n_signature
= n_signature
.as(not null)
1876 n_signature
.parent
= self
1879 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1881 if _n_doc
== old_child
then
1882 if new_child
!= null then
1883 new_child
.parent
= self
1884 assert new_child
isa ADoc
1891 if _n_kwredef
== old_child
then
1892 if new_child
!= null then
1893 new_child
.parent
= self
1894 assert new_child
isa TKwredef
1895 _n_kwredef
= new_child
1901 if _n_visibility
== old_child
then
1902 if new_child
!= null then
1903 new_child
.parent
= self
1904 assert new_child
isa AVisibility
1905 _n_visibility
= new_child
1911 if _n_kwmeth
== old_child
then
1912 if new_child
!= null then
1913 new_child
.parent
= self
1914 assert new_child
isa TKwmeth
1915 _n_kwmeth
= new_child
1921 if _n_methid
== old_child
then
1922 if new_child
!= null then
1923 new_child
.parent
= self
1924 assert new_child
isa AMethid
1925 _n_methid
= new_child
1931 if _n_signature
== old_child
then
1932 if new_child
!= null then
1933 new_child
.parent
= self
1934 assert new_child
isa ASignature
1935 _n_signature
= new_child
1943 redef fun visit_all
(v
: Visitor)
1945 if _n_doc
!= null then
1946 v
.enter_visit
(_n_doc
.as(not null))
1948 if _n_kwredef
!= null then
1949 v
.enter_visit
(_n_kwredef
.as(not null))
1951 v
.enter_visit
(_n_visibility
)
1952 v
.enter_visit
(_n_kwmeth
)
1953 v
.enter_visit
(_n_methid
)
1954 v
.enter_visit
(_n_signature
)
1957 redef fun visit_all_reverse
(v
: Visitor)
1959 if _n_doc
!= null then
1960 v
.enter_visit
(_n_doc
.as(not null))
1962 if _n_kwredef
!= null then
1963 v
.enter_visit
(_n_kwredef
.as(not null))
1965 v
.enter_visit
(_n_visibility
)
1966 v
.enter_visit
(_n_kwmeth
)
1967 v
.enter_visit
(_n_methid
)
1968 v
.enter_visit
(_n_signature
)
1971 redef class AExternMethPropdef
1979 redef fun n_kwredef
=(n
)
1986 redef fun n_visibility
=(n
)
1991 redef fun n_kwmeth
=(n
)
1996 redef fun n_methid
=(n
)
2001 redef fun n_signature
=(n
)
2006 redef fun n_extern
=(n
)
2014 private init empty_init
do end
2016 init init_aexternmethpropdef
(
2017 n_doc
: nullable ADoc,
2018 n_kwredef
: nullable TKwredef,
2019 n_visibility
: nullable AVisibility,
2020 n_kwmeth
: nullable TKwmeth,
2021 n_methid
: nullable AMethid,
2022 n_signature
: nullable ASignature,
2023 n_extern
: nullable TString
2028 if n_doc
!= null then
2031 _n_kwredef
= n_kwredef
2032 if n_kwredef
!= null then
2033 n_kwredef
.parent
= self
2035 _n_visibility
= n_visibility
.as(not null)
2036 n_visibility
.parent
= self
2037 _n_kwmeth
= n_kwmeth
.as(not null)
2038 n_kwmeth
.parent
= self
2039 _n_methid
= n_methid
.as(not null)
2040 n_methid
.parent
= self
2041 _n_signature
= n_signature
.as(not null)
2042 n_signature
.parent
= self
2043 _n_extern
= n_extern
2044 if n_extern
!= null then
2045 n_extern
.parent
= self
2049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2051 if _n_doc
== old_child
then
2052 if new_child
!= null then
2053 new_child
.parent
= self
2054 assert new_child
isa ADoc
2061 if _n_kwredef
== old_child
then
2062 if new_child
!= null then
2063 new_child
.parent
= self
2064 assert new_child
isa TKwredef
2065 _n_kwredef
= new_child
2071 if _n_visibility
== old_child
then
2072 if new_child
!= null then
2073 new_child
.parent
= self
2074 assert new_child
isa AVisibility
2075 _n_visibility
= new_child
2081 if _n_kwmeth
== old_child
then
2082 if new_child
!= null then
2083 new_child
.parent
= self
2084 assert new_child
isa TKwmeth
2085 _n_kwmeth
= new_child
2091 if _n_methid
== old_child
then
2092 if new_child
!= null then
2093 new_child
.parent
= self
2094 assert new_child
isa AMethid
2095 _n_methid
= new_child
2101 if _n_signature
== old_child
then
2102 if new_child
!= null then
2103 new_child
.parent
= self
2104 assert new_child
isa ASignature
2105 _n_signature
= new_child
2111 if _n_extern
== old_child
then
2112 if new_child
!= null then
2113 new_child
.parent
= self
2114 assert new_child
isa TString
2115 _n_extern
= new_child
2123 redef fun visit_all
(v
: Visitor)
2125 if _n_doc
!= null then
2126 v
.enter_visit
(_n_doc
.as(not null))
2128 if _n_kwredef
!= null then
2129 v
.enter_visit
(_n_kwredef
.as(not null))
2131 v
.enter_visit
(_n_visibility
)
2132 v
.enter_visit
(_n_kwmeth
)
2133 v
.enter_visit
(_n_methid
)
2134 v
.enter_visit
(_n_signature
)
2135 if _n_extern
!= null then
2136 v
.enter_visit
(_n_extern
.as(not null))
2140 redef fun visit_all_reverse
(v
: Visitor)
2142 if _n_doc
!= null then
2143 v
.enter_visit
(_n_doc
.as(not null))
2145 if _n_kwredef
!= null then
2146 v
.enter_visit
(_n_kwredef
.as(not null))
2148 v
.enter_visit
(_n_visibility
)
2149 v
.enter_visit
(_n_kwmeth
)
2150 v
.enter_visit
(_n_methid
)
2151 v
.enter_visit
(_n_signature
)
2152 if _n_extern
!= null then
2153 v
.enter_visit
(_n_extern
.as(not null))
2157 redef class AConcreteMethPropdef
2165 redef fun n_kwredef
=(n
)
2172 redef fun n_visibility
=(n
)
2177 redef fun n_kwmeth
=(n
)
2182 redef fun n_methid
=(n
)
2187 redef fun n_signature
=(n
)
2192 redef fun n_block
=(n
)
2200 private init empty_init
do end
2202 init init_aconcretemethpropdef
(
2203 n_doc
: nullable ADoc,
2204 n_kwredef
: nullable TKwredef,
2205 n_visibility
: nullable AVisibility,
2206 n_kwmeth
: nullable TKwmeth,
2207 n_methid
: nullable AMethid,
2208 n_signature
: nullable ASignature,
2209 n_block
: nullable AExpr
2214 if n_doc
!= null then
2217 _n_kwredef
= n_kwredef
2218 if n_kwredef
!= null then
2219 n_kwredef
.parent
= self
2221 _n_visibility
= n_visibility
.as(not null)
2222 n_visibility
.parent
= self
2223 _n_kwmeth
= n_kwmeth
.as(not null)
2224 n_kwmeth
.parent
= self
2225 _n_methid
= n_methid
.as(not null)
2226 n_methid
.parent
= self
2227 _n_signature
= n_signature
.as(not null)
2228 n_signature
.parent
= self
2230 if n_block
!= null then
2231 n_block
.parent
= self
2235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2237 if _n_doc
== old_child
then
2238 if new_child
!= null then
2239 new_child
.parent
= self
2240 assert new_child
isa ADoc
2247 if _n_kwredef
== old_child
then
2248 if new_child
!= null then
2249 new_child
.parent
= self
2250 assert new_child
isa TKwredef
2251 _n_kwredef
= new_child
2257 if _n_visibility
== old_child
then
2258 if new_child
!= null then
2259 new_child
.parent
= self
2260 assert new_child
isa AVisibility
2261 _n_visibility
= new_child
2267 if _n_kwmeth
== old_child
then
2268 if new_child
!= null then
2269 new_child
.parent
= self
2270 assert new_child
isa TKwmeth
2271 _n_kwmeth
= new_child
2277 if _n_methid
== old_child
then
2278 if new_child
!= null then
2279 new_child
.parent
= self
2280 assert new_child
isa AMethid
2281 _n_methid
= new_child
2287 if _n_signature
== old_child
then
2288 if new_child
!= null then
2289 new_child
.parent
= self
2290 assert new_child
isa ASignature
2291 _n_signature
= new_child
2297 if _n_block
== old_child
then
2298 if new_child
!= null then
2299 new_child
.parent
= self
2300 assert new_child
isa AExpr
2301 _n_block
= new_child
2309 redef fun visit_all
(v
: Visitor)
2311 if _n_doc
!= null then
2312 v
.enter_visit
(_n_doc
.as(not null))
2314 if _n_kwredef
!= null then
2315 v
.enter_visit
(_n_kwredef
.as(not null))
2317 v
.enter_visit
(_n_visibility
)
2318 v
.enter_visit
(_n_kwmeth
)
2319 v
.enter_visit
(_n_methid
)
2320 v
.enter_visit
(_n_signature
)
2321 if _n_block
!= null then
2322 v
.enter_visit
(_n_block
.as(not null))
2326 redef fun visit_all_reverse
(v
: Visitor)
2328 if _n_doc
!= null then
2329 v
.enter_visit
(_n_doc
.as(not null))
2331 if _n_kwredef
!= null then
2332 v
.enter_visit
(_n_kwredef
.as(not null))
2334 v
.enter_visit
(_n_visibility
)
2335 v
.enter_visit
(_n_kwmeth
)
2336 v
.enter_visit
(_n_methid
)
2337 v
.enter_visit
(_n_signature
)
2338 if _n_block
!= null then
2339 v
.enter_visit
(_n_block
.as(not null))
2343 redef class AConcreteInitPropdef
2351 redef fun n_kwredef
=(n
)
2358 redef fun n_visibility
=(n
)
2363 redef fun n_kwinit
=(n
)
2368 redef fun n_methid
=(n
)
2375 redef fun n_signature
=(n
)
2380 redef fun n_block
=(n
)
2388 private init empty_init
do end
2390 init init_aconcreteinitpropdef
(
2391 n_doc
: nullable ADoc,
2392 n_kwredef
: nullable TKwredef,
2393 n_visibility
: nullable AVisibility,
2394 n_kwinit
: nullable TKwinit,
2395 n_methid
: nullable AMethid,
2396 n_signature
: nullable ASignature,
2397 n_block
: nullable AExpr
2402 if n_doc
!= null then
2405 _n_kwredef
= n_kwredef
2406 if n_kwredef
!= null then
2407 n_kwredef
.parent
= self
2409 _n_visibility
= n_visibility
.as(not null)
2410 n_visibility
.parent
= self
2411 _n_kwinit
= n_kwinit
.as(not null)
2412 n_kwinit
.parent
= self
2413 _n_methid
= n_methid
2414 if n_methid
!= null then
2415 n_methid
.parent
= self
2417 _n_signature
= n_signature
.as(not null)
2418 n_signature
.parent
= self
2420 if n_block
!= null then
2421 n_block
.parent
= self
2425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2427 if _n_doc
== old_child
then
2428 if new_child
!= null then
2429 new_child
.parent
= self
2430 assert new_child
isa ADoc
2437 if _n_kwredef
== old_child
then
2438 if new_child
!= null then
2439 new_child
.parent
= self
2440 assert new_child
isa TKwredef
2441 _n_kwredef
= new_child
2447 if _n_visibility
== old_child
then
2448 if new_child
!= null then
2449 new_child
.parent
= self
2450 assert new_child
isa AVisibility
2451 _n_visibility
= new_child
2457 if _n_kwinit
== old_child
then
2458 if new_child
!= null then
2459 new_child
.parent
= self
2460 assert new_child
isa TKwinit
2461 _n_kwinit
= new_child
2467 if _n_methid
== old_child
then
2468 if new_child
!= null then
2469 new_child
.parent
= self
2470 assert new_child
isa AMethid
2471 _n_methid
= new_child
2477 if _n_signature
== old_child
then
2478 if new_child
!= null then
2479 new_child
.parent
= self
2480 assert new_child
isa ASignature
2481 _n_signature
= new_child
2487 if _n_block
== old_child
then
2488 if new_child
!= null then
2489 new_child
.parent
= self
2490 assert new_child
isa AExpr
2491 _n_block
= new_child
2499 redef fun visit_all
(v
: Visitor)
2501 if _n_doc
!= null then
2502 v
.enter_visit
(_n_doc
.as(not null))
2504 if _n_kwredef
!= null then
2505 v
.enter_visit
(_n_kwredef
.as(not null))
2507 v
.enter_visit
(_n_visibility
)
2508 v
.enter_visit
(_n_kwinit
)
2509 if _n_methid
!= null then
2510 v
.enter_visit
(_n_methid
.as(not null))
2512 v
.enter_visit
(_n_signature
)
2513 if _n_block
!= null then
2514 v
.enter_visit
(_n_block
.as(not null))
2518 redef fun visit_all_reverse
(v
: Visitor)
2520 if _n_doc
!= null then
2521 v
.enter_visit
(_n_doc
.as(not null))
2523 if _n_kwredef
!= null then
2524 v
.enter_visit
(_n_kwredef
.as(not null))
2526 v
.enter_visit
(_n_visibility
)
2527 v
.enter_visit
(_n_kwinit
)
2528 if _n_methid
!= null then
2529 v
.enter_visit
(_n_methid
.as(not null))
2531 v
.enter_visit
(_n_signature
)
2532 if _n_block
!= null then
2533 v
.enter_visit
(_n_block
.as(not null))
2537 redef class AMainMethPropdef
2538 redef fun n_kwredef
=(n
)
2545 redef fun n_block
=(n
)
2553 private init empty_init
do end
2555 init init_amainmethpropdef
(
2556 n_kwredef
: nullable TKwredef,
2557 n_block
: nullable AExpr
2561 _n_kwredef
= n_kwredef
2562 if n_kwredef
!= null then
2563 n_kwredef
.parent
= self
2566 if n_block
!= null then
2567 n_block
.parent
= self
2571 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2573 if _n_kwredef
== old_child
then
2574 if new_child
!= null then
2575 new_child
.parent
= self
2576 assert new_child
isa TKwredef
2577 _n_kwredef
= new_child
2583 if _n_block
== old_child
then
2584 if new_child
!= null then
2585 new_child
.parent
= self
2586 assert new_child
isa AExpr
2587 _n_block
= new_child
2595 redef fun visit_all
(v
: Visitor)
2597 if _n_kwredef
!= null then
2598 v
.enter_visit
(_n_kwredef
.as(not null))
2600 if _n_block
!= null then
2601 v
.enter_visit
(_n_block
.as(not null))
2605 redef fun visit_all_reverse
(v
: Visitor)
2607 if _n_kwredef
!= null then
2608 v
.enter_visit
(_n_kwredef
.as(not null))
2610 if _n_block
!= null then
2611 v
.enter_visit
(_n_block
.as(not null))
2615 redef class ATypePropdef
2623 redef fun n_kwredef
=(n
)
2630 redef fun n_visibility
=(n
)
2635 redef fun n_kwtype
=(n
)
2645 redef fun n_type
=(n
)
2651 private init empty_init
do end
2653 init init_atypepropdef
(
2654 n_doc
: nullable ADoc,
2655 n_kwredef
: nullable TKwredef,
2656 n_visibility
: nullable AVisibility,
2657 n_kwtype
: nullable TKwtype,
2658 n_id
: nullable TClassid,
2659 n_type
: nullable AType
2664 if n_doc
!= null then
2667 _n_kwredef
= n_kwredef
2668 if n_kwredef
!= null then
2669 n_kwredef
.parent
= self
2671 _n_visibility
= n_visibility
.as(not null)
2672 n_visibility
.parent
= self
2673 _n_kwtype
= n_kwtype
.as(not null)
2674 n_kwtype
.parent
= self
2675 _n_id
= n_id
.as(not null)
2677 _n_type
= n_type
.as(not null)
2678 n_type
.parent
= self
2681 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2683 if _n_doc
== old_child
then
2684 if new_child
!= null then
2685 new_child
.parent
= self
2686 assert new_child
isa ADoc
2693 if _n_kwredef
== old_child
then
2694 if new_child
!= null then
2695 new_child
.parent
= self
2696 assert new_child
isa TKwredef
2697 _n_kwredef
= new_child
2703 if _n_visibility
== old_child
then
2704 if new_child
!= null then
2705 new_child
.parent
= self
2706 assert new_child
isa AVisibility
2707 _n_visibility
= new_child
2713 if _n_kwtype
== old_child
then
2714 if new_child
!= null then
2715 new_child
.parent
= self
2716 assert new_child
isa TKwtype
2717 _n_kwtype
= new_child
2723 if _n_id
== old_child
then
2724 if new_child
!= null then
2725 new_child
.parent
= self
2726 assert new_child
isa TClassid
2733 if _n_type
== old_child
then
2734 if new_child
!= null then
2735 new_child
.parent
= self
2736 assert new_child
isa AType
2745 redef fun visit_all
(v
: Visitor)
2747 if _n_doc
!= null then
2748 v
.enter_visit
(_n_doc
.as(not null))
2750 if _n_kwredef
!= null then
2751 v
.enter_visit
(_n_kwredef
.as(not null))
2753 v
.enter_visit
(_n_visibility
)
2754 v
.enter_visit
(_n_kwtype
)
2755 v
.enter_visit
(_n_id
)
2756 v
.enter_visit
(_n_type
)
2759 redef fun visit_all_reverse
(v
: Visitor)
2761 if _n_doc
!= null then
2762 v
.enter_visit
(_n_doc
.as(not null))
2764 if _n_kwredef
!= null then
2765 v
.enter_visit
(_n_kwredef
.as(not null))
2767 v
.enter_visit
(_n_visibility
)
2768 v
.enter_visit
(_n_kwtype
)
2769 v
.enter_visit
(_n_id
)
2770 v
.enter_visit
(_n_type
)
2773 redef class AReadAble
2774 redef fun n_kwredef
=(n
)
2781 redef fun n_kwreadable
=(n
)
2787 private init empty_init
do end
2789 init init_areadable
(
2790 n_kwredef
: nullable TKwredef,
2791 n_kwreadable
: nullable TKwreadable
2795 _n_kwredef
= n_kwredef
2796 if n_kwredef
!= null then
2797 n_kwredef
.parent
= self
2799 _n_kwreadable
= n_kwreadable
.as(not null)
2800 n_kwreadable
.parent
= self
2803 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2805 if _n_kwredef
== old_child
then
2806 if new_child
!= null then
2807 new_child
.parent
= self
2808 assert new_child
isa TKwredef
2809 _n_kwredef
= new_child
2815 if _n_kwreadable
== old_child
then
2816 if new_child
!= null then
2817 new_child
.parent
= self
2818 assert new_child
isa TKwreadable
2819 _n_kwreadable
= new_child
2827 redef fun visit_all
(v
: Visitor)
2829 if _n_kwredef
!= null then
2830 v
.enter_visit
(_n_kwredef
.as(not null))
2832 v
.enter_visit
(_n_kwreadable
)
2835 redef fun visit_all_reverse
(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 class AWriteAble
2844 redef fun n_kwredef
=(n
)
2851 redef fun n_kwwritable
=(n
)
2857 private init empty_init
do end
2859 init init_awriteable
(
2860 n_kwredef
: nullable TKwredef,
2861 n_kwwritable
: nullable TKwwritable
2865 _n_kwredef
= n_kwredef
2866 if n_kwredef
!= null then
2867 n_kwredef
.parent
= self
2869 _n_kwwritable
= n_kwwritable
.as(not null)
2870 n_kwwritable
.parent
= self
2873 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2875 if _n_kwredef
== old_child
then
2876 if new_child
!= null then
2877 new_child
.parent
= self
2878 assert new_child
isa TKwredef
2879 _n_kwredef
= new_child
2885 if _n_kwwritable
== old_child
then
2886 if new_child
!= null then
2887 new_child
.parent
= self
2888 assert new_child
isa TKwwritable
2889 _n_kwwritable
= new_child
2897 redef fun visit_all
(v
: Visitor)
2899 if _n_kwredef
!= null then
2900 v
.enter_visit
(_n_kwredef
.as(not null))
2902 v
.enter_visit
(_n_kwwritable
)
2905 redef fun visit_all_reverse
(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 class AIdMethid
2920 private init empty_init
do end
2922 init init_aidmethid
(
2927 _n_id
= n_id
.as(not null)
2931 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2933 if _n_id
== old_child
then
2934 if new_child
!= null then
2935 new_child
.parent
= self
2936 assert new_child
isa TId
2945 redef fun visit_all
(v
: Visitor)
2947 v
.enter_visit
(_n_id
)
2950 redef fun visit_all_reverse
(v
: Visitor)
2952 v
.enter_visit
(_n_id
)
2955 redef class APlusMethid
2956 redef fun n_plus
=(n
)
2962 private init empty_init
do end
2964 init init_aplusmethid
(
2965 n_plus
: nullable TPlus
2969 _n_plus
= n_plus
.as(not null)
2970 n_plus
.parent
= self
2973 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2975 if _n_plus
== old_child
then
2976 if new_child
!= null then
2977 new_child
.parent
= self
2978 assert new_child
isa TPlus
2987 redef fun visit_all
(v
: Visitor)
2989 v
.enter_visit
(_n_plus
)
2992 redef fun visit_all_reverse
(v
: Visitor)
2994 v
.enter_visit
(_n_plus
)
2997 redef class AMinusMethid
2998 redef fun n_minus
=(n
)
3004 private init empty_init
do end
3006 init init_aminusmethid
(
3007 n_minus
: nullable TMinus
3011 _n_minus
= n_minus
.as(not null)
3012 n_minus
.parent
= self
3015 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3017 if _n_minus
== old_child
then
3018 if new_child
!= null then
3019 new_child
.parent
= self
3020 assert new_child
isa TMinus
3021 _n_minus
= new_child
3029 redef fun visit_all
(v
: Visitor)
3031 v
.enter_visit
(_n_minus
)
3034 redef fun visit_all_reverse
(v
: Visitor)
3036 v
.enter_visit
(_n_minus
)
3039 redef class AStarMethid
3040 redef fun n_star
=(n
)
3046 private init empty_init
do end
3048 init init_astarmethid
(
3049 n_star
: nullable TStar
3053 _n_star
= n_star
.as(not null)
3054 n_star
.parent
= self
3057 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3059 if _n_star
== old_child
then
3060 if new_child
!= null then
3061 new_child
.parent
= self
3062 assert new_child
isa TStar
3071 redef fun visit_all
(v
: Visitor)
3073 v
.enter_visit
(_n_star
)
3076 redef fun visit_all_reverse
(v
: Visitor)
3078 v
.enter_visit
(_n_star
)
3081 redef class ASlashMethid
3082 redef fun n_slash
=(n
)
3088 private init empty_init
do end
3090 init init_aslashmethid
(
3091 n_slash
: nullable TSlash
3095 _n_slash
= n_slash
.as(not null)
3096 n_slash
.parent
= self
3099 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3101 if _n_slash
== old_child
then
3102 if new_child
!= null then
3103 new_child
.parent
= self
3104 assert new_child
isa TSlash
3105 _n_slash
= new_child
3113 redef fun visit_all
(v
: Visitor)
3115 v
.enter_visit
(_n_slash
)
3118 redef fun visit_all_reverse
(v
: Visitor)
3120 v
.enter_visit
(_n_slash
)
3123 redef class APercentMethid
3124 redef fun n_percent
=(n
)
3130 private init empty_init
do end
3132 init init_apercentmethid
(
3133 n_percent
: nullable TPercent
3137 _n_percent
= n_percent
.as(not null)
3138 n_percent
.parent
= self
3141 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3143 if _n_percent
== old_child
then
3144 if new_child
!= null then
3145 new_child
.parent
= self
3146 assert new_child
isa TPercent
3147 _n_percent
= new_child
3155 redef fun visit_all
(v
: Visitor)
3157 v
.enter_visit
(_n_percent
)
3160 redef fun visit_all_reverse
(v
: Visitor)
3162 v
.enter_visit
(_n_percent
)
3165 redef class AEqMethid
3172 private init empty_init
do end
3174 init init_aeqmethid
(
3179 _n_eq
= n_eq
.as(not null)
3183 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3185 if _n_eq
== old_child
then
3186 if new_child
!= null then
3187 new_child
.parent
= self
3188 assert new_child
isa TEq
3197 redef fun visit_all
(v
: Visitor)
3199 v
.enter_visit
(_n_eq
)
3202 redef fun visit_all_reverse
(v
: Visitor)
3204 v
.enter_visit
(_n_eq
)
3207 redef class ANeMethid
3214 private init empty_init
do end
3216 init init_anemethid
(
3221 _n_ne
= n_ne
.as(not null)
3225 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3227 if _n_ne
== old_child
then
3228 if new_child
!= null then
3229 new_child
.parent
= self
3230 assert new_child
isa TNe
3239 redef fun visit_all
(v
: Visitor)
3241 v
.enter_visit
(_n_ne
)
3244 redef fun visit_all_reverse
(v
: Visitor)
3246 v
.enter_visit
(_n_ne
)
3249 redef class ALeMethid
3256 private init empty_init
do end
3258 init init_alemethid
(
3263 _n_le
= n_le
.as(not null)
3267 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3269 if _n_le
== old_child
then
3270 if new_child
!= null then
3271 new_child
.parent
= self
3272 assert new_child
isa TLe
3281 redef fun visit_all
(v
: Visitor)
3283 v
.enter_visit
(_n_le
)
3286 redef fun visit_all_reverse
(v
: Visitor)
3288 v
.enter_visit
(_n_le
)
3291 redef class AGeMethid
3298 private init empty_init
do end
3300 init init_agemethid
(
3305 _n_ge
= n_ge
.as(not null)
3309 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3311 if _n_ge
== old_child
then
3312 if new_child
!= null then
3313 new_child
.parent
= self
3314 assert new_child
isa TGe
3323 redef fun visit_all
(v
: Visitor)
3325 v
.enter_visit
(_n_ge
)
3328 redef fun visit_all_reverse
(v
: Visitor)
3330 v
.enter_visit
(_n_ge
)
3333 redef class ALtMethid
3340 private init empty_init
do end
3342 init init_altmethid
(
3347 _n_lt
= n_lt
.as(not null)
3351 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3353 if _n_lt
== old_child
then
3354 if new_child
!= null then
3355 new_child
.parent
= self
3356 assert new_child
isa TLt
3365 redef fun visit_all
(v
: Visitor)
3367 v
.enter_visit
(_n_lt
)
3370 redef fun visit_all_reverse
(v
: Visitor)
3372 v
.enter_visit
(_n_lt
)
3375 redef class AGtMethid
3382 private init empty_init
do end
3384 init init_agtmethid
(
3389 _n_gt
= n_gt
.as(not null)
3393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3395 if _n_gt
== old_child
then
3396 if new_child
!= null then
3397 new_child
.parent
= self
3398 assert new_child
isa TGt
3407 redef fun visit_all
(v
: Visitor)
3409 v
.enter_visit
(_n_gt
)
3412 redef fun visit_all_reverse
(v
: Visitor)
3414 v
.enter_visit
(_n_gt
)
3417 redef class ABraMethid
3418 redef fun n_obra
=(n
)
3423 redef fun n_cbra
=(n
)
3429 private init empty_init
do end
3431 init init_abramethid
(
3432 n_obra
: nullable TObra,
3433 n_cbra
: nullable TCbra
3437 _n_obra
= n_obra
.as(not null)
3438 n_obra
.parent
= self
3439 _n_cbra
= n_cbra
.as(not null)
3440 n_cbra
.parent
= self
3443 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3445 if _n_obra
== old_child
then
3446 if new_child
!= null then
3447 new_child
.parent
= self
3448 assert new_child
isa TObra
3455 if _n_cbra
== old_child
then
3456 if new_child
!= null then
3457 new_child
.parent
= self
3458 assert new_child
isa TCbra
3467 redef fun visit_all
(v
: Visitor)
3469 v
.enter_visit
(_n_obra
)
3470 v
.enter_visit
(_n_cbra
)
3473 redef fun visit_all_reverse
(v
: Visitor)
3475 v
.enter_visit
(_n_obra
)
3476 v
.enter_visit
(_n_cbra
)
3479 redef class AStarshipMethid
3480 redef fun n_starship
=(n
)
3486 private init empty_init
do end
3488 init init_astarshipmethid
(
3489 n_starship
: nullable TStarship
3493 _n_starship
= n_starship
.as(not null)
3494 n_starship
.parent
= self
3497 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3499 if _n_starship
== old_child
then
3500 if new_child
!= null then
3501 new_child
.parent
= self
3502 assert new_child
isa TStarship
3503 _n_starship
= new_child
3511 redef fun visit_all
(v
: Visitor)
3513 v
.enter_visit
(_n_starship
)
3516 redef fun visit_all_reverse
(v
: Visitor)
3518 v
.enter_visit
(_n_starship
)
3521 redef class AAssignMethid
3527 redef fun n_assign
=(n
)
3533 private init empty_init
do end
3535 init init_aassignmethid
(
3537 n_assign
: nullable TAssign
3541 _n_id
= n_id
.as(not null)
3543 _n_assign
= n_assign
.as(not null)
3544 n_assign
.parent
= self
3547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3549 if _n_id
== old_child
then
3550 if new_child
!= null then
3551 new_child
.parent
= self
3552 assert new_child
isa TId
3559 if _n_assign
== old_child
then
3560 if new_child
!= null then
3561 new_child
.parent
= self
3562 assert new_child
isa TAssign
3563 _n_assign
= new_child
3571 redef fun visit_all
(v
: Visitor)
3573 v
.enter_visit
(_n_id
)
3574 v
.enter_visit
(_n_assign
)
3577 redef fun visit_all_reverse
(v
: Visitor)
3579 v
.enter_visit
(_n_id
)
3580 v
.enter_visit
(_n_assign
)
3583 redef class ABraassignMethid
3584 redef fun n_obra
=(n
)
3589 redef fun n_cbra
=(n
)
3594 redef fun n_assign
=(n
)
3600 private init empty_init
do end
3602 init init_abraassignmethid
(
3603 n_obra
: nullable TObra,
3604 n_cbra
: nullable TCbra,
3605 n_assign
: nullable TAssign
3609 _n_obra
= n_obra
.as(not null)
3610 n_obra
.parent
= self
3611 _n_cbra
= n_cbra
.as(not null)
3612 n_cbra
.parent
= self
3613 _n_assign
= n_assign
.as(not null)
3614 n_assign
.parent
= self
3617 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3619 if _n_obra
== old_child
then
3620 if new_child
!= null then
3621 new_child
.parent
= self
3622 assert new_child
isa TObra
3629 if _n_cbra
== old_child
then
3630 if new_child
!= null then
3631 new_child
.parent
= self
3632 assert new_child
isa TCbra
3639 if _n_assign
== old_child
then
3640 if new_child
!= null then
3641 new_child
.parent
= self
3642 assert new_child
isa TAssign
3643 _n_assign
= new_child
3651 redef fun visit_all
(v
: Visitor)
3653 v
.enter_visit
(_n_obra
)
3654 v
.enter_visit
(_n_cbra
)
3655 v
.enter_visit
(_n_assign
)
3658 redef fun visit_all_reverse
(v
: Visitor)
3660 v
.enter_visit
(_n_obra
)
3661 v
.enter_visit
(_n_cbra
)
3662 v
.enter_visit
(_n_assign
)
3665 redef class ASignature
3666 redef fun n_type
=(n
)
3674 private init empty_init
do end
3676 init init_asignature
(
3677 n_params
: Collection[Object], # Should be Collection[AParam]
3678 n_type
: nullable AType,
3679 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3683 for n
in n_params
do
3689 if n_type
!= null then
3690 n_type
.parent
= self
3692 for n
in n_closure_decls
do
3693 assert n
isa AClosureDecl
3694 _n_closure_decls
.add
(n
)
3699 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3701 for i
in [0.._n_params
.length
[ do
3702 if _n_params
[i
] == old_child
then
3703 if new_child
!= null then
3704 assert new_child
isa AParam
3705 _n_params
[i
] = new_child
3706 new_child
.parent
= self
3708 _n_params
.remove_at
(i
)
3713 if _n_type
== old_child
then
3714 if new_child
!= null then
3715 new_child
.parent
= self
3716 assert new_child
isa AType
3723 for i
in [0.._n_closure_decls
.length
[ do
3724 if _n_closure_decls
[i
] == old_child
then
3725 if new_child
!= null then
3726 assert new_child
isa AClosureDecl
3727 _n_closure_decls
[i
] = new_child
3728 new_child
.parent
= self
3730 _n_closure_decls
.remove_at
(i
)
3737 redef fun visit_all
(v
: Visitor)
3739 for n
in _n_params
do
3742 if _n_type
!= null then
3743 v
.enter_visit
(_n_type
.as(not null))
3745 for n
in _n_closure_decls
do
3750 redef fun visit_all_reverse
(v
: Visitor)
3753 var i
= _n_params
.length
3755 v
.enter_visit
(_n_params
[i
])
3759 if _n_type
!= null then
3760 v
.enter_visit
(_n_type
.as(not null))
3763 var i
= _n_closure_decls
.length
3765 v
.enter_visit
(_n_closure_decls
[i
])
3777 redef fun n_type
=(n
)
3784 redef fun n_dotdotdot
=(n
)
3792 private init empty_init
do end
3796 n_type
: nullable AType,
3797 n_dotdotdot
: nullable TDotdotdot
3801 _n_id
= n_id
.as(not null)
3804 if n_type
!= null then
3805 n_type
.parent
= self
3807 _n_dotdotdot
= n_dotdotdot
3808 if n_dotdotdot
!= null then
3809 n_dotdotdot
.parent
= self
3813 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3815 if _n_id
== old_child
then
3816 if new_child
!= null then
3817 new_child
.parent
= self
3818 assert new_child
isa TId
3825 if _n_type
== old_child
then
3826 if new_child
!= null then
3827 new_child
.parent
= self
3828 assert new_child
isa AType
3835 if _n_dotdotdot
== old_child
then
3836 if new_child
!= null then
3837 new_child
.parent
= self
3838 assert new_child
isa TDotdotdot
3839 _n_dotdotdot
= new_child
3847 redef fun visit_all
(v
: Visitor)
3849 v
.enter_visit
(_n_id
)
3850 if _n_type
!= null then
3851 v
.enter_visit
(_n_type
.as(not null))
3853 if _n_dotdotdot
!= null then
3854 v
.enter_visit
(_n_dotdotdot
.as(not null))
3858 redef fun visit_all_reverse
(v
: Visitor)
3860 v
.enter_visit
(_n_id
)
3861 if _n_type
!= null then
3862 v
.enter_visit
(_n_type
.as(not null))
3864 if _n_dotdotdot
!= null then
3865 v
.enter_visit
(_n_dotdotdot
.as(not null))
3869 redef class AClosureDecl
3870 redef fun n_kwwith
=(n
)
3875 redef fun n_kwbreak
=(n
)
3887 redef fun n_signature
=(n
)
3892 redef fun n_expr
=(n
)
3900 private init empty_init
do end
3902 init init_aclosuredecl
(
3903 n_kwwith
: nullable TKwwith,
3904 n_kwbreak
: nullable TKwbreak,
3906 n_signature
: nullable ASignature,
3907 n_expr
: nullable AExpr
3911 _n_kwwith
= n_kwwith
.as(not null)
3912 n_kwwith
.parent
= self
3913 _n_kwbreak
= n_kwbreak
3914 if n_kwbreak
!= null then
3915 n_kwbreak
.parent
= self
3917 _n_id
= n_id
.as(not null)
3919 _n_signature
= n_signature
.as(not null)
3920 n_signature
.parent
= self
3922 if n_expr
!= null then
3923 n_expr
.parent
= self
3927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3929 if _n_kwwith
== old_child
then
3930 if new_child
!= null then
3931 new_child
.parent
= self
3932 assert new_child
isa TKwwith
3933 _n_kwwith
= new_child
3939 if _n_kwbreak
== old_child
then
3940 if new_child
!= null then
3941 new_child
.parent
= self
3942 assert new_child
isa TKwbreak
3943 _n_kwbreak
= new_child
3949 if _n_id
== old_child
then
3950 if new_child
!= null then
3951 new_child
.parent
= self
3952 assert new_child
isa TId
3959 if _n_signature
== old_child
then
3960 if new_child
!= null then
3961 new_child
.parent
= self
3962 assert new_child
isa ASignature
3963 _n_signature
= new_child
3969 if _n_expr
== old_child
then
3970 if new_child
!= null then
3971 new_child
.parent
= self
3972 assert new_child
isa AExpr
3981 redef fun visit_all
(v
: Visitor)
3983 v
.enter_visit
(_n_kwwith
)
3984 if _n_kwbreak
!= null then
3985 v
.enter_visit
(_n_kwbreak
.as(not null))
3987 v
.enter_visit
(_n_id
)
3988 v
.enter_visit
(_n_signature
)
3989 if _n_expr
!= null then
3990 v
.enter_visit
(_n_expr
.as(not null))
3994 redef fun visit_all_reverse
(v
: Visitor)
3996 v
.enter_visit
(_n_kwwith
)
3997 if _n_kwbreak
!= null then
3998 v
.enter_visit
(_n_kwbreak
.as(not null))
4000 v
.enter_visit
(_n_id
)
4001 v
.enter_visit
(_n_signature
)
4002 if _n_expr
!= null then
4003 v
.enter_visit
(_n_expr
.as(not null))
4008 redef fun n_kwnullable
=(n
)
4021 private init empty_init
do end
4024 n_kwnullable
: nullable TKwnullable,
4025 n_id
: nullable TClassid,
4026 n_types
: Collection[Object] # Should be Collection[AType]
4030 _n_kwnullable
= n_kwnullable
4031 if n_kwnullable
!= null then
4032 n_kwnullable
.parent
= self
4034 _n_id
= n_id
.as(not null)
4043 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4045 if _n_kwnullable
== old_child
then
4046 if new_child
!= null then
4047 new_child
.parent
= self
4048 assert new_child
isa TKwnullable
4049 _n_kwnullable
= new_child
4051 _n_kwnullable
= null
4055 if _n_id
== old_child
then
4056 if new_child
!= null then
4057 new_child
.parent
= self
4058 assert new_child
isa TClassid
4065 for i
in [0.._n_types
.length
[ do
4066 if _n_types
[i
] == old_child
then
4067 if new_child
!= null then
4068 assert new_child
isa AType
4069 _n_types
[i
] = new_child
4070 new_child
.parent
= self
4072 _n_types
.remove_at
(i
)
4079 redef fun visit_all
(v
: Visitor)
4081 if _n_kwnullable
!= null then
4082 v
.enter_visit
(_n_kwnullable
.as(not null))
4084 v
.enter_visit
(_n_id
)
4085 for n
in _n_types
do
4090 redef fun visit_all_reverse
(v
: Visitor)
4092 if _n_kwnullable
!= null then
4093 v
.enter_visit
(_n_kwnullable
.as(not null))
4095 v
.enter_visit
(_n_id
)
4097 var i
= _n_types
.length
4099 v
.enter_visit
(_n_types
[i
])
4106 redef fun n_kwlabel
=(n
)
4117 private init empty_init
do end
4120 n_kwlabel
: nullable TKwlabel,
4125 _n_kwlabel
= n_kwlabel
.as(not null)
4126 n_kwlabel
.parent
= self
4127 _n_id
= n_id
.as(not null)
4131 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4133 if _n_kwlabel
== old_child
then
4134 if new_child
!= null then
4135 new_child
.parent
= self
4136 assert new_child
isa TKwlabel
4137 _n_kwlabel
= new_child
4143 if _n_id
== old_child
then
4144 if new_child
!= null then
4145 new_child
.parent
= self
4146 assert new_child
isa TId
4155 redef fun visit_all
(v
: Visitor)
4157 v
.enter_visit
(_n_kwlabel
)
4158 v
.enter_visit
(_n_id
)
4161 redef fun visit_all_reverse
(v
: Visitor)
4163 v
.enter_visit
(_n_kwlabel
)
4164 v
.enter_visit
(_n_id
)
4167 redef class ABlockExpr
4169 private init empty_init
do end
4171 init init_ablockexpr
(
4172 n_expr
: Collection[Object] # Should be Collection[AExpr]
4183 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4185 for i
in [0.._n_expr
.length
[ do
4186 if _n_expr
[i
] == old_child
then
4187 if new_child
!= null then
4188 assert new_child
isa AExpr
4189 _n_expr
[i
] = new_child
4190 new_child
.parent
= self
4192 _n_expr
.remove_at
(i
)
4199 redef fun visit_all
(v
: Visitor)
4206 redef fun visit_all_reverse
(v
: Visitor)
4209 var i
= _n_expr
.length
4211 v
.enter_visit
(_n_expr
[i
])
4217 redef class AVardeclExpr
4218 redef fun n_kwvar
=(n
)
4228 redef fun n_type
=(n
)
4235 redef fun n_assign
=(n
)
4242 redef fun n_expr
=(n
)
4250 private init empty_init
do end
4252 init init_avardeclexpr
(
4253 n_kwvar
: nullable TKwvar,
4255 n_type
: nullable AType,
4256 n_assign
: nullable TAssign,
4257 n_expr
: nullable AExpr
4261 _n_kwvar
= n_kwvar
.as(not null)
4262 n_kwvar
.parent
= self
4263 _n_id
= n_id
.as(not null)
4266 if n_type
!= null then
4267 n_type
.parent
= self
4269 _n_assign
= n_assign
4270 if n_assign
!= null then
4271 n_assign
.parent
= self
4274 if n_expr
!= null then
4275 n_expr
.parent
= self
4279 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4281 if _n_kwvar
== old_child
then
4282 if new_child
!= null then
4283 new_child
.parent
= self
4284 assert new_child
isa TKwvar
4285 _n_kwvar
= new_child
4291 if _n_id
== old_child
then
4292 if new_child
!= null then
4293 new_child
.parent
= self
4294 assert new_child
isa TId
4301 if _n_type
== old_child
then
4302 if new_child
!= null then
4303 new_child
.parent
= self
4304 assert new_child
isa AType
4311 if _n_assign
== old_child
then
4312 if new_child
!= null then
4313 new_child
.parent
= self
4314 assert new_child
isa TAssign
4315 _n_assign
= new_child
4321 if _n_expr
== old_child
then
4322 if new_child
!= null then
4323 new_child
.parent
= self
4324 assert new_child
isa AExpr
4333 redef fun visit_all
(v
: Visitor)
4335 v
.enter_visit
(_n_kwvar
)
4336 v
.enter_visit
(_n_id
)
4337 if _n_type
!= null then
4338 v
.enter_visit
(_n_type
.as(not null))
4340 if _n_assign
!= null then
4341 v
.enter_visit
(_n_assign
.as(not null))
4343 if _n_expr
!= null then
4344 v
.enter_visit
(_n_expr
.as(not null))
4348 redef fun visit_all_reverse
(v
: Visitor)
4350 v
.enter_visit
(_n_kwvar
)
4351 v
.enter_visit
(_n_id
)
4352 if _n_type
!= null then
4353 v
.enter_visit
(_n_type
.as(not null))
4355 if _n_assign
!= null then
4356 v
.enter_visit
(_n_assign
.as(not null))
4358 if _n_expr
!= null then
4359 v
.enter_visit
(_n_expr
.as(not null))
4363 redef class AReturnExpr
4364 redef fun n_kwreturn
=(n
)
4369 redef fun n_expr
=(n
)
4377 private init empty_init
do end
4379 init init_areturnexpr
(
4380 n_kwreturn
: nullable TKwreturn,
4381 n_expr
: nullable AExpr
4385 _n_kwreturn
= n_kwreturn
.as(not null)
4386 n_kwreturn
.parent
= self
4388 if n_expr
!= null then
4389 n_expr
.parent
= self
4393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4395 if _n_kwreturn
== old_child
then
4396 if new_child
!= null then
4397 new_child
.parent
= self
4398 assert new_child
isa TKwreturn
4399 _n_kwreturn
= new_child
4405 if _n_expr
== old_child
then
4406 if new_child
!= null then
4407 new_child
.parent
= self
4408 assert new_child
isa AExpr
4417 redef fun visit_all
(v
: Visitor)
4419 v
.enter_visit
(_n_kwreturn
)
4420 if _n_expr
!= null then
4421 v
.enter_visit
(_n_expr
.as(not null))
4425 redef fun visit_all_reverse
(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 class ABreakExpr
4434 redef fun n_kwbreak
=(n
)
4439 redef fun n_label
=(n
)
4446 redef fun n_expr
=(n
)
4454 private init empty_init
do end
4456 init init_abreakexpr
(
4457 n_kwbreak
: nullable TKwbreak,
4458 n_label
: nullable ALabel,
4459 n_expr
: nullable AExpr
4463 _n_kwbreak
= n_kwbreak
.as(not null)
4464 n_kwbreak
.parent
= self
4466 if n_label
!= null then
4467 n_label
.parent
= self
4470 if n_expr
!= null then
4471 n_expr
.parent
= self
4475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4477 if _n_kwbreak
== old_child
then
4478 if new_child
!= null then
4479 new_child
.parent
= self
4480 assert new_child
isa TKwbreak
4481 _n_kwbreak
= new_child
4487 if _n_label
== old_child
then
4488 if new_child
!= null then
4489 new_child
.parent
= self
4490 assert new_child
isa ALabel
4491 _n_label
= new_child
4497 if _n_expr
== old_child
then
4498 if new_child
!= null then
4499 new_child
.parent
= self
4500 assert new_child
isa AExpr
4509 redef fun visit_all
(v
: Visitor)
4511 v
.enter_visit
(_n_kwbreak
)
4512 if _n_label
!= null then
4513 v
.enter_visit
(_n_label
.as(not null))
4515 if _n_expr
!= null then
4516 v
.enter_visit
(_n_expr
.as(not null))
4520 redef fun visit_all_reverse
(v
: Visitor)
4522 v
.enter_visit
(_n_kwbreak
)
4523 if _n_label
!= null then
4524 v
.enter_visit
(_n_label
.as(not null))
4526 if _n_expr
!= null then
4527 v
.enter_visit
(_n_expr
.as(not null))
4531 redef class AAbortExpr
4532 redef fun n_kwabort
=(n
)
4538 private init empty_init
do end
4540 init init_aabortexpr
(
4541 n_kwabort
: nullable TKwabort
4545 _n_kwabort
= n_kwabort
.as(not null)
4546 n_kwabort
.parent
= self
4549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4551 if _n_kwabort
== old_child
then
4552 if new_child
!= null then
4553 new_child
.parent
= self
4554 assert new_child
isa TKwabort
4555 _n_kwabort
= new_child
4563 redef fun visit_all
(v
: Visitor)
4565 v
.enter_visit
(_n_kwabort
)
4568 redef fun visit_all_reverse
(v
: Visitor)
4570 v
.enter_visit
(_n_kwabort
)
4573 redef class AContinueExpr
4574 redef fun n_kwcontinue
=(n
)
4579 redef fun n_label
=(n
)
4586 redef fun n_expr
=(n
)
4594 private init empty_init
do end
4596 init init_acontinueexpr
(
4597 n_kwcontinue
: nullable TKwcontinue,
4598 n_label
: nullable ALabel,
4599 n_expr
: nullable AExpr
4603 _n_kwcontinue
= n_kwcontinue
.as(not null)
4604 n_kwcontinue
.parent
= self
4606 if n_label
!= null then
4607 n_label
.parent
= self
4610 if n_expr
!= null then
4611 n_expr
.parent
= self
4615 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4617 if _n_kwcontinue
== old_child
then
4618 if new_child
!= null then
4619 new_child
.parent
= self
4620 assert new_child
isa TKwcontinue
4621 _n_kwcontinue
= new_child
4627 if _n_label
== old_child
then
4628 if new_child
!= null then
4629 new_child
.parent
= self
4630 assert new_child
isa ALabel
4631 _n_label
= new_child
4637 if _n_expr
== old_child
then
4638 if new_child
!= null then
4639 new_child
.parent
= self
4640 assert new_child
isa AExpr
4649 redef fun visit_all
(v
: Visitor)
4651 v
.enter_visit
(_n_kwcontinue
)
4652 if _n_label
!= null then
4653 v
.enter_visit
(_n_label
.as(not null))
4655 if _n_expr
!= null then
4656 v
.enter_visit
(_n_expr
.as(not null))
4660 redef fun visit_all_reverse
(v
: Visitor)
4662 v
.enter_visit
(_n_kwcontinue
)
4663 if _n_label
!= null then
4664 v
.enter_visit
(_n_label
.as(not null))
4666 if _n_expr
!= null then
4667 v
.enter_visit
(_n_expr
.as(not null))
4672 redef fun n_kwdo
=(n
)
4677 redef fun n_block
=(n
)
4684 redef fun n_label
=(n
)
4692 private init empty_init
do end
4695 n_kwdo
: nullable TKwdo,
4696 n_block
: nullable AExpr,
4697 n_label
: nullable ALabel
4701 _n_kwdo
= n_kwdo
.as(not null)
4702 n_kwdo
.parent
= self
4704 if n_block
!= null then
4705 n_block
.parent
= self
4708 if n_label
!= null then
4709 n_label
.parent
= self
4713 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4715 if _n_kwdo
== old_child
then
4716 if new_child
!= null then
4717 new_child
.parent
= self
4718 assert new_child
isa TKwdo
4725 if _n_block
== old_child
then
4726 if new_child
!= null then
4727 new_child
.parent
= self
4728 assert new_child
isa AExpr
4729 _n_block
= new_child
4735 if _n_label
== old_child
then
4736 if new_child
!= null then
4737 new_child
.parent
= self
4738 assert new_child
isa ALabel
4739 _n_label
= new_child
4747 redef fun visit_all
(v
: Visitor)
4749 v
.enter_visit
(_n_kwdo
)
4750 if _n_block
!= null then
4751 v
.enter_visit
(_n_block
.as(not null))
4753 if _n_label
!= null then
4754 v
.enter_visit
(_n_label
.as(not null))
4758 redef fun visit_all_reverse
(v
: Visitor)
4760 v
.enter_visit
(_n_kwdo
)
4761 if _n_block
!= null then
4762 v
.enter_visit
(_n_block
.as(not null))
4764 if _n_label
!= null then
4765 v
.enter_visit
(_n_label
.as(not null))
4770 redef fun n_kwif
=(n
)
4775 redef fun n_expr
=(n
)
4780 redef fun n_then
=(n
)
4787 redef fun n_else
=(n
)
4795 private init empty_init
do end
4798 n_kwif
: nullable TKwif,
4799 n_expr
: nullable AExpr,
4800 n_then
: nullable AExpr,
4801 n_else
: nullable AExpr
4805 _n_kwif
= n_kwif
.as(not null)
4806 n_kwif
.parent
= self
4807 _n_expr
= n_expr
.as(not null)
4808 n_expr
.parent
= self
4810 if n_then
!= null then
4811 n_then
.parent
= self
4814 if n_else
!= null then
4815 n_else
.parent
= self
4819 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4821 if _n_kwif
== old_child
then
4822 if new_child
!= null then
4823 new_child
.parent
= self
4824 assert new_child
isa TKwif
4831 if _n_expr
== old_child
then
4832 if new_child
!= null then
4833 new_child
.parent
= self
4834 assert new_child
isa AExpr
4841 if _n_then
== old_child
then
4842 if new_child
!= null then
4843 new_child
.parent
= self
4844 assert new_child
isa AExpr
4851 if _n_else
== old_child
then
4852 if new_child
!= null then
4853 new_child
.parent
= self
4854 assert new_child
isa AExpr
4863 redef fun visit_all
(v
: Visitor)
4865 v
.enter_visit
(_n_kwif
)
4866 v
.enter_visit
(_n_expr
)
4867 if _n_then
!= null then
4868 v
.enter_visit
(_n_then
.as(not null))
4870 if _n_else
!= null then
4871 v
.enter_visit
(_n_else
.as(not null))
4875 redef fun visit_all_reverse
(v
: Visitor)
4877 v
.enter_visit
(_n_kwif
)
4878 v
.enter_visit
(_n_expr
)
4879 if _n_then
!= null then
4880 v
.enter_visit
(_n_then
.as(not null))
4882 if _n_else
!= null then
4883 v
.enter_visit
(_n_else
.as(not null))
4887 redef class AIfexprExpr
4888 redef fun n_kwif
=(n
)
4893 redef fun n_expr
=(n
)
4898 redef fun n_kwthen
=(n
)
4903 redef fun n_then
=(n
)
4908 redef fun n_kwelse
=(n
)
4913 redef fun n_else
=(n
)
4919 private init empty_init
do end
4921 init init_aifexprexpr
(
4922 n_kwif
: nullable TKwif,
4923 n_expr
: nullable AExpr,
4924 n_kwthen
: nullable TKwthen,
4925 n_then
: nullable AExpr,
4926 n_kwelse
: nullable TKwelse,
4927 n_else
: nullable AExpr
4931 _n_kwif
= n_kwif
.as(not null)
4932 n_kwif
.parent
= self
4933 _n_expr
= n_expr
.as(not null)
4934 n_expr
.parent
= self
4935 _n_kwthen
= n_kwthen
.as(not null)
4936 n_kwthen
.parent
= self
4937 _n_then
= n_then
.as(not null)
4938 n_then
.parent
= self
4939 _n_kwelse
= n_kwelse
.as(not null)
4940 n_kwelse
.parent
= self
4941 _n_else
= n_else
.as(not null)
4942 n_else
.parent
= self
4945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4947 if _n_kwif
== old_child
then
4948 if new_child
!= null then
4949 new_child
.parent
= self
4950 assert new_child
isa TKwif
4957 if _n_expr
== old_child
then
4958 if new_child
!= null then
4959 new_child
.parent
= self
4960 assert new_child
isa AExpr
4967 if _n_kwthen
== old_child
then
4968 if new_child
!= null then
4969 new_child
.parent
= self
4970 assert new_child
isa TKwthen
4971 _n_kwthen
= new_child
4977 if _n_then
== old_child
then
4978 if new_child
!= null then
4979 new_child
.parent
= self
4980 assert new_child
isa AExpr
4987 if _n_kwelse
== old_child
then
4988 if new_child
!= null then
4989 new_child
.parent
= self
4990 assert new_child
isa TKwelse
4991 _n_kwelse
= new_child
4997 if _n_else
== old_child
then
4998 if new_child
!= null then
4999 new_child
.parent
= self
5000 assert new_child
isa AExpr
5009 redef fun visit_all
(v
: Visitor)
5011 v
.enter_visit
(_n_kwif
)
5012 v
.enter_visit
(_n_expr
)
5013 v
.enter_visit
(_n_kwthen
)
5014 v
.enter_visit
(_n_then
)
5015 v
.enter_visit
(_n_kwelse
)
5016 v
.enter_visit
(_n_else
)
5019 redef fun visit_all_reverse
(v
: Visitor)
5021 v
.enter_visit
(_n_kwif
)
5022 v
.enter_visit
(_n_expr
)
5023 v
.enter_visit
(_n_kwthen
)
5024 v
.enter_visit
(_n_then
)
5025 v
.enter_visit
(_n_kwelse
)
5026 v
.enter_visit
(_n_else
)
5029 redef class AWhileExpr
5030 redef fun n_kwwhile
=(n
)
5035 redef fun n_expr
=(n
)
5040 redef fun n_kwdo
=(n
)
5045 redef fun n_block
=(n
)
5052 redef fun n_label
=(n
)
5060 private init empty_init
do end
5062 init init_awhileexpr
(
5063 n_kwwhile
: nullable TKwwhile,
5064 n_expr
: nullable AExpr,
5065 n_kwdo
: nullable TKwdo,
5066 n_block
: nullable AExpr,
5067 n_label
: nullable ALabel
5071 _n_kwwhile
= n_kwwhile
.as(not null)
5072 n_kwwhile
.parent
= self
5073 _n_expr
= n_expr
.as(not null)
5074 n_expr
.parent
= self
5075 _n_kwdo
= n_kwdo
.as(not null)
5076 n_kwdo
.parent
= self
5078 if n_block
!= null then
5079 n_block
.parent
= self
5082 if n_label
!= null then
5083 n_label
.parent
= self
5087 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5089 if _n_kwwhile
== old_child
then
5090 if new_child
!= null then
5091 new_child
.parent
= self
5092 assert new_child
isa TKwwhile
5093 _n_kwwhile
= new_child
5099 if _n_expr
== old_child
then
5100 if new_child
!= null then
5101 new_child
.parent
= self
5102 assert new_child
isa AExpr
5109 if _n_kwdo
== old_child
then
5110 if new_child
!= null then
5111 new_child
.parent
= self
5112 assert new_child
isa TKwdo
5119 if _n_block
== old_child
then
5120 if new_child
!= null then
5121 new_child
.parent
= self
5122 assert new_child
isa AExpr
5123 _n_block
= new_child
5129 if _n_label
== old_child
then
5130 if new_child
!= null then
5131 new_child
.parent
= self
5132 assert new_child
isa ALabel
5133 _n_label
= new_child
5141 redef fun visit_all
(v
: Visitor)
5143 v
.enter_visit
(_n_kwwhile
)
5144 v
.enter_visit
(_n_expr
)
5145 v
.enter_visit
(_n_kwdo
)
5146 if _n_block
!= null then
5147 v
.enter_visit
(_n_block
.as(not null))
5149 if _n_label
!= null then
5150 v
.enter_visit
(_n_label
.as(not null))
5154 redef fun visit_all_reverse
(v
: Visitor)
5156 v
.enter_visit
(_n_kwwhile
)
5157 v
.enter_visit
(_n_expr
)
5158 v
.enter_visit
(_n_kwdo
)
5159 if _n_block
!= null then
5160 v
.enter_visit
(_n_block
.as(not null))
5162 if _n_label
!= null then
5163 v
.enter_visit
(_n_label
.as(not null))
5167 redef class AForExpr
5168 redef fun n_kwfor
=(n
)
5178 redef fun n_expr
=(n
)
5183 redef fun n_kwdo
=(n
)
5188 redef fun n_block
=(n
)
5195 redef fun n_label
=(n
)
5203 private init empty_init
do end
5205 init init_aforexpr
(
5206 n_kwfor
: nullable TKwfor,
5208 n_expr
: nullable AExpr,
5209 n_kwdo
: nullable TKwdo,
5210 n_block
: nullable AExpr,
5211 n_label
: nullable ALabel
5215 _n_kwfor
= n_kwfor
.as(not null)
5216 n_kwfor
.parent
= self
5217 _n_id
= n_id
.as(not null)
5219 _n_expr
= n_expr
.as(not null)
5220 n_expr
.parent
= self
5221 _n_kwdo
= n_kwdo
.as(not null)
5222 n_kwdo
.parent
= self
5224 if n_block
!= null then
5225 n_block
.parent
= self
5228 if n_label
!= null then
5229 n_label
.parent
= self
5233 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5235 if _n_kwfor
== old_child
then
5236 if new_child
!= null then
5237 new_child
.parent
= self
5238 assert new_child
isa TKwfor
5239 _n_kwfor
= new_child
5245 if _n_id
== old_child
then
5246 if new_child
!= null then
5247 new_child
.parent
= self
5248 assert new_child
isa TId
5255 if _n_expr
== old_child
then
5256 if new_child
!= null then
5257 new_child
.parent
= self
5258 assert new_child
isa AExpr
5265 if _n_kwdo
== old_child
then
5266 if new_child
!= null then
5267 new_child
.parent
= self
5268 assert new_child
isa TKwdo
5275 if _n_block
== old_child
then
5276 if new_child
!= null then
5277 new_child
.parent
= self
5278 assert new_child
isa AExpr
5279 _n_block
= new_child
5285 if _n_label
== old_child
then
5286 if new_child
!= null then
5287 new_child
.parent
= self
5288 assert new_child
isa ALabel
5289 _n_label
= new_child
5297 redef fun visit_all
(v
: Visitor)
5299 v
.enter_visit
(_n_kwfor
)
5300 v
.enter_visit
(_n_id
)
5301 v
.enter_visit
(_n_expr
)
5302 v
.enter_visit
(_n_kwdo
)
5303 if _n_block
!= null then
5304 v
.enter_visit
(_n_block
.as(not null))
5306 if _n_label
!= null then
5307 v
.enter_visit
(_n_label
.as(not null))
5311 redef fun visit_all_reverse
(v
: Visitor)
5313 v
.enter_visit
(_n_kwfor
)
5314 v
.enter_visit
(_n_id
)
5315 v
.enter_visit
(_n_expr
)
5316 v
.enter_visit
(_n_kwdo
)
5317 if _n_block
!= null then
5318 v
.enter_visit
(_n_block
.as(not null))
5320 if _n_label
!= null then
5321 v
.enter_visit
(_n_label
.as(not null))
5325 redef class AAssertExpr
5326 redef fun n_kwassert
=(n
)
5338 redef fun n_expr
=(n
)
5344 private init empty_init
do end
5346 init init_aassertexpr
(
5347 n_kwassert
: nullable TKwassert,
5349 n_expr
: nullable AExpr
5353 _n_kwassert
= n_kwassert
.as(not null)
5354 n_kwassert
.parent
= self
5356 if n_id
!= null then
5359 _n_expr
= n_expr
.as(not null)
5360 n_expr
.parent
= self
5363 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5365 if _n_kwassert
== old_child
then
5366 if new_child
!= null then
5367 new_child
.parent
= self
5368 assert new_child
isa TKwassert
5369 _n_kwassert
= new_child
5375 if _n_id
== old_child
then
5376 if new_child
!= null then
5377 new_child
.parent
= self
5378 assert new_child
isa TId
5385 if _n_expr
== old_child
then
5386 if new_child
!= null then
5387 new_child
.parent
= self
5388 assert new_child
isa AExpr
5397 redef fun visit_all
(v
: Visitor)
5399 v
.enter_visit
(_n_kwassert
)
5400 if _n_id
!= null then
5401 v
.enter_visit
(_n_id
.as(not null))
5403 v
.enter_visit
(_n_expr
)
5406 redef fun visit_all_reverse
(v
: Visitor)
5408 v
.enter_visit
(_n_kwassert
)
5409 if _n_id
!= null then
5410 v
.enter_visit
(_n_id
.as(not null))
5412 v
.enter_visit
(_n_expr
)
5415 redef class AOnceExpr
5416 redef fun n_kwonce
=(n
)
5421 redef fun n_expr
=(n
)
5427 private init empty_init
do end
5429 init init_aonceexpr
(
5430 n_kwonce
: nullable TKwonce,
5431 n_expr
: nullable AExpr
5435 _n_kwonce
= n_kwonce
.as(not null)
5436 n_kwonce
.parent
= self
5437 _n_expr
= n_expr
.as(not null)
5438 n_expr
.parent
= self
5441 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5443 if _n_kwonce
== old_child
then
5444 if new_child
!= null then
5445 new_child
.parent
= self
5446 assert new_child
isa TKwonce
5447 _n_kwonce
= new_child
5453 if _n_expr
== old_child
then
5454 if new_child
!= null then
5455 new_child
.parent
= self
5456 assert new_child
isa AExpr
5465 redef fun visit_all
(v
: Visitor)
5467 v
.enter_visit
(_n_kwonce
)
5468 v
.enter_visit
(_n_expr
)
5471 redef fun visit_all_reverse
(v
: Visitor)
5473 v
.enter_visit
(_n_kwonce
)
5474 v
.enter_visit
(_n_expr
)
5477 redef class ASendExpr
5478 redef fun n_expr
=(n
)
5484 private init empty_init
do end
5486 init init_asendexpr
(
5487 n_expr
: nullable AExpr
5491 _n_expr
= n_expr
.as(not null)
5492 n_expr
.parent
= self
5495 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5497 if _n_expr
== old_child
then
5498 if new_child
!= null then
5499 new_child
.parent
= self
5500 assert new_child
isa AExpr
5509 redef fun visit_all
(v
: Visitor)
5511 v
.enter_visit
(_n_expr
)
5514 redef fun visit_all_reverse
(v
: Visitor)
5516 v
.enter_visit
(_n_expr
)
5519 redef class ABinopExpr
5520 redef fun n_expr
=(n
)
5525 redef fun n_expr2
=(n
)
5531 private init empty_init
do end
5533 init init_abinopexpr
(
5534 n_expr
: nullable AExpr,
5535 n_expr2
: nullable AExpr
5539 _n_expr
= n_expr
.as(not null)
5540 n_expr
.parent
= self
5541 _n_expr2
= n_expr2
.as(not null)
5542 n_expr2
.parent
= self
5545 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5547 if _n_expr
== old_child
then
5548 if new_child
!= null then
5549 new_child
.parent
= self
5550 assert new_child
isa AExpr
5557 if _n_expr2
== old_child
then
5558 if new_child
!= null then
5559 new_child
.parent
= self
5560 assert new_child
isa AExpr
5561 _n_expr2
= new_child
5569 redef fun visit_all
(v
: Visitor)
5571 v
.enter_visit
(_n_expr
)
5572 v
.enter_visit
(_n_expr2
)
5575 redef fun visit_all_reverse
(v
: Visitor)
5577 v
.enter_visit
(_n_expr
)
5578 v
.enter_visit
(_n_expr2
)
5582 redef fun n_expr
=(n
)
5587 redef fun n_expr2
=(n
)
5593 private init empty_init
do end
5596 n_expr
: nullable AExpr,
5597 n_expr2
: nullable AExpr
5601 _n_expr
= n_expr
.as(not null)
5602 n_expr
.parent
= self
5603 _n_expr2
= n_expr2
.as(not null)
5604 n_expr2
.parent
= self
5607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5609 if _n_expr
== old_child
then
5610 if new_child
!= null then
5611 new_child
.parent
= self
5612 assert new_child
isa AExpr
5619 if _n_expr2
== old_child
then
5620 if new_child
!= null then
5621 new_child
.parent
= self
5622 assert new_child
isa AExpr
5623 _n_expr2
= new_child
5631 redef fun visit_all
(v
: Visitor)
5633 v
.enter_visit
(_n_expr
)
5634 v
.enter_visit
(_n_expr2
)
5637 redef fun visit_all_reverse
(v
: Visitor)
5639 v
.enter_visit
(_n_expr
)
5640 v
.enter_visit
(_n_expr2
)
5643 redef class AAndExpr
5644 redef fun n_expr
=(n
)
5649 redef fun n_expr2
=(n
)
5655 private init empty_init
do end
5657 init init_aandexpr
(
5658 n_expr
: nullable AExpr,
5659 n_expr2
: nullable AExpr
5663 _n_expr
= n_expr
.as(not null)
5664 n_expr
.parent
= self
5665 _n_expr2
= n_expr2
.as(not null)
5666 n_expr2
.parent
= self
5669 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5671 if _n_expr
== old_child
then
5672 if new_child
!= null then
5673 new_child
.parent
= self
5674 assert new_child
isa AExpr
5681 if _n_expr2
== old_child
then
5682 if new_child
!= null then
5683 new_child
.parent
= self
5684 assert new_child
isa AExpr
5685 _n_expr2
= new_child
5693 redef fun visit_all
(v
: Visitor)
5695 v
.enter_visit
(_n_expr
)
5696 v
.enter_visit
(_n_expr2
)
5699 redef fun visit_all_reverse
(v
: Visitor)
5701 v
.enter_visit
(_n_expr
)
5702 v
.enter_visit
(_n_expr2
)
5705 redef class ANotExpr
5706 redef fun n_kwnot
=(n
)
5711 redef fun n_expr
=(n
)
5717 private init empty_init
do end
5719 init init_anotexpr
(
5720 n_kwnot
: nullable TKwnot,
5721 n_expr
: nullable AExpr
5725 _n_kwnot
= n_kwnot
.as(not null)
5726 n_kwnot
.parent
= self
5727 _n_expr
= n_expr
.as(not null)
5728 n_expr
.parent
= self
5731 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5733 if _n_kwnot
== old_child
then
5734 if new_child
!= null then
5735 new_child
.parent
= self
5736 assert new_child
isa TKwnot
5737 _n_kwnot
= new_child
5743 if _n_expr
== old_child
then
5744 if new_child
!= null then
5745 new_child
.parent
= self
5746 assert new_child
isa AExpr
5755 redef fun visit_all
(v
: Visitor)
5757 v
.enter_visit
(_n_kwnot
)
5758 v
.enter_visit
(_n_expr
)
5761 redef fun visit_all_reverse
(v
: Visitor)
5763 v
.enter_visit
(_n_kwnot
)
5764 v
.enter_visit
(_n_expr
)
5768 redef fun n_expr
=(n
)
5773 redef fun n_expr2
=(n
)
5779 private init empty_init
do end
5782 n_expr
: nullable AExpr,
5783 n_expr2
: nullable AExpr
5787 _n_expr
= n_expr
.as(not null)
5788 n_expr
.parent
= self
5789 _n_expr2
= n_expr2
.as(not null)
5790 n_expr2
.parent
= self
5793 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5795 if _n_expr
== old_child
then
5796 if new_child
!= null then
5797 new_child
.parent
= self
5798 assert new_child
isa AExpr
5805 if _n_expr2
== old_child
then
5806 if new_child
!= null then
5807 new_child
.parent
= self
5808 assert new_child
isa AExpr
5809 _n_expr2
= new_child
5817 redef fun visit_all
(v
: Visitor)
5819 v
.enter_visit
(_n_expr
)
5820 v
.enter_visit
(_n_expr2
)
5823 redef fun visit_all_reverse
(v
: Visitor)
5825 v
.enter_visit
(_n_expr
)
5826 v
.enter_visit
(_n_expr2
)
5830 redef fun n_expr
=(n
)
5835 redef fun n_expr2
=(n
)
5841 private init empty_init
do end
5844 n_expr
: nullable AExpr,
5845 n_expr2
: nullable AExpr
5849 _n_expr
= n_expr
.as(not null)
5850 n_expr
.parent
= self
5851 _n_expr2
= n_expr2
.as(not null)
5852 n_expr2
.parent
= self
5855 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5857 if _n_expr
== old_child
then
5858 if new_child
!= null then
5859 new_child
.parent
= self
5860 assert new_child
isa AExpr
5867 if _n_expr2
== old_child
then
5868 if new_child
!= null then
5869 new_child
.parent
= self
5870 assert new_child
isa AExpr
5871 _n_expr2
= new_child
5879 redef fun visit_all
(v
: Visitor)
5881 v
.enter_visit
(_n_expr
)
5882 v
.enter_visit
(_n_expr2
)
5885 redef fun visit_all_reverse
(v
: Visitor)
5887 v
.enter_visit
(_n_expr
)
5888 v
.enter_visit
(_n_expr2
)
5892 redef fun n_expr
=(n
)
5897 redef fun n_expr2
=(n
)
5903 private init empty_init
do end
5906 n_expr
: nullable AExpr,
5907 n_expr2
: nullable AExpr
5911 _n_expr
= n_expr
.as(not null)
5912 n_expr
.parent
= self
5913 _n_expr2
= n_expr2
.as(not null)
5914 n_expr2
.parent
= self
5917 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5919 if _n_expr
== old_child
then
5920 if new_child
!= null then
5921 new_child
.parent
= self
5922 assert new_child
isa AExpr
5929 if _n_expr2
== old_child
then
5930 if new_child
!= null then
5931 new_child
.parent
= self
5932 assert new_child
isa AExpr
5933 _n_expr2
= new_child
5941 redef fun visit_all
(v
: Visitor)
5943 v
.enter_visit
(_n_expr
)
5944 v
.enter_visit
(_n_expr2
)
5947 redef fun visit_all_reverse
(v
: Visitor)
5949 v
.enter_visit
(_n_expr
)
5950 v
.enter_visit
(_n_expr2
)
5954 redef fun n_expr
=(n
)
5959 redef fun n_expr2
=(n
)
5965 private init empty_init
do end
5968 n_expr
: nullable AExpr,
5969 n_expr2
: nullable AExpr
5973 _n_expr
= n_expr
.as(not null)
5974 n_expr
.parent
= self
5975 _n_expr2
= n_expr2
.as(not null)
5976 n_expr2
.parent
= self
5979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5981 if _n_expr
== old_child
then
5982 if new_child
!= null then
5983 new_child
.parent
= self
5984 assert new_child
isa AExpr
5991 if _n_expr2
== old_child
then
5992 if new_child
!= null then
5993 new_child
.parent
= self
5994 assert new_child
isa AExpr
5995 _n_expr2
= new_child
6003 redef fun visit_all
(v
: Visitor)
6005 v
.enter_visit
(_n_expr
)
6006 v
.enter_visit
(_n_expr2
)
6009 redef fun visit_all_reverse
(v
: Visitor)
6011 v
.enter_visit
(_n_expr
)
6012 v
.enter_visit
(_n_expr2
)
6016 redef fun n_expr
=(n
)
6021 redef fun n_expr2
=(n
)
6027 private init empty_init
do end
6030 n_expr
: nullable AExpr,
6031 n_expr2
: nullable AExpr
6035 _n_expr
= n_expr
.as(not null)
6036 n_expr
.parent
= self
6037 _n_expr2
= n_expr2
.as(not null)
6038 n_expr2
.parent
= self
6041 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6043 if _n_expr
== old_child
then
6044 if new_child
!= null then
6045 new_child
.parent
= self
6046 assert new_child
isa AExpr
6053 if _n_expr2
== old_child
then
6054 if new_child
!= null then
6055 new_child
.parent
= self
6056 assert new_child
isa AExpr
6057 _n_expr2
= new_child
6065 redef fun visit_all
(v
: Visitor)
6067 v
.enter_visit
(_n_expr
)
6068 v
.enter_visit
(_n_expr2
)
6071 redef fun visit_all_reverse
(v
: Visitor)
6073 v
.enter_visit
(_n_expr
)
6074 v
.enter_visit
(_n_expr2
)
6078 redef fun n_expr
=(n
)
6083 redef fun n_expr2
=(n
)
6089 private init empty_init
do end
6092 n_expr
: nullable AExpr,
6093 n_expr2
: nullable AExpr
6097 _n_expr
= n_expr
.as(not null)
6098 n_expr
.parent
= self
6099 _n_expr2
= n_expr2
.as(not null)
6100 n_expr2
.parent
= self
6103 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6105 if _n_expr
== old_child
then
6106 if new_child
!= null then
6107 new_child
.parent
= self
6108 assert new_child
isa AExpr
6115 if _n_expr2
== old_child
then
6116 if new_child
!= null then
6117 new_child
.parent
= self
6118 assert new_child
isa AExpr
6119 _n_expr2
= new_child
6127 redef fun visit_all
(v
: Visitor)
6129 v
.enter_visit
(_n_expr
)
6130 v
.enter_visit
(_n_expr2
)
6133 redef fun visit_all_reverse
(v
: Visitor)
6135 v
.enter_visit
(_n_expr
)
6136 v
.enter_visit
(_n_expr2
)
6140 redef fun n_expr
=(n
)
6145 redef fun n_expr2
=(n
)
6151 private init empty_init
do end
6154 n_expr
: nullable AExpr,
6155 n_expr2
: nullable AExpr
6159 _n_expr
= n_expr
.as(not null)
6160 n_expr
.parent
= self
6161 _n_expr2
= n_expr2
.as(not null)
6162 n_expr2
.parent
= self
6165 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6167 if _n_expr
== old_child
then
6168 if new_child
!= null then
6169 new_child
.parent
= self
6170 assert new_child
isa AExpr
6177 if _n_expr2
== old_child
then
6178 if new_child
!= null then
6179 new_child
.parent
= self
6180 assert new_child
isa AExpr
6181 _n_expr2
= new_child
6189 redef fun visit_all
(v
: Visitor)
6191 v
.enter_visit
(_n_expr
)
6192 v
.enter_visit
(_n_expr2
)
6195 redef fun visit_all_reverse
(v
: Visitor)
6197 v
.enter_visit
(_n_expr
)
6198 v
.enter_visit
(_n_expr2
)
6201 redef class AIsaExpr
6202 redef fun n_expr
=(n
)
6207 redef fun n_type
=(n
)
6213 private init empty_init
do end
6215 init init_aisaexpr
(
6216 n_expr
: nullable AExpr,
6217 n_type
: nullable AType
6221 _n_expr
= n_expr
.as(not null)
6222 n_expr
.parent
= self
6223 _n_type
= n_type
.as(not null)
6224 n_type
.parent
= self
6227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6229 if _n_expr
== old_child
then
6230 if new_child
!= null then
6231 new_child
.parent
= self
6232 assert new_child
isa AExpr
6239 if _n_type
== old_child
then
6240 if new_child
!= null then
6241 new_child
.parent
= self
6242 assert new_child
isa AType
6251 redef fun visit_all
(v
: Visitor)
6253 v
.enter_visit
(_n_expr
)
6254 v
.enter_visit
(_n_type
)
6257 redef fun visit_all_reverse
(v
: Visitor)
6259 v
.enter_visit
(_n_expr
)
6260 v
.enter_visit
(_n_type
)
6263 redef class APlusExpr
6264 redef fun n_expr
=(n
)
6269 redef fun n_expr2
=(n
)
6275 private init empty_init
do end
6277 init init_aplusexpr
(
6278 n_expr
: nullable AExpr,
6279 n_expr2
: nullable AExpr
6283 _n_expr
= n_expr
.as(not null)
6284 n_expr
.parent
= self
6285 _n_expr2
= n_expr2
.as(not null)
6286 n_expr2
.parent
= self
6289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6291 if _n_expr
== old_child
then
6292 if new_child
!= null then
6293 new_child
.parent
= self
6294 assert new_child
isa AExpr
6301 if _n_expr2
== old_child
then
6302 if new_child
!= null then
6303 new_child
.parent
= self
6304 assert new_child
isa AExpr
6305 _n_expr2
= new_child
6313 redef fun visit_all
(v
: Visitor)
6315 v
.enter_visit
(_n_expr
)
6316 v
.enter_visit
(_n_expr2
)
6319 redef fun visit_all_reverse
(v
: Visitor)
6321 v
.enter_visit
(_n_expr
)
6322 v
.enter_visit
(_n_expr2
)
6325 redef class AMinusExpr
6326 redef fun n_expr
=(n
)
6331 redef fun n_expr2
=(n
)
6337 private init empty_init
do end
6339 init init_aminusexpr
(
6340 n_expr
: nullable AExpr,
6341 n_expr2
: nullable AExpr
6345 _n_expr
= n_expr
.as(not null)
6346 n_expr
.parent
= self
6347 _n_expr2
= n_expr2
.as(not null)
6348 n_expr2
.parent
= self
6351 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6353 if _n_expr
== old_child
then
6354 if new_child
!= null then
6355 new_child
.parent
= self
6356 assert new_child
isa AExpr
6363 if _n_expr2
== old_child
then
6364 if new_child
!= null then
6365 new_child
.parent
= self
6366 assert new_child
isa AExpr
6367 _n_expr2
= new_child
6375 redef fun visit_all
(v
: Visitor)
6377 v
.enter_visit
(_n_expr
)
6378 v
.enter_visit
(_n_expr2
)
6381 redef fun visit_all_reverse
(v
: Visitor)
6383 v
.enter_visit
(_n_expr
)
6384 v
.enter_visit
(_n_expr2
)
6387 redef class AStarshipExpr
6388 redef fun n_expr
=(n
)
6393 redef fun n_expr2
=(n
)
6399 private init empty_init
do end
6401 init init_astarshipexpr
(
6402 n_expr
: nullable AExpr,
6403 n_expr2
: nullable AExpr
6407 _n_expr
= n_expr
.as(not null)
6408 n_expr
.parent
= self
6409 _n_expr2
= n_expr2
.as(not null)
6410 n_expr2
.parent
= self
6413 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6415 if _n_expr
== old_child
then
6416 if new_child
!= null then
6417 new_child
.parent
= self
6418 assert new_child
isa AExpr
6425 if _n_expr2
== old_child
then
6426 if new_child
!= null then
6427 new_child
.parent
= self
6428 assert new_child
isa AExpr
6429 _n_expr2
= new_child
6437 redef fun visit_all
(v
: Visitor)
6439 v
.enter_visit
(_n_expr
)
6440 v
.enter_visit
(_n_expr2
)
6443 redef fun visit_all_reverse
(v
: Visitor)
6445 v
.enter_visit
(_n_expr
)
6446 v
.enter_visit
(_n_expr2
)
6449 redef class AStarExpr
6450 redef fun n_expr
=(n
)
6455 redef fun n_expr2
=(n
)
6461 private init empty_init
do end
6463 init init_astarexpr
(
6464 n_expr
: nullable AExpr,
6465 n_expr2
: nullable AExpr
6469 _n_expr
= n_expr
.as(not null)
6470 n_expr
.parent
= self
6471 _n_expr2
= n_expr2
.as(not null)
6472 n_expr2
.parent
= self
6475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6477 if _n_expr
== old_child
then
6478 if new_child
!= null then
6479 new_child
.parent
= self
6480 assert new_child
isa AExpr
6487 if _n_expr2
== old_child
then
6488 if new_child
!= null then
6489 new_child
.parent
= self
6490 assert new_child
isa AExpr
6491 _n_expr2
= new_child
6499 redef fun visit_all
(v
: Visitor)
6501 v
.enter_visit
(_n_expr
)
6502 v
.enter_visit
(_n_expr2
)
6505 redef fun visit_all_reverse
(v
: Visitor)
6507 v
.enter_visit
(_n_expr
)
6508 v
.enter_visit
(_n_expr2
)
6511 redef class ASlashExpr
6512 redef fun n_expr
=(n
)
6517 redef fun n_expr2
=(n
)
6523 private init empty_init
do end
6525 init init_aslashexpr
(
6526 n_expr
: nullable AExpr,
6527 n_expr2
: nullable AExpr
6531 _n_expr
= n_expr
.as(not null)
6532 n_expr
.parent
= self
6533 _n_expr2
= n_expr2
.as(not null)
6534 n_expr2
.parent
= self
6537 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6539 if _n_expr
== old_child
then
6540 if new_child
!= null then
6541 new_child
.parent
= self
6542 assert new_child
isa AExpr
6549 if _n_expr2
== old_child
then
6550 if new_child
!= null then
6551 new_child
.parent
= self
6552 assert new_child
isa AExpr
6553 _n_expr2
= new_child
6561 redef fun visit_all
(v
: Visitor)
6563 v
.enter_visit
(_n_expr
)
6564 v
.enter_visit
(_n_expr2
)
6567 redef fun visit_all_reverse
(v
: Visitor)
6569 v
.enter_visit
(_n_expr
)
6570 v
.enter_visit
(_n_expr2
)
6573 redef class APercentExpr
6574 redef fun n_expr
=(n
)
6579 redef fun n_expr2
=(n
)
6585 private init empty_init
do end
6587 init init_apercentexpr
(
6588 n_expr
: nullable AExpr,
6589 n_expr2
: nullable AExpr
6593 _n_expr
= n_expr
.as(not null)
6594 n_expr
.parent
= self
6595 _n_expr2
= n_expr2
.as(not null)
6596 n_expr2
.parent
= self
6599 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6601 if _n_expr
== old_child
then
6602 if new_child
!= null then
6603 new_child
.parent
= self
6604 assert new_child
isa AExpr
6611 if _n_expr2
== old_child
then
6612 if new_child
!= null then
6613 new_child
.parent
= self
6614 assert new_child
isa AExpr
6615 _n_expr2
= new_child
6623 redef fun visit_all
(v
: Visitor)
6625 v
.enter_visit
(_n_expr
)
6626 v
.enter_visit
(_n_expr2
)
6629 redef fun visit_all_reverse
(v
: Visitor)
6631 v
.enter_visit
(_n_expr
)
6632 v
.enter_visit
(_n_expr2
)
6635 redef class AUminusExpr
6636 redef fun n_minus
=(n
)
6641 redef fun n_expr
=(n
)
6647 private init empty_init
do end
6649 init init_auminusexpr
(
6650 n_minus
: nullable TMinus,
6651 n_expr
: nullable AExpr
6655 _n_minus
= n_minus
.as(not null)
6656 n_minus
.parent
= self
6657 _n_expr
= n_expr
.as(not null)
6658 n_expr
.parent
= self
6661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6663 if _n_minus
== old_child
then
6664 if new_child
!= null then
6665 new_child
.parent
= self
6666 assert new_child
isa TMinus
6667 _n_minus
= new_child
6673 if _n_expr
== old_child
then
6674 if new_child
!= null then
6675 new_child
.parent
= self
6676 assert new_child
isa AExpr
6685 redef fun visit_all
(v
: Visitor)
6687 v
.enter_visit
(_n_minus
)
6688 v
.enter_visit
(_n_expr
)
6691 redef fun visit_all_reverse
(v
: Visitor)
6693 v
.enter_visit
(_n_minus
)
6694 v
.enter_visit
(_n_expr
)
6697 redef class ANewExpr
6698 redef fun n_kwnew
=(n
)
6703 redef fun n_type
=(n
)
6716 private init empty_init
do end
6718 init init_anewexpr
(
6719 n_kwnew
: nullable TKwnew,
6720 n_type
: nullable AType,
6722 n_args
: Collection[Object] # Should be Collection[AExpr]
6726 _n_kwnew
= n_kwnew
.as(not null)
6727 n_kwnew
.parent
= self
6728 _n_type
= n_type
.as(not null)
6729 n_type
.parent
= self
6731 if n_id
!= null then
6741 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6743 if _n_kwnew
== old_child
then
6744 if new_child
!= null then
6745 new_child
.parent
= self
6746 assert new_child
isa TKwnew
6747 _n_kwnew
= new_child
6753 if _n_type
== old_child
then
6754 if new_child
!= null then
6755 new_child
.parent
= self
6756 assert new_child
isa AType
6763 if _n_id
== old_child
then
6764 if new_child
!= null then
6765 new_child
.parent
= self
6766 assert new_child
isa TId
6773 for i
in [0.._n_args
.length
[ do
6774 if _n_args
[i
] == old_child
then
6775 if new_child
!= null then
6776 assert new_child
isa AExpr
6777 _n_args
[i
] = new_child
6778 new_child
.parent
= self
6780 _n_args
.remove_at
(i
)
6787 redef fun visit_all
(v
: Visitor)
6789 v
.enter_visit
(_n_kwnew
)
6790 v
.enter_visit
(_n_type
)
6791 if _n_id
!= null then
6792 v
.enter_visit
(_n_id
.as(not null))
6799 redef fun visit_all_reverse
(v
: Visitor)
6801 v
.enter_visit
(_n_kwnew
)
6802 v
.enter_visit
(_n_type
)
6803 if _n_id
!= null then
6804 v
.enter_visit
(_n_id
.as(not null))
6807 var i
= _n_args
.length
6809 v
.enter_visit
(_n_args
[i
])
6815 redef class AAttrExpr
6816 redef fun n_expr
=(n
)
6827 private init empty_init
do end
6829 init init_aattrexpr
(
6830 n_expr
: nullable AExpr,
6831 n_id
: nullable TAttrid
6835 _n_expr
= n_expr
.as(not null)
6836 n_expr
.parent
= self
6837 _n_id
= n_id
.as(not null)
6841 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6843 if _n_expr
== old_child
then
6844 if new_child
!= null then
6845 new_child
.parent
= self
6846 assert new_child
isa AExpr
6853 if _n_id
== old_child
then
6854 if new_child
!= null then
6855 new_child
.parent
= self
6856 assert new_child
isa TAttrid
6865 redef fun visit_all
(v
: Visitor)
6867 v
.enter_visit
(_n_expr
)
6868 v
.enter_visit
(_n_id
)
6871 redef fun visit_all_reverse
(v
: Visitor)
6873 v
.enter_visit
(_n_expr
)
6874 v
.enter_visit
(_n_id
)
6877 redef class AAttrAssignExpr
6878 redef fun n_expr
=(n
)
6888 redef fun n_assign
=(n
)
6893 redef fun n_value
=(n
)
6899 private init empty_init
do end
6901 init init_aattrassignexpr
(
6902 n_expr
: nullable AExpr,
6903 n_id
: nullable TAttrid,
6904 n_assign
: nullable TAssign,
6905 n_value
: nullable AExpr
6909 _n_expr
= n_expr
.as(not null)
6910 n_expr
.parent
= self
6911 _n_id
= n_id
.as(not null)
6913 _n_assign
= n_assign
.as(not null)
6914 n_assign
.parent
= self
6915 _n_value
= n_value
.as(not null)
6916 n_value
.parent
= self
6919 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6921 if _n_expr
== old_child
then
6922 if new_child
!= null then
6923 new_child
.parent
= self
6924 assert new_child
isa AExpr
6931 if _n_id
== old_child
then
6932 if new_child
!= null then
6933 new_child
.parent
= self
6934 assert new_child
isa TAttrid
6941 if _n_assign
== old_child
then
6942 if new_child
!= null then
6943 new_child
.parent
= self
6944 assert new_child
isa TAssign
6945 _n_assign
= new_child
6951 if _n_value
== old_child
then
6952 if new_child
!= null then
6953 new_child
.parent
= self
6954 assert new_child
isa AExpr
6955 _n_value
= new_child
6963 redef fun visit_all
(v
: Visitor)
6965 v
.enter_visit
(_n_expr
)
6966 v
.enter_visit
(_n_id
)
6967 v
.enter_visit
(_n_assign
)
6968 v
.enter_visit
(_n_value
)
6971 redef fun visit_all_reverse
(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 class AAttrReassignExpr
6980 redef fun n_expr
=(n
)
6990 redef fun n_assign_op
=(n
)
6995 redef fun n_value
=(n
)
7001 private init empty_init
do end
7003 init init_aattrreassignexpr
(
7004 n_expr
: nullable AExpr,
7005 n_id
: nullable TAttrid,
7006 n_assign_op
: nullable AAssignOp,
7007 n_value
: nullable AExpr
7011 _n_expr
= n_expr
.as(not null)
7012 n_expr
.parent
= self
7013 _n_id
= n_id
.as(not null)
7015 _n_assign_op
= n_assign_op
.as(not null)
7016 n_assign_op
.parent
= self
7017 _n_value
= n_value
.as(not null)
7018 n_value
.parent
= self
7021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7023 if _n_expr
== old_child
then
7024 if new_child
!= null then
7025 new_child
.parent
= self
7026 assert new_child
isa AExpr
7033 if _n_id
== old_child
then
7034 if new_child
!= null then
7035 new_child
.parent
= self
7036 assert new_child
isa TAttrid
7043 if _n_assign_op
== old_child
then
7044 if new_child
!= null then
7045 new_child
.parent
= self
7046 assert new_child
isa AAssignOp
7047 _n_assign_op
= new_child
7053 if _n_value
== old_child
then
7054 if new_child
!= null then
7055 new_child
.parent
= self
7056 assert new_child
isa AExpr
7057 _n_value
= new_child
7065 redef fun visit_all
(v
: Visitor)
7067 v
.enter_visit
(_n_expr
)
7068 v
.enter_visit
(_n_id
)
7069 v
.enter_visit
(_n_assign_op
)
7070 v
.enter_visit
(_n_value
)
7073 redef fun visit_all_reverse
(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 class ACallExpr
7082 redef fun n_expr
=(n
)
7093 private init empty_init
do end
7095 init init_acallexpr
(
7096 n_expr
: nullable AExpr,
7098 n_args
: Collection[Object], # Should be Collection[AExpr]
7099 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7103 _n_expr
= n_expr
.as(not null)
7104 n_expr
.parent
= self
7105 _n_id
= n_id
.as(not null)
7112 for n
in n_closure_defs
do
7113 assert n
isa AClosureDef
7114 _n_closure_defs
.add
(n
)
7119 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7121 if _n_expr
== old_child
then
7122 if new_child
!= null then
7123 new_child
.parent
= self
7124 assert new_child
isa AExpr
7131 if _n_id
== old_child
then
7132 if new_child
!= null then
7133 new_child
.parent
= self
7134 assert new_child
isa TId
7141 for i
in [0.._n_args
.length
[ do
7142 if _n_args
[i
] == old_child
then
7143 if new_child
!= null then
7144 assert new_child
isa AExpr
7145 _n_args
[i
] = new_child
7146 new_child
.parent
= self
7148 _n_args
.remove_at
(i
)
7153 for i
in [0.._n_closure_defs
.length
[ do
7154 if _n_closure_defs
[i
] == old_child
then
7155 if new_child
!= null then
7156 assert new_child
isa AClosureDef
7157 _n_closure_defs
[i
] = new_child
7158 new_child
.parent
= self
7160 _n_closure_defs
.remove_at
(i
)
7167 redef fun visit_all
(v
: Visitor)
7169 v
.enter_visit
(_n_expr
)
7170 v
.enter_visit
(_n_id
)
7174 for n
in _n_closure_defs
do
7179 redef fun visit_all_reverse
(v
: Visitor)
7181 v
.enter_visit
(_n_expr
)
7182 v
.enter_visit
(_n_id
)
7184 var i
= _n_args
.length
7186 v
.enter_visit
(_n_args
[i
])
7191 var i
= _n_closure_defs
.length
7193 v
.enter_visit
(_n_closure_defs
[i
])
7199 redef class ACallAssignExpr
7200 redef fun n_expr
=(n
)
7210 redef fun n_assign
=(n
)
7215 redef fun n_value
=(n
)
7221 private init empty_init
do end
7223 init init_acallassignexpr
(
7224 n_expr
: nullable AExpr,
7226 n_args
: Collection[Object], # Should be Collection[AExpr]
7227 n_assign
: nullable TAssign,
7228 n_value
: nullable AExpr
7232 _n_expr
= n_expr
.as(not null)
7233 n_expr
.parent
= self
7234 _n_id
= n_id
.as(not null)
7241 _n_assign
= n_assign
.as(not null)
7242 n_assign
.parent
= self
7243 _n_value
= n_value
.as(not null)
7244 n_value
.parent
= self
7247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7249 if _n_expr
== old_child
then
7250 if new_child
!= null then
7251 new_child
.parent
= self
7252 assert new_child
isa AExpr
7259 if _n_id
== old_child
then
7260 if new_child
!= null then
7261 new_child
.parent
= self
7262 assert new_child
isa TId
7269 for i
in [0.._n_args
.length
[ do
7270 if _n_args
[i
] == old_child
then
7271 if new_child
!= null then
7272 assert new_child
isa AExpr
7273 _n_args
[i
] = new_child
7274 new_child
.parent
= self
7276 _n_args
.remove_at
(i
)
7281 if _n_assign
== old_child
then
7282 if new_child
!= null then
7283 new_child
.parent
= self
7284 assert new_child
isa TAssign
7285 _n_assign
= new_child
7291 if _n_value
== old_child
then
7292 if new_child
!= null then
7293 new_child
.parent
= self
7294 assert new_child
isa AExpr
7295 _n_value
= new_child
7303 redef fun visit_all
(v
: Visitor)
7305 v
.enter_visit
(_n_expr
)
7306 v
.enter_visit
(_n_id
)
7310 v
.enter_visit
(_n_assign
)
7311 v
.enter_visit
(_n_value
)
7314 redef fun visit_all_reverse
(v
: Visitor)
7316 v
.enter_visit
(_n_expr
)
7317 v
.enter_visit
(_n_id
)
7319 var i
= _n_args
.length
7321 v
.enter_visit
(_n_args
[i
])
7325 v
.enter_visit
(_n_assign
)
7326 v
.enter_visit
(_n_value
)
7329 redef class ACallReassignExpr
7330 redef fun n_expr
=(n
)
7340 redef fun n_assign_op
=(n
)
7345 redef fun n_value
=(n
)
7351 private init empty_init
do end
7353 init init_acallreassignexpr
(
7354 n_expr
: nullable AExpr,
7356 n_args
: Collection[Object], # Should be Collection[AExpr]
7357 n_assign_op
: nullable AAssignOp,
7358 n_value
: nullable AExpr
7362 _n_expr
= n_expr
.as(not null)
7363 n_expr
.parent
= self
7364 _n_id
= n_id
.as(not null)
7371 _n_assign_op
= n_assign_op
.as(not null)
7372 n_assign_op
.parent
= self
7373 _n_value
= n_value
.as(not null)
7374 n_value
.parent
= self
7377 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7379 if _n_expr
== old_child
then
7380 if new_child
!= null then
7381 new_child
.parent
= self
7382 assert new_child
isa AExpr
7389 if _n_id
== old_child
then
7390 if new_child
!= null then
7391 new_child
.parent
= self
7392 assert new_child
isa TId
7399 for i
in [0.._n_args
.length
[ do
7400 if _n_args
[i
] == old_child
then
7401 if new_child
!= null then
7402 assert new_child
isa AExpr
7403 _n_args
[i
] = new_child
7404 new_child
.parent
= self
7406 _n_args
.remove_at
(i
)
7411 if _n_assign_op
== old_child
then
7412 if new_child
!= null then
7413 new_child
.parent
= self
7414 assert new_child
isa AAssignOp
7415 _n_assign_op
= new_child
7421 if _n_value
== old_child
then
7422 if new_child
!= null then
7423 new_child
.parent
= self
7424 assert new_child
isa AExpr
7425 _n_value
= new_child
7433 redef fun visit_all
(v
: Visitor)
7435 v
.enter_visit
(_n_expr
)
7436 v
.enter_visit
(_n_id
)
7440 v
.enter_visit
(_n_assign_op
)
7441 v
.enter_visit
(_n_value
)
7444 redef fun visit_all_reverse
(v
: Visitor)
7446 v
.enter_visit
(_n_expr
)
7447 v
.enter_visit
(_n_id
)
7449 var i
= _n_args
.length
7451 v
.enter_visit
(_n_args
[i
])
7455 v
.enter_visit
(_n_assign_op
)
7456 v
.enter_visit
(_n_value
)
7459 redef class ASuperExpr
7460 redef fun n_qualified
=(n
)
7467 redef fun n_kwsuper
=(n
)
7473 private init empty_init
do end
7475 init init_asuperexpr
(
7476 n_qualified
: nullable AQualified,
7477 n_kwsuper
: nullable TKwsuper,
7478 n_args
: Collection[Object] # Should be Collection[AExpr]
7482 _n_qualified
= n_qualified
7483 if n_qualified
!= null then
7484 n_qualified
.parent
= self
7486 _n_kwsuper
= n_kwsuper
.as(not null)
7487 n_kwsuper
.parent
= self
7495 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7497 if _n_qualified
== old_child
then
7498 if new_child
!= null then
7499 new_child
.parent
= self
7500 assert new_child
isa AQualified
7501 _n_qualified
= new_child
7507 if _n_kwsuper
== old_child
then
7508 if new_child
!= null then
7509 new_child
.parent
= self
7510 assert new_child
isa TKwsuper
7511 _n_kwsuper
= new_child
7517 for i
in [0.._n_args
.length
[ do
7518 if _n_args
[i
] == old_child
then
7519 if new_child
!= null then
7520 assert new_child
isa AExpr
7521 _n_args
[i
] = new_child
7522 new_child
.parent
= self
7524 _n_args
.remove_at
(i
)
7531 redef fun visit_all
(v
: Visitor)
7533 if _n_qualified
!= null then
7534 v
.enter_visit
(_n_qualified
.as(not null))
7536 v
.enter_visit
(_n_kwsuper
)
7542 redef fun visit_all_reverse
(v
: Visitor)
7544 if _n_qualified
!= null then
7545 v
.enter_visit
(_n_qualified
.as(not null))
7547 v
.enter_visit
(_n_kwsuper
)
7549 var i
= _n_args
.length
7551 v
.enter_visit
(_n_args
[i
])
7557 redef class AInitExpr
7558 redef fun n_expr
=(n
)
7563 redef fun n_kwinit
=(n
)
7569 private init empty_init
do end
7571 init init_ainitexpr
(
7572 n_expr
: nullable AExpr,
7573 n_kwinit
: nullable TKwinit,
7574 n_args
: Collection[Object] # Should be Collection[AExpr]
7578 _n_expr
= n_expr
.as(not null)
7579 n_expr
.parent
= self
7580 _n_kwinit
= n_kwinit
.as(not null)
7581 n_kwinit
.parent
= self
7589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7591 if _n_expr
== old_child
then
7592 if new_child
!= null then
7593 new_child
.parent
= self
7594 assert new_child
isa AExpr
7601 if _n_kwinit
== old_child
then
7602 if new_child
!= null then
7603 new_child
.parent
= self
7604 assert new_child
isa TKwinit
7605 _n_kwinit
= new_child
7611 for i
in [0.._n_args
.length
[ do
7612 if _n_args
[i
] == old_child
then
7613 if new_child
!= null then
7614 assert new_child
isa AExpr
7615 _n_args
[i
] = new_child
7616 new_child
.parent
= self
7618 _n_args
.remove_at
(i
)
7625 redef fun visit_all
(v
: Visitor)
7627 v
.enter_visit
(_n_expr
)
7628 v
.enter_visit
(_n_kwinit
)
7634 redef fun visit_all_reverse
(v
: Visitor)
7636 v
.enter_visit
(_n_expr
)
7637 v
.enter_visit
(_n_kwinit
)
7639 var i
= _n_args
.length
7641 v
.enter_visit
(_n_args
[i
])
7647 redef class ABraExpr
7648 redef fun n_expr
=(n
)
7654 private init empty_init
do end
7656 init init_abraexpr
(
7657 n_expr
: nullable AExpr,
7658 n_args
: Collection[Object], # Should be Collection[AExpr]
7659 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7663 _n_expr
= n_expr
.as(not null)
7664 n_expr
.parent
= self
7670 for n
in n_closure_defs
do
7671 assert n
isa AClosureDef
7672 _n_closure_defs
.add
(n
)
7677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7679 if _n_expr
== old_child
then
7680 if new_child
!= null then
7681 new_child
.parent
= self
7682 assert new_child
isa AExpr
7689 for i
in [0.._n_args
.length
[ do
7690 if _n_args
[i
] == old_child
then
7691 if new_child
!= null then
7692 assert new_child
isa AExpr
7693 _n_args
[i
] = new_child
7694 new_child
.parent
= self
7696 _n_args
.remove_at
(i
)
7701 for i
in [0.._n_closure_defs
.length
[ do
7702 if _n_closure_defs
[i
] == old_child
then
7703 if new_child
!= null then
7704 assert new_child
isa AClosureDef
7705 _n_closure_defs
[i
] = new_child
7706 new_child
.parent
= self
7708 _n_closure_defs
.remove_at
(i
)
7715 redef fun visit_all
(v
: Visitor)
7717 v
.enter_visit
(_n_expr
)
7721 for n
in _n_closure_defs
do
7726 redef fun visit_all_reverse
(v
: Visitor)
7728 v
.enter_visit
(_n_expr
)
7730 var i
= _n_args
.length
7732 v
.enter_visit
(_n_args
[i
])
7737 var i
= _n_closure_defs
.length
7739 v
.enter_visit
(_n_closure_defs
[i
])
7745 redef class ABraAssignExpr
7746 redef fun n_expr
=(n
)
7751 redef fun n_assign
=(n
)
7756 redef fun n_value
=(n
)
7762 private init empty_init
do end
7764 init init_abraassignexpr
(
7765 n_expr
: nullable AExpr,
7766 n_args
: Collection[Object], # Should be Collection[AExpr]
7767 n_assign
: nullable TAssign,
7768 n_value
: nullable AExpr
7772 _n_expr
= n_expr
.as(not null)
7773 n_expr
.parent
= self
7779 _n_assign
= n_assign
.as(not null)
7780 n_assign
.parent
= self
7781 _n_value
= n_value
.as(not null)
7782 n_value
.parent
= self
7785 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7787 if _n_expr
== old_child
then
7788 if new_child
!= null then
7789 new_child
.parent
= self
7790 assert new_child
isa AExpr
7797 for i
in [0.._n_args
.length
[ do
7798 if _n_args
[i
] == old_child
then
7799 if new_child
!= null then
7800 assert new_child
isa AExpr
7801 _n_args
[i
] = new_child
7802 new_child
.parent
= self
7804 _n_args
.remove_at
(i
)
7809 if _n_assign
== old_child
then
7810 if new_child
!= null then
7811 new_child
.parent
= self
7812 assert new_child
isa TAssign
7813 _n_assign
= new_child
7819 if _n_value
== old_child
then
7820 if new_child
!= null then
7821 new_child
.parent
= self
7822 assert new_child
isa AExpr
7823 _n_value
= new_child
7831 redef fun visit_all
(v
: Visitor)
7833 v
.enter_visit
(_n_expr
)
7837 v
.enter_visit
(_n_assign
)
7838 v
.enter_visit
(_n_value
)
7841 redef fun visit_all_reverse
(v
: Visitor)
7843 v
.enter_visit
(_n_expr
)
7845 var i
= _n_args
.length
7847 v
.enter_visit
(_n_args
[i
])
7851 v
.enter_visit
(_n_assign
)
7852 v
.enter_visit
(_n_value
)
7855 redef class ABraReassignExpr
7856 redef fun n_expr
=(n
)
7861 redef fun n_assign_op
=(n
)
7866 redef fun n_value
=(n
)
7872 private init empty_init
do end
7874 init init_abrareassignexpr
(
7875 n_expr
: nullable AExpr,
7876 n_args
: Collection[Object], # Should be Collection[AExpr]
7877 n_assign_op
: nullable AAssignOp,
7878 n_value
: nullable AExpr
7882 _n_expr
= n_expr
.as(not null)
7883 n_expr
.parent
= self
7889 _n_assign_op
= n_assign_op
.as(not null)
7890 n_assign_op
.parent
= self
7891 _n_value
= n_value
.as(not null)
7892 n_value
.parent
= self
7895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7897 if _n_expr
== old_child
then
7898 if new_child
!= null then
7899 new_child
.parent
= self
7900 assert new_child
isa AExpr
7907 for i
in [0.._n_args
.length
[ do
7908 if _n_args
[i
] == old_child
then
7909 if new_child
!= null then
7910 assert new_child
isa AExpr
7911 _n_args
[i
] = new_child
7912 new_child
.parent
= self
7914 _n_args
.remove_at
(i
)
7919 if _n_assign_op
== old_child
then
7920 if new_child
!= null then
7921 new_child
.parent
= self
7922 assert new_child
isa AAssignOp
7923 _n_assign_op
= new_child
7929 if _n_value
== old_child
then
7930 if new_child
!= null then
7931 new_child
.parent
= self
7932 assert new_child
isa AExpr
7933 _n_value
= new_child
7941 redef fun visit_all
(v
: Visitor)
7943 v
.enter_visit
(_n_expr
)
7947 v
.enter_visit
(_n_assign_op
)
7948 v
.enter_visit
(_n_value
)
7951 redef fun visit_all_reverse
(v
: Visitor)
7953 v
.enter_visit
(_n_expr
)
7955 var i
= _n_args
.length
7957 v
.enter_visit
(_n_args
[i
])
7961 v
.enter_visit
(_n_assign_op
)
7962 v
.enter_visit
(_n_value
)
7965 redef class AClosureCallExpr
7972 private init empty_init
do end
7974 init init_aclosurecallexpr
(
7976 n_args
: Collection[Object], # Should be Collection[AExpr]
7977 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7981 _n_id
= n_id
.as(not null)
7988 for n
in n_closure_defs
do
7989 assert n
isa AClosureDef
7990 _n_closure_defs
.add
(n
)
7995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7997 if _n_id
== old_child
then
7998 if new_child
!= null then
7999 new_child
.parent
= self
8000 assert new_child
isa TId
8007 for i
in [0.._n_args
.length
[ do
8008 if _n_args
[i
] == old_child
then
8009 if new_child
!= null then
8010 assert new_child
isa AExpr
8011 _n_args
[i
] = new_child
8012 new_child
.parent
= self
8014 _n_args
.remove_at
(i
)
8019 for i
in [0.._n_closure_defs
.length
[ do
8020 if _n_closure_defs
[i
] == old_child
then
8021 if new_child
!= null then
8022 assert new_child
isa AClosureDef
8023 _n_closure_defs
[i
] = new_child
8024 new_child
.parent
= self
8026 _n_closure_defs
.remove_at
(i
)
8033 redef fun visit_all
(v
: Visitor)
8035 v
.enter_visit
(_n_id
)
8039 for n
in _n_closure_defs
do
8044 redef fun visit_all_reverse
(v
: Visitor)
8046 v
.enter_visit
(_n_id
)
8048 var i
= _n_args
.length
8050 v
.enter_visit
(_n_args
[i
])
8055 var i
= _n_closure_defs
.length
8057 v
.enter_visit
(_n_closure_defs
[i
])
8063 redef class AVarExpr
8070 private init empty_init
do end
8072 init init_avarexpr
(
8077 _n_id
= n_id
.as(not null)
8081 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8083 if _n_id
== old_child
then
8084 if new_child
!= null then
8085 new_child
.parent
= self
8086 assert new_child
isa TId
8095 redef fun visit_all
(v
: Visitor)
8097 v
.enter_visit
(_n_id
)
8100 redef fun visit_all_reverse
(v
: Visitor)
8102 v
.enter_visit
(_n_id
)
8105 redef class AVarAssignExpr
8111 redef fun n_assign
=(n
)
8116 redef fun n_value
=(n
)
8122 private init empty_init
do end
8124 init init_avarassignexpr
(
8126 n_assign
: nullable TAssign,
8127 n_value
: nullable AExpr
8131 _n_id
= n_id
.as(not null)
8133 _n_assign
= n_assign
.as(not null)
8134 n_assign
.parent
= self
8135 _n_value
= n_value
.as(not null)
8136 n_value
.parent
= self
8139 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8141 if _n_id
== old_child
then
8142 if new_child
!= null then
8143 new_child
.parent
= self
8144 assert new_child
isa TId
8151 if _n_assign
== old_child
then
8152 if new_child
!= null then
8153 new_child
.parent
= self
8154 assert new_child
isa TAssign
8155 _n_assign
= new_child
8161 if _n_value
== old_child
then
8162 if new_child
!= null then
8163 new_child
.parent
= self
8164 assert new_child
isa AExpr
8165 _n_value
= new_child
8173 redef fun visit_all
(v
: Visitor)
8175 v
.enter_visit
(_n_id
)
8176 v
.enter_visit
(_n_assign
)
8177 v
.enter_visit
(_n_value
)
8180 redef fun visit_all_reverse
(v
: Visitor)
8182 v
.enter_visit
(_n_id
)
8183 v
.enter_visit
(_n_assign
)
8184 v
.enter_visit
(_n_value
)
8187 redef class AVarReassignExpr
8193 redef fun n_assign_op
=(n
)
8198 redef fun n_value
=(n
)
8204 private init empty_init
do end
8206 init init_avarreassignexpr
(
8208 n_assign_op
: nullable AAssignOp,
8209 n_value
: nullable AExpr
8213 _n_id
= n_id
.as(not null)
8215 _n_assign_op
= n_assign_op
.as(not null)
8216 n_assign_op
.parent
= self
8217 _n_value
= n_value
.as(not null)
8218 n_value
.parent
= self
8221 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8223 if _n_id
== old_child
then
8224 if new_child
!= null then
8225 new_child
.parent
= self
8226 assert new_child
isa TId
8233 if _n_assign_op
== old_child
then
8234 if new_child
!= null then
8235 new_child
.parent
= self
8236 assert new_child
isa AAssignOp
8237 _n_assign_op
= new_child
8243 if _n_value
== old_child
then
8244 if new_child
!= null then
8245 new_child
.parent
= self
8246 assert new_child
isa AExpr
8247 _n_value
= new_child
8255 redef fun visit_all
(v
: Visitor)
8257 v
.enter_visit
(_n_id
)
8258 v
.enter_visit
(_n_assign_op
)
8259 v
.enter_visit
(_n_value
)
8262 redef fun visit_all_reverse
(v
: Visitor)
8264 v
.enter_visit
(_n_id
)
8265 v
.enter_visit
(_n_assign_op
)
8266 v
.enter_visit
(_n_value
)
8269 redef class ARangeExpr
8270 redef fun n_expr
=(n
)
8275 redef fun n_expr2
=(n
)
8281 private init empty_init
do end
8283 init init_arangeexpr
(
8284 n_expr
: nullable AExpr,
8285 n_expr2
: nullable AExpr
8289 _n_expr
= n_expr
.as(not null)
8290 n_expr
.parent
= self
8291 _n_expr2
= n_expr2
.as(not null)
8292 n_expr2
.parent
= self
8295 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8297 if _n_expr
== old_child
then
8298 if new_child
!= null then
8299 new_child
.parent
= self
8300 assert new_child
isa AExpr
8307 if _n_expr2
== old_child
then
8308 if new_child
!= null then
8309 new_child
.parent
= self
8310 assert new_child
isa AExpr
8311 _n_expr2
= new_child
8319 redef fun visit_all
(v
: Visitor)
8321 v
.enter_visit
(_n_expr
)
8322 v
.enter_visit
(_n_expr2
)
8325 redef fun visit_all_reverse
(v
: Visitor)
8327 v
.enter_visit
(_n_expr
)
8328 v
.enter_visit
(_n_expr2
)
8331 redef class ACrangeExpr
8332 redef fun n_expr
=(n
)
8337 redef fun n_expr2
=(n
)
8343 private init empty_init
do end
8345 init init_acrangeexpr
(
8346 n_expr
: nullable AExpr,
8347 n_expr2
: nullable AExpr
8351 _n_expr
= n_expr
.as(not null)
8352 n_expr
.parent
= self
8353 _n_expr2
= n_expr2
.as(not null)
8354 n_expr2
.parent
= self
8357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8359 if _n_expr
== old_child
then
8360 if new_child
!= null then
8361 new_child
.parent
= self
8362 assert new_child
isa AExpr
8369 if _n_expr2
== old_child
then
8370 if new_child
!= null then
8371 new_child
.parent
= self
8372 assert new_child
isa AExpr
8373 _n_expr2
= new_child
8381 redef fun visit_all
(v
: Visitor)
8383 v
.enter_visit
(_n_expr
)
8384 v
.enter_visit
(_n_expr2
)
8387 redef fun visit_all_reverse
(v
: Visitor)
8389 v
.enter_visit
(_n_expr
)
8390 v
.enter_visit
(_n_expr2
)
8393 redef class AOrangeExpr
8394 redef fun n_expr
=(n
)
8399 redef fun n_expr2
=(n
)
8405 private init empty_init
do end
8407 init init_aorangeexpr
(
8408 n_expr
: nullable AExpr,
8409 n_expr2
: nullable AExpr
8413 _n_expr
= n_expr
.as(not null)
8414 n_expr
.parent
= self
8415 _n_expr2
= n_expr2
.as(not null)
8416 n_expr2
.parent
= self
8419 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8421 if _n_expr
== old_child
then
8422 if new_child
!= null then
8423 new_child
.parent
= self
8424 assert new_child
isa AExpr
8431 if _n_expr2
== old_child
then
8432 if new_child
!= null then
8433 new_child
.parent
= self
8434 assert new_child
isa AExpr
8435 _n_expr2
= new_child
8443 redef fun visit_all
(v
: Visitor)
8445 v
.enter_visit
(_n_expr
)
8446 v
.enter_visit
(_n_expr2
)
8449 redef fun visit_all_reverse
(v
: Visitor)
8451 v
.enter_visit
(_n_expr
)
8452 v
.enter_visit
(_n_expr2
)
8455 redef class AArrayExpr
8457 private init empty_init
do end
8459 init init_aarrayexpr
(
8460 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8471 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8473 for i
in [0.._n_exprs
.length
[ do
8474 if _n_exprs
[i
] == old_child
then
8475 if new_child
!= null then
8476 assert new_child
isa AExpr
8477 _n_exprs
[i
] = new_child
8478 new_child
.parent
= self
8480 _n_exprs
.remove_at
(i
)
8487 redef fun visit_all
(v
: Visitor)
8489 for n
in _n_exprs
do
8494 redef fun visit_all_reverse
(v
: Visitor)
8497 var i
= _n_exprs
.length
8499 v
.enter_visit
(_n_exprs
[i
])
8505 redef class ASelfExpr
8506 redef fun n_kwself
=(n
)
8512 private init empty_init
do end
8514 init init_aselfexpr
(
8515 n_kwself
: nullable TKwself
8519 _n_kwself
= n_kwself
.as(not null)
8520 n_kwself
.parent
= self
8523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8525 if _n_kwself
== old_child
then
8526 if new_child
!= null then
8527 new_child
.parent
= self
8528 assert new_child
isa TKwself
8529 _n_kwself
= new_child
8537 redef fun visit_all
(v
: Visitor)
8539 v
.enter_visit
(_n_kwself
)
8542 redef fun visit_all_reverse
(v
: Visitor)
8544 v
.enter_visit
(_n_kwself
)
8547 redef class AImplicitSelfExpr
8549 private init empty_init
do end
8551 init init_aimplicitselfexpr
8556 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8560 redef fun visit_all
(v
: Visitor)
8564 redef fun visit_all_reverse
(v
: Visitor)
8568 redef class ATrueExpr
8569 redef fun n_kwtrue
=(n
)
8575 private init empty_init
do end
8577 init init_atrueexpr
(
8578 n_kwtrue
: nullable TKwtrue
8582 _n_kwtrue
= n_kwtrue
.as(not null)
8583 n_kwtrue
.parent
= self
8586 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8588 if _n_kwtrue
== old_child
then
8589 if new_child
!= null then
8590 new_child
.parent
= self
8591 assert new_child
isa TKwtrue
8592 _n_kwtrue
= new_child
8600 redef fun visit_all
(v
: Visitor)
8602 v
.enter_visit
(_n_kwtrue
)
8605 redef fun visit_all_reverse
(v
: Visitor)
8607 v
.enter_visit
(_n_kwtrue
)
8610 redef class AFalseExpr
8611 redef fun n_kwfalse
=(n
)
8617 private init empty_init
do end
8619 init init_afalseexpr
(
8620 n_kwfalse
: nullable TKwfalse
8624 _n_kwfalse
= n_kwfalse
.as(not null)
8625 n_kwfalse
.parent
= self
8628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8630 if _n_kwfalse
== old_child
then
8631 if new_child
!= null then
8632 new_child
.parent
= self
8633 assert new_child
isa TKwfalse
8634 _n_kwfalse
= new_child
8642 redef fun visit_all
(v
: Visitor)
8644 v
.enter_visit
(_n_kwfalse
)
8647 redef fun visit_all_reverse
(v
: Visitor)
8649 v
.enter_visit
(_n_kwfalse
)
8652 redef class ANullExpr
8653 redef fun n_kwnull
=(n
)
8659 private init empty_init
do end
8661 init init_anullexpr
(
8662 n_kwnull
: nullable TKwnull
8666 _n_kwnull
= n_kwnull
.as(not null)
8667 n_kwnull
.parent
= self
8670 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8672 if _n_kwnull
== old_child
then
8673 if new_child
!= null then
8674 new_child
.parent
= self
8675 assert new_child
isa TKwnull
8676 _n_kwnull
= new_child
8684 redef fun visit_all
(v
: Visitor)
8686 v
.enter_visit
(_n_kwnull
)
8689 redef fun visit_all_reverse
(v
: Visitor)
8691 v
.enter_visit
(_n_kwnull
)
8694 redef class AIntExpr
8695 redef fun n_number
=(n
)
8701 private init empty_init
do end
8703 init init_aintexpr
(
8704 n_number
: nullable TNumber
8708 _n_number
= n_number
.as(not null)
8709 n_number
.parent
= self
8712 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8714 if _n_number
== old_child
then
8715 if new_child
!= null then
8716 new_child
.parent
= self
8717 assert new_child
isa TNumber
8718 _n_number
= new_child
8726 redef fun visit_all
(v
: Visitor)
8728 v
.enter_visit
(_n_number
)
8731 redef fun visit_all_reverse
(v
: Visitor)
8733 v
.enter_visit
(_n_number
)
8736 redef class AFloatExpr
8737 redef fun n_float
=(n
)
8743 private init empty_init
do end
8745 init init_afloatexpr
(
8746 n_float
: nullable TFloat
8750 _n_float
= n_float
.as(not null)
8751 n_float
.parent
= self
8754 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8756 if _n_float
== old_child
then
8757 if new_child
!= null then
8758 new_child
.parent
= self
8759 assert new_child
isa TFloat
8760 _n_float
= new_child
8768 redef fun visit_all
(v
: Visitor)
8770 v
.enter_visit
(_n_float
)
8773 redef fun visit_all_reverse
(v
: Visitor)
8775 v
.enter_visit
(_n_float
)
8778 redef class ACharExpr
8779 redef fun n_char
=(n
)
8785 private init empty_init
do end
8787 init init_acharexpr
(
8788 n_char
: nullable TChar
8792 _n_char
= n_char
.as(not null)
8793 n_char
.parent
= self
8796 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8798 if _n_char
== old_child
then
8799 if new_child
!= null then
8800 new_child
.parent
= self
8801 assert new_child
isa TChar
8810 redef fun visit_all
(v
: Visitor)
8812 v
.enter_visit
(_n_char
)
8815 redef fun visit_all_reverse
(v
: Visitor)
8817 v
.enter_visit
(_n_char
)
8820 redef class AStringExpr
8821 redef fun n_string
=(n
)
8827 private init empty_init
do end
8829 init init_astringexpr
(
8830 n_string
: nullable TString
8834 _n_string
= n_string
.as(not null)
8835 n_string
.parent
= self
8838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8840 if _n_string
== old_child
then
8841 if new_child
!= null then
8842 new_child
.parent
= self
8843 assert new_child
isa TString
8844 _n_string
= new_child
8852 redef fun visit_all
(v
: Visitor)
8854 v
.enter_visit
(_n_string
)
8857 redef fun visit_all_reverse
(v
: Visitor)
8859 v
.enter_visit
(_n_string
)
8862 redef class AStartStringExpr
8863 redef fun n_string
=(n
)
8869 private init empty_init
do end
8871 init init_astartstringexpr
(
8872 n_string
: nullable TStartString
8876 _n_string
= n_string
.as(not null)
8877 n_string
.parent
= self
8880 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8882 if _n_string
== old_child
then
8883 if new_child
!= null then
8884 new_child
.parent
= self
8885 assert new_child
isa TStartString
8886 _n_string
= new_child
8894 redef fun visit_all
(v
: Visitor)
8896 v
.enter_visit
(_n_string
)
8899 redef fun visit_all_reverse
(v
: Visitor)
8901 v
.enter_visit
(_n_string
)
8904 redef class AMidStringExpr
8905 redef fun n_string
=(n
)
8911 private init empty_init
do end
8913 init init_amidstringexpr
(
8914 n_string
: nullable TMidString
8918 _n_string
= n_string
.as(not null)
8919 n_string
.parent
= self
8922 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8924 if _n_string
== old_child
then
8925 if new_child
!= null then
8926 new_child
.parent
= self
8927 assert new_child
isa TMidString
8928 _n_string
= new_child
8936 redef fun visit_all
(v
: Visitor)
8938 v
.enter_visit
(_n_string
)
8941 redef fun visit_all_reverse
(v
: Visitor)
8943 v
.enter_visit
(_n_string
)
8946 redef class AEndStringExpr
8947 redef fun n_string
=(n
)
8953 private init empty_init
do end
8955 init init_aendstringexpr
(
8956 n_string
: nullable TEndString
8960 _n_string
= n_string
.as(not null)
8961 n_string
.parent
= self
8964 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8966 if _n_string
== old_child
then
8967 if new_child
!= null then
8968 new_child
.parent
= self
8969 assert new_child
isa TEndString
8970 _n_string
= new_child
8978 redef fun visit_all
(v
: Visitor)
8980 v
.enter_visit
(_n_string
)
8983 redef fun visit_all_reverse
(v
: Visitor)
8985 v
.enter_visit
(_n_string
)
8988 redef class ASuperstringExpr
8990 private init empty_init
do end
8992 init init_asuperstringexpr
(
8993 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9004 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9006 for i
in [0.._n_exprs
.length
[ do
9007 if _n_exprs
[i
] == old_child
then
9008 if new_child
!= null then
9009 assert new_child
isa AExpr
9010 _n_exprs
[i
] = new_child
9011 new_child
.parent
= self
9013 _n_exprs
.remove_at
(i
)
9020 redef fun visit_all
(v
: Visitor)
9022 for n
in _n_exprs
do
9027 redef fun visit_all_reverse
(v
: Visitor)
9030 var i
= _n_exprs
.length
9032 v
.enter_visit
(_n_exprs
[i
])
9038 redef class AParExpr
9039 redef fun n_expr
=(n
)
9045 private init empty_init
do end
9047 init init_aparexpr
(
9048 n_expr
: nullable AExpr
9052 _n_expr
= n_expr
.as(not null)
9053 n_expr
.parent
= self
9056 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9058 if _n_expr
== old_child
then
9059 if new_child
!= null then
9060 new_child
.parent
= self
9061 assert new_child
isa AExpr
9070 redef fun visit_all
(v
: Visitor)
9072 v
.enter_visit
(_n_expr
)
9075 redef fun visit_all_reverse
(v
: Visitor)
9077 v
.enter_visit
(_n_expr
)
9080 redef class AAsCastExpr
9081 redef fun n_expr
=(n
)
9086 redef fun n_kwas
=(n
)
9091 redef fun n_type
=(n
)
9097 private init empty_init
do end
9099 init init_aascastexpr
(
9100 n_expr
: nullable AExpr,
9101 n_kwas
: nullable TKwas,
9102 n_type
: nullable AType
9106 _n_expr
= n_expr
.as(not null)
9107 n_expr
.parent
= self
9108 _n_kwas
= n_kwas
.as(not null)
9109 n_kwas
.parent
= self
9110 _n_type
= n_type
.as(not null)
9111 n_type
.parent
= self
9114 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9116 if _n_expr
== old_child
then
9117 if new_child
!= null then
9118 new_child
.parent
= self
9119 assert new_child
isa AExpr
9126 if _n_kwas
== old_child
then
9127 if new_child
!= null then
9128 new_child
.parent
= self
9129 assert new_child
isa TKwas
9136 if _n_type
== old_child
then
9137 if new_child
!= null then
9138 new_child
.parent
= self
9139 assert new_child
isa AType
9148 redef fun visit_all
(v
: Visitor)
9150 v
.enter_visit
(_n_expr
)
9151 v
.enter_visit
(_n_kwas
)
9152 v
.enter_visit
(_n_type
)
9155 redef fun visit_all_reverse
(v
: Visitor)
9157 v
.enter_visit
(_n_expr
)
9158 v
.enter_visit
(_n_kwas
)
9159 v
.enter_visit
(_n_type
)
9162 redef class AAsNotnullExpr
9163 redef fun n_expr
=(n
)
9168 redef fun n_kwas
=(n
)
9173 redef fun n_kwnot
=(n
)
9178 redef fun n_kwnull
=(n
)
9184 private init empty_init
do end
9186 init init_aasnotnullexpr
(
9187 n_expr
: nullable AExpr,
9188 n_kwas
: nullable TKwas,
9189 n_kwnot
: nullable TKwnot,
9190 n_kwnull
: nullable TKwnull
9194 _n_expr
= n_expr
.as(not null)
9195 n_expr
.parent
= self
9196 _n_kwas
= n_kwas
.as(not null)
9197 n_kwas
.parent
= self
9198 _n_kwnot
= n_kwnot
.as(not null)
9199 n_kwnot
.parent
= self
9200 _n_kwnull
= n_kwnull
.as(not null)
9201 n_kwnull
.parent
= self
9204 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9206 if _n_expr
== old_child
then
9207 if new_child
!= null then
9208 new_child
.parent
= self
9209 assert new_child
isa AExpr
9216 if _n_kwas
== old_child
then
9217 if new_child
!= null then
9218 new_child
.parent
= self
9219 assert new_child
isa TKwas
9226 if _n_kwnot
== old_child
then
9227 if new_child
!= null then
9228 new_child
.parent
= self
9229 assert new_child
isa TKwnot
9230 _n_kwnot
= new_child
9236 if _n_kwnull
== old_child
then
9237 if new_child
!= null then
9238 new_child
.parent
= self
9239 assert new_child
isa TKwnull
9240 _n_kwnull
= new_child
9248 redef fun visit_all
(v
: Visitor)
9250 v
.enter_visit
(_n_expr
)
9251 v
.enter_visit
(_n_kwas
)
9252 v
.enter_visit
(_n_kwnot
)
9253 v
.enter_visit
(_n_kwnull
)
9256 redef fun visit_all_reverse
(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 class AIssetAttrExpr
9265 redef fun n_kwisset
=(n
)
9270 redef fun n_expr
=(n
)
9281 private init empty_init
do end
9283 init init_aissetattrexpr
(
9284 n_kwisset
: nullable TKwisset,
9285 n_expr
: nullable AExpr,
9286 n_id
: nullable TAttrid
9290 _n_kwisset
= n_kwisset
.as(not null)
9291 n_kwisset
.parent
= self
9292 _n_expr
= n_expr
.as(not null)
9293 n_expr
.parent
= self
9294 _n_id
= n_id
.as(not null)
9298 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9300 if _n_kwisset
== old_child
then
9301 if new_child
!= null then
9302 new_child
.parent
= self
9303 assert new_child
isa TKwisset
9304 _n_kwisset
= new_child
9310 if _n_expr
== old_child
then
9311 if new_child
!= null then
9312 new_child
.parent
= self
9313 assert new_child
isa AExpr
9320 if _n_id
== old_child
then
9321 if new_child
!= null then
9322 new_child
.parent
= self
9323 assert new_child
isa TAttrid
9332 redef fun visit_all
(v
: Visitor)
9334 v
.enter_visit
(_n_kwisset
)
9335 v
.enter_visit
(_n_expr
)
9336 v
.enter_visit
(_n_id
)
9339 redef fun visit_all_reverse
(v
: Visitor)
9341 v
.enter_visit
(_n_kwisset
)
9342 v
.enter_visit
(_n_expr
)
9343 v
.enter_visit
(_n_id
)
9346 redef class APlusAssignOp
9347 redef fun n_pluseq
=(n
)
9353 private init empty_init
do end
9355 init init_aplusassignop
(
9356 n_pluseq
: nullable TPluseq
9360 _n_pluseq
= n_pluseq
.as(not null)
9361 n_pluseq
.parent
= self
9364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9366 if _n_pluseq
== old_child
then
9367 if new_child
!= null then
9368 new_child
.parent
= self
9369 assert new_child
isa TPluseq
9370 _n_pluseq
= new_child
9378 redef fun visit_all
(v
: Visitor)
9380 v
.enter_visit
(_n_pluseq
)
9383 redef fun visit_all_reverse
(v
: Visitor)
9385 v
.enter_visit
(_n_pluseq
)
9388 redef class AMinusAssignOp
9389 redef fun n_minuseq
=(n
)
9395 private init empty_init
do end
9397 init init_aminusassignop
(
9398 n_minuseq
: nullable TMinuseq
9402 _n_minuseq
= n_minuseq
.as(not null)
9403 n_minuseq
.parent
= self
9406 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9408 if _n_minuseq
== old_child
then
9409 if new_child
!= null then
9410 new_child
.parent
= self
9411 assert new_child
isa TMinuseq
9412 _n_minuseq
= new_child
9420 redef fun visit_all
(v
: Visitor)
9422 v
.enter_visit
(_n_minuseq
)
9425 redef fun visit_all_reverse
(v
: Visitor)
9427 v
.enter_visit
(_n_minuseq
)
9430 redef class AClosureDef
9431 redef fun n_kwwith
=(n
)
9436 redef fun n_kwdo
=(n
)
9441 redef fun n_expr
=(n
)
9448 redef fun n_label
=(n
)
9456 private init empty_init
do end
9458 init init_aclosuredef
(
9459 n_kwwith
: nullable TKwwith,
9460 n_id
: Collection[Object], # Should be Collection[TId]
9461 n_kwdo
: nullable TKwdo,
9462 n_expr
: nullable AExpr,
9463 n_label
: nullable ALabel
9467 _n_kwwith
= n_kwwith
.as(not null)
9468 n_kwwith
.parent
= self
9474 _n_kwdo
= n_kwdo
.as(not null)
9475 n_kwdo
.parent
= self
9477 if n_expr
!= null then
9478 n_expr
.parent
= self
9481 if n_label
!= null then
9482 n_label
.parent
= self
9486 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9488 if _n_kwwith
== old_child
then
9489 if new_child
!= null then
9490 new_child
.parent
= self
9491 assert new_child
isa TKwwith
9492 _n_kwwith
= new_child
9498 for i
in [0.._n_id
.length
[ do
9499 if _n_id
[i
] == old_child
then
9500 if new_child
!= null then
9501 assert new_child
isa TId
9502 _n_id
[i
] = new_child
9503 new_child
.parent
= self
9510 if _n_kwdo
== old_child
then
9511 if new_child
!= null then
9512 new_child
.parent
= self
9513 assert new_child
isa TKwdo
9520 if _n_expr
== old_child
then
9521 if new_child
!= null then
9522 new_child
.parent
= self
9523 assert new_child
isa AExpr
9530 if _n_label
== old_child
then
9531 if new_child
!= null then
9532 new_child
.parent
= self
9533 assert new_child
isa ALabel
9534 _n_label
= new_child
9542 redef fun visit_all
(v
: Visitor)
9544 v
.enter_visit
(_n_kwwith
)
9548 v
.enter_visit
(_n_kwdo
)
9549 if _n_expr
!= null then
9550 v
.enter_visit
(_n_expr
.as(not null))
9552 if _n_label
!= null then
9553 v
.enter_visit
(_n_label
.as(not null))
9557 redef fun visit_all_reverse
(v
: Visitor)
9559 v
.enter_visit
(_n_kwwith
)
9561 var i
= _n_id
.length
9563 v
.enter_visit
(_n_id
[i
])
9567 v
.enter_visit
(_n_kwdo
)
9568 if _n_expr
!= null then
9569 v
.enter_visit
(_n_expr
.as(not null))
9571 if _n_label
!= null then
9572 v
.enter_visit
(_n_label
.as(not null))
9576 redef class AQualified
9577 redef fun n_classid
=(n
)
9585 private init empty_init
do end
9587 init init_aqualified
(
9588 n_id
: Collection[Object], # Should be Collection[TId]
9589 n_classid
: nullable TClassid
9598 _n_classid
= n_classid
9599 if n_classid
!= null then
9600 n_classid
.parent
= self
9604 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9606 for i
in [0.._n_id
.length
[ do
9607 if _n_id
[i
] == old_child
then
9608 if new_child
!= null then
9609 assert new_child
isa TId
9610 _n_id
[i
] = new_child
9611 new_child
.parent
= self
9618 if _n_classid
== old_child
then
9619 if new_child
!= null then
9620 new_child
.parent
= self
9621 assert new_child
isa TClassid
9622 _n_classid
= new_child
9630 redef fun visit_all
(v
: Visitor)
9635 if _n_classid
!= null then
9636 v
.enter_visit
(_n_classid
.as(not null))
9640 redef fun visit_all_reverse
(v
: Visitor)
9643 var i
= _n_id
.length
9645 v
.enter_visit
(_n_id
[i
])
9649 if _n_classid
!= null then
9650 v
.enter_visit
(_n_classid
.as(not null))
9656 private init empty_init
do end
9659 n_comment
: Collection[Object] # Should be Collection[TComment]
9663 for n
in n_comment
do
9664 assert n
isa TComment
9670 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9672 for i
in [0.._n_comment
.length
[ do
9673 if _n_comment
[i
] == old_child
then
9674 if new_child
!= null then
9675 assert new_child
isa TComment
9676 _n_comment
[i
] = new_child
9677 new_child
.parent
= self
9679 _n_comment
.remove_at
(i
)
9686 redef fun visit_all
(v
: Visitor)
9688 for n
in _n_comment
do
9693 redef fun visit_all_reverse
(v
: Visitor)
9696 var i
= _n_comment
.length
9698 v
.enter_visit
(_n_comment
[i
])
9707 n_base
: nullable AModule,
9714 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9716 if _n_base
== old_child
then
9717 if new_child
== null then
9719 new_child
.parent
= self
9720 assert new_child
isa AModule
9723 old_child
.parent
= null
9728 redef fun visit_all
(v
: Visitor)
9730 if _n_base
!= null then
9731 v
.enter_visit
(_n_base
.as(not null))
9733 v
.enter_visit
(_n_eof
)
9736 redef fun visit_all_reverse
(v
: Visitor)
9738 v
.enter_visit
(_n_eof
)
9739 if _n_base
!= null then
9740 v
.enter_visit
(_n_base
.as(not null))