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 # Give a human readable location of the node.
40 if location
== null then
46 # Debug method: output a message prefixed with the location.
47 fun printl
(str
: String)
49 print
("{locate}: {str}\n")
54 redef fun visit_all
(v
: Visitor) do end
55 redef fun visit_all_reverse
(v
: Visitor) do end
56 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode) do end
60 # The first token of the production node
61 readable writable var _first_token
: nullable Token
63 # The last token of the production node
64 readable writable var _last_token
: nullable Token
66 redef fun replace_with
(n
: PNode)
70 n
.first_token
= first_token
71 n
.last_token
= last_token
76 # Abstract standard visitor
78 # What the visitor do when a node is visited
79 # Concrete visitors should redefine this method.
80 protected fun visit
(e
: nullable PNode) is abstract
82 # Ask the visitor to visit a given node.
83 # Usually automatically called by visit_all* methods.
84 # This methos should not be redefined
85 fun enter_visit
(e
: nullable PNode)
87 var old
= _current_node
93 # The current visited node
94 readable var _current_node
: nullable PNode = null
98 redef fun n_packagedecl
=(n
)
106 private init empty_init
do end
109 n_packagedecl
: nullable PPackagedecl ,
110 n_imports
: Collection[Object] , # Should be Collection[PImport]
111 n_classdefs
: Collection[Object] # Should be Collection[PClassdef]
115 _n_packagedecl
= n_packagedecl
116 if n_packagedecl
!= null then
117 n_packagedecl
.parent
= self
119 for n
in n_imports
do
124 for n
in n_classdefs
do
125 assert n
isa PClassdef
131 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
133 if _n_packagedecl
== old_child
then
134 if new_child
!= null then
135 new_child
.parent
= self
136 assert new_child
isa PPackagedecl
137 _n_packagedecl
= new_child
139 _n_packagedecl
= null
143 for i
in [0.._n_imports
.length
[ do
144 if _n_imports
[i
] == old_child
then
145 if new_child
!= null then
146 assert new_child
isa PImport
147 _n_imports
[i
] = new_child
148 new_child
.parent
= self
150 _n_imports
.remove_at
(i
)
155 for i
in [0.._n_classdefs
.length
[ do
156 if _n_classdefs
[i
] == old_child
then
157 if new_child
!= null then
158 assert new_child
isa PClassdef
159 _n_classdefs
[i
] = new_child
160 new_child
.parent
= self
162 _n_classdefs
.remove_at
(i
)
169 redef fun visit_all
(v
: Visitor)
171 if _n_packagedecl
!= null then
172 v
.enter_visit
(_n_packagedecl
.as(not null))
174 for n
in _n_imports
do
177 for n
in _n_classdefs
do
182 redef fun visit_all_reverse
(v
: Visitor)
184 if _n_packagedecl
!= null then
185 v
.enter_visit
(_n_packagedecl
.as(not null))
188 var i
= _n_imports
.length
190 v
.enter_visit
(_n_imports
[i
])
195 var i
= _n_classdefs
.length
197 v
.enter_visit
(_n_classdefs
[i
])
203 redef class APackagedecl
211 redef fun n_kwpackage
=(n
)
222 private init empty_init
do end
224 init init_apackagedecl
(
225 n_doc
: nullable PDoc ,
226 n_kwpackage
: nullable TKwpackage ,
232 if n_doc
!= null then
235 _n_kwpackage
= n_kwpackage
.as(not null)
236 n_kwpackage
.parent
= self
237 _n_id
= n_id
.as(not null)
241 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
243 if _n_doc
== old_child
then
244 if new_child
!= null then
245 new_child
.parent
= self
246 assert new_child
isa PDoc
253 if _n_kwpackage
== old_child
then
254 if new_child
!= null then
255 new_child
.parent
= self
256 assert new_child
isa TKwpackage
257 _n_kwpackage
= new_child
263 if _n_id
== old_child
then
264 if new_child
!= null then
265 new_child
.parent
= self
266 assert new_child
isa TId
275 redef fun visit_all
(v
: Visitor)
277 if _n_doc
!= null then
278 v
.enter_visit
(_n_doc
.as(not null))
280 v
.enter_visit
(_n_kwpackage
)
284 redef fun visit_all_reverse
(v
: Visitor)
286 if _n_doc
!= null then
287 v
.enter_visit
(_n_doc
.as(not null))
289 v
.enter_visit
(_n_kwpackage
)
294 redef fun n_visibility
=(n
)
299 redef fun n_kwimport
=(n
)
310 private init empty_init
do end
313 n_visibility
: nullable PVisibility ,
314 n_kwimport
: nullable TKwimport ,
319 _n_visibility
= n_visibility
.as(not null)
320 n_visibility
.parent
= self
321 _n_kwimport
= n_kwimport
.as(not null)
322 n_kwimport
.parent
= self
323 _n_id
= n_id
.as(not null)
327 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
329 if _n_visibility
== old_child
then
330 if new_child
!= null then
331 new_child
.parent
= self
332 assert new_child
isa PVisibility
333 _n_visibility
= new_child
339 if _n_kwimport
== old_child
then
340 if new_child
!= null then
341 new_child
.parent
= self
342 assert new_child
isa TKwimport
343 _n_kwimport
= new_child
349 if _n_id
== old_child
then
350 if new_child
!= null then
351 new_child
.parent
= self
352 assert new_child
isa TId
361 redef fun visit_all
(v
: Visitor)
363 v
.enter_visit
(_n_visibility
)
364 v
.enter_visit
(_n_kwimport
)
368 redef fun visit_all_reverse
(v
: Visitor)
370 v
.enter_visit
(_n_visibility
)
371 v
.enter_visit
(_n_kwimport
)
375 redef class ANoImport
376 redef fun n_visibility
=(n
)
381 redef fun n_kwimport
=(n
)
386 redef fun n_kwend
=(n
)
392 private init empty_init
do end
394 init init_anoimport
(
395 n_visibility
: nullable PVisibility ,
396 n_kwimport
: nullable TKwimport ,
397 n_kwend
: nullable TKwend
401 _n_visibility
= n_visibility
.as(not null)
402 n_visibility
.parent
= self
403 _n_kwimport
= n_kwimport
.as(not null)
404 n_kwimport
.parent
= self
405 _n_kwend
= n_kwend
.as(not null)
406 n_kwend
.parent
= self
409 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
411 if _n_visibility
== old_child
then
412 if new_child
!= null then
413 new_child
.parent
= self
414 assert new_child
isa PVisibility
415 _n_visibility
= new_child
421 if _n_kwimport
== old_child
then
422 if new_child
!= null then
423 new_child
.parent
= self
424 assert new_child
isa TKwimport
425 _n_kwimport
= new_child
431 if _n_kwend
== old_child
then
432 if new_child
!= null then
433 new_child
.parent
= self
434 assert new_child
isa TKwend
443 redef fun visit_all
(v
: Visitor)
445 v
.enter_visit
(_n_visibility
)
446 v
.enter_visit
(_n_kwimport
)
447 v
.enter_visit
(_n_kwend
)
450 redef fun visit_all_reverse
(v
: Visitor)
452 v
.enter_visit
(_n_visibility
)
453 v
.enter_visit
(_n_kwimport
)
454 v
.enter_visit
(_n_kwend
)
457 redef class APublicVisibility
459 private init empty_init
do end
461 init init_apublicvisibility
466 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
470 redef fun visit_all
(v
: Visitor)
474 redef fun visit_all_reverse
(v
: Visitor)
478 redef class APrivateVisibility
479 redef fun n_kwprivate
=(n
)
485 private init empty_init
do end
487 init init_aprivatevisibility
(
488 n_kwprivate
: nullable TKwprivate
492 _n_kwprivate
= n_kwprivate
.as(not null)
493 n_kwprivate
.parent
= self
496 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
498 if _n_kwprivate
== old_child
then
499 if new_child
!= null then
500 new_child
.parent
= self
501 assert new_child
isa TKwprivate
502 _n_kwprivate
= new_child
510 redef fun visit_all
(v
: Visitor)
512 v
.enter_visit
(_n_kwprivate
)
515 redef fun visit_all_reverse
(v
: Visitor)
517 v
.enter_visit
(_n_kwprivate
)
520 redef class AProtectedVisibility
521 redef fun n_kwprotected
=(n
)
527 private init empty_init
do end
529 init init_aprotectedvisibility
(
530 n_kwprotected
: nullable TKwprotected
534 _n_kwprotected
= n_kwprotected
.as(not null)
535 n_kwprotected
.parent
= self
538 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
540 if _n_kwprotected
== old_child
then
541 if new_child
!= null then
542 new_child
.parent
= self
543 assert new_child
isa TKwprotected
544 _n_kwprotected
= new_child
552 redef fun visit_all
(v
: Visitor)
554 v
.enter_visit
(_n_kwprotected
)
557 redef fun visit_all_reverse
(v
: Visitor)
559 v
.enter_visit
(_n_kwprotected
)
562 redef class AIntrudeVisibility
563 redef fun n_kwintrude
=(n
)
569 private init empty_init
do end
571 init init_aintrudevisibility
(
572 n_kwintrude
: nullable TKwintrude
576 _n_kwintrude
= n_kwintrude
.as(not null)
577 n_kwintrude
.parent
= self
580 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
582 if _n_kwintrude
== old_child
then
583 if new_child
!= null then
584 new_child
.parent
= self
585 assert new_child
isa TKwintrude
586 _n_kwintrude
= new_child
594 redef fun visit_all
(v
: Visitor)
596 v
.enter_visit
(_n_kwintrude
)
599 redef fun visit_all_reverse
(v
: Visitor)
601 v
.enter_visit
(_n_kwintrude
)
604 redef class AClassdef
612 redef fun n_kwredef
=(n
)
619 redef fun n_visibility
=(n
)
624 redef fun n_classkind
=(n
)
637 private init empty_init
do end
639 init init_aclassdef
(
640 n_doc
: nullable PDoc ,
641 n_kwredef
: nullable TKwredef ,
642 n_visibility
: nullable PVisibility ,
643 n_classkind
: nullable PClasskind ,
644 n_id
: nullable TClassid ,
645 n_formaldefs
: Collection[Object] , # Should be Collection[PFormaldef]
646 n_superclasses
: Collection[Object] , # Should be Collection[PSuperclass]
647 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
652 if n_doc
!= null then
655 _n_kwredef
= n_kwredef
656 if n_kwredef
!= null then
657 n_kwredef
.parent
= self
659 _n_visibility
= n_visibility
.as(not null)
660 n_visibility
.parent
= self
661 _n_classkind
= n_classkind
.as(not null)
662 n_classkind
.parent
= self
667 for n
in n_formaldefs
do
668 assert n
isa PFormaldef
672 for n
in n_superclasses
do
673 assert n
isa PSuperclass
674 _n_superclasses
.add
(n
)
677 for n
in n_propdefs
do
678 assert n
isa PPropdef
684 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
686 if _n_doc
== old_child
then
687 if new_child
!= null then
688 new_child
.parent
= self
689 assert new_child
isa PDoc
696 if _n_kwredef
== old_child
then
697 if new_child
!= null then
698 new_child
.parent
= self
699 assert new_child
isa TKwredef
700 _n_kwredef
= new_child
706 if _n_visibility
== old_child
then
707 if new_child
!= null then
708 new_child
.parent
= self
709 assert new_child
isa PVisibility
710 _n_visibility
= new_child
716 if _n_classkind
== old_child
then
717 if new_child
!= null then
718 new_child
.parent
= self
719 assert new_child
isa PClasskind
720 _n_classkind
= new_child
726 if _n_id
== old_child
then
727 if new_child
!= null then
728 new_child
.parent
= self
729 assert new_child
isa TClassid
736 for i
in [0.._n_formaldefs
.length
[ do
737 if _n_formaldefs
[i
] == old_child
then
738 if new_child
!= null then
739 assert new_child
isa PFormaldef
740 _n_formaldefs
[i
] = new_child
741 new_child
.parent
= self
743 _n_formaldefs
.remove_at
(i
)
748 for i
in [0.._n_superclasses
.length
[ do
749 if _n_superclasses
[i
] == old_child
then
750 if new_child
!= null then
751 assert new_child
isa PSuperclass
752 _n_superclasses
[i
] = new_child
753 new_child
.parent
= self
755 _n_superclasses
.remove_at
(i
)
760 for i
in [0.._n_propdefs
.length
[ do
761 if _n_propdefs
[i
] == old_child
then
762 if new_child
!= null then
763 assert new_child
isa PPropdef
764 _n_propdefs
[i
] = new_child
765 new_child
.parent
= self
767 _n_propdefs
.remove_at
(i
)
774 redef fun visit_all
(v
: Visitor)
776 if _n_doc
!= null then
777 v
.enter_visit
(_n_doc
.as(not null))
779 if _n_kwredef
!= null then
780 v
.enter_visit
(_n_kwredef
.as(not null))
782 v
.enter_visit
(_n_visibility
)
783 v
.enter_visit
(_n_classkind
)
784 if _n_id
!= null then
785 v
.enter_visit
(_n_id
.as(not null))
787 for n
in _n_formaldefs
do
790 for n
in _n_superclasses
do
793 for n
in _n_propdefs
do
798 redef fun visit_all_reverse
(v
: Visitor)
800 if _n_doc
!= null then
801 v
.enter_visit
(_n_doc
.as(not null))
803 if _n_kwredef
!= null then
804 v
.enter_visit
(_n_kwredef
.as(not null))
806 v
.enter_visit
(_n_visibility
)
807 v
.enter_visit
(_n_classkind
)
808 if _n_id
!= null then
809 v
.enter_visit
(_n_id
.as(not null))
812 var i
= _n_formaldefs
.length
814 v
.enter_visit
(_n_formaldefs
[i
])
819 var i
= _n_superclasses
.length
821 v
.enter_visit
(_n_superclasses
[i
])
826 var i
= _n_propdefs
.length
828 v
.enter_visit
(_n_propdefs
[i
])
834 redef class ATopClassdef
836 private init empty_init
do end
838 init init_atopclassdef
(
839 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
843 for n
in n_propdefs
do
844 assert n
isa PPropdef
850 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
852 for i
in [0.._n_propdefs
.length
[ do
853 if _n_propdefs
[i
] == old_child
then
854 if new_child
!= null then
855 assert new_child
isa PPropdef
856 _n_propdefs
[i
] = new_child
857 new_child
.parent
= self
859 _n_propdefs
.remove_at
(i
)
866 redef fun visit_all
(v
: Visitor)
868 for n
in _n_propdefs
do
873 redef fun visit_all_reverse
(v
: Visitor)
876 var i
= _n_propdefs
.length
878 v
.enter_visit
(_n_propdefs
[i
])
884 redef class AMainClassdef
886 private init empty_init
do end
888 init init_amainclassdef
(
889 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
893 for n
in n_propdefs
do
894 assert n
isa PPropdef
900 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
902 for i
in [0.._n_propdefs
.length
[ do
903 if _n_propdefs
[i
] == old_child
then
904 if new_child
!= null then
905 assert new_child
isa PPropdef
906 _n_propdefs
[i
] = new_child
907 new_child
.parent
= self
909 _n_propdefs
.remove_at
(i
)
916 redef fun visit_all
(v
: Visitor)
918 for n
in _n_propdefs
do
923 redef fun visit_all_reverse
(v
: Visitor)
926 var i
= _n_propdefs
.length
928 v
.enter_visit
(_n_propdefs
[i
])
934 redef class AConcreteClasskind
935 redef fun n_kwclass
=(n
)
941 private init empty_init
do end
943 init init_aconcreteclasskind
(
944 n_kwclass
: nullable TKwclass
948 _n_kwclass
= n_kwclass
.as(not null)
949 n_kwclass
.parent
= self
952 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
954 if _n_kwclass
== old_child
then
955 if new_child
!= null then
956 new_child
.parent
= self
957 assert new_child
isa TKwclass
958 _n_kwclass
= new_child
966 redef fun visit_all
(v
: Visitor)
968 v
.enter_visit
(_n_kwclass
)
971 redef fun visit_all_reverse
(v
: Visitor)
973 v
.enter_visit
(_n_kwclass
)
976 redef class AAbstractClasskind
977 redef fun n_kwabstract
=(n
)
982 redef fun n_kwclass
=(n
)
988 private init empty_init
do end
990 init init_aabstractclasskind
(
991 n_kwabstract
: nullable TKwabstract ,
992 n_kwclass
: nullable TKwclass
996 _n_kwabstract
= n_kwabstract
.as(not null)
997 n_kwabstract
.parent
= self
998 _n_kwclass
= n_kwclass
.as(not null)
999 n_kwclass
.parent
= self
1002 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1004 if _n_kwabstract
== old_child
then
1005 if new_child
!= null then
1006 new_child
.parent
= self
1007 assert new_child
isa TKwabstract
1008 _n_kwabstract
= new_child
1014 if _n_kwclass
== old_child
then
1015 if new_child
!= null then
1016 new_child
.parent
= self
1017 assert new_child
isa TKwclass
1018 _n_kwclass
= new_child
1026 redef fun visit_all
(v
: Visitor)
1028 v
.enter_visit
(_n_kwabstract
)
1029 v
.enter_visit
(_n_kwclass
)
1032 redef fun visit_all_reverse
(v
: Visitor)
1034 v
.enter_visit
(_n_kwabstract
)
1035 v
.enter_visit
(_n_kwclass
)
1038 redef class AInterfaceClasskind
1039 redef fun n_kwinterface
=(n
)
1045 private init empty_init
do end
1047 init init_ainterfaceclasskind
(
1048 n_kwinterface
: nullable TKwinterface
1052 _n_kwinterface
= n_kwinterface
.as(not null)
1053 n_kwinterface
.parent
= self
1056 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1058 if _n_kwinterface
== old_child
then
1059 if new_child
!= null then
1060 new_child
.parent
= self
1061 assert new_child
isa TKwinterface
1062 _n_kwinterface
= new_child
1070 redef fun visit_all
(v
: Visitor)
1072 v
.enter_visit
(_n_kwinterface
)
1075 redef fun visit_all_reverse
(v
: Visitor)
1077 v
.enter_visit
(_n_kwinterface
)
1080 redef class AUniversalClasskind
1081 redef fun n_kwuniversal
=(n
)
1087 private init empty_init
do end
1089 init init_auniversalclasskind
(
1090 n_kwuniversal
: nullable TKwuniversal
1094 _n_kwuniversal
= n_kwuniversal
.as(not null)
1095 n_kwuniversal
.parent
= self
1098 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1100 if _n_kwuniversal
== old_child
then
1101 if new_child
!= null then
1102 new_child
.parent
= self
1103 assert new_child
isa TKwuniversal
1104 _n_kwuniversal
= new_child
1112 redef fun visit_all
(v
: Visitor)
1114 v
.enter_visit
(_n_kwuniversal
)
1117 redef fun visit_all_reverse
(v
: Visitor)
1119 v
.enter_visit
(_n_kwuniversal
)
1122 redef class AFormaldef
1128 redef fun n_type
=(n
)
1136 private init empty_init
do end
1138 init init_aformaldef
(
1139 n_id
: nullable TClassid ,
1140 n_type
: nullable PType
1144 _n_id
= n_id
.as(not null)
1147 if n_type
!= null then
1148 n_type
.parent
= self
1152 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1154 if _n_id
== old_child
then
1155 if new_child
!= null then
1156 new_child
.parent
= self
1157 assert new_child
isa TClassid
1164 if _n_type
== old_child
then
1165 if new_child
!= null then
1166 new_child
.parent
= self
1167 assert new_child
isa PType
1176 redef fun visit_all
(v
: Visitor)
1178 v
.enter_visit
(_n_id
)
1179 if _n_type
!= null then
1180 v
.enter_visit
(_n_type
.as(not null))
1184 redef fun visit_all_reverse
(v
: Visitor)
1186 v
.enter_visit
(_n_id
)
1187 if _n_type
!= null then
1188 v
.enter_visit
(_n_type
.as(not null))
1192 redef class ASuperclass
1193 redef fun n_kwspecial
=(n
)
1198 redef fun n_type
=(n
)
1204 private init empty_init
do end
1206 init init_asuperclass
(
1207 n_kwspecial
: nullable TKwspecial ,
1208 n_type
: nullable PType
1212 _n_kwspecial
= n_kwspecial
.as(not null)
1213 n_kwspecial
.parent
= self
1214 _n_type
= n_type
.as(not null)
1215 n_type
.parent
= self
1218 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1220 if _n_kwspecial
== old_child
then
1221 if new_child
!= null then
1222 new_child
.parent
= self
1223 assert new_child
isa TKwspecial
1224 _n_kwspecial
= new_child
1230 if _n_type
== old_child
then
1231 if new_child
!= null then
1232 new_child
.parent
= self
1233 assert new_child
isa PType
1242 redef fun visit_all
(v
: Visitor)
1244 v
.enter_visit
(_n_kwspecial
)
1245 v
.enter_visit
(_n_type
)
1248 redef fun visit_all_reverse
(v
: Visitor)
1250 v
.enter_visit
(_n_kwspecial
)
1251 v
.enter_visit
(_n_type
)
1254 redef class AAttrPropdef
1262 redef fun n_readable
=(n
)
1269 redef fun n_writable
=(n
)
1276 redef fun n_kwredef
=(n
)
1283 redef fun n_visibility
=(n
)
1288 redef fun n_kwattr
=(n
)
1295 redef fun n_kwvar
=(n
)
1307 redef fun n_type
=(n
)
1314 redef fun n_expr
=(n
)
1322 private init empty_init
do end
1324 init init_aattrpropdef
(
1325 n_doc
: nullable PDoc ,
1326 n_readable
: nullable PAble ,
1327 n_writable
: nullable PAble ,
1328 n_kwredef
: nullable TKwredef ,
1329 n_visibility
: nullable PVisibility ,
1330 n_kwattr
: nullable TKwattr ,
1331 n_kwvar
: nullable TKwvar ,
1332 n_id
: nullable TAttrid ,
1333 n_type
: nullable PType ,
1334 n_expr
: nullable PExpr
1339 if n_doc
!= null then
1342 _n_readable
= n_readable
1343 if n_readable
!= null then
1344 n_readable
.parent
= self
1346 _n_writable
= n_writable
1347 if n_writable
!= null then
1348 n_writable
.parent
= self
1350 _n_kwredef
= n_kwredef
1351 if n_kwredef
!= null then
1352 n_kwredef
.parent
= self
1354 _n_visibility
= n_visibility
.as(not null)
1355 n_visibility
.parent
= self
1356 _n_kwattr
= n_kwattr
1357 if n_kwattr
!= null then
1358 n_kwattr
.parent
= self
1361 if n_kwvar
!= null then
1362 n_kwvar
.parent
= self
1364 _n_id
= n_id
.as(not null)
1367 if n_type
!= null then
1368 n_type
.parent
= self
1371 if n_expr
!= null then
1372 n_expr
.parent
= self
1376 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1378 if _n_doc
== old_child
then
1379 if new_child
!= null then
1380 new_child
.parent
= self
1381 assert new_child
isa PDoc
1388 if _n_readable
== old_child
then
1389 if new_child
!= null then
1390 new_child
.parent
= self
1391 assert new_child
isa PAble
1392 _n_readable
= new_child
1398 if _n_writable
== old_child
then
1399 if new_child
!= null then
1400 new_child
.parent
= self
1401 assert new_child
isa PAble
1402 _n_writable
= new_child
1408 if _n_kwredef
== old_child
then
1409 if new_child
!= null then
1410 new_child
.parent
= self
1411 assert new_child
isa TKwredef
1412 _n_kwredef
= new_child
1418 if _n_visibility
== old_child
then
1419 if new_child
!= null then
1420 new_child
.parent
= self
1421 assert new_child
isa PVisibility
1422 _n_visibility
= new_child
1428 if _n_kwattr
== old_child
then
1429 if new_child
!= null then
1430 new_child
.parent
= self
1431 assert new_child
isa TKwattr
1432 _n_kwattr
= new_child
1438 if _n_kwvar
== old_child
then
1439 if new_child
!= null then
1440 new_child
.parent
= self
1441 assert new_child
isa TKwvar
1442 _n_kwvar
= new_child
1448 if _n_id
== old_child
then
1449 if new_child
!= null then
1450 new_child
.parent
= self
1451 assert new_child
isa TAttrid
1458 if _n_type
== old_child
then
1459 if new_child
!= null then
1460 new_child
.parent
= self
1461 assert new_child
isa PType
1468 if _n_expr
== old_child
then
1469 if new_child
!= null then
1470 new_child
.parent
= self
1471 assert new_child
isa PExpr
1480 redef fun visit_all
(v
: Visitor)
1482 if _n_doc
!= null then
1483 v
.enter_visit
(_n_doc
.as(not null))
1485 if _n_readable
!= null then
1486 v
.enter_visit
(_n_readable
.as(not null))
1488 if _n_writable
!= null then
1489 v
.enter_visit
(_n_writable
.as(not null))
1491 if _n_kwredef
!= null then
1492 v
.enter_visit
(_n_kwredef
.as(not null))
1494 v
.enter_visit
(_n_visibility
)
1495 if _n_kwattr
!= null then
1496 v
.enter_visit
(_n_kwattr
.as(not null))
1498 if _n_kwvar
!= null then
1499 v
.enter_visit
(_n_kwvar
.as(not null))
1501 v
.enter_visit
(_n_id
)
1502 if _n_type
!= null then
1503 v
.enter_visit
(_n_type
.as(not null))
1505 if _n_expr
!= null then
1506 v
.enter_visit
(_n_expr
.as(not null))
1510 redef fun visit_all_reverse
(v
: Visitor)
1512 if _n_doc
!= null then
1513 v
.enter_visit
(_n_doc
.as(not null))
1515 if _n_readable
!= null then
1516 v
.enter_visit
(_n_readable
.as(not null))
1518 if _n_writable
!= null then
1519 v
.enter_visit
(_n_writable
.as(not null))
1521 if _n_kwredef
!= null then
1522 v
.enter_visit
(_n_kwredef
.as(not null))
1524 v
.enter_visit
(_n_visibility
)
1525 if _n_kwattr
!= null then
1526 v
.enter_visit
(_n_kwattr
.as(not null))
1528 if _n_kwvar
!= null then
1529 v
.enter_visit
(_n_kwvar
.as(not null))
1531 v
.enter_visit
(_n_id
)
1532 if _n_type
!= null then
1533 v
.enter_visit
(_n_type
.as(not null))
1535 if _n_expr
!= null then
1536 v
.enter_visit
(_n_expr
.as(not null))
1540 redef class AMethPropdef
1548 redef fun n_kwredef
=(n
)
1555 redef fun n_visibility
=(n
)
1560 redef fun n_methid
=(n
)
1565 redef fun n_signature
=(n
)
1571 private init empty_init
do end
1573 init init_amethpropdef
(
1574 n_doc
: nullable PDoc ,
1575 n_kwredef
: nullable TKwredef ,
1576 n_visibility
: nullable PVisibility ,
1577 n_methid
: nullable PMethid ,
1578 n_signature
: nullable PSignature
1583 if n_doc
!= null then
1586 _n_kwredef
= n_kwredef
1587 if n_kwredef
!= null then
1588 n_kwredef
.parent
= self
1590 _n_visibility
= n_visibility
.as(not null)
1591 n_visibility
.parent
= self
1592 _n_methid
= n_methid
.as(not null)
1593 n_methid
.parent
= self
1594 _n_signature
= n_signature
.as(not null)
1595 n_signature
.parent
= self
1598 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1600 if _n_doc
== old_child
then
1601 if new_child
!= null then
1602 new_child
.parent
= self
1603 assert new_child
isa PDoc
1610 if _n_kwredef
== old_child
then
1611 if new_child
!= null then
1612 new_child
.parent
= self
1613 assert new_child
isa TKwredef
1614 _n_kwredef
= new_child
1620 if _n_visibility
== old_child
then
1621 if new_child
!= null then
1622 new_child
.parent
= self
1623 assert new_child
isa PVisibility
1624 _n_visibility
= new_child
1630 if _n_methid
== old_child
then
1631 if new_child
!= null then
1632 new_child
.parent
= self
1633 assert new_child
isa PMethid
1634 _n_methid
= new_child
1640 if _n_signature
== old_child
then
1641 if new_child
!= null then
1642 new_child
.parent
= self
1643 assert new_child
isa PSignature
1644 _n_signature
= new_child
1652 redef fun visit_all
(v
: Visitor)
1654 if _n_doc
!= null then
1655 v
.enter_visit
(_n_doc
.as(not null))
1657 if _n_kwredef
!= null then
1658 v
.enter_visit
(_n_kwredef
.as(not null))
1660 v
.enter_visit
(_n_visibility
)
1661 v
.enter_visit
(_n_methid
)
1662 v
.enter_visit
(_n_signature
)
1665 redef fun visit_all_reverse
(v
: Visitor)
1667 if _n_doc
!= null then
1668 v
.enter_visit
(_n_doc
.as(not null))
1670 if _n_kwredef
!= null then
1671 v
.enter_visit
(_n_kwredef
.as(not null))
1673 v
.enter_visit
(_n_visibility
)
1674 v
.enter_visit
(_n_methid
)
1675 v
.enter_visit
(_n_signature
)
1678 redef class ADeferredMethPropdef
1686 redef fun n_kwredef
=(n
)
1693 redef fun n_visibility
=(n
)
1698 redef fun n_kwmeth
=(n
)
1703 redef fun n_methid
=(n
)
1708 redef fun n_signature
=(n
)
1714 private init empty_init
do end
1716 init init_adeferredmethpropdef
(
1717 n_doc
: nullable PDoc ,
1718 n_kwredef
: nullable TKwredef ,
1719 n_visibility
: nullable PVisibility ,
1720 n_kwmeth
: nullable TKwmeth ,
1721 n_methid
: nullable PMethid ,
1722 n_signature
: nullable PSignature
1727 if n_doc
!= null then
1730 _n_kwredef
= n_kwredef
1731 if n_kwredef
!= null then
1732 n_kwredef
.parent
= self
1734 _n_visibility
= n_visibility
.as(not null)
1735 n_visibility
.parent
= self
1736 _n_kwmeth
= n_kwmeth
.as(not null)
1737 n_kwmeth
.parent
= self
1738 _n_methid
= n_methid
.as(not null)
1739 n_methid
.parent
= self
1740 _n_signature
= n_signature
.as(not null)
1741 n_signature
.parent
= self
1744 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1746 if _n_doc
== old_child
then
1747 if new_child
!= null then
1748 new_child
.parent
= self
1749 assert new_child
isa PDoc
1756 if _n_kwredef
== old_child
then
1757 if new_child
!= null then
1758 new_child
.parent
= self
1759 assert new_child
isa TKwredef
1760 _n_kwredef
= new_child
1766 if _n_visibility
== old_child
then
1767 if new_child
!= null then
1768 new_child
.parent
= self
1769 assert new_child
isa PVisibility
1770 _n_visibility
= new_child
1776 if _n_kwmeth
== old_child
then
1777 if new_child
!= null then
1778 new_child
.parent
= self
1779 assert new_child
isa TKwmeth
1780 _n_kwmeth
= new_child
1786 if _n_methid
== old_child
then
1787 if new_child
!= null then
1788 new_child
.parent
= self
1789 assert new_child
isa PMethid
1790 _n_methid
= new_child
1796 if _n_signature
== old_child
then
1797 if new_child
!= null then
1798 new_child
.parent
= self
1799 assert new_child
isa PSignature
1800 _n_signature
= new_child
1808 redef fun visit_all
(v
: Visitor)
1810 if _n_doc
!= null then
1811 v
.enter_visit
(_n_doc
.as(not null))
1813 if _n_kwredef
!= null then
1814 v
.enter_visit
(_n_kwredef
.as(not null))
1816 v
.enter_visit
(_n_visibility
)
1817 v
.enter_visit
(_n_kwmeth
)
1818 v
.enter_visit
(_n_methid
)
1819 v
.enter_visit
(_n_signature
)
1822 redef fun visit_all_reverse
(v
: Visitor)
1824 if _n_doc
!= null then
1825 v
.enter_visit
(_n_doc
.as(not null))
1827 if _n_kwredef
!= null then
1828 v
.enter_visit
(_n_kwredef
.as(not null))
1830 v
.enter_visit
(_n_visibility
)
1831 v
.enter_visit
(_n_kwmeth
)
1832 v
.enter_visit
(_n_methid
)
1833 v
.enter_visit
(_n_signature
)
1836 redef class AInternMethPropdef
1844 redef fun n_kwredef
=(n
)
1851 redef fun n_visibility
=(n
)
1856 redef fun n_kwmeth
=(n
)
1861 redef fun n_methid
=(n
)
1866 redef fun n_signature
=(n
)
1872 private init empty_init
do end
1874 init init_ainternmethpropdef
(
1875 n_doc
: nullable PDoc ,
1876 n_kwredef
: nullable TKwredef ,
1877 n_visibility
: nullable PVisibility ,
1878 n_kwmeth
: nullable TKwmeth ,
1879 n_methid
: nullable PMethid ,
1880 n_signature
: nullable PSignature
1885 if n_doc
!= null then
1888 _n_kwredef
= n_kwredef
1889 if n_kwredef
!= null then
1890 n_kwredef
.parent
= self
1892 _n_visibility
= n_visibility
.as(not null)
1893 n_visibility
.parent
= self
1894 _n_kwmeth
= n_kwmeth
.as(not null)
1895 n_kwmeth
.parent
= self
1896 _n_methid
= n_methid
.as(not null)
1897 n_methid
.parent
= self
1898 _n_signature
= n_signature
.as(not null)
1899 n_signature
.parent
= self
1902 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
1904 if _n_doc
== old_child
then
1905 if new_child
!= null then
1906 new_child
.parent
= self
1907 assert new_child
isa PDoc
1914 if _n_kwredef
== old_child
then
1915 if new_child
!= null then
1916 new_child
.parent
= self
1917 assert new_child
isa TKwredef
1918 _n_kwredef
= new_child
1924 if _n_visibility
== old_child
then
1925 if new_child
!= null then
1926 new_child
.parent
= self
1927 assert new_child
isa PVisibility
1928 _n_visibility
= new_child
1934 if _n_kwmeth
== old_child
then
1935 if new_child
!= null then
1936 new_child
.parent
= self
1937 assert new_child
isa TKwmeth
1938 _n_kwmeth
= new_child
1944 if _n_methid
== old_child
then
1945 if new_child
!= null then
1946 new_child
.parent
= self
1947 assert new_child
isa PMethid
1948 _n_methid
= new_child
1954 if _n_signature
== old_child
then
1955 if new_child
!= null then
1956 new_child
.parent
= self
1957 assert new_child
isa PSignature
1958 _n_signature
= new_child
1966 redef fun visit_all
(v
: Visitor)
1968 if _n_doc
!= null then
1969 v
.enter_visit
(_n_doc
.as(not null))
1971 if _n_kwredef
!= null then
1972 v
.enter_visit
(_n_kwredef
.as(not null))
1974 v
.enter_visit
(_n_visibility
)
1975 v
.enter_visit
(_n_kwmeth
)
1976 v
.enter_visit
(_n_methid
)
1977 v
.enter_visit
(_n_signature
)
1980 redef fun visit_all_reverse
(v
: Visitor)
1982 if _n_doc
!= null then
1983 v
.enter_visit
(_n_doc
.as(not null))
1985 if _n_kwredef
!= null then
1986 v
.enter_visit
(_n_kwredef
.as(not null))
1988 v
.enter_visit
(_n_visibility
)
1989 v
.enter_visit
(_n_kwmeth
)
1990 v
.enter_visit
(_n_methid
)
1991 v
.enter_visit
(_n_signature
)
1994 redef class AExternMethPropdef
2002 redef fun n_kwredef
=(n
)
2009 redef fun n_visibility
=(n
)
2014 redef fun n_kwmeth
=(n
)
2019 redef fun n_methid
=(n
)
2024 redef fun n_signature
=(n
)
2029 redef fun n_extern
=(n
)
2037 private init empty_init
do end
2039 init init_aexternmethpropdef
(
2040 n_doc
: nullable PDoc ,
2041 n_kwredef
: nullable TKwredef ,
2042 n_visibility
: nullable PVisibility ,
2043 n_kwmeth
: nullable TKwmeth ,
2044 n_methid
: nullable PMethid ,
2045 n_signature
: nullable PSignature ,
2046 n_extern
: nullable TString
2051 if n_doc
!= null then
2054 _n_kwredef
= n_kwredef
2055 if n_kwredef
!= null then
2056 n_kwredef
.parent
= self
2058 _n_visibility
= n_visibility
.as(not null)
2059 n_visibility
.parent
= self
2060 _n_kwmeth
= n_kwmeth
.as(not null)
2061 n_kwmeth
.parent
= self
2062 _n_methid
= n_methid
.as(not null)
2063 n_methid
.parent
= self
2064 _n_signature
= n_signature
.as(not null)
2065 n_signature
.parent
= self
2066 _n_extern
= n_extern
2067 if n_extern
!= null then
2068 n_extern
.parent
= self
2072 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2074 if _n_doc
== old_child
then
2075 if new_child
!= null then
2076 new_child
.parent
= self
2077 assert new_child
isa PDoc
2084 if _n_kwredef
== old_child
then
2085 if new_child
!= null then
2086 new_child
.parent
= self
2087 assert new_child
isa TKwredef
2088 _n_kwredef
= new_child
2094 if _n_visibility
== old_child
then
2095 if new_child
!= null then
2096 new_child
.parent
= self
2097 assert new_child
isa PVisibility
2098 _n_visibility
= new_child
2104 if _n_kwmeth
== old_child
then
2105 if new_child
!= null then
2106 new_child
.parent
= self
2107 assert new_child
isa TKwmeth
2108 _n_kwmeth
= new_child
2114 if _n_methid
== old_child
then
2115 if new_child
!= null then
2116 new_child
.parent
= self
2117 assert new_child
isa PMethid
2118 _n_methid
= new_child
2124 if _n_signature
== old_child
then
2125 if new_child
!= null then
2126 new_child
.parent
= self
2127 assert new_child
isa PSignature
2128 _n_signature
= new_child
2134 if _n_extern
== old_child
then
2135 if new_child
!= null then
2136 new_child
.parent
= self
2137 assert new_child
isa TString
2138 _n_extern
= new_child
2146 redef fun visit_all
(v
: Visitor)
2148 if _n_doc
!= null then
2149 v
.enter_visit
(_n_doc
.as(not null))
2151 if _n_kwredef
!= null then
2152 v
.enter_visit
(_n_kwredef
.as(not null))
2154 v
.enter_visit
(_n_visibility
)
2155 v
.enter_visit
(_n_kwmeth
)
2156 v
.enter_visit
(_n_methid
)
2157 v
.enter_visit
(_n_signature
)
2158 if _n_extern
!= null then
2159 v
.enter_visit
(_n_extern
.as(not null))
2163 redef fun visit_all_reverse
(v
: Visitor)
2165 if _n_doc
!= null then
2166 v
.enter_visit
(_n_doc
.as(not null))
2168 if _n_kwredef
!= null then
2169 v
.enter_visit
(_n_kwredef
.as(not null))
2171 v
.enter_visit
(_n_visibility
)
2172 v
.enter_visit
(_n_kwmeth
)
2173 v
.enter_visit
(_n_methid
)
2174 v
.enter_visit
(_n_signature
)
2175 if _n_extern
!= null then
2176 v
.enter_visit
(_n_extern
.as(not null))
2180 redef class AConcreteMethPropdef
2188 redef fun n_kwredef
=(n
)
2195 redef fun n_visibility
=(n
)
2200 redef fun n_kwmeth
=(n
)
2205 redef fun n_methid
=(n
)
2210 redef fun n_signature
=(n
)
2215 redef fun n_block
=(n
)
2223 private init empty_init
do end
2225 init init_aconcretemethpropdef
(
2226 n_doc
: nullable PDoc ,
2227 n_kwredef
: nullable TKwredef ,
2228 n_visibility
: nullable PVisibility ,
2229 n_kwmeth
: nullable TKwmeth ,
2230 n_methid
: nullable PMethid ,
2231 n_signature
: nullable PSignature ,
2232 n_block
: nullable PExpr
2237 if n_doc
!= null then
2240 _n_kwredef
= n_kwredef
2241 if n_kwredef
!= null then
2242 n_kwredef
.parent
= self
2244 _n_visibility
= n_visibility
.as(not null)
2245 n_visibility
.parent
= self
2246 _n_kwmeth
= n_kwmeth
.as(not null)
2247 n_kwmeth
.parent
= self
2248 _n_methid
= n_methid
.as(not null)
2249 n_methid
.parent
= self
2250 _n_signature
= n_signature
.as(not null)
2251 n_signature
.parent
= self
2253 if n_block
!= null then
2254 n_block
.parent
= self
2258 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2260 if _n_doc
== old_child
then
2261 if new_child
!= null then
2262 new_child
.parent
= self
2263 assert new_child
isa PDoc
2270 if _n_kwredef
== old_child
then
2271 if new_child
!= null then
2272 new_child
.parent
= self
2273 assert new_child
isa TKwredef
2274 _n_kwredef
= new_child
2280 if _n_visibility
== old_child
then
2281 if new_child
!= null then
2282 new_child
.parent
= self
2283 assert new_child
isa PVisibility
2284 _n_visibility
= new_child
2290 if _n_kwmeth
== old_child
then
2291 if new_child
!= null then
2292 new_child
.parent
= self
2293 assert new_child
isa TKwmeth
2294 _n_kwmeth
= new_child
2300 if _n_methid
== old_child
then
2301 if new_child
!= null then
2302 new_child
.parent
= self
2303 assert new_child
isa PMethid
2304 _n_methid
= new_child
2310 if _n_signature
== old_child
then
2311 if new_child
!= null then
2312 new_child
.parent
= self
2313 assert new_child
isa PSignature
2314 _n_signature
= new_child
2320 if _n_block
== old_child
then
2321 if new_child
!= null then
2322 new_child
.parent
= self
2323 assert new_child
isa PExpr
2324 _n_block
= new_child
2332 redef fun visit_all
(v
: Visitor)
2334 if _n_doc
!= null then
2335 v
.enter_visit
(_n_doc
.as(not null))
2337 if _n_kwredef
!= null then
2338 v
.enter_visit
(_n_kwredef
.as(not null))
2340 v
.enter_visit
(_n_visibility
)
2341 v
.enter_visit
(_n_kwmeth
)
2342 v
.enter_visit
(_n_methid
)
2343 v
.enter_visit
(_n_signature
)
2344 if _n_block
!= null then
2345 v
.enter_visit
(_n_block
.as(not null))
2349 redef fun visit_all_reverse
(v
: Visitor)
2351 if _n_doc
!= null then
2352 v
.enter_visit
(_n_doc
.as(not null))
2354 if _n_kwredef
!= null then
2355 v
.enter_visit
(_n_kwredef
.as(not null))
2357 v
.enter_visit
(_n_visibility
)
2358 v
.enter_visit
(_n_kwmeth
)
2359 v
.enter_visit
(_n_methid
)
2360 v
.enter_visit
(_n_signature
)
2361 if _n_block
!= null then
2362 v
.enter_visit
(_n_block
.as(not null))
2366 redef class AConcreteInitPropdef
2374 redef fun n_kwredef
=(n
)
2381 redef fun n_visibility
=(n
)
2386 redef fun n_kwinit
=(n
)
2391 redef fun n_methid
=(n
)
2398 redef fun n_signature
=(n
)
2403 redef fun n_block
=(n
)
2411 private init empty_init
do end
2413 init init_aconcreteinitpropdef
(
2414 n_doc
: nullable PDoc ,
2415 n_kwredef
: nullable TKwredef ,
2416 n_visibility
: nullable PVisibility ,
2417 n_kwinit
: nullable TKwinit ,
2418 n_methid
: nullable PMethid ,
2419 n_signature
: nullable PSignature ,
2420 n_block
: nullable PExpr
2425 if n_doc
!= null then
2428 _n_kwredef
= n_kwredef
2429 if n_kwredef
!= null then
2430 n_kwredef
.parent
= self
2432 _n_visibility
= n_visibility
.as(not null)
2433 n_visibility
.parent
= self
2434 _n_kwinit
= n_kwinit
.as(not null)
2435 n_kwinit
.parent
= self
2436 _n_methid
= n_methid
2437 if n_methid
!= null then
2438 n_methid
.parent
= self
2440 _n_signature
= n_signature
.as(not null)
2441 n_signature
.parent
= self
2443 if n_block
!= null then
2444 n_block
.parent
= self
2448 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2450 if _n_doc
== old_child
then
2451 if new_child
!= null then
2452 new_child
.parent
= self
2453 assert new_child
isa PDoc
2460 if _n_kwredef
== old_child
then
2461 if new_child
!= null then
2462 new_child
.parent
= self
2463 assert new_child
isa TKwredef
2464 _n_kwredef
= new_child
2470 if _n_visibility
== old_child
then
2471 if new_child
!= null then
2472 new_child
.parent
= self
2473 assert new_child
isa PVisibility
2474 _n_visibility
= new_child
2480 if _n_kwinit
== old_child
then
2481 if new_child
!= null then
2482 new_child
.parent
= self
2483 assert new_child
isa TKwinit
2484 _n_kwinit
= new_child
2490 if _n_methid
== old_child
then
2491 if new_child
!= null then
2492 new_child
.parent
= self
2493 assert new_child
isa PMethid
2494 _n_methid
= new_child
2500 if _n_signature
== old_child
then
2501 if new_child
!= null then
2502 new_child
.parent
= self
2503 assert new_child
isa PSignature
2504 _n_signature
= new_child
2510 if _n_block
== old_child
then
2511 if new_child
!= null then
2512 new_child
.parent
= self
2513 assert new_child
isa PExpr
2514 _n_block
= new_child
2522 redef fun visit_all
(v
: Visitor)
2524 if _n_doc
!= null then
2525 v
.enter_visit
(_n_doc
.as(not null))
2527 if _n_kwredef
!= null then
2528 v
.enter_visit
(_n_kwredef
.as(not null))
2530 v
.enter_visit
(_n_visibility
)
2531 v
.enter_visit
(_n_kwinit
)
2532 if _n_methid
!= null then
2533 v
.enter_visit
(_n_methid
.as(not null))
2535 v
.enter_visit
(_n_signature
)
2536 if _n_block
!= null then
2537 v
.enter_visit
(_n_block
.as(not null))
2541 redef fun visit_all_reverse
(v
: Visitor)
2543 if _n_doc
!= null then
2544 v
.enter_visit
(_n_doc
.as(not null))
2546 if _n_kwredef
!= null then
2547 v
.enter_visit
(_n_kwredef
.as(not null))
2549 v
.enter_visit
(_n_visibility
)
2550 v
.enter_visit
(_n_kwinit
)
2551 if _n_methid
!= null then
2552 v
.enter_visit
(_n_methid
.as(not null))
2554 v
.enter_visit
(_n_signature
)
2555 if _n_block
!= null then
2556 v
.enter_visit
(_n_block
.as(not null))
2560 redef class AMainMethPropdef
2561 redef fun n_kwredef
=(n
)
2568 redef fun n_block
=(n
)
2576 private init empty_init
do end
2578 init init_amainmethpropdef
(
2579 n_kwredef
: nullable TKwredef ,
2580 n_block
: nullable PExpr
2584 _n_kwredef
= n_kwredef
2585 if n_kwredef
!= null then
2586 n_kwredef
.parent
= self
2589 if n_block
!= null then
2590 n_block
.parent
= self
2594 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2596 if _n_kwredef
== old_child
then
2597 if new_child
!= null then
2598 new_child
.parent
= self
2599 assert new_child
isa TKwredef
2600 _n_kwredef
= new_child
2606 if _n_block
== old_child
then
2607 if new_child
!= null then
2608 new_child
.parent
= self
2609 assert new_child
isa PExpr
2610 _n_block
= new_child
2618 redef fun visit_all
(v
: Visitor)
2620 if _n_kwredef
!= null then
2621 v
.enter_visit
(_n_kwredef
.as(not null))
2623 if _n_block
!= null then
2624 v
.enter_visit
(_n_block
.as(not null))
2628 redef fun visit_all_reverse
(v
: Visitor)
2630 if _n_kwredef
!= null then
2631 v
.enter_visit
(_n_kwredef
.as(not null))
2633 if _n_block
!= null then
2634 v
.enter_visit
(_n_block
.as(not null))
2638 redef class ATypePropdef
2646 redef fun n_kwredef
=(n
)
2653 redef fun n_visibility
=(n
)
2658 redef fun n_kwtype
=(n
)
2668 redef fun n_type
=(n
)
2674 private init empty_init
do end
2676 init init_atypepropdef
(
2677 n_doc
: nullable PDoc ,
2678 n_kwredef
: nullable TKwredef ,
2679 n_visibility
: nullable PVisibility ,
2680 n_kwtype
: nullable TKwtype ,
2681 n_id
: nullable TClassid ,
2682 n_type
: nullable PType
2687 if n_doc
!= null then
2690 _n_kwredef
= n_kwredef
2691 if n_kwredef
!= null then
2692 n_kwredef
.parent
= self
2694 _n_visibility
= n_visibility
.as(not null)
2695 n_visibility
.parent
= self
2696 _n_kwtype
= n_kwtype
.as(not null)
2697 n_kwtype
.parent
= self
2698 _n_id
= n_id
.as(not null)
2700 _n_type
= n_type
.as(not null)
2701 n_type
.parent
= self
2704 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2706 if _n_doc
== old_child
then
2707 if new_child
!= null then
2708 new_child
.parent
= self
2709 assert new_child
isa PDoc
2716 if _n_kwredef
== old_child
then
2717 if new_child
!= null then
2718 new_child
.parent
= self
2719 assert new_child
isa TKwredef
2720 _n_kwredef
= new_child
2726 if _n_visibility
== old_child
then
2727 if new_child
!= null then
2728 new_child
.parent
= self
2729 assert new_child
isa PVisibility
2730 _n_visibility
= new_child
2736 if _n_kwtype
== old_child
then
2737 if new_child
!= null then
2738 new_child
.parent
= self
2739 assert new_child
isa TKwtype
2740 _n_kwtype
= new_child
2746 if _n_id
== old_child
then
2747 if new_child
!= null then
2748 new_child
.parent
= self
2749 assert new_child
isa TClassid
2756 if _n_type
== old_child
then
2757 if new_child
!= null then
2758 new_child
.parent
= self
2759 assert new_child
isa PType
2768 redef fun visit_all
(v
: Visitor)
2770 if _n_doc
!= null then
2771 v
.enter_visit
(_n_doc
.as(not null))
2773 if _n_kwredef
!= null then
2774 v
.enter_visit
(_n_kwredef
.as(not null))
2776 v
.enter_visit
(_n_visibility
)
2777 v
.enter_visit
(_n_kwtype
)
2778 v
.enter_visit
(_n_id
)
2779 v
.enter_visit
(_n_type
)
2782 redef fun visit_all_reverse
(v
: Visitor)
2784 if _n_doc
!= null then
2785 v
.enter_visit
(_n_doc
.as(not null))
2787 if _n_kwredef
!= null then
2788 v
.enter_visit
(_n_kwredef
.as(not null))
2790 v
.enter_visit
(_n_visibility
)
2791 v
.enter_visit
(_n_kwtype
)
2792 v
.enter_visit
(_n_id
)
2793 v
.enter_visit
(_n_type
)
2796 redef class AReadAble
2797 redef fun n_kwredef
=(n
)
2804 redef fun n_kwreadable
=(n
)
2810 private init empty_init
do end
2812 init init_areadable
(
2813 n_kwredef
: nullable TKwredef ,
2814 n_kwreadable
: nullable TKwreadable
2818 _n_kwredef
= n_kwredef
2819 if n_kwredef
!= null then
2820 n_kwredef
.parent
= self
2822 _n_kwreadable
= n_kwreadable
.as(not null)
2823 n_kwreadable
.parent
= self
2826 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2828 if _n_kwredef
== old_child
then
2829 if new_child
!= null then
2830 new_child
.parent
= self
2831 assert new_child
isa TKwredef
2832 _n_kwredef
= new_child
2838 if _n_kwreadable
== old_child
then
2839 if new_child
!= null then
2840 new_child
.parent
= self
2841 assert new_child
isa TKwreadable
2842 _n_kwreadable
= new_child
2850 redef fun visit_all
(v
: Visitor)
2852 if _n_kwredef
!= null then
2853 v
.enter_visit
(_n_kwredef
.as(not null))
2855 v
.enter_visit
(_n_kwreadable
)
2858 redef fun visit_all_reverse
(v
: Visitor)
2860 if _n_kwredef
!= null then
2861 v
.enter_visit
(_n_kwredef
.as(not null))
2863 v
.enter_visit
(_n_kwreadable
)
2866 redef class AWriteAble
2867 redef fun n_kwredef
=(n
)
2874 redef fun n_kwwritable
=(n
)
2880 private init empty_init
do end
2882 init init_awriteable
(
2883 n_kwredef
: nullable TKwredef ,
2884 n_kwwritable
: nullable TKwwritable
2888 _n_kwredef
= n_kwredef
2889 if n_kwredef
!= null then
2890 n_kwredef
.parent
= self
2892 _n_kwwritable
= n_kwwritable
.as(not null)
2893 n_kwwritable
.parent
= self
2896 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2898 if _n_kwredef
== old_child
then
2899 if new_child
!= null then
2900 new_child
.parent
= self
2901 assert new_child
isa TKwredef
2902 _n_kwredef
= new_child
2908 if _n_kwwritable
== old_child
then
2909 if new_child
!= null then
2910 new_child
.parent
= self
2911 assert new_child
isa TKwwritable
2912 _n_kwwritable
= new_child
2920 redef fun visit_all
(v
: Visitor)
2922 if _n_kwredef
!= null then
2923 v
.enter_visit
(_n_kwredef
.as(not null))
2925 v
.enter_visit
(_n_kwwritable
)
2928 redef fun visit_all_reverse
(v
: Visitor)
2930 if _n_kwredef
!= null then
2931 v
.enter_visit
(_n_kwredef
.as(not null))
2933 v
.enter_visit
(_n_kwwritable
)
2936 redef class AIdMethid
2943 private init empty_init
do end
2945 init init_aidmethid
(
2950 _n_id
= n_id
.as(not null)
2954 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2956 if _n_id
== old_child
then
2957 if new_child
!= null then
2958 new_child
.parent
= self
2959 assert new_child
isa TId
2968 redef fun visit_all
(v
: Visitor)
2970 v
.enter_visit
(_n_id
)
2973 redef fun visit_all_reverse
(v
: Visitor)
2975 v
.enter_visit
(_n_id
)
2978 redef class APlusMethid
2979 redef fun n_plus
=(n
)
2985 private init empty_init
do end
2987 init init_aplusmethid
(
2988 n_plus
: nullable TPlus
2992 _n_plus
= n_plus
.as(not null)
2993 n_plus
.parent
= self
2996 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
2998 if _n_plus
== old_child
then
2999 if new_child
!= null then
3000 new_child
.parent
= self
3001 assert new_child
isa TPlus
3010 redef fun visit_all
(v
: Visitor)
3012 v
.enter_visit
(_n_plus
)
3015 redef fun visit_all_reverse
(v
: Visitor)
3017 v
.enter_visit
(_n_plus
)
3020 redef class AMinusMethid
3021 redef fun n_minus
=(n
)
3027 private init empty_init
do end
3029 init init_aminusmethid
(
3030 n_minus
: nullable TMinus
3034 _n_minus
= n_minus
.as(not null)
3035 n_minus
.parent
= self
3038 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3040 if _n_minus
== old_child
then
3041 if new_child
!= null then
3042 new_child
.parent
= self
3043 assert new_child
isa TMinus
3044 _n_minus
= new_child
3052 redef fun visit_all
(v
: Visitor)
3054 v
.enter_visit
(_n_minus
)
3057 redef fun visit_all_reverse
(v
: Visitor)
3059 v
.enter_visit
(_n_minus
)
3062 redef class AStarMethid
3063 redef fun n_star
=(n
)
3069 private init empty_init
do end
3071 init init_astarmethid
(
3072 n_star
: nullable TStar
3076 _n_star
= n_star
.as(not null)
3077 n_star
.parent
= self
3080 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3082 if _n_star
== old_child
then
3083 if new_child
!= null then
3084 new_child
.parent
= self
3085 assert new_child
isa TStar
3094 redef fun visit_all
(v
: Visitor)
3096 v
.enter_visit
(_n_star
)
3099 redef fun visit_all_reverse
(v
: Visitor)
3101 v
.enter_visit
(_n_star
)
3104 redef class ASlashMethid
3105 redef fun n_slash
=(n
)
3111 private init empty_init
do end
3113 init init_aslashmethid
(
3114 n_slash
: nullable TSlash
3118 _n_slash
= n_slash
.as(not null)
3119 n_slash
.parent
= self
3122 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3124 if _n_slash
== old_child
then
3125 if new_child
!= null then
3126 new_child
.parent
= self
3127 assert new_child
isa TSlash
3128 _n_slash
= new_child
3136 redef fun visit_all
(v
: Visitor)
3138 v
.enter_visit
(_n_slash
)
3141 redef fun visit_all_reverse
(v
: Visitor)
3143 v
.enter_visit
(_n_slash
)
3146 redef class APercentMethid
3147 redef fun n_percent
=(n
)
3153 private init empty_init
do end
3155 init init_apercentmethid
(
3156 n_percent
: nullable TPercent
3160 _n_percent
= n_percent
.as(not null)
3161 n_percent
.parent
= self
3164 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3166 if _n_percent
== old_child
then
3167 if new_child
!= null then
3168 new_child
.parent
= self
3169 assert new_child
isa TPercent
3170 _n_percent
= new_child
3178 redef fun visit_all
(v
: Visitor)
3180 v
.enter_visit
(_n_percent
)
3183 redef fun visit_all_reverse
(v
: Visitor)
3185 v
.enter_visit
(_n_percent
)
3188 redef class AEqMethid
3195 private init empty_init
do end
3197 init init_aeqmethid
(
3202 _n_eq
= n_eq
.as(not null)
3206 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3208 if _n_eq
== old_child
then
3209 if new_child
!= null then
3210 new_child
.parent
= self
3211 assert new_child
isa TEq
3220 redef fun visit_all
(v
: Visitor)
3222 v
.enter_visit
(_n_eq
)
3225 redef fun visit_all_reverse
(v
: Visitor)
3227 v
.enter_visit
(_n_eq
)
3230 redef class ANeMethid
3237 private init empty_init
do end
3239 init init_anemethid
(
3244 _n_ne
= n_ne
.as(not null)
3248 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3250 if _n_ne
== old_child
then
3251 if new_child
!= null then
3252 new_child
.parent
= self
3253 assert new_child
isa TNe
3262 redef fun visit_all
(v
: Visitor)
3264 v
.enter_visit
(_n_ne
)
3267 redef fun visit_all_reverse
(v
: Visitor)
3269 v
.enter_visit
(_n_ne
)
3272 redef class ALeMethid
3279 private init empty_init
do end
3281 init init_alemethid
(
3286 _n_le
= n_le
.as(not null)
3290 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3292 if _n_le
== old_child
then
3293 if new_child
!= null then
3294 new_child
.parent
= self
3295 assert new_child
isa TLe
3304 redef fun visit_all
(v
: Visitor)
3306 v
.enter_visit
(_n_le
)
3309 redef fun visit_all_reverse
(v
: Visitor)
3311 v
.enter_visit
(_n_le
)
3314 redef class AGeMethid
3321 private init empty_init
do end
3323 init init_agemethid
(
3328 _n_ge
= n_ge
.as(not null)
3332 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3334 if _n_ge
== old_child
then
3335 if new_child
!= null then
3336 new_child
.parent
= self
3337 assert new_child
isa TGe
3346 redef fun visit_all
(v
: Visitor)
3348 v
.enter_visit
(_n_ge
)
3351 redef fun visit_all_reverse
(v
: Visitor)
3353 v
.enter_visit
(_n_ge
)
3356 redef class ALtMethid
3363 private init empty_init
do end
3365 init init_altmethid
(
3370 _n_lt
= n_lt
.as(not null)
3374 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3376 if _n_lt
== old_child
then
3377 if new_child
!= null then
3378 new_child
.parent
= self
3379 assert new_child
isa TLt
3388 redef fun visit_all
(v
: Visitor)
3390 v
.enter_visit
(_n_lt
)
3393 redef fun visit_all_reverse
(v
: Visitor)
3395 v
.enter_visit
(_n_lt
)
3398 redef class AGtMethid
3405 private init empty_init
do end
3407 init init_agtmethid
(
3412 _n_gt
= n_gt
.as(not null)
3416 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3418 if _n_gt
== old_child
then
3419 if new_child
!= null then
3420 new_child
.parent
= self
3421 assert new_child
isa TGt
3430 redef fun visit_all
(v
: Visitor)
3432 v
.enter_visit
(_n_gt
)
3435 redef fun visit_all_reverse
(v
: Visitor)
3437 v
.enter_visit
(_n_gt
)
3440 redef class ABraMethid
3441 redef fun n_obra
=(n
)
3446 redef fun n_cbra
=(n
)
3452 private init empty_init
do end
3454 init init_abramethid
(
3455 n_obra
: nullable TObra ,
3456 n_cbra
: nullable TCbra
3460 _n_obra
= n_obra
.as(not null)
3461 n_obra
.parent
= self
3462 _n_cbra
= n_cbra
.as(not null)
3463 n_cbra
.parent
= self
3466 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3468 if _n_obra
== old_child
then
3469 if new_child
!= null then
3470 new_child
.parent
= self
3471 assert new_child
isa TObra
3478 if _n_cbra
== old_child
then
3479 if new_child
!= null then
3480 new_child
.parent
= self
3481 assert new_child
isa TCbra
3490 redef fun visit_all
(v
: Visitor)
3492 v
.enter_visit
(_n_obra
)
3493 v
.enter_visit
(_n_cbra
)
3496 redef fun visit_all_reverse
(v
: Visitor)
3498 v
.enter_visit
(_n_obra
)
3499 v
.enter_visit
(_n_cbra
)
3502 redef class AStarshipMethid
3503 redef fun n_starship
=(n
)
3509 private init empty_init
do end
3511 init init_astarshipmethid
(
3512 n_starship
: nullable TStarship
3516 _n_starship
= n_starship
.as(not null)
3517 n_starship
.parent
= self
3520 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3522 if _n_starship
== old_child
then
3523 if new_child
!= null then
3524 new_child
.parent
= self
3525 assert new_child
isa TStarship
3526 _n_starship
= new_child
3534 redef fun visit_all
(v
: Visitor)
3536 v
.enter_visit
(_n_starship
)
3539 redef fun visit_all_reverse
(v
: Visitor)
3541 v
.enter_visit
(_n_starship
)
3544 redef class AAssignMethid
3550 redef fun n_assign
=(n
)
3556 private init empty_init
do end
3558 init init_aassignmethid
(
3559 n_id
: nullable TId ,
3560 n_assign
: nullable TAssign
3564 _n_id
= n_id
.as(not null)
3566 _n_assign
= n_assign
.as(not null)
3567 n_assign
.parent
= self
3570 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3572 if _n_id
== old_child
then
3573 if new_child
!= null then
3574 new_child
.parent
= self
3575 assert new_child
isa TId
3582 if _n_assign
== old_child
then
3583 if new_child
!= null then
3584 new_child
.parent
= self
3585 assert new_child
isa TAssign
3586 _n_assign
= new_child
3594 redef fun visit_all
(v
: Visitor)
3596 v
.enter_visit
(_n_id
)
3597 v
.enter_visit
(_n_assign
)
3600 redef fun visit_all_reverse
(v
: Visitor)
3602 v
.enter_visit
(_n_id
)
3603 v
.enter_visit
(_n_assign
)
3606 redef class ABraassignMethid
3607 redef fun n_obra
=(n
)
3612 redef fun n_cbra
=(n
)
3617 redef fun n_assign
=(n
)
3623 private init empty_init
do end
3625 init init_abraassignmethid
(
3626 n_obra
: nullable TObra ,
3627 n_cbra
: nullable TCbra ,
3628 n_assign
: nullable TAssign
3632 _n_obra
= n_obra
.as(not null)
3633 n_obra
.parent
= self
3634 _n_cbra
= n_cbra
.as(not null)
3635 n_cbra
.parent
= self
3636 _n_assign
= n_assign
.as(not null)
3637 n_assign
.parent
= self
3640 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3642 if _n_obra
== old_child
then
3643 if new_child
!= null then
3644 new_child
.parent
= self
3645 assert new_child
isa TObra
3652 if _n_cbra
== old_child
then
3653 if new_child
!= null then
3654 new_child
.parent
= self
3655 assert new_child
isa TCbra
3662 if _n_assign
== old_child
then
3663 if new_child
!= null then
3664 new_child
.parent
= self
3665 assert new_child
isa TAssign
3666 _n_assign
= new_child
3674 redef fun visit_all
(v
: Visitor)
3676 v
.enter_visit
(_n_obra
)
3677 v
.enter_visit
(_n_cbra
)
3678 v
.enter_visit
(_n_assign
)
3681 redef fun visit_all_reverse
(v
: Visitor)
3683 v
.enter_visit
(_n_obra
)
3684 v
.enter_visit
(_n_cbra
)
3685 v
.enter_visit
(_n_assign
)
3688 redef class ASignature
3689 redef fun n_type
=(n
)
3697 private init empty_init
do end
3699 init init_asignature
(
3700 n_params
: Collection[Object] , # Should be Collection[PParam]
3701 n_type
: nullable PType ,
3702 n_closure_decls
: Collection[Object] # Should be Collection[PClosureDecl]
3706 for n
in n_params
do
3712 if n_type
!= null then
3713 n_type
.parent
= self
3715 for n
in n_closure_decls
do
3716 assert n
isa PClosureDecl
3717 _n_closure_decls
.add
(n
)
3722 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3724 for i
in [0.._n_params
.length
[ do
3725 if _n_params
[i
] == old_child
then
3726 if new_child
!= null then
3727 assert new_child
isa PParam
3728 _n_params
[i
] = new_child
3729 new_child
.parent
= self
3731 _n_params
.remove_at
(i
)
3736 if _n_type
== old_child
then
3737 if new_child
!= null then
3738 new_child
.parent
= self
3739 assert new_child
isa PType
3746 for i
in [0.._n_closure_decls
.length
[ do
3747 if _n_closure_decls
[i
] == old_child
then
3748 if new_child
!= null then
3749 assert new_child
isa PClosureDecl
3750 _n_closure_decls
[i
] = new_child
3751 new_child
.parent
= self
3753 _n_closure_decls
.remove_at
(i
)
3760 redef fun visit_all
(v
: Visitor)
3762 for n
in _n_params
do
3765 if _n_type
!= null then
3766 v
.enter_visit
(_n_type
.as(not null))
3768 for n
in _n_closure_decls
do
3773 redef fun visit_all_reverse
(v
: Visitor)
3776 var i
= _n_params
.length
3778 v
.enter_visit
(_n_params
[i
])
3782 if _n_type
!= null then
3783 v
.enter_visit
(_n_type
.as(not null))
3786 var i
= _n_closure_decls
.length
3788 v
.enter_visit
(_n_closure_decls
[i
])
3800 redef fun n_type
=(n
)
3807 redef fun n_dotdotdot
=(n
)
3815 private init empty_init
do end
3818 n_id
: nullable TId ,
3819 n_type
: nullable PType ,
3820 n_dotdotdot
: nullable TDotdotdot
3824 _n_id
= n_id
.as(not null)
3827 if n_type
!= null then
3828 n_type
.parent
= self
3830 _n_dotdotdot
= n_dotdotdot
3831 if n_dotdotdot
!= null then
3832 n_dotdotdot
.parent
= self
3836 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3838 if _n_id
== old_child
then
3839 if new_child
!= null then
3840 new_child
.parent
= self
3841 assert new_child
isa TId
3848 if _n_type
== old_child
then
3849 if new_child
!= null then
3850 new_child
.parent
= self
3851 assert new_child
isa PType
3858 if _n_dotdotdot
== old_child
then
3859 if new_child
!= null then
3860 new_child
.parent
= self
3861 assert new_child
isa TDotdotdot
3862 _n_dotdotdot
= new_child
3870 redef fun visit_all
(v
: Visitor)
3872 v
.enter_visit
(_n_id
)
3873 if _n_type
!= null then
3874 v
.enter_visit
(_n_type
.as(not null))
3876 if _n_dotdotdot
!= null then
3877 v
.enter_visit
(_n_dotdotdot
.as(not null))
3881 redef fun visit_all_reverse
(v
: Visitor)
3883 v
.enter_visit
(_n_id
)
3884 if _n_type
!= null then
3885 v
.enter_visit
(_n_type
.as(not null))
3887 if _n_dotdotdot
!= null then
3888 v
.enter_visit
(_n_dotdotdot
.as(not null))
3892 redef class AClosureDecl
3893 redef fun n_kwwith
=(n
)
3898 redef fun n_kwbreak
=(n
)
3910 redef fun n_signature
=(n
)
3915 redef fun n_expr
=(n
)
3923 private init empty_init
do end
3925 init init_aclosuredecl
(
3926 n_kwwith
: nullable TKwwith ,
3927 n_kwbreak
: nullable TKwbreak ,
3928 n_id
: nullable TId ,
3929 n_signature
: nullable PSignature ,
3930 n_expr
: nullable PExpr
3934 _n_kwwith
= n_kwwith
.as(not null)
3935 n_kwwith
.parent
= self
3936 _n_kwbreak
= n_kwbreak
3937 if n_kwbreak
!= null then
3938 n_kwbreak
.parent
= self
3940 _n_id
= n_id
.as(not null)
3942 _n_signature
= n_signature
.as(not null)
3943 n_signature
.parent
= self
3945 if n_expr
!= null then
3946 n_expr
.parent
= self
3950 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
3952 if _n_kwwith
== old_child
then
3953 if new_child
!= null then
3954 new_child
.parent
= self
3955 assert new_child
isa TKwwith
3956 _n_kwwith
= new_child
3962 if _n_kwbreak
== old_child
then
3963 if new_child
!= null then
3964 new_child
.parent
= self
3965 assert new_child
isa TKwbreak
3966 _n_kwbreak
= new_child
3972 if _n_id
== old_child
then
3973 if new_child
!= null then
3974 new_child
.parent
= self
3975 assert new_child
isa TId
3982 if _n_signature
== old_child
then
3983 if new_child
!= null then
3984 new_child
.parent
= self
3985 assert new_child
isa PSignature
3986 _n_signature
= new_child
3992 if _n_expr
== old_child
then
3993 if new_child
!= null then
3994 new_child
.parent
= self
3995 assert new_child
isa PExpr
4004 redef fun visit_all
(v
: Visitor)
4006 v
.enter_visit
(_n_kwwith
)
4007 if _n_kwbreak
!= null then
4008 v
.enter_visit
(_n_kwbreak
.as(not null))
4010 v
.enter_visit
(_n_id
)
4011 v
.enter_visit
(_n_signature
)
4012 if _n_expr
!= null then
4013 v
.enter_visit
(_n_expr
.as(not null))
4017 redef fun visit_all_reverse
(v
: Visitor)
4019 v
.enter_visit
(_n_kwwith
)
4020 if _n_kwbreak
!= null then
4021 v
.enter_visit
(_n_kwbreak
.as(not null))
4023 v
.enter_visit
(_n_id
)
4024 v
.enter_visit
(_n_signature
)
4025 if _n_expr
!= null then
4026 v
.enter_visit
(_n_expr
.as(not null))
4031 redef fun n_kwnullable
=(n
)
4044 private init empty_init
do end
4047 n_kwnullable
: nullable TKwnullable ,
4048 n_id
: nullable TClassid ,
4049 n_types
: Collection[Object] # Should be Collection[PType]
4053 _n_kwnullable
= n_kwnullable
4054 if n_kwnullable
!= null then
4055 n_kwnullable
.parent
= self
4057 _n_id
= n_id
.as(not null)
4066 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4068 if _n_kwnullable
== old_child
then
4069 if new_child
!= null then
4070 new_child
.parent
= self
4071 assert new_child
isa TKwnullable
4072 _n_kwnullable
= new_child
4074 _n_kwnullable
= null
4078 if _n_id
== old_child
then
4079 if new_child
!= null then
4080 new_child
.parent
= self
4081 assert new_child
isa TClassid
4088 for i
in [0.._n_types
.length
[ do
4089 if _n_types
[i
] == old_child
then
4090 if new_child
!= null then
4091 assert new_child
isa PType
4092 _n_types
[i
] = new_child
4093 new_child
.parent
= self
4095 _n_types
.remove_at
(i
)
4102 redef fun visit_all
(v
: Visitor)
4104 if _n_kwnullable
!= null then
4105 v
.enter_visit
(_n_kwnullable
.as(not null))
4107 v
.enter_visit
(_n_id
)
4108 for n
in _n_types
do
4113 redef fun visit_all_reverse
(v
: Visitor)
4115 if _n_kwnullable
!= null then
4116 v
.enter_visit
(_n_kwnullable
.as(not null))
4118 v
.enter_visit
(_n_id
)
4120 var i
= _n_types
.length
4122 v
.enter_visit
(_n_types
[i
])
4128 redef class ABlockExpr
4130 private init empty_init
do end
4132 init init_ablockexpr
(
4133 n_expr
: Collection[Object] # Should be Collection[PExpr]
4144 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4146 for i
in [0.._n_expr
.length
[ do
4147 if _n_expr
[i
] == old_child
then
4148 if new_child
!= null then
4149 assert new_child
isa PExpr
4150 _n_expr
[i
] = new_child
4151 new_child
.parent
= self
4153 _n_expr
.remove_at
(i
)
4160 redef fun visit_all
(v
: Visitor)
4167 redef fun visit_all_reverse
(v
: Visitor)
4170 var i
= _n_expr
.length
4172 v
.enter_visit
(_n_expr
[i
])
4178 redef class AVardeclExpr
4179 redef fun n_kwvar
=(n
)
4189 redef fun n_type
=(n
)
4196 redef fun n_assign
=(n
)
4203 redef fun n_expr
=(n
)
4211 private init empty_init
do end
4213 init init_avardeclexpr
(
4214 n_kwvar
: nullable TKwvar ,
4215 n_id
: nullable TId ,
4216 n_type
: nullable PType ,
4217 n_assign
: nullable TAssign ,
4218 n_expr
: nullable PExpr
4222 _n_kwvar
= n_kwvar
.as(not null)
4223 n_kwvar
.parent
= self
4224 _n_id
= n_id
.as(not null)
4227 if n_type
!= null then
4228 n_type
.parent
= self
4230 _n_assign
= n_assign
4231 if n_assign
!= null then
4232 n_assign
.parent
= self
4235 if n_expr
!= null then
4236 n_expr
.parent
= self
4240 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4242 if _n_kwvar
== old_child
then
4243 if new_child
!= null then
4244 new_child
.parent
= self
4245 assert new_child
isa TKwvar
4246 _n_kwvar
= new_child
4252 if _n_id
== old_child
then
4253 if new_child
!= null then
4254 new_child
.parent
= self
4255 assert new_child
isa TId
4262 if _n_type
== old_child
then
4263 if new_child
!= null then
4264 new_child
.parent
= self
4265 assert new_child
isa PType
4272 if _n_assign
== old_child
then
4273 if new_child
!= null then
4274 new_child
.parent
= self
4275 assert new_child
isa TAssign
4276 _n_assign
= new_child
4282 if _n_expr
== old_child
then
4283 if new_child
!= null then
4284 new_child
.parent
= self
4285 assert new_child
isa PExpr
4294 redef fun visit_all
(v
: Visitor)
4296 v
.enter_visit
(_n_kwvar
)
4297 v
.enter_visit
(_n_id
)
4298 if _n_type
!= null then
4299 v
.enter_visit
(_n_type
.as(not null))
4301 if _n_assign
!= null then
4302 v
.enter_visit
(_n_assign
.as(not null))
4304 if _n_expr
!= null then
4305 v
.enter_visit
(_n_expr
.as(not null))
4309 redef fun visit_all_reverse
(v
: Visitor)
4311 v
.enter_visit
(_n_kwvar
)
4312 v
.enter_visit
(_n_id
)
4313 if _n_type
!= null then
4314 v
.enter_visit
(_n_type
.as(not null))
4316 if _n_assign
!= null then
4317 v
.enter_visit
(_n_assign
.as(not null))
4319 if _n_expr
!= null then
4320 v
.enter_visit
(_n_expr
.as(not null))
4324 redef class AReturnExpr
4325 redef fun n_kwreturn
=(n
)
4330 redef fun n_expr
=(n
)
4338 private init empty_init
do end
4340 init init_areturnexpr
(
4341 n_kwreturn
: nullable TKwreturn ,
4342 n_expr
: nullable PExpr
4346 _n_kwreturn
= n_kwreturn
.as(not null)
4347 n_kwreturn
.parent
= self
4349 if n_expr
!= null then
4350 n_expr
.parent
= self
4354 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4356 if _n_kwreturn
== old_child
then
4357 if new_child
!= null then
4358 new_child
.parent
= self
4359 assert new_child
isa TKwreturn
4360 _n_kwreturn
= new_child
4366 if _n_expr
== old_child
then
4367 if new_child
!= null then
4368 new_child
.parent
= self
4369 assert new_child
isa PExpr
4378 redef fun visit_all
(v
: Visitor)
4380 v
.enter_visit
(_n_kwreturn
)
4381 if _n_expr
!= null then
4382 v
.enter_visit
(_n_expr
.as(not null))
4386 redef fun visit_all_reverse
(v
: Visitor)
4388 v
.enter_visit
(_n_kwreturn
)
4389 if _n_expr
!= null then
4390 v
.enter_visit
(_n_expr
.as(not null))
4394 redef class ABreakExpr
4395 redef fun n_kwbreak
=(n
)
4400 redef fun n_expr
=(n
)
4408 private init empty_init
do end
4410 init init_abreakexpr
(
4411 n_kwbreak
: nullable TKwbreak ,
4412 n_expr
: nullable PExpr
4416 _n_kwbreak
= n_kwbreak
.as(not null)
4417 n_kwbreak
.parent
= self
4419 if n_expr
!= null then
4420 n_expr
.parent
= self
4424 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4426 if _n_kwbreak
== old_child
then
4427 if new_child
!= null then
4428 new_child
.parent
= self
4429 assert new_child
isa TKwbreak
4430 _n_kwbreak
= new_child
4436 if _n_expr
== old_child
then
4437 if new_child
!= null then
4438 new_child
.parent
= self
4439 assert new_child
isa PExpr
4448 redef fun visit_all
(v
: Visitor)
4450 v
.enter_visit
(_n_kwbreak
)
4451 if _n_expr
!= null then
4452 v
.enter_visit
(_n_expr
.as(not null))
4456 redef fun visit_all_reverse
(v
: Visitor)
4458 v
.enter_visit
(_n_kwbreak
)
4459 if _n_expr
!= null then
4460 v
.enter_visit
(_n_expr
.as(not null))
4464 redef class AAbortExpr
4465 redef fun n_kwabort
=(n
)
4471 private init empty_init
do end
4473 init init_aabortexpr
(
4474 n_kwabort
: nullable TKwabort
4478 _n_kwabort
= n_kwabort
.as(not null)
4479 n_kwabort
.parent
= self
4482 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4484 if _n_kwabort
== old_child
then
4485 if new_child
!= null then
4486 new_child
.parent
= self
4487 assert new_child
isa TKwabort
4488 _n_kwabort
= new_child
4496 redef fun visit_all
(v
: Visitor)
4498 v
.enter_visit
(_n_kwabort
)
4501 redef fun visit_all_reverse
(v
: Visitor)
4503 v
.enter_visit
(_n_kwabort
)
4506 redef class AContinueExpr
4507 redef fun n_kwcontinue
=(n
)
4512 redef fun n_expr
=(n
)
4520 private init empty_init
do end
4522 init init_acontinueexpr
(
4523 n_kwcontinue
: nullable TKwcontinue ,
4524 n_expr
: nullable PExpr
4528 _n_kwcontinue
= n_kwcontinue
.as(not null)
4529 n_kwcontinue
.parent
= self
4531 if n_expr
!= null then
4532 n_expr
.parent
= self
4536 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4538 if _n_kwcontinue
== old_child
then
4539 if new_child
!= null then
4540 new_child
.parent
= self
4541 assert new_child
isa TKwcontinue
4542 _n_kwcontinue
= new_child
4548 if _n_expr
== old_child
then
4549 if new_child
!= null then
4550 new_child
.parent
= self
4551 assert new_child
isa PExpr
4560 redef fun visit_all
(v
: Visitor)
4562 v
.enter_visit
(_n_kwcontinue
)
4563 if _n_expr
!= null then
4564 v
.enter_visit
(_n_expr
.as(not null))
4568 redef fun visit_all_reverse
(v
: Visitor)
4570 v
.enter_visit
(_n_kwcontinue
)
4571 if _n_expr
!= null then
4572 v
.enter_visit
(_n_expr
.as(not null))
4577 redef fun n_kwdo
=(n
)
4582 redef fun n_block
=(n
)
4590 private init empty_init
do end
4593 n_kwdo
: nullable TKwdo ,
4594 n_block
: nullable PExpr
4598 _n_kwdo
= n_kwdo
.as(not null)
4599 n_kwdo
.parent
= self
4601 if n_block
!= null then
4602 n_block
.parent
= self
4606 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4608 if _n_kwdo
== old_child
then
4609 if new_child
!= null then
4610 new_child
.parent
= self
4611 assert new_child
isa TKwdo
4618 if _n_block
== old_child
then
4619 if new_child
!= null then
4620 new_child
.parent
= self
4621 assert new_child
isa PExpr
4622 _n_block
= new_child
4630 redef fun visit_all
(v
: Visitor)
4632 v
.enter_visit
(_n_kwdo
)
4633 if _n_block
!= null then
4634 v
.enter_visit
(_n_block
.as(not null))
4638 redef fun visit_all_reverse
(v
: Visitor)
4640 v
.enter_visit
(_n_kwdo
)
4641 if _n_block
!= null then
4642 v
.enter_visit
(_n_block
.as(not null))
4647 redef fun n_kwif
=(n
)
4652 redef fun n_expr
=(n
)
4657 redef fun n_then
=(n
)
4664 redef fun n_else
=(n
)
4672 private init empty_init
do end
4675 n_kwif
: nullable TKwif ,
4676 n_expr
: nullable PExpr ,
4677 n_then
: nullable PExpr ,
4678 n_else
: nullable PExpr
4682 _n_kwif
= n_kwif
.as(not null)
4683 n_kwif
.parent
= self
4684 _n_expr
= n_expr
.as(not null)
4685 n_expr
.parent
= self
4687 if n_then
!= null then
4688 n_then
.parent
= self
4691 if n_else
!= null then
4692 n_else
.parent
= self
4696 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4698 if _n_kwif
== old_child
then
4699 if new_child
!= null then
4700 new_child
.parent
= self
4701 assert new_child
isa TKwif
4708 if _n_expr
== old_child
then
4709 if new_child
!= null then
4710 new_child
.parent
= self
4711 assert new_child
isa PExpr
4718 if _n_then
== old_child
then
4719 if new_child
!= null then
4720 new_child
.parent
= self
4721 assert new_child
isa PExpr
4728 if _n_else
== old_child
then
4729 if new_child
!= null then
4730 new_child
.parent
= self
4731 assert new_child
isa PExpr
4740 redef fun visit_all
(v
: Visitor)
4742 v
.enter_visit
(_n_kwif
)
4743 v
.enter_visit
(_n_expr
)
4744 if _n_then
!= null then
4745 v
.enter_visit
(_n_then
.as(not null))
4747 if _n_else
!= null then
4748 v
.enter_visit
(_n_else
.as(not null))
4752 redef fun visit_all_reverse
(v
: Visitor)
4754 v
.enter_visit
(_n_kwif
)
4755 v
.enter_visit
(_n_expr
)
4756 if _n_then
!= null then
4757 v
.enter_visit
(_n_then
.as(not null))
4759 if _n_else
!= null then
4760 v
.enter_visit
(_n_else
.as(not null))
4764 redef class AIfexprExpr
4765 redef fun n_kwif
=(n
)
4770 redef fun n_expr
=(n
)
4775 redef fun n_kwthen
=(n
)
4780 redef fun n_then
=(n
)
4785 redef fun n_kwelse
=(n
)
4790 redef fun n_else
=(n
)
4796 private init empty_init
do end
4798 init init_aifexprexpr
(
4799 n_kwif
: nullable TKwif ,
4800 n_expr
: nullable PExpr ,
4801 n_kwthen
: nullable TKwthen ,
4802 n_then
: nullable PExpr ,
4803 n_kwelse
: nullable TKwelse ,
4804 n_else
: nullable PExpr
4808 _n_kwif
= n_kwif
.as(not null)
4809 n_kwif
.parent
= self
4810 _n_expr
= n_expr
.as(not null)
4811 n_expr
.parent
= self
4812 _n_kwthen
= n_kwthen
.as(not null)
4813 n_kwthen
.parent
= self
4814 _n_then
= n_then
.as(not null)
4815 n_then
.parent
= self
4816 _n_kwelse
= n_kwelse
.as(not null)
4817 n_kwelse
.parent
= self
4818 _n_else
= n_else
.as(not null)
4819 n_else
.parent
= self
4822 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4824 if _n_kwif
== old_child
then
4825 if new_child
!= null then
4826 new_child
.parent
= self
4827 assert new_child
isa TKwif
4834 if _n_expr
== old_child
then
4835 if new_child
!= null then
4836 new_child
.parent
= self
4837 assert new_child
isa PExpr
4844 if _n_kwthen
== old_child
then
4845 if new_child
!= null then
4846 new_child
.parent
= self
4847 assert new_child
isa TKwthen
4848 _n_kwthen
= new_child
4854 if _n_then
== old_child
then
4855 if new_child
!= null then
4856 new_child
.parent
= self
4857 assert new_child
isa PExpr
4864 if _n_kwelse
== old_child
then
4865 if new_child
!= null then
4866 new_child
.parent
= self
4867 assert new_child
isa TKwelse
4868 _n_kwelse
= new_child
4874 if _n_else
== old_child
then
4875 if new_child
!= null then
4876 new_child
.parent
= self
4877 assert new_child
isa PExpr
4886 redef fun visit_all
(v
: Visitor)
4888 v
.enter_visit
(_n_kwif
)
4889 v
.enter_visit
(_n_expr
)
4890 v
.enter_visit
(_n_kwthen
)
4891 v
.enter_visit
(_n_then
)
4892 v
.enter_visit
(_n_kwelse
)
4893 v
.enter_visit
(_n_else
)
4896 redef fun visit_all_reverse
(v
: Visitor)
4898 v
.enter_visit
(_n_kwif
)
4899 v
.enter_visit
(_n_expr
)
4900 v
.enter_visit
(_n_kwthen
)
4901 v
.enter_visit
(_n_then
)
4902 v
.enter_visit
(_n_kwelse
)
4903 v
.enter_visit
(_n_else
)
4906 redef class AWhileExpr
4907 redef fun n_kwwhile
=(n
)
4912 redef fun n_expr
=(n
)
4917 redef fun n_kwdo
=(n
)
4922 redef fun n_block
=(n
)
4930 private init empty_init
do end
4932 init init_awhileexpr
(
4933 n_kwwhile
: nullable TKwwhile ,
4934 n_expr
: nullable PExpr ,
4935 n_kwdo
: nullable TKwdo ,
4936 n_block
: nullable PExpr
4940 _n_kwwhile
= n_kwwhile
.as(not null)
4941 n_kwwhile
.parent
= self
4942 _n_expr
= n_expr
.as(not null)
4943 n_expr
.parent
= self
4944 _n_kwdo
= n_kwdo
.as(not null)
4945 n_kwdo
.parent
= self
4947 if n_block
!= null then
4948 n_block
.parent
= self
4952 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
4954 if _n_kwwhile
== old_child
then
4955 if new_child
!= null then
4956 new_child
.parent
= self
4957 assert new_child
isa TKwwhile
4958 _n_kwwhile
= new_child
4964 if _n_expr
== old_child
then
4965 if new_child
!= null then
4966 new_child
.parent
= self
4967 assert new_child
isa PExpr
4974 if _n_kwdo
== old_child
then
4975 if new_child
!= null then
4976 new_child
.parent
= self
4977 assert new_child
isa TKwdo
4984 if _n_block
== old_child
then
4985 if new_child
!= null then
4986 new_child
.parent
= self
4987 assert new_child
isa PExpr
4988 _n_block
= new_child
4996 redef fun visit_all
(v
: Visitor)
4998 v
.enter_visit
(_n_kwwhile
)
4999 v
.enter_visit
(_n_expr
)
5000 v
.enter_visit
(_n_kwdo
)
5001 if _n_block
!= null then
5002 v
.enter_visit
(_n_block
.as(not null))
5006 redef fun visit_all_reverse
(v
: Visitor)
5008 v
.enter_visit
(_n_kwwhile
)
5009 v
.enter_visit
(_n_expr
)
5010 v
.enter_visit
(_n_kwdo
)
5011 if _n_block
!= null then
5012 v
.enter_visit
(_n_block
.as(not null))
5016 redef class AForExpr
5017 redef fun n_kwfor
=(n
)
5027 redef fun n_expr
=(n
)
5032 redef fun n_kwdo
=(n
)
5037 redef fun n_block
=(n
)
5045 private init empty_init
do end
5047 init init_aforexpr
(
5048 n_kwfor
: nullable TKwfor ,
5049 n_id
: nullable TId ,
5050 n_expr
: nullable PExpr ,
5051 n_kwdo
: nullable TKwdo ,
5052 n_block
: nullable PExpr
5056 _n_kwfor
= n_kwfor
.as(not null)
5057 n_kwfor
.parent
= self
5058 _n_id
= n_id
.as(not null)
5060 _n_expr
= n_expr
.as(not null)
5061 n_expr
.parent
= self
5062 _n_kwdo
= n_kwdo
.as(not null)
5063 n_kwdo
.parent
= self
5065 if n_block
!= null then
5066 n_block
.parent
= self
5070 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5072 if _n_kwfor
== old_child
then
5073 if new_child
!= null then
5074 new_child
.parent
= self
5075 assert new_child
isa TKwfor
5076 _n_kwfor
= new_child
5082 if _n_id
== old_child
then
5083 if new_child
!= null then
5084 new_child
.parent
= self
5085 assert new_child
isa TId
5092 if _n_expr
== old_child
then
5093 if new_child
!= null then
5094 new_child
.parent
= self
5095 assert new_child
isa PExpr
5102 if _n_kwdo
== old_child
then
5103 if new_child
!= null then
5104 new_child
.parent
= self
5105 assert new_child
isa TKwdo
5112 if _n_block
== old_child
then
5113 if new_child
!= null then
5114 new_child
.parent
= self
5115 assert new_child
isa PExpr
5116 _n_block
= new_child
5124 redef fun visit_all
(v
: Visitor)
5126 v
.enter_visit
(_n_kwfor
)
5127 v
.enter_visit
(_n_id
)
5128 v
.enter_visit
(_n_expr
)
5129 v
.enter_visit
(_n_kwdo
)
5130 if _n_block
!= null then
5131 v
.enter_visit
(_n_block
.as(not null))
5135 redef fun visit_all_reverse
(v
: Visitor)
5137 v
.enter_visit
(_n_kwfor
)
5138 v
.enter_visit
(_n_id
)
5139 v
.enter_visit
(_n_expr
)
5140 v
.enter_visit
(_n_kwdo
)
5141 if _n_block
!= null then
5142 v
.enter_visit
(_n_block
.as(not null))
5146 redef class AAssertExpr
5147 redef fun n_kwassert
=(n
)
5159 redef fun n_expr
=(n
)
5165 private init empty_init
do end
5167 init init_aassertexpr
(
5168 n_kwassert
: nullable TKwassert ,
5169 n_id
: nullable TId ,
5170 n_expr
: nullable PExpr
5174 _n_kwassert
= n_kwassert
.as(not null)
5175 n_kwassert
.parent
= self
5177 if n_id
!= null then
5180 _n_expr
= n_expr
.as(not null)
5181 n_expr
.parent
= self
5184 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5186 if _n_kwassert
== old_child
then
5187 if new_child
!= null then
5188 new_child
.parent
= self
5189 assert new_child
isa TKwassert
5190 _n_kwassert
= new_child
5196 if _n_id
== old_child
then
5197 if new_child
!= null then
5198 new_child
.parent
= self
5199 assert new_child
isa TId
5206 if _n_expr
== old_child
then
5207 if new_child
!= null then
5208 new_child
.parent
= self
5209 assert new_child
isa PExpr
5218 redef fun visit_all
(v
: Visitor)
5220 v
.enter_visit
(_n_kwassert
)
5221 if _n_id
!= null then
5222 v
.enter_visit
(_n_id
.as(not null))
5224 v
.enter_visit
(_n_expr
)
5227 redef fun visit_all_reverse
(v
: Visitor)
5229 v
.enter_visit
(_n_kwassert
)
5230 if _n_id
!= null then
5231 v
.enter_visit
(_n_id
.as(not null))
5233 v
.enter_visit
(_n_expr
)
5236 redef class AOnceExpr
5237 redef fun n_kwonce
=(n
)
5242 redef fun n_expr
=(n
)
5248 private init empty_init
do end
5250 init init_aonceexpr
(
5251 n_kwonce
: nullable TKwonce ,
5252 n_expr
: nullable PExpr
5256 _n_kwonce
= n_kwonce
.as(not null)
5257 n_kwonce
.parent
= self
5258 _n_expr
= n_expr
.as(not null)
5259 n_expr
.parent
= self
5262 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5264 if _n_kwonce
== old_child
then
5265 if new_child
!= null then
5266 new_child
.parent
= self
5267 assert new_child
isa TKwonce
5268 _n_kwonce
= new_child
5274 if _n_expr
== old_child
then
5275 if new_child
!= null then
5276 new_child
.parent
= self
5277 assert new_child
isa PExpr
5286 redef fun visit_all
(v
: Visitor)
5288 v
.enter_visit
(_n_kwonce
)
5289 v
.enter_visit
(_n_expr
)
5292 redef fun visit_all_reverse
(v
: Visitor)
5294 v
.enter_visit
(_n_kwonce
)
5295 v
.enter_visit
(_n_expr
)
5298 redef class ASendExpr
5299 redef fun n_expr
=(n
)
5305 private init empty_init
do end
5307 init init_asendexpr
(
5308 n_expr
: nullable PExpr
5312 _n_expr
= n_expr
.as(not null)
5313 n_expr
.parent
= self
5316 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5318 if _n_expr
== old_child
then
5319 if new_child
!= null then
5320 new_child
.parent
= self
5321 assert new_child
isa PExpr
5330 redef fun visit_all
(v
: Visitor)
5332 v
.enter_visit
(_n_expr
)
5335 redef fun visit_all_reverse
(v
: Visitor)
5337 v
.enter_visit
(_n_expr
)
5340 redef class ABinopExpr
5341 redef fun n_expr
=(n
)
5346 redef fun n_expr2
=(n
)
5352 private init empty_init
do end
5354 init init_abinopexpr
(
5355 n_expr
: nullable PExpr ,
5356 n_expr2
: nullable PExpr
5360 _n_expr
= n_expr
.as(not null)
5361 n_expr
.parent
= self
5362 _n_expr2
= n_expr2
.as(not null)
5363 n_expr2
.parent
= self
5366 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5368 if _n_expr
== old_child
then
5369 if new_child
!= null then
5370 new_child
.parent
= self
5371 assert new_child
isa PExpr
5378 if _n_expr2
== old_child
then
5379 if new_child
!= null then
5380 new_child
.parent
= self
5381 assert new_child
isa PExpr
5382 _n_expr2
= new_child
5390 redef fun visit_all
(v
: Visitor)
5392 v
.enter_visit
(_n_expr
)
5393 v
.enter_visit
(_n_expr2
)
5396 redef fun visit_all_reverse
(v
: Visitor)
5398 v
.enter_visit
(_n_expr
)
5399 v
.enter_visit
(_n_expr2
)
5403 redef fun n_expr
=(n
)
5408 redef fun n_expr2
=(n
)
5414 private init empty_init
do end
5417 n_expr
: nullable PExpr ,
5418 n_expr2
: nullable PExpr
5422 _n_expr
= n_expr
.as(not null)
5423 n_expr
.parent
= self
5424 _n_expr2
= n_expr2
.as(not null)
5425 n_expr2
.parent
= self
5428 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5430 if _n_expr
== old_child
then
5431 if new_child
!= null then
5432 new_child
.parent
= self
5433 assert new_child
isa PExpr
5440 if _n_expr2
== old_child
then
5441 if new_child
!= null then
5442 new_child
.parent
= self
5443 assert new_child
isa PExpr
5444 _n_expr2
= new_child
5452 redef fun visit_all
(v
: Visitor)
5454 v
.enter_visit
(_n_expr
)
5455 v
.enter_visit
(_n_expr2
)
5458 redef fun visit_all_reverse
(v
: Visitor)
5460 v
.enter_visit
(_n_expr
)
5461 v
.enter_visit
(_n_expr2
)
5464 redef class AAndExpr
5465 redef fun n_expr
=(n
)
5470 redef fun n_expr2
=(n
)
5476 private init empty_init
do end
5478 init init_aandexpr
(
5479 n_expr
: nullable PExpr ,
5480 n_expr2
: nullable PExpr
5484 _n_expr
= n_expr
.as(not null)
5485 n_expr
.parent
= self
5486 _n_expr2
= n_expr2
.as(not null)
5487 n_expr2
.parent
= self
5490 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5492 if _n_expr
== old_child
then
5493 if new_child
!= null then
5494 new_child
.parent
= self
5495 assert new_child
isa PExpr
5502 if _n_expr2
== old_child
then
5503 if new_child
!= null then
5504 new_child
.parent
= self
5505 assert new_child
isa PExpr
5506 _n_expr2
= new_child
5514 redef fun visit_all
(v
: Visitor)
5516 v
.enter_visit
(_n_expr
)
5517 v
.enter_visit
(_n_expr2
)
5520 redef fun visit_all_reverse
(v
: Visitor)
5522 v
.enter_visit
(_n_expr
)
5523 v
.enter_visit
(_n_expr2
)
5526 redef class ANotExpr
5527 redef fun n_kwnot
=(n
)
5532 redef fun n_expr
=(n
)
5538 private init empty_init
do end
5540 init init_anotexpr
(
5541 n_kwnot
: nullable TKwnot ,
5542 n_expr
: nullable PExpr
5546 _n_kwnot
= n_kwnot
.as(not null)
5547 n_kwnot
.parent
= self
5548 _n_expr
= n_expr
.as(not null)
5549 n_expr
.parent
= self
5552 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5554 if _n_kwnot
== old_child
then
5555 if new_child
!= null then
5556 new_child
.parent
= self
5557 assert new_child
isa TKwnot
5558 _n_kwnot
= new_child
5564 if _n_expr
== old_child
then
5565 if new_child
!= null then
5566 new_child
.parent
= self
5567 assert new_child
isa PExpr
5576 redef fun visit_all
(v
: Visitor)
5578 v
.enter_visit
(_n_kwnot
)
5579 v
.enter_visit
(_n_expr
)
5582 redef fun visit_all_reverse
(v
: Visitor)
5584 v
.enter_visit
(_n_kwnot
)
5585 v
.enter_visit
(_n_expr
)
5589 redef fun n_expr
=(n
)
5594 redef fun n_expr2
=(n
)
5600 private init empty_init
do end
5603 n_expr
: nullable PExpr ,
5604 n_expr2
: nullable PExpr
5608 _n_expr
= n_expr
.as(not null)
5609 n_expr
.parent
= self
5610 _n_expr2
= n_expr2
.as(not null)
5611 n_expr2
.parent
= self
5614 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5616 if _n_expr
== old_child
then
5617 if new_child
!= null then
5618 new_child
.parent
= self
5619 assert new_child
isa PExpr
5626 if _n_expr2
== old_child
then
5627 if new_child
!= null then
5628 new_child
.parent
= self
5629 assert new_child
isa PExpr
5630 _n_expr2
= new_child
5638 redef fun visit_all
(v
: Visitor)
5640 v
.enter_visit
(_n_expr
)
5641 v
.enter_visit
(_n_expr2
)
5644 redef fun visit_all_reverse
(v
: Visitor)
5646 v
.enter_visit
(_n_expr
)
5647 v
.enter_visit
(_n_expr2
)
5651 redef fun n_expr
=(n
)
5656 redef fun n_expr2
=(n
)
5662 private init empty_init
do end
5665 n_expr
: nullable PExpr ,
5666 n_expr2
: nullable PExpr
5670 _n_expr
= n_expr
.as(not null)
5671 n_expr
.parent
= self
5672 _n_expr2
= n_expr2
.as(not null)
5673 n_expr2
.parent
= self
5676 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5678 if _n_expr
== old_child
then
5679 if new_child
!= null then
5680 new_child
.parent
= self
5681 assert new_child
isa PExpr
5688 if _n_expr2
== old_child
then
5689 if new_child
!= null then
5690 new_child
.parent
= self
5691 assert new_child
isa PExpr
5692 _n_expr2
= new_child
5700 redef fun visit_all
(v
: Visitor)
5702 v
.enter_visit
(_n_expr
)
5703 v
.enter_visit
(_n_expr2
)
5706 redef fun visit_all_reverse
(v
: Visitor)
5708 v
.enter_visit
(_n_expr
)
5709 v
.enter_visit
(_n_expr2
)
5713 redef fun n_expr
=(n
)
5718 redef fun n_expr2
=(n
)
5724 private init empty_init
do end
5727 n_expr
: nullable PExpr ,
5728 n_expr2
: nullable PExpr
5732 _n_expr
= n_expr
.as(not null)
5733 n_expr
.parent
= self
5734 _n_expr2
= n_expr2
.as(not null)
5735 n_expr2
.parent
= self
5738 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5740 if _n_expr
== old_child
then
5741 if new_child
!= null then
5742 new_child
.parent
= self
5743 assert new_child
isa PExpr
5750 if _n_expr2
== old_child
then
5751 if new_child
!= null then
5752 new_child
.parent
= self
5753 assert new_child
isa PExpr
5754 _n_expr2
= new_child
5762 redef fun visit_all
(v
: Visitor)
5764 v
.enter_visit
(_n_expr
)
5765 v
.enter_visit
(_n_expr2
)
5768 redef fun visit_all_reverse
(v
: Visitor)
5770 v
.enter_visit
(_n_expr
)
5771 v
.enter_visit
(_n_expr2
)
5775 redef fun n_expr
=(n
)
5780 redef fun n_expr2
=(n
)
5786 private init empty_init
do end
5789 n_expr
: nullable PExpr ,
5790 n_expr2
: nullable PExpr
5794 _n_expr
= n_expr
.as(not null)
5795 n_expr
.parent
= self
5796 _n_expr2
= n_expr2
.as(not null)
5797 n_expr2
.parent
= self
5800 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5802 if _n_expr
== old_child
then
5803 if new_child
!= null then
5804 new_child
.parent
= self
5805 assert new_child
isa PExpr
5812 if _n_expr2
== old_child
then
5813 if new_child
!= null then
5814 new_child
.parent
= self
5815 assert new_child
isa PExpr
5816 _n_expr2
= new_child
5824 redef fun visit_all
(v
: Visitor)
5826 v
.enter_visit
(_n_expr
)
5827 v
.enter_visit
(_n_expr2
)
5830 redef fun visit_all_reverse
(v
: Visitor)
5832 v
.enter_visit
(_n_expr
)
5833 v
.enter_visit
(_n_expr2
)
5837 redef fun n_expr
=(n
)
5842 redef fun n_expr2
=(n
)
5848 private init empty_init
do end
5851 n_expr
: nullable PExpr ,
5852 n_expr2
: nullable PExpr
5856 _n_expr
= n_expr
.as(not null)
5857 n_expr
.parent
= self
5858 _n_expr2
= n_expr2
.as(not null)
5859 n_expr2
.parent
= self
5862 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5864 if _n_expr
== old_child
then
5865 if new_child
!= null then
5866 new_child
.parent
= self
5867 assert new_child
isa PExpr
5874 if _n_expr2
== old_child
then
5875 if new_child
!= null then
5876 new_child
.parent
= self
5877 assert new_child
isa PExpr
5878 _n_expr2
= new_child
5886 redef fun visit_all
(v
: Visitor)
5888 v
.enter_visit
(_n_expr
)
5889 v
.enter_visit
(_n_expr2
)
5892 redef fun visit_all_reverse
(v
: Visitor)
5894 v
.enter_visit
(_n_expr
)
5895 v
.enter_visit
(_n_expr2
)
5899 redef fun n_expr
=(n
)
5904 redef fun n_expr2
=(n
)
5910 private init empty_init
do end
5913 n_expr
: nullable PExpr ,
5914 n_expr2
: nullable PExpr
5918 _n_expr
= n_expr
.as(not null)
5919 n_expr
.parent
= self
5920 _n_expr2
= n_expr2
.as(not null)
5921 n_expr2
.parent
= self
5924 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5926 if _n_expr
== old_child
then
5927 if new_child
!= null then
5928 new_child
.parent
= self
5929 assert new_child
isa PExpr
5936 if _n_expr2
== old_child
then
5937 if new_child
!= null then
5938 new_child
.parent
= self
5939 assert new_child
isa PExpr
5940 _n_expr2
= new_child
5948 redef fun visit_all
(v
: Visitor)
5950 v
.enter_visit
(_n_expr
)
5951 v
.enter_visit
(_n_expr2
)
5954 redef fun visit_all_reverse
(v
: Visitor)
5956 v
.enter_visit
(_n_expr
)
5957 v
.enter_visit
(_n_expr2
)
5961 redef fun n_expr
=(n
)
5966 redef fun n_expr2
=(n
)
5972 private init empty_init
do end
5975 n_expr
: nullable PExpr ,
5976 n_expr2
: nullable PExpr
5980 _n_expr
= n_expr
.as(not null)
5981 n_expr
.parent
= self
5982 _n_expr2
= n_expr2
.as(not null)
5983 n_expr2
.parent
= self
5986 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
5988 if _n_expr
== old_child
then
5989 if new_child
!= null then
5990 new_child
.parent
= self
5991 assert new_child
isa PExpr
5998 if _n_expr2
== old_child
then
5999 if new_child
!= null then
6000 new_child
.parent
= self
6001 assert new_child
isa PExpr
6002 _n_expr2
= new_child
6010 redef fun visit_all
(v
: Visitor)
6012 v
.enter_visit
(_n_expr
)
6013 v
.enter_visit
(_n_expr2
)
6016 redef fun visit_all_reverse
(v
: Visitor)
6018 v
.enter_visit
(_n_expr
)
6019 v
.enter_visit
(_n_expr2
)
6022 redef class AIsaExpr
6023 redef fun n_expr
=(n
)
6028 redef fun n_type
=(n
)
6034 private init empty_init
do end
6036 init init_aisaexpr
(
6037 n_expr
: nullable PExpr ,
6038 n_type
: nullable PType
6042 _n_expr
= n_expr
.as(not null)
6043 n_expr
.parent
= self
6044 _n_type
= n_type
.as(not null)
6045 n_type
.parent
= self
6048 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6050 if _n_expr
== old_child
then
6051 if new_child
!= null then
6052 new_child
.parent
= self
6053 assert new_child
isa PExpr
6060 if _n_type
== old_child
then
6061 if new_child
!= null then
6062 new_child
.parent
= self
6063 assert new_child
isa PType
6072 redef fun visit_all
(v
: Visitor)
6074 v
.enter_visit
(_n_expr
)
6075 v
.enter_visit
(_n_type
)
6078 redef fun visit_all_reverse
(v
: Visitor)
6080 v
.enter_visit
(_n_expr
)
6081 v
.enter_visit
(_n_type
)
6084 redef class APlusExpr
6085 redef fun n_expr
=(n
)
6090 redef fun n_expr2
=(n
)
6096 private init empty_init
do end
6098 init init_aplusexpr
(
6099 n_expr
: nullable PExpr ,
6100 n_expr2
: nullable PExpr
6104 _n_expr
= n_expr
.as(not null)
6105 n_expr
.parent
= self
6106 _n_expr2
= n_expr2
.as(not null)
6107 n_expr2
.parent
= self
6110 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6112 if _n_expr
== old_child
then
6113 if new_child
!= null then
6114 new_child
.parent
= self
6115 assert new_child
isa PExpr
6122 if _n_expr2
== old_child
then
6123 if new_child
!= null then
6124 new_child
.parent
= self
6125 assert new_child
isa PExpr
6126 _n_expr2
= new_child
6134 redef fun visit_all
(v
: Visitor)
6136 v
.enter_visit
(_n_expr
)
6137 v
.enter_visit
(_n_expr2
)
6140 redef fun visit_all_reverse
(v
: Visitor)
6142 v
.enter_visit
(_n_expr
)
6143 v
.enter_visit
(_n_expr2
)
6146 redef class AMinusExpr
6147 redef fun n_expr
=(n
)
6152 redef fun n_expr2
=(n
)
6158 private init empty_init
do end
6160 init init_aminusexpr
(
6161 n_expr
: nullable PExpr ,
6162 n_expr2
: nullable PExpr
6166 _n_expr
= n_expr
.as(not null)
6167 n_expr
.parent
= self
6168 _n_expr2
= n_expr2
.as(not null)
6169 n_expr2
.parent
= self
6172 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6174 if _n_expr
== old_child
then
6175 if new_child
!= null then
6176 new_child
.parent
= self
6177 assert new_child
isa PExpr
6184 if _n_expr2
== old_child
then
6185 if new_child
!= null then
6186 new_child
.parent
= self
6187 assert new_child
isa PExpr
6188 _n_expr2
= new_child
6196 redef fun visit_all
(v
: Visitor)
6198 v
.enter_visit
(_n_expr
)
6199 v
.enter_visit
(_n_expr2
)
6202 redef fun visit_all_reverse
(v
: Visitor)
6204 v
.enter_visit
(_n_expr
)
6205 v
.enter_visit
(_n_expr2
)
6208 redef class AStarshipExpr
6209 redef fun n_expr
=(n
)
6214 redef fun n_expr2
=(n
)
6220 private init empty_init
do end
6222 init init_astarshipexpr
(
6223 n_expr
: nullable PExpr ,
6224 n_expr2
: nullable PExpr
6228 _n_expr
= n_expr
.as(not null)
6229 n_expr
.parent
= self
6230 _n_expr2
= n_expr2
.as(not null)
6231 n_expr2
.parent
= self
6234 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6236 if _n_expr
== old_child
then
6237 if new_child
!= null then
6238 new_child
.parent
= self
6239 assert new_child
isa PExpr
6246 if _n_expr2
== old_child
then
6247 if new_child
!= null then
6248 new_child
.parent
= self
6249 assert new_child
isa PExpr
6250 _n_expr2
= new_child
6258 redef fun visit_all
(v
: Visitor)
6260 v
.enter_visit
(_n_expr
)
6261 v
.enter_visit
(_n_expr2
)
6264 redef fun visit_all_reverse
(v
: Visitor)
6266 v
.enter_visit
(_n_expr
)
6267 v
.enter_visit
(_n_expr2
)
6270 redef class AStarExpr
6271 redef fun n_expr
=(n
)
6276 redef fun n_expr2
=(n
)
6282 private init empty_init
do end
6284 init init_astarexpr
(
6285 n_expr
: nullable PExpr ,
6286 n_expr2
: nullable PExpr
6290 _n_expr
= n_expr
.as(not null)
6291 n_expr
.parent
= self
6292 _n_expr2
= n_expr2
.as(not null)
6293 n_expr2
.parent
= self
6296 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6298 if _n_expr
== old_child
then
6299 if new_child
!= null then
6300 new_child
.parent
= self
6301 assert new_child
isa PExpr
6308 if _n_expr2
== old_child
then
6309 if new_child
!= null then
6310 new_child
.parent
= self
6311 assert new_child
isa PExpr
6312 _n_expr2
= new_child
6320 redef fun visit_all
(v
: Visitor)
6322 v
.enter_visit
(_n_expr
)
6323 v
.enter_visit
(_n_expr2
)
6326 redef fun visit_all_reverse
(v
: Visitor)
6328 v
.enter_visit
(_n_expr
)
6329 v
.enter_visit
(_n_expr2
)
6332 redef class ASlashExpr
6333 redef fun n_expr
=(n
)
6338 redef fun n_expr2
=(n
)
6344 private init empty_init
do end
6346 init init_aslashexpr
(
6347 n_expr
: nullable PExpr ,
6348 n_expr2
: nullable PExpr
6352 _n_expr
= n_expr
.as(not null)
6353 n_expr
.parent
= self
6354 _n_expr2
= n_expr2
.as(not null)
6355 n_expr2
.parent
= self
6358 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6360 if _n_expr
== old_child
then
6361 if new_child
!= null then
6362 new_child
.parent
= self
6363 assert new_child
isa PExpr
6370 if _n_expr2
== old_child
then
6371 if new_child
!= null then
6372 new_child
.parent
= self
6373 assert new_child
isa PExpr
6374 _n_expr2
= new_child
6382 redef fun visit_all
(v
: Visitor)
6384 v
.enter_visit
(_n_expr
)
6385 v
.enter_visit
(_n_expr2
)
6388 redef fun visit_all_reverse
(v
: Visitor)
6390 v
.enter_visit
(_n_expr
)
6391 v
.enter_visit
(_n_expr2
)
6394 redef class APercentExpr
6395 redef fun n_expr
=(n
)
6400 redef fun n_expr2
=(n
)
6406 private init empty_init
do end
6408 init init_apercentexpr
(
6409 n_expr
: nullable PExpr ,
6410 n_expr2
: nullable PExpr
6414 _n_expr
= n_expr
.as(not null)
6415 n_expr
.parent
= self
6416 _n_expr2
= n_expr2
.as(not null)
6417 n_expr2
.parent
= self
6420 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6422 if _n_expr
== old_child
then
6423 if new_child
!= null then
6424 new_child
.parent
= self
6425 assert new_child
isa PExpr
6432 if _n_expr2
== old_child
then
6433 if new_child
!= null then
6434 new_child
.parent
= self
6435 assert new_child
isa PExpr
6436 _n_expr2
= new_child
6444 redef fun visit_all
(v
: Visitor)
6446 v
.enter_visit
(_n_expr
)
6447 v
.enter_visit
(_n_expr2
)
6450 redef fun visit_all_reverse
(v
: Visitor)
6452 v
.enter_visit
(_n_expr
)
6453 v
.enter_visit
(_n_expr2
)
6456 redef class AUminusExpr
6457 redef fun n_minus
=(n
)
6462 redef fun n_expr
=(n
)
6468 private init empty_init
do end
6470 init init_auminusexpr
(
6471 n_minus
: nullable TMinus ,
6472 n_expr
: nullable PExpr
6476 _n_minus
= n_minus
.as(not null)
6477 n_minus
.parent
= self
6478 _n_expr
= n_expr
.as(not null)
6479 n_expr
.parent
= self
6482 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6484 if _n_minus
== old_child
then
6485 if new_child
!= null then
6486 new_child
.parent
= self
6487 assert new_child
isa TMinus
6488 _n_minus
= new_child
6494 if _n_expr
== old_child
then
6495 if new_child
!= null then
6496 new_child
.parent
= self
6497 assert new_child
isa PExpr
6506 redef fun visit_all
(v
: Visitor)
6508 v
.enter_visit
(_n_minus
)
6509 v
.enter_visit
(_n_expr
)
6512 redef fun visit_all_reverse
(v
: Visitor)
6514 v
.enter_visit
(_n_minus
)
6515 v
.enter_visit
(_n_expr
)
6518 redef class ANewExpr
6519 redef fun n_kwnew
=(n
)
6524 redef fun n_type
=(n
)
6537 private init empty_init
do end
6539 init init_anewexpr
(
6540 n_kwnew
: nullable TKwnew ,
6541 n_type
: nullable PType ,
6542 n_id
: nullable TId ,
6543 n_args
: Collection[Object] # Should be Collection[PExpr]
6547 _n_kwnew
= n_kwnew
.as(not null)
6548 n_kwnew
.parent
= self
6549 _n_type
= n_type
.as(not null)
6550 n_type
.parent
= self
6552 if n_id
!= null then
6562 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6564 if _n_kwnew
== old_child
then
6565 if new_child
!= null then
6566 new_child
.parent
= self
6567 assert new_child
isa TKwnew
6568 _n_kwnew
= new_child
6574 if _n_type
== old_child
then
6575 if new_child
!= null then
6576 new_child
.parent
= self
6577 assert new_child
isa PType
6584 if _n_id
== old_child
then
6585 if new_child
!= null then
6586 new_child
.parent
= self
6587 assert new_child
isa TId
6594 for i
in [0.._n_args
.length
[ do
6595 if _n_args
[i
] == old_child
then
6596 if new_child
!= null then
6597 assert new_child
isa PExpr
6598 _n_args
[i
] = new_child
6599 new_child
.parent
= self
6601 _n_args
.remove_at
(i
)
6608 redef fun visit_all
(v
: Visitor)
6610 v
.enter_visit
(_n_kwnew
)
6611 v
.enter_visit
(_n_type
)
6612 if _n_id
!= null then
6613 v
.enter_visit
(_n_id
.as(not null))
6620 redef fun visit_all_reverse
(v
: Visitor)
6622 v
.enter_visit
(_n_kwnew
)
6623 v
.enter_visit
(_n_type
)
6624 if _n_id
!= null then
6625 v
.enter_visit
(_n_id
.as(not null))
6628 var i
= _n_args
.length
6630 v
.enter_visit
(_n_args
[i
])
6636 redef class AAttrExpr
6637 redef fun n_expr
=(n
)
6648 private init empty_init
do end
6650 init init_aattrexpr
(
6651 n_expr
: nullable PExpr ,
6652 n_id
: nullable TAttrid
6656 _n_expr
= n_expr
.as(not null)
6657 n_expr
.parent
= self
6658 _n_id
= n_id
.as(not null)
6662 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6664 if _n_expr
== old_child
then
6665 if new_child
!= null then
6666 new_child
.parent
= self
6667 assert new_child
isa PExpr
6674 if _n_id
== old_child
then
6675 if new_child
!= null then
6676 new_child
.parent
= self
6677 assert new_child
isa TAttrid
6686 redef fun visit_all
(v
: Visitor)
6688 v
.enter_visit
(_n_expr
)
6689 v
.enter_visit
(_n_id
)
6692 redef fun visit_all_reverse
(v
: Visitor)
6694 v
.enter_visit
(_n_expr
)
6695 v
.enter_visit
(_n_id
)
6698 redef class AAttrAssignExpr
6699 redef fun n_expr
=(n
)
6709 redef fun n_assign
=(n
)
6714 redef fun n_value
=(n
)
6720 private init empty_init
do end
6722 init init_aattrassignexpr
(
6723 n_expr
: nullable PExpr ,
6724 n_id
: nullable TAttrid ,
6725 n_assign
: nullable TAssign ,
6726 n_value
: nullable PExpr
6730 _n_expr
= n_expr
.as(not null)
6731 n_expr
.parent
= self
6732 _n_id
= n_id
.as(not null)
6734 _n_assign
= n_assign
.as(not null)
6735 n_assign
.parent
= self
6736 _n_value
= n_value
.as(not null)
6737 n_value
.parent
= self
6740 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6742 if _n_expr
== old_child
then
6743 if new_child
!= null then
6744 new_child
.parent
= self
6745 assert new_child
isa PExpr
6752 if _n_id
== old_child
then
6753 if new_child
!= null then
6754 new_child
.parent
= self
6755 assert new_child
isa TAttrid
6762 if _n_assign
== old_child
then
6763 if new_child
!= null then
6764 new_child
.parent
= self
6765 assert new_child
isa TAssign
6766 _n_assign
= new_child
6772 if _n_value
== old_child
then
6773 if new_child
!= null then
6774 new_child
.parent
= self
6775 assert new_child
isa PExpr
6776 _n_value
= new_child
6784 redef fun visit_all
(v
: Visitor)
6786 v
.enter_visit
(_n_expr
)
6787 v
.enter_visit
(_n_id
)
6788 v
.enter_visit
(_n_assign
)
6789 v
.enter_visit
(_n_value
)
6792 redef fun visit_all_reverse
(v
: Visitor)
6794 v
.enter_visit
(_n_expr
)
6795 v
.enter_visit
(_n_id
)
6796 v
.enter_visit
(_n_assign
)
6797 v
.enter_visit
(_n_value
)
6800 redef class AAttrReassignExpr
6801 redef fun n_expr
=(n
)
6811 redef fun n_assign_op
=(n
)
6816 redef fun n_value
=(n
)
6822 private init empty_init
do end
6824 init init_aattrreassignexpr
(
6825 n_expr
: nullable PExpr ,
6826 n_id
: nullable TAttrid ,
6827 n_assign_op
: nullable PAssignOp ,
6828 n_value
: nullable PExpr
6832 _n_expr
= n_expr
.as(not null)
6833 n_expr
.parent
= self
6834 _n_id
= n_id
.as(not null)
6836 _n_assign_op
= n_assign_op
.as(not null)
6837 n_assign_op
.parent
= self
6838 _n_value
= n_value
.as(not null)
6839 n_value
.parent
= self
6842 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6844 if _n_expr
== old_child
then
6845 if new_child
!= null then
6846 new_child
.parent
= self
6847 assert new_child
isa PExpr
6854 if _n_id
== old_child
then
6855 if new_child
!= null then
6856 new_child
.parent
= self
6857 assert new_child
isa TAttrid
6864 if _n_assign_op
== old_child
then
6865 if new_child
!= null then
6866 new_child
.parent
= self
6867 assert new_child
isa PAssignOp
6868 _n_assign_op
= new_child
6874 if _n_value
== old_child
then
6875 if new_child
!= null then
6876 new_child
.parent
= self
6877 assert new_child
isa PExpr
6878 _n_value
= new_child
6886 redef fun visit_all
(v
: Visitor)
6888 v
.enter_visit
(_n_expr
)
6889 v
.enter_visit
(_n_id
)
6890 v
.enter_visit
(_n_assign_op
)
6891 v
.enter_visit
(_n_value
)
6894 redef fun visit_all_reverse
(v
: Visitor)
6896 v
.enter_visit
(_n_expr
)
6897 v
.enter_visit
(_n_id
)
6898 v
.enter_visit
(_n_assign_op
)
6899 v
.enter_visit
(_n_value
)
6902 redef class ACallExpr
6903 redef fun n_expr
=(n
)
6914 private init empty_init
do end
6916 init init_acallexpr
(
6917 n_expr
: nullable PExpr ,
6918 n_id
: nullable TId ,
6919 n_args
: Collection[Object] , # Should be Collection[PExpr]
6920 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
6924 _n_expr
= n_expr
.as(not null)
6925 n_expr
.parent
= self
6926 _n_id
= n_id
.as(not null)
6933 for n
in n_closure_defs
do
6934 assert n
isa PClosureDef
6935 _n_closure_defs
.add
(n
)
6940 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
6942 if _n_expr
== old_child
then
6943 if new_child
!= null then
6944 new_child
.parent
= self
6945 assert new_child
isa PExpr
6952 if _n_id
== old_child
then
6953 if new_child
!= null then
6954 new_child
.parent
= self
6955 assert new_child
isa TId
6962 for i
in [0.._n_args
.length
[ do
6963 if _n_args
[i
] == old_child
then
6964 if new_child
!= null then
6965 assert new_child
isa PExpr
6966 _n_args
[i
] = new_child
6967 new_child
.parent
= self
6969 _n_args
.remove_at
(i
)
6974 for i
in [0.._n_closure_defs
.length
[ do
6975 if _n_closure_defs
[i
] == old_child
then
6976 if new_child
!= null then
6977 assert new_child
isa PClosureDef
6978 _n_closure_defs
[i
] = new_child
6979 new_child
.parent
= self
6981 _n_closure_defs
.remove_at
(i
)
6988 redef fun visit_all
(v
: Visitor)
6990 v
.enter_visit
(_n_expr
)
6991 v
.enter_visit
(_n_id
)
6995 for n
in _n_closure_defs
do
7000 redef fun visit_all_reverse
(v
: Visitor)
7002 v
.enter_visit
(_n_expr
)
7003 v
.enter_visit
(_n_id
)
7005 var i
= _n_args
.length
7007 v
.enter_visit
(_n_args
[i
])
7012 var i
= _n_closure_defs
.length
7014 v
.enter_visit
(_n_closure_defs
[i
])
7020 redef class ACallAssignExpr
7021 redef fun n_expr
=(n
)
7031 redef fun n_assign
=(n
)
7036 redef fun n_value
=(n
)
7042 private init empty_init
do end
7044 init init_acallassignexpr
(
7045 n_expr
: nullable PExpr ,
7046 n_id
: nullable TId ,
7047 n_args
: Collection[Object] , # Should be Collection[PExpr]
7048 n_assign
: nullable TAssign ,
7049 n_value
: nullable PExpr
7053 _n_expr
= n_expr
.as(not null)
7054 n_expr
.parent
= self
7055 _n_id
= n_id
.as(not null)
7062 _n_assign
= n_assign
.as(not null)
7063 n_assign
.parent
= self
7064 _n_value
= n_value
.as(not null)
7065 n_value
.parent
= self
7068 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7070 if _n_expr
== old_child
then
7071 if new_child
!= null then
7072 new_child
.parent
= self
7073 assert new_child
isa PExpr
7080 if _n_id
== old_child
then
7081 if new_child
!= null then
7082 new_child
.parent
= self
7083 assert new_child
isa TId
7090 for i
in [0.._n_args
.length
[ do
7091 if _n_args
[i
] == old_child
then
7092 if new_child
!= null then
7093 assert new_child
isa PExpr
7094 _n_args
[i
] = new_child
7095 new_child
.parent
= self
7097 _n_args
.remove_at
(i
)
7102 if _n_assign
== old_child
then
7103 if new_child
!= null then
7104 new_child
.parent
= self
7105 assert new_child
isa TAssign
7106 _n_assign
= new_child
7112 if _n_value
== old_child
then
7113 if new_child
!= null then
7114 new_child
.parent
= self
7115 assert new_child
isa PExpr
7116 _n_value
= new_child
7124 redef fun visit_all
(v
: Visitor)
7126 v
.enter_visit
(_n_expr
)
7127 v
.enter_visit
(_n_id
)
7131 v
.enter_visit
(_n_assign
)
7132 v
.enter_visit
(_n_value
)
7135 redef fun visit_all_reverse
(v
: Visitor)
7137 v
.enter_visit
(_n_expr
)
7138 v
.enter_visit
(_n_id
)
7140 var i
= _n_args
.length
7142 v
.enter_visit
(_n_args
[i
])
7146 v
.enter_visit
(_n_assign
)
7147 v
.enter_visit
(_n_value
)
7150 redef class ACallReassignExpr
7151 redef fun n_expr
=(n
)
7161 redef fun n_assign_op
=(n
)
7166 redef fun n_value
=(n
)
7172 private init empty_init
do end
7174 init init_acallreassignexpr
(
7175 n_expr
: nullable PExpr ,
7176 n_id
: nullable TId ,
7177 n_args
: Collection[Object] , # Should be Collection[PExpr]
7178 n_assign_op
: nullable PAssignOp ,
7179 n_value
: nullable PExpr
7183 _n_expr
= n_expr
.as(not null)
7184 n_expr
.parent
= self
7185 _n_id
= n_id
.as(not null)
7192 _n_assign_op
= n_assign_op
.as(not null)
7193 n_assign_op
.parent
= self
7194 _n_value
= n_value
.as(not null)
7195 n_value
.parent
= self
7198 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7200 if _n_expr
== old_child
then
7201 if new_child
!= null then
7202 new_child
.parent
= self
7203 assert new_child
isa PExpr
7210 if _n_id
== old_child
then
7211 if new_child
!= null then
7212 new_child
.parent
= self
7213 assert new_child
isa TId
7220 for i
in [0.._n_args
.length
[ do
7221 if _n_args
[i
] == old_child
then
7222 if new_child
!= null then
7223 assert new_child
isa PExpr
7224 _n_args
[i
] = new_child
7225 new_child
.parent
= self
7227 _n_args
.remove_at
(i
)
7232 if _n_assign_op
== old_child
then
7233 if new_child
!= null then
7234 new_child
.parent
= self
7235 assert new_child
isa PAssignOp
7236 _n_assign_op
= new_child
7242 if _n_value
== old_child
then
7243 if new_child
!= null then
7244 new_child
.parent
= self
7245 assert new_child
isa PExpr
7246 _n_value
= new_child
7254 redef fun visit_all
(v
: Visitor)
7256 v
.enter_visit
(_n_expr
)
7257 v
.enter_visit
(_n_id
)
7261 v
.enter_visit
(_n_assign_op
)
7262 v
.enter_visit
(_n_value
)
7265 redef fun visit_all_reverse
(v
: Visitor)
7267 v
.enter_visit
(_n_expr
)
7268 v
.enter_visit
(_n_id
)
7270 var i
= _n_args
.length
7272 v
.enter_visit
(_n_args
[i
])
7276 v
.enter_visit
(_n_assign_op
)
7277 v
.enter_visit
(_n_value
)
7280 redef class ASuperExpr
7281 redef fun n_qualified
=(n
)
7288 redef fun n_kwsuper
=(n
)
7294 private init empty_init
do end
7296 init init_asuperexpr
(
7297 n_qualified
: nullable PQualified ,
7298 n_kwsuper
: nullable TKwsuper ,
7299 n_args
: Collection[Object] # Should be Collection[PExpr]
7303 _n_qualified
= n_qualified
7304 if n_qualified
!= null then
7305 n_qualified
.parent
= self
7307 _n_kwsuper
= n_kwsuper
.as(not null)
7308 n_kwsuper
.parent
= self
7316 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7318 if _n_qualified
== old_child
then
7319 if new_child
!= null then
7320 new_child
.parent
= self
7321 assert new_child
isa PQualified
7322 _n_qualified
= new_child
7328 if _n_kwsuper
== old_child
then
7329 if new_child
!= null then
7330 new_child
.parent
= self
7331 assert new_child
isa TKwsuper
7332 _n_kwsuper
= new_child
7338 for i
in [0.._n_args
.length
[ do
7339 if _n_args
[i
] == old_child
then
7340 if new_child
!= null then
7341 assert new_child
isa PExpr
7342 _n_args
[i
] = new_child
7343 new_child
.parent
= self
7345 _n_args
.remove_at
(i
)
7352 redef fun visit_all
(v
: Visitor)
7354 if _n_qualified
!= null then
7355 v
.enter_visit
(_n_qualified
.as(not null))
7357 v
.enter_visit
(_n_kwsuper
)
7363 redef fun visit_all_reverse
(v
: Visitor)
7365 if _n_qualified
!= null then
7366 v
.enter_visit
(_n_qualified
.as(not null))
7368 v
.enter_visit
(_n_kwsuper
)
7370 var i
= _n_args
.length
7372 v
.enter_visit
(_n_args
[i
])
7378 redef class AInitExpr
7379 redef fun n_expr
=(n
)
7384 redef fun n_kwinit
=(n
)
7390 private init empty_init
do end
7392 init init_ainitexpr
(
7393 n_expr
: nullable PExpr ,
7394 n_kwinit
: nullable TKwinit ,
7395 n_args
: Collection[Object] # Should be Collection[PExpr]
7399 _n_expr
= n_expr
.as(not null)
7400 n_expr
.parent
= self
7401 _n_kwinit
= n_kwinit
.as(not null)
7402 n_kwinit
.parent
= self
7410 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7412 if _n_expr
== old_child
then
7413 if new_child
!= null then
7414 new_child
.parent
= self
7415 assert new_child
isa PExpr
7422 if _n_kwinit
== old_child
then
7423 if new_child
!= null then
7424 new_child
.parent
= self
7425 assert new_child
isa TKwinit
7426 _n_kwinit
= new_child
7432 for i
in [0.._n_args
.length
[ do
7433 if _n_args
[i
] == old_child
then
7434 if new_child
!= null then
7435 assert new_child
isa PExpr
7436 _n_args
[i
] = new_child
7437 new_child
.parent
= self
7439 _n_args
.remove_at
(i
)
7446 redef fun visit_all
(v
: Visitor)
7448 v
.enter_visit
(_n_expr
)
7449 v
.enter_visit
(_n_kwinit
)
7455 redef fun visit_all_reverse
(v
: Visitor)
7457 v
.enter_visit
(_n_expr
)
7458 v
.enter_visit
(_n_kwinit
)
7460 var i
= _n_args
.length
7462 v
.enter_visit
(_n_args
[i
])
7468 redef class ABraExpr
7469 redef fun n_expr
=(n
)
7475 private init empty_init
do end
7477 init init_abraexpr
(
7478 n_expr
: nullable PExpr ,
7479 n_args
: Collection[Object] , # Should be Collection[PExpr]
7480 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
7484 _n_expr
= n_expr
.as(not null)
7485 n_expr
.parent
= self
7491 for n
in n_closure_defs
do
7492 assert n
isa PClosureDef
7493 _n_closure_defs
.add
(n
)
7498 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7500 if _n_expr
== old_child
then
7501 if new_child
!= null then
7502 new_child
.parent
= self
7503 assert new_child
isa PExpr
7510 for i
in [0.._n_args
.length
[ do
7511 if _n_args
[i
] == old_child
then
7512 if new_child
!= null then
7513 assert new_child
isa PExpr
7514 _n_args
[i
] = new_child
7515 new_child
.parent
= self
7517 _n_args
.remove_at
(i
)
7522 for i
in [0.._n_closure_defs
.length
[ do
7523 if _n_closure_defs
[i
] == old_child
then
7524 if new_child
!= null then
7525 assert new_child
isa PClosureDef
7526 _n_closure_defs
[i
] = new_child
7527 new_child
.parent
= self
7529 _n_closure_defs
.remove_at
(i
)
7536 redef fun visit_all
(v
: Visitor)
7538 v
.enter_visit
(_n_expr
)
7542 for n
in _n_closure_defs
do
7547 redef fun visit_all_reverse
(v
: Visitor)
7549 v
.enter_visit
(_n_expr
)
7551 var i
= _n_args
.length
7553 v
.enter_visit
(_n_args
[i
])
7558 var i
= _n_closure_defs
.length
7560 v
.enter_visit
(_n_closure_defs
[i
])
7566 redef class ABraAssignExpr
7567 redef fun n_expr
=(n
)
7572 redef fun n_assign
=(n
)
7577 redef fun n_value
=(n
)
7583 private init empty_init
do end
7585 init init_abraassignexpr
(
7586 n_expr
: nullable PExpr ,
7587 n_args
: Collection[Object] , # Should be Collection[PExpr]
7588 n_assign
: nullable TAssign ,
7589 n_value
: nullable PExpr
7593 _n_expr
= n_expr
.as(not null)
7594 n_expr
.parent
= self
7600 _n_assign
= n_assign
.as(not null)
7601 n_assign
.parent
= self
7602 _n_value
= n_value
.as(not null)
7603 n_value
.parent
= self
7606 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7608 if _n_expr
== old_child
then
7609 if new_child
!= null then
7610 new_child
.parent
= self
7611 assert new_child
isa PExpr
7618 for i
in [0.._n_args
.length
[ do
7619 if _n_args
[i
] == old_child
then
7620 if new_child
!= null then
7621 assert new_child
isa PExpr
7622 _n_args
[i
] = new_child
7623 new_child
.parent
= self
7625 _n_args
.remove_at
(i
)
7630 if _n_assign
== old_child
then
7631 if new_child
!= null then
7632 new_child
.parent
= self
7633 assert new_child
isa TAssign
7634 _n_assign
= new_child
7640 if _n_value
== old_child
then
7641 if new_child
!= null then
7642 new_child
.parent
= self
7643 assert new_child
isa PExpr
7644 _n_value
= new_child
7652 redef fun visit_all
(v
: Visitor)
7654 v
.enter_visit
(_n_expr
)
7658 v
.enter_visit
(_n_assign
)
7659 v
.enter_visit
(_n_value
)
7662 redef fun visit_all_reverse
(v
: Visitor)
7664 v
.enter_visit
(_n_expr
)
7666 var i
= _n_args
.length
7668 v
.enter_visit
(_n_args
[i
])
7672 v
.enter_visit
(_n_assign
)
7673 v
.enter_visit
(_n_value
)
7676 redef class ABraReassignExpr
7677 redef fun n_expr
=(n
)
7682 redef fun n_assign_op
=(n
)
7687 redef fun n_value
=(n
)
7693 private init empty_init
do end
7695 init init_abrareassignexpr
(
7696 n_expr
: nullable PExpr ,
7697 n_args
: Collection[Object] , # Should be Collection[PExpr]
7698 n_assign_op
: nullable PAssignOp ,
7699 n_value
: nullable PExpr
7703 _n_expr
= n_expr
.as(not null)
7704 n_expr
.parent
= self
7710 _n_assign_op
= n_assign_op
.as(not null)
7711 n_assign_op
.parent
= self
7712 _n_value
= n_value
.as(not null)
7713 n_value
.parent
= self
7716 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7718 if _n_expr
== old_child
then
7719 if new_child
!= null then
7720 new_child
.parent
= self
7721 assert new_child
isa PExpr
7728 for i
in [0.._n_args
.length
[ do
7729 if _n_args
[i
] == old_child
then
7730 if new_child
!= null then
7731 assert new_child
isa PExpr
7732 _n_args
[i
] = new_child
7733 new_child
.parent
= self
7735 _n_args
.remove_at
(i
)
7740 if _n_assign_op
== old_child
then
7741 if new_child
!= null then
7742 new_child
.parent
= self
7743 assert new_child
isa PAssignOp
7744 _n_assign_op
= new_child
7750 if _n_value
== old_child
then
7751 if new_child
!= null then
7752 new_child
.parent
= self
7753 assert new_child
isa PExpr
7754 _n_value
= new_child
7762 redef fun visit_all
(v
: Visitor)
7764 v
.enter_visit
(_n_expr
)
7768 v
.enter_visit
(_n_assign_op
)
7769 v
.enter_visit
(_n_value
)
7772 redef fun visit_all_reverse
(v
: Visitor)
7774 v
.enter_visit
(_n_expr
)
7776 var i
= _n_args
.length
7778 v
.enter_visit
(_n_args
[i
])
7782 v
.enter_visit
(_n_assign_op
)
7783 v
.enter_visit
(_n_value
)
7786 redef class AClosureCallExpr
7793 private init empty_init
do end
7795 init init_aclosurecallexpr
(
7796 n_id
: nullable TId ,
7797 n_args
: Collection[Object] , # Should be Collection[PExpr]
7798 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
7802 _n_id
= n_id
.as(not null)
7809 for n
in n_closure_defs
do
7810 assert n
isa PClosureDef
7811 _n_closure_defs
.add
(n
)
7816 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7818 if _n_id
== old_child
then
7819 if new_child
!= null then
7820 new_child
.parent
= self
7821 assert new_child
isa TId
7828 for i
in [0.._n_args
.length
[ do
7829 if _n_args
[i
] == old_child
then
7830 if new_child
!= null then
7831 assert new_child
isa PExpr
7832 _n_args
[i
] = new_child
7833 new_child
.parent
= self
7835 _n_args
.remove_at
(i
)
7840 for i
in [0.._n_closure_defs
.length
[ do
7841 if _n_closure_defs
[i
] == old_child
then
7842 if new_child
!= null then
7843 assert new_child
isa PClosureDef
7844 _n_closure_defs
[i
] = new_child
7845 new_child
.parent
= self
7847 _n_closure_defs
.remove_at
(i
)
7854 redef fun visit_all
(v
: Visitor)
7856 v
.enter_visit
(_n_id
)
7860 for n
in _n_closure_defs
do
7865 redef fun visit_all_reverse
(v
: Visitor)
7867 v
.enter_visit
(_n_id
)
7869 var i
= _n_args
.length
7871 v
.enter_visit
(_n_args
[i
])
7876 var i
= _n_closure_defs
.length
7878 v
.enter_visit
(_n_closure_defs
[i
])
7884 redef class AVarExpr
7891 private init empty_init
do end
7893 init init_avarexpr
(
7898 _n_id
= n_id
.as(not null)
7902 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7904 if _n_id
== old_child
then
7905 if new_child
!= null then
7906 new_child
.parent
= self
7907 assert new_child
isa TId
7916 redef fun visit_all
(v
: Visitor)
7918 v
.enter_visit
(_n_id
)
7921 redef fun visit_all_reverse
(v
: Visitor)
7923 v
.enter_visit
(_n_id
)
7926 redef class AVarAssignExpr
7932 redef fun n_assign
=(n
)
7937 redef fun n_value
=(n
)
7943 private init empty_init
do end
7945 init init_avarassignexpr
(
7946 n_id
: nullable TId ,
7947 n_assign
: nullable TAssign ,
7948 n_value
: nullable PExpr
7952 _n_id
= n_id
.as(not null)
7954 _n_assign
= n_assign
.as(not null)
7955 n_assign
.parent
= self
7956 _n_value
= n_value
.as(not null)
7957 n_value
.parent
= self
7960 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
7962 if _n_id
== old_child
then
7963 if new_child
!= null then
7964 new_child
.parent
= self
7965 assert new_child
isa TId
7972 if _n_assign
== old_child
then
7973 if new_child
!= null then
7974 new_child
.parent
= self
7975 assert new_child
isa TAssign
7976 _n_assign
= new_child
7982 if _n_value
== old_child
then
7983 if new_child
!= null then
7984 new_child
.parent
= self
7985 assert new_child
isa PExpr
7986 _n_value
= new_child
7994 redef fun visit_all
(v
: Visitor)
7996 v
.enter_visit
(_n_id
)
7997 v
.enter_visit
(_n_assign
)
7998 v
.enter_visit
(_n_value
)
8001 redef fun visit_all_reverse
(v
: Visitor)
8003 v
.enter_visit
(_n_id
)
8004 v
.enter_visit
(_n_assign
)
8005 v
.enter_visit
(_n_value
)
8008 redef class AVarReassignExpr
8014 redef fun n_assign_op
=(n
)
8019 redef fun n_value
=(n
)
8025 private init empty_init
do end
8027 init init_avarreassignexpr
(
8028 n_id
: nullable TId ,
8029 n_assign_op
: nullable PAssignOp ,
8030 n_value
: nullable PExpr
8034 _n_id
= n_id
.as(not null)
8036 _n_assign_op
= n_assign_op
.as(not null)
8037 n_assign_op
.parent
= self
8038 _n_value
= n_value
.as(not null)
8039 n_value
.parent
= self
8042 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8044 if _n_id
== old_child
then
8045 if new_child
!= null then
8046 new_child
.parent
= self
8047 assert new_child
isa TId
8054 if _n_assign_op
== old_child
then
8055 if new_child
!= null then
8056 new_child
.parent
= self
8057 assert new_child
isa PAssignOp
8058 _n_assign_op
= new_child
8064 if _n_value
== old_child
then
8065 if new_child
!= null then
8066 new_child
.parent
= self
8067 assert new_child
isa PExpr
8068 _n_value
= new_child
8076 redef fun visit_all
(v
: Visitor)
8078 v
.enter_visit
(_n_id
)
8079 v
.enter_visit
(_n_assign_op
)
8080 v
.enter_visit
(_n_value
)
8083 redef fun visit_all_reverse
(v
: Visitor)
8085 v
.enter_visit
(_n_id
)
8086 v
.enter_visit
(_n_assign_op
)
8087 v
.enter_visit
(_n_value
)
8090 redef class ARangeExpr
8091 redef fun n_expr
=(n
)
8096 redef fun n_expr2
=(n
)
8102 private init empty_init
do end
8104 init init_arangeexpr
(
8105 n_expr
: nullable PExpr ,
8106 n_expr2
: nullable PExpr
8110 _n_expr
= n_expr
.as(not null)
8111 n_expr
.parent
= self
8112 _n_expr2
= n_expr2
.as(not null)
8113 n_expr2
.parent
= self
8116 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8118 if _n_expr
== old_child
then
8119 if new_child
!= null then
8120 new_child
.parent
= self
8121 assert new_child
isa PExpr
8128 if _n_expr2
== old_child
then
8129 if new_child
!= null then
8130 new_child
.parent
= self
8131 assert new_child
isa PExpr
8132 _n_expr2
= new_child
8140 redef fun visit_all
(v
: Visitor)
8142 v
.enter_visit
(_n_expr
)
8143 v
.enter_visit
(_n_expr2
)
8146 redef fun visit_all_reverse
(v
: Visitor)
8148 v
.enter_visit
(_n_expr
)
8149 v
.enter_visit
(_n_expr2
)
8152 redef class ACrangeExpr
8153 redef fun n_expr
=(n
)
8158 redef fun n_expr2
=(n
)
8164 private init empty_init
do end
8166 init init_acrangeexpr
(
8167 n_expr
: nullable PExpr ,
8168 n_expr2
: nullable PExpr
8172 _n_expr
= n_expr
.as(not null)
8173 n_expr
.parent
= self
8174 _n_expr2
= n_expr2
.as(not null)
8175 n_expr2
.parent
= self
8178 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8180 if _n_expr
== old_child
then
8181 if new_child
!= null then
8182 new_child
.parent
= self
8183 assert new_child
isa PExpr
8190 if _n_expr2
== old_child
then
8191 if new_child
!= null then
8192 new_child
.parent
= self
8193 assert new_child
isa PExpr
8194 _n_expr2
= new_child
8202 redef fun visit_all
(v
: Visitor)
8204 v
.enter_visit
(_n_expr
)
8205 v
.enter_visit
(_n_expr2
)
8208 redef fun visit_all_reverse
(v
: Visitor)
8210 v
.enter_visit
(_n_expr
)
8211 v
.enter_visit
(_n_expr2
)
8214 redef class AOrangeExpr
8215 redef fun n_expr
=(n
)
8220 redef fun n_expr2
=(n
)
8226 private init empty_init
do end
8228 init init_aorangeexpr
(
8229 n_expr
: nullable PExpr ,
8230 n_expr2
: nullable PExpr
8234 _n_expr
= n_expr
.as(not null)
8235 n_expr
.parent
= self
8236 _n_expr2
= n_expr2
.as(not null)
8237 n_expr2
.parent
= self
8240 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8242 if _n_expr
== old_child
then
8243 if new_child
!= null then
8244 new_child
.parent
= self
8245 assert new_child
isa PExpr
8252 if _n_expr2
== old_child
then
8253 if new_child
!= null then
8254 new_child
.parent
= self
8255 assert new_child
isa PExpr
8256 _n_expr2
= new_child
8264 redef fun visit_all
(v
: Visitor)
8266 v
.enter_visit
(_n_expr
)
8267 v
.enter_visit
(_n_expr2
)
8270 redef fun visit_all_reverse
(v
: Visitor)
8272 v
.enter_visit
(_n_expr
)
8273 v
.enter_visit
(_n_expr2
)
8276 redef class AArrayExpr
8278 private init empty_init
do end
8280 init init_aarrayexpr
(
8281 n_exprs
: Collection[Object] # Should be Collection[PExpr]
8292 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8294 for i
in [0.._n_exprs
.length
[ do
8295 if _n_exprs
[i
] == old_child
then
8296 if new_child
!= null then
8297 assert new_child
isa PExpr
8298 _n_exprs
[i
] = new_child
8299 new_child
.parent
= self
8301 _n_exprs
.remove_at
(i
)
8308 redef fun visit_all
(v
: Visitor)
8310 for n
in _n_exprs
do
8315 redef fun visit_all_reverse
(v
: Visitor)
8318 var i
= _n_exprs
.length
8320 v
.enter_visit
(_n_exprs
[i
])
8326 redef class ASelfExpr
8327 redef fun n_kwself
=(n
)
8333 private init empty_init
do end
8335 init init_aselfexpr
(
8336 n_kwself
: nullable TKwself
8340 _n_kwself
= n_kwself
.as(not null)
8341 n_kwself
.parent
= self
8344 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8346 if _n_kwself
== old_child
then
8347 if new_child
!= null then
8348 new_child
.parent
= self
8349 assert new_child
isa TKwself
8350 _n_kwself
= new_child
8358 redef fun visit_all
(v
: Visitor)
8360 v
.enter_visit
(_n_kwself
)
8363 redef fun visit_all_reverse
(v
: Visitor)
8365 v
.enter_visit
(_n_kwself
)
8368 redef class AImplicitSelfExpr
8370 private init empty_init
do end
8372 init init_aimplicitselfexpr
8377 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8381 redef fun visit_all
(v
: Visitor)
8385 redef fun visit_all_reverse
(v
: Visitor)
8389 redef class ATrueExpr
8390 redef fun n_kwtrue
=(n
)
8396 private init empty_init
do end
8398 init init_atrueexpr
(
8399 n_kwtrue
: nullable TKwtrue
8403 _n_kwtrue
= n_kwtrue
.as(not null)
8404 n_kwtrue
.parent
= self
8407 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8409 if _n_kwtrue
== old_child
then
8410 if new_child
!= null then
8411 new_child
.parent
= self
8412 assert new_child
isa TKwtrue
8413 _n_kwtrue
= new_child
8421 redef fun visit_all
(v
: Visitor)
8423 v
.enter_visit
(_n_kwtrue
)
8426 redef fun visit_all_reverse
(v
: Visitor)
8428 v
.enter_visit
(_n_kwtrue
)
8431 redef class AFalseExpr
8432 redef fun n_kwfalse
=(n
)
8438 private init empty_init
do end
8440 init init_afalseexpr
(
8441 n_kwfalse
: nullable TKwfalse
8445 _n_kwfalse
= n_kwfalse
.as(not null)
8446 n_kwfalse
.parent
= self
8449 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8451 if _n_kwfalse
== old_child
then
8452 if new_child
!= null then
8453 new_child
.parent
= self
8454 assert new_child
isa TKwfalse
8455 _n_kwfalse
= new_child
8463 redef fun visit_all
(v
: Visitor)
8465 v
.enter_visit
(_n_kwfalse
)
8468 redef fun visit_all_reverse
(v
: Visitor)
8470 v
.enter_visit
(_n_kwfalse
)
8473 redef class ANullExpr
8474 redef fun n_kwnull
=(n
)
8480 private init empty_init
do end
8482 init init_anullexpr
(
8483 n_kwnull
: nullable TKwnull
8487 _n_kwnull
= n_kwnull
.as(not null)
8488 n_kwnull
.parent
= self
8491 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8493 if _n_kwnull
== old_child
then
8494 if new_child
!= null then
8495 new_child
.parent
= self
8496 assert new_child
isa TKwnull
8497 _n_kwnull
= new_child
8505 redef fun visit_all
(v
: Visitor)
8507 v
.enter_visit
(_n_kwnull
)
8510 redef fun visit_all_reverse
(v
: Visitor)
8512 v
.enter_visit
(_n_kwnull
)
8515 redef class AIntExpr
8516 redef fun n_number
=(n
)
8522 private init empty_init
do end
8524 init init_aintexpr
(
8525 n_number
: nullable TNumber
8529 _n_number
= n_number
.as(not null)
8530 n_number
.parent
= self
8533 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8535 if _n_number
== old_child
then
8536 if new_child
!= null then
8537 new_child
.parent
= self
8538 assert new_child
isa TNumber
8539 _n_number
= new_child
8547 redef fun visit_all
(v
: Visitor)
8549 v
.enter_visit
(_n_number
)
8552 redef fun visit_all_reverse
(v
: Visitor)
8554 v
.enter_visit
(_n_number
)
8557 redef class AFloatExpr
8558 redef fun n_float
=(n
)
8564 private init empty_init
do end
8566 init init_afloatexpr
(
8567 n_float
: nullable TFloat
8571 _n_float
= n_float
.as(not null)
8572 n_float
.parent
= self
8575 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8577 if _n_float
== old_child
then
8578 if new_child
!= null then
8579 new_child
.parent
= self
8580 assert new_child
isa TFloat
8581 _n_float
= new_child
8589 redef fun visit_all
(v
: Visitor)
8591 v
.enter_visit
(_n_float
)
8594 redef fun visit_all_reverse
(v
: Visitor)
8596 v
.enter_visit
(_n_float
)
8599 redef class ACharExpr
8600 redef fun n_char
=(n
)
8606 private init empty_init
do end
8608 init init_acharexpr
(
8609 n_char
: nullable TChar
8613 _n_char
= n_char
.as(not null)
8614 n_char
.parent
= self
8617 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8619 if _n_char
== old_child
then
8620 if new_child
!= null then
8621 new_child
.parent
= self
8622 assert new_child
isa TChar
8631 redef fun visit_all
(v
: Visitor)
8633 v
.enter_visit
(_n_char
)
8636 redef fun visit_all_reverse
(v
: Visitor)
8638 v
.enter_visit
(_n_char
)
8641 redef class AStringExpr
8642 redef fun n_string
=(n
)
8648 private init empty_init
do end
8650 init init_astringexpr
(
8651 n_string
: nullable TString
8655 _n_string
= n_string
.as(not null)
8656 n_string
.parent
= self
8659 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8661 if _n_string
== old_child
then
8662 if new_child
!= null then
8663 new_child
.parent
= self
8664 assert new_child
isa TString
8665 _n_string
= new_child
8673 redef fun visit_all
(v
: Visitor)
8675 v
.enter_visit
(_n_string
)
8678 redef fun visit_all_reverse
(v
: Visitor)
8680 v
.enter_visit
(_n_string
)
8683 redef class AStartStringExpr
8684 redef fun n_string
=(n
)
8690 private init empty_init
do end
8692 init init_astartstringexpr
(
8693 n_string
: nullable TStartString
8697 _n_string
= n_string
.as(not null)
8698 n_string
.parent
= self
8701 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8703 if _n_string
== old_child
then
8704 if new_child
!= null then
8705 new_child
.parent
= self
8706 assert new_child
isa TStartString
8707 _n_string
= new_child
8715 redef fun visit_all
(v
: Visitor)
8717 v
.enter_visit
(_n_string
)
8720 redef fun visit_all_reverse
(v
: Visitor)
8722 v
.enter_visit
(_n_string
)
8725 redef class AMidStringExpr
8726 redef fun n_string
=(n
)
8732 private init empty_init
do end
8734 init init_amidstringexpr
(
8735 n_string
: nullable TMidString
8739 _n_string
= n_string
.as(not null)
8740 n_string
.parent
= self
8743 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8745 if _n_string
== old_child
then
8746 if new_child
!= null then
8747 new_child
.parent
= self
8748 assert new_child
isa TMidString
8749 _n_string
= new_child
8757 redef fun visit_all
(v
: Visitor)
8759 v
.enter_visit
(_n_string
)
8762 redef fun visit_all_reverse
(v
: Visitor)
8764 v
.enter_visit
(_n_string
)
8767 redef class AEndStringExpr
8768 redef fun n_string
=(n
)
8774 private init empty_init
do end
8776 init init_aendstringexpr
(
8777 n_string
: nullable TEndString
8781 _n_string
= n_string
.as(not null)
8782 n_string
.parent
= self
8785 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8787 if _n_string
== old_child
then
8788 if new_child
!= null then
8789 new_child
.parent
= self
8790 assert new_child
isa TEndString
8791 _n_string
= new_child
8799 redef fun visit_all
(v
: Visitor)
8801 v
.enter_visit
(_n_string
)
8804 redef fun visit_all_reverse
(v
: Visitor)
8806 v
.enter_visit
(_n_string
)
8809 redef class ASuperstringExpr
8811 private init empty_init
do end
8813 init init_asuperstringexpr
(
8814 n_exprs
: Collection[Object] # Should be Collection[PExpr]
8825 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8827 for i
in [0.._n_exprs
.length
[ do
8828 if _n_exprs
[i
] == old_child
then
8829 if new_child
!= null then
8830 assert new_child
isa PExpr
8831 _n_exprs
[i
] = new_child
8832 new_child
.parent
= self
8834 _n_exprs
.remove_at
(i
)
8841 redef fun visit_all
(v
: Visitor)
8843 for n
in _n_exprs
do
8848 redef fun visit_all_reverse
(v
: Visitor)
8851 var i
= _n_exprs
.length
8853 v
.enter_visit
(_n_exprs
[i
])
8859 redef class AParExpr
8860 redef fun n_expr
=(n
)
8866 private init empty_init
do end
8868 init init_aparexpr
(
8869 n_expr
: nullable PExpr
8873 _n_expr
= n_expr
.as(not null)
8874 n_expr
.parent
= self
8877 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8879 if _n_expr
== old_child
then
8880 if new_child
!= null then
8881 new_child
.parent
= self
8882 assert new_child
isa PExpr
8891 redef fun visit_all
(v
: Visitor)
8893 v
.enter_visit
(_n_expr
)
8896 redef fun visit_all_reverse
(v
: Visitor)
8898 v
.enter_visit
(_n_expr
)
8901 redef class AAsCastExpr
8902 redef fun n_expr
=(n
)
8907 redef fun n_kwas
=(n
)
8912 redef fun n_type
=(n
)
8918 private init empty_init
do end
8920 init init_aascastexpr
(
8921 n_expr
: nullable PExpr ,
8922 n_kwas
: nullable TKwas ,
8923 n_type
: nullable PType
8927 _n_expr
= n_expr
.as(not null)
8928 n_expr
.parent
= self
8929 _n_kwas
= n_kwas
.as(not null)
8930 n_kwas
.parent
= self
8931 _n_type
= n_type
.as(not null)
8932 n_type
.parent
= self
8935 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
8937 if _n_expr
== old_child
then
8938 if new_child
!= null then
8939 new_child
.parent
= self
8940 assert new_child
isa PExpr
8947 if _n_kwas
== old_child
then
8948 if new_child
!= null then
8949 new_child
.parent
= self
8950 assert new_child
isa TKwas
8957 if _n_type
== old_child
then
8958 if new_child
!= null then
8959 new_child
.parent
= self
8960 assert new_child
isa PType
8969 redef fun visit_all
(v
: Visitor)
8971 v
.enter_visit
(_n_expr
)
8972 v
.enter_visit
(_n_kwas
)
8973 v
.enter_visit
(_n_type
)
8976 redef fun visit_all_reverse
(v
: Visitor)
8978 v
.enter_visit
(_n_expr
)
8979 v
.enter_visit
(_n_kwas
)
8980 v
.enter_visit
(_n_type
)
8983 redef class AAsNotnullExpr
8984 redef fun n_expr
=(n
)
8989 redef fun n_kwas
=(n
)
8994 redef fun n_kwnot
=(n
)
8999 redef fun n_kwnull
=(n
)
9005 private init empty_init
do end
9007 init init_aasnotnullexpr
(
9008 n_expr
: nullable PExpr ,
9009 n_kwas
: nullable TKwas ,
9010 n_kwnot
: nullable TKwnot ,
9011 n_kwnull
: nullable TKwnull
9015 _n_expr
= n_expr
.as(not null)
9016 n_expr
.parent
= self
9017 _n_kwas
= n_kwas
.as(not null)
9018 n_kwas
.parent
= self
9019 _n_kwnot
= n_kwnot
.as(not null)
9020 n_kwnot
.parent
= self
9021 _n_kwnull
= n_kwnull
.as(not null)
9022 n_kwnull
.parent
= self
9025 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9027 if _n_expr
== old_child
then
9028 if new_child
!= null then
9029 new_child
.parent
= self
9030 assert new_child
isa PExpr
9037 if _n_kwas
== old_child
then
9038 if new_child
!= null then
9039 new_child
.parent
= self
9040 assert new_child
isa TKwas
9047 if _n_kwnot
== old_child
then
9048 if new_child
!= null then
9049 new_child
.parent
= self
9050 assert new_child
isa TKwnot
9051 _n_kwnot
= new_child
9057 if _n_kwnull
== old_child
then
9058 if new_child
!= null then
9059 new_child
.parent
= self
9060 assert new_child
isa TKwnull
9061 _n_kwnull
= new_child
9069 redef fun visit_all
(v
: Visitor)
9071 v
.enter_visit
(_n_expr
)
9072 v
.enter_visit
(_n_kwas
)
9073 v
.enter_visit
(_n_kwnot
)
9074 v
.enter_visit
(_n_kwnull
)
9077 redef fun visit_all_reverse
(v
: Visitor)
9079 v
.enter_visit
(_n_expr
)
9080 v
.enter_visit
(_n_kwas
)
9081 v
.enter_visit
(_n_kwnot
)
9082 v
.enter_visit
(_n_kwnull
)
9085 redef class AIssetAttrExpr
9086 redef fun n_kwisset
=(n
)
9091 redef fun n_expr
=(n
)
9102 private init empty_init
do end
9104 init init_aissetattrexpr
(
9105 n_kwisset
: nullable TKwisset ,
9106 n_expr
: nullable PExpr ,
9107 n_id
: nullable TAttrid
9111 _n_kwisset
= n_kwisset
.as(not null)
9112 n_kwisset
.parent
= self
9113 _n_expr
= n_expr
.as(not null)
9114 n_expr
.parent
= self
9115 _n_id
= n_id
.as(not null)
9119 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9121 if _n_kwisset
== old_child
then
9122 if new_child
!= null then
9123 new_child
.parent
= self
9124 assert new_child
isa TKwisset
9125 _n_kwisset
= new_child
9131 if _n_expr
== old_child
then
9132 if new_child
!= null then
9133 new_child
.parent
= self
9134 assert new_child
isa PExpr
9141 if _n_id
== old_child
then
9142 if new_child
!= null then
9143 new_child
.parent
= self
9144 assert new_child
isa TAttrid
9153 redef fun visit_all
(v
: Visitor)
9155 v
.enter_visit
(_n_kwisset
)
9156 v
.enter_visit
(_n_expr
)
9157 v
.enter_visit
(_n_id
)
9160 redef fun visit_all_reverse
(v
: Visitor)
9162 v
.enter_visit
(_n_kwisset
)
9163 v
.enter_visit
(_n_expr
)
9164 v
.enter_visit
(_n_id
)
9167 redef class APlusAssignOp
9168 redef fun n_pluseq
=(n
)
9174 private init empty_init
do end
9176 init init_aplusassignop
(
9177 n_pluseq
: nullable TPluseq
9181 _n_pluseq
= n_pluseq
.as(not null)
9182 n_pluseq
.parent
= self
9185 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9187 if _n_pluseq
== old_child
then
9188 if new_child
!= null then
9189 new_child
.parent
= self
9190 assert new_child
isa TPluseq
9191 _n_pluseq
= new_child
9199 redef fun visit_all
(v
: Visitor)
9201 v
.enter_visit
(_n_pluseq
)
9204 redef fun visit_all_reverse
(v
: Visitor)
9206 v
.enter_visit
(_n_pluseq
)
9209 redef class AMinusAssignOp
9210 redef fun n_minuseq
=(n
)
9216 private init empty_init
do end
9218 init init_aminusassignop
(
9219 n_minuseq
: nullable TMinuseq
9223 _n_minuseq
= n_minuseq
.as(not null)
9224 n_minuseq
.parent
= self
9227 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9229 if _n_minuseq
== old_child
then
9230 if new_child
!= null then
9231 new_child
.parent
= self
9232 assert new_child
isa TMinuseq
9233 _n_minuseq
= new_child
9241 redef fun visit_all
(v
: Visitor)
9243 v
.enter_visit
(_n_minuseq
)
9246 redef fun visit_all_reverse
(v
: Visitor)
9248 v
.enter_visit
(_n_minuseq
)
9251 redef class AClosureDef
9252 redef fun n_kwwith
=(n
)
9257 redef fun n_kwdo
=(n
)
9262 redef fun n_expr
=(n
)
9270 private init empty_init
do end
9272 init init_aclosuredef
(
9273 n_kwwith
: nullable TKwwith ,
9274 n_id
: Collection[Object] , # Should be Collection[TId]
9275 n_kwdo
: nullable TKwdo ,
9276 n_expr
: nullable PExpr
9280 _n_kwwith
= n_kwwith
.as(not null)
9281 n_kwwith
.parent
= self
9287 _n_kwdo
= n_kwdo
.as(not null)
9288 n_kwdo
.parent
= self
9290 if n_expr
!= null then
9291 n_expr
.parent
= self
9295 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9297 if _n_kwwith
== old_child
then
9298 if new_child
!= null then
9299 new_child
.parent
= self
9300 assert new_child
isa TKwwith
9301 _n_kwwith
= new_child
9307 for i
in [0.._n_id
.length
[ do
9308 if _n_id
[i
] == old_child
then
9309 if new_child
!= null then
9310 assert new_child
isa TId
9311 _n_id
[i
] = new_child
9312 new_child
.parent
= self
9319 if _n_kwdo
== old_child
then
9320 if new_child
!= null then
9321 new_child
.parent
= self
9322 assert new_child
isa TKwdo
9329 if _n_expr
== old_child
then
9330 if new_child
!= null then
9331 new_child
.parent
= self
9332 assert new_child
isa PExpr
9341 redef fun visit_all
(v
: Visitor)
9343 v
.enter_visit
(_n_kwwith
)
9347 v
.enter_visit
(_n_kwdo
)
9348 if _n_expr
!= null then
9349 v
.enter_visit
(_n_expr
.as(not null))
9353 redef fun visit_all_reverse
(v
: Visitor)
9355 v
.enter_visit
(_n_kwwith
)
9357 var i
= _n_id
.length
9359 v
.enter_visit
(_n_id
[i
])
9363 v
.enter_visit
(_n_kwdo
)
9364 if _n_expr
!= null then
9365 v
.enter_visit
(_n_expr
.as(not null))
9369 redef class AQualified
9370 redef fun n_classid
=(n
)
9378 private init empty_init
do end
9380 init init_aqualified
(
9381 n_id
: Collection[Object] , # Should be Collection[TId]
9382 n_classid
: nullable TClassid
9391 _n_classid
= n_classid
9392 if n_classid
!= null then
9393 n_classid
.parent
= self
9397 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9399 for i
in [0.._n_id
.length
[ do
9400 if _n_id
[i
] == old_child
then
9401 if new_child
!= null then
9402 assert new_child
isa TId
9403 _n_id
[i
] = new_child
9404 new_child
.parent
= self
9411 if _n_classid
== old_child
then
9412 if new_child
!= null then
9413 new_child
.parent
= self
9414 assert new_child
isa TClassid
9415 _n_classid
= new_child
9423 redef fun visit_all
(v
: Visitor)
9428 if _n_classid
!= null then
9429 v
.enter_visit
(_n_classid
.as(not null))
9433 redef fun visit_all_reverse
(v
: Visitor)
9436 var i
= _n_id
.length
9438 v
.enter_visit
(_n_id
[i
])
9442 if _n_classid
!= null then
9443 v
.enter_visit
(_n_classid
.as(not null))
9449 private init empty_init
do end
9452 n_comment
: Collection[Object] # Should be Collection[TComment]
9456 for n
in n_comment
do
9457 assert n
isa TComment
9463 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9465 for i
in [0.._n_comment
.length
[ do
9466 if _n_comment
[i
] == old_child
then
9467 if new_child
!= null then
9468 assert new_child
isa TComment
9469 _n_comment
[i
] = new_child
9470 new_child
.parent
= self
9472 _n_comment
.remove_at
(i
)
9479 redef fun visit_all
(v
: Visitor)
9481 for n
in _n_comment
do
9486 redef fun visit_all_reverse
(v
: Visitor)
9489 var i
= _n_comment
.length
9491 v
.enter_visit
(_n_comment
[i
])
9500 n_base
: nullable PModule,
9507 redef fun replace_child
(old_child
: PNode, new_child
: nullable PNode)
9509 if _n_base
== old_child
then
9510 if new_child
== null then
9512 new_child
.parent
= self
9513 assert new_child
isa PModule
9516 old_child
.parent
= null
9521 redef fun visit_all
(v
: Visitor)
9523 if _n_base
!= null then
9524 v
.enter_visit
(_n_base
.as(not null))
9528 redef fun visit_all_reverse
(v
: Visitor)
9530 if _n_base
!= null then
9531 v
.enter_visit
(_n_base
.as(not null))