1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
9 # Parent of the node in the AST
10 readable writable var _parent
: nullable ANode
12 # Remove a child from the AST
13 fun remove_child
(child
: ANode)
15 replace_child
(child
, null)
18 # Replace a child with an other node in the AST
19 fun replace_child
(old_child
: ANode, new_child
: nullable ANode) is abstract
21 # Replace itself with an other node in the AST
22 fun replace_with
(node
: ANode)
24 if (_parent
!= null) then
25 _parent
.replace_child
(self, node
)
29 # Visit all nodes in order.
30 # Thus, call "v.visit(e)" for each node e
31 fun visit_all
(v
: Visitor) is abstract
33 # Visit all nodes in reverse order.
34 # Thus, call "v.visit(e)" for each node e starting from the last child
35 fun visit_all_reverse
(v
: Visitor) is abstract
39 redef fun visit_all
(v
: Visitor) do end
40 redef fun visit_all_reverse
(v
: Visitor) do end
41 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode) do end
45 redef fun replace_with
(n
: ANode)
53 # Abstract standard visitor
55 # What the visitor do when a node is visited
56 # Concrete visitors should redefine this method.
57 protected fun visit
(e
: nullable ANode) is abstract
59 # Ask the visitor to visit a given node.
60 # Usually automatically called by visit_all* methods.
61 # This methos should not be redefined
62 fun enter_visit
(e
: nullable ANode)
64 var old
= _current_node
70 # The current visited node
71 readable var _current_node
: nullable ANode = null
75 redef fun n_packagedecl
=(n
)
83 private init empty_init
do end
86 n_packagedecl
: nullable APackagedecl,
87 n_imports
: Collection[Object], # Should be Collection[AImport]
88 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
92 _n_packagedecl
= n_packagedecl
93 if n_packagedecl
!= null then
94 n_packagedecl
.parent
= self
101 for n
in n_classdefs
do
102 assert n
isa AClassdef
108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
110 if _n_packagedecl
== old_child
then
111 if new_child
!= null then
112 new_child
.parent
= self
113 assert new_child
isa APackagedecl
114 _n_packagedecl
= new_child
116 _n_packagedecl
= null
120 for i
in [0.._n_imports
.length
[ do
121 if _n_imports
[i
] == old_child
then
122 if new_child
!= null then
123 assert new_child
isa AImport
124 _n_imports
[i
] = new_child
125 new_child
.parent
= self
127 _n_imports
.remove_at
(i
)
132 for i
in [0.._n_classdefs
.length
[ do
133 if _n_classdefs
[i
] == old_child
then
134 if new_child
!= null then
135 assert new_child
isa AClassdef
136 _n_classdefs
[i
] = new_child
137 new_child
.parent
= self
139 _n_classdefs
.remove_at
(i
)
146 redef fun visit_all
(v
: Visitor)
148 if _n_packagedecl
!= null then
149 v
.enter_visit
(_n_packagedecl
.as(not null))
151 for n
in _n_imports
do
154 for n
in _n_classdefs
do
159 redef fun visit_all_reverse
(v
: Visitor)
161 if _n_packagedecl
!= null then
162 v
.enter_visit
(_n_packagedecl
.as(not null))
165 var i
= _n_imports
.length
167 v
.enter_visit
(_n_imports
[i
])
172 var i
= _n_classdefs
.length
174 v
.enter_visit
(_n_classdefs
[i
])
180 redef class APackagedecl
188 redef fun n_kwpackage
=(n
)
199 private init empty_init
do end
201 init init_apackagedecl
(
202 n_doc
: nullable ADoc,
203 n_kwpackage
: nullable TKwpackage,
209 if n_doc
!= null then
212 _n_kwpackage
= n_kwpackage
.as(not null)
213 n_kwpackage
.parent
= self
214 _n_id
= n_id
.as(not null)
218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
220 if _n_doc
== old_child
then
221 if new_child
!= null then
222 new_child
.parent
= self
223 assert new_child
isa ADoc
230 if _n_kwpackage
== old_child
then
231 if new_child
!= null then
232 new_child
.parent
= self
233 assert new_child
isa TKwpackage
234 _n_kwpackage
= new_child
240 if _n_id
== old_child
then
241 if new_child
!= null then
242 new_child
.parent
= self
243 assert new_child
isa TId
252 redef fun visit_all
(v
: Visitor)
254 if _n_doc
!= null then
255 v
.enter_visit
(_n_doc
.as(not null))
257 v
.enter_visit
(_n_kwpackage
)
261 redef fun visit_all_reverse
(v
: Visitor)
263 if _n_doc
!= null then
264 v
.enter_visit
(_n_doc
.as(not null))
266 v
.enter_visit
(_n_kwpackage
)
270 redef class AStdImport
271 redef fun n_visibility
=(n
)
276 redef fun n_kwimport
=(n
)
287 private init empty_init
do end
289 init init_astdimport
(
290 n_visibility
: nullable AVisibility,
291 n_kwimport
: nullable TKwimport,
296 _n_visibility
= n_visibility
.as(not null)
297 n_visibility
.parent
= self
298 _n_kwimport
= n_kwimport
.as(not null)
299 n_kwimport
.parent
= self
300 _n_id
= n_id
.as(not null)
304 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
306 if _n_visibility
== old_child
then
307 if new_child
!= null then
308 new_child
.parent
= self
309 assert new_child
isa AVisibility
310 _n_visibility
= new_child
316 if _n_kwimport
== old_child
then
317 if new_child
!= null then
318 new_child
.parent
= self
319 assert new_child
isa TKwimport
320 _n_kwimport
= new_child
326 if _n_id
== old_child
then
327 if new_child
!= null then
328 new_child
.parent
= self
329 assert new_child
isa TId
338 redef fun visit_all
(v
: Visitor)
340 v
.enter_visit
(_n_visibility
)
341 v
.enter_visit
(_n_kwimport
)
345 redef fun visit_all_reverse
(v
: Visitor)
347 v
.enter_visit
(_n_visibility
)
348 v
.enter_visit
(_n_kwimport
)
352 redef class ANoImport
353 redef fun n_visibility
=(n
)
358 redef fun n_kwimport
=(n
)
363 redef fun n_kwend
=(n
)
369 private init empty_init
do end
371 init init_anoimport
(
372 n_visibility
: nullable AVisibility,
373 n_kwimport
: nullable TKwimport,
374 n_kwend
: nullable TKwend
378 _n_visibility
= n_visibility
.as(not null)
379 n_visibility
.parent
= self
380 _n_kwimport
= n_kwimport
.as(not null)
381 n_kwimport
.parent
= self
382 _n_kwend
= n_kwend
.as(not null)
383 n_kwend
.parent
= self
386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
388 if _n_visibility
== old_child
then
389 if new_child
!= null then
390 new_child
.parent
= self
391 assert new_child
isa AVisibility
392 _n_visibility
= new_child
398 if _n_kwimport
== old_child
then
399 if new_child
!= null then
400 new_child
.parent
= self
401 assert new_child
isa TKwimport
402 _n_kwimport
= new_child
408 if _n_kwend
== old_child
then
409 if new_child
!= null then
410 new_child
.parent
= self
411 assert new_child
isa TKwend
420 redef fun visit_all
(v
: Visitor)
422 v
.enter_visit
(_n_visibility
)
423 v
.enter_visit
(_n_kwimport
)
424 v
.enter_visit
(_n_kwend
)
427 redef fun visit_all_reverse
(v
: Visitor)
429 v
.enter_visit
(_n_visibility
)
430 v
.enter_visit
(_n_kwimport
)
431 v
.enter_visit
(_n_kwend
)
434 redef class APublicVisibility
436 private init empty_init
do end
438 init init_apublicvisibility
443 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
447 redef fun visit_all
(v
: Visitor)
451 redef fun visit_all_reverse
(v
: Visitor)
455 redef class APrivateVisibility
456 redef fun n_kwprivate
=(n
)
462 private init empty_init
do end
464 init init_aprivatevisibility
(
465 n_kwprivate
: nullable TKwprivate
469 _n_kwprivate
= n_kwprivate
.as(not null)
470 n_kwprivate
.parent
= self
473 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
475 if _n_kwprivate
== old_child
then
476 if new_child
!= null then
477 new_child
.parent
= self
478 assert new_child
isa TKwprivate
479 _n_kwprivate
= new_child
487 redef fun visit_all
(v
: Visitor)
489 v
.enter_visit
(_n_kwprivate
)
492 redef fun visit_all_reverse
(v
: Visitor)
494 v
.enter_visit
(_n_kwprivate
)
497 redef class AProtectedVisibility
498 redef fun n_kwprotected
=(n
)
504 private init empty_init
do end
506 init init_aprotectedvisibility
(
507 n_kwprotected
: nullable TKwprotected
511 _n_kwprotected
= n_kwprotected
.as(not null)
512 n_kwprotected
.parent
= self
515 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
517 if _n_kwprotected
== old_child
then
518 if new_child
!= null then
519 new_child
.parent
= self
520 assert new_child
isa TKwprotected
521 _n_kwprotected
= new_child
529 redef fun visit_all
(v
: Visitor)
531 v
.enter_visit
(_n_kwprotected
)
534 redef fun visit_all_reverse
(v
: Visitor)
536 v
.enter_visit
(_n_kwprotected
)
539 redef class AIntrudeVisibility
540 redef fun n_kwintrude
=(n
)
546 private init empty_init
do end
548 init init_aintrudevisibility
(
549 n_kwintrude
: nullable TKwintrude
553 _n_kwintrude
= n_kwintrude
.as(not null)
554 n_kwintrude
.parent
= self
557 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
559 if _n_kwintrude
== old_child
then
560 if new_child
!= null then
561 new_child
.parent
= self
562 assert new_child
isa TKwintrude
563 _n_kwintrude
= new_child
571 redef fun visit_all
(v
: Visitor)
573 v
.enter_visit
(_n_kwintrude
)
576 redef fun visit_all_reverse
(v
: Visitor)
578 v
.enter_visit
(_n_kwintrude
)
581 redef class AStdClassdef
589 redef fun n_kwredef
=(n
)
596 redef fun n_visibility
=(n
)
601 redef fun n_classkind
=(n
)
614 private init empty_init
do end
616 init init_astdclassdef
(
617 n_doc
: nullable ADoc,
618 n_kwredef
: nullable TKwredef,
619 n_visibility
: nullable AVisibility,
620 n_classkind
: nullable AClasskind,
621 n_id
: nullable TClassid,
622 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
623 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
624 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
629 if n_doc
!= null then
632 _n_kwredef
= n_kwredef
633 if n_kwredef
!= null then
634 n_kwredef
.parent
= self
636 _n_visibility
= n_visibility
.as(not null)
637 n_visibility
.parent
= self
638 _n_classkind
= n_classkind
.as(not null)
639 n_classkind
.parent
= self
644 for n
in n_formaldefs
do
645 assert n
isa AFormaldef
649 for n
in n_superclasses
do
650 assert n
isa ASuperclass
651 _n_superclasses
.add
(n
)
654 for n
in n_propdefs
do
655 assert n
isa APropdef
661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
663 if _n_doc
== old_child
then
664 if new_child
!= null then
665 new_child
.parent
= self
666 assert new_child
isa ADoc
673 if _n_kwredef
== old_child
then
674 if new_child
!= null then
675 new_child
.parent
= self
676 assert new_child
isa TKwredef
677 _n_kwredef
= new_child
683 if _n_visibility
== old_child
then
684 if new_child
!= null then
685 new_child
.parent
= self
686 assert new_child
isa AVisibility
687 _n_visibility
= new_child
693 if _n_classkind
== old_child
then
694 if new_child
!= null then
695 new_child
.parent
= self
696 assert new_child
isa AClasskind
697 _n_classkind
= new_child
703 if _n_id
== old_child
then
704 if new_child
!= null then
705 new_child
.parent
= self
706 assert new_child
isa TClassid
713 for i
in [0.._n_formaldefs
.length
[ do
714 if _n_formaldefs
[i
] == old_child
then
715 if new_child
!= null then
716 assert new_child
isa AFormaldef
717 _n_formaldefs
[i
] = new_child
718 new_child
.parent
= self
720 _n_formaldefs
.remove_at
(i
)
725 for i
in [0.._n_superclasses
.length
[ do
726 if _n_superclasses
[i
] == old_child
then
727 if new_child
!= null then
728 assert new_child
isa ASuperclass
729 _n_superclasses
[i
] = new_child
730 new_child
.parent
= self
732 _n_superclasses
.remove_at
(i
)
737 for i
in [0.._n_propdefs
.length
[ do
738 if _n_propdefs
[i
] == old_child
then
739 if new_child
!= null then
740 assert new_child
isa APropdef
741 _n_propdefs
[i
] = new_child
742 new_child
.parent
= self
744 _n_propdefs
.remove_at
(i
)
751 redef fun visit_all
(v
: Visitor)
753 if _n_doc
!= null then
754 v
.enter_visit
(_n_doc
.as(not null))
756 if _n_kwredef
!= null then
757 v
.enter_visit
(_n_kwredef
.as(not null))
759 v
.enter_visit
(_n_visibility
)
760 v
.enter_visit
(_n_classkind
)
761 if _n_id
!= null then
762 v
.enter_visit
(_n_id
.as(not null))
764 for n
in _n_formaldefs
do
767 for n
in _n_superclasses
do
770 for n
in _n_propdefs
do
775 redef fun visit_all_reverse
(v
: Visitor)
777 if _n_doc
!= null then
778 v
.enter_visit
(_n_doc
.as(not null))
780 if _n_kwredef
!= null then
781 v
.enter_visit
(_n_kwredef
.as(not null))
783 v
.enter_visit
(_n_visibility
)
784 v
.enter_visit
(_n_classkind
)
785 if _n_id
!= null then
786 v
.enter_visit
(_n_id
.as(not null))
789 var i
= _n_formaldefs
.length
791 v
.enter_visit
(_n_formaldefs
[i
])
796 var i
= _n_superclasses
.length
798 v
.enter_visit
(_n_superclasses
[i
])
803 var i
= _n_propdefs
.length
805 v
.enter_visit
(_n_propdefs
[i
])
811 redef class ATopClassdef
813 private init empty_init
do end
815 init init_atopclassdef
(
816 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
820 for n
in n_propdefs
do
821 assert n
isa APropdef
827 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
829 for i
in [0.._n_propdefs
.length
[ do
830 if _n_propdefs
[i
] == old_child
then
831 if new_child
!= null then
832 assert new_child
isa APropdef
833 _n_propdefs
[i
] = new_child
834 new_child
.parent
= self
836 _n_propdefs
.remove_at
(i
)
843 redef fun visit_all
(v
: Visitor)
845 for n
in _n_propdefs
do
850 redef fun visit_all_reverse
(v
: Visitor)
853 var i
= _n_propdefs
.length
855 v
.enter_visit
(_n_propdefs
[i
])
861 redef class AMainClassdef
863 private init empty_init
do end
865 init init_amainclassdef
(
866 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
870 for n
in n_propdefs
do
871 assert n
isa APropdef
877 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
879 for i
in [0.._n_propdefs
.length
[ do
880 if _n_propdefs
[i
] == old_child
then
881 if new_child
!= null then
882 assert new_child
isa APropdef
883 _n_propdefs
[i
] = new_child
884 new_child
.parent
= self
886 _n_propdefs
.remove_at
(i
)
893 redef fun visit_all
(v
: Visitor)
895 for n
in _n_propdefs
do
900 redef fun visit_all_reverse
(v
: Visitor)
903 var i
= _n_propdefs
.length
905 v
.enter_visit
(_n_propdefs
[i
])
911 redef class AConcreteClasskind
912 redef fun n_kwclass
=(n
)
918 private init empty_init
do end
920 init init_aconcreteclasskind
(
921 n_kwclass
: nullable TKwclass
925 _n_kwclass
= n_kwclass
.as(not null)
926 n_kwclass
.parent
= self
929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
931 if _n_kwclass
== old_child
then
932 if new_child
!= null then
933 new_child
.parent
= self
934 assert new_child
isa TKwclass
935 _n_kwclass
= new_child
943 redef fun visit_all
(v
: Visitor)
945 v
.enter_visit
(_n_kwclass
)
948 redef fun visit_all_reverse
(v
: Visitor)
950 v
.enter_visit
(_n_kwclass
)
953 redef class AAbstractClasskind
954 redef fun n_kwabstract
=(n
)
959 redef fun n_kwclass
=(n
)
965 private init empty_init
do end
967 init init_aabstractclasskind
(
968 n_kwabstract
: nullable TKwabstract,
969 n_kwclass
: nullable TKwclass
973 _n_kwabstract
= n_kwabstract
.as(not null)
974 n_kwabstract
.parent
= self
975 _n_kwclass
= n_kwclass
.as(not null)
976 n_kwclass
.parent
= self
979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
981 if _n_kwabstract
== old_child
then
982 if new_child
!= null then
983 new_child
.parent
= self
984 assert new_child
isa TKwabstract
985 _n_kwabstract
= new_child
991 if _n_kwclass
== old_child
then
992 if new_child
!= null then
993 new_child
.parent
= self
994 assert new_child
isa TKwclass
995 _n_kwclass
= new_child
1003 redef fun visit_all
(v
: Visitor)
1005 v
.enter_visit
(_n_kwabstract
)
1006 v
.enter_visit
(_n_kwclass
)
1009 redef fun visit_all_reverse
(v
: Visitor)
1011 v
.enter_visit
(_n_kwabstract
)
1012 v
.enter_visit
(_n_kwclass
)
1015 redef class AInterfaceClasskind
1016 redef fun n_kwinterface
=(n
)
1022 private init empty_init
do end
1024 init init_ainterfaceclasskind
(
1025 n_kwinterface
: nullable TKwinterface
1029 _n_kwinterface
= n_kwinterface
.as(not null)
1030 n_kwinterface
.parent
= self
1033 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1035 if _n_kwinterface
== old_child
then
1036 if new_child
!= null then
1037 new_child
.parent
= self
1038 assert new_child
isa TKwinterface
1039 _n_kwinterface
= new_child
1047 redef fun visit_all
(v
: Visitor)
1049 v
.enter_visit
(_n_kwinterface
)
1052 redef fun visit_all_reverse
(v
: Visitor)
1054 v
.enter_visit
(_n_kwinterface
)
1057 redef class AUniversalClasskind
1058 redef fun n_kwuniversal
=(n
)
1064 private init empty_init
do end
1066 init init_auniversalclasskind
(
1067 n_kwuniversal
: nullable TKwuniversal
1071 _n_kwuniversal
= n_kwuniversal
.as(not null)
1072 n_kwuniversal
.parent
= self
1075 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1077 if _n_kwuniversal
== old_child
then
1078 if new_child
!= null then
1079 new_child
.parent
= self
1080 assert new_child
isa TKwuniversal
1081 _n_kwuniversal
= new_child
1089 redef fun visit_all
(v
: Visitor)
1091 v
.enter_visit
(_n_kwuniversal
)
1094 redef fun visit_all_reverse
(v
: Visitor)
1096 v
.enter_visit
(_n_kwuniversal
)
1099 redef class AFormaldef
1105 redef fun n_type
=(n
)
1113 private init empty_init
do end
1115 init init_aformaldef
(
1116 n_id
: nullable TClassid,
1117 n_type
: nullable AType
1121 _n_id
= n_id
.as(not null)
1124 if n_type
!= null then
1125 n_type
.parent
= self
1129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1131 if _n_id
== old_child
then
1132 if new_child
!= null then
1133 new_child
.parent
= self
1134 assert new_child
isa TClassid
1141 if _n_type
== old_child
then
1142 if new_child
!= null then
1143 new_child
.parent
= self
1144 assert new_child
isa AType
1153 redef fun visit_all
(v
: Visitor)
1155 v
.enter_visit
(_n_id
)
1156 if _n_type
!= null then
1157 v
.enter_visit
(_n_type
.as(not null))
1161 redef fun visit_all_reverse
(v
: Visitor)
1163 v
.enter_visit
(_n_id
)
1164 if _n_type
!= null then
1165 v
.enter_visit
(_n_type
.as(not null))
1169 redef class ASuperclass
1170 redef fun n_kwspecial
=(n
)
1175 redef fun n_type
=(n
)
1181 private init empty_init
do end
1183 init init_asuperclass
(
1184 n_kwspecial
: nullable TKwspecial,
1185 n_type
: nullable AType
1189 _n_kwspecial
= n_kwspecial
.as(not null)
1190 n_kwspecial
.parent
= self
1191 _n_type
= n_type
.as(not null)
1192 n_type
.parent
= self
1195 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1197 if _n_kwspecial
== old_child
then
1198 if new_child
!= null then
1199 new_child
.parent
= self
1200 assert new_child
isa TKwspecial
1201 _n_kwspecial
= new_child
1207 if _n_type
== old_child
then
1208 if new_child
!= null then
1209 new_child
.parent
= self
1210 assert new_child
isa AType
1219 redef fun visit_all
(v
: Visitor)
1221 v
.enter_visit
(_n_kwspecial
)
1222 v
.enter_visit
(_n_type
)
1225 redef fun visit_all_reverse
(v
: Visitor)
1227 v
.enter_visit
(_n_kwspecial
)
1228 v
.enter_visit
(_n_type
)
1231 redef class AAttrPropdef
1239 redef fun n_readable
=(n
)
1246 redef fun n_writable
=(n
)
1253 redef fun n_kwredef
=(n
)
1260 redef fun n_visibility
=(n
)
1265 redef fun n_kwvar
=(n
)
1275 redef fun n_type
=(n
)
1282 redef fun n_expr
=(n
)
1290 private init empty_init
do end
1292 init init_aattrpropdef
(
1293 n_doc
: nullable ADoc,
1294 n_readable
: nullable AAble,
1295 n_writable
: nullable AAble,
1296 n_kwredef
: nullable TKwredef,
1297 n_visibility
: nullable AVisibility,
1298 n_kwvar
: nullable TKwvar,
1299 n_id
: nullable TAttrid,
1300 n_type
: nullable AType,
1301 n_expr
: nullable AExpr
1306 if n_doc
!= null then
1309 _n_readable
= n_readable
1310 if n_readable
!= null then
1311 n_readable
.parent
= self
1313 _n_writable
= n_writable
1314 if n_writable
!= null then
1315 n_writable
.parent
= self
1317 _n_kwredef
= n_kwredef
1318 if n_kwredef
!= null then
1319 n_kwredef
.parent
= self
1321 _n_visibility
= n_visibility
.as(not null)
1322 n_visibility
.parent
= self
1323 _n_kwvar
= n_kwvar
.as(not null)
1324 n_kwvar
.parent
= self
1325 _n_id
= n_id
.as(not null)
1328 if n_type
!= null then
1329 n_type
.parent
= self
1332 if n_expr
!= null then
1333 n_expr
.parent
= self
1337 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1339 if _n_doc
== old_child
then
1340 if new_child
!= null then
1341 new_child
.parent
= self
1342 assert new_child
isa ADoc
1349 if _n_readable
== old_child
then
1350 if new_child
!= null then
1351 new_child
.parent
= self
1352 assert new_child
isa AAble
1353 _n_readable
= new_child
1359 if _n_writable
== old_child
then
1360 if new_child
!= null then
1361 new_child
.parent
= self
1362 assert new_child
isa AAble
1363 _n_writable
= new_child
1369 if _n_kwredef
== old_child
then
1370 if new_child
!= null then
1371 new_child
.parent
= self
1372 assert new_child
isa TKwredef
1373 _n_kwredef
= new_child
1379 if _n_visibility
== old_child
then
1380 if new_child
!= null then
1381 new_child
.parent
= self
1382 assert new_child
isa AVisibility
1383 _n_visibility
= new_child
1389 if _n_kwvar
== old_child
then
1390 if new_child
!= null then
1391 new_child
.parent
= self
1392 assert new_child
isa TKwvar
1393 _n_kwvar
= new_child
1399 if _n_id
== old_child
then
1400 if new_child
!= null then
1401 new_child
.parent
= self
1402 assert new_child
isa TAttrid
1409 if _n_type
== old_child
then
1410 if new_child
!= null then
1411 new_child
.parent
= self
1412 assert new_child
isa AType
1419 if _n_expr
== old_child
then
1420 if new_child
!= null then
1421 new_child
.parent
= self
1422 assert new_child
isa AExpr
1431 redef fun visit_all
(v
: Visitor)
1433 if _n_doc
!= null then
1434 v
.enter_visit
(_n_doc
.as(not null))
1436 if _n_readable
!= null then
1437 v
.enter_visit
(_n_readable
.as(not null))
1439 if _n_writable
!= null then
1440 v
.enter_visit
(_n_writable
.as(not null))
1442 if _n_kwredef
!= null then
1443 v
.enter_visit
(_n_kwredef
.as(not null))
1445 v
.enter_visit
(_n_visibility
)
1446 v
.enter_visit
(_n_kwvar
)
1447 v
.enter_visit
(_n_id
)
1448 if _n_type
!= null then
1449 v
.enter_visit
(_n_type
.as(not null))
1451 if _n_expr
!= null then
1452 v
.enter_visit
(_n_expr
.as(not null))
1456 redef fun visit_all_reverse
(v
: Visitor)
1458 if _n_doc
!= null then
1459 v
.enter_visit
(_n_doc
.as(not null))
1461 if _n_readable
!= null then
1462 v
.enter_visit
(_n_readable
.as(not null))
1464 if _n_writable
!= null then
1465 v
.enter_visit
(_n_writable
.as(not null))
1467 if _n_kwredef
!= null then
1468 v
.enter_visit
(_n_kwredef
.as(not null))
1470 v
.enter_visit
(_n_visibility
)
1471 v
.enter_visit
(_n_kwvar
)
1472 v
.enter_visit
(_n_id
)
1473 if _n_type
!= null then
1474 v
.enter_visit
(_n_type
.as(not null))
1476 if _n_expr
!= null then
1477 v
.enter_visit
(_n_expr
.as(not null))
1481 redef class AMethPropdef
1489 redef fun n_kwredef
=(n
)
1496 redef fun n_visibility
=(n
)
1501 redef fun n_methid
=(n
)
1506 redef fun n_signature
=(n
)
1512 private init empty_init
do end
1514 init init_amethpropdef
(
1515 n_doc
: nullable ADoc,
1516 n_kwredef
: nullable TKwredef,
1517 n_visibility
: nullable AVisibility,
1518 n_methid
: nullable AMethid,
1519 n_signature
: nullable ASignature
1524 if n_doc
!= null then
1527 _n_kwredef
= n_kwredef
1528 if n_kwredef
!= null then
1529 n_kwredef
.parent
= self
1531 _n_visibility
= n_visibility
.as(not null)
1532 n_visibility
.parent
= self
1533 _n_methid
= n_methid
.as(not null)
1534 n_methid
.parent
= self
1535 _n_signature
= n_signature
.as(not null)
1536 n_signature
.parent
= self
1539 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1541 if _n_doc
== old_child
then
1542 if new_child
!= null then
1543 new_child
.parent
= self
1544 assert new_child
isa ADoc
1551 if _n_kwredef
== old_child
then
1552 if new_child
!= null then
1553 new_child
.parent
= self
1554 assert new_child
isa TKwredef
1555 _n_kwredef
= new_child
1561 if _n_visibility
== old_child
then
1562 if new_child
!= null then
1563 new_child
.parent
= self
1564 assert new_child
isa AVisibility
1565 _n_visibility
= new_child
1571 if _n_methid
== old_child
then
1572 if new_child
!= null then
1573 new_child
.parent
= self
1574 assert new_child
isa AMethid
1575 _n_methid
= new_child
1581 if _n_signature
== old_child
then
1582 if new_child
!= null then
1583 new_child
.parent
= self
1584 assert new_child
isa ASignature
1585 _n_signature
= new_child
1593 redef fun visit_all
(v
: Visitor)
1595 if _n_doc
!= null then
1596 v
.enter_visit
(_n_doc
.as(not null))
1598 if _n_kwredef
!= null then
1599 v
.enter_visit
(_n_kwredef
.as(not null))
1601 v
.enter_visit
(_n_visibility
)
1602 v
.enter_visit
(_n_methid
)
1603 v
.enter_visit
(_n_signature
)
1606 redef fun visit_all_reverse
(v
: Visitor)
1608 if _n_doc
!= null then
1609 v
.enter_visit
(_n_doc
.as(not null))
1611 if _n_kwredef
!= null then
1612 v
.enter_visit
(_n_kwredef
.as(not null))
1614 v
.enter_visit
(_n_visibility
)
1615 v
.enter_visit
(_n_methid
)
1616 v
.enter_visit
(_n_signature
)
1619 redef class ADeferredMethPropdef
1627 redef fun n_kwredef
=(n
)
1634 redef fun n_visibility
=(n
)
1639 redef fun n_kwmeth
=(n
)
1644 redef fun n_methid
=(n
)
1649 redef fun n_signature
=(n
)
1655 private init empty_init
do end
1657 init init_adeferredmethpropdef
(
1658 n_doc
: nullable ADoc,
1659 n_kwredef
: nullable TKwredef,
1660 n_visibility
: nullable AVisibility,
1661 n_kwmeth
: nullable TKwmeth,
1662 n_methid
: nullable AMethid,
1663 n_signature
: nullable ASignature
1668 if n_doc
!= null then
1671 _n_kwredef
= n_kwredef
1672 if n_kwredef
!= null then
1673 n_kwredef
.parent
= self
1675 _n_visibility
= n_visibility
.as(not null)
1676 n_visibility
.parent
= self
1677 _n_kwmeth
= n_kwmeth
.as(not null)
1678 n_kwmeth
.parent
= self
1679 _n_methid
= n_methid
.as(not null)
1680 n_methid
.parent
= self
1681 _n_signature
= n_signature
.as(not null)
1682 n_signature
.parent
= self
1685 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1687 if _n_doc
== old_child
then
1688 if new_child
!= null then
1689 new_child
.parent
= self
1690 assert new_child
isa ADoc
1697 if _n_kwredef
== old_child
then
1698 if new_child
!= null then
1699 new_child
.parent
= self
1700 assert new_child
isa TKwredef
1701 _n_kwredef
= new_child
1707 if _n_visibility
== old_child
then
1708 if new_child
!= null then
1709 new_child
.parent
= self
1710 assert new_child
isa AVisibility
1711 _n_visibility
= new_child
1717 if _n_kwmeth
== old_child
then
1718 if new_child
!= null then
1719 new_child
.parent
= self
1720 assert new_child
isa TKwmeth
1721 _n_kwmeth
= new_child
1727 if _n_methid
== old_child
then
1728 if new_child
!= null then
1729 new_child
.parent
= self
1730 assert new_child
isa AMethid
1731 _n_methid
= new_child
1737 if _n_signature
== old_child
then
1738 if new_child
!= null then
1739 new_child
.parent
= self
1740 assert new_child
isa ASignature
1741 _n_signature
= new_child
1749 redef fun visit_all
(v
: Visitor)
1751 if _n_doc
!= null then
1752 v
.enter_visit
(_n_doc
.as(not null))
1754 if _n_kwredef
!= null then
1755 v
.enter_visit
(_n_kwredef
.as(not null))
1757 v
.enter_visit
(_n_visibility
)
1758 v
.enter_visit
(_n_kwmeth
)
1759 v
.enter_visit
(_n_methid
)
1760 v
.enter_visit
(_n_signature
)
1763 redef fun visit_all_reverse
(v
: Visitor)
1765 if _n_doc
!= null then
1766 v
.enter_visit
(_n_doc
.as(not null))
1768 if _n_kwredef
!= null then
1769 v
.enter_visit
(_n_kwredef
.as(not null))
1771 v
.enter_visit
(_n_visibility
)
1772 v
.enter_visit
(_n_kwmeth
)
1773 v
.enter_visit
(_n_methid
)
1774 v
.enter_visit
(_n_signature
)
1777 redef class AInternMethPropdef
1785 redef fun n_kwredef
=(n
)
1792 redef fun n_visibility
=(n
)
1797 redef fun n_kwmeth
=(n
)
1802 redef fun n_methid
=(n
)
1807 redef fun n_signature
=(n
)
1813 private init empty_init
do end
1815 init init_ainternmethpropdef
(
1816 n_doc
: nullable ADoc,
1817 n_kwredef
: nullable TKwredef,
1818 n_visibility
: nullable AVisibility,
1819 n_kwmeth
: nullable TKwmeth,
1820 n_methid
: nullable AMethid,
1821 n_signature
: nullable ASignature
1826 if n_doc
!= null then
1829 _n_kwredef
= n_kwredef
1830 if n_kwredef
!= null then
1831 n_kwredef
.parent
= self
1833 _n_visibility
= n_visibility
.as(not null)
1834 n_visibility
.parent
= self
1835 _n_kwmeth
= n_kwmeth
.as(not null)
1836 n_kwmeth
.parent
= self
1837 _n_methid
= n_methid
.as(not null)
1838 n_methid
.parent
= self
1839 _n_signature
= n_signature
.as(not null)
1840 n_signature
.parent
= self
1843 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1845 if _n_doc
== old_child
then
1846 if new_child
!= null then
1847 new_child
.parent
= self
1848 assert new_child
isa ADoc
1855 if _n_kwredef
== old_child
then
1856 if new_child
!= null then
1857 new_child
.parent
= self
1858 assert new_child
isa TKwredef
1859 _n_kwredef
= new_child
1865 if _n_visibility
== old_child
then
1866 if new_child
!= null then
1867 new_child
.parent
= self
1868 assert new_child
isa AVisibility
1869 _n_visibility
= new_child
1875 if _n_kwmeth
== old_child
then
1876 if new_child
!= null then
1877 new_child
.parent
= self
1878 assert new_child
isa TKwmeth
1879 _n_kwmeth
= new_child
1885 if _n_methid
== old_child
then
1886 if new_child
!= null then
1887 new_child
.parent
= self
1888 assert new_child
isa AMethid
1889 _n_methid
= new_child
1895 if _n_signature
== old_child
then
1896 if new_child
!= null then
1897 new_child
.parent
= self
1898 assert new_child
isa ASignature
1899 _n_signature
= new_child
1907 redef fun visit_all
(v
: Visitor)
1909 if _n_doc
!= null then
1910 v
.enter_visit
(_n_doc
.as(not null))
1912 if _n_kwredef
!= null then
1913 v
.enter_visit
(_n_kwredef
.as(not null))
1915 v
.enter_visit
(_n_visibility
)
1916 v
.enter_visit
(_n_kwmeth
)
1917 v
.enter_visit
(_n_methid
)
1918 v
.enter_visit
(_n_signature
)
1921 redef fun visit_all_reverse
(v
: Visitor)
1923 if _n_doc
!= null then
1924 v
.enter_visit
(_n_doc
.as(not null))
1926 if _n_kwredef
!= null then
1927 v
.enter_visit
(_n_kwredef
.as(not null))
1929 v
.enter_visit
(_n_visibility
)
1930 v
.enter_visit
(_n_kwmeth
)
1931 v
.enter_visit
(_n_methid
)
1932 v
.enter_visit
(_n_signature
)
1935 redef class AExternMethPropdef
1943 redef fun n_kwredef
=(n
)
1950 redef fun n_visibility
=(n
)
1955 redef fun n_kwmeth
=(n
)
1960 redef fun n_methid
=(n
)
1965 redef fun n_signature
=(n
)
1970 redef fun n_extern
=(n
)
1978 private init empty_init
do end
1980 init init_aexternmethpropdef
(
1981 n_doc
: nullable ADoc,
1982 n_kwredef
: nullable TKwredef,
1983 n_visibility
: nullable AVisibility,
1984 n_kwmeth
: nullable TKwmeth,
1985 n_methid
: nullable AMethid,
1986 n_signature
: nullable ASignature,
1987 n_extern
: nullable TString
1992 if n_doc
!= null then
1995 _n_kwredef
= n_kwredef
1996 if n_kwredef
!= null then
1997 n_kwredef
.parent
= self
1999 _n_visibility
= n_visibility
.as(not null)
2000 n_visibility
.parent
= self
2001 _n_kwmeth
= n_kwmeth
.as(not null)
2002 n_kwmeth
.parent
= self
2003 _n_methid
= n_methid
.as(not null)
2004 n_methid
.parent
= self
2005 _n_signature
= n_signature
.as(not null)
2006 n_signature
.parent
= self
2007 _n_extern
= n_extern
2008 if n_extern
!= null then
2009 n_extern
.parent
= self
2013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2015 if _n_doc
== old_child
then
2016 if new_child
!= null then
2017 new_child
.parent
= self
2018 assert new_child
isa ADoc
2025 if _n_kwredef
== old_child
then
2026 if new_child
!= null then
2027 new_child
.parent
= self
2028 assert new_child
isa TKwredef
2029 _n_kwredef
= new_child
2035 if _n_visibility
== old_child
then
2036 if new_child
!= null then
2037 new_child
.parent
= self
2038 assert new_child
isa AVisibility
2039 _n_visibility
= new_child
2045 if _n_kwmeth
== old_child
then
2046 if new_child
!= null then
2047 new_child
.parent
= self
2048 assert new_child
isa TKwmeth
2049 _n_kwmeth
= new_child
2055 if _n_methid
== old_child
then
2056 if new_child
!= null then
2057 new_child
.parent
= self
2058 assert new_child
isa AMethid
2059 _n_methid
= new_child
2065 if _n_signature
== old_child
then
2066 if new_child
!= null then
2067 new_child
.parent
= self
2068 assert new_child
isa ASignature
2069 _n_signature
= new_child
2075 if _n_extern
== old_child
then
2076 if new_child
!= null then
2077 new_child
.parent
= self
2078 assert new_child
isa TString
2079 _n_extern
= new_child
2087 redef fun visit_all
(v
: Visitor)
2089 if _n_doc
!= null then
2090 v
.enter_visit
(_n_doc
.as(not null))
2092 if _n_kwredef
!= null then
2093 v
.enter_visit
(_n_kwredef
.as(not null))
2095 v
.enter_visit
(_n_visibility
)
2096 v
.enter_visit
(_n_kwmeth
)
2097 v
.enter_visit
(_n_methid
)
2098 v
.enter_visit
(_n_signature
)
2099 if _n_extern
!= null then
2100 v
.enter_visit
(_n_extern
.as(not null))
2104 redef fun visit_all_reverse
(v
: Visitor)
2106 if _n_doc
!= null then
2107 v
.enter_visit
(_n_doc
.as(not null))
2109 if _n_kwredef
!= null then
2110 v
.enter_visit
(_n_kwredef
.as(not null))
2112 v
.enter_visit
(_n_visibility
)
2113 v
.enter_visit
(_n_kwmeth
)
2114 v
.enter_visit
(_n_methid
)
2115 v
.enter_visit
(_n_signature
)
2116 if _n_extern
!= null then
2117 v
.enter_visit
(_n_extern
.as(not null))
2121 redef class AConcreteMethPropdef
2129 redef fun n_kwredef
=(n
)
2136 redef fun n_visibility
=(n
)
2141 redef fun n_kwmeth
=(n
)
2146 redef fun n_methid
=(n
)
2151 redef fun n_signature
=(n
)
2156 redef fun n_block
=(n
)
2164 private init empty_init
do end
2166 init init_aconcretemethpropdef
(
2167 n_doc
: nullable ADoc,
2168 n_kwredef
: nullable TKwredef,
2169 n_visibility
: nullable AVisibility,
2170 n_kwmeth
: nullable TKwmeth,
2171 n_methid
: nullable AMethid,
2172 n_signature
: nullable ASignature,
2173 n_block
: nullable AExpr
2178 if n_doc
!= null then
2181 _n_kwredef
= n_kwredef
2182 if n_kwredef
!= null then
2183 n_kwredef
.parent
= self
2185 _n_visibility
= n_visibility
.as(not null)
2186 n_visibility
.parent
= self
2187 _n_kwmeth
= n_kwmeth
.as(not null)
2188 n_kwmeth
.parent
= self
2189 _n_methid
= n_methid
.as(not null)
2190 n_methid
.parent
= self
2191 _n_signature
= n_signature
.as(not null)
2192 n_signature
.parent
= self
2194 if n_block
!= null then
2195 n_block
.parent
= self
2199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2201 if _n_doc
== old_child
then
2202 if new_child
!= null then
2203 new_child
.parent
= self
2204 assert new_child
isa ADoc
2211 if _n_kwredef
== old_child
then
2212 if new_child
!= null then
2213 new_child
.parent
= self
2214 assert new_child
isa TKwredef
2215 _n_kwredef
= new_child
2221 if _n_visibility
== old_child
then
2222 if new_child
!= null then
2223 new_child
.parent
= self
2224 assert new_child
isa AVisibility
2225 _n_visibility
= new_child
2231 if _n_kwmeth
== old_child
then
2232 if new_child
!= null then
2233 new_child
.parent
= self
2234 assert new_child
isa TKwmeth
2235 _n_kwmeth
= new_child
2241 if _n_methid
== old_child
then
2242 if new_child
!= null then
2243 new_child
.parent
= self
2244 assert new_child
isa AMethid
2245 _n_methid
= new_child
2251 if _n_signature
== old_child
then
2252 if new_child
!= null then
2253 new_child
.parent
= self
2254 assert new_child
isa ASignature
2255 _n_signature
= new_child
2261 if _n_block
== old_child
then
2262 if new_child
!= null then
2263 new_child
.parent
= self
2264 assert new_child
isa AExpr
2265 _n_block
= new_child
2273 redef fun visit_all
(v
: Visitor)
2275 if _n_doc
!= null then
2276 v
.enter_visit
(_n_doc
.as(not null))
2278 if _n_kwredef
!= null then
2279 v
.enter_visit
(_n_kwredef
.as(not null))
2281 v
.enter_visit
(_n_visibility
)
2282 v
.enter_visit
(_n_kwmeth
)
2283 v
.enter_visit
(_n_methid
)
2284 v
.enter_visit
(_n_signature
)
2285 if _n_block
!= null then
2286 v
.enter_visit
(_n_block
.as(not null))
2290 redef fun visit_all_reverse
(v
: Visitor)
2292 if _n_doc
!= null then
2293 v
.enter_visit
(_n_doc
.as(not null))
2295 if _n_kwredef
!= null then
2296 v
.enter_visit
(_n_kwredef
.as(not null))
2298 v
.enter_visit
(_n_visibility
)
2299 v
.enter_visit
(_n_kwmeth
)
2300 v
.enter_visit
(_n_methid
)
2301 v
.enter_visit
(_n_signature
)
2302 if _n_block
!= null then
2303 v
.enter_visit
(_n_block
.as(not null))
2307 redef class AConcreteInitPropdef
2315 redef fun n_kwredef
=(n
)
2322 redef fun n_visibility
=(n
)
2327 redef fun n_kwinit
=(n
)
2332 redef fun n_methid
=(n
)
2339 redef fun n_signature
=(n
)
2344 redef fun n_block
=(n
)
2352 private init empty_init
do end
2354 init init_aconcreteinitpropdef
(
2355 n_doc
: nullable ADoc,
2356 n_kwredef
: nullable TKwredef,
2357 n_visibility
: nullable AVisibility,
2358 n_kwinit
: nullable TKwinit,
2359 n_methid
: nullable AMethid,
2360 n_signature
: nullable ASignature,
2361 n_block
: nullable AExpr
2366 if n_doc
!= null then
2369 _n_kwredef
= n_kwredef
2370 if n_kwredef
!= null then
2371 n_kwredef
.parent
= self
2373 _n_visibility
= n_visibility
.as(not null)
2374 n_visibility
.parent
= self
2375 _n_kwinit
= n_kwinit
.as(not null)
2376 n_kwinit
.parent
= self
2377 _n_methid
= n_methid
2378 if n_methid
!= null then
2379 n_methid
.parent
= self
2381 _n_signature
= n_signature
.as(not null)
2382 n_signature
.parent
= self
2384 if n_block
!= null then
2385 n_block
.parent
= self
2389 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2391 if _n_doc
== old_child
then
2392 if new_child
!= null then
2393 new_child
.parent
= self
2394 assert new_child
isa ADoc
2401 if _n_kwredef
== old_child
then
2402 if new_child
!= null then
2403 new_child
.parent
= self
2404 assert new_child
isa TKwredef
2405 _n_kwredef
= new_child
2411 if _n_visibility
== old_child
then
2412 if new_child
!= null then
2413 new_child
.parent
= self
2414 assert new_child
isa AVisibility
2415 _n_visibility
= new_child
2421 if _n_kwinit
== old_child
then
2422 if new_child
!= null then
2423 new_child
.parent
= self
2424 assert new_child
isa TKwinit
2425 _n_kwinit
= new_child
2431 if _n_methid
== old_child
then
2432 if new_child
!= null then
2433 new_child
.parent
= self
2434 assert new_child
isa AMethid
2435 _n_methid
= new_child
2441 if _n_signature
== old_child
then
2442 if new_child
!= null then
2443 new_child
.parent
= self
2444 assert new_child
isa ASignature
2445 _n_signature
= new_child
2451 if _n_block
== old_child
then
2452 if new_child
!= null then
2453 new_child
.parent
= self
2454 assert new_child
isa AExpr
2455 _n_block
= new_child
2463 redef fun visit_all
(v
: Visitor)
2465 if _n_doc
!= null then
2466 v
.enter_visit
(_n_doc
.as(not null))
2468 if _n_kwredef
!= null then
2469 v
.enter_visit
(_n_kwredef
.as(not null))
2471 v
.enter_visit
(_n_visibility
)
2472 v
.enter_visit
(_n_kwinit
)
2473 if _n_methid
!= null then
2474 v
.enter_visit
(_n_methid
.as(not null))
2476 v
.enter_visit
(_n_signature
)
2477 if _n_block
!= null then
2478 v
.enter_visit
(_n_block
.as(not null))
2482 redef fun visit_all_reverse
(v
: Visitor)
2484 if _n_doc
!= null then
2485 v
.enter_visit
(_n_doc
.as(not null))
2487 if _n_kwredef
!= null then
2488 v
.enter_visit
(_n_kwredef
.as(not null))
2490 v
.enter_visit
(_n_visibility
)
2491 v
.enter_visit
(_n_kwinit
)
2492 if _n_methid
!= null then
2493 v
.enter_visit
(_n_methid
.as(not null))
2495 v
.enter_visit
(_n_signature
)
2496 if _n_block
!= null then
2497 v
.enter_visit
(_n_block
.as(not null))
2501 redef class AMainMethPropdef
2502 redef fun n_kwredef
=(n
)
2509 redef fun n_block
=(n
)
2517 private init empty_init
do end
2519 init init_amainmethpropdef
(
2520 n_kwredef
: nullable TKwredef,
2521 n_block
: nullable AExpr
2525 _n_kwredef
= n_kwredef
2526 if n_kwredef
!= null then
2527 n_kwredef
.parent
= self
2530 if n_block
!= null then
2531 n_block
.parent
= self
2535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2537 if _n_kwredef
== old_child
then
2538 if new_child
!= null then
2539 new_child
.parent
= self
2540 assert new_child
isa TKwredef
2541 _n_kwredef
= new_child
2547 if _n_block
== old_child
then
2548 if new_child
!= null then
2549 new_child
.parent
= self
2550 assert new_child
isa AExpr
2551 _n_block
= new_child
2559 redef fun visit_all
(v
: Visitor)
2561 if _n_kwredef
!= null then
2562 v
.enter_visit
(_n_kwredef
.as(not null))
2564 if _n_block
!= null then
2565 v
.enter_visit
(_n_block
.as(not null))
2569 redef fun visit_all_reverse
(v
: Visitor)
2571 if _n_kwredef
!= null then
2572 v
.enter_visit
(_n_kwredef
.as(not null))
2574 if _n_block
!= null then
2575 v
.enter_visit
(_n_block
.as(not null))
2579 redef class ATypePropdef
2587 redef fun n_kwredef
=(n
)
2594 redef fun n_visibility
=(n
)
2599 redef fun n_kwtype
=(n
)
2609 redef fun n_type
=(n
)
2615 private init empty_init
do end
2617 init init_atypepropdef
(
2618 n_doc
: nullable ADoc,
2619 n_kwredef
: nullable TKwredef,
2620 n_visibility
: nullable AVisibility,
2621 n_kwtype
: nullable TKwtype,
2622 n_id
: nullable TClassid,
2623 n_type
: nullable AType
2628 if n_doc
!= null then
2631 _n_kwredef
= n_kwredef
2632 if n_kwredef
!= null then
2633 n_kwredef
.parent
= self
2635 _n_visibility
= n_visibility
.as(not null)
2636 n_visibility
.parent
= self
2637 _n_kwtype
= n_kwtype
.as(not null)
2638 n_kwtype
.parent
= self
2639 _n_id
= n_id
.as(not null)
2641 _n_type
= n_type
.as(not null)
2642 n_type
.parent
= self
2645 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2647 if _n_doc
== old_child
then
2648 if new_child
!= null then
2649 new_child
.parent
= self
2650 assert new_child
isa ADoc
2657 if _n_kwredef
== old_child
then
2658 if new_child
!= null then
2659 new_child
.parent
= self
2660 assert new_child
isa TKwredef
2661 _n_kwredef
= new_child
2667 if _n_visibility
== old_child
then
2668 if new_child
!= null then
2669 new_child
.parent
= self
2670 assert new_child
isa AVisibility
2671 _n_visibility
= new_child
2677 if _n_kwtype
== old_child
then
2678 if new_child
!= null then
2679 new_child
.parent
= self
2680 assert new_child
isa TKwtype
2681 _n_kwtype
= new_child
2687 if _n_id
== old_child
then
2688 if new_child
!= null then
2689 new_child
.parent
= self
2690 assert new_child
isa TClassid
2697 if _n_type
== old_child
then
2698 if new_child
!= null then
2699 new_child
.parent
= self
2700 assert new_child
isa AType
2709 redef fun visit_all
(v
: Visitor)
2711 if _n_doc
!= null then
2712 v
.enter_visit
(_n_doc
.as(not null))
2714 if _n_kwredef
!= null then
2715 v
.enter_visit
(_n_kwredef
.as(not null))
2717 v
.enter_visit
(_n_visibility
)
2718 v
.enter_visit
(_n_kwtype
)
2719 v
.enter_visit
(_n_id
)
2720 v
.enter_visit
(_n_type
)
2723 redef fun visit_all_reverse
(v
: Visitor)
2725 if _n_doc
!= null then
2726 v
.enter_visit
(_n_doc
.as(not null))
2728 if _n_kwredef
!= null then
2729 v
.enter_visit
(_n_kwredef
.as(not null))
2731 v
.enter_visit
(_n_visibility
)
2732 v
.enter_visit
(_n_kwtype
)
2733 v
.enter_visit
(_n_id
)
2734 v
.enter_visit
(_n_type
)
2737 redef class AReadAble
2738 redef fun n_kwredef
=(n
)
2745 redef fun n_kwreadable
=(n
)
2751 private init empty_init
do end
2753 init init_areadable
(
2754 n_kwredef
: nullable TKwredef,
2755 n_kwreadable
: nullable TKwreadable
2759 _n_kwredef
= n_kwredef
2760 if n_kwredef
!= null then
2761 n_kwredef
.parent
= self
2763 _n_kwreadable
= n_kwreadable
.as(not null)
2764 n_kwreadable
.parent
= self
2767 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2769 if _n_kwredef
== old_child
then
2770 if new_child
!= null then
2771 new_child
.parent
= self
2772 assert new_child
isa TKwredef
2773 _n_kwredef
= new_child
2779 if _n_kwreadable
== old_child
then
2780 if new_child
!= null then
2781 new_child
.parent
= self
2782 assert new_child
isa TKwreadable
2783 _n_kwreadable
= new_child
2791 redef fun visit_all
(v
: Visitor)
2793 if _n_kwredef
!= null then
2794 v
.enter_visit
(_n_kwredef
.as(not null))
2796 v
.enter_visit
(_n_kwreadable
)
2799 redef fun visit_all_reverse
(v
: Visitor)
2801 if _n_kwredef
!= null then
2802 v
.enter_visit
(_n_kwredef
.as(not null))
2804 v
.enter_visit
(_n_kwreadable
)
2807 redef class AWriteAble
2808 redef fun n_kwredef
=(n
)
2815 redef fun n_kwwritable
=(n
)
2821 private init empty_init
do end
2823 init init_awriteable
(
2824 n_kwredef
: nullable TKwredef,
2825 n_kwwritable
: nullable TKwwritable
2829 _n_kwredef
= n_kwredef
2830 if n_kwredef
!= null then
2831 n_kwredef
.parent
= self
2833 _n_kwwritable
= n_kwwritable
.as(not null)
2834 n_kwwritable
.parent
= self
2837 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2839 if _n_kwredef
== old_child
then
2840 if new_child
!= null then
2841 new_child
.parent
= self
2842 assert new_child
isa TKwredef
2843 _n_kwredef
= new_child
2849 if _n_kwwritable
== old_child
then
2850 if new_child
!= null then
2851 new_child
.parent
= self
2852 assert new_child
isa TKwwritable
2853 _n_kwwritable
= new_child
2861 redef fun visit_all
(v
: Visitor)
2863 if _n_kwredef
!= null then
2864 v
.enter_visit
(_n_kwredef
.as(not null))
2866 v
.enter_visit
(_n_kwwritable
)
2869 redef fun visit_all_reverse
(v
: Visitor)
2871 if _n_kwredef
!= null then
2872 v
.enter_visit
(_n_kwredef
.as(not null))
2874 v
.enter_visit
(_n_kwwritable
)
2877 redef class AIdMethid
2884 private init empty_init
do end
2886 init init_aidmethid
(
2891 _n_id
= n_id
.as(not null)
2895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2897 if _n_id
== old_child
then
2898 if new_child
!= null then
2899 new_child
.parent
= self
2900 assert new_child
isa TId
2909 redef fun visit_all
(v
: Visitor)
2911 v
.enter_visit
(_n_id
)
2914 redef fun visit_all_reverse
(v
: Visitor)
2916 v
.enter_visit
(_n_id
)
2919 redef class APlusMethid
2920 redef fun n_plus
=(n
)
2926 private init empty_init
do end
2928 init init_aplusmethid
(
2929 n_plus
: nullable TPlus
2933 _n_plus
= n_plus
.as(not null)
2934 n_plus
.parent
= self
2937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2939 if _n_plus
== old_child
then
2940 if new_child
!= null then
2941 new_child
.parent
= self
2942 assert new_child
isa TPlus
2951 redef fun visit_all
(v
: Visitor)
2953 v
.enter_visit
(_n_plus
)
2956 redef fun visit_all_reverse
(v
: Visitor)
2958 v
.enter_visit
(_n_plus
)
2961 redef class AMinusMethid
2962 redef fun n_minus
=(n
)
2968 private init empty_init
do end
2970 init init_aminusmethid
(
2971 n_minus
: nullable TMinus
2975 _n_minus
= n_minus
.as(not null)
2976 n_minus
.parent
= self
2979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2981 if _n_minus
== old_child
then
2982 if new_child
!= null then
2983 new_child
.parent
= self
2984 assert new_child
isa TMinus
2985 _n_minus
= new_child
2993 redef fun visit_all
(v
: Visitor)
2995 v
.enter_visit
(_n_minus
)
2998 redef fun visit_all_reverse
(v
: Visitor)
3000 v
.enter_visit
(_n_minus
)
3003 redef class AStarMethid
3004 redef fun n_star
=(n
)
3010 private init empty_init
do end
3012 init init_astarmethid
(
3013 n_star
: nullable TStar
3017 _n_star
= n_star
.as(not null)
3018 n_star
.parent
= self
3021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3023 if _n_star
== old_child
then
3024 if new_child
!= null then
3025 new_child
.parent
= self
3026 assert new_child
isa TStar
3035 redef fun visit_all
(v
: Visitor)
3037 v
.enter_visit
(_n_star
)
3040 redef fun visit_all_reverse
(v
: Visitor)
3042 v
.enter_visit
(_n_star
)
3045 redef class ASlashMethid
3046 redef fun n_slash
=(n
)
3052 private init empty_init
do end
3054 init init_aslashmethid
(
3055 n_slash
: nullable TSlash
3059 _n_slash
= n_slash
.as(not null)
3060 n_slash
.parent
= self
3063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3065 if _n_slash
== old_child
then
3066 if new_child
!= null then
3067 new_child
.parent
= self
3068 assert new_child
isa TSlash
3069 _n_slash
= new_child
3077 redef fun visit_all
(v
: Visitor)
3079 v
.enter_visit
(_n_slash
)
3082 redef fun visit_all_reverse
(v
: Visitor)
3084 v
.enter_visit
(_n_slash
)
3087 redef class APercentMethid
3088 redef fun n_percent
=(n
)
3094 private init empty_init
do end
3096 init init_apercentmethid
(
3097 n_percent
: nullable TPercent
3101 _n_percent
= n_percent
.as(not null)
3102 n_percent
.parent
= self
3105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3107 if _n_percent
== old_child
then
3108 if new_child
!= null then
3109 new_child
.parent
= self
3110 assert new_child
isa TPercent
3111 _n_percent
= new_child
3119 redef fun visit_all
(v
: Visitor)
3121 v
.enter_visit
(_n_percent
)
3124 redef fun visit_all_reverse
(v
: Visitor)
3126 v
.enter_visit
(_n_percent
)
3129 redef class AEqMethid
3136 private init empty_init
do end
3138 init init_aeqmethid
(
3143 _n_eq
= n_eq
.as(not null)
3147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3149 if _n_eq
== old_child
then
3150 if new_child
!= null then
3151 new_child
.parent
= self
3152 assert new_child
isa TEq
3161 redef fun visit_all
(v
: Visitor)
3163 v
.enter_visit
(_n_eq
)
3166 redef fun visit_all_reverse
(v
: Visitor)
3168 v
.enter_visit
(_n_eq
)
3171 redef class ANeMethid
3178 private init empty_init
do end
3180 init init_anemethid
(
3185 _n_ne
= n_ne
.as(not null)
3189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3191 if _n_ne
== old_child
then
3192 if new_child
!= null then
3193 new_child
.parent
= self
3194 assert new_child
isa TNe
3203 redef fun visit_all
(v
: Visitor)
3205 v
.enter_visit
(_n_ne
)
3208 redef fun visit_all_reverse
(v
: Visitor)
3210 v
.enter_visit
(_n_ne
)
3213 redef class ALeMethid
3220 private init empty_init
do end
3222 init init_alemethid
(
3227 _n_le
= n_le
.as(not null)
3231 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3233 if _n_le
== old_child
then
3234 if new_child
!= null then
3235 new_child
.parent
= self
3236 assert new_child
isa TLe
3245 redef fun visit_all
(v
: Visitor)
3247 v
.enter_visit
(_n_le
)
3250 redef fun visit_all_reverse
(v
: Visitor)
3252 v
.enter_visit
(_n_le
)
3255 redef class AGeMethid
3262 private init empty_init
do end
3264 init init_agemethid
(
3269 _n_ge
= n_ge
.as(not null)
3273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3275 if _n_ge
== old_child
then
3276 if new_child
!= null then
3277 new_child
.parent
= self
3278 assert new_child
isa TGe
3287 redef fun visit_all
(v
: Visitor)
3289 v
.enter_visit
(_n_ge
)
3292 redef fun visit_all_reverse
(v
: Visitor)
3294 v
.enter_visit
(_n_ge
)
3297 redef class ALtMethid
3304 private init empty_init
do end
3306 init init_altmethid
(
3311 _n_lt
= n_lt
.as(not null)
3315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3317 if _n_lt
== old_child
then
3318 if new_child
!= null then
3319 new_child
.parent
= self
3320 assert new_child
isa TLt
3329 redef fun visit_all
(v
: Visitor)
3331 v
.enter_visit
(_n_lt
)
3334 redef fun visit_all_reverse
(v
: Visitor)
3336 v
.enter_visit
(_n_lt
)
3339 redef class AGtMethid
3346 private init empty_init
do end
3348 init init_agtmethid
(
3353 _n_gt
= n_gt
.as(not null)
3357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3359 if _n_gt
== old_child
then
3360 if new_child
!= null then
3361 new_child
.parent
= self
3362 assert new_child
isa TGt
3371 redef fun visit_all
(v
: Visitor)
3373 v
.enter_visit
(_n_gt
)
3376 redef fun visit_all_reverse
(v
: Visitor)
3378 v
.enter_visit
(_n_gt
)
3381 redef class ABraMethid
3382 redef fun n_obra
=(n
)
3387 redef fun n_cbra
=(n
)
3393 private init empty_init
do end
3395 init init_abramethid
(
3396 n_obra
: nullable TObra,
3397 n_cbra
: nullable TCbra
3401 _n_obra
= n_obra
.as(not null)
3402 n_obra
.parent
= self
3403 _n_cbra
= n_cbra
.as(not null)
3404 n_cbra
.parent
= self
3407 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3409 if _n_obra
== old_child
then
3410 if new_child
!= null then
3411 new_child
.parent
= self
3412 assert new_child
isa TObra
3419 if _n_cbra
== old_child
then
3420 if new_child
!= null then
3421 new_child
.parent
= self
3422 assert new_child
isa TCbra
3431 redef fun visit_all
(v
: Visitor)
3433 v
.enter_visit
(_n_obra
)
3434 v
.enter_visit
(_n_cbra
)
3437 redef fun visit_all_reverse
(v
: Visitor)
3439 v
.enter_visit
(_n_obra
)
3440 v
.enter_visit
(_n_cbra
)
3443 redef class AStarshipMethid
3444 redef fun n_starship
=(n
)
3450 private init empty_init
do end
3452 init init_astarshipmethid
(
3453 n_starship
: nullable TStarship
3457 _n_starship
= n_starship
.as(not null)
3458 n_starship
.parent
= self
3461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3463 if _n_starship
== old_child
then
3464 if new_child
!= null then
3465 new_child
.parent
= self
3466 assert new_child
isa TStarship
3467 _n_starship
= new_child
3475 redef fun visit_all
(v
: Visitor)
3477 v
.enter_visit
(_n_starship
)
3480 redef fun visit_all_reverse
(v
: Visitor)
3482 v
.enter_visit
(_n_starship
)
3485 redef class AAssignMethid
3491 redef fun n_assign
=(n
)
3497 private init empty_init
do end
3499 init init_aassignmethid
(
3501 n_assign
: nullable TAssign
3505 _n_id
= n_id
.as(not null)
3507 _n_assign
= n_assign
.as(not null)
3508 n_assign
.parent
= self
3511 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3513 if _n_id
== old_child
then
3514 if new_child
!= null then
3515 new_child
.parent
= self
3516 assert new_child
isa TId
3523 if _n_assign
== old_child
then
3524 if new_child
!= null then
3525 new_child
.parent
= self
3526 assert new_child
isa TAssign
3527 _n_assign
= new_child
3535 redef fun visit_all
(v
: Visitor)
3537 v
.enter_visit
(_n_id
)
3538 v
.enter_visit
(_n_assign
)
3541 redef fun visit_all_reverse
(v
: Visitor)
3543 v
.enter_visit
(_n_id
)
3544 v
.enter_visit
(_n_assign
)
3547 redef class ABraassignMethid
3548 redef fun n_obra
=(n
)
3553 redef fun n_cbra
=(n
)
3558 redef fun n_assign
=(n
)
3564 private init empty_init
do end
3566 init init_abraassignmethid
(
3567 n_obra
: nullable TObra,
3568 n_cbra
: nullable TCbra,
3569 n_assign
: nullable TAssign
3573 _n_obra
= n_obra
.as(not null)
3574 n_obra
.parent
= self
3575 _n_cbra
= n_cbra
.as(not null)
3576 n_cbra
.parent
= self
3577 _n_assign
= n_assign
.as(not null)
3578 n_assign
.parent
= self
3581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3583 if _n_obra
== old_child
then
3584 if new_child
!= null then
3585 new_child
.parent
= self
3586 assert new_child
isa TObra
3593 if _n_cbra
== old_child
then
3594 if new_child
!= null then
3595 new_child
.parent
= self
3596 assert new_child
isa TCbra
3603 if _n_assign
== old_child
then
3604 if new_child
!= null then
3605 new_child
.parent
= self
3606 assert new_child
isa TAssign
3607 _n_assign
= new_child
3615 redef fun visit_all
(v
: Visitor)
3617 v
.enter_visit
(_n_obra
)
3618 v
.enter_visit
(_n_cbra
)
3619 v
.enter_visit
(_n_assign
)
3622 redef fun visit_all_reverse
(v
: Visitor)
3624 v
.enter_visit
(_n_obra
)
3625 v
.enter_visit
(_n_cbra
)
3626 v
.enter_visit
(_n_assign
)
3629 redef class ASignature
3630 redef fun n_type
=(n
)
3638 private init empty_init
do end
3640 init init_asignature
(
3641 n_params
: Collection[Object], # Should be Collection[AParam]
3642 n_type
: nullable AType,
3643 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3647 for n
in n_params
do
3653 if n_type
!= null then
3654 n_type
.parent
= self
3656 for n
in n_closure_decls
do
3657 assert n
isa AClosureDecl
3658 _n_closure_decls
.add
(n
)
3663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3665 for i
in [0.._n_params
.length
[ do
3666 if _n_params
[i
] == old_child
then
3667 if new_child
!= null then
3668 assert new_child
isa AParam
3669 _n_params
[i
] = new_child
3670 new_child
.parent
= self
3672 _n_params
.remove_at
(i
)
3677 if _n_type
== old_child
then
3678 if new_child
!= null then
3679 new_child
.parent
= self
3680 assert new_child
isa AType
3687 for i
in [0.._n_closure_decls
.length
[ do
3688 if _n_closure_decls
[i
] == old_child
then
3689 if new_child
!= null then
3690 assert new_child
isa AClosureDecl
3691 _n_closure_decls
[i
] = new_child
3692 new_child
.parent
= self
3694 _n_closure_decls
.remove_at
(i
)
3701 redef fun visit_all
(v
: Visitor)
3703 for n
in _n_params
do
3706 if _n_type
!= null then
3707 v
.enter_visit
(_n_type
.as(not null))
3709 for n
in _n_closure_decls
do
3714 redef fun visit_all_reverse
(v
: Visitor)
3717 var i
= _n_params
.length
3719 v
.enter_visit
(_n_params
[i
])
3723 if _n_type
!= null then
3724 v
.enter_visit
(_n_type
.as(not null))
3727 var i
= _n_closure_decls
.length
3729 v
.enter_visit
(_n_closure_decls
[i
])
3741 redef fun n_type
=(n
)
3748 redef fun n_dotdotdot
=(n
)
3756 private init empty_init
do end
3760 n_type
: nullable AType,
3761 n_dotdotdot
: nullable TDotdotdot
3765 _n_id
= n_id
.as(not null)
3768 if n_type
!= null then
3769 n_type
.parent
= self
3771 _n_dotdotdot
= n_dotdotdot
3772 if n_dotdotdot
!= null then
3773 n_dotdotdot
.parent
= self
3777 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3779 if _n_id
== old_child
then
3780 if new_child
!= null then
3781 new_child
.parent
= self
3782 assert new_child
isa TId
3789 if _n_type
== old_child
then
3790 if new_child
!= null then
3791 new_child
.parent
= self
3792 assert new_child
isa AType
3799 if _n_dotdotdot
== old_child
then
3800 if new_child
!= null then
3801 new_child
.parent
= self
3802 assert new_child
isa TDotdotdot
3803 _n_dotdotdot
= new_child
3811 redef fun visit_all
(v
: Visitor)
3813 v
.enter_visit
(_n_id
)
3814 if _n_type
!= null then
3815 v
.enter_visit
(_n_type
.as(not null))
3817 if _n_dotdotdot
!= null then
3818 v
.enter_visit
(_n_dotdotdot
.as(not null))
3822 redef fun visit_all_reverse
(v
: Visitor)
3824 v
.enter_visit
(_n_id
)
3825 if _n_type
!= null then
3826 v
.enter_visit
(_n_type
.as(not null))
3828 if _n_dotdotdot
!= null then
3829 v
.enter_visit
(_n_dotdotdot
.as(not null))
3833 redef class AClosureDecl
3834 redef fun n_kwbreak
=(n
)
3841 redef fun n_bang
=(n
)
3851 redef fun n_signature
=(n
)
3856 redef fun n_expr
=(n
)
3864 private init empty_init
do end
3866 init init_aclosuredecl
(
3867 n_kwbreak
: nullable TKwbreak,
3868 n_bang
: nullable TBang,
3870 n_signature
: nullable ASignature,
3871 n_expr
: nullable AExpr
3875 _n_kwbreak
= n_kwbreak
3876 if n_kwbreak
!= null then
3877 n_kwbreak
.parent
= self
3879 _n_bang
= n_bang
.as(not null)
3880 n_bang
.parent
= self
3881 _n_id
= n_id
.as(not null)
3883 _n_signature
= n_signature
.as(not null)
3884 n_signature
.parent
= self
3886 if n_expr
!= null then
3887 n_expr
.parent
= self
3891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3893 if _n_kwbreak
== old_child
then
3894 if new_child
!= null then
3895 new_child
.parent
= self
3896 assert new_child
isa TKwbreak
3897 _n_kwbreak
= new_child
3903 if _n_bang
== old_child
then
3904 if new_child
!= null then
3905 new_child
.parent
= self
3906 assert new_child
isa TBang
3913 if _n_id
== old_child
then
3914 if new_child
!= null then
3915 new_child
.parent
= self
3916 assert new_child
isa TId
3923 if _n_signature
== old_child
then
3924 if new_child
!= null then
3925 new_child
.parent
= self
3926 assert new_child
isa ASignature
3927 _n_signature
= new_child
3933 if _n_expr
== old_child
then
3934 if new_child
!= null then
3935 new_child
.parent
= self
3936 assert new_child
isa AExpr
3945 redef fun visit_all
(v
: Visitor)
3947 if _n_kwbreak
!= null then
3948 v
.enter_visit
(_n_kwbreak
.as(not null))
3950 v
.enter_visit
(_n_bang
)
3951 v
.enter_visit
(_n_id
)
3952 v
.enter_visit
(_n_signature
)
3953 if _n_expr
!= null then
3954 v
.enter_visit
(_n_expr
.as(not null))
3958 redef fun visit_all_reverse
(v
: Visitor)
3960 if _n_kwbreak
!= null then
3961 v
.enter_visit
(_n_kwbreak
.as(not null))
3963 v
.enter_visit
(_n_bang
)
3964 v
.enter_visit
(_n_id
)
3965 v
.enter_visit
(_n_signature
)
3966 if _n_expr
!= null then
3967 v
.enter_visit
(_n_expr
.as(not null))
3972 redef fun n_kwnullable
=(n
)
3985 private init empty_init
do end
3988 n_kwnullable
: nullable TKwnullable,
3989 n_id
: nullable TClassid,
3990 n_types
: Collection[Object] # Should be Collection[AType]
3994 _n_kwnullable
= n_kwnullable
3995 if n_kwnullable
!= null then
3996 n_kwnullable
.parent
= self
3998 _n_id
= n_id
.as(not null)
4007 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4009 if _n_kwnullable
== old_child
then
4010 if new_child
!= null then
4011 new_child
.parent
= self
4012 assert new_child
isa TKwnullable
4013 _n_kwnullable
= new_child
4015 _n_kwnullable
= null
4019 if _n_id
== old_child
then
4020 if new_child
!= null then
4021 new_child
.parent
= self
4022 assert new_child
isa TClassid
4029 for i
in [0.._n_types
.length
[ do
4030 if _n_types
[i
] == old_child
then
4031 if new_child
!= null then
4032 assert new_child
isa AType
4033 _n_types
[i
] = new_child
4034 new_child
.parent
= self
4036 _n_types
.remove_at
(i
)
4043 redef fun visit_all
(v
: Visitor)
4045 if _n_kwnullable
!= null then
4046 v
.enter_visit
(_n_kwnullable
.as(not null))
4048 v
.enter_visit
(_n_id
)
4049 for n
in _n_types
do
4054 redef fun visit_all_reverse
(v
: Visitor)
4056 if _n_kwnullable
!= null then
4057 v
.enter_visit
(_n_kwnullable
.as(not null))
4059 v
.enter_visit
(_n_id
)
4061 var i
= _n_types
.length
4063 v
.enter_visit
(_n_types
[i
])
4070 redef fun n_kwlabel
=(n
)
4081 private init empty_init
do end
4084 n_kwlabel
: nullable TKwlabel,
4089 _n_kwlabel
= n_kwlabel
.as(not null)
4090 n_kwlabel
.parent
= self
4091 _n_id
= n_id
.as(not null)
4095 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4097 if _n_kwlabel
== old_child
then
4098 if new_child
!= null then
4099 new_child
.parent
= self
4100 assert new_child
isa TKwlabel
4101 _n_kwlabel
= new_child
4107 if _n_id
== old_child
then
4108 if new_child
!= null then
4109 new_child
.parent
= self
4110 assert new_child
isa TId
4119 redef fun visit_all
(v
: Visitor)
4121 v
.enter_visit
(_n_kwlabel
)
4122 v
.enter_visit
(_n_id
)
4125 redef fun visit_all_reverse
(v
: Visitor)
4127 v
.enter_visit
(_n_kwlabel
)
4128 v
.enter_visit
(_n_id
)
4131 redef class ABlockExpr
4133 private init empty_init
do end
4135 init init_ablockexpr
(
4136 n_expr
: Collection[Object] # Should be Collection[AExpr]
4147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4149 for i
in [0.._n_expr
.length
[ do
4150 if _n_expr
[i
] == old_child
then
4151 if new_child
!= null then
4152 assert new_child
isa AExpr
4153 _n_expr
[i
] = new_child
4154 new_child
.parent
= self
4156 _n_expr
.remove_at
(i
)
4163 redef fun visit_all
(v
: Visitor)
4170 redef fun visit_all_reverse
(v
: Visitor)
4173 var i
= _n_expr
.length
4175 v
.enter_visit
(_n_expr
[i
])
4181 redef class AVardeclExpr
4182 redef fun n_kwvar
=(n
)
4192 redef fun n_type
=(n
)
4199 redef fun n_assign
=(n
)
4206 redef fun n_expr
=(n
)
4214 private init empty_init
do end
4216 init init_avardeclexpr
(
4217 n_kwvar
: nullable TKwvar,
4219 n_type
: nullable AType,
4220 n_assign
: nullable TAssign,
4221 n_expr
: nullable AExpr
4225 _n_kwvar
= n_kwvar
.as(not null)
4226 n_kwvar
.parent
= self
4227 _n_id
= n_id
.as(not null)
4230 if n_type
!= null then
4231 n_type
.parent
= self
4233 _n_assign
= n_assign
4234 if n_assign
!= null then
4235 n_assign
.parent
= self
4238 if n_expr
!= null then
4239 n_expr
.parent
= self
4243 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4245 if _n_kwvar
== old_child
then
4246 if new_child
!= null then
4247 new_child
.parent
= self
4248 assert new_child
isa TKwvar
4249 _n_kwvar
= new_child
4255 if _n_id
== old_child
then
4256 if new_child
!= null then
4257 new_child
.parent
= self
4258 assert new_child
isa TId
4265 if _n_type
== old_child
then
4266 if new_child
!= null then
4267 new_child
.parent
= self
4268 assert new_child
isa AType
4275 if _n_assign
== old_child
then
4276 if new_child
!= null then
4277 new_child
.parent
= self
4278 assert new_child
isa TAssign
4279 _n_assign
= new_child
4285 if _n_expr
== old_child
then
4286 if new_child
!= null then
4287 new_child
.parent
= self
4288 assert new_child
isa AExpr
4297 redef fun visit_all
(v
: Visitor)
4299 v
.enter_visit
(_n_kwvar
)
4300 v
.enter_visit
(_n_id
)
4301 if _n_type
!= null then
4302 v
.enter_visit
(_n_type
.as(not null))
4304 if _n_assign
!= null then
4305 v
.enter_visit
(_n_assign
.as(not null))
4307 if _n_expr
!= null then
4308 v
.enter_visit
(_n_expr
.as(not null))
4312 redef fun visit_all_reverse
(v
: Visitor)
4314 v
.enter_visit
(_n_kwvar
)
4315 v
.enter_visit
(_n_id
)
4316 if _n_type
!= null then
4317 v
.enter_visit
(_n_type
.as(not null))
4319 if _n_assign
!= null then
4320 v
.enter_visit
(_n_assign
.as(not null))
4322 if _n_expr
!= null then
4323 v
.enter_visit
(_n_expr
.as(not null))
4327 redef class AReturnExpr
4328 redef fun n_kwreturn
=(n
)
4335 redef fun n_expr
=(n
)
4343 private init empty_init
do end
4345 init init_areturnexpr
(
4346 n_kwreturn
: nullable TKwreturn,
4347 n_expr
: nullable AExpr
4351 _n_kwreturn
= n_kwreturn
4352 if n_kwreturn
!= null then
4353 n_kwreturn
.parent
= self
4356 if n_expr
!= null then
4357 n_expr
.parent
= self
4361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4363 if _n_kwreturn
== old_child
then
4364 if new_child
!= null then
4365 new_child
.parent
= self
4366 assert new_child
isa TKwreturn
4367 _n_kwreturn
= new_child
4373 if _n_expr
== old_child
then
4374 if new_child
!= null then
4375 new_child
.parent
= self
4376 assert new_child
isa AExpr
4385 redef fun visit_all
(v
: Visitor)
4387 if _n_kwreturn
!= null then
4388 v
.enter_visit
(_n_kwreturn
.as(not null))
4390 if _n_expr
!= null then
4391 v
.enter_visit
(_n_expr
.as(not null))
4395 redef fun visit_all_reverse
(v
: Visitor)
4397 if _n_kwreturn
!= null then
4398 v
.enter_visit
(_n_kwreturn
.as(not null))
4400 if _n_expr
!= null then
4401 v
.enter_visit
(_n_expr
.as(not null))
4405 redef class ABreakExpr
4406 redef fun n_kwbreak
=(n
)
4411 redef fun n_label
=(n
)
4418 redef fun n_expr
=(n
)
4426 private init empty_init
do end
4428 init init_abreakexpr
(
4429 n_kwbreak
: nullable TKwbreak,
4430 n_label
: nullable ALabel,
4431 n_expr
: nullable AExpr
4435 _n_kwbreak
= n_kwbreak
.as(not null)
4436 n_kwbreak
.parent
= self
4438 if n_label
!= null then
4439 n_label
.parent
= self
4442 if n_expr
!= null then
4443 n_expr
.parent
= self
4447 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4449 if _n_kwbreak
== old_child
then
4450 if new_child
!= null then
4451 new_child
.parent
= self
4452 assert new_child
isa TKwbreak
4453 _n_kwbreak
= new_child
4459 if _n_label
== old_child
then
4460 if new_child
!= null then
4461 new_child
.parent
= self
4462 assert new_child
isa ALabel
4463 _n_label
= new_child
4469 if _n_expr
== old_child
then
4470 if new_child
!= null then
4471 new_child
.parent
= self
4472 assert new_child
isa AExpr
4481 redef fun visit_all
(v
: Visitor)
4483 v
.enter_visit
(_n_kwbreak
)
4484 if _n_label
!= null then
4485 v
.enter_visit
(_n_label
.as(not null))
4487 if _n_expr
!= null then
4488 v
.enter_visit
(_n_expr
.as(not null))
4492 redef fun visit_all_reverse
(v
: Visitor)
4494 v
.enter_visit
(_n_kwbreak
)
4495 if _n_label
!= null then
4496 v
.enter_visit
(_n_label
.as(not null))
4498 if _n_expr
!= null then
4499 v
.enter_visit
(_n_expr
.as(not null))
4503 redef class AAbortExpr
4504 redef fun n_kwabort
=(n
)
4510 private init empty_init
do end
4512 init init_aabortexpr
(
4513 n_kwabort
: nullable TKwabort
4517 _n_kwabort
= n_kwabort
.as(not null)
4518 n_kwabort
.parent
= self
4521 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4523 if _n_kwabort
== old_child
then
4524 if new_child
!= null then
4525 new_child
.parent
= self
4526 assert new_child
isa TKwabort
4527 _n_kwabort
= new_child
4535 redef fun visit_all
(v
: Visitor)
4537 v
.enter_visit
(_n_kwabort
)
4540 redef fun visit_all_reverse
(v
: Visitor)
4542 v
.enter_visit
(_n_kwabort
)
4545 redef class AContinueExpr
4546 redef fun n_kwcontinue
=(n
)
4553 redef fun n_label
=(n
)
4560 redef fun n_expr
=(n
)
4568 private init empty_init
do end
4570 init init_acontinueexpr
(
4571 n_kwcontinue
: nullable TKwcontinue,
4572 n_label
: nullable ALabel,
4573 n_expr
: nullable AExpr
4577 _n_kwcontinue
= n_kwcontinue
4578 if n_kwcontinue
!= null then
4579 n_kwcontinue
.parent
= self
4582 if n_label
!= null then
4583 n_label
.parent
= self
4586 if n_expr
!= null then
4587 n_expr
.parent
= self
4591 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4593 if _n_kwcontinue
== old_child
then
4594 if new_child
!= null then
4595 new_child
.parent
= self
4596 assert new_child
isa TKwcontinue
4597 _n_kwcontinue
= new_child
4599 _n_kwcontinue
= null
4603 if _n_label
== old_child
then
4604 if new_child
!= null then
4605 new_child
.parent
= self
4606 assert new_child
isa ALabel
4607 _n_label
= new_child
4613 if _n_expr
== old_child
then
4614 if new_child
!= null then
4615 new_child
.parent
= self
4616 assert new_child
isa AExpr
4625 redef fun visit_all
(v
: Visitor)
4627 if _n_kwcontinue
!= null then
4628 v
.enter_visit
(_n_kwcontinue
.as(not null))
4630 if _n_label
!= null then
4631 v
.enter_visit
(_n_label
.as(not null))
4633 if _n_expr
!= null then
4634 v
.enter_visit
(_n_expr
.as(not null))
4638 redef fun visit_all_reverse
(v
: Visitor)
4640 if _n_kwcontinue
!= null then
4641 v
.enter_visit
(_n_kwcontinue
.as(not null))
4643 if _n_label
!= null then
4644 v
.enter_visit
(_n_label
.as(not null))
4646 if _n_expr
!= null then
4647 v
.enter_visit
(_n_expr
.as(not null))
4652 redef fun n_kwdo
=(n
)
4657 redef fun n_block
=(n
)
4664 redef fun n_label
=(n
)
4672 private init empty_init
do end
4675 n_kwdo
: nullable TKwdo,
4676 n_block
: nullable AExpr,
4677 n_label
: nullable ALabel
4681 _n_kwdo
= n_kwdo
.as(not null)
4682 n_kwdo
.parent
= self
4684 if n_block
!= null then
4685 n_block
.parent
= self
4688 if n_label
!= null then
4689 n_label
.parent
= self
4693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4695 if _n_kwdo
== old_child
then
4696 if new_child
!= null then
4697 new_child
.parent
= self
4698 assert new_child
isa TKwdo
4705 if _n_block
== old_child
then
4706 if new_child
!= null then
4707 new_child
.parent
= self
4708 assert new_child
isa AExpr
4709 _n_block
= new_child
4715 if _n_label
== old_child
then
4716 if new_child
!= null then
4717 new_child
.parent
= self
4718 assert new_child
isa ALabel
4719 _n_label
= new_child
4727 redef fun visit_all
(v
: Visitor)
4729 v
.enter_visit
(_n_kwdo
)
4730 if _n_block
!= null then
4731 v
.enter_visit
(_n_block
.as(not null))
4733 if _n_label
!= null then
4734 v
.enter_visit
(_n_label
.as(not null))
4738 redef fun visit_all_reverse
(v
: Visitor)
4740 v
.enter_visit
(_n_kwdo
)
4741 if _n_block
!= null then
4742 v
.enter_visit
(_n_block
.as(not null))
4744 if _n_label
!= null then
4745 v
.enter_visit
(_n_label
.as(not null))
4750 redef fun n_kwif
=(n
)
4755 redef fun n_expr
=(n
)
4760 redef fun n_then
=(n
)
4767 redef fun n_else
=(n
)
4775 private init empty_init
do end
4778 n_kwif
: nullable TKwif,
4779 n_expr
: nullable AExpr,
4780 n_then
: nullable AExpr,
4781 n_else
: nullable AExpr
4785 _n_kwif
= n_kwif
.as(not null)
4786 n_kwif
.parent
= self
4787 _n_expr
= n_expr
.as(not null)
4788 n_expr
.parent
= self
4790 if n_then
!= null then
4791 n_then
.parent
= self
4794 if n_else
!= null then
4795 n_else
.parent
= self
4799 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4801 if _n_kwif
== old_child
then
4802 if new_child
!= null then
4803 new_child
.parent
= self
4804 assert new_child
isa TKwif
4811 if _n_expr
== old_child
then
4812 if new_child
!= null then
4813 new_child
.parent
= self
4814 assert new_child
isa AExpr
4821 if _n_then
== old_child
then
4822 if new_child
!= null then
4823 new_child
.parent
= self
4824 assert new_child
isa AExpr
4831 if _n_else
== old_child
then
4832 if new_child
!= null then
4833 new_child
.parent
= self
4834 assert new_child
isa AExpr
4843 redef fun visit_all
(v
: Visitor)
4845 v
.enter_visit
(_n_kwif
)
4846 v
.enter_visit
(_n_expr
)
4847 if _n_then
!= null then
4848 v
.enter_visit
(_n_then
.as(not null))
4850 if _n_else
!= null then
4851 v
.enter_visit
(_n_else
.as(not null))
4855 redef fun visit_all_reverse
(v
: Visitor)
4857 v
.enter_visit
(_n_kwif
)
4858 v
.enter_visit
(_n_expr
)
4859 if _n_then
!= null then
4860 v
.enter_visit
(_n_then
.as(not null))
4862 if _n_else
!= null then
4863 v
.enter_visit
(_n_else
.as(not null))
4867 redef class AIfexprExpr
4868 redef fun n_kwif
=(n
)
4873 redef fun n_expr
=(n
)
4878 redef fun n_kwthen
=(n
)
4883 redef fun n_then
=(n
)
4888 redef fun n_kwelse
=(n
)
4893 redef fun n_else
=(n
)
4899 private init empty_init
do end
4901 init init_aifexprexpr
(
4902 n_kwif
: nullable TKwif,
4903 n_expr
: nullable AExpr,
4904 n_kwthen
: nullable TKwthen,
4905 n_then
: nullable AExpr,
4906 n_kwelse
: nullable TKwelse,
4907 n_else
: nullable AExpr
4911 _n_kwif
= n_kwif
.as(not null)
4912 n_kwif
.parent
= self
4913 _n_expr
= n_expr
.as(not null)
4914 n_expr
.parent
= self
4915 _n_kwthen
= n_kwthen
.as(not null)
4916 n_kwthen
.parent
= self
4917 _n_then
= n_then
.as(not null)
4918 n_then
.parent
= self
4919 _n_kwelse
= n_kwelse
.as(not null)
4920 n_kwelse
.parent
= self
4921 _n_else
= n_else
.as(not null)
4922 n_else
.parent
= self
4925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4927 if _n_kwif
== old_child
then
4928 if new_child
!= null then
4929 new_child
.parent
= self
4930 assert new_child
isa TKwif
4937 if _n_expr
== old_child
then
4938 if new_child
!= null then
4939 new_child
.parent
= self
4940 assert new_child
isa AExpr
4947 if _n_kwthen
== old_child
then
4948 if new_child
!= null then
4949 new_child
.parent
= self
4950 assert new_child
isa TKwthen
4951 _n_kwthen
= new_child
4957 if _n_then
== old_child
then
4958 if new_child
!= null then
4959 new_child
.parent
= self
4960 assert new_child
isa AExpr
4967 if _n_kwelse
== old_child
then
4968 if new_child
!= null then
4969 new_child
.parent
= self
4970 assert new_child
isa TKwelse
4971 _n_kwelse
= new_child
4977 if _n_else
== old_child
then
4978 if new_child
!= null then
4979 new_child
.parent
= self
4980 assert new_child
isa AExpr
4989 redef fun visit_all
(v
: Visitor)
4991 v
.enter_visit
(_n_kwif
)
4992 v
.enter_visit
(_n_expr
)
4993 v
.enter_visit
(_n_kwthen
)
4994 v
.enter_visit
(_n_then
)
4995 v
.enter_visit
(_n_kwelse
)
4996 v
.enter_visit
(_n_else
)
4999 redef fun visit_all_reverse
(v
: Visitor)
5001 v
.enter_visit
(_n_kwif
)
5002 v
.enter_visit
(_n_expr
)
5003 v
.enter_visit
(_n_kwthen
)
5004 v
.enter_visit
(_n_then
)
5005 v
.enter_visit
(_n_kwelse
)
5006 v
.enter_visit
(_n_else
)
5009 redef class AWhileExpr
5010 redef fun n_kwwhile
=(n
)
5015 redef fun n_expr
=(n
)
5020 redef fun n_kwdo
=(n
)
5025 redef fun n_block
=(n
)
5032 redef fun n_label
=(n
)
5040 private init empty_init
do end
5042 init init_awhileexpr
(
5043 n_kwwhile
: nullable TKwwhile,
5044 n_expr
: nullable AExpr,
5045 n_kwdo
: nullable TKwdo,
5046 n_block
: nullable AExpr,
5047 n_label
: nullable ALabel
5051 _n_kwwhile
= n_kwwhile
.as(not null)
5052 n_kwwhile
.parent
= self
5053 _n_expr
= n_expr
.as(not null)
5054 n_expr
.parent
= self
5055 _n_kwdo
= n_kwdo
.as(not null)
5056 n_kwdo
.parent
= self
5058 if n_block
!= null then
5059 n_block
.parent
= self
5062 if n_label
!= null then
5063 n_label
.parent
= self
5067 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5069 if _n_kwwhile
== old_child
then
5070 if new_child
!= null then
5071 new_child
.parent
= self
5072 assert new_child
isa TKwwhile
5073 _n_kwwhile
= new_child
5079 if _n_expr
== old_child
then
5080 if new_child
!= null then
5081 new_child
.parent
= self
5082 assert new_child
isa AExpr
5089 if _n_kwdo
== old_child
then
5090 if new_child
!= null then
5091 new_child
.parent
= self
5092 assert new_child
isa TKwdo
5099 if _n_block
== old_child
then
5100 if new_child
!= null then
5101 new_child
.parent
= self
5102 assert new_child
isa AExpr
5103 _n_block
= new_child
5109 if _n_label
== old_child
then
5110 if new_child
!= null then
5111 new_child
.parent
= self
5112 assert new_child
isa ALabel
5113 _n_label
= new_child
5121 redef fun visit_all
(v
: Visitor)
5123 v
.enter_visit
(_n_kwwhile
)
5124 v
.enter_visit
(_n_expr
)
5125 v
.enter_visit
(_n_kwdo
)
5126 if _n_block
!= null then
5127 v
.enter_visit
(_n_block
.as(not null))
5129 if _n_label
!= null then
5130 v
.enter_visit
(_n_label
.as(not null))
5134 redef fun visit_all_reverse
(v
: Visitor)
5136 v
.enter_visit
(_n_kwwhile
)
5137 v
.enter_visit
(_n_expr
)
5138 v
.enter_visit
(_n_kwdo
)
5139 if _n_block
!= null then
5140 v
.enter_visit
(_n_block
.as(not null))
5142 if _n_label
!= null then
5143 v
.enter_visit
(_n_label
.as(not null))
5147 redef class ALoopExpr
5148 redef fun n_kwloop
=(n
)
5153 redef fun n_block
=(n
)
5160 redef fun n_label
=(n
)
5168 private init empty_init
do end
5170 init init_aloopexpr
(
5171 n_kwloop
: nullable TKwloop,
5172 n_block
: nullable AExpr,
5173 n_label
: nullable ALabel
5177 _n_kwloop
= n_kwloop
.as(not null)
5178 n_kwloop
.parent
= self
5180 if n_block
!= null then
5181 n_block
.parent
= self
5184 if n_label
!= null then
5185 n_label
.parent
= self
5189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5191 if _n_kwloop
== old_child
then
5192 if new_child
!= null then
5193 new_child
.parent
= self
5194 assert new_child
isa TKwloop
5195 _n_kwloop
= new_child
5201 if _n_block
== old_child
then
5202 if new_child
!= null then
5203 new_child
.parent
= self
5204 assert new_child
isa AExpr
5205 _n_block
= new_child
5211 if _n_label
== old_child
then
5212 if new_child
!= null then
5213 new_child
.parent
= self
5214 assert new_child
isa ALabel
5215 _n_label
= new_child
5223 redef fun visit_all
(v
: Visitor)
5225 v
.enter_visit
(_n_kwloop
)
5226 if _n_block
!= null then
5227 v
.enter_visit
(_n_block
.as(not null))
5229 if _n_label
!= null then
5230 v
.enter_visit
(_n_label
.as(not null))
5234 redef fun visit_all_reverse
(v
: Visitor)
5236 v
.enter_visit
(_n_kwloop
)
5237 if _n_block
!= null then
5238 v
.enter_visit
(_n_block
.as(not null))
5240 if _n_label
!= null then
5241 v
.enter_visit
(_n_label
.as(not null))
5245 redef class AForExpr
5246 redef fun n_kwfor
=(n
)
5256 redef fun n_expr
=(n
)
5261 redef fun n_kwdo
=(n
)
5266 redef fun n_block
=(n
)
5273 redef fun n_label
=(n
)
5281 private init empty_init
do end
5283 init init_aforexpr
(
5284 n_kwfor
: nullable TKwfor,
5286 n_expr
: nullable AExpr,
5287 n_kwdo
: nullable TKwdo,
5288 n_block
: nullable AExpr,
5289 n_label
: nullable ALabel
5293 _n_kwfor
= n_kwfor
.as(not null)
5294 n_kwfor
.parent
= self
5295 _n_id
= n_id
.as(not null)
5297 _n_expr
= n_expr
.as(not null)
5298 n_expr
.parent
= self
5299 _n_kwdo
= n_kwdo
.as(not null)
5300 n_kwdo
.parent
= self
5302 if n_block
!= null then
5303 n_block
.parent
= self
5306 if n_label
!= null then
5307 n_label
.parent
= self
5311 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5313 if _n_kwfor
== old_child
then
5314 if new_child
!= null then
5315 new_child
.parent
= self
5316 assert new_child
isa TKwfor
5317 _n_kwfor
= new_child
5323 if _n_id
== old_child
then
5324 if new_child
!= null then
5325 new_child
.parent
= self
5326 assert new_child
isa TId
5333 if _n_expr
== old_child
then
5334 if new_child
!= null then
5335 new_child
.parent
= self
5336 assert new_child
isa AExpr
5343 if _n_kwdo
== old_child
then
5344 if new_child
!= null then
5345 new_child
.parent
= self
5346 assert new_child
isa TKwdo
5353 if _n_block
== old_child
then
5354 if new_child
!= null then
5355 new_child
.parent
= self
5356 assert new_child
isa AExpr
5357 _n_block
= new_child
5363 if _n_label
== old_child
then
5364 if new_child
!= null then
5365 new_child
.parent
= self
5366 assert new_child
isa ALabel
5367 _n_label
= new_child
5375 redef fun visit_all
(v
: Visitor)
5377 v
.enter_visit
(_n_kwfor
)
5378 v
.enter_visit
(_n_id
)
5379 v
.enter_visit
(_n_expr
)
5380 v
.enter_visit
(_n_kwdo
)
5381 if _n_block
!= null then
5382 v
.enter_visit
(_n_block
.as(not null))
5384 if _n_label
!= null then
5385 v
.enter_visit
(_n_label
.as(not null))
5389 redef fun visit_all_reverse
(v
: Visitor)
5391 v
.enter_visit
(_n_kwfor
)
5392 v
.enter_visit
(_n_id
)
5393 v
.enter_visit
(_n_expr
)
5394 v
.enter_visit
(_n_kwdo
)
5395 if _n_block
!= null then
5396 v
.enter_visit
(_n_block
.as(not null))
5398 if _n_label
!= null then
5399 v
.enter_visit
(_n_label
.as(not null))
5403 redef class AAssertExpr
5404 redef fun n_kwassert
=(n
)
5416 redef fun n_expr
=(n
)
5421 redef fun n_else
=(n
)
5429 private init empty_init
do end
5431 init init_aassertexpr
(
5432 n_kwassert
: nullable TKwassert,
5434 n_expr
: nullable AExpr,
5435 n_else
: nullable AExpr
5439 _n_kwassert
= n_kwassert
.as(not null)
5440 n_kwassert
.parent
= self
5442 if n_id
!= null then
5445 _n_expr
= n_expr
.as(not null)
5446 n_expr
.parent
= self
5448 if n_else
!= null then
5449 n_else
.parent
= self
5453 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5455 if _n_kwassert
== old_child
then
5456 if new_child
!= null then
5457 new_child
.parent
= self
5458 assert new_child
isa TKwassert
5459 _n_kwassert
= new_child
5465 if _n_id
== old_child
then
5466 if new_child
!= null then
5467 new_child
.parent
= self
5468 assert new_child
isa TId
5475 if _n_expr
== old_child
then
5476 if new_child
!= null then
5477 new_child
.parent
= self
5478 assert new_child
isa AExpr
5485 if _n_else
== old_child
then
5486 if new_child
!= null then
5487 new_child
.parent
= self
5488 assert new_child
isa AExpr
5497 redef fun visit_all
(v
: Visitor)
5499 v
.enter_visit
(_n_kwassert
)
5500 if _n_id
!= null then
5501 v
.enter_visit
(_n_id
.as(not null))
5503 v
.enter_visit
(_n_expr
)
5504 if _n_else
!= null then
5505 v
.enter_visit
(_n_else
.as(not null))
5509 redef fun visit_all_reverse
(v
: Visitor)
5511 v
.enter_visit
(_n_kwassert
)
5512 if _n_id
!= null then
5513 v
.enter_visit
(_n_id
.as(not null))
5515 v
.enter_visit
(_n_expr
)
5516 if _n_else
!= null then
5517 v
.enter_visit
(_n_else
.as(not null))
5521 redef class AOnceExpr
5522 redef fun n_kwonce
=(n
)
5527 redef fun n_expr
=(n
)
5533 private init empty_init
do end
5535 init init_aonceexpr
(
5536 n_kwonce
: nullable TKwonce,
5537 n_expr
: nullable AExpr
5541 _n_kwonce
= n_kwonce
.as(not null)
5542 n_kwonce
.parent
= self
5543 _n_expr
= n_expr
.as(not null)
5544 n_expr
.parent
= self
5547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5549 if _n_kwonce
== old_child
then
5550 if new_child
!= null then
5551 new_child
.parent
= self
5552 assert new_child
isa TKwonce
5553 _n_kwonce
= new_child
5559 if _n_expr
== old_child
then
5560 if new_child
!= null then
5561 new_child
.parent
= self
5562 assert new_child
isa AExpr
5571 redef fun visit_all
(v
: Visitor)
5573 v
.enter_visit
(_n_kwonce
)
5574 v
.enter_visit
(_n_expr
)
5577 redef fun visit_all_reverse
(v
: Visitor)
5579 v
.enter_visit
(_n_kwonce
)
5580 v
.enter_visit
(_n_expr
)
5583 redef class ASendExpr
5584 redef fun n_expr
=(n
)
5590 private init empty_init
do end
5592 init init_asendexpr
(
5593 n_expr
: nullable AExpr
5597 _n_expr
= n_expr
.as(not null)
5598 n_expr
.parent
= self
5601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5603 if _n_expr
== old_child
then
5604 if new_child
!= null then
5605 new_child
.parent
= self
5606 assert new_child
isa AExpr
5615 redef fun visit_all
(v
: Visitor)
5617 v
.enter_visit
(_n_expr
)
5620 redef fun visit_all_reverse
(v
: Visitor)
5622 v
.enter_visit
(_n_expr
)
5625 redef class ABinopExpr
5626 redef fun n_expr
=(n
)
5631 redef fun n_expr2
=(n
)
5637 private init empty_init
do end
5639 init init_abinopexpr
(
5640 n_expr
: nullable AExpr,
5641 n_expr2
: nullable AExpr
5645 _n_expr
= n_expr
.as(not null)
5646 n_expr
.parent
= self
5647 _n_expr2
= n_expr2
.as(not null)
5648 n_expr2
.parent
= self
5651 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5653 if _n_expr
== old_child
then
5654 if new_child
!= null then
5655 new_child
.parent
= self
5656 assert new_child
isa AExpr
5663 if _n_expr2
== old_child
then
5664 if new_child
!= null then
5665 new_child
.parent
= self
5666 assert new_child
isa AExpr
5667 _n_expr2
= new_child
5675 redef fun visit_all
(v
: Visitor)
5677 v
.enter_visit
(_n_expr
)
5678 v
.enter_visit
(_n_expr2
)
5681 redef fun visit_all_reverse
(v
: Visitor)
5683 v
.enter_visit
(_n_expr
)
5684 v
.enter_visit
(_n_expr2
)
5688 redef fun n_expr
=(n
)
5693 redef fun n_expr2
=(n
)
5699 private init empty_init
do end
5702 n_expr
: nullable AExpr,
5703 n_expr2
: nullable AExpr
5707 _n_expr
= n_expr
.as(not null)
5708 n_expr
.parent
= self
5709 _n_expr2
= n_expr2
.as(not null)
5710 n_expr2
.parent
= self
5713 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5715 if _n_expr
== old_child
then
5716 if new_child
!= null then
5717 new_child
.parent
= self
5718 assert new_child
isa AExpr
5725 if _n_expr2
== old_child
then
5726 if new_child
!= null then
5727 new_child
.parent
= self
5728 assert new_child
isa AExpr
5729 _n_expr2
= new_child
5737 redef fun visit_all
(v
: Visitor)
5739 v
.enter_visit
(_n_expr
)
5740 v
.enter_visit
(_n_expr2
)
5743 redef fun visit_all_reverse
(v
: Visitor)
5745 v
.enter_visit
(_n_expr
)
5746 v
.enter_visit
(_n_expr2
)
5749 redef class AAndExpr
5750 redef fun n_expr
=(n
)
5755 redef fun n_expr2
=(n
)
5761 private init empty_init
do end
5763 init init_aandexpr
(
5764 n_expr
: nullable AExpr,
5765 n_expr2
: nullable AExpr
5769 _n_expr
= n_expr
.as(not null)
5770 n_expr
.parent
= self
5771 _n_expr2
= n_expr2
.as(not null)
5772 n_expr2
.parent
= self
5775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5777 if _n_expr
== old_child
then
5778 if new_child
!= null then
5779 new_child
.parent
= self
5780 assert new_child
isa AExpr
5787 if _n_expr2
== old_child
then
5788 if new_child
!= null then
5789 new_child
.parent
= self
5790 assert new_child
isa AExpr
5791 _n_expr2
= new_child
5799 redef fun visit_all
(v
: Visitor)
5801 v
.enter_visit
(_n_expr
)
5802 v
.enter_visit
(_n_expr2
)
5805 redef fun visit_all_reverse
(v
: Visitor)
5807 v
.enter_visit
(_n_expr
)
5808 v
.enter_visit
(_n_expr2
)
5811 redef class ANotExpr
5812 redef fun n_kwnot
=(n
)
5817 redef fun n_expr
=(n
)
5823 private init empty_init
do end
5825 init init_anotexpr
(
5826 n_kwnot
: nullable TKwnot,
5827 n_expr
: nullable AExpr
5831 _n_kwnot
= n_kwnot
.as(not null)
5832 n_kwnot
.parent
= self
5833 _n_expr
= n_expr
.as(not null)
5834 n_expr
.parent
= self
5837 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5839 if _n_kwnot
== old_child
then
5840 if new_child
!= null then
5841 new_child
.parent
= self
5842 assert new_child
isa TKwnot
5843 _n_kwnot
= new_child
5849 if _n_expr
== old_child
then
5850 if new_child
!= null then
5851 new_child
.parent
= self
5852 assert new_child
isa AExpr
5861 redef fun visit_all
(v
: Visitor)
5863 v
.enter_visit
(_n_kwnot
)
5864 v
.enter_visit
(_n_expr
)
5867 redef fun visit_all_reverse
(v
: Visitor)
5869 v
.enter_visit
(_n_kwnot
)
5870 v
.enter_visit
(_n_expr
)
5874 redef fun n_expr
=(n
)
5879 redef fun n_expr2
=(n
)
5885 private init empty_init
do end
5888 n_expr
: nullable AExpr,
5889 n_expr2
: nullable AExpr
5893 _n_expr
= n_expr
.as(not null)
5894 n_expr
.parent
= self
5895 _n_expr2
= n_expr2
.as(not null)
5896 n_expr2
.parent
= self
5899 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5901 if _n_expr
== old_child
then
5902 if new_child
!= null then
5903 new_child
.parent
= self
5904 assert new_child
isa AExpr
5911 if _n_expr2
== old_child
then
5912 if new_child
!= null then
5913 new_child
.parent
= self
5914 assert new_child
isa AExpr
5915 _n_expr2
= new_child
5923 redef fun visit_all
(v
: Visitor)
5925 v
.enter_visit
(_n_expr
)
5926 v
.enter_visit
(_n_expr2
)
5929 redef fun visit_all_reverse
(v
: Visitor)
5931 v
.enter_visit
(_n_expr
)
5932 v
.enter_visit
(_n_expr2
)
5936 redef fun n_expr
=(n
)
5941 redef fun n_expr2
=(n
)
5947 private init empty_init
do end
5950 n_expr
: nullable AExpr,
5951 n_expr2
: nullable AExpr
5955 _n_expr
= n_expr
.as(not null)
5956 n_expr
.parent
= self
5957 _n_expr2
= n_expr2
.as(not null)
5958 n_expr2
.parent
= self
5961 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5963 if _n_expr
== old_child
then
5964 if new_child
!= null then
5965 new_child
.parent
= self
5966 assert new_child
isa AExpr
5973 if _n_expr2
== old_child
then
5974 if new_child
!= null then
5975 new_child
.parent
= self
5976 assert new_child
isa AExpr
5977 _n_expr2
= new_child
5985 redef fun visit_all
(v
: Visitor)
5987 v
.enter_visit
(_n_expr
)
5988 v
.enter_visit
(_n_expr2
)
5991 redef fun visit_all_reverse
(v
: Visitor)
5993 v
.enter_visit
(_n_expr
)
5994 v
.enter_visit
(_n_expr2
)
5998 redef fun n_expr
=(n
)
6003 redef fun n_expr2
=(n
)
6009 private init empty_init
do end
6012 n_expr
: nullable AExpr,
6013 n_expr2
: nullable AExpr
6017 _n_expr
= n_expr
.as(not null)
6018 n_expr
.parent
= self
6019 _n_expr2
= n_expr2
.as(not null)
6020 n_expr2
.parent
= self
6023 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6025 if _n_expr
== old_child
then
6026 if new_child
!= null then
6027 new_child
.parent
= self
6028 assert new_child
isa AExpr
6035 if _n_expr2
== old_child
then
6036 if new_child
!= null then
6037 new_child
.parent
= self
6038 assert new_child
isa AExpr
6039 _n_expr2
= new_child
6047 redef fun visit_all
(v
: Visitor)
6049 v
.enter_visit
(_n_expr
)
6050 v
.enter_visit
(_n_expr2
)
6053 redef fun visit_all_reverse
(v
: Visitor)
6055 v
.enter_visit
(_n_expr
)
6056 v
.enter_visit
(_n_expr2
)
6060 redef fun n_expr
=(n
)
6065 redef fun n_expr2
=(n
)
6071 private init empty_init
do end
6074 n_expr
: nullable AExpr,
6075 n_expr2
: nullable AExpr
6079 _n_expr
= n_expr
.as(not null)
6080 n_expr
.parent
= self
6081 _n_expr2
= n_expr2
.as(not null)
6082 n_expr2
.parent
= self
6085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6087 if _n_expr
== old_child
then
6088 if new_child
!= null then
6089 new_child
.parent
= self
6090 assert new_child
isa AExpr
6097 if _n_expr2
== old_child
then
6098 if new_child
!= null then
6099 new_child
.parent
= self
6100 assert new_child
isa AExpr
6101 _n_expr2
= new_child
6109 redef fun visit_all
(v
: Visitor)
6111 v
.enter_visit
(_n_expr
)
6112 v
.enter_visit
(_n_expr2
)
6115 redef fun visit_all_reverse
(v
: Visitor)
6117 v
.enter_visit
(_n_expr
)
6118 v
.enter_visit
(_n_expr2
)
6122 redef fun n_expr
=(n
)
6127 redef fun n_expr2
=(n
)
6133 private init empty_init
do end
6136 n_expr
: nullable AExpr,
6137 n_expr2
: nullable AExpr
6141 _n_expr
= n_expr
.as(not null)
6142 n_expr
.parent
= self
6143 _n_expr2
= n_expr2
.as(not null)
6144 n_expr2
.parent
= self
6147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6149 if _n_expr
== old_child
then
6150 if new_child
!= null then
6151 new_child
.parent
= self
6152 assert new_child
isa AExpr
6159 if _n_expr2
== old_child
then
6160 if new_child
!= null then
6161 new_child
.parent
= self
6162 assert new_child
isa AExpr
6163 _n_expr2
= new_child
6171 redef fun visit_all
(v
: Visitor)
6173 v
.enter_visit
(_n_expr
)
6174 v
.enter_visit
(_n_expr2
)
6177 redef fun visit_all_reverse
(v
: Visitor)
6179 v
.enter_visit
(_n_expr
)
6180 v
.enter_visit
(_n_expr2
)
6184 redef fun n_expr
=(n
)
6189 redef fun n_expr2
=(n
)
6195 private init empty_init
do end
6198 n_expr
: nullable AExpr,
6199 n_expr2
: nullable AExpr
6203 _n_expr
= n_expr
.as(not null)
6204 n_expr
.parent
= self
6205 _n_expr2
= n_expr2
.as(not null)
6206 n_expr2
.parent
= self
6209 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6211 if _n_expr
== old_child
then
6212 if new_child
!= null then
6213 new_child
.parent
= self
6214 assert new_child
isa AExpr
6221 if _n_expr2
== old_child
then
6222 if new_child
!= null then
6223 new_child
.parent
= self
6224 assert new_child
isa AExpr
6225 _n_expr2
= new_child
6233 redef fun visit_all
(v
: Visitor)
6235 v
.enter_visit
(_n_expr
)
6236 v
.enter_visit
(_n_expr2
)
6239 redef fun visit_all_reverse
(v
: Visitor)
6241 v
.enter_visit
(_n_expr
)
6242 v
.enter_visit
(_n_expr2
)
6246 redef fun n_expr
=(n
)
6251 redef fun n_expr2
=(n
)
6257 private init empty_init
do end
6260 n_expr
: nullable AExpr,
6261 n_expr2
: nullable AExpr
6265 _n_expr
= n_expr
.as(not null)
6266 n_expr
.parent
= self
6267 _n_expr2
= n_expr2
.as(not null)
6268 n_expr2
.parent
= self
6271 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6273 if _n_expr
== old_child
then
6274 if new_child
!= null then
6275 new_child
.parent
= self
6276 assert new_child
isa AExpr
6283 if _n_expr2
== old_child
then
6284 if new_child
!= null then
6285 new_child
.parent
= self
6286 assert new_child
isa AExpr
6287 _n_expr2
= new_child
6295 redef fun visit_all
(v
: Visitor)
6297 v
.enter_visit
(_n_expr
)
6298 v
.enter_visit
(_n_expr2
)
6301 redef fun visit_all_reverse
(v
: Visitor)
6303 v
.enter_visit
(_n_expr
)
6304 v
.enter_visit
(_n_expr2
)
6307 redef class AIsaExpr
6308 redef fun n_expr
=(n
)
6313 redef fun n_type
=(n
)
6319 private init empty_init
do end
6321 init init_aisaexpr
(
6322 n_expr
: nullable AExpr,
6323 n_type
: nullable AType
6327 _n_expr
= n_expr
.as(not null)
6328 n_expr
.parent
= self
6329 _n_type
= n_type
.as(not null)
6330 n_type
.parent
= self
6333 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6335 if _n_expr
== old_child
then
6336 if new_child
!= null then
6337 new_child
.parent
= self
6338 assert new_child
isa AExpr
6345 if _n_type
== old_child
then
6346 if new_child
!= null then
6347 new_child
.parent
= self
6348 assert new_child
isa AType
6357 redef fun visit_all
(v
: Visitor)
6359 v
.enter_visit
(_n_expr
)
6360 v
.enter_visit
(_n_type
)
6363 redef fun visit_all_reverse
(v
: Visitor)
6365 v
.enter_visit
(_n_expr
)
6366 v
.enter_visit
(_n_type
)
6369 redef class APlusExpr
6370 redef fun n_expr
=(n
)
6375 redef fun n_expr2
=(n
)
6381 private init empty_init
do end
6383 init init_aplusexpr
(
6384 n_expr
: nullable AExpr,
6385 n_expr2
: nullable AExpr
6389 _n_expr
= n_expr
.as(not null)
6390 n_expr
.parent
= self
6391 _n_expr2
= n_expr2
.as(not null)
6392 n_expr2
.parent
= self
6395 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6397 if _n_expr
== old_child
then
6398 if new_child
!= null then
6399 new_child
.parent
= self
6400 assert new_child
isa AExpr
6407 if _n_expr2
== old_child
then
6408 if new_child
!= null then
6409 new_child
.parent
= self
6410 assert new_child
isa AExpr
6411 _n_expr2
= new_child
6419 redef fun visit_all
(v
: Visitor)
6421 v
.enter_visit
(_n_expr
)
6422 v
.enter_visit
(_n_expr2
)
6425 redef fun visit_all_reverse
(v
: Visitor)
6427 v
.enter_visit
(_n_expr
)
6428 v
.enter_visit
(_n_expr2
)
6431 redef class AMinusExpr
6432 redef fun n_expr
=(n
)
6437 redef fun n_expr2
=(n
)
6443 private init empty_init
do end
6445 init init_aminusexpr
(
6446 n_expr
: nullable AExpr,
6447 n_expr2
: nullable AExpr
6451 _n_expr
= n_expr
.as(not null)
6452 n_expr
.parent
= self
6453 _n_expr2
= n_expr2
.as(not null)
6454 n_expr2
.parent
= self
6457 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6459 if _n_expr
== old_child
then
6460 if new_child
!= null then
6461 new_child
.parent
= self
6462 assert new_child
isa AExpr
6469 if _n_expr2
== old_child
then
6470 if new_child
!= null then
6471 new_child
.parent
= self
6472 assert new_child
isa AExpr
6473 _n_expr2
= new_child
6481 redef fun visit_all
(v
: Visitor)
6483 v
.enter_visit
(_n_expr
)
6484 v
.enter_visit
(_n_expr2
)
6487 redef fun visit_all_reverse
(v
: Visitor)
6489 v
.enter_visit
(_n_expr
)
6490 v
.enter_visit
(_n_expr2
)
6493 redef class AStarshipExpr
6494 redef fun n_expr
=(n
)
6499 redef fun n_expr2
=(n
)
6505 private init empty_init
do end
6507 init init_astarshipexpr
(
6508 n_expr
: nullable AExpr,
6509 n_expr2
: nullable AExpr
6513 _n_expr
= n_expr
.as(not null)
6514 n_expr
.parent
= self
6515 _n_expr2
= n_expr2
.as(not null)
6516 n_expr2
.parent
= self
6519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6521 if _n_expr
== old_child
then
6522 if new_child
!= null then
6523 new_child
.parent
= self
6524 assert new_child
isa AExpr
6531 if _n_expr2
== old_child
then
6532 if new_child
!= null then
6533 new_child
.parent
= self
6534 assert new_child
isa AExpr
6535 _n_expr2
= new_child
6543 redef fun visit_all
(v
: Visitor)
6545 v
.enter_visit
(_n_expr
)
6546 v
.enter_visit
(_n_expr2
)
6549 redef fun visit_all_reverse
(v
: Visitor)
6551 v
.enter_visit
(_n_expr
)
6552 v
.enter_visit
(_n_expr2
)
6555 redef class AStarExpr
6556 redef fun n_expr
=(n
)
6561 redef fun n_expr2
=(n
)
6567 private init empty_init
do end
6569 init init_astarexpr
(
6570 n_expr
: nullable AExpr,
6571 n_expr2
: nullable AExpr
6575 _n_expr
= n_expr
.as(not null)
6576 n_expr
.parent
= self
6577 _n_expr2
= n_expr2
.as(not null)
6578 n_expr2
.parent
= self
6581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6583 if _n_expr
== old_child
then
6584 if new_child
!= null then
6585 new_child
.parent
= self
6586 assert new_child
isa AExpr
6593 if _n_expr2
== old_child
then
6594 if new_child
!= null then
6595 new_child
.parent
= self
6596 assert new_child
isa AExpr
6597 _n_expr2
= new_child
6605 redef fun visit_all
(v
: Visitor)
6607 v
.enter_visit
(_n_expr
)
6608 v
.enter_visit
(_n_expr2
)
6611 redef fun visit_all_reverse
(v
: Visitor)
6613 v
.enter_visit
(_n_expr
)
6614 v
.enter_visit
(_n_expr2
)
6617 redef class ASlashExpr
6618 redef fun n_expr
=(n
)
6623 redef fun n_expr2
=(n
)
6629 private init empty_init
do end
6631 init init_aslashexpr
(
6632 n_expr
: nullable AExpr,
6633 n_expr2
: nullable AExpr
6637 _n_expr
= n_expr
.as(not null)
6638 n_expr
.parent
= self
6639 _n_expr2
= n_expr2
.as(not null)
6640 n_expr2
.parent
= self
6643 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6645 if _n_expr
== old_child
then
6646 if new_child
!= null then
6647 new_child
.parent
= self
6648 assert new_child
isa AExpr
6655 if _n_expr2
== old_child
then
6656 if new_child
!= null then
6657 new_child
.parent
= self
6658 assert new_child
isa AExpr
6659 _n_expr2
= new_child
6667 redef fun visit_all
(v
: Visitor)
6669 v
.enter_visit
(_n_expr
)
6670 v
.enter_visit
(_n_expr2
)
6673 redef fun visit_all_reverse
(v
: Visitor)
6675 v
.enter_visit
(_n_expr
)
6676 v
.enter_visit
(_n_expr2
)
6679 redef class APercentExpr
6680 redef fun n_expr
=(n
)
6685 redef fun n_expr2
=(n
)
6691 private init empty_init
do end
6693 init init_apercentexpr
(
6694 n_expr
: nullable AExpr,
6695 n_expr2
: nullable AExpr
6699 _n_expr
= n_expr
.as(not null)
6700 n_expr
.parent
= self
6701 _n_expr2
= n_expr2
.as(not null)
6702 n_expr2
.parent
= self
6705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6707 if _n_expr
== old_child
then
6708 if new_child
!= null then
6709 new_child
.parent
= self
6710 assert new_child
isa AExpr
6717 if _n_expr2
== old_child
then
6718 if new_child
!= null then
6719 new_child
.parent
= self
6720 assert new_child
isa AExpr
6721 _n_expr2
= new_child
6729 redef fun visit_all
(v
: Visitor)
6731 v
.enter_visit
(_n_expr
)
6732 v
.enter_visit
(_n_expr2
)
6735 redef fun visit_all_reverse
(v
: Visitor)
6737 v
.enter_visit
(_n_expr
)
6738 v
.enter_visit
(_n_expr2
)
6741 redef class AUminusExpr
6742 redef fun n_minus
=(n
)
6747 redef fun n_expr
=(n
)
6753 private init empty_init
do end
6755 init init_auminusexpr
(
6756 n_minus
: nullable TMinus,
6757 n_expr
: nullable AExpr
6761 _n_minus
= n_minus
.as(not null)
6762 n_minus
.parent
= self
6763 _n_expr
= n_expr
.as(not null)
6764 n_expr
.parent
= self
6767 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6769 if _n_minus
== old_child
then
6770 if new_child
!= null then
6771 new_child
.parent
= self
6772 assert new_child
isa TMinus
6773 _n_minus
= new_child
6779 if _n_expr
== old_child
then
6780 if new_child
!= null then
6781 new_child
.parent
= self
6782 assert new_child
isa AExpr
6791 redef fun visit_all
(v
: Visitor)
6793 v
.enter_visit
(_n_minus
)
6794 v
.enter_visit
(_n_expr
)
6797 redef fun visit_all_reverse
(v
: Visitor)
6799 v
.enter_visit
(_n_minus
)
6800 v
.enter_visit
(_n_expr
)
6803 redef class ANewExpr
6804 redef fun n_kwnew
=(n
)
6809 redef fun n_type
=(n
)
6822 private init empty_init
do end
6824 init init_anewexpr
(
6825 n_kwnew
: nullable TKwnew,
6826 n_type
: nullable AType,
6828 n_args
: Collection[Object] # Should be Collection[AExpr]
6832 _n_kwnew
= n_kwnew
.as(not null)
6833 n_kwnew
.parent
= self
6834 _n_type
= n_type
.as(not null)
6835 n_type
.parent
= self
6837 if n_id
!= null then
6847 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6849 if _n_kwnew
== old_child
then
6850 if new_child
!= null then
6851 new_child
.parent
= self
6852 assert new_child
isa TKwnew
6853 _n_kwnew
= new_child
6859 if _n_type
== old_child
then
6860 if new_child
!= null then
6861 new_child
.parent
= self
6862 assert new_child
isa AType
6869 if _n_id
== old_child
then
6870 if new_child
!= null then
6871 new_child
.parent
= self
6872 assert new_child
isa TId
6879 for i
in [0.._n_args
.length
[ do
6880 if _n_args
[i
] == old_child
then
6881 if new_child
!= null then
6882 assert new_child
isa AExpr
6883 _n_args
[i
] = new_child
6884 new_child
.parent
= self
6886 _n_args
.remove_at
(i
)
6893 redef fun visit_all
(v
: Visitor)
6895 v
.enter_visit
(_n_kwnew
)
6896 v
.enter_visit
(_n_type
)
6897 if _n_id
!= null then
6898 v
.enter_visit
(_n_id
.as(not null))
6905 redef fun visit_all_reverse
(v
: Visitor)
6907 v
.enter_visit
(_n_kwnew
)
6908 v
.enter_visit
(_n_type
)
6909 if _n_id
!= null then
6910 v
.enter_visit
(_n_id
.as(not null))
6913 var i
= _n_args
.length
6915 v
.enter_visit
(_n_args
[i
])
6921 redef class AAttrExpr
6922 redef fun n_expr
=(n
)
6933 private init empty_init
do end
6935 init init_aattrexpr
(
6936 n_expr
: nullable AExpr,
6937 n_id
: nullable TAttrid
6941 _n_expr
= n_expr
.as(not null)
6942 n_expr
.parent
= self
6943 _n_id
= n_id
.as(not null)
6947 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6949 if _n_expr
== old_child
then
6950 if new_child
!= null then
6951 new_child
.parent
= self
6952 assert new_child
isa AExpr
6959 if _n_id
== old_child
then
6960 if new_child
!= null then
6961 new_child
.parent
= self
6962 assert new_child
isa TAttrid
6971 redef fun visit_all
(v
: Visitor)
6973 v
.enter_visit
(_n_expr
)
6974 v
.enter_visit
(_n_id
)
6977 redef fun visit_all_reverse
(v
: Visitor)
6979 v
.enter_visit
(_n_expr
)
6980 v
.enter_visit
(_n_id
)
6983 redef class AAttrAssignExpr
6984 redef fun n_expr
=(n
)
6994 redef fun n_assign
=(n
)
6999 redef fun n_value
=(n
)
7005 private init empty_init
do end
7007 init init_aattrassignexpr
(
7008 n_expr
: nullable AExpr,
7009 n_id
: nullable TAttrid,
7010 n_assign
: nullable TAssign,
7011 n_value
: nullable AExpr
7015 _n_expr
= n_expr
.as(not null)
7016 n_expr
.parent
= self
7017 _n_id
= n_id
.as(not null)
7019 _n_assign
= n_assign
.as(not null)
7020 n_assign
.parent
= self
7021 _n_value
= n_value
.as(not null)
7022 n_value
.parent
= self
7025 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7027 if _n_expr
== old_child
then
7028 if new_child
!= null then
7029 new_child
.parent
= self
7030 assert new_child
isa AExpr
7037 if _n_id
== old_child
then
7038 if new_child
!= null then
7039 new_child
.parent
= self
7040 assert new_child
isa TAttrid
7047 if _n_assign
== old_child
then
7048 if new_child
!= null then
7049 new_child
.parent
= self
7050 assert new_child
isa TAssign
7051 _n_assign
= new_child
7057 if _n_value
== old_child
then
7058 if new_child
!= null then
7059 new_child
.parent
= self
7060 assert new_child
isa AExpr
7061 _n_value
= new_child
7069 redef fun visit_all
(v
: Visitor)
7071 v
.enter_visit
(_n_expr
)
7072 v
.enter_visit
(_n_id
)
7073 v
.enter_visit
(_n_assign
)
7074 v
.enter_visit
(_n_value
)
7077 redef fun visit_all_reverse
(v
: Visitor)
7079 v
.enter_visit
(_n_expr
)
7080 v
.enter_visit
(_n_id
)
7081 v
.enter_visit
(_n_assign
)
7082 v
.enter_visit
(_n_value
)
7085 redef class AAttrReassignExpr
7086 redef fun n_expr
=(n
)
7096 redef fun n_assign_op
=(n
)
7101 redef fun n_value
=(n
)
7107 private init empty_init
do end
7109 init init_aattrreassignexpr
(
7110 n_expr
: nullable AExpr,
7111 n_id
: nullable TAttrid,
7112 n_assign_op
: nullable AAssignOp,
7113 n_value
: nullable AExpr
7117 _n_expr
= n_expr
.as(not null)
7118 n_expr
.parent
= self
7119 _n_id
= n_id
.as(not null)
7121 _n_assign_op
= n_assign_op
.as(not null)
7122 n_assign_op
.parent
= self
7123 _n_value
= n_value
.as(not null)
7124 n_value
.parent
= self
7127 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7129 if _n_expr
== old_child
then
7130 if new_child
!= null then
7131 new_child
.parent
= self
7132 assert new_child
isa AExpr
7139 if _n_id
== old_child
then
7140 if new_child
!= null then
7141 new_child
.parent
= self
7142 assert new_child
isa TAttrid
7149 if _n_assign_op
== old_child
then
7150 if new_child
!= null then
7151 new_child
.parent
= self
7152 assert new_child
isa AAssignOp
7153 _n_assign_op
= new_child
7159 if _n_value
== old_child
then
7160 if new_child
!= null then
7161 new_child
.parent
= self
7162 assert new_child
isa AExpr
7163 _n_value
= new_child
7171 redef fun visit_all
(v
: Visitor)
7173 v
.enter_visit
(_n_expr
)
7174 v
.enter_visit
(_n_id
)
7175 v
.enter_visit
(_n_assign_op
)
7176 v
.enter_visit
(_n_value
)
7179 redef fun visit_all_reverse
(v
: Visitor)
7181 v
.enter_visit
(_n_expr
)
7182 v
.enter_visit
(_n_id
)
7183 v
.enter_visit
(_n_assign_op
)
7184 v
.enter_visit
(_n_value
)
7187 redef class ACallExpr
7188 redef fun n_expr
=(n
)
7199 private init empty_init
do end
7201 init init_acallexpr
(
7202 n_expr
: nullable AExpr,
7204 n_args
: Collection[Object], # Should be Collection[AExpr]
7205 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7209 _n_expr
= n_expr
.as(not null)
7210 n_expr
.parent
= self
7211 _n_id
= n_id
.as(not null)
7218 for n
in n_closure_defs
do
7219 assert n
isa AClosureDef
7220 _n_closure_defs
.add
(n
)
7225 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7227 if _n_expr
== old_child
then
7228 if new_child
!= null then
7229 new_child
.parent
= self
7230 assert new_child
isa AExpr
7237 if _n_id
== old_child
then
7238 if new_child
!= null then
7239 new_child
.parent
= self
7240 assert new_child
isa TId
7247 for i
in [0.._n_args
.length
[ do
7248 if _n_args
[i
] == old_child
then
7249 if new_child
!= null then
7250 assert new_child
isa AExpr
7251 _n_args
[i
] = new_child
7252 new_child
.parent
= self
7254 _n_args
.remove_at
(i
)
7259 for i
in [0.._n_closure_defs
.length
[ do
7260 if _n_closure_defs
[i
] == old_child
then
7261 if new_child
!= null then
7262 assert new_child
isa AClosureDef
7263 _n_closure_defs
[i
] = new_child
7264 new_child
.parent
= self
7266 _n_closure_defs
.remove_at
(i
)
7273 redef fun visit_all
(v
: Visitor)
7275 v
.enter_visit
(_n_expr
)
7276 v
.enter_visit
(_n_id
)
7280 for n
in _n_closure_defs
do
7285 redef fun visit_all_reverse
(v
: Visitor)
7287 v
.enter_visit
(_n_expr
)
7288 v
.enter_visit
(_n_id
)
7290 var i
= _n_args
.length
7292 v
.enter_visit
(_n_args
[i
])
7297 var i
= _n_closure_defs
.length
7299 v
.enter_visit
(_n_closure_defs
[i
])
7305 redef class ACallAssignExpr
7306 redef fun n_expr
=(n
)
7316 redef fun n_assign
=(n
)
7321 redef fun n_value
=(n
)
7327 private init empty_init
do end
7329 init init_acallassignexpr
(
7330 n_expr
: nullable AExpr,
7332 n_args
: Collection[Object], # Should be Collection[AExpr]
7333 n_assign
: nullable TAssign,
7334 n_value
: nullable AExpr
7338 _n_expr
= n_expr
.as(not null)
7339 n_expr
.parent
= self
7340 _n_id
= n_id
.as(not null)
7347 _n_assign
= n_assign
.as(not null)
7348 n_assign
.parent
= self
7349 _n_value
= n_value
.as(not null)
7350 n_value
.parent
= self
7353 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7355 if _n_expr
== old_child
then
7356 if new_child
!= null then
7357 new_child
.parent
= self
7358 assert new_child
isa AExpr
7365 if _n_id
== old_child
then
7366 if new_child
!= null then
7367 new_child
.parent
= self
7368 assert new_child
isa TId
7375 for i
in [0.._n_args
.length
[ do
7376 if _n_args
[i
] == old_child
then
7377 if new_child
!= null then
7378 assert new_child
isa AExpr
7379 _n_args
[i
] = new_child
7380 new_child
.parent
= self
7382 _n_args
.remove_at
(i
)
7387 if _n_assign
== old_child
then
7388 if new_child
!= null then
7389 new_child
.parent
= self
7390 assert new_child
isa TAssign
7391 _n_assign
= new_child
7397 if _n_value
== old_child
then
7398 if new_child
!= null then
7399 new_child
.parent
= self
7400 assert new_child
isa AExpr
7401 _n_value
= new_child
7409 redef fun visit_all
(v
: Visitor)
7411 v
.enter_visit
(_n_expr
)
7412 v
.enter_visit
(_n_id
)
7416 v
.enter_visit
(_n_assign
)
7417 v
.enter_visit
(_n_value
)
7420 redef fun visit_all_reverse
(v
: Visitor)
7422 v
.enter_visit
(_n_expr
)
7423 v
.enter_visit
(_n_id
)
7425 var i
= _n_args
.length
7427 v
.enter_visit
(_n_args
[i
])
7431 v
.enter_visit
(_n_assign
)
7432 v
.enter_visit
(_n_value
)
7435 redef class ACallReassignExpr
7436 redef fun n_expr
=(n
)
7446 redef fun n_assign_op
=(n
)
7451 redef fun n_value
=(n
)
7457 private init empty_init
do end
7459 init init_acallreassignexpr
(
7460 n_expr
: nullable AExpr,
7462 n_args
: Collection[Object], # Should be Collection[AExpr]
7463 n_assign_op
: nullable AAssignOp,
7464 n_value
: nullable AExpr
7468 _n_expr
= n_expr
.as(not null)
7469 n_expr
.parent
= self
7470 _n_id
= n_id
.as(not null)
7477 _n_assign_op
= n_assign_op
.as(not null)
7478 n_assign_op
.parent
= self
7479 _n_value
= n_value
.as(not null)
7480 n_value
.parent
= self
7483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7485 if _n_expr
== old_child
then
7486 if new_child
!= null then
7487 new_child
.parent
= self
7488 assert new_child
isa AExpr
7495 if _n_id
== old_child
then
7496 if new_child
!= null then
7497 new_child
.parent
= self
7498 assert new_child
isa TId
7505 for i
in [0.._n_args
.length
[ do
7506 if _n_args
[i
] == old_child
then
7507 if new_child
!= null then
7508 assert new_child
isa AExpr
7509 _n_args
[i
] = new_child
7510 new_child
.parent
= self
7512 _n_args
.remove_at
(i
)
7517 if _n_assign_op
== old_child
then
7518 if new_child
!= null then
7519 new_child
.parent
= self
7520 assert new_child
isa AAssignOp
7521 _n_assign_op
= new_child
7527 if _n_value
== old_child
then
7528 if new_child
!= null then
7529 new_child
.parent
= self
7530 assert new_child
isa AExpr
7531 _n_value
= new_child
7539 redef fun visit_all
(v
: Visitor)
7541 v
.enter_visit
(_n_expr
)
7542 v
.enter_visit
(_n_id
)
7546 v
.enter_visit
(_n_assign_op
)
7547 v
.enter_visit
(_n_value
)
7550 redef fun visit_all_reverse
(v
: Visitor)
7552 v
.enter_visit
(_n_expr
)
7553 v
.enter_visit
(_n_id
)
7555 var i
= _n_args
.length
7557 v
.enter_visit
(_n_args
[i
])
7561 v
.enter_visit
(_n_assign_op
)
7562 v
.enter_visit
(_n_value
)
7565 redef class ASuperExpr
7566 redef fun n_qualified
=(n
)
7573 redef fun n_kwsuper
=(n
)
7579 private init empty_init
do end
7581 init init_asuperexpr
(
7582 n_qualified
: nullable AQualified,
7583 n_kwsuper
: nullable TKwsuper,
7584 n_args
: Collection[Object] # Should be Collection[AExpr]
7588 _n_qualified
= n_qualified
7589 if n_qualified
!= null then
7590 n_qualified
.parent
= self
7592 _n_kwsuper
= n_kwsuper
.as(not null)
7593 n_kwsuper
.parent
= self
7601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7603 if _n_qualified
== old_child
then
7604 if new_child
!= null then
7605 new_child
.parent
= self
7606 assert new_child
isa AQualified
7607 _n_qualified
= new_child
7613 if _n_kwsuper
== old_child
then
7614 if new_child
!= null then
7615 new_child
.parent
= self
7616 assert new_child
isa TKwsuper
7617 _n_kwsuper
= new_child
7623 for i
in [0.._n_args
.length
[ do
7624 if _n_args
[i
] == old_child
then
7625 if new_child
!= null then
7626 assert new_child
isa AExpr
7627 _n_args
[i
] = new_child
7628 new_child
.parent
= self
7630 _n_args
.remove_at
(i
)
7637 redef fun visit_all
(v
: Visitor)
7639 if _n_qualified
!= null then
7640 v
.enter_visit
(_n_qualified
.as(not null))
7642 v
.enter_visit
(_n_kwsuper
)
7648 redef fun visit_all_reverse
(v
: Visitor)
7650 if _n_qualified
!= null then
7651 v
.enter_visit
(_n_qualified
.as(not null))
7653 v
.enter_visit
(_n_kwsuper
)
7655 var i
= _n_args
.length
7657 v
.enter_visit
(_n_args
[i
])
7663 redef class AInitExpr
7664 redef fun n_expr
=(n
)
7669 redef fun n_kwinit
=(n
)
7675 private init empty_init
do end
7677 init init_ainitexpr
(
7678 n_expr
: nullable AExpr,
7679 n_kwinit
: nullable TKwinit,
7680 n_args
: Collection[Object] # Should be Collection[AExpr]
7684 _n_expr
= n_expr
.as(not null)
7685 n_expr
.parent
= self
7686 _n_kwinit
= n_kwinit
.as(not null)
7687 n_kwinit
.parent
= self
7695 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7697 if _n_expr
== old_child
then
7698 if new_child
!= null then
7699 new_child
.parent
= self
7700 assert new_child
isa AExpr
7707 if _n_kwinit
== old_child
then
7708 if new_child
!= null then
7709 new_child
.parent
= self
7710 assert new_child
isa TKwinit
7711 _n_kwinit
= new_child
7717 for i
in [0.._n_args
.length
[ do
7718 if _n_args
[i
] == old_child
then
7719 if new_child
!= null then
7720 assert new_child
isa AExpr
7721 _n_args
[i
] = new_child
7722 new_child
.parent
= self
7724 _n_args
.remove_at
(i
)
7731 redef fun visit_all
(v
: Visitor)
7733 v
.enter_visit
(_n_expr
)
7734 v
.enter_visit
(_n_kwinit
)
7740 redef fun visit_all_reverse
(v
: Visitor)
7742 v
.enter_visit
(_n_expr
)
7743 v
.enter_visit
(_n_kwinit
)
7745 var i
= _n_args
.length
7747 v
.enter_visit
(_n_args
[i
])
7753 redef class ABraExpr
7754 redef fun n_expr
=(n
)
7760 private init empty_init
do end
7762 init init_abraexpr
(
7763 n_expr
: nullable AExpr,
7764 n_args
: Collection[Object], # Should be Collection[AExpr]
7765 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7769 _n_expr
= n_expr
.as(not null)
7770 n_expr
.parent
= self
7776 for n
in n_closure_defs
do
7777 assert n
isa AClosureDef
7778 _n_closure_defs
.add
(n
)
7783 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7785 if _n_expr
== old_child
then
7786 if new_child
!= null then
7787 new_child
.parent
= self
7788 assert new_child
isa AExpr
7795 for i
in [0.._n_args
.length
[ do
7796 if _n_args
[i
] == old_child
then
7797 if new_child
!= null then
7798 assert new_child
isa AExpr
7799 _n_args
[i
] = new_child
7800 new_child
.parent
= self
7802 _n_args
.remove_at
(i
)
7807 for i
in [0.._n_closure_defs
.length
[ do
7808 if _n_closure_defs
[i
] == old_child
then
7809 if new_child
!= null then
7810 assert new_child
isa AClosureDef
7811 _n_closure_defs
[i
] = new_child
7812 new_child
.parent
= self
7814 _n_closure_defs
.remove_at
(i
)
7821 redef fun visit_all
(v
: Visitor)
7823 v
.enter_visit
(_n_expr
)
7827 for n
in _n_closure_defs
do
7832 redef fun visit_all_reverse
(v
: Visitor)
7834 v
.enter_visit
(_n_expr
)
7836 var i
= _n_args
.length
7838 v
.enter_visit
(_n_args
[i
])
7843 var i
= _n_closure_defs
.length
7845 v
.enter_visit
(_n_closure_defs
[i
])
7851 redef class ABraAssignExpr
7852 redef fun n_expr
=(n
)
7857 redef fun n_assign
=(n
)
7862 redef fun n_value
=(n
)
7868 private init empty_init
do end
7870 init init_abraassignexpr
(
7871 n_expr
: nullable AExpr,
7872 n_args
: Collection[Object], # Should be Collection[AExpr]
7873 n_assign
: nullable TAssign,
7874 n_value
: nullable AExpr
7878 _n_expr
= n_expr
.as(not null)
7879 n_expr
.parent
= self
7885 _n_assign
= n_assign
.as(not null)
7886 n_assign
.parent
= self
7887 _n_value
= n_value
.as(not null)
7888 n_value
.parent
= self
7891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7893 if _n_expr
== old_child
then
7894 if new_child
!= null then
7895 new_child
.parent
= self
7896 assert new_child
isa AExpr
7903 for i
in [0.._n_args
.length
[ do
7904 if _n_args
[i
] == old_child
then
7905 if new_child
!= null then
7906 assert new_child
isa AExpr
7907 _n_args
[i
] = new_child
7908 new_child
.parent
= self
7910 _n_args
.remove_at
(i
)
7915 if _n_assign
== old_child
then
7916 if new_child
!= null then
7917 new_child
.parent
= self
7918 assert new_child
isa TAssign
7919 _n_assign
= new_child
7925 if _n_value
== old_child
then
7926 if new_child
!= null then
7927 new_child
.parent
= self
7928 assert new_child
isa AExpr
7929 _n_value
= new_child
7937 redef fun visit_all
(v
: Visitor)
7939 v
.enter_visit
(_n_expr
)
7943 v
.enter_visit
(_n_assign
)
7944 v
.enter_visit
(_n_value
)
7947 redef fun visit_all_reverse
(v
: Visitor)
7949 v
.enter_visit
(_n_expr
)
7951 var i
= _n_args
.length
7953 v
.enter_visit
(_n_args
[i
])
7957 v
.enter_visit
(_n_assign
)
7958 v
.enter_visit
(_n_value
)
7961 redef class ABraReassignExpr
7962 redef fun n_expr
=(n
)
7967 redef fun n_assign_op
=(n
)
7972 redef fun n_value
=(n
)
7978 private init empty_init
do end
7980 init init_abrareassignexpr
(
7981 n_expr
: nullable AExpr,
7982 n_args
: Collection[Object], # Should be Collection[AExpr]
7983 n_assign_op
: nullable AAssignOp,
7984 n_value
: nullable AExpr
7988 _n_expr
= n_expr
.as(not null)
7989 n_expr
.parent
= self
7995 _n_assign_op
= n_assign_op
.as(not null)
7996 n_assign_op
.parent
= self
7997 _n_value
= n_value
.as(not null)
7998 n_value
.parent
= self
8001 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8003 if _n_expr
== old_child
then
8004 if new_child
!= null then
8005 new_child
.parent
= self
8006 assert new_child
isa AExpr
8013 for i
in [0.._n_args
.length
[ do
8014 if _n_args
[i
] == old_child
then
8015 if new_child
!= null then
8016 assert new_child
isa AExpr
8017 _n_args
[i
] = new_child
8018 new_child
.parent
= self
8020 _n_args
.remove_at
(i
)
8025 if _n_assign_op
== old_child
then
8026 if new_child
!= null then
8027 new_child
.parent
= self
8028 assert new_child
isa AAssignOp
8029 _n_assign_op
= new_child
8035 if _n_value
== old_child
then
8036 if new_child
!= null then
8037 new_child
.parent
= self
8038 assert new_child
isa AExpr
8039 _n_value
= new_child
8047 redef fun visit_all
(v
: Visitor)
8049 v
.enter_visit
(_n_expr
)
8053 v
.enter_visit
(_n_assign_op
)
8054 v
.enter_visit
(_n_value
)
8057 redef fun visit_all_reverse
(v
: Visitor)
8059 v
.enter_visit
(_n_expr
)
8061 var i
= _n_args
.length
8063 v
.enter_visit
(_n_args
[i
])
8067 v
.enter_visit
(_n_assign_op
)
8068 v
.enter_visit
(_n_value
)
8071 redef class AClosureCallExpr
8078 private init empty_init
do end
8080 init init_aclosurecallexpr
(
8082 n_args
: Collection[Object], # Should be Collection[AExpr]
8083 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
8087 _n_id
= n_id
.as(not null)
8094 for n
in n_closure_defs
do
8095 assert n
isa AClosureDef
8096 _n_closure_defs
.add
(n
)
8101 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8103 if _n_id
== old_child
then
8104 if new_child
!= null then
8105 new_child
.parent
= self
8106 assert new_child
isa TId
8113 for i
in [0.._n_args
.length
[ do
8114 if _n_args
[i
] == old_child
then
8115 if new_child
!= null then
8116 assert new_child
isa AExpr
8117 _n_args
[i
] = new_child
8118 new_child
.parent
= self
8120 _n_args
.remove_at
(i
)
8125 for i
in [0.._n_closure_defs
.length
[ do
8126 if _n_closure_defs
[i
] == old_child
then
8127 if new_child
!= null then
8128 assert new_child
isa AClosureDef
8129 _n_closure_defs
[i
] = new_child
8130 new_child
.parent
= self
8132 _n_closure_defs
.remove_at
(i
)
8139 redef fun visit_all
(v
: Visitor)
8141 v
.enter_visit
(_n_id
)
8145 for n
in _n_closure_defs
do
8150 redef fun visit_all_reverse
(v
: Visitor)
8152 v
.enter_visit
(_n_id
)
8154 var i
= _n_args
.length
8156 v
.enter_visit
(_n_args
[i
])
8161 var i
= _n_closure_defs
.length
8163 v
.enter_visit
(_n_closure_defs
[i
])
8169 redef class AVarExpr
8176 private init empty_init
do end
8178 init init_avarexpr
(
8183 _n_id
= n_id
.as(not null)
8187 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8189 if _n_id
== old_child
then
8190 if new_child
!= null then
8191 new_child
.parent
= self
8192 assert new_child
isa TId
8201 redef fun visit_all
(v
: Visitor)
8203 v
.enter_visit
(_n_id
)
8206 redef fun visit_all_reverse
(v
: Visitor)
8208 v
.enter_visit
(_n_id
)
8211 redef class AVarAssignExpr
8217 redef fun n_assign
=(n
)
8222 redef fun n_value
=(n
)
8228 private init empty_init
do end
8230 init init_avarassignexpr
(
8232 n_assign
: nullable TAssign,
8233 n_value
: nullable AExpr
8237 _n_id
= n_id
.as(not null)
8239 _n_assign
= n_assign
.as(not null)
8240 n_assign
.parent
= self
8241 _n_value
= n_value
.as(not null)
8242 n_value
.parent
= self
8245 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8247 if _n_id
== old_child
then
8248 if new_child
!= null then
8249 new_child
.parent
= self
8250 assert new_child
isa TId
8257 if _n_assign
== old_child
then
8258 if new_child
!= null then
8259 new_child
.parent
= self
8260 assert new_child
isa TAssign
8261 _n_assign
= new_child
8267 if _n_value
== old_child
then
8268 if new_child
!= null then
8269 new_child
.parent
= self
8270 assert new_child
isa AExpr
8271 _n_value
= new_child
8279 redef fun visit_all
(v
: Visitor)
8281 v
.enter_visit
(_n_id
)
8282 v
.enter_visit
(_n_assign
)
8283 v
.enter_visit
(_n_value
)
8286 redef fun visit_all_reverse
(v
: Visitor)
8288 v
.enter_visit
(_n_id
)
8289 v
.enter_visit
(_n_assign
)
8290 v
.enter_visit
(_n_value
)
8293 redef class AVarReassignExpr
8299 redef fun n_assign_op
=(n
)
8304 redef fun n_value
=(n
)
8310 private init empty_init
do end
8312 init init_avarreassignexpr
(
8314 n_assign_op
: nullable AAssignOp,
8315 n_value
: nullable AExpr
8319 _n_id
= n_id
.as(not null)
8321 _n_assign_op
= n_assign_op
.as(not null)
8322 n_assign_op
.parent
= self
8323 _n_value
= n_value
.as(not null)
8324 n_value
.parent
= self
8327 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8329 if _n_id
== old_child
then
8330 if new_child
!= null then
8331 new_child
.parent
= self
8332 assert new_child
isa TId
8339 if _n_assign_op
== old_child
then
8340 if new_child
!= null then
8341 new_child
.parent
= self
8342 assert new_child
isa AAssignOp
8343 _n_assign_op
= new_child
8349 if _n_value
== old_child
then
8350 if new_child
!= null then
8351 new_child
.parent
= self
8352 assert new_child
isa AExpr
8353 _n_value
= new_child
8361 redef fun visit_all
(v
: Visitor)
8363 v
.enter_visit
(_n_id
)
8364 v
.enter_visit
(_n_assign_op
)
8365 v
.enter_visit
(_n_value
)
8368 redef fun visit_all_reverse
(v
: Visitor)
8370 v
.enter_visit
(_n_id
)
8371 v
.enter_visit
(_n_assign_op
)
8372 v
.enter_visit
(_n_value
)
8375 redef class ARangeExpr
8376 redef fun n_expr
=(n
)
8381 redef fun n_expr2
=(n
)
8387 private init empty_init
do end
8389 init init_arangeexpr
(
8390 n_expr
: nullable AExpr,
8391 n_expr2
: nullable AExpr
8395 _n_expr
= n_expr
.as(not null)
8396 n_expr
.parent
= self
8397 _n_expr2
= n_expr2
.as(not null)
8398 n_expr2
.parent
= self
8401 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8403 if _n_expr
== old_child
then
8404 if new_child
!= null then
8405 new_child
.parent
= self
8406 assert new_child
isa AExpr
8413 if _n_expr2
== old_child
then
8414 if new_child
!= null then
8415 new_child
.parent
= self
8416 assert new_child
isa AExpr
8417 _n_expr2
= new_child
8425 redef fun visit_all
(v
: Visitor)
8427 v
.enter_visit
(_n_expr
)
8428 v
.enter_visit
(_n_expr2
)
8431 redef fun visit_all_reverse
(v
: Visitor)
8433 v
.enter_visit
(_n_expr
)
8434 v
.enter_visit
(_n_expr2
)
8437 redef class ACrangeExpr
8438 redef fun n_expr
=(n
)
8443 redef fun n_expr2
=(n
)
8449 private init empty_init
do end
8451 init init_acrangeexpr
(
8452 n_expr
: nullable AExpr,
8453 n_expr2
: nullable AExpr
8457 _n_expr
= n_expr
.as(not null)
8458 n_expr
.parent
= self
8459 _n_expr2
= n_expr2
.as(not null)
8460 n_expr2
.parent
= self
8463 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8465 if _n_expr
== old_child
then
8466 if new_child
!= null then
8467 new_child
.parent
= self
8468 assert new_child
isa AExpr
8475 if _n_expr2
== old_child
then
8476 if new_child
!= null then
8477 new_child
.parent
= self
8478 assert new_child
isa AExpr
8479 _n_expr2
= new_child
8487 redef fun visit_all
(v
: Visitor)
8489 v
.enter_visit
(_n_expr
)
8490 v
.enter_visit
(_n_expr2
)
8493 redef fun visit_all_reverse
(v
: Visitor)
8495 v
.enter_visit
(_n_expr
)
8496 v
.enter_visit
(_n_expr2
)
8499 redef class AOrangeExpr
8500 redef fun n_expr
=(n
)
8505 redef fun n_expr2
=(n
)
8511 private init empty_init
do end
8513 init init_aorangeexpr
(
8514 n_expr
: nullable AExpr,
8515 n_expr2
: nullable AExpr
8519 _n_expr
= n_expr
.as(not null)
8520 n_expr
.parent
= self
8521 _n_expr2
= n_expr2
.as(not null)
8522 n_expr2
.parent
= self
8525 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8527 if _n_expr
== old_child
then
8528 if new_child
!= null then
8529 new_child
.parent
= self
8530 assert new_child
isa AExpr
8537 if _n_expr2
== old_child
then
8538 if new_child
!= null then
8539 new_child
.parent
= self
8540 assert new_child
isa AExpr
8541 _n_expr2
= new_child
8549 redef fun visit_all
(v
: Visitor)
8551 v
.enter_visit
(_n_expr
)
8552 v
.enter_visit
(_n_expr2
)
8555 redef fun visit_all_reverse
(v
: Visitor)
8557 v
.enter_visit
(_n_expr
)
8558 v
.enter_visit
(_n_expr2
)
8561 redef class AArrayExpr
8563 private init empty_init
do end
8565 init init_aarrayexpr
(
8566 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8579 for i
in [0.._n_exprs
.length
[ do
8580 if _n_exprs
[i
] == old_child
then
8581 if new_child
!= null then
8582 assert new_child
isa AExpr
8583 _n_exprs
[i
] = new_child
8584 new_child
.parent
= self
8586 _n_exprs
.remove_at
(i
)
8593 redef fun visit_all
(v
: Visitor)
8595 for n
in _n_exprs
do
8600 redef fun visit_all_reverse
(v
: Visitor)
8603 var i
= _n_exprs
.length
8605 v
.enter_visit
(_n_exprs
[i
])
8611 redef class ASelfExpr
8612 redef fun n_kwself
=(n
)
8618 private init empty_init
do end
8620 init init_aselfexpr
(
8621 n_kwself
: nullable TKwself
8625 _n_kwself
= n_kwself
.as(not null)
8626 n_kwself
.parent
= self
8629 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8631 if _n_kwself
== old_child
then
8632 if new_child
!= null then
8633 new_child
.parent
= self
8634 assert new_child
isa TKwself
8635 _n_kwself
= new_child
8643 redef fun visit_all
(v
: Visitor)
8645 v
.enter_visit
(_n_kwself
)
8648 redef fun visit_all_reverse
(v
: Visitor)
8650 v
.enter_visit
(_n_kwself
)
8653 redef class AImplicitSelfExpr
8655 private init empty_init
do end
8657 init init_aimplicitselfexpr
8662 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8666 redef fun visit_all
(v
: Visitor)
8670 redef fun visit_all_reverse
(v
: Visitor)
8674 redef class ATrueExpr
8675 redef fun n_kwtrue
=(n
)
8681 private init empty_init
do end
8683 init init_atrueexpr
(
8684 n_kwtrue
: nullable TKwtrue
8688 _n_kwtrue
= n_kwtrue
.as(not null)
8689 n_kwtrue
.parent
= self
8692 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8694 if _n_kwtrue
== old_child
then
8695 if new_child
!= null then
8696 new_child
.parent
= self
8697 assert new_child
isa TKwtrue
8698 _n_kwtrue
= new_child
8706 redef fun visit_all
(v
: Visitor)
8708 v
.enter_visit
(_n_kwtrue
)
8711 redef fun visit_all_reverse
(v
: Visitor)
8713 v
.enter_visit
(_n_kwtrue
)
8716 redef class AFalseExpr
8717 redef fun n_kwfalse
=(n
)
8723 private init empty_init
do end
8725 init init_afalseexpr
(
8726 n_kwfalse
: nullable TKwfalse
8730 _n_kwfalse
= n_kwfalse
.as(not null)
8731 n_kwfalse
.parent
= self
8734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8736 if _n_kwfalse
== old_child
then
8737 if new_child
!= null then
8738 new_child
.parent
= self
8739 assert new_child
isa TKwfalse
8740 _n_kwfalse
= new_child
8748 redef fun visit_all
(v
: Visitor)
8750 v
.enter_visit
(_n_kwfalse
)
8753 redef fun visit_all_reverse
(v
: Visitor)
8755 v
.enter_visit
(_n_kwfalse
)
8758 redef class ANullExpr
8759 redef fun n_kwnull
=(n
)
8765 private init empty_init
do end
8767 init init_anullexpr
(
8768 n_kwnull
: nullable TKwnull
8772 _n_kwnull
= n_kwnull
.as(not null)
8773 n_kwnull
.parent
= self
8776 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8778 if _n_kwnull
== old_child
then
8779 if new_child
!= null then
8780 new_child
.parent
= self
8781 assert new_child
isa TKwnull
8782 _n_kwnull
= new_child
8790 redef fun visit_all
(v
: Visitor)
8792 v
.enter_visit
(_n_kwnull
)
8795 redef fun visit_all_reverse
(v
: Visitor)
8797 v
.enter_visit
(_n_kwnull
)
8800 redef class AIntExpr
8801 redef fun n_number
=(n
)
8807 private init empty_init
do end
8809 init init_aintexpr
(
8810 n_number
: nullable TNumber
8814 _n_number
= n_number
.as(not null)
8815 n_number
.parent
= self
8818 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8820 if _n_number
== old_child
then
8821 if new_child
!= null then
8822 new_child
.parent
= self
8823 assert new_child
isa TNumber
8824 _n_number
= new_child
8832 redef fun visit_all
(v
: Visitor)
8834 v
.enter_visit
(_n_number
)
8837 redef fun visit_all_reverse
(v
: Visitor)
8839 v
.enter_visit
(_n_number
)
8842 redef class AFloatExpr
8843 redef fun n_float
=(n
)
8849 private init empty_init
do end
8851 init init_afloatexpr
(
8852 n_float
: nullable TFloat
8856 _n_float
= n_float
.as(not null)
8857 n_float
.parent
= self
8860 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8862 if _n_float
== old_child
then
8863 if new_child
!= null then
8864 new_child
.parent
= self
8865 assert new_child
isa TFloat
8866 _n_float
= new_child
8874 redef fun visit_all
(v
: Visitor)
8876 v
.enter_visit
(_n_float
)
8879 redef fun visit_all_reverse
(v
: Visitor)
8881 v
.enter_visit
(_n_float
)
8884 redef class ACharExpr
8885 redef fun n_char
=(n
)
8891 private init empty_init
do end
8893 init init_acharexpr
(
8894 n_char
: nullable TChar
8898 _n_char
= n_char
.as(not null)
8899 n_char
.parent
= self
8902 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8904 if _n_char
== old_child
then
8905 if new_child
!= null then
8906 new_child
.parent
= self
8907 assert new_child
isa TChar
8916 redef fun visit_all
(v
: Visitor)
8918 v
.enter_visit
(_n_char
)
8921 redef fun visit_all_reverse
(v
: Visitor)
8923 v
.enter_visit
(_n_char
)
8926 redef class AStringExpr
8927 redef fun n_string
=(n
)
8933 private init empty_init
do end
8935 init init_astringexpr
(
8936 n_string
: nullable TString
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 TString
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 AStartStringExpr
8969 redef fun n_string
=(n
)
8975 private init empty_init
do end
8977 init init_astartstringexpr
(
8978 n_string
: nullable TStartString
8982 _n_string
= n_string
.as(not null)
8983 n_string
.parent
= self
8986 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8988 if _n_string
== old_child
then
8989 if new_child
!= null then
8990 new_child
.parent
= self
8991 assert new_child
isa TStartString
8992 _n_string
= new_child
9000 redef fun visit_all
(v
: Visitor)
9002 v
.enter_visit
(_n_string
)
9005 redef fun visit_all_reverse
(v
: Visitor)
9007 v
.enter_visit
(_n_string
)
9010 redef class AMidStringExpr
9011 redef fun n_string
=(n
)
9017 private init empty_init
do end
9019 init init_amidstringexpr
(
9020 n_string
: nullable TMidString
9024 _n_string
= n_string
.as(not null)
9025 n_string
.parent
= self
9028 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9030 if _n_string
== old_child
then
9031 if new_child
!= null then
9032 new_child
.parent
= self
9033 assert new_child
isa TMidString
9034 _n_string
= new_child
9042 redef fun visit_all
(v
: Visitor)
9044 v
.enter_visit
(_n_string
)
9047 redef fun visit_all_reverse
(v
: Visitor)
9049 v
.enter_visit
(_n_string
)
9052 redef class AEndStringExpr
9053 redef fun n_string
=(n
)
9059 private init empty_init
do end
9061 init init_aendstringexpr
(
9062 n_string
: nullable TEndString
9066 _n_string
= n_string
.as(not null)
9067 n_string
.parent
= self
9070 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9072 if _n_string
== old_child
then
9073 if new_child
!= null then
9074 new_child
.parent
= self
9075 assert new_child
isa TEndString
9076 _n_string
= new_child
9084 redef fun visit_all
(v
: Visitor)
9086 v
.enter_visit
(_n_string
)
9089 redef fun visit_all_reverse
(v
: Visitor)
9091 v
.enter_visit
(_n_string
)
9094 redef class ASuperstringExpr
9096 private init empty_init
do end
9098 init init_asuperstringexpr
(
9099 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9110 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9112 for i
in [0.._n_exprs
.length
[ do
9113 if _n_exprs
[i
] == old_child
then
9114 if new_child
!= null then
9115 assert new_child
isa AExpr
9116 _n_exprs
[i
] = new_child
9117 new_child
.parent
= self
9119 _n_exprs
.remove_at
(i
)
9126 redef fun visit_all
(v
: Visitor)
9128 for n
in _n_exprs
do
9133 redef fun visit_all_reverse
(v
: Visitor)
9136 var i
= _n_exprs
.length
9138 v
.enter_visit
(_n_exprs
[i
])
9144 redef class AParExpr
9145 redef fun n_expr
=(n
)
9151 private init empty_init
do end
9153 init init_aparexpr
(
9154 n_expr
: nullable AExpr
9158 _n_expr
= n_expr
.as(not null)
9159 n_expr
.parent
= self
9162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9164 if _n_expr
== old_child
then
9165 if new_child
!= null then
9166 new_child
.parent
= self
9167 assert new_child
isa AExpr
9176 redef fun visit_all
(v
: Visitor)
9178 v
.enter_visit
(_n_expr
)
9181 redef fun visit_all_reverse
(v
: Visitor)
9183 v
.enter_visit
(_n_expr
)
9186 redef class AAsCastExpr
9187 redef fun n_expr
=(n
)
9192 redef fun n_kwas
=(n
)
9197 redef fun n_type
=(n
)
9203 private init empty_init
do end
9205 init init_aascastexpr
(
9206 n_expr
: nullable AExpr,
9207 n_kwas
: nullable TKwas,
9208 n_type
: nullable AType
9212 _n_expr
= n_expr
.as(not null)
9213 n_expr
.parent
= self
9214 _n_kwas
= n_kwas
.as(not null)
9215 n_kwas
.parent
= self
9216 _n_type
= n_type
.as(not null)
9217 n_type
.parent
= self
9220 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9222 if _n_expr
== old_child
then
9223 if new_child
!= null then
9224 new_child
.parent
= self
9225 assert new_child
isa AExpr
9232 if _n_kwas
== old_child
then
9233 if new_child
!= null then
9234 new_child
.parent
= self
9235 assert new_child
isa TKwas
9242 if _n_type
== old_child
then
9243 if new_child
!= null then
9244 new_child
.parent
= self
9245 assert new_child
isa AType
9254 redef fun visit_all
(v
: Visitor)
9256 v
.enter_visit
(_n_expr
)
9257 v
.enter_visit
(_n_kwas
)
9258 v
.enter_visit
(_n_type
)
9261 redef fun visit_all_reverse
(v
: Visitor)
9263 v
.enter_visit
(_n_expr
)
9264 v
.enter_visit
(_n_kwas
)
9265 v
.enter_visit
(_n_type
)
9268 redef class AAsNotnullExpr
9269 redef fun n_expr
=(n
)
9274 redef fun n_kwas
=(n
)
9279 redef fun n_kwnot
=(n
)
9284 redef fun n_kwnull
=(n
)
9290 private init empty_init
do end
9292 init init_aasnotnullexpr
(
9293 n_expr
: nullable AExpr,
9294 n_kwas
: nullable TKwas,
9295 n_kwnot
: nullable TKwnot,
9296 n_kwnull
: nullable TKwnull
9300 _n_expr
= n_expr
.as(not null)
9301 n_expr
.parent
= self
9302 _n_kwas
= n_kwas
.as(not null)
9303 n_kwas
.parent
= self
9304 _n_kwnot
= n_kwnot
.as(not null)
9305 n_kwnot
.parent
= self
9306 _n_kwnull
= n_kwnull
.as(not null)
9307 n_kwnull
.parent
= self
9310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9312 if _n_expr
== old_child
then
9313 if new_child
!= null then
9314 new_child
.parent
= self
9315 assert new_child
isa AExpr
9322 if _n_kwas
== old_child
then
9323 if new_child
!= null then
9324 new_child
.parent
= self
9325 assert new_child
isa TKwas
9332 if _n_kwnot
== old_child
then
9333 if new_child
!= null then
9334 new_child
.parent
= self
9335 assert new_child
isa TKwnot
9336 _n_kwnot
= new_child
9342 if _n_kwnull
== old_child
then
9343 if new_child
!= null then
9344 new_child
.parent
= self
9345 assert new_child
isa TKwnull
9346 _n_kwnull
= new_child
9354 redef fun visit_all
(v
: Visitor)
9356 v
.enter_visit
(_n_expr
)
9357 v
.enter_visit
(_n_kwas
)
9358 v
.enter_visit
(_n_kwnot
)
9359 v
.enter_visit
(_n_kwnull
)
9362 redef fun visit_all_reverse
(v
: Visitor)
9364 v
.enter_visit
(_n_expr
)
9365 v
.enter_visit
(_n_kwas
)
9366 v
.enter_visit
(_n_kwnot
)
9367 v
.enter_visit
(_n_kwnull
)
9370 redef class AIssetAttrExpr
9371 redef fun n_kwisset
=(n
)
9376 redef fun n_expr
=(n
)
9387 private init empty_init
do end
9389 init init_aissetattrexpr
(
9390 n_kwisset
: nullable TKwisset,
9391 n_expr
: nullable AExpr,
9392 n_id
: nullable TAttrid
9396 _n_kwisset
= n_kwisset
.as(not null)
9397 n_kwisset
.parent
= self
9398 _n_expr
= n_expr
.as(not null)
9399 n_expr
.parent
= self
9400 _n_id
= n_id
.as(not null)
9404 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9406 if _n_kwisset
== old_child
then
9407 if new_child
!= null then
9408 new_child
.parent
= self
9409 assert new_child
isa TKwisset
9410 _n_kwisset
= new_child
9416 if _n_expr
== old_child
then
9417 if new_child
!= null then
9418 new_child
.parent
= self
9419 assert new_child
isa AExpr
9426 if _n_id
== old_child
then
9427 if new_child
!= null then
9428 new_child
.parent
= self
9429 assert new_child
isa TAttrid
9438 redef fun visit_all
(v
: Visitor)
9440 v
.enter_visit
(_n_kwisset
)
9441 v
.enter_visit
(_n_expr
)
9442 v
.enter_visit
(_n_id
)
9445 redef fun visit_all_reverse
(v
: Visitor)
9447 v
.enter_visit
(_n_kwisset
)
9448 v
.enter_visit
(_n_expr
)
9449 v
.enter_visit
(_n_id
)
9452 redef class APlusAssignOp
9453 redef fun n_pluseq
=(n
)
9459 private init empty_init
do end
9461 init init_aplusassignop
(
9462 n_pluseq
: nullable TPluseq
9466 _n_pluseq
= n_pluseq
.as(not null)
9467 n_pluseq
.parent
= self
9470 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9472 if _n_pluseq
== old_child
then
9473 if new_child
!= null then
9474 new_child
.parent
= self
9475 assert new_child
isa TPluseq
9476 _n_pluseq
= new_child
9484 redef fun visit_all
(v
: Visitor)
9486 v
.enter_visit
(_n_pluseq
)
9489 redef fun visit_all_reverse
(v
: Visitor)
9491 v
.enter_visit
(_n_pluseq
)
9494 redef class AMinusAssignOp
9495 redef fun n_minuseq
=(n
)
9501 private init empty_init
do end
9503 init init_aminusassignop
(
9504 n_minuseq
: nullable TMinuseq
9508 _n_minuseq
= n_minuseq
.as(not null)
9509 n_minuseq
.parent
= self
9512 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9514 if _n_minuseq
== old_child
then
9515 if new_child
!= null then
9516 new_child
.parent
= self
9517 assert new_child
isa TMinuseq
9518 _n_minuseq
= new_child
9526 redef fun visit_all
(v
: Visitor)
9528 v
.enter_visit
(_n_minuseq
)
9531 redef fun visit_all_reverse
(v
: Visitor)
9533 v
.enter_visit
(_n_minuseq
)
9536 redef class AClosureDef
9537 redef fun n_bang
=(n
)
9547 redef fun n_kwdo
=(n
)
9554 redef fun n_expr
=(n
)
9561 redef fun n_label
=(n
)
9569 private init empty_init
do end
9571 init init_aclosuredef
(
9572 n_bang
: nullable TBang,
9573 n_id
: nullable AClosureId,
9574 n_ids
: Collection[Object], # Should be Collection[TId]
9575 n_kwdo
: nullable TKwdo,
9576 n_expr
: nullable AExpr,
9577 n_label
: nullable ALabel
9581 _n_bang
= n_bang
.as(not null)
9582 n_bang
.parent
= self
9583 _n_id
= n_id
.as(not null)
9591 if n_kwdo
!= null then
9592 n_kwdo
.parent
= self
9595 if n_expr
!= null then
9596 n_expr
.parent
= self
9599 if n_label
!= null then
9600 n_label
.parent
= self
9604 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9606 if _n_bang
== old_child
then
9607 if new_child
!= null then
9608 new_child
.parent
= self
9609 assert new_child
isa TBang
9616 if _n_id
== old_child
then
9617 if new_child
!= null then
9618 new_child
.parent
= self
9619 assert new_child
isa AClosureId
9626 for i
in [0.._n_ids
.length
[ do
9627 if _n_ids
[i
] == old_child
then
9628 if new_child
!= null then
9629 assert new_child
isa TId
9630 _n_ids
[i
] = new_child
9631 new_child
.parent
= self
9638 if _n_kwdo
== old_child
then
9639 if new_child
!= null then
9640 new_child
.parent
= self
9641 assert new_child
isa TKwdo
9648 if _n_expr
== old_child
then
9649 if new_child
!= null then
9650 new_child
.parent
= self
9651 assert new_child
isa AExpr
9658 if _n_label
== old_child
then
9659 if new_child
!= null then
9660 new_child
.parent
= self
9661 assert new_child
isa ALabel
9662 _n_label
= new_child
9670 redef fun visit_all
(v
: Visitor)
9672 v
.enter_visit
(_n_bang
)
9673 v
.enter_visit
(_n_id
)
9677 if _n_kwdo
!= null then
9678 v
.enter_visit
(_n_kwdo
.as(not null))
9680 if _n_expr
!= null then
9681 v
.enter_visit
(_n_expr
.as(not null))
9683 if _n_label
!= null then
9684 v
.enter_visit
(_n_label
.as(not null))
9688 redef fun visit_all_reverse
(v
: Visitor)
9690 v
.enter_visit
(_n_bang
)
9691 v
.enter_visit
(_n_id
)
9693 var i
= _n_ids
.length
9695 v
.enter_visit
(_n_ids
[i
])
9699 if _n_kwdo
!= null then
9700 v
.enter_visit
(_n_kwdo
.as(not null))
9702 if _n_expr
!= null then
9703 v
.enter_visit
(_n_expr
.as(not null))
9705 if _n_label
!= null then
9706 v
.enter_visit
(_n_label
.as(not null))
9710 redef class ASimpleClosureId
9717 private init empty_init
do end
9719 init init_asimpleclosureid
(
9724 _n_id
= n_id
.as(not null)
9728 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9730 if _n_id
== old_child
then
9731 if new_child
!= null then
9732 new_child
.parent
= self
9733 assert new_child
isa TId
9742 redef fun visit_all
(v
: Visitor)
9744 v
.enter_visit
(_n_id
)
9747 redef fun visit_all_reverse
(v
: Visitor)
9749 v
.enter_visit
(_n_id
)
9752 redef class ABreakClosureId
9753 redef fun n_kwbreak
=(n
)
9759 private init empty_init
do end
9761 init init_abreakclosureid
(
9762 n_kwbreak
: nullable TKwbreak
9766 _n_kwbreak
= n_kwbreak
.as(not null)
9767 n_kwbreak
.parent
= self
9770 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9772 if _n_kwbreak
== old_child
then
9773 if new_child
!= null then
9774 new_child
.parent
= self
9775 assert new_child
isa TKwbreak
9776 _n_kwbreak
= new_child
9784 redef fun visit_all
(v
: Visitor)
9786 v
.enter_visit
(_n_kwbreak
)
9789 redef fun visit_all_reverse
(v
: Visitor)
9791 v
.enter_visit
(_n_kwbreak
)
9794 redef class AQualified
9795 redef fun n_classid
=(n
)
9803 private init empty_init
do end
9805 init init_aqualified
(
9806 n_id
: Collection[Object], # Should be Collection[TId]
9807 n_classid
: nullable TClassid
9816 _n_classid
= n_classid
9817 if n_classid
!= null then
9818 n_classid
.parent
= self
9822 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9824 for i
in [0.._n_id
.length
[ do
9825 if _n_id
[i
] == old_child
then
9826 if new_child
!= null then
9827 assert new_child
isa TId
9828 _n_id
[i
] = new_child
9829 new_child
.parent
= self
9836 if _n_classid
== old_child
then
9837 if new_child
!= null then
9838 new_child
.parent
= self
9839 assert new_child
isa TClassid
9840 _n_classid
= new_child
9848 redef fun visit_all
(v
: Visitor)
9853 if _n_classid
!= null then
9854 v
.enter_visit
(_n_classid
.as(not null))
9858 redef fun visit_all_reverse
(v
: Visitor)
9861 var i
= _n_id
.length
9863 v
.enter_visit
(_n_id
[i
])
9867 if _n_classid
!= null then
9868 v
.enter_visit
(_n_classid
.as(not null))
9874 private init empty_init
do end
9877 n_comment
: Collection[Object] # Should be Collection[TComment]
9881 for n
in n_comment
do
9882 assert n
isa TComment
9888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9890 for i
in [0.._n_comment
.length
[ do
9891 if _n_comment
[i
] == old_child
then
9892 if new_child
!= null then
9893 assert new_child
isa TComment
9894 _n_comment
[i
] = new_child
9895 new_child
.parent
= self
9897 _n_comment
.remove_at
(i
)
9904 redef fun visit_all
(v
: Visitor)
9906 for n
in _n_comment
do
9911 redef fun visit_all_reverse
(v
: Visitor)
9914 var i
= _n_comment
.length
9916 v
.enter_visit
(_n_comment
[i
])
9925 n_base
: nullable AModule,
9932 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9934 if _n_base
== old_child
then
9935 if new_child
== null then
9937 new_child
.parent
= self
9938 assert new_child
isa AModule
9941 old_child
.parent
= null
9946 redef fun visit_all
(v
: Visitor)
9948 if _n_base
!= null then
9949 v
.enter_visit
(_n_base
.as(not null))
9951 v
.enter_visit
(_n_eof
)
9954 redef fun visit_all_reverse
(v
: Visitor)
9956 v
.enter_visit
(_n_eof
)
9957 if _n_base
!= null then
9958 v
.enter_visit
(_n_base
.as(not null))