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 PNode
12 # Remove a child from the AST
13 fun remove_child
(child
: PNode)
15 replace_child
(child
, null)
18 # Replace a child with an other node in the AST
19 fun replace_child
(old_child
: PNode, new_child
: nullable PNode) is abstract
21 # Replace itself with an other node in the AST
22 fun replace_with
(node
: PNode)
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
: PNode, new_child
: nullable PNode) 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
: PNode)
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 PNode) 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 PNode)
82 var old
= _current_node
88 # The current visited node
89 readable var _current_node
: nullable PNode = null
93 redef fun n_packagedecl
=(n
)
101 private init empty_init
do end
104 n_packagedecl
: nullable PPackagedecl ,
105 n_imports
: Collection[Object] , # Should be Collection[PImport]
106 n_classdefs
: Collection[Object] # Should be Collection[PClassdef]
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 PClassdef
126 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
128 if _n_packagedecl
== old_child
then
129 if new_child
!= null then
130 new_child
.parent
= self
131 assert new_child
isa PPackagedecl
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 PImport
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 PClassdef
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 PDoc ,
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
: PNode, new_child
: nullable PNode)
238 if _n_doc
== old_child
then
239 if new_child
!= null then
240 new_child
.parent
= self
241 assert new_child
isa PDoc
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 PVisibility ,
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
: PNode, new_child
: nullable PNode)
324 if _n_visibility
== old_child
then
325 if new_child
!= null then
326 new_child
.parent
= self
327 assert new_child
isa PVisibility
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 PVisibility ,
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
: PNode, new_child
: nullable PNode)
406 if _n_visibility
== old_child
then
407 if new_child
!= null then
408 new_child
.parent
= self
409 assert new_child
isa PVisibility
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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 PDoc ,
636 n_kwredef
: nullable TKwredef ,
637 n_visibility
: nullable PVisibility ,
638 n_classkind
: nullable PClasskind ,
639 n_id
: nullable TClassid ,
640 n_formaldefs
: Collection[Object] , # Should be Collection[PFormaldef]
641 n_superclasses
: Collection[Object] , # Should be Collection[PSuperclass]
642 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
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 PFormaldef
667 for n
in n_superclasses
do
668 assert n
isa PSuperclass
669 _n_superclasses
.add
(n
)
672 for n
in n_propdefs
do
673 assert n
isa PPropdef
679 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
681 if _n_doc
== old_child
then
682 if new_child
!= null then
683 new_child
.parent
= self
684 assert new_child
isa PDoc
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 PVisibility
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 PClasskind
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 PFormaldef
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 PSuperclass
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 PPropdef
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[PPropdef]
838 for n
in n_propdefs
do
839 assert n
isa PPropdef
845 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
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 PPropdef
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[PPropdef]
888 for n
in n_propdefs
do
889 assert n
isa PPropdef
895 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
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 PPropdef
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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 PType
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
: PNode, new_child
: nullable PNode)
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 PType
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 PType
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
: PNode, new_child
: nullable PNode)
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 PType
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 PDoc ,
1321 n_readable
: nullable PAble ,
1322 n_writable
: nullable PAble ,
1323 n_kwredef
: nullable TKwredef ,
1324 n_visibility
: nullable PVisibility ,
1325 n_kwattr
: nullable TKwattr ,
1326 n_kwvar
: nullable TKwvar ,
1327 n_id
: nullable TAttrid ,
1328 n_type
: nullable PType ,
1329 n_expr
: nullable PExpr
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
: PNode, new_child
: nullable PNode)
1373 if _n_doc
== old_child
then
1374 if new_child
!= null then
1375 new_child
.parent
= self
1376 assert new_child
isa PDoc
1383 if _n_readable
== old_child
then
1384 if new_child
!= null then
1385 new_child
.parent
= self
1386 assert new_child
isa PAble
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 PAble
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 PVisibility
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 PType
1463 if _n_expr
== old_child
then
1464 if new_child
!= null then
1465 new_child
.parent
= self
1466 assert new_child
isa PExpr
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 PDoc ,
1570 n_kwredef
: nullable TKwredef ,
1571 n_visibility
: nullable PVisibility ,
1572 n_methid
: nullable PMethid ,
1573 n_signature
: nullable PSignature
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
: PNode, new_child
: nullable PNode)
1595 if _n_doc
== old_child
then
1596 if new_child
!= null then
1597 new_child
.parent
= self
1598 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PDoc ,
1713 n_kwredef
: nullable TKwredef ,
1714 n_visibility
: nullable PVisibility ,
1715 n_kwmeth
: nullable TKwmeth ,
1716 n_methid
: nullable PMethid ,
1717 n_signature
: nullable PSignature
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
: PNode, new_child
: nullable PNode)
1741 if _n_doc
== old_child
then
1742 if new_child
!= null then
1743 new_child
.parent
= self
1744 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PDoc ,
1871 n_kwredef
: nullable TKwredef ,
1872 n_visibility
: nullable PVisibility ,
1873 n_kwmeth
: nullable TKwmeth ,
1874 n_methid
: nullable PMethid ,
1875 n_signature
: nullable PSignature
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
: PNode, new_child
: nullable PNode)
1899 if _n_doc
== old_child
then
1900 if new_child
!= null then
1901 new_child
.parent
= self
1902 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PDoc ,
2036 n_kwredef
: nullable TKwredef ,
2037 n_visibility
: nullable PVisibility ,
2038 n_kwmeth
: nullable TKwmeth ,
2039 n_methid
: nullable PMethid ,
2040 n_signature
: nullable PSignature ,
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
: PNode, new_child
: nullable PNode)
2069 if _n_doc
== old_child
then
2070 if new_child
!= null then
2071 new_child
.parent
= self
2072 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PDoc ,
2222 n_kwredef
: nullable TKwredef ,
2223 n_visibility
: nullable PVisibility ,
2224 n_kwmeth
: nullable TKwmeth ,
2225 n_methid
: nullable PMethid ,
2226 n_signature
: nullable PSignature ,
2227 n_block
: nullable PExpr
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
: PNode, new_child
: nullable PNode)
2255 if _n_doc
== old_child
then
2256 if new_child
!= null then
2257 new_child
.parent
= self
2258 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PExpr
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 PDoc ,
2410 n_kwredef
: nullable TKwredef ,
2411 n_visibility
: nullable PVisibility ,
2412 n_kwinit
: nullable TKwinit ,
2413 n_methid
: nullable PMethid ,
2414 n_signature
: nullable PSignature ,
2415 n_block
: nullable PExpr
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
: PNode, new_child
: nullable PNode)
2445 if _n_doc
== old_child
then
2446 if new_child
!= null then
2447 new_child
.parent
= self
2448 assert new_child
isa PDoc
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 PVisibility
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 PMethid
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 PSignature
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 PExpr
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 PExpr
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
: PNode, new_child
: nullable PNode)
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 PExpr
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 PDoc ,
2673 n_kwredef
: nullable TKwredef ,
2674 n_visibility
: nullable PVisibility ,
2675 n_kwtype
: nullable TKwtype ,
2676 n_id
: nullable TClassid ,
2677 n_type
: nullable PType
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
: PNode, new_child
: nullable PNode)
2701 if _n_doc
== old_child
then
2702 if new_child
!= null then
2703 new_child
.parent
= self
2704 assert new_child
isa PDoc
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 PVisibility
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 PType
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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
: PNode, new_child
: nullable PNode)
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[PParam]
3696 n_type
: nullable PType ,
3697 n_closure_decls
: Collection[Object] # Should be Collection[PClosureDecl]
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 PClosureDecl
3712 _n_closure_decls
.add
(n
)
3717 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
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 PParam
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 PType
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 PClosureDecl
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 PType ,
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
: PNode, new_child
: nullable PNode)
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 PType
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 PSignature ,
3925 n_expr
: nullable PExpr
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
: PNode, new_child
: nullable PNode)
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 PSignature
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 PExpr
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[PType]
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
: PNode, new_child
: nullable PNode)
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 PType
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
])
4123 redef class ABlockExpr
4125 private init empty_init
do end
4127 init init_ablockexpr
(
4128 n_expr
: Collection[Object] # Should be Collection[PExpr]
4139 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4141 for i
in [0.._n_expr
.length
[ do
4142 if _n_expr
[i
] == old_child
then
4143 if new_child
!= null then
4144 assert new_child
isa PExpr
4145 _n_expr
[i
] = new_child
4146 new_child
.parent
= self
4148 _n_expr
.remove_at
(i
)
4155 redef fun visit_all
(v
: Visitor)
4162 redef fun visit_all_reverse
(v
: Visitor)
4165 var i
= _n_expr
.length
4167 v
.enter_visit
(_n_expr
[i
])
4173 redef class AVardeclExpr
4174 redef fun n_kwvar
=(n
)
4184 redef fun n_type
=(n
)
4191 redef fun n_assign
=(n
)
4198 redef fun n_expr
=(n
)
4206 private init empty_init
do end
4208 init init_avardeclexpr
(
4209 n_kwvar
: nullable TKwvar ,
4210 n_id
: nullable TId ,
4211 n_type
: nullable PType ,
4212 n_assign
: nullable TAssign ,
4213 n_expr
: nullable PExpr
4217 _n_kwvar
= n_kwvar
.as(not null)
4218 n_kwvar
.parent
= self
4219 _n_id
= n_id
.as(not null)
4222 if n_type
!= null then
4223 n_type
.parent
= self
4225 _n_assign
= n_assign
4226 if n_assign
!= null then
4227 n_assign
.parent
= self
4230 if n_expr
!= null then
4231 n_expr
.parent
= self
4235 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4237 if _n_kwvar
== old_child
then
4238 if new_child
!= null then
4239 new_child
.parent
= self
4240 assert new_child
isa TKwvar
4241 _n_kwvar
= new_child
4247 if _n_id
== old_child
then
4248 if new_child
!= null then
4249 new_child
.parent
= self
4250 assert new_child
isa TId
4257 if _n_type
== old_child
then
4258 if new_child
!= null then
4259 new_child
.parent
= self
4260 assert new_child
isa PType
4267 if _n_assign
== old_child
then
4268 if new_child
!= null then
4269 new_child
.parent
= self
4270 assert new_child
isa TAssign
4271 _n_assign
= new_child
4277 if _n_expr
== old_child
then
4278 if new_child
!= null then
4279 new_child
.parent
= self
4280 assert new_child
isa PExpr
4289 redef fun visit_all
(v
: Visitor)
4291 v
.enter_visit
(_n_kwvar
)
4292 v
.enter_visit
(_n_id
)
4293 if _n_type
!= null then
4294 v
.enter_visit
(_n_type
.as(not null))
4296 if _n_assign
!= null then
4297 v
.enter_visit
(_n_assign
.as(not null))
4299 if _n_expr
!= null then
4300 v
.enter_visit
(_n_expr
.as(not null))
4304 redef fun visit_all_reverse
(v
: Visitor)
4306 v
.enter_visit
(_n_kwvar
)
4307 v
.enter_visit
(_n_id
)
4308 if _n_type
!= null then
4309 v
.enter_visit
(_n_type
.as(not null))
4311 if _n_assign
!= null then
4312 v
.enter_visit
(_n_assign
.as(not null))
4314 if _n_expr
!= null then
4315 v
.enter_visit
(_n_expr
.as(not null))
4319 redef class AReturnExpr
4320 redef fun n_kwreturn
=(n
)
4325 redef fun n_expr
=(n
)
4333 private init empty_init
do end
4335 init init_areturnexpr
(
4336 n_kwreturn
: nullable TKwreturn ,
4337 n_expr
: nullable PExpr
4341 _n_kwreturn
= n_kwreturn
.as(not null)
4342 n_kwreturn
.parent
= self
4344 if n_expr
!= null then
4345 n_expr
.parent
= self
4349 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4351 if _n_kwreturn
== old_child
then
4352 if new_child
!= null then
4353 new_child
.parent
= self
4354 assert new_child
isa TKwreturn
4355 _n_kwreturn
= new_child
4361 if _n_expr
== old_child
then
4362 if new_child
!= null then
4363 new_child
.parent
= self
4364 assert new_child
isa PExpr
4373 redef fun visit_all
(v
: Visitor)
4375 v
.enter_visit
(_n_kwreturn
)
4376 if _n_expr
!= null then
4377 v
.enter_visit
(_n_expr
.as(not null))
4381 redef fun visit_all_reverse
(v
: Visitor)
4383 v
.enter_visit
(_n_kwreturn
)
4384 if _n_expr
!= null then
4385 v
.enter_visit
(_n_expr
.as(not null))
4389 redef class ABreakExpr
4390 redef fun n_kwbreak
=(n
)
4395 redef fun n_expr
=(n
)
4403 private init empty_init
do end
4405 init init_abreakexpr
(
4406 n_kwbreak
: nullable TKwbreak ,
4407 n_expr
: nullable PExpr
4411 _n_kwbreak
= n_kwbreak
.as(not null)
4412 n_kwbreak
.parent
= self
4414 if n_expr
!= null then
4415 n_expr
.parent
= self
4419 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4421 if _n_kwbreak
== old_child
then
4422 if new_child
!= null then
4423 new_child
.parent
= self
4424 assert new_child
isa TKwbreak
4425 _n_kwbreak
= new_child
4431 if _n_expr
== old_child
then
4432 if new_child
!= null then
4433 new_child
.parent
= self
4434 assert new_child
isa PExpr
4443 redef fun visit_all
(v
: Visitor)
4445 v
.enter_visit
(_n_kwbreak
)
4446 if _n_expr
!= null then
4447 v
.enter_visit
(_n_expr
.as(not null))
4451 redef fun visit_all_reverse
(v
: Visitor)
4453 v
.enter_visit
(_n_kwbreak
)
4454 if _n_expr
!= null then
4455 v
.enter_visit
(_n_expr
.as(not null))
4459 redef class AAbortExpr
4460 redef fun n_kwabort
=(n
)
4466 private init empty_init
do end
4468 init init_aabortexpr
(
4469 n_kwabort
: nullable TKwabort
4473 _n_kwabort
= n_kwabort
.as(not null)
4474 n_kwabort
.parent
= self
4477 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4479 if _n_kwabort
== old_child
then
4480 if new_child
!= null then
4481 new_child
.parent
= self
4482 assert new_child
isa TKwabort
4483 _n_kwabort
= new_child
4491 redef fun visit_all
(v
: Visitor)
4493 v
.enter_visit
(_n_kwabort
)
4496 redef fun visit_all_reverse
(v
: Visitor)
4498 v
.enter_visit
(_n_kwabort
)
4501 redef class AContinueExpr
4502 redef fun n_kwcontinue
=(n
)
4507 redef fun n_expr
=(n
)
4515 private init empty_init
do end
4517 init init_acontinueexpr
(
4518 n_kwcontinue
: nullable TKwcontinue ,
4519 n_expr
: nullable PExpr
4523 _n_kwcontinue
= n_kwcontinue
.as(not null)
4524 n_kwcontinue
.parent
= self
4526 if n_expr
!= null then
4527 n_expr
.parent
= self
4531 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4533 if _n_kwcontinue
== old_child
then
4534 if new_child
!= null then
4535 new_child
.parent
= self
4536 assert new_child
isa TKwcontinue
4537 _n_kwcontinue
= new_child
4543 if _n_expr
== old_child
then
4544 if new_child
!= null then
4545 new_child
.parent
= self
4546 assert new_child
isa PExpr
4555 redef fun visit_all
(v
: Visitor)
4557 v
.enter_visit
(_n_kwcontinue
)
4558 if _n_expr
!= null then
4559 v
.enter_visit
(_n_expr
.as(not null))
4563 redef fun visit_all_reverse
(v
: Visitor)
4565 v
.enter_visit
(_n_kwcontinue
)
4566 if _n_expr
!= null then
4567 v
.enter_visit
(_n_expr
.as(not null))
4572 redef fun n_kwdo
=(n
)
4577 redef fun n_block
=(n
)
4585 private init empty_init
do end
4588 n_kwdo
: nullable TKwdo ,
4589 n_block
: nullable PExpr
4593 _n_kwdo
= n_kwdo
.as(not null)
4594 n_kwdo
.parent
= self
4596 if n_block
!= null then
4597 n_block
.parent
= self
4601 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4603 if _n_kwdo
== old_child
then
4604 if new_child
!= null then
4605 new_child
.parent
= self
4606 assert new_child
isa TKwdo
4613 if _n_block
== old_child
then
4614 if new_child
!= null then
4615 new_child
.parent
= self
4616 assert new_child
isa PExpr
4617 _n_block
= new_child
4625 redef fun visit_all
(v
: Visitor)
4627 v
.enter_visit
(_n_kwdo
)
4628 if _n_block
!= null then
4629 v
.enter_visit
(_n_block
.as(not null))
4633 redef fun visit_all_reverse
(v
: Visitor)
4635 v
.enter_visit
(_n_kwdo
)
4636 if _n_block
!= null then
4637 v
.enter_visit
(_n_block
.as(not null))
4642 redef fun n_kwif
=(n
)
4647 redef fun n_expr
=(n
)
4652 redef fun n_then
=(n
)
4659 redef fun n_else
=(n
)
4667 private init empty_init
do end
4670 n_kwif
: nullable TKwif ,
4671 n_expr
: nullable PExpr ,
4672 n_then
: nullable PExpr ,
4673 n_else
: nullable PExpr
4677 _n_kwif
= n_kwif
.as(not null)
4678 n_kwif
.parent
= self
4679 _n_expr
= n_expr
.as(not null)
4680 n_expr
.parent
= self
4682 if n_then
!= null then
4683 n_then
.parent
= self
4686 if n_else
!= null then
4687 n_else
.parent
= self
4691 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4693 if _n_kwif
== old_child
then
4694 if new_child
!= null then
4695 new_child
.parent
= self
4696 assert new_child
isa TKwif
4703 if _n_expr
== old_child
then
4704 if new_child
!= null then
4705 new_child
.parent
= self
4706 assert new_child
isa PExpr
4713 if _n_then
== old_child
then
4714 if new_child
!= null then
4715 new_child
.parent
= self
4716 assert new_child
isa PExpr
4723 if _n_else
== old_child
then
4724 if new_child
!= null then
4725 new_child
.parent
= self
4726 assert new_child
isa PExpr
4735 redef fun visit_all
(v
: Visitor)
4737 v
.enter_visit
(_n_kwif
)
4738 v
.enter_visit
(_n_expr
)
4739 if _n_then
!= null then
4740 v
.enter_visit
(_n_then
.as(not null))
4742 if _n_else
!= null then
4743 v
.enter_visit
(_n_else
.as(not null))
4747 redef fun visit_all_reverse
(v
: Visitor)
4749 v
.enter_visit
(_n_kwif
)
4750 v
.enter_visit
(_n_expr
)
4751 if _n_then
!= null then
4752 v
.enter_visit
(_n_then
.as(not null))
4754 if _n_else
!= null then
4755 v
.enter_visit
(_n_else
.as(not null))
4759 redef class AIfexprExpr
4760 redef fun n_kwif
=(n
)
4765 redef fun n_expr
=(n
)
4770 redef fun n_kwthen
=(n
)
4775 redef fun n_then
=(n
)
4780 redef fun n_kwelse
=(n
)
4785 redef fun n_else
=(n
)
4791 private init empty_init
do end
4793 init init_aifexprexpr
(
4794 n_kwif
: nullable TKwif ,
4795 n_expr
: nullable PExpr ,
4796 n_kwthen
: nullable TKwthen ,
4797 n_then
: nullable PExpr ,
4798 n_kwelse
: nullable TKwelse ,
4799 n_else
: nullable PExpr
4803 _n_kwif
= n_kwif
.as(not null)
4804 n_kwif
.parent
= self
4805 _n_expr
= n_expr
.as(not null)
4806 n_expr
.parent
= self
4807 _n_kwthen
= n_kwthen
.as(not null)
4808 n_kwthen
.parent
= self
4809 _n_then
= n_then
.as(not null)
4810 n_then
.parent
= self
4811 _n_kwelse
= n_kwelse
.as(not null)
4812 n_kwelse
.parent
= self
4813 _n_else
= n_else
.as(not null)
4814 n_else
.parent
= self
4817 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4819 if _n_kwif
== old_child
then
4820 if new_child
!= null then
4821 new_child
.parent
= self
4822 assert new_child
isa TKwif
4829 if _n_expr
== old_child
then
4830 if new_child
!= null then
4831 new_child
.parent
= self
4832 assert new_child
isa PExpr
4839 if _n_kwthen
== old_child
then
4840 if new_child
!= null then
4841 new_child
.parent
= self
4842 assert new_child
isa TKwthen
4843 _n_kwthen
= new_child
4849 if _n_then
== old_child
then
4850 if new_child
!= null then
4851 new_child
.parent
= self
4852 assert new_child
isa PExpr
4859 if _n_kwelse
== old_child
then
4860 if new_child
!= null then
4861 new_child
.parent
= self
4862 assert new_child
isa TKwelse
4863 _n_kwelse
= new_child
4869 if _n_else
== old_child
then
4870 if new_child
!= null then
4871 new_child
.parent
= self
4872 assert new_child
isa PExpr
4881 redef fun visit_all
(v
: Visitor)
4883 v
.enter_visit
(_n_kwif
)
4884 v
.enter_visit
(_n_expr
)
4885 v
.enter_visit
(_n_kwthen
)
4886 v
.enter_visit
(_n_then
)
4887 v
.enter_visit
(_n_kwelse
)
4888 v
.enter_visit
(_n_else
)
4891 redef fun visit_all_reverse
(v
: Visitor)
4893 v
.enter_visit
(_n_kwif
)
4894 v
.enter_visit
(_n_expr
)
4895 v
.enter_visit
(_n_kwthen
)
4896 v
.enter_visit
(_n_then
)
4897 v
.enter_visit
(_n_kwelse
)
4898 v
.enter_visit
(_n_else
)
4901 redef class AWhileExpr
4902 redef fun n_kwwhile
=(n
)
4907 redef fun n_expr
=(n
)
4912 redef fun n_kwdo
=(n
)
4917 redef fun n_block
=(n
)
4925 private init empty_init
do end
4927 init init_awhileexpr
(
4928 n_kwwhile
: nullable TKwwhile ,
4929 n_expr
: nullable PExpr ,
4930 n_kwdo
: nullable TKwdo ,
4931 n_block
: nullable PExpr
4935 _n_kwwhile
= n_kwwhile
.as(not null)
4936 n_kwwhile
.parent
= self
4937 _n_expr
= n_expr
.as(not null)
4938 n_expr
.parent
= self
4939 _n_kwdo
= n_kwdo
.as(not null)
4940 n_kwdo
.parent
= self
4942 if n_block
!= null then
4943 n_block
.parent
= self
4947 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4949 if _n_kwwhile
== old_child
then
4950 if new_child
!= null then
4951 new_child
.parent
= self
4952 assert new_child
isa TKwwhile
4953 _n_kwwhile
= new_child
4959 if _n_expr
== old_child
then
4960 if new_child
!= null then
4961 new_child
.parent
= self
4962 assert new_child
isa PExpr
4969 if _n_kwdo
== old_child
then
4970 if new_child
!= null then
4971 new_child
.parent
= self
4972 assert new_child
isa TKwdo
4979 if _n_block
== old_child
then
4980 if new_child
!= null then
4981 new_child
.parent
= self
4982 assert new_child
isa PExpr
4983 _n_block
= new_child
4991 redef fun visit_all
(v
: Visitor)
4993 v
.enter_visit
(_n_kwwhile
)
4994 v
.enter_visit
(_n_expr
)
4995 v
.enter_visit
(_n_kwdo
)
4996 if _n_block
!= null then
4997 v
.enter_visit
(_n_block
.as(not null))
5001 redef fun visit_all_reverse
(v
: Visitor)
5003 v
.enter_visit
(_n_kwwhile
)
5004 v
.enter_visit
(_n_expr
)
5005 v
.enter_visit
(_n_kwdo
)
5006 if _n_block
!= null then
5007 v
.enter_visit
(_n_block
.as(not null))
5011 redef class AForExpr
5012 redef fun n_kwfor
=(n
)
5022 redef fun n_expr
=(n
)
5027 redef fun n_kwdo
=(n
)
5032 redef fun n_block
=(n
)
5040 private init empty_init
do end
5042 init init_aforexpr
(
5043 n_kwfor
: nullable TKwfor ,
5044 n_id
: nullable TId ,
5045 n_expr
: nullable PExpr ,
5046 n_kwdo
: nullable TKwdo ,
5047 n_block
: nullable PExpr
5051 _n_kwfor
= n_kwfor
.as(not null)
5052 n_kwfor
.parent
= self
5053 _n_id
= n_id
.as(not null)
5055 _n_expr
= n_expr
.as(not null)
5056 n_expr
.parent
= self
5057 _n_kwdo
= n_kwdo
.as(not null)
5058 n_kwdo
.parent
= self
5060 if n_block
!= null then
5061 n_block
.parent
= self
5065 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5067 if _n_kwfor
== old_child
then
5068 if new_child
!= null then
5069 new_child
.parent
= self
5070 assert new_child
isa TKwfor
5071 _n_kwfor
= new_child
5077 if _n_id
== old_child
then
5078 if new_child
!= null then
5079 new_child
.parent
= self
5080 assert new_child
isa TId
5087 if _n_expr
== old_child
then
5088 if new_child
!= null then
5089 new_child
.parent
= self
5090 assert new_child
isa PExpr
5097 if _n_kwdo
== old_child
then
5098 if new_child
!= null then
5099 new_child
.parent
= self
5100 assert new_child
isa TKwdo
5107 if _n_block
== old_child
then
5108 if new_child
!= null then
5109 new_child
.parent
= self
5110 assert new_child
isa PExpr
5111 _n_block
= new_child
5119 redef fun visit_all
(v
: Visitor)
5121 v
.enter_visit
(_n_kwfor
)
5122 v
.enter_visit
(_n_id
)
5123 v
.enter_visit
(_n_expr
)
5124 v
.enter_visit
(_n_kwdo
)
5125 if _n_block
!= null then
5126 v
.enter_visit
(_n_block
.as(not null))
5130 redef fun visit_all_reverse
(v
: Visitor)
5132 v
.enter_visit
(_n_kwfor
)
5133 v
.enter_visit
(_n_id
)
5134 v
.enter_visit
(_n_expr
)
5135 v
.enter_visit
(_n_kwdo
)
5136 if _n_block
!= null then
5137 v
.enter_visit
(_n_block
.as(not null))
5141 redef class AAssertExpr
5142 redef fun n_kwassert
=(n
)
5154 redef fun n_expr
=(n
)
5160 private init empty_init
do end
5162 init init_aassertexpr
(
5163 n_kwassert
: nullable TKwassert ,
5164 n_id
: nullable TId ,
5165 n_expr
: nullable PExpr
5169 _n_kwassert
= n_kwassert
.as(not null)
5170 n_kwassert
.parent
= self
5172 if n_id
!= null then
5175 _n_expr
= n_expr
.as(not null)
5176 n_expr
.parent
= self
5179 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5181 if _n_kwassert
== old_child
then
5182 if new_child
!= null then
5183 new_child
.parent
= self
5184 assert new_child
isa TKwassert
5185 _n_kwassert
= new_child
5191 if _n_id
== old_child
then
5192 if new_child
!= null then
5193 new_child
.parent
= self
5194 assert new_child
isa TId
5201 if _n_expr
== old_child
then
5202 if new_child
!= null then
5203 new_child
.parent
= self
5204 assert new_child
isa PExpr
5213 redef fun visit_all
(v
: Visitor)
5215 v
.enter_visit
(_n_kwassert
)
5216 if _n_id
!= null then
5217 v
.enter_visit
(_n_id
.as(not null))
5219 v
.enter_visit
(_n_expr
)
5222 redef fun visit_all_reverse
(v
: Visitor)
5224 v
.enter_visit
(_n_kwassert
)
5225 if _n_id
!= null then
5226 v
.enter_visit
(_n_id
.as(not null))
5228 v
.enter_visit
(_n_expr
)
5231 redef class AOnceExpr
5232 redef fun n_kwonce
=(n
)
5237 redef fun n_expr
=(n
)
5243 private init empty_init
do end
5245 init init_aonceexpr
(
5246 n_kwonce
: nullable TKwonce ,
5247 n_expr
: nullable PExpr
5251 _n_kwonce
= n_kwonce
.as(not null)
5252 n_kwonce
.parent
= self
5253 _n_expr
= n_expr
.as(not null)
5254 n_expr
.parent
= self
5257 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5259 if _n_kwonce
== old_child
then
5260 if new_child
!= null then
5261 new_child
.parent
= self
5262 assert new_child
isa TKwonce
5263 _n_kwonce
= new_child
5269 if _n_expr
== old_child
then
5270 if new_child
!= null then
5271 new_child
.parent
= self
5272 assert new_child
isa PExpr
5281 redef fun visit_all
(v
: Visitor)
5283 v
.enter_visit
(_n_kwonce
)
5284 v
.enter_visit
(_n_expr
)
5287 redef fun visit_all_reverse
(v
: Visitor)
5289 v
.enter_visit
(_n_kwonce
)
5290 v
.enter_visit
(_n_expr
)
5293 redef class ASendExpr
5294 redef fun n_expr
=(n
)
5300 private init empty_init
do end
5302 init init_asendexpr
(
5303 n_expr
: nullable PExpr
5307 _n_expr
= n_expr
.as(not null)
5308 n_expr
.parent
= self
5311 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5313 if _n_expr
== old_child
then
5314 if new_child
!= null then
5315 new_child
.parent
= self
5316 assert new_child
isa PExpr
5325 redef fun visit_all
(v
: Visitor)
5327 v
.enter_visit
(_n_expr
)
5330 redef fun visit_all_reverse
(v
: Visitor)
5332 v
.enter_visit
(_n_expr
)
5335 redef class ABinopExpr
5336 redef fun n_expr
=(n
)
5341 redef fun n_expr2
=(n
)
5347 private init empty_init
do end
5349 init init_abinopexpr
(
5350 n_expr
: nullable PExpr ,
5351 n_expr2
: nullable PExpr
5355 _n_expr
= n_expr
.as(not null)
5356 n_expr
.parent
= self
5357 _n_expr2
= n_expr2
.as(not null)
5358 n_expr2
.parent
= self
5361 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5363 if _n_expr
== old_child
then
5364 if new_child
!= null then
5365 new_child
.parent
= self
5366 assert new_child
isa PExpr
5373 if _n_expr2
== old_child
then
5374 if new_child
!= null then
5375 new_child
.parent
= self
5376 assert new_child
isa PExpr
5377 _n_expr2
= new_child
5385 redef fun visit_all
(v
: Visitor)
5387 v
.enter_visit
(_n_expr
)
5388 v
.enter_visit
(_n_expr2
)
5391 redef fun visit_all_reverse
(v
: Visitor)
5393 v
.enter_visit
(_n_expr
)
5394 v
.enter_visit
(_n_expr2
)
5398 redef fun n_expr
=(n
)
5403 redef fun n_expr2
=(n
)
5409 private init empty_init
do end
5412 n_expr
: nullable PExpr ,
5413 n_expr2
: nullable PExpr
5417 _n_expr
= n_expr
.as(not null)
5418 n_expr
.parent
= self
5419 _n_expr2
= n_expr2
.as(not null)
5420 n_expr2
.parent
= self
5423 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5425 if _n_expr
== old_child
then
5426 if new_child
!= null then
5427 new_child
.parent
= self
5428 assert new_child
isa PExpr
5435 if _n_expr2
== old_child
then
5436 if new_child
!= null then
5437 new_child
.parent
= self
5438 assert new_child
isa PExpr
5439 _n_expr2
= new_child
5447 redef fun visit_all
(v
: Visitor)
5449 v
.enter_visit
(_n_expr
)
5450 v
.enter_visit
(_n_expr2
)
5453 redef fun visit_all_reverse
(v
: Visitor)
5455 v
.enter_visit
(_n_expr
)
5456 v
.enter_visit
(_n_expr2
)
5459 redef class AAndExpr
5460 redef fun n_expr
=(n
)
5465 redef fun n_expr2
=(n
)
5471 private init empty_init
do end
5473 init init_aandexpr
(
5474 n_expr
: nullable PExpr ,
5475 n_expr2
: nullable PExpr
5479 _n_expr
= n_expr
.as(not null)
5480 n_expr
.parent
= self
5481 _n_expr2
= n_expr2
.as(not null)
5482 n_expr2
.parent
= self
5485 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5487 if _n_expr
== old_child
then
5488 if new_child
!= null then
5489 new_child
.parent
= self
5490 assert new_child
isa PExpr
5497 if _n_expr2
== old_child
then
5498 if new_child
!= null then
5499 new_child
.parent
= self
5500 assert new_child
isa PExpr
5501 _n_expr2
= new_child
5509 redef fun visit_all
(v
: Visitor)
5511 v
.enter_visit
(_n_expr
)
5512 v
.enter_visit
(_n_expr2
)
5515 redef fun visit_all_reverse
(v
: Visitor)
5517 v
.enter_visit
(_n_expr
)
5518 v
.enter_visit
(_n_expr2
)
5521 redef class ANotExpr
5522 redef fun n_kwnot
=(n
)
5527 redef fun n_expr
=(n
)
5533 private init empty_init
do end
5535 init init_anotexpr
(
5536 n_kwnot
: nullable TKwnot ,
5537 n_expr
: nullable PExpr
5541 _n_kwnot
= n_kwnot
.as(not null)
5542 n_kwnot
.parent
= self
5543 _n_expr
= n_expr
.as(not null)
5544 n_expr
.parent
= self
5547 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5549 if _n_kwnot
== old_child
then
5550 if new_child
!= null then
5551 new_child
.parent
= self
5552 assert new_child
isa TKwnot
5553 _n_kwnot
= new_child
5559 if _n_expr
== old_child
then
5560 if new_child
!= null then
5561 new_child
.parent
= self
5562 assert new_child
isa PExpr
5571 redef fun visit_all
(v
: Visitor)
5573 v
.enter_visit
(_n_kwnot
)
5574 v
.enter_visit
(_n_expr
)
5577 redef fun visit_all_reverse
(v
: Visitor)
5579 v
.enter_visit
(_n_kwnot
)
5580 v
.enter_visit
(_n_expr
)
5584 redef fun n_expr
=(n
)
5589 redef fun n_expr2
=(n
)
5595 private init empty_init
do end
5598 n_expr
: nullable PExpr ,
5599 n_expr2
: nullable PExpr
5603 _n_expr
= n_expr
.as(not null)
5604 n_expr
.parent
= self
5605 _n_expr2
= n_expr2
.as(not null)
5606 n_expr2
.parent
= self
5609 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5611 if _n_expr
== old_child
then
5612 if new_child
!= null then
5613 new_child
.parent
= self
5614 assert new_child
isa PExpr
5621 if _n_expr2
== old_child
then
5622 if new_child
!= null then
5623 new_child
.parent
= self
5624 assert new_child
isa PExpr
5625 _n_expr2
= new_child
5633 redef fun visit_all
(v
: Visitor)
5635 v
.enter_visit
(_n_expr
)
5636 v
.enter_visit
(_n_expr2
)
5639 redef fun visit_all_reverse
(v
: Visitor)
5641 v
.enter_visit
(_n_expr
)
5642 v
.enter_visit
(_n_expr2
)
5646 redef fun n_expr
=(n
)
5651 redef fun n_expr2
=(n
)
5657 private init empty_init
do end
5660 n_expr
: nullable PExpr ,
5661 n_expr2
: nullable PExpr
5665 _n_expr
= n_expr
.as(not null)
5666 n_expr
.parent
= self
5667 _n_expr2
= n_expr2
.as(not null)
5668 n_expr2
.parent
= self
5671 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5673 if _n_expr
== old_child
then
5674 if new_child
!= null then
5675 new_child
.parent
= self
5676 assert new_child
isa PExpr
5683 if _n_expr2
== old_child
then
5684 if new_child
!= null then
5685 new_child
.parent
= self
5686 assert new_child
isa PExpr
5687 _n_expr2
= new_child
5695 redef fun visit_all
(v
: Visitor)
5697 v
.enter_visit
(_n_expr
)
5698 v
.enter_visit
(_n_expr2
)
5701 redef fun visit_all_reverse
(v
: Visitor)
5703 v
.enter_visit
(_n_expr
)
5704 v
.enter_visit
(_n_expr2
)
5708 redef fun n_expr
=(n
)
5713 redef fun n_expr2
=(n
)
5719 private init empty_init
do end
5722 n_expr
: nullable PExpr ,
5723 n_expr2
: nullable PExpr
5727 _n_expr
= n_expr
.as(not null)
5728 n_expr
.parent
= self
5729 _n_expr2
= n_expr2
.as(not null)
5730 n_expr2
.parent
= self
5733 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5735 if _n_expr
== old_child
then
5736 if new_child
!= null then
5737 new_child
.parent
= self
5738 assert new_child
isa PExpr
5745 if _n_expr2
== old_child
then
5746 if new_child
!= null then
5747 new_child
.parent
= self
5748 assert new_child
isa PExpr
5749 _n_expr2
= new_child
5757 redef fun visit_all
(v
: Visitor)
5759 v
.enter_visit
(_n_expr
)
5760 v
.enter_visit
(_n_expr2
)
5763 redef fun visit_all_reverse
(v
: Visitor)
5765 v
.enter_visit
(_n_expr
)
5766 v
.enter_visit
(_n_expr2
)
5770 redef fun n_expr
=(n
)
5775 redef fun n_expr2
=(n
)
5781 private init empty_init
do end
5784 n_expr
: nullable PExpr ,
5785 n_expr2
: nullable PExpr
5789 _n_expr
= n_expr
.as(not null)
5790 n_expr
.parent
= self
5791 _n_expr2
= n_expr2
.as(not null)
5792 n_expr2
.parent
= self
5795 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5797 if _n_expr
== old_child
then
5798 if new_child
!= null then
5799 new_child
.parent
= self
5800 assert new_child
isa PExpr
5807 if _n_expr2
== old_child
then
5808 if new_child
!= null then
5809 new_child
.parent
= self
5810 assert new_child
isa PExpr
5811 _n_expr2
= new_child
5819 redef fun visit_all
(v
: Visitor)
5821 v
.enter_visit
(_n_expr
)
5822 v
.enter_visit
(_n_expr2
)
5825 redef fun visit_all_reverse
(v
: Visitor)
5827 v
.enter_visit
(_n_expr
)
5828 v
.enter_visit
(_n_expr2
)
5832 redef fun n_expr
=(n
)
5837 redef fun n_expr2
=(n
)
5843 private init empty_init
do end
5846 n_expr
: nullable PExpr ,
5847 n_expr2
: nullable PExpr
5851 _n_expr
= n_expr
.as(not null)
5852 n_expr
.parent
= self
5853 _n_expr2
= n_expr2
.as(not null)
5854 n_expr2
.parent
= self
5857 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5859 if _n_expr
== old_child
then
5860 if new_child
!= null then
5861 new_child
.parent
= self
5862 assert new_child
isa PExpr
5869 if _n_expr2
== old_child
then
5870 if new_child
!= null then
5871 new_child
.parent
= self
5872 assert new_child
isa PExpr
5873 _n_expr2
= new_child
5881 redef fun visit_all
(v
: Visitor)
5883 v
.enter_visit
(_n_expr
)
5884 v
.enter_visit
(_n_expr2
)
5887 redef fun visit_all_reverse
(v
: Visitor)
5889 v
.enter_visit
(_n_expr
)
5890 v
.enter_visit
(_n_expr2
)
5894 redef fun n_expr
=(n
)
5899 redef fun n_expr2
=(n
)
5905 private init empty_init
do end
5908 n_expr
: nullable PExpr ,
5909 n_expr2
: nullable PExpr
5913 _n_expr
= n_expr
.as(not null)
5914 n_expr
.parent
= self
5915 _n_expr2
= n_expr2
.as(not null)
5916 n_expr2
.parent
= self
5919 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5921 if _n_expr
== old_child
then
5922 if new_child
!= null then
5923 new_child
.parent
= self
5924 assert new_child
isa PExpr
5931 if _n_expr2
== old_child
then
5932 if new_child
!= null then
5933 new_child
.parent
= self
5934 assert new_child
isa PExpr
5935 _n_expr2
= new_child
5943 redef fun visit_all
(v
: Visitor)
5945 v
.enter_visit
(_n_expr
)
5946 v
.enter_visit
(_n_expr2
)
5949 redef fun visit_all_reverse
(v
: Visitor)
5951 v
.enter_visit
(_n_expr
)
5952 v
.enter_visit
(_n_expr2
)
5956 redef fun n_expr
=(n
)
5961 redef fun n_expr2
=(n
)
5967 private init empty_init
do end
5970 n_expr
: nullable PExpr ,
5971 n_expr2
: nullable PExpr
5975 _n_expr
= n_expr
.as(not null)
5976 n_expr
.parent
= self
5977 _n_expr2
= n_expr2
.as(not null)
5978 n_expr2
.parent
= self
5981 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5983 if _n_expr
== old_child
then
5984 if new_child
!= null then
5985 new_child
.parent
= self
5986 assert new_child
isa PExpr
5993 if _n_expr2
== old_child
then
5994 if new_child
!= null then
5995 new_child
.parent
= self
5996 assert new_child
isa PExpr
5997 _n_expr2
= new_child
6005 redef fun visit_all
(v
: Visitor)
6007 v
.enter_visit
(_n_expr
)
6008 v
.enter_visit
(_n_expr2
)
6011 redef fun visit_all_reverse
(v
: Visitor)
6013 v
.enter_visit
(_n_expr
)
6014 v
.enter_visit
(_n_expr2
)
6017 redef class AIsaExpr
6018 redef fun n_expr
=(n
)
6023 redef fun n_type
=(n
)
6029 private init empty_init
do end
6031 init init_aisaexpr
(
6032 n_expr
: nullable PExpr ,
6033 n_type
: nullable PType
6037 _n_expr
= n_expr
.as(not null)
6038 n_expr
.parent
= self
6039 _n_type
= n_type
.as(not null)
6040 n_type
.parent
= self
6043 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6045 if _n_expr
== old_child
then
6046 if new_child
!= null then
6047 new_child
.parent
= self
6048 assert new_child
isa PExpr
6055 if _n_type
== old_child
then
6056 if new_child
!= null then
6057 new_child
.parent
= self
6058 assert new_child
isa PType
6067 redef fun visit_all
(v
: Visitor)
6069 v
.enter_visit
(_n_expr
)
6070 v
.enter_visit
(_n_type
)
6073 redef fun visit_all_reverse
(v
: Visitor)
6075 v
.enter_visit
(_n_expr
)
6076 v
.enter_visit
(_n_type
)
6079 redef class APlusExpr
6080 redef fun n_expr
=(n
)
6085 redef fun n_expr2
=(n
)
6091 private init empty_init
do end
6093 init init_aplusexpr
(
6094 n_expr
: nullable PExpr ,
6095 n_expr2
: nullable PExpr
6099 _n_expr
= n_expr
.as(not null)
6100 n_expr
.parent
= self
6101 _n_expr2
= n_expr2
.as(not null)
6102 n_expr2
.parent
= self
6105 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6107 if _n_expr
== old_child
then
6108 if new_child
!= null then
6109 new_child
.parent
= self
6110 assert new_child
isa PExpr
6117 if _n_expr2
== old_child
then
6118 if new_child
!= null then
6119 new_child
.parent
= self
6120 assert new_child
isa PExpr
6121 _n_expr2
= new_child
6129 redef fun visit_all
(v
: Visitor)
6131 v
.enter_visit
(_n_expr
)
6132 v
.enter_visit
(_n_expr2
)
6135 redef fun visit_all_reverse
(v
: Visitor)
6137 v
.enter_visit
(_n_expr
)
6138 v
.enter_visit
(_n_expr2
)
6141 redef class AMinusExpr
6142 redef fun n_expr
=(n
)
6147 redef fun n_expr2
=(n
)
6153 private init empty_init
do end
6155 init init_aminusexpr
(
6156 n_expr
: nullable PExpr ,
6157 n_expr2
: nullable PExpr
6161 _n_expr
= n_expr
.as(not null)
6162 n_expr
.parent
= self
6163 _n_expr2
= n_expr2
.as(not null)
6164 n_expr2
.parent
= self
6167 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6169 if _n_expr
== old_child
then
6170 if new_child
!= null then
6171 new_child
.parent
= self
6172 assert new_child
isa PExpr
6179 if _n_expr2
== old_child
then
6180 if new_child
!= null then
6181 new_child
.parent
= self
6182 assert new_child
isa PExpr
6183 _n_expr2
= new_child
6191 redef fun visit_all
(v
: Visitor)
6193 v
.enter_visit
(_n_expr
)
6194 v
.enter_visit
(_n_expr2
)
6197 redef fun visit_all_reverse
(v
: Visitor)
6199 v
.enter_visit
(_n_expr
)
6200 v
.enter_visit
(_n_expr2
)
6203 redef class AStarshipExpr
6204 redef fun n_expr
=(n
)
6209 redef fun n_expr2
=(n
)
6215 private init empty_init
do end
6217 init init_astarshipexpr
(
6218 n_expr
: nullable PExpr ,
6219 n_expr2
: nullable PExpr
6223 _n_expr
= n_expr
.as(not null)
6224 n_expr
.parent
= self
6225 _n_expr2
= n_expr2
.as(not null)
6226 n_expr2
.parent
= self
6229 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6231 if _n_expr
== old_child
then
6232 if new_child
!= null then
6233 new_child
.parent
= self
6234 assert new_child
isa PExpr
6241 if _n_expr2
== old_child
then
6242 if new_child
!= null then
6243 new_child
.parent
= self
6244 assert new_child
isa PExpr
6245 _n_expr2
= new_child
6253 redef fun visit_all
(v
: Visitor)
6255 v
.enter_visit
(_n_expr
)
6256 v
.enter_visit
(_n_expr2
)
6259 redef fun visit_all_reverse
(v
: Visitor)
6261 v
.enter_visit
(_n_expr
)
6262 v
.enter_visit
(_n_expr2
)
6265 redef class AStarExpr
6266 redef fun n_expr
=(n
)
6271 redef fun n_expr2
=(n
)
6277 private init empty_init
do end
6279 init init_astarexpr
(
6280 n_expr
: nullable PExpr ,
6281 n_expr2
: nullable PExpr
6285 _n_expr
= n_expr
.as(not null)
6286 n_expr
.parent
= self
6287 _n_expr2
= n_expr2
.as(not null)
6288 n_expr2
.parent
= self
6291 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6293 if _n_expr
== old_child
then
6294 if new_child
!= null then
6295 new_child
.parent
= self
6296 assert new_child
isa PExpr
6303 if _n_expr2
== old_child
then
6304 if new_child
!= null then
6305 new_child
.parent
= self
6306 assert new_child
isa PExpr
6307 _n_expr2
= new_child
6315 redef fun visit_all
(v
: Visitor)
6317 v
.enter_visit
(_n_expr
)
6318 v
.enter_visit
(_n_expr2
)
6321 redef fun visit_all_reverse
(v
: Visitor)
6323 v
.enter_visit
(_n_expr
)
6324 v
.enter_visit
(_n_expr2
)
6327 redef class ASlashExpr
6328 redef fun n_expr
=(n
)
6333 redef fun n_expr2
=(n
)
6339 private init empty_init
do end
6341 init init_aslashexpr
(
6342 n_expr
: nullable PExpr ,
6343 n_expr2
: nullable PExpr
6347 _n_expr
= n_expr
.as(not null)
6348 n_expr
.parent
= self
6349 _n_expr2
= n_expr2
.as(not null)
6350 n_expr2
.parent
= self
6353 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6355 if _n_expr
== old_child
then
6356 if new_child
!= null then
6357 new_child
.parent
= self
6358 assert new_child
isa PExpr
6365 if _n_expr2
== old_child
then
6366 if new_child
!= null then
6367 new_child
.parent
= self
6368 assert new_child
isa PExpr
6369 _n_expr2
= new_child
6377 redef fun visit_all
(v
: Visitor)
6379 v
.enter_visit
(_n_expr
)
6380 v
.enter_visit
(_n_expr2
)
6383 redef fun visit_all_reverse
(v
: Visitor)
6385 v
.enter_visit
(_n_expr
)
6386 v
.enter_visit
(_n_expr2
)
6389 redef class APercentExpr
6390 redef fun n_expr
=(n
)
6395 redef fun n_expr2
=(n
)
6401 private init empty_init
do end
6403 init init_apercentexpr
(
6404 n_expr
: nullable PExpr ,
6405 n_expr2
: nullable PExpr
6409 _n_expr
= n_expr
.as(not null)
6410 n_expr
.parent
= self
6411 _n_expr2
= n_expr2
.as(not null)
6412 n_expr2
.parent
= self
6415 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6417 if _n_expr
== old_child
then
6418 if new_child
!= null then
6419 new_child
.parent
= self
6420 assert new_child
isa PExpr
6427 if _n_expr2
== old_child
then
6428 if new_child
!= null then
6429 new_child
.parent
= self
6430 assert new_child
isa PExpr
6431 _n_expr2
= new_child
6439 redef fun visit_all
(v
: Visitor)
6441 v
.enter_visit
(_n_expr
)
6442 v
.enter_visit
(_n_expr2
)
6445 redef fun visit_all_reverse
(v
: Visitor)
6447 v
.enter_visit
(_n_expr
)
6448 v
.enter_visit
(_n_expr2
)
6451 redef class AUminusExpr
6452 redef fun n_minus
=(n
)
6457 redef fun n_expr
=(n
)
6463 private init empty_init
do end
6465 init init_auminusexpr
(
6466 n_minus
: nullable TMinus ,
6467 n_expr
: nullable PExpr
6471 _n_minus
= n_minus
.as(not null)
6472 n_minus
.parent
= self
6473 _n_expr
= n_expr
.as(not null)
6474 n_expr
.parent
= self
6477 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6479 if _n_minus
== old_child
then
6480 if new_child
!= null then
6481 new_child
.parent
= self
6482 assert new_child
isa TMinus
6483 _n_minus
= new_child
6489 if _n_expr
== old_child
then
6490 if new_child
!= null then
6491 new_child
.parent
= self
6492 assert new_child
isa PExpr
6501 redef fun visit_all
(v
: Visitor)
6503 v
.enter_visit
(_n_minus
)
6504 v
.enter_visit
(_n_expr
)
6507 redef fun visit_all_reverse
(v
: Visitor)
6509 v
.enter_visit
(_n_minus
)
6510 v
.enter_visit
(_n_expr
)
6513 redef class ANewExpr
6514 redef fun n_kwnew
=(n
)
6519 redef fun n_type
=(n
)
6532 private init empty_init
do end
6534 init init_anewexpr
(
6535 n_kwnew
: nullable TKwnew ,
6536 n_type
: nullable PType ,
6537 n_id
: nullable TId ,
6538 n_args
: Collection[Object] # Should be Collection[PExpr]
6542 _n_kwnew
= n_kwnew
.as(not null)
6543 n_kwnew
.parent
= self
6544 _n_type
= n_type
.as(not null)
6545 n_type
.parent
= self
6547 if n_id
!= null then
6557 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6559 if _n_kwnew
== old_child
then
6560 if new_child
!= null then
6561 new_child
.parent
= self
6562 assert new_child
isa TKwnew
6563 _n_kwnew
= new_child
6569 if _n_type
== old_child
then
6570 if new_child
!= null then
6571 new_child
.parent
= self
6572 assert new_child
isa PType
6579 if _n_id
== old_child
then
6580 if new_child
!= null then
6581 new_child
.parent
= self
6582 assert new_child
isa TId
6589 for i
in [0.._n_args
.length
[ do
6590 if _n_args
[i
] == old_child
then
6591 if new_child
!= null then
6592 assert new_child
isa PExpr
6593 _n_args
[i
] = new_child
6594 new_child
.parent
= self
6596 _n_args
.remove_at
(i
)
6603 redef fun visit_all
(v
: Visitor)
6605 v
.enter_visit
(_n_kwnew
)
6606 v
.enter_visit
(_n_type
)
6607 if _n_id
!= null then
6608 v
.enter_visit
(_n_id
.as(not null))
6615 redef fun visit_all_reverse
(v
: Visitor)
6617 v
.enter_visit
(_n_kwnew
)
6618 v
.enter_visit
(_n_type
)
6619 if _n_id
!= null then
6620 v
.enter_visit
(_n_id
.as(not null))
6623 var i
= _n_args
.length
6625 v
.enter_visit
(_n_args
[i
])
6631 redef class AAttrExpr
6632 redef fun n_expr
=(n
)
6643 private init empty_init
do end
6645 init init_aattrexpr
(
6646 n_expr
: nullable PExpr ,
6647 n_id
: nullable TAttrid
6651 _n_expr
= n_expr
.as(not null)
6652 n_expr
.parent
= self
6653 _n_id
= n_id
.as(not null)
6657 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6659 if _n_expr
== old_child
then
6660 if new_child
!= null then
6661 new_child
.parent
= self
6662 assert new_child
isa PExpr
6669 if _n_id
== old_child
then
6670 if new_child
!= null then
6671 new_child
.parent
= self
6672 assert new_child
isa TAttrid
6681 redef fun visit_all
(v
: Visitor)
6683 v
.enter_visit
(_n_expr
)
6684 v
.enter_visit
(_n_id
)
6687 redef fun visit_all_reverse
(v
: Visitor)
6689 v
.enter_visit
(_n_expr
)
6690 v
.enter_visit
(_n_id
)
6693 redef class AAttrAssignExpr
6694 redef fun n_expr
=(n
)
6704 redef fun n_assign
=(n
)
6709 redef fun n_value
=(n
)
6715 private init empty_init
do end
6717 init init_aattrassignexpr
(
6718 n_expr
: nullable PExpr ,
6719 n_id
: nullable TAttrid ,
6720 n_assign
: nullable TAssign ,
6721 n_value
: nullable PExpr
6725 _n_expr
= n_expr
.as(not null)
6726 n_expr
.parent
= self
6727 _n_id
= n_id
.as(not null)
6729 _n_assign
= n_assign
.as(not null)
6730 n_assign
.parent
= self
6731 _n_value
= n_value
.as(not null)
6732 n_value
.parent
= self
6735 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6737 if _n_expr
== old_child
then
6738 if new_child
!= null then
6739 new_child
.parent
= self
6740 assert new_child
isa PExpr
6747 if _n_id
== old_child
then
6748 if new_child
!= null then
6749 new_child
.parent
= self
6750 assert new_child
isa TAttrid
6757 if _n_assign
== old_child
then
6758 if new_child
!= null then
6759 new_child
.parent
= self
6760 assert new_child
isa TAssign
6761 _n_assign
= new_child
6767 if _n_value
== old_child
then
6768 if new_child
!= null then
6769 new_child
.parent
= self
6770 assert new_child
isa PExpr
6771 _n_value
= new_child
6779 redef fun visit_all
(v
: Visitor)
6781 v
.enter_visit
(_n_expr
)
6782 v
.enter_visit
(_n_id
)
6783 v
.enter_visit
(_n_assign
)
6784 v
.enter_visit
(_n_value
)
6787 redef fun visit_all_reverse
(v
: Visitor)
6789 v
.enter_visit
(_n_expr
)
6790 v
.enter_visit
(_n_id
)
6791 v
.enter_visit
(_n_assign
)
6792 v
.enter_visit
(_n_value
)
6795 redef class AAttrReassignExpr
6796 redef fun n_expr
=(n
)
6806 redef fun n_assign_op
=(n
)
6811 redef fun n_value
=(n
)
6817 private init empty_init
do end
6819 init init_aattrreassignexpr
(
6820 n_expr
: nullable PExpr ,
6821 n_id
: nullable TAttrid ,
6822 n_assign_op
: nullable PAssignOp ,
6823 n_value
: nullable PExpr
6827 _n_expr
= n_expr
.as(not null)
6828 n_expr
.parent
= self
6829 _n_id
= n_id
.as(not null)
6831 _n_assign_op
= n_assign_op
.as(not null)
6832 n_assign_op
.parent
= self
6833 _n_value
= n_value
.as(not null)
6834 n_value
.parent
= self
6837 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6839 if _n_expr
== old_child
then
6840 if new_child
!= null then
6841 new_child
.parent
= self
6842 assert new_child
isa PExpr
6849 if _n_id
== old_child
then
6850 if new_child
!= null then
6851 new_child
.parent
= self
6852 assert new_child
isa TAttrid
6859 if _n_assign_op
== old_child
then
6860 if new_child
!= null then
6861 new_child
.parent
= self
6862 assert new_child
isa PAssignOp
6863 _n_assign_op
= new_child
6869 if _n_value
== old_child
then
6870 if new_child
!= null then
6871 new_child
.parent
= self
6872 assert new_child
isa PExpr
6873 _n_value
= new_child
6881 redef fun visit_all
(v
: Visitor)
6883 v
.enter_visit
(_n_expr
)
6884 v
.enter_visit
(_n_id
)
6885 v
.enter_visit
(_n_assign_op
)
6886 v
.enter_visit
(_n_value
)
6889 redef fun visit_all_reverse
(v
: Visitor)
6891 v
.enter_visit
(_n_expr
)
6892 v
.enter_visit
(_n_id
)
6893 v
.enter_visit
(_n_assign_op
)
6894 v
.enter_visit
(_n_value
)
6897 redef class ACallExpr
6898 redef fun n_expr
=(n
)
6909 private init empty_init
do end
6911 init init_acallexpr
(
6912 n_expr
: nullable PExpr ,
6913 n_id
: nullable TId ,
6914 n_args
: Collection[Object] , # Should be Collection[PExpr]
6915 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
6919 _n_expr
= n_expr
.as(not null)
6920 n_expr
.parent
= self
6921 _n_id
= n_id
.as(not null)
6928 for n
in n_closure_defs
do
6929 assert n
isa PClosureDef
6930 _n_closure_defs
.add
(n
)
6935 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6937 if _n_expr
== old_child
then
6938 if new_child
!= null then
6939 new_child
.parent
= self
6940 assert new_child
isa PExpr
6947 if _n_id
== old_child
then
6948 if new_child
!= null then
6949 new_child
.parent
= self
6950 assert new_child
isa TId
6957 for i
in [0.._n_args
.length
[ do
6958 if _n_args
[i
] == old_child
then
6959 if new_child
!= null then
6960 assert new_child
isa PExpr
6961 _n_args
[i
] = new_child
6962 new_child
.parent
= self
6964 _n_args
.remove_at
(i
)
6969 for i
in [0.._n_closure_defs
.length
[ do
6970 if _n_closure_defs
[i
] == old_child
then
6971 if new_child
!= null then
6972 assert new_child
isa PClosureDef
6973 _n_closure_defs
[i
] = new_child
6974 new_child
.parent
= self
6976 _n_closure_defs
.remove_at
(i
)
6983 redef fun visit_all
(v
: Visitor)
6985 v
.enter_visit
(_n_expr
)
6986 v
.enter_visit
(_n_id
)
6990 for n
in _n_closure_defs
do
6995 redef fun visit_all_reverse
(v
: Visitor)
6997 v
.enter_visit
(_n_expr
)
6998 v
.enter_visit
(_n_id
)
7000 var i
= _n_args
.length
7002 v
.enter_visit
(_n_args
[i
])
7007 var i
= _n_closure_defs
.length
7009 v
.enter_visit
(_n_closure_defs
[i
])
7015 redef class ACallAssignExpr
7016 redef fun n_expr
=(n
)
7026 redef fun n_assign
=(n
)
7031 redef fun n_value
=(n
)
7037 private init empty_init
do end
7039 init init_acallassignexpr
(
7040 n_expr
: nullable PExpr ,
7041 n_id
: nullable TId ,
7042 n_args
: Collection[Object] , # Should be Collection[PExpr]
7043 n_assign
: nullable TAssign ,
7044 n_value
: nullable PExpr
7048 _n_expr
= n_expr
.as(not null)
7049 n_expr
.parent
= self
7050 _n_id
= n_id
.as(not null)
7057 _n_assign
= n_assign
.as(not null)
7058 n_assign
.parent
= self
7059 _n_value
= n_value
.as(not null)
7060 n_value
.parent
= self
7063 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7065 if _n_expr
== old_child
then
7066 if new_child
!= null then
7067 new_child
.parent
= self
7068 assert new_child
isa PExpr
7075 if _n_id
== old_child
then
7076 if new_child
!= null then
7077 new_child
.parent
= self
7078 assert new_child
isa TId
7085 for i
in [0.._n_args
.length
[ do
7086 if _n_args
[i
] == old_child
then
7087 if new_child
!= null then
7088 assert new_child
isa PExpr
7089 _n_args
[i
] = new_child
7090 new_child
.parent
= self
7092 _n_args
.remove_at
(i
)
7097 if _n_assign
== old_child
then
7098 if new_child
!= null then
7099 new_child
.parent
= self
7100 assert new_child
isa TAssign
7101 _n_assign
= new_child
7107 if _n_value
== old_child
then
7108 if new_child
!= null then
7109 new_child
.parent
= self
7110 assert new_child
isa PExpr
7111 _n_value
= new_child
7119 redef fun visit_all
(v
: Visitor)
7121 v
.enter_visit
(_n_expr
)
7122 v
.enter_visit
(_n_id
)
7126 v
.enter_visit
(_n_assign
)
7127 v
.enter_visit
(_n_value
)
7130 redef fun visit_all_reverse
(v
: Visitor)
7132 v
.enter_visit
(_n_expr
)
7133 v
.enter_visit
(_n_id
)
7135 var i
= _n_args
.length
7137 v
.enter_visit
(_n_args
[i
])
7141 v
.enter_visit
(_n_assign
)
7142 v
.enter_visit
(_n_value
)
7145 redef class ACallReassignExpr
7146 redef fun n_expr
=(n
)
7156 redef fun n_assign_op
=(n
)
7161 redef fun n_value
=(n
)
7167 private init empty_init
do end
7169 init init_acallreassignexpr
(
7170 n_expr
: nullable PExpr ,
7171 n_id
: nullable TId ,
7172 n_args
: Collection[Object] , # Should be Collection[PExpr]
7173 n_assign_op
: nullable PAssignOp ,
7174 n_value
: nullable PExpr
7178 _n_expr
= n_expr
.as(not null)
7179 n_expr
.parent
= self
7180 _n_id
= n_id
.as(not null)
7187 _n_assign_op
= n_assign_op
.as(not null)
7188 n_assign_op
.parent
= self
7189 _n_value
= n_value
.as(not null)
7190 n_value
.parent
= self
7193 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7195 if _n_expr
== old_child
then
7196 if new_child
!= null then
7197 new_child
.parent
= self
7198 assert new_child
isa PExpr
7205 if _n_id
== old_child
then
7206 if new_child
!= null then
7207 new_child
.parent
= self
7208 assert new_child
isa TId
7215 for i
in [0.._n_args
.length
[ do
7216 if _n_args
[i
] == old_child
then
7217 if new_child
!= null then
7218 assert new_child
isa PExpr
7219 _n_args
[i
] = new_child
7220 new_child
.parent
= self
7222 _n_args
.remove_at
(i
)
7227 if _n_assign_op
== old_child
then
7228 if new_child
!= null then
7229 new_child
.parent
= self
7230 assert new_child
isa PAssignOp
7231 _n_assign_op
= new_child
7237 if _n_value
== old_child
then
7238 if new_child
!= null then
7239 new_child
.parent
= self
7240 assert new_child
isa PExpr
7241 _n_value
= new_child
7249 redef fun visit_all
(v
: Visitor)
7251 v
.enter_visit
(_n_expr
)
7252 v
.enter_visit
(_n_id
)
7256 v
.enter_visit
(_n_assign_op
)
7257 v
.enter_visit
(_n_value
)
7260 redef fun visit_all_reverse
(v
: Visitor)
7262 v
.enter_visit
(_n_expr
)
7263 v
.enter_visit
(_n_id
)
7265 var i
= _n_args
.length
7267 v
.enter_visit
(_n_args
[i
])
7271 v
.enter_visit
(_n_assign_op
)
7272 v
.enter_visit
(_n_value
)
7275 redef class ASuperExpr
7276 redef fun n_qualified
=(n
)
7283 redef fun n_kwsuper
=(n
)
7289 private init empty_init
do end
7291 init init_asuperexpr
(
7292 n_qualified
: nullable PQualified ,
7293 n_kwsuper
: nullable TKwsuper ,
7294 n_args
: Collection[Object] # Should be Collection[PExpr]
7298 _n_qualified
= n_qualified
7299 if n_qualified
!= null then
7300 n_qualified
.parent
= self
7302 _n_kwsuper
= n_kwsuper
.as(not null)
7303 n_kwsuper
.parent
= self
7311 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7313 if _n_qualified
== old_child
then
7314 if new_child
!= null then
7315 new_child
.parent
= self
7316 assert new_child
isa PQualified
7317 _n_qualified
= new_child
7323 if _n_kwsuper
== old_child
then
7324 if new_child
!= null then
7325 new_child
.parent
= self
7326 assert new_child
isa TKwsuper
7327 _n_kwsuper
= new_child
7333 for i
in [0.._n_args
.length
[ do
7334 if _n_args
[i
] == old_child
then
7335 if new_child
!= null then
7336 assert new_child
isa PExpr
7337 _n_args
[i
] = new_child
7338 new_child
.parent
= self
7340 _n_args
.remove_at
(i
)
7347 redef fun visit_all
(v
: Visitor)
7349 if _n_qualified
!= null then
7350 v
.enter_visit
(_n_qualified
.as(not null))
7352 v
.enter_visit
(_n_kwsuper
)
7358 redef fun visit_all_reverse
(v
: Visitor)
7360 if _n_qualified
!= null then
7361 v
.enter_visit
(_n_qualified
.as(not null))
7363 v
.enter_visit
(_n_kwsuper
)
7365 var i
= _n_args
.length
7367 v
.enter_visit
(_n_args
[i
])
7373 redef class AInitExpr
7374 redef fun n_expr
=(n
)
7379 redef fun n_kwinit
=(n
)
7385 private init empty_init
do end
7387 init init_ainitexpr
(
7388 n_expr
: nullable PExpr ,
7389 n_kwinit
: nullable TKwinit ,
7390 n_args
: Collection[Object] # Should be Collection[PExpr]
7394 _n_expr
= n_expr
.as(not null)
7395 n_expr
.parent
= self
7396 _n_kwinit
= n_kwinit
.as(not null)
7397 n_kwinit
.parent
= self
7405 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7407 if _n_expr
== old_child
then
7408 if new_child
!= null then
7409 new_child
.parent
= self
7410 assert new_child
isa PExpr
7417 if _n_kwinit
== old_child
then
7418 if new_child
!= null then
7419 new_child
.parent
= self
7420 assert new_child
isa TKwinit
7421 _n_kwinit
= new_child
7427 for i
in [0.._n_args
.length
[ do
7428 if _n_args
[i
] == old_child
then
7429 if new_child
!= null then
7430 assert new_child
isa PExpr
7431 _n_args
[i
] = new_child
7432 new_child
.parent
= self
7434 _n_args
.remove_at
(i
)
7441 redef fun visit_all
(v
: Visitor)
7443 v
.enter_visit
(_n_expr
)
7444 v
.enter_visit
(_n_kwinit
)
7450 redef fun visit_all_reverse
(v
: Visitor)
7452 v
.enter_visit
(_n_expr
)
7453 v
.enter_visit
(_n_kwinit
)
7455 var i
= _n_args
.length
7457 v
.enter_visit
(_n_args
[i
])
7463 redef class ABraExpr
7464 redef fun n_expr
=(n
)
7470 private init empty_init
do end
7472 init init_abraexpr
(
7473 n_expr
: nullable PExpr ,
7474 n_args
: Collection[Object] , # Should be Collection[PExpr]
7475 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
7479 _n_expr
= n_expr
.as(not null)
7480 n_expr
.parent
= self
7486 for n
in n_closure_defs
do
7487 assert n
isa PClosureDef
7488 _n_closure_defs
.add
(n
)
7493 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7495 if _n_expr
== old_child
then
7496 if new_child
!= null then
7497 new_child
.parent
= self
7498 assert new_child
isa PExpr
7505 for i
in [0.._n_args
.length
[ do
7506 if _n_args
[i
] == old_child
then
7507 if new_child
!= null then
7508 assert new_child
isa PExpr
7509 _n_args
[i
] = new_child
7510 new_child
.parent
= self
7512 _n_args
.remove_at
(i
)
7517 for i
in [0.._n_closure_defs
.length
[ do
7518 if _n_closure_defs
[i
] == old_child
then
7519 if new_child
!= null then
7520 assert new_child
isa PClosureDef
7521 _n_closure_defs
[i
] = new_child
7522 new_child
.parent
= self
7524 _n_closure_defs
.remove_at
(i
)
7531 redef fun visit_all
(v
: Visitor)
7533 v
.enter_visit
(_n_expr
)
7537 for n
in _n_closure_defs
do
7542 redef fun visit_all_reverse
(v
: Visitor)
7544 v
.enter_visit
(_n_expr
)
7546 var i
= _n_args
.length
7548 v
.enter_visit
(_n_args
[i
])
7553 var i
= _n_closure_defs
.length
7555 v
.enter_visit
(_n_closure_defs
[i
])
7561 redef class ABraAssignExpr
7562 redef fun n_expr
=(n
)
7567 redef fun n_assign
=(n
)
7572 redef fun n_value
=(n
)
7578 private init empty_init
do end
7580 init init_abraassignexpr
(
7581 n_expr
: nullable PExpr ,
7582 n_args
: Collection[Object] , # Should be Collection[PExpr]
7583 n_assign
: nullable TAssign ,
7584 n_value
: nullable PExpr
7588 _n_expr
= n_expr
.as(not null)
7589 n_expr
.parent
= self
7595 _n_assign
= n_assign
.as(not null)
7596 n_assign
.parent
= self
7597 _n_value
= n_value
.as(not null)
7598 n_value
.parent
= self
7601 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7603 if _n_expr
== old_child
then
7604 if new_child
!= null then
7605 new_child
.parent
= self
7606 assert new_child
isa PExpr
7613 for i
in [0.._n_args
.length
[ do
7614 if _n_args
[i
] == old_child
then
7615 if new_child
!= null then
7616 assert new_child
isa PExpr
7617 _n_args
[i
] = new_child
7618 new_child
.parent
= self
7620 _n_args
.remove_at
(i
)
7625 if _n_assign
== old_child
then
7626 if new_child
!= null then
7627 new_child
.parent
= self
7628 assert new_child
isa TAssign
7629 _n_assign
= new_child
7635 if _n_value
== old_child
then
7636 if new_child
!= null then
7637 new_child
.parent
= self
7638 assert new_child
isa PExpr
7639 _n_value
= new_child
7647 redef fun visit_all
(v
: Visitor)
7649 v
.enter_visit
(_n_expr
)
7653 v
.enter_visit
(_n_assign
)
7654 v
.enter_visit
(_n_value
)
7657 redef fun visit_all_reverse
(v
: Visitor)
7659 v
.enter_visit
(_n_expr
)
7661 var i
= _n_args
.length
7663 v
.enter_visit
(_n_args
[i
])
7667 v
.enter_visit
(_n_assign
)
7668 v
.enter_visit
(_n_value
)
7671 redef class ABraReassignExpr
7672 redef fun n_expr
=(n
)
7677 redef fun n_assign_op
=(n
)
7682 redef fun n_value
=(n
)
7688 private init empty_init
do end
7690 init init_abrareassignexpr
(
7691 n_expr
: nullable PExpr ,
7692 n_args
: Collection[Object] , # Should be Collection[PExpr]
7693 n_assign_op
: nullable PAssignOp ,
7694 n_value
: nullable PExpr
7698 _n_expr
= n_expr
.as(not null)
7699 n_expr
.parent
= self
7705 _n_assign_op
= n_assign_op
.as(not null)
7706 n_assign_op
.parent
= self
7707 _n_value
= n_value
.as(not null)
7708 n_value
.parent
= self
7711 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7713 if _n_expr
== old_child
then
7714 if new_child
!= null then
7715 new_child
.parent
= self
7716 assert new_child
isa PExpr
7723 for i
in [0.._n_args
.length
[ do
7724 if _n_args
[i
] == old_child
then
7725 if new_child
!= null then
7726 assert new_child
isa PExpr
7727 _n_args
[i
] = new_child
7728 new_child
.parent
= self
7730 _n_args
.remove_at
(i
)
7735 if _n_assign_op
== old_child
then
7736 if new_child
!= null then
7737 new_child
.parent
= self
7738 assert new_child
isa PAssignOp
7739 _n_assign_op
= new_child
7745 if _n_value
== old_child
then
7746 if new_child
!= null then
7747 new_child
.parent
= self
7748 assert new_child
isa PExpr
7749 _n_value
= new_child
7757 redef fun visit_all
(v
: Visitor)
7759 v
.enter_visit
(_n_expr
)
7763 v
.enter_visit
(_n_assign_op
)
7764 v
.enter_visit
(_n_value
)
7767 redef fun visit_all_reverse
(v
: Visitor)
7769 v
.enter_visit
(_n_expr
)
7771 var i
= _n_args
.length
7773 v
.enter_visit
(_n_args
[i
])
7777 v
.enter_visit
(_n_assign_op
)
7778 v
.enter_visit
(_n_value
)
7781 redef class AClosureCallExpr
7788 private init empty_init
do end
7790 init init_aclosurecallexpr
(
7791 n_id
: nullable TId ,
7792 n_args
: Collection[Object] , # Should be Collection[PExpr]
7793 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
7797 _n_id
= n_id
.as(not null)
7804 for n
in n_closure_defs
do
7805 assert n
isa PClosureDef
7806 _n_closure_defs
.add
(n
)
7811 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7813 if _n_id
== old_child
then
7814 if new_child
!= null then
7815 new_child
.parent
= self
7816 assert new_child
isa TId
7823 for i
in [0.._n_args
.length
[ do
7824 if _n_args
[i
] == old_child
then
7825 if new_child
!= null then
7826 assert new_child
isa PExpr
7827 _n_args
[i
] = new_child
7828 new_child
.parent
= self
7830 _n_args
.remove_at
(i
)
7835 for i
in [0.._n_closure_defs
.length
[ do
7836 if _n_closure_defs
[i
] == old_child
then
7837 if new_child
!= null then
7838 assert new_child
isa PClosureDef
7839 _n_closure_defs
[i
] = new_child
7840 new_child
.parent
= self
7842 _n_closure_defs
.remove_at
(i
)
7849 redef fun visit_all
(v
: Visitor)
7851 v
.enter_visit
(_n_id
)
7855 for n
in _n_closure_defs
do
7860 redef fun visit_all_reverse
(v
: Visitor)
7862 v
.enter_visit
(_n_id
)
7864 var i
= _n_args
.length
7866 v
.enter_visit
(_n_args
[i
])
7871 var i
= _n_closure_defs
.length
7873 v
.enter_visit
(_n_closure_defs
[i
])
7879 redef class AVarExpr
7886 private init empty_init
do end
7888 init init_avarexpr
(
7893 _n_id
= n_id
.as(not null)
7897 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7899 if _n_id
== old_child
then
7900 if new_child
!= null then
7901 new_child
.parent
= self
7902 assert new_child
isa TId
7911 redef fun visit_all
(v
: Visitor)
7913 v
.enter_visit
(_n_id
)
7916 redef fun visit_all_reverse
(v
: Visitor)
7918 v
.enter_visit
(_n_id
)
7921 redef class AVarAssignExpr
7927 redef fun n_assign
=(n
)
7932 redef fun n_value
=(n
)
7938 private init empty_init
do end
7940 init init_avarassignexpr
(
7941 n_id
: nullable TId ,
7942 n_assign
: nullable TAssign ,
7943 n_value
: nullable PExpr
7947 _n_id
= n_id
.as(not null)
7949 _n_assign
= n_assign
.as(not null)
7950 n_assign
.parent
= self
7951 _n_value
= n_value
.as(not null)
7952 n_value
.parent
= self
7955 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7957 if _n_id
== old_child
then
7958 if new_child
!= null then
7959 new_child
.parent
= self
7960 assert new_child
isa TId
7967 if _n_assign
== old_child
then
7968 if new_child
!= null then
7969 new_child
.parent
= self
7970 assert new_child
isa TAssign
7971 _n_assign
= new_child
7977 if _n_value
== old_child
then
7978 if new_child
!= null then
7979 new_child
.parent
= self
7980 assert new_child
isa PExpr
7981 _n_value
= new_child
7989 redef fun visit_all
(v
: Visitor)
7991 v
.enter_visit
(_n_id
)
7992 v
.enter_visit
(_n_assign
)
7993 v
.enter_visit
(_n_value
)
7996 redef fun visit_all_reverse
(v
: Visitor)
7998 v
.enter_visit
(_n_id
)
7999 v
.enter_visit
(_n_assign
)
8000 v
.enter_visit
(_n_value
)
8003 redef class AVarReassignExpr
8009 redef fun n_assign_op
=(n
)
8014 redef fun n_value
=(n
)
8020 private init empty_init
do end
8022 init init_avarreassignexpr
(
8023 n_id
: nullable TId ,
8024 n_assign_op
: nullable PAssignOp ,
8025 n_value
: nullable PExpr
8029 _n_id
= n_id
.as(not null)
8031 _n_assign_op
= n_assign_op
.as(not null)
8032 n_assign_op
.parent
= self
8033 _n_value
= n_value
.as(not null)
8034 n_value
.parent
= self
8037 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8039 if _n_id
== old_child
then
8040 if new_child
!= null then
8041 new_child
.parent
= self
8042 assert new_child
isa TId
8049 if _n_assign_op
== old_child
then
8050 if new_child
!= null then
8051 new_child
.parent
= self
8052 assert new_child
isa PAssignOp
8053 _n_assign_op
= new_child
8059 if _n_value
== old_child
then
8060 if new_child
!= null then
8061 new_child
.parent
= self
8062 assert new_child
isa PExpr
8063 _n_value
= new_child
8071 redef fun visit_all
(v
: Visitor)
8073 v
.enter_visit
(_n_id
)
8074 v
.enter_visit
(_n_assign_op
)
8075 v
.enter_visit
(_n_value
)
8078 redef fun visit_all_reverse
(v
: Visitor)
8080 v
.enter_visit
(_n_id
)
8081 v
.enter_visit
(_n_assign_op
)
8082 v
.enter_visit
(_n_value
)
8085 redef class ARangeExpr
8086 redef fun n_expr
=(n
)
8091 redef fun n_expr2
=(n
)
8097 private init empty_init
do end
8099 init init_arangeexpr
(
8100 n_expr
: nullable PExpr ,
8101 n_expr2
: nullable PExpr
8105 _n_expr
= n_expr
.as(not null)
8106 n_expr
.parent
= self
8107 _n_expr2
= n_expr2
.as(not null)
8108 n_expr2
.parent
= self
8111 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8113 if _n_expr
== old_child
then
8114 if new_child
!= null then
8115 new_child
.parent
= self
8116 assert new_child
isa PExpr
8123 if _n_expr2
== old_child
then
8124 if new_child
!= null then
8125 new_child
.parent
= self
8126 assert new_child
isa PExpr
8127 _n_expr2
= new_child
8135 redef fun visit_all
(v
: Visitor)
8137 v
.enter_visit
(_n_expr
)
8138 v
.enter_visit
(_n_expr2
)
8141 redef fun visit_all_reverse
(v
: Visitor)
8143 v
.enter_visit
(_n_expr
)
8144 v
.enter_visit
(_n_expr2
)
8147 redef class ACrangeExpr
8148 redef fun n_expr
=(n
)
8153 redef fun n_expr2
=(n
)
8159 private init empty_init
do end
8161 init init_acrangeexpr
(
8162 n_expr
: nullable PExpr ,
8163 n_expr2
: nullable PExpr
8167 _n_expr
= n_expr
.as(not null)
8168 n_expr
.parent
= self
8169 _n_expr2
= n_expr2
.as(not null)
8170 n_expr2
.parent
= self
8173 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8175 if _n_expr
== old_child
then
8176 if new_child
!= null then
8177 new_child
.parent
= self
8178 assert new_child
isa PExpr
8185 if _n_expr2
== old_child
then
8186 if new_child
!= null then
8187 new_child
.parent
= self
8188 assert new_child
isa PExpr
8189 _n_expr2
= new_child
8197 redef fun visit_all
(v
: Visitor)
8199 v
.enter_visit
(_n_expr
)
8200 v
.enter_visit
(_n_expr2
)
8203 redef fun visit_all_reverse
(v
: Visitor)
8205 v
.enter_visit
(_n_expr
)
8206 v
.enter_visit
(_n_expr2
)
8209 redef class AOrangeExpr
8210 redef fun n_expr
=(n
)
8215 redef fun n_expr2
=(n
)
8221 private init empty_init
do end
8223 init init_aorangeexpr
(
8224 n_expr
: nullable PExpr ,
8225 n_expr2
: nullable PExpr
8229 _n_expr
= n_expr
.as(not null)
8230 n_expr
.parent
= self
8231 _n_expr2
= n_expr2
.as(not null)
8232 n_expr2
.parent
= self
8235 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8237 if _n_expr
== old_child
then
8238 if new_child
!= null then
8239 new_child
.parent
= self
8240 assert new_child
isa PExpr
8247 if _n_expr2
== old_child
then
8248 if new_child
!= null then
8249 new_child
.parent
= self
8250 assert new_child
isa PExpr
8251 _n_expr2
= new_child
8259 redef fun visit_all
(v
: Visitor)
8261 v
.enter_visit
(_n_expr
)
8262 v
.enter_visit
(_n_expr2
)
8265 redef fun visit_all_reverse
(v
: Visitor)
8267 v
.enter_visit
(_n_expr
)
8268 v
.enter_visit
(_n_expr2
)
8271 redef class AArrayExpr
8273 private init empty_init
do end
8275 init init_aarrayexpr
(
8276 n_exprs
: Collection[Object] # Should be Collection[PExpr]
8287 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8289 for i
in [0.._n_exprs
.length
[ do
8290 if _n_exprs
[i
] == old_child
then
8291 if new_child
!= null then
8292 assert new_child
isa PExpr
8293 _n_exprs
[i
] = new_child
8294 new_child
.parent
= self
8296 _n_exprs
.remove_at
(i
)
8303 redef fun visit_all
(v
: Visitor)
8305 for n
in _n_exprs
do
8310 redef fun visit_all_reverse
(v
: Visitor)
8313 var i
= _n_exprs
.length
8315 v
.enter_visit
(_n_exprs
[i
])
8321 redef class ASelfExpr
8322 redef fun n_kwself
=(n
)
8328 private init empty_init
do end
8330 init init_aselfexpr
(
8331 n_kwself
: nullable TKwself
8335 _n_kwself
= n_kwself
.as(not null)
8336 n_kwself
.parent
= self
8339 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8341 if _n_kwself
== old_child
then
8342 if new_child
!= null then
8343 new_child
.parent
= self
8344 assert new_child
isa TKwself
8345 _n_kwself
= new_child
8353 redef fun visit_all
(v
: Visitor)
8355 v
.enter_visit
(_n_kwself
)
8358 redef fun visit_all_reverse
(v
: Visitor)
8360 v
.enter_visit
(_n_kwself
)
8363 redef class AImplicitSelfExpr
8365 private init empty_init
do end
8367 init init_aimplicitselfexpr
8372 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8376 redef fun visit_all
(v
: Visitor)
8380 redef fun visit_all_reverse
(v
: Visitor)
8384 redef class ATrueExpr
8385 redef fun n_kwtrue
=(n
)
8391 private init empty_init
do end
8393 init init_atrueexpr
(
8394 n_kwtrue
: nullable TKwtrue
8398 _n_kwtrue
= n_kwtrue
.as(not null)
8399 n_kwtrue
.parent
= self
8402 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8404 if _n_kwtrue
== old_child
then
8405 if new_child
!= null then
8406 new_child
.parent
= self
8407 assert new_child
isa TKwtrue
8408 _n_kwtrue
= new_child
8416 redef fun visit_all
(v
: Visitor)
8418 v
.enter_visit
(_n_kwtrue
)
8421 redef fun visit_all_reverse
(v
: Visitor)
8423 v
.enter_visit
(_n_kwtrue
)
8426 redef class AFalseExpr
8427 redef fun n_kwfalse
=(n
)
8433 private init empty_init
do end
8435 init init_afalseexpr
(
8436 n_kwfalse
: nullable TKwfalse
8440 _n_kwfalse
= n_kwfalse
.as(not null)
8441 n_kwfalse
.parent
= self
8444 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8446 if _n_kwfalse
== old_child
then
8447 if new_child
!= null then
8448 new_child
.parent
= self
8449 assert new_child
isa TKwfalse
8450 _n_kwfalse
= new_child
8458 redef fun visit_all
(v
: Visitor)
8460 v
.enter_visit
(_n_kwfalse
)
8463 redef fun visit_all_reverse
(v
: Visitor)
8465 v
.enter_visit
(_n_kwfalse
)
8468 redef class ANullExpr
8469 redef fun n_kwnull
=(n
)
8475 private init empty_init
do end
8477 init init_anullexpr
(
8478 n_kwnull
: nullable TKwnull
8482 _n_kwnull
= n_kwnull
.as(not null)
8483 n_kwnull
.parent
= self
8486 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8488 if _n_kwnull
== old_child
then
8489 if new_child
!= null then
8490 new_child
.parent
= self
8491 assert new_child
isa TKwnull
8492 _n_kwnull
= new_child
8500 redef fun visit_all
(v
: Visitor)
8502 v
.enter_visit
(_n_kwnull
)
8505 redef fun visit_all_reverse
(v
: Visitor)
8507 v
.enter_visit
(_n_kwnull
)
8510 redef class AIntExpr
8511 redef fun n_number
=(n
)
8517 private init empty_init
do end
8519 init init_aintexpr
(
8520 n_number
: nullable TNumber
8524 _n_number
= n_number
.as(not null)
8525 n_number
.parent
= self
8528 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8530 if _n_number
== old_child
then
8531 if new_child
!= null then
8532 new_child
.parent
= self
8533 assert new_child
isa TNumber
8534 _n_number
= new_child
8542 redef fun visit_all
(v
: Visitor)
8544 v
.enter_visit
(_n_number
)
8547 redef fun visit_all_reverse
(v
: Visitor)
8549 v
.enter_visit
(_n_number
)
8552 redef class AFloatExpr
8553 redef fun n_float
=(n
)
8559 private init empty_init
do end
8561 init init_afloatexpr
(
8562 n_float
: nullable TFloat
8566 _n_float
= n_float
.as(not null)
8567 n_float
.parent
= self
8570 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8572 if _n_float
== old_child
then
8573 if new_child
!= null then
8574 new_child
.parent
= self
8575 assert new_child
isa TFloat
8576 _n_float
= new_child
8584 redef fun visit_all
(v
: Visitor)
8586 v
.enter_visit
(_n_float
)
8589 redef fun visit_all_reverse
(v
: Visitor)
8591 v
.enter_visit
(_n_float
)
8594 redef class ACharExpr
8595 redef fun n_char
=(n
)
8601 private init empty_init
do end
8603 init init_acharexpr
(
8604 n_char
: nullable TChar
8608 _n_char
= n_char
.as(not null)
8609 n_char
.parent
= self
8612 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8614 if _n_char
== old_child
then
8615 if new_child
!= null then
8616 new_child
.parent
= self
8617 assert new_child
isa TChar
8626 redef fun visit_all
(v
: Visitor)
8628 v
.enter_visit
(_n_char
)
8631 redef fun visit_all_reverse
(v
: Visitor)
8633 v
.enter_visit
(_n_char
)
8636 redef class AStringExpr
8637 redef fun n_string
=(n
)
8643 private init empty_init
do end
8645 init init_astringexpr
(
8646 n_string
: nullable TString
8650 _n_string
= n_string
.as(not null)
8651 n_string
.parent
= self
8654 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8656 if _n_string
== old_child
then
8657 if new_child
!= null then
8658 new_child
.parent
= self
8659 assert new_child
isa TString
8660 _n_string
= new_child
8668 redef fun visit_all
(v
: Visitor)
8670 v
.enter_visit
(_n_string
)
8673 redef fun visit_all_reverse
(v
: Visitor)
8675 v
.enter_visit
(_n_string
)
8678 redef class AStartStringExpr
8679 redef fun n_string
=(n
)
8685 private init empty_init
do end
8687 init init_astartstringexpr
(
8688 n_string
: nullable TStartString
8692 _n_string
= n_string
.as(not null)
8693 n_string
.parent
= self
8696 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8698 if _n_string
== old_child
then
8699 if new_child
!= null then
8700 new_child
.parent
= self
8701 assert new_child
isa TStartString
8702 _n_string
= new_child
8710 redef fun visit_all
(v
: Visitor)
8712 v
.enter_visit
(_n_string
)
8715 redef fun visit_all_reverse
(v
: Visitor)
8717 v
.enter_visit
(_n_string
)
8720 redef class AMidStringExpr
8721 redef fun n_string
=(n
)
8727 private init empty_init
do end
8729 init init_amidstringexpr
(
8730 n_string
: nullable TMidString
8734 _n_string
= n_string
.as(not null)
8735 n_string
.parent
= self
8738 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8740 if _n_string
== old_child
then
8741 if new_child
!= null then
8742 new_child
.parent
= self
8743 assert new_child
isa TMidString
8744 _n_string
= new_child
8752 redef fun visit_all
(v
: Visitor)
8754 v
.enter_visit
(_n_string
)
8757 redef fun visit_all_reverse
(v
: Visitor)
8759 v
.enter_visit
(_n_string
)
8762 redef class AEndStringExpr
8763 redef fun n_string
=(n
)
8769 private init empty_init
do end
8771 init init_aendstringexpr
(
8772 n_string
: nullable TEndString
8776 _n_string
= n_string
.as(not null)
8777 n_string
.parent
= self
8780 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8782 if _n_string
== old_child
then
8783 if new_child
!= null then
8784 new_child
.parent
= self
8785 assert new_child
isa TEndString
8786 _n_string
= new_child
8794 redef fun visit_all
(v
: Visitor)
8796 v
.enter_visit
(_n_string
)
8799 redef fun visit_all_reverse
(v
: Visitor)
8801 v
.enter_visit
(_n_string
)
8804 redef class ASuperstringExpr
8806 private init empty_init
do end
8808 init init_asuperstringexpr
(
8809 n_exprs
: Collection[Object] # Should be Collection[PExpr]
8820 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8822 for i
in [0.._n_exprs
.length
[ do
8823 if _n_exprs
[i
] == old_child
then
8824 if new_child
!= null then
8825 assert new_child
isa PExpr
8826 _n_exprs
[i
] = new_child
8827 new_child
.parent
= self
8829 _n_exprs
.remove_at
(i
)
8836 redef fun visit_all
(v
: Visitor)
8838 for n
in _n_exprs
do
8843 redef fun visit_all_reverse
(v
: Visitor)
8846 var i
= _n_exprs
.length
8848 v
.enter_visit
(_n_exprs
[i
])
8854 redef class AParExpr
8855 redef fun n_expr
=(n
)
8861 private init empty_init
do end
8863 init init_aparexpr
(
8864 n_expr
: nullable PExpr
8868 _n_expr
= n_expr
.as(not null)
8869 n_expr
.parent
= self
8872 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8874 if _n_expr
== old_child
then
8875 if new_child
!= null then
8876 new_child
.parent
= self
8877 assert new_child
isa PExpr
8886 redef fun visit_all
(v
: Visitor)
8888 v
.enter_visit
(_n_expr
)
8891 redef fun visit_all_reverse
(v
: Visitor)
8893 v
.enter_visit
(_n_expr
)
8896 redef class AAsCastExpr
8897 redef fun n_expr
=(n
)
8902 redef fun n_kwas
=(n
)
8907 redef fun n_type
=(n
)
8913 private init empty_init
do end
8915 init init_aascastexpr
(
8916 n_expr
: nullable PExpr ,
8917 n_kwas
: nullable TKwas ,
8918 n_type
: nullable PType
8922 _n_expr
= n_expr
.as(not null)
8923 n_expr
.parent
= self
8924 _n_kwas
= n_kwas
.as(not null)
8925 n_kwas
.parent
= self
8926 _n_type
= n_type
.as(not null)
8927 n_type
.parent
= self
8930 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8932 if _n_expr
== old_child
then
8933 if new_child
!= null then
8934 new_child
.parent
= self
8935 assert new_child
isa PExpr
8942 if _n_kwas
== old_child
then
8943 if new_child
!= null then
8944 new_child
.parent
= self
8945 assert new_child
isa TKwas
8952 if _n_type
== old_child
then
8953 if new_child
!= null then
8954 new_child
.parent
= self
8955 assert new_child
isa PType
8964 redef fun visit_all
(v
: Visitor)
8966 v
.enter_visit
(_n_expr
)
8967 v
.enter_visit
(_n_kwas
)
8968 v
.enter_visit
(_n_type
)
8971 redef fun visit_all_reverse
(v
: Visitor)
8973 v
.enter_visit
(_n_expr
)
8974 v
.enter_visit
(_n_kwas
)
8975 v
.enter_visit
(_n_type
)
8978 redef class AAsNotnullExpr
8979 redef fun n_expr
=(n
)
8984 redef fun n_kwas
=(n
)
8989 redef fun n_kwnot
=(n
)
8994 redef fun n_kwnull
=(n
)
9000 private init empty_init
do end
9002 init init_aasnotnullexpr
(
9003 n_expr
: nullable PExpr ,
9004 n_kwas
: nullable TKwas ,
9005 n_kwnot
: nullable TKwnot ,
9006 n_kwnull
: nullable TKwnull
9010 _n_expr
= n_expr
.as(not null)
9011 n_expr
.parent
= self
9012 _n_kwas
= n_kwas
.as(not null)
9013 n_kwas
.parent
= self
9014 _n_kwnot
= n_kwnot
.as(not null)
9015 n_kwnot
.parent
= self
9016 _n_kwnull
= n_kwnull
.as(not null)
9017 n_kwnull
.parent
= self
9020 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9022 if _n_expr
== old_child
then
9023 if new_child
!= null then
9024 new_child
.parent
= self
9025 assert new_child
isa PExpr
9032 if _n_kwas
== old_child
then
9033 if new_child
!= null then
9034 new_child
.parent
= self
9035 assert new_child
isa TKwas
9042 if _n_kwnot
== old_child
then
9043 if new_child
!= null then
9044 new_child
.parent
= self
9045 assert new_child
isa TKwnot
9046 _n_kwnot
= new_child
9052 if _n_kwnull
== old_child
then
9053 if new_child
!= null then
9054 new_child
.parent
= self
9055 assert new_child
isa TKwnull
9056 _n_kwnull
= new_child
9064 redef fun visit_all
(v
: Visitor)
9066 v
.enter_visit
(_n_expr
)
9067 v
.enter_visit
(_n_kwas
)
9068 v
.enter_visit
(_n_kwnot
)
9069 v
.enter_visit
(_n_kwnull
)
9072 redef fun visit_all_reverse
(v
: Visitor)
9074 v
.enter_visit
(_n_expr
)
9075 v
.enter_visit
(_n_kwas
)
9076 v
.enter_visit
(_n_kwnot
)
9077 v
.enter_visit
(_n_kwnull
)
9080 redef class AIssetAttrExpr
9081 redef fun n_kwisset
=(n
)
9086 redef fun n_expr
=(n
)
9097 private init empty_init
do end
9099 init init_aissetattrexpr
(
9100 n_kwisset
: nullable TKwisset ,
9101 n_expr
: nullable PExpr ,
9102 n_id
: nullable TAttrid
9106 _n_kwisset
= n_kwisset
.as(not null)
9107 n_kwisset
.parent
= self
9108 _n_expr
= n_expr
.as(not null)
9109 n_expr
.parent
= self
9110 _n_id
= n_id
.as(not null)
9114 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9116 if _n_kwisset
== old_child
then
9117 if new_child
!= null then
9118 new_child
.parent
= self
9119 assert new_child
isa TKwisset
9120 _n_kwisset
= new_child
9126 if _n_expr
== old_child
then
9127 if new_child
!= null then
9128 new_child
.parent
= self
9129 assert new_child
isa PExpr
9136 if _n_id
== old_child
then
9137 if new_child
!= null then
9138 new_child
.parent
= self
9139 assert new_child
isa TAttrid
9148 redef fun visit_all
(v
: Visitor)
9150 v
.enter_visit
(_n_kwisset
)
9151 v
.enter_visit
(_n_expr
)
9152 v
.enter_visit
(_n_id
)
9155 redef fun visit_all_reverse
(v
: Visitor)
9157 v
.enter_visit
(_n_kwisset
)
9158 v
.enter_visit
(_n_expr
)
9159 v
.enter_visit
(_n_id
)
9162 redef class APlusAssignOp
9163 redef fun n_pluseq
=(n
)
9169 private init empty_init
do end
9171 init init_aplusassignop
(
9172 n_pluseq
: nullable TPluseq
9176 _n_pluseq
= n_pluseq
.as(not null)
9177 n_pluseq
.parent
= self
9180 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9182 if _n_pluseq
== old_child
then
9183 if new_child
!= null then
9184 new_child
.parent
= self
9185 assert new_child
isa TPluseq
9186 _n_pluseq
= new_child
9194 redef fun visit_all
(v
: Visitor)
9196 v
.enter_visit
(_n_pluseq
)
9199 redef fun visit_all_reverse
(v
: Visitor)
9201 v
.enter_visit
(_n_pluseq
)
9204 redef class AMinusAssignOp
9205 redef fun n_minuseq
=(n
)
9211 private init empty_init
do end
9213 init init_aminusassignop
(
9214 n_minuseq
: nullable TMinuseq
9218 _n_minuseq
= n_minuseq
.as(not null)
9219 n_minuseq
.parent
= self
9222 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9224 if _n_minuseq
== old_child
then
9225 if new_child
!= null then
9226 new_child
.parent
= self
9227 assert new_child
isa TMinuseq
9228 _n_minuseq
= new_child
9236 redef fun visit_all
(v
: Visitor)
9238 v
.enter_visit
(_n_minuseq
)
9241 redef fun visit_all_reverse
(v
: Visitor)
9243 v
.enter_visit
(_n_minuseq
)
9246 redef class AClosureDef
9247 redef fun n_kwwith
=(n
)
9252 redef fun n_kwdo
=(n
)
9257 redef fun n_expr
=(n
)
9265 private init empty_init
do end
9267 init init_aclosuredef
(
9268 n_kwwith
: nullable TKwwith ,
9269 n_id
: Collection[Object] , # Should be Collection[TId]
9270 n_kwdo
: nullable TKwdo ,
9271 n_expr
: nullable PExpr
9275 _n_kwwith
= n_kwwith
.as(not null)
9276 n_kwwith
.parent
= self
9282 _n_kwdo
= n_kwdo
.as(not null)
9283 n_kwdo
.parent
= self
9285 if n_expr
!= null then
9286 n_expr
.parent
= self
9290 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9292 if _n_kwwith
== old_child
then
9293 if new_child
!= null then
9294 new_child
.parent
= self
9295 assert new_child
isa TKwwith
9296 _n_kwwith
= new_child
9302 for i
in [0.._n_id
.length
[ do
9303 if _n_id
[i
] == old_child
then
9304 if new_child
!= null then
9305 assert new_child
isa TId
9306 _n_id
[i
] = new_child
9307 new_child
.parent
= self
9314 if _n_kwdo
== old_child
then
9315 if new_child
!= null then
9316 new_child
.parent
= self
9317 assert new_child
isa TKwdo
9324 if _n_expr
== old_child
then
9325 if new_child
!= null then
9326 new_child
.parent
= self
9327 assert new_child
isa PExpr
9336 redef fun visit_all
(v
: Visitor)
9338 v
.enter_visit
(_n_kwwith
)
9342 v
.enter_visit
(_n_kwdo
)
9343 if _n_expr
!= null then
9344 v
.enter_visit
(_n_expr
.as(not null))
9348 redef fun visit_all_reverse
(v
: Visitor)
9350 v
.enter_visit
(_n_kwwith
)
9352 var i
= _n_id
.length
9354 v
.enter_visit
(_n_id
[i
])
9358 v
.enter_visit
(_n_kwdo
)
9359 if _n_expr
!= null then
9360 v
.enter_visit
(_n_expr
.as(not null))
9364 redef class AQualified
9365 redef fun n_classid
=(n
)
9373 private init empty_init
do end
9375 init init_aqualified
(
9376 n_id
: Collection[Object] , # Should be Collection[TId]
9377 n_classid
: nullable TClassid
9386 _n_classid
= n_classid
9387 if n_classid
!= null then
9388 n_classid
.parent
= self
9392 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9394 for i
in [0.._n_id
.length
[ do
9395 if _n_id
[i
] == old_child
then
9396 if new_child
!= null then
9397 assert new_child
isa TId
9398 _n_id
[i
] = new_child
9399 new_child
.parent
= self
9406 if _n_classid
== old_child
then
9407 if new_child
!= null then
9408 new_child
.parent
= self
9409 assert new_child
isa TClassid
9410 _n_classid
= new_child
9418 redef fun visit_all
(v
: Visitor)
9423 if _n_classid
!= null then
9424 v
.enter_visit
(_n_classid
.as(not null))
9428 redef fun visit_all_reverse
(v
: Visitor)
9431 var i
= _n_id
.length
9433 v
.enter_visit
(_n_id
[i
])
9437 if _n_classid
!= null then
9438 v
.enter_visit
(_n_classid
.as(not null))
9444 private init empty_init
do end
9447 n_comment
: Collection[Object] # Should be Collection[TComment]
9451 for n
in n_comment
do
9452 assert n
isa TComment
9458 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9460 for i
in [0.._n_comment
.length
[ do
9461 if _n_comment
[i
] == old_child
then
9462 if new_child
!= null then
9463 assert new_child
isa TComment
9464 _n_comment
[i
] = new_child
9465 new_child
.parent
= self
9467 _n_comment
.remove_at
(i
)
9474 redef fun visit_all
(v
: Visitor)
9476 for n
in _n_comment
do
9481 redef fun visit_all_reverse
(v
: Visitor)
9484 var i
= _n_comment
.length
9486 v
.enter_visit
(_n_comment
[i
])
9495 n_base
: nullable PModule,
9502 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9504 if _n_base
== old_child
then
9505 if new_child
== null then
9507 new_child
.parent
= self
9508 assert new_child
isa PModule
9511 old_child
.parent
= null
9516 redef fun visit_all
(v
: Visitor)
9518 if _n_base
!= null then
9519 v
.enter_visit
(_n_base
.as(not null))
9523 redef fun visit_all_reverse
(v
: Visitor)
9525 if _n_base
!= null then
9526 v
.enter_visit
(_n_base
.as(not null))