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 AForExpr
5148 redef fun n_kwfor
=(n
)
5158 redef fun n_expr
=(n
)
5163 redef fun n_kwdo
=(n
)
5168 redef fun n_block
=(n
)
5175 redef fun n_label
=(n
)
5183 private init empty_init
do end
5185 init init_aforexpr
(
5186 n_kwfor
: nullable TKwfor,
5188 n_expr
: nullable AExpr,
5189 n_kwdo
: nullable TKwdo,
5190 n_block
: nullable AExpr,
5191 n_label
: nullable ALabel
5195 _n_kwfor
= n_kwfor
.as(not null)
5196 n_kwfor
.parent
= self
5197 _n_id
= n_id
.as(not null)
5199 _n_expr
= n_expr
.as(not null)
5200 n_expr
.parent
= self
5201 _n_kwdo
= n_kwdo
.as(not null)
5202 n_kwdo
.parent
= self
5204 if n_block
!= null then
5205 n_block
.parent
= self
5208 if n_label
!= null then
5209 n_label
.parent
= self
5213 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5215 if _n_kwfor
== old_child
then
5216 if new_child
!= null then
5217 new_child
.parent
= self
5218 assert new_child
isa TKwfor
5219 _n_kwfor
= new_child
5225 if _n_id
== old_child
then
5226 if new_child
!= null then
5227 new_child
.parent
= self
5228 assert new_child
isa TId
5235 if _n_expr
== old_child
then
5236 if new_child
!= null then
5237 new_child
.parent
= self
5238 assert new_child
isa AExpr
5245 if _n_kwdo
== old_child
then
5246 if new_child
!= null then
5247 new_child
.parent
= self
5248 assert new_child
isa TKwdo
5255 if _n_block
== old_child
then
5256 if new_child
!= null then
5257 new_child
.parent
= self
5258 assert new_child
isa AExpr
5259 _n_block
= new_child
5265 if _n_label
== old_child
then
5266 if new_child
!= null then
5267 new_child
.parent
= self
5268 assert new_child
isa ALabel
5269 _n_label
= new_child
5277 redef fun visit_all
(v
: Visitor)
5279 v
.enter_visit
(_n_kwfor
)
5280 v
.enter_visit
(_n_id
)
5281 v
.enter_visit
(_n_expr
)
5282 v
.enter_visit
(_n_kwdo
)
5283 if _n_block
!= null then
5284 v
.enter_visit
(_n_block
.as(not null))
5286 if _n_label
!= null then
5287 v
.enter_visit
(_n_label
.as(not null))
5291 redef fun visit_all_reverse
(v
: Visitor)
5293 v
.enter_visit
(_n_kwfor
)
5294 v
.enter_visit
(_n_id
)
5295 v
.enter_visit
(_n_expr
)
5296 v
.enter_visit
(_n_kwdo
)
5297 if _n_block
!= null then
5298 v
.enter_visit
(_n_block
.as(not null))
5300 if _n_label
!= null then
5301 v
.enter_visit
(_n_label
.as(not null))
5305 redef class AAssertExpr
5306 redef fun n_kwassert
=(n
)
5318 redef fun n_expr
=(n
)
5324 private init empty_init
do end
5326 init init_aassertexpr
(
5327 n_kwassert
: nullable TKwassert,
5329 n_expr
: nullable AExpr
5333 _n_kwassert
= n_kwassert
.as(not null)
5334 n_kwassert
.parent
= self
5336 if n_id
!= null then
5339 _n_expr
= n_expr
.as(not null)
5340 n_expr
.parent
= self
5343 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5345 if _n_kwassert
== old_child
then
5346 if new_child
!= null then
5347 new_child
.parent
= self
5348 assert new_child
isa TKwassert
5349 _n_kwassert
= new_child
5355 if _n_id
== old_child
then
5356 if new_child
!= null then
5357 new_child
.parent
= self
5358 assert new_child
isa TId
5365 if _n_expr
== old_child
then
5366 if new_child
!= null then
5367 new_child
.parent
= self
5368 assert new_child
isa AExpr
5377 redef fun visit_all
(v
: Visitor)
5379 v
.enter_visit
(_n_kwassert
)
5380 if _n_id
!= null then
5381 v
.enter_visit
(_n_id
.as(not null))
5383 v
.enter_visit
(_n_expr
)
5386 redef fun visit_all_reverse
(v
: Visitor)
5388 v
.enter_visit
(_n_kwassert
)
5389 if _n_id
!= null then
5390 v
.enter_visit
(_n_id
.as(not null))
5392 v
.enter_visit
(_n_expr
)
5395 redef class AOnceExpr
5396 redef fun n_kwonce
=(n
)
5401 redef fun n_expr
=(n
)
5407 private init empty_init
do end
5409 init init_aonceexpr
(
5410 n_kwonce
: nullable TKwonce,
5411 n_expr
: nullable AExpr
5415 _n_kwonce
= n_kwonce
.as(not null)
5416 n_kwonce
.parent
= self
5417 _n_expr
= n_expr
.as(not null)
5418 n_expr
.parent
= self
5421 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5423 if _n_kwonce
== old_child
then
5424 if new_child
!= null then
5425 new_child
.parent
= self
5426 assert new_child
isa TKwonce
5427 _n_kwonce
= new_child
5433 if _n_expr
== old_child
then
5434 if new_child
!= null then
5435 new_child
.parent
= self
5436 assert new_child
isa AExpr
5445 redef fun visit_all
(v
: Visitor)
5447 v
.enter_visit
(_n_kwonce
)
5448 v
.enter_visit
(_n_expr
)
5451 redef fun visit_all_reverse
(v
: Visitor)
5453 v
.enter_visit
(_n_kwonce
)
5454 v
.enter_visit
(_n_expr
)
5457 redef class ASendExpr
5458 redef fun n_expr
=(n
)
5464 private init empty_init
do end
5466 init init_asendexpr
(
5467 n_expr
: nullable AExpr
5471 _n_expr
= n_expr
.as(not null)
5472 n_expr
.parent
= self
5475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5477 if _n_expr
== old_child
then
5478 if new_child
!= null then
5479 new_child
.parent
= self
5480 assert new_child
isa AExpr
5489 redef fun visit_all
(v
: Visitor)
5491 v
.enter_visit
(_n_expr
)
5494 redef fun visit_all_reverse
(v
: Visitor)
5496 v
.enter_visit
(_n_expr
)
5499 redef class ABinopExpr
5500 redef fun n_expr
=(n
)
5505 redef fun n_expr2
=(n
)
5511 private init empty_init
do end
5513 init init_abinopexpr
(
5514 n_expr
: nullable AExpr,
5515 n_expr2
: nullable AExpr
5519 _n_expr
= n_expr
.as(not null)
5520 n_expr
.parent
= self
5521 _n_expr2
= n_expr2
.as(not null)
5522 n_expr2
.parent
= self
5525 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5527 if _n_expr
== old_child
then
5528 if new_child
!= null then
5529 new_child
.parent
= self
5530 assert new_child
isa AExpr
5537 if _n_expr2
== old_child
then
5538 if new_child
!= null then
5539 new_child
.parent
= self
5540 assert new_child
isa AExpr
5541 _n_expr2
= new_child
5549 redef fun visit_all
(v
: Visitor)
5551 v
.enter_visit
(_n_expr
)
5552 v
.enter_visit
(_n_expr2
)
5555 redef fun visit_all_reverse
(v
: Visitor)
5557 v
.enter_visit
(_n_expr
)
5558 v
.enter_visit
(_n_expr2
)
5562 redef fun n_expr
=(n
)
5567 redef fun n_expr2
=(n
)
5573 private init empty_init
do end
5576 n_expr
: nullable AExpr,
5577 n_expr2
: nullable AExpr
5581 _n_expr
= n_expr
.as(not null)
5582 n_expr
.parent
= self
5583 _n_expr2
= n_expr2
.as(not null)
5584 n_expr2
.parent
= self
5587 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5589 if _n_expr
== old_child
then
5590 if new_child
!= null then
5591 new_child
.parent
= self
5592 assert new_child
isa AExpr
5599 if _n_expr2
== old_child
then
5600 if new_child
!= null then
5601 new_child
.parent
= self
5602 assert new_child
isa AExpr
5603 _n_expr2
= new_child
5611 redef fun visit_all
(v
: Visitor)
5613 v
.enter_visit
(_n_expr
)
5614 v
.enter_visit
(_n_expr2
)
5617 redef fun visit_all_reverse
(v
: Visitor)
5619 v
.enter_visit
(_n_expr
)
5620 v
.enter_visit
(_n_expr2
)
5623 redef class AAndExpr
5624 redef fun n_expr
=(n
)
5629 redef fun n_expr2
=(n
)
5635 private init empty_init
do end
5637 init init_aandexpr
(
5638 n_expr
: nullable AExpr,
5639 n_expr2
: nullable AExpr
5643 _n_expr
= n_expr
.as(not null)
5644 n_expr
.parent
= self
5645 _n_expr2
= n_expr2
.as(not null)
5646 n_expr2
.parent
= self
5649 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5651 if _n_expr
== old_child
then
5652 if new_child
!= null then
5653 new_child
.parent
= self
5654 assert new_child
isa AExpr
5661 if _n_expr2
== old_child
then
5662 if new_child
!= null then
5663 new_child
.parent
= self
5664 assert new_child
isa AExpr
5665 _n_expr2
= new_child
5673 redef fun visit_all
(v
: Visitor)
5675 v
.enter_visit
(_n_expr
)
5676 v
.enter_visit
(_n_expr2
)
5679 redef fun visit_all_reverse
(v
: Visitor)
5681 v
.enter_visit
(_n_expr
)
5682 v
.enter_visit
(_n_expr2
)
5685 redef class ANotExpr
5686 redef fun n_kwnot
=(n
)
5691 redef fun n_expr
=(n
)
5697 private init empty_init
do end
5699 init init_anotexpr
(
5700 n_kwnot
: nullable TKwnot,
5701 n_expr
: nullable AExpr
5705 _n_kwnot
= n_kwnot
.as(not null)
5706 n_kwnot
.parent
= self
5707 _n_expr
= n_expr
.as(not null)
5708 n_expr
.parent
= self
5711 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5713 if _n_kwnot
== old_child
then
5714 if new_child
!= null then
5715 new_child
.parent
= self
5716 assert new_child
isa TKwnot
5717 _n_kwnot
= new_child
5723 if _n_expr
== old_child
then
5724 if new_child
!= null then
5725 new_child
.parent
= self
5726 assert new_child
isa AExpr
5735 redef fun visit_all
(v
: Visitor)
5737 v
.enter_visit
(_n_kwnot
)
5738 v
.enter_visit
(_n_expr
)
5741 redef fun visit_all_reverse
(v
: Visitor)
5743 v
.enter_visit
(_n_kwnot
)
5744 v
.enter_visit
(_n_expr
)
5748 redef fun n_expr
=(n
)
5753 redef fun n_expr2
=(n
)
5759 private init empty_init
do end
5762 n_expr
: nullable AExpr,
5763 n_expr2
: nullable AExpr
5767 _n_expr
= n_expr
.as(not null)
5768 n_expr
.parent
= self
5769 _n_expr2
= n_expr2
.as(not null)
5770 n_expr2
.parent
= self
5773 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5775 if _n_expr
== old_child
then
5776 if new_child
!= null then
5777 new_child
.parent
= self
5778 assert new_child
isa AExpr
5785 if _n_expr2
== old_child
then
5786 if new_child
!= null then
5787 new_child
.parent
= self
5788 assert new_child
isa AExpr
5789 _n_expr2
= new_child
5797 redef fun visit_all
(v
: Visitor)
5799 v
.enter_visit
(_n_expr
)
5800 v
.enter_visit
(_n_expr2
)
5803 redef fun visit_all_reverse
(v
: Visitor)
5805 v
.enter_visit
(_n_expr
)
5806 v
.enter_visit
(_n_expr2
)
5810 redef fun n_expr
=(n
)
5815 redef fun n_expr2
=(n
)
5821 private init empty_init
do end
5824 n_expr
: nullable AExpr,
5825 n_expr2
: nullable AExpr
5829 _n_expr
= n_expr
.as(not null)
5830 n_expr
.parent
= self
5831 _n_expr2
= n_expr2
.as(not null)
5832 n_expr2
.parent
= self
5835 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5837 if _n_expr
== old_child
then
5838 if new_child
!= null then
5839 new_child
.parent
= self
5840 assert new_child
isa AExpr
5847 if _n_expr2
== old_child
then
5848 if new_child
!= null then
5849 new_child
.parent
= self
5850 assert new_child
isa AExpr
5851 _n_expr2
= new_child
5859 redef fun visit_all
(v
: Visitor)
5861 v
.enter_visit
(_n_expr
)
5862 v
.enter_visit
(_n_expr2
)
5865 redef fun visit_all_reverse
(v
: Visitor)
5867 v
.enter_visit
(_n_expr
)
5868 v
.enter_visit
(_n_expr2
)
5872 redef fun n_expr
=(n
)
5877 redef fun n_expr2
=(n
)
5883 private init empty_init
do end
5886 n_expr
: nullable AExpr,
5887 n_expr2
: nullable AExpr
5891 _n_expr
= n_expr
.as(not null)
5892 n_expr
.parent
= self
5893 _n_expr2
= n_expr2
.as(not null)
5894 n_expr2
.parent
= self
5897 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5899 if _n_expr
== old_child
then
5900 if new_child
!= null then
5901 new_child
.parent
= self
5902 assert new_child
isa AExpr
5909 if _n_expr2
== old_child
then
5910 if new_child
!= null then
5911 new_child
.parent
= self
5912 assert new_child
isa AExpr
5913 _n_expr2
= new_child
5921 redef fun visit_all
(v
: Visitor)
5923 v
.enter_visit
(_n_expr
)
5924 v
.enter_visit
(_n_expr2
)
5927 redef fun visit_all_reverse
(v
: Visitor)
5929 v
.enter_visit
(_n_expr
)
5930 v
.enter_visit
(_n_expr2
)
5934 redef fun n_expr
=(n
)
5939 redef fun n_expr2
=(n
)
5945 private init empty_init
do end
5948 n_expr
: nullable AExpr,
5949 n_expr2
: nullable AExpr
5953 _n_expr
= n_expr
.as(not null)
5954 n_expr
.parent
= self
5955 _n_expr2
= n_expr2
.as(not null)
5956 n_expr2
.parent
= self
5959 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5961 if _n_expr
== old_child
then
5962 if new_child
!= null then
5963 new_child
.parent
= self
5964 assert new_child
isa AExpr
5971 if _n_expr2
== old_child
then
5972 if new_child
!= null then
5973 new_child
.parent
= self
5974 assert new_child
isa AExpr
5975 _n_expr2
= new_child
5983 redef fun visit_all
(v
: Visitor)
5985 v
.enter_visit
(_n_expr
)
5986 v
.enter_visit
(_n_expr2
)
5989 redef fun visit_all_reverse
(v
: Visitor)
5991 v
.enter_visit
(_n_expr
)
5992 v
.enter_visit
(_n_expr2
)
5996 redef fun n_expr
=(n
)
6001 redef fun n_expr2
=(n
)
6007 private init empty_init
do end
6010 n_expr
: nullable AExpr,
6011 n_expr2
: nullable AExpr
6015 _n_expr
= n_expr
.as(not null)
6016 n_expr
.parent
= self
6017 _n_expr2
= n_expr2
.as(not null)
6018 n_expr2
.parent
= self
6021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6023 if _n_expr
== old_child
then
6024 if new_child
!= null then
6025 new_child
.parent
= self
6026 assert new_child
isa AExpr
6033 if _n_expr2
== old_child
then
6034 if new_child
!= null then
6035 new_child
.parent
= self
6036 assert new_child
isa AExpr
6037 _n_expr2
= new_child
6045 redef fun visit_all
(v
: Visitor)
6047 v
.enter_visit
(_n_expr
)
6048 v
.enter_visit
(_n_expr2
)
6051 redef fun visit_all_reverse
(v
: Visitor)
6053 v
.enter_visit
(_n_expr
)
6054 v
.enter_visit
(_n_expr2
)
6058 redef fun n_expr
=(n
)
6063 redef fun n_expr2
=(n
)
6069 private init empty_init
do end
6072 n_expr
: nullable AExpr,
6073 n_expr2
: nullable AExpr
6077 _n_expr
= n_expr
.as(not null)
6078 n_expr
.parent
= self
6079 _n_expr2
= n_expr2
.as(not null)
6080 n_expr2
.parent
= self
6083 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6085 if _n_expr
== old_child
then
6086 if new_child
!= null then
6087 new_child
.parent
= self
6088 assert new_child
isa AExpr
6095 if _n_expr2
== old_child
then
6096 if new_child
!= null then
6097 new_child
.parent
= self
6098 assert new_child
isa AExpr
6099 _n_expr2
= new_child
6107 redef fun visit_all
(v
: Visitor)
6109 v
.enter_visit
(_n_expr
)
6110 v
.enter_visit
(_n_expr2
)
6113 redef fun visit_all_reverse
(v
: Visitor)
6115 v
.enter_visit
(_n_expr
)
6116 v
.enter_visit
(_n_expr2
)
6120 redef fun n_expr
=(n
)
6125 redef fun n_expr2
=(n
)
6131 private init empty_init
do end
6134 n_expr
: nullable AExpr,
6135 n_expr2
: nullable AExpr
6139 _n_expr
= n_expr
.as(not null)
6140 n_expr
.parent
= self
6141 _n_expr2
= n_expr2
.as(not null)
6142 n_expr2
.parent
= self
6145 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6147 if _n_expr
== old_child
then
6148 if new_child
!= null then
6149 new_child
.parent
= self
6150 assert new_child
isa AExpr
6157 if _n_expr2
== old_child
then
6158 if new_child
!= null then
6159 new_child
.parent
= self
6160 assert new_child
isa AExpr
6161 _n_expr2
= new_child
6169 redef fun visit_all
(v
: Visitor)
6171 v
.enter_visit
(_n_expr
)
6172 v
.enter_visit
(_n_expr2
)
6175 redef fun visit_all_reverse
(v
: Visitor)
6177 v
.enter_visit
(_n_expr
)
6178 v
.enter_visit
(_n_expr2
)
6181 redef class AIsaExpr
6182 redef fun n_expr
=(n
)
6187 redef fun n_type
=(n
)
6193 private init empty_init
do end
6195 init init_aisaexpr
(
6196 n_expr
: nullable AExpr,
6197 n_type
: nullable AType
6201 _n_expr
= n_expr
.as(not null)
6202 n_expr
.parent
= self
6203 _n_type
= n_type
.as(not null)
6204 n_type
.parent
= self
6207 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6209 if _n_expr
== old_child
then
6210 if new_child
!= null then
6211 new_child
.parent
= self
6212 assert new_child
isa AExpr
6219 if _n_type
== old_child
then
6220 if new_child
!= null then
6221 new_child
.parent
= self
6222 assert new_child
isa AType
6231 redef fun visit_all
(v
: Visitor)
6233 v
.enter_visit
(_n_expr
)
6234 v
.enter_visit
(_n_type
)
6237 redef fun visit_all_reverse
(v
: Visitor)
6239 v
.enter_visit
(_n_expr
)
6240 v
.enter_visit
(_n_type
)
6243 redef class APlusExpr
6244 redef fun n_expr
=(n
)
6249 redef fun n_expr2
=(n
)
6255 private init empty_init
do end
6257 init init_aplusexpr
(
6258 n_expr
: nullable AExpr,
6259 n_expr2
: nullable AExpr
6263 _n_expr
= n_expr
.as(not null)
6264 n_expr
.parent
= self
6265 _n_expr2
= n_expr2
.as(not null)
6266 n_expr2
.parent
= self
6269 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6271 if _n_expr
== old_child
then
6272 if new_child
!= null then
6273 new_child
.parent
= self
6274 assert new_child
isa AExpr
6281 if _n_expr2
== old_child
then
6282 if new_child
!= null then
6283 new_child
.parent
= self
6284 assert new_child
isa AExpr
6285 _n_expr2
= new_child
6293 redef fun visit_all
(v
: Visitor)
6295 v
.enter_visit
(_n_expr
)
6296 v
.enter_visit
(_n_expr2
)
6299 redef fun visit_all_reverse
(v
: Visitor)
6301 v
.enter_visit
(_n_expr
)
6302 v
.enter_visit
(_n_expr2
)
6305 redef class AMinusExpr
6306 redef fun n_expr
=(n
)
6311 redef fun n_expr2
=(n
)
6317 private init empty_init
do end
6319 init init_aminusexpr
(
6320 n_expr
: nullable AExpr,
6321 n_expr2
: nullable AExpr
6325 _n_expr
= n_expr
.as(not null)
6326 n_expr
.parent
= self
6327 _n_expr2
= n_expr2
.as(not null)
6328 n_expr2
.parent
= self
6331 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6333 if _n_expr
== old_child
then
6334 if new_child
!= null then
6335 new_child
.parent
= self
6336 assert new_child
isa AExpr
6343 if _n_expr2
== old_child
then
6344 if new_child
!= null then
6345 new_child
.parent
= self
6346 assert new_child
isa AExpr
6347 _n_expr2
= new_child
6355 redef fun visit_all
(v
: Visitor)
6357 v
.enter_visit
(_n_expr
)
6358 v
.enter_visit
(_n_expr2
)
6361 redef fun visit_all_reverse
(v
: Visitor)
6363 v
.enter_visit
(_n_expr
)
6364 v
.enter_visit
(_n_expr2
)
6367 redef class AStarshipExpr
6368 redef fun n_expr
=(n
)
6373 redef fun n_expr2
=(n
)
6379 private init empty_init
do end
6381 init init_astarshipexpr
(
6382 n_expr
: nullable AExpr,
6383 n_expr2
: nullable AExpr
6387 _n_expr
= n_expr
.as(not null)
6388 n_expr
.parent
= self
6389 _n_expr2
= n_expr2
.as(not null)
6390 n_expr2
.parent
= self
6393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6395 if _n_expr
== old_child
then
6396 if new_child
!= null then
6397 new_child
.parent
= self
6398 assert new_child
isa AExpr
6405 if _n_expr2
== old_child
then
6406 if new_child
!= null then
6407 new_child
.parent
= self
6408 assert new_child
isa AExpr
6409 _n_expr2
= new_child
6417 redef fun visit_all
(v
: Visitor)
6419 v
.enter_visit
(_n_expr
)
6420 v
.enter_visit
(_n_expr2
)
6423 redef fun visit_all_reverse
(v
: Visitor)
6425 v
.enter_visit
(_n_expr
)
6426 v
.enter_visit
(_n_expr2
)
6429 redef class AStarExpr
6430 redef fun n_expr
=(n
)
6435 redef fun n_expr2
=(n
)
6441 private init empty_init
do end
6443 init init_astarexpr
(
6444 n_expr
: nullable AExpr,
6445 n_expr2
: nullable AExpr
6449 _n_expr
= n_expr
.as(not null)
6450 n_expr
.parent
= self
6451 _n_expr2
= n_expr2
.as(not null)
6452 n_expr2
.parent
= self
6455 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6457 if _n_expr
== old_child
then
6458 if new_child
!= null then
6459 new_child
.parent
= self
6460 assert new_child
isa AExpr
6467 if _n_expr2
== old_child
then
6468 if new_child
!= null then
6469 new_child
.parent
= self
6470 assert new_child
isa AExpr
6471 _n_expr2
= new_child
6479 redef fun visit_all
(v
: Visitor)
6481 v
.enter_visit
(_n_expr
)
6482 v
.enter_visit
(_n_expr2
)
6485 redef fun visit_all_reverse
(v
: Visitor)
6487 v
.enter_visit
(_n_expr
)
6488 v
.enter_visit
(_n_expr2
)
6491 redef class ASlashExpr
6492 redef fun n_expr
=(n
)
6497 redef fun n_expr2
=(n
)
6503 private init empty_init
do end
6505 init init_aslashexpr
(
6506 n_expr
: nullable AExpr,
6507 n_expr2
: nullable AExpr
6511 _n_expr
= n_expr
.as(not null)
6512 n_expr
.parent
= self
6513 _n_expr2
= n_expr2
.as(not null)
6514 n_expr2
.parent
= self
6517 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6519 if _n_expr
== old_child
then
6520 if new_child
!= null then
6521 new_child
.parent
= self
6522 assert new_child
isa AExpr
6529 if _n_expr2
== old_child
then
6530 if new_child
!= null then
6531 new_child
.parent
= self
6532 assert new_child
isa AExpr
6533 _n_expr2
= new_child
6541 redef fun visit_all
(v
: Visitor)
6543 v
.enter_visit
(_n_expr
)
6544 v
.enter_visit
(_n_expr2
)
6547 redef fun visit_all_reverse
(v
: Visitor)
6549 v
.enter_visit
(_n_expr
)
6550 v
.enter_visit
(_n_expr2
)
6553 redef class APercentExpr
6554 redef fun n_expr
=(n
)
6559 redef fun n_expr2
=(n
)
6565 private init empty_init
do end
6567 init init_apercentexpr
(
6568 n_expr
: nullable AExpr,
6569 n_expr2
: nullable AExpr
6573 _n_expr
= n_expr
.as(not null)
6574 n_expr
.parent
= self
6575 _n_expr2
= n_expr2
.as(not null)
6576 n_expr2
.parent
= self
6579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6581 if _n_expr
== old_child
then
6582 if new_child
!= null then
6583 new_child
.parent
= self
6584 assert new_child
isa AExpr
6591 if _n_expr2
== old_child
then
6592 if new_child
!= null then
6593 new_child
.parent
= self
6594 assert new_child
isa AExpr
6595 _n_expr2
= new_child
6603 redef fun visit_all
(v
: Visitor)
6605 v
.enter_visit
(_n_expr
)
6606 v
.enter_visit
(_n_expr2
)
6609 redef fun visit_all_reverse
(v
: Visitor)
6611 v
.enter_visit
(_n_expr
)
6612 v
.enter_visit
(_n_expr2
)
6615 redef class AUminusExpr
6616 redef fun n_minus
=(n
)
6621 redef fun n_expr
=(n
)
6627 private init empty_init
do end
6629 init init_auminusexpr
(
6630 n_minus
: nullable TMinus,
6631 n_expr
: nullable AExpr
6635 _n_minus
= n_minus
.as(not null)
6636 n_minus
.parent
= self
6637 _n_expr
= n_expr
.as(not null)
6638 n_expr
.parent
= self
6641 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6643 if _n_minus
== old_child
then
6644 if new_child
!= null then
6645 new_child
.parent
= self
6646 assert new_child
isa TMinus
6647 _n_minus
= new_child
6653 if _n_expr
== old_child
then
6654 if new_child
!= null then
6655 new_child
.parent
= self
6656 assert new_child
isa AExpr
6665 redef fun visit_all
(v
: Visitor)
6667 v
.enter_visit
(_n_minus
)
6668 v
.enter_visit
(_n_expr
)
6671 redef fun visit_all_reverse
(v
: Visitor)
6673 v
.enter_visit
(_n_minus
)
6674 v
.enter_visit
(_n_expr
)
6677 redef class ANewExpr
6678 redef fun n_kwnew
=(n
)
6683 redef fun n_type
=(n
)
6696 private init empty_init
do end
6698 init init_anewexpr
(
6699 n_kwnew
: nullable TKwnew,
6700 n_type
: nullable AType,
6702 n_args
: Collection[Object] # Should be Collection[AExpr]
6706 _n_kwnew
= n_kwnew
.as(not null)
6707 n_kwnew
.parent
= self
6708 _n_type
= n_type
.as(not null)
6709 n_type
.parent
= self
6711 if n_id
!= null then
6721 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6723 if _n_kwnew
== old_child
then
6724 if new_child
!= null then
6725 new_child
.parent
= self
6726 assert new_child
isa TKwnew
6727 _n_kwnew
= new_child
6733 if _n_type
== old_child
then
6734 if new_child
!= null then
6735 new_child
.parent
= self
6736 assert new_child
isa AType
6743 if _n_id
== old_child
then
6744 if new_child
!= null then
6745 new_child
.parent
= self
6746 assert new_child
isa TId
6753 for i
in [0.._n_args
.length
[ do
6754 if _n_args
[i
] == old_child
then
6755 if new_child
!= null then
6756 assert new_child
isa AExpr
6757 _n_args
[i
] = new_child
6758 new_child
.parent
= self
6760 _n_args
.remove_at
(i
)
6767 redef fun visit_all
(v
: Visitor)
6769 v
.enter_visit
(_n_kwnew
)
6770 v
.enter_visit
(_n_type
)
6771 if _n_id
!= null then
6772 v
.enter_visit
(_n_id
.as(not null))
6779 redef fun visit_all_reverse
(v
: Visitor)
6781 v
.enter_visit
(_n_kwnew
)
6782 v
.enter_visit
(_n_type
)
6783 if _n_id
!= null then
6784 v
.enter_visit
(_n_id
.as(not null))
6787 var i
= _n_args
.length
6789 v
.enter_visit
(_n_args
[i
])
6795 redef class AAttrExpr
6796 redef fun n_expr
=(n
)
6807 private init empty_init
do end
6809 init init_aattrexpr
(
6810 n_expr
: nullable AExpr,
6811 n_id
: nullable TAttrid
6815 _n_expr
= n_expr
.as(not null)
6816 n_expr
.parent
= self
6817 _n_id
= n_id
.as(not null)
6821 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6823 if _n_expr
== old_child
then
6824 if new_child
!= null then
6825 new_child
.parent
= self
6826 assert new_child
isa AExpr
6833 if _n_id
== old_child
then
6834 if new_child
!= null then
6835 new_child
.parent
= self
6836 assert new_child
isa TAttrid
6845 redef fun visit_all
(v
: Visitor)
6847 v
.enter_visit
(_n_expr
)
6848 v
.enter_visit
(_n_id
)
6851 redef fun visit_all_reverse
(v
: Visitor)
6853 v
.enter_visit
(_n_expr
)
6854 v
.enter_visit
(_n_id
)
6857 redef class AAttrAssignExpr
6858 redef fun n_expr
=(n
)
6868 redef fun n_assign
=(n
)
6873 redef fun n_value
=(n
)
6879 private init empty_init
do end
6881 init init_aattrassignexpr
(
6882 n_expr
: nullable AExpr,
6883 n_id
: nullable TAttrid,
6884 n_assign
: nullable TAssign,
6885 n_value
: nullable AExpr
6889 _n_expr
= n_expr
.as(not null)
6890 n_expr
.parent
= self
6891 _n_id
= n_id
.as(not null)
6893 _n_assign
= n_assign
.as(not null)
6894 n_assign
.parent
= self
6895 _n_value
= n_value
.as(not null)
6896 n_value
.parent
= self
6899 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6901 if _n_expr
== old_child
then
6902 if new_child
!= null then
6903 new_child
.parent
= self
6904 assert new_child
isa AExpr
6911 if _n_id
== old_child
then
6912 if new_child
!= null then
6913 new_child
.parent
= self
6914 assert new_child
isa TAttrid
6921 if _n_assign
== old_child
then
6922 if new_child
!= null then
6923 new_child
.parent
= self
6924 assert new_child
isa TAssign
6925 _n_assign
= new_child
6931 if _n_value
== old_child
then
6932 if new_child
!= null then
6933 new_child
.parent
= self
6934 assert new_child
isa AExpr
6935 _n_value
= new_child
6943 redef fun visit_all
(v
: Visitor)
6945 v
.enter_visit
(_n_expr
)
6946 v
.enter_visit
(_n_id
)
6947 v
.enter_visit
(_n_assign
)
6948 v
.enter_visit
(_n_value
)
6951 redef fun visit_all_reverse
(v
: Visitor)
6953 v
.enter_visit
(_n_expr
)
6954 v
.enter_visit
(_n_id
)
6955 v
.enter_visit
(_n_assign
)
6956 v
.enter_visit
(_n_value
)
6959 redef class AAttrReassignExpr
6960 redef fun n_expr
=(n
)
6970 redef fun n_assign_op
=(n
)
6975 redef fun n_value
=(n
)
6981 private init empty_init
do end
6983 init init_aattrreassignexpr
(
6984 n_expr
: nullable AExpr,
6985 n_id
: nullable TAttrid,
6986 n_assign_op
: nullable AAssignOp,
6987 n_value
: nullable AExpr
6991 _n_expr
= n_expr
.as(not null)
6992 n_expr
.parent
= self
6993 _n_id
= n_id
.as(not null)
6995 _n_assign_op
= n_assign_op
.as(not null)
6996 n_assign_op
.parent
= self
6997 _n_value
= n_value
.as(not null)
6998 n_value
.parent
= self
7001 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7003 if _n_expr
== old_child
then
7004 if new_child
!= null then
7005 new_child
.parent
= self
7006 assert new_child
isa AExpr
7013 if _n_id
== old_child
then
7014 if new_child
!= null then
7015 new_child
.parent
= self
7016 assert new_child
isa TAttrid
7023 if _n_assign_op
== old_child
then
7024 if new_child
!= null then
7025 new_child
.parent
= self
7026 assert new_child
isa AAssignOp
7027 _n_assign_op
= new_child
7033 if _n_value
== old_child
then
7034 if new_child
!= null then
7035 new_child
.parent
= self
7036 assert new_child
isa AExpr
7037 _n_value
= new_child
7045 redef fun visit_all
(v
: Visitor)
7047 v
.enter_visit
(_n_expr
)
7048 v
.enter_visit
(_n_id
)
7049 v
.enter_visit
(_n_assign_op
)
7050 v
.enter_visit
(_n_value
)
7053 redef fun visit_all_reverse
(v
: Visitor)
7055 v
.enter_visit
(_n_expr
)
7056 v
.enter_visit
(_n_id
)
7057 v
.enter_visit
(_n_assign_op
)
7058 v
.enter_visit
(_n_value
)
7061 redef class ACallExpr
7062 redef fun n_expr
=(n
)
7073 private init empty_init
do end
7075 init init_acallexpr
(
7076 n_expr
: nullable AExpr,
7078 n_args
: Collection[Object], # Should be Collection[AExpr]
7079 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7083 _n_expr
= n_expr
.as(not null)
7084 n_expr
.parent
= self
7085 _n_id
= n_id
.as(not null)
7092 for n
in n_closure_defs
do
7093 assert n
isa AClosureDef
7094 _n_closure_defs
.add
(n
)
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 TId
7121 for i
in [0.._n_args
.length
[ do
7122 if _n_args
[i
] == old_child
then
7123 if new_child
!= null then
7124 assert new_child
isa AExpr
7125 _n_args
[i
] = new_child
7126 new_child
.parent
= self
7128 _n_args
.remove_at
(i
)
7133 for i
in [0.._n_closure_defs
.length
[ do
7134 if _n_closure_defs
[i
] == old_child
then
7135 if new_child
!= null then
7136 assert new_child
isa AClosureDef
7137 _n_closure_defs
[i
] = new_child
7138 new_child
.parent
= self
7140 _n_closure_defs
.remove_at
(i
)
7147 redef fun visit_all
(v
: Visitor)
7149 v
.enter_visit
(_n_expr
)
7150 v
.enter_visit
(_n_id
)
7154 for n
in _n_closure_defs
do
7159 redef fun visit_all_reverse
(v
: Visitor)
7161 v
.enter_visit
(_n_expr
)
7162 v
.enter_visit
(_n_id
)
7164 var i
= _n_args
.length
7166 v
.enter_visit
(_n_args
[i
])
7171 var i
= _n_closure_defs
.length
7173 v
.enter_visit
(_n_closure_defs
[i
])
7179 redef class ACallAssignExpr
7180 redef fun n_expr
=(n
)
7190 redef fun n_assign
=(n
)
7195 redef fun n_value
=(n
)
7201 private init empty_init
do end
7203 init init_acallassignexpr
(
7204 n_expr
: nullable AExpr,
7206 n_args
: Collection[Object], # Should be Collection[AExpr]
7207 n_assign
: nullable TAssign,
7208 n_value
: nullable AExpr
7212 _n_expr
= n_expr
.as(not null)
7213 n_expr
.parent
= self
7214 _n_id
= n_id
.as(not null)
7221 _n_assign
= n_assign
.as(not null)
7222 n_assign
.parent
= self
7223 _n_value
= n_value
.as(not null)
7224 n_value
.parent
= self
7227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7229 if _n_expr
== old_child
then
7230 if new_child
!= null then
7231 new_child
.parent
= self
7232 assert new_child
isa AExpr
7239 if _n_id
== old_child
then
7240 if new_child
!= null then
7241 new_child
.parent
= self
7242 assert new_child
isa TId
7249 for i
in [0.._n_args
.length
[ do
7250 if _n_args
[i
] == old_child
then
7251 if new_child
!= null then
7252 assert new_child
isa AExpr
7253 _n_args
[i
] = new_child
7254 new_child
.parent
= self
7256 _n_args
.remove_at
(i
)
7261 if _n_assign
== old_child
then
7262 if new_child
!= null then
7263 new_child
.parent
= self
7264 assert new_child
isa TAssign
7265 _n_assign
= new_child
7271 if _n_value
== old_child
then
7272 if new_child
!= null then
7273 new_child
.parent
= self
7274 assert new_child
isa AExpr
7275 _n_value
= new_child
7283 redef fun visit_all
(v
: Visitor)
7285 v
.enter_visit
(_n_expr
)
7286 v
.enter_visit
(_n_id
)
7290 v
.enter_visit
(_n_assign
)
7291 v
.enter_visit
(_n_value
)
7294 redef fun visit_all_reverse
(v
: Visitor)
7296 v
.enter_visit
(_n_expr
)
7297 v
.enter_visit
(_n_id
)
7299 var i
= _n_args
.length
7301 v
.enter_visit
(_n_args
[i
])
7305 v
.enter_visit
(_n_assign
)
7306 v
.enter_visit
(_n_value
)
7309 redef class ACallReassignExpr
7310 redef fun n_expr
=(n
)
7320 redef fun n_assign_op
=(n
)
7325 redef fun n_value
=(n
)
7331 private init empty_init
do end
7333 init init_acallreassignexpr
(
7334 n_expr
: nullable AExpr,
7336 n_args
: Collection[Object], # Should be Collection[AExpr]
7337 n_assign_op
: nullable AAssignOp,
7338 n_value
: nullable AExpr
7342 _n_expr
= n_expr
.as(not null)
7343 n_expr
.parent
= self
7344 _n_id
= n_id
.as(not null)
7351 _n_assign_op
= n_assign_op
.as(not null)
7352 n_assign_op
.parent
= self
7353 _n_value
= n_value
.as(not null)
7354 n_value
.parent
= self
7357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7359 if _n_expr
== old_child
then
7360 if new_child
!= null then
7361 new_child
.parent
= self
7362 assert new_child
isa AExpr
7369 if _n_id
== old_child
then
7370 if new_child
!= null then
7371 new_child
.parent
= self
7372 assert new_child
isa TId
7379 for i
in [0.._n_args
.length
[ do
7380 if _n_args
[i
] == old_child
then
7381 if new_child
!= null then
7382 assert new_child
isa AExpr
7383 _n_args
[i
] = new_child
7384 new_child
.parent
= self
7386 _n_args
.remove_at
(i
)
7391 if _n_assign_op
== old_child
then
7392 if new_child
!= null then
7393 new_child
.parent
= self
7394 assert new_child
isa AAssignOp
7395 _n_assign_op
= new_child
7401 if _n_value
== old_child
then
7402 if new_child
!= null then
7403 new_child
.parent
= self
7404 assert new_child
isa AExpr
7405 _n_value
= new_child
7413 redef fun visit_all
(v
: Visitor)
7415 v
.enter_visit
(_n_expr
)
7416 v
.enter_visit
(_n_id
)
7420 v
.enter_visit
(_n_assign_op
)
7421 v
.enter_visit
(_n_value
)
7424 redef fun visit_all_reverse
(v
: Visitor)
7426 v
.enter_visit
(_n_expr
)
7427 v
.enter_visit
(_n_id
)
7429 var i
= _n_args
.length
7431 v
.enter_visit
(_n_args
[i
])
7435 v
.enter_visit
(_n_assign_op
)
7436 v
.enter_visit
(_n_value
)
7439 redef class ASuperExpr
7440 redef fun n_qualified
=(n
)
7447 redef fun n_kwsuper
=(n
)
7453 private init empty_init
do end
7455 init init_asuperexpr
(
7456 n_qualified
: nullable AQualified,
7457 n_kwsuper
: nullable TKwsuper,
7458 n_args
: Collection[Object] # Should be Collection[AExpr]
7462 _n_qualified
= n_qualified
7463 if n_qualified
!= null then
7464 n_qualified
.parent
= self
7466 _n_kwsuper
= n_kwsuper
.as(not null)
7467 n_kwsuper
.parent
= self
7475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7477 if _n_qualified
== old_child
then
7478 if new_child
!= null then
7479 new_child
.parent
= self
7480 assert new_child
isa AQualified
7481 _n_qualified
= new_child
7487 if _n_kwsuper
== old_child
then
7488 if new_child
!= null then
7489 new_child
.parent
= self
7490 assert new_child
isa TKwsuper
7491 _n_kwsuper
= new_child
7497 for i
in [0.._n_args
.length
[ do
7498 if _n_args
[i
] == old_child
then
7499 if new_child
!= null then
7500 assert new_child
isa AExpr
7501 _n_args
[i
] = new_child
7502 new_child
.parent
= self
7504 _n_args
.remove_at
(i
)
7511 redef fun visit_all
(v
: Visitor)
7513 if _n_qualified
!= null then
7514 v
.enter_visit
(_n_qualified
.as(not null))
7516 v
.enter_visit
(_n_kwsuper
)
7522 redef fun visit_all_reverse
(v
: Visitor)
7524 if _n_qualified
!= null then
7525 v
.enter_visit
(_n_qualified
.as(not null))
7527 v
.enter_visit
(_n_kwsuper
)
7529 var i
= _n_args
.length
7531 v
.enter_visit
(_n_args
[i
])
7537 redef class AInitExpr
7538 redef fun n_expr
=(n
)
7543 redef fun n_kwinit
=(n
)
7549 private init empty_init
do end
7551 init init_ainitexpr
(
7552 n_expr
: nullable AExpr,
7553 n_kwinit
: nullable TKwinit,
7554 n_args
: Collection[Object] # Should be Collection[AExpr]
7558 _n_expr
= n_expr
.as(not null)
7559 n_expr
.parent
= self
7560 _n_kwinit
= n_kwinit
.as(not null)
7561 n_kwinit
.parent
= self
7569 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7571 if _n_expr
== old_child
then
7572 if new_child
!= null then
7573 new_child
.parent
= self
7574 assert new_child
isa AExpr
7581 if _n_kwinit
== old_child
then
7582 if new_child
!= null then
7583 new_child
.parent
= self
7584 assert new_child
isa TKwinit
7585 _n_kwinit
= new_child
7591 for i
in [0.._n_args
.length
[ do
7592 if _n_args
[i
] == old_child
then
7593 if new_child
!= null then
7594 assert new_child
isa AExpr
7595 _n_args
[i
] = new_child
7596 new_child
.parent
= self
7598 _n_args
.remove_at
(i
)
7605 redef fun visit_all
(v
: Visitor)
7607 v
.enter_visit
(_n_expr
)
7608 v
.enter_visit
(_n_kwinit
)
7614 redef fun visit_all_reverse
(v
: Visitor)
7616 v
.enter_visit
(_n_expr
)
7617 v
.enter_visit
(_n_kwinit
)
7619 var i
= _n_args
.length
7621 v
.enter_visit
(_n_args
[i
])
7627 redef class ABraExpr
7628 redef fun n_expr
=(n
)
7634 private init empty_init
do end
7636 init init_abraexpr
(
7637 n_expr
: nullable AExpr,
7638 n_args
: Collection[Object], # Should be Collection[AExpr]
7639 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7643 _n_expr
= n_expr
.as(not null)
7644 n_expr
.parent
= self
7650 for n
in n_closure_defs
do
7651 assert n
isa AClosureDef
7652 _n_closure_defs
.add
(n
)
7657 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7659 if _n_expr
== old_child
then
7660 if new_child
!= null then
7661 new_child
.parent
= self
7662 assert new_child
isa AExpr
7669 for i
in [0.._n_args
.length
[ do
7670 if _n_args
[i
] == old_child
then
7671 if new_child
!= null then
7672 assert new_child
isa AExpr
7673 _n_args
[i
] = new_child
7674 new_child
.parent
= self
7676 _n_args
.remove_at
(i
)
7681 for i
in [0.._n_closure_defs
.length
[ do
7682 if _n_closure_defs
[i
] == old_child
then
7683 if new_child
!= null then
7684 assert new_child
isa AClosureDef
7685 _n_closure_defs
[i
] = new_child
7686 new_child
.parent
= self
7688 _n_closure_defs
.remove_at
(i
)
7695 redef fun visit_all
(v
: Visitor)
7697 v
.enter_visit
(_n_expr
)
7701 for n
in _n_closure_defs
do
7706 redef fun visit_all_reverse
(v
: Visitor)
7708 v
.enter_visit
(_n_expr
)
7710 var i
= _n_args
.length
7712 v
.enter_visit
(_n_args
[i
])
7717 var i
= _n_closure_defs
.length
7719 v
.enter_visit
(_n_closure_defs
[i
])
7725 redef class ABraAssignExpr
7726 redef fun n_expr
=(n
)
7731 redef fun n_assign
=(n
)
7736 redef fun n_value
=(n
)
7742 private init empty_init
do end
7744 init init_abraassignexpr
(
7745 n_expr
: nullable AExpr,
7746 n_args
: Collection[Object], # Should be Collection[AExpr]
7747 n_assign
: nullable TAssign,
7748 n_value
: nullable AExpr
7752 _n_expr
= n_expr
.as(not null)
7753 n_expr
.parent
= self
7759 _n_assign
= n_assign
.as(not null)
7760 n_assign
.parent
= self
7761 _n_value
= n_value
.as(not null)
7762 n_value
.parent
= self
7765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7767 if _n_expr
== old_child
then
7768 if new_child
!= null then
7769 new_child
.parent
= self
7770 assert new_child
isa AExpr
7777 for i
in [0.._n_args
.length
[ do
7778 if _n_args
[i
] == old_child
then
7779 if new_child
!= null then
7780 assert new_child
isa AExpr
7781 _n_args
[i
] = new_child
7782 new_child
.parent
= self
7784 _n_args
.remove_at
(i
)
7789 if _n_assign
== old_child
then
7790 if new_child
!= null then
7791 new_child
.parent
= self
7792 assert new_child
isa TAssign
7793 _n_assign
= new_child
7799 if _n_value
== old_child
then
7800 if new_child
!= null then
7801 new_child
.parent
= self
7802 assert new_child
isa AExpr
7803 _n_value
= new_child
7811 redef fun visit_all
(v
: Visitor)
7813 v
.enter_visit
(_n_expr
)
7817 v
.enter_visit
(_n_assign
)
7818 v
.enter_visit
(_n_value
)
7821 redef fun visit_all_reverse
(v
: Visitor)
7823 v
.enter_visit
(_n_expr
)
7825 var i
= _n_args
.length
7827 v
.enter_visit
(_n_args
[i
])
7831 v
.enter_visit
(_n_assign
)
7832 v
.enter_visit
(_n_value
)
7835 redef class ABraReassignExpr
7836 redef fun n_expr
=(n
)
7841 redef fun n_assign_op
=(n
)
7846 redef fun n_value
=(n
)
7852 private init empty_init
do end
7854 init init_abrareassignexpr
(
7855 n_expr
: nullable AExpr,
7856 n_args
: Collection[Object], # Should be Collection[AExpr]
7857 n_assign_op
: nullable AAssignOp,
7858 n_value
: nullable AExpr
7862 _n_expr
= n_expr
.as(not null)
7863 n_expr
.parent
= self
7869 _n_assign_op
= n_assign_op
.as(not null)
7870 n_assign_op
.parent
= self
7871 _n_value
= n_value
.as(not null)
7872 n_value
.parent
= self
7875 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7877 if _n_expr
== old_child
then
7878 if new_child
!= null then
7879 new_child
.parent
= self
7880 assert new_child
isa AExpr
7887 for i
in [0.._n_args
.length
[ do
7888 if _n_args
[i
] == old_child
then
7889 if new_child
!= null then
7890 assert new_child
isa AExpr
7891 _n_args
[i
] = new_child
7892 new_child
.parent
= self
7894 _n_args
.remove_at
(i
)
7899 if _n_assign_op
== old_child
then
7900 if new_child
!= null then
7901 new_child
.parent
= self
7902 assert new_child
isa AAssignOp
7903 _n_assign_op
= new_child
7909 if _n_value
== old_child
then
7910 if new_child
!= null then
7911 new_child
.parent
= self
7912 assert new_child
isa AExpr
7913 _n_value
= new_child
7921 redef fun visit_all
(v
: Visitor)
7923 v
.enter_visit
(_n_expr
)
7927 v
.enter_visit
(_n_assign_op
)
7928 v
.enter_visit
(_n_value
)
7931 redef fun visit_all_reverse
(v
: Visitor)
7933 v
.enter_visit
(_n_expr
)
7935 var i
= _n_args
.length
7937 v
.enter_visit
(_n_args
[i
])
7941 v
.enter_visit
(_n_assign_op
)
7942 v
.enter_visit
(_n_value
)
7945 redef class AClosureCallExpr
7952 private init empty_init
do end
7954 init init_aclosurecallexpr
(
7956 n_args
: Collection[Object], # Should be Collection[AExpr]
7957 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7961 _n_id
= n_id
.as(not null)
7968 for n
in n_closure_defs
do
7969 assert n
isa AClosureDef
7970 _n_closure_defs
.add
(n
)
7975 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7977 if _n_id
== old_child
then
7978 if new_child
!= null then
7979 new_child
.parent
= self
7980 assert new_child
isa TId
7987 for i
in [0.._n_args
.length
[ do
7988 if _n_args
[i
] == old_child
then
7989 if new_child
!= null then
7990 assert new_child
isa AExpr
7991 _n_args
[i
] = new_child
7992 new_child
.parent
= self
7994 _n_args
.remove_at
(i
)
7999 for i
in [0.._n_closure_defs
.length
[ do
8000 if _n_closure_defs
[i
] == old_child
then
8001 if new_child
!= null then
8002 assert new_child
isa AClosureDef
8003 _n_closure_defs
[i
] = new_child
8004 new_child
.parent
= self
8006 _n_closure_defs
.remove_at
(i
)
8013 redef fun visit_all
(v
: Visitor)
8015 v
.enter_visit
(_n_id
)
8019 for n
in _n_closure_defs
do
8024 redef fun visit_all_reverse
(v
: Visitor)
8026 v
.enter_visit
(_n_id
)
8028 var i
= _n_args
.length
8030 v
.enter_visit
(_n_args
[i
])
8035 var i
= _n_closure_defs
.length
8037 v
.enter_visit
(_n_closure_defs
[i
])
8043 redef class AVarExpr
8050 private init empty_init
do end
8052 init init_avarexpr
(
8057 _n_id
= n_id
.as(not null)
8061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8063 if _n_id
== old_child
then
8064 if new_child
!= null then
8065 new_child
.parent
= self
8066 assert new_child
isa TId
8075 redef fun visit_all
(v
: Visitor)
8077 v
.enter_visit
(_n_id
)
8080 redef fun visit_all_reverse
(v
: Visitor)
8082 v
.enter_visit
(_n_id
)
8085 redef class AVarAssignExpr
8091 redef fun n_assign
=(n
)
8096 redef fun n_value
=(n
)
8102 private init empty_init
do end
8104 init init_avarassignexpr
(
8106 n_assign
: nullable TAssign,
8107 n_value
: nullable AExpr
8111 _n_id
= n_id
.as(not null)
8113 _n_assign
= n_assign
.as(not null)
8114 n_assign
.parent
= self
8115 _n_value
= n_value
.as(not null)
8116 n_value
.parent
= self
8119 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8121 if _n_id
== old_child
then
8122 if new_child
!= null then
8123 new_child
.parent
= self
8124 assert new_child
isa TId
8131 if _n_assign
== old_child
then
8132 if new_child
!= null then
8133 new_child
.parent
= self
8134 assert new_child
isa TAssign
8135 _n_assign
= new_child
8141 if _n_value
== old_child
then
8142 if new_child
!= null then
8143 new_child
.parent
= self
8144 assert new_child
isa AExpr
8145 _n_value
= new_child
8153 redef fun visit_all
(v
: Visitor)
8155 v
.enter_visit
(_n_id
)
8156 v
.enter_visit
(_n_assign
)
8157 v
.enter_visit
(_n_value
)
8160 redef fun visit_all_reverse
(v
: Visitor)
8162 v
.enter_visit
(_n_id
)
8163 v
.enter_visit
(_n_assign
)
8164 v
.enter_visit
(_n_value
)
8167 redef class AVarReassignExpr
8173 redef fun n_assign_op
=(n
)
8178 redef fun n_value
=(n
)
8184 private init empty_init
do end
8186 init init_avarreassignexpr
(
8188 n_assign_op
: nullable AAssignOp,
8189 n_value
: nullable AExpr
8193 _n_id
= n_id
.as(not null)
8195 _n_assign_op
= n_assign_op
.as(not null)
8196 n_assign_op
.parent
= self
8197 _n_value
= n_value
.as(not null)
8198 n_value
.parent
= self
8201 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8203 if _n_id
== old_child
then
8204 if new_child
!= null then
8205 new_child
.parent
= self
8206 assert new_child
isa TId
8213 if _n_assign_op
== old_child
then
8214 if new_child
!= null then
8215 new_child
.parent
= self
8216 assert new_child
isa AAssignOp
8217 _n_assign_op
= new_child
8223 if _n_value
== old_child
then
8224 if new_child
!= null then
8225 new_child
.parent
= self
8226 assert new_child
isa AExpr
8227 _n_value
= new_child
8235 redef fun visit_all
(v
: Visitor)
8237 v
.enter_visit
(_n_id
)
8238 v
.enter_visit
(_n_assign_op
)
8239 v
.enter_visit
(_n_value
)
8242 redef fun visit_all_reverse
(v
: Visitor)
8244 v
.enter_visit
(_n_id
)
8245 v
.enter_visit
(_n_assign_op
)
8246 v
.enter_visit
(_n_value
)
8249 redef class ARangeExpr
8250 redef fun n_expr
=(n
)
8255 redef fun n_expr2
=(n
)
8261 private init empty_init
do end
8263 init init_arangeexpr
(
8264 n_expr
: nullable AExpr,
8265 n_expr2
: nullable AExpr
8269 _n_expr
= n_expr
.as(not null)
8270 n_expr
.parent
= self
8271 _n_expr2
= n_expr2
.as(not null)
8272 n_expr2
.parent
= self
8275 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8277 if _n_expr
== old_child
then
8278 if new_child
!= null then
8279 new_child
.parent
= self
8280 assert new_child
isa AExpr
8287 if _n_expr2
== old_child
then
8288 if new_child
!= null then
8289 new_child
.parent
= self
8290 assert new_child
isa AExpr
8291 _n_expr2
= new_child
8299 redef fun visit_all
(v
: Visitor)
8301 v
.enter_visit
(_n_expr
)
8302 v
.enter_visit
(_n_expr2
)
8305 redef fun visit_all_reverse
(v
: Visitor)
8307 v
.enter_visit
(_n_expr
)
8308 v
.enter_visit
(_n_expr2
)
8311 redef class ACrangeExpr
8312 redef fun n_expr
=(n
)
8317 redef fun n_expr2
=(n
)
8323 private init empty_init
do end
8325 init init_acrangeexpr
(
8326 n_expr
: nullable AExpr,
8327 n_expr2
: nullable AExpr
8331 _n_expr
= n_expr
.as(not null)
8332 n_expr
.parent
= self
8333 _n_expr2
= n_expr2
.as(not null)
8334 n_expr2
.parent
= self
8337 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8339 if _n_expr
== old_child
then
8340 if new_child
!= null then
8341 new_child
.parent
= self
8342 assert new_child
isa AExpr
8349 if _n_expr2
== old_child
then
8350 if new_child
!= null then
8351 new_child
.parent
= self
8352 assert new_child
isa AExpr
8353 _n_expr2
= new_child
8361 redef fun visit_all
(v
: Visitor)
8363 v
.enter_visit
(_n_expr
)
8364 v
.enter_visit
(_n_expr2
)
8367 redef fun visit_all_reverse
(v
: Visitor)
8369 v
.enter_visit
(_n_expr
)
8370 v
.enter_visit
(_n_expr2
)
8373 redef class AOrangeExpr
8374 redef fun n_expr
=(n
)
8379 redef fun n_expr2
=(n
)
8385 private init empty_init
do end
8387 init init_aorangeexpr
(
8388 n_expr
: nullable AExpr,
8389 n_expr2
: nullable AExpr
8393 _n_expr
= n_expr
.as(not null)
8394 n_expr
.parent
= self
8395 _n_expr2
= n_expr2
.as(not null)
8396 n_expr2
.parent
= self
8399 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8401 if _n_expr
== old_child
then
8402 if new_child
!= null then
8403 new_child
.parent
= self
8404 assert new_child
isa AExpr
8411 if _n_expr2
== old_child
then
8412 if new_child
!= null then
8413 new_child
.parent
= self
8414 assert new_child
isa AExpr
8415 _n_expr2
= new_child
8423 redef fun visit_all
(v
: Visitor)
8425 v
.enter_visit
(_n_expr
)
8426 v
.enter_visit
(_n_expr2
)
8429 redef fun visit_all_reverse
(v
: Visitor)
8431 v
.enter_visit
(_n_expr
)
8432 v
.enter_visit
(_n_expr2
)
8435 redef class AArrayExpr
8437 private init empty_init
do end
8439 init init_aarrayexpr
(
8440 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8453 for i
in [0.._n_exprs
.length
[ do
8454 if _n_exprs
[i
] == old_child
then
8455 if new_child
!= null then
8456 assert new_child
isa AExpr
8457 _n_exprs
[i
] = new_child
8458 new_child
.parent
= self
8460 _n_exprs
.remove_at
(i
)
8467 redef fun visit_all
(v
: Visitor)
8469 for n
in _n_exprs
do
8474 redef fun visit_all_reverse
(v
: Visitor)
8477 var i
= _n_exprs
.length
8479 v
.enter_visit
(_n_exprs
[i
])
8485 redef class ASelfExpr
8486 redef fun n_kwself
=(n
)
8492 private init empty_init
do end
8494 init init_aselfexpr
(
8495 n_kwself
: nullable TKwself
8499 _n_kwself
= n_kwself
.as(not null)
8500 n_kwself
.parent
= self
8503 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8505 if _n_kwself
== old_child
then
8506 if new_child
!= null then
8507 new_child
.parent
= self
8508 assert new_child
isa TKwself
8509 _n_kwself
= new_child
8517 redef fun visit_all
(v
: Visitor)
8519 v
.enter_visit
(_n_kwself
)
8522 redef fun visit_all_reverse
(v
: Visitor)
8524 v
.enter_visit
(_n_kwself
)
8527 redef class AImplicitSelfExpr
8529 private init empty_init
do end
8531 init init_aimplicitselfexpr
8536 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8540 redef fun visit_all
(v
: Visitor)
8544 redef fun visit_all_reverse
(v
: Visitor)
8548 redef class ATrueExpr
8549 redef fun n_kwtrue
=(n
)
8555 private init empty_init
do end
8557 init init_atrueexpr
(
8558 n_kwtrue
: nullable TKwtrue
8562 _n_kwtrue
= n_kwtrue
.as(not null)
8563 n_kwtrue
.parent
= self
8566 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8568 if _n_kwtrue
== old_child
then
8569 if new_child
!= null then
8570 new_child
.parent
= self
8571 assert new_child
isa TKwtrue
8572 _n_kwtrue
= new_child
8580 redef fun visit_all
(v
: Visitor)
8582 v
.enter_visit
(_n_kwtrue
)
8585 redef fun visit_all_reverse
(v
: Visitor)
8587 v
.enter_visit
(_n_kwtrue
)
8590 redef class AFalseExpr
8591 redef fun n_kwfalse
=(n
)
8597 private init empty_init
do end
8599 init init_afalseexpr
(
8600 n_kwfalse
: nullable TKwfalse
8604 _n_kwfalse
= n_kwfalse
.as(not null)
8605 n_kwfalse
.parent
= self
8608 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8610 if _n_kwfalse
== old_child
then
8611 if new_child
!= null then
8612 new_child
.parent
= self
8613 assert new_child
isa TKwfalse
8614 _n_kwfalse
= new_child
8622 redef fun visit_all
(v
: Visitor)
8624 v
.enter_visit
(_n_kwfalse
)
8627 redef fun visit_all_reverse
(v
: Visitor)
8629 v
.enter_visit
(_n_kwfalse
)
8632 redef class ANullExpr
8633 redef fun n_kwnull
=(n
)
8639 private init empty_init
do end
8641 init init_anullexpr
(
8642 n_kwnull
: nullable TKwnull
8646 _n_kwnull
= n_kwnull
.as(not null)
8647 n_kwnull
.parent
= self
8650 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8652 if _n_kwnull
== old_child
then
8653 if new_child
!= null then
8654 new_child
.parent
= self
8655 assert new_child
isa TKwnull
8656 _n_kwnull
= new_child
8664 redef fun visit_all
(v
: Visitor)
8666 v
.enter_visit
(_n_kwnull
)
8669 redef fun visit_all_reverse
(v
: Visitor)
8671 v
.enter_visit
(_n_kwnull
)
8674 redef class AIntExpr
8675 redef fun n_number
=(n
)
8681 private init empty_init
do end
8683 init init_aintexpr
(
8684 n_number
: nullable TNumber
8688 _n_number
= n_number
.as(not null)
8689 n_number
.parent
= self
8692 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8694 if _n_number
== old_child
then
8695 if new_child
!= null then
8696 new_child
.parent
= self
8697 assert new_child
isa TNumber
8698 _n_number
= new_child
8706 redef fun visit_all
(v
: Visitor)
8708 v
.enter_visit
(_n_number
)
8711 redef fun visit_all_reverse
(v
: Visitor)
8713 v
.enter_visit
(_n_number
)
8716 redef class AFloatExpr
8717 redef fun n_float
=(n
)
8723 private init empty_init
do end
8725 init init_afloatexpr
(
8726 n_float
: nullable TFloat
8730 _n_float
= n_float
.as(not null)
8731 n_float
.parent
= self
8734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8736 if _n_float
== old_child
then
8737 if new_child
!= null then
8738 new_child
.parent
= self
8739 assert new_child
isa TFloat
8740 _n_float
= new_child
8748 redef fun visit_all
(v
: Visitor)
8750 v
.enter_visit
(_n_float
)
8753 redef fun visit_all_reverse
(v
: Visitor)
8755 v
.enter_visit
(_n_float
)
8758 redef class ACharExpr
8759 redef fun n_char
=(n
)
8765 private init empty_init
do end
8767 init init_acharexpr
(
8768 n_char
: nullable TChar
8772 _n_char
= n_char
.as(not null)
8773 n_char
.parent
= self
8776 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8778 if _n_char
== old_child
then
8779 if new_child
!= null then
8780 new_child
.parent
= self
8781 assert new_child
isa TChar
8790 redef fun visit_all
(v
: Visitor)
8792 v
.enter_visit
(_n_char
)
8795 redef fun visit_all_reverse
(v
: Visitor)
8797 v
.enter_visit
(_n_char
)
8800 redef class AStringExpr
8801 redef fun n_string
=(n
)
8807 private init empty_init
do end
8809 init init_astringexpr
(
8810 n_string
: nullable TString
8814 _n_string
= n_string
.as(not null)
8815 n_string
.parent
= self
8818 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8820 if _n_string
== old_child
then
8821 if new_child
!= null then
8822 new_child
.parent
= self
8823 assert new_child
isa TString
8824 _n_string
= new_child
8832 redef fun visit_all
(v
: Visitor)
8834 v
.enter_visit
(_n_string
)
8837 redef fun visit_all_reverse
(v
: Visitor)
8839 v
.enter_visit
(_n_string
)
8842 redef class AStartStringExpr
8843 redef fun n_string
=(n
)
8849 private init empty_init
do end
8851 init init_astartstringexpr
(
8852 n_string
: nullable TStartString
8856 _n_string
= n_string
.as(not null)
8857 n_string
.parent
= self
8860 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8862 if _n_string
== old_child
then
8863 if new_child
!= null then
8864 new_child
.parent
= self
8865 assert new_child
isa TStartString
8866 _n_string
= new_child
8874 redef fun visit_all
(v
: Visitor)
8876 v
.enter_visit
(_n_string
)
8879 redef fun visit_all_reverse
(v
: Visitor)
8881 v
.enter_visit
(_n_string
)
8884 redef class AMidStringExpr
8885 redef fun n_string
=(n
)
8891 private init empty_init
do end
8893 init init_amidstringexpr
(
8894 n_string
: nullable TMidString
8898 _n_string
= n_string
.as(not null)
8899 n_string
.parent
= self
8902 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8904 if _n_string
== old_child
then
8905 if new_child
!= null then
8906 new_child
.parent
= self
8907 assert new_child
isa TMidString
8908 _n_string
= new_child
8916 redef fun visit_all
(v
: Visitor)
8918 v
.enter_visit
(_n_string
)
8921 redef fun visit_all_reverse
(v
: Visitor)
8923 v
.enter_visit
(_n_string
)
8926 redef class AEndStringExpr
8927 redef fun n_string
=(n
)
8933 private init empty_init
do end
8935 init init_aendstringexpr
(
8936 n_string
: nullable TEndString
8940 _n_string
= n_string
.as(not null)
8941 n_string
.parent
= self
8944 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8946 if _n_string
== old_child
then
8947 if new_child
!= null then
8948 new_child
.parent
= self
8949 assert new_child
isa TEndString
8950 _n_string
= new_child
8958 redef fun visit_all
(v
: Visitor)
8960 v
.enter_visit
(_n_string
)
8963 redef fun visit_all_reverse
(v
: Visitor)
8965 v
.enter_visit
(_n_string
)
8968 redef class ASuperstringExpr
8970 private init empty_init
do end
8972 init init_asuperstringexpr
(
8973 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8986 for i
in [0.._n_exprs
.length
[ do
8987 if _n_exprs
[i
] == old_child
then
8988 if new_child
!= null then
8989 assert new_child
isa AExpr
8990 _n_exprs
[i
] = new_child
8991 new_child
.parent
= self
8993 _n_exprs
.remove_at
(i
)
9000 redef fun visit_all
(v
: Visitor)
9002 for n
in _n_exprs
do
9007 redef fun visit_all_reverse
(v
: Visitor)
9010 var i
= _n_exprs
.length
9012 v
.enter_visit
(_n_exprs
[i
])
9018 redef class AParExpr
9019 redef fun n_expr
=(n
)
9025 private init empty_init
do end
9027 init init_aparexpr
(
9028 n_expr
: nullable AExpr
9032 _n_expr
= n_expr
.as(not null)
9033 n_expr
.parent
= self
9036 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9038 if _n_expr
== old_child
then
9039 if new_child
!= null then
9040 new_child
.parent
= self
9041 assert new_child
isa AExpr
9050 redef fun visit_all
(v
: Visitor)
9052 v
.enter_visit
(_n_expr
)
9055 redef fun visit_all_reverse
(v
: Visitor)
9057 v
.enter_visit
(_n_expr
)
9060 redef class AAsCastExpr
9061 redef fun n_expr
=(n
)
9066 redef fun n_kwas
=(n
)
9071 redef fun n_type
=(n
)
9077 private init empty_init
do end
9079 init init_aascastexpr
(
9080 n_expr
: nullable AExpr,
9081 n_kwas
: nullable TKwas,
9082 n_type
: nullable AType
9086 _n_expr
= n_expr
.as(not null)
9087 n_expr
.parent
= self
9088 _n_kwas
= n_kwas
.as(not null)
9089 n_kwas
.parent
= self
9090 _n_type
= n_type
.as(not null)
9091 n_type
.parent
= self
9094 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9096 if _n_expr
== old_child
then
9097 if new_child
!= null then
9098 new_child
.parent
= self
9099 assert new_child
isa AExpr
9106 if _n_kwas
== old_child
then
9107 if new_child
!= null then
9108 new_child
.parent
= self
9109 assert new_child
isa TKwas
9116 if _n_type
== old_child
then
9117 if new_child
!= null then
9118 new_child
.parent
= self
9119 assert new_child
isa AType
9128 redef fun visit_all
(v
: Visitor)
9130 v
.enter_visit
(_n_expr
)
9131 v
.enter_visit
(_n_kwas
)
9132 v
.enter_visit
(_n_type
)
9135 redef fun visit_all_reverse
(v
: Visitor)
9137 v
.enter_visit
(_n_expr
)
9138 v
.enter_visit
(_n_kwas
)
9139 v
.enter_visit
(_n_type
)
9142 redef class AAsNotnullExpr
9143 redef fun n_expr
=(n
)
9148 redef fun n_kwas
=(n
)
9153 redef fun n_kwnot
=(n
)
9158 redef fun n_kwnull
=(n
)
9164 private init empty_init
do end
9166 init init_aasnotnullexpr
(
9167 n_expr
: nullable AExpr,
9168 n_kwas
: nullable TKwas,
9169 n_kwnot
: nullable TKwnot,
9170 n_kwnull
: nullable TKwnull
9174 _n_expr
= n_expr
.as(not null)
9175 n_expr
.parent
= self
9176 _n_kwas
= n_kwas
.as(not null)
9177 n_kwas
.parent
= self
9178 _n_kwnot
= n_kwnot
.as(not null)
9179 n_kwnot
.parent
= self
9180 _n_kwnull
= n_kwnull
.as(not null)
9181 n_kwnull
.parent
= self
9184 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9186 if _n_expr
== old_child
then
9187 if new_child
!= null then
9188 new_child
.parent
= self
9189 assert new_child
isa AExpr
9196 if _n_kwas
== old_child
then
9197 if new_child
!= null then
9198 new_child
.parent
= self
9199 assert new_child
isa TKwas
9206 if _n_kwnot
== old_child
then
9207 if new_child
!= null then
9208 new_child
.parent
= self
9209 assert new_child
isa TKwnot
9210 _n_kwnot
= new_child
9216 if _n_kwnull
== old_child
then
9217 if new_child
!= null then
9218 new_child
.parent
= self
9219 assert new_child
isa TKwnull
9220 _n_kwnull
= new_child
9228 redef fun visit_all
(v
: Visitor)
9230 v
.enter_visit
(_n_expr
)
9231 v
.enter_visit
(_n_kwas
)
9232 v
.enter_visit
(_n_kwnot
)
9233 v
.enter_visit
(_n_kwnull
)
9236 redef fun visit_all_reverse
(v
: Visitor)
9238 v
.enter_visit
(_n_expr
)
9239 v
.enter_visit
(_n_kwas
)
9240 v
.enter_visit
(_n_kwnot
)
9241 v
.enter_visit
(_n_kwnull
)
9244 redef class AIssetAttrExpr
9245 redef fun n_kwisset
=(n
)
9250 redef fun n_expr
=(n
)
9261 private init empty_init
do end
9263 init init_aissetattrexpr
(
9264 n_kwisset
: nullable TKwisset,
9265 n_expr
: nullable AExpr,
9266 n_id
: nullable TAttrid
9270 _n_kwisset
= n_kwisset
.as(not null)
9271 n_kwisset
.parent
= self
9272 _n_expr
= n_expr
.as(not null)
9273 n_expr
.parent
= self
9274 _n_id
= n_id
.as(not null)
9278 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9280 if _n_kwisset
== old_child
then
9281 if new_child
!= null then
9282 new_child
.parent
= self
9283 assert new_child
isa TKwisset
9284 _n_kwisset
= new_child
9290 if _n_expr
== old_child
then
9291 if new_child
!= null then
9292 new_child
.parent
= self
9293 assert new_child
isa AExpr
9300 if _n_id
== old_child
then
9301 if new_child
!= null then
9302 new_child
.parent
= self
9303 assert new_child
isa TAttrid
9312 redef fun visit_all
(v
: Visitor)
9314 v
.enter_visit
(_n_kwisset
)
9315 v
.enter_visit
(_n_expr
)
9316 v
.enter_visit
(_n_id
)
9319 redef fun visit_all_reverse
(v
: Visitor)
9321 v
.enter_visit
(_n_kwisset
)
9322 v
.enter_visit
(_n_expr
)
9323 v
.enter_visit
(_n_id
)
9326 redef class APlusAssignOp
9327 redef fun n_pluseq
=(n
)
9333 private init empty_init
do end
9335 init init_aplusassignop
(
9336 n_pluseq
: nullable TPluseq
9340 _n_pluseq
= n_pluseq
.as(not null)
9341 n_pluseq
.parent
= self
9344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9346 if _n_pluseq
== old_child
then
9347 if new_child
!= null then
9348 new_child
.parent
= self
9349 assert new_child
isa TPluseq
9350 _n_pluseq
= new_child
9358 redef fun visit_all
(v
: Visitor)
9360 v
.enter_visit
(_n_pluseq
)
9363 redef fun visit_all_reverse
(v
: Visitor)
9365 v
.enter_visit
(_n_pluseq
)
9368 redef class AMinusAssignOp
9369 redef fun n_minuseq
=(n
)
9375 private init empty_init
do end
9377 init init_aminusassignop
(
9378 n_minuseq
: nullable TMinuseq
9382 _n_minuseq
= n_minuseq
.as(not null)
9383 n_minuseq
.parent
= self
9386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9388 if _n_minuseq
== old_child
then
9389 if new_child
!= null then
9390 new_child
.parent
= self
9391 assert new_child
isa TMinuseq
9392 _n_minuseq
= new_child
9400 redef fun visit_all
(v
: Visitor)
9402 v
.enter_visit
(_n_minuseq
)
9405 redef fun visit_all_reverse
(v
: Visitor)
9407 v
.enter_visit
(_n_minuseq
)
9410 redef class AClosureDef
9411 redef fun n_bang
=(n
)
9421 redef fun n_kwdo
=(n
)
9428 redef fun n_expr
=(n
)
9435 redef fun n_label
=(n
)
9443 private init empty_init
do end
9445 init init_aclosuredef
(
9446 n_bang
: nullable TBang,
9447 n_id
: nullable AClosureId,
9448 n_ids
: Collection[Object], # Should be Collection[TId]
9449 n_kwdo
: nullable TKwdo,
9450 n_expr
: nullable AExpr,
9451 n_label
: nullable ALabel
9455 _n_bang
= n_bang
.as(not null)
9456 n_bang
.parent
= self
9457 _n_id
= n_id
.as(not null)
9465 if n_kwdo
!= null then
9466 n_kwdo
.parent
= self
9469 if n_expr
!= null then
9470 n_expr
.parent
= self
9473 if n_label
!= null then
9474 n_label
.parent
= self
9478 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9480 if _n_bang
== old_child
then
9481 if new_child
!= null then
9482 new_child
.parent
= self
9483 assert new_child
isa TBang
9490 if _n_id
== old_child
then
9491 if new_child
!= null then
9492 new_child
.parent
= self
9493 assert new_child
isa AClosureId
9500 for i
in [0.._n_ids
.length
[ do
9501 if _n_ids
[i
] == old_child
then
9502 if new_child
!= null then
9503 assert new_child
isa TId
9504 _n_ids
[i
] = new_child
9505 new_child
.parent
= self
9512 if _n_kwdo
== old_child
then
9513 if new_child
!= null then
9514 new_child
.parent
= self
9515 assert new_child
isa TKwdo
9522 if _n_expr
== old_child
then
9523 if new_child
!= null then
9524 new_child
.parent
= self
9525 assert new_child
isa AExpr
9532 if _n_label
== old_child
then
9533 if new_child
!= null then
9534 new_child
.parent
= self
9535 assert new_child
isa ALabel
9536 _n_label
= new_child
9544 redef fun visit_all
(v
: Visitor)
9546 v
.enter_visit
(_n_bang
)
9547 v
.enter_visit
(_n_id
)
9551 if _n_kwdo
!= null then
9552 v
.enter_visit
(_n_kwdo
.as(not null))
9554 if _n_expr
!= null then
9555 v
.enter_visit
(_n_expr
.as(not null))
9557 if _n_label
!= null then
9558 v
.enter_visit
(_n_label
.as(not null))
9562 redef fun visit_all_reverse
(v
: Visitor)
9564 v
.enter_visit
(_n_bang
)
9565 v
.enter_visit
(_n_id
)
9567 var i
= _n_ids
.length
9569 v
.enter_visit
(_n_ids
[i
])
9573 if _n_kwdo
!= null then
9574 v
.enter_visit
(_n_kwdo
.as(not null))
9576 if _n_expr
!= null then
9577 v
.enter_visit
(_n_expr
.as(not null))
9579 if _n_label
!= null then
9580 v
.enter_visit
(_n_label
.as(not null))
9584 redef class ASimpleClosureId
9591 private init empty_init
do end
9593 init init_asimpleclosureid
(
9598 _n_id
= n_id
.as(not null)
9602 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9604 if _n_id
== old_child
then
9605 if new_child
!= null then
9606 new_child
.parent
= self
9607 assert new_child
isa TId
9616 redef fun visit_all
(v
: Visitor)
9618 v
.enter_visit
(_n_id
)
9621 redef fun visit_all_reverse
(v
: Visitor)
9623 v
.enter_visit
(_n_id
)
9626 redef class ABreakClosureId
9627 redef fun n_kwbreak
=(n
)
9633 private init empty_init
do end
9635 init init_abreakclosureid
(
9636 n_kwbreak
: nullable TKwbreak
9640 _n_kwbreak
= n_kwbreak
.as(not null)
9641 n_kwbreak
.parent
= self
9644 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9646 if _n_kwbreak
== old_child
then
9647 if new_child
!= null then
9648 new_child
.parent
= self
9649 assert new_child
isa TKwbreak
9650 _n_kwbreak
= new_child
9658 redef fun visit_all
(v
: Visitor)
9660 v
.enter_visit
(_n_kwbreak
)
9663 redef fun visit_all_reverse
(v
: Visitor)
9665 v
.enter_visit
(_n_kwbreak
)
9668 redef class AQualified
9669 redef fun n_classid
=(n
)
9677 private init empty_init
do end
9679 init init_aqualified
(
9680 n_id
: Collection[Object], # Should be Collection[TId]
9681 n_classid
: nullable TClassid
9690 _n_classid
= n_classid
9691 if n_classid
!= null then
9692 n_classid
.parent
= self
9696 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9698 for i
in [0.._n_id
.length
[ do
9699 if _n_id
[i
] == old_child
then
9700 if new_child
!= null then
9701 assert new_child
isa TId
9702 _n_id
[i
] = new_child
9703 new_child
.parent
= self
9710 if _n_classid
== old_child
then
9711 if new_child
!= null then
9712 new_child
.parent
= self
9713 assert new_child
isa TClassid
9714 _n_classid
= new_child
9722 redef fun visit_all
(v
: Visitor)
9727 if _n_classid
!= null then
9728 v
.enter_visit
(_n_classid
.as(not null))
9732 redef fun visit_all_reverse
(v
: Visitor)
9735 var i
= _n_id
.length
9737 v
.enter_visit
(_n_id
[i
])
9741 if _n_classid
!= null then
9742 v
.enter_visit
(_n_classid
.as(not null))
9748 private init empty_init
do end
9751 n_comment
: Collection[Object] # Should be Collection[TComment]
9755 for n
in n_comment
do
9756 assert n
isa TComment
9762 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9764 for i
in [0.._n_comment
.length
[ do
9765 if _n_comment
[i
] == old_child
then
9766 if new_child
!= null then
9767 assert new_child
isa TComment
9768 _n_comment
[i
] = new_child
9769 new_child
.parent
= self
9771 _n_comment
.remove_at
(i
)
9778 redef fun visit_all
(v
: Visitor)
9780 for n
in _n_comment
do
9785 redef fun visit_all_reverse
(v
: Visitor)
9788 var i
= _n_comment
.length
9790 v
.enter_visit
(_n_comment
[i
])
9799 n_base
: nullable AModule,
9806 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9808 if _n_base
== old_child
then
9809 if new_child
== null then
9811 new_child
.parent
= self
9812 assert new_child
isa AModule
9815 old_child
.parent
= null
9820 redef fun visit_all
(v
: Visitor)
9822 if _n_base
!= null then
9823 v
.enter_visit
(_n_base
.as(not null))
9825 v
.enter_visit
(_n_eof
)
9828 redef fun visit_all_reverse
(v
: Visitor)
9830 v
.enter_visit
(_n_eof
)
9831 if _n_base
!= null then
9832 v
.enter_visit
(_n_base
.as(not null))