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
37 # Debug method: output a message prefixed with the location.
38 fun printl
(str
: String)
40 if location
== null then
43 print
("{location}: {str}\n")
49 redef fun visit_all
(v
: Visitor) do end
50 redef fun visit_all_reverse
(v
: Visitor) do end
51 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode) do end
55 # The first token of the production node
56 readable writable var _first_token
: nullable Token
58 # The last token of the production node
59 readable writable var _last_token
: nullable Token
61 redef fun replace_with
(n
: ANode)
65 n
.first_token
= first_token
66 n
.last_token
= last_token
71 # Abstract standard visitor
73 # What the visitor do when a node is visited
74 # Concrete visitors should redefine this method.
75 protected fun visit
(e
: nullable ANode) is abstract
77 # Ask the visitor to visit a given node.
78 # Usually automatically called by visit_all* methods.
79 # This methos should not be redefined
80 fun enter_visit
(e
: nullable ANode)
82 var old
= _current_node
88 # The current visited node
89 readable var _current_node
: nullable ANode = null
93 redef fun n_packagedecl
=(n
)
101 private init empty_init
do end
104 n_packagedecl
: nullable APackagedecl ,
105 n_imports
: Collection[Object] , # Should be Collection[AImport]
106 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
110 _n_packagedecl
= n_packagedecl
111 if n_packagedecl
!= null then
112 n_packagedecl
.parent
= self
114 for n
in n_imports
do
119 for n
in n_classdefs
do
120 assert n
isa AClassdef
126 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
128 if _n_packagedecl
== old_child
then
129 if new_child
!= null then
130 new_child
.parent
= self
131 assert new_child
isa APackagedecl
132 _n_packagedecl
= new_child
134 _n_packagedecl
= null
138 for i
in [0.._n_imports
.length
[ do
139 if _n_imports
[i
] == old_child
then
140 if new_child
!= null then
141 assert new_child
isa AImport
142 _n_imports
[i
] = new_child
143 new_child
.parent
= self
145 _n_imports
.remove_at
(i
)
150 for i
in [0.._n_classdefs
.length
[ do
151 if _n_classdefs
[i
] == old_child
then
152 if new_child
!= null then
153 assert new_child
isa AClassdef
154 _n_classdefs
[i
] = new_child
155 new_child
.parent
= self
157 _n_classdefs
.remove_at
(i
)
164 redef fun visit_all
(v
: Visitor)
166 if _n_packagedecl
!= null then
167 v
.enter_visit
(_n_packagedecl
.as(not null))
169 for n
in _n_imports
do
172 for n
in _n_classdefs
do
177 redef fun visit_all_reverse
(v
: Visitor)
179 if _n_packagedecl
!= null then
180 v
.enter_visit
(_n_packagedecl
.as(not null))
183 var i
= _n_imports
.length
185 v
.enter_visit
(_n_imports
[i
])
190 var i
= _n_classdefs
.length
192 v
.enter_visit
(_n_classdefs
[i
])
198 redef class APackagedecl
206 redef fun n_kwpackage
=(n
)
217 private init empty_init
do end
219 init init_apackagedecl
(
220 n_doc
: nullable ADoc ,
221 n_kwpackage
: nullable TKwpackage ,
227 if n_doc
!= null then
230 _n_kwpackage
= n_kwpackage
.as(not null)
231 n_kwpackage
.parent
= self
232 _n_id
= n_id
.as(not null)
236 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
238 if _n_doc
== old_child
then
239 if new_child
!= null then
240 new_child
.parent
= self
241 assert new_child
isa ADoc
248 if _n_kwpackage
== old_child
then
249 if new_child
!= null then
250 new_child
.parent
= self
251 assert new_child
isa TKwpackage
252 _n_kwpackage
= new_child
258 if _n_id
== old_child
then
259 if new_child
!= null then
260 new_child
.parent
= self
261 assert new_child
isa TId
270 redef fun visit_all
(v
: Visitor)
272 if _n_doc
!= null then
273 v
.enter_visit
(_n_doc
.as(not null))
275 v
.enter_visit
(_n_kwpackage
)
279 redef fun visit_all_reverse
(v
: Visitor)
281 if _n_doc
!= null then
282 v
.enter_visit
(_n_doc
.as(not null))
284 v
.enter_visit
(_n_kwpackage
)
288 redef class AStdImport
289 redef fun n_visibility
=(n
)
294 redef fun n_kwimport
=(n
)
305 private init empty_init
do end
307 init init_astdimport
(
308 n_visibility
: nullable AVisibility ,
309 n_kwimport
: nullable TKwimport ,
314 _n_visibility
= n_visibility
.as(not null)
315 n_visibility
.parent
= self
316 _n_kwimport
= n_kwimport
.as(not null)
317 n_kwimport
.parent
= self
318 _n_id
= n_id
.as(not null)
322 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
324 if _n_visibility
== old_child
then
325 if new_child
!= null then
326 new_child
.parent
= self
327 assert new_child
isa AVisibility
328 _n_visibility
= new_child
334 if _n_kwimport
== old_child
then
335 if new_child
!= null then
336 new_child
.parent
= self
337 assert new_child
isa TKwimport
338 _n_kwimport
= new_child
344 if _n_id
== old_child
then
345 if new_child
!= null then
346 new_child
.parent
= self
347 assert new_child
isa TId
356 redef fun visit_all
(v
: Visitor)
358 v
.enter_visit
(_n_visibility
)
359 v
.enter_visit
(_n_kwimport
)
363 redef fun visit_all_reverse
(v
: Visitor)
365 v
.enter_visit
(_n_visibility
)
366 v
.enter_visit
(_n_kwimport
)
370 redef class ANoImport
371 redef fun n_visibility
=(n
)
376 redef fun n_kwimport
=(n
)
381 redef fun n_kwend
=(n
)
387 private init empty_init
do end
389 init init_anoimport
(
390 n_visibility
: nullable AVisibility ,
391 n_kwimport
: nullable TKwimport ,
392 n_kwend
: nullable TKwend
396 _n_visibility
= n_visibility
.as(not null)
397 n_visibility
.parent
= self
398 _n_kwimport
= n_kwimport
.as(not null)
399 n_kwimport
.parent
= self
400 _n_kwend
= n_kwend
.as(not null)
401 n_kwend
.parent
= self
404 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
406 if _n_visibility
== old_child
then
407 if new_child
!= null then
408 new_child
.parent
= self
409 assert new_child
isa AVisibility
410 _n_visibility
= new_child
416 if _n_kwimport
== old_child
then
417 if new_child
!= null then
418 new_child
.parent
= self
419 assert new_child
isa TKwimport
420 _n_kwimport
= new_child
426 if _n_kwend
== old_child
then
427 if new_child
!= null then
428 new_child
.parent
= self
429 assert new_child
isa TKwend
438 redef fun visit_all
(v
: Visitor)
440 v
.enter_visit
(_n_visibility
)
441 v
.enter_visit
(_n_kwimport
)
442 v
.enter_visit
(_n_kwend
)
445 redef fun visit_all_reverse
(v
: Visitor)
447 v
.enter_visit
(_n_visibility
)
448 v
.enter_visit
(_n_kwimport
)
449 v
.enter_visit
(_n_kwend
)
452 redef class APublicVisibility
454 private init empty_init
do end
456 init init_apublicvisibility
461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
465 redef fun visit_all
(v
: Visitor)
469 redef fun visit_all_reverse
(v
: Visitor)
473 redef class APrivateVisibility
474 redef fun n_kwprivate
=(n
)
480 private init empty_init
do end
482 init init_aprivatevisibility
(
483 n_kwprivate
: nullable TKwprivate
487 _n_kwprivate
= n_kwprivate
.as(not null)
488 n_kwprivate
.parent
= self
491 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
493 if _n_kwprivate
== old_child
then
494 if new_child
!= null then
495 new_child
.parent
= self
496 assert new_child
isa TKwprivate
497 _n_kwprivate
= new_child
505 redef fun visit_all
(v
: Visitor)
507 v
.enter_visit
(_n_kwprivate
)
510 redef fun visit_all_reverse
(v
: Visitor)
512 v
.enter_visit
(_n_kwprivate
)
515 redef class AProtectedVisibility
516 redef fun n_kwprotected
=(n
)
522 private init empty_init
do end
524 init init_aprotectedvisibility
(
525 n_kwprotected
: nullable TKwprotected
529 _n_kwprotected
= n_kwprotected
.as(not null)
530 n_kwprotected
.parent
= self
533 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
535 if _n_kwprotected
== old_child
then
536 if new_child
!= null then
537 new_child
.parent
= self
538 assert new_child
isa TKwprotected
539 _n_kwprotected
= new_child
547 redef fun visit_all
(v
: Visitor)
549 v
.enter_visit
(_n_kwprotected
)
552 redef fun visit_all_reverse
(v
: Visitor)
554 v
.enter_visit
(_n_kwprotected
)
557 redef class AIntrudeVisibility
558 redef fun n_kwintrude
=(n
)
564 private init empty_init
do end
566 init init_aintrudevisibility
(
567 n_kwintrude
: nullable TKwintrude
571 _n_kwintrude
= n_kwintrude
.as(not null)
572 n_kwintrude
.parent
= self
575 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
577 if _n_kwintrude
== old_child
then
578 if new_child
!= null then
579 new_child
.parent
= self
580 assert new_child
isa TKwintrude
581 _n_kwintrude
= new_child
589 redef fun visit_all
(v
: Visitor)
591 v
.enter_visit
(_n_kwintrude
)
594 redef fun visit_all_reverse
(v
: Visitor)
596 v
.enter_visit
(_n_kwintrude
)
599 redef class AStdClassdef
607 redef fun n_kwredef
=(n
)
614 redef fun n_visibility
=(n
)
619 redef fun n_classkind
=(n
)
632 private init empty_init
do end
634 init init_astdclassdef
(
635 n_doc
: nullable ADoc ,
636 n_kwredef
: nullable TKwredef ,
637 n_visibility
: nullable AVisibility ,
638 n_classkind
: nullable AClasskind ,
639 n_id
: nullable TClassid ,
640 n_formaldefs
: Collection[Object] , # Should be Collection[AFormaldef]
641 n_superclasses
: Collection[Object] , # Should be Collection[ASuperclass]
642 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
647 if n_doc
!= null then
650 _n_kwredef
= n_kwredef
651 if n_kwredef
!= null then
652 n_kwredef
.parent
= self
654 _n_visibility
= n_visibility
.as(not null)
655 n_visibility
.parent
= self
656 _n_classkind
= n_classkind
.as(not null)
657 n_classkind
.parent
= self
662 for n
in n_formaldefs
do
663 assert n
isa AFormaldef
667 for n
in n_superclasses
do
668 assert n
isa ASuperclass
669 _n_superclasses
.add
(n
)
672 for n
in n_propdefs
do
673 assert n
isa APropdef
679 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
681 if _n_doc
== old_child
then
682 if new_child
!= null then
683 new_child
.parent
= self
684 assert new_child
isa ADoc
691 if _n_kwredef
== old_child
then
692 if new_child
!= null then
693 new_child
.parent
= self
694 assert new_child
isa TKwredef
695 _n_kwredef
= new_child
701 if _n_visibility
== old_child
then
702 if new_child
!= null then
703 new_child
.parent
= self
704 assert new_child
isa AVisibility
705 _n_visibility
= new_child
711 if _n_classkind
== old_child
then
712 if new_child
!= null then
713 new_child
.parent
= self
714 assert new_child
isa AClasskind
715 _n_classkind
= new_child
721 if _n_id
== old_child
then
722 if new_child
!= null then
723 new_child
.parent
= self
724 assert new_child
isa TClassid
731 for i
in [0.._n_formaldefs
.length
[ do
732 if _n_formaldefs
[i
] == old_child
then
733 if new_child
!= null then
734 assert new_child
isa AFormaldef
735 _n_formaldefs
[i
] = new_child
736 new_child
.parent
= self
738 _n_formaldefs
.remove_at
(i
)
743 for i
in [0.._n_superclasses
.length
[ do
744 if _n_superclasses
[i
] == old_child
then
745 if new_child
!= null then
746 assert new_child
isa ASuperclass
747 _n_superclasses
[i
] = new_child
748 new_child
.parent
= self
750 _n_superclasses
.remove_at
(i
)
755 for i
in [0.._n_propdefs
.length
[ do
756 if _n_propdefs
[i
] == old_child
then
757 if new_child
!= null then
758 assert new_child
isa APropdef
759 _n_propdefs
[i
] = new_child
760 new_child
.parent
= self
762 _n_propdefs
.remove_at
(i
)
769 redef fun visit_all
(v
: Visitor)
771 if _n_doc
!= null then
772 v
.enter_visit
(_n_doc
.as(not null))
774 if _n_kwredef
!= null then
775 v
.enter_visit
(_n_kwredef
.as(not null))
777 v
.enter_visit
(_n_visibility
)
778 v
.enter_visit
(_n_classkind
)
779 if _n_id
!= null then
780 v
.enter_visit
(_n_id
.as(not null))
782 for n
in _n_formaldefs
do
785 for n
in _n_superclasses
do
788 for n
in _n_propdefs
do
793 redef fun visit_all_reverse
(v
: Visitor)
795 if _n_doc
!= null then
796 v
.enter_visit
(_n_doc
.as(not null))
798 if _n_kwredef
!= null then
799 v
.enter_visit
(_n_kwredef
.as(not null))
801 v
.enter_visit
(_n_visibility
)
802 v
.enter_visit
(_n_classkind
)
803 if _n_id
!= null then
804 v
.enter_visit
(_n_id
.as(not null))
807 var i
= _n_formaldefs
.length
809 v
.enter_visit
(_n_formaldefs
[i
])
814 var i
= _n_superclasses
.length
816 v
.enter_visit
(_n_superclasses
[i
])
821 var i
= _n_propdefs
.length
823 v
.enter_visit
(_n_propdefs
[i
])
829 redef class ATopClassdef
831 private init empty_init
do end
833 init init_atopclassdef
(
834 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
838 for n
in n_propdefs
do
839 assert n
isa APropdef
845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
847 for i
in [0.._n_propdefs
.length
[ do
848 if _n_propdefs
[i
] == old_child
then
849 if new_child
!= null then
850 assert new_child
isa APropdef
851 _n_propdefs
[i
] = new_child
852 new_child
.parent
= self
854 _n_propdefs
.remove_at
(i
)
861 redef fun visit_all
(v
: Visitor)
863 for n
in _n_propdefs
do
868 redef fun visit_all_reverse
(v
: Visitor)
871 var i
= _n_propdefs
.length
873 v
.enter_visit
(_n_propdefs
[i
])
879 redef class AMainClassdef
881 private init empty_init
do end
883 init init_amainclassdef
(
884 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
888 for n
in n_propdefs
do
889 assert n
isa APropdef
895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
897 for i
in [0.._n_propdefs
.length
[ do
898 if _n_propdefs
[i
] == old_child
then
899 if new_child
!= null then
900 assert new_child
isa APropdef
901 _n_propdefs
[i
] = new_child
902 new_child
.parent
= self
904 _n_propdefs
.remove_at
(i
)
911 redef fun visit_all
(v
: Visitor)
913 for n
in _n_propdefs
do
918 redef fun visit_all_reverse
(v
: Visitor)
921 var i
= _n_propdefs
.length
923 v
.enter_visit
(_n_propdefs
[i
])
929 redef class AConcreteClasskind
930 redef fun n_kwclass
=(n
)
936 private init empty_init
do end
938 init init_aconcreteclasskind
(
939 n_kwclass
: nullable TKwclass
943 _n_kwclass
= n_kwclass
.as(not null)
944 n_kwclass
.parent
= self
947 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
949 if _n_kwclass
== old_child
then
950 if new_child
!= null then
951 new_child
.parent
= self
952 assert new_child
isa TKwclass
953 _n_kwclass
= new_child
961 redef fun visit_all
(v
: Visitor)
963 v
.enter_visit
(_n_kwclass
)
966 redef fun visit_all_reverse
(v
: Visitor)
968 v
.enter_visit
(_n_kwclass
)
971 redef class AAbstractClasskind
972 redef fun n_kwabstract
=(n
)
977 redef fun n_kwclass
=(n
)
983 private init empty_init
do end
985 init init_aabstractclasskind
(
986 n_kwabstract
: nullable TKwabstract ,
987 n_kwclass
: nullable TKwclass
991 _n_kwabstract
= n_kwabstract
.as(not null)
992 n_kwabstract
.parent
= self
993 _n_kwclass
= n_kwclass
.as(not null)
994 n_kwclass
.parent
= self
997 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
999 if _n_kwabstract
== old_child
then
1000 if new_child
!= null then
1001 new_child
.parent
= self
1002 assert new_child
isa TKwabstract
1003 _n_kwabstract
= new_child
1009 if _n_kwclass
== old_child
then
1010 if new_child
!= null then
1011 new_child
.parent
= self
1012 assert new_child
isa TKwclass
1013 _n_kwclass
= new_child
1021 redef fun visit_all
(v
: Visitor)
1023 v
.enter_visit
(_n_kwabstract
)
1024 v
.enter_visit
(_n_kwclass
)
1027 redef fun visit_all_reverse
(v
: Visitor)
1029 v
.enter_visit
(_n_kwabstract
)
1030 v
.enter_visit
(_n_kwclass
)
1033 redef class AInterfaceClasskind
1034 redef fun n_kwinterface
=(n
)
1040 private init empty_init
do end
1042 init init_ainterfaceclasskind
(
1043 n_kwinterface
: nullable TKwinterface
1047 _n_kwinterface
= n_kwinterface
.as(not null)
1048 n_kwinterface
.parent
= self
1051 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1053 if _n_kwinterface
== old_child
then
1054 if new_child
!= null then
1055 new_child
.parent
= self
1056 assert new_child
isa TKwinterface
1057 _n_kwinterface
= new_child
1065 redef fun visit_all
(v
: Visitor)
1067 v
.enter_visit
(_n_kwinterface
)
1070 redef fun visit_all_reverse
(v
: Visitor)
1072 v
.enter_visit
(_n_kwinterface
)
1075 redef class AUniversalClasskind
1076 redef fun n_kwuniversal
=(n
)
1082 private init empty_init
do end
1084 init init_auniversalclasskind
(
1085 n_kwuniversal
: nullable TKwuniversal
1089 _n_kwuniversal
= n_kwuniversal
.as(not null)
1090 n_kwuniversal
.parent
= self
1093 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1095 if _n_kwuniversal
== old_child
then
1096 if new_child
!= null then
1097 new_child
.parent
= self
1098 assert new_child
isa TKwuniversal
1099 _n_kwuniversal
= new_child
1107 redef fun visit_all
(v
: Visitor)
1109 v
.enter_visit
(_n_kwuniversal
)
1112 redef fun visit_all_reverse
(v
: Visitor)
1114 v
.enter_visit
(_n_kwuniversal
)
1117 redef class AFormaldef
1123 redef fun n_type
=(n
)
1131 private init empty_init
do end
1133 init init_aformaldef
(
1134 n_id
: nullable TClassid ,
1135 n_type
: nullable AType
1139 _n_id
= n_id
.as(not null)
1142 if n_type
!= null then
1143 n_type
.parent
= self
1147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1149 if _n_id
== old_child
then
1150 if new_child
!= null then
1151 new_child
.parent
= self
1152 assert new_child
isa TClassid
1159 if _n_type
== old_child
then
1160 if new_child
!= null then
1161 new_child
.parent
= self
1162 assert new_child
isa AType
1171 redef fun visit_all
(v
: Visitor)
1173 v
.enter_visit
(_n_id
)
1174 if _n_type
!= null then
1175 v
.enter_visit
(_n_type
.as(not null))
1179 redef fun visit_all_reverse
(v
: Visitor)
1181 v
.enter_visit
(_n_id
)
1182 if _n_type
!= null then
1183 v
.enter_visit
(_n_type
.as(not null))
1187 redef class ASuperclass
1188 redef fun n_kwspecial
=(n
)
1193 redef fun n_type
=(n
)
1199 private init empty_init
do end
1201 init init_asuperclass
(
1202 n_kwspecial
: nullable TKwspecial ,
1203 n_type
: nullable AType
1207 _n_kwspecial
= n_kwspecial
.as(not null)
1208 n_kwspecial
.parent
= self
1209 _n_type
= n_type
.as(not null)
1210 n_type
.parent
= self
1213 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1215 if _n_kwspecial
== old_child
then
1216 if new_child
!= null then
1217 new_child
.parent
= self
1218 assert new_child
isa TKwspecial
1219 _n_kwspecial
= new_child
1225 if _n_type
== old_child
then
1226 if new_child
!= null then
1227 new_child
.parent
= self
1228 assert new_child
isa AType
1237 redef fun visit_all
(v
: Visitor)
1239 v
.enter_visit
(_n_kwspecial
)
1240 v
.enter_visit
(_n_type
)
1243 redef fun visit_all_reverse
(v
: Visitor)
1245 v
.enter_visit
(_n_kwspecial
)
1246 v
.enter_visit
(_n_type
)
1249 redef class AAttrPropdef
1257 redef fun n_readable
=(n
)
1264 redef fun n_writable
=(n
)
1271 redef fun n_kwredef
=(n
)
1278 redef fun n_visibility
=(n
)
1283 redef fun n_kwattr
=(n
)
1290 redef fun n_kwvar
=(n
)
1302 redef fun n_type
=(n
)
1309 redef fun n_expr
=(n
)
1317 private init empty_init
do end
1319 init init_aattrpropdef
(
1320 n_doc
: nullable ADoc ,
1321 n_readable
: nullable AAble ,
1322 n_writable
: nullable AAble ,
1323 n_kwredef
: nullable TKwredef ,
1324 n_visibility
: nullable AVisibility ,
1325 n_kwattr
: nullable TKwattr ,
1326 n_kwvar
: nullable TKwvar ,
1327 n_id
: nullable TAttrid ,
1328 n_type
: nullable AType ,
1329 n_expr
: nullable AExpr
1334 if n_doc
!= null then
1337 _n_readable
= n_readable
1338 if n_readable
!= null then
1339 n_readable
.parent
= self
1341 _n_writable
= n_writable
1342 if n_writable
!= null then
1343 n_writable
.parent
= self
1345 _n_kwredef
= n_kwredef
1346 if n_kwredef
!= null then
1347 n_kwredef
.parent
= self
1349 _n_visibility
= n_visibility
.as(not null)
1350 n_visibility
.parent
= self
1351 _n_kwattr
= n_kwattr
1352 if n_kwattr
!= null then
1353 n_kwattr
.parent
= self
1356 if n_kwvar
!= null then
1357 n_kwvar
.parent
= self
1359 _n_id
= n_id
.as(not null)
1362 if n_type
!= null then
1363 n_type
.parent
= self
1366 if n_expr
!= null then
1367 n_expr
.parent
= self
1371 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1373 if _n_doc
== old_child
then
1374 if new_child
!= null then
1375 new_child
.parent
= self
1376 assert new_child
isa ADoc
1383 if _n_readable
== old_child
then
1384 if new_child
!= null then
1385 new_child
.parent
= self
1386 assert new_child
isa AAble
1387 _n_readable
= new_child
1393 if _n_writable
== old_child
then
1394 if new_child
!= null then
1395 new_child
.parent
= self
1396 assert new_child
isa AAble
1397 _n_writable
= new_child
1403 if _n_kwredef
== old_child
then
1404 if new_child
!= null then
1405 new_child
.parent
= self
1406 assert new_child
isa TKwredef
1407 _n_kwredef
= new_child
1413 if _n_visibility
== old_child
then
1414 if new_child
!= null then
1415 new_child
.parent
= self
1416 assert new_child
isa AVisibility
1417 _n_visibility
= new_child
1423 if _n_kwattr
== old_child
then
1424 if new_child
!= null then
1425 new_child
.parent
= self
1426 assert new_child
isa TKwattr
1427 _n_kwattr
= new_child
1433 if _n_kwvar
== old_child
then
1434 if new_child
!= null then
1435 new_child
.parent
= self
1436 assert new_child
isa TKwvar
1437 _n_kwvar
= new_child
1443 if _n_id
== old_child
then
1444 if new_child
!= null then
1445 new_child
.parent
= self
1446 assert new_child
isa TAttrid
1453 if _n_type
== old_child
then
1454 if new_child
!= null then
1455 new_child
.parent
= self
1456 assert new_child
isa AType
1463 if _n_expr
== old_child
then
1464 if new_child
!= null then
1465 new_child
.parent
= self
1466 assert new_child
isa AExpr
1475 redef fun visit_all
(v
: Visitor)
1477 if _n_doc
!= null then
1478 v
.enter_visit
(_n_doc
.as(not null))
1480 if _n_readable
!= null then
1481 v
.enter_visit
(_n_readable
.as(not null))
1483 if _n_writable
!= null then
1484 v
.enter_visit
(_n_writable
.as(not null))
1486 if _n_kwredef
!= null then
1487 v
.enter_visit
(_n_kwredef
.as(not null))
1489 v
.enter_visit
(_n_visibility
)
1490 if _n_kwattr
!= null then
1491 v
.enter_visit
(_n_kwattr
.as(not null))
1493 if _n_kwvar
!= null then
1494 v
.enter_visit
(_n_kwvar
.as(not null))
1496 v
.enter_visit
(_n_id
)
1497 if _n_type
!= null then
1498 v
.enter_visit
(_n_type
.as(not null))
1500 if _n_expr
!= null then
1501 v
.enter_visit
(_n_expr
.as(not null))
1505 redef fun visit_all_reverse
(v
: Visitor)
1507 if _n_doc
!= null then
1508 v
.enter_visit
(_n_doc
.as(not null))
1510 if _n_readable
!= null then
1511 v
.enter_visit
(_n_readable
.as(not null))
1513 if _n_writable
!= null then
1514 v
.enter_visit
(_n_writable
.as(not null))
1516 if _n_kwredef
!= null then
1517 v
.enter_visit
(_n_kwredef
.as(not null))
1519 v
.enter_visit
(_n_visibility
)
1520 if _n_kwattr
!= null then
1521 v
.enter_visit
(_n_kwattr
.as(not null))
1523 if _n_kwvar
!= null then
1524 v
.enter_visit
(_n_kwvar
.as(not null))
1526 v
.enter_visit
(_n_id
)
1527 if _n_type
!= null then
1528 v
.enter_visit
(_n_type
.as(not null))
1530 if _n_expr
!= null then
1531 v
.enter_visit
(_n_expr
.as(not null))
1535 redef class AMethPropdef
1543 redef fun n_kwredef
=(n
)
1550 redef fun n_visibility
=(n
)
1555 redef fun n_methid
=(n
)
1560 redef fun n_signature
=(n
)
1566 private init empty_init
do end
1568 init init_amethpropdef
(
1569 n_doc
: nullable ADoc ,
1570 n_kwredef
: nullable TKwredef ,
1571 n_visibility
: nullable AVisibility ,
1572 n_methid
: nullable AMethid ,
1573 n_signature
: nullable ASignature
1578 if n_doc
!= null then
1581 _n_kwredef
= n_kwredef
1582 if n_kwredef
!= null then
1583 n_kwredef
.parent
= self
1585 _n_visibility
= n_visibility
.as(not null)
1586 n_visibility
.parent
= self
1587 _n_methid
= n_methid
.as(not null)
1588 n_methid
.parent
= self
1589 _n_signature
= n_signature
.as(not null)
1590 n_signature
.parent
= self
1593 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1595 if _n_doc
== old_child
then
1596 if new_child
!= null then
1597 new_child
.parent
= self
1598 assert new_child
isa ADoc
1605 if _n_kwredef
== old_child
then
1606 if new_child
!= null then
1607 new_child
.parent
= self
1608 assert new_child
isa TKwredef
1609 _n_kwredef
= new_child
1615 if _n_visibility
== old_child
then
1616 if new_child
!= null then
1617 new_child
.parent
= self
1618 assert new_child
isa AVisibility
1619 _n_visibility
= new_child
1625 if _n_methid
== old_child
then
1626 if new_child
!= null then
1627 new_child
.parent
= self
1628 assert new_child
isa AMethid
1629 _n_methid
= new_child
1635 if _n_signature
== old_child
then
1636 if new_child
!= null then
1637 new_child
.parent
= self
1638 assert new_child
isa ASignature
1639 _n_signature
= new_child
1647 redef fun visit_all
(v
: Visitor)
1649 if _n_doc
!= null then
1650 v
.enter_visit
(_n_doc
.as(not null))
1652 if _n_kwredef
!= null then
1653 v
.enter_visit
(_n_kwredef
.as(not null))
1655 v
.enter_visit
(_n_visibility
)
1656 v
.enter_visit
(_n_methid
)
1657 v
.enter_visit
(_n_signature
)
1660 redef fun visit_all_reverse
(v
: Visitor)
1662 if _n_doc
!= null then
1663 v
.enter_visit
(_n_doc
.as(not null))
1665 if _n_kwredef
!= null then
1666 v
.enter_visit
(_n_kwredef
.as(not null))
1668 v
.enter_visit
(_n_visibility
)
1669 v
.enter_visit
(_n_methid
)
1670 v
.enter_visit
(_n_signature
)
1673 redef class ADeferredMethPropdef
1681 redef fun n_kwredef
=(n
)
1688 redef fun n_visibility
=(n
)
1693 redef fun n_kwmeth
=(n
)
1698 redef fun n_methid
=(n
)
1703 redef fun n_signature
=(n
)
1709 private init empty_init
do end
1711 init init_adeferredmethpropdef
(
1712 n_doc
: nullable ADoc ,
1713 n_kwredef
: nullable TKwredef ,
1714 n_visibility
: nullable AVisibility ,
1715 n_kwmeth
: nullable TKwmeth ,
1716 n_methid
: nullable AMethid ,
1717 n_signature
: nullable ASignature
1722 if n_doc
!= null then
1725 _n_kwredef
= n_kwredef
1726 if n_kwredef
!= null then
1727 n_kwredef
.parent
= self
1729 _n_visibility
= n_visibility
.as(not null)
1730 n_visibility
.parent
= self
1731 _n_kwmeth
= n_kwmeth
.as(not null)
1732 n_kwmeth
.parent
= self
1733 _n_methid
= n_methid
.as(not null)
1734 n_methid
.parent
= self
1735 _n_signature
= n_signature
.as(not null)
1736 n_signature
.parent
= self
1739 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1741 if _n_doc
== old_child
then
1742 if new_child
!= null then
1743 new_child
.parent
= self
1744 assert new_child
isa ADoc
1751 if _n_kwredef
== old_child
then
1752 if new_child
!= null then
1753 new_child
.parent
= self
1754 assert new_child
isa TKwredef
1755 _n_kwredef
= new_child
1761 if _n_visibility
== old_child
then
1762 if new_child
!= null then
1763 new_child
.parent
= self
1764 assert new_child
isa AVisibility
1765 _n_visibility
= new_child
1771 if _n_kwmeth
== old_child
then
1772 if new_child
!= null then
1773 new_child
.parent
= self
1774 assert new_child
isa TKwmeth
1775 _n_kwmeth
= new_child
1781 if _n_methid
== old_child
then
1782 if new_child
!= null then
1783 new_child
.parent
= self
1784 assert new_child
isa AMethid
1785 _n_methid
= new_child
1791 if _n_signature
== old_child
then
1792 if new_child
!= null then
1793 new_child
.parent
= self
1794 assert new_child
isa ASignature
1795 _n_signature
= new_child
1803 redef fun visit_all
(v
: Visitor)
1805 if _n_doc
!= null then
1806 v
.enter_visit
(_n_doc
.as(not null))
1808 if _n_kwredef
!= null then
1809 v
.enter_visit
(_n_kwredef
.as(not null))
1811 v
.enter_visit
(_n_visibility
)
1812 v
.enter_visit
(_n_kwmeth
)
1813 v
.enter_visit
(_n_methid
)
1814 v
.enter_visit
(_n_signature
)
1817 redef fun visit_all_reverse
(v
: Visitor)
1819 if _n_doc
!= null then
1820 v
.enter_visit
(_n_doc
.as(not null))
1822 if _n_kwredef
!= null then
1823 v
.enter_visit
(_n_kwredef
.as(not null))
1825 v
.enter_visit
(_n_visibility
)
1826 v
.enter_visit
(_n_kwmeth
)
1827 v
.enter_visit
(_n_methid
)
1828 v
.enter_visit
(_n_signature
)
1831 redef class AInternMethPropdef
1839 redef fun n_kwredef
=(n
)
1846 redef fun n_visibility
=(n
)
1851 redef fun n_kwmeth
=(n
)
1856 redef fun n_methid
=(n
)
1861 redef fun n_signature
=(n
)
1867 private init empty_init
do end
1869 init init_ainternmethpropdef
(
1870 n_doc
: nullable ADoc ,
1871 n_kwredef
: nullable TKwredef ,
1872 n_visibility
: nullable AVisibility ,
1873 n_kwmeth
: nullable TKwmeth ,
1874 n_methid
: nullable AMethid ,
1875 n_signature
: nullable ASignature
1880 if n_doc
!= null then
1883 _n_kwredef
= n_kwredef
1884 if n_kwredef
!= null then
1885 n_kwredef
.parent
= self
1887 _n_visibility
= n_visibility
.as(not null)
1888 n_visibility
.parent
= self
1889 _n_kwmeth
= n_kwmeth
.as(not null)
1890 n_kwmeth
.parent
= self
1891 _n_methid
= n_methid
.as(not null)
1892 n_methid
.parent
= self
1893 _n_signature
= n_signature
.as(not null)
1894 n_signature
.parent
= self
1897 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1899 if _n_doc
== old_child
then
1900 if new_child
!= null then
1901 new_child
.parent
= self
1902 assert new_child
isa ADoc
1909 if _n_kwredef
== old_child
then
1910 if new_child
!= null then
1911 new_child
.parent
= self
1912 assert new_child
isa TKwredef
1913 _n_kwredef
= new_child
1919 if _n_visibility
== old_child
then
1920 if new_child
!= null then
1921 new_child
.parent
= self
1922 assert new_child
isa AVisibility
1923 _n_visibility
= new_child
1929 if _n_kwmeth
== old_child
then
1930 if new_child
!= null then
1931 new_child
.parent
= self
1932 assert new_child
isa TKwmeth
1933 _n_kwmeth
= new_child
1939 if _n_methid
== old_child
then
1940 if new_child
!= null then
1941 new_child
.parent
= self
1942 assert new_child
isa AMethid
1943 _n_methid
= new_child
1949 if _n_signature
== old_child
then
1950 if new_child
!= null then
1951 new_child
.parent
= self
1952 assert new_child
isa ASignature
1953 _n_signature
= new_child
1961 redef fun visit_all
(v
: Visitor)
1963 if _n_doc
!= null then
1964 v
.enter_visit
(_n_doc
.as(not null))
1966 if _n_kwredef
!= null then
1967 v
.enter_visit
(_n_kwredef
.as(not null))
1969 v
.enter_visit
(_n_visibility
)
1970 v
.enter_visit
(_n_kwmeth
)
1971 v
.enter_visit
(_n_methid
)
1972 v
.enter_visit
(_n_signature
)
1975 redef fun visit_all_reverse
(v
: Visitor)
1977 if _n_doc
!= null then
1978 v
.enter_visit
(_n_doc
.as(not null))
1980 if _n_kwredef
!= null then
1981 v
.enter_visit
(_n_kwredef
.as(not null))
1983 v
.enter_visit
(_n_visibility
)
1984 v
.enter_visit
(_n_kwmeth
)
1985 v
.enter_visit
(_n_methid
)
1986 v
.enter_visit
(_n_signature
)
1989 redef class AExternMethPropdef
1997 redef fun n_kwredef
=(n
)
2004 redef fun n_visibility
=(n
)
2009 redef fun n_kwmeth
=(n
)
2014 redef fun n_methid
=(n
)
2019 redef fun n_signature
=(n
)
2024 redef fun n_extern
=(n
)
2032 private init empty_init
do end
2034 init init_aexternmethpropdef
(
2035 n_doc
: nullable ADoc ,
2036 n_kwredef
: nullable TKwredef ,
2037 n_visibility
: nullable AVisibility ,
2038 n_kwmeth
: nullable TKwmeth ,
2039 n_methid
: nullable AMethid ,
2040 n_signature
: nullable ASignature ,
2041 n_extern
: nullable TString
2046 if n_doc
!= null then
2049 _n_kwredef
= n_kwredef
2050 if n_kwredef
!= null then
2051 n_kwredef
.parent
= self
2053 _n_visibility
= n_visibility
.as(not null)
2054 n_visibility
.parent
= self
2055 _n_kwmeth
= n_kwmeth
.as(not null)
2056 n_kwmeth
.parent
= self
2057 _n_methid
= n_methid
.as(not null)
2058 n_methid
.parent
= self
2059 _n_signature
= n_signature
.as(not null)
2060 n_signature
.parent
= self
2061 _n_extern
= n_extern
2062 if n_extern
!= null then
2063 n_extern
.parent
= self
2067 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2069 if _n_doc
== old_child
then
2070 if new_child
!= null then
2071 new_child
.parent
= self
2072 assert new_child
isa ADoc
2079 if _n_kwredef
== old_child
then
2080 if new_child
!= null then
2081 new_child
.parent
= self
2082 assert new_child
isa TKwredef
2083 _n_kwredef
= new_child
2089 if _n_visibility
== old_child
then
2090 if new_child
!= null then
2091 new_child
.parent
= self
2092 assert new_child
isa AVisibility
2093 _n_visibility
= new_child
2099 if _n_kwmeth
== old_child
then
2100 if new_child
!= null then
2101 new_child
.parent
= self
2102 assert new_child
isa TKwmeth
2103 _n_kwmeth
= new_child
2109 if _n_methid
== old_child
then
2110 if new_child
!= null then
2111 new_child
.parent
= self
2112 assert new_child
isa AMethid
2113 _n_methid
= new_child
2119 if _n_signature
== old_child
then
2120 if new_child
!= null then
2121 new_child
.parent
= self
2122 assert new_child
isa ASignature
2123 _n_signature
= new_child
2129 if _n_extern
== old_child
then
2130 if new_child
!= null then
2131 new_child
.parent
= self
2132 assert new_child
isa TString
2133 _n_extern
= new_child
2141 redef fun visit_all
(v
: Visitor)
2143 if _n_doc
!= null then
2144 v
.enter_visit
(_n_doc
.as(not null))
2146 if _n_kwredef
!= null then
2147 v
.enter_visit
(_n_kwredef
.as(not null))
2149 v
.enter_visit
(_n_visibility
)
2150 v
.enter_visit
(_n_kwmeth
)
2151 v
.enter_visit
(_n_methid
)
2152 v
.enter_visit
(_n_signature
)
2153 if _n_extern
!= null then
2154 v
.enter_visit
(_n_extern
.as(not null))
2158 redef fun visit_all_reverse
(v
: Visitor)
2160 if _n_doc
!= null then
2161 v
.enter_visit
(_n_doc
.as(not null))
2163 if _n_kwredef
!= null then
2164 v
.enter_visit
(_n_kwredef
.as(not null))
2166 v
.enter_visit
(_n_visibility
)
2167 v
.enter_visit
(_n_kwmeth
)
2168 v
.enter_visit
(_n_methid
)
2169 v
.enter_visit
(_n_signature
)
2170 if _n_extern
!= null then
2171 v
.enter_visit
(_n_extern
.as(not null))
2175 redef class AConcreteMethPropdef
2183 redef fun n_kwredef
=(n
)
2190 redef fun n_visibility
=(n
)
2195 redef fun n_kwmeth
=(n
)
2200 redef fun n_methid
=(n
)
2205 redef fun n_signature
=(n
)
2210 redef fun n_block
=(n
)
2218 private init empty_init
do end
2220 init init_aconcretemethpropdef
(
2221 n_doc
: nullable ADoc ,
2222 n_kwredef
: nullable TKwredef ,
2223 n_visibility
: nullable AVisibility ,
2224 n_kwmeth
: nullable TKwmeth ,
2225 n_methid
: nullable AMethid ,
2226 n_signature
: nullable ASignature ,
2227 n_block
: nullable AExpr
2232 if n_doc
!= null then
2235 _n_kwredef
= n_kwredef
2236 if n_kwredef
!= null then
2237 n_kwredef
.parent
= self
2239 _n_visibility
= n_visibility
.as(not null)
2240 n_visibility
.parent
= self
2241 _n_kwmeth
= n_kwmeth
.as(not null)
2242 n_kwmeth
.parent
= self
2243 _n_methid
= n_methid
.as(not null)
2244 n_methid
.parent
= self
2245 _n_signature
= n_signature
.as(not null)
2246 n_signature
.parent
= self
2248 if n_block
!= null then
2249 n_block
.parent
= self
2253 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2255 if _n_doc
== old_child
then
2256 if new_child
!= null then
2257 new_child
.parent
= self
2258 assert new_child
isa ADoc
2265 if _n_kwredef
== old_child
then
2266 if new_child
!= null then
2267 new_child
.parent
= self
2268 assert new_child
isa TKwredef
2269 _n_kwredef
= new_child
2275 if _n_visibility
== old_child
then
2276 if new_child
!= null then
2277 new_child
.parent
= self
2278 assert new_child
isa AVisibility
2279 _n_visibility
= new_child
2285 if _n_kwmeth
== old_child
then
2286 if new_child
!= null then
2287 new_child
.parent
= self
2288 assert new_child
isa TKwmeth
2289 _n_kwmeth
= new_child
2295 if _n_methid
== old_child
then
2296 if new_child
!= null then
2297 new_child
.parent
= self
2298 assert new_child
isa AMethid
2299 _n_methid
= new_child
2305 if _n_signature
== old_child
then
2306 if new_child
!= null then
2307 new_child
.parent
= self
2308 assert new_child
isa ASignature
2309 _n_signature
= new_child
2315 if _n_block
== old_child
then
2316 if new_child
!= null then
2317 new_child
.parent
= self
2318 assert new_child
isa AExpr
2319 _n_block
= new_child
2327 redef fun visit_all
(v
: Visitor)
2329 if _n_doc
!= null then
2330 v
.enter_visit
(_n_doc
.as(not null))
2332 if _n_kwredef
!= null then
2333 v
.enter_visit
(_n_kwredef
.as(not null))
2335 v
.enter_visit
(_n_visibility
)
2336 v
.enter_visit
(_n_kwmeth
)
2337 v
.enter_visit
(_n_methid
)
2338 v
.enter_visit
(_n_signature
)
2339 if _n_block
!= null then
2340 v
.enter_visit
(_n_block
.as(not null))
2344 redef fun visit_all_reverse
(v
: Visitor)
2346 if _n_doc
!= null then
2347 v
.enter_visit
(_n_doc
.as(not null))
2349 if _n_kwredef
!= null then
2350 v
.enter_visit
(_n_kwredef
.as(not null))
2352 v
.enter_visit
(_n_visibility
)
2353 v
.enter_visit
(_n_kwmeth
)
2354 v
.enter_visit
(_n_methid
)
2355 v
.enter_visit
(_n_signature
)
2356 if _n_block
!= null then
2357 v
.enter_visit
(_n_block
.as(not null))
2361 redef class AConcreteInitPropdef
2369 redef fun n_kwredef
=(n
)
2376 redef fun n_visibility
=(n
)
2381 redef fun n_kwinit
=(n
)
2386 redef fun n_methid
=(n
)
2393 redef fun n_signature
=(n
)
2398 redef fun n_block
=(n
)
2406 private init empty_init
do end
2408 init init_aconcreteinitpropdef
(
2409 n_doc
: nullable ADoc ,
2410 n_kwredef
: nullable TKwredef ,
2411 n_visibility
: nullable AVisibility ,
2412 n_kwinit
: nullable TKwinit ,
2413 n_methid
: nullable AMethid ,
2414 n_signature
: nullable ASignature ,
2415 n_block
: nullable AExpr
2420 if n_doc
!= null then
2423 _n_kwredef
= n_kwredef
2424 if n_kwredef
!= null then
2425 n_kwredef
.parent
= self
2427 _n_visibility
= n_visibility
.as(not null)
2428 n_visibility
.parent
= self
2429 _n_kwinit
= n_kwinit
.as(not null)
2430 n_kwinit
.parent
= self
2431 _n_methid
= n_methid
2432 if n_methid
!= null then
2433 n_methid
.parent
= self
2435 _n_signature
= n_signature
.as(not null)
2436 n_signature
.parent
= self
2438 if n_block
!= null then
2439 n_block
.parent
= self
2443 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2445 if _n_doc
== old_child
then
2446 if new_child
!= null then
2447 new_child
.parent
= self
2448 assert new_child
isa ADoc
2455 if _n_kwredef
== old_child
then
2456 if new_child
!= null then
2457 new_child
.parent
= self
2458 assert new_child
isa TKwredef
2459 _n_kwredef
= new_child
2465 if _n_visibility
== old_child
then
2466 if new_child
!= null then
2467 new_child
.parent
= self
2468 assert new_child
isa AVisibility
2469 _n_visibility
= new_child
2475 if _n_kwinit
== old_child
then
2476 if new_child
!= null then
2477 new_child
.parent
= self
2478 assert new_child
isa TKwinit
2479 _n_kwinit
= new_child
2485 if _n_methid
== old_child
then
2486 if new_child
!= null then
2487 new_child
.parent
= self
2488 assert new_child
isa AMethid
2489 _n_methid
= new_child
2495 if _n_signature
== old_child
then
2496 if new_child
!= null then
2497 new_child
.parent
= self
2498 assert new_child
isa ASignature
2499 _n_signature
= new_child
2505 if _n_block
== old_child
then
2506 if new_child
!= null then
2507 new_child
.parent
= self
2508 assert new_child
isa AExpr
2509 _n_block
= new_child
2517 redef fun visit_all
(v
: Visitor)
2519 if _n_doc
!= null then
2520 v
.enter_visit
(_n_doc
.as(not null))
2522 if _n_kwredef
!= null then
2523 v
.enter_visit
(_n_kwredef
.as(not null))
2525 v
.enter_visit
(_n_visibility
)
2526 v
.enter_visit
(_n_kwinit
)
2527 if _n_methid
!= null then
2528 v
.enter_visit
(_n_methid
.as(not null))
2530 v
.enter_visit
(_n_signature
)
2531 if _n_block
!= null then
2532 v
.enter_visit
(_n_block
.as(not null))
2536 redef fun visit_all_reverse
(v
: Visitor)
2538 if _n_doc
!= null then
2539 v
.enter_visit
(_n_doc
.as(not null))
2541 if _n_kwredef
!= null then
2542 v
.enter_visit
(_n_kwredef
.as(not null))
2544 v
.enter_visit
(_n_visibility
)
2545 v
.enter_visit
(_n_kwinit
)
2546 if _n_methid
!= null then
2547 v
.enter_visit
(_n_methid
.as(not null))
2549 v
.enter_visit
(_n_signature
)
2550 if _n_block
!= null then
2551 v
.enter_visit
(_n_block
.as(not null))
2555 redef class AMainMethPropdef
2556 redef fun n_kwredef
=(n
)
2563 redef fun n_block
=(n
)
2571 private init empty_init
do end
2573 init init_amainmethpropdef
(
2574 n_kwredef
: nullable TKwredef ,
2575 n_block
: nullable AExpr
2579 _n_kwredef
= n_kwredef
2580 if n_kwredef
!= null then
2581 n_kwredef
.parent
= self
2584 if n_block
!= null then
2585 n_block
.parent
= self
2589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2591 if _n_kwredef
== old_child
then
2592 if new_child
!= null then
2593 new_child
.parent
= self
2594 assert new_child
isa TKwredef
2595 _n_kwredef
= new_child
2601 if _n_block
== old_child
then
2602 if new_child
!= null then
2603 new_child
.parent
= self
2604 assert new_child
isa AExpr
2605 _n_block
= new_child
2613 redef fun visit_all
(v
: Visitor)
2615 if _n_kwredef
!= null then
2616 v
.enter_visit
(_n_kwredef
.as(not null))
2618 if _n_block
!= null then
2619 v
.enter_visit
(_n_block
.as(not null))
2623 redef fun visit_all_reverse
(v
: Visitor)
2625 if _n_kwredef
!= null then
2626 v
.enter_visit
(_n_kwredef
.as(not null))
2628 if _n_block
!= null then
2629 v
.enter_visit
(_n_block
.as(not null))
2633 redef class ATypePropdef
2641 redef fun n_kwredef
=(n
)
2648 redef fun n_visibility
=(n
)
2653 redef fun n_kwtype
=(n
)
2663 redef fun n_type
=(n
)
2669 private init empty_init
do end
2671 init init_atypepropdef
(
2672 n_doc
: nullable ADoc ,
2673 n_kwredef
: nullable TKwredef ,
2674 n_visibility
: nullable AVisibility ,
2675 n_kwtype
: nullable TKwtype ,
2676 n_id
: nullable TClassid ,
2677 n_type
: nullable AType
2682 if n_doc
!= null then
2685 _n_kwredef
= n_kwredef
2686 if n_kwredef
!= null then
2687 n_kwredef
.parent
= self
2689 _n_visibility
= n_visibility
.as(not null)
2690 n_visibility
.parent
= self
2691 _n_kwtype
= n_kwtype
.as(not null)
2692 n_kwtype
.parent
= self
2693 _n_id
= n_id
.as(not null)
2695 _n_type
= n_type
.as(not null)
2696 n_type
.parent
= self
2699 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2701 if _n_doc
== old_child
then
2702 if new_child
!= null then
2703 new_child
.parent
= self
2704 assert new_child
isa ADoc
2711 if _n_kwredef
== old_child
then
2712 if new_child
!= null then
2713 new_child
.parent
= self
2714 assert new_child
isa TKwredef
2715 _n_kwredef
= new_child
2721 if _n_visibility
== old_child
then
2722 if new_child
!= null then
2723 new_child
.parent
= self
2724 assert new_child
isa AVisibility
2725 _n_visibility
= new_child
2731 if _n_kwtype
== old_child
then
2732 if new_child
!= null then
2733 new_child
.parent
= self
2734 assert new_child
isa TKwtype
2735 _n_kwtype
= new_child
2741 if _n_id
== old_child
then
2742 if new_child
!= null then
2743 new_child
.parent
= self
2744 assert new_child
isa TClassid
2751 if _n_type
== old_child
then
2752 if new_child
!= null then
2753 new_child
.parent
= self
2754 assert new_child
isa AType
2763 redef fun visit_all
(v
: Visitor)
2765 if _n_doc
!= null then
2766 v
.enter_visit
(_n_doc
.as(not null))
2768 if _n_kwredef
!= null then
2769 v
.enter_visit
(_n_kwredef
.as(not null))
2771 v
.enter_visit
(_n_visibility
)
2772 v
.enter_visit
(_n_kwtype
)
2773 v
.enter_visit
(_n_id
)
2774 v
.enter_visit
(_n_type
)
2777 redef fun visit_all_reverse
(v
: Visitor)
2779 if _n_doc
!= null then
2780 v
.enter_visit
(_n_doc
.as(not null))
2782 if _n_kwredef
!= null then
2783 v
.enter_visit
(_n_kwredef
.as(not null))
2785 v
.enter_visit
(_n_visibility
)
2786 v
.enter_visit
(_n_kwtype
)
2787 v
.enter_visit
(_n_id
)
2788 v
.enter_visit
(_n_type
)
2791 redef class AReadAble
2792 redef fun n_kwredef
=(n
)
2799 redef fun n_kwreadable
=(n
)
2805 private init empty_init
do end
2807 init init_areadable
(
2808 n_kwredef
: nullable TKwredef ,
2809 n_kwreadable
: nullable TKwreadable
2813 _n_kwredef
= n_kwredef
2814 if n_kwredef
!= null then
2815 n_kwredef
.parent
= self
2817 _n_kwreadable
= n_kwreadable
.as(not null)
2818 n_kwreadable
.parent
= self
2821 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2823 if _n_kwredef
== old_child
then
2824 if new_child
!= null then
2825 new_child
.parent
= self
2826 assert new_child
isa TKwredef
2827 _n_kwredef
= new_child
2833 if _n_kwreadable
== old_child
then
2834 if new_child
!= null then
2835 new_child
.parent
= self
2836 assert new_child
isa TKwreadable
2837 _n_kwreadable
= new_child
2845 redef fun visit_all
(v
: Visitor)
2847 if _n_kwredef
!= null then
2848 v
.enter_visit
(_n_kwredef
.as(not null))
2850 v
.enter_visit
(_n_kwreadable
)
2853 redef fun visit_all_reverse
(v
: Visitor)
2855 if _n_kwredef
!= null then
2856 v
.enter_visit
(_n_kwredef
.as(not null))
2858 v
.enter_visit
(_n_kwreadable
)
2861 redef class AWriteAble
2862 redef fun n_kwredef
=(n
)
2869 redef fun n_kwwritable
=(n
)
2875 private init empty_init
do end
2877 init init_awriteable
(
2878 n_kwredef
: nullable TKwredef ,
2879 n_kwwritable
: nullable TKwwritable
2883 _n_kwredef
= n_kwredef
2884 if n_kwredef
!= null then
2885 n_kwredef
.parent
= self
2887 _n_kwwritable
= n_kwwritable
.as(not null)
2888 n_kwwritable
.parent
= self
2891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2893 if _n_kwredef
== old_child
then
2894 if new_child
!= null then
2895 new_child
.parent
= self
2896 assert new_child
isa TKwredef
2897 _n_kwredef
= new_child
2903 if _n_kwwritable
== old_child
then
2904 if new_child
!= null then
2905 new_child
.parent
= self
2906 assert new_child
isa TKwwritable
2907 _n_kwwritable
= new_child
2915 redef fun visit_all
(v
: Visitor)
2917 if _n_kwredef
!= null then
2918 v
.enter_visit
(_n_kwredef
.as(not null))
2920 v
.enter_visit
(_n_kwwritable
)
2923 redef fun visit_all_reverse
(v
: Visitor)
2925 if _n_kwredef
!= null then
2926 v
.enter_visit
(_n_kwredef
.as(not null))
2928 v
.enter_visit
(_n_kwwritable
)
2931 redef class AIdMethid
2938 private init empty_init
do end
2940 init init_aidmethid
(
2945 _n_id
= n_id
.as(not null)
2949 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2951 if _n_id
== old_child
then
2952 if new_child
!= null then
2953 new_child
.parent
= self
2954 assert new_child
isa TId
2963 redef fun visit_all
(v
: Visitor)
2965 v
.enter_visit
(_n_id
)
2968 redef fun visit_all_reverse
(v
: Visitor)
2970 v
.enter_visit
(_n_id
)
2973 redef class APlusMethid
2974 redef fun n_plus
=(n
)
2980 private init empty_init
do end
2982 init init_aplusmethid
(
2983 n_plus
: nullable TPlus
2987 _n_plus
= n_plus
.as(not null)
2988 n_plus
.parent
= self
2991 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2993 if _n_plus
== old_child
then
2994 if new_child
!= null then
2995 new_child
.parent
= self
2996 assert new_child
isa TPlus
3005 redef fun visit_all
(v
: Visitor)
3007 v
.enter_visit
(_n_plus
)
3010 redef fun visit_all_reverse
(v
: Visitor)
3012 v
.enter_visit
(_n_plus
)
3015 redef class AMinusMethid
3016 redef fun n_minus
=(n
)
3022 private init empty_init
do end
3024 init init_aminusmethid
(
3025 n_minus
: nullable TMinus
3029 _n_minus
= n_minus
.as(not null)
3030 n_minus
.parent
= self
3033 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3035 if _n_minus
== old_child
then
3036 if new_child
!= null then
3037 new_child
.parent
= self
3038 assert new_child
isa TMinus
3039 _n_minus
= new_child
3047 redef fun visit_all
(v
: Visitor)
3049 v
.enter_visit
(_n_minus
)
3052 redef fun visit_all_reverse
(v
: Visitor)
3054 v
.enter_visit
(_n_minus
)
3057 redef class AStarMethid
3058 redef fun n_star
=(n
)
3064 private init empty_init
do end
3066 init init_astarmethid
(
3067 n_star
: nullable TStar
3071 _n_star
= n_star
.as(not null)
3072 n_star
.parent
= self
3075 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3077 if _n_star
== old_child
then
3078 if new_child
!= null then
3079 new_child
.parent
= self
3080 assert new_child
isa TStar
3089 redef fun visit_all
(v
: Visitor)
3091 v
.enter_visit
(_n_star
)
3094 redef fun visit_all_reverse
(v
: Visitor)
3096 v
.enter_visit
(_n_star
)
3099 redef class ASlashMethid
3100 redef fun n_slash
=(n
)
3106 private init empty_init
do end
3108 init init_aslashmethid
(
3109 n_slash
: nullable TSlash
3113 _n_slash
= n_slash
.as(not null)
3114 n_slash
.parent
= self
3117 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3119 if _n_slash
== old_child
then
3120 if new_child
!= null then
3121 new_child
.parent
= self
3122 assert new_child
isa TSlash
3123 _n_slash
= new_child
3131 redef fun visit_all
(v
: Visitor)
3133 v
.enter_visit
(_n_slash
)
3136 redef fun visit_all_reverse
(v
: Visitor)
3138 v
.enter_visit
(_n_slash
)
3141 redef class APercentMethid
3142 redef fun n_percent
=(n
)
3148 private init empty_init
do end
3150 init init_apercentmethid
(
3151 n_percent
: nullable TPercent
3155 _n_percent
= n_percent
.as(not null)
3156 n_percent
.parent
= self
3159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3161 if _n_percent
== old_child
then
3162 if new_child
!= null then
3163 new_child
.parent
= self
3164 assert new_child
isa TPercent
3165 _n_percent
= new_child
3173 redef fun visit_all
(v
: Visitor)
3175 v
.enter_visit
(_n_percent
)
3178 redef fun visit_all_reverse
(v
: Visitor)
3180 v
.enter_visit
(_n_percent
)
3183 redef class AEqMethid
3190 private init empty_init
do end
3192 init init_aeqmethid
(
3197 _n_eq
= n_eq
.as(not null)
3201 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3203 if _n_eq
== old_child
then
3204 if new_child
!= null then
3205 new_child
.parent
= self
3206 assert new_child
isa TEq
3215 redef fun visit_all
(v
: Visitor)
3217 v
.enter_visit
(_n_eq
)
3220 redef fun visit_all_reverse
(v
: Visitor)
3222 v
.enter_visit
(_n_eq
)
3225 redef class ANeMethid
3232 private init empty_init
do end
3234 init init_anemethid
(
3239 _n_ne
= n_ne
.as(not null)
3243 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3245 if _n_ne
== old_child
then
3246 if new_child
!= null then
3247 new_child
.parent
= self
3248 assert new_child
isa TNe
3257 redef fun visit_all
(v
: Visitor)
3259 v
.enter_visit
(_n_ne
)
3262 redef fun visit_all_reverse
(v
: Visitor)
3264 v
.enter_visit
(_n_ne
)
3267 redef class ALeMethid
3274 private init empty_init
do end
3276 init init_alemethid
(
3281 _n_le
= n_le
.as(not null)
3285 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3287 if _n_le
== old_child
then
3288 if new_child
!= null then
3289 new_child
.parent
= self
3290 assert new_child
isa TLe
3299 redef fun visit_all
(v
: Visitor)
3301 v
.enter_visit
(_n_le
)
3304 redef fun visit_all_reverse
(v
: Visitor)
3306 v
.enter_visit
(_n_le
)
3309 redef class AGeMethid
3316 private init empty_init
do end
3318 init init_agemethid
(
3323 _n_ge
= n_ge
.as(not null)
3327 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3329 if _n_ge
== old_child
then
3330 if new_child
!= null then
3331 new_child
.parent
= self
3332 assert new_child
isa TGe
3341 redef fun visit_all
(v
: Visitor)
3343 v
.enter_visit
(_n_ge
)
3346 redef fun visit_all_reverse
(v
: Visitor)
3348 v
.enter_visit
(_n_ge
)
3351 redef class ALtMethid
3358 private init empty_init
do end
3360 init init_altmethid
(
3365 _n_lt
= n_lt
.as(not null)
3369 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3371 if _n_lt
== old_child
then
3372 if new_child
!= null then
3373 new_child
.parent
= self
3374 assert new_child
isa TLt
3383 redef fun visit_all
(v
: Visitor)
3385 v
.enter_visit
(_n_lt
)
3388 redef fun visit_all_reverse
(v
: Visitor)
3390 v
.enter_visit
(_n_lt
)
3393 redef class AGtMethid
3400 private init empty_init
do end
3402 init init_agtmethid
(
3407 _n_gt
= n_gt
.as(not null)
3411 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3413 if _n_gt
== old_child
then
3414 if new_child
!= null then
3415 new_child
.parent
= self
3416 assert new_child
isa TGt
3425 redef fun visit_all
(v
: Visitor)
3427 v
.enter_visit
(_n_gt
)
3430 redef fun visit_all_reverse
(v
: Visitor)
3432 v
.enter_visit
(_n_gt
)
3435 redef class ABraMethid
3436 redef fun n_obra
=(n
)
3441 redef fun n_cbra
=(n
)
3447 private init empty_init
do end
3449 init init_abramethid
(
3450 n_obra
: nullable TObra ,
3451 n_cbra
: nullable TCbra
3455 _n_obra
= n_obra
.as(not null)
3456 n_obra
.parent
= self
3457 _n_cbra
= n_cbra
.as(not null)
3458 n_cbra
.parent
= self
3461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3463 if _n_obra
== old_child
then
3464 if new_child
!= null then
3465 new_child
.parent
= self
3466 assert new_child
isa TObra
3473 if _n_cbra
== old_child
then
3474 if new_child
!= null then
3475 new_child
.parent
= self
3476 assert new_child
isa TCbra
3485 redef fun visit_all
(v
: Visitor)
3487 v
.enter_visit
(_n_obra
)
3488 v
.enter_visit
(_n_cbra
)
3491 redef fun visit_all_reverse
(v
: Visitor)
3493 v
.enter_visit
(_n_obra
)
3494 v
.enter_visit
(_n_cbra
)
3497 redef class AStarshipMethid
3498 redef fun n_starship
=(n
)
3504 private init empty_init
do end
3506 init init_astarshipmethid
(
3507 n_starship
: nullable TStarship
3511 _n_starship
= n_starship
.as(not null)
3512 n_starship
.parent
= self
3515 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3517 if _n_starship
== old_child
then
3518 if new_child
!= null then
3519 new_child
.parent
= self
3520 assert new_child
isa TStarship
3521 _n_starship
= new_child
3529 redef fun visit_all
(v
: Visitor)
3531 v
.enter_visit
(_n_starship
)
3534 redef fun visit_all_reverse
(v
: Visitor)
3536 v
.enter_visit
(_n_starship
)
3539 redef class AAssignMethid
3545 redef fun n_assign
=(n
)
3551 private init empty_init
do end
3553 init init_aassignmethid
(
3554 n_id
: nullable TId ,
3555 n_assign
: nullable TAssign
3559 _n_id
= n_id
.as(not null)
3561 _n_assign
= n_assign
.as(not null)
3562 n_assign
.parent
= self
3565 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3567 if _n_id
== old_child
then
3568 if new_child
!= null then
3569 new_child
.parent
= self
3570 assert new_child
isa TId
3577 if _n_assign
== old_child
then
3578 if new_child
!= null then
3579 new_child
.parent
= self
3580 assert new_child
isa TAssign
3581 _n_assign
= new_child
3589 redef fun visit_all
(v
: Visitor)
3591 v
.enter_visit
(_n_id
)
3592 v
.enter_visit
(_n_assign
)
3595 redef fun visit_all_reverse
(v
: Visitor)
3597 v
.enter_visit
(_n_id
)
3598 v
.enter_visit
(_n_assign
)
3601 redef class ABraassignMethid
3602 redef fun n_obra
=(n
)
3607 redef fun n_cbra
=(n
)
3612 redef fun n_assign
=(n
)
3618 private init empty_init
do end
3620 init init_abraassignmethid
(
3621 n_obra
: nullable TObra ,
3622 n_cbra
: nullable TCbra ,
3623 n_assign
: nullable TAssign
3627 _n_obra
= n_obra
.as(not null)
3628 n_obra
.parent
= self
3629 _n_cbra
= n_cbra
.as(not null)
3630 n_cbra
.parent
= self
3631 _n_assign
= n_assign
.as(not null)
3632 n_assign
.parent
= self
3635 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3637 if _n_obra
== old_child
then
3638 if new_child
!= null then
3639 new_child
.parent
= self
3640 assert new_child
isa TObra
3647 if _n_cbra
== old_child
then
3648 if new_child
!= null then
3649 new_child
.parent
= self
3650 assert new_child
isa TCbra
3657 if _n_assign
== old_child
then
3658 if new_child
!= null then
3659 new_child
.parent
= self
3660 assert new_child
isa TAssign
3661 _n_assign
= new_child
3669 redef fun visit_all
(v
: Visitor)
3671 v
.enter_visit
(_n_obra
)
3672 v
.enter_visit
(_n_cbra
)
3673 v
.enter_visit
(_n_assign
)
3676 redef fun visit_all_reverse
(v
: Visitor)
3678 v
.enter_visit
(_n_obra
)
3679 v
.enter_visit
(_n_cbra
)
3680 v
.enter_visit
(_n_assign
)
3683 redef class ASignature
3684 redef fun n_type
=(n
)
3692 private init empty_init
do end
3694 init init_asignature
(
3695 n_params
: Collection[Object] , # Should be Collection[AParam]
3696 n_type
: nullable AType ,
3697 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3701 for n
in n_params
do
3707 if n_type
!= null then
3708 n_type
.parent
= self
3710 for n
in n_closure_decls
do
3711 assert n
isa AClosureDecl
3712 _n_closure_decls
.add
(n
)
3717 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3719 for i
in [0.._n_params
.length
[ do
3720 if _n_params
[i
] == old_child
then
3721 if new_child
!= null then
3722 assert new_child
isa AParam
3723 _n_params
[i
] = new_child
3724 new_child
.parent
= self
3726 _n_params
.remove_at
(i
)
3731 if _n_type
== old_child
then
3732 if new_child
!= null then
3733 new_child
.parent
= self
3734 assert new_child
isa AType
3741 for i
in [0.._n_closure_decls
.length
[ do
3742 if _n_closure_decls
[i
] == old_child
then
3743 if new_child
!= null then
3744 assert new_child
isa AClosureDecl
3745 _n_closure_decls
[i
] = new_child
3746 new_child
.parent
= self
3748 _n_closure_decls
.remove_at
(i
)
3755 redef fun visit_all
(v
: Visitor)
3757 for n
in _n_params
do
3760 if _n_type
!= null then
3761 v
.enter_visit
(_n_type
.as(not null))
3763 for n
in _n_closure_decls
do
3768 redef fun visit_all_reverse
(v
: Visitor)
3771 var i
= _n_params
.length
3773 v
.enter_visit
(_n_params
[i
])
3777 if _n_type
!= null then
3778 v
.enter_visit
(_n_type
.as(not null))
3781 var i
= _n_closure_decls
.length
3783 v
.enter_visit
(_n_closure_decls
[i
])
3795 redef fun n_type
=(n
)
3802 redef fun n_dotdotdot
=(n
)
3810 private init empty_init
do end
3813 n_id
: nullable TId ,
3814 n_type
: nullable AType ,
3815 n_dotdotdot
: nullable TDotdotdot
3819 _n_id
= n_id
.as(not null)
3822 if n_type
!= null then
3823 n_type
.parent
= self
3825 _n_dotdotdot
= n_dotdotdot
3826 if n_dotdotdot
!= null then
3827 n_dotdotdot
.parent
= self
3831 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3833 if _n_id
== old_child
then
3834 if new_child
!= null then
3835 new_child
.parent
= self
3836 assert new_child
isa TId
3843 if _n_type
== old_child
then
3844 if new_child
!= null then
3845 new_child
.parent
= self
3846 assert new_child
isa AType
3853 if _n_dotdotdot
== old_child
then
3854 if new_child
!= null then
3855 new_child
.parent
= self
3856 assert new_child
isa TDotdotdot
3857 _n_dotdotdot
= new_child
3865 redef fun visit_all
(v
: Visitor)
3867 v
.enter_visit
(_n_id
)
3868 if _n_type
!= null then
3869 v
.enter_visit
(_n_type
.as(not null))
3871 if _n_dotdotdot
!= null then
3872 v
.enter_visit
(_n_dotdotdot
.as(not null))
3876 redef fun visit_all_reverse
(v
: Visitor)
3878 v
.enter_visit
(_n_id
)
3879 if _n_type
!= null then
3880 v
.enter_visit
(_n_type
.as(not null))
3882 if _n_dotdotdot
!= null then
3883 v
.enter_visit
(_n_dotdotdot
.as(not null))
3887 redef class AClosureDecl
3888 redef fun n_kwwith
=(n
)
3893 redef fun n_kwbreak
=(n
)
3905 redef fun n_signature
=(n
)
3910 redef fun n_expr
=(n
)
3918 private init empty_init
do end
3920 init init_aclosuredecl
(
3921 n_kwwith
: nullable TKwwith ,
3922 n_kwbreak
: nullable TKwbreak ,
3923 n_id
: nullable TId ,
3924 n_signature
: nullable ASignature ,
3925 n_expr
: nullable AExpr
3929 _n_kwwith
= n_kwwith
.as(not null)
3930 n_kwwith
.parent
= self
3931 _n_kwbreak
= n_kwbreak
3932 if n_kwbreak
!= null then
3933 n_kwbreak
.parent
= self
3935 _n_id
= n_id
.as(not null)
3937 _n_signature
= n_signature
.as(not null)
3938 n_signature
.parent
= self
3940 if n_expr
!= null then
3941 n_expr
.parent
= self
3945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3947 if _n_kwwith
== old_child
then
3948 if new_child
!= null then
3949 new_child
.parent
= self
3950 assert new_child
isa TKwwith
3951 _n_kwwith
= new_child
3957 if _n_kwbreak
== old_child
then
3958 if new_child
!= null then
3959 new_child
.parent
= self
3960 assert new_child
isa TKwbreak
3961 _n_kwbreak
= new_child
3967 if _n_id
== old_child
then
3968 if new_child
!= null then
3969 new_child
.parent
= self
3970 assert new_child
isa TId
3977 if _n_signature
== old_child
then
3978 if new_child
!= null then
3979 new_child
.parent
= self
3980 assert new_child
isa ASignature
3981 _n_signature
= new_child
3987 if _n_expr
== old_child
then
3988 if new_child
!= null then
3989 new_child
.parent
= self
3990 assert new_child
isa AExpr
3999 redef fun visit_all
(v
: Visitor)
4001 v
.enter_visit
(_n_kwwith
)
4002 if _n_kwbreak
!= null then
4003 v
.enter_visit
(_n_kwbreak
.as(not null))
4005 v
.enter_visit
(_n_id
)
4006 v
.enter_visit
(_n_signature
)
4007 if _n_expr
!= null then
4008 v
.enter_visit
(_n_expr
.as(not null))
4012 redef fun visit_all_reverse
(v
: Visitor)
4014 v
.enter_visit
(_n_kwwith
)
4015 if _n_kwbreak
!= null then
4016 v
.enter_visit
(_n_kwbreak
.as(not null))
4018 v
.enter_visit
(_n_id
)
4019 v
.enter_visit
(_n_signature
)
4020 if _n_expr
!= null then
4021 v
.enter_visit
(_n_expr
.as(not null))
4026 redef fun n_kwnullable
=(n
)
4039 private init empty_init
do end
4042 n_kwnullable
: nullable TKwnullable ,
4043 n_id
: nullable TClassid ,
4044 n_types
: Collection[Object] # Should be Collection[AType]
4048 _n_kwnullable
= n_kwnullable
4049 if n_kwnullable
!= null then
4050 n_kwnullable
.parent
= self
4052 _n_id
= n_id
.as(not null)
4061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4063 if _n_kwnullable
== old_child
then
4064 if new_child
!= null then
4065 new_child
.parent
= self
4066 assert new_child
isa TKwnullable
4067 _n_kwnullable
= new_child
4069 _n_kwnullable
= null
4073 if _n_id
== old_child
then
4074 if new_child
!= null then
4075 new_child
.parent
= self
4076 assert new_child
isa TClassid
4083 for i
in [0.._n_types
.length
[ do
4084 if _n_types
[i
] == old_child
then
4085 if new_child
!= null then
4086 assert new_child
isa AType
4087 _n_types
[i
] = new_child
4088 new_child
.parent
= self
4090 _n_types
.remove_at
(i
)
4097 redef fun visit_all
(v
: Visitor)
4099 if _n_kwnullable
!= null then
4100 v
.enter_visit
(_n_kwnullable
.as(not null))
4102 v
.enter_visit
(_n_id
)
4103 for n
in _n_types
do
4108 redef fun visit_all_reverse
(v
: Visitor)
4110 if _n_kwnullable
!= null then
4111 v
.enter_visit
(_n_kwnullable
.as(not null))
4113 v
.enter_visit
(_n_id
)
4115 var i
= _n_types
.length
4117 v
.enter_visit
(_n_types
[i
])
4124 redef fun n_kwlabel
=(n
)
4135 private init empty_init
do end
4138 n_kwlabel
: nullable TKwlabel ,
4143 _n_kwlabel
= n_kwlabel
.as(not null)
4144 n_kwlabel
.parent
= self
4145 _n_id
= n_id
.as(not null)
4149 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4151 if _n_kwlabel
== old_child
then
4152 if new_child
!= null then
4153 new_child
.parent
= self
4154 assert new_child
isa TKwlabel
4155 _n_kwlabel
= new_child
4161 if _n_id
== old_child
then
4162 if new_child
!= null then
4163 new_child
.parent
= self
4164 assert new_child
isa TId
4173 redef fun visit_all
(v
: Visitor)
4175 v
.enter_visit
(_n_kwlabel
)
4176 v
.enter_visit
(_n_id
)
4179 redef fun visit_all_reverse
(v
: Visitor)
4181 v
.enter_visit
(_n_kwlabel
)
4182 v
.enter_visit
(_n_id
)
4185 redef class ABlockExpr
4187 private init empty_init
do end
4189 init init_ablockexpr
(
4190 n_expr
: Collection[Object] # Should be Collection[AExpr]
4201 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4203 for i
in [0.._n_expr
.length
[ do
4204 if _n_expr
[i
] == old_child
then
4205 if new_child
!= null then
4206 assert new_child
isa AExpr
4207 _n_expr
[i
] = new_child
4208 new_child
.parent
= self
4210 _n_expr
.remove_at
(i
)
4217 redef fun visit_all
(v
: Visitor)
4224 redef fun visit_all_reverse
(v
: Visitor)
4227 var i
= _n_expr
.length
4229 v
.enter_visit
(_n_expr
[i
])
4235 redef class AVardeclExpr
4236 redef fun n_kwvar
=(n
)
4246 redef fun n_type
=(n
)
4253 redef fun n_assign
=(n
)
4260 redef fun n_expr
=(n
)
4268 private init empty_init
do end
4270 init init_avardeclexpr
(
4271 n_kwvar
: nullable TKwvar ,
4272 n_id
: nullable TId ,
4273 n_type
: nullable AType ,
4274 n_assign
: nullable TAssign ,
4275 n_expr
: nullable AExpr
4279 _n_kwvar
= n_kwvar
.as(not null)
4280 n_kwvar
.parent
= self
4281 _n_id
= n_id
.as(not null)
4284 if n_type
!= null then
4285 n_type
.parent
= self
4287 _n_assign
= n_assign
4288 if n_assign
!= null then
4289 n_assign
.parent
= self
4292 if n_expr
!= null then
4293 n_expr
.parent
= self
4297 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4299 if _n_kwvar
== old_child
then
4300 if new_child
!= null then
4301 new_child
.parent
= self
4302 assert new_child
isa TKwvar
4303 _n_kwvar
= new_child
4309 if _n_id
== old_child
then
4310 if new_child
!= null then
4311 new_child
.parent
= self
4312 assert new_child
isa TId
4319 if _n_type
== old_child
then
4320 if new_child
!= null then
4321 new_child
.parent
= self
4322 assert new_child
isa AType
4329 if _n_assign
== old_child
then
4330 if new_child
!= null then
4331 new_child
.parent
= self
4332 assert new_child
isa TAssign
4333 _n_assign
= new_child
4339 if _n_expr
== old_child
then
4340 if new_child
!= null then
4341 new_child
.parent
= self
4342 assert new_child
isa AExpr
4351 redef fun visit_all
(v
: Visitor)
4353 v
.enter_visit
(_n_kwvar
)
4354 v
.enter_visit
(_n_id
)
4355 if _n_type
!= null then
4356 v
.enter_visit
(_n_type
.as(not null))
4358 if _n_assign
!= null then
4359 v
.enter_visit
(_n_assign
.as(not null))
4361 if _n_expr
!= null then
4362 v
.enter_visit
(_n_expr
.as(not null))
4366 redef fun visit_all_reverse
(v
: Visitor)
4368 v
.enter_visit
(_n_kwvar
)
4369 v
.enter_visit
(_n_id
)
4370 if _n_type
!= null then
4371 v
.enter_visit
(_n_type
.as(not null))
4373 if _n_assign
!= null then
4374 v
.enter_visit
(_n_assign
.as(not null))
4376 if _n_expr
!= null then
4377 v
.enter_visit
(_n_expr
.as(not null))
4381 redef class AReturnExpr
4382 redef fun n_kwreturn
=(n
)
4387 redef fun n_expr
=(n
)
4395 private init empty_init
do end
4397 init init_areturnexpr
(
4398 n_kwreturn
: nullable TKwreturn ,
4399 n_expr
: nullable AExpr
4403 _n_kwreturn
= n_kwreturn
.as(not null)
4404 n_kwreturn
.parent
= self
4406 if n_expr
!= null then
4407 n_expr
.parent
= self
4411 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4413 if _n_kwreturn
== old_child
then
4414 if new_child
!= null then
4415 new_child
.parent
= self
4416 assert new_child
isa TKwreturn
4417 _n_kwreturn
= new_child
4423 if _n_expr
== old_child
then
4424 if new_child
!= null then
4425 new_child
.parent
= self
4426 assert new_child
isa AExpr
4435 redef fun visit_all
(v
: Visitor)
4437 v
.enter_visit
(_n_kwreturn
)
4438 if _n_expr
!= null then
4439 v
.enter_visit
(_n_expr
.as(not null))
4443 redef fun visit_all_reverse
(v
: Visitor)
4445 v
.enter_visit
(_n_kwreturn
)
4446 if _n_expr
!= null then
4447 v
.enter_visit
(_n_expr
.as(not null))
4451 redef class ABreakExpr
4452 redef fun n_kwbreak
=(n
)
4457 redef fun n_label
=(n
)
4464 redef fun n_expr
=(n
)
4472 private init empty_init
do end
4474 init init_abreakexpr
(
4475 n_kwbreak
: nullable TKwbreak ,
4476 n_label
: nullable ALabel ,
4477 n_expr
: nullable AExpr
4481 _n_kwbreak
= n_kwbreak
.as(not null)
4482 n_kwbreak
.parent
= self
4484 if n_label
!= null then
4485 n_label
.parent
= self
4488 if n_expr
!= null then
4489 n_expr
.parent
= self
4493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4495 if _n_kwbreak
== old_child
then
4496 if new_child
!= null then
4497 new_child
.parent
= self
4498 assert new_child
isa TKwbreak
4499 _n_kwbreak
= new_child
4505 if _n_label
== old_child
then
4506 if new_child
!= null then
4507 new_child
.parent
= self
4508 assert new_child
isa ALabel
4509 _n_label
= new_child
4515 if _n_expr
== old_child
then
4516 if new_child
!= null then
4517 new_child
.parent
= self
4518 assert new_child
isa AExpr
4527 redef fun visit_all
(v
: Visitor)
4529 v
.enter_visit
(_n_kwbreak
)
4530 if _n_label
!= null then
4531 v
.enter_visit
(_n_label
.as(not null))
4533 if _n_expr
!= null then
4534 v
.enter_visit
(_n_expr
.as(not null))
4538 redef fun visit_all_reverse
(v
: Visitor)
4540 v
.enter_visit
(_n_kwbreak
)
4541 if _n_label
!= null then
4542 v
.enter_visit
(_n_label
.as(not null))
4544 if _n_expr
!= null then
4545 v
.enter_visit
(_n_expr
.as(not null))
4549 redef class AAbortExpr
4550 redef fun n_kwabort
=(n
)
4556 private init empty_init
do end
4558 init init_aabortexpr
(
4559 n_kwabort
: nullable TKwabort
4563 _n_kwabort
= n_kwabort
.as(not null)
4564 n_kwabort
.parent
= self
4567 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4569 if _n_kwabort
== old_child
then
4570 if new_child
!= null then
4571 new_child
.parent
= self
4572 assert new_child
isa TKwabort
4573 _n_kwabort
= new_child
4581 redef fun visit_all
(v
: Visitor)
4583 v
.enter_visit
(_n_kwabort
)
4586 redef fun visit_all_reverse
(v
: Visitor)
4588 v
.enter_visit
(_n_kwabort
)
4591 redef class AContinueExpr
4592 redef fun n_kwcontinue
=(n
)
4597 redef fun n_label
=(n
)
4604 redef fun n_expr
=(n
)
4612 private init empty_init
do end
4614 init init_acontinueexpr
(
4615 n_kwcontinue
: nullable TKwcontinue ,
4616 n_label
: nullable ALabel ,
4617 n_expr
: nullable AExpr
4621 _n_kwcontinue
= n_kwcontinue
.as(not null)
4622 n_kwcontinue
.parent
= self
4624 if n_label
!= null then
4625 n_label
.parent
= self
4628 if n_expr
!= null then
4629 n_expr
.parent
= self
4633 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4635 if _n_kwcontinue
== old_child
then
4636 if new_child
!= null then
4637 new_child
.parent
= self
4638 assert new_child
isa TKwcontinue
4639 _n_kwcontinue
= new_child
4645 if _n_label
== old_child
then
4646 if new_child
!= null then
4647 new_child
.parent
= self
4648 assert new_child
isa ALabel
4649 _n_label
= new_child
4655 if _n_expr
== old_child
then
4656 if new_child
!= null then
4657 new_child
.parent
= self
4658 assert new_child
isa AExpr
4667 redef fun visit_all
(v
: Visitor)
4669 v
.enter_visit
(_n_kwcontinue
)
4670 if _n_label
!= null then
4671 v
.enter_visit
(_n_label
.as(not null))
4673 if _n_expr
!= null then
4674 v
.enter_visit
(_n_expr
.as(not null))
4678 redef fun visit_all_reverse
(v
: Visitor)
4680 v
.enter_visit
(_n_kwcontinue
)
4681 if _n_label
!= null then
4682 v
.enter_visit
(_n_label
.as(not null))
4684 if _n_expr
!= null then
4685 v
.enter_visit
(_n_expr
.as(not null))
4690 redef fun n_kwdo
=(n
)
4695 redef fun n_block
=(n
)
4702 redef fun n_label
=(n
)
4710 private init empty_init
do end
4713 n_kwdo
: nullable TKwdo ,
4714 n_block
: nullable AExpr ,
4715 n_label
: nullable ALabel
4719 _n_kwdo
= n_kwdo
.as(not null)
4720 n_kwdo
.parent
= self
4722 if n_block
!= null then
4723 n_block
.parent
= self
4726 if n_label
!= null then
4727 n_label
.parent
= self
4731 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4733 if _n_kwdo
== old_child
then
4734 if new_child
!= null then
4735 new_child
.parent
= self
4736 assert new_child
isa TKwdo
4743 if _n_block
== old_child
then
4744 if new_child
!= null then
4745 new_child
.parent
= self
4746 assert new_child
isa AExpr
4747 _n_block
= new_child
4753 if _n_label
== old_child
then
4754 if new_child
!= null then
4755 new_child
.parent
= self
4756 assert new_child
isa ALabel
4757 _n_label
= new_child
4765 redef fun visit_all
(v
: Visitor)
4767 v
.enter_visit
(_n_kwdo
)
4768 if _n_block
!= null then
4769 v
.enter_visit
(_n_block
.as(not null))
4771 if _n_label
!= null then
4772 v
.enter_visit
(_n_label
.as(not null))
4776 redef fun visit_all_reverse
(v
: Visitor)
4778 v
.enter_visit
(_n_kwdo
)
4779 if _n_block
!= null then
4780 v
.enter_visit
(_n_block
.as(not null))
4782 if _n_label
!= null then
4783 v
.enter_visit
(_n_label
.as(not null))
4788 redef fun n_kwif
=(n
)
4793 redef fun n_expr
=(n
)
4798 redef fun n_then
=(n
)
4805 redef fun n_else
=(n
)
4813 private init empty_init
do end
4816 n_kwif
: nullable TKwif ,
4817 n_expr
: nullable AExpr ,
4818 n_then
: nullable AExpr ,
4819 n_else
: nullable AExpr
4823 _n_kwif
= n_kwif
.as(not null)
4824 n_kwif
.parent
= self
4825 _n_expr
= n_expr
.as(not null)
4826 n_expr
.parent
= self
4828 if n_then
!= null then
4829 n_then
.parent
= self
4832 if n_else
!= null then
4833 n_else
.parent
= self
4837 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4839 if _n_kwif
== old_child
then
4840 if new_child
!= null then
4841 new_child
.parent
= self
4842 assert new_child
isa TKwif
4849 if _n_expr
== old_child
then
4850 if new_child
!= null then
4851 new_child
.parent
= self
4852 assert new_child
isa AExpr
4859 if _n_then
== old_child
then
4860 if new_child
!= null then
4861 new_child
.parent
= self
4862 assert new_child
isa AExpr
4869 if _n_else
== old_child
then
4870 if new_child
!= null then
4871 new_child
.parent
= self
4872 assert new_child
isa AExpr
4881 redef fun visit_all
(v
: Visitor)
4883 v
.enter_visit
(_n_kwif
)
4884 v
.enter_visit
(_n_expr
)
4885 if _n_then
!= null then
4886 v
.enter_visit
(_n_then
.as(not null))
4888 if _n_else
!= null then
4889 v
.enter_visit
(_n_else
.as(not null))
4893 redef fun visit_all_reverse
(v
: Visitor)
4895 v
.enter_visit
(_n_kwif
)
4896 v
.enter_visit
(_n_expr
)
4897 if _n_then
!= null then
4898 v
.enter_visit
(_n_then
.as(not null))
4900 if _n_else
!= null then
4901 v
.enter_visit
(_n_else
.as(not null))
4905 redef class AIfexprExpr
4906 redef fun n_kwif
=(n
)
4911 redef fun n_expr
=(n
)
4916 redef fun n_kwthen
=(n
)
4921 redef fun n_then
=(n
)
4926 redef fun n_kwelse
=(n
)
4931 redef fun n_else
=(n
)
4937 private init empty_init
do end
4939 init init_aifexprexpr
(
4940 n_kwif
: nullable TKwif ,
4941 n_expr
: nullable AExpr ,
4942 n_kwthen
: nullable TKwthen ,
4943 n_then
: nullable AExpr ,
4944 n_kwelse
: nullable TKwelse ,
4945 n_else
: nullable AExpr
4949 _n_kwif
= n_kwif
.as(not null)
4950 n_kwif
.parent
= self
4951 _n_expr
= n_expr
.as(not null)
4952 n_expr
.parent
= self
4953 _n_kwthen
= n_kwthen
.as(not null)
4954 n_kwthen
.parent
= self
4955 _n_then
= n_then
.as(not null)
4956 n_then
.parent
= self
4957 _n_kwelse
= n_kwelse
.as(not null)
4958 n_kwelse
.parent
= self
4959 _n_else
= n_else
.as(not null)
4960 n_else
.parent
= self
4963 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4965 if _n_kwif
== old_child
then
4966 if new_child
!= null then
4967 new_child
.parent
= self
4968 assert new_child
isa TKwif
4975 if _n_expr
== old_child
then
4976 if new_child
!= null then
4977 new_child
.parent
= self
4978 assert new_child
isa AExpr
4985 if _n_kwthen
== old_child
then
4986 if new_child
!= null then
4987 new_child
.parent
= self
4988 assert new_child
isa TKwthen
4989 _n_kwthen
= new_child
4995 if _n_then
== old_child
then
4996 if new_child
!= null then
4997 new_child
.parent
= self
4998 assert new_child
isa AExpr
5005 if _n_kwelse
== old_child
then
5006 if new_child
!= null then
5007 new_child
.parent
= self
5008 assert new_child
isa TKwelse
5009 _n_kwelse
= new_child
5015 if _n_else
== old_child
then
5016 if new_child
!= null then
5017 new_child
.parent
= self
5018 assert new_child
isa AExpr
5027 redef fun visit_all
(v
: Visitor)
5029 v
.enter_visit
(_n_kwif
)
5030 v
.enter_visit
(_n_expr
)
5031 v
.enter_visit
(_n_kwthen
)
5032 v
.enter_visit
(_n_then
)
5033 v
.enter_visit
(_n_kwelse
)
5034 v
.enter_visit
(_n_else
)
5037 redef fun visit_all_reverse
(v
: Visitor)
5039 v
.enter_visit
(_n_kwif
)
5040 v
.enter_visit
(_n_expr
)
5041 v
.enter_visit
(_n_kwthen
)
5042 v
.enter_visit
(_n_then
)
5043 v
.enter_visit
(_n_kwelse
)
5044 v
.enter_visit
(_n_else
)
5047 redef class AWhileExpr
5048 redef fun n_kwwhile
=(n
)
5053 redef fun n_expr
=(n
)
5058 redef fun n_kwdo
=(n
)
5063 redef fun n_block
=(n
)
5070 redef fun n_label
=(n
)
5078 private init empty_init
do end
5080 init init_awhileexpr
(
5081 n_kwwhile
: nullable TKwwhile ,
5082 n_expr
: nullable AExpr ,
5083 n_kwdo
: nullable TKwdo ,
5084 n_block
: nullable AExpr ,
5085 n_label
: nullable ALabel
5089 _n_kwwhile
= n_kwwhile
.as(not null)
5090 n_kwwhile
.parent
= self
5091 _n_expr
= n_expr
.as(not null)
5092 n_expr
.parent
= self
5093 _n_kwdo
= n_kwdo
.as(not null)
5094 n_kwdo
.parent
= self
5096 if n_block
!= null then
5097 n_block
.parent
= self
5100 if n_label
!= null then
5101 n_label
.parent
= self
5105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5107 if _n_kwwhile
== old_child
then
5108 if new_child
!= null then
5109 new_child
.parent
= self
5110 assert new_child
isa TKwwhile
5111 _n_kwwhile
= new_child
5117 if _n_expr
== old_child
then
5118 if new_child
!= null then
5119 new_child
.parent
= self
5120 assert new_child
isa AExpr
5127 if _n_kwdo
== old_child
then
5128 if new_child
!= null then
5129 new_child
.parent
= self
5130 assert new_child
isa TKwdo
5137 if _n_block
== old_child
then
5138 if new_child
!= null then
5139 new_child
.parent
= self
5140 assert new_child
isa AExpr
5141 _n_block
= new_child
5147 if _n_label
== old_child
then
5148 if new_child
!= null then
5149 new_child
.parent
= self
5150 assert new_child
isa ALabel
5151 _n_label
= new_child
5159 redef fun visit_all
(v
: Visitor)
5161 v
.enter_visit
(_n_kwwhile
)
5162 v
.enter_visit
(_n_expr
)
5163 v
.enter_visit
(_n_kwdo
)
5164 if _n_block
!= null then
5165 v
.enter_visit
(_n_block
.as(not null))
5167 if _n_label
!= null then
5168 v
.enter_visit
(_n_label
.as(not null))
5172 redef fun visit_all_reverse
(v
: Visitor)
5174 v
.enter_visit
(_n_kwwhile
)
5175 v
.enter_visit
(_n_expr
)
5176 v
.enter_visit
(_n_kwdo
)
5177 if _n_block
!= null then
5178 v
.enter_visit
(_n_block
.as(not null))
5180 if _n_label
!= null then
5181 v
.enter_visit
(_n_label
.as(not null))
5185 redef class AForExpr
5186 redef fun n_kwfor
=(n
)
5196 redef fun n_expr
=(n
)
5201 redef fun n_kwdo
=(n
)
5206 redef fun n_block
=(n
)
5213 redef fun n_label
=(n
)
5221 private init empty_init
do end
5223 init init_aforexpr
(
5224 n_kwfor
: nullable TKwfor ,
5225 n_id
: nullable TId ,
5226 n_expr
: nullable AExpr ,
5227 n_kwdo
: nullable TKwdo ,
5228 n_block
: nullable AExpr ,
5229 n_label
: nullable ALabel
5233 _n_kwfor
= n_kwfor
.as(not null)
5234 n_kwfor
.parent
= self
5235 _n_id
= n_id
.as(not null)
5237 _n_expr
= n_expr
.as(not null)
5238 n_expr
.parent
= self
5239 _n_kwdo
= n_kwdo
.as(not null)
5240 n_kwdo
.parent
= self
5242 if n_block
!= null then
5243 n_block
.parent
= self
5246 if n_label
!= null then
5247 n_label
.parent
= self
5251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5253 if _n_kwfor
== old_child
then
5254 if new_child
!= null then
5255 new_child
.parent
= self
5256 assert new_child
isa TKwfor
5257 _n_kwfor
= new_child
5263 if _n_id
== old_child
then
5264 if new_child
!= null then
5265 new_child
.parent
= self
5266 assert new_child
isa TId
5273 if _n_expr
== old_child
then
5274 if new_child
!= null then
5275 new_child
.parent
= self
5276 assert new_child
isa AExpr
5283 if _n_kwdo
== old_child
then
5284 if new_child
!= null then
5285 new_child
.parent
= self
5286 assert new_child
isa TKwdo
5293 if _n_block
== old_child
then
5294 if new_child
!= null then
5295 new_child
.parent
= self
5296 assert new_child
isa AExpr
5297 _n_block
= new_child
5303 if _n_label
== old_child
then
5304 if new_child
!= null then
5305 new_child
.parent
= self
5306 assert new_child
isa ALabel
5307 _n_label
= new_child
5315 redef fun visit_all
(v
: Visitor)
5317 v
.enter_visit
(_n_kwfor
)
5318 v
.enter_visit
(_n_id
)
5319 v
.enter_visit
(_n_expr
)
5320 v
.enter_visit
(_n_kwdo
)
5321 if _n_block
!= null then
5322 v
.enter_visit
(_n_block
.as(not null))
5324 if _n_label
!= null then
5325 v
.enter_visit
(_n_label
.as(not null))
5329 redef fun visit_all_reverse
(v
: Visitor)
5331 v
.enter_visit
(_n_kwfor
)
5332 v
.enter_visit
(_n_id
)
5333 v
.enter_visit
(_n_expr
)
5334 v
.enter_visit
(_n_kwdo
)
5335 if _n_block
!= null then
5336 v
.enter_visit
(_n_block
.as(not null))
5338 if _n_label
!= null then
5339 v
.enter_visit
(_n_label
.as(not null))
5343 redef class AAssertExpr
5344 redef fun n_kwassert
=(n
)
5356 redef fun n_expr
=(n
)
5362 private init empty_init
do end
5364 init init_aassertexpr
(
5365 n_kwassert
: nullable TKwassert ,
5366 n_id
: nullable TId ,
5367 n_expr
: nullable AExpr
5371 _n_kwassert
= n_kwassert
.as(not null)
5372 n_kwassert
.parent
= self
5374 if n_id
!= null then
5377 _n_expr
= n_expr
.as(not null)
5378 n_expr
.parent
= self
5381 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5383 if _n_kwassert
== old_child
then
5384 if new_child
!= null then
5385 new_child
.parent
= self
5386 assert new_child
isa TKwassert
5387 _n_kwassert
= new_child
5393 if _n_id
== old_child
then
5394 if new_child
!= null then
5395 new_child
.parent
= self
5396 assert new_child
isa TId
5403 if _n_expr
== old_child
then
5404 if new_child
!= null then
5405 new_child
.parent
= self
5406 assert new_child
isa AExpr
5415 redef fun visit_all
(v
: Visitor)
5417 v
.enter_visit
(_n_kwassert
)
5418 if _n_id
!= null then
5419 v
.enter_visit
(_n_id
.as(not null))
5421 v
.enter_visit
(_n_expr
)
5424 redef fun visit_all_reverse
(v
: Visitor)
5426 v
.enter_visit
(_n_kwassert
)
5427 if _n_id
!= null then
5428 v
.enter_visit
(_n_id
.as(not null))
5430 v
.enter_visit
(_n_expr
)
5433 redef class AOnceExpr
5434 redef fun n_kwonce
=(n
)
5439 redef fun n_expr
=(n
)
5445 private init empty_init
do end
5447 init init_aonceexpr
(
5448 n_kwonce
: nullable TKwonce ,
5449 n_expr
: nullable AExpr
5453 _n_kwonce
= n_kwonce
.as(not null)
5454 n_kwonce
.parent
= self
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_kwonce
== old_child
then
5462 if new_child
!= null then
5463 new_child
.parent
= self
5464 assert new_child
isa TKwonce
5465 _n_kwonce
= new_child
5471 if _n_expr
== old_child
then
5472 if new_child
!= null then
5473 new_child
.parent
= self
5474 assert new_child
isa AExpr
5483 redef fun visit_all
(v
: Visitor)
5485 v
.enter_visit
(_n_kwonce
)
5486 v
.enter_visit
(_n_expr
)
5489 redef fun visit_all_reverse
(v
: Visitor)
5491 v
.enter_visit
(_n_kwonce
)
5492 v
.enter_visit
(_n_expr
)
5495 redef class ASendExpr
5496 redef fun n_expr
=(n
)
5502 private init empty_init
do end
5504 init init_asendexpr
(
5505 n_expr
: nullable AExpr
5509 _n_expr
= n_expr
.as(not null)
5510 n_expr
.parent
= self
5513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5515 if _n_expr
== old_child
then
5516 if new_child
!= null then
5517 new_child
.parent
= self
5518 assert new_child
isa AExpr
5527 redef fun visit_all
(v
: Visitor)
5529 v
.enter_visit
(_n_expr
)
5532 redef fun visit_all_reverse
(v
: Visitor)
5534 v
.enter_visit
(_n_expr
)
5537 redef class ABinopExpr
5538 redef fun n_expr
=(n
)
5543 redef fun n_expr2
=(n
)
5549 private init empty_init
do end
5551 init init_abinopexpr
(
5552 n_expr
: nullable AExpr ,
5553 n_expr2
: nullable AExpr
5557 _n_expr
= n_expr
.as(not null)
5558 n_expr
.parent
= self
5559 _n_expr2
= n_expr2
.as(not null)
5560 n_expr2
.parent
= self
5563 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5565 if _n_expr
== old_child
then
5566 if new_child
!= null then
5567 new_child
.parent
= self
5568 assert new_child
isa AExpr
5575 if _n_expr2
== old_child
then
5576 if new_child
!= null then
5577 new_child
.parent
= self
5578 assert new_child
isa AExpr
5579 _n_expr2
= new_child
5587 redef fun visit_all
(v
: Visitor)
5589 v
.enter_visit
(_n_expr
)
5590 v
.enter_visit
(_n_expr2
)
5593 redef fun visit_all_reverse
(v
: Visitor)
5595 v
.enter_visit
(_n_expr
)
5596 v
.enter_visit
(_n_expr2
)
5600 redef fun n_expr
=(n
)
5605 redef fun n_expr2
=(n
)
5611 private init empty_init
do end
5614 n_expr
: nullable AExpr ,
5615 n_expr2
: nullable AExpr
5619 _n_expr
= n_expr
.as(not null)
5620 n_expr
.parent
= self
5621 _n_expr2
= n_expr2
.as(not null)
5622 n_expr2
.parent
= self
5625 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5627 if _n_expr
== old_child
then
5628 if new_child
!= null then
5629 new_child
.parent
= self
5630 assert new_child
isa AExpr
5637 if _n_expr2
== old_child
then
5638 if new_child
!= null then
5639 new_child
.parent
= self
5640 assert new_child
isa AExpr
5641 _n_expr2
= new_child
5649 redef fun visit_all
(v
: Visitor)
5651 v
.enter_visit
(_n_expr
)
5652 v
.enter_visit
(_n_expr2
)
5655 redef fun visit_all_reverse
(v
: Visitor)
5657 v
.enter_visit
(_n_expr
)
5658 v
.enter_visit
(_n_expr2
)
5661 redef class AAndExpr
5662 redef fun n_expr
=(n
)
5667 redef fun n_expr2
=(n
)
5673 private init empty_init
do end
5675 init init_aandexpr
(
5676 n_expr
: nullable AExpr ,
5677 n_expr2
: nullable AExpr
5681 _n_expr
= n_expr
.as(not null)
5682 n_expr
.parent
= self
5683 _n_expr2
= n_expr2
.as(not null)
5684 n_expr2
.parent
= self
5687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5689 if _n_expr
== old_child
then
5690 if new_child
!= null then
5691 new_child
.parent
= self
5692 assert new_child
isa AExpr
5699 if _n_expr2
== old_child
then
5700 if new_child
!= null then
5701 new_child
.parent
= self
5702 assert new_child
isa AExpr
5703 _n_expr2
= new_child
5711 redef fun visit_all
(v
: Visitor)
5713 v
.enter_visit
(_n_expr
)
5714 v
.enter_visit
(_n_expr2
)
5717 redef fun visit_all_reverse
(v
: Visitor)
5719 v
.enter_visit
(_n_expr
)
5720 v
.enter_visit
(_n_expr2
)
5723 redef class ANotExpr
5724 redef fun n_kwnot
=(n
)
5729 redef fun n_expr
=(n
)
5735 private init empty_init
do end
5737 init init_anotexpr
(
5738 n_kwnot
: nullable TKwnot ,
5739 n_expr
: nullable AExpr
5743 _n_kwnot
= n_kwnot
.as(not null)
5744 n_kwnot
.parent
= self
5745 _n_expr
= n_expr
.as(not null)
5746 n_expr
.parent
= self
5749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5751 if _n_kwnot
== old_child
then
5752 if new_child
!= null then
5753 new_child
.parent
= self
5754 assert new_child
isa TKwnot
5755 _n_kwnot
= new_child
5761 if _n_expr
== old_child
then
5762 if new_child
!= null then
5763 new_child
.parent
= self
5764 assert new_child
isa AExpr
5773 redef fun visit_all
(v
: Visitor)
5775 v
.enter_visit
(_n_kwnot
)
5776 v
.enter_visit
(_n_expr
)
5779 redef fun visit_all_reverse
(v
: Visitor)
5781 v
.enter_visit
(_n_kwnot
)
5782 v
.enter_visit
(_n_expr
)
5786 redef fun n_expr
=(n
)
5791 redef fun n_expr2
=(n
)
5797 private init empty_init
do end
5800 n_expr
: nullable AExpr ,
5801 n_expr2
: nullable AExpr
5805 _n_expr
= n_expr
.as(not null)
5806 n_expr
.parent
= self
5807 _n_expr2
= n_expr2
.as(not null)
5808 n_expr2
.parent
= self
5811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5813 if _n_expr
== old_child
then
5814 if new_child
!= null then
5815 new_child
.parent
= self
5816 assert new_child
isa AExpr
5823 if _n_expr2
== old_child
then
5824 if new_child
!= null then
5825 new_child
.parent
= self
5826 assert new_child
isa AExpr
5827 _n_expr2
= new_child
5835 redef fun visit_all
(v
: Visitor)
5837 v
.enter_visit
(_n_expr
)
5838 v
.enter_visit
(_n_expr2
)
5841 redef fun visit_all_reverse
(v
: Visitor)
5843 v
.enter_visit
(_n_expr
)
5844 v
.enter_visit
(_n_expr2
)
5848 redef fun n_expr
=(n
)
5853 redef fun n_expr2
=(n
)
5859 private init empty_init
do end
5862 n_expr
: nullable AExpr ,
5863 n_expr2
: nullable AExpr
5867 _n_expr
= n_expr
.as(not null)
5868 n_expr
.parent
= self
5869 _n_expr2
= n_expr2
.as(not null)
5870 n_expr2
.parent
= self
5873 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5875 if _n_expr
== old_child
then
5876 if new_child
!= null then
5877 new_child
.parent
= self
5878 assert new_child
isa AExpr
5885 if _n_expr2
== old_child
then
5886 if new_child
!= null then
5887 new_child
.parent
= self
5888 assert new_child
isa AExpr
5889 _n_expr2
= new_child
5897 redef fun visit_all
(v
: Visitor)
5899 v
.enter_visit
(_n_expr
)
5900 v
.enter_visit
(_n_expr2
)
5903 redef fun visit_all_reverse
(v
: Visitor)
5905 v
.enter_visit
(_n_expr
)
5906 v
.enter_visit
(_n_expr2
)
5910 redef fun n_expr
=(n
)
5915 redef fun n_expr2
=(n
)
5921 private init empty_init
do end
5924 n_expr
: nullable AExpr ,
5925 n_expr2
: nullable AExpr
5929 _n_expr
= n_expr
.as(not null)
5930 n_expr
.parent
= self
5931 _n_expr2
= n_expr2
.as(not null)
5932 n_expr2
.parent
= self
5935 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5937 if _n_expr
== old_child
then
5938 if new_child
!= null then
5939 new_child
.parent
= self
5940 assert new_child
isa AExpr
5947 if _n_expr2
== old_child
then
5948 if new_child
!= null then
5949 new_child
.parent
= self
5950 assert new_child
isa AExpr
5951 _n_expr2
= new_child
5959 redef fun visit_all
(v
: Visitor)
5961 v
.enter_visit
(_n_expr
)
5962 v
.enter_visit
(_n_expr2
)
5965 redef fun visit_all_reverse
(v
: Visitor)
5967 v
.enter_visit
(_n_expr
)
5968 v
.enter_visit
(_n_expr2
)
5972 redef fun n_expr
=(n
)
5977 redef fun n_expr2
=(n
)
5983 private init empty_init
do end
5986 n_expr
: nullable AExpr ,
5987 n_expr2
: nullable AExpr
5991 _n_expr
= n_expr
.as(not null)
5992 n_expr
.parent
= self
5993 _n_expr2
= n_expr2
.as(not null)
5994 n_expr2
.parent
= self
5997 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5999 if _n_expr
== old_child
then
6000 if new_child
!= null then
6001 new_child
.parent
= self
6002 assert new_child
isa AExpr
6009 if _n_expr2
== old_child
then
6010 if new_child
!= null then
6011 new_child
.parent
= self
6012 assert new_child
isa AExpr
6013 _n_expr2
= new_child
6021 redef fun visit_all
(v
: Visitor)
6023 v
.enter_visit
(_n_expr
)
6024 v
.enter_visit
(_n_expr2
)
6027 redef fun visit_all_reverse
(v
: Visitor)
6029 v
.enter_visit
(_n_expr
)
6030 v
.enter_visit
(_n_expr2
)
6034 redef fun n_expr
=(n
)
6039 redef fun n_expr2
=(n
)
6045 private init empty_init
do end
6048 n_expr
: nullable AExpr ,
6049 n_expr2
: nullable AExpr
6053 _n_expr
= n_expr
.as(not null)
6054 n_expr
.parent
= self
6055 _n_expr2
= n_expr2
.as(not null)
6056 n_expr2
.parent
= self
6059 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6061 if _n_expr
== old_child
then
6062 if new_child
!= null then
6063 new_child
.parent
= self
6064 assert new_child
isa AExpr
6071 if _n_expr2
== old_child
then
6072 if new_child
!= null then
6073 new_child
.parent
= self
6074 assert new_child
isa AExpr
6075 _n_expr2
= new_child
6083 redef fun visit_all
(v
: Visitor)
6085 v
.enter_visit
(_n_expr
)
6086 v
.enter_visit
(_n_expr2
)
6089 redef fun visit_all_reverse
(v
: Visitor)
6091 v
.enter_visit
(_n_expr
)
6092 v
.enter_visit
(_n_expr2
)
6096 redef fun n_expr
=(n
)
6101 redef fun n_expr2
=(n
)
6107 private init empty_init
do end
6110 n_expr
: nullable AExpr ,
6111 n_expr2
: nullable AExpr
6115 _n_expr
= n_expr
.as(not null)
6116 n_expr
.parent
= self
6117 _n_expr2
= n_expr2
.as(not null)
6118 n_expr2
.parent
= self
6121 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6123 if _n_expr
== old_child
then
6124 if new_child
!= null then
6125 new_child
.parent
= self
6126 assert new_child
isa AExpr
6133 if _n_expr2
== old_child
then
6134 if new_child
!= null then
6135 new_child
.parent
= self
6136 assert new_child
isa AExpr
6137 _n_expr2
= new_child
6145 redef fun visit_all
(v
: Visitor)
6147 v
.enter_visit
(_n_expr
)
6148 v
.enter_visit
(_n_expr2
)
6151 redef fun visit_all_reverse
(v
: Visitor)
6153 v
.enter_visit
(_n_expr
)
6154 v
.enter_visit
(_n_expr2
)
6158 redef fun n_expr
=(n
)
6163 redef fun n_expr2
=(n
)
6169 private init empty_init
do end
6172 n_expr
: nullable AExpr ,
6173 n_expr2
: nullable AExpr
6177 _n_expr
= n_expr
.as(not null)
6178 n_expr
.parent
= self
6179 _n_expr2
= n_expr2
.as(not null)
6180 n_expr2
.parent
= self
6183 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6185 if _n_expr
== old_child
then
6186 if new_child
!= null then
6187 new_child
.parent
= self
6188 assert new_child
isa AExpr
6195 if _n_expr2
== old_child
then
6196 if new_child
!= null then
6197 new_child
.parent
= self
6198 assert new_child
isa AExpr
6199 _n_expr2
= new_child
6207 redef fun visit_all
(v
: Visitor)
6209 v
.enter_visit
(_n_expr
)
6210 v
.enter_visit
(_n_expr2
)
6213 redef fun visit_all_reverse
(v
: Visitor)
6215 v
.enter_visit
(_n_expr
)
6216 v
.enter_visit
(_n_expr2
)
6219 redef class AIsaExpr
6220 redef fun n_expr
=(n
)
6225 redef fun n_type
=(n
)
6231 private init empty_init
do end
6233 init init_aisaexpr
(
6234 n_expr
: nullable AExpr ,
6235 n_type
: nullable AType
6239 _n_expr
= n_expr
.as(not null)
6240 n_expr
.parent
= self
6241 _n_type
= n_type
.as(not null)
6242 n_type
.parent
= self
6245 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6247 if _n_expr
== old_child
then
6248 if new_child
!= null then
6249 new_child
.parent
= self
6250 assert new_child
isa AExpr
6257 if _n_type
== old_child
then
6258 if new_child
!= null then
6259 new_child
.parent
= self
6260 assert new_child
isa AType
6269 redef fun visit_all
(v
: Visitor)
6271 v
.enter_visit
(_n_expr
)
6272 v
.enter_visit
(_n_type
)
6275 redef fun visit_all_reverse
(v
: Visitor)
6277 v
.enter_visit
(_n_expr
)
6278 v
.enter_visit
(_n_type
)
6281 redef class APlusExpr
6282 redef fun n_expr
=(n
)
6287 redef fun n_expr2
=(n
)
6293 private init empty_init
do end
6295 init init_aplusexpr
(
6296 n_expr
: nullable AExpr ,
6297 n_expr2
: nullable AExpr
6301 _n_expr
= n_expr
.as(not null)
6302 n_expr
.parent
= self
6303 _n_expr2
= n_expr2
.as(not null)
6304 n_expr2
.parent
= self
6307 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6309 if _n_expr
== old_child
then
6310 if new_child
!= null then
6311 new_child
.parent
= self
6312 assert new_child
isa AExpr
6319 if _n_expr2
== old_child
then
6320 if new_child
!= null then
6321 new_child
.parent
= self
6322 assert new_child
isa AExpr
6323 _n_expr2
= new_child
6331 redef fun visit_all
(v
: Visitor)
6333 v
.enter_visit
(_n_expr
)
6334 v
.enter_visit
(_n_expr2
)
6337 redef fun visit_all_reverse
(v
: Visitor)
6339 v
.enter_visit
(_n_expr
)
6340 v
.enter_visit
(_n_expr2
)
6343 redef class AMinusExpr
6344 redef fun n_expr
=(n
)
6349 redef fun n_expr2
=(n
)
6355 private init empty_init
do end
6357 init init_aminusexpr
(
6358 n_expr
: nullable AExpr ,
6359 n_expr2
: nullable AExpr
6363 _n_expr
= n_expr
.as(not null)
6364 n_expr
.parent
= self
6365 _n_expr2
= n_expr2
.as(not null)
6366 n_expr2
.parent
= self
6369 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6371 if _n_expr
== old_child
then
6372 if new_child
!= null then
6373 new_child
.parent
= self
6374 assert new_child
isa AExpr
6381 if _n_expr2
== old_child
then
6382 if new_child
!= null then
6383 new_child
.parent
= self
6384 assert new_child
isa AExpr
6385 _n_expr2
= new_child
6393 redef fun visit_all
(v
: Visitor)
6395 v
.enter_visit
(_n_expr
)
6396 v
.enter_visit
(_n_expr2
)
6399 redef fun visit_all_reverse
(v
: Visitor)
6401 v
.enter_visit
(_n_expr
)
6402 v
.enter_visit
(_n_expr2
)
6405 redef class AStarshipExpr
6406 redef fun n_expr
=(n
)
6411 redef fun n_expr2
=(n
)
6417 private init empty_init
do end
6419 init init_astarshipexpr
(
6420 n_expr
: nullable AExpr ,
6421 n_expr2
: nullable AExpr
6425 _n_expr
= n_expr
.as(not null)
6426 n_expr
.parent
= self
6427 _n_expr2
= n_expr2
.as(not null)
6428 n_expr2
.parent
= self
6431 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6433 if _n_expr
== old_child
then
6434 if new_child
!= null then
6435 new_child
.parent
= self
6436 assert new_child
isa AExpr
6443 if _n_expr2
== old_child
then
6444 if new_child
!= null then
6445 new_child
.parent
= self
6446 assert new_child
isa AExpr
6447 _n_expr2
= new_child
6455 redef fun visit_all
(v
: Visitor)
6457 v
.enter_visit
(_n_expr
)
6458 v
.enter_visit
(_n_expr2
)
6461 redef fun visit_all_reverse
(v
: Visitor)
6463 v
.enter_visit
(_n_expr
)
6464 v
.enter_visit
(_n_expr2
)
6467 redef class AStarExpr
6468 redef fun n_expr
=(n
)
6473 redef fun n_expr2
=(n
)
6479 private init empty_init
do end
6481 init init_astarexpr
(
6482 n_expr
: nullable AExpr ,
6483 n_expr2
: nullable AExpr
6487 _n_expr
= n_expr
.as(not null)
6488 n_expr
.parent
= self
6489 _n_expr2
= n_expr2
.as(not null)
6490 n_expr2
.parent
= self
6493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6495 if _n_expr
== old_child
then
6496 if new_child
!= null then
6497 new_child
.parent
= self
6498 assert new_child
isa AExpr
6505 if _n_expr2
== old_child
then
6506 if new_child
!= null then
6507 new_child
.parent
= self
6508 assert new_child
isa AExpr
6509 _n_expr2
= new_child
6517 redef fun visit_all
(v
: Visitor)
6519 v
.enter_visit
(_n_expr
)
6520 v
.enter_visit
(_n_expr2
)
6523 redef fun visit_all_reverse
(v
: Visitor)
6525 v
.enter_visit
(_n_expr
)
6526 v
.enter_visit
(_n_expr2
)
6529 redef class ASlashExpr
6530 redef fun n_expr
=(n
)
6535 redef fun n_expr2
=(n
)
6541 private init empty_init
do end
6543 init init_aslashexpr
(
6544 n_expr
: nullable AExpr ,
6545 n_expr2
: nullable AExpr
6549 _n_expr
= n_expr
.as(not null)
6550 n_expr
.parent
= self
6551 _n_expr2
= n_expr2
.as(not null)
6552 n_expr2
.parent
= self
6555 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6557 if _n_expr
== old_child
then
6558 if new_child
!= null then
6559 new_child
.parent
= self
6560 assert new_child
isa AExpr
6567 if _n_expr2
== old_child
then
6568 if new_child
!= null then
6569 new_child
.parent
= self
6570 assert new_child
isa AExpr
6571 _n_expr2
= new_child
6579 redef fun visit_all
(v
: Visitor)
6581 v
.enter_visit
(_n_expr
)
6582 v
.enter_visit
(_n_expr2
)
6585 redef fun visit_all_reverse
(v
: Visitor)
6587 v
.enter_visit
(_n_expr
)
6588 v
.enter_visit
(_n_expr2
)
6591 redef class APercentExpr
6592 redef fun n_expr
=(n
)
6597 redef fun n_expr2
=(n
)
6603 private init empty_init
do end
6605 init init_apercentexpr
(
6606 n_expr
: nullable AExpr ,
6607 n_expr2
: nullable AExpr
6611 _n_expr
= n_expr
.as(not null)
6612 n_expr
.parent
= self
6613 _n_expr2
= n_expr2
.as(not null)
6614 n_expr2
.parent
= self
6617 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6619 if _n_expr
== old_child
then
6620 if new_child
!= null then
6621 new_child
.parent
= self
6622 assert new_child
isa AExpr
6629 if _n_expr2
== old_child
then
6630 if new_child
!= null then
6631 new_child
.parent
= self
6632 assert new_child
isa AExpr
6633 _n_expr2
= new_child
6641 redef fun visit_all
(v
: Visitor)
6643 v
.enter_visit
(_n_expr
)
6644 v
.enter_visit
(_n_expr2
)
6647 redef fun visit_all_reverse
(v
: Visitor)
6649 v
.enter_visit
(_n_expr
)
6650 v
.enter_visit
(_n_expr2
)
6653 redef class AUminusExpr
6654 redef fun n_minus
=(n
)
6659 redef fun n_expr
=(n
)
6665 private init empty_init
do end
6667 init init_auminusexpr
(
6668 n_minus
: nullable TMinus ,
6669 n_expr
: nullable AExpr
6673 _n_minus
= n_minus
.as(not null)
6674 n_minus
.parent
= self
6675 _n_expr
= n_expr
.as(not null)
6676 n_expr
.parent
= self
6679 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6681 if _n_minus
== old_child
then
6682 if new_child
!= null then
6683 new_child
.parent
= self
6684 assert new_child
isa TMinus
6685 _n_minus
= new_child
6691 if _n_expr
== old_child
then
6692 if new_child
!= null then
6693 new_child
.parent
= self
6694 assert new_child
isa AExpr
6703 redef fun visit_all
(v
: Visitor)
6705 v
.enter_visit
(_n_minus
)
6706 v
.enter_visit
(_n_expr
)
6709 redef fun visit_all_reverse
(v
: Visitor)
6711 v
.enter_visit
(_n_minus
)
6712 v
.enter_visit
(_n_expr
)
6715 redef class ANewExpr
6716 redef fun n_kwnew
=(n
)
6721 redef fun n_type
=(n
)
6734 private init empty_init
do end
6736 init init_anewexpr
(
6737 n_kwnew
: nullable TKwnew ,
6738 n_type
: nullable AType ,
6739 n_id
: nullable TId ,
6740 n_args
: Collection[Object] # Should be Collection[AExpr]
6744 _n_kwnew
= n_kwnew
.as(not null)
6745 n_kwnew
.parent
= self
6746 _n_type
= n_type
.as(not null)
6747 n_type
.parent
= self
6749 if n_id
!= null then
6759 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6761 if _n_kwnew
== old_child
then
6762 if new_child
!= null then
6763 new_child
.parent
= self
6764 assert new_child
isa TKwnew
6765 _n_kwnew
= new_child
6771 if _n_type
== old_child
then
6772 if new_child
!= null then
6773 new_child
.parent
= self
6774 assert new_child
isa AType
6781 if _n_id
== old_child
then
6782 if new_child
!= null then
6783 new_child
.parent
= self
6784 assert new_child
isa TId
6791 for i
in [0.._n_args
.length
[ do
6792 if _n_args
[i
] == old_child
then
6793 if new_child
!= null then
6794 assert new_child
isa AExpr
6795 _n_args
[i
] = new_child
6796 new_child
.parent
= self
6798 _n_args
.remove_at
(i
)
6805 redef fun visit_all
(v
: Visitor)
6807 v
.enter_visit
(_n_kwnew
)
6808 v
.enter_visit
(_n_type
)
6809 if _n_id
!= null then
6810 v
.enter_visit
(_n_id
.as(not null))
6817 redef fun visit_all_reverse
(v
: Visitor)
6819 v
.enter_visit
(_n_kwnew
)
6820 v
.enter_visit
(_n_type
)
6821 if _n_id
!= null then
6822 v
.enter_visit
(_n_id
.as(not null))
6825 var i
= _n_args
.length
6827 v
.enter_visit
(_n_args
[i
])
6833 redef class AAttrExpr
6834 redef fun n_expr
=(n
)
6845 private init empty_init
do end
6847 init init_aattrexpr
(
6848 n_expr
: nullable AExpr ,
6849 n_id
: nullable TAttrid
6853 _n_expr
= n_expr
.as(not null)
6854 n_expr
.parent
= self
6855 _n_id
= n_id
.as(not null)
6859 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6861 if _n_expr
== old_child
then
6862 if new_child
!= null then
6863 new_child
.parent
= self
6864 assert new_child
isa AExpr
6871 if _n_id
== old_child
then
6872 if new_child
!= null then
6873 new_child
.parent
= self
6874 assert new_child
isa TAttrid
6883 redef fun visit_all
(v
: Visitor)
6885 v
.enter_visit
(_n_expr
)
6886 v
.enter_visit
(_n_id
)
6889 redef fun visit_all_reverse
(v
: Visitor)
6891 v
.enter_visit
(_n_expr
)
6892 v
.enter_visit
(_n_id
)
6895 redef class AAttrAssignExpr
6896 redef fun n_expr
=(n
)
6906 redef fun n_assign
=(n
)
6911 redef fun n_value
=(n
)
6917 private init empty_init
do end
6919 init init_aattrassignexpr
(
6920 n_expr
: nullable AExpr ,
6921 n_id
: nullable TAttrid ,
6922 n_assign
: nullable TAssign ,
6923 n_value
: nullable AExpr
6927 _n_expr
= n_expr
.as(not null)
6928 n_expr
.parent
= self
6929 _n_id
= n_id
.as(not null)
6931 _n_assign
= n_assign
.as(not null)
6932 n_assign
.parent
= self
6933 _n_value
= n_value
.as(not null)
6934 n_value
.parent
= self
6937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6939 if _n_expr
== old_child
then
6940 if new_child
!= null then
6941 new_child
.parent
= self
6942 assert new_child
isa AExpr
6949 if _n_id
== old_child
then
6950 if new_child
!= null then
6951 new_child
.parent
= self
6952 assert new_child
isa TAttrid
6959 if _n_assign
== old_child
then
6960 if new_child
!= null then
6961 new_child
.parent
= self
6962 assert new_child
isa TAssign
6963 _n_assign
= new_child
6969 if _n_value
== old_child
then
6970 if new_child
!= null then
6971 new_child
.parent
= self
6972 assert new_child
isa AExpr
6973 _n_value
= new_child
6981 redef fun visit_all
(v
: Visitor)
6983 v
.enter_visit
(_n_expr
)
6984 v
.enter_visit
(_n_id
)
6985 v
.enter_visit
(_n_assign
)
6986 v
.enter_visit
(_n_value
)
6989 redef fun visit_all_reverse
(v
: Visitor)
6991 v
.enter_visit
(_n_expr
)
6992 v
.enter_visit
(_n_id
)
6993 v
.enter_visit
(_n_assign
)
6994 v
.enter_visit
(_n_value
)
6997 redef class AAttrReassignExpr
6998 redef fun n_expr
=(n
)
7008 redef fun n_assign_op
=(n
)
7013 redef fun n_value
=(n
)
7019 private init empty_init
do end
7021 init init_aattrreassignexpr
(
7022 n_expr
: nullable AExpr ,
7023 n_id
: nullable TAttrid ,
7024 n_assign_op
: nullable AAssignOp ,
7025 n_value
: nullable AExpr
7029 _n_expr
= n_expr
.as(not null)
7030 n_expr
.parent
= self
7031 _n_id
= n_id
.as(not null)
7033 _n_assign_op
= n_assign_op
.as(not null)
7034 n_assign_op
.parent
= self
7035 _n_value
= n_value
.as(not null)
7036 n_value
.parent
= self
7039 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7041 if _n_expr
== old_child
then
7042 if new_child
!= null then
7043 new_child
.parent
= self
7044 assert new_child
isa AExpr
7051 if _n_id
== old_child
then
7052 if new_child
!= null then
7053 new_child
.parent
= self
7054 assert new_child
isa TAttrid
7061 if _n_assign_op
== old_child
then
7062 if new_child
!= null then
7063 new_child
.parent
= self
7064 assert new_child
isa AAssignOp
7065 _n_assign_op
= new_child
7071 if _n_value
== old_child
then
7072 if new_child
!= null then
7073 new_child
.parent
= self
7074 assert new_child
isa AExpr
7075 _n_value
= new_child
7083 redef fun visit_all
(v
: Visitor)
7085 v
.enter_visit
(_n_expr
)
7086 v
.enter_visit
(_n_id
)
7087 v
.enter_visit
(_n_assign_op
)
7088 v
.enter_visit
(_n_value
)
7091 redef fun visit_all_reverse
(v
: Visitor)
7093 v
.enter_visit
(_n_expr
)
7094 v
.enter_visit
(_n_id
)
7095 v
.enter_visit
(_n_assign_op
)
7096 v
.enter_visit
(_n_value
)
7099 redef class ACallExpr
7100 redef fun n_expr
=(n
)
7111 private init empty_init
do end
7113 init init_acallexpr
(
7114 n_expr
: nullable AExpr ,
7115 n_id
: nullable TId ,
7116 n_args
: Collection[Object] , # Should be Collection[AExpr]
7117 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7121 _n_expr
= n_expr
.as(not null)
7122 n_expr
.parent
= self
7123 _n_id
= n_id
.as(not null)
7130 for n
in n_closure_defs
do
7131 assert n
isa AClosureDef
7132 _n_closure_defs
.add
(n
)
7137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7139 if _n_expr
== old_child
then
7140 if new_child
!= null then
7141 new_child
.parent
= self
7142 assert new_child
isa AExpr
7149 if _n_id
== old_child
then
7150 if new_child
!= null then
7151 new_child
.parent
= self
7152 assert new_child
isa TId
7159 for i
in [0.._n_args
.length
[ do
7160 if _n_args
[i
] == old_child
then
7161 if new_child
!= null then
7162 assert new_child
isa AExpr
7163 _n_args
[i
] = new_child
7164 new_child
.parent
= self
7166 _n_args
.remove_at
(i
)
7171 for i
in [0.._n_closure_defs
.length
[ do
7172 if _n_closure_defs
[i
] == old_child
then
7173 if new_child
!= null then
7174 assert new_child
isa AClosureDef
7175 _n_closure_defs
[i
] = new_child
7176 new_child
.parent
= self
7178 _n_closure_defs
.remove_at
(i
)
7185 redef fun visit_all
(v
: Visitor)
7187 v
.enter_visit
(_n_expr
)
7188 v
.enter_visit
(_n_id
)
7192 for n
in _n_closure_defs
do
7197 redef fun visit_all_reverse
(v
: Visitor)
7199 v
.enter_visit
(_n_expr
)
7200 v
.enter_visit
(_n_id
)
7202 var i
= _n_args
.length
7204 v
.enter_visit
(_n_args
[i
])
7209 var i
= _n_closure_defs
.length
7211 v
.enter_visit
(_n_closure_defs
[i
])
7217 redef class ACallAssignExpr
7218 redef fun n_expr
=(n
)
7228 redef fun n_assign
=(n
)
7233 redef fun n_value
=(n
)
7239 private init empty_init
do end
7241 init init_acallassignexpr
(
7242 n_expr
: nullable AExpr ,
7243 n_id
: nullable TId ,
7244 n_args
: Collection[Object] , # Should be Collection[AExpr]
7245 n_assign
: nullable TAssign ,
7246 n_value
: nullable AExpr
7250 _n_expr
= n_expr
.as(not null)
7251 n_expr
.parent
= self
7252 _n_id
= n_id
.as(not null)
7259 _n_assign
= n_assign
.as(not null)
7260 n_assign
.parent
= self
7261 _n_value
= n_value
.as(not null)
7262 n_value
.parent
= self
7265 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7267 if _n_expr
== old_child
then
7268 if new_child
!= null then
7269 new_child
.parent
= self
7270 assert new_child
isa AExpr
7277 if _n_id
== old_child
then
7278 if new_child
!= null then
7279 new_child
.parent
= self
7280 assert new_child
isa TId
7287 for i
in [0.._n_args
.length
[ do
7288 if _n_args
[i
] == old_child
then
7289 if new_child
!= null then
7290 assert new_child
isa AExpr
7291 _n_args
[i
] = new_child
7292 new_child
.parent
= self
7294 _n_args
.remove_at
(i
)
7299 if _n_assign
== old_child
then
7300 if new_child
!= null then
7301 new_child
.parent
= self
7302 assert new_child
isa TAssign
7303 _n_assign
= new_child
7309 if _n_value
== old_child
then
7310 if new_child
!= null then
7311 new_child
.parent
= self
7312 assert new_child
isa AExpr
7313 _n_value
= new_child
7321 redef fun visit_all
(v
: Visitor)
7323 v
.enter_visit
(_n_expr
)
7324 v
.enter_visit
(_n_id
)
7328 v
.enter_visit
(_n_assign
)
7329 v
.enter_visit
(_n_value
)
7332 redef fun visit_all_reverse
(v
: Visitor)
7334 v
.enter_visit
(_n_expr
)
7335 v
.enter_visit
(_n_id
)
7337 var i
= _n_args
.length
7339 v
.enter_visit
(_n_args
[i
])
7343 v
.enter_visit
(_n_assign
)
7344 v
.enter_visit
(_n_value
)
7347 redef class ACallReassignExpr
7348 redef fun n_expr
=(n
)
7358 redef fun n_assign_op
=(n
)
7363 redef fun n_value
=(n
)
7369 private init empty_init
do end
7371 init init_acallreassignexpr
(
7372 n_expr
: nullable AExpr ,
7373 n_id
: nullable TId ,
7374 n_args
: Collection[Object] , # Should be Collection[AExpr]
7375 n_assign_op
: nullable AAssignOp ,
7376 n_value
: nullable AExpr
7380 _n_expr
= n_expr
.as(not null)
7381 n_expr
.parent
= self
7382 _n_id
= n_id
.as(not null)
7389 _n_assign_op
= n_assign_op
.as(not null)
7390 n_assign_op
.parent
= self
7391 _n_value
= n_value
.as(not null)
7392 n_value
.parent
= self
7395 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7397 if _n_expr
== old_child
then
7398 if new_child
!= null then
7399 new_child
.parent
= self
7400 assert new_child
isa AExpr
7407 if _n_id
== old_child
then
7408 if new_child
!= null then
7409 new_child
.parent
= self
7410 assert new_child
isa TId
7417 for i
in [0.._n_args
.length
[ do
7418 if _n_args
[i
] == old_child
then
7419 if new_child
!= null then
7420 assert new_child
isa AExpr
7421 _n_args
[i
] = new_child
7422 new_child
.parent
= self
7424 _n_args
.remove_at
(i
)
7429 if _n_assign_op
== old_child
then
7430 if new_child
!= null then
7431 new_child
.parent
= self
7432 assert new_child
isa AAssignOp
7433 _n_assign_op
= new_child
7439 if _n_value
== old_child
then
7440 if new_child
!= null then
7441 new_child
.parent
= self
7442 assert new_child
isa AExpr
7443 _n_value
= new_child
7451 redef fun visit_all
(v
: Visitor)
7453 v
.enter_visit
(_n_expr
)
7454 v
.enter_visit
(_n_id
)
7458 v
.enter_visit
(_n_assign_op
)
7459 v
.enter_visit
(_n_value
)
7462 redef fun visit_all_reverse
(v
: Visitor)
7464 v
.enter_visit
(_n_expr
)
7465 v
.enter_visit
(_n_id
)
7467 var i
= _n_args
.length
7469 v
.enter_visit
(_n_args
[i
])
7473 v
.enter_visit
(_n_assign_op
)
7474 v
.enter_visit
(_n_value
)
7477 redef class ASuperExpr
7478 redef fun n_qualified
=(n
)
7485 redef fun n_kwsuper
=(n
)
7491 private init empty_init
do end
7493 init init_asuperexpr
(
7494 n_qualified
: nullable AQualified ,
7495 n_kwsuper
: nullable TKwsuper ,
7496 n_args
: Collection[Object] # Should be Collection[AExpr]
7500 _n_qualified
= n_qualified
7501 if n_qualified
!= null then
7502 n_qualified
.parent
= self
7504 _n_kwsuper
= n_kwsuper
.as(not null)
7505 n_kwsuper
.parent
= self
7513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7515 if _n_qualified
== old_child
then
7516 if new_child
!= null then
7517 new_child
.parent
= self
7518 assert new_child
isa AQualified
7519 _n_qualified
= new_child
7525 if _n_kwsuper
== old_child
then
7526 if new_child
!= null then
7527 new_child
.parent
= self
7528 assert new_child
isa TKwsuper
7529 _n_kwsuper
= new_child
7535 for i
in [0.._n_args
.length
[ do
7536 if _n_args
[i
] == old_child
then
7537 if new_child
!= null then
7538 assert new_child
isa AExpr
7539 _n_args
[i
] = new_child
7540 new_child
.parent
= self
7542 _n_args
.remove_at
(i
)
7549 redef fun visit_all
(v
: Visitor)
7551 if _n_qualified
!= null then
7552 v
.enter_visit
(_n_qualified
.as(not null))
7554 v
.enter_visit
(_n_kwsuper
)
7560 redef fun visit_all_reverse
(v
: Visitor)
7562 if _n_qualified
!= null then
7563 v
.enter_visit
(_n_qualified
.as(not null))
7565 v
.enter_visit
(_n_kwsuper
)
7567 var i
= _n_args
.length
7569 v
.enter_visit
(_n_args
[i
])
7575 redef class AInitExpr
7576 redef fun n_expr
=(n
)
7581 redef fun n_kwinit
=(n
)
7587 private init empty_init
do end
7589 init init_ainitexpr
(
7590 n_expr
: nullable AExpr ,
7591 n_kwinit
: nullable TKwinit ,
7592 n_args
: Collection[Object] # Should be Collection[AExpr]
7596 _n_expr
= n_expr
.as(not null)
7597 n_expr
.parent
= self
7598 _n_kwinit
= n_kwinit
.as(not null)
7599 n_kwinit
.parent
= self
7607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7609 if _n_expr
== old_child
then
7610 if new_child
!= null then
7611 new_child
.parent
= self
7612 assert new_child
isa AExpr
7619 if _n_kwinit
== old_child
then
7620 if new_child
!= null then
7621 new_child
.parent
= self
7622 assert new_child
isa TKwinit
7623 _n_kwinit
= new_child
7629 for i
in [0.._n_args
.length
[ do
7630 if _n_args
[i
] == old_child
then
7631 if new_child
!= null then
7632 assert new_child
isa AExpr
7633 _n_args
[i
] = new_child
7634 new_child
.parent
= self
7636 _n_args
.remove_at
(i
)
7643 redef fun visit_all
(v
: Visitor)
7645 v
.enter_visit
(_n_expr
)
7646 v
.enter_visit
(_n_kwinit
)
7652 redef fun visit_all_reverse
(v
: Visitor)
7654 v
.enter_visit
(_n_expr
)
7655 v
.enter_visit
(_n_kwinit
)
7657 var i
= _n_args
.length
7659 v
.enter_visit
(_n_args
[i
])
7665 redef class ABraExpr
7666 redef fun n_expr
=(n
)
7672 private init empty_init
do end
7674 init init_abraexpr
(
7675 n_expr
: nullable AExpr ,
7676 n_args
: Collection[Object] , # Should be Collection[AExpr]
7677 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7681 _n_expr
= n_expr
.as(not null)
7682 n_expr
.parent
= self
7688 for n
in n_closure_defs
do
7689 assert n
isa AClosureDef
7690 _n_closure_defs
.add
(n
)
7695 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7697 if _n_expr
== old_child
then
7698 if new_child
!= null then
7699 new_child
.parent
= self
7700 assert new_child
isa AExpr
7707 for i
in [0.._n_args
.length
[ do
7708 if _n_args
[i
] == old_child
then
7709 if new_child
!= null then
7710 assert new_child
isa AExpr
7711 _n_args
[i
] = new_child
7712 new_child
.parent
= self
7714 _n_args
.remove_at
(i
)
7719 for i
in [0.._n_closure_defs
.length
[ do
7720 if _n_closure_defs
[i
] == old_child
then
7721 if new_child
!= null then
7722 assert new_child
isa AClosureDef
7723 _n_closure_defs
[i
] = new_child
7724 new_child
.parent
= self
7726 _n_closure_defs
.remove_at
(i
)
7733 redef fun visit_all
(v
: Visitor)
7735 v
.enter_visit
(_n_expr
)
7739 for n
in _n_closure_defs
do
7744 redef fun visit_all_reverse
(v
: Visitor)
7746 v
.enter_visit
(_n_expr
)
7748 var i
= _n_args
.length
7750 v
.enter_visit
(_n_args
[i
])
7755 var i
= _n_closure_defs
.length
7757 v
.enter_visit
(_n_closure_defs
[i
])
7763 redef class ABraAssignExpr
7764 redef fun n_expr
=(n
)
7769 redef fun n_assign
=(n
)
7774 redef fun n_value
=(n
)
7780 private init empty_init
do end
7782 init init_abraassignexpr
(
7783 n_expr
: nullable AExpr ,
7784 n_args
: Collection[Object] , # Should be Collection[AExpr]
7785 n_assign
: nullable TAssign ,
7786 n_value
: nullable AExpr
7790 _n_expr
= n_expr
.as(not null)
7791 n_expr
.parent
= self
7797 _n_assign
= n_assign
.as(not null)
7798 n_assign
.parent
= self
7799 _n_value
= n_value
.as(not null)
7800 n_value
.parent
= self
7803 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7805 if _n_expr
== old_child
then
7806 if new_child
!= null then
7807 new_child
.parent
= self
7808 assert new_child
isa AExpr
7815 for i
in [0.._n_args
.length
[ do
7816 if _n_args
[i
] == old_child
then
7817 if new_child
!= null then
7818 assert new_child
isa AExpr
7819 _n_args
[i
] = new_child
7820 new_child
.parent
= self
7822 _n_args
.remove_at
(i
)
7827 if _n_assign
== old_child
then
7828 if new_child
!= null then
7829 new_child
.parent
= self
7830 assert new_child
isa TAssign
7831 _n_assign
= new_child
7837 if _n_value
== old_child
then
7838 if new_child
!= null then
7839 new_child
.parent
= self
7840 assert new_child
isa AExpr
7841 _n_value
= new_child
7849 redef fun visit_all
(v
: Visitor)
7851 v
.enter_visit
(_n_expr
)
7855 v
.enter_visit
(_n_assign
)
7856 v
.enter_visit
(_n_value
)
7859 redef fun visit_all_reverse
(v
: Visitor)
7861 v
.enter_visit
(_n_expr
)
7863 var i
= _n_args
.length
7865 v
.enter_visit
(_n_args
[i
])
7869 v
.enter_visit
(_n_assign
)
7870 v
.enter_visit
(_n_value
)
7873 redef class ABraReassignExpr
7874 redef fun n_expr
=(n
)
7879 redef fun n_assign_op
=(n
)
7884 redef fun n_value
=(n
)
7890 private init empty_init
do end
7892 init init_abrareassignexpr
(
7893 n_expr
: nullable AExpr ,
7894 n_args
: Collection[Object] , # Should be Collection[AExpr]
7895 n_assign_op
: nullable AAssignOp ,
7896 n_value
: nullable AExpr
7900 _n_expr
= n_expr
.as(not null)
7901 n_expr
.parent
= self
7907 _n_assign_op
= n_assign_op
.as(not null)
7908 n_assign_op
.parent
= self
7909 _n_value
= n_value
.as(not null)
7910 n_value
.parent
= self
7913 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7915 if _n_expr
== old_child
then
7916 if new_child
!= null then
7917 new_child
.parent
= self
7918 assert new_child
isa AExpr
7925 for i
in [0.._n_args
.length
[ do
7926 if _n_args
[i
] == old_child
then
7927 if new_child
!= null then
7928 assert new_child
isa AExpr
7929 _n_args
[i
] = new_child
7930 new_child
.parent
= self
7932 _n_args
.remove_at
(i
)
7937 if _n_assign_op
== old_child
then
7938 if new_child
!= null then
7939 new_child
.parent
= self
7940 assert new_child
isa AAssignOp
7941 _n_assign_op
= new_child
7947 if _n_value
== old_child
then
7948 if new_child
!= null then
7949 new_child
.parent
= self
7950 assert new_child
isa AExpr
7951 _n_value
= new_child
7959 redef fun visit_all
(v
: Visitor)
7961 v
.enter_visit
(_n_expr
)
7965 v
.enter_visit
(_n_assign_op
)
7966 v
.enter_visit
(_n_value
)
7969 redef fun visit_all_reverse
(v
: Visitor)
7971 v
.enter_visit
(_n_expr
)
7973 var i
= _n_args
.length
7975 v
.enter_visit
(_n_args
[i
])
7979 v
.enter_visit
(_n_assign_op
)
7980 v
.enter_visit
(_n_value
)
7983 redef class AClosureCallExpr
7990 private init empty_init
do end
7992 init init_aclosurecallexpr
(
7993 n_id
: nullable TId ,
7994 n_args
: Collection[Object] , # Should be Collection[AExpr]
7995 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
7999 _n_id
= n_id
.as(not null)
8006 for n
in n_closure_defs
do
8007 assert n
isa AClosureDef
8008 _n_closure_defs
.add
(n
)
8013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8015 if _n_id
== old_child
then
8016 if new_child
!= null then
8017 new_child
.parent
= self
8018 assert new_child
isa TId
8025 for i
in [0.._n_args
.length
[ do
8026 if _n_args
[i
] == old_child
then
8027 if new_child
!= null then
8028 assert new_child
isa AExpr
8029 _n_args
[i
] = new_child
8030 new_child
.parent
= self
8032 _n_args
.remove_at
(i
)
8037 for i
in [0.._n_closure_defs
.length
[ do
8038 if _n_closure_defs
[i
] == old_child
then
8039 if new_child
!= null then
8040 assert new_child
isa AClosureDef
8041 _n_closure_defs
[i
] = new_child
8042 new_child
.parent
= self
8044 _n_closure_defs
.remove_at
(i
)
8051 redef fun visit_all
(v
: Visitor)
8053 v
.enter_visit
(_n_id
)
8057 for n
in _n_closure_defs
do
8062 redef fun visit_all_reverse
(v
: Visitor)
8064 v
.enter_visit
(_n_id
)
8066 var i
= _n_args
.length
8068 v
.enter_visit
(_n_args
[i
])
8073 var i
= _n_closure_defs
.length
8075 v
.enter_visit
(_n_closure_defs
[i
])
8081 redef class AVarExpr
8088 private init empty_init
do end
8090 init init_avarexpr
(
8095 _n_id
= n_id
.as(not null)
8099 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8101 if _n_id
== old_child
then
8102 if new_child
!= null then
8103 new_child
.parent
= self
8104 assert new_child
isa TId
8113 redef fun visit_all
(v
: Visitor)
8115 v
.enter_visit
(_n_id
)
8118 redef fun visit_all_reverse
(v
: Visitor)
8120 v
.enter_visit
(_n_id
)
8123 redef class AVarAssignExpr
8129 redef fun n_assign
=(n
)
8134 redef fun n_value
=(n
)
8140 private init empty_init
do end
8142 init init_avarassignexpr
(
8143 n_id
: nullable TId ,
8144 n_assign
: nullable TAssign ,
8145 n_value
: nullable AExpr
8149 _n_id
= n_id
.as(not null)
8151 _n_assign
= n_assign
.as(not null)
8152 n_assign
.parent
= self
8153 _n_value
= n_value
.as(not null)
8154 n_value
.parent
= self
8157 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8159 if _n_id
== old_child
then
8160 if new_child
!= null then
8161 new_child
.parent
= self
8162 assert new_child
isa TId
8169 if _n_assign
== old_child
then
8170 if new_child
!= null then
8171 new_child
.parent
= self
8172 assert new_child
isa TAssign
8173 _n_assign
= new_child
8179 if _n_value
== old_child
then
8180 if new_child
!= null then
8181 new_child
.parent
= self
8182 assert new_child
isa AExpr
8183 _n_value
= new_child
8191 redef fun visit_all
(v
: Visitor)
8193 v
.enter_visit
(_n_id
)
8194 v
.enter_visit
(_n_assign
)
8195 v
.enter_visit
(_n_value
)
8198 redef fun visit_all_reverse
(v
: Visitor)
8200 v
.enter_visit
(_n_id
)
8201 v
.enter_visit
(_n_assign
)
8202 v
.enter_visit
(_n_value
)
8205 redef class AVarReassignExpr
8211 redef fun n_assign_op
=(n
)
8216 redef fun n_value
=(n
)
8222 private init empty_init
do end
8224 init init_avarreassignexpr
(
8225 n_id
: nullable TId ,
8226 n_assign_op
: nullable AAssignOp ,
8227 n_value
: nullable AExpr
8231 _n_id
= n_id
.as(not null)
8233 _n_assign_op
= n_assign_op
.as(not null)
8234 n_assign_op
.parent
= self
8235 _n_value
= n_value
.as(not null)
8236 n_value
.parent
= self
8239 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8241 if _n_id
== old_child
then
8242 if new_child
!= null then
8243 new_child
.parent
= self
8244 assert new_child
isa TId
8251 if _n_assign_op
== old_child
then
8252 if new_child
!= null then
8253 new_child
.parent
= self
8254 assert new_child
isa AAssignOp
8255 _n_assign_op
= new_child
8261 if _n_value
== old_child
then
8262 if new_child
!= null then
8263 new_child
.parent
= self
8264 assert new_child
isa AExpr
8265 _n_value
= new_child
8273 redef fun visit_all
(v
: Visitor)
8275 v
.enter_visit
(_n_id
)
8276 v
.enter_visit
(_n_assign_op
)
8277 v
.enter_visit
(_n_value
)
8280 redef fun visit_all_reverse
(v
: Visitor)
8282 v
.enter_visit
(_n_id
)
8283 v
.enter_visit
(_n_assign_op
)
8284 v
.enter_visit
(_n_value
)
8287 redef class ARangeExpr
8288 redef fun n_expr
=(n
)
8293 redef fun n_expr2
=(n
)
8299 private init empty_init
do end
8301 init init_arangeexpr
(
8302 n_expr
: nullable AExpr ,
8303 n_expr2
: nullable AExpr
8307 _n_expr
= n_expr
.as(not null)
8308 n_expr
.parent
= self
8309 _n_expr2
= n_expr2
.as(not null)
8310 n_expr2
.parent
= self
8313 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8315 if _n_expr
== old_child
then
8316 if new_child
!= null then
8317 new_child
.parent
= self
8318 assert new_child
isa AExpr
8325 if _n_expr2
== old_child
then
8326 if new_child
!= null then
8327 new_child
.parent
= self
8328 assert new_child
isa AExpr
8329 _n_expr2
= new_child
8337 redef fun visit_all
(v
: Visitor)
8339 v
.enter_visit
(_n_expr
)
8340 v
.enter_visit
(_n_expr2
)
8343 redef fun visit_all_reverse
(v
: Visitor)
8345 v
.enter_visit
(_n_expr
)
8346 v
.enter_visit
(_n_expr2
)
8349 redef class ACrangeExpr
8350 redef fun n_expr
=(n
)
8355 redef fun n_expr2
=(n
)
8361 private init empty_init
do end
8363 init init_acrangeexpr
(
8364 n_expr
: nullable AExpr ,
8365 n_expr2
: nullable AExpr
8369 _n_expr
= n_expr
.as(not null)
8370 n_expr
.parent
= self
8371 _n_expr2
= n_expr2
.as(not null)
8372 n_expr2
.parent
= self
8375 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8377 if _n_expr
== old_child
then
8378 if new_child
!= null then
8379 new_child
.parent
= self
8380 assert new_child
isa AExpr
8387 if _n_expr2
== old_child
then
8388 if new_child
!= null then
8389 new_child
.parent
= self
8390 assert new_child
isa AExpr
8391 _n_expr2
= new_child
8399 redef fun visit_all
(v
: Visitor)
8401 v
.enter_visit
(_n_expr
)
8402 v
.enter_visit
(_n_expr2
)
8405 redef fun visit_all_reverse
(v
: Visitor)
8407 v
.enter_visit
(_n_expr
)
8408 v
.enter_visit
(_n_expr2
)
8411 redef class AOrangeExpr
8412 redef fun n_expr
=(n
)
8417 redef fun n_expr2
=(n
)
8423 private init empty_init
do end
8425 init init_aorangeexpr
(
8426 n_expr
: nullable AExpr ,
8427 n_expr2
: nullable AExpr
8431 _n_expr
= n_expr
.as(not null)
8432 n_expr
.parent
= self
8433 _n_expr2
= n_expr2
.as(not null)
8434 n_expr2
.parent
= self
8437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8439 if _n_expr
== old_child
then
8440 if new_child
!= null then
8441 new_child
.parent
= self
8442 assert new_child
isa AExpr
8449 if _n_expr2
== old_child
then
8450 if new_child
!= null then
8451 new_child
.parent
= self
8452 assert new_child
isa AExpr
8453 _n_expr2
= new_child
8461 redef fun visit_all
(v
: Visitor)
8463 v
.enter_visit
(_n_expr
)
8464 v
.enter_visit
(_n_expr2
)
8467 redef fun visit_all_reverse
(v
: Visitor)
8469 v
.enter_visit
(_n_expr
)
8470 v
.enter_visit
(_n_expr2
)
8473 redef class AArrayExpr
8475 private init empty_init
do end
8477 init init_aarrayexpr
(
8478 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8489 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8491 for i
in [0.._n_exprs
.length
[ do
8492 if _n_exprs
[i
] == old_child
then
8493 if new_child
!= null then
8494 assert new_child
isa AExpr
8495 _n_exprs
[i
] = new_child
8496 new_child
.parent
= self
8498 _n_exprs
.remove_at
(i
)
8505 redef fun visit_all
(v
: Visitor)
8507 for n
in _n_exprs
do
8512 redef fun visit_all_reverse
(v
: Visitor)
8515 var i
= _n_exprs
.length
8517 v
.enter_visit
(_n_exprs
[i
])
8523 redef class ASelfExpr
8524 redef fun n_kwself
=(n
)
8530 private init empty_init
do end
8532 init init_aselfexpr
(
8533 n_kwself
: nullable TKwself
8537 _n_kwself
= n_kwself
.as(not null)
8538 n_kwself
.parent
= self
8541 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8543 if _n_kwself
== old_child
then
8544 if new_child
!= null then
8545 new_child
.parent
= self
8546 assert new_child
isa TKwself
8547 _n_kwself
= new_child
8555 redef fun visit_all
(v
: Visitor)
8557 v
.enter_visit
(_n_kwself
)
8560 redef fun visit_all_reverse
(v
: Visitor)
8562 v
.enter_visit
(_n_kwself
)
8565 redef class AImplicitSelfExpr
8567 private init empty_init
do end
8569 init init_aimplicitselfexpr
8574 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8578 redef fun visit_all
(v
: Visitor)
8582 redef fun visit_all_reverse
(v
: Visitor)
8586 redef class ATrueExpr
8587 redef fun n_kwtrue
=(n
)
8593 private init empty_init
do end
8595 init init_atrueexpr
(
8596 n_kwtrue
: nullable TKwtrue
8600 _n_kwtrue
= n_kwtrue
.as(not null)
8601 n_kwtrue
.parent
= self
8604 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8606 if _n_kwtrue
== old_child
then
8607 if new_child
!= null then
8608 new_child
.parent
= self
8609 assert new_child
isa TKwtrue
8610 _n_kwtrue
= new_child
8618 redef fun visit_all
(v
: Visitor)
8620 v
.enter_visit
(_n_kwtrue
)
8623 redef fun visit_all_reverse
(v
: Visitor)
8625 v
.enter_visit
(_n_kwtrue
)
8628 redef class AFalseExpr
8629 redef fun n_kwfalse
=(n
)
8635 private init empty_init
do end
8637 init init_afalseexpr
(
8638 n_kwfalse
: nullable TKwfalse
8642 _n_kwfalse
= n_kwfalse
.as(not null)
8643 n_kwfalse
.parent
= self
8646 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8648 if _n_kwfalse
== old_child
then
8649 if new_child
!= null then
8650 new_child
.parent
= self
8651 assert new_child
isa TKwfalse
8652 _n_kwfalse
= new_child
8660 redef fun visit_all
(v
: Visitor)
8662 v
.enter_visit
(_n_kwfalse
)
8665 redef fun visit_all_reverse
(v
: Visitor)
8667 v
.enter_visit
(_n_kwfalse
)
8670 redef class ANullExpr
8671 redef fun n_kwnull
=(n
)
8677 private init empty_init
do end
8679 init init_anullexpr
(
8680 n_kwnull
: nullable TKwnull
8684 _n_kwnull
= n_kwnull
.as(not null)
8685 n_kwnull
.parent
= self
8688 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8690 if _n_kwnull
== old_child
then
8691 if new_child
!= null then
8692 new_child
.parent
= self
8693 assert new_child
isa TKwnull
8694 _n_kwnull
= new_child
8702 redef fun visit_all
(v
: Visitor)
8704 v
.enter_visit
(_n_kwnull
)
8707 redef fun visit_all_reverse
(v
: Visitor)
8709 v
.enter_visit
(_n_kwnull
)
8712 redef class AIntExpr
8713 redef fun n_number
=(n
)
8719 private init empty_init
do end
8721 init init_aintexpr
(
8722 n_number
: nullable TNumber
8726 _n_number
= n_number
.as(not null)
8727 n_number
.parent
= self
8730 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8732 if _n_number
== old_child
then
8733 if new_child
!= null then
8734 new_child
.parent
= self
8735 assert new_child
isa TNumber
8736 _n_number
= new_child
8744 redef fun visit_all
(v
: Visitor)
8746 v
.enter_visit
(_n_number
)
8749 redef fun visit_all_reverse
(v
: Visitor)
8751 v
.enter_visit
(_n_number
)
8754 redef class AFloatExpr
8755 redef fun n_float
=(n
)
8761 private init empty_init
do end
8763 init init_afloatexpr
(
8764 n_float
: nullable TFloat
8768 _n_float
= n_float
.as(not null)
8769 n_float
.parent
= self
8772 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8774 if _n_float
== old_child
then
8775 if new_child
!= null then
8776 new_child
.parent
= self
8777 assert new_child
isa TFloat
8778 _n_float
= new_child
8786 redef fun visit_all
(v
: Visitor)
8788 v
.enter_visit
(_n_float
)
8791 redef fun visit_all_reverse
(v
: Visitor)
8793 v
.enter_visit
(_n_float
)
8796 redef class ACharExpr
8797 redef fun n_char
=(n
)
8803 private init empty_init
do end
8805 init init_acharexpr
(
8806 n_char
: nullable TChar
8810 _n_char
= n_char
.as(not null)
8811 n_char
.parent
= self
8814 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8816 if _n_char
== old_child
then
8817 if new_child
!= null then
8818 new_child
.parent
= self
8819 assert new_child
isa TChar
8828 redef fun visit_all
(v
: Visitor)
8830 v
.enter_visit
(_n_char
)
8833 redef fun visit_all_reverse
(v
: Visitor)
8835 v
.enter_visit
(_n_char
)
8838 redef class AStringExpr
8839 redef fun n_string
=(n
)
8845 private init empty_init
do end
8847 init init_astringexpr
(
8848 n_string
: nullable TString
8852 _n_string
= n_string
.as(not null)
8853 n_string
.parent
= self
8856 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8858 if _n_string
== old_child
then
8859 if new_child
!= null then
8860 new_child
.parent
= self
8861 assert new_child
isa TString
8862 _n_string
= new_child
8870 redef fun visit_all
(v
: Visitor)
8872 v
.enter_visit
(_n_string
)
8875 redef fun visit_all_reverse
(v
: Visitor)
8877 v
.enter_visit
(_n_string
)
8880 redef class AStartStringExpr
8881 redef fun n_string
=(n
)
8887 private init empty_init
do end
8889 init init_astartstringexpr
(
8890 n_string
: nullable TStartString
8894 _n_string
= n_string
.as(not null)
8895 n_string
.parent
= self
8898 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8900 if _n_string
== old_child
then
8901 if new_child
!= null then
8902 new_child
.parent
= self
8903 assert new_child
isa TStartString
8904 _n_string
= new_child
8912 redef fun visit_all
(v
: Visitor)
8914 v
.enter_visit
(_n_string
)
8917 redef fun visit_all_reverse
(v
: Visitor)
8919 v
.enter_visit
(_n_string
)
8922 redef class AMidStringExpr
8923 redef fun n_string
=(n
)
8929 private init empty_init
do end
8931 init init_amidstringexpr
(
8932 n_string
: nullable TMidString
8936 _n_string
= n_string
.as(not null)
8937 n_string
.parent
= self
8940 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8942 if _n_string
== old_child
then
8943 if new_child
!= null then
8944 new_child
.parent
= self
8945 assert new_child
isa TMidString
8946 _n_string
= new_child
8954 redef fun visit_all
(v
: Visitor)
8956 v
.enter_visit
(_n_string
)
8959 redef fun visit_all_reverse
(v
: Visitor)
8961 v
.enter_visit
(_n_string
)
8964 redef class AEndStringExpr
8965 redef fun n_string
=(n
)
8971 private init empty_init
do end
8973 init init_aendstringexpr
(
8974 n_string
: nullable TEndString
8978 _n_string
= n_string
.as(not null)
8979 n_string
.parent
= self
8982 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8984 if _n_string
== old_child
then
8985 if new_child
!= null then
8986 new_child
.parent
= self
8987 assert new_child
isa TEndString
8988 _n_string
= new_child
8996 redef fun visit_all
(v
: Visitor)
8998 v
.enter_visit
(_n_string
)
9001 redef fun visit_all_reverse
(v
: Visitor)
9003 v
.enter_visit
(_n_string
)
9006 redef class ASuperstringExpr
9008 private init empty_init
do end
9010 init init_asuperstringexpr
(
9011 n_exprs
: Collection[Object] # Should be Collection[AExpr]
9022 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9024 for i
in [0.._n_exprs
.length
[ do
9025 if _n_exprs
[i
] == old_child
then
9026 if new_child
!= null then
9027 assert new_child
isa AExpr
9028 _n_exprs
[i
] = new_child
9029 new_child
.parent
= self
9031 _n_exprs
.remove_at
(i
)
9038 redef fun visit_all
(v
: Visitor)
9040 for n
in _n_exprs
do
9045 redef fun visit_all_reverse
(v
: Visitor)
9048 var i
= _n_exprs
.length
9050 v
.enter_visit
(_n_exprs
[i
])
9056 redef class AParExpr
9057 redef fun n_expr
=(n
)
9063 private init empty_init
do end
9065 init init_aparexpr
(
9066 n_expr
: nullable AExpr
9070 _n_expr
= n_expr
.as(not null)
9071 n_expr
.parent
= self
9074 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9076 if _n_expr
== old_child
then
9077 if new_child
!= null then
9078 new_child
.parent
= self
9079 assert new_child
isa AExpr
9088 redef fun visit_all
(v
: Visitor)
9090 v
.enter_visit
(_n_expr
)
9093 redef fun visit_all_reverse
(v
: Visitor)
9095 v
.enter_visit
(_n_expr
)
9098 redef class AAsCastExpr
9099 redef fun n_expr
=(n
)
9104 redef fun n_kwas
=(n
)
9109 redef fun n_type
=(n
)
9115 private init empty_init
do end
9117 init init_aascastexpr
(
9118 n_expr
: nullable AExpr ,
9119 n_kwas
: nullable TKwas ,
9120 n_type
: nullable AType
9124 _n_expr
= n_expr
.as(not null)
9125 n_expr
.parent
= self
9126 _n_kwas
= n_kwas
.as(not null)
9127 n_kwas
.parent
= self
9128 _n_type
= n_type
.as(not null)
9129 n_type
.parent
= self
9132 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9134 if _n_expr
== old_child
then
9135 if new_child
!= null then
9136 new_child
.parent
= self
9137 assert new_child
isa AExpr
9144 if _n_kwas
== old_child
then
9145 if new_child
!= null then
9146 new_child
.parent
= self
9147 assert new_child
isa TKwas
9154 if _n_type
== old_child
then
9155 if new_child
!= null then
9156 new_child
.parent
= self
9157 assert new_child
isa AType
9166 redef fun visit_all
(v
: Visitor)
9168 v
.enter_visit
(_n_expr
)
9169 v
.enter_visit
(_n_kwas
)
9170 v
.enter_visit
(_n_type
)
9173 redef fun visit_all_reverse
(v
: Visitor)
9175 v
.enter_visit
(_n_expr
)
9176 v
.enter_visit
(_n_kwas
)
9177 v
.enter_visit
(_n_type
)
9180 redef class AAsNotnullExpr
9181 redef fun n_expr
=(n
)
9186 redef fun n_kwas
=(n
)
9191 redef fun n_kwnot
=(n
)
9196 redef fun n_kwnull
=(n
)
9202 private init empty_init
do end
9204 init init_aasnotnullexpr
(
9205 n_expr
: nullable AExpr ,
9206 n_kwas
: nullable TKwas ,
9207 n_kwnot
: nullable TKwnot ,
9208 n_kwnull
: nullable TKwnull
9212 _n_expr
= n_expr
.as(not null)
9213 n_expr
.parent
= self
9214 _n_kwas
= n_kwas
.as(not null)
9215 n_kwas
.parent
= self
9216 _n_kwnot
= n_kwnot
.as(not null)
9217 n_kwnot
.parent
= self
9218 _n_kwnull
= n_kwnull
.as(not null)
9219 n_kwnull
.parent
= self
9222 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9224 if _n_expr
== old_child
then
9225 if new_child
!= null then
9226 new_child
.parent
= self
9227 assert new_child
isa AExpr
9234 if _n_kwas
== old_child
then
9235 if new_child
!= null then
9236 new_child
.parent
= self
9237 assert new_child
isa TKwas
9244 if _n_kwnot
== old_child
then
9245 if new_child
!= null then
9246 new_child
.parent
= self
9247 assert new_child
isa TKwnot
9248 _n_kwnot
= new_child
9254 if _n_kwnull
== old_child
then
9255 if new_child
!= null then
9256 new_child
.parent
= self
9257 assert new_child
isa TKwnull
9258 _n_kwnull
= new_child
9266 redef fun visit_all
(v
: Visitor)
9268 v
.enter_visit
(_n_expr
)
9269 v
.enter_visit
(_n_kwas
)
9270 v
.enter_visit
(_n_kwnot
)
9271 v
.enter_visit
(_n_kwnull
)
9274 redef fun visit_all_reverse
(v
: Visitor)
9276 v
.enter_visit
(_n_expr
)
9277 v
.enter_visit
(_n_kwas
)
9278 v
.enter_visit
(_n_kwnot
)
9279 v
.enter_visit
(_n_kwnull
)
9282 redef class AIssetAttrExpr
9283 redef fun n_kwisset
=(n
)
9288 redef fun n_expr
=(n
)
9299 private init empty_init
do end
9301 init init_aissetattrexpr
(
9302 n_kwisset
: nullable TKwisset ,
9303 n_expr
: nullable AExpr ,
9304 n_id
: nullable TAttrid
9308 _n_kwisset
= n_kwisset
.as(not null)
9309 n_kwisset
.parent
= self
9310 _n_expr
= n_expr
.as(not null)
9311 n_expr
.parent
= self
9312 _n_id
= n_id
.as(not null)
9316 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9318 if _n_kwisset
== old_child
then
9319 if new_child
!= null then
9320 new_child
.parent
= self
9321 assert new_child
isa TKwisset
9322 _n_kwisset
= new_child
9328 if _n_expr
== old_child
then
9329 if new_child
!= null then
9330 new_child
.parent
= self
9331 assert new_child
isa AExpr
9338 if _n_id
== old_child
then
9339 if new_child
!= null then
9340 new_child
.parent
= self
9341 assert new_child
isa TAttrid
9350 redef fun visit_all
(v
: Visitor)
9352 v
.enter_visit
(_n_kwisset
)
9353 v
.enter_visit
(_n_expr
)
9354 v
.enter_visit
(_n_id
)
9357 redef fun visit_all_reverse
(v
: Visitor)
9359 v
.enter_visit
(_n_kwisset
)
9360 v
.enter_visit
(_n_expr
)
9361 v
.enter_visit
(_n_id
)
9364 redef class APlusAssignOp
9365 redef fun n_pluseq
=(n
)
9371 private init empty_init
do end
9373 init init_aplusassignop
(
9374 n_pluseq
: nullable TPluseq
9378 _n_pluseq
= n_pluseq
.as(not null)
9379 n_pluseq
.parent
= self
9382 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9384 if _n_pluseq
== old_child
then
9385 if new_child
!= null then
9386 new_child
.parent
= self
9387 assert new_child
isa TPluseq
9388 _n_pluseq
= new_child
9396 redef fun visit_all
(v
: Visitor)
9398 v
.enter_visit
(_n_pluseq
)
9401 redef fun visit_all_reverse
(v
: Visitor)
9403 v
.enter_visit
(_n_pluseq
)
9406 redef class AMinusAssignOp
9407 redef fun n_minuseq
=(n
)
9413 private init empty_init
do end
9415 init init_aminusassignop
(
9416 n_minuseq
: nullable TMinuseq
9420 _n_minuseq
= n_minuseq
.as(not null)
9421 n_minuseq
.parent
= self
9424 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9426 if _n_minuseq
== old_child
then
9427 if new_child
!= null then
9428 new_child
.parent
= self
9429 assert new_child
isa TMinuseq
9430 _n_minuseq
= new_child
9438 redef fun visit_all
(v
: Visitor)
9440 v
.enter_visit
(_n_minuseq
)
9443 redef fun visit_all_reverse
(v
: Visitor)
9445 v
.enter_visit
(_n_minuseq
)
9448 redef class AClosureDef
9449 redef fun n_kwwith
=(n
)
9454 redef fun n_kwdo
=(n
)
9459 redef fun n_expr
=(n
)
9466 redef fun n_label
=(n
)
9474 private init empty_init
do end
9476 init init_aclosuredef
(
9477 n_kwwith
: nullable TKwwith ,
9478 n_id
: Collection[Object] , # Should be Collection[TId]
9479 n_kwdo
: nullable TKwdo ,
9480 n_expr
: nullable AExpr ,
9481 n_label
: nullable ALabel
9485 _n_kwwith
= n_kwwith
.as(not null)
9486 n_kwwith
.parent
= self
9492 _n_kwdo
= n_kwdo
.as(not null)
9493 n_kwdo
.parent
= self
9495 if n_expr
!= null then
9496 n_expr
.parent
= self
9499 if n_label
!= null then
9500 n_label
.parent
= self
9504 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9506 if _n_kwwith
== old_child
then
9507 if new_child
!= null then
9508 new_child
.parent
= self
9509 assert new_child
isa TKwwith
9510 _n_kwwith
= new_child
9516 for i
in [0.._n_id
.length
[ do
9517 if _n_id
[i
] == old_child
then
9518 if new_child
!= null then
9519 assert new_child
isa TId
9520 _n_id
[i
] = new_child
9521 new_child
.parent
= self
9528 if _n_kwdo
== old_child
then
9529 if new_child
!= null then
9530 new_child
.parent
= self
9531 assert new_child
isa TKwdo
9538 if _n_expr
== old_child
then
9539 if new_child
!= null then
9540 new_child
.parent
= self
9541 assert new_child
isa AExpr
9548 if _n_label
== old_child
then
9549 if new_child
!= null then
9550 new_child
.parent
= self
9551 assert new_child
isa ALabel
9552 _n_label
= new_child
9560 redef fun visit_all
(v
: Visitor)
9562 v
.enter_visit
(_n_kwwith
)
9566 v
.enter_visit
(_n_kwdo
)
9567 if _n_expr
!= null then
9568 v
.enter_visit
(_n_expr
.as(not null))
9570 if _n_label
!= null then
9571 v
.enter_visit
(_n_label
.as(not null))
9575 redef fun visit_all_reverse
(v
: Visitor)
9577 v
.enter_visit
(_n_kwwith
)
9579 var i
= _n_id
.length
9581 v
.enter_visit
(_n_id
[i
])
9585 v
.enter_visit
(_n_kwdo
)
9586 if _n_expr
!= null then
9587 v
.enter_visit
(_n_expr
.as(not null))
9589 if _n_label
!= null then
9590 v
.enter_visit
(_n_label
.as(not null))
9594 redef class AQualified
9595 redef fun n_classid
=(n
)
9603 private init empty_init
do end
9605 init init_aqualified
(
9606 n_id
: Collection[Object] , # Should be Collection[TId]
9607 n_classid
: nullable TClassid
9616 _n_classid
= n_classid
9617 if n_classid
!= null then
9618 n_classid
.parent
= self
9622 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9624 for i
in [0.._n_id
.length
[ do
9625 if _n_id
[i
] == old_child
then
9626 if new_child
!= null then
9627 assert new_child
isa TId
9628 _n_id
[i
] = new_child
9629 new_child
.parent
= self
9636 if _n_classid
== old_child
then
9637 if new_child
!= null then
9638 new_child
.parent
= self
9639 assert new_child
isa TClassid
9640 _n_classid
= new_child
9648 redef fun visit_all
(v
: Visitor)
9653 if _n_classid
!= null then
9654 v
.enter_visit
(_n_classid
.as(not null))
9658 redef fun visit_all_reverse
(v
: Visitor)
9661 var i
= _n_id
.length
9663 v
.enter_visit
(_n_id
[i
])
9667 if _n_classid
!= null then
9668 v
.enter_visit
(_n_classid
.as(not null))
9674 private init empty_init
do end
9677 n_comment
: Collection[Object] # Should be Collection[TComment]
9681 for n
in n_comment
do
9682 assert n
isa TComment
9688 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9690 for i
in [0.._n_comment
.length
[ do
9691 if _n_comment
[i
] == old_child
then
9692 if new_child
!= null then
9693 assert new_child
isa TComment
9694 _n_comment
[i
] = new_child
9695 new_child
.parent
= self
9697 _n_comment
.remove_at
(i
)
9704 redef fun visit_all
(v
: Visitor)
9706 for n
in _n_comment
do
9711 redef fun visit_all_reverse
(v
: Visitor)
9714 var i
= _n_comment
.length
9716 v
.enter_visit
(_n_comment
[i
])
9725 n_base
: nullable AModule,
9732 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9734 if _n_base
== old_child
then
9735 if new_child
== null then
9737 new_child
.parent
= self
9738 assert new_child
isa AModule
9741 old_child
.parent
= null
9746 redef fun visit_all
(v
: Visitor)
9748 if _n_base
!= null then
9749 v
.enter_visit
(_n_base
.as(not null))
9753 redef fun visit_all_reverse
(v
: Visitor)
9755 if _n_base
!= null then
9756 v
.enter_visit
(_n_base
.as(not null))