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_kwvar
=(n
)
1275 redef fun n_type
=(n
)
1282 redef fun n_expr
=(n
)
1290 private init empty_init
do end
1292 init init_aattrpropdef
(
1293 n_doc
: nullable ADoc,
1294 n_readable
: nullable AAble,
1295 n_writable
: nullable AAble,
1296 n_kwredef
: nullable TKwredef,
1297 n_visibility
: nullable AVisibility,
1298 n_kwvar
: nullable TKwvar,
1299 n_id
: nullable TAttrid,
1300 n_type
: nullable AType,
1301 n_expr
: nullable AExpr
1306 if n_doc
!= null then
1309 _n_readable
= n_readable
1310 if n_readable
!= null then
1311 n_readable
.parent
= self
1313 _n_writable
= n_writable
1314 if n_writable
!= null then
1315 n_writable
.parent
= self
1317 _n_kwredef
= n_kwredef
1318 if n_kwredef
!= null then
1319 n_kwredef
.parent
= self
1321 _n_visibility
= n_visibility
.as(not null)
1322 n_visibility
.parent
= self
1323 _n_kwvar
= n_kwvar
.as(not null)
1324 n_kwvar
.parent
= self
1325 _n_id
= n_id
.as(not null)
1328 if n_type
!= null then
1329 n_type
.parent
= self
1332 if n_expr
!= null then
1333 n_expr
.parent
= self
1337 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1339 if _n_doc
== old_child
then
1340 if new_child
!= null then
1341 new_child
.parent
= self
1342 assert new_child
isa ADoc
1349 if _n_readable
== old_child
then
1350 if new_child
!= null then
1351 new_child
.parent
= self
1352 assert new_child
isa AAble
1353 _n_readable
= new_child
1359 if _n_writable
== old_child
then
1360 if new_child
!= null then
1361 new_child
.parent
= self
1362 assert new_child
isa AAble
1363 _n_writable
= new_child
1369 if _n_kwredef
== old_child
then
1370 if new_child
!= null then
1371 new_child
.parent
= self
1372 assert new_child
isa TKwredef
1373 _n_kwredef
= new_child
1379 if _n_visibility
== old_child
then
1380 if new_child
!= null then
1381 new_child
.parent
= self
1382 assert new_child
isa AVisibility
1383 _n_visibility
= new_child
1389 if _n_kwvar
== old_child
then
1390 if new_child
!= null then
1391 new_child
.parent
= self
1392 assert new_child
isa TKwvar
1393 _n_kwvar
= new_child
1399 if _n_id
== old_child
then
1400 if new_child
!= null then
1401 new_child
.parent
= self
1402 assert new_child
isa TAttrid
1409 if _n_type
== old_child
then
1410 if new_child
!= null then
1411 new_child
.parent
= self
1412 assert new_child
isa AType
1419 if _n_expr
== old_child
then
1420 if new_child
!= null then
1421 new_child
.parent
= self
1422 assert new_child
isa AExpr
1431 redef fun visit_all
(v
: Visitor)
1433 if _n_doc
!= null then
1434 v
.enter_visit
(_n_doc
.as(not null))
1436 if _n_readable
!= null then
1437 v
.enter_visit
(_n_readable
.as(not null))
1439 if _n_writable
!= null then
1440 v
.enter_visit
(_n_writable
.as(not null))
1442 if _n_kwredef
!= null then
1443 v
.enter_visit
(_n_kwredef
.as(not null))
1445 v
.enter_visit
(_n_visibility
)
1446 v
.enter_visit
(_n_kwvar
)
1447 v
.enter_visit
(_n_id
)
1448 if _n_type
!= null then
1449 v
.enter_visit
(_n_type
.as(not null))
1451 if _n_expr
!= null then
1452 v
.enter_visit
(_n_expr
.as(not null))
1456 redef fun visit_all_reverse
(v
: Visitor)
1458 if _n_doc
!= null then
1459 v
.enter_visit
(_n_doc
.as(not null))
1461 if _n_readable
!= null then
1462 v
.enter_visit
(_n_readable
.as(not null))
1464 if _n_writable
!= null then
1465 v
.enter_visit
(_n_writable
.as(not null))
1467 if _n_kwredef
!= null then
1468 v
.enter_visit
(_n_kwredef
.as(not null))
1470 v
.enter_visit
(_n_visibility
)
1471 v
.enter_visit
(_n_kwvar
)
1472 v
.enter_visit
(_n_id
)
1473 if _n_type
!= null then
1474 v
.enter_visit
(_n_type
.as(not null))
1476 if _n_expr
!= null then
1477 v
.enter_visit
(_n_expr
.as(not null))
1481 redef class AMethPropdef
1489 redef fun n_kwredef
=(n
)
1496 redef fun n_visibility
=(n
)
1501 redef fun n_methid
=(n
)
1506 redef fun n_signature
=(n
)
1512 private init empty_init
do end
1514 init init_amethpropdef
(
1515 n_doc
: nullable ADoc,
1516 n_kwredef
: nullable TKwredef,
1517 n_visibility
: nullable AVisibility,
1518 n_methid
: nullable AMethid,
1519 n_signature
: nullable ASignature
1524 if n_doc
!= null then
1527 _n_kwredef
= n_kwredef
1528 if n_kwredef
!= null then
1529 n_kwredef
.parent
= self
1531 _n_visibility
= n_visibility
.as(not null)
1532 n_visibility
.parent
= self
1533 _n_methid
= n_methid
.as(not null)
1534 n_methid
.parent
= self
1535 _n_signature
= n_signature
.as(not null)
1536 n_signature
.parent
= self
1539 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1541 if _n_doc
== old_child
then
1542 if new_child
!= null then
1543 new_child
.parent
= self
1544 assert new_child
isa ADoc
1551 if _n_kwredef
== old_child
then
1552 if new_child
!= null then
1553 new_child
.parent
= self
1554 assert new_child
isa TKwredef
1555 _n_kwredef
= new_child
1561 if _n_visibility
== old_child
then
1562 if new_child
!= null then
1563 new_child
.parent
= self
1564 assert new_child
isa AVisibility
1565 _n_visibility
= new_child
1571 if _n_methid
== old_child
then
1572 if new_child
!= null then
1573 new_child
.parent
= self
1574 assert new_child
isa AMethid
1575 _n_methid
= new_child
1581 if _n_signature
== old_child
then
1582 if new_child
!= null then
1583 new_child
.parent
= self
1584 assert new_child
isa ASignature
1585 _n_signature
= new_child
1593 redef fun visit_all
(v
: Visitor)
1595 if _n_doc
!= null then
1596 v
.enter_visit
(_n_doc
.as(not null))
1598 if _n_kwredef
!= null then
1599 v
.enter_visit
(_n_kwredef
.as(not null))
1601 v
.enter_visit
(_n_visibility
)
1602 v
.enter_visit
(_n_methid
)
1603 v
.enter_visit
(_n_signature
)
1606 redef fun visit_all_reverse
(v
: Visitor)
1608 if _n_doc
!= null then
1609 v
.enter_visit
(_n_doc
.as(not null))
1611 if _n_kwredef
!= null then
1612 v
.enter_visit
(_n_kwredef
.as(not null))
1614 v
.enter_visit
(_n_visibility
)
1615 v
.enter_visit
(_n_methid
)
1616 v
.enter_visit
(_n_signature
)
1619 redef class ADeferredMethPropdef
1627 redef fun n_kwredef
=(n
)
1634 redef fun n_visibility
=(n
)
1639 redef fun n_kwmeth
=(n
)
1644 redef fun n_methid
=(n
)
1649 redef fun n_signature
=(n
)
1655 private init empty_init
do end
1657 init init_adeferredmethpropdef
(
1658 n_doc
: nullable ADoc,
1659 n_kwredef
: nullable TKwredef,
1660 n_visibility
: nullable AVisibility,
1661 n_kwmeth
: nullable TKwmeth,
1662 n_methid
: nullable AMethid,
1663 n_signature
: nullable ASignature
1668 if n_doc
!= null then
1671 _n_kwredef
= n_kwredef
1672 if n_kwredef
!= null then
1673 n_kwredef
.parent
= self
1675 _n_visibility
= n_visibility
.as(not null)
1676 n_visibility
.parent
= self
1677 _n_kwmeth
= n_kwmeth
.as(not null)
1678 n_kwmeth
.parent
= self
1679 _n_methid
= n_methid
.as(not null)
1680 n_methid
.parent
= self
1681 _n_signature
= n_signature
.as(not null)
1682 n_signature
.parent
= self
1685 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1687 if _n_doc
== old_child
then
1688 if new_child
!= null then
1689 new_child
.parent
= self
1690 assert new_child
isa ADoc
1697 if _n_kwredef
== old_child
then
1698 if new_child
!= null then
1699 new_child
.parent
= self
1700 assert new_child
isa TKwredef
1701 _n_kwredef
= new_child
1707 if _n_visibility
== old_child
then
1708 if new_child
!= null then
1709 new_child
.parent
= self
1710 assert new_child
isa AVisibility
1711 _n_visibility
= new_child
1717 if _n_kwmeth
== old_child
then
1718 if new_child
!= null then
1719 new_child
.parent
= self
1720 assert new_child
isa TKwmeth
1721 _n_kwmeth
= new_child
1727 if _n_methid
== old_child
then
1728 if new_child
!= null then
1729 new_child
.parent
= self
1730 assert new_child
isa AMethid
1731 _n_methid
= new_child
1737 if _n_signature
== old_child
then
1738 if new_child
!= null then
1739 new_child
.parent
= self
1740 assert new_child
isa ASignature
1741 _n_signature
= new_child
1749 redef fun visit_all
(v
: Visitor)
1751 if _n_doc
!= null then
1752 v
.enter_visit
(_n_doc
.as(not null))
1754 if _n_kwredef
!= null then
1755 v
.enter_visit
(_n_kwredef
.as(not null))
1757 v
.enter_visit
(_n_visibility
)
1758 v
.enter_visit
(_n_kwmeth
)
1759 v
.enter_visit
(_n_methid
)
1760 v
.enter_visit
(_n_signature
)
1763 redef fun visit_all_reverse
(v
: Visitor)
1765 if _n_doc
!= null then
1766 v
.enter_visit
(_n_doc
.as(not null))
1768 if _n_kwredef
!= null then
1769 v
.enter_visit
(_n_kwredef
.as(not null))
1771 v
.enter_visit
(_n_visibility
)
1772 v
.enter_visit
(_n_kwmeth
)
1773 v
.enter_visit
(_n_methid
)
1774 v
.enter_visit
(_n_signature
)
1777 redef class AInternMethPropdef
1785 redef fun n_kwredef
=(n
)
1792 redef fun n_visibility
=(n
)
1797 redef fun n_kwmeth
=(n
)
1802 redef fun n_methid
=(n
)
1807 redef fun n_signature
=(n
)
1813 private init empty_init
do end
1815 init init_ainternmethpropdef
(
1816 n_doc
: nullable ADoc,
1817 n_kwredef
: nullable TKwredef,
1818 n_visibility
: nullable AVisibility,
1819 n_kwmeth
: nullable TKwmeth,
1820 n_methid
: nullable AMethid,
1821 n_signature
: nullable ASignature
1826 if n_doc
!= null then
1829 _n_kwredef
= n_kwredef
1830 if n_kwredef
!= null then
1831 n_kwredef
.parent
= self
1833 _n_visibility
= n_visibility
.as(not null)
1834 n_visibility
.parent
= self
1835 _n_kwmeth
= n_kwmeth
.as(not null)
1836 n_kwmeth
.parent
= self
1837 _n_methid
= n_methid
.as(not null)
1838 n_methid
.parent
= self
1839 _n_signature
= n_signature
.as(not null)
1840 n_signature
.parent
= self
1843 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1845 if _n_doc
== old_child
then
1846 if new_child
!= null then
1847 new_child
.parent
= self
1848 assert new_child
isa ADoc
1855 if _n_kwredef
== old_child
then
1856 if new_child
!= null then
1857 new_child
.parent
= self
1858 assert new_child
isa TKwredef
1859 _n_kwredef
= new_child
1865 if _n_visibility
== old_child
then
1866 if new_child
!= null then
1867 new_child
.parent
= self
1868 assert new_child
isa AVisibility
1869 _n_visibility
= new_child
1875 if _n_kwmeth
== old_child
then
1876 if new_child
!= null then
1877 new_child
.parent
= self
1878 assert new_child
isa TKwmeth
1879 _n_kwmeth
= new_child
1885 if _n_methid
== old_child
then
1886 if new_child
!= null then
1887 new_child
.parent
= self
1888 assert new_child
isa AMethid
1889 _n_methid
= new_child
1895 if _n_signature
== old_child
then
1896 if new_child
!= null then
1897 new_child
.parent
= self
1898 assert new_child
isa ASignature
1899 _n_signature
= new_child
1907 redef fun visit_all
(v
: Visitor)
1909 if _n_doc
!= null then
1910 v
.enter_visit
(_n_doc
.as(not null))
1912 if _n_kwredef
!= null then
1913 v
.enter_visit
(_n_kwredef
.as(not null))
1915 v
.enter_visit
(_n_visibility
)
1916 v
.enter_visit
(_n_kwmeth
)
1917 v
.enter_visit
(_n_methid
)
1918 v
.enter_visit
(_n_signature
)
1921 redef fun visit_all_reverse
(v
: Visitor)
1923 if _n_doc
!= null then
1924 v
.enter_visit
(_n_doc
.as(not null))
1926 if _n_kwredef
!= null then
1927 v
.enter_visit
(_n_kwredef
.as(not null))
1929 v
.enter_visit
(_n_visibility
)
1930 v
.enter_visit
(_n_kwmeth
)
1931 v
.enter_visit
(_n_methid
)
1932 v
.enter_visit
(_n_signature
)
1935 redef class AExternMethPropdef
1943 redef fun n_kwredef
=(n
)
1950 redef fun n_visibility
=(n
)
1955 redef fun n_kwmeth
=(n
)
1960 redef fun n_methid
=(n
)
1965 redef fun n_signature
=(n
)
1970 redef fun n_extern
=(n
)
1978 private init empty_init
do end
1980 init init_aexternmethpropdef
(
1981 n_doc
: nullable ADoc,
1982 n_kwredef
: nullable TKwredef,
1983 n_visibility
: nullable AVisibility,
1984 n_kwmeth
: nullable TKwmeth,
1985 n_methid
: nullable AMethid,
1986 n_signature
: nullable ASignature,
1987 n_extern
: nullable TString
1992 if n_doc
!= null then
1995 _n_kwredef
= n_kwredef
1996 if n_kwredef
!= null then
1997 n_kwredef
.parent
= self
1999 _n_visibility
= n_visibility
.as(not null)
2000 n_visibility
.parent
= self
2001 _n_kwmeth
= n_kwmeth
.as(not null)
2002 n_kwmeth
.parent
= self
2003 _n_methid
= n_methid
.as(not null)
2004 n_methid
.parent
= self
2005 _n_signature
= n_signature
.as(not null)
2006 n_signature
.parent
= self
2007 _n_extern
= n_extern
2008 if n_extern
!= null then
2009 n_extern
.parent
= self
2013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2015 if _n_doc
== old_child
then
2016 if new_child
!= null then
2017 new_child
.parent
= self
2018 assert new_child
isa ADoc
2025 if _n_kwredef
== old_child
then
2026 if new_child
!= null then
2027 new_child
.parent
= self
2028 assert new_child
isa TKwredef
2029 _n_kwredef
= new_child
2035 if _n_visibility
== old_child
then
2036 if new_child
!= null then
2037 new_child
.parent
= self
2038 assert new_child
isa AVisibility
2039 _n_visibility
= new_child
2045 if _n_kwmeth
== old_child
then
2046 if new_child
!= null then
2047 new_child
.parent
= self
2048 assert new_child
isa TKwmeth
2049 _n_kwmeth
= new_child
2055 if _n_methid
== old_child
then
2056 if new_child
!= null then
2057 new_child
.parent
= self
2058 assert new_child
isa AMethid
2059 _n_methid
= new_child
2065 if _n_signature
== old_child
then
2066 if new_child
!= null then
2067 new_child
.parent
= self
2068 assert new_child
isa ASignature
2069 _n_signature
= new_child
2075 if _n_extern
== old_child
then
2076 if new_child
!= null then
2077 new_child
.parent
= self
2078 assert new_child
isa TString
2079 _n_extern
= new_child
2087 redef fun visit_all
(v
: Visitor)
2089 if _n_doc
!= null then
2090 v
.enter_visit
(_n_doc
.as(not null))
2092 if _n_kwredef
!= null then
2093 v
.enter_visit
(_n_kwredef
.as(not null))
2095 v
.enter_visit
(_n_visibility
)
2096 v
.enter_visit
(_n_kwmeth
)
2097 v
.enter_visit
(_n_methid
)
2098 v
.enter_visit
(_n_signature
)
2099 if _n_extern
!= null then
2100 v
.enter_visit
(_n_extern
.as(not null))
2104 redef fun visit_all_reverse
(v
: Visitor)
2106 if _n_doc
!= null then
2107 v
.enter_visit
(_n_doc
.as(not null))
2109 if _n_kwredef
!= null then
2110 v
.enter_visit
(_n_kwredef
.as(not null))
2112 v
.enter_visit
(_n_visibility
)
2113 v
.enter_visit
(_n_kwmeth
)
2114 v
.enter_visit
(_n_methid
)
2115 v
.enter_visit
(_n_signature
)
2116 if _n_extern
!= null then
2117 v
.enter_visit
(_n_extern
.as(not null))
2121 redef class AConcreteMethPropdef
2129 redef fun n_kwredef
=(n
)
2136 redef fun n_visibility
=(n
)
2141 redef fun n_kwmeth
=(n
)
2146 redef fun n_methid
=(n
)
2151 redef fun n_signature
=(n
)
2156 redef fun n_block
=(n
)
2164 private init empty_init
do end
2166 init init_aconcretemethpropdef
(
2167 n_doc
: nullable ADoc,
2168 n_kwredef
: nullable TKwredef,
2169 n_visibility
: nullable AVisibility,
2170 n_kwmeth
: nullable TKwmeth,
2171 n_methid
: nullable AMethid,
2172 n_signature
: nullable ASignature,
2173 n_block
: nullable AExpr
2178 if n_doc
!= null then
2181 _n_kwredef
= n_kwredef
2182 if n_kwredef
!= null then
2183 n_kwredef
.parent
= self
2185 _n_visibility
= n_visibility
.as(not null)
2186 n_visibility
.parent
= self
2187 _n_kwmeth
= n_kwmeth
.as(not null)
2188 n_kwmeth
.parent
= self
2189 _n_methid
= n_methid
.as(not null)
2190 n_methid
.parent
= self
2191 _n_signature
= n_signature
.as(not null)
2192 n_signature
.parent
= self
2194 if n_block
!= null then
2195 n_block
.parent
= self
2199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2201 if _n_doc
== old_child
then
2202 if new_child
!= null then
2203 new_child
.parent
= self
2204 assert new_child
isa ADoc
2211 if _n_kwredef
== old_child
then
2212 if new_child
!= null then
2213 new_child
.parent
= self
2214 assert new_child
isa TKwredef
2215 _n_kwredef
= new_child
2221 if _n_visibility
== old_child
then
2222 if new_child
!= null then
2223 new_child
.parent
= self
2224 assert new_child
isa AVisibility
2225 _n_visibility
= new_child
2231 if _n_kwmeth
== old_child
then
2232 if new_child
!= null then
2233 new_child
.parent
= self
2234 assert new_child
isa TKwmeth
2235 _n_kwmeth
= new_child
2241 if _n_methid
== old_child
then
2242 if new_child
!= null then
2243 new_child
.parent
= self
2244 assert new_child
isa AMethid
2245 _n_methid
= new_child
2251 if _n_signature
== old_child
then
2252 if new_child
!= null then
2253 new_child
.parent
= self
2254 assert new_child
isa ASignature
2255 _n_signature
= new_child
2261 if _n_block
== old_child
then
2262 if new_child
!= null then
2263 new_child
.parent
= self
2264 assert new_child
isa AExpr
2265 _n_block
= new_child
2273 redef fun visit_all
(v
: Visitor)
2275 if _n_doc
!= null then
2276 v
.enter_visit
(_n_doc
.as(not null))
2278 if _n_kwredef
!= null then
2279 v
.enter_visit
(_n_kwredef
.as(not null))
2281 v
.enter_visit
(_n_visibility
)
2282 v
.enter_visit
(_n_kwmeth
)
2283 v
.enter_visit
(_n_methid
)
2284 v
.enter_visit
(_n_signature
)
2285 if _n_block
!= null then
2286 v
.enter_visit
(_n_block
.as(not null))
2290 redef fun visit_all_reverse
(v
: Visitor)
2292 if _n_doc
!= null then
2293 v
.enter_visit
(_n_doc
.as(not null))
2295 if _n_kwredef
!= null then
2296 v
.enter_visit
(_n_kwredef
.as(not null))
2298 v
.enter_visit
(_n_visibility
)
2299 v
.enter_visit
(_n_kwmeth
)
2300 v
.enter_visit
(_n_methid
)
2301 v
.enter_visit
(_n_signature
)
2302 if _n_block
!= null then
2303 v
.enter_visit
(_n_block
.as(not null))
2307 redef class AConcreteInitPropdef
2315 redef fun n_kwredef
=(n
)
2322 redef fun n_visibility
=(n
)
2327 redef fun n_kwinit
=(n
)
2332 redef fun n_methid
=(n
)
2339 redef fun n_signature
=(n
)
2344 redef fun n_block
=(n
)
2352 private init empty_init
do end
2354 init init_aconcreteinitpropdef
(
2355 n_doc
: nullable ADoc,
2356 n_kwredef
: nullable TKwredef,
2357 n_visibility
: nullable AVisibility,
2358 n_kwinit
: nullable TKwinit,
2359 n_methid
: nullable AMethid,
2360 n_signature
: nullable ASignature,
2361 n_block
: nullable AExpr
2366 if n_doc
!= null then
2369 _n_kwredef
= n_kwredef
2370 if n_kwredef
!= null then
2371 n_kwredef
.parent
= self
2373 _n_visibility
= n_visibility
.as(not null)
2374 n_visibility
.parent
= self
2375 _n_kwinit
= n_kwinit
.as(not null)
2376 n_kwinit
.parent
= self
2377 _n_methid
= n_methid
2378 if n_methid
!= null then
2379 n_methid
.parent
= self
2381 _n_signature
= n_signature
.as(not null)
2382 n_signature
.parent
= self
2384 if n_block
!= null then
2385 n_block
.parent
= self
2389 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2391 if _n_doc
== old_child
then
2392 if new_child
!= null then
2393 new_child
.parent
= self
2394 assert new_child
isa ADoc
2401 if _n_kwredef
== old_child
then
2402 if new_child
!= null then
2403 new_child
.parent
= self
2404 assert new_child
isa TKwredef
2405 _n_kwredef
= new_child
2411 if _n_visibility
== old_child
then
2412 if new_child
!= null then
2413 new_child
.parent
= self
2414 assert new_child
isa AVisibility
2415 _n_visibility
= new_child
2421 if _n_kwinit
== old_child
then
2422 if new_child
!= null then
2423 new_child
.parent
= self
2424 assert new_child
isa TKwinit
2425 _n_kwinit
= new_child
2431 if _n_methid
== old_child
then
2432 if new_child
!= null then
2433 new_child
.parent
= self
2434 assert new_child
isa AMethid
2435 _n_methid
= new_child
2441 if _n_signature
== old_child
then
2442 if new_child
!= null then
2443 new_child
.parent
= self
2444 assert new_child
isa ASignature
2445 _n_signature
= new_child
2451 if _n_block
== old_child
then
2452 if new_child
!= null then
2453 new_child
.parent
= self
2454 assert new_child
isa AExpr
2455 _n_block
= new_child
2463 redef fun visit_all
(v
: Visitor)
2465 if _n_doc
!= null then
2466 v
.enter_visit
(_n_doc
.as(not null))
2468 if _n_kwredef
!= null then
2469 v
.enter_visit
(_n_kwredef
.as(not null))
2471 v
.enter_visit
(_n_visibility
)
2472 v
.enter_visit
(_n_kwinit
)
2473 if _n_methid
!= null then
2474 v
.enter_visit
(_n_methid
.as(not null))
2476 v
.enter_visit
(_n_signature
)
2477 if _n_block
!= null then
2478 v
.enter_visit
(_n_block
.as(not null))
2482 redef fun visit_all_reverse
(v
: Visitor)
2484 if _n_doc
!= null then
2485 v
.enter_visit
(_n_doc
.as(not null))
2487 if _n_kwredef
!= null then
2488 v
.enter_visit
(_n_kwredef
.as(not null))
2490 v
.enter_visit
(_n_visibility
)
2491 v
.enter_visit
(_n_kwinit
)
2492 if _n_methid
!= null then
2493 v
.enter_visit
(_n_methid
.as(not null))
2495 v
.enter_visit
(_n_signature
)
2496 if _n_block
!= null then
2497 v
.enter_visit
(_n_block
.as(not null))
2501 redef class AMainMethPropdef
2502 redef fun n_kwredef
=(n
)
2509 redef fun n_block
=(n
)
2517 private init empty_init
do end
2519 init init_amainmethpropdef
(
2520 n_kwredef
: nullable TKwredef,
2521 n_block
: nullable AExpr
2525 _n_kwredef
= n_kwredef
2526 if n_kwredef
!= null then
2527 n_kwredef
.parent
= self
2530 if n_block
!= null then
2531 n_block
.parent
= self
2535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2537 if _n_kwredef
== old_child
then
2538 if new_child
!= null then
2539 new_child
.parent
= self
2540 assert new_child
isa TKwredef
2541 _n_kwredef
= new_child
2547 if _n_block
== old_child
then
2548 if new_child
!= null then
2549 new_child
.parent
= self
2550 assert new_child
isa AExpr
2551 _n_block
= new_child
2559 redef fun visit_all
(v
: Visitor)
2561 if _n_kwredef
!= null then
2562 v
.enter_visit
(_n_kwredef
.as(not null))
2564 if _n_block
!= null then
2565 v
.enter_visit
(_n_block
.as(not null))
2569 redef fun visit_all_reverse
(v
: Visitor)
2571 if _n_kwredef
!= null then
2572 v
.enter_visit
(_n_kwredef
.as(not null))
2574 if _n_block
!= null then
2575 v
.enter_visit
(_n_block
.as(not null))
2579 redef class ATypePropdef
2587 redef fun n_kwredef
=(n
)
2594 redef fun n_visibility
=(n
)
2599 redef fun n_kwtype
=(n
)
2609 redef fun n_type
=(n
)
2615 private init empty_init
do end
2617 init init_atypepropdef
(
2618 n_doc
: nullable ADoc,
2619 n_kwredef
: nullable TKwredef,
2620 n_visibility
: nullable AVisibility,
2621 n_kwtype
: nullable TKwtype,
2622 n_id
: nullable TClassid,
2623 n_type
: nullable AType
2628 if n_doc
!= null then
2631 _n_kwredef
= n_kwredef
2632 if n_kwredef
!= null then
2633 n_kwredef
.parent
= self
2635 _n_visibility
= n_visibility
.as(not null)
2636 n_visibility
.parent
= self
2637 _n_kwtype
= n_kwtype
.as(not null)
2638 n_kwtype
.parent
= self
2639 _n_id
= n_id
.as(not null)
2641 _n_type
= n_type
.as(not null)
2642 n_type
.parent
= self
2645 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2647 if _n_doc
== old_child
then
2648 if new_child
!= null then
2649 new_child
.parent
= self
2650 assert new_child
isa ADoc
2657 if _n_kwredef
== old_child
then
2658 if new_child
!= null then
2659 new_child
.parent
= self
2660 assert new_child
isa TKwredef
2661 _n_kwredef
= new_child
2667 if _n_visibility
== old_child
then
2668 if new_child
!= null then
2669 new_child
.parent
= self
2670 assert new_child
isa AVisibility
2671 _n_visibility
= new_child
2677 if _n_kwtype
== old_child
then
2678 if new_child
!= null then
2679 new_child
.parent
= self
2680 assert new_child
isa TKwtype
2681 _n_kwtype
= new_child
2687 if _n_id
== old_child
then
2688 if new_child
!= null then
2689 new_child
.parent
= self
2690 assert new_child
isa TClassid
2697 if _n_type
== old_child
then
2698 if new_child
!= null then
2699 new_child
.parent
= self
2700 assert new_child
isa AType
2709 redef fun visit_all
(v
: Visitor)
2711 if _n_doc
!= null then
2712 v
.enter_visit
(_n_doc
.as(not null))
2714 if _n_kwredef
!= null then
2715 v
.enter_visit
(_n_kwredef
.as(not null))
2717 v
.enter_visit
(_n_visibility
)
2718 v
.enter_visit
(_n_kwtype
)
2719 v
.enter_visit
(_n_id
)
2720 v
.enter_visit
(_n_type
)
2723 redef fun visit_all_reverse
(v
: Visitor)
2725 if _n_doc
!= null then
2726 v
.enter_visit
(_n_doc
.as(not null))
2728 if _n_kwredef
!= null then
2729 v
.enter_visit
(_n_kwredef
.as(not null))
2731 v
.enter_visit
(_n_visibility
)
2732 v
.enter_visit
(_n_kwtype
)
2733 v
.enter_visit
(_n_id
)
2734 v
.enter_visit
(_n_type
)
2737 redef class AReadAble
2738 redef fun n_kwredef
=(n
)
2745 redef fun n_kwreadable
=(n
)
2751 private init empty_init
do end
2753 init init_areadable
(
2754 n_kwredef
: nullable TKwredef,
2755 n_kwreadable
: nullable TKwreadable
2759 _n_kwredef
= n_kwredef
2760 if n_kwredef
!= null then
2761 n_kwredef
.parent
= self
2763 _n_kwreadable
= n_kwreadable
.as(not null)
2764 n_kwreadable
.parent
= self
2767 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2769 if _n_kwredef
== old_child
then
2770 if new_child
!= null then
2771 new_child
.parent
= self
2772 assert new_child
isa TKwredef
2773 _n_kwredef
= new_child
2779 if _n_kwreadable
== old_child
then
2780 if new_child
!= null then
2781 new_child
.parent
= self
2782 assert new_child
isa TKwreadable
2783 _n_kwreadable
= new_child
2791 redef fun visit_all
(v
: Visitor)
2793 if _n_kwredef
!= null then
2794 v
.enter_visit
(_n_kwredef
.as(not null))
2796 v
.enter_visit
(_n_kwreadable
)
2799 redef fun visit_all_reverse
(v
: Visitor)
2801 if _n_kwredef
!= null then
2802 v
.enter_visit
(_n_kwredef
.as(not null))
2804 v
.enter_visit
(_n_kwreadable
)
2807 redef class AWriteAble
2808 redef fun n_kwredef
=(n
)
2815 redef fun n_kwwritable
=(n
)
2821 private init empty_init
do end
2823 init init_awriteable
(
2824 n_kwredef
: nullable TKwredef,
2825 n_kwwritable
: nullable TKwwritable
2829 _n_kwredef
= n_kwredef
2830 if n_kwredef
!= null then
2831 n_kwredef
.parent
= self
2833 _n_kwwritable
= n_kwwritable
.as(not null)
2834 n_kwwritable
.parent
= self
2837 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2839 if _n_kwredef
== old_child
then
2840 if new_child
!= null then
2841 new_child
.parent
= self
2842 assert new_child
isa TKwredef
2843 _n_kwredef
= new_child
2849 if _n_kwwritable
== old_child
then
2850 if new_child
!= null then
2851 new_child
.parent
= self
2852 assert new_child
isa TKwwritable
2853 _n_kwwritable
= new_child
2861 redef fun visit_all
(v
: Visitor)
2863 if _n_kwredef
!= null then
2864 v
.enter_visit
(_n_kwredef
.as(not null))
2866 v
.enter_visit
(_n_kwwritable
)
2869 redef fun visit_all_reverse
(v
: Visitor)
2871 if _n_kwredef
!= null then
2872 v
.enter_visit
(_n_kwredef
.as(not null))
2874 v
.enter_visit
(_n_kwwritable
)
2877 redef class AIdMethid
2884 private init empty_init
do end
2886 init init_aidmethid
(
2891 _n_id
= n_id
.as(not null)
2895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2897 if _n_id
== old_child
then
2898 if new_child
!= null then
2899 new_child
.parent
= self
2900 assert new_child
isa TId
2909 redef fun visit_all
(v
: Visitor)
2911 v
.enter_visit
(_n_id
)
2914 redef fun visit_all_reverse
(v
: Visitor)
2916 v
.enter_visit
(_n_id
)
2919 redef class APlusMethid
2920 redef fun n_plus
=(n
)
2926 private init empty_init
do end
2928 init init_aplusmethid
(
2929 n_plus
: nullable TPlus
2933 _n_plus
= n_plus
.as(not null)
2934 n_plus
.parent
= self
2937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2939 if _n_plus
== old_child
then
2940 if new_child
!= null then
2941 new_child
.parent
= self
2942 assert new_child
isa TPlus
2951 redef fun visit_all
(v
: Visitor)
2953 v
.enter_visit
(_n_plus
)
2956 redef fun visit_all_reverse
(v
: Visitor)
2958 v
.enter_visit
(_n_plus
)
2961 redef class AMinusMethid
2962 redef fun n_minus
=(n
)
2968 private init empty_init
do end
2970 init init_aminusmethid
(
2971 n_minus
: nullable TMinus
2975 _n_minus
= n_minus
.as(not null)
2976 n_minus
.parent
= self
2979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2981 if _n_minus
== old_child
then
2982 if new_child
!= null then
2983 new_child
.parent
= self
2984 assert new_child
isa TMinus
2985 _n_minus
= new_child
2993 redef fun visit_all
(v
: Visitor)
2995 v
.enter_visit
(_n_minus
)
2998 redef fun visit_all_reverse
(v
: Visitor)
3000 v
.enter_visit
(_n_minus
)
3003 redef class AStarMethid
3004 redef fun n_star
=(n
)
3010 private init empty_init
do end
3012 init init_astarmethid
(
3013 n_star
: nullable TStar
3017 _n_star
= n_star
.as(not null)
3018 n_star
.parent
= self
3021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3023 if _n_star
== old_child
then
3024 if new_child
!= null then
3025 new_child
.parent
= self
3026 assert new_child
isa TStar
3035 redef fun visit_all
(v
: Visitor)
3037 v
.enter_visit
(_n_star
)
3040 redef fun visit_all_reverse
(v
: Visitor)
3042 v
.enter_visit
(_n_star
)
3045 redef class ASlashMethid
3046 redef fun n_slash
=(n
)
3052 private init empty_init
do end
3054 init init_aslashmethid
(
3055 n_slash
: nullable TSlash
3059 _n_slash
= n_slash
.as(not null)
3060 n_slash
.parent
= self
3063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3065 if _n_slash
== old_child
then
3066 if new_child
!= null then
3067 new_child
.parent
= self
3068 assert new_child
isa TSlash
3069 _n_slash
= new_child
3077 redef fun visit_all
(v
: Visitor)
3079 v
.enter_visit
(_n_slash
)
3082 redef fun visit_all_reverse
(v
: Visitor)
3084 v
.enter_visit
(_n_slash
)
3087 redef class APercentMethid
3088 redef fun n_percent
=(n
)
3094 private init empty_init
do end
3096 init init_apercentmethid
(
3097 n_percent
: nullable TPercent
3101 _n_percent
= n_percent
.as(not null)
3102 n_percent
.parent
= self
3105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3107 if _n_percent
== old_child
then
3108 if new_child
!= null then
3109 new_child
.parent
= self
3110 assert new_child
isa TPercent
3111 _n_percent
= new_child
3119 redef fun visit_all
(v
: Visitor)
3121 v
.enter_visit
(_n_percent
)
3124 redef fun visit_all_reverse
(v
: Visitor)
3126 v
.enter_visit
(_n_percent
)
3129 redef class AEqMethid
3136 private init empty_init
do end
3138 init init_aeqmethid
(
3143 _n_eq
= n_eq
.as(not null)
3147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3149 if _n_eq
== old_child
then
3150 if new_child
!= null then
3151 new_child
.parent
= self
3152 assert new_child
isa TEq
3161 redef fun visit_all
(v
: Visitor)
3163 v
.enter_visit
(_n_eq
)
3166 redef fun visit_all_reverse
(v
: Visitor)
3168 v
.enter_visit
(_n_eq
)
3171 redef class ANeMethid
3178 private init empty_init
do end
3180 init init_anemethid
(
3185 _n_ne
= n_ne
.as(not null)
3189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3191 if _n_ne
== old_child
then
3192 if new_child
!= null then
3193 new_child
.parent
= self
3194 assert new_child
isa TNe
3203 redef fun visit_all
(v
: Visitor)
3205 v
.enter_visit
(_n_ne
)
3208 redef fun visit_all_reverse
(v
: Visitor)
3210 v
.enter_visit
(_n_ne
)
3213 redef class ALeMethid
3220 private init empty_init
do end
3222 init init_alemethid
(
3227 _n_le
= n_le
.as(not null)
3231 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3233 if _n_le
== old_child
then
3234 if new_child
!= null then
3235 new_child
.parent
= self
3236 assert new_child
isa TLe
3245 redef fun visit_all
(v
: Visitor)
3247 v
.enter_visit
(_n_le
)
3250 redef fun visit_all_reverse
(v
: Visitor)
3252 v
.enter_visit
(_n_le
)
3255 redef class AGeMethid
3262 private init empty_init
do end
3264 init init_agemethid
(
3269 _n_ge
= n_ge
.as(not null)
3273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3275 if _n_ge
== old_child
then
3276 if new_child
!= null then
3277 new_child
.parent
= self
3278 assert new_child
isa TGe
3287 redef fun visit_all
(v
: Visitor)
3289 v
.enter_visit
(_n_ge
)
3292 redef fun visit_all_reverse
(v
: Visitor)
3294 v
.enter_visit
(_n_ge
)
3297 redef class ALtMethid
3304 private init empty_init
do end
3306 init init_altmethid
(
3311 _n_lt
= n_lt
.as(not null)
3315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3317 if _n_lt
== old_child
then
3318 if new_child
!= null then
3319 new_child
.parent
= self
3320 assert new_child
isa TLt
3329 redef fun visit_all
(v
: Visitor)
3331 v
.enter_visit
(_n_lt
)
3334 redef fun visit_all_reverse
(v
: Visitor)
3336 v
.enter_visit
(_n_lt
)
3339 redef class AGtMethid
3346 private init empty_init
do end
3348 init init_agtmethid
(
3353 _n_gt
= n_gt
.as(not null)
3357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3359 if _n_gt
== old_child
then
3360 if new_child
!= null then
3361 new_child
.parent
= self
3362 assert new_child
isa TGt
3371 redef fun visit_all
(v
: Visitor)
3373 v
.enter_visit
(_n_gt
)
3376 redef fun visit_all_reverse
(v
: Visitor)
3378 v
.enter_visit
(_n_gt
)
3381 redef class ABraMethid
3382 redef fun n_obra
=(n
)
3387 redef fun n_cbra
=(n
)
3393 private init empty_init
do end
3395 init init_abramethid
(
3396 n_obra
: nullable TObra,
3397 n_cbra
: nullable TCbra
3401 _n_obra
= n_obra
.as(not null)
3402 n_obra
.parent
= self
3403 _n_cbra
= n_cbra
.as(not null)
3404 n_cbra
.parent
= self
3407 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3409 if _n_obra
== old_child
then
3410 if new_child
!= null then
3411 new_child
.parent
= self
3412 assert new_child
isa TObra
3419 if _n_cbra
== old_child
then
3420 if new_child
!= null then
3421 new_child
.parent
= self
3422 assert new_child
isa TCbra
3431 redef fun visit_all
(v
: Visitor)
3433 v
.enter_visit
(_n_obra
)
3434 v
.enter_visit
(_n_cbra
)
3437 redef fun visit_all_reverse
(v
: Visitor)
3439 v
.enter_visit
(_n_obra
)
3440 v
.enter_visit
(_n_cbra
)
3443 redef class AStarshipMethid
3444 redef fun n_starship
=(n
)
3450 private init empty_init
do end
3452 init init_astarshipmethid
(
3453 n_starship
: nullable TStarship
3457 _n_starship
= n_starship
.as(not null)
3458 n_starship
.parent
= self
3461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3463 if _n_starship
== old_child
then
3464 if new_child
!= null then
3465 new_child
.parent
= self
3466 assert new_child
isa TStarship
3467 _n_starship
= new_child
3475 redef fun visit_all
(v
: Visitor)
3477 v
.enter_visit
(_n_starship
)
3480 redef fun visit_all_reverse
(v
: Visitor)
3482 v
.enter_visit
(_n_starship
)
3485 redef class AAssignMethid
3491 redef fun n_assign
=(n
)
3497 private init empty_init
do end
3499 init init_aassignmethid
(
3501 n_assign
: nullable TAssign
3505 _n_id
= n_id
.as(not null)
3507 _n_assign
= n_assign
.as(not null)
3508 n_assign
.parent
= self
3511 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3513 if _n_id
== old_child
then
3514 if new_child
!= null then
3515 new_child
.parent
= self
3516 assert new_child
isa TId
3523 if _n_assign
== old_child
then
3524 if new_child
!= null then
3525 new_child
.parent
= self
3526 assert new_child
isa TAssign
3527 _n_assign
= new_child
3535 redef fun visit_all
(v
: Visitor)
3537 v
.enter_visit
(_n_id
)
3538 v
.enter_visit
(_n_assign
)
3541 redef fun visit_all_reverse
(v
: Visitor)
3543 v
.enter_visit
(_n_id
)
3544 v
.enter_visit
(_n_assign
)
3547 redef class ABraassignMethid
3548 redef fun n_obra
=(n
)
3553 redef fun n_cbra
=(n
)
3558 redef fun n_assign
=(n
)
3564 private init empty_init
do end
3566 init init_abraassignmethid
(
3567 n_obra
: nullable TObra,
3568 n_cbra
: nullable TCbra,
3569 n_assign
: nullable TAssign
3573 _n_obra
= n_obra
.as(not null)
3574 n_obra
.parent
= self
3575 _n_cbra
= n_cbra
.as(not null)
3576 n_cbra
.parent
= self
3577 _n_assign
= n_assign
.as(not null)
3578 n_assign
.parent
= self
3581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3583 if _n_obra
== old_child
then
3584 if new_child
!= null then
3585 new_child
.parent
= self
3586 assert new_child
isa TObra
3593 if _n_cbra
== old_child
then
3594 if new_child
!= null then
3595 new_child
.parent
= self
3596 assert new_child
isa TCbra
3603 if _n_assign
== old_child
then
3604 if new_child
!= null then
3605 new_child
.parent
= self
3606 assert new_child
isa TAssign
3607 _n_assign
= new_child
3615 redef fun visit_all
(v
: Visitor)
3617 v
.enter_visit
(_n_obra
)
3618 v
.enter_visit
(_n_cbra
)
3619 v
.enter_visit
(_n_assign
)
3622 redef fun visit_all_reverse
(v
: Visitor)
3624 v
.enter_visit
(_n_obra
)
3625 v
.enter_visit
(_n_cbra
)
3626 v
.enter_visit
(_n_assign
)
3629 redef class ASignature
3630 redef fun n_type
=(n
)
3638 private init empty_init
do end
3640 init init_asignature
(
3641 n_params
: Collection[Object], # Should be Collection[AParam]
3642 n_type
: nullable AType,
3643 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3647 for n
in n_params
do
3653 if n_type
!= null then
3654 n_type
.parent
= self
3656 for n
in n_closure_decls
do
3657 assert n
isa AClosureDecl
3658 _n_closure_decls
.add
(n
)
3663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3665 for i
in [0.._n_params
.length
[ do
3666 if _n_params
[i
] == old_child
then
3667 if new_child
!= null then
3668 assert new_child
isa AParam
3669 _n_params
[i
] = new_child
3670 new_child
.parent
= self
3672 _n_params
.remove_at
(i
)
3677 if _n_type
== old_child
then
3678 if new_child
!= null then
3679 new_child
.parent
= self
3680 assert new_child
isa AType
3687 for i
in [0.._n_closure_decls
.length
[ do
3688 if _n_closure_decls
[i
] == old_child
then
3689 if new_child
!= null then
3690 assert new_child
isa AClosureDecl
3691 _n_closure_decls
[i
] = new_child
3692 new_child
.parent
= self
3694 _n_closure_decls
.remove_at
(i
)
3701 redef fun visit_all
(v
: Visitor)
3703 for n
in _n_params
do
3706 if _n_type
!= null then
3707 v
.enter_visit
(_n_type
.as(not null))
3709 for n
in _n_closure_decls
do
3714 redef fun visit_all_reverse
(v
: Visitor)
3717 var i
= _n_params
.length
3719 v
.enter_visit
(_n_params
[i
])
3723 if _n_type
!= null then
3724 v
.enter_visit
(_n_type
.as(not null))
3727 var i
= _n_closure_decls
.length
3729 v
.enter_visit
(_n_closure_decls
[i
])
3741 redef fun n_type
=(n
)
3748 redef fun n_dotdotdot
=(n
)
3756 private init empty_init
do end
3760 n_type
: nullable AType,
3761 n_dotdotdot
: nullable TDotdotdot
3765 _n_id
= n_id
.as(not null)
3768 if n_type
!= null then
3769 n_type
.parent
= self
3771 _n_dotdotdot
= n_dotdotdot
3772 if n_dotdotdot
!= null then
3773 n_dotdotdot
.parent
= self
3777 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3779 if _n_id
== old_child
then
3780 if new_child
!= null then
3781 new_child
.parent
= self
3782 assert new_child
isa TId
3789 if _n_type
== old_child
then
3790 if new_child
!= null then
3791 new_child
.parent
= self
3792 assert new_child
isa AType
3799 if _n_dotdotdot
== old_child
then
3800 if new_child
!= null then
3801 new_child
.parent
= self
3802 assert new_child
isa TDotdotdot
3803 _n_dotdotdot
= new_child
3811 redef fun visit_all
(v
: Visitor)
3813 v
.enter_visit
(_n_id
)
3814 if _n_type
!= null then
3815 v
.enter_visit
(_n_type
.as(not null))
3817 if _n_dotdotdot
!= null then
3818 v
.enter_visit
(_n_dotdotdot
.as(not null))
3822 redef fun visit_all_reverse
(v
: Visitor)
3824 v
.enter_visit
(_n_id
)
3825 if _n_type
!= null then
3826 v
.enter_visit
(_n_type
.as(not null))
3828 if _n_dotdotdot
!= null then
3829 v
.enter_visit
(_n_dotdotdot
.as(not null))
3833 redef class AClosureDecl
3834 redef fun n_kwbreak
=(n
)
3841 redef fun n_bang
=(n
)
3851 redef fun n_signature
=(n
)
3856 redef fun n_expr
=(n
)
3864 private init empty_init
do end
3866 init init_aclosuredecl
(
3867 n_kwbreak
: nullable TKwbreak,
3868 n_bang
: nullable TBang,
3870 n_signature
: nullable ASignature,
3871 n_expr
: nullable AExpr
3875 _n_kwbreak
= n_kwbreak
3876 if n_kwbreak
!= null then
3877 n_kwbreak
.parent
= self
3879 _n_bang
= n_bang
.as(not null)
3880 n_bang
.parent
= self
3881 _n_id
= n_id
.as(not null)
3883 _n_signature
= n_signature
.as(not null)
3884 n_signature
.parent
= self
3886 if n_expr
!= null then
3887 n_expr
.parent
= self
3891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3893 if _n_kwbreak
== old_child
then
3894 if new_child
!= null then
3895 new_child
.parent
= self
3896 assert new_child
isa TKwbreak
3897 _n_kwbreak
= new_child
3903 if _n_bang
== old_child
then
3904 if new_child
!= null then
3905 new_child
.parent
= self
3906 assert new_child
isa TBang
3913 if _n_id
== old_child
then
3914 if new_child
!= null then
3915 new_child
.parent
= self
3916 assert new_child
isa TId
3923 if _n_signature
== old_child
then
3924 if new_child
!= null then
3925 new_child
.parent
= self
3926 assert new_child
isa ASignature
3927 _n_signature
= new_child
3933 if _n_expr
== old_child
then
3934 if new_child
!= null then
3935 new_child
.parent
= self
3936 assert new_child
isa AExpr
3945 redef fun visit_all
(v
: Visitor)
3947 if _n_kwbreak
!= null then
3948 v
.enter_visit
(_n_kwbreak
.as(not null))
3950 v
.enter_visit
(_n_bang
)
3951 v
.enter_visit
(_n_id
)
3952 v
.enter_visit
(_n_signature
)
3953 if _n_expr
!= null then
3954 v
.enter_visit
(_n_expr
.as(not null))
3958 redef fun visit_all_reverse
(v
: Visitor)
3960 if _n_kwbreak
!= null then
3961 v
.enter_visit
(_n_kwbreak
.as(not null))
3963 v
.enter_visit
(_n_bang
)
3964 v
.enter_visit
(_n_id
)
3965 v
.enter_visit
(_n_signature
)
3966 if _n_expr
!= null then
3967 v
.enter_visit
(_n_expr
.as(not null))
3972 redef fun n_kwnullable
=(n
)
3985 private init empty_init
do end
3988 n_kwnullable
: nullable TKwnullable,
3989 n_id
: nullable TClassid,
3990 n_types
: Collection[Object] # Should be Collection[AType]
3994 _n_kwnullable
= n_kwnullable
3995 if n_kwnullable
!= null then
3996 n_kwnullable
.parent
= self
3998 _n_id
= n_id
.as(not null)
4007 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4009 if _n_kwnullable
== old_child
then
4010 if new_child
!= null then
4011 new_child
.parent
= self
4012 assert new_child
isa TKwnullable
4013 _n_kwnullable
= new_child
4015 _n_kwnullable
= null
4019 if _n_id
== old_child
then
4020 if new_child
!= null then
4021 new_child
.parent
= self
4022 assert new_child
isa TClassid
4029 for i
in [0.._n_types
.length
[ do
4030 if _n_types
[i
] == old_child
then
4031 if new_child
!= null then
4032 assert new_child
isa AType
4033 _n_types
[i
] = new_child
4034 new_child
.parent
= self
4036 _n_types
.remove_at
(i
)
4043 redef fun visit_all
(v
: Visitor)
4045 if _n_kwnullable
!= null then
4046 v
.enter_visit
(_n_kwnullable
.as(not null))
4048 v
.enter_visit
(_n_id
)
4049 for n
in _n_types
do
4054 redef fun visit_all_reverse
(v
: Visitor)
4056 if _n_kwnullable
!= null then
4057 v
.enter_visit
(_n_kwnullable
.as(not null))
4059 v
.enter_visit
(_n_id
)
4061 var i
= _n_types
.length
4063 v
.enter_visit
(_n_types
[i
])
4070 redef fun n_kwlabel
=(n
)
4081 private init empty_init
do end
4084 n_kwlabel
: nullable TKwlabel,
4089 _n_kwlabel
= n_kwlabel
.as(not null)
4090 n_kwlabel
.parent
= self
4091 _n_id
= n_id
.as(not null)
4095 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4097 if _n_kwlabel
== old_child
then
4098 if new_child
!= null then
4099 new_child
.parent
= self
4100 assert new_child
isa TKwlabel
4101 _n_kwlabel
= new_child
4107 if _n_id
== old_child
then
4108 if new_child
!= null then
4109 new_child
.parent
= self
4110 assert new_child
isa TId
4119 redef fun visit_all
(v
: Visitor)
4121 v
.enter_visit
(_n_kwlabel
)
4122 v
.enter_visit
(_n_id
)
4125 redef fun visit_all_reverse
(v
: Visitor)
4127 v
.enter_visit
(_n_kwlabel
)
4128 v
.enter_visit
(_n_id
)
4131 redef class ABlockExpr
4133 private init empty_init
do end
4135 init init_ablockexpr
(
4136 n_expr
: Collection[Object] # Should be Collection[AExpr]
4147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4149 for i
in [0.._n_expr
.length
[ do
4150 if _n_expr
[i
] == old_child
then
4151 if new_child
!= null then
4152 assert new_child
isa AExpr
4153 _n_expr
[i
] = new_child
4154 new_child
.parent
= self
4156 _n_expr
.remove_at
(i
)
4163 redef fun visit_all
(v
: Visitor)
4170 redef fun visit_all_reverse
(v
: Visitor)
4173 var i
= _n_expr
.length
4175 v
.enter_visit
(_n_expr
[i
])
4181 redef class AVardeclExpr
4182 redef fun n_kwvar
=(n
)
4192 redef fun n_type
=(n
)
4199 redef fun n_assign
=(n
)
4206 redef fun n_expr
=(n
)
4214 private init empty_init
do end
4216 init init_avardeclexpr
(
4217 n_kwvar
: nullable TKwvar,
4219 n_type
: nullable AType,
4220 n_assign
: nullable TAssign,
4221 n_expr
: nullable AExpr
4225 _n_kwvar
= n_kwvar
.as(not null)
4226 n_kwvar
.parent
= self
4227 _n_id
= n_id
.as(not null)
4230 if n_type
!= null then
4231 n_type
.parent
= self
4233 _n_assign
= n_assign
4234 if n_assign
!= null then
4235 n_assign
.parent
= self
4238 if n_expr
!= null then
4239 n_expr
.parent
= self
4243 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4245 if _n_kwvar
== old_child
then
4246 if new_child
!= null then
4247 new_child
.parent
= self
4248 assert new_child
isa TKwvar
4249 _n_kwvar
= new_child
4255 if _n_id
== old_child
then
4256 if new_child
!= null then
4257 new_child
.parent
= self
4258 assert new_child
isa TId
4265 if _n_type
== old_child
then
4266 if new_child
!= null then
4267 new_child
.parent
= self
4268 assert new_child
isa AType
4275 if _n_assign
== old_child
then
4276 if new_child
!= null then
4277 new_child
.parent
= self
4278 assert new_child
isa TAssign
4279 _n_assign
= new_child
4285 if _n_expr
== old_child
then
4286 if new_child
!= null then
4287 new_child
.parent
= self
4288 assert new_child
isa AExpr
4297 redef fun visit_all
(v
: Visitor)
4299 v
.enter_visit
(_n_kwvar
)
4300 v
.enter_visit
(_n_id
)
4301 if _n_type
!= null then
4302 v
.enter_visit
(_n_type
.as(not null))
4304 if _n_assign
!= null then
4305 v
.enter_visit
(_n_assign
.as(not null))
4307 if _n_expr
!= null then
4308 v
.enter_visit
(_n_expr
.as(not null))
4312 redef fun visit_all_reverse
(v
: Visitor)
4314 v
.enter_visit
(_n_kwvar
)
4315 v
.enter_visit
(_n_id
)
4316 if _n_type
!= null then
4317 v
.enter_visit
(_n_type
.as(not null))
4319 if _n_assign
!= null then
4320 v
.enter_visit
(_n_assign
.as(not null))
4322 if _n_expr
!= null then
4323 v
.enter_visit
(_n_expr
.as(not null))
4327 redef class AReturnExpr
4328 redef fun n_kwreturn
=(n
)
4335 redef fun n_expr
=(n
)
4343 private init empty_init
do end
4345 init init_areturnexpr
(
4346 n_kwreturn
: nullable TKwreturn,
4347 n_expr
: nullable AExpr
4351 _n_kwreturn
= n_kwreturn
4352 if n_kwreturn
!= null then
4353 n_kwreturn
.parent
= self
4356 if n_expr
!= null then
4357 n_expr
.parent
= self
4361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4363 if _n_kwreturn
== old_child
then
4364 if new_child
!= null then
4365 new_child
.parent
= self
4366 assert new_child
isa TKwreturn
4367 _n_kwreturn
= new_child
4373 if _n_expr
== old_child
then
4374 if new_child
!= null then
4375 new_child
.parent
= self
4376 assert new_child
isa AExpr
4385 redef fun visit_all
(v
: Visitor)
4387 if _n_kwreturn
!= null then
4388 v
.enter_visit
(_n_kwreturn
.as(not null))
4390 if _n_expr
!= null then
4391 v
.enter_visit
(_n_expr
.as(not null))
4395 redef fun visit_all_reverse
(v
: Visitor)
4397 if _n_kwreturn
!= null then
4398 v
.enter_visit
(_n_kwreturn
.as(not null))
4400 if _n_expr
!= null then
4401 v
.enter_visit
(_n_expr
.as(not null))
4405 redef class ABreakExpr
4406 redef fun n_kwbreak
=(n
)
4411 redef fun n_label
=(n
)
4418 redef fun n_expr
=(n
)
4426 private init empty_init
do end
4428 init init_abreakexpr
(
4429 n_kwbreak
: nullable TKwbreak,
4430 n_label
: nullable ALabel,
4431 n_expr
: nullable AExpr
4435 _n_kwbreak
= n_kwbreak
.as(not null)
4436 n_kwbreak
.parent
= self
4438 if n_label
!= null then
4439 n_label
.parent
= self
4442 if n_expr
!= null then
4443 n_expr
.parent
= self
4447 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4449 if _n_kwbreak
== old_child
then
4450 if new_child
!= null then
4451 new_child
.parent
= self
4452 assert new_child
isa TKwbreak
4453 _n_kwbreak
= new_child
4459 if _n_label
== old_child
then
4460 if new_child
!= null then
4461 new_child
.parent
= self
4462 assert new_child
isa ALabel
4463 _n_label
= new_child
4469 if _n_expr
== old_child
then
4470 if new_child
!= null then
4471 new_child
.parent
= self
4472 assert new_child
isa AExpr
4481 redef fun visit_all
(v
: Visitor)
4483 v
.enter_visit
(_n_kwbreak
)
4484 if _n_label
!= null then
4485 v
.enter_visit
(_n_label
.as(not null))
4487 if _n_expr
!= null then
4488 v
.enter_visit
(_n_expr
.as(not null))
4492 redef fun visit_all_reverse
(v
: Visitor)
4494 v
.enter_visit
(_n_kwbreak
)
4495 if _n_label
!= null then
4496 v
.enter_visit
(_n_label
.as(not null))
4498 if _n_expr
!= null then
4499 v
.enter_visit
(_n_expr
.as(not null))
4503 redef class AAbortExpr
4504 redef fun n_kwabort
=(n
)
4510 private init empty_init
do end
4512 init init_aabortexpr
(
4513 n_kwabort
: nullable TKwabort
4517 _n_kwabort
= n_kwabort
.as(not null)
4518 n_kwabort
.parent
= self
4521 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4523 if _n_kwabort
== old_child
then
4524 if new_child
!= null then
4525 new_child
.parent
= self
4526 assert new_child
isa TKwabort
4527 _n_kwabort
= new_child
4535 redef fun visit_all
(v
: Visitor)
4537 v
.enter_visit
(_n_kwabort
)
4540 redef fun visit_all_reverse
(v
: Visitor)
4542 v
.enter_visit
(_n_kwabort
)
4545 redef class AContinueExpr
4546 redef fun n_kwcontinue
=(n
)
4553 redef fun n_label
=(n
)
4560 redef fun n_expr
=(n
)
4568 private init empty_init
do end
4570 init init_acontinueexpr
(
4571 n_kwcontinue
: nullable TKwcontinue,
4572 n_label
: nullable ALabel,
4573 n_expr
: nullable AExpr
4577 _n_kwcontinue
= n_kwcontinue
4578 if n_kwcontinue
!= null then
4579 n_kwcontinue
.parent
= self
4582 if n_label
!= null then
4583 n_label
.parent
= self
4586 if n_expr
!= null then
4587 n_expr
.parent
= self
4591 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4593 if _n_kwcontinue
== old_child
then
4594 if new_child
!= null then
4595 new_child
.parent
= self
4596 assert new_child
isa TKwcontinue
4597 _n_kwcontinue
= new_child
4599 _n_kwcontinue
= null
4603 if _n_label
== old_child
then
4604 if new_child
!= null then
4605 new_child
.parent
= self
4606 assert new_child
isa ALabel
4607 _n_label
= new_child
4613 if _n_expr
== old_child
then
4614 if new_child
!= null then
4615 new_child
.parent
= self
4616 assert new_child
isa AExpr
4625 redef fun visit_all
(v
: Visitor)
4627 if _n_kwcontinue
!= null then
4628 v
.enter_visit
(_n_kwcontinue
.as(not null))
4630 if _n_label
!= null then
4631 v
.enter_visit
(_n_label
.as(not null))
4633 if _n_expr
!= null then
4634 v
.enter_visit
(_n_expr
.as(not null))
4638 redef fun visit_all_reverse
(v
: Visitor)
4640 if _n_kwcontinue
!= null then
4641 v
.enter_visit
(_n_kwcontinue
.as(not null))
4643 if _n_label
!= null then
4644 v
.enter_visit
(_n_label
.as(not null))
4646 if _n_expr
!= null then
4647 v
.enter_visit
(_n_expr
.as(not null))
4652 redef fun n_kwdo
=(n
)
4657 redef fun n_block
=(n
)
4664 redef fun n_label
=(n
)
4672 private init empty_init
do end
4675 n_kwdo
: nullable TKwdo,
4676 n_block
: nullable AExpr,
4677 n_label
: nullable ALabel
4681 _n_kwdo
= n_kwdo
.as(not null)
4682 n_kwdo
.parent
= self
4684 if n_block
!= null then
4685 n_block
.parent
= self
4688 if n_label
!= null then
4689 n_label
.parent
= self
4693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4695 if _n_kwdo
== old_child
then
4696 if new_child
!= null then
4697 new_child
.parent
= self
4698 assert new_child
isa TKwdo
4705 if _n_block
== old_child
then
4706 if new_child
!= null then
4707 new_child
.parent
= self
4708 assert new_child
isa AExpr
4709 _n_block
= new_child
4715 if _n_label
== old_child
then
4716 if new_child
!= null then
4717 new_child
.parent
= self
4718 assert new_child
isa ALabel
4719 _n_label
= new_child
4727 redef fun visit_all
(v
: Visitor)
4729 v
.enter_visit
(_n_kwdo
)
4730 if _n_block
!= null then
4731 v
.enter_visit
(_n_block
.as(not null))
4733 if _n_label
!= null then
4734 v
.enter_visit
(_n_label
.as(not null))
4738 redef fun visit_all_reverse
(v
: Visitor)
4740 v
.enter_visit
(_n_kwdo
)
4741 if _n_block
!= null then
4742 v
.enter_visit
(_n_block
.as(not null))
4744 if _n_label
!= null then
4745 v
.enter_visit
(_n_label
.as(not null))
4750 redef fun n_kwif
=(n
)
4755 redef fun n_expr
=(n
)
4760 redef fun n_then
=(n
)
4767 redef fun n_else
=(n
)
4775 private init empty_init
do end
4778 n_kwif
: nullable TKwif,
4779 n_expr
: nullable AExpr,
4780 n_then
: nullable AExpr,
4781 n_else
: nullable AExpr
4785 _n_kwif
= n_kwif
.as(not null)
4786 n_kwif
.parent
= self
4787 _n_expr
= n_expr
.as(not null)
4788 n_expr
.parent
= self
4790 if n_then
!= null then
4791 n_then
.parent
= self
4794 if n_else
!= null then
4795 n_else
.parent
= self
4799 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4801 if _n_kwif
== old_child
then
4802 if new_child
!= null then
4803 new_child
.parent
= self
4804 assert new_child
isa TKwif
4811 if _n_expr
== old_child
then
4812 if new_child
!= null then
4813 new_child
.parent
= self
4814 assert new_child
isa AExpr
4821 if _n_then
== old_child
then
4822 if new_child
!= null then
4823 new_child
.parent
= self
4824 assert new_child
isa AExpr
4831 if _n_else
== old_child
then
4832 if new_child
!= null then
4833 new_child
.parent
= self
4834 assert new_child
isa AExpr
4843 redef fun visit_all
(v
: Visitor)
4845 v
.enter_visit
(_n_kwif
)
4846 v
.enter_visit
(_n_expr
)
4847 if _n_then
!= null then
4848 v
.enter_visit
(_n_then
.as(not null))
4850 if _n_else
!= null then
4851 v
.enter_visit
(_n_else
.as(not null))
4855 redef fun visit_all_reverse
(v
: Visitor)
4857 v
.enter_visit
(_n_kwif
)
4858 v
.enter_visit
(_n_expr
)
4859 if _n_then
!= null then
4860 v
.enter_visit
(_n_then
.as(not null))
4862 if _n_else
!= null then
4863 v
.enter_visit
(_n_else
.as(not null))
4867 redef class AIfexprExpr
4868 redef fun n_kwif
=(n
)
4873 redef fun n_expr
=(n
)
4878 redef fun n_kwthen
=(n
)
4883 redef fun n_then
=(n
)
4888 redef fun n_kwelse
=(n
)
4893 redef fun n_else
=(n
)
4899 private init empty_init
do end
4901 init init_aifexprexpr
(
4902 n_kwif
: nullable TKwif,
4903 n_expr
: nullable AExpr,
4904 n_kwthen
: nullable TKwthen,
4905 n_then
: nullable AExpr,
4906 n_kwelse
: nullable TKwelse,
4907 n_else
: nullable AExpr
4911 _n_kwif
= n_kwif
.as(not null)
4912 n_kwif
.parent
= self
4913 _n_expr
= n_expr
.as(not null)
4914 n_expr
.parent
= self
4915 _n_kwthen
= n_kwthen
.as(not null)
4916 n_kwthen
.parent
= self
4917 _n_then
= n_then
.as(not null)
4918 n_then
.parent
= self
4919 _n_kwelse
= n_kwelse
.as(not null)
4920 n_kwelse
.parent
= self
4921 _n_else
= n_else
.as(not null)
4922 n_else
.parent
= self
4925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4927 if _n_kwif
== old_child
then
4928 if new_child
!= null then
4929 new_child
.parent
= self
4930 assert new_child
isa TKwif
4937 if _n_expr
== old_child
then
4938 if new_child
!= null then
4939 new_child
.parent
= self
4940 assert new_child
isa AExpr
4947 if _n_kwthen
== old_child
then
4948 if new_child
!= null then
4949 new_child
.parent
= self
4950 assert new_child
isa TKwthen
4951 _n_kwthen
= new_child
4957 if _n_then
== old_child
then
4958 if new_child
!= null then
4959 new_child
.parent
= self
4960 assert new_child
isa AExpr
4967 if _n_kwelse
== old_child
then
4968 if new_child
!= null then
4969 new_child
.parent
= self
4970 assert new_child
isa TKwelse
4971 _n_kwelse
= new_child
4977 if _n_else
== old_child
then
4978 if new_child
!= null then
4979 new_child
.parent
= self
4980 assert new_child
isa AExpr
4989 redef fun visit_all
(v
: Visitor)
4991 v
.enter_visit
(_n_kwif
)
4992 v
.enter_visit
(_n_expr
)
4993 v
.enter_visit
(_n_kwthen
)
4994 v
.enter_visit
(_n_then
)
4995 v
.enter_visit
(_n_kwelse
)
4996 v
.enter_visit
(_n_else
)
4999 redef fun visit_all_reverse
(v
: Visitor)
5001 v
.enter_visit
(_n_kwif
)
5002 v
.enter_visit
(_n_expr
)
5003 v
.enter_visit
(_n_kwthen
)
5004 v
.enter_visit
(_n_then
)
5005 v
.enter_visit
(_n_kwelse
)
5006 v
.enter_visit
(_n_else
)
5009 redef class AWhileExpr
5010 redef fun n_kwwhile
=(n
)
5015 redef fun n_expr
=(n
)
5020 redef fun n_kwdo
=(n
)
5025 redef fun n_block
=(n
)
5032 redef fun n_label
=(n
)
5040 private init empty_init
do end
5042 init init_awhileexpr
(
5043 n_kwwhile
: nullable TKwwhile,
5044 n_expr
: nullable AExpr,
5045 n_kwdo
: nullable TKwdo,
5046 n_block
: nullable AExpr,
5047 n_label
: nullable ALabel
5051 _n_kwwhile
= n_kwwhile
.as(not null)
5052 n_kwwhile
.parent
= self
5053 _n_expr
= n_expr
.as(not null)
5054 n_expr
.parent
= self
5055 _n_kwdo
= n_kwdo
.as(not null)
5056 n_kwdo
.parent
= self
5058 if n_block
!= null then
5059 n_block
.parent
= self
5062 if n_label
!= null then
5063 n_label
.parent
= self
5067 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5069 if _n_kwwhile
== old_child
then
5070 if new_child
!= null then
5071 new_child
.parent
= self
5072 assert new_child
isa TKwwhile
5073 _n_kwwhile
= new_child
5079 if _n_expr
== old_child
then
5080 if new_child
!= null then
5081 new_child
.parent
= self
5082 assert new_child
isa AExpr
5089 if _n_kwdo
== old_child
then
5090 if new_child
!= null then
5091 new_child
.parent
= self
5092 assert new_child
isa TKwdo
5099 if _n_block
== old_child
then
5100 if new_child
!= null then
5101 new_child
.parent
= self
5102 assert new_child
isa AExpr
5103 _n_block
= new_child
5109 if _n_label
== old_child
then
5110 if new_child
!= null then
5111 new_child
.parent
= self
5112 assert new_child
isa ALabel
5113 _n_label
= new_child
5121 redef fun visit_all
(v
: Visitor)
5123 v
.enter_visit
(_n_kwwhile
)
5124 v
.enter_visit
(_n_expr
)
5125 v
.enter_visit
(_n_kwdo
)
5126 if _n_block
!= null then
5127 v
.enter_visit
(_n_block
.as(not null))
5129 if _n_label
!= null then
5130 v
.enter_visit
(_n_label
.as(not null))
5134 redef fun visit_all_reverse
(v
: Visitor)
5136 v
.enter_visit
(_n_kwwhile
)
5137 v
.enter_visit
(_n_expr
)
5138 v
.enter_visit
(_n_kwdo
)
5139 if _n_block
!= null then
5140 v
.enter_visit
(_n_block
.as(not null))
5142 if _n_label
!= null then
5143 v
.enter_visit
(_n_label
.as(not null))
5147 redef class ALoopExpr
5148 redef fun n_kwloop
=(n
)
5153 redef fun n_block
=(n
)
5160 redef fun n_label
=(n
)
5168 private init empty_init
do end
5170 init init_aloopexpr
(
5171 n_kwloop
: nullable TKwloop,
5172 n_block
: nullable AExpr,
5173 n_label
: nullable ALabel
5177 _n_kwloop
= n_kwloop
.as(not null)
5178 n_kwloop
.parent
= self
5180 if n_block
!= null then
5181 n_block
.parent
= self
5184 if n_label
!= null then
5185 n_label
.parent
= self
5189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5191 if _n_kwloop
== old_child
then
5192 if new_child
!= null then
5193 new_child
.parent
= self
5194 assert new_child
isa TKwloop
5195 _n_kwloop
= new_child
5201 if _n_block
== old_child
then
5202 if new_child
!= null then
5203 new_child
.parent
= self
5204 assert new_child
isa AExpr
5205 _n_block
= new_child
5211 if _n_label
== old_child
then
5212 if new_child
!= null then
5213 new_child
.parent
= self
5214 assert new_child
isa ALabel
5215 _n_label
= new_child
5223 redef fun visit_all
(v
: Visitor)
5225 v
.enter_visit
(_n_kwloop
)
5226 if _n_block
!= null then
5227 v
.enter_visit
(_n_block
.as(not null))
5229 if _n_label
!= null then
5230 v
.enter_visit
(_n_label
.as(not null))
5234 redef fun visit_all_reverse
(v
: Visitor)
5236 v
.enter_visit
(_n_kwloop
)
5237 if _n_block
!= null then
5238 v
.enter_visit
(_n_block
.as(not null))
5240 if _n_label
!= null then
5241 v
.enter_visit
(_n_label
.as(not null))
5245 redef class AForExpr
5246 redef fun n_kwfor
=(n
)
5256 redef fun n_expr
=(n
)
5261 redef fun n_kwdo
=(n
)
5266 redef fun n_block
=(n
)
5273 redef fun n_label
=(n
)
5281 private init empty_init
do end
5283 init init_aforexpr
(
5284 n_kwfor
: nullable TKwfor,
5286 n_expr
: nullable AExpr,
5287 n_kwdo
: nullable TKwdo,
5288 n_block
: nullable AExpr,
5289 n_label
: nullable ALabel
5293 _n_kwfor
= n_kwfor
.as(not null)
5294 n_kwfor
.parent
= self
5295 _n_id
= n_id
.as(not null)
5297 _n_expr
= n_expr
.as(not null)
5298 n_expr
.parent
= self
5299 _n_kwdo
= n_kwdo
.as(not null)
5300 n_kwdo
.parent
= self
5302 if n_block
!= null then
5303 n_block
.parent
= self
5306 if n_label
!= null then
5307 n_label
.parent
= self
5311 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5313 if _n_kwfor
== old_child
then
5314 if new_child
!= null then
5315 new_child
.parent
= self
5316 assert new_child
isa TKwfor
5317 _n_kwfor
= new_child
5323 if _n_id
== old_child
then
5324 if new_child
!= null then
5325 new_child
.parent
= self
5326 assert new_child
isa TId
5333 if _n_expr
== old_child
then
5334 if new_child
!= null then
5335 new_child
.parent
= self
5336 assert new_child
isa AExpr
5343 if _n_kwdo
== old_child
then
5344 if new_child
!= null then
5345 new_child
.parent
= self
5346 assert new_child
isa TKwdo
5353 if _n_block
== old_child
then
5354 if new_child
!= null then
5355 new_child
.parent
= self
5356 assert new_child
isa AExpr
5357 _n_block
= new_child
5363 if _n_label
== old_child
then
5364 if new_child
!= null then
5365 new_child
.parent
= self
5366 assert new_child
isa ALabel
5367 _n_label
= new_child
5375 redef fun visit_all
(v
: Visitor)
5377 v
.enter_visit
(_n_kwfor
)
5378 v
.enter_visit
(_n_id
)
5379 v
.enter_visit
(_n_expr
)
5380 v
.enter_visit
(_n_kwdo
)
5381 if _n_block
!= null then
5382 v
.enter_visit
(_n_block
.as(not null))
5384 if _n_label
!= null then
5385 v
.enter_visit
(_n_label
.as(not null))
5389 redef fun visit_all_reverse
(v
: Visitor)
5391 v
.enter_visit
(_n_kwfor
)
5392 v
.enter_visit
(_n_id
)
5393 v
.enter_visit
(_n_expr
)
5394 v
.enter_visit
(_n_kwdo
)
5395 if _n_block
!= null then
5396 v
.enter_visit
(_n_block
.as(not null))
5398 if _n_label
!= null then
5399 v
.enter_visit
(_n_label
.as(not null))
5403 redef class AAssertExpr
5404 redef fun n_kwassert
=(n
)
5416 redef fun n_expr
=(n
)
5422 private init empty_init
do end
5424 init init_aassertexpr
(
5425 n_kwassert
: nullable TKwassert,
5427 n_expr
: nullable AExpr
5431 _n_kwassert
= n_kwassert
.as(not null)
5432 n_kwassert
.parent
= self
5434 if n_id
!= null then
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_kwassert
== old_child
then
5444 if new_child
!= null then
5445 new_child
.parent
= self
5446 assert new_child
isa TKwassert
5447 _n_kwassert
= new_child
5453 if _n_id
== old_child
then
5454 if new_child
!= null then
5455 new_child
.parent
= self
5456 assert new_child
isa TId
5463 if _n_expr
== old_child
then
5464 if new_child
!= null then
5465 new_child
.parent
= self
5466 assert new_child
isa AExpr
5475 redef fun visit_all
(v
: Visitor)
5477 v
.enter_visit
(_n_kwassert
)
5478 if _n_id
!= null then
5479 v
.enter_visit
(_n_id
.as(not null))
5481 v
.enter_visit
(_n_expr
)
5484 redef fun visit_all_reverse
(v
: Visitor)
5486 v
.enter_visit
(_n_kwassert
)
5487 if _n_id
!= null then
5488 v
.enter_visit
(_n_id
.as(not null))
5490 v
.enter_visit
(_n_expr
)
5493 redef class AOnceExpr
5494 redef fun n_kwonce
=(n
)
5499 redef fun n_expr
=(n
)
5505 private init empty_init
do end
5507 init init_aonceexpr
(
5508 n_kwonce
: nullable TKwonce,
5509 n_expr
: nullable AExpr
5513 _n_kwonce
= n_kwonce
.as(not null)
5514 n_kwonce
.parent
= self
5515 _n_expr
= n_expr
.as(not null)
5516 n_expr
.parent
= self
5519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5521 if _n_kwonce
== old_child
then
5522 if new_child
!= null then
5523 new_child
.parent
= self
5524 assert new_child
isa TKwonce
5525 _n_kwonce
= new_child
5531 if _n_expr
== old_child
then
5532 if new_child
!= null then
5533 new_child
.parent
= self
5534 assert new_child
isa AExpr
5543 redef fun visit_all
(v
: Visitor)
5545 v
.enter_visit
(_n_kwonce
)
5546 v
.enter_visit
(_n_expr
)
5549 redef fun visit_all_reverse
(v
: Visitor)
5551 v
.enter_visit
(_n_kwonce
)
5552 v
.enter_visit
(_n_expr
)
5555 redef class ASendExpr
5556 redef fun n_expr
=(n
)
5562 private init empty_init
do end
5564 init init_asendexpr
(
5565 n_expr
: nullable AExpr
5569 _n_expr
= n_expr
.as(not null)
5570 n_expr
.parent
= self
5573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5575 if _n_expr
== old_child
then
5576 if new_child
!= null then
5577 new_child
.parent
= self
5578 assert new_child
isa AExpr
5587 redef fun visit_all
(v
: Visitor)
5589 v
.enter_visit
(_n_expr
)
5592 redef fun visit_all_reverse
(v
: Visitor)
5594 v
.enter_visit
(_n_expr
)
5597 redef class ABinopExpr
5598 redef fun n_expr
=(n
)
5603 redef fun n_expr2
=(n
)
5609 private init empty_init
do end
5611 init init_abinopexpr
(
5612 n_expr
: nullable AExpr,
5613 n_expr2
: nullable AExpr
5617 _n_expr
= n_expr
.as(not null)
5618 n_expr
.parent
= self
5619 _n_expr2
= n_expr2
.as(not null)
5620 n_expr2
.parent
= self
5623 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5625 if _n_expr
== old_child
then
5626 if new_child
!= null then
5627 new_child
.parent
= self
5628 assert new_child
isa AExpr
5635 if _n_expr2
== old_child
then
5636 if new_child
!= null then
5637 new_child
.parent
= self
5638 assert new_child
isa AExpr
5639 _n_expr2
= new_child
5647 redef fun visit_all
(v
: Visitor)
5649 v
.enter_visit
(_n_expr
)
5650 v
.enter_visit
(_n_expr2
)
5653 redef fun visit_all_reverse
(v
: Visitor)
5655 v
.enter_visit
(_n_expr
)
5656 v
.enter_visit
(_n_expr2
)
5660 redef fun n_expr
=(n
)
5665 redef fun n_expr2
=(n
)
5671 private init empty_init
do end
5674 n_expr
: nullable AExpr,
5675 n_expr2
: nullable AExpr
5679 _n_expr
= n_expr
.as(not null)
5680 n_expr
.parent
= self
5681 _n_expr2
= n_expr2
.as(not null)
5682 n_expr2
.parent
= self
5685 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5687 if _n_expr
== old_child
then
5688 if new_child
!= null then
5689 new_child
.parent
= self
5690 assert new_child
isa AExpr
5697 if _n_expr2
== old_child
then
5698 if new_child
!= null then
5699 new_child
.parent
= self
5700 assert new_child
isa AExpr
5701 _n_expr2
= new_child
5709 redef fun visit_all
(v
: Visitor)
5711 v
.enter_visit
(_n_expr
)
5712 v
.enter_visit
(_n_expr2
)
5715 redef fun visit_all_reverse
(v
: Visitor)
5717 v
.enter_visit
(_n_expr
)
5718 v
.enter_visit
(_n_expr2
)
5721 redef class AAndExpr
5722 redef fun n_expr
=(n
)
5727 redef fun n_expr2
=(n
)
5733 private init empty_init
do end
5735 init init_aandexpr
(
5736 n_expr
: nullable AExpr,
5737 n_expr2
: nullable AExpr
5741 _n_expr
= n_expr
.as(not null)
5742 n_expr
.parent
= self
5743 _n_expr2
= n_expr2
.as(not null)
5744 n_expr2
.parent
= self
5747 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5749 if _n_expr
== old_child
then
5750 if new_child
!= null then
5751 new_child
.parent
= self
5752 assert new_child
isa AExpr
5759 if _n_expr2
== old_child
then
5760 if new_child
!= null then
5761 new_child
.parent
= self
5762 assert new_child
isa AExpr
5763 _n_expr2
= new_child
5771 redef fun visit_all
(v
: Visitor)
5773 v
.enter_visit
(_n_expr
)
5774 v
.enter_visit
(_n_expr2
)
5777 redef fun visit_all_reverse
(v
: Visitor)
5779 v
.enter_visit
(_n_expr
)
5780 v
.enter_visit
(_n_expr2
)
5783 redef class ANotExpr
5784 redef fun n_kwnot
=(n
)
5789 redef fun n_expr
=(n
)
5795 private init empty_init
do end
5797 init init_anotexpr
(
5798 n_kwnot
: nullable TKwnot,
5799 n_expr
: nullable AExpr
5803 _n_kwnot
= n_kwnot
.as(not null)
5804 n_kwnot
.parent
= self
5805 _n_expr
= n_expr
.as(not null)
5806 n_expr
.parent
= self
5809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5811 if _n_kwnot
== old_child
then
5812 if new_child
!= null then
5813 new_child
.parent
= self
5814 assert new_child
isa TKwnot
5815 _n_kwnot
= new_child
5821 if _n_expr
== old_child
then
5822 if new_child
!= null then
5823 new_child
.parent
= self
5824 assert new_child
isa AExpr
5833 redef fun visit_all
(v
: Visitor)
5835 v
.enter_visit
(_n_kwnot
)
5836 v
.enter_visit
(_n_expr
)
5839 redef fun visit_all_reverse
(v
: Visitor)
5841 v
.enter_visit
(_n_kwnot
)
5842 v
.enter_visit
(_n_expr
)
5846 redef fun n_expr
=(n
)
5851 redef fun n_expr2
=(n
)
5857 private init empty_init
do end
5860 n_expr
: nullable AExpr,
5861 n_expr2
: nullable AExpr
5865 _n_expr
= n_expr
.as(not null)
5866 n_expr
.parent
= self
5867 _n_expr2
= n_expr2
.as(not null)
5868 n_expr2
.parent
= self
5871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5873 if _n_expr
== old_child
then
5874 if new_child
!= null then
5875 new_child
.parent
= self
5876 assert new_child
isa AExpr
5883 if _n_expr2
== old_child
then
5884 if new_child
!= null then
5885 new_child
.parent
= self
5886 assert new_child
isa AExpr
5887 _n_expr2
= new_child
5895 redef fun visit_all
(v
: Visitor)
5897 v
.enter_visit
(_n_expr
)
5898 v
.enter_visit
(_n_expr2
)
5901 redef fun visit_all_reverse
(v
: Visitor)
5903 v
.enter_visit
(_n_expr
)
5904 v
.enter_visit
(_n_expr2
)
5908 redef fun n_expr
=(n
)
5913 redef fun n_expr2
=(n
)
5919 private init empty_init
do end
5922 n_expr
: nullable AExpr,
5923 n_expr2
: nullable AExpr
5927 _n_expr
= n_expr
.as(not null)
5928 n_expr
.parent
= self
5929 _n_expr2
= n_expr2
.as(not null)
5930 n_expr2
.parent
= self
5933 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5935 if _n_expr
== old_child
then
5936 if new_child
!= null then
5937 new_child
.parent
= self
5938 assert new_child
isa AExpr
5945 if _n_expr2
== old_child
then
5946 if new_child
!= null then
5947 new_child
.parent
= self
5948 assert new_child
isa AExpr
5949 _n_expr2
= new_child
5957 redef fun visit_all
(v
: Visitor)
5959 v
.enter_visit
(_n_expr
)
5960 v
.enter_visit
(_n_expr2
)
5963 redef fun visit_all_reverse
(v
: Visitor)
5965 v
.enter_visit
(_n_expr
)
5966 v
.enter_visit
(_n_expr2
)
5970 redef fun n_expr
=(n
)
5975 redef fun n_expr2
=(n
)
5981 private init empty_init
do end
5984 n_expr
: nullable AExpr,
5985 n_expr2
: nullable AExpr
5989 _n_expr
= n_expr
.as(not null)
5990 n_expr
.parent
= self
5991 _n_expr2
= n_expr2
.as(not null)
5992 n_expr2
.parent
= self
5995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5997 if _n_expr
== old_child
then
5998 if new_child
!= null then
5999 new_child
.parent
= self
6000 assert new_child
isa AExpr
6007 if _n_expr2
== old_child
then
6008 if new_child
!= null then
6009 new_child
.parent
= self
6010 assert new_child
isa AExpr
6011 _n_expr2
= new_child
6019 redef fun visit_all
(v
: Visitor)
6021 v
.enter_visit
(_n_expr
)
6022 v
.enter_visit
(_n_expr2
)
6025 redef fun visit_all_reverse
(v
: Visitor)
6027 v
.enter_visit
(_n_expr
)
6028 v
.enter_visit
(_n_expr2
)
6032 redef fun n_expr
=(n
)
6037 redef fun n_expr2
=(n
)
6043 private init empty_init
do end
6046 n_expr
: nullable AExpr,
6047 n_expr2
: nullable AExpr
6051 _n_expr
= n_expr
.as(not null)
6052 n_expr
.parent
= self
6053 _n_expr2
= n_expr2
.as(not null)
6054 n_expr2
.parent
= self
6057 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6059 if _n_expr
== old_child
then
6060 if new_child
!= null then
6061 new_child
.parent
= self
6062 assert new_child
isa AExpr
6069 if _n_expr2
== old_child
then
6070 if new_child
!= null then
6071 new_child
.parent
= self
6072 assert new_child
isa AExpr
6073 _n_expr2
= new_child
6081 redef fun visit_all
(v
: Visitor)
6083 v
.enter_visit
(_n_expr
)
6084 v
.enter_visit
(_n_expr2
)
6087 redef fun visit_all_reverse
(v
: Visitor)
6089 v
.enter_visit
(_n_expr
)
6090 v
.enter_visit
(_n_expr2
)
6094 redef fun n_expr
=(n
)
6099 redef fun n_expr2
=(n
)
6105 private init empty_init
do end
6108 n_expr
: nullable AExpr,
6109 n_expr2
: nullable AExpr
6113 _n_expr
= n_expr
.as(not null)
6114 n_expr
.parent
= self
6115 _n_expr2
= n_expr2
.as(not null)
6116 n_expr2
.parent
= self
6119 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6121 if _n_expr
== old_child
then
6122 if new_child
!= null then
6123 new_child
.parent
= self
6124 assert new_child
isa AExpr
6131 if _n_expr2
== old_child
then
6132 if new_child
!= null then
6133 new_child
.parent
= self
6134 assert new_child
isa AExpr
6135 _n_expr2
= new_child
6143 redef fun visit_all
(v
: Visitor)
6145 v
.enter_visit
(_n_expr
)
6146 v
.enter_visit
(_n_expr2
)
6149 redef fun visit_all_reverse
(v
: Visitor)
6151 v
.enter_visit
(_n_expr
)
6152 v
.enter_visit
(_n_expr2
)
6156 redef fun n_expr
=(n
)
6161 redef fun n_expr2
=(n
)
6167 private init empty_init
do end
6170 n_expr
: nullable AExpr,
6171 n_expr2
: nullable AExpr
6175 _n_expr
= n_expr
.as(not null)
6176 n_expr
.parent
= self
6177 _n_expr2
= n_expr2
.as(not null)
6178 n_expr2
.parent
= self
6181 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6183 if _n_expr
== old_child
then
6184 if new_child
!= null then
6185 new_child
.parent
= self
6186 assert new_child
isa AExpr
6193 if _n_expr2
== old_child
then
6194 if new_child
!= null then
6195 new_child
.parent
= self
6196 assert new_child
isa AExpr
6197 _n_expr2
= new_child
6205 redef fun visit_all
(v
: Visitor)
6207 v
.enter_visit
(_n_expr
)
6208 v
.enter_visit
(_n_expr2
)
6211 redef fun visit_all_reverse
(v
: Visitor)
6213 v
.enter_visit
(_n_expr
)
6214 v
.enter_visit
(_n_expr2
)
6218 redef fun n_expr
=(n
)
6223 redef fun n_expr2
=(n
)
6229 private init empty_init
do end
6232 n_expr
: nullable AExpr,
6233 n_expr2
: nullable AExpr
6237 _n_expr
= n_expr
.as(not null)
6238 n_expr
.parent
= self
6239 _n_expr2
= n_expr2
.as(not null)
6240 n_expr2
.parent
= self
6243 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6245 if _n_expr
== old_child
then
6246 if new_child
!= null then
6247 new_child
.parent
= self
6248 assert new_child
isa AExpr
6255 if _n_expr2
== old_child
then
6256 if new_child
!= null then
6257 new_child
.parent
= self
6258 assert new_child
isa AExpr
6259 _n_expr2
= new_child
6267 redef fun visit_all
(v
: Visitor)
6269 v
.enter_visit
(_n_expr
)
6270 v
.enter_visit
(_n_expr2
)
6273 redef fun visit_all_reverse
(v
: Visitor)
6275 v
.enter_visit
(_n_expr
)
6276 v
.enter_visit
(_n_expr2
)
6279 redef class AIsaExpr
6280 redef fun n_expr
=(n
)
6285 redef fun n_type
=(n
)
6291 private init empty_init
do end
6293 init init_aisaexpr
(
6294 n_expr
: nullable AExpr,
6295 n_type
: nullable AType
6299 _n_expr
= n_expr
.as(not null)
6300 n_expr
.parent
= self
6301 _n_type
= n_type
.as(not null)
6302 n_type
.parent
= self
6305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6307 if _n_expr
== old_child
then
6308 if new_child
!= null then
6309 new_child
.parent
= self
6310 assert new_child
isa AExpr
6317 if _n_type
== old_child
then
6318 if new_child
!= null then
6319 new_child
.parent
= self
6320 assert new_child
isa AType
6329 redef fun visit_all
(v
: Visitor)
6331 v
.enter_visit
(_n_expr
)
6332 v
.enter_visit
(_n_type
)
6335 redef fun visit_all_reverse
(v
: Visitor)
6337 v
.enter_visit
(_n_expr
)
6338 v
.enter_visit
(_n_type
)
6341 redef class APlusExpr
6342 redef fun n_expr
=(n
)
6347 redef fun n_expr2
=(n
)
6353 private init empty_init
do end
6355 init init_aplusexpr
(
6356 n_expr
: nullable AExpr,
6357 n_expr2
: nullable AExpr
6361 _n_expr
= n_expr
.as(not null)
6362 n_expr
.parent
= self
6363 _n_expr2
= n_expr2
.as(not null)
6364 n_expr2
.parent
= self
6367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6369 if _n_expr
== old_child
then
6370 if new_child
!= null then
6371 new_child
.parent
= self
6372 assert new_child
isa AExpr
6379 if _n_expr2
== old_child
then
6380 if new_child
!= null then
6381 new_child
.parent
= self
6382 assert new_child
isa AExpr
6383 _n_expr2
= new_child
6391 redef fun visit_all
(v
: Visitor)
6393 v
.enter_visit
(_n_expr
)
6394 v
.enter_visit
(_n_expr2
)
6397 redef fun visit_all_reverse
(v
: Visitor)
6399 v
.enter_visit
(_n_expr
)
6400 v
.enter_visit
(_n_expr2
)
6403 redef class AMinusExpr
6404 redef fun n_expr
=(n
)
6409 redef fun n_expr2
=(n
)
6415 private init empty_init
do end
6417 init init_aminusexpr
(
6418 n_expr
: nullable AExpr,
6419 n_expr2
: nullable AExpr
6423 _n_expr
= n_expr
.as(not null)
6424 n_expr
.parent
= self
6425 _n_expr2
= n_expr2
.as(not null)
6426 n_expr2
.parent
= self
6429 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6431 if _n_expr
== old_child
then
6432 if new_child
!= null then
6433 new_child
.parent
= self
6434 assert new_child
isa AExpr
6441 if _n_expr2
== old_child
then
6442 if new_child
!= null then
6443 new_child
.parent
= self
6444 assert new_child
isa AExpr
6445 _n_expr2
= new_child
6453 redef fun visit_all
(v
: Visitor)
6455 v
.enter_visit
(_n_expr
)
6456 v
.enter_visit
(_n_expr2
)
6459 redef fun visit_all_reverse
(v
: Visitor)
6461 v
.enter_visit
(_n_expr
)
6462 v
.enter_visit
(_n_expr2
)
6465 redef class AStarshipExpr
6466 redef fun n_expr
=(n
)
6471 redef fun n_expr2
=(n
)
6477 private init empty_init
do end
6479 init init_astarshipexpr
(
6480 n_expr
: nullable AExpr,
6481 n_expr2
: nullable AExpr
6485 _n_expr
= n_expr
.as(not null)
6486 n_expr
.parent
= self
6487 _n_expr2
= n_expr2
.as(not null)
6488 n_expr2
.parent
= self
6491 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6493 if _n_expr
== old_child
then
6494 if new_child
!= null then
6495 new_child
.parent
= self
6496 assert new_child
isa AExpr
6503 if _n_expr2
== old_child
then
6504 if new_child
!= null then
6505 new_child
.parent
= self
6506 assert new_child
isa AExpr
6507 _n_expr2
= new_child
6515 redef fun visit_all
(v
: Visitor)
6517 v
.enter_visit
(_n_expr
)
6518 v
.enter_visit
(_n_expr2
)
6521 redef fun visit_all_reverse
(v
: Visitor)
6523 v
.enter_visit
(_n_expr
)
6524 v
.enter_visit
(_n_expr2
)
6527 redef class AStarExpr
6528 redef fun n_expr
=(n
)
6533 redef fun n_expr2
=(n
)
6539 private init empty_init
do end
6541 init init_astarexpr
(
6542 n_expr
: nullable AExpr,
6543 n_expr2
: nullable AExpr
6547 _n_expr
= n_expr
.as(not null)
6548 n_expr
.parent
= self
6549 _n_expr2
= n_expr2
.as(not null)
6550 n_expr2
.parent
= self
6553 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6555 if _n_expr
== old_child
then
6556 if new_child
!= null then
6557 new_child
.parent
= self
6558 assert new_child
isa AExpr
6565 if _n_expr2
== old_child
then
6566 if new_child
!= null then
6567 new_child
.parent
= self
6568 assert new_child
isa AExpr
6569 _n_expr2
= new_child
6577 redef fun visit_all
(v
: Visitor)
6579 v
.enter_visit
(_n_expr
)
6580 v
.enter_visit
(_n_expr2
)
6583 redef fun visit_all_reverse
(v
: Visitor)
6585 v
.enter_visit
(_n_expr
)
6586 v
.enter_visit
(_n_expr2
)
6589 redef class ASlashExpr
6590 redef fun n_expr
=(n
)
6595 redef fun n_expr2
=(n
)
6601 private init empty_init
do end
6603 init init_aslashexpr
(
6604 n_expr
: nullable AExpr,
6605 n_expr2
: nullable AExpr
6609 _n_expr
= n_expr
.as(not null)
6610 n_expr
.parent
= self
6611 _n_expr2
= n_expr2
.as(not null)
6612 n_expr2
.parent
= self
6615 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6617 if _n_expr
== old_child
then
6618 if new_child
!= null then
6619 new_child
.parent
= self
6620 assert new_child
isa AExpr
6627 if _n_expr2
== old_child
then
6628 if new_child
!= null then
6629 new_child
.parent
= self
6630 assert new_child
isa AExpr
6631 _n_expr2
= new_child
6639 redef fun visit_all
(v
: Visitor)
6641 v
.enter_visit
(_n_expr
)
6642 v
.enter_visit
(_n_expr2
)
6645 redef fun visit_all_reverse
(v
: Visitor)
6647 v
.enter_visit
(_n_expr
)
6648 v
.enter_visit
(_n_expr2
)
6651 redef class APercentExpr
6652 redef fun n_expr
=(n
)
6657 redef fun n_expr2
=(n
)
6663 private init empty_init
do end
6665 init init_apercentexpr
(
6666 n_expr
: nullable AExpr,
6667 n_expr2
: nullable AExpr
6671 _n_expr
= n_expr
.as(not null)
6672 n_expr
.parent
= self
6673 _n_expr2
= n_expr2
.as(not null)
6674 n_expr2
.parent
= self
6677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6679 if _n_expr
== old_child
then
6680 if new_child
!= null then
6681 new_child
.parent
= self
6682 assert new_child
isa AExpr
6689 if _n_expr2
== old_child
then
6690 if new_child
!= null then
6691 new_child
.parent
= self
6692 assert new_child
isa AExpr
6693 _n_expr2
= new_child
6701 redef fun visit_all
(v
: Visitor)
6703 v
.enter_visit
(_n_expr
)
6704 v
.enter_visit
(_n_expr2
)
6707 redef fun visit_all_reverse
(v
: Visitor)
6709 v
.enter_visit
(_n_expr
)
6710 v
.enter_visit
(_n_expr2
)
6713 redef class AUminusExpr
6714 redef fun n_minus
=(n
)
6719 redef fun n_expr
=(n
)
6725 private init empty_init
do end
6727 init init_auminusexpr
(
6728 n_minus
: nullable TMinus,
6729 n_expr
: nullable AExpr
6733 _n_minus
= n_minus
.as(not null)
6734 n_minus
.parent
= self
6735 _n_expr
= n_expr
.as(not null)
6736 n_expr
.parent
= self
6739 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6741 if _n_minus
== old_child
then
6742 if new_child
!= null then
6743 new_child
.parent
= self
6744 assert new_child
isa TMinus
6745 _n_minus
= new_child
6751 if _n_expr
== old_child
then
6752 if new_child
!= null then
6753 new_child
.parent
= self
6754 assert new_child
isa AExpr
6763 redef fun visit_all
(v
: Visitor)
6765 v
.enter_visit
(_n_minus
)
6766 v
.enter_visit
(_n_expr
)
6769 redef fun visit_all_reverse
(v
: Visitor)
6771 v
.enter_visit
(_n_minus
)
6772 v
.enter_visit
(_n_expr
)
6775 redef class ANewExpr
6776 redef fun n_kwnew
=(n
)
6781 redef fun n_type
=(n
)
6794 private init empty_init
do end
6796 init init_anewexpr
(
6797 n_kwnew
: nullable TKwnew,
6798 n_type
: nullable AType,
6800 n_args
: Collection[Object] # Should be Collection[AExpr]
6804 _n_kwnew
= n_kwnew
.as(not null)
6805 n_kwnew
.parent
= self
6806 _n_type
= n_type
.as(not null)
6807 n_type
.parent
= self
6809 if n_id
!= null then
6819 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6821 if _n_kwnew
== old_child
then
6822 if new_child
!= null then
6823 new_child
.parent
= self
6824 assert new_child
isa TKwnew
6825 _n_kwnew
= new_child
6831 if _n_type
== old_child
then
6832 if new_child
!= null then
6833 new_child
.parent
= self
6834 assert new_child
isa AType
6841 if _n_id
== old_child
then
6842 if new_child
!= null then
6843 new_child
.parent
= self
6844 assert new_child
isa TId
6851 for i
in [0.._n_args
.length
[ do
6852 if _n_args
[i
] == old_child
then
6853 if new_child
!= null then
6854 assert new_child
isa AExpr
6855 _n_args
[i
] = new_child
6856 new_child
.parent
= self
6858 _n_args
.remove_at
(i
)
6865 redef fun visit_all
(v
: Visitor)
6867 v
.enter_visit
(_n_kwnew
)
6868 v
.enter_visit
(_n_type
)
6869 if _n_id
!= null then
6870 v
.enter_visit
(_n_id
.as(not null))
6877 redef fun visit_all_reverse
(v
: Visitor)
6879 v
.enter_visit
(_n_kwnew
)
6880 v
.enter_visit
(_n_type
)
6881 if _n_id
!= null then
6882 v
.enter_visit
(_n_id
.as(not null))
6885 var i
= _n_args
.length
6887 v
.enter_visit
(_n_args
[i
])
6893 redef class AAttrExpr
6894 redef fun n_expr
=(n
)
6905 private init empty_init
do end
6907 init init_aattrexpr
(
6908 n_expr
: nullable AExpr,
6909 n_id
: nullable TAttrid
6913 _n_expr
= n_expr
.as(not null)
6914 n_expr
.parent
= self
6915 _n_id
= n_id
.as(not null)
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
6943 redef fun visit_all
(v
: Visitor)
6945 v
.enter_visit
(_n_expr
)
6946 v
.enter_visit
(_n_id
)
6949 redef fun visit_all_reverse
(v
: Visitor)
6951 v
.enter_visit
(_n_expr
)
6952 v
.enter_visit
(_n_id
)
6955 redef class AAttrAssignExpr
6956 redef fun n_expr
=(n
)
6966 redef fun n_assign
=(n
)
6971 redef fun n_value
=(n
)
6977 private init empty_init
do end
6979 init init_aattrassignexpr
(
6980 n_expr
: nullable AExpr,
6981 n_id
: nullable TAttrid,
6982 n_assign
: nullable TAssign,
6983 n_value
: nullable AExpr
6987 _n_expr
= n_expr
.as(not null)
6988 n_expr
.parent
= self
6989 _n_id
= n_id
.as(not null)
6991 _n_assign
= n_assign
.as(not null)
6992 n_assign
.parent
= self
6993 _n_value
= n_value
.as(not null)
6994 n_value
.parent
= self
6997 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6999 if _n_expr
== old_child
then
7000 if new_child
!= null then
7001 new_child
.parent
= self
7002 assert new_child
isa AExpr
7009 if _n_id
== old_child
then
7010 if new_child
!= null then
7011 new_child
.parent
= self
7012 assert new_child
isa TAttrid
7019 if _n_assign
== old_child
then
7020 if new_child
!= null then
7021 new_child
.parent
= self
7022 assert new_child
isa TAssign
7023 _n_assign
= new_child
7029 if _n_value
== old_child
then
7030 if new_child
!= null then
7031 new_child
.parent
= self
7032 assert new_child
isa AExpr
7033 _n_value
= new_child
7041 redef fun visit_all
(v
: Visitor)
7043 v
.enter_visit
(_n_expr
)
7044 v
.enter_visit
(_n_id
)
7045 v
.enter_visit
(_n_assign
)
7046 v
.enter_visit
(_n_value
)
7049 redef fun visit_all_reverse
(v
: Visitor)
7051 v
.enter_visit
(_n_expr
)
7052 v
.enter_visit
(_n_id
)
7053 v
.enter_visit
(_n_assign
)
7054 v
.enter_visit
(_n_value
)
7057 redef class AAttrReassignExpr
7058 redef fun n_expr
=(n
)
7068 redef fun n_assign_op
=(n
)
7073 redef fun n_value
=(n
)
7079 private init empty_init
do end
7081 init init_aattrreassignexpr
(
7082 n_expr
: nullable AExpr,
7083 n_id
: nullable TAttrid,
7084 n_assign_op
: nullable AAssignOp,
7085 n_value
: nullable AExpr
7089 _n_expr
= n_expr
.as(not null)
7090 n_expr
.parent
= self
7091 _n_id
= n_id
.as(not null)
7093 _n_assign_op
= n_assign_op
.as(not null)
7094 n_assign_op
.parent
= self
7095 _n_value
= n_value
.as(not null)
7096 n_value
.parent
= self
7099 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7101 if _n_expr
== old_child
then
7102 if new_child
!= null then
7103 new_child
.parent
= self
7104 assert new_child
isa AExpr
7111 if _n_id
== old_child
then
7112 if new_child
!= null then
7113 new_child
.parent
= self
7114 assert new_child
isa TAttrid
7121 if _n_assign_op
== old_child
then
7122 if new_child
!= null then
7123 new_child
.parent
= self
7124 assert new_child
isa AAssignOp
7125 _n_assign_op
= new_child
7131 if _n_value
== old_child
then
7132 if new_child
!= null then
7133 new_child
.parent
= self
7134 assert new_child
isa AExpr
7135 _n_value
= new_child
7143 redef fun visit_all
(v
: Visitor)
7145 v
.enter_visit
(_n_expr
)
7146 v
.enter_visit
(_n_id
)
7147 v
.enter_visit
(_n_assign_op
)
7148 v
.enter_visit
(_n_value
)
7151 redef fun visit_all_reverse
(v
: Visitor)
7153 v
.enter_visit
(_n_expr
)
7154 v
.enter_visit
(_n_id
)
7155 v
.enter_visit
(_n_assign_op
)
7156 v
.enter_visit
(_n_value
)
7159 redef class ACallExpr
7160 redef fun n_expr
=(n
)
7171 private init empty_init
do end
7173 init init_acallexpr
(
7174 n_expr
: nullable AExpr,
7176 n_args
: Collection[Object], # Should be Collection[AExpr]
7177 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7181 _n_expr
= n_expr
.as(not null)
7182 n_expr
.parent
= self
7183 _n_id
= n_id
.as(not null)
7190 for n
in n_closure_defs
do
7191 assert n
isa AClosureDef
7192 _n_closure_defs
.add
(n
)
7197 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7199 if _n_expr
== old_child
then
7200 if new_child
!= null then
7201 new_child
.parent
= self
7202 assert new_child
isa AExpr
7209 if _n_id
== old_child
then
7210 if new_child
!= null then
7211 new_child
.parent
= self
7212 assert new_child
isa TId
7219 for i
in [0.._n_args
.length
[ do
7220 if _n_args
[i
] == old_child
then
7221 if new_child
!= null then
7222 assert new_child
isa AExpr
7223 _n_args
[i
] = new_child
7224 new_child
.parent
= self
7226 _n_args
.remove_at
(i
)
7231 for i
in [0.._n_closure_defs
.length
[ do
7232 if _n_closure_defs
[i
] == old_child
then
7233 if new_child
!= null then
7234 assert new_child
isa AClosureDef
7235 _n_closure_defs
[i
] = new_child
7236 new_child
.parent
= self
7238 _n_closure_defs
.remove_at
(i
)
7245 redef fun visit_all
(v
: Visitor)
7247 v
.enter_visit
(_n_expr
)
7248 v
.enter_visit
(_n_id
)
7252 for n
in _n_closure_defs
do
7257 redef fun visit_all_reverse
(v
: Visitor)
7259 v
.enter_visit
(_n_expr
)
7260 v
.enter_visit
(_n_id
)
7262 var i
= _n_args
.length
7264 v
.enter_visit
(_n_args
[i
])
7269 var i
= _n_closure_defs
.length
7271 v
.enter_visit
(_n_closure_defs
[i
])
7277 redef class ACallAssignExpr
7278 redef fun n_expr
=(n
)
7288 redef fun n_assign
=(n
)
7293 redef fun n_value
=(n
)
7299 private init empty_init
do end
7301 init init_acallassignexpr
(
7302 n_expr
: nullable AExpr,
7304 n_args
: Collection[Object], # Should be Collection[AExpr]
7305 n_assign
: nullable TAssign,
7306 n_value
: nullable AExpr
7310 _n_expr
= n_expr
.as(not null)
7311 n_expr
.parent
= self
7312 _n_id
= n_id
.as(not null)
7319 _n_assign
= n_assign
.as(not null)
7320 n_assign
.parent
= self
7321 _n_value
= n_value
.as(not null)
7322 n_value
.parent
= self
7325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7327 if _n_expr
== old_child
then
7328 if new_child
!= null then
7329 new_child
.parent
= self
7330 assert new_child
isa AExpr
7337 if _n_id
== old_child
then
7338 if new_child
!= null then
7339 new_child
.parent
= self
7340 assert new_child
isa TId
7347 for i
in [0.._n_args
.length
[ do
7348 if _n_args
[i
] == old_child
then
7349 if new_child
!= null then
7350 assert new_child
isa AExpr
7351 _n_args
[i
] = new_child
7352 new_child
.parent
= self
7354 _n_args
.remove_at
(i
)
7359 if _n_assign
== old_child
then
7360 if new_child
!= null then
7361 new_child
.parent
= self
7362 assert new_child
isa TAssign
7363 _n_assign
= new_child
7369 if _n_value
== old_child
then
7370 if new_child
!= null then
7371 new_child
.parent
= self
7372 assert new_child
isa AExpr
7373 _n_value
= new_child
7381 redef fun visit_all
(v
: Visitor)
7383 v
.enter_visit
(_n_expr
)
7384 v
.enter_visit
(_n_id
)
7388 v
.enter_visit
(_n_assign
)
7389 v
.enter_visit
(_n_value
)
7392 redef fun visit_all_reverse
(v
: Visitor)
7394 v
.enter_visit
(_n_expr
)
7395 v
.enter_visit
(_n_id
)
7397 var i
= _n_args
.length
7399 v
.enter_visit
(_n_args
[i
])
7403 v
.enter_visit
(_n_assign
)
7404 v
.enter_visit
(_n_value
)
7407 redef class ACallReassignExpr
7408 redef fun n_expr
=(n
)
7418 redef fun n_assign_op
=(n
)
7423 redef fun n_value
=(n
)
7429 private init empty_init
do end
7431 init init_acallreassignexpr
(
7432 n_expr
: nullable AExpr,
7434 n_args
: Collection[Object], # Should be Collection[AExpr]
7435 n_assign_op
: nullable AAssignOp,
7436 n_value
: nullable AExpr
7440 _n_expr
= n_expr
.as(not null)
7441 n_expr
.parent
= self
7442 _n_id
= n_id
.as(not null)
7449 _n_assign_op
= n_assign_op
.as(not null)
7450 n_assign_op
.parent
= self
7451 _n_value
= n_value
.as(not null)
7452 n_value
.parent
= self
7455 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7457 if _n_expr
== old_child
then
7458 if new_child
!= null then
7459 new_child
.parent
= self
7460 assert new_child
isa AExpr
7467 if _n_id
== old_child
then
7468 if new_child
!= null then
7469 new_child
.parent
= self
7470 assert new_child
isa TId
7477 for i
in [0.._n_args
.length
[ do
7478 if _n_args
[i
] == old_child
then
7479 if new_child
!= null then
7480 assert new_child
isa AExpr
7481 _n_args
[i
] = new_child
7482 new_child
.parent
= self
7484 _n_args
.remove_at
(i
)
7489 if _n_assign_op
== old_child
then
7490 if new_child
!= null then
7491 new_child
.parent
= self
7492 assert new_child
isa AAssignOp
7493 _n_assign_op
= new_child
7499 if _n_value
== old_child
then
7500 if new_child
!= null then
7501 new_child
.parent
= self
7502 assert new_child
isa AExpr
7503 _n_value
= new_child
7511 redef fun visit_all
(v
: Visitor)
7513 v
.enter_visit
(_n_expr
)
7514 v
.enter_visit
(_n_id
)
7518 v
.enter_visit
(_n_assign_op
)
7519 v
.enter_visit
(_n_value
)
7522 redef fun visit_all_reverse
(v
: Visitor)
7524 v
.enter_visit
(_n_expr
)
7525 v
.enter_visit
(_n_id
)
7527 var i
= _n_args
.length
7529 v
.enter_visit
(_n_args
[i
])
7533 v
.enter_visit
(_n_assign_op
)
7534 v
.enter_visit
(_n_value
)
7537 redef class ASuperExpr
7538 redef fun n_qualified
=(n
)
7545 redef fun n_kwsuper
=(n
)
7551 private init empty_init
do end
7553 init init_asuperexpr
(
7554 n_qualified
: nullable AQualified,
7555 n_kwsuper
: nullable TKwsuper,
7556 n_args
: Collection[Object] # Should be Collection[AExpr]
7560 _n_qualified
= n_qualified
7561 if n_qualified
!= null then
7562 n_qualified
.parent
= self
7564 _n_kwsuper
= n_kwsuper
.as(not null)
7565 n_kwsuper
.parent
= self
7573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7575 if _n_qualified
== old_child
then
7576 if new_child
!= null then
7577 new_child
.parent
= self
7578 assert new_child
isa AQualified
7579 _n_qualified
= new_child
7585 if _n_kwsuper
== old_child
then
7586 if new_child
!= null then
7587 new_child
.parent
= self
7588 assert new_child
isa TKwsuper
7589 _n_kwsuper
= new_child
7595 for i
in [0.._n_args
.length
[ do
7596 if _n_args
[i
] == old_child
then
7597 if new_child
!= null then
7598 assert new_child
isa AExpr
7599 _n_args
[i
] = new_child
7600 new_child
.parent
= self
7602 _n_args
.remove_at
(i
)
7609 redef fun visit_all
(v
: Visitor)
7611 if _n_qualified
!= null then
7612 v
.enter_visit
(_n_qualified
.as(not null))
7614 v
.enter_visit
(_n_kwsuper
)
7620 redef fun visit_all_reverse
(v
: Visitor)
7622 if _n_qualified
!= null then
7623 v
.enter_visit
(_n_qualified
.as(not null))
7625 v
.enter_visit
(_n_kwsuper
)
7627 var i
= _n_args
.length
7629 v
.enter_visit
(_n_args
[i
])
7635 redef class AInitExpr
7636 redef fun n_expr
=(n
)
7641 redef fun n_kwinit
=(n
)
7647 private init empty_init
do end
7649 init init_ainitexpr
(
7650 n_expr
: nullable AExpr,
7651 n_kwinit
: nullable TKwinit,
7652 n_args
: Collection[Object] # Should be Collection[AExpr]
7656 _n_expr
= n_expr
.as(not null)
7657 n_expr
.parent
= self
7658 _n_kwinit
= n_kwinit
.as(not null)
7659 n_kwinit
.parent
= self
7667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7669 if _n_expr
== old_child
then
7670 if new_child
!= null then
7671 new_child
.parent
= self
7672 assert new_child
isa AExpr
7679 if _n_kwinit
== old_child
then
7680 if new_child
!= null then
7681 new_child
.parent
= self
7682 assert new_child
isa TKwinit
7683 _n_kwinit
= new_child
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
)
7703 redef fun visit_all
(v
: Visitor)
7705 v
.enter_visit
(_n_expr
)
7706 v
.enter_visit
(_n_kwinit
)
7712 redef fun visit_all_reverse
(v
: Visitor)
7714 v
.enter_visit
(_n_expr
)
7715 v
.enter_visit
(_n_kwinit
)
7717 var i
= _n_args
.length
7719 v
.enter_visit
(_n_args
[i
])
7725 redef class ABraExpr
7726 redef fun n_expr
=(n
)
7732 private init empty_init
do end
7734 init init_abraexpr
(
7735 n_expr
: nullable AExpr,
7736 n_args
: Collection[Object], # Should be Collection[AExpr]
7737 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7741 _n_expr
= n_expr
.as(not null)
7742 n_expr
.parent
= self
7748 for n
in n_closure_defs
do
7749 assert n
isa AClosureDef
7750 _n_closure_defs
.add
(n
)
7755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7757 if _n_expr
== old_child
then
7758 if new_child
!= null then
7759 new_child
.parent
= self
7760 assert new_child
isa AExpr
7767 for i
in [0.._n_args
.length
[ do
7768 if _n_args
[i
] == old_child
then
7769 if new_child
!= null then
7770 assert new_child
isa AExpr
7771 _n_args
[i
] = new_child
7772 new_child
.parent
= self
7774 _n_args
.remove_at
(i
)
7779 for i
in [0.._n_closure_defs
.length
[ do
7780 if _n_closure_defs
[i
] == old_child
then
7781 if new_child
!= null then
7782 assert new_child
isa AClosureDef
7783 _n_closure_defs
[i
] = new_child
7784 new_child
.parent
= self
7786 _n_closure_defs
.remove_at
(i
)
7793 redef fun visit_all
(v
: Visitor)
7795 v
.enter_visit
(_n_expr
)
7799 for n
in _n_closure_defs
do
7804 redef fun visit_all_reverse
(v
: Visitor)
7806 v
.enter_visit
(_n_expr
)
7808 var i
= _n_args
.length
7810 v
.enter_visit
(_n_args
[i
])
7815 var i
= _n_closure_defs
.length
7817 v
.enter_visit
(_n_closure_defs
[i
])
7823 redef class ABraAssignExpr
7824 redef fun n_expr
=(n
)
7829 redef fun n_assign
=(n
)
7834 redef fun n_value
=(n
)
7840 private init empty_init
do end
7842 init init_abraassignexpr
(
7843 n_expr
: nullable AExpr,
7844 n_args
: Collection[Object], # Should be Collection[AExpr]
7845 n_assign
: nullable TAssign,
7846 n_value
: nullable AExpr
7850 _n_expr
= n_expr
.as(not null)
7851 n_expr
.parent
= self
7857 _n_assign
= n_assign
.as(not null)
7858 n_assign
.parent
= self
7859 _n_value
= n_value
.as(not null)
7860 n_value
.parent
= self
7863 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7865 if _n_expr
== old_child
then
7866 if new_child
!= null then
7867 new_child
.parent
= self
7868 assert new_child
isa AExpr
7875 for i
in [0.._n_args
.length
[ do
7876 if _n_args
[i
] == old_child
then
7877 if new_child
!= null then
7878 assert new_child
isa AExpr
7879 _n_args
[i
] = new_child
7880 new_child
.parent
= self
7882 _n_args
.remove_at
(i
)
7887 if _n_assign
== old_child
then
7888 if new_child
!= null then
7889 new_child
.parent
= self
7890 assert new_child
isa TAssign
7891 _n_assign
= new_child
7897 if _n_value
== old_child
then
7898 if new_child
!= null then
7899 new_child
.parent
= self
7900 assert new_child
isa AExpr
7901 _n_value
= new_child
7909 redef fun visit_all
(v
: Visitor)
7911 v
.enter_visit
(_n_expr
)
7915 v
.enter_visit
(_n_assign
)
7916 v
.enter_visit
(_n_value
)
7919 redef fun visit_all_reverse
(v
: Visitor)
7921 v
.enter_visit
(_n_expr
)
7923 var i
= _n_args
.length
7925 v
.enter_visit
(_n_args
[i
])
7929 v
.enter_visit
(_n_assign
)
7930 v
.enter_visit
(_n_value
)
7933 redef class ABraReassignExpr
7934 redef fun n_expr
=(n
)
7939 redef fun n_assign_op
=(n
)
7944 redef fun n_value
=(n
)
7950 private init empty_init
do end
7952 init init_abrareassignexpr
(
7953 n_expr
: nullable AExpr,
7954 n_args
: Collection[Object], # Should be Collection[AExpr]
7955 n_assign_op
: nullable AAssignOp,
7956 n_value
: nullable AExpr
7960 _n_expr
= n_expr
.as(not null)
7961 n_expr
.parent
= self
7967 _n_assign_op
= n_assign_op
.as(not null)
7968 n_assign_op
.parent
= self
7969 _n_value
= n_value
.as(not null)
7970 n_value
.parent
= self
7973 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7975 if _n_expr
== old_child
then
7976 if new_child
!= null then
7977 new_child
.parent
= self
7978 assert new_child
isa AExpr
7985 for i
in [0.._n_args
.length
[ do
7986 if _n_args
[i
] == old_child
then
7987 if new_child
!= null then
7988 assert new_child
isa AExpr
7989 _n_args
[i
] = new_child
7990 new_child
.parent
= self
7992 _n_args
.remove_at
(i
)
7997 if _n_assign_op
== old_child
then
7998 if new_child
!= null then
7999 new_child
.parent
= self
8000 assert new_child
isa AAssignOp
8001 _n_assign_op
= new_child
8007 if _n_value
== old_child
then
8008 if new_child
!= null then
8009 new_child
.parent
= self
8010 assert new_child
isa AExpr
8011 _n_value
= new_child
8019 redef fun visit_all
(v
: Visitor)
8021 v
.enter_visit
(_n_expr
)
8025 v
.enter_visit
(_n_assign_op
)
8026 v
.enter_visit
(_n_value
)
8029 redef fun visit_all_reverse
(v
: Visitor)
8031 v
.enter_visit
(_n_expr
)
8033 var i
= _n_args
.length
8035 v
.enter_visit
(_n_args
[i
])
8039 v
.enter_visit
(_n_assign_op
)
8040 v
.enter_visit
(_n_value
)
8043 redef class AClosureCallExpr
8050 private init empty_init
do end
8052 init init_aclosurecallexpr
(
8054 n_args
: Collection[Object], # Should be Collection[AExpr]
8055 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8059 _n_id
= n_id
.as(not null)
8066 for n
in n_closure_defs
do
8067 assert n
isa AClosureDef
8068 _n_closure_defs
.add
(n
)
8073 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8075 if _n_id
== old_child
then
8076 if new_child
!= null then
8077 new_child
.parent
= self
8078 assert new_child
isa TId
8085 for i
in [0.._n_args
.length
[ do
8086 if _n_args
[i
] == old_child
then
8087 if new_child
!= null then
8088 assert new_child
isa AExpr
8089 _n_args
[i
] = new_child
8090 new_child
.parent
= self
8092 _n_args
.remove_at
(i
)
8097 for i
in [0.._n_closure_defs
.length
[ do
8098 if _n_closure_defs
[i
] == old_child
then
8099 if new_child
!= null then
8100 assert new_child
isa AClosureDef
8101 _n_closure_defs
[i
] = new_child
8102 new_child
.parent
= self
8104 _n_closure_defs
.remove_at
(i
)
8111 redef fun visit_all
(v
: Visitor)
8113 v
.enter_visit
(_n_id
)
8117 for n
in _n_closure_defs
do
8122 redef fun visit_all_reverse
(v
: Visitor)
8124 v
.enter_visit
(_n_id
)
8126 var i
= _n_args
.length
8128 v
.enter_visit
(_n_args
[i
])
8133 var i
= _n_closure_defs
.length
8135 v
.enter_visit
(_n_closure_defs
[i
])
8141 redef class AVarExpr
8148 private init empty_init
do end
8150 init init_avarexpr
(
8155 _n_id
= n_id
.as(not null)
8159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8161 if _n_id
== old_child
then
8162 if new_child
!= null then
8163 new_child
.parent
= self
8164 assert new_child
isa TId
8173 redef fun visit_all
(v
: Visitor)
8175 v
.enter_visit
(_n_id
)
8178 redef fun visit_all_reverse
(v
: Visitor)
8180 v
.enter_visit
(_n_id
)
8183 redef class AVarAssignExpr
8189 redef fun n_assign
=(n
)
8194 redef fun n_value
=(n
)
8200 private init empty_init
do end
8202 init init_avarassignexpr
(
8204 n_assign
: nullable TAssign,
8205 n_value
: nullable AExpr
8209 _n_id
= n_id
.as(not null)
8211 _n_assign
= n_assign
.as(not null)
8212 n_assign
.parent
= self
8213 _n_value
= n_value
.as(not null)
8214 n_value
.parent
= self
8217 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8219 if _n_id
== old_child
then
8220 if new_child
!= null then
8221 new_child
.parent
= self
8222 assert new_child
isa TId
8229 if _n_assign
== old_child
then
8230 if new_child
!= null then
8231 new_child
.parent
= self
8232 assert new_child
isa TAssign
8233 _n_assign
= new_child
8239 if _n_value
== old_child
then
8240 if new_child
!= null then
8241 new_child
.parent
= self
8242 assert new_child
isa AExpr
8243 _n_value
= new_child
8251 redef fun visit_all
(v
: Visitor)
8253 v
.enter_visit
(_n_id
)
8254 v
.enter_visit
(_n_assign
)
8255 v
.enter_visit
(_n_value
)
8258 redef fun visit_all_reverse
(v
: Visitor)
8260 v
.enter_visit
(_n_id
)
8261 v
.enter_visit
(_n_assign
)
8262 v
.enter_visit
(_n_value
)
8265 redef class AVarReassignExpr
8271 redef fun n_assign_op
=(n
)
8276 redef fun n_value
=(n
)
8282 private init empty_init
do end
8284 init init_avarreassignexpr
(
8286 n_assign_op
: nullable AAssignOp,
8287 n_value
: nullable AExpr
8291 _n_id
= n_id
.as(not null)
8293 _n_assign_op
= n_assign_op
.as(not null)
8294 n_assign_op
.parent
= self
8295 _n_value
= n_value
.as(not null)
8296 n_value
.parent
= self
8299 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8301 if _n_id
== old_child
then
8302 if new_child
!= null then
8303 new_child
.parent
= self
8304 assert new_child
isa TId
8311 if _n_assign_op
== old_child
then
8312 if new_child
!= null then
8313 new_child
.parent
= self
8314 assert new_child
isa AAssignOp
8315 _n_assign_op
= new_child
8321 if _n_value
== old_child
then
8322 if new_child
!= null then
8323 new_child
.parent
= self
8324 assert new_child
isa AExpr
8325 _n_value
= new_child
8333 redef fun visit_all
(v
: Visitor)
8335 v
.enter_visit
(_n_id
)
8336 v
.enter_visit
(_n_assign_op
)
8337 v
.enter_visit
(_n_value
)
8340 redef fun visit_all_reverse
(v
: Visitor)
8342 v
.enter_visit
(_n_id
)
8343 v
.enter_visit
(_n_assign_op
)
8344 v
.enter_visit
(_n_value
)
8347 redef class ARangeExpr
8348 redef fun n_expr
=(n
)
8353 redef fun n_expr2
=(n
)
8359 private init empty_init
do end
8361 init init_arangeexpr
(
8362 n_expr
: nullable AExpr,
8363 n_expr2
: nullable AExpr
8367 _n_expr
= n_expr
.as(not null)
8368 n_expr
.parent
= self
8369 _n_expr2
= n_expr2
.as(not null)
8370 n_expr2
.parent
= self
8373 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8375 if _n_expr
== old_child
then
8376 if new_child
!= null then
8377 new_child
.parent
= self
8378 assert new_child
isa AExpr
8385 if _n_expr2
== old_child
then
8386 if new_child
!= null then
8387 new_child
.parent
= self
8388 assert new_child
isa AExpr
8389 _n_expr2
= new_child
8397 redef fun visit_all
(v
: Visitor)
8399 v
.enter_visit
(_n_expr
)
8400 v
.enter_visit
(_n_expr2
)
8403 redef fun visit_all_reverse
(v
: Visitor)
8405 v
.enter_visit
(_n_expr
)
8406 v
.enter_visit
(_n_expr2
)
8409 redef class ACrangeExpr
8410 redef fun n_expr
=(n
)
8415 redef fun n_expr2
=(n
)
8421 private init empty_init
do end
8423 init init_acrangeexpr
(
8424 n_expr
: nullable AExpr,
8425 n_expr2
: nullable AExpr
8429 _n_expr
= n_expr
.as(not null)
8430 n_expr
.parent
= self
8431 _n_expr2
= n_expr2
.as(not null)
8432 n_expr2
.parent
= self
8435 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8437 if _n_expr
== old_child
then
8438 if new_child
!= null then
8439 new_child
.parent
= self
8440 assert new_child
isa AExpr
8447 if _n_expr2
== old_child
then
8448 if new_child
!= null then
8449 new_child
.parent
= self
8450 assert new_child
isa AExpr
8451 _n_expr2
= new_child
8459 redef fun visit_all
(v
: Visitor)
8461 v
.enter_visit
(_n_expr
)
8462 v
.enter_visit
(_n_expr2
)
8465 redef fun visit_all_reverse
(v
: Visitor)
8467 v
.enter_visit
(_n_expr
)
8468 v
.enter_visit
(_n_expr2
)
8471 redef class AOrangeExpr
8472 redef fun n_expr
=(n
)
8477 redef fun n_expr2
=(n
)
8483 private init empty_init
do end
8485 init init_aorangeexpr
(
8486 n_expr
: nullable AExpr,
8487 n_expr2
: nullable AExpr
8491 _n_expr
= n_expr
.as(not null)
8492 n_expr
.parent
= self
8493 _n_expr2
= n_expr2
.as(not null)
8494 n_expr2
.parent
= self
8497 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8499 if _n_expr
== old_child
then
8500 if new_child
!= null then
8501 new_child
.parent
= self
8502 assert new_child
isa AExpr
8509 if _n_expr2
== old_child
then
8510 if new_child
!= null then
8511 new_child
.parent
= self
8512 assert new_child
isa AExpr
8513 _n_expr2
= new_child
8521 redef fun visit_all
(v
: Visitor)
8523 v
.enter_visit
(_n_expr
)
8524 v
.enter_visit
(_n_expr2
)
8527 redef fun visit_all_reverse
(v
: Visitor)
8529 v
.enter_visit
(_n_expr
)
8530 v
.enter_visit
(_n_expr2
)
8533 redef class AArrayExpr
8535 private init empty_init
do end
8537 init init_aarrayexpr
(
8538 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8551 for i
in [0.._n_exprs
.length
[ do
8552 if _n_exprs
[i
] == old_child
then
8553 if new_child
!= null then
8554 assert new_child
isa AExpr
8555 _n_exprs
[i
] = new_child
8556 new_child
.parent
= self
8558 _n_exprs
.remove_at
(i
)
8565 redef fun visit_all
(v
: Visitor)
8567 for n
in _n_exprs
do
8572 redef fun visit_all_reverse
(v
: Visitor)
8575 var i
= _n_exprs
.length
8577 v
.enter_visit
(_n_exprs
[i
])
8583 redef class ASelfExpr
8584 redef fun n_kwself
=(n
)
8590 private init empty_init
do end
8592 init init_aselfexpr
(
8593 n_kwself
: nullable TKwself
8597 _n_kwself
= n_kwself
.as(not null)
8598 n_kwself
.parent
= self
8601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8603 if _n_kwself
== old_child
then
8604 if new_child
!= null then
8605 new_child
.parent
= self
8606 assert new_child
isa TKwself
8607 _n_kwself
= new_child
8615 redef fun visit_all
(v
: Visitor)
8617 v
.enter_visit
(_n_kwself
)
8620 redef fun visit_all_reverse
(v
: Visitor)
8622 v
.enter_visit
(_n_kwself
)
8625 redef class AImplicitSelfExpr
8627 private init empty_init
do end
8629 init init_aimplicitselfexpr
8634 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8638 redef fun visit_all
(v
: Visitor)
8642 redef fun visit_all_reverse
(v
: Visitor)
8646 redef class ATrueExpr
8647 redef fun n_kwtrue
=(n
)
8653 private init empty_init
do end
8655 init init_atrueexpr
(
8656 n_kwtrue
: nullable TKwtrue
8660 _n_kwtrue
= n_kwtrue
.as(not null)
8661 n_kwtrue
.parent
= self
8664 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8666 if _n_kwtrue
== old_child
then
8667 if new_child
!= null then
8668 new_child
.parent
= self
8669 assert new_child
isa TKwtrue
8670 _n_kwtrue
= new_child
8678 redef fun visit_all
(v
: Visitor)
8680 v
.enter_visit
(_n_kwtrue
)
8683 redef fun visit_all_reverse
(v
: Visitor)
8685 v
.enter_visit
(_n_kwtrue
)
8688 redef class AFalseExpr
8689 redef fun n_kwfalse
=(n
)
8695 private init empty_init
do end
8697 init init_afalseexpr
(
8698 n_kwfalse
: nullable TKwfalse
8702 _n_kwfalse
= n_kwfalse
.as(not null)
8703 n_kwfalse
.parent
= self
8706 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8708 if _n_kwfalse
== old_child
then
8709 if new_child
!= null then
8710 new_child
.parent
= self
8711 assert new_child
isa TKwfalse
8712 _n_kwfalse
= new_child
8720 redef fun visit_all
(v
: Visitor)
8722 v
.enter_visit
(_n_kwfalse
)
8725 redef fun visit_all_reverse
(v
: Visitor)
8727 v
.enter_visit
(_n_kwfalse
)
8730 redef class ANullExpr
8731 redef fun n_kwnull
=(n
)
8737 private init empty_init
do end
8739 init init_anullexpr
(
8740 n_kwnull
: nullable TKwnull
8744 _n_kwnull
= n_kwnull
.as(not null)
8745 n_kwnull
.parent
= self
8748 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8750 if _n_kwnull
== old_child
then
8751 if new_child
!= null then
8752 new_child
.parent
= self
8753 assert new_child
isa TKwnull
8754 _n_kwnull
= new_child
8762 redef fun visit_all
(v
: Visitor)
8764 v
.enter_visit
(_n_kwnull
)
8767 redef fun visit_all_reverse
(v
: Visitor)
8769 v
.enter_visit
(_n_kwnull
)
8772 redef class AIntExpr
8773 redef fun n_number
=(n
)
8779 private init empty_init
do end
8781 init init_aintexpr
(
8782 n_number
: nullable TNumber
8786 _n_number
= n_number
.as(not null)
8787 n_number
.parent
= self
8790 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8792 if _n_number
== old_child
then
8793 if new_child
!= null then
8794 new_child
.parent
= self
8795 assert new_child
isa TNumber
8796 _n_number
= new_child
8804 redef fun visit_all
(v
: Visitor)
8806 v
.enter_visit
(_n_number
)
8809 redef fun visit_all_reverse
(v
: Visitor)
8811 v
.enter_visit
(_n_number
)
8814 redef class AFloatExpr
8815 redef fun n_float
=(n
)
8821 private init empty_init
do end
8823 init init_afloatexpr
(
8824 n_float
: nullable TFloat
8828 _n_float
= n_float
.as(not null)
8829 n_float
.parent
= self
8832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8834 if _n_float
== old_child
then
8835 if new_child
!= null then
8836 new_child
.parent
= self
8837 assert new_child
isa TFloat
8838 _n_float
= new_child
8846 redef fun visit_all
(v
: Visitor)
8848 v
.enter_visit
(_n_float
)
8851 redef fun visit_all_reverse
(v
: Visitor)
8853 v
.enter_visit
(_n_float
)
8856 redef class ACharExpr
8857 redef fun n_char
=(n
)
8863 private init empty_init
do end
8865 init init_acharexpr
(
8866 n_char
: nullable TChar
8870 _n_char
= n_char
.as(not null)
8871 n_char
.parent
= self
8874 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8876 if _n_char
== old_child
then
8877 if new_child
!= null then
8878 new_child
.parent
= self
8879 assert new_child
isa TChar
8888 redef fun visit_all
(v
: Visitor)
8890 v
.enter_visit
(_n_char
)
8893 redef fun visit_all_reverse
(v
: Visitor)
8895 v
.enter_visit
(_n_char
)
8898 redef class AStringExpr
8899 redef fun n_string
=(n
)
8905 private init empty_init
do end
8907 init init_astringexpr
(
8908 n_string
: nullable TString
8912 _n_string
= n_string
.as(not null)
8913 n_string
.parent
= self
8916 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8918 if _n_string
== old_child
then
8919 if new_child
!= null then
8920 new_child
.parent
= self
8921 assert new_child
isa TString
8922 _n_string
= new_child
8930 redef fun visit_all
(v
: Visitor)
8932 v
.enter_visit
(_n_string
)
8935 redef fun visit_all_reverse
(v
: Visitor)
8937 v
.enter_visit
(_n_string
)
8940 redef class AStartStringExpr
8941 redef fun n_string
=(n
)
8947 private init empty_init
do end
8949 init init_astartstringexpr
(
8950 n_string
: nullable TStartString
8954 _n_string
= n_string
.as(not null)
8955 n_string
.parent
= self
8958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8960 if _n_string
== old_child
then
8961 if new_child
!= null then
8962 new_child
.parent
= self
8963 assert new_child
isa TStartString
8964 _n_string
= new_child
8972 redef fun visit_all
(v
: Visitor)
8974 v
.enter_visit
(_n_string
)
8977 redef fun visit_all_reverse
(v
: Visitor)
8979 v
.enter_visit
(_n_string
)
8982 redef class AMidStringExpr
8983 redef fun n_string
=(n
)
8989 private init empty_init
do end
8991 init init_amidstringexpr
(
8992 n_string
: nullable TMidString
8996 _n_string
= n_string
.as(not null)
8997 n_string
.parent
= self
9000 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9002 if _n_string
== old_child
then
9003 if new_child
!= null then
9004 new_child
.parent
= self
9005 assert new_child
isa TMidString
9006 _n_string
= new_child
9014 redef fun visit_all
(v
: Visitor)
9016 v
.enter_visit
(_n_string
)
9019 redef fun visit_all_reverse
(v
: Visitor)
9021 v
.enter_visit
(_n_string
)
9024 redef class AEndStringExpr
9025 redef fun n_string
=(n
)
9031 private init empty_init
do end
9033 init init_aendstringexpr
(
9034 n_string
: nullable TEndString
9038 _n_string
= n_string
.as(not null)
9039 n_string
.parent
= self
9042 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9044 if _n_string
== old_child
then
9045 if new_child
!= null then
9046 new_child
.parent
= self
9047 assert new_child
isa TEndString
9048 _n_string
= new_child
9056 redef fun visit_all
(v
: Visitor)
9058 v
.enter_visit
(_n_string
)
9061 redef fun visit_all_reverse
(v
: Visitor)
9063 v
.enter_visit
(_n_string
)
9066 redef class ASuperstringExpr
9068 private init empty_init
do end
9070 init init_asuperstringexpr
(
9071 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9082 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9084 for i
in [0.._n_exprs
.length
[ do
9085 if _n_exprs
[i
] == old_child
then
9086 if new_child
!= null then
9087 assert new_child
isa AExpr
9088 _n_exprs
[i
] = new_child
9089 new_child
.parent
= self
9091 _n_exprs
.remove_at
(i
)
9098 redef fun visit_all
(v
: Visitor)
9100 for n
in _n_exprs
do
9105 redef fun visit_all_reverse
(v
: Visitor)
9108 var i
= _n_exprs
.length
9110 v
.enter_visit
(_n_exprs
[i
])
9116 redef class AParExpr
9117 redef fun n_expr
=(n
)
9123 private init empty_init
do end
9125 init init_aparexpr
(
9126 n_expr
: nullable AExpr
9130 _n_expr
= n_expr
.as(not null)
9131 n_expr
.parent
= self
9134 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9136 if _n_expr
== old_child
then
9137 if new_child
!= null then
9138 new_child
.parent
= self
9139 assert new_child
isa AExpr
9148 redef fun visit_all
(v
: Visitor)
9150 v
.enter_visit
(_n_expr
)
9153 redef fun visit_all_reverse
(v
: Visitor)
9155 v
.enter_visit
(_n_expr
)
9158 redef class AAsCastExpr
9159 redef fun n_expr
=(n
)
9164 redef fun n_kwas
=(n
)
9169 redef fun n_type
=(n
)
9175 private init empty_init
do end
9177 init init_aascastexpr
(
9178 n_expr
: nullable AExpr,
9179 n_kwas
: nullable TKwas,
9180 n_type
: nullable AType
9184 _n_expr
= n_expr
.as(not null)
9185 n_expr
.parent
= self
9186 _n_kwas
= n_kwas
.as(not null)
9187 n_kwas
.parent
= self
9188 _n_type
= n_type
.as(not null)
9189 n_type
.parent
= self
9192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9194 if _n_expr
== old_child
then
9195 if new_child
!= null then
9196 new_child
.parent
= self
9197 assert new_child
isa AExpr
9204 if _n_kwas
== old_child
then
9205 if new_child
!= null then
9206 new_child
.parent
= self
9207 assert new_child
isa TKwas
9214 if _n_type
== old_child
then
9215 if new_child
!= null then
9216 new_child
.parent
= self
9217 assert new_child
isa AType
9226 redef fun visit_all
(v
: Visitor)
9228 v
.enter_visit
(_n_expr
)
9229 v
.enter_visit
(_n_kwas
)
9230 v
.enter_visit
(_n_type
)
9233 redef fun visit_all_reverse
(v
: Visitor)
9235 v
.enter_visit
(_n_expr
)
9236 v
.enter_visit
(_n_kwas
)
9237 v
.enter_visit
(_n_type
)
9240 redef class AAsNotnullExpr
9241 redef fun n_expr
=(n
)
9246 redef fun n_kwas
=(n
)
9251 redef fun n_kwnot
=(n
)
9256 redef fun n_kwnull
=(n
)
9262 private init empty_init
do end
9264 init init_aasnotnullexpr
(
9265 n_expr
: nullable AExpr,
9266 n_kwas
: nullable TKwas,
9267 n_kwnot
: nullable TKwnot,
9268 n_kwnull
: nullable TKwnull
9272 _n_expr
= n_expr
.as(not null)
9273 n_expr
.parent
= self
9274 _n_kwas
= n_kwas
.as(not null)
9275 n_kwas
.parent
= self
9276 _n_kwnot
= n_kwnot
.as(not null)
9277 n_kwnot
.parent
= self
9278 _n_kwnull
= n_kwnull
.as(not null)
9279 n_kwnull
.parent
= self
9282 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9284 if _n_expr
== old_child
then
9285 if new_child
!= null then
9286 new_child
.parent
= self
9287 assert new_child
isa AExpr
9294 if _n_kwas
== old_child
then
9295 if new_child
!= null then
9296 new_child
.parent
= self
9297 assert new_child
isa TKwas
9304 if _n_kwnot
== old_child
then
9305 if new_child
!= null then
9306 new_child
.parent
= self
9307 assert new_child
isa TKwnot
9308 _n_kwnot
= new_child
9314 if _n_kwnull
== old_child
then
9315 if new_child
!= null then
9316 new_child
.parent
= self
9317 assert new_child
isa TKwnull
9318 _n_kwnull
= new_child
9326 redef fun visit_all
(v
: Visitor)
9328 v
.enter_visit
(_n_expr
)
9329 v
.enter_visit
(_n_kwas
)
9330 v
.enter_visit
(_n_kwnot
)
9331 v
.enter_visit
(_n_kwnull
)
9334 redef fun visit_all_reverse
(v
: Visitor)
9336 v
.enter_visit
(_n_expr
)
9337 v
.enter_visit
(_n_kwas
)
9338 v
.enter_visit
(_n_kwnot
)
9339 v
.enter_visit
(_n_kwnull
)
9342 redef class AIssetAttrExpr
9343 redef fun n_kwisset
=(n
)
9348 redef fun n_expr
=(n
)
9359 private init empty_init
do end
9361 init init_aissetattrexpr
(
9362 n_kwisset
: nullable TKwisset,
9363 n_expr
: nullable AExpr,
9364 n_id
: nullable TAttrid
9368 _n_kwisset
= n_kwisset
.as(not null)
9369 n_kwisset
.parent
= self
9370 _n_expr
= n_expr
.as(not null)
9371 n_expr
.parent
= self
9372 _n_id
= n_id
.as(not null)
9376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9378 if _n_kwisset
== old_child
then
9379 if new_child
!= null then
9380 new_child
.parent
= self
9381 assert new_child
isa TKwisset
9382 _n_kwisset
= new_child
9388 if _n_expr
== old_child
then
9389 if new_child
!= null then
9390 new_child
.parent
= self
9391 assert new_child
isa AExpr
9398 if _n_id
== old_child
then
9399 if new_child
!= null then
9400 new_child
.parent
= self
9401 assert new_child
isa TAttrid
9410 redef fun visit_all
(v
: Visitor)
9412 v
.enter_visit
(_n_kwisset
)
9413 v
.enter_visit
(_n_expr
)
9414 v
.enter_visit
(_n_id
)
9417 redef fun visit_all_reverse
(v
: Visitor)
9419 v
.enter_visit
(_n_kwisset
)
9420 v
.enter_visit
(_n_expr
)
9421 v
.enter_visit
(_n_id
)
9424 redef class APlusAssignOp
9425 redef fun n_pluseq
=(n
)
9431 private init empty_init
do end
9433 init init_aplusassignop
(
9434 n_pluseq
: nullable TPluseq
9438 _n_pluseq
= n_pluseq
.as(not null)
9439 n_pluseq
.parent
= self
9442 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9444 if _n_pluseq
== old_child
then
9445 if new_child
!= null then
9446 new_child
.parent
= self
9447 assert new_child
isa TPluseq
9448 _n_pluseq
= new_child
9456 redef fun visit_all
(v
: Visitor)
9458 v
.enter_visit
(_n_pluseq
)
9461 redef fun visit_all_reverse
(v
: Visitor)
9463 v
.enter_visit
(_n_pluseq
)
9466 redef class AMinusAssignOp
9467 redef fun n_minuseq
=(n
)
9473 private init empty_init
do end
9475 init init_aminusassignop
(
9476 n_minuseq
: nullable TMinuseq
9480 _n_minuseq
= n_minuseq
.as(not null)
9481 n_minuseq
.parent
= self
9484 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9486 if _n_minuseq
== old_child
then
9487 if new_child
!= null then
9488 new_child
.parent
= self
9489 assert new_child
isa TMinuseq
9490 _n_minuseq
= new_child
9498 redef fun visit_all
(v
: Visitor)
9500 v
.enter_visit
(_n_minuseq
)
9503 redef fun visit_all_reverse
(v
: Visitor)
9505 v
.enter_visit
(_n_minuseq
)
9508 redef class AClosureDef
9509 redef fun n_bang
=(n
)
9519 redef fun n_kwdo
=(n
)
9526 redef fun n_expr
=(n
)
9533 redef fun n_label
=(n
)
9541 private init empty_init
do end
9543 init init_aclosuredef
(
9544 n_bang
: nullable TBang,
9545 n_id
: nullable AClosureId,
9546 n_ids
: Collection[Object], # Should be Collection[TId]
9547 n_kwdo
: nullable TKwdo,
9548 n_expr
: nullable AExpr,
9549 n_label
: nullable ALabel
9553 _n_bang
= n_bang
.as(not null)
9554 n_bang
.parent
= self
9555 _n_id
= n_id
.as(not null)
9563 if n_kwdo
!= null then
9564 n_kwdo
.parent
= self
9567 if n_expr
!= null then
9568 n_expr
.parent
= self
9571 if n_label
!= null then
9572 n_label
.parent
= self
9576 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9578 if _n_bang
== old_child
then
9579 if new_child
!= null then
9580 new_child
.parent
= self
9581 assert new_child
isa TBang
9588 if _n_id
== old_child
then
9589 if new_child
!= null then
9590 new_child
.parent
= self
9591 assert new_child
isa AClosureId
9598 for i
in [0.._n_ids
.length
[ do
9599 if _n_ids
[i
] == old_child
then
9600 if new_child
!= null then
9601 assert new_child
isa TId
9602 _n_ids
[i
] = new_child
9603 new_child
.parent
= self
9610 if _n_kwdo
== old_child
then
9611 if new_child
!= null then
9612 new_child
.parent
= self
9613 assert new_child
isa TKwdo
9620 if _n_expr
== old_child
then
9621 if new_child
!= null then
9622 new_child
.parent
= self
9623 assert new_child
isa AExpr
9630 if _n_label
== old_child
then
9631 if new_child
!= null then
9632 new_child
.parent
= self
9633 assert new_child
isa ALabel
9634 _n_label
= new_child
9642 redef fun visit_all
(v
: Visitor)
9644 v
.enter_visit
(_n_bang
)
9645 v
.enter_visit
(_n_id
)
9649 if _n_kwdo
!= null then
9650 v
.enter_visit
(_n_kwdo
.as(not null))
9652 if _n_expr
!= null then
9653 v
.enter_visit
(_n_expr
.as(not null))
9655 if _n_label
!= null then
9656 v
.enter_visit
(_n_label
.as(not null))
9660 redef fun visit_all_reverse
(v
: Visitor)
9662 v
.enter_visit
(_n_bang
)
9663 v
.enter_visit
(_n_id
)
9665 var i
= _n_ids
.length
9667 v
.enter_visit
(_n_ids
[i
])
9671 if _n_kwdo
!= null then
9672 v
.enter_visit
(_n_kwdo
.as(not null))
9674 if _n_expr
!= null then
9675 v
.enter_visit
(_n_expr
.as(not null))
9677 if _n_label
!= null then
9678 v
.enter_visit
(_n_label
.as(not null))
9682 redef class ASimpleClosureId
9689 private init empty_init
do end
9691 init init_asimpleclosureid
(
9696 _n_id
= n_id
.as(not null)
9700 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9702 if _n_id
== old_child
then
9703 if new_child
!= null then
9704 new_child
.parent
= self
9705 assert new_child
isa TId
9714 redef fun visit_all
(v
: Visitor)
9716 v
.enter_visit
(_n_id
)
9719 redef fun visit_all_reverse
(v
: Visitor)
9721 v
.enter_visit
(_n_id
)
9724 redef class ABreakClosureId
9725 redef fun n_kwbreak
=(n
)
9731 private init empty_init
do end
9733 init init_abreakclosureid
(
9734 n_kwbreak
: nullable TKwbreak
9738 _n_kwbreak
= n_kwbreak
.as(not null)
9739 n_kwbreak
.parent
= self
9742 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9744 if _n_kwbreak
== old_child
then
9745 if new_child
!= null then
9746 new_child
.parent
= self
9747 assert new_child
isa TKwbreak
9748 _n_kwbreak
= new_child
9756 redef fun visit_all
(v
: Visitor)
9758 v
.enter_visit
(_n_kwbreak
)
9761 redef fun visit_all_reverse
(v
: Visitor)
9763 v
.enter_visit
(_n_kwbreak
)
9766 redef class AQualified
9767 redef fun n_classid
=(n
)
9775 private init empty_init
do end
9777 init init_aqualified
(
9778 n_id
: Collection[Object], # Should be Collection[TId]
9779 n_classid
: nullable TClassid
9788 _n_classid
= n_classid
9789 if n_classid
!= null then
9790 n_classid
.parent
= self
9794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9796 for i
in [0.._n_id
.length
[ do
9797 if _n_id
[i
] == old_child
then
9798 if new_child
!= null then
9799 assert new_child
isa TId
9800 _n_id
[i
] = new_child
9801 new_child
.parent
= self
9808 if _n_classid
== old_child
then
9809 if new_child
!= null then
9810 new_child
.parent
= self
9811 assert new_child
isa TClassid
9812 _n_classid
= new_child
9820 redef fun visit_all
(v
: Visitor)
9825 if _n_classid
!= null then
9826 v
.enter_visit
(_n_classid
.as(not null))
9830 redef fun visit_all_reverse
(v
: Visitor)
9833 var i
= _n_id
.length
9835 v
.enter_visit
(_n_id
[i
])
9839 if _n_classid
!= null then
9840 v
.enter_visit
(_n_classid
.as(not null))
9846 private init empty_init
do end
9849 n_comment
: Collection[Object] # Should be Collection[TComment]
9853 for n
in n_comment
do
9854 assert n
isa TComment
9860 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9862 for i
in [0.._n_comment
.length
[ do
9863 if _n_comment
[i
] == old_child
then
9864 if new_child
!= null then
9865 assert new_child
isa TComment
9866 _n_comment
[i
] = new_child
9867 new_child
.parent
= self
9869 _n_comment
.remove_at
(i
)
9876 redef fun visit_all
(v
: Visitor)
9878 for n
in _n_comment
do
9883 redef fun visit_all_reverse
(v
: Visitor)
9886 var i
= _n_comment
.length
9888 v
.enter_visit
(_n_comment
[i
])
9897 n_base
: nullable AModule,
9904 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9906 if _n_base
== old_child
then
9907 if new_child
== null then
9909 new_child
.parent
= self
9910 assert new_child
isa AModule
9913 old_child
.parent
= null
9918 redef fun visit_all
(v
: Visitor)
9920 if _n_base
!= null then
9921 v
.enter_visit
(_n_base
.as(not null))
9923 v
.enter_visit
(_n_eof
)
9926 redef fun visit_all_reverse
(v
: Visitor)
9928 v
.enter_visit
(_n_eof
)
9929 if _n_base
!= null then
9930 v
.enter_visit
(_n_base
.as(not null))