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_kwwith
=(n
)
3839 redef fun n_kwbreak
=(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_kwwith
: nullable TKwwith,
3868 n_kwbreak
: nullable TKwbreak,
3870 n_signature
: nullable ASignature,
3871 n_expr
: nullable AExpr
3875 _n_kwwith
= n_kwwith
.as(not null)
3876 n_kwwith
.parent
= self
3877 _n_kwbreak
= n_kwbreak
3878 if n_kwbreak
!= null then
3879 n_kwbreak
.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_kwwith
== old_child
then
3894 if new_child
!= null then
3895 new_child
.parent
= self
3896 assert new_child
isa TKwwith
3897 _n_kwwith
= new_child
3903 if _n_kwbreak
== old_child
then
3904 if new_child
!= null then
3905 new_child
.parent
= self
3906 assert new_child
isa TKwbreak
3907 _n_kwbreak
= new_child
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 v
.enter_visit
(_n_kwwith
)
3948 if _n_kwbreak
!= null then
3949 v
.enter_visit
(_n_kwbreak
.as(not null))
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 v
.enter_visit
(_n_kwwith
)
3961 if _n_kwbreak
!= null then
3962 v
.enter_visit
(_n_kwbreak
.as(not null))
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
)
4333 redef fun n_expr
=(n
)
4341 private init empty_init
do end
4343 init init_areturnexpr
(
4344 n_kwreturn
: nullable TKwreturn,
4345 n_expr
: nullable AExpr
4349 _n_kwreturn
= n_kwreturn
.as(not null)
4350 n_kwreturn
.parent
= self
4352 if n_expr
!= null then
4353 n_expr
.parent
= self
4357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4359 if _n_kwreturn
== old_child
then
4360 if new_child
!= null then
4361 new_child
.parent
= self
4362 assert new_child
isa TKwreturn
4363 _n_kwreturn
= new_child
4369 if _n_expr
== old_child
then
4370 if new_child
!= null then
4371 new_child
.parent
= self
4372 assert new_child
isa AExpr
4381 redef fun visit_all
(v
: Visitor)
4383 v
.enter_visit
(_n_kwreturn
)
4384 if _n_expr
!= null then
4385 v
.enter_visit
(_n_expr
.as(not null))
4389 redef fun visit_all_reverse
(v
: Visitor)
4391 v
.enter_visit
(_n_kwreturn
)
4392 if _n_expr
!= null then
4393 v
.enter_visit
(_n_expr
.as(not null))
4397 redef class ABreakExpr
4398 redef fun n_kwbreak
=(n
)
4403 redef fun n_label
=(n
)
4410 redef fun n_expr
=(n
)
4418 private init empty_init
do end
4420 init init_abreakexpr
(
4421 n_kwbreak
: nullable TKwbreak,
4422 n_label
: nullable ALabel,
4423 n_expr
: nullable AExpr
4427 _n_kwbreak
= n_kwbreak
.as(not null)
4428 n_kwbreak
.parent
= self
4430 if n_label
!= null then
4431 n_label
.parent
= self
4434 if n_expr
!= null then
4435 n_expr
.parent
= self
4439 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4441 if _n_kwbreak
== old_child
then
4442 if new_child
!= null then
4443 new_child
.parent
= self
4444 assert new_child
isa TKwbreak
4445 _n_kwbreak
= new_child
4451 if _n_label
== old_child
then
4452 if new_child
!= null then
4453 new_child
.parent
= self
4454 assert new_child
isa ALabel
4455 _n_label
= new_child
4461 if _n_expr
== old_child
then
4462 if new_child
!= null then
4463 new_child
.parent
= self
4464 assert new_child
isa AExpr
4473 redef fun visit_all
(v
: Visitor)
4475 v
.enter_visit
(_n_kwbreak
)
4476 if _n_label
!= null then
4477 v
.enter_visit
(_n_label
.as(not null))
4479 if _n_expr
!= null then
4480 v
.enter_visit
(_n_expr
.as(not null))
4484 redef fun visit_all_reverse
(v
: Visitor)
4486 v
.enter_visit
(_n_kwbreak
)
4487 if _n_label
!= null then
4488 v
.enter_visit
(_n_label
.as(not null))
4490 if _n_expr
!= null then
4491 v
.enter_visit
(_n_expr
.as(not null))
4495 redef class AAbortExpr
4496 redef fun n_kwabort
=(n
)
4502 private init empty_init
do end
4504 init init_aabortexpr
(
4505 n_kwabort
: nullable TKwabort
4509 _n_kwabort
= n_kwabort
.as(not null)
4510 n_kwabort
.parent
= self
4513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4515 if _n_kwabort
== old_child
then
4516 if new_child
!= null then
4517 new_child
.parent
= self
4518 assert new_child
isa TKwabort
4519 _n_kwabort
= new_child
4527 redef fun visit_all
(v
: Visitor)
4529 v
.enter_visit
(_n_kwabort
)
4532 redef fun visit_all_reverse
(v
: Visitor)
4534 v
.enter_visit
(_n_kwabort
)
4537 redef class AContinueExpr
4538 redef fun n_kwcontinue
=(n
)
4543 redef fun n_label
=(n
)
4550 redef fun n_expr
=(n
)
4558 private init empty_init
do end
4560 init init_acontinueexpr
(
4561 n_kwcontinue
: nullable TKwcontinue,
4562 n_label
: nullable ALabel,
4563 n_expr
: nullable AExpr
4567 _n_kwcontinue
= n_kwcontinue
.as(not null)
4568 n_kwcontinue
.parent
= self
4570 if n_label
!= null then
4571 n_label
.parent
= self
4574 if n_expr
!= null then
4575 n_expr
.parent
= self
4579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4581 if _n_kwcontinue
== old_child
then
4582 if new_child
!= null then
4583 new_child
.parent
= self
4584 assert new_child
isa TKwcontinue
4585 _n_kwcontinue
= new_child
4591 if _n_label
== old_child
then
4592 if new_child
!= null then
4593 new_child
.parent
= self
4594 assert new_child
isa ALabel
4595 _n_label
= new_child
4601 if _n_expr
== old_child
then
4602 if new_child
!= null then
4603 new_child
.parent
= self
4604 assert new_child
isa AExpr
4613 redef fun visit_all
(v
: Visitor)
4615 v
.enter_visit
(_n_kwcontinue
)
4616 if _n_label
!= null then
4617 v
.enter_visit
(_n_label
.as(not null))
4619 if _n_expr
!= null then
4620 v
.enter_visit
(_n_expr
.as(not null))
4624 redef fun visit_all_reverse
(v
: Visitor)
4626 v
.enter_visit
(_n_kwcontinue
)
4627 if _n_label
!= null then
4628 v
.enter_visit
(_n_label
.as(not null))
4630 if _n_expr
!= null then
4631 v
.enter_visit
(_n_expr
.as(not null))
4636 redef fun n_kwdo
=(n
)
4641 redef fun n_block
=(n
)
4648 redef fun n_label
=(n
)
4656 private init empty_init
do end
4659 n_kwdo
: nullable TKwdo,
4660 n_block
: nullable AExpr,
4661 n_label
: nullable ALabel
4665 _n_kwdo
= n_kwdo
.as(not null)
4666 n_kwdo
.parent
= self
4668 if n_block
!= null then
4669 n_block
.parent
= self
4672 if n_label
!= null then
4673 n_label
.parent
= self
4677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4679 if _n_kwdo
== old_child
then
4680 if new_child
!= null then
4681 new_child
.parent
= self
4682 assert new_child
isa TKwdo
4689 if _n_block
== old_child
then
4690 if new_child
!= null then
4691 new_child
.parent
= self
4692 assert new_child
isa AExpr
4693 _n_block
= new_child
4699 if _n_label
== old_child
then
4700 if new_child
!= null then
4701 new_child
.parent
= self
4702 assert new_child
isa ALabel
4703 _n_label
= new_child
4711 redef fun visit_all
(v
: Visitor)
4713 v
.enter_visit
(_n_kwdo
)
4714 if _n_block
!= null then
4715 v
.enter_visit
(_n_block
.as(not null))
4717 if _n_label
!= null then
4718 v
.enter_visit
(_n_label
.as(not null))
4722 redef fun visit_all_reverse
(v
: Visitor)
4724 v
.enter_visit
(_n_kwdo
)
4725 if _n_block
!= null then
4726 v
.enter_visit
(_n_block
.as(not null))
4728 if _n_label
!= null then
4729 v
.enter_visit
(_n_label
.as(not null))
4734 redef fun n_kwif
=(n
)
4739 redef fun n_expr
=(n
)
4744 redef fun n_then
=(n
)
4751 redef fun n_else
=(n
)
4759 private init empty_init
do end
4762 n_kwif
: nullable TKwif,
4763 n_expr
: nullable AExpr,
4764 n_then
: nullable AExpr,
4765 n_else
: nullable AExpr
4769 _n_kwif
= n_kwif
.as(not null)
4770 n_kwif
.parent
= self
4771 _n_expr
= n_expr
.as(not null)
4772 n_expr
.parent
= self
4774 if n_then
!= null then
4775 n_then
.parent
= self
4778 if n_else
!= null then
4779 n_else
.parent
= self
4783 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4785 if _n_kwif
== old_child
then
4786 if new_child
!= null then
4787 new_child
.parent
= self
4788 assert new_child
isa TKwif
4795 if _n_expr
== old_child
then
4796 if new_child
!= null then
4797 new_child
.parent
= self
4798 assert new_child
isa AExpr
4805 if _n_then
== old_child
then
4806 if new_child
!= null then
4807 new_child
.parent
= self
4808 assert new_child
isa AExpr
4815 if _n_else
== old_child
then
4816 if new_child
!= null then
4817 new_child
.parent
= self
4818 assert new_child
isa AExpr
4827 redef fun visit_all
(v
: Visitor)
4829 v
.enter_visit
(_n_kwif
)
4830 v
.enter_visit
(_n_expr
)
4831 if _n_then
!= null then
4832 v
.enter_visit
(_n_then
.as(not null))
4834 if _n_else
!= null then
4835 v
.enter_visit
(_n_else
.as(not null))
4839 redef fun visit_all_reverse
(v
: Visitor)
4841 v
.enter_visit
(_n_kwif
)
4842 v
.enter_visit
(_n_expr
)
4843 if _n_then
!= null then
4844 v
.enter_visit
(_n_then
.as(not null))
4846 if _n_else
!= null then
4847 v
.enter_visit
(_n_else
.as(not null))
4851 redef class AIfexprExpr
4852 redef fun n_kwif
=(n
)
4857 redef fun n_expr
=(n
)
4862 redef fun n_kwthen
=(n
)
4867 redef fun n_then
=(n
)
4872 redef fun n_kwelse
=(n
)
4877 redef fun n_else
=(n
)
4883 private init empty_init
do end
4885 init init_aifexprexpr
(
4886 n_kwif
: nullable TKwif,
4887 n_expr
: nullable AExpr,
4888 n_kwthen
: nullable TKwthen,
4889 n_then
: nullable AExpr,
4890 n_kwelse
: nullable TKwelse,
4891 n_else
: nullable AExpr
4895 _n_kwif
= n_kwif
.as(not null)
4896 n_kwif
.parent
= self
4897 _n_expr
= n_expr
.as(not null)
4898 n_expr
.parent
= self
4899 _n_kwthen
= n_kwthen
.as(not null)
4900 n_kwthen
.parent
= self
4901 _n_then
= n_then
.as(not null)
4902 n_then
.parent
= self
4903 _n_kwelse
= n_kwelse
.as(not null)
4904 n_kwelse
.parent
= self
4905 _n_else
= n_else
.as(not null)
4906 n_else
.parent
= self
4909 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4911 if _n_kwif
== old_child
then
4912 if new_child
!= null then
4913 new_child
.parent
= self
4914 assert new_child
isa TKwif
4921 if _n_expr
== old_child
then
4922 if new_child
!= null then
4923 new_child
.parent
= self
4924 assert new_child
isa AExpr
4931 if _n_kwthen
== old_child
then
4932 if new_child
!= null then
4933 new_child
.parent
= self
4934 assert new_child
isa TKwthen
4935 _n_kwthen
= new_child
4941 if _n_then
== old_child
then
4942 if new_child
!= null then
4943 new_child
.parent
= self
4944 assert new_child
isa AExpr
4951 if _n_kwelse
== old_child
then
4952 if new_child
!= null then
4953 new_child
.parent
= self
4954 assert new_child
isa TKwelse
4955 _n_kwelse
= new_child
4961 if _n_else
== old_child
then
4962 if new_child
!= null then
4963 new_child
.parent
= self
4964 assert new_child
isa AExpr
4973 redef fun visit_all
(v
: Visitor)
4975 v
.enter_visit
(_n_kwif
)
4976 v
.enter_visit
(_n_expr
)
4977 v
.enter_visit
(_n_kwthen
)
4978 v
.enter_visit
(_n_then
)
4979 v
.enter_visit
(_n_kwelse
)
4980 v
.enter_visit
(_n_else
)
4983 redef fun visit_all_reverse
(v
: Visitor)
4985 v
.enter_visit
(_n_kwif
)
4986 v
.enter_visit
(_n_expr
)
4987 v
.enter_visit
(_n_kwthen
)
4988 v
.enter_visit
(_n_then
)
4989 v
.enter_visit
(_n_kwelse
)
4990 v
.enter_visit
(_n_else
)
4993 redef class AWhileExpr
4994 redef fun n_kwwhile
=(n
)
4999 redef fun n_expr
=(n
)
5004 redef fun n_kwdo
=(n
)
5009 redef fun n_block
=(n
)
5016 redef fun n_label
=(n
)
5024 private init empty_init
do end
5026 init init_awhileexpr
(
5027 n_kwwhile
: nullable TKwwhile,
5028 n_expr
: nullable AExpr,
5029 n_kwdo
: nullable TKwdo,
5030 n_block
: nullable AExpr,
5031 n_label
: nullable ALabel
5035 _n_kwwhile
= n_kwwhile
.as(not null)
5036 n_kwwhile
.parent
= self
5037 _n_expr
= n_expr
.as(not null)
5038 n_expr
.parent
= self
5039 _n_kwdo
= n_kwdo
.as(not null)
5040 n_kwdo
.parent
= self
5042 if n_block
!= null then
5043 n_block
.parent
= self
5046 if n_label
!= null then
5047 n_label
.parent
= self
5051 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5053 if _n_kwwhile
== old_child
then
5054 if new_child
!= null then
5055 new_child
.parent
= self
5056 assert new_child
isa TKwwhile
5057 _n_kwwhile
= new_child
5063 if _n_expr
== old_child
then
5064 if new_child
!= null then
5065 new_child
.parent
= self
5066 assert new_child
isa AExpr
5073 if _n_kwdo
== old_child
then
5074 if new_child
!= null then
5075 new_child
.parent
= self
5076 assert new_child
isa TKwdo
5083 if _n_block
== old_child
then
5084 if new_child
!= null then
5085 new_child
.parent
= self
5086 assert new_child
isa AExpr
5087 _n_block
= new_child
5093 if _n_label
== old_child
then
5094 if new_child
!= null then
5095 new_child
.parent
= self
5096 assert new_child
isa ALabel
5097 _n_label
= new_child
5105 redef fun visit_all
(v
: Visitor)
5107 v
.enter_visit
(_n_kwwhile
)
5108 v
.enter_visit
(_n_expr
)
5109 v
.enter_visit
(_n_kwdo
)
5110 if _n_block
!= null then
5111 v
.enter_visit
(_n_block
.as(not null))
5113 if _n_label
!= null then
5114 v
.enter_visit
(_n_label
.as(not null))
5118 redef fun visit_all_reverse
(v
: Visitor)
5120 v
.enter_visit
(_n_kwwhile
)
5121 v
.enter_visit
(_n_expr
)
5122 v
.enter_visit
(_n_kwdo
)
5123 if _n_block
!= null then
5124 v
.enter_visit
(_n_block
.as(not null))
5126 if _n_label
!= null then
5127 v
.enter_visit
(_n_label
.as(not null))
5131 redef class AForExpr
5132 redef fun n_kwfor
=(n
)
5142 redef fun n_expr
=(n
)
5147 redef fun n_kwdo
=(n
)
5152 redef fun n_block
=(n
)
5159 redef fun n_label
=(n
)
5167 private init empty_init
do end
5169 init init_aforexpr
(
5170 n_kwfor
: nullable TKwfor,
5172 n_expr
: nullable AExpr,
5173 n_kwdo
: nullable TKwdo,
5174 n_block
: nullable AExpr,
5175 n_label
: nullable ALabel
5179 _n_kwfor
= n_kwfor
.as(not null)
5180 n_kwfor
.parent
= self
5181 _n_id
= n_id
.as(not null)
5183 _n_expr
= n_expr
.as(not null)
5184 n_expr
.parent
= self
5185 _n_kwdo
= n_kwdo
.as(not null)
5186 n_kwdo
.parent
= self
5188 if n_block
!= null then
5189 n_block
.parent
= self
5192 if n_label
!= null then
5193 n_label
.parent
= self
5197 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5199 if _n_kwfor
== old_child
then
5200 if new_child
!= null then
5201 new_child
.parent
= self
5202 assert new_child
isa TKwfor
5203 _n_kwfor
= new_child
5209 if _n_id
== old_child
then
5210 if new_child
!= null then
5211 new_child
.parent
= self
5212 assert new_child
isa TId
5219 if _n_expr
== old_child
then
5220 if new_child
!= null then
5221 new_child
.parent
= self
5222 assert new_child
isa AExpr
5229 if _n_kwdo
== old_child
then
5230 if new_child
!= null then
5231 new_child
.parent
= self
5232 assert new_child
isa TKwdo
5239 if _n_block
== old_child
then
5240 if new_child
!= null then
5241 new_child
.parent
= self
5242 assert new_child
isa AExpr
5243 _n_block
= new_child
5249 if _n_label
== old_child
then
5250 if new_child
!= null then
5251 new_child
.parent
= self
5252 assert new_child
isa ALabel
5253 _n_label
= new_child
5261 redef fun visit_all
(v
: Visitor)
5263 v
.enter_visit
(_n_kwfor
)
5264 v
.enter_visit
(_n_id
)
5265 v
.enter_visit
(_n_expr
)
5266 v
.enter_visit
(_n_kwdo
)
5267 if _n_block
!= null then
5268 v
.enter_visit
(_n_block
.as(not null))
5270 if _n_label
!= null then
5271 v
.enter_visit
(_n_label
.as(not null))
5275 redef fun visit_all_reverse
(v
: Visitor)
5277 v
.enter_visit
(_n_kwfor
)
5278 v
.enter_visit
(_n_id
)
5279 v
.enter_visit
(_n_expr
)
5280 v
.enter_visit
(_n_kwdo
)
5281 if _n_block
!= null then
5282 v
.enter_visit
(_n_block
.as(not null))
5284 if _n_label
!= null then
5285 v
.enter_visit
(_n_label
.as(not null))
5289 redef class AAssertExpr
5290 redef fun n_kwassert
=(n
)
5302 redef fun n_expr
=(n
)
5308 private init empty_init
do end
5310 init init_aassertexpr
(
5311 n_kwassert
: nullable TKwassert,
5313 n_expr
: nullable AExpr
5317 _n_kwassert
= n_kwassert
.as(not null)
5318 n_kwassert
.parent
= self
5320 if n_id
!= null then
5323 _n_expr
= n_expr
.as(not null)
5324 n_expr
.parent
= self
5327 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5329 if _n_kwassert
== old_child
then
5330 if new_child
!= null then
5331 new_child
.parent
= self
5332 assert new_child
isa TKwassert
5333 _n_kwassert
= new_child
5339 if _n_id
== old_child
then
5340 if new_child
!= null then
5341 new_child
.parent
= self
5342 assert new_child
isa TId
5349 if _n_expr
== old_child
then
5350 if new_child
!= null then
5351 new_child
.parent
= self
5352 assert new_child
isa AExpr
5361 redef fun visit_all
(v
: Visitor)
5363 v
.enter_visit
(_n_kwassert
)
5364 if _n_id
!= null then
5365 v
.enter_visit
(_n_id
.as(not null))
5367 v
.enter_visit
(_n_expr
)
5370 redef fun visit_all_reverse
(v
: Visitor)
5372 v
.enter_visit
(_n_kwassert
)
5373 if _n_id
!= null then
5374 v
.enter_visit
(_n_id
.as(not null))
5376 v
.enter_visit
(_n_expr
)
5379 redef class AOnceExpr
5380 redef fun n_kwonce
=(n
)
5385 redef fun n_expr
=(n
)
5391 private init empty_init
do end
5393 init init_aonceexpr
(
5394 n_kwonce
: nullable TKwonce,
5395 n_expr
: nullable AExpr
5399 _n_kwonce
= n_kwonce
.as(not null)
5400 n_kwonce
.parent
= self
5401 _n_expr
= n_expr
.as(not null)
5402 n_expr
.parent
= self
5405 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5407 if _n_kwonce
== old_child
then
5408 if new_child
!= null then
5409 new_child
.parent
= self
5410 assert new_child
isa TKwonce
5411 _n_kwonce
= new_child
5417 if _n_expr
== old_child
then
5418 if new_child
!= null then
5419 new_child
.parent
= self
5420 assert new_child
isa AExpr
5429 redef fun visit_all
(v
: Visitor)
5431 v
.enter_visit
(_n_kwonce
)
5432 v
.enter_visit
(_n_expr
)
5435 redef fun visit_all_reverse
(v
: Visitor)
5437 v
.enter_visit
(_n_kwonce
)
5438 v
.enter_visit
(_n_expr
)
5441 redef class ASendExpr
5442 redef fun n_expr
=(n
)
5448 private init empty_init
do end
5450 init init_asendexpr
(
5451 n_expr
: nullable AExpr
5455 _n_expr
= n_expr
.as(not null)
5456 n_expr
.parent
= self
5459 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5461 if _n_expr
== old_child
then
5462 if new_child
!= null then
5463 new_child
.parent
= self
5464 assert new_child
isa AExpr
5473 redef fun visit_all
(v
: Visitor)
5475 v
.enter_visit
(_n_expr
)
5478 redef fun visit_all_reverse
(v
: Visitor)
5480 v
.enter_visit
(_n_expr
)
5483 redef class ABinopExpr
5484 redef fun n_expr
=(n
)
5489 redef fun n_expr2
=(n
)
5495 private init empty_init
do end
5497 init init_abinopexpr
(
5498 n_expr
: nullable AExpr,
5499 n_expr2
: nullable AExpr
5503 _n_expr
= n_expr
.as(not null)
5504 n_expr
.parent
= self
5505 _n_expr2
= n_expr2
.as(not null)
5506 n_expr2
.parent
= self
5509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5511 if _n_expr
== old_child
then
5512 if new_child
!= null then
5513 new_child
.parent
= self
5514 assert new_child
isa AExpr
5521 if _n_expr2
== old_child
then
5522 if new_child
!= null then
5523 new_child
.parent
= self
5524 assert new_child
isa AExpr
5525 _n_expr2
= new_child
5533 redef fun visit_all
(v
: Visitor)
5535 v
.enter_visit
(_n_expr
)
5536 v
.enter_visit
(_n_expr2
)
5539 redef fun visit_all_reverse
(v
: Visitor)
5541 v
.enter_visit
(_n_expr
)
5542 v
.enter_visit
(_n_expr2
)
5546 redef fun n_expr
=(n
)
5551 redef fun n_expr2
=(n
)
5557 private init empty_init
do end
5560 n_expr
: nullable AExpr,
5561 n_expr2
: nullable AExpr
5565 _n_expr
= n_expr
.as(not null)
5566 n_expr
.parent
= self
5567 _n_expr2
= n_expr2
.as(not null)
5568 n_expr2
.parent
= self
5571 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5573 if _n_expr
== old_child
then
5574 if new_child
!= null then
5575 new_child
.parent
= self
5576 assert new_child
isa AExpr
5583 if _n_expr2
== old_child
then
5584 if new_child
!= null then
5585 new_child
.parent
= self
5586 assert new_child
isa AExpr
5587 _n_expr2
= new_child
5595 redef fun visit_all
(v
: Visitor)
5597 v
.enter_visit
(_n_expr
)
5598 v
.enter_visit
(_n_expr2
)
5601 redef fun visit_all_reverse
(v
: Visitor)
5603 v
.enter_visit
(_n_expr
)
5604 v
.enter_visit
(_n_expr2
)
5607 redef class AAndExpr
5608 redef fun n_expr
=(n
)
5613 redef fun n_expr2
=(n
)
5619 private init empty_init
do end
5621 init init_aandexpr
(
5622 n_expr
: nullable AExpr,
5623 n_expr2
: nullable AExpr
5627 _n_expr
= n_expr
.as(not null)
5628 n_expr
.parent
= self
5629 _n_expr2
= n_expr2
.as(not null)
5630 n_expr2
.parent
= self
5633 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5635 if _n_expr
== old_child
then
5636 if new_child
!= null then
5637 new_child
.parent
= self
5638 assert new_child
isa AExpr
5645 if _n_expr2
== old_child
then
5646 if new_child
!= null then
5647 new_child
.parent
= self
5648 assert new_child
isa AExpr
5649 _n_expr2
= new_child
5657 redef fun visit_all
(v
: Visitor)
5659 v
.enter_visit
(_n_expr
)
5660 v
.enter_visit
(_n_expr2
)
5663 redef fun visit_all_reverse
(v
: Visitor)
5665 v
.enter_visit
(_n_expr
)
5666 v
.enter_visit
(_n_expr2
)
5669 redef class ANotExpr
5670 redef fun n_kwnot
=(n
)
5675 redef fun n_expr
=(n
)
5681 private init empty_init
do end
5683 init init_anotexpr
(
5684 n_kwnot
: nullable TKwnot,
5685 n_expr
: nullable AExpr
5689 _n_kwnot
= n_kwnot
.as(not null)
5690 n_kwnot
.parent
= self
5691 _n_expr
= n_expr
.as(not null)
5692 n_expr
.parent
= self
5695 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5697 if _n_kwnot
== old_child
then
5698 if new_child
!= null then
5699 new_child
.parent
= self
5700 assert new_child
isa TKwnot
5701 _n_kwnot
= new_child
5707 if _n_expr
== old_child
then
5708 if new_child
!= null then
5709 new_child
.parent
= self
5710 assert new_child
isa AExpr
5719 redef fun visit_all
(v
: Visitor)
5721 v
.enter_visit
(_n_kwnot
)
5722 v
.enter_visit
(_n_expr
)
5725 redef fun visit_all_reverse
(v
: Visitor)
5727 v
.enter_visit
(_n_kwnot
)
5728 v
.enter_visit
(_n_expr
)
5732 redef fun n_expr
=(n
)
5737 redef fun n_expr2
=(n
)
5743 private init empty_init
do end
5746 n_expr
: nullable AExpr,
5747 n_expr2
: nullable AExpr
5751 _n_expr
= n_expr
.as(not null)
5752 n_expr
.parent
= self
5753 _n_expr2
= n_expr2
.as(not null)
5754 n_expr2
.parent
= self
5757 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5759 if _n_expr
== old_child
then
5760 if new_child
!= null then
5761 new_child
.parent
= self
5762 assert new_child
isa AExpr
5769 if _n_expr2
== old_child
then
5770 if new_child
!= null then
5771 new_child
.parent
= self
5772 assert new_child
isa AExpr
5773 _n_expr2
= new_child
5781 redef fun visit_all
(v
: Visitor)
5783 v
.enter_visit
(_n_expr
)
5784 v
.enter_visit
(_n_expr2
)
5787 redef fun visit_all_reverse
(v
: Visitor)
5789 v
.enter_visit
(_n_expr
)
5790 v
.enter_visit
(_n_expr2
)
5794 redef fun n_expr
=(n
)
5799 redef fun n_expr2
=(n
)
5805 private init empty_init
do end
5808 n_expr
: nullable AExpr,
5809 n_expr2
: nullable AExpr
5813 _n_expr
= n_expr
.as(not null)
5814 n_expr
.parent
= self
5815 _n_expr2
= n_expr2
.as(not null)
5816 n_expr2
.parent
= self
5819 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5821 if _n_expr
== old_child
then
5822 if new_child
!= null then
5823 new_child
.parent
= self
5824 assert new_child
isa AExpr
5831 if _n_expr2
== old_child
then
5832 if new_child
!= null then
5833 new_child
.parent
= self
5834 assert new_child
isa AExpr
5835 _n_expr2
= new_child
5843 redef fun visit_all
(v
: Visitor)
5845 v
.enter_visit
(_n_expr
)
5846 v
.enter_visit
(_n_expr2
)
5849 redef fun visit_all_reverse
(v
: Visitor)
5851 v
.enter_visit
(_n_expr
)
5852 v
.enter_visit
(_n_expr2
)
5856 redef fun n_expr
=(n
)
5861 redef fun n_expr2
=(n
)
5867 private init empty_init
do end
5870 n_expr
: nullable AExpr,
5871 n_expr2
: nullable AExpr
5875 _n_expr
= n_expr
.as(not null)
5876 n_expr
.parent
= self
5877 _n_expr2
= n_expr2
.as(not null)
5878 n_expr2
.parent
= self
5881 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5883 if _n_expr
== old_child
then
5884 if new_child
!= null then
5885 new_child
.parent
= self
5886 assert new_child
isa AExpr
5893 if _n_expr2
== old_child
then
5894 if new_child
!= null then
5895 new_child
.parent
= self
5896 assert new_child
isa AExpr
5897 _n_expr2
= new_child
5905 redef fun visit_all
(v
: Visitor)
5907 v
.enter_visit
(_n_expr
)
5908 v
.enter_visit
(_n_expr2
)
5911 redef fun visit_all_reverse
(v
: Visitor)
5913 v
.enter_visit
(_n_expr
)
5914 v
.enter_visit
(_n_expr2
)
5918 redef fun n_expr
=(n
)
5923 redef fun n_expr2
=(n
)
5929 private init empty_init
do end
5932 n_expr
: nullable AExpr,
5933 n_expr2
: nullable AExpr
5937 _n_expr
= n_expr
.as(not null)
5938 n_expr
.parent
= self
5939 _n_expr2
= n_expr2
.as(not null)
5940 n_expr2
.parent
= self
5943 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5945 if _n_expr
== old_child
then
5946 if new_child
!= null then
5947 new_child
.parent
= self
5948 assert new_child
isa AExpr
5955 if _n_expr2
== old_child
then
5956 if new_child
!= null then
5957 new_child
.parent
= self
5958 assert new_child
isa AExpr
5959 _n_expr2
= new_child
5967 redef fun visit_all
(v
: Visitor)
5969 v
.enter_visit
(_n_expr
)
5970 v
.enter_visit
(_n_expr2
)
5973 redef fun visit_all_reverse
(v
: Visitor)
5975 v
.enter_visit
(_n_expr
)
5976 v
.enter_visit
(_n_expr2
)
5980 redef fun n_expr
=(n
)
5985 redef fun n_expr2
=(n
)
5991 private init empty_init
do end
5994 n_expr
: nullable AExpr,
5995 n_expr2
: nullable AExpr
5999 _n_expr
= n_expr
.as(not null)
6000 n_expr
.parent
= self
6001 _n_expr2
= n_expr2
.as(not null)
6002 n_expr2
.parent
= self
6005 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6007 if _n_expr
== old_child
then
6008 if new_child
!= null then
6009 new_child
.parent
= self
6010 assert new_child
isa AExpr
6017 if _n_expr2
== old_child
then
6018 if new_child
!= null then
6019 new_child
.parent
= self
6020 assert new_child
isa AExpr
6021 _n_expr2
= new_child
6029 redef fun visit_all
(v
: Visitor)
6031 v
.enter_visit
(_n_expr
)
6032 v
.enter_visit
(_n_expr2
)
6035 redef fun visit_all_reverse
(v
: Visitor)
6037 v
.enter_visit
(_n_expr
)
6038 v
.enter_visit
(_n_expr2
)
6042 redef fun n_expr
=(n
)
6047 redef fun n_expr2
=(n
)
6053 private init empty_init
do end
6056 n_expr
: nullable AExpr,
6057 n_expr2
: nullable AExpr
6061 _n_expr
= n_expr
.as(not null)
6062 n_expr
.parent
= self
6063 _n_expr2
= n_expr2
.as(not null)
6064 n_expr2
.parent
= self
6067 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6069 if _n_expr
== old_child
then
6070 if new_child
!= null then
6071 new_child
.parent
= self
6072 assert new_child
isa AExpr
6079 if _n_expr2
== old_child
then
6080 if new_child
!= null then
6081 new_child
.parent
= self
6082 assert new_child
isa AExpr
6083 _n_expr2
= new_child
6091 redef fun visit_all
(v
: Visitor)
6093 v
.enter_visit
(_n_expr
)
6094 v
.enter_visit
(_n_expr2
)
6097 redef fun visit_all_reverse
(v
: Visitor)
6099 v
.enter_visit
(_n_expr
)
6100 v
.enter_visit
(_n_expr2
)
6104 redef fun n_expr
=(n
)
6109 redef fun n_expr2
=(n
)
6115 private init empty_init
do end
6118 n_expr
: nullable AExpr,
6119 n_expr2
: nullable AExpr
6123 _n_expr
= n_expr
.as(not null)
6124 n_expr
.parent
= self
6125 _n_expr2
= n_expr2
.as(not null)
6126 n_expr2
.parent
= self
6129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6131 if _n_expr
== old_child
then
6132 if new_child
!= null then
6133 new_child
.parent
= self
6134 assert new_child
isa AExpr
6141 if _n_expr2
== old_child
then
6142 if new_child
!= null then
6143 new_child
.parent
= self
6144 assert new_child
isa AExpr
6145 _n_expr2
= new_child
6153 redef fun visit_all
(v
: Visitor)
6155 v
.enter_visit
(_n_expr
)
6156 v
.enter_visit
(_n_expr2
)
6159 redef fun visit_all_reverse
(v
: Visitor)
6161 v
.enter_visit
(_n_expr
)
6162 v
.enter_visit
(_n_expr2
)
6165 redef class AIsaExpr
6166 redef fun n_expr
=(n
)
6171 redef fun n_type
=(n
)
6177 private init empty_init
do end
6179 init init_aisaexpr
(
6180 n_expr
: nullable AExpr,
6181 n_type
: nullable AType
6185 _n_expr
= n_expr
.as(not null)
6186 n_expr
.parent
= self
6187 _n_type
= n_type
.as(not null)
6188 n_type
.parent
= self
6191 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6193 if _n_expr
== old_child
then
6194 if new_child
!= null then
6195 new_child
.parent
= self
6196 assert new_child
isa AExpr
6203 if _n_type
== old_child
then
6204 if new_child
!= null then
6205 new_child
.parent
= self
6206 assert new_child
isa AType
6215 redef fun visit_all
(v
: Visitor)
6217 v
.enter_visit
(_n_expr
)
6218 v
.enter_visit
(_n_type
)
6221 redef fun visit_all_reverse
(v
: Visitor)
6223 v
.enter_visit
(_n_expr
)
6224 v
.enter_visit
(_n_type
)
6227 redef class APlusExpr
6228 redef fun n_expr
=(n
)
6233 redef fun n_expr2
=(n
)
6239 private init empty_init
do end
6241 init init_aplusexpr
(
6242 n_expr
: nullable AExpr,
6243 n_expr2
: nullable AExpr
6247 _n_expr
= n_expr
.as(not null)
6248 n_expr
.parent
= self
6249 _n_expr2
= n_expr2
.as(not null)
6250 n_expr2
.parent
= self
6253 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6255 if _n_expr
== old_child
then
6256 if new_child
!= null then
6257 new_child
.parent
= self
6258 assert new_child
isa AExpr
6265 if _n_expr2
== old_child
then
6266 if new_child
!= null then
6267 new_child
.parent
= self
6268 assert new_child
isa AExpr
6269 _n_expr2
= new_child
6277 redef fun visit_all
(v
: Visitor)
6279 v
.enter_visit
(_n_expr
)
6280 v
.enter_visit
(_n_expr2
)
6283 redef fun visit_all_reverse
(v
: Visitor)
6285 v
.enter_visit
(_n_expr
)
6286 v
.enter_visit
(_n_expr2
)
6289 redef class AMinusExpr
6290 redef fun n_expr
=(n
)
6295 redef fun n_expr2
=(n
)
6301 private init empty_init
do end
6303 init init_aminusexpr
(
6304 n_expr
: nullable AExpr,
6305 n_expr2
: nullable AExpr
6309 _n_expr
= n_expr
.as(not null)
6310 n_expr
.parent
= self
6311 _n_expr2
= n_expr2
.as(not null)
6312 n_expr2
.parent
= self
6315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6317 if _n_expr
== old_child
then
6318 if new_child
!= null then
6319 new_child
.parent
= self
6320 assert new_child
isa AExpr
6327 if _n_expr2
== old_child
then
6328 if new_child
!= null then
6329 new_child
.parent
= self
6330 assert new_child
isa AExpr
6331 _n_expr2
= new_child
6339 redef fun visit_all
(v
: Visitor)
6341 v
.enter_visit
(_n_expr
)
6342 v
.enter_visit
(_n_expr2
)
6345 redef fun visit_all_reverse
(v
: Visitor)
6347 v
.enter_visit
(_n_expr
)
6348 v
.enter_visit
(_n_expr2
)
6351 redef class AStarshipExpr
6352 redef fun n_expr
=(n
)
6357 redef fun n_expr2
=(n
)
6363 private init empty_init
do end
6365 init init_astarshipexpr
(
6366 n_expr
: nullable AExpr,
6367 n_expr2
: nullable AExpr
6371 _n_expr
= n_expr
.as(not null)
6372 n_expr
.parent
= self
6373 _n_expr2
= n_expr2
.as(not null)
6374 n_expr2
.parent
= self
6377 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6379 if _n_expr
== old_child
then
6380 if new_child
!= null then
6381 new_child
.parent
= self
6382 assert new_child
isa AExpr
6389 if _n_expr2
== old_child
then
6390 if new_child
!= null then
6391 new_child
.parent
= self
6392 assert new_child
isa AExpr
6393 _n_expr2
= new_child
6401 redef fun visit_all
(v
: Visitor)
6403 v
.enter_visit
(_n_expr
)
6404 v
.enter_visit
(_n_expr2
)
6407 redef fun visit_all_reverse
(v
: Visitor)
6409 v
.enter_visit
(_n_expr
)
6410 v
.enter_visit
(_n_expr2
)
6413 redef class AStarExpr
6414 redef fun n_expr
=(n
)
6419 redef fun n_expr2
=(n
)
6425 private init empty_init
do end
6427 init init_astarexpr
(
6428 n_expr
: nullable AExpr,
6429 n_expr2
: nullable AExpr
6433 _n_expr
= n_expr
.as(not null)
6434 n_expr
.parent
= self
6435 _n_expr2
= n_expr2
.as(not null)
6436 n_expr2
.parent
= self
6439 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6441 if _n_expr
== old_child
then
6442 if new_child
!= null then
6443 new_child
.parent
= self
6444 assert new_child
isa AExpr
6451 if _n_expr2
== old_child
then
6452 if new_child
!= null then
6453 new_child
.parent
= self
6454 assert new_child
isa AExpr
6455 _n_expr2
= new_child
6463 redef fun visit_all
(v
: Visitor)
6465 v
.enter_visit
(_n_expr
)
6466 v
.enter_visit
(_n_expr2
)
6469 redef fun visit_all_reverse
(v
: Visitor)
6471 v
.enter_visit
(_n_expr
)
6472 v
.enter_visit
(_n_expr2
)
6475 redef class ASlashExpr
6476 redef fun n_expr
=(n
)
6481 redef fun n_expr2
=(n
)
6487 private init empty_init
do end
6489 init init_aslashexpr
(
6490 n_expr
: nullable AExpr,
6491 n_expr2
: nullable AExpr
6495 _n_expr
= n_expr
.as(not null)
6496 n_expr
.parent
= self
6497 _n_expr2
= n_expr2
.as(not null)
6498 n_expr2
.parent
= self
6501 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6503 if _n_expr
== old_child
then
6504 if new_child
!= null then
6505 new_child
.parent
= self
6506 assert new_child
isa AExpr
6513 if _n_expr2
== old_child
then
6514 if new_child
!= null then
6515 new_child
.parent
= self
6516 assert new_child
isa AExpr
6517 _n_expr2
= new_child
6525 redef fun visit_all
(v
: Visitor)
6527 v
.enter_visit
(_n_expr
)
6528 v
.enter_visit
(_n_expr2
)
6531 redef fun visit_all_reverse
(v
: Visitor)
6533 v
.enter_visit
(_n_expr
)
6534 v
.enter_visit
(_n_expr2
)
6537 redef class APercentExpr
6538 redef fun n_expr
=(n
)
6543 redef fun n_expr2
=(n
)
6549 private init empty_init
do end
6551 init init_apercentexpr
(
6552 n_expr
: nullable AExpr,
6553 n_expr2
: nullable AExpr
6557 _n_expr
= n_expr
.as(not null)
6558 n_expr
.parent
= self
6559 _n_expr2
= n_expr2
.as(not null)
6560 n_expr2
.parent
= self
6563 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6565 if _n_expr
== old_child
then
6566 if new_child
!= null then
6567 new_child
.parent
= self
6568 assert new_child
isa AExpr
6575 if _n_expr2
== old_child
then
6576 if new_child
!= null then
6577 new_child
.parent
= self
6578 assert new_child
isa AExpr
6579 _n_expr2
= new_child
6587 redef fun visit_all
(v
: Visitor)
6589 v
.enter_visit
(_n_expr
)
6590 v
.enter_visit
(_n_expr2
)
6593 redef fun visit_all_reverse
(v
: Visitor)
6595 v
.enter_visit
(_n_expr
)
6596 v
.enter_visit
(_n_expr2
)
6599 redef class AUminusExpr
6600 redef fun n_minus
=(n
)
6605 redef fun n_expr
=(n
)
6611 private init empty_init
do end
6613 init init_auminusexpr
(
6614 n_minus
: nullable TMinus,
6615 n_expr
: nullable AExpr
6619 _n_minus
= n_minus
.as(not null)
6620 n_minus
.parent
= self
6621 _n_expr
= n_expr
.as(not null)
6622 n_expr
.parent
= self
6625 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6627 if _n_minus
== old_child
then
6628 if new_child
!= null then
6629 new_child
.parent
= self
6630 assert new_child
isa TMinus
6631 _n_minus
= new_child
6637 if _n_expr
== old_child
then
6638 if new_child
!= null then
6639 new_child
.parent
= self
6640 assert new_child
isa AExpr
6649 redef fun visit_all
(v
: Visitor)
6651 v
.enter_visit
(_n_minus
)
6652 v
.enter_visit
(_n_expr
)
6655 redef fun visit_all_reverse
(v
: Visitor)
6657 v
.enter_visit
(_n_minus
)
6658 v
.enter_visit
(_n_expr
)
6661 redef class ANewExpr
6662 redef fun n_kwnew
=(n
)
6667 redef fun n_type
=(n
)
6680 private init empty_init
do end
6682 init init_anewexpr
(
6683 n_kwnew
: nullable TKwnew,
6684 n_type
: nullable AType,
6686 n_args
: Collection[Object] # Should be Collection[AExpr]
6690 _n_kwnew
= n_kwnew
.as(not null)
6691 n_kwnew
.parent
= self
6692 _n_type
= n_type
.as(not null)
6693 n_type
.parent
= self
6695 if n_id
!= null then
6705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6707 if _n_kwnew
== old_child
then
6708 if new_child
!= null then
6709 new_child
.parent
= self
6710 assert new_child
isa TKwnew
6711 _n_kwnew
= new_child
6717 if _n_type
== old_child
then
6718 if new_child
!= null then
6719 new_child
.parent
= self
6720 assert new_child
isa AType
6727 if _n_id
== old_child
then
6728 if new_child
!= null then
6729 new_child
.parent
= self
6730 assert new_child
isa TId
6737 for i
in [0.._n_args
.length
[ do
6738 if _n_args
[i
] == old_child
then
6739 if new_child
!= null then
6740 assert new_child
isa AExpr
6741 _n_args
[i
] = new_child
6742 new_child
.parent
= self
6744 _n_args
.remove_at
(i
)
6751 redef fun visit_all
(v
: Visitor)
6753 v
.enter_visit
(_n_kwnew
)
6754 v
.enter_visit
(_n_type
)
6755 if _n_id
!= null then
6756 v
.enter_visit
(_n_id
.as(not null))
6763 redef fun visit_all_reverse
(v
: Visitor)
6765 v
.enter_visit
(_n_kwnew
)
6766 v
.enter_visit
(_n_type
)
6767 if _n_id
!= null then
6768 v
.enter_visit
(_n_id
.as(not null))
6771 var i
= _n_args
.length
6773 v
.enter_visit
(_n_args
[i
])
6779 redef class AAttrExpr
6780 redef fun n_expr
=(n
)
6791 private init empty_init
do end
6793 init init_aattrexpr
(
6794 n_expr
: nullable AExpr,
6795 n_id
: nullable TAttrid
6799 _n_expr
= n_expr
.as(not null)
6800 n_expr
.parent
= self
6801 _n_id
= n_id
.as(not null)
6805 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6807 if _n_expr
== old_child
then
6808 if new_child
!= null then
6809 new_child
.parent
= self
6810 assert new_child
isa AExpr
6817 if _n_id
== old_child
then
6818 if new_child
!= null then
6819 new_child
.parent
= self
6820 assert new_child
isa TAttrid
6829 redef fun visit_all
(v
: Visitor)
6831 v
.enter_visit
(_n_expr
)
6832 v
.enter_visit
(_n_id
)
6835 redef fun visit_all_reverse
(v
: Visitor)
6837 v
.enter_visit
(_n_expr
)
6838 v
.enter_visit
(_n_id
)
6841 redef class AAttrAssignExpr
6842 redef fun n_expr
=(n
)
6852 redef fun n_assign
=(n
)
6857 redef fun n_value
=(n
)
6863 private init empty_init
do end
6865 init init_aattrassignexpr
(
6866 n_expr
: nullable AExpr,
6867 n_id
: nullable TAttrid,
6868 n_assign
: nullable TAssign,
6869 n_value
: nullable AExpr
6873 _n_expr
= n_expr
.as(not null)
6874 n_expr
.parent
= self
6875 _n_id
= n_id
.as(not null)
6877 _n_assign
= n_assign
.as(not null)
6878 n_assign
.parent
= self
6879 _n_value
= n_value
.as(not null)
6880 n_value
.parent
= self
6883 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6885 if _n_expr
== old_child
then
6886 if new_child
!= null then
6887 new_child
.parent
= self
6888 assert new_child
isa AExpr
6895 if _n_id
== old_child
then
6896 if new_child
!= null then
6897 new_child
.parent
= self
6898 assert new_child
isa TAttrid
6905 if _n_assign
== old_child
then
6906 if new_child
!= null then
6907 new_child
.parent
= self
6908 assert new_child
isa TAssign
6909 _n_assign
= new_child
6915 if _n_value
== old_child
then
6916 if new_child
!= null then
6917 new_child
.parent
= self
6918 assert new_child
isa AExpr
6919 _n_value
= new_child
6927 redef fun visit_all
(v
: Visitor)
6929 v
.enter_visit
(_n_expr
)
6930 v
.enter_visit
(_n_id
)
6931 v
.enter_visit
(_n_assign
)
6932 v
.enter_visit
(_n_value
)
6935 redef fun visit_all_reverse
(v
: Visitor)
6937 v
.enter_visit
(_n_expr
)
6938 v
.enter_visit
(_n_id
)
6939 v
.enter_visit
(_n_assign
)
6940 v
.enter_visit
(_n_value
)
6943 redef class AAttrReassignExpr
6944 redef fun n_expr
=(n
)
6954 redef fun n_assign_op
=(n
)
6959 redef fun n_value
=(n
)
6965 private init empty_init
do end
6967 init init_aattrreassignexpr
(
6968 n_expr
: nullable AExpr,
6969 n_id
: nullable TAttrid,
6970 n_assign_op
: nullable AAssignOp,
6971 n_value
: nullable AExpr
6975 _n_expr
= n_expr
.as(not null)
6976 n_expr
.parent
= self
6977 _n_id
= n_id
.as(not null)
6979 _n_assign_op
= n_assign_op
.as(not null)
6980 n_assign_op
.parent
= self
6981 _n_value
= n_value
.as(not null)
6982 n_value
.parent
= self
6985 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6987 if _n_expr
== old_child
then
6988 if new_child
!= null then
6989 new_child
.parent
= self
6990 assert new_child
isa AExpr
6997 if _n_id
== old_child
then
6998 if new_child
!= null then
6999 new_child
.parent
= self
7000 assert new_child
isa TAttrid
7007 if _n_assign_op
== old_child
then
7008 if new_child
!= null then
7009 new_child
.parent
= self
7010 assert new_child
isa AAssignOp
7011 _n_assign_op
= new_child
7017 if _n_value
== old_child
then
7018 if new_child
!= null then
7019 new_child
.parent
= self
7020 assert new_child
isa AExpr
7021 _n_value
= new_child
7029 redef fun visit_all
(v
: Visitor)
7031 v
.enter_visit
(_n_expr
)
7032 v
.enter_visit
(_n_id
)
7033 v
.enter_visit
(_n_assign_op
)
7034 v
.enter_visit
(_n_value
)
7037 redef fun visit_all_reverse
(v
: Visitor)
7039 v
.enter_visit
(_n_expr
)
7040 v
.enter_visit
(_n_id
)
7041 v
.enter_visit
(_n_assign_op
)
7042 v
.enter_visit
(_n_value
)
7045 redef class ACallExpr
7046 redef fun n_expr
=(n
)
7057 private init empty_init
do end
7059 init init_acallexpr
(
7060 n_expr
: nullable AExpr,
7062 n_args
: Collection[Object], # Should be Collection[AExpr]
7063 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7067 _n_expr
= n_expr
.as(not null)
7068 n_expr
.parent
= self
7069 _n_id
= n_id
.as(not null)
7076 for n
in n_closure_defs
do
7077 assert n
isa AClosureDef
7078 _n_closure_defs
.add
(n
)
7083 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7085 if _n_expr
== old_child
then
7086 if new_child
!= null then
7087 new_child
.parent
= self
7088 assert new_child
isa AExpr
7095 if _n_id
== old_child
then
7096 if new_child
!= null then
7097 new_child
.parent
= self
7098 assert new_child
isa TId
7105 for i
in [0.._n_args
.length
[ do
7106 if _n_args
[i
] == old_child
then
7107 if new_child
!= null then
7108 assert new_child
isa AExpr
7109 _n_args
[i
] = new_child
7110 new_child
.parent
= self
7112 _n_args
.remove_at
(i
)
7117 for i
in [0.._n_closure_defs
.length
[ do
7118 if _n_closure_defs
[i
] == old_child
then
7119 if new_child
!= null then
7120 assert new_child
isa AClosureDef
7121 _n_closure_defs
[i
] = new_child
7122 new_child
.parent
= self
7124 _n_closure_defs
.remove_at
(i
)
7131 redef fun visit_all
(v
: Visitor)
7133 v
.enter_visit
(_n_expr
)
7134 v
.enter_visit
(_n_id
)
7138 for n
in _n_closure_defs
do
7143 redef fun visit_all_reverse
(v
: Visitor)
7145 v
.enter_visit
(_n_expr
)
7146 v
.enter_visit
(_n_id
)
7148 var i
= _n_args
.length
7150 v
.enter_visit
(_n_args
[i
])
7155 var i
= _n_closure_defs
.length
7157 v
.enter_visit
(_n_closure_defs
[i
])
7163 redef class ACallAssignExpr
7164 redef fun n_expr
=(n
)
7174 redef fun n_assign
=(n
)
7179 redef fun n_value
=(n
)
7185 private init empty_init
do end
7187 init init_acallassignexpr
(
7188 n_expr
: nullable AExpr,
7190 n_args
: Collection[Object], # Should be Collection[AExpr]
7191 n_assign
: nullable TAssign,
7192 n_value
: nullable AExpr
7196 _n_expr
= n_expr
.as(not null)
7197 n_expr
.parent
= self
7198 _n_id
= n_id
.as(not null)
7205 _n_assign
= n_assign
.as(not null)
7206 n_assign
.parent
= self
7207 _n_value
= n_value
.as(not null)
7208 n_value
.parent
= self
7211 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7213 if _n_expr
== old_child
then
7214 if new_child
!= null then
7215 new_child
.parent
= self
7216 assert new_child
isa AExpr
7223 if _n_id
== old_child
then
7224 if new_child
!= null then
7225 new_child
.parent
= self
7226 assert new_child
isa TId
7233 for i
in [0.._n_args
.length
[ do
7234 if _n_args
[i
] == old_child
then
7235 if new_child
!= null then
7236 assert new_child
isa AExpr
7237 _n_args
[i
] = new_child
7238 new_child
.parent
= self
7240 _n_args
.remove_at
(i
)
7245 if _n_assign
== old_child
then
7246 if new_child
!= null then
7247 new_child
.parent
= self
7248 assert new_child
isa TAssign
7249 _n_assign
= new_child
7255 if _n_value
== old_child
then
7256 if new_child
!= null then
7257 new_child
.parent
= self
7258 assert new_child
isa AExpr
7259 _n_value
= new_child
7267 redef fun visit_all
(v
: Visitor)
7269 v
.enter_visit
(_n_expr
)
7270 v
.enter_visit
(_n_id
)
7274 v
.enter_visit
(_n_assign
)
7275 v
.enter_visit
(_n_value
)
7278 redef fun visit_all_reverse
(v
: Visitor)
7280 v
.enter_visit
(_n_expr
)
7281 v
.enter_visit
(_n_id
)
7283 var i
= _n_args
.length
7285 v
.enter_visit
(_n_args
[i
])
7289 v
.enter_visit
(_n_assign
)
7290 v
.enter_visit
(_n_value
)
7293 redef class ACallReassignExpr
7294 redef fun n_expr
=(n
)
7304 redef fun n_assign_op
=(n
)
7309 redef fun n_value
=(n
)
7315 private init empty_init
do end
7317 init init_acallreassignexpr
(
7318 n_expr
: nullable AExpr,
7320 n_args
: Collection[Object], # Should be Collection[AExpr]
7321 n_assign_op
: nullable AAssignOp,
7322 n_value
: nullable AExpr
7326 _n_expr
= n_expr
.as(not null)
7327 n_expr
.parent
= self
7328 _n_id
= n_id
.as(not null)
7335 _n_assign_op
= n_assign_op
.as(not null)
7336 n_assign_op
.parent
= self
7337 _n_value
= n_value
.as(not null)
7338 n_value
.parent
= self
7341 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7343 if _n_expr
== old_child
then
7344 if new_child
!= null then
7345 new_child
.parent
= self
7346 assert new_child
isa AExpr
7353 if _n_id
== old_child
then
7354 if new_child
!= null then
7355 new_child
.parent
= self
7356 assert new_child
isa TId
7363 for i
in [0.._n_args
.length
[ do
7364 if _n_args
[i
] == old_child
then
7365 if new_child
!= null then
7366 assert new_child
isa AExpr
7367 _n_args
[i
] = new_child
7368 new_child
.parent
= self
7370 _n_args
.remove_at
(i
)
7375 if _n_assign_op
== old_child
then
7376 if new_child
!= null then
7377 new_child
.parent
= self
7378 assert new_child
isa AAssignOp
7379 _n_assign_op
= new_child
7385 if _n_value
== old_child
then
7386 if new_child
!= null then
7387 new_child
.parent
= self
7388 assert new_child
isa AExpr
7389 _n_value
= new_child
7397 redef fun visit_all
(v
: Visitor)
7399 v
.enter_visit
(_n_expr
)
7400 v
.enter_visit
(_n_id
)
7404 v
.enter_visit
(_n_assign_op
)
7405 v
.enter_visit
(_n_value
)
7408 redef fun visit_all_reverse
(v
: Visitor)
7410 v
.enter_visit
(_n_expr
)
7411 v
.enter_visit
(_n_id
)
7413 var i
= _n_args
.length
7415 v
.enter_visit
(_n_args
[i
])
7419 v
.enter_visit
(_n_assign_op
)
7420 v
.enter_visit
(_n_value
)
7423 redef class ASuperExpr
7424 redef fun n_qualified
=(n
)
7431 redef fun n_kwsuper
=(n
)
7437 private init empty_init
do end
7439 init init_asuperexpr
(
7440 n_qualified
: nullable AQualified,
7441 n_kwsuper
: nullable TKwsuper,
7442 n_args
: Collection[Object] # Should be Collection[AExpr]
7446 _n_qualified
= n_qualified
7447 if n_qualified
!= null then
7448 n_qualified
.parent
= self
7450 _n_kwsuper
= n_kwsuper
.as(not null)
7451 n_kwsuper
.parent
= self
7459 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7461 if _n_qualified
== old_child
then
7462 if new_child
!= null then
7463 new_child
.parent
= self
7464 assert new_child
isa AQualified
7465 _n_qualified
= new_child
7471 if _n_kwsuper
== old_child
then
7472 if new_child
!= null then
7473 new_child
.parent
= self
7474 assert new_child
isa TKwsuper
7475 _n_kwsuper
= new_child
7481 for i
in [0.._n_args
.length
[ do
7482 if _n_args
[i
] == old_child
then
7483 if new_child
!= null then
7484 assert new_child
isa AExpr
7485 _n_args
[i
] = new_child
7486 new_child
.parent
= self
7488 _n_args
.remove_at
(i
)
7495 redef fun visit_all
(v
: Visitor)
7497 if _n_qualified
!= null then
7498 v
.enter_visit
(_n_qualified
.as(not null))
7500 v
.enter_visit
(_n_kwsuper
)
7506 redef fun visit_all_reverse
(v
: Visitor)
7508 if _n_qualified
!= null then
7509 v
.enter_visit
(_n_qualified
.as(not null))
7511 v
.enter_visit
(_n_kwsuper
)
7513 var i
= _n_args
.length
7515 v
.enter_visit
(_n_args
[i
])
7521 redef class AInitExpr
7522 redef fun n_expr
=(n
)
7527 redef fun n_kwinit
=(n
)
7533 private init empty_init
do end
7535 init init_ainitexpr
(
7536 n_expr
: nullable AExpr,
7537 n_kwinit
: nullable TKwinit,
7538 n_args
: Collection[Object] # Should be Collection[AExpr]
7542 _n_expr
= n_expr
.as(not null)
7543 n_expr
.parent
= self
7544 _n_kwinit
= n_kwinit
.as(not null)
7545 n_kwinit
.parent
= self
7553 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7555 if _n_expr
== old_child
then
7556 if new_child
!= null then
7557 new_child
.parent
= self
7558 assert new_child
isa AExpr
7565 if _n_kwinit
== old_child
then
7566 if new_child
!= null then
7567 new_child
.parent
= self
7568 assert new_child
isa TKwinit
7569 _n_kwinit
= new_child
7575 for i
in [0.._n_args
.length
[ do
7576 if _n_args
[i
] == old_child
then
7577 if new_child
!= null then
7578 assert new_child
isa AExpr
7579 _n_args
[i
] = new_child
7580 new_child
.parent
= self
7582 _n_args
.remove_at
(i
)
7589 redef fun visit_all
(v
: Visitor)
7591 v
.enter_visit
(_n_expr
)
7592 v
.enter_visit
(_n_kwinit
)
7598 redef fun visit_all_reverse
(v
: Visitor)
7600 v
.enter_visit
(_n_expr
)
7601 v
.enter_visit
(_n_kwinit
)
7603 var i
= _n_args
.length
7605 v
.enter_visit
(_n_args
[i
])
7611 redef class ABraExpr
7612 redef fun n_expr
=(n
)
7618 private init empty_init
do end
7620 init init_abraexpr
(
7621 n_expr
: nullable AExpr,
7622 n_args
: Collection[Object], # Should be Collection[AExpr]
7623 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7627 _n_expr
= n_expr
.as(not null)
7628 n_expr
.parent
= self
7634 for n
in n_closure_defs
do
7635 assert n
isa AClosureDef
7636 _n_closure_defs
.add
(n
)
7641 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7643 if _n_expr
== old_child
then
7644 if new_child
!= null then
7645 new_child
.parent
= self
7646 assert new_child
isa AExpr
7653 for i
in [0.._n_args
.length
[ do
7654 if _n_args
[i
] == old_child
then
7655 if new_child
!= null then
7656 assert new_child
isa AExpr
7657 _n_args
[i
] = new_child
7658 new_child
.parent
= self
7660 _n_args
.remove_at
(i
)
7665 for i
in [0.._n_closure_defs
.length
[ do
7666 if _n_closure_defs
[i
] == old_child
then
7667 if new_child
!= null then
7668 assert new_child
isa AClosureDef
7669 _n_closure_defs
[i
] = new_child
7670 new_child
.parent
= self
7672 _n_closure_defs
.remove_at
(i
)
7679 redef fun visit_all
(v
: Visitor)
7681 v
.enter_visit
(_n_expr
)
7685 for n
in _n_closure_defs
do
7690 redef fun visit_all_reverse
(v
: Visitor)
7692 v
.enter_visit
(_n_expr
)
7694 var i
= _n_args
.length
7696 v
.enter_visit
(_n_args
[i
])
7701 var i
= _n_closure_defs
.length
7703 v
.enter_visit
(_n_closure_defs
[i
])
7709 redef class ABraAssignExpr
7710 redef fun n_expr
=(n
)
7715 redef fun n_assign
=(n
)
7720 redef fun n_value
=(n
)
7726 private init empty_init
do end
7728 init init_abraassignexpr
(
7729 n_expr
: nullable AExpr,
7730 n_args
: Collection[Object], # Should be Collection[AExpr]
7731 n_assign
: nullable TAssign,
7732 n_value
: nullable AExpr
7736 _n_expr
= n_expr
.as(not null)
7737 n_expr
.parent
= self
7743 _n_assign
= n_assign
.as(not null)
7744 n_assign
.parent
= self
7745 _n_value
= n_value
.as(not null)
7746 n_value
.parent
= self
7749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7751 if _n_expr
== old_child
then
7752 if new_child
!= null then
7753 new_child
.parent
= self
7754 assert new_child
isa AExpr
7761 for i
in [0.._n_args
.length
[ do
7762 if _n_args
[i
] == old_child
then
7763 if new_child
!= null then
7764 assert new_child
isa AExpr
7765 _n_args
[i
] = new_child
7766 new_child
.parent
= self
7768 _n_args
.remove_at
(i
)
7773 if _n_assign
== old_child
then
7774 if new_child
!= null then
7775 new_child
.parent
= self
7776 assert new_child
isa TAssign
7777 _n_assign
= new_child
7783 if _n_value
== old_child
then
7784 if new_child
!= null then
7785 new_child
.parent
= self
7786 assert new_child
isa AExpr
7787 _n_value
= new_child
7795 redef fun visit_all
(v
: Visitor)
7797 v
.enter_visit
(_n_expr
)
7801 v
.enter_visit
(_n_assign
)
7802 v
.enter_visit
(_n_value
)
7805 redef fun visit_all_reverse
(v
: Visitor)
7807 v
.enter_visit
(_n_expr
)
7809 var i
= _n_args
.length
7811 v
.enter_visit
(_n_args
[i
])
7815 v
.enter_visit
(_n_assign
)
7816 v
.enter_visit
(_n_value
)
7819 redef class ABraReassignExpr
7820 redef fun n_expr
=(n
)
7825 redef fun n_assign_op
=(n
)
7830 redef fun n_value
=(n
)
7836 private init empty_init
do end
7838 init init_abrareassignexpr
(
7839 n_expr
: nullable AExpr,
7840 n_args
: Collection[Object], # Should be Collection[AExpr]
7841 n_assign_op
: nullable AAssignOp,
7842 n_value
: nullable AExpr
7846 _n_expr
= n_expr
.as(not null)
7847 n_expr
.parent
= self
7853 _n_assign_op
= n_assign_op
.as(not null)
7854 n_assign_op
.parent
= self
7855 _n_value
= n_value
.as(not null)
7856 n_value
.parent
= self
7859 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7861 if _n_expr
== old_child
then
7862 if new_child
!= null then
7863 new_child
.parent
= self
7864 assert new_child
isa AExpr
7871 for i
in [0.._n_args
.length
[ do
7872 if _n_args
[i
] == old_child
then
7873 if new_child
!= null then
7874 assert new_child
isa AExpr
7875 _n_args
[i
] = new_child
7876 new_child
.parent
= self
7878 _n_args
.remove_at
(i
)
7883 if _n_assign_op
== old_child
then
7884 if new_child
!= null then
7885 new_child
.parent
= self
7886 assert new_child
isa AAssignOp
7887 _n_assign_op
= new_child
7893 if _n_value
== old_child
then
7894 if new_child
!= null then
7895 new_child
.parent
= self
7896 assert new_child
isa AExpr
7897 _n_value
= new_child
7905 redef fun visit_all
(v
: Visitor)
7907 v
.enter_visit
(_n_expr
)
7911 v
.enter_visit
(_n_assign_op
)
7912 v
.enter_visit
(_n_value
)
7915 redef fun visit_all_reverse
(v
: Visitor)
7917 v
.enter_visit
(_n_expr
)
7919 var i
= _n_args
.length
7921 v
.enter_visit
(_n_args
[i
])
7925 v
.enter_visit
(_n_assign_op
)
7926 v
.enter_visit
(_n_value
)
7929 redef class AClosureCallExpr
7936 private init empty_init
do end
7938 init init_aclosurecallexpr
(
7940 n_args
: Collection[Object], # Should be Collection[AExpr]
7941 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7945 _n_id
= n_id
.as(not null)
7952 for n
in n_closure_defs
do
7953 assert n
isa AClosureDef
7954 _n_closure_defs
.add
(n
)
7959 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7961 if _n_id
== old_child
then
7962 if new_child
!= null then
7963 new_child
.parent
= self
7964 assert new_child
isa TId
7971 for i
in [0.._n_args
.length
[ do
7972 if _n_args
[i
] == old_child
then
7973 if new_child
!= null then
7974 assert new_child
isa AExpr
7975 _n_args
[i
] = new_child
7976 new_child
.parent
= self
7978 _n_args
.remove_at
(i
)
7983 for i
in [0.._n_closure_defs
.length
[ do
7984 if _n_closure_defs
[i
] == old_child
then
7985 if new_child
!= null then
7986 assert new_child
isa AClosureDef
7987 _n_closure_defs
[i
] = new_child
7988 new_child
.parent
= self
7990 _n_closure_defs
.remove_at
(i
)
7997 redef fun visit_all
(v
: Visitor)
7999 v
.enter_visit
(_n_id
)
8003 for n
in _n_closure_defs
do
8008 redef fun visit_all_reverse
(v
: Visitor)
8010 v
.enter_visit
(_n_id
)
8012 var i
= _n_args
.length
8014 v
.enter_visit
(_n_args
[i
])
8019 var i
= _n_closure_defs
.length
8021 v
.enter_visit
(_n_closure_defs
[i
])
8027 redef class AVarExpr
8034 private init empty_init
do end
8036 init init_avarexpr
(
8041 _n_id
= n_id
.as(not null)
8045 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8047 if _n_id
== old_child
then
8048 if new_child
!= null then
8049 new_child
.parent
= self
8050 assert new_child
isa TId
8059 redef fun visit_all
(v
: Visitor)
8061 v
.enter_visit
(_n_id
)
8064 redef fun visit_all_reverse
(v
: Visitor)
8066 v
.enter_visit
(_n_id
)
8069 redef class AVarAssignExpr
8075 redef fun n_assign
=(n
)
8080 redef fun n_value
=(n
)
8086 private init empty_init
do end
8088 init init_avarassignexpr
(
8090 n_assign
: nullable TAssign,
8091 n_value
: nullable AExpr
8095 _n_id
= n_id
.as(not null)
8097 _n_assign
= n_assign
.as(not null)
8098 n_assign
.parent
= self
8099 _n_value
= n_value
.as(not null)
8100 n_value
.parent
= self
8103 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8105 if _n_id
== old_child
then
8106 if new_child
!= null then
8107 new_child
.parent
= self
8108 assert new_child
isa TId
8115 if _n_assign
== old_child
then
8116 if new_child
!= null then
8117 new_child
.parent
= self
8118 assert new_child
isa TAssign
8119 _n_assign
= new_child
8125 if _n_value
== old_child
then
8126 if new_child
!= null then
8127 new_child
.parent
= self
8128 assert new_child
isa AExpr
8129 _n_value
= new_child
8137 redef fun visit_all
(v
: Visitor)
8139 v
.enter_visit
(_n_id
)
8140 v
.enter_visit
(_n_assign
)
8141 v
.enter_visit
(_n_value
)
8144 redef fun visit_all_reverse
(v
: Visitor)
8146 v
.enter_visit
(_n_id
)
8147 v
.enter_visit
(_n_assign
)
8148 v
.enter_visit
(_n_value
)
8151 redef class AVarReassignExpr
8157 redef fun n_assign_op
=(n
)
8162 redef fun n_value
=(n
)
8168 private init empty_init
do end
8170 init init_avarreassignexpr
(
8172 n_assign_op
: nullable AAssignOp,
8173 n_value
: nullable AExpr
8177 _n_id
= n_id
.as(not null)
8179 _n_assign_op
= n_assign_op
.as(not null)
8180 n_assign_op
.parent
= self
8181 _n_value
= n_value
.as(not null)
8182 n_value
.parent
= self
8185 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8187 if _n_id
== old_child
then
8188 if new_child
!= null then
8189 new_child
.parent
= self
8190 assert new_child
isa TId
8197 if _n_assign_op
== old_child
then
8198 if new_child
!= null then
8199 new_child
.parent
= self
8200 assert new_child
isa AAssignOp
8201 _n_assign_op
= new_child
8207 if _n_value
== old_child
then
8208 if new_child
!= null then
8209 new_child
.parent
= self
8210 assert new_child
isa AExpr
8211 _n_value
= new_child
8219 redef fun visit_all
(v
: Visitor)
8221 v
.enter_visit
(_n_id
)
8222 v
.enter_visit
(_n_assign_op
)
8223 v
.enter_visit
(_n_value
)
8226 redef fun visit_all_reverse
(v
: Visitor)
8228 v
.enter_visit
(_n_id
)
8229 v
.enter_visit
(_n_assign_op
)
8230 v
.enter_visit
(_n_value
)
8233 redef class ARangeExpr
8234 redef fun n_expr
=(n
)
8239 redef fun n_expr2
=(n
)
8245 private init empty_init
do end
8247 init init_arangeexpr
(
8248 n_expr
: nullable AExpr,
8249 n_expr2
: nullable AExpr
8253 _n_expr
= n_expr
.as(not null)
8254 n_expr
.parent
= self
8255 _n_expr2
= n_expr2
.as(not null)
8256 n_expr2
.parent
= self
8259 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8261 if _n_expr
== old_child
then
8262 if new_child
!= null then
8263 new_child
.parent
= self
8264 assert new_child
isa AExpr
8271 if _n_expr2
== old_child
then
8272 if new_child
!= null then
8273 new_child
.parent
= self
8274 assert new_child
isa AExpr
8275 _n_expr2
= new_child
8283 redef fun visit_all
(v
: Visitor)
8285 v
.enter_visit
(_n_expr
)
8286 v
.enter_visit
(_n_expr2
)
8289 redef fun visit_all_reverse
(v
: Visitor)
8291 v
.enter_visit
(_n_expr
)
8292 v
.enter_visit
(_n_expr2
)
8295 redef class ACrangeExpr
8296 redef fun n_expr
=(n
)
8301 redef fun n_expr2
=(n
)
8307 private init empty_init
do end
8309 init init_acrangeexpr
(
8310 n_expr
: nullable AExpr,
8311 n_expr2
: nullable AExpr
8315 _n_expr
= n_expr
.as(not null)
8316 n_expr
.parent
= self
8317 _n_expr2
= n_expr2
.as(not null)
8318 n_expr2
.parent
= self
8321 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8323 if _n_expr
== old_child
then
8324 if new_child
!= null then
8325 new_child
.parent
= self
8326 assert new_child
isa AExpr
8333 if _n_expr2
== old_child
then
8334 if new_child
!= null then
8335 new_child
.parent
= self
8336 assert new_child
isa AExpr
8337 _n_expr2
= new_child
8345 redef fun visit_all
(v
: Visitor)
8347 v
.enter_visit
(_n_expr
)
8348 v
.enter_visit
(_n_expr2
)
8351 redef fun visit_all_reverse
(v
: Visitor)
8353 v
.enter_visit
(_n_expr
)
8354 v
.enter_visit
(_n_expr2
)
8357 redef class AOrangeExpr
8358 redef fun n_expr
=(n
)
8363 redef fun n_expr2
=(n
)
8369 private init empty_init
do end
8371 init init_aorangeexpr
(
8372 n_expr
: nullable AExpr,
8373 n_expr2
: nullable AExpr
8377 _n_expr
= n_expr
.as(not null)
8378 n_expr
.parent
= self
8379 _n_expr2
= n_expr2
.as(not null)
8380 n_expr2
.parent
= self
8383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8385 if _n_expr
== old_child
then
8386 if new_child
!= null then
8387 new_child
.parent
= self
8388 assert new_child
isa AExpr
8395 if _n_expr2
== old_child
then
8396 if new_child
!= null then
8397 new_child
.parent
= self
8398 assert new_child
isa AExpr
8399 _n_expr2
= new_child
8407 redef fun visit_all
(v
: Visitor)
8409 v
.enter_visit
(_n_expr
)
8410 v
.enter_visit
(_n_expr2
)
8413 redef fun visit_all_reverse
(v
: Visitor)
8415 v
.enter_visit
(_n_expr
)
8416 v
.enter_visit
(_n_expr2
)
8419 redef class AArrayExpr
8421 private init empty_init
do end
8423 init init_aarrayexpr
(
8424 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8435 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8437 for i
in [0.._n_exprs
.length
[ do
8438 if _n_exprs
[i
] == old_child
then
8439 if new_child
!= null then
8440 assert new_child
isa AExpr
8441 _n_exprs
[i
] = new_child
8442 new_child
.parent
= self
8444 _n_exprs
.remove_at
(i
)
8451 redef fun visit_all
(v
: Visitor)
8453 for n
in _n_exprs
do
8458 redef fun visit_all_reverse
(v
: Visitor)
8461 var i
= _n_exprs
.length
8463 v
.enter_visit
(_n_exprs
[i
])
8469 redef class ASelfExpr
8470 redef fun n_kwself
=(n
)
8476 private init empty_init
do end
8478 init init_aselfexpr
(
8479 n_kwself
: nullable TKwself
8483 _n_kwself
= n_kwself
.as(not null)
8484 n_kwself
.parent
= self
8487 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8489 if _n_kwself
== old_child
then
8490 if new_child
!= null then
8491 new_child
.parent
= self
8492 assert new_child
isa TKwself
8493 _n_kwself
= new_child
8501 redef fun visit_all
(v
: Visitor)
8503 v
.enter_visit
(_n_kwself
)
8506 redef fun visit_all_reverse
(v
: Visitor)
8508 v
.enter_visit
(_n_kwself
)
8511 redef class AImplicitSelfExpr
8513 private init empty_init
do end
8515 init init_aimplicitselfexpr
8520 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8524 redef fun visit_all
(v
: Visitor)
8528 redef fun visit_all_reverse
(v
: Visitor)
8532 redef class ATrueExpr
8533 redef fun n_kwtrue
=(n
)
8539 private init empty_init
do end
8541 init init_atrueexpr
(
8542 n_kwtrue
: nullable TKwtrue
8546 _n_kwtrue
= n_kwtrue
.as(not null)
8547 n_kwtrue
.parent
= self
8550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8552 if _n_kwtrue
== old_child
then
8553 if new_child
!= null then
8554 new_child
.parent
= self
8555 assert new_child
isa TKwtrue
8556 _n_kwtrue
= new_child
8564 redef fun visit_all
(v
: Visitor)
8566 v
.enter_visit
(_n_kwtrue
)
8569 redef fun visit_all_reverse
(v
: Visitor)
8571 v
.enter_visit
(_n_kwtrue
)
8574 redef class AFalseExpr
8575 redef fun n_kwfalse
=(n
)
8581 private init empty_init
do end
8583 init init_afalseexpr
(
8584 n_kwfalse
: nullable TKwfalse
8588 _n_kwfalse
= n_kwfalse
.as(not null)
8589 n_kwfalse
.parent
= self
8592 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8594 if _n_kwfalse
== old_child
then
8595 if new_child
!= null then
8596 new_child
.parent
= self
8597 assert new_child
isa TKwfalse
8598 _n_kwfalse
= new_child
8606 redef fun visit_all
(v
: Visitor)
8608 v
.enter_visit
(_n_kwfalse
)
8611 redef fun visit_all_reverse
(v
: Visitor)
8613 v
.enter_visit
(_n_kwfalse
)
8616 redef class ANullExpr
8617 redef fun n_kwnull
=(n
)
8623 private init empty_init
do end
8625 init init_anullexpr
(
8626 n_kwnull
: nullable TKwnull
8630 _n_kwnull
= n_kwnull
.as(not null)
8631 n_kwnull
.parent
= self
8634 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8636 if _n_kwnull
== old_child
then
8637 if new_child
!= null then
8638 new_child
.parent
= self
8639 assert new_child
isa TKwnull
8640 _n_kwnull
= new_child
8648 redef fun visit_all
(v
: Visitor)
8650 v
.enter_visit
(_n_kwnull
)
8653 redef fun visit_all_reverse
(v
: Visitor)
8655 v
.enter_visit
(_n_kwnull
)
8658 redef class AIntExpr
8659 redef fun n_number
=(n
)
8665 private init empty_init
do end
8667 init init_aintexpr
(
8668 n_number
: nullable TNumber
8672 _n_number
= n_number
.as(not null)
8673 n_number
.parent
= self
8676 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8678 if _n_number
== old_child
then
8679 if new_child
!= null then
8680 new_child
.parent
= self
8681 assert new_child
isa TNumber
8682 _n_number
= new_child
8690 redef fun visit_all
(v
: Visitor)
8692 v
.enter_visit
(_n_number
)
8695 redef fun visit_all_reverse
(v
: Visitor)
8697 v
.enter_visit
(_n_number
)
8700 redef class AFloatExpr
8701 redef fun n_float
=(n
)
8707 private init empty_init
do end
8709 init init_afloatexpr
(
8710 n_float
: nullable TFloat
8714 _n_float
= n_float
.as(not null)
8715 n_float
.parent
= self
8718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8720 if _n_float
== old_child
then
8721 if new_child
!= null then
8722 new_child
.parent
= self
8723 assert new_child
isa TFloat
8724 _n_float
= new_child
8732 redef fun visit_all
(v
: Visitor)
8734 v
.enter_visit
(_n_float
)
8737 redef fun visit_all_reverse
(v
: Visitor)
8739 v
.enter_visit
(_n_float
)
8742 redef class ACharExpr
8743 redef fun n_char
=(n
)
8749 private init empty_init
do end
8751 init init_acharexpr
(
8752 n_char
: nullable TChar
8756 _n_char
= n_char
.as(not null)
8757 n_char
.parent
= self
8760 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8762 if _n_char
== old_child
then
8763 if new_child
!= null then
8764 new_child
.parent
= self
8765 assert new_child
isa TChar
8774 redef fun visit_all
(v
: Visitor)
8776 v
.enter_visit
(_n_char
)
8779 redef fun visit_all_reverse
(v
: Visitor)
8781 v
.enter_visit
(_n_char
)
8784 redef class AStringExpr
8785 redef fun n_string
=(n
)
8791 private init empty_init
do end
8793 init init_astringexpr
(
8794 n_string
: nullable TString
8798 _n_string
= n_string
.as(not null)
8799 n_string
.parent
= self
8802 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8804 if _n_string
== old_child
then
8805 if new_child
!= null then
8806 new_child
.parent
= self
8807 assert new_child
isa TString
8808 _n_string
= new_child
8816 redef fun visit_all
(v
: Visitor)
8818 v
.enter_visit
(_n_string
)
8821 redef fun visit_all_reverse
(v
: Visitor)
8823 v
.enter_visit
(_n_string
)
8826 redef class AStartStringExpr
8827 redef fun n_string
=(n
)
8833 private init empty_init
do end
8835 init init_astartstringexpr
(
8836 n_string
: nullable TStartString
8840 _n_string
= n_string
.as(not null)
8841 n_string
.parent
= self
8844 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8846 if _n_string
== old_child
then
8847 if new_child
!= null then
8848 new_child
.parent
= self
8849 assert new_child
isa TStartString
8850 _n_string
= new_child
8858 redef fun visit_all
(v
: Visitor)
8860 v
.enter_visit
(_n_string
)
8863 redef fun visit_all_reverse
(v
: Visitor)
8865 v
.enter_visit
(_n_string
)
8868 redef class AMidStringExpr
8869 redef fun n_string
=(n
)
8875 private init empty_init
do end
8877 init init_amidstringexpr
(
8878 n_string
: nullable TMidString
8882 _n_string
= n_string
.as(not null)
8883 n_string
.parent
= self
8886 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8888 if _n_string
== old_child
then
8889 if new_child
!= null then
8890 new_child
.parent
= self
8891 assert new_child
isa TMidString
8892 _n_string
= new_child
8900 redef fun visit_all
(v
: Visitor)
8902 v
.enter_visit
(_n_string
)
8905 redef fun visit_all_reverse
(v
: Visitor)
8907 v
.enter_visit
(_n_string
)
8910 redef class AEndStringExpr
8911 redef fun n_string
=(n
)
8917 private init empty_init
do end
8919 init init_aendstringexpr
(
8920 n_string
: nullable TEndString
8924 _n_string
= n_string
.as(not null)
8925 n_string
.parent
= self
8928 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8930 if _n_string
== old_child
then
8931 if new_child
!= null then
8932 new_child
.parent
= self
8933 assert new_child
isa TEndString
8934 _n_string
= new_child
8942 redef fun visit_all
(v
: Visitor)
8944 v
.enter_visit
(_n_string
)
8947 redef fun visit_all_reverse
(v
: Visitor)
8949 v
.enter_visit
(_n_string
)
8952 redef class ASuperstringExpr
8954 private init empty_init
do end
8956 init init_asuperstringexpr
(
8957 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8968 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8970 for i
in [0.._n_exprs
.length
[ do
8971 if _n_exprs
[i
] == old_child
then
8972 if new_child
!= null then
8973 assert new_child
isa AExpr
8974 _n_exprs
[i
] = new_child
8975 new_child
.parent
= self
8977 _n_exprs
.remove_at
(i
)
8984 redef fun visit_all
(v
: Visitor)
8986 for n
in _n_exprs
do
8991 redef fun visit_all_reverse
(v
: Visitor)
8994 var i
= _n_exprs
.length
8996 v
.enter_visit
(_n_exprs
[i
])
9002 redef class AParExpr
9003 redef fun n_expr
=(n
)
9009 private init empty_init
do end
9011 init init_aparexpr
(
9012 n_expr
: nullable AExpr
9016 _n_expr
= n_expr
.as(not null)
9017 n_expr
.parent
= self
9020 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9022 if _n_expr
== old_child
then
9023 if new_child
!= null then
9024 new_child
.parent
= self
9025 assert new_child
isa AExpr
9034 redef fun visit_all
(v
: Visitor)
9036 v
.enter_visit
(_n_expr
)
9039 redef fun visit_all_reverse
(v
: Visitor)
9041 v
.enter_visit
(_n_expr
)
9044 redef class AAsCastExpr
9045 redef fun n_expr
=(n
)
9050 redef fun n_kwas
=(n
)
9055 redef fun n_type
=(n
)
9061 private init empty_init
do end
9063 init init_aascastexpr
(
9064 n_expr
: nullable AExpr,
9065 n_kwas
: nullable TKwas,
9066 n_type
: nullable AType
9070 _n_expr
= n_expr
.as(not null)
9071 n_expr
.parent
= self
9072 _n_kwas
= n_kwas
.as(not null)
9073 n_kwas
.parent
= self
9074 _n_type
= n_type
.as(not null)
9075 n_type
.parent
= self
9078 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9080 if _n_expr
== old_child
then
9081 if new_child
!= null then
9082 new_child
.parent
= self
9083 assert new_child
isa AExpr
9090 if _n_kwas
== old_child
then
9091 if new_child
!= null then
9092 new_child
.parent
= self
9093 assert new_child
isa TKwas
9100 if _n_type
== old_child
then
9101 if new_child
!= null then
9102 new_child
.parent
= self
9103 assert new_child
isa AType
9112 redef fun visit_all
(v
: Visitor)
9114 v
.enter_visit
(_n_expr
)
9115 v
.enter_visit
(_n_kwas
)
9116 v
.enter_visit
(_n_type
)
9119 redef fun visit_all_reverse
(v
: Visitor)
9121 v
.enter_visit
(_n_expr
)
9122 v
.enter_visit
(_n_kwas
)
9123 v
.enter_visit
(_n_type
)
9126 redef class AAsNotnullExpr
9127 redef fun n_expr
=(n
)
9132 redef fun n_kwas
=(n
)
9137 redef fun n_kwnot
=(n
)
9142 redef fun n_kwnull
=(n
)
9148 private init empty_init
do end
9150 init init_aasnotnullexpr
(
9151 n_expr
: nullable AExpr,
9152 n_kwas
: nullable TKwas,
9153 n_kwnot
: nullable TKwnot,
9154 n_kwnull
: nullable TKwnull
9158 _n_expr
= n_expr
.as(not null)
9159 n_expr
.parent
= self
9160 _n_kwas
= n_kwas
.as(not null)
9161 n_kwas
.parent
= self
9162 _n_kwnot
= n_kwnot
.as(not null)
9163 n_kwnot
.parent
= self
9164 _n_kwnull
= n_kwnull
.as(not null)
9165 n_kwnull
.parent
= self
9168 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9170 if _n_expr
== old_child
then
9171 if new_child
!= null then
9172 new_child
.parent
= self
9173 assert new_child
isa AExpr
9180 if _n_kwas
== old_child
then
9181 if new_child
!= null then
9182 new_child
.parent
= self
9183 assert new_child
isa TKwas
9190 if _n_kwnot
== old_child
then
9191 if new_child
!= null then
9192 new_child
.parent
= self
9193 assert new_child
isa TKwnot
9194 _n_kwnot
= new_child
9200 if _n_kwnull
== old_child
then
9201 if new_child
!= null then
9202 new_child
.parent
= self
9203 assert new_child
isa TKwnull
9204 _n_kwnull
= new_child
9212 redef fun visit_all
(v
: Visitor)
9214 v
.enter_visit
(_n_expr
)
9215 v
.enter_visit
(_n_kwas
)
9216 v
.enter_visit
(_n_kwnot
)
9217 v
.enter_visit
(_n_kwnull
)
9220 redef fun visit_all_reverse
(v
: Visitor)
9222 v
.enter_visit
(_n_expr
)
9223 v
.enter_visit
(_n_kwas
)
9224 v
.enter_visit
(_n_kwnot
)
9225 v
.enter_visit
(_n_kwnull
)
9228 redef class AIssetAttrExpr
9229 redef fun n_kwisset
=(n
)
9234 redef fun n_expr
=(n
)
9245 private init empty_init
do end
9247 init init_aissetattrexpr
(
9248 n_kwisset
: nullable TKwisset,
9249 n_expr
: nullable AExpr,
9250 n_id
: nullable TAttrid
9254 _n_kwisset
= n_kwisset
.as(not null)
9255 n_kwisset
.parent
= self
9256 _n_expr
= n_expr
.as(not null)
9257 n_expr
.parent
= self
9258 _n_id
= n_id
.as(not null)
9262 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9264 if _n_kwisset
== old_child
then
9265 if new_child
!= null then
9266 new_child
.parent
= self
9267 assert new_child
isa TKwisset
9268 _n_kwisset
= new_child
9274 if _n_expr
== old_child
then
9275 if new_child
!= null then
9276 new_child
.parent
= self
9277 assert new_child
isa AExpr
9284 if _n_id
== old_child
then
9285 if new_child
!= null then
9286 new_child
.parent
= self
9287 assert new_child
isa TAttrid
9296 redef fun visit_all
(v
: Visitor)
9298 v
.enter_visit
(_n_kwisset
)
9299 v
.enter_visit
(_n_expr
)
9300 v
.enter_visit
(_n_id
)
9303 redef fun visit_all_reverse
(v
: Visitor)
9305 v
.enter_visit
(_n_kwisset
)
9306 v
.enter_visit
(_n_expr
)
9307 v
.enter_visit
(_n_id
)
9310 redef class APlusAssignOp
9311 redef fun n_pluseq
=(n
)
9317 private init empty_init
do end
9319 init init_aplusassignop
(
9320 n_pluseq
: nullable TPluseq
9324 _n_pluseq
= n_pluseq
.as(not null)
9325 n_pluseq
.parent
= self
9328 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9330 if _n_pluseq
== old_child
then
9331 if new_child
!= null then
9332 new_child
.parent
= self
9333 assert new_child
isa TPluseq
9334 _n_pluseq
= new_child
9342 redef fun visit_all
(v
: Visitor)
9344 v
.enter_visit
(_n_pluseq
)
9347 redef fun visit_all_reverse
(v
: Visitor)
9349 v
.enter_visit
(_n_pluseq
)
9352 redef class AMinusAssignOp
9353 redef fun n_minuseq
=(n
)
9359 private init empty_init
do end
9361 init init_aminusassignop
(
9362 n_minuseq
: nullable TMinuseq
9366 _n_minuseq
= n_minuseq
.as(not null)
9367 n_minuseq
.parent
= self
9370 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9372 if _n_minuseq
== old_child
then
9373 if new_child
!= null then
9374 new_child
.parent
= self
9375 assert new_child
isa TMinuseq
9376 _n_minuseq
= new_child
9384 redef fun visit_all
(v
: Visitor)
9386 v
.enter_visit
(_n_minuseq
)
9389 redef fun visit_all_reverse
(v
: Visitor)
9391 v
.enter_visit
(_n_minuseq
)
9394 redef class AClosureDef
9395 redef fun n_kwwith
=(n
)
9400 redef fun n_kwdo
=(n
)
9405 redef fun n_expr
=(n
)
9412 redef fun n_label
=(n
)
9420 private init empty_init
do end
9422 init init_aclosuredef
(
9423 n_kwwith
: nullable TKwwith,
9424 n_id
: Collection[Object], # Should be Collection[TId]
9425 n_kwdo
: nullable TKwdo,
9426 n_expr
: nullable AExpr,
9427 n_label
: nullable ALabel
9431 _n_kwwith
= n_kwwith
.as(not null)
9432 n_kwwith
.parent
= self
9438 _n_kwdo
= n_kwdo
.as(not null)
9439 n_kwdo
.parent
= self
9441 if n_expr
!= null then
9442 n_expr
.parent
= self
9445 if n_label
!= null then
9446 n_label
.parent
= self
9450 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9452 if _n_kwwith
== old_child
then
9453 if new_child
!= null then
9454 new_child
.parent
= self
9455 assert new_child
isa TKwwith
9456 _n_kwwith
= new_child
9462 for i
in [0.._n_id
.length
[ do
9463 if _n_id
[i
] == old_child
then
9464 if new_child
!= null then
9465 assert new_child
isa TId
9466 _n_id
[i
] = new_child
9467 new_child
.parent
= self
9474 if _n_kwdo
== old_child
then
9475 if new_child
!= null then
9476 new_child
.parent
= self
9477 assert new_child
isa TKwdo
9484 if _n_expr
== old_child
then
9485 if new_child
!= null then
9486 new_child
.parent
= self
9487 assert new_child
isa AExpr
9494 if _n_label
== old_child
then
9495 if new_child
!= null then
9496 new_child
.parent
= self
9497 assert new_child
isa ALabel
9498 _n_label
= new_child
9506 redef fun visit_all
(v
: Visitor)
9508 v
.enter_visit
(_n_kwwith
)
9512 v
.enter_visit
(_n_kwdo
)
9513 if _n_expr
!= null then
9514 v
.enter_visit
(_n_expr
.as(not null))
9516 if _n_label
!= null then
9517 v
.enter_visit
(_n_label
.as(not null))
9521 redef fun visit_all_reverse
(v
: Visitor)
9523 v
.enter_visit
(_n_kwwith
)
9525 var i
= _n_id
.length
9527 v
.enter_visit
(_n_id
[i
])
9531 v
.enter_visit
(_n_kwdo
)
9532 if _n_expr
!= null then
9533 v
.enter_visit
(_n_expr
.as(not null))
9535 if _n_label
!= null then
9536 v
.enter_visit
(_n_label
.as(not null))
9540 redef class AQualified
9541 redef fun n_classid
=(n
)
9549 private init empty_init
do end
9551 init init_aqualified
(
9552 n_id
: Collection[Object], # Should be Collection[TId]
9553 n_classid
: nullable TClassid
9562 _n_classid
= n_classid
9563 if n_classid
!= null then
9564 n_classid
.parent
= self
9568 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9570 for i
in [0.._n_id
.length
[ do
9571 if _n_id
[i
] == old_child
then
9572 if new_child
!= null then
9573 assert new_child
isa TId
9574 _n_id
[i
] = new_child
9575 new_child
.parent
= self
9582 if _n_classid
== old_child
then
9583 if new_child
!= null then
9584 new_child
.parent
= self
9585 assert new_child
isa TClassid
9586 _n_classid
= new_child
9594 redef fun visit_all
(v
: Visitor)
9599 if _n_classid
!= null then
9600 v
.enter_visit
(_n_classid
.as(not null))
9604 redef fun visit_all_reverse
(v
: Visitor)
9607 var i
= _n_id
.length
9609 v
.enter_visit
(_n_id
[i
])
9613 if _n_classid
!= null then
9614 v
.enter_visit
(_n_classid
.as(not null))
9620 private init empty_init
do end
9623 n_comment
: Collection[Object] # Should be Collection[TComment]
9627 for n
in n_comment
do
9628 assert n
isa TComment
9634 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9636 for i
in [0.._n_comment
.length
[ do
9637 if _n_comment
[i
] == old_child
then
9638 if new_child
!= null then
9639 assert new_child
isa TComment
9640 _n_comment
[i
] = new_child
9641 new_child
.parent
= self
9643 _n_comment
.remove_at
(i
)
9650 redef fun visit_all
(v
: Visitor)
9652 for n
in _n_comment
do
9657 redef fun visit_all_reverse
(v
: Visitor)
9660 var i
= _n_comment
.length
9662 v
.enter_visit
(_n_comment
[i
])
9671 n_base
: nullable AModule,
9678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9680 if _n_base
== old_child
then
9681 if new_child
== null then
9683 new_child
.parent
= self
9684 assert new_child
isa AModule
9687 old_child
.parent
= null
9692 redef fun visit_all
(v
: Visitor)
9694 if _n_base
!= null then
9695 v
.enter_visit
(_n_base
.as(not null))
9697 v
.enter_visit
(_n_eof
)
9700 redef fun visit_all_reverse
(v
: Visitor)
9702 v
.enter_visit
(_n_eof
)
9703 if _n_base
!= null then
9704 v
.enter_visit
(_n_base
.as(not null))