1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
10 # Parent of the node in the AST
11 readable writable var _parent
: nullable ANode
13 # Remove a child from the AST
14 fun remove_child
(child
: ANode)
16 replace_child
(child
, null)
19 # Replace a child with an other node in the AST
20 fun replace_child
(old_child
: ANode, new_child
: nullable ANode) is abstract
22 # Replace itself with an other node in the AST
23 fun replace_with
(node
: ANode)
25 if (_parent
!= null) then
26 _parent
.replace_child
(self, node
)
30 # Visit all nodes in order.
31 # Thus, call "v.visit(e)" for each node e
32 fun visit_all
(v
: Visitor) is abstract
36 redef fun visit_all
(v
: Visitor) do end
37 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode) do end
41 redef fun replace_with
(n
: ANode)
49 # Abstract standard visitor
51 # What the visitor do when a node is visited
52 # Concrete visitors should redefine this method.
53 protected fun visit
(e
: nullable ANode) is abstract
55 # Ask the visitor to visit a given node.
56 # Usually automatically called by visit_all* methods.
57 # This methos should not be redefined
58 fun enter_visit
(e
: nullable ANode)
60 var old
= _current_node
66 # The current visited node
67 readable var _current_node
: nullable ANode = null
71 private init empty_init
do end
74 n_moduledecl
: nullable AModuledecl,
75 n_imports
: Collection[Object], # Should be Collection[AImport]
76 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
80 _n_moduledecl
= n_moduledecl
81 if n_moduledecl
!= null then
82 n_moduledecl
.parent
= self
89 for n
in n_classdefs
do
90 assert n
isa AClassdef
96 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
98 if _n_moduledecl
== old_child
then
99 if new_child
!= null then
100 new_child
.parent
= self
101 assert new_child
isa AModuledecl
102 _n_moduledecl
= new_child
108 for i
in [0.._n_imports
.length
[ do
109 if _n_imports
[i
] == old_child
then
110 if new_child
!= null then
111 assert new_child
isa AImport
112 _n_imports
[i
] = new_child
113 new_child
.parent
= self
115 _n_imports
.remove_at
(i
)
120 for i
in [0.._n_classdefs
.length
[ do
121 if _n_classdefs
[i
] == old_child
then
122 if new_child
!= null then
123 assert new_child
isa AClassdef
124 _n_classdefs
[i
] = new_child
125 new_child
.parent
= self
127 _n_classdefs
.remove_at
(i
)
134 redef fun visit_all
(v
: Visitor)
136 if _n_moduledecl
!= null then
137 v
.enter_visit
(_n_moduledecl
.as(not null))
139 for n
in _n_imports
do
142 for n
in _n_classdefs
do
147 redef class AModuledecl
148 private init empty_init
do end
150 init init_amoduledecl
(
151 n_doc
: nullable ADoc,
152 n_kwmodule
: nullable TKwmodule,
158 if n_doc
!= null then
161 _n_kwmodule
= n_kwmodule
.as(not null)
162 n_kwmodule
.parent
= self
163 _n_id
= n_id
.as(not null)
167 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
169 if _n_doc
== old_child
then
170 if new_child
!= null then
171 new_child
.parent
= self
172 assert new_child
isa ADoc
179 if _n_kwmodule
== old_child
then
180 if new_child
!= null then
181 new_child
.parent
= self
182 assert new_child
isa TKwmodule
183 _n_kwmodule
= new_child
189 if _n_id
== old_child
then
190 if new_child
!= null then
191 new_child
.parent
= self
192 assert new_child
isa TId
201 redef fun visit_all
(v
: Visitor)
203 if _n_doc
!= null then
204 v
.enter_visit
(_n_doc
.as(not null))
206 v
.enter_visit
(_n_kwmodule
)
210 redef class AStdImport
211 private init empty_init
do end
213 init init_astdimport
(
214 n_visibility
: nullable AVisibility,
215 n_kwimport
: nullable TKwimport,
220 _n_visibility
= n_visibility
.as(not null)
221 n_visibility
.parent
= self
222 _n_kwimport
= n_kwimport
.as(not null)
223 n_kwimport
.parent
= self
224 _n_id
= n_id
.as(not null)
228 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
230 if _n_visibility
== old_child
then
231 if new_child
!= null then
232 new_child
.parent
= self
233 assert new_child
isa AVisibility
234 _n_visibility
= new_child
240 if _n_kwimport
== old_child
then
241 if new_child
!= null then
242 new_child
.parent
= self
243 assert new_child
isa TKwimport
244 _n_kwimport
= new_child
250 if _n_id
== old_child
then
251 if new_child
!= null then
252 new_child
.parent
= self
253 assert new_child
isa TId
262 redef fun visit_all
(v
: Visitor)
264 v
.enter_visit
(_n_visibility
)
265 v
.enter_visit
(_n_kwimport
)
269 redef class ANoImport
270 private init empty_init
do end
272 init init_anoimport
(
273 n_visibility
: nullable AVisibility,
274 n_kwimport
: nullable TKwimport,
275 n_kwend
: nullable TKwend
279 _n_visibility
= n_visibility
.as(not null)
280 n_visibility
.parent
= self
281 _n_kwimport
= n_kwimport
.as(not null)
282 n_kwimport
.parent
= self
283 _n_kwend
= n_kwend
.as(not null)
284 n_kwend
.parent
= self
287 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
289 if _n_visibility
== old_child
then
290 if new_child
!= null then
291 new_child
.parent
= self
292 assert new_child
isa AVisibility
293 _n_visibility
= new_child
299 if _n_kwimport
== old_child
then
300 if new_child
!= null then
301 new_child
.parent
= self
302 assert new_child
isa TKwimport
303 _n_kwimport
= new_child
309 if _n_kwend
== old_child
then
310 if new_child
!= null then
311 new_child
.parent
= self
312 assert new_child
isa TKwend
321 redef fun visit_all
(v
: Visitor)
323 v
.enter_visit
(_n_visibility
)
324 v
.enter_visit
(_n_kwimport
)
325 v
.enter_visit
(_n_kwend
)
328 redef class APublicVisibility
329 private init empty_init
do end
331 init init_apublicvisibility
336 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
340 redef fun visit_all
(v
: Visitor)
344 redef class APrivateVisibility
345 private init empty_init
do end
347 init init_aprivatevisibility
(
348 n_kwprivate
: nullable TKwprivate
352 _n_kwprivate
= n_kwprivate
.as(not null)
353 n_kwprivate
.parent
= self
356 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
358 if _n_kwprivate
== old_child
then
359 if new_child
!= null then
360 new_child
.parent
= self
361 assert new_child
isa TKwprivate
362 _n_kwprivate
= new_child
370 redef fun visit_all
(v
: Visitor)
372 v
.enter_visit
(_n_kwprivate
)
375 redef class AProtectedVisibility
376 private init empty_init
do end
378 init init_aprotectedvisibility
(
379 n_kwprotected
: nullable TKwprotected
383 _n_kwprotected
= n_kwprotected
.as(not null)
384 n_kwprotected
.parent
= self
387 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
389 if _n_kwprotected
== old_child
then
390 if new_child
!= null then
391 new_child
.parent
= self
392 assert new_child
isa TKwprotected
393 _n_kwprotected
= new_child
401 redef fun visit_all
(v
: Visitor)
403 v
.enter_visit
(_n_kwprotected
)
406 redef class AIntrudeVisibility
407 private init empty_init
do end
409 init init_aintrudevisibility
(
410 n_kwintrude
: nullable TKwintrude
414 _n_kwintrude
= n_kwintrude
.as(not null)
415 n_kwintrude
.parent
= self
418 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
420 if _n_kwintrude
== old_child
then
421 if new_child
!= null then
422 new_child
.parent
= self
423 assert new_child
isa TKwintrude
424 _n_kwintrude
= new_child
432 redef fun visit_all
(v
: Visitor)
434 v
.enter_visit
(_n_kwintrude
)
437 redef class AStdClassdef
438 private init empty_init
do end
440 init init_astdclassdef
(
441 n_doc
: nullable ADoc,
442 n_kwredef
: nullable TKwredef,
443 n_visibility
: nullable AVisibility,
444 n_classkind
: nullable AClasskind,
445 n_id
: nullable TClassid,
446 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
447 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
448 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
453 if n_doc
!= null then
456 _n_kwredef
= n_kwredef
457 if n_kwredef
!= null then
458 n_kwredef
.parent
= self
460 _n_visibility
= n_visibility
.as(not null)
461 n_visibility
.parent
= self
462 _n_classkind
= n_classkind
.as(not null)
463 n_classkind
.parent
= self
468 for n
in n_formaldefs
do
469 assert n
isa AFormaldef
473 for n
in n_superclasses
do
474 assert n
isa ASuperclass
475 _n_superclasses
.add
(n
)
478 for n
in n_propdefs
do
479 assert n
isa APropdef
485 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
487 if _n_doc
== old_child
then
488 if new_child
!= null then
489 new_child
.parent
= self
490 assert new_child
isa ADoc
497 if _n_kwredef
== old_child
then
498 if new_child
!= null then
499 new_child
.parent
= self
500 assert new_child
isa TKwredef
501 _n_kwredef
= new_child
507 if _n_visibility
== old_child
then
508 if new_child
!= null then
509 new_child
.parent
= self
510 assert new_child
isa AVisibility
511 _n_visibility
= new_child
517 if _n_classkind
== old_child
then
518 if new_child
!= null then
519 new_child
.parent
= self
520 assert new_child
isa AClasskind
521 _n_classkind
= new_child
527 if _n_id
== old_child
then
528 if new_child
!= null then
529 new_child
.parent
= self
530 assert new_child
isa TClassid
537 for i
in [0.._n_formaldefs
.length
[ do
538 if _n_formaldefs
[i
] == old_child
then
539 if new_child
!= null then
540 assert new_child
isa AFormaldef
541 _n_formaldefs
[i
] = new_child
542 new_child
.parent
= self
544 _n_formaldefs
.remove_at
(i
)
549 for i
in [0.._n_superclasses
.length
[ do
550 if _n_superclasses
[i
] == old_child
then
551 if new_child
!= null then
552 assert new_child
isa ASuperclass
553 _n_superclasses
[i
] = new_child
554 new_child
.parent
= self
556 _n_superclasses
.remove_at
(i
)
561 for i
in [0.._n_propdefs
.length
[ do
562 if _n_propdefs
[i
] == old_child
then
563 if new_child
!= null then
564 assert new_child
isa APropdef
565 _n_propdefs
[i
] = new_child
566 new_child
.parent
= self
568 _n_propdefs
.remove_at
(i
)
575 redef fun visit_all
(v
: Visitor)
577 if _n_doc
!= null then
578 v
.enter_visit
(_n_doc
.as(not null))
580 if _n_kwredef
!= null then
581 v
.enter_visit
(_n_kwredef
.as(not null))
583 v
.enter_visit
(_n_visibility
)
584 v
.enter_visit
(_n_classkind
)
585 if _n_id
!= null then
586 v
.enter_visit
(_n_id
.as(not null))
588 for n
in _n_formaldefs
do
591 for n
in _n_superclasses
do
594 for n
in _n_propdefs
do
599 redef class ATopClassdef
600 private init empty_init
do end
602 init init_atopclassdef
(
603 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
607 for n
in n_propdefs
do
608 assert n
isa APropdef
614 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
616 for i
in [0.._n_propdefs
.length
[ do
617 if _n_propdefs
[i
] == old_child
then
618 if new_child
!= null then
619 assert new_child
isa APropdef
620 _n_propdefs
[i
] = new_child
621 new_child
.parent
= self
623 _n_propdefs
.remove_at
(i
)
630 redef fun visit_all
(v
: Visitor)
632 for n
in _n_propdefs
do
637 redef class AMainClassdef
638 private init empty_init
do end
640 init init_amainclassdef
(
641 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
645 for n
in n_propdefs
do
646 assert n
isa APropdef
652 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
654 for i
in [0.._n_propdefs
.length
[ do
655 if _n_propdefs
[i
] == old_child
then
656 if new_child
!= null then
657 assert new_child
isa APropdef
658 _n_propdefs
[i
] = new_child
659 new_child
.parent
= self
661 _n_propdefs
.remove_at
(i
)
668 redef fun visit_all
(v
: Visitor)
670 for n
in _n_propdefs
do
675 redef class AConcreteClasskind
676 private init empty_init
do end
678 init init_aconcreteclasskind
(
679 n_kwclass
: nullable TKwclass
683 _n_kwclass
= n_kwclass
.as(not null)
684 n_kwclass
.parent
= self
687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
689 if _n_kwclass
== old_child
then
690 if new_child
!= null then
691 new_child
.parent
= self
692 assert new_child
isa TKwclass
693 _n_kwclass
= new_child
701 redef fun visit_all
(v
: Visitor)
703 v
.enter_visit
(_n_kwclass
)
706 redef class AAbstractClasskind
707 private init empty_init
do end
709 init init_aabstractclasskind
(
710 n_kwabstract
: nullable TKwabstract,
711 n_kwclass
: nullable TKwclass
715 _n_kwabstract
= n_kwabstract
.as(not null)
716 n_kwabstract
.parent
= self
717 _n_kwclass
= n_kwclass
.as(not null)
718 n_kwclass
.parent
= self
721 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
723 if _n_kwabstract
== old_child
then
724 if new_child
!= null then
725 new_child
.parent
= self
726 assert new_child
isa TKwabstract
727 _n_kwabstract
= new_child
733 if _n_kwclass
== old_child
then
734 if new_child
!= null then
735 new_child
.parent
= self
736 assert new_child
isa TKwclass
737 _n_kwclass
= new_child
745 redef fun visit_all
(v
: Visitor)
747 v
.enter_visit
(_n_kwabstract
)
748 v
.enter_visit
(_n_kwclass
)
751 redef class AInterfaceClasskind
752 private init empty_init
do end
754 init init_ainterfaceclasskind
(
755 n_kwinterface
: nullable TKwinterface
759 _n_kwinterface
= n_kwinterface
.as(not null)
760 n_kwinterface
.parent
= self
763 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
765 if _n_kwinterface
== old_child
then
766 if new_child
!= null then
767 new_child
.parent
= self
768 assert new_child
isa TKwinterface
769 _n_kwinterface
= new_child
777 redef fun visit_all
(v
: Visitor)
779 v
.enter_visit
(_n_kwinterface
)
782 redef class AUniversalClasskind
783 private init empty_init
do end
785 init init_auniversalclasskind
(
786 n_kwuniversal
: nullable TKwuniversal
790 _n_kwuniversal
= n_kwuniversal
.as(not null)
791 n_kwuniversal
.parent
= self
794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
796 if _n_kwuniversal
== old_child
then
797 if new_child
!= null then
798 new_child
.parent
= self
799 assert new_child
isa TKwuniversal
800 _n_kwuniversal
= new_child
808 redef fun visit_all
(v
: Visitor)
810 v
.enter_visit
(_n_kwuniversal
)
813 redef class AFormaldef
814 private init empty_init
do end
816 init init_aformaldef
(
817 n_id
: nullable TClassid,
818 n_type
: nullable AType
822 _n_id
= n_id
.as(not null)
825 if n_type
!= null then
830 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
832 if _n_id
== old_child
then
833 if new_child
!= null then
834 new_child
.parent
= self
835 assert new_child
isa TClassid
842 if _n_type
== old_child
then
843 if new_child
!= null then
844 new_child
.parent
= self
845 assert new_child
isa AType
854 redef fun visit_all
(v
: Visitor)
857 if _n_type
!= null then
858 v
.enter_visit
(_n_type
.as(not null))
862 redef class ASuperclass
863 private init empty_init
do end
865 init init_asuperclass
(
866 n_kwspecial
: nullable TKwspecial,
867 n_kwsuper
: nullable TKwsuper,
868 n_type
: nullable AType
872 _n_kwspecial
= n_kwspecial
873 if n_kwspecial
!= null then
874 n_kwspecial
.parent
= self
876 _n_kwsuper
= n_kwsuper
877 if n_kwsuper
!= null then
878 n_kwsuper
.parent
= self
880 _n_type
= n_type
.as(not null)
884 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
886 if _n_kwspecial
== old_child
then
887 if new_child
!= null then
888 new_child
.parent
= self
889 assert new_child
isa TKwspecial
890 _n_kwspecial
= new_child
896 if _n_kwsuper
== old_child
then
897 if new_child
!= null then
898 new_child
.parent
= self
899 assert new_child
isa TKwsuper
900 _n_kwsuper
= new_child
906 if _n_type
== old_child
then
907 if new_child
!= null then
908 new_child
.parent
= self
909 assert new_child
isa AType
918 redef fun visit_all
(v
: Visitor)
920 if _n_kwspecial
!= null then
921 v
.enter_visit
(_n_kwspecial
.as(not null))
923 if _n_kwsuper
!= null then
924 v
.enter_visit
(_n_kwsuper
.as(not null))
926 v
.enter_visit
(_n_type
)
929 redef class AAttrPropdef
930 private init empty_init
do end
932 init init_aattrpropdef
(
933 n_doc
: nullable ADoc,
934 n_readable
: nullable AAble,
935 n_writable
: nullable AAble,
936 n_kwredef
: nullable TKwredef,
937 n_visibility
: nullable AVisibility,
938 n_kwvar
: nullable TKwvar,
939 n_id
: nullable TAttrid,
941 n_type
: nullable AType,
942 n_expr
: nullable AExpr
947 if n_doc
!= null then
950 _n_readable
= n_readable
951 if n_readable
!= null then
952 n_readable
.parent
= self
954 _n_writable
= n_writable
955 if n_writable
!= null then
956 n_writable
.parent
= self
958 _n_kwredef
= n_kwredef
959 if n_kwredef
!= null then
960 n_kwredef
.parent
= self
962 _n_visibility
= n_visibility
.as(not null)
963 n_visibility
.parent
= self
964 _n_kwvar
= n_kwvar
.as(not null)
965 n_kwvar
.parent
= self
971 if n_id2
!= null then
975 if n_type
!= null then
979 if n_expr
!= null then
984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
986 if _n_doc
== old_child
then
987 if new_child
!= null then
988 new_child
.parent
= self
989 assert new_child
isa ADoc
996 if _n_readable
== old_child
then
997 if new_child
!= null then
998 new_child
.parent
= self
999 assert new_child
isa AAble
1000 _n_readable
= new_child
1006 if _n_writable
== old_child
then
1007 if new_child
!= null then
1008 new_child
.parent
= self
1009 assert new_child
isa AAble
1010 _n_writable
= new_child
1016 if _n_kwredef
== old_child
then
1017 if new_child
!= null then
1018 new_child
.parent
= self
1019 assert new_child
isa TKwredef
1020 _n_kwredef
= new_child
1026 if _n_visibility
== old_child
then
1027 if new_child
!= null then
1028 new_child
.parent
= self
1029 assert new_child
isa AVisibility
1030 _n_visibility
= new_child
1036 if _n_kwvar
== old_child
then
1037 if new_child
!= null then
1038 new_child
.parent
= self
1039 assert new_child
isa TKwvar
1040 _n_kwvar
= new_child
1046 if _n_id
== old_child
then
1047 if new_child
!= null then
1048 new_child
.parent
= self
1049 assert new_child
isa TAttrid
1056 if _n_id2
== old_child
then
1057 if new_child
!= null then
1058 new_child
.parent
= self
1059 assert new_child
isa TId
1066 if _n_type
== old_child
then
1067 if new_child
!= null then
1068 new_child
.parent
= self
1069 assert new_child
isa AType
1076 if _n_expr
== old_child
then
1077 if new_child
!= null then
1078 new_child
.parent
= self
1079 assert new_child
isa AExpr
1088 redef fun visit_all
(v
: Visitor)
1090 if _n_doc
!= null then
1091 v
.enter_visit
(_n_doc
.as(not null))
1093 if _n_readable
!= null then
1094 v
.enter_visit
(_n_readable
.as(not null))
1096 if _n_writable
!= null then
1097 v
.enter_visit
(_n_writable
.as(not null))
1099 if _n_kwredef
!= null then
1100 v
.enter_visit
(_n_kwredef
.as(not null))
1102 v
.enter_visit
(_n_visibility
)
1103 v
.enter_visit
(_n_kwvar
)
1104 if _n_id
!= null then
1105 v
.enter_visit
(_n_id
.as(not null))
1107 if _n_id2
!= null then
1108 v
.enter_visit
(_n_id2
.as(not null))
1110 if _n_type
!= null then
1111 v
.enter_visit
(_n_type
.as(not null))
1113 if _n_expr
!= null then
1114 v
.enter_visit
(_n_expr
.as(not null))
1118 redef class AMethPropdef
1119 private init empty_init
do end
1121 init init_amethpropdef
(
1122 n_doc
: nullable ADoc,
1123 n_kwredef
: nullable TKwredef,
1124 n_visibility
: nullable AVisibility,
1125 n_methid
: nullable AMethid,
1126 n_signature
: nullable ASignature
1131 if n_doc
!= null then
1134 _n_kwredef
= n_kwredef
1135 if n_kwredef
!= null then
1136 n_kwredef
.parent
= self
1138 _n_visibility
= n_visibility
.as(not null)
1139 n_visibility
.parent
= self
1140 _n_methid
= n_methid
.as(not null)
1141 n_methid
.parent
= self
1142 _n_signature
= n_signature
.as(not null)
1143 n_signature
.parent
= self
1146 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1148 if _n_doc
== old_child
then
1149 if new_child
!= null then
1150 new_child
.parent
= self
1151 assert new_child
isa ADoc
1158 if _n_kwredef
== old_child
then
1159 if new_child
!= null then
1160 new_child
.parent
= self
1161 assert new_child
isa TKwredef
1162 _n_kwredef
= new_child
1168 if _n_visibility
== old_child
then
1169 if new_child
!= null then
1170 new_child
.parent
= self
1171 assert new_child
isa AVisibility
1172 _n_visibility
= new_child
1178 if _n_methid
== old_child
then
1179 if new_child
!= null then
1180 new_child
.parent
= self
1181 assert new_child
isa AMethid
1182 _n_methid
= new_child
1188 if _n_signature
== old_child
then
1189 if new_child
!= null then
1190 new_child
.parent
= self
1191 assert new_child
isa ASignature
1192 _n_signature
= new_child
1200 redef fun visit_all
(v
: Visitor)
1202 if _n_doc
!= null then
1203 v
.enter_visit
(_n_doc
.as(not null))
1205 if _n_kwredef
!= null then
1206 v
.enter_visit
(_n_kwredef
.as(not null))
1208 v
.enter_visit
(_n_visibility
)
1209 v
.enter_visit
(_n_methid
)
1210 v
.enter_visit
(_n_signature
)
1213 redef class ADeferredMethPropdef
1214 private init empty_init
do end
1216 init init_adeferredmethpropdef
(
1217 n_doc
: nullable ADoc,
1218 n_kwredef
: nullable TKwredef,
1219 n_visibility
: nullable AVisibility,
1220 n_kwmeth
: nullable TKwmeth,
1221 n_methid
: nullable AMethid,
1222 n_signature
: nullable ASignature
1227 if n_doc
!= null then
1230 _n_kwredef
= n_kwredef
1231 if n_kwredef
!= null then
1232 n_kwredef
.parent
= self
1234 _n_visibility
= n_visibility
.as(not null)
1235 n_visibility
.parent
= self
1236 _n_kwmeth
= n_kwmeth
.as(not null)
1237 n_kwmeth
.parent
= self
1238 _n_methid
= n_methid
.as(not null)
1239 n_methid
.parent
= self
1240 _n_signature
= n_signature
.as(not null)
1241 n_signature
.parent
= self
1244 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1246 if _n_doc
== old_child
then
1247 if new_child
!= null then
1248 new_child
.parent
= self
1249 assert new_child
isa ADoc
1256 if _n_kwredef
== old_child
then
1257 if new_child
!= null then
1258 new_child
.parent
= self
1259 assert new_child
isa TKwredef
1260 _n_kwredef
= new_child
1266 if _n_visibility
== old_child
then
1267 if new_child
!= null then
1268 new_child
.parent
= self
1269 assert new_child
isa AVisibility
1270 _n_visibility
= new_child
1276 if _n_kwmeth
== old_child
then
1277 if new_child
!= null then
1278 new_child
.parent
= self
1279 assert new_child
isa TKwmeth
1280 _n_kwmeth
= new_child
1286 if _n_methid
== old_child
then
1287 if new_child
!= null then
1288 new_child
.parent
= self
1289 assert new_child
isa AMethid
1290 _n_methid
= new_child
1296 if _n_signature
== old_child
then
1297 if new_child
!= null then
1298 new_child
.parent
= self
1299 assert new_child
isa ASignature
1300 _n_signature
= new_child
1308 redef fun visit_all
(v
: Visitor)
1310 if _n_doc
!= null then
1311 v
.enter_visit
(_n_doc
.as(not null))
1313 if _n_kwredef
!= null then
1314 v
.enter_visit
(_n_kwredef
.as(not null))
1316 v
.enter_visit
(_n_visibility
)
1317 v
.enter_visit
(_n_kwmeth
)
1318 v
.enter_visit
(_n_methid
)
1319 v
.enter_visit
(_n_signature
)
1322 redef class AInternMethPropdef
1323 private init empty_init
do end
1325 init init_ainternmethpropdef
(
1326 n_doc
: nullable ADoc,
1327 n_kwredef
: nullable TKwredef,
1328 n_visibility
: nullable AVisibility,
1329 n_kwmeth
: nullable TKwmeth,
1330 n_methid
: nullable AMethid,
1331 n_signature
: nullable ASignature
1336 if n_doc
!= null then
1339 _n_kwredef
= n_kwredef
1340 if n_kwredef
!= null then
1341 n_kwredef
.parent
= self
1343 _n_visibility
= n_visibility
.as(not null)
1344 n_visibility
.parent
= self
1345 _n_kwmeth
= n_kwmeth
.as(not null)
1346 n_kwmeth
.parent
= self
1347 _n_methid
= n_methid
.as(not null)
1348 n_methid
.parent
= self
1349 _n_signature
= n_signature
.as(not null)
1350 n_signature
.parent
= self
1353 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1355 if _n_doc
== old_child
then
1356 if new_child
!= null then
1357 new_child
.parent
= self
1358 assert new_child
isa ADoc
1365 if _n_kwredef
== old_child
then
1366 if new_child
!= null then
1367 new_child
.parent
= self
1368 assert new_child
isa TKwredef
1369 _n_kwredef
= new_child
1375 if _n_visibility
== old_child
then
1376 if new_child
!= null then
1377 new_child
.parent
= self
1378 assert new_child
isa AVisibility
1379 _n_visibility
= new_child
1385 if _n_kwmeth
== old_child
then
1386 if new_child
!= null then
1387 new_child
.parent
= self
1388 assert new_child
isa TKwmeth
1389 _n_kwmeth
= new_child
1395 if _n_methid
== old_child
then
1396 if new_child
!= null then
1397 new_child
.parent
= self
1398 assert new_child
isa AMethid
1399 _n_methid
= new_child
1405 if _n_signature
== old_child
then
1406 if new_child
!= null then
1407 new_child
.parent
= self
1408 assert new_child
isa ASignature
1409 _n_signature
= new_child
1417 redef fun visit_all
(v
: Visitor)
1419 if _n_doc
!= null then
1420 v
.enter_visit
(_n_doc
.as(not null))
1422 if _n_kwredef
!= null then
1423 v
.enter_visit
(_n_kwredef
.as(not null))
1425 v
.enter_visit
(_n_visibility
)
1426 v
.enter_visit
(_n_kwmeth
)
1427 v
.enter_visit
(_n_methid
)
1428 v
.enter_visit
(_n_signature
)
1431 redef class AExternMethPropdef
1432 private init empty_init
do end
1434 init init_aexternmethpropdef
(
1435 n_doc
: nullable ADoc,
1436 n_kwredef
: nullable TKwredef,
1437 n_visibility
: nullable AVisibility,
1438 n_kwmeth
: nullable TKwmeth,
1439 n_methid
: nullable AMethid,
1440 n_signature
: nullable ASignature,
1441 n_extern
: nullable TString
1446 if n_doc
!= null then
1449 _n_kwredef
= n_kwredef
1450 if n_kwredef
!= null then
1451 n_kwredef
.parent
= self
1453 _n_visibility
= n_visibility
.as(not null)
1454 n_visibility
.parent
= self
1455 _n_kwmeth
= n_kwmeth
.as(not null)
1456 n_kwmeth
.parent
= self
1457 _n_methid
= n_methid
.as(not null)
1458 n_methid
.parent
= self
1459 _n_signature
= n_signature
.as(not null)
1460 n_signature
.parent
= self
1461 _n_extern
= n_extern
1462 if n_extern
!= null then
1463 n_extern
.parent
= self
1467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1469 if _n_doc
== old_child
then
1470 if new_child
!= null then
1471 new_child
.parent
= self
1472 assert new_child
isa ADoc
1479 if _n_kwredef
== old_child
then
1480 if new_child
!= null then
1481 new_child
.parent
= self
1482 assert new_child
isa TKwredef
1483 _n_kwredef
= new_child
1489 if _n_visibility
== old_child
then
1490 if new_child
!= null then
1491 new_child
.parent
= self
1492 assert new_child
isa AVisibility
1493 _n_visibility
= new_child
1499 if _n_kwmeth
== old_child
then
1500 if new_child
!= null then
1501 new_child
.parent
= self
1502 assert new_child
isa TKwmeth
1503 _n_kwmeth
= new_child
1509 if _n_methid
== old_child
then
1510 if new_child
!= null then
1511 new_child
.parent
= self
1512 assert new_child
isa AMethid
1513 _n_methid
= new_child
1519 if _n_signature
== old_child
then
1520 if new_child
!= null then
1521 new_child
.parent
= self
1522 assert new_child
isa ASignature
1523 _n_signature
= new_child
1529 if _n_extern
== old_child
then
1530 if new_child
!= null then
1531 new_child
.parent
= self
1532 assert new_child
isa TString
1533 _n_extern
= new_child
1541 redef fun visit_all
(v
: Visitor)
1543 if _n_doc
!= null then
1544 v
.enter_visit
(_n_doc
.as(not null))
1546 if _n_kwredef
!= null then
1547 v
.enter_visit
(_n_kwredef
.as(not null))
1549 v
.enter_visit
(_n_visibility
)
1550 v
.enter_visit
(_n_kwmeth
)
1551 v
.enter_visit
(_n_methid
)
1552 v
.enter_visit
(_n_signature
)
1553 if _n_extern
!= null then
1554 v
.enter_visit
(_n_extern
.as(not null))
1558 redef class AConcreteMethPropdef
1559 private init empty_init
do end
1561 init init_aconcretemethpropdef
(
1562 n_doc
: nullable ADoc,
1563 n_kwredef
: nullable TKwredef,
1564 n_visibility
: nullable AVisibility,
1565 n_kwmeth
: nullable TKwmeth,
1566 n_methid
: nullable AMethid,
1567 n_signature
: nullable ASignature,
1568 n_block
: nullable AExpr
1573 if n_doc
!= null then
1576 _n_kwredef
= n_kwredef
1577 if n_kwredef
!= null then
1578 n_kwredef
.parent
= self
1580 _n_visibility
= n_visibility
.as(not null)
1581 n_visibility
.parent
= self
1582 _n_kwmeth
= n_kwmeth
.as(not null)
1583 n_kwmeth
.parent
= self
1584 _n_methid
= n_methid
.as(not null)
1585 n_methid
.parent
= self
1586 _n_signature
= n_signature
.as(not null)
1587 n_signature
.parent
= self
1589 if n_block
!= null then
1590 n_block
.parent
= self
1594 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1596 if _n_doc
== old_child
then
1597 if new_child
!= null then
1598 new_child
.parent
= self
1599 assert new_child
isa ADoc
1606 if _n_kwredef
== old_child
then
1607 if new_child
!= null then
1608 new_child
.parent
= self
1609 assert new_child
isa TKwredef
1610 _n_kwredef
= new_child
1616 if _n_visibility
== old_child
then
1617 if new_child
!= null then
1618 new_child
.parent
= self
1619 assert new_child
isa AVisibility
1620 _n_visibility
= new_child
1626 if _n_kwmeth
== old_child
then
1627 if new_child
!= null then
1628 new_child
.parent
= self
1629 assert new_child
isa TKwmeth
1630 _n_kwmeth
= new_child
1636 if _n_methid
== old_child
then
1637 if new_child
!= null then
1638 new_child
.parent
= self
1639 assert new_child
isa AMethid
1640 _n_methid
= new_child
1646 if _n_signature
== old_child
then
1647 if new_child
!= null then
1648 new_child
.parent
= self
1649 assert new_child
isa ASignature
1650 _n_signature
= new_child
1656 if _n_block
== old_child
then
1657 if new_child
!= null then
1658 new_child
.parent
= self
1659 assert new_child
isa AExpr
1660 _n_block
= new_child
1668 redef fun visit_all
(v
: Visitor)
1670 if _n_doc
!= null then
1671 v
.enter_visit
(_n_doc
.as(not null))
1673 if _n_kwredef
!= null then
1674 v
.enter_visit
(_n_kwredef
.as(not null))
1676 v
.enter_visit
(_n_visibility
)
1677 v
.enter_visit
(_n_kwmeth
)
1678 v
.enter_visit
(_n_methid
)
1679 v
.enter_visit
(_n_signature
)
1680 if _n_block
!= null then
1681 v
.enter_visit
(_n_block
.as(not null))
1685 redef class AConcreteInitPropdef
1686 private init empty_init
do end
1688 init init_aconcreteinitpropdef
(
1689 n_doc
: nullable ADoc,
1690 n_kwredef
: nullable TKwredef,
1691 n_visibility
: nullable AVisibility,
1692 n_kwinit
: nullable TKwinit,
1693 n_methid
: nullable AMethid,
1694 n_signature
: nullable ASignature,
1695 n_block
: nullable AExpr
1700 if n_doc
!= null then
1703 _n_kwredef
= n_kwredef
1704 if n_kwredef
!= null then
1705 n_kwredef
.parent
= self
1707 _n_visibility
= n_visibility
.as(not null)
1708 n_visibility
.parent
= self
1709 _n_kwinit
= n_kwinit
.as(not null)
1710 n_kwinit
.parent
= self
1711 _n_methid
= n_methid
1712 if n_methid
!= null then
1713 n_methid
.parent
= self
1715 _n_signature
= n_signature
.as(not null)
1716 n_signature
.parent
= self
1718 if n_block
!= null then
1719 n_block
.parent
= self
1723 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1725 if _n_doc
== old_child
then
1726 if new_child
!= null then
1727 new_child
.parent
= self
1728 assert new_child
isa ADoc
1735 if _n_kwredef
== old_child
then
1736 if new_child
!= null then
1737 new_child
.parent
= self
1738 assert new_child
isa TKwredef
1739 _n_kwredef
= new_child
1745 if _n_visibility
== old_child
then
1746 if new_child
!= null then
1747 new_child
.parent
= self
1748 assert new_child
isa AVisibility
1749 _n_visibility
= new_child
1755 if _n_kwinit
== old_child
then
1756 if new_child
!= null then
1757 new_child
.parent
= self
1758 assert new_child
isa TKwinit
1759 _n_kwinit
= new_child
1765 if _n_methid
== old_child
then
1766 if new_child
!= null then
1767 new_child
.parent
= self
1768 assert new_child
isa AMethid
1769 _n_methid
= new_child
1775 if _n_signature
== old_child
then
1776 if new_child
!= null then
1777 new_child
.parent
= self
1778 assert new_child
isa ASignature
1779 _n_signature
= new_child
1785 if _n_block
== old_child
then
1786 if new_child
!= null then
1787 new_child
.parent
= self
1788 assert new_child
isa AExpr
1789 _n_block
= new_child
1797 redef fun visit_all
(v
: Visitor)
1799 if _n_doc
!= null then
1800 v
.enter_visit
(_n_doc
.as(not null))
1802 if _n_kwredef
!= null then
1803 v
.enter_visit
(_n_kwredef
.as(not null))
1805 v
.enter_visit
(_n_visibility
)
1806 v
.enter_visit
(_n_kwinit
)
1807 if _n_methid
!= null then
1808 v
.enter_visit
(_n_methid
.as(not null))
1810 v
.enter_visit
(_n_signature
)
1811 if _n_block
!= null then
1812 v
.enter_visit
(_n_block
.as(not null))
1816 redef class AMainMethPropdef
1817 private init empty_init
do end
1819 init init_amainmethpropdef
(
1820 n_kwredef
: nullable TKwredef,
1821 n_block
: nullable AExpr
1825 _n_kwredef
= n_kwredef
1826 if n_kwredef
!= null then
1827 n_kwredef
.parent
= self
1830 if n_block
!= null then
1831 n_block
.parent
= self
1835 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1837 if _n_kwredef
== old_child
then
1838 if new_child
!= null then
1839 new_child
.parent
= self
1840 assert new_child
isa TKwredef
1841 _n_kwredef
= new_child
1847 if _n_block
== old_child
then
1848 if new_child
!= null then
1849 new_child
.parent
= self
1850 assert new_child
isa AExpr
1851 _n_block
= new_child
1859 redef fun visit_all
(v
: Visitor)
1861 if _n_kwredef
!= null then
1862 v
.enter_visit
(_n_kwredef
.as(not null))
1864 if _n_block
!= null then
1865 v
.enter_visit
(_n_block
.as(not null))
1869 redef class ATypePropdef
1870 private init empty_init
do end
1872 init init_atypepropdef
(
1873 n_doc
: nullable ADoc,
1874 n_kwredef
: nullable TKwredef,
1875 n_visibility
: nullable AVisibility,
1876 n_kwtype
: nullable TKwtype,
1877 n_id
: nullable TClassid,
1878 n_type
: nullable AType
1883 if n_doc
!= null then
1886 _n_kwredef
= n_kwredef
1887 if n_kwredef
!= null then
1888 n_kwredef
.parent
= self
1890 _n_visibility
= n_visibility
.as(not null)
1891 n_visibility
.parent
= self
1892 _n_kwtype
= n_kwtype
.as(not null)
1893 n_kwtype
.parent
= self
1894 _n_id
= n_id
.as(not null)
1896 _n_type
= n_type
.as(not null)
1897 n_type
.parent
= self
1900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1902 if _n_doc
== old_child
then
1903 if new_child
!= null then
1904 new_child
.parent
= self
1905 assert new_child
isa ADoc
1912 if _n_kwredef
== old_child
then
1913 if new_child
!= null then
1914 new_child
.parent
= self
1915 assert new_child
isa TKwredef
1916 _n_kwredef
= new_child
1922 if _n_visibility
== old_child
then
1923 if new_child
!= null then
1924 new_child
.parent
= self
1925 assert new_child
isa AVisibility
1926 _n_visibility
= new_child
1932 if _n_kwtype
== old_child
then
1933 if new_child
!= null then
1934 new_child
.parent
= self
1935 assert new_child
isa TKwtype
1936 _n_kwtype
= new_child
1942 if _n_id
== old_child
then
1943 if new_child
!= null then
1944 new_child
.parent
= self
1945 assert new_child
isa TClassid
1952 if _n_type
== old_child
then
1953 if new_child
!= null then
1954 new_child
.parent
= self
1955 assert new_child
isa AType
1964 redef fun visit_all
(v
: Visitor)
1966 if _n_doc
!= null then
1967 v
.enter_visit
(_n_doc
.as(not null))
1969 if _n_kwredef
!= null then
1970 v
.enter_visit
(_n_kwredef
.as(not null))
1972 v
.enter_visit
(_n_visibility
)
1973 v
.enter_visit
(_n_kwtype
)
1974 v
.enter_visit
(_n_id
)
1975 v
.enter_visit
(_n_type
)
1978 redef class AReadAble
1979 private init empty_init
do end
1981 init init_areadable
(
1982 n_kwredef
: nullable TKwredef,
1983 n_kwreadable
: nullable TKwreadable
1987 _n_kwredef
= n_kwredef
1988 if n_kwredef
!= null then
1989 n_kwredef
.parent
= self
1991 _n_kwreadable
= n_kwreadable
.as(not null)
1992 n_kwreadable
.parent
= self
1995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1997 if _n_kwredef
== old_child
then
1998 if new_child
!= null then
1999 new_child
.parent
= self
2000 assert new_child
isa TKwredef
2001 _n_kwredef
= new_child
2007 if _n_kwreadable
== old_child
then
2008 if new_child
!= null then
2009 new_child
.parent
= self
2010 assert new_child
isa TKwreadable
2011 _n_kwreadable
= new_child
2019 redef fun visit_all
(v
: Visitor)
2021 if _n_kwredef
!= null then
2022 v
.enter_visit
(_n_kwredef
.as(not null))
2024 v
.enter_visit
(_n_kwreadable
)
2027 redef class AWriteAble
2028 private init empty_init
do end
2030 init init_awriteable
(
2031 n_kwredef
: nullable TKwredef,
2032 n_visibility
: nullable AVisibility,
2033 n_kwwritable
: nullable TKwwritable
2037 _n_kwredef
= n_kwredef
2038 if n_kwredef
!= null then
2039 n_kwredef
.parent
= self
2041 _n_visibility
= n_visibility
2042 if n_visibility
!= null then
2043 n_visibility
.parent
= self
2045 _n_kwwritable
= n_kwwritable
.as(not null)
2046 n_kwwritable
.parent
= self
2049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2051 if _n_kwredef
== old_child
then
2052 if new_child
!= null then
2053 new_child
.parent
= self
2054 assert new_child
isa TKwredef
2055 _n_kwredef
= new_child
2061 if _n_visibility
== old_child
then
2062 if new_child
!= null then
2063 new_child
.parent
= self
2064 assert new_child
isa AVisibility
2065 _n_visibility
= new_child
2067 _n_visibility
= null
2071 if _n_kwwritable
== old_child
then
2072 if new_child
!= null then
2073 new_child
.parent
= self
2074 assert new_child
isa TKwwritable
2075 _n_kwwritable
= new_child
2083 redef fun visit_all
(v
: Visitor)
2085 if _n_kwredef
!= null then
2086 v
.enter_visit
(_n_kwredef
.as(not null))
2088 if _n_visibility
!= null then
2089 v
.enter_visit
(_n_visibility
.as(not null))
2091 v
.enter_visit
(_n_kwwritable
)
2094 redef class AIdMethid
2095 private init empty_init
do end
2097 init init_aidmethid
(
2102 _n_id
= n_id
.as(not null)
2106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2108 if _n_id
== old_child
then
2109 if new_child
!= null then
2110 new_child
.parent
= self
2111 assert new_child
isa TId
2120 redef fun visit_all
(v
: Visitor)
2122 v
.enter_visit
(_n_id
)
2125 redef class APlusMethid
2126 private init empty_init
do end
2128 init init_aplusmethid
(
2129 n_plus
: nullable TPlus
2133 _n_plus
= n_plus
.as(not null)
2134 n_plus
.parent
= self
2137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2139 if _n_plus
== old_child
then
2140 if new_child
!= null then
2141 new_child
.parent
= self
2142 assert new_child
isa TPlus
2151 redef fun visit_all
(v
: Visitor)
2153 v
.enter_visit
(_n_plus
)
2156 redef class AMinusMethid
2157 private init empty_init
do end
2159 init init_aminusmethid
(
2160 n_minus
: nullable TMinus
2164 _n_minus
= n_minus
.as(not null)
2165 n_minus
.parent
= self
2168 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2170 if _n_minus
== old_child
then
2171 if new_child
!= null then
2172 new_child
.parent
= self
2173 assert new_child
isa TMinus
2174 _n_minus
= new_child
2182 redef fun visit_all
(v
: Visitor)
2184 v
.enter_visit
(_n_minus
)
2187 redef class AStarMethid
2188 private init empty_init
do end
2190 init init_astarmethid
(
2191 n_star
: nullable TStar
2195 _n_star
= n_star
.as(not null)
2196 n_star
.parent
= self
2199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2201 if _n_star
== old_child
then
2202 if new_child
!= null then
2203 new_child
.parent
= self
2204 assert new_child
isa TStar
2213 redef fun visit_all
(v
: Visitor)
2215 v
.enter_visit
(_n_star
)
2218 redef class ASlashMethid
2219 private init empty_init
do end
2221 init init_aslashmethid
(
2222 n_slash
: nullable TSlash
2226 _n_slash
= n_slash
.as(not null)
2227 n_slash
.parent
= self
2230 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2232 if _n_slash
== old_child
then
2233 if new_child
!= null then
2234 new_child
.parent
= self
2235 assert new_child
isa TSlash
2236 _n_slash
= new_child
2244 redef fun visit_all
(v
: Visitor)
2246 v
.enter_visit
(_n_slash
)
2249 redef class APercentMethid
2250 private init empty_init
do end
2252 init init_apercentmethid
(
2253 n_percent
: nullable TPercent
2257 _n_percent
= n_percent
.as(not null)
2258 n_percent
.parent
= self
2261 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2263 if _n_percent
== old_child
then
2264 if new_child
!= null then
2265 new_child
.parent
= self
2266 assert new_child
isa TPercent
2267 _n_percent
= new_child
2275 redef fun visit_all
(v
: Visitor)
2277 v
.enter_visit
(_n_percent
)
2280 redef class AEqMethid
2281 private init empty_init
do end
2283 init init_aeqmethid
(
2288 _n_eq
= n_eq
.as(not null)
2292 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2294 if _n_eq
== old_child
then
2295 if new_child
!= null then
2296 new_child
.parent
= self
2297 assert new_child
isa TEq
2306 redef fun visit_all
(v
: Visitor)
2308 v
.enter_visit
(_n_eq
)
2311 redef class ANeMethid
2312 private init empty_init
do end
2314 init init_anemethid
(
2319 _n_ne
= n_ne
.as(not null)
2323 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2325 if _n_ne
== old_child
then
2326 if new_child
!= null then
2327 new_child
.parent
= self
2328 assert new_child
isa TNe
2337 redef fun visit_all
(v
: Visitor)
2339 v
.enter_visit
(_n_ne
)
2342 redef class ALeMethid
2343 private init empty_init
do end
2345 init init_alemethid
(
2350 _n_le
= n_le
.as(not null)
2354 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2356 if _n_le
== old_child
then
2357 if new_child
!= null then
2358 new_child
.parent
= self
2359 assert new_child
isa TLe
2368 redef fun visit_all
(v
: Visitor)
2370 v
.enter_visit
(_n_le
)
2373 redef class AGeMethid
2374 private init empty_init
do end
2376 init init_agemethid
(
2381 _n_ge
= n_ge
.as(not null)
2385 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2387 if _n_ge
== old_child
then
2388 if new_child
!= null then
2389 new_child
.parent
= self
2390 assert new_child
isa TGe
2399 redef fun visit_all
(v
: Visitor)
2401 v
.enter_visit
(_n_ge
)
2404 redef class ALtMethid
2405 private init empty_init
do end
2407 init init_altmethid
(
2412 _n_lt
= n_lt
.as(not null)
2416 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2418 if _n_lt
== old_child
then
2419 if new_child
!= null then
2420 new_child
.parent
= self
2421 assert new_child
isa TLt
2430 redef fun visit_all
(v
: Visitor)
2432 v
.enter_visit
(_n_lt
)
2435 redef class AGtMethid
2436 private init empty_init
do end
2438 init init_agtmethid
(
2443 _n_gt
= n_gt
.as(not null)
2447 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2449 if _n_gt
== old_child
then
2450 if new_child
!= null then
2451 new_child
.parent
= self
2452 assert new_child
isa TGt
2461 redef fun visit_all
(v
: Visitor)
2463 v
.enter_visit
(_n_gt
)
2466 redef class ALlMethid
2467 private init empty_init
do end
2469 init init_allmethid
(
2474 _n_ll
= n_ll
.as(not null)
2478 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2480 if _n_ll
== old_child
then
2481 if new_child
!= null then
2482 new_child
.parent
= self
2483 assert new_child
isa TLl
2492 redef fun visit_all
(v
: Visitor)
2494 v
.enter_visit
(_n_ll
)
2497 redef class AGgMethid
2498 private init empty_init
do end
2500 init init_aggmethid
(
2505 _n_gg
= n_gg
.as(not null)
2509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2511 if _n_gg
== old_child
then
2512 if new_child
!= null then
2513 new_child
.parent
= self
2514 assert new_child
isa TGg
2523 redef fun visit_all
(v
: Visitor)
2525 v
.enter_visit
(_n_gg
)
2528 redef class ABraMethid
2529 private init empty_init
do end
2531 init init_abramethid
(
2532 n_obra
: nullable TObra,
2533 n_cbra
: nullable TCbra
2537 _n_obra
= n_obra
.as(not null)
2538 n_obra
.parent
= self
2539 _n_cbra
= n_cbra
.as(not null)
2540 n_cbra
.parent
= self
2543 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2545 if _n_obra
== old_child
then
2546 if new_child
!= null then
2547 new_child
.parent
= self
2548 assert new_child
isa TObra
2555 if _n_cbra
== old_child
then
2556 if new_child
!= null then
2557 new_child
.parent
= self
2558 assert new_child
isa TCbra
2567 redef fun visit_all
(v
: Visitor)
2569 v
.enter_visit
(_n_obra
)
2570 v
.enter_visit
(_n_cbra
)
2573 redef class AStarshipMethid
2574 private init empty_init
do end
2576 init init_astarshipmethid
(
2577 n_starship
: nullable TStarship
2581 _n_starship
= n_starship
.as(not null)
2582 n_starship
.parent
= self
2585 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2587 if _n_starship
== old_child
then
2588 if new_child
!= null then
2589 new_child
.parent
= self
2590 assert new_child
isa TStarship
2591 _n_starship
= new_child
2599 redef fun visit_all
(v
: Visitor)
2601 v
.enter_visit
(_n_starship
)
2604 redef class AAssignMethid
2605 private init empty_init
do end
2607 init init_aassignmethid
(
2609 n_assign
: nullable TAssign
2613 _n_id
= n_id
.as(not null)
2615 _n_assign
= n_assign
.as(not null)
2616 n_assign
.parent
= self
2619 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2621 if _n_id
== old_child
then
2622 if new_child
!= null then
2623 new_child
.parent
= self
2624 assert new_child
isa TId
2631 if _n_assign
== old_child
then
2632 if new_child
!= null then
2633 new_child
.parent
= self
2634 assert new_child
isa TAssign
2635 _n_assign
= new_child
2643 redef fun visit_all
(v
: Visitor)
2645 v
.enter_visit
(_n_id
)
2646 v
.enter_visit
(_n_assign
)
2649 redef class ABraassignMethid
2650 private init empty_init
do end
2652 init init_abraassignmethid
(
2653 n_obra
: nullable TObra,
2654 n_cbra
: nullable TCbra,
2655 n_assign
: nullable TAssign
2659 _n_obra
= n_obra
.as(not null)
2660 n_obra
.parent
= self
2661 _n_cbra
= n_cbra
.as(not null)
2662 n_cbra
.parent
= self
2663 _n_assign
= n_assign
.as(not null)
2664 n_assign
.parent
= self
2667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2669 if _n_obra
== old_child
then
2670 if new_child
!= null then
2671 new_child
.parent
= self
2672 assert new_child
isa TObra
2679 if _n_cbra
== old_child
then
2680 if new_child
!= null then
2681 new_child
.parent
= self
2682 assert new_child
isa TCbra
2689 if _n_assign
== old_child
then
2690 if new_child
!= null then
2691 new_child
.parent
= self
2692 assert new_child
isa TAssign
2693 _n_assign
= new_child
2701 redef fun visit_all
(v
: Visitor)
2703 v
.enter_visit
(_n_obra
)
2704 v
.enter_visit
(_n_cbra
)
2705 v
.enter_visit
(_n_assign
)
2708 redef class ASignature
2709 private init empty_init
do end
2711 init init_asignature
(
2712 n_params
: Collection[Object], # Should be Collection[AParam]
2713 n_type
: nullable AType,
2714 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
2718 for n
in n_params
do
2724 if n_type
!= null then
2725 n_type
.parent
= self
2727 for n
in n_closure_decls
do
2728 assert n
isa AClosureDecl
2729 _n_closure_decls
.add
(n
)
2734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2736 for i
in [0.._n_params
.length
[ do
2737 if _n_params
[i
] == old_child
then
2738 if new_child
!= null then
2739 assert new_child
isa AParam
2740 _n_params
[i
] = new_child
2741 new_child
.parent
= self
2743 _n_params
.remove_at
(i
)
2748 if _n_type
== old_child
then
2749 if new_child
!= null then
2750 new_child
.parent
= self
2751 assert new_child
isa AType
2758 for i
in [0.._n_closure_decls
.length
[ do
2759 if _n_closure_decls
[i
] == old_child
then
2760 if new_child
!= null then
2761 assert new_child
isa AClosureDecl
2762 _n_closure_decls
[i
] = new_child
2763 new_child
.parent
= self
2765 _n_closure_decls
.remove_at
(i
)
2772 redef fun visit_all
(v
: Visitor)
2774 for n
in _n_params
do
2777 if _n_type
!= null then
2778 v
.enter_visit
(_n_type
.as(not null))
2780 for n
in _n_closure_decls
do
2786 private init empty_init
do end
2790 n_type
: nullable AType,
2791 n_dotdotdot
: nullable TDotdotdot
2795 _n_id
= n_id
.as(not null)
2798 if n_type
!= null then
2799 n_type
.parent
= self
2801 _n_dotdotdot
= n_dotdotdot
2802 if n_dotdotdot
!= null then
2803 n_dotdotdot
.parent
= self
2807 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2809 if _n_id
== old_child
then
2810 if new_child
!= null then
2811 new_child
.parent
= self
2812 assert new_child
isa TId
2819 if _n_type
== old_child
then
2820 if new_child
!= null then
2821 new_child
.parent
= self
2822 assert new_child
isa AType
2829 if _n_dotdotdot
== old_child
then
2830 if new_child
!= null then
2831 new_child
.parent
= self
2832 assert new_child
isa TDotdotdot
2833 _n_dotdotdot
= new_child
2841 redef fun visit_all
(v
: Visitor)
2843 v
.enter_visit
(_n_id
)
2844 if _n_type
!= null then
2845 v
.enter_visit
(_n_type
.as(not null))
2847 if _n_dotdotdot
!= null then
2848 v
.enter_visit
(_n_dotdotdot
.as(not null))
2852 redef class AClosureDecl
2853 private init empty_init
do end
2855 init init_aclosuredecl
(
2856 n_kwbreak
: nullable TKwbreak,
2857 n_bang
: nullable TBang,
2859 n_signature
: nullable ASignature,
2860 n_expr
: nullable AExpr
2864 _n_kwbreak
= n_kwbreak
2865 if n_kwbreak
!= null then
2866 n_kwbreak
.parent
= self
2868 _n_bang
= n_bang
.as(not null)
2869 n_bang
.parent
= self
2870 _n_id
= n_id
.as(not null)
2872 _n_signature
= n_signature
.as(not null)
2873 n_signature
.parent
= self
2875 if n_expr
!= null then
2876 n_expr
.parent
= self
2880 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2882 if _n_kwbreak
== old_child
then
2883 if new_child
!= null then
2884 new_child
.parent
= self
2885 assert new_child
isa TKwbreak
2886 _n_kwbreak
= new_child
2892 if _n_bang
== old_child
then
2893 if new_child
!= null then
2894 new_child
.parent
= self
2895 assert new_child
isa TBang
2902 if _n_id
== old_child
then
2903 if new_child
!= null then
2904 new_child
.parent
= self
2905 assert new_child
isa TId
2912 if _n_signature
== old_child
then
2913 if new_child
!= null then
2914 new_child
.parent
= self
2915 assert new_child
isa ASignature
2916 _n_signature
= new_child
2922 if _n_expr
== old_child
then
2923 if new_child
!= null then
2924 new_child
.parent
= self
2925 assert new_child
isa AExpr
2934 redef fun visit_all
(v
: Visitor)
2936 if _n_kwbreak
!= null then
2937 v
.enter_visit
(_n_kwbreak
.as(not null))
2939 v
.enter_visit
(_n_bang
)
2940 v
.enter_visit
(_n_id
)
2941 v
.enter_visit
(_n_signature
)
2942 if _n_expr
!= null then
2943 v
.enter_visit
(_n_expr
.as(not null))
2948 private init empty_init
do end
2951 n_kwnullable
: nullable TKwnullable,
2952 n_id
: nullable TClassid,
2953 n_types
: Collection[Object] # Should be Collection[AType]
2957 _n_kwnullable
= n_kwnullable
2958 if n_kwnullable
!= null then
2959 n_kwnullable
.parent
= self
2961 _n_id
= n_id
.as(not null)
2970 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2972 if _n_kwnullable
== old_child
then
2973 if new_child
!= null then
2974 new_child
.parent
= self
2975 assert new_child
isa TKwnullable
2976 _n_kwnullable
= new_child
2978 _n_kwnullable
= null
2982 if _n_id
== old_child
then
2983 if new_child
!= null then
2984 new_child
.parent
= self
2985 assert new_child
isa TClassid
2992 for i
in [0.._n_types
.length
[ do
2993 if _n_types
[i
] == old_child
then
2994 if new_child
!= null then
2995 assert new_child
isa AType
2996 _n_types
[i
] = new_child
2997 new_child
.parent
= self
2999 _n_types
.remove_at
(i
)
3006 redef fun visit_all
(v
: Visitor)
3008 if _n_kwnullable
!= null then
3009 v
.enter_visit
(_n_kwnullable
.as(not null))
3011 v
.enter_visit
(_n_id
)
3012 for n
in _n_types
do
3018 private init empty_init
do end
3021 n_kwlabel
: nullable TKwlabel,
3026 _n_kwlabel
= n_kwlabel
.as(not null)
3027 n_kwlabel
.parent
= self
3028 _n_id
= n_id
.as(not null)
3032 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3034 if _n_kwlabel
== old_child
then
3035 if new_child
!= null then
3036 new_child
.parent
= self
3037 assert new_child
isa TKwlabel
3038 _n_kwlabel
= new_child
3044 if _n_id
== old_child
then
3045 if new_child
!= null then
3046 new_child
.parent
= self
3047 assert new_child
isa TId
3056 redef fun visit_all
(v
: Visitor)
3058 v
.enter_visit
(_n_kwlabel
)
3059 v
.enter_visit
(_n_id
)
3062 redef class ABlockExpr
3063 private init empty_init
do end
3065 init init_ablockexpr
(
3066 n_expr
: Collection[Object] # Should be Collection[AExpr]
3077 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3079 for i
in [0.._n_expr
.length
[ do
3080 if _n_expr
[i
] == old_child
then
3081 if new_child
!= null then
3082 assert new_child
isa AExpr
3083 _n_expr
[i
] = new_child
3084 new_child
.parent
= self
3086 _n_expr
.remove_at
(i
)
3093 redef fun visit_all
(v
: Visitor)
3100 redef class AVardeclExpr
3101 private init empty_init
do end
3103 init init_avardeclexpr
(
3104 n_kwvar
: nullable TKwvar,
3106 n_type
: nullable AType,
3107 n_assign
: nullable TAssign,
3108 n_expr
: nullable AExpr
3112 _n_kwvar
= n_kwvar
.as(not null)
3113 n_kwvar
.parent
= self
3114 _n_id
= n_id
.as(not null)
3117 if n_type
!= null then
3118 n_type
.parent
= self
3120 _n_assign
= n_assign
3121 if n_assign
!= null then
3122 n_assign
.parent
= self
3125 if n_expr
!= null then
3126 n_expr
.parent
= self
3130 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3132 if _n_kwvar
== old_child
then
3133 if new_child
!= null then
3134 new_child
.parent
= self
3135 assert new_child
isa TKwvar
3136 _n_kwvar
= new_child
3142 if _n_id
== old_child
then
3143 if new_child
!= null then
3144 new_child
.parent
= self
3145 assert new_child
isa TId
3152 if _n_type
== old_child
then
3153 if new_child
!= null then
3154 new_child
.parent
= self
3155 assert new_child
isa AType
3162 if _n_assign
== old_child
then
3163 if new_child
!= null then
3164 new_child
.parent
= self
3165 assert new_child
isa TAssign
3166 _n_assign
= new_child
3172 if _n_expr
== old_child
then
3173 if new_child
!= null then
3174 new_child
.parent
= self
3175 assert new_child
isa AExpr
3184 redef fun visit_all
(v
: Visitor)
3186 v
.enter_visit
(_n_kwvar
)
3187 v
.enter_visit
(_n_id
)
3188 if _n_type
!= null then
3189 v
.enter_visit
(_n_type
.as(not null))
3191 if _n_assign
!= null then
3192 v
.enter_visit
(_n_assign
.as(not null))
3194 if _n_expr
!= null then
3195 v
.enter_visit
(_n_expr
.as(not null))
3199 redef class AReturnExpr
3200 private init empty_init
do end
3202 init init_areturnexpr
(
3203 n_kwreturn
: nullable TKwreturn,
3204 n_expr
: nullable AExpr
3208 _n_kwreturn
= n_kwreturn
3209 if n_kwreturn
!= null then
3210 n_kwreturn
.parent
= self
3213 if n_expr
!= null then
3214 n_expr
.parent
= self
3218 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3220 if _n_kwreturn
== old_child
then
3221 if new_child
!= null then
3222 new_child
.parent
= self
3223 assert new_child
isa TKwreturn
3224 _n_kwreturn
= new_child
3230 if _n_expr
== old_child
then
3231 if new_child
!= null then
3232 new_child
.parent
= self
3233 assert new_child
isa AExpr
3242 redef fun visit_all
(v
: Visitor)
3244 if _n_kwreturn
!= null then
3245 v
.enter_visit
(_n_kwreturn
.as(not null))
3247 if _n_expr
!= null then
3248 v
.enter_visit
(_n_expr
.as(not null))
3252 redef class ABreakExpr
3253 private init empty_init
do end
3255 init init_abreakexpr
(
3256 n_kwbreak
: nullable TKwbreak,
3257 n_label
: nullable ALabel,
3258 n_expr
: nullable AExpr
3262 _n_kwbreak
= n_kwbreak
.as(not null)
3263 n_kwbreak
.parent
= self
3265 if n_label
!= null then
3266 n_label
.parent
= self
3269 if n_expr
!= null then
3270 n_expr
.parent
= self
3274 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3276 if _n_kwbreak
== old_child
then
3277 if new_child
!= null then
3278 new_child
.parent
= self
3279 assert new_child
isa TKwbreak
3280 _n_kwbreak
= new_child
3286 if _n_label
== old_child
then
3287 if new_child
!= null then
3288 new_child
.parent
= self
3289 assert new_child
isa ALabel
3290 _n_label
= new_child
3296 if _n_expr
== old_child
then
3297 if new_child
!= null then
3298 new_child
.parent
= self
3299 assert new_child
isa AExpr
3308 redef fun visit_all
(v
: Visitor)
3310 v
.enter_visit
(_n_kwbreak
)
3311 if _n_label
!= null then
3312 v
.enter_visit
(_n_label
.as(not null))
3314 if _n_expr
!= null then
3315 v
.enter_visit
(_n_expr
.as(not null))
3319 redef class AAbortExpr
3320 private init empty_init
do end
3322 init init_aabortexpr
(
3323 n_kwabort
: nullable TKwabort
3327 _n_kwabort
= n_kwabort
.as(not null)
3328 n_kwabort
.parent
= self
3331 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3333 if _n_kwabort
== old_child
then
3334 if new_child
!= null then
3335 new_child
.parent
= self
3336 assert new_child
isa TKwabort
3337 _n_kwabort
= new_child
3345 redef fun visit_all
(v
: Visitor)
3347 v
.enter_visit
(_n_kwabort
)
3350 redef class AContinueExpr
3351 private init empty_init
do end
3353 init init_acontinueexpr
(
3354 n_kwcontinue
: nullable TKwcontinue,
3355 n_label
: nullable ALabel,
3356 n_expr
: nullable AExpr
3360 _n_kwcontinue
= n_kwcontinue
3361 if n_kwcontinue
!= null then
3362 n_kwcontinue
.parent
= self
3365 if n_label
!= null then
3366 n_label
.parent
= self
3369 if n_expr
!= null then
3370 n_expr
.parent
= self
3374 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3376 if _n_kwcontinue
== old_child
then
3377 if new_child
!= null then
3378 new_child
.parent
= self
3379 assert new_child
isa TKwcontinue
3380 _n_kwcontinue
= new_child
3382 _n_kwcontinue
= null
3386 if _n_label
== old_child
then
3387 if new_child
!= null then
3388 new_child
.parent
= self
3389 assert new_child
isa ALabel
3390 _n_label
= new_child
3396 if _n_expr
== old_child
then
3397 if new_child
!= null then
3398 new_child
.parent
= self
3399 assert new_child
isa AExpr
3408 redef fun visit_all
(v
: Visitor)
3410 if _n_kwcontinue
!= null then
3411 v
.enter_visit
(_n_kwcontinue
.as(not null))
3413 if _n_label
!= null then
3414 v
.enter_visit
(_n_label
.as(not null))
3416 if _n_expr
!= null then
3417 v
.enter_visit
(_n_expr
.as(not null))
3422 private init empty_init
do end
3425 n_kwdo
: nullable TKwdo,
3426 n_block
: nullable AExpr,
3427 n_label
: nullable ALabel
3431 _n_kwdo
= n_kwdo
.as(not null)
3432 n_kwdo
.parent
= self
3434 if n_block
!= null then
3435 n_block
.parent
= self
3438 if n_label
!= null then
3439 n_label
.parent
= self
3443 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3445 if _n_kwdo
== old_child
then
3446 if new_child
!= null then
3447 new_child
.parent
= self
3448 assert new_child
isa TKwdo
3455 if _n_block
== old_child
then
3456 if new_child
!= null then
3457 new_child
.parent
= self
3458 assert new_child
isa AExpr
3459 _n_block
= new_child
3465 if _n_label
== old_child
then
3466 if new_child
!= null then
3467 new_child
.parent
= self
3468 assert new_child
isa ALabel
3469 _n_label
= new_child
3477 redef fun visit_all
(v
: Visitor)
3479 v
.enter_visit
(_n_kwdo
)
3480 if _n_block
!= null then
3481 v
.enter_visit
(_n_block
.as(not null))
3483 if _n_label
!= null then
3484 v
.enter_visit
(_n_label
.as(not null))
3489 private init empty_init
do end
3492 n_kwif
: nullable TKwif,
3493 n_expr
: nullable AExpr,
3494 n_then
: nullable AExpr,
3495 n_else
: nullable AExpr
3499 _n_kwif
= n_kwif
.as(not null)
3500 n_kwif
.parent
= self
3501 _n_expr
= n_expr
.as(not null)
3502 n_expr
.parent
= self
3504 if n_then
!= null then
3505 n_then
.parent
= self
3508 if n_else
!= null then
3509 n_else
.parent
= self
3513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3515 if _n_kwif
== old_child
then
3516 if new_child
!= null then
3517 new_child
.parent
= self
3518 assert new_child
isa TKwif
3525 if _n_expr
== old_child
then
3526 if new_child
!= null then
3527 new_child
.parent
= self
3528 assert new_child
isa AExpr
3535 if _n_then
== old_child
then
3536 if new_child
!= null then
3537 new_child
.parent
= self
3538 assert new_child
isa AExpr
3545 if _n_else
== old_child
then
3546 if new_child
!= null then
3547 new_child
.parent
= self
3548 assert new_child
isa AExpr
3557 redef fun visit_all
(v
: Visitor)
3559 v
.enter_visit
(_n_kwif
)
3560 v
.enter_visit
(_n_expr
)
3561 if _n_then
!= null then
3562 v
.enter_visit
(_n_then
.as(not null))
3564 if _n_else
!= null then
3565 v
.enter_visit
(_n_else
.as(not null))
3569 redef class AIfexprExpr
3570 private init empty_init
do end
3572 init init_aifexprexpr
(
3573 n_kwif
: nullable TKwif,
3574 n_expr
: nullable AExpr,
3575 n_kwthen
: nullable TKwthen,
3576 n_then
: nullable AExpr,
3577 n_kwelse
: nullable TKwelse,
3578 n_else
: nullable AExpr
3582 _n_kwif
= n_kwif
.as(not null)
3583 n_kwif
.parent
= self
3584 _n_expr
= n_expr
.as(not null)
3585 n_expr
.parent
= self
3586 _n_kwthen
= n_kwthen
.as(not null)
3587 n_kwthen
.parent
= self
3588 _n_then
= n_then
.as(not null)
3589 n_then
.parent
= self
3590 _n_kwelse
= n_kwelse
.as(not null)
3591 n_kwelse
.parent
= self
3592 _n_else
= n_else
.as(not null)
3593 n_else
.parent
= self
3596 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3598 if _n_kwif
== old_child
then
3599 if new_child
!= null then
3600 new_child
.parent
= self
3601 assert new_child
isa TKwif
3608 if _n_expr
== old_child
then
3609 if new_child
!= null then
3610 new_child
.parent
= self
3611 assert new_child
isa AExpr
3618 if _n_kwthen
== old_child
then
3619 if new_child
!= null then
3620 new_child
.parent
= self
3621 assert new_child
isa TKwthen
3622 _n_kwthen
= new_child
3628 if _n_then
== old_child
then
3629 if new_child
!= null then
3630 new_child
.parent
= self
3631 assert new_child
isa AExpr
3638 if _n_kwelse
== old_child
then
3639 if new_child
!= null then
3640 new_child
.parent
= self
3641 assert new_child
isa TKwelse
3642 _n_kwelse
= new_child
3648 if _n_else
== old_child
then
3649 if new_child
!= null then
3650 new_child
.parent
= self
3651 assert new_child
isa AExpr
3660 redef fun visit_all
(v
: Visitor)
3662 v
.enter_visit
(_n_kwif
)
3663 v
.enter_visit
(_n_expr
)
3664 v
.enter_visit
(_n_kwthen
)
3665 v
.enter_visit
(_n_then
)
3666 v
.enter_visit
(_n_kwelse
)
3667 v
.enter_visit
(_n_else
)
3670 redef class AWhileExpr
3671 private init empty_init
do end
3673 init init_awhileexpr
(
3674 n_kwwhile
: nullable TKwwhile,
3675 n_expr
: nullable AExpr,
3676 n_kwdo
: nullable TKwdo,
3677 n_block
: nullable AExpr,
3678 n_label
: nullable ALabel
3682 _n_kwwhile
= n_kwwhile
.as(not null)
3683 n_kwwhile
.parent
= self
3684 _n_expr
= n_expr
.as(not null)
3685 n_expr
.parent
= self
3686 _n_kwdo
= n_kwdo
.as(not null)
3687 n_kwdo
.parent
= self
3689 if n_block
!= null then
3690 n_block
.parent
= self
3693 if n_label
!= null then
3694 n_label
.parent
= self
3698 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3700 if _n_kwwhile
== old_child
then
3701 if new_child
!= null then
3702 new_child
.parent
= self
3703 assert new_child
isa TKwwhile
3704 _n_kwwhile
= new_child
3710 if _n_expr
== old_child
then
3711 if new_child
!= null then
3712 new_child
.parent
= self
3713 assert new_child
isa AExpr
3720 if _n_kwdo
== old_child
then
3721 if new_child
!= null then
3722 new_child
.parent
= self
3723 assert new_child
isa TKwdo
3730 if _n_block
== old_child
then
3731 if new_child
!= null then
3732 new_child
.parent
= self
3733 assert new_child
isa AExpr
3734 _n_block
= new_child
3740 if _n_label
== old_child
then
3741 if new_child
!= null then
3742 new_child
.parent
= self
3743 assert new_child
isa ALabel
3744 _n_label
= new_child
3752 redef fun visit_all
(v
: Visitor)
3754 v
.enter_visit
(_n_kwwhile
)
3755 v
.enter_visit
(_n_expr
)
3756 v
.enter_visit
(_n_kwdo
)
3757 if _n_block
!= null then
3758 v
.enter_visit
(_n_block
.as(not null))
3760 if _n_label
!= null then
3761 v
.enter_visit
(_n_label
.as(not null))
3765 redef class ALoopExpr
3766 private init empty_init
do end
3768 init init_aloopexpr
(
3769 n_kwloop
: nullable TKwloop,
3770 n_block
: nullable AExpr,
3771 n_label
: nullable ALabel
3775 _n_kwloop
= n_kwloop
.as(not null)
3776 n_kwloop
.parent
= self
3778 if n_block
!= null then
3779 n_block
.parent
= self
3782 if n_label
!= null then
3783 n_label
.parent
= self
3787 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3789 if _n_kwloop
== old_child
then
3790 if new_child
!= null then
3791 new_child
.parent
= self
3792 assert new_child
isa TKwloop
3793 _n_kwloop
= new_child
3799 if _n_block
== old_child
then
3800 if new_child
!= null then
3801 new_child
.parent
= self
3802 assert new_child
isa AExpr
3803 _n_block
= new_child
3809 if _n_label
== old_child
then
3810 if new_child
!= null then
3811 new_child
.parent
= self
3812 assert new_child
isa ALabel
3813 _n_label
= new_child
3821 redef fun visit_all
(v
: Visitor)
3823 v
.enter_visit
(_n_kwloop
)
3824 if _n_block
!= null then
3825 v
.enter_visit
(_n_block
.as(not null))
3827 if _n_label
!= null then
3828 v
.enter_visit
(_n_label
.as(not null))
3832 redef class AForExpr
3833 private init empty_init
do end
3835 init init_aforexpr
(
3836 n_kwfor
: nullable TKwfor,
3838 n_expr
: nullable AExpr,
3839 n_kwdo
: nullable TKwdo,
3840 n_block
: nullable AExpr,
3841 n_label
: nullable ALabel
3845 _n_kwfor
= n_kwfor
.as(not null)
3846 n_kwfor
.parent
= self
3847 _n_id
= n_id
.as(not null)
3849 _n_expr
= n_expr
.as(not null)
3850 n_expr
.parent
= self
3851 _n_kwdo
= n_kwdo
.as(not null)
3852 n_kwdo
.parent
= self
3854 if n_block
!= null then
3855 n_block
.parent
= self
3858 if n_label
!= null then
3859 n_label
.parent
= self
3863 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3865 if _n_kwfor
== old_child
then
3866 if new_child
!= null then
3867 new_child
.parent
= self
3868 assert new_child
isa TKwfor
3869 _n_kwfor
= new_child
3875 if _n_id
== old_child
then
3876 if new_child
!= null then
3877 new_child
.parent
= self
3878 assert new_child
isa TId
3885 if _n_expr
== old_child
then
3886 if new_child
!= null then
3887 new_child
.parent
= self
3888 assert new_child
isa AExpr
3895 if _n_kwdo
== old_child
then
3896 if new_child
!= null then
3897 new_child
.parent
= self
3898 assert new_child
isa TKwdo
3905 if _n_block
== old_child
then
3906 if new_child
!= null then
3907 new_child
.parent
= self
3908 assert new_child
isa AExpr
3909 _n_block
= new_child
3915 if _n_label
== old_child
then
3916 if new_child
!= null then
3917 new_child
.parent
= self
3918 assert new_child
isa ALabel
3919 _n_label
= new_child
3927 redef fun visit_all
(v
: Visitor)
3929 v
.enter_visit
(_n_kwfor
)
3930 v
.enter_visit
(_n_id
)
3931 v
.enter_visit
(_n_expr
)
3932 v
.enter_visit
(_n_kwdo
)
3933 if _n_block
!= null then
3934 v
.enter_visit
(_n_block
.as(not null))
3936 if _n_label
!= null then
3937 v
.enter_visit
(_n_label
.as(not null))
3941 redef class AAssertExpr
3942 private init empty_init
do end
3944 init init_aassertexpr
(
3945 n_kwassert
: nullable TKwassert,
3947 n_expr
: nullable AExpr,
3948 n_else
: nullable AExpr
3952 _n_kwassert
= n_kwassert
.as(not null)
3953 n_kwassert
.parent
= self
3955 if n_id
!= null then
3958 _n_expr
= n_expr
.as(not null)
3959 n_expr
.parent
= self
3961 if n_else
!= null then
3962 n_else
.parent
= self
3966 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3968 if _n_kwassert
== old_child
then
3969 if new_child
!= null then
3970 new_child
.parent
= self
3971 assert new_child
isa TKwassert
3972 _n_kwassert
= new_child
3978 if _n_id
== old_child
then
3979 if new_child
!= null then
3980 new_child
.parent
= self
3981 assert new_child
isa TId
3988 if _n_expr
== old_child
then
3989 if new_child
!= null then
3990 new_child
.parent
= self
3991 assert new_child
isa AExpr
3998 if _n_else
== old_child
then
3999 if new_child
!= null then
4000 new_child
.parent
= self
4001 assert new_child
isa AExpr
4010 redef fun visit_all
(v
: Visitor)
4012 v
.enter_visit
(_n_kwassert
)
4013 if _n_id
!= null then
4014 v
.enter_visit
(_n_id
.as(not null))
4016 v
.enter_visit
(_n_expr
)
4017 if _n_else
!= null then
4018 v
.enter_visit
(_n_else
.as(not null))
4022 redef class AOnceExpr
4023 private init empty_init
do end
4025 init init_aonceexpr
(
4026 n_kwonce
: nullable TKwonce,
4027 n_expr
: nullable AExpr
4031 _n_kwonce
= n_kwonce
.as(not null)
4032 n_kwonce
.parent
= self
4033 _n_expr
= n_expr
.as(not null)
4034 n_expr
.parent
= self
4037 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4039 if _n_kwonce
== old_child
then
4040 if new_child
!= null then
4041 new_child
.parent
= self
4042 assert new_child
isa TKwonce
4043 _n_kwonce
= new_child
4049 if _n_expr
== old_child
then
4050 if new_child
!= null then
4051 new_child
.parent
= self
4052 assert new_child
isa AExpr
4061 redef fun visit_all
(v
: Visitor)
4063 v
.enter_visit
(_n_kwonce
)
4064 v
.enter_visit
(_n_expr
)
4067 redef class ASendExpr
4068 private init empty_init
do end
4070 init init_asendexpr
(
4071 n_expr
: nullable AExpr
4075 _n_expr
= n_expr
.as(not null)
4076 n_expr
.parent
= self
4079 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4081 if _n_expr
== old_child
then
4082 if new_child
!= null then
4083 new_child
.parent
= self
4084 assert new_child
isa AExpr
4093 redef fun visit_all
(v
: Visitor)
4095 v
.enter_visit
(_n_expr
)
4098 redef class ABinopExpr
4099 private init empty_init
do end
4101 init init_abinopexpr
(
4102 n_expr
: nullable AExpr,
4103 n_expr2
: nullable AExpr
4107 _n_expr
= n_expr
.as(not null)
4108 n_expr
.parent
= self
4109 _n_expr2
= n_expr2
.as(not null)
4110 n_expr2
.parent
= self
4113 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4115 if _n_expr
== old_child
then
4116 if new_child
!= null then
4117 new_child
.parent
= self
4118 assert new_child
isa AExpr
4125 if _n_expr2
== old_child
then
4126 if new_child
!= null then
4127 new_child
.parent
= self
4128 assert new_child
isa AExpr
4129 _n_expr2
= new_child
4137 redef fun visit_all
(v
: Visitor)
4139 v
.enter_visit
(_n_expr
)
4140 v
.enter_visit
(_n_expr2
)
4144 private init empty_init
do end
4147 n_expr
: nullable AExpr,
4148 n_expr2
: nullable AExpr
4152 _n_expr
= n_expr
.as(not null)
4153 n_expr
.parent
= self
4154 _n_expr2
= n_expr2
.as(not null)
4155 n_expr2
.parent
= self
4158 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4160 if _n_expr
== old_child
then
4161 if new_child
!= null then
4162 new_child
.parent
= self
4163 assert new_child
isa AExpr
4170 if _n_expr2
== old_child
then
4171 if new_child
!= null then
4172 new_child
.parent
= self
4173 assert new_child
isa AExpr
4174 _n_expr2
= new_child
4182 redef fun visit_all
(v
: Visitor)
4184 v
.enter_visit
(_n_expr
)
4185 v
.enter_visit
(_n_expr2
)
4188 redef class AAndExpr
4189 private init empty_init
do end
4191 init init_aandexpr
(
4192 n_expr
: nullable AExpr,
4193 n_expr2
: nullable AExpr
4197 _n_expr
= n_expr
.as(not null)
4198 n_expr
.parent
= self
4199 _n_expr2
= n_expr2
.as(not null)
4200 n_expr2
.parent
= self
4203 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4205 if _n_expr
== old_child
then
4206 if new_child
!= null then
4207 new_child
.parent
= self
4208 assert new_child
isa AExpr
4215 if _n_expr2
== old_child
then
4216 if new_child
!= null then
4217 new_child
.parent
= self
4218 assert new_child
isa AExpr
4219 _n_expr2
= new_child
4227 redef fun visit_all
(v
: Visitor)
4229 v
.enter_visit
(_n_expr
)
4230 v
.enter_visit
(_n_expr2
)
4233 redef class AOrElseExpr
4234 private init empty_init
do end
4236 init init_aorelseexpr
(
4237 n_expr
: nullable AExpr,
4238 n_expr2
: nullable AExpr
4242 _n_expr
= n_expr
.as(not null)
4243 n_expr
.parent
= self
4244 _n_expr2
= n_expr2
.as(not null)
4245 n_expr2
.parent
= self
4248 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4250 if _n_expr
== old_child
then
4251 if new_child
!= null then
4252 new_child
.parent
= self
4253 assert new_child
isa AExpr
4260 if _n_expr2
== old_child
then
4261 if new_child
!= null then
4262 new_child
.parent
= self
4263 assert new_child
isa AExpr
4264 _n_expr2
= new_child
4272 redef fun visit_all
(v
: Visitor)
4274 v
.enter_visit
(_n_expr
)
4275 v
.enter_visit
(_n_expr2
)
4278 redef class ANotExpr
4279 private init empty_init
do end
4281 init init_anotexpr
(
4282 n_kwnot
: nullable TKwnot,
4283 n_expr
: nullable AExpr
4287 _n_kwnot
= n_kwnot
.as(not null)
4288 n_kwnot
.parent
= self
4289 _n_expr
= n_expr
.as(not null)
4290 n_expr
.parent
= self
4293 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4295 if _n_kwnot
== old_child
then
4296 if new_child
!= null then
4297 new_child
.parent
= self
4298 assert new_child
isa TKwnot
4299 _n_kwnot
= new_child
4305 if _n_expr
== old_child
then
4306 if new_child
!= null then
4307 new_child
.parent
= self
4308 assert new_child
isa AExpr
4317 redef fun visit_all
(v
: Visitor)
4319 v
.enter_visit
(_n_kwnot
)
4320 v
.enter_visit
(_n_expr
)
4324 private init empty_init
do end
4327 n_expr
: nullable AExpr,
4328 n_expr2
: nullable AExpr
4332 _n_expr
= n_expr
.as(not null)
4333 n_expr
.parent
= self
4334 _n_expr2
= n_expr2
.as(not null)
4335 n_expr2
.parent
= self
4338 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4340 if _n_expr
== old_child
then
4341 if new_child
!= null then
4342 new_child
.parent
= self
4343 assert new_child
isa AExpr
4350 if _n_expr2
== old_child
then
4351 if new_child
!= null then
4352 new_child
.parent
= self
4353 assert new_child
isa AExpr
4354 _n_expr2
= new_child
4362 redef fun visit_all
(v
: Visitor)
4364 v
.enter_visit
(_n_expr
)
4365 v
.enter_visit
(_n_expr2
)
4369 private init empty_init
do end
4372 n_expr
: nullable AExpr,
4373 n_expr2
: nullable AExpr
4377 _n_expr
= n_expr
.as(not null)
4378 n_expr
.parent
= self
4379 _n_expr2
= n_expr2
.as(not null)
4380 n_expr2
.parent
= self
4383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4385 if _n_expr
== old_child
then
4386 if new_child
!= null then
4387 new_child
.parent
= self
4388 assert new_child
isa AExpr
4395 if _n_expr2
== old_child
then
4396 if new_child
!= null then
4397 new_child
.parent
= self
4398 assert new_child
isa AExpr
4399 _n_expr2
= new_child
4407 redef fun visit_all
(v
: Visitor)
4409 v
.enter_visit
(_n_expr
)
4410 v
.enter_visit
(_n_expr2
)
4414 private init empty_init
do end
4417 n_expr
: nullable AExpr,
4418 n_expr2
: nullable AExpr
4422 _n_expr
= n_expr
.as(not null)
4423 n_expr
.parent
= self
4424 _n_expr2
= n_expr2
.as(not null)
4425 n_expr2
.parent
= self
4428 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4430 if _n_expr
== old_child
then
4431 if new_child
!= null then
4432 new_child
.parent
= self
4433 assert new_child
isa AExpr
4440 if _n_expr2
== old_child
then
4441 if new_child
!= null then
4442 new_child
.parent
= self
4443 assert new_child
isa AExpr
4444 _n_expr2
= new_child
4452 redef fun visit_all
(v
: Visitor)
4454 v
.enter_visit
(_n_expr
)
4455 v
.enter_visit
(_n_expr2
)
4459 private init empty_init
do end
4462 n_expr
: nullable AExpr,
4463 n_expr2
: nullable AExpr
4467 _n_expr
= n_expr
.as(not null)
4468 n_expr
.parent
= self
4469 _n_expr2
= n_expr2
.as(not null)
4470 n_expr2
.parent
= self
4473 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4475 if _n_expr
== old_child
then
4476 if new_child
!= null then
4477 new_child
.parent
= self
4478 assert new_child
isa AExpr
4485 if _n_expr2
== old_child
then
4486 if new_child
!= null then
4487 new_child
.parent
= self
4488 assert new_child
isa AExpr
4489 _n_expr2
= new_child
4497 redef fun visit_all
(v
: Visitor)
4499 v
.enter_visit
(_n_expr
)
4500 v
.enter_visit
(_n_expr2
)
4504 private init empty_init
do end
4507 n_expr
: nullable AExpr,
4508 n_expr2
: nullable AExpr
4512 _n_expr
= n_expr
.as(not null)
4513 n_expr
.parent
= self
4514 _n_expr2
= n_expr2
.as(not null)
4515 n_expr2
.parent
= self
4518 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4520 if _n_expr
== old_child
then
4521 if new_child
!= null then
4522 new_child
.parent
= self
4523 assert new_child
isa AExpr
4530 if _n_expr2
== old_child
then
4531 if new_child
!= null then
4532 new_child
.parent
= self
4533 assert new_child
isa AExpr
4534 _n_expr2
= new_child
4542 redef fun visit_all
(v
: Visitor)
4544 v
.enter_visit
(_n_expr
)
4545 v
.enter_visit
(_n_expr2
)
4549 private init empty_init
do end
4552 n_expr
: nullable AExpr,
4553 n_expr2
: nullable AExpr
4557 _n_expr
= n_expr
.as(not null)
4558 n_expr
.parent
= self
4559 _n_expr2
= n_expr2
.as(not null)
4560 n_expr2
.parent
= self
4563 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4565 if _n_expr
== old_child
then
4566 if new_child
!= null then
4567 new_child
.parent
= self
4568 assert new_child
isa AExpr
4575 if _n_expr2
== old_child
then
4576 if new_child
!= null then
4577 new_child
.parent
= self
4578 assert new_child
isa AExpr
4579 _n_expr2
= new_child
4587 redef fun visit_all
(v
: Visitor)
4589 v
.enter_visit
(_n_expr
)
4590 v
.enter_visit
(_n_expr2
)
4594 private init empty_init
do end
4597 n_expr
: nullable AExpr,
4598 n_expr2
: nullable AExpr
4602 _n_expr
= n_expr
.as(not null)
4603 n_expr
.parent
= self
4604 _n_expr2
= n_expr2
.as(not null)
4605 n_expr2
.parent
= self
4608 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4610 if _n_expr
== old_child
then
4611 if new_child
!= null then
4612 new_child
.parent
= self
4613 assert new_child
isa AExpr
4620 if _n_expr2
== old_child
then
4621 if new_child
!= null then
4622 new_child
.parent
= self
4623 assert new_child
isa AExpr
4624 _n_expr2
= new_child
4632 redef fun visit_all
(v
: Visitor)
4634 v
.enter_visit
(_n_expr
)
4635 v
.enter_visit
(_n_expr2
)
4639 private init empty_init
do end
4642 n_expr
: nullable AExpr,
4643 n_expr2
: nullable AExpr
4647 _n_expr
= n_expr
.as(not null)
4648 n_expr
.parent
= self
4649 _n_expr2
= n_expr2
.as(not null)
4650 n_expr2
.parent
= self
4653 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4655 if _n_expr
== old_child
then
4656 if new_child
!= null then
4657 new_child
.parent
= self
4658 assert new_child
isa AExpr
4665 if _n_expr2
== old_child
then
4666 if new_child
!= null then
4667 new_child
.parent
= self
4668 assert new_child
isa AExpr
4669 _n_expr2
= new_child
4677 redef fun visit_all
(v
: Visitor)
4679 v
.enter_visit
(_n_expr
)
4680 v
.enter_visit
(_n_expr2
)
4684 private init empty_init
do end
4687 n_expr
: nullable AExpr,
4688 n_expr2
: nullable AExpr
4692 _n_expr
= n_expr
.as(not null)
4693 n_expr
.parent
= self
4694 _n_expr2
= n_expr2
.as(not null)
4695 n_expr2
.parent
= self
4698 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4700 if _n_expr
== old_child
then
4701 if new_child
!= null then
4702 new_child
.parent
= self
4703 assert new_child
isa AExpr
4710 if _n_expr2
== old_child
then
4711 if new_child
!= null then
4712 new_child
.parent
= self
4713 assert new_child
isa AExpr
4714 _n_expr2
= new_child
4722 redef fun visit_all
(v
: Visitor)
4724 v
.enter_visit
(_n_expr
)
4725 v
.enter_visit
(_n_expr2
)
4728 redef class AIsaExpr
4729 private init empty_init
do end
4731 init init_aisaexpr
(
4732 n_expr
: nullable AExpr,
4733 n_type
: nullable AType
4737 _n_expr
= n_expr
.as(not null)
4738 n_expr
.parent
= self
4739 _n_type
= n_type
.as(not null)
4740 n_type
.parent
= self
4743 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4745 if _n_expr
== old_child
then
4746 if new_child
!= null then
4747 new_child
.parent
= self
4748 assert new_child
isa AExpr
4755 if _n_type
== old_child
then
4756 if new_child
!= null then
4757 new_child
.parent
= self
4758 assert new_child
isa AType
4767 redef fun visit_all
(v
: Visitor)
4769 v
.enter_visit
(_n_expr
)
4770 v
.enter_visit
(_n_type
)
4773 redef class APlusExpr
4774 private init empty_init
do end
4776 init init_aplusexpr
(
4777 n_expr
: nullable AExpr,
4778 n_expr2
: nullable AExpr
4782 _n_expr
= n_expr
.as(not null)
4783 n_expr
.parent
= self
4784 _n_expr2
= n_expr2
.as(not null)
4785 n_expr2
.parent
= self
4788 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4790 if _n_expr
== old_child
then
4791 if new_child
!= null then
4792 new_child
.parent
= self
4793 assert new_child
isa AExpr
4800 if _n_expr2
== old_child
then
4801 if new_child
!= null then
4802 new_child
.parent
= self
4803 assert new_child
isa AExpr
4804 _n_expr2
= new_child
4812 redef fun visit_all
(v
: Visitor)
4814 v
.enter_visit
(_n_expr
)
4815 v
.enter_visit
(_n_expr2
)
4818 redef class AMinusExpr
4819 private init empty_init
do end
4821 init init_aminusexpr
(
4822 n_expr
: nullable AExpr,
4823 n_expr2
: nullable AExpr
4827 _n_expr
= n_expr
.as(not null)
4828 n_expr
.parent
= self
4829 _n_expr2
= n_expr2
.as(not null)
4830 n_expr2
.parent
= self
4833 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4835 if _n_expr
== old_child
then
4836 if new_child
!= null then
4837 new_child
.parent
= self
4838 assert new_child
isa AExpr
4845 if _n_expr2
== old_child
then
4846 if new_child
!= null then
4847 new_child
.parent
= self
4848 assert new_child
isa AExpr
4849 _n_expr2
= new_child
4857 redef fun visit_all
(v
: Visitor)
4859 v
.enter_visit
(_n_expr
)
4860 v
.enter_visit
(_n_expr2
)
4863 redef class AStarshipExpr
4864 private init empty_init
do end
4866 init init_astarshipexpr
(
4867 n_expr
: nullable AExpr,
4868 n_expr2
: nullable AExpr
4872 _n_expr
= n_expr
.as(not null)
4873 n_expr
.parent
= self
4874 _n_expr2
= n_expr2
.as(not null)
4875 n_expr2
.parent
= self
4878 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4880 if _n_expr
== old_child
then
4881 if new_child
!= null then
4882 new_child
.parent
= self
4883 assert new_child
isa AExpr
4890 if _n_expr2
== old_child
then
4891 if new_child
!= null then
4892 new_child
.parent
= self
4893 assert new_child
isa AExpr
4894 _n_expr2
= new_child
4902 redef fun visit_all
(v
: Visitor)
4904 v
.enter_visit
(_n_expr
)
4905 v
.enter_visit
(_n_expr2
)
4908 redef class AStarExpr
4909 private init empty_init
do end
4911 init init_astarexpr
(
4912 n_expr
: nullable AExpr,
4913 n_expr2
: nullable AExpr
4917 _n_expr
= n_expr
.as(not null)
4918 n_expr
.parent
= self
4919 _n_expr2
= n_expr2
.as(not null)
4920 n_expr2
.parent
= self
4923 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4925 if _n_expr
== old_child
then
4926 if new_child
!= null then
4927 new_child
.parent
= self
4928 assert new_child
isa AExpr
4935 if _n_expr2
== old_child
then
4936 if new_child
!= null then
4937 new_child
.parent
= self
4938 assert new_child
isa AExpr
4939 _n_expr2
= new_child
4947 redef fun visit_all
(v
: Visitor)
4949 v
.enter_visit
(_n_expr
)
4950 v
.enter_visit
(_n_expr2
)
4953 redef class ASlashExpr
4954 private init empty_init
do end
4956 init init_aslashexpr
(
4957 n_expr
: nullable AExpr,
4958 n_expr2
: nullable AExpr
4962 _n_expr
= n_expr
.as(not null)
4963 n_expr
.parent
= self
4964 _n_expr2
= n_expr2
.as(not null)
4965 n_expr2
.parent
= self
4968 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4970 if _n_expr
== old_child
then
4971 if new_child
!= null then
4972 new_child
.parent
= self
4973 assert new_child
isa AExpr
4980 if _n_expr2
== old_child
then
4981 if new_child
!= null then
4982 new_child
.parent
= self
4983 assert new_child
isa AExpr
4984 _n_expr2
= new_child
4992 redef fun visit_all
(v
: Visitor)
4994 v
.enter_visit
(_n_expr
)
4995 v
.enter_visit
(_n_expr2
)
4998 redef class APercentExpr
4999 private init empty_init
do end
5001 init init_apercentexpr
(
5002 n_expr
: nullable AExpr,
5003 n_expr2
: nullable AExpr
5007 _n_expr
= n_expr
.as(not null)
5008 n_expr
.parent
= self
5009 _n_expr2
= n_expr2
.as(not null)
5010 n_expr2
.parent
= self
5013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5015 if _n_expr
== old_child
then
5016 if new_child
!= null then
5017 new_child
.parent
= self
5018 assert new_child
isa AExpr
5025 if _n_expr2
== old_child
then
5026 if new_child
!= null then
5027 new_child
.parent
= self
5028 assert new_child
isa AExpr
5029 _n_expr2
= new_child
5037 redef fun visit_all
(v
: Visitor)
5039 v
.enter_visit
(_n_expr
)
5040 v
.enter_visit
(_n_expr2
)
5043 redef class AUminusExpr
5044 private init empty_init
do end
5046 init init_auminusexpr
(
5047 n_minus
: nullable TMinus,
5048 n_expr
: nullable AExpr
5052 _n_minus
= n_minus
.as(not null)
5053 n_minus
.parent
= self
5054 _n_expr
= n_expr
.as(not null)
5055 n_expr
.parent
= self
5058 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5060 if _n_minus
== old_child
then
5061 if new_child
!= null then
5062 new_child
.parent
= self
5063 assert new_child
isa TMinus
5064 _n_minus
= new_child
5070 if _n_expr
== old_child
then
5071 if new_child
!= null then
5072 new_child
.parent
= self
5073 assert new_child
isa AExpr
5082 redef fun visit_all
(v
: Visitor)
5084 v
.enter_visit
(_n_minus
)
5085 v
.enter_visit
(_n_expr
)
5088 redef class ANewExpr
5089 private init empty_init
do end
5091 init init_anewexpr
(
5092 n_kwnew
: nullable TKwnew,
5093 n_type
: nullable AType,
5095 n_args
: Collection[Object] # Should be Collection[AExpr]
5099 _n_kwnew
= n_kwnew
.as(not null)
5100 n_kwnew
.parent
= self
5101 _n_type
= n_type
.as(not null)
5102 n_type
.parent
= self
5104 if n_id
!= null then
5114 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5116 if _n_kwnew
== old_child
then
5117 if new_child
!= null then
5118 new_child
.parent
= self
5119 assert new_child
isa TKwnew
5120 _n_kwnew
= new_child
5126 if _n_type
== old_child
then
5127 if new_child
!= null then
5128 new_child
.parent
= self
5129 assert new_child
isa AType
5136 if _n_id
== old_child
then
5137 if new_child
!= null then
5138 new_child
.parent
= self
5139 assert new_child
isa TId
5146 for i
in [0.._n_args
.length
[ do
5147 if _n_args
[i
] == old_child
then
5148 if new_child
!= null then
5149 assert new_child
isa AExpr
5150 _n_args
[i
] = new_child
5151 new_child
.parent
= self
5153 _n_args
.remove_at
(i
)
5160 redef fun visit_all
(v
: Visitor)
5162 v
.enter_visit
(_n_kwnew
)
5163 v
.enter_visit
(_n_type
)
5164 if _n_id
!= null then
5165 v
.enter_visit
(_n_id
.as(not null))
5172 redef class AAttrExpr
5173 private init empty_init
do end
5175 init init_aattrexpr
(
5176 n_expr
: nullable AExpr,
5177 n_id
: nullable TAttrid
5181 _n_expr
= n_expr
.as(not null)
5182 n_expr
.parent
= self
5183 _n_id
= n_id
.as(not null)
5187 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5189 if _n_expr
== old_child
then
5190 if new_child
!= null then
5191 new_child
.parent
= self
5192 assert new_child
isa AExpr
5199 if _n_id
== old_child
then
5200 if new_child
!= null then
5201 new_child
.parent
= self
5202 assert new_child
isa TAttrid
5211 redef fun visit_all
(v
: Visitor)
5213 v
.enter_visit
(_n_expr
)
5214 v
.enter_visit
(_n_id
)
5217 redef class AAttrAssignExpr
5218 private init empty_init
do end
5220 init init_aattrassignexpr
(
5221 n_expr
: nullable AExpr,
5222 n_id
: nullable TAttrid,
5223 n_assign
: nullable TAssign,
5224 n_value
: nullable AExpr
5228 _n_expr
= n_expr
.as(not null)
5229 n_expr
.parent
= self
5230 _n_id
= n_id
.as(not null)
5232 _n_assign
= n_assign
.as(not null)
5233 n_assign
.parent
= self
5234 _n_value
= n_value
.as(not null)
5235 n_value
.parent
= self
5238 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5240 if _n_expr
== old_child
then
5241 if new_child
!= null then
5242 new_child
.parent
= self
5243 assert new_child
isa AExpr
5250 if _n_id
== old_child
then
5251 if new_child
!= null then
5252 new_child
.parent
= self
5253 assert new_child
isa TAttrid
5260 if _n_assign
== old_child
then
5261 if new_child
!= null then
5262 new_child
.parent
= self
5263 assert new_child
isa TAssign
5264 _n_assign
= new_child
5270 if _n_value
== old_child
then
5271 if new_child
!= null then
5272 new_child
.parent
= self
5273 assert new_child
isa AExpr
5274 _n_value
= new_child
5282 redef fun visit_all
(v
: Visitor)
5284 v
.enter_visit
(_n_expr
)
5285 v
.enter_visit
(_n_id
)
5286 v
.enter_visit
(_n_assign
)
5287 v
.enter_visit
(_n_value
)
5290 redef class AAttrReassignExpr
5291 private init empty_init
do end
5293 init init_aattrreassignexpr
(
5294 n_expr
: nullable AExpr,
5295 n_id
: nullable TAttrid,
5296 n_assign_op
: nullable AAssignOp,
5297 n_value
: nullable AExpr
5301 _n_expr
= n_expr
.as(not null)
5302 n_expr
.parent
= self
5303 _n_id
= n_id
.as(not null)
5305 _n_assign_op
= n_assign_op
.as(not null)
5306 n_assign_op
.parent
= self
5307 _n_value
= n_value
.as(not null)
5308 n_value
.parent
= self
5311 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5313 if _n_expr
== old_child
then
5314 if new_child
!= null then
5315 new_child
.parent
= self
5316 assert new_child
isa AExpr
5323 if _n_id
== old_child
then
5324 if new_child
!= null then
5325 new_child
.parent
= self
5326 assert new_child
isa TAttrid
5333 if _n_assign_op
== old_child
then
5334 if new_child
!= null then
5335 new_child
.parent
= self
5336 assert new_child
isa AAssignOp
5337 _n_assign_op
= new_child
5343 if _n_value
== old_child
then
5344 if new_child
!= null then
5345 new_child
.parent
= self
5346 assert new_child
isa AExpr
5347 _n_value
= new_child
5355 redef fun visit_all
(v
: Visitor)
5357 v
.enter_visit
(_n_expr
)
5358 v
.enter_visit
(_n_id
)
5359 v
.enter_visit
(_n_assign_op
)
5360 v
.enter_visit
(_n_value
)
5363 redef class ACallExpr
5364 private init empty_init
do end
5366 init init_acallexpr
(
5367 n_expr
: nullable AExpr,
5369 n_args
: Collection[Object], # Should be Collection[AExpr]
5370 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
5374 _n_expr
= n_expr
.as(not null)
5375 n_expr
.parent
= self
5376 _n_id
= n_id
.as(not null)
5383 for n
in n_closure_defs
do
5384 assert n
isa AClosureDef
5385 _n_closure_defs
.add
(n
)
5390 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5392 if _n_expr
== old_child
then
5393 if new_child
!= null then
5394 new_child
.parent
= self
5395 assert new_child
isa AExpr
5402 if _n_id
== old_child
then
5403 if new_child
!= null then
5404 new_child
.parent
= self
5405 assert new_child
isa TId
5412 for i
in [0.._n_args
.length
[ do
5413 if _n_args
[i
] == old_child
then
5414 if new_child
!= null then
5415 assert new_child
isa AExpr
5416 _n_args
[i
] = new_child
5417 new_child
.parent
= self
5419 _n_args
.remove_at
(i
)
5424 for i
in [0.._n_closure_defs
.length
[ do
5425 if _n_closure_defs
[i
] == old_child
then
5426 if new_child
!= null then
5427 assert new_child
isa AClosureDef
5428 _n_closure_defs
[i
] = new_child
5429 new_child
.parent
= self
5431 _n_closure_defs
.remove_at
(i
)
5438 redef fun visit_all
(v
: Visitor)
5440 v
.enter_visit
(_n_expr
)
5441 v
.enter_visit
(_n_id
)
5445 for n
in _n_closure_defs
do
5450 redef class ACallAssignExpr
5451 private init empty_init
do end
5453 init init_acallassignexpr
(
5454 n_expr
: nullable AExpr,
5456 n_args
: Collection[Object], # Should be Collection[AExpr]
5457 n_assign
: nullable TAssign,
5458 n_value
: nullable AExpr
5462 _n_expr
= n_expr
.as(not null)
5463 n_expr
.parent
= self
5464 _n_id
= n_id
.as(not null)
5471 _n_assign
= n_assign
.as(not null)
5472 n_assign
.parent
= self
5473 _n_value
= n_value
.as(not null)
5474 n_value
.parent
= self
5477 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5479 if _n_expr
== old_child
then
5480 if new_child
!= null then
5481 new_child
.parent
= self
5482 assert new_child
isa AExpr
5489 if _n_id
== old_child
then
5490 if new_child
!= null then
5491 new_child
.parent
= self
5492 assert new_child
isa TId
5499 for i
in [0.._n_args
.length
[ do
5500 if _n_args
[i
] == old_child
then
5501 if new_child
!= null then
5502 assert new_child
isa AExpr
5503 _n_args
[i
] = new_child
5504 new_child
.parent
= self
5506 _n_args
.remove_at
(i
)
5511 if _n_assign
== old_child
then
5512 if new_child
!= null then
5513 new_child
.parent
= self
5514 assert new_child
isa TAssign
5515 _n_assign
= new_child
5521 if _n_value
== old_child
then
5522 if new_child
!= null then
5523 new_child
.parent
= self
5524 assert new_child
isa AExpr
5525 _n_value
= new_child
5533 redef fun visit_all
(v
: Visitor)
5535 v
.enter_visit
(_n_expr
)
5536 v
.enter_visit
(_n_id
)
5540 v
.enter_visit
(_n_assign
)
5541 v
.enter_visit
(_n_value
)
5544 redef class ACallReassignExpr
5545 private init empty_init
do end
5547 init init_acallreassignexpr
(
5548 n_expr
: nullable AExpr,
5550 n_args
: Collection[Object], # Should be Collection[AExpr]
5551 n_assign_op
: nullable AAssignOp,
5552 n_value
: nullable AExpr
5556 _n_expr
= n_expr
.as(not null)
5557 n_expr
.parent
= self
5558 _n_id
= n_id
.as(not null)
5565 _n_assign_op
= n_assign_op
.as(not null)
5566 n_assign_op
.parent
= self
5567 _n_value
= n_value
.as(not null)
5568 n_value
.parent
= self
5571 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5573 if _n_expr
== old_child
then
5574 if new_child
!= null then
5575 new_child
.parent
= self
5576 assert new_child
isa AExpr
5583 if _n_id
== old_child
then
5584 if new_child
!= null then
5585 new_child
.parent
= self
5586 assert new_child
isa TId
5593 for i
in [0.._n_args
.length
[ do
5594 if _n_args
[i
] == old_child
then
5595 if new_child
!= null then
5596 assert new_child
isa AExpr
5597 _n_args
[i
] = new_child
5598 new_child
.parent
= self
5600 _n_args
.remove_at
(i
)
5605 if _n_assign_op
== old_child
then
5606 if new_child
!= null then
5607 new_child
.parent
= self
5608 assert new_child
isa AAssignOp
5609 _n_assign_op
= new_child
5615 if _n_value
== old_child
then
5616 if new_child
!= null then
5617 new_child
.parent
= self
5618 assert new_child
isa AExpr
5619 _n_value
= new_child
5627 redef fun visit_all
(v
: Visitor)
5629 v
.enter_visit
(_n_expr
)
5630 v
.enter_visit
(_n_id
)
5634 v
.enter_visit
(_n_assign_op
)
5635 v
.enter_visit
(_n_value
)
5638 redef class ASuperExpr
5639 private init empty_init
do end
5641 init init_asuperexpr
(
5642 n_qualified
: nullable AQualified,
5643 n_kwsuper
: nullable TKwsuper,
5644 n_args
: Collection[Object] # Should be Collection[AExpr]
5648 _n_qualified
= n_qualified
5649 if n_qualified
!= null then
5650 n_qualified
.parent
= self
5652 _n_kwsuper
= n_kwsuper
.as(not null)
5653 n_kwsuper
.parent
= self
5661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5663 if _n_qualified
== old_child
then
5664 if new_child
!= null then
5665 new_child
.parent
= self
5666 assert new_child
isa AQualified
5667 _n_qualified
= new_child
5673 if _n_kwsuper
== old_child
then
5674 if new_child
!= null then
5675 new_child
.parent
= self
5676 assert new_child
isa TKwsuper
5677 _n_kwsuper
= new_child
5683 for i
in [0.._n_args
.length
[ do
5684 if _n_args
[i
] == old_child
then
5685 if new_child
!= null then
5686 assert new_child
isa AExpr
5687 _n_args
[i
] = new_child
5688 new_child
.parent
= self
5690 _n_args
.remove_at
(i
)
5697 redef fun visit_all
(v
: Visitor)
5699 if _n_qualified
!= null then
5700 v
.enter_visit
(_n_qualified
.as(not null))
5702 v
.enter_visit
(_n_kwsuper
)
5708 redef class AInitExpr
5709 private init empty_init
do end
5711 init init_ainitexpr
(
5712 n_expr
: nullable AExpr,
5713 n_kwinit
: nullable TKwinit,
5714 n_args
: Collection[Object] # Should be Collection[AExpr]
5718 _n_expr
= n_expr
.as(not null)
5719 n_expr
.parent
= self
5720 _n_kwinit
= n_kwinit
.as(not null)
5721 n_kwinit
.parent
= self
5729 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5731 if _n_expr
== old_child
then
5732 if new_child
!= null then
5733 new_child
.parent
= self
5734 assert new_child
isa AExpr
5741 if _n_kwinit
== old_child
then
5742 if new_child
!= null then
5743 new_child
.parent
= self
5744 assert new_child
isa TKwinit
5745 _n_kwinit
= new_child
5751 for i
in [0.._n_args
.length
[ do
5752 if _n_args
[i
] == old_child
then
5753 if new_child
!= null then
5754 assert new_child
isa AExpr
5755 _n_args
[i
] = new_child
5756 new_child
.parent
= self
5758 _n_args
.remove_at
(i
)
5765 redef fun visit_all
(v
: Visitor)
5767 v
.enter_visit
(_n_expr
)
5768 v
.enter_visit
(_n_kwinit
)
5774 redef class ABraExpr
5775 private init empty_init
do end
5777 init init_abraexpr
(
5778 n_expr
: nullable AExpr,
5779 n_args
: Collection[Object], # Should be Collection[AExpr]
5780 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
5784 _n_expr
= n_expr
.as(not null)
5785 n_expr
.parent
= self
5791 for n
in n_closure_defs
do
5792 assert n
isa AClosureDef
5793 _n_closure_defs
.add
(n
)
5798 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5800 if _n_expr
== old_child
then
5801 if new_child
!= null then
5802 new_child
.parent
= self
5803 assert new_child
isa AExpr
5810 for i
in [0.._n_args
.length
[ do
5811 if _n_args
[i
] == old_child
then
5812 if new_child
!= null then
5813 assert new_child
isa AExpr
5814 _n_args
[i
] = new_child
5815 new_child
.parent
= self
5817 _n_args
.remove_at
(i
)
5822 for i
in [0.._n_closure_defs
.length
[ do
5823 if _n_closure_defs
[i
] == old_child
then
5824 if new_child
!= null then
5825 assert new_child
isa AClosureDef
5826 _n_closure_defs
[i
] = new_child
5827 new_child
.parent
= self
5829 _n_closure_defs
.remove_at
(i
)
5836 redef fun visit_all
(v
: Visitor)
5838 v
.enter_visit
(_n_expr
)
5842 for n
in _n_closure_defs
do
5847 redef class ABraAssignExpr
5848 private init empty_init
do end
5850 init init_abraassignexpr
(
5851 n_expr
: nullable AExpr,
5852 n_args
: Collection[Object], # Should be Collection[AExpr]
5853 n_assign
: nullable TAssign,
5854 n_value
: nullable AExpr
5858 _n_expr
= n_expr
.as(not null)
5859 n_expr
.parent
= self
5865 _n_assign
= n_assign
.as(not null)
5866 n_assign
.parent
= self
5867 _n_value
= n_value
.as(not null)
5868 n_value
.parent
= self
5871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5873 if _n_expr
== old_child
then
5874 if new_child
!= null then
5875 new_child
.parent
= self
5876 assert new_child
isa AExpr
5883 for i
in [0.._n_args
.length
[ do
5884 if _n_args
[i
] == old_child
then
5885 if new_child
!= null then
5886 assert new_child
isa AExpr
5887 _n_args
[i
] = new_child
5888 new_child
.parent
= self
5890 _n_args
.remove_at
(i
)
5895 if _n_assign
== old_child
then
5896 if new_child
!= null then
5897 new_child
.parent
= self
5898 assert new_child
isa TAssign
5899 _n_assign
= new_child
5905 if _n_value
== old_child
then
5906 if new_child
!= null then
5907 new_child
.parent
= self
5908 assert new_child
isa AExpr
5909 _n_value
= new_child
5917 redef fun visit_all
(v
: Visitor)
5919 v
.enter_visit
(_n_expr
)
5923 v
.enter_visit
(_n_assign
)
5924 v
.enter_visit
(_n_value
)
5927 redef class ABraReassignExpr
5928 private init empty_init
do end
5930 init init_abrareassignexpr
(
5931 n_expr
: nullable AExpr,
5932 n_args
: Collection[Object], # Should be Collection[AExpr]
5933 n_assign_op
: nullable AAssignOp,
5934 n_value
: nullable AExpr
5938 _n_expr
= n_expr
.as(not null)
5939 n_expr
.parent
= self
5945 _n_assign_op
= n_assign_op
.as(not null)
5946 n_assign_op
.parent
= self
5947 _n_value
= n_value
.as(not null)
5948 n_value
.parent
= self
5951 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5953 if _n_expr
== old_child
then
5954 if new_child
!= null then
5955 new_child
.parent
= self
5956 assert new_child
isa AExpr
5963 for i
in [0.._n_args
.length
[ do
5964 if _n_args
[i
] == old_child
then
5965 if new_child
!= null then
5966 assert new_child
isa AExpr
5967 _n_args
[i
] = new_child
5968 new_child
.parent
= self
5970 _n_args
.remove_at
(i
)
5975 if _n_assign_op
== old_child
then
5976 if new_child
!= null then
5977 new_child
.parent
= self
5978 assert new_child
isa AAssignOp
5979 _n_assign_op
= new_child
5985 if _n_value
== old_child
then
5986 if new_child
!= null then
5987 new_child
.parent
= self
5988 assert new_child
isa AExpr
5989 _n_value
= new_child
5997 redef fun visit_all
(v
: Visitor)
5999 v
.enter_visit
(_n_expr
)
6003 v
.enter_visit
(_n_assign_op
)
6004 v
.enter_visit
(_n_value
)
6007 redef class AClosureCallExpr
6008 private init empty_init
do end
6010 init init_aclosurecallexpr
(
6012 n_args
: Collection[Object], # Should be Collection[AExpr]
6013 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
6017 _n_id
= n_id
.as(not null)
6024 for n
in n_closure_defs
do
6025 assert n
isa AClosureDef
6026 _n_closure_defs
.add
(n
)
6031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6033 if _n_id
== old_child
then
6034 if new_child
!= null then
6035 new_child
.parent
= self
6036 assert new_child
isa TId
6043 for i
in [0.._n_args
.length
[ do
6044 if _n_args
[i
] == old_child
then
6045 if new_child
!= null then
6046 assert new_child
isa AExpr
6047 _n_args
[i
] = new_child
6048 new_child
.parent
= self
6050 _n_args
.remove_at
(i
)
6055 for i
in [0.._n_closure_defs
.length
[ do
6056 if _n_closure_defs
[i
] == old_child
then
6057 if new_child
!= null then
6058 assert new_child
isa AClosureDef
6059 _n_closure_defs
[i
] = new_child
6060 new_child
.parent
= self
6062 _n_closure_defs
.remove_at
(i
)
6069 redef fun visit_all
(v
: Visitor)
6071 v
.enter_visit
(_n_id
)
6075 for n
in _n_closure_defs
do
6080 redef class AVarExpr
6081 private init empty_init
do end
6083 init init_avarexpr
(
6088 _n_id
= n_id
.as(not null)
6092 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6094 if _n_id
== old_child
then
6095 if new_child
!= null then
6096 new_child
.parent
= self
6097 assert new_child
isa TId
6106 redef fun visit_all
(v
: Visitor)
6108 v
.enter_visit
(_n_id
)
6111 redef class AVarAssignExpr
6112 private init empty_init
do end
6114 init init_avarassignexpr
(
6116 n_assign
: nullable TAssign,
6117 n_value
: nullable AExpr
6121 _n_id
= n_id
.as(not null)
6123 _n_assign
= n_assign
.as(not null)
6124 n_assign
.parent
= self
6125 _n_value
= n_value
.as(not null)
6126 n_value
.parent
= self
6129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6131 if _n_id
== old_child
then
6132 if new_child
!= null then
6133 new_child
.parent
= self
6134 assert new_child
isa TId
6141 if _n_assign
== old_child
then
6142 if new_child
!= null then
6143 new_child
.parent
= self
6144 assert new_child
isa TAssign
6145 _n_assign
= new_child
6151 if _n_value
== old_child
then
6152 if new_child
!= null then
6153 new_child
.parent
= self
6154 assert new_child
isa AExpr
6155 _n_value
= new_child
6163 redef fun visit_all
(v
: Visitor)
6165 v
.enter_visit
(_n_id
)
6166 v
.enter_visit
(_n_assign
)
6167 v
.enter_visit
(_n_value
)
6170 redef class AVarReassignExpr
6171 private init empty_init
do end
6173 init init_avarreassignexpr
(
6175 n_assign_op
: nullable AAssignOp,
6176 n_value
: nullable AExpr
6180 _n_id
= n_id
.as(not null)
6182 _n_assign_op
= n_assign_op
.as(not null)
6183 n_assign_op
.parent
= self
6184 _n_value
= n_value
.as(not null)
6185 n_value
.parent
= self
6188 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6190 if _n_id
== old_child
then
6191 if new_child
!= null then
6192 new_child
.parent
= self
6193 assert new_child
isa TId
6200 if _n_assign_op
== old_child
then
6201 if new_child
!= null then
6202 new_child
.parent
= self
6203 assert new_child
isa AAssignOp
6204 _n_assign_op
= new_child
6210 if _n_value
== old_child
then
6211 if new_child
!= null then
6212 new_child
.parent
= self
6213 assert new_child
isa AExpr
6214 _n_value
= new_child
6222 redef fun visit_all
(v
: Visitor)
6224 v
.enter_visit
(_n_id
)
6225 v
.enter_visit
(_n_assign_op
)
6226 v
.enter_visit
(_n_value
)
6229 redef class ARangeExpr
6230 private init empty_init
do end
6232 init init_arangeexpr
(
6233 n_expr
: nullable AExpr,
6234 n_expr2
: nullable AExpr
6238 _n_expr
= n_expr
.as(not null)
6239 n_expr
.parent
= self
6240 _n_expr2
= n_expr2
.as(not null)
6241 n_expr2
.parent
= self
6244 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6246 if _n_expr
== old_child
then
6247 if new_child
!= null then
6248 new_child
.parent
= self
6249 assert new_child
isa AExpr
6256 if _n_expr2
== old_child
then
6257 if new_child
!= null then
6258 new_child
.parent
= self
6259 assert new_child
isa AExpr
6260 _n_expr2
= new_child
6268 redef fun visit_all
(v
: Visitor)
6270 v
.enter_visit
(_n_expr
)
6271 v
.enter_visit
(_n_expr2
)
6274 redef class ACrangeExpr
6275 private init empty_init
do end
6277 init init_acrangeexpr
(
6278 n_expr
: nullable AExpr,
6279 n_expr2
: nullable AExpr
6283 _n_expr
= n_expr
.as(not null)
6284 n_expr
.parent
= self
6285 _n_expr2
= n_expr2
.as(not null)
6286 n_expr2
.parent
= self
6289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6291 if _n_expr
== old_child
then
6292 if new_child
!= null then
6293 new_child
.parent
= self
6294 assert new_child
isa AExpr
6301 if _n_expr2
== old_child
then
6302 if new_child
!= null then
6303 new_child
.parent
= self
6304 assert new_child
isa AExpr
6305 _n_expr2
= new_child
6313 redef fun visit_all
(v
: Visitor)
6315 v
.enter_visit
(_n_expr
)
6316 v
.enter_visit
(_n_expr2
)
6319 redef class AOrangeExpr
6320 private init empty_init
do end
6322 init init_aorangeexpr
(
6323 n_expr
: nullable AExpr,
6324 n_expr2
: nullable AExpr
6328 _n_expr
= n_expr
.as(not null)
6329 n_expr
.parent
= self
6330 _n_expr2
= n_expr2
.as(not null)
6331 n_expr2
.parent
= self
6334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6336 if _n_expr
== old_child
then
6337 if new_child
!= null then
6338 new_child
.parent
= self
6339 assert new_child
isa AExpr
6346 if _n_expr2
== old_child
then
6347 if new_child
!= null then
6348 new_child
.parent
= self
6349 assert new_child
isa AExpr
6350 _n_expr2
= new_child
6358 redef fun visit_all
(v
: Visitor)
6360 v
.enter_visit
(_n_expr
)
6361 v
.enter_visit
(_n_expr2
)
6364 redef class AArrayExpr
6365 private init empty_init
do end
6367 init init_aarrayexpr
(
6368 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6379 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6381 for i
in [0.._n_exprs
.length
[ do
6382 if _n_exprs
[i
] == old_child
then
6383 if new_child
!= null then
6384 assert new_child
isa AExpr
6385 _n_exprs
[i
] = new_child
6386 new_child
.parent
= self
6388 _n_exprs
.remove_at
(i
)
6395 redef fun visit_all
(v
: Visitor)
6397 for n
in _n_exprs
do
6402 redef class ASelfExpr
6403 private init empty_init
do end
6405 init init_aselfexpr
(
6406 n_kwself
: nullable TKwself
6410 _n_kwself
= n_kwself
.as(not null)
6411 n_kwself
.parent
= self
6414 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6416 if _n_kwself
== old_child
then
6417 if new_child
!= null then
6418 new_child
.parent
= self
6419 assert new_child
isa TKwself
6420 _n_kwself
= new_child
6428 redef fun visit_all
(v
: Visitor)
6430 v
.enter_visit
(_n_kwself
)
6433 redef class AImplicitSelfExpr
6434 private init empty_init
do end
6436 init init_aimplicitselfexpr
6441 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6445 redef fun visit_all
(v
: Visitor)
6449 redef class ATrueExpr
6450 private init empty_init
do end
6452 init init_atrueexpr
(
6453 n_kwtrue
: nullable TKwtrue
6457 _n_kwtrue
= n_kwtrue
.as(not null)
6458 n_kwtrue
.parent
= self
6461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6463 if _n_kwtrue
== old_child
then
6464 if new_child
!= null then
6465 new_child
.parent
= self
6466 assert new_child
isa TKwtrue
6467 _n_kwtrue
= new_child
6475 redef fun visit_all
(v
: Visitor)
6477 v
.enter_visit
(_n_kwtrue
)
6480 redef class AFalseExpr
6481 private init empty_init
do end
6483 init init_afalseexpr
(
6484 n_kwfalse
: nullable TKwfalse
6488 _n_kwfalse
= n_kwfalse
.as(not null)
6489 n_kwfalse
.parent
= self
6492 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6494 if _n_kwfalse
== old_child
then
6495 if new_child
!= null then
6496 new_child
.parent
= self
6497 assert new_child
isa TKwfalse
6498 _n_kwfalse
= new_child
6506 redef fun visit_all
(v
: Visitor)
6508 v
.enter_visit
(_n_kwfalse
)
6511 redef class ANullExpr
6512 private init empty_init
do end
6514 init init_anullexpr
(
6515 n_kwnull
: nullable TKwnull
6519 _n_kwnull
= n_kwnull
.as(not null)
6520 n_kwnull
.parent
= self
6523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6525 if _n_kwnull
== old_child
then
6526 if new_child
!= null then
6527 new_child
.parent
= self
6528 assert new_child
isa TKwnull
6529 _n_kwnull
= new_child
6537 redef fun visit_all
(v
: Visitor)
6539 v
.enter_visit
(_n_kwnull
)
6542 redef class AIntExpr
6543 private init empty_init
do end
6545 init init_aintexpr
(
6546 n_number
: nullable TNumber
6550 _n_number
= n_number
.as(not null)
6551 n_number
.parent
= self
6554 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6556 if _n_number
== old_child
then
6557 if new_child
!= null then
6558 new_child
.parent
= self
6559 assert new_child
isa TNumber
6560 _n_number
= new_child
6568 redef fun visit_all
(v
: Visitor)
6570 v
.enter_visit
(_n_number
)
6573 redef class AFloatExpr
6574 private init empty_init
do end
6576 init init_afloatexpr
(
6577 n_float
: nullable TFloat
6581 _n_float
= n_float
.as(not null)
6582 n_float
.parent
= self
6585 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6587 if _n_float
== old_child
then
6588 if new_child
!= null then
6589 new_child
.parent
= self
6590 assert new_child
isa TFloat
6591 _n_float
= new_child
6599 redef fun visit_all
(v
: Visitor)
6601 v
.enter_visit
(_n_float
)
6604 redef class ACharExpr
6605 private init empty_init
do end
6607 init init_acharexpr
(
6608 n_char
: nullable TChar
6612 _n_char
= n_char
.as(not null)
6613 n_char
.parent
= self
6616 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6618 if _n_char
== old_child
then
6619 if new_child
!= null then
6620 new_child
.parent
= self
6621 assert new_child
isa TChar
6630 redef fun visit_all
(v
: Visitor)
6632 v
.enter_visit
(_n_char
)
6635 redef class AStringExpr
6636 private init empty_init
do end
6638 init init_astringexpr
(
6639 n_string
: nullable TString
6643 _n_string
= n_string
.as(not null)
6644 n_string
.parent
= self
6647 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6649 if _n_string
== old_child
then
6650 if new_child
!= null then
6651 new_child
.parent
= self
6652 assert new_child
isa TString
6653 _n_string
= new_child
6661 redef fun visit_all
(v
: Visitor)
6663 v
.enter_visit
(_n_string
)
6666 redef class AStartStringExpr
6667 private init empty_init
do end
6669 init init_astartstringexpr
(
6670 n_string
: nullable TStartString
6674 _n_string
= n_string
.as(not null)
6675 n_string
.parent
= self
6678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6680 if _n_string
== old_child
then
6681 if new_child
!= null then
6682 new_child
.parent
= self
6683 assert new_child
isa TStartString
6684 _n_string
= new_child
6692 redef fun visit_all
(v
: Visitor)
6694 v
.enter_visit
(_n_string
)
6697 redef class AMidStringExpr
6698 private init empty_init
do end
6700 init init_amidstringexpr
(
6701 n_string
: nullable TMidString
6705 _n_string
= n_string
.as(not null)
6706 n_string
.parent
= self
6709 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6711 if _n_string
== old_child
then
6712 if new_child
!= null then
6713 new_child
.parent
= self
6714 assert new_child
isa TMidString
6715 _n_string
= new_child
6723 redef fun visit_all
(v
: Visitor)
6725 v
.enter_visit
(_n_string
)
6728 redef class AEndStringExpr
6729 private init empty_init
do end
6731 init init_aendstringexpr
(
6732 n_string
: nullable TEndString
6736 _n_string
= n_string
.as(not null)
6737 n_string
.parent
= self
6740 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6742 if _n_string
== old_child
then
6743 if new_child
!= null then
6744 new_child
.parent
= self
6745 assert new_child
isa TEndString
6746 _n_string
= new_child
6754 redef fun visit_all
(v
: Visitor)
6756 v
.enter_visit
(_n_string
)
6759 redef class ASuperstringExpr
6760 private init empty_init
do end
6762 init init_asuperstringexpr
(
6763 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6774 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6776 for i
in [0.._n_exprs
.length
[ do
6777 if _n_exprs
[i
] == old_child
then
6778 if new_child
!= null then
6779 assert new_child
isa AExpr
6780 _n_exprs
[i
] = new_child
6781 new_child
.parent
= self
6783 _n_exprs
.remove_at
(i
)
6790 redef fun visit_all
(v
: Visitor)
6792 for n
in _n_exprs
do
6797 redef class AParExpr
6798 private init empty_init
do end
6800 init init_aparexpr
(
6801 n_expr
: nullable AExpr
6805 _n_expr
= n_expr
.as(not null)
6806 n_expr
.parent
= self
6809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6811 if _n_expr
== old_child
then
6812 if new_child
!= null then
6813 new_child
.parent
= self
6814 assert new_child
isa AExpr
6823 redef fun visit_all
(v
: Visitor)
6825 v
.enter_visit
(_n_expr
)
6828 redef class AAsCastExpr
6829 private init empty_init
do end
6831 init init_aascastexpr
(
6832 n_expr
: nullable AExpr,
6833 n_kwas
: nullable TKwas,
6834 n_type
: nullable AType
6838 _n_expr
= n_expr
.as(not null)
6839 n_expr
.parent
= self
6840 _n_kwas
= n_kwas
.as(not null)
6841 n_kwas
.parent
= self
6842 _n_type
= n_type
.as(not null)
6843 n_type
.parent
= self
6846 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6848 if _n_expr
== old_child
then
6849 if new_child
!= null then
6850 new_child
.parent
= self
6851 assert new_child
isa AExpr
6858 if _n_kwas
== old_child
then
6859 if new_child
!= null then
6860 new_child
.parent
= self
6861 assert new_child
isa TKwas
6868 if _n_type
== old_child
then
6869 if new_child
!= null then
6870 new_child
.parent
= self
6871 assert new_child
isa AType
6880 redef fun visit_all
(v
: Visitor)
6882 v
.enter_visit
(_n_expr
)
6883 v
.enter_visit
(_n_kwas
)
6884 v
.enter_visit
(_n_type
)
6887 redef class AAsNotnullExpr
6888 private init empty_init
do end
6890 init init_aasnotnullexpr
(
6891 n_expr
: nullable AExpr,
6892 n_kwas
: nullable TKwas,
6893 n_kwnot
: nullable TKwnot,
6894 n_kwnull
: nullable TKwnull
6898 _n_expr
= n_expr
.as(not null)
6899 n_expr
.parent
= self
6900 _n_kwas
= n_kwas
.as(not null)
6901 n_kwas
.parent
= self
6902 _n_kwnot
= n_kwnot
.as(not null)
6903 n_kwnot
.parent
= self
6904 _n_kwnull
= n_kwnull
.as(not null)
6905 n_kwnull
.parent
= self
6908 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6910 if _n_expr
== old_child
then
6911 if new_child
!= null then
6912 new_child
.parent
= self
6913 assert new_child
isa AExpr
6920 if _n_kwas
== old_child
then
6921 if new_child
!= null then
6922 new_child
.parent
= self
6923 assert new_child
isa TKwas
6930 if _n_kwnot
== old_child
then
6931 if new_child
!= null then
6932 new_child
.parent
= self
6933 assert new_child
isa TKwnot
6934 _n_kwnot
= new_child
6940 if _n_kwnull
== old_child
then
6941 if new_child
!= null then
6942 new_child
.parent
= self
6943 assert new_child
isa TKwnull
6944 _n_kwnull
= new_child
6952 redef fun visit_all
(v
: Visitor)
6954 v
.enter_visit
(_n_expr
)
6955 v
.enter_visit
(_n_kwas
)
6956 v
.enter_visit
(_n_kwnot
)
6957 v
.enter_visit
(_n_kwnull
)
6960 redef class AIssetAttrExpr
6961 private init empty_init
do end
6963 init init_aissetattrexpr
(
6964 n_kwisset
: nullable TKwisset,
6965 n_expr
: nullable AExpr,
6966 n_id
: nullable TAttrid
6970 _n_kwisset
= n_kwisset
.as(not null)
6971 n_kwisset
.parent
= self
6972 _n_expr
= n_expr
.as(not null)
6973 n_expr
.parent
= self
6974 _n_id
= n_id
.as(not null)
6978 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6980 if _n_kwisset
== old_child
then
6981 if new_child
!= null then
6982 new_child
.parent
= self
6983 assert new_child
isa TKwisset
6984 _n_kwisset
= new_child
6990 if _n_expr
== old_child
then
6991 if new_child
!= null then
6992 new_child
.parent
= self
6993 assert new_child
isa AExpr
7000 if _n_id
== old_child
then
7001 if new_child
!= null then
7002 new_child
.parent
= self
7003 assert new_child
isa TAttrid
7012 redef fun visit_all
(v
: Visitor)
7014 v
.enter_visit
(_n_kwisset
)
7015 v
.enter_visit
(_n_expr
)
7016 v
.enter_visit
(_n_id
)
7019 redef class APlusAssignOp
7020 private init empty_init
do end
7022 init init_aplusassignop
(
7023 n_pluseq
: nullable TPluseq
7027 _n_pluseq
= n_pluseq
.as(not null)
7028 n_pluseq
.parent
= self
7031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7033 if _n_pluseq
== old_child
then
7034 if new_child
!= null then
7035 new_child
.parent
= self
7036 assert new_child
isa TPluseq
7037 _n_pluseq
= new_child
7045 redef fun visit_all
(v
: Visitor)
7047 v
.enter_visit
(_n_pluseq
)
7050 redef class AMinusAssignOp
7051 private init empty_init
do end
7053 init init_aminusassignop
(
7054 n_minuseq
: nullable TMinuseq
7058 _n_minuseq
= n_minuseq
.as(not null)
7059 n_minuseq
.parent
= self
7062 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7064 if _n_minuseq
== old_child
then
7065 if new_child
!= null then
7066 new_child
.parent
= self
7067 assert new_child
isa TMinuseq
7068 _n_minuseq
= new_child
7076 redef fun visit_all
(v
: Visitor)
7078 v
.enter_visit
(_n_minuseq
)
7081 redef class AClosureDef
7082 private init empty_init
do end
7084 init init_aclosuredef
(
7085 n_bang
: nullable TBang,
7086 n_id
: nullable AClosureId,
7087 n_ids
: Collection[Object], # Should be Collection[TId]
7088 n_kwdo
: nullable TKwdo,
7089 n_expr
: nullable AExpr,
7090 n_label
: nullable ALabel
7094 _n_bang
= n_bang
.as(not null)
7095 n_bang
.parent
= self
7096 _n_id
= n_id
.as(not null)
7104 if n_kwdo
!= null then
7105 n_kwdo
.parent
= self
7108 if n_expr
!= null then
7109 n_expr
.parent
= self
7112 if n_label
!= null then
7113 n_label
.parent
= self
7117 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7119 if _n_bang
== old_child
then
7120 if new_child
!= null then
7121 new_child
.parent
= self
7122 assert new_child
isa TBang
7129 if _n_id
== old_child
then
7130 if new_child
!= null then
7131 new_child
.parent
= self
7132 assert new_child
isa AClosureId
7139 for i
in [0.._n_ids
.length
[ do
7140 if _n_ids
[i
] == old_child
then
7141 if new_child
!= null then
7142 assert new_child
isa TId
7143 _n_ids
[i
] = new_child
7144 new_child
.parent
= self
7151 if _n_kwdo
== old_child
then
7152 if new_child
!= null then
7153 new_child
.parent
= self
7154 assert new_child
isa TKwdo
7161 if _n_expr
== old_child
then
7162 if new_child
!= null then
7163 new_child
.parent
= self
7164 assert new_child
isa AExpr
7171 if _n_label
== old_child
then
7172 if new_child
!= null then
7173 new_child
.parent
= self
7174 assert new_child
isa ALabel
7175 _n_label
= new_child
7183 redef fun visit_all
(v
: Visitor)
7185 v
.enter_visit
(_n_bang
)
7186 v
.enter_visit
(_n_id
)
7190 if _n_kwdo
!= null then
7191 v
.enter_visit
(_n_kwdo
.as(not null))
7193 if _n_expr
!= null then
7194 v
.enter_visit
(_n_expr
.as(not null))
7196 if _n_label
!= null then
7197 v
.enter_visit
(_n_label
.as(not null))
7201 redef class ASimpleClosureId
7202 private init empty_init
do end
7204 init init_asimpleclosureid
(
7209 _n_id
= n_id
.as(not null)
7213 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7215 if _n_id
== old_child
then
7216 if new_child
!= null then
7217 new_child
.parent
= self
7218 assert new_child
isa TId
7227 redef fun visit_all
(v
: Visitor)
7229 v
.enter_visit
(_n_id
)
7232 redef class ABreakClosureId
7233 private init empty_init
do end
7235 init init_abreakclosureid
(
7236 n_kwbreak
: nullable TKwbreak
7240 _n_kwbreak
= n_kwbreak
.as(not null)
7241 n_kwbreak
.parent
= self
7244 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7246 if _n_kwbreak
== old_child
then
7247 if new_child
!= null then
7248 new_child
.parent
= self
7249 assert new_child
isa TKwbreak
7250 _n_kwbreak
= new_child
7258 redef fun visit_all
(v
: Visitor)
7260 v
.enter_visit
(_n_kwbreak
)
7263 redef class AQualified
7264 private init empty_init
do end
7266 init init_aqualified
(
7267 n_id
: Collection[Object], # Should be Collection[TId]
7268 n_classid
: nullable TClassid
7277 _n_classid
= n_classid
7278 if n_classid
!= null then
7279 n_classid
.parent
= self
7283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7285 for i
in [0.._n_id
.length
[ do
7286 if _n_id
[i
] == old_child
then
7287 if new_child
!= null then
7288 assert new_child
isa TId
7289 _n_id
[i
] = new_child
7290 new_child
.parent
= self
7297 if _n_classid
== old_child
then
7298 if new_child
!= null then
7299 new_child
.parent
= self
7300 assert new_child
isa TClassid
7301 _n_classid
= new_child
7309 redef fun visit_all
(v
: Visitor)
7314 if _n_classid
!= null then
7315 v
.enter_visit
(_n_classid
.as(not null))
7320 private init empty_init
do end
7323 n_comment
: Collection[Object] # Should be Collection[TComment]
7327 for n
in n_comment
do
7328 assert n
isa TComment
7334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7336 for i
in [0.._n_comment
.length
[ do
7337 if _n_comment
[i
] == old_child
then
7338 if new_child
!= null then
7339 assert new_child
isa TComment
7340 _n_comment
[i
] = new_child
7341 new_child
.parent
= self
7343 _n_comment
.remove_at
(i
)
7350 redef fun visit_all
(v
: Visitor)
7352 for n
in _n_comment
do
7360 n_base
: nullable AModule,
7367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7369 if _n_base
== old_child
then
7370 if new_child
== null then
7372 new_child
.parent
= self
7373 assert new_child
isa AModule
7376 old_child
.parent
= null
7381 redef fun visit_all
(v
: Visitor)
7383 if _n_base
!= null then
7384 v
.enter_visit
(_n_base
.as(not null))
7386 v
.enter_visit
(_n_eof
)