1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
10 private init empty_init
do end
13 n_moduledecl
: nullable AModuledecl,
14 n_imports
: Collection[Object], # Should be Collection[AImport]
15 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
16 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
20 _n_moduledecl
= n_moduledecl
21 if n_moduledecl
!= null then
22 n_moduledecl
.parent
= self
29 for n
in n_extern_code_blocks
do
30 assert n
isa AExternCodeBlock
31 _n_extern_code_blocks
.add
(n
)
34 for n
in n_classdefs
do
35 assert n
isa AClassdef
41 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
43 if _n_moduledecl
== old_child
then
44 if new_child
!= null then
45 new_child
.parent
= self
46 assert new_child
isa AModuledecl
47 _n_moduledecl
= new_child
53 for i
in [0.._n_imports
.length
[ do
54 if _n_imports
[i
] == old_child
then
55 if new_child
!= null then
56 assert new_child
isa AImport
57 _n_imports
[i
] = new_child
58 new_child
.parent
= self
60 _n_imports
.remove_at
(i
)
65 for i
in [0.._n_extern_code_blocks
.length
[ do
66 if _n_extern_code_blocks
[i
] == old_child
then
67 if new_child
!= null then
68 assert new_child
isa AExternCodeBlock
69 _n_extern_code_blocks
[i
] = new_child
70 new_child
.parent
= self
72 _n_extern_code_blocks
.remove_at
(i
)
77 for i
in [0.._n_classdefs
.length
[ do
78 if _n_classdefs
[i
] == old_child
then
79 if new_child
!= null then
80 assert new_child
isa AClassdef
81 _n_classdefs
[i
] = new_child
82 new_child
.parent
= self
84 _n_classdefs
.remove_at
(i
)
91 redef fun visit_all
(v
: Visitor)
93 if _n_moduledecl
!= null then
94 v
.enter_visit
(_n_moduledecl
.as(not null))
96 for n
in _n_imports
do
99 for n
in _n_extern_code_blocks
do
102 for n
in _n_classdefs
do
107 redef class AModuledecl
108 private init empty_init
do end
110 init init_amoduledecl
(
111 n_doc
: nullable ADoc,
112 n_kwmodule
: nullable TKwmodule,
113 n_name
: nullable AModuleName,
114 n_annotations
: nullable AAnnotations
119 if n_doc
!= null then
122 _n_kwmodule
= n_kwmodule
.as(not null)
123 n_kwmodule
.parent
= self
124 _n_name
= n_name
.as(not null)
126 _n_annotations
= n_annotations
127 if n_annotations
!= null then
128 n_annotations
.parent
= self
132 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
134 if _n_doc
== old_child
then
135 if new_child
!= null then
136 new_child
.parent
= self
137 assert new_child
isa ADoc
144 if _n_kwmodule
== old_child
then
145 if new_child
!= null then
146 new_child
.parent
= self
147 assert new_child
isa TKwmodule
148 _n_kwmodule
= new_child
154 if _n_name
== old_child
then
155 if new_child
!= null then
156 new_child
.parent
= self
157 assert new_child
isa AModuleName
164 if _n_annotations
== old_child
then
165 if new_child
!= null then
166 new_child
.parent
= self
167 assert new_child
isa AAnnotations
168 _n_annotations
= new_child
170 _n_annotations
= null
176 redef fun visit_all
(v
: Visitor)
178 if _n_doc
!= null then
179 v
.enter_visit
(_n_doc
.as(not null))
181 v
.enter_visit
(_n_kwmodule
)
182 v
.enter_visit
(_n_name
)
183 if _n_annotations
!= null then
184 v
.enter_visit
(_n_annotations
.as(not null))
188 redef class AStdImport
189 private init empty_init
do end
191 init init_astdimport
(
192 n_visibility
: nullable AVisibility,
193 n_kwimport
: nullable TKwimport,
194 n_name
: nullable AModuleName,
195 n_annotations
: nullable AAnnotations
199 _n_visibility
= n_visibility
.as(not null)
200 n_visibility
.parent
= self
201 _n_kwimport
= n_kwimport
.as(not null)
202 n_kwimport
.parent
= self
203 _n_name
= n_name
.as(not null)
205 _n_annotations
= n_annotations
206 if n_annotations
!= null then
207 n_annotations
.parent
= self
211 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
213 if _n_visibility
== old_child
then
214 if new_child
!= null then
215 new_child
.parent
= self
216 assert new_child
isa AVisibility
217 _n_visibility
= new_child
223 if _n_kwimport
== old_child
then
224 if new_child
!= null then
225 new_child
.parent
= self
226 assert new_child
isa TKwimport
227 _n_kwimport
= new_child
233 if _n_name
== old_child
then
234 if new_child
!= null then
235 new_child
.parent
= self
236 assert new_child
isa AModuleName
243 if _n_annotations
== old_child
then
244 if new_child
!= null then
245 new_child
.parent
= self
246 assert new_child
isa AAnnotations
247 _n_annotations
= new_child
249 _n_annotations
= null
255 redef fun visit_all
(v
: Visitor)
257 v
.enter_visit
(_n_visibility
)
258 v
.enter_visit
(_n_kwimport
)
259 v
.enter_visit
(_n_name
)
260 if _n_annotations
!= null then
261 v
.enter_visit
(_n_annotations
.as(not null))
265 redef class ANoImport
266 private init empty_init
do end
268 init init_anoimport
(
269 n_visibility
: nullable AVisibility,
270 n_kwimport
: nullable TKwimport,
271 n_kwend
: nullable TKwend
275 _n_visibility
= n_visibility
.as(not null)
276 n_visibility
.parent
= self
277 _n_kwimport
= n_kwimport
.as(not null)
278 n_kwimport
.parent
= self
279 _n_kwend
= n_kwend
.as(not null)
280 n_kwend
.parent
= self
283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
285 if _n_visibility
== old_child
then
286 if new_child
!= null then
287 new_child
.parent
= self
288 assert new_child
isa AVisibility
289 _n_visibility
= new_child
295 if _n_kwimport
== old_child
then
296 if new_child
!= null then
297 new_child
.parent
= self
298 assert new_child
isa TKwimport
299 _n_kwimport
= new_child
305 if _n_kwend
== old_child
then
306 if new_child
!= null then
307 new_child
.parent
= self
308 assert new_child
isa TKwend
317 redef fun visit_all
(v
: Visitor)
319 v
.enter_visit
(_n_visibility
)
320 v
.enter_visit
(_n_kwimport
)
321 v
.enter_visit
(_n_kwend
)
324 redef class APublicVisibility
325 private init empty_init
do end
327 init init_apublicvisibility
332 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
336 redef fun visit_all
(v
: Visitor)
340 redef class APrivateVisibility
341 private init empty_init
do end
343 init init_aprivatevisibility
(
344 n_kwprivate
: nullable TKwprivate
348 _n_kwprivate
= n_kwprivate
.as(not null)
349 n_kwprivate
.parent
= self
352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
354 if _n_kwprivate
== old_child
then
355 if new_child
!= null then
356 new_child
.parent
= self
357 assert new_child
isa TKwprivate
358 _n_kwprivate
= new_child
366 redef fun visit_all
(v
: Visitor)
368 v
.enter_visit
(_n_kwprivate
)
371 redef class AProtectedVisibility
372 private init empty_init
do end
374 init init_aprotectedvisibility
(
375 n_kwprotected
: nullable TKwprotected
379 _n_kwprotected
= n_kwprotected
.as(not null)
380 n_kwprotected
.parent
= self
383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
385 if _n_kwprotected
== old_child
then
386 if new_child
!= null then
387 new_child
.parent
= self
388 assert new_child
isa TKwprotected
389 _n_kwprotected
= new_child
397 redef fun visit_all
(v
: Visitor)
399 v
.enter_visit
(_n_kwprotected
)
402 redef class AIntrudeVisibility
403 private init empty_init
do end
405 init init_aintrudevisibility
(
406 n_kwintrude
: nullable TKwintrude
410 _n_kwintrude
= n_kwintrude
.as(not null)
411 n_kwintrude
.parent
= self
414 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
416 if _n_kwintrude
== old_child
then
417 if new_child
!= null then
418 new_child
.parent
= self
419 assert new_child
isa TKwintrude
420 _n_kwintrude
= new_child
428 redef fun visit_all
(v
: Visitor)
430 v
.enter_visit
(_n_kwintrude
)
433 redef class AStdClassdef
434 private init empty_init
do end
436 init init_astdclassdef
(
437 n_doc
: nullable ADoc,
438 n_kwredef
: nullable TKwredef,
439 n_visibility
: nullable AVisibility,
440 n_classkind
: nullable AClasskind,
441 n_id
: nullable TClassid,
442 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
443 n_annotations
: nullable AAnnotations,
444 n_extern_code_block
: nullable AExternCodeBlock,
445 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
446 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
447 n_kwend
: nullable TKwend
452 if n_doc
!= null then
455 _n_kwredef
= n_kwredef
456 if n_kwredef
!= null then
457 n_kwredef
.parent
= self
459 _n_visibility
= n_visibility
.as(not null)
460 n_visibility
.parent
= self
461 _n_classkind
= n_classkind
.as(not null)
462 n_classkind
.parent
= self
467 for n
in n_formaldefs
do
468 assert n
isa AFormaldef
472 _n_annotations
= n_annotations
473 if n_annotations
!= null then
474 n_annotations
.parent
= self
476 _n_extern_code_block
= n_extern_code_block
477 if n_extern_code_block
!= null then
478 n_extern_code_block
.parent
= self
480 for n
in n_superclasses
do
481 assert n
isa ASuperclass
482 _n_superclasses
.add
(n
)
485 for n
in n_propdefs
do
486 assert n
isa APropdef
490 _n_kwend
= n_kwend
.as(not null)
491 n_kwend
.parent
= self
494 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
496 if _n_doc
== old_child
then
497 if new_child
!= null then
498 new_child
.parent
= self
499 assert new_child
isa ADoc
506 if _n_kwredef
== old_child
then
507 if new_child
!= null then
508 new_child
.parent
= self
509 assert new_child
isa TKwredef
510 _n_kwredef
= new_child
516 if _n_visibility
== old_child
then
517 if new_child
!= null then
518 new_child
.parent
= self
519 assert new_child
isa AVisibility
520 _n_visibility
= new_child
526 if _n_classkind
== old_child
then
527 if new_child
!= null then
528 new_child
.parent
= self
529 assert new_child
isa AClasskind
530 _n_classkind
= new_child
536 if _n_id
== old_child
then
537 if new_child
!= null then
538 new_child
.parent
= self
539 assert new_child
isa TClassid
546 for i
in [0.._n_formaldefs
.length
[ do
547 if _n_formaldefs
[i
] == old_child
then
548 if new_child
!= null then
549 assert new_child
isa AFormaldef
550 _n_formaldefs
[i
] = new_child
551 new_child
.parent
= self
553 _n_formaldefs
.remove_at
(i
)
558 if _n_annotations
== old_child
then
559 if new_child
!= null then
560 new_child
.parent
= self
561 assert new_child
isa AAnnotations
562 _n_annotations
= new_child
564 _n_annotations
= null
568 if _n_extern_code_block
== old_child
then
569 if new_child
!= null then
570 new_child
.parent
= self
571 assert new_child
isa AExternCodeBlock
572 _n_extern_code_block
= new_child
574 _n_extern_code_block
= null
578 for i
in [0.._n_superclasses
.length
[ do
579 if _n_superclasses
[i
] == old_child
then
580 if new_child
!= null then
581 assert new_child
isa ASuperclass
582 _n_superclasses
[i
] = new_child
583 new_child
.parent
= self
585 _n_superclasses
.remove_at
(i
)
590 for i
in [0.._n_propdefs
.length
[ do
591 if _n_propdefs
[i
] == old_child
then
592 if new_child
!= null then
593 assert new_child
isa APropdef
594 _n_propdefs
[i
] = new_child
595 new_child
.parent
= self
597 _n_propdefs
.remove_at
(i
)
602 if _n_kwend
== old_child
then
603 if new_child
!= null then
604 new_child
.parent
= self
605 assert new_child
isa TKwend
614 redef fun visit_all
(v
: Visitor)
616 if _n_doc
!= null then
617 v
.enter_visit
(_n_doc
.as(not null))
619 if _n_kwredef
!= null then
620 v
.enter_visit
(_n_kwredef
.as(not null))
622 v
.enter_visit
(_n_visibility
)
623 v
.enter_visit
(_n_classkind
)
624 if _n_id
!= null then
625 v
.enter_visit
(_n_id
.as(not null))
627 for n
in _n_formaldefs
do
630 if _n_annotations
!= null then
631 v
.enter_visit
(_n_annotations
.as(not null))
633 if _n_extern_code_block
!= null then
634 v
.enter_visit
(_n_extern_code_block
.as(not null))
636 for n
in _n_superclasses
do
639 for n
in _n_propdefs
do
642 v
.enter_visit
(_n_kwend
)
645 redef class ATopClassdef
646 private init empty_init
do end
648 init init_atopclassdef
(
649 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
653 for n
in n_propdefs
do
654 assert n
isa APropdef
660 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
662 for i
in [0.._n_propdefs
.length
[ do
663 if _n_propdefs
[i
] == old_child
then
664 if new_child
!= null then
665 assert new_child
isa APropdef
666 _n_propdefs
[i
] = new_child
667 new_child
.parent
= self
669 _n_propdefs
.remove_at
(i
)
676 redef fun visit_all
(v
: Visitor)
678 for n
in _n_propdefs
do
683 redef class AMainClassdef
684 private init empty_init
do end
686 init init_amainclassdef
(
687 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
691 for n
in n_propdefs
do
692 assert n
isa APropdef
698 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
700 for i
in [0.._n_propdefs
.length
[ do
701 if _n_propdefs
[i
] == old_child
then
702 if new_child
!= null then
703 assert new_child
isa APropdef
704 _n_propdefs
[i
] = new_child
705 new_child
.parent
= self
707 _n_propdefs
.remove_at
(i
)
714 redef fun visit_all
(v
: Visitor)
716 for n
in _n_propdefs
do
721 redef class AConcreteClasskind
722 private init empty_init
do end
724 init init_aconcreteclasskind
(
725 n_kwclass
: nullable TKwclass
729 _n_kwclass
= n_kwclass
.as(not null)
730 n_kwclass
.parent
= self
733 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
735 if _n_kwclass
== old_child
then
736 if new_child
!= null then
737 new_child
.parent
= self
738 assert new_child
isa TKwclass
739 _n_kwclass
= new_child
747 redef fun visit_all
(v
: Visitor)
749 v
.enter_visit
(_n_kwclass
)
752 redef class AAbstractClasskind
753 private init empty_init
do end
755 init init_aabstractclasskind
(
756 n_kwabstract
: nullable TKwabstract,
757 n_kwclass
: nullable TKwclass
761 _n_kwabstract
= n_kwabstract
.as(not null)
762 n_kwabstract
.parent
= self
763 _n_kwclass
= n_kwclass
.as(not null)
764 n_kwclass
.parent
= self
767 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
769 if _n_kwabstract
== old_child
then
770 if new_child
!= null then
771 new_child
.parent
= self
772 assert new_child
isa TKwabstract
773 _n_kwabstract
= new_child
779 if _n_kwclass
== old_child
then
780 if new_child
!= null then
781 new_child
.parent
= self
782 assert new_child
isa TKwclass
783 _n_kwclass
= new_child
791 redef fun visit_all
(v
: Visitor)
793 v
.enter_visit
(_n_kwabstract
)
794 v
.enter_visit
(_n_kwclass
)
797 redef class AInterfaceClasskind
798 private init empty_init
do end
800 init init_ainterfaceclasskind
(
801 n_kwinterface
: nullable TKwinterface
805 _n_kwinterface
= n_kwinterface
.as(not null)
806 n_kwinterface
.parent
= self
809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
811 if _n_kwinterface
== old_child
then
812 if new_child
!= null then
813 new_child
.parent
= self
814 assert new_child
isa TKwinterface
815 _n_kwinterface
= new_child
823 redef fun visit_all
(v
: Visitor)
825 v
.enter_visit
(_n_kwinterface
)
828 redef class AEnumClasskind
829 private init empty_init
do end
831 init init_aenumclasskind
(
832 n_kwenum
: nullable TKwenum
836 _n_kwenum
= n_kwenum
.as(not null)
837 n_kwenum
.parent
= self
840 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
842 if _n_kwenum
== old_child
then
843 if new_child
!= null then
844 new_child
.parent
= self
845 assert new_child
isa TKwenum
846 _n_kwenum
= new_child
854 redef fun visit_all
(v
: Visitor)
856 v
.enter_visit
(_n_kwenum
)
859 redef class AExternClasskind
860 private init empty_init
do end
862 init init_aexternclasskind
(
863 n_kwextern
: nullable TKwextern,
864 n_kwclass
: nullable TKwclass
868 _n_kwextern
= n_kwextern
.as(not null)
869 n_kwextern
.parent
= self
870 _n_kwclass
= n_kwclass
871 if n_kwclass
!= null then
872 n_kwclass
.parent
= self
876 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
878 if _n_kwextern
== old_child
then
879 if new_child
!= null then
880 new_child
.parent
= self
881 assert new_child
isa TKwextern
882 _n_kwextern
= new_child
888 if _n_kwclass
== old_child
then
889 if new_child
!= null then
890 new_child
.parent
= self
891 assert new_child
isa TKwclass
892 _n_kwclass
= new_child
900 redef fun visit_all
(v
: Visitor)
902 v
.enter_visit
(_n_kwextern
)
903 if _n_kwclass
!= null then
904 v
.enter_visit
(_n_kwclass
.as(not null))
908 redef class AFormaldef
909 private init empty_init
do end
911 init init_aformaldef
(
912 n_id
: nullable TClassid,
913 n_type
: nullable AType,
914 n_annotations
: nullable AAnnotations
918 _n_id
= n_id
.as(not null)
921 if n_type
!= null then
924 _n_annotations
= n_annotations
925 if n_annotations
!= null then
926 n_annotations
.parent
= self
930 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
932 if _n_id
== old_child
then
933 if new_child
!= null then
934 new_child
.parent
= self
935 assert new_child
isa TClassid
942 if _n_type
== old_child
then
943 if new_child
!= null then
944 new_child
.parent
= self
945 assert new_child
isa AType
952 if _n_annotations
== old_child
then
953 if new_child
!= null then
954 new_child
.parent
= self
955 assert new_child
isa AAnnotations
956 _n_annotations
= new_child
958 _n_annotations
= null
964 redef fun visit_all
(v
: Visitor)
967 if _n_type
!= null then
968 v
.enter_visit
(_n_type
.as(not null))
970 if _n_annotations
!= null then
971 v
.enter_visit
(_n_annotations
.as(not null))
975 redef class ASuperclass
976 private init empty_init
do end
978 init init_asuperclass
(
979 n_kwsuper
: nullable TKwsuper,
980 n_type
: nullable AType,
981 n_annotations
: nullable AAnnotations
985 _n_kwsuper
= n_kwsuper
.as(not null)
986 n_kwsuper
.parent
= self
987 _n_type
= n_type
.as(not null)
989 _n_annotations
= n_annotations
990 if n_annotations
!= null then
991 n_annotations
.parent
= self
995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
997 if _n_kwsuper
== old_child
then
998 if new_child
!= null then
999 new_child
.parent
= self
1000 assert new_child
isa TKwsuper
1001 _n_kwsuper
= new_child
1007 if _n_type
== old_child
then
1008 if new_child
!= null then
1009 new_child
.parent
= self
1010 assert new_child
isa AType
1017 if _n_annotations
== old_child
then
1018 if new_child
!= null then
1019 new_child
.parent
= self
1020 assert new_child
isa AAnnotations
1021 _n_annotations
= new_child
1023 _n_annotations
= null
1029 redef fun visit_all
(v
: Visitor)
1031 v
.enter_visit
(_n_kwsuper
)
1032 v
.enter_visit
(_n_type
)
1033 if _n_annotations
!= null then
1034 v
.enter_visit
(_n_annotations
.as(not null))
1038 redef class AAttrPropdef
1039 private init empty_init
do end
1041 init init_aattrpropdef
(
1042 n_doc
: nullable ADoc,
1043 n_readable
: nullable AAble,
1044 n_writable
: nullable AAble,
1045 n_kwredef
: nullable TKwredef,
1046 n_visibility
: nullable AVisibility,
1047 n_kwvar
: nullable TKwvar,
1048 n_id
: nullable TAttrid,
1049 n_id2
: nullable TId,
1050 n_type
: nullable AType,
1051 n_annotations
: nullable AAnnotations,
1052 n_expr
: nullable AExpr
1057 if n_doc
!= null then
1060 _n_readable
= n_readable
1061 if n_readable
!= null then
1062 n_readable
.parent
= self
1064 _n_writable
= n_writable
1065 if n_writable
!= null then
1066 n_writable
.parent
= self
1068 _n_kwredef
= n_kwredef
1069 if n_kwredef
!= null then
1070 n_kwredef
.parent
= self
1072 _n_visibility
= n_visibility
.as(not null)
1073 n_visibility
.parent
= self
1074 _n_kwvar
= n_kwvar
.as(not null)
1075 n_kwvar
.parent
= self
1077 if n_id
!= null then
1081 if n_id2
!= null then
1085 if n_type
!= null then
1086 n_type
.parent
= self
1088 _n_annotations
= n_annotations
1089 if n_annotations
!= null then
1090 n_annotations
.parent
= self
1093 if n_expr
!= null then
1094 n_expr
.parent
= self
1098 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1100 if _n_doc
== old_child
then
1101 if new_child
!= null then
1102 new_child
.parent
= self
1103 assert new_child
isa ADoc
1110 if _n_readable
== old_child
then
1111 if new_child
!= null then
1112 new_child
.parent
= self
1113 assert new_child
isa AAble
1114 _n_readable
= new_child
1120 if _n_writable
== old_child
then
1121 if new_child
!= null then
1122 new_child
.parent
= self
1123 assert new_child
isa AAble
1124 _n_writable
= new_child
1130 if _n_kwredef
== old_child
then
1131 if new_child
!= null then
1132 new_child
.parent
= self
1133 assert new_child
isa TKwredef
1134 _n_kwredef
= new_child
1140 if _n_visibility
== old_child
then
1141 if new_child
!= null then
1142 new_child
.parent
= self
1143 assert new_child
isa AVisibility
1144 _n_visibility
= new_child
1150 if _n_kwvar
== old_child
then
1151 if new_child
!= null then
1152 new_child
.parent
= self
1153 assert new_child
isa TKwvar
1154 _n_kwvar
= new_child
1160 if _n_id
== old_child
then
1161 if new_child
!= null then
1162 new_child
.parent
= self
1163 assert new_child
isa TAttrid
1170 if _n_id2
== old_child
then
1171 if new_child
!= null then
1172 new_child
.parent
= self
1173 assert new_child
isa TId
1180 if _n_type
== old_child
then
1181 if new_child
!= null then
1182 new_child
.parent
= self
1183 assert new_child
isa AType
1190 if _n_annotations
== old_child
then
1191 if new_child
!= null then
1192 new_child
.parent
= self
1193 assert new_child
isa AAnnotations
1194 _n_annotations
= new_child
1196 _n_annotations
= null
1200 if _n_expr
== old_child
then
1201 if new_child
!= null then
1202 new_child
.parent
= self
1203 assert new_child
isa AExpr
1212 redef fun visit_all
(v
: Visitor)
1214 if _n_doc
!= null then
1215 v
.enter_visit
(_n_doc
.as(not null))
1217 if _n_readable
!= null then
1218 v
.enter_visit
(_n_readable
.as(not null))
1220 if _n_writable
!= null then
1221 v
.enter_visit
(_n_writable
.as(not null))
1223 if _n_kwredef
!= null then
1224 v
.enter_visit
(_n_kwredef
.as(not null))
1226 v
.enter_visit
(_n_visibility
)
1227 v
.enter_visit
(_n_kwvar
)
1228 if _n_id
!= null then
1229 v
.enter_visit
(_n_id
.as(not null))
1231 if _n_id2
!= null then
1232 v
.enter_visit
(_n_id2
.as(not null))
1234 if _n_type
!= null then
1235 v
.enter_visit
(_n_type
.as(not null))
1237 if _n_annotations
!= null then
1238 v
.enter_visit
(_n_annotations
.as(not null))
1240 if _n_expr
!= null then
1241 v
.enter_visit
(_n_expr
.as(not null))
1245 redef class AMethPropdef
1246 private init empty_init
do end
1248 init init_amethpropdef
(
1249 n_doc
: nullable ADoc,
1250 n_kwredef
: nullable TKwredef,
1251 n_visibility
: nullable AVisibility,
1252 n_methid
: nullable AMethid,
1253 n_signature
: nullable ASignature
1258 if n_doc
!= null then
1261 _n_kwredef
= n_kwredef
1262 if n_kwredef
!= null then
1263 n_kwredef
.parent
= self
1265 _n_visibility
= n_visibility
.as(not null)
1266 n_visibility
.parent
= self
1267 _n_methid
= n_methid
.as(not null)
1268 n_methid
.parent
= self
1269 _n_signature
= n_signature
.as(not null)
1270 n_signature
.parent
= self
1273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1275 if _n_doc
== old_child
then
1276 if new_child
!= null then
1277 new_child
.parent
= self
1278 assert new_child
isa ADoc
1285 if _n_kwredef
== old_child
then
1286 if new_child
!= null then
1287 new_child
.parent
= self
1288 assert new_child
isa TKwredef
1289 _n_kwredef
= new_child
1295 if _n_visibility
== old_child
then
1296 if new_child
!= null then
1297 new_child
.parent
= self
1298 assert new_child
isa AVisibility
1299 _n_visibility
= new_child
1305 if _n_methid
== old_child
then
1306 if new_child
!= null then
1307 new_child
.parent
= self
1308 assert new_child
isa AMethid
1309 _n_methid
= new_child
1315 if _n_signature
== old_child
then
1316 if new_child
!= null then
1317 new_child
.parent
= self
1318 assert new_child
isa ASignature
1319 _n_signature
= new_child
1327 redef fun visit_all
(v
: Visitor)
1329 if _n_doc
!= null then
1330 v
.enter_visit
(_n_doc
.as(not null))
1332 if _n_kwredef
!= null then
1333 v
.enter_visit
(_n_kwredef
.as(not null))
1335 v
.enter_visit
(_n_visibility
)
1336 v
.enter_visit
(_n_methid
)
1337 v
.enter_visit
(_n_signature
)
1340 redef class ADeferredMethPropdef
1341 private init empty_init
do end
1343 init init_adeferredmethpropdef
(
1344 n_doc
: nullable ADoc,
1345 n_kwredef
: nullable TKwredef,
1346 n_visibility
: nullable AVisibility,
1347 n_kwmeth
: nullable TKwmeth,
1348 n_methid
: nullable AMethid,
1349 n_signature
: nullable ASignature,
1350 n_annotations
: nullable AAnnotations
1355 if n_doc
!= null then
1358 _n_kwredef
= n_kwredef
1359 if n_kwredef
!= null then
1360 n_kwredef
.parent
= self
1362 _n_visibility
= n_visibility
.as(not null)
1363 n_visibility
.parent
= self
1364 _n_kwmeth
= n_kwmeth
.as(not null)
1365 n_kwmeth
.parent
= self
1366 _n_methid
= n_methid
.as(not null)
1367 n_methid
.parent
= self
1368 _n_signature
= n_signature
.as(not null)
1369 n_signature
.parent
= self
1370 _n_annotations
= n_annotations
1371 if n_annotations
!= null then
1372 n_annotations
.parent
= self
1376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1378 if _n_doc
== old_child
then
1379 if new_child
!= null then
1380 new_child
.parent
= self
1381 assert new_child
isa ADoc
1388 if _n_kwredef
== old_child
then
1389 if new_child
!= null then
1390 new_child
.parent
= self
1391 assert new_child
isa TKwredef
1392 _n_kwredef
= new_child
1398 if _n_visibility
== old_child
then
1399 if new_child
!= null then
1400 new_child
.parent
= self
1401 assert new_child
isa AVisibility
1402 _n_visibility
= new_child
1408 if _n_kwmeth
== old_child
then
1409 if new_child
!= null then
1410 new_child
.parent
= self
1411 assert new_child
isa TKwmeth
1412 _n_kwmeth
= new_child
1418 if _n_methid
== old_child
then
1419 if new_child
!= null then
1420 new_child
.parent
= self
1421 assert new_child
isa AMethid
1422 _n_methid
= new_child
1428 if _n_signature
== old_child
then
1429 if new_child
!= null then
1430 new_child
.parent
= self
1431 assert new_child
isa ASignature
1432 _n_signature
= new_child
1438 if _n_annotations
== old_child
then
1439 if new_child
!= null then
1440 new_child
.parent
= self
1441 assert new_child
isa AAnnotations
1442 _n_annotations
= new_child
1444 _n_annotations
= null
1450 redef fun visit_all
(v
: Visitor)
1452 if _n_doc
!= null then
1453 v
.enter_visit
(_n_doc
.as(not null))
1455 if _n_kwredef
!= null then
1456 v
.enter_visit
(_n_kwredef
.as(not null))
1458 v
.enter_visit
(_n_visibility
)
1459 v
.enter_visit
(_n_kwmeth
)
1460 v
.enter_visit
(_n_methid
)
1461 v
.enter_visit
(_n_signature
)
1462 if _n_annotations
!= null then
1463 v
.enter_visit
(_n_annotations
.as(not null))
1467 redef class AInternMethPropdef
1468 private init empty_init
do end
1470 init init_ainternmethpropdef
(
1471 n_doc
: nullable ADoc,
1472 n_kwredef
: nullable TKwredef,
1473 n_visibility
: nullable AVisibility,
1474 n_kwmeth
: nullable TKwmeth,
1475 n_methid
: nullable AMethid,
1476 n_signature
: nullable ASignature
1481 if n_doc
!= null then
1484 _n_kwredef
= n_kwredef
1485 if n_kwredef
!= null then
1486 n_kwredef
.parent
= self
1488 _n_visibility
= n_visibility
.as(not null)
1489 n_visibility
.parent
= self
1490 _n_kwmeth
= n_kwmeth
.as(not null)
1491 n_kwmeth
.parent
= self
1492 _n_methid
= n_methid
.as(not null)
1493 n_methid
.parent
= self
1494 _n_signature
= n_signature
.as(not null)
1495 n_signature
.parent
= self
1498 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1500 if _n_doc
== old_child
then
1501 if new_child
!= null then
1502 new_child
.parent
= self
1503 assert new_child
isa ADoc
1510 if _n_kwredef
== old_child
then
1511 if new_child
!= null then
1512 new_child
.parent
= self
1513 assert new_child
isa TKwredef
1514 _n_kwredef
= new_child
1520 if _n_visibility
== old_child
then
1521 if new_child
!= null then
1522 new_child
.parent
= self
1523 assert new_child
isa AVisibility
1524 _n_visibility
= new_child
1530 if _n_kwmeth
== old_child
then
1531 if new_child
!= null then
1532 new_child
.parent
= self
1533 assert new_child
isa TKwmeth
1534 _n_kwmeth
= new_child
1540 if _n_methid
== old_child
then
1541 if new_child
!= null then
1542 new_child
.parent
= self
1543 assert new_child
isa AMethid
1544 _n_methid
= new_child
1550 if _n_signature
== old_child
then
1551 if new_child
!= null then
1552 new_child
.parent
= self
1553 assert new_child
isa ASignature
1554 _n_signature
= new_child
1562 redef fun visit_all
(v
: Visitor)
1564 if _n_doc
!= null then
1565 v
.enter_visit
(_n_doc
.as(not null))
1567 if _n_kwredef
!= null then
1568 v
.enter_visit
(_n_kwredef
.as(not null))
1570 v
.enter_visit
(_n_visibility
)
1571 v
.enter_visit
(_n_kwmeth
)
1572 v
.enter_visit
(_n_methid
)
1573 v
.enter_visit
(_n_signature
)
1576 redef class AExternMethPropdef
1577 private init empty_init
do end
1579 init init_aexternmethpropdef
(
1580 n_doc
: nullable ADoc,
1581 n_kwredef
: nullable TKwredef,
1582 n_visibility
: nullable AVisibility,
1583 n_kwmeth
: nullable TKwmeth,
1584 n_methid
: nullable AMethid,
1585 n_signature
: nullable ASignature,
1586 n_extern
: nullable TString,
1587 n_extern_calls
: nullable AExternCalls,
1588 n_extern_code_block
: nullable AExternCodeBlock
1593 if n_doc
!= null then
1596 _n_kwredef
= n_kwredef
1597 if n_kwredef
!= null then
1598 n_kwredef
.parent
= self
1600 _n_visibility
= n_visibility
.as(not null)
1601 n_visibility
.parent
= self
1602 _n_kwmeth
= n_kwmeth
.as(not null)
1603 n_kwmeth
.parent
= self
1604 _n_methid
= n_methid
.as(not null)
1605 n_methid
.parent
= self
1606 _n_signature
= n_signature
.as(not null)
1607 n_signature
.parent
= self
1608 _n_extern
= n_extern
1609 if n_extern
!= null then
1610 n_extern
.parent
= self
1612 _n_extern_calls
= n_extern_calls
1613 if n_extern_calls
!= null then
1614 n_extern_calls
.parent
= self
1616 _n_extern_code_block
= n_extern_code_block
1617 if n_extern_code_block
!= null then
1618 n_extern_code_block
.parent
= self
1622 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1624 if _n_doc
== old_child
then
1625 if new_child
!= null then
1626 new_child
.parent
= self
1627 assert new_child
isa ADoc
1634 if _n_kwredef
== old_child
then
1635 if new_child
!= null then
1636 new_child
.parent
= self
1637 assert new_child
isa TKwredef
1638 _n_kwredef
= new_child
1644 if _n_visibility
== old_child
then
1645 if new_child
!= null then
1646 new_child
.parent
= self
1647 assert new_child
isa AVisibility
1648 _n_visibility
= new_child
1654 if _n_kwmeth
== old_child
then
1655 if new_child
!= null then
1656 new_child
.parent
= self
1657 assert new_child
isa TKwmeth
1658 _n_kwmeth
= new_child
1664 if _n_methid
== old_child
then
1665 if new_child
!= null then
1666 new_child
.parent
= self
1667 assert new_child
isa AMethid
1668 _n_methid
= new_child
1674 if _n_signature
== old_child
then
1675 if new_child
!= null then
1676 new_child
.parent
= self
1677 assert new_child
isa ASignature
1678 _n_signature
= new_child
1684 if _n_extern
== old_child
then
1685 if new_child
!= null then
1686 new_child
.parent
= self
1687 assert new_child
isa TString
1688 _n_extern
= new_child
1694 if _n_extern_calls
== old_child
then
1695 if new_child
!= null then
1696 new_child
.parent
= self
1697 assert new_child
isa AExternCalls
1698 _n_extern_calls
= new_child
1700 _n_extern_calls
= null
1704 if _n_extern_code_block
== old_child
then
1705 if new_child
!= null then
1706 new_child
.parent
= self
1707 assert new_child
isa AExternCodeBlock
1708 _n_extern_code_block
= new_child
1710 _n_extern_code_block
= null
1716 redef fun visit_all
(v
: Visitor)
1718 if _n_doc
!= null then
1719 v
.enter_visit
(_n_doc
.as(not null))
1721 if _n_kwredef
!= null then
1722 v
.enter_visit
(_n_kwredef
.as(not null))
1724 v
.enter_visit
(_n_visibility
)
1725 v
.enter_visit
(_n_kwmeth
)
1726 v
.enter_visit
(_n_methid
)
1727 v
.enter_visit
(_n_signature
)
1728 if _n_extern
!= null then
1729 v
.enter_visit
(_n_extern
.as(not null))
1731 if _n_extern_calls
!= null then
1732 v
.enter_visit
(_n_extern_calls
.as(not null))
1734 if _n_extern_code_block
!= null then
1735 v
.enter_visit
(_n_extern_code_block
.as(not null))
1739 redef class AConcreteMethPropdef
1740 private init empty_init
do end
1742 init init_aconcretemethpropdef
(
1743 n_doc
: nullable ADoc,
1744 n_kwredef
: nullable TKwredef,
1745 n_visibility
: nullable AVisibility,
1746 n_kwmeth
: nullable TKwmeth,
1747 n_methid
: nullable AMethid,
1748 n_signature
: nullable ASignature,
1749 n_annotations
: nullable AAnnotations,
1750 n_block
: nullable AExpr
1755 if n_doc
!= null then
1758 _n_kwredef
= n_kwredef
1759 if n_kwredef
!= null then
1760 n_kwredef
.parent
= self
1762 _n_visibility
= n_visibility
.as(not null)
1763 n_visibility
.parent
= self
1764 _n_kwmeth
= n_kwmeth
.as(not null)
1765 n_kwmeth
.parent
= self
1766 _n_methid
= n_methid
.as(not null)
1767 n_methid
.parent
= self
1768 _n_signature
= n_signature
.as(not null)
1769 n_signature
.parent
= self
1770 _n_annotations
= n_annotations
1771 if n_annotations
!= null then
1772 n_annotations
.parent
= self
1775 if n_block
!= null then
1776 n_block
.parent
= self
1780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1782 if _n_doc
== old_child
then
1783 if new_child
!= null then
1784 new_child
.parent
= self
1785 assert new_child
isa ADoc
1792 if _n_kwredef
== old_child
then
1793 if new_child
!= null then
1794 new_child
.parent
= self
1795 assert new_child
isa TKwredef
1796 _n_kwredef
= new_child
1802 if _n_visibility
== old_child
then
1803 if new_child
!= null then
1804 new_child
.parent
= self
1805 assert new_child
isa AVisibility
1806 _n_visibility
= new_child
1812 if _n_kwmeth
== old_child
then
1813 if new_child
!= null then
1814 new_child
.parent
= self
1815 assert new_child
isa TKwmeth
1816 _n_kwmeth
= new_child
1822 if _n_methid
== old_child
then
1823 if new_child
!= null then
1824 new_child
.parent
= self
1825 assert new_child
isa AMethid
1826 _n_methid
= new_child
1832 if _n_signature
== old_child
then
1833 if new_child
!= null then
1834 new_child
.parent
= self
1835 assert new_child
isa ASignature
1836 _n_signature
= new_child
1842 if _n_annotations
== old_child
then
1843 if new_child
!= null then
1844 new_child
.parent
= self
1845 assert new_child
isa AAnnotations
1846 _n_annotations
= new_child
1848 _n_annotations
= null
1852 if _n_block
== old_child
then
1853 if new_child
!= null then
1854 new_child
.parent
= self
1855 assert new_child
isa AExpr
1856 _n_block
= new_child
1864 redef fun visit_all
(v
: Visitor)
1866 if _n_doc
!= null then
1867 v
.enter_visit
(_n_doc
.as(not null))
1869 if _n_kwredef
!= null then
1870 v
.enter_visit
(_n_kwredef
.as(not null))
1872 v
.enter_visit
(_n_visibility
)
1873 v
.enter_visit
(_n_kwmeth
)
1874 v
.enter_visit
(_n_methid
)
1875 v
.enter_visit
(_n_signature
)
1876 if _n_annotations
!= null then
1877 v
.enter_visit
(_n_annotations
.as(not null))
1879 if _n_block
!= null then
1880 v
.enter_visit
(_n_block
.as(not null))
1884 redef class AConcreteInitPropdef
1885 private init empty_init
do end
1887 init init_aconcreteinitpropdef
(
1888 n_doc
: nullable ADoc,
1889 n_kwredef
: nullable TKwredef,
1890 n_visibility
: nullable AVisibility,
1891 n_kwinit
: nullable TKwinit,
1892 n_methid
: nullable AMethid,
1893 n_signature
: nullable ASignature,
1894 n_annotations
: nullable AAnnotations,
1895 n_block
: nullable AExpr
1900 if n_doc
!= null then
1903 _n_kwredef
= n_kwredef
1904 if n_kwredef
!= null then
1905 n_kwredef
.parent
= self
1907 _n_visibility
= n_visibility
.as(not null)
1908 n_visibility
.parent
= self
1909 _n_kwinit
= n_kwinit
.as(not null)
1910 n_kwinit
.parent
= self
1911 _n_methid
= n_methid
1912 if n_methid
!= null then
1913 n_methid
.parent
= self
1915 _n_signature
= n_signature
.as(not null)
1916 n_signature
.parent
= self
1917 _n_annotations
= n_annotations
1918 if n_annotations
!= null then
1919 n_annotations
.parent
= self
1922 if n_block
!= null then
1923 n_block
.parent
= self
1927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1929 if _n_doc
== old_child
then
1930 if new_child
!= null then
1931 new_child
.parent
= self
1932 assert new_child
isa ADoc
1939 if _n_kwredef
== old_child
then
1940 if new_child
!= null then
1941 new_child
.parent
= self
1942 assert new_child
isa TKwredef
1943 _n_kwredef
= new_child
1949 if _n_visibility
== old_child
then
1950 if new_child
!= null then
1951 new_child
.parent
= self
1952 assert new_child
isa AVisibility
1953 _n_visibility
= new_child
1959 if _n_kwinit
== old_child
then
1960 if new_child
!= null then
1961 new_child
.parent
= self
1962 assert new_child
isa TKwinit
1963 _n_kwinit
= new_child
1969 if _n_methid
== old_child
then
1970 if new_child
!= null then
1971 new_child
.parent
= self
1972 assert new_child
isa AMethid
1973 _n_methid
= new_child
1979 if _n_signature
== old_child
then
1980 if new_child
!= null then
1981 new_child
.parent
= self
1982 assert new_child
isa ASignature
1983 _n_signature
= new_child
1989 if _n_annotations
== old_child
then
1990 if new_child
!= null then
1991 new_child
.parent
= self
1992 assert new_child
isa AAnnotations
1993 _n_annotations
= new_child
1995 _n_annotations
= null
1999 if _n_block
== old_child
then
2000 if new_child
!= null then
2001 new_child
.parent
= self
2002 assert new_child
isa AExpr
2003 _n_block
= new_child
2011 redef fun visit_all
(v
: Visitor)
2013 if _n_doc
!= null then
2014 v
.enter_visit
(_n_doc
.as(not null))
2016 if _n_kwredef
!= null then
2017 v
.enter_visit
(_n_kwredef
.as(not null))
2019 v
.enter_visit
(_n_visibility
)
2020 v
.enter_visit
(_n_kwinit
)
2021 if _n_methid
!= null then
2022 v
.enter_visit
(_n_methid
.as(not null))
2024 v
.enter_visit
(_n_signature
)
2025 if _n_annotations
!= null then
2026 v
.enter_visit
(_n_annotations
.as(not null))
2028 if _n_block
!= null then
2029 v
.enter_visit
(_n_block
.as(not null))
2033 redef class AExternInitPropdef
2034 private init empty_init
do end
2036 init init_aexterninitpropdef
(
2037 n_doc
: nullable ADoc,
2038 n_kwredef
: nullable TKwredef,
2039 n_visibility
: nullable AVisibility,
2040 n_kwnew
: nullable TKwnew,
2041 n_methid
: nullable AMethid,
2042 n_signature
: nullable ASignature,
2043 n_extern
: nullable TString,
2044 n_extern_calls
: nullable AExternCalls,
2045 n_extern_code_block
: nullable AExternCodeBlock
2050 if n_doc
!= null then
2053 _n_kwredef
= n_kwredef
2054 if n_kwredef
!= null then
2055 n_kwredef
.parent
= self
2057 _n_visibility
= n_visibility
.as(not null)
2058 n_visibility
.parent
= self
2059 _n_kwnew
= n_kwnew
.as(not null)
2060 n_kwnew
.parent
= self
2061 _n_methid
= n_methid
2062 if n_methid
!= null then
2063 n_methid
.parent
= self
2065 _n_signature
= n_signature
.as(not null)
2066 n_signature
.parent
= self
2067 _n_extern
= n_extern
2068 if n_extern
!= null then
2069 n_extern
.parent
= self
2071 _n_extern_calls
= n_extern_calls
2072 if n_extern_calls
!= null then
2073 n_extern_calls
.parent
= self
2075 _n_extern_code_block
= n_extern_code_block
2076 if n_extern_code_block
!= null then
2077 n_extern_code_block
.parent
= self
2081 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2083 if _n_doc
== old_child
then
2084 if new_child
!= null then
2085 new_child
.parent
= self
2086 assert new_child
isa ADoc
2093 if _n_kwredef
== old_child
then
2094 if new_child
!= null then
2095 new_child
.parent
= self
2096 assert new_child
isa TKwredef
2097 _n_kwredef
= new_child
2103 if _n_visibility
== old_child
then
2104 if new_child
!= null then
2105 new_child
.parent
= self
2106 assert new_child
isa AVisibility
2107 _n_visibility
= new_child
2113 if _n_kwnew
== old_child
then
2114 if new_child
!= null then
2115 new_child
.parent
= self
2116 assert new_child
isa TKwnew
2117 _n_kwnew
= new_child
2123 if _n_methid
== old_child
then
2124 if new_child
!= null then
2125 new_child
.parent
= self
2126 assert new_child
isa AMethid
2127 _n_methid
= new_child
2133 if _n_signature
== old_child
then
2134 if new_child
!= null then
2135 new_child
.parent
= self
2136 assert new_child
isa ASignature
2137 _n_signature
= new_child
2143 if _n_extern
== old_child
then
2144 if new_child
!= null then
2145 new_child
.parent
= self
2146 assert new_child
isa TString
2147 _n_extern
= new_child
2153 if _n_extern_calls
== old_child
then
2154 if new_child
!= null then
2155 new_child
.parent
= self
2156 assert new_child
isa AExternCalls
2157 _n_extern_calls
= new_child
2159 _n_extern_calls
= null
2163 if _n_extern_code_block
== old_child
then
2164 if new_child
!= null then
2165 new_child
.parent
= self
2166 assert new_child
isa AExternCodeBlock
2167 _n_extern_code_block
= new_child
2169 _n_extern_code_block
= null
2175 redef fun visit_all
(v
: Visitor)
2177 if _n_doc
!= null then
2178 v
.enter_visit
(_n_doc
.as(not null))
2180 if _n_kwredef
!= null then
2181 v
.enter_visit
(_n_kwredef
.as(not null))
2183 v
.enter_visit
(_n_visibility
)
2184 v
.enter_visit
(_n_kwnew
)
2185 if _n_methid
!= null then
2186 v
.enter_visit
(_n_methid
.as(not null))
2188 v
.enter_visit
(_n_signature
)
2189 if _n_extern
!= null then
2190 v
.enter_visit
(_n_extern
.as(not null))
2192 if _n_extern_calls
!= null then
2193 v
.enter_visit
(_n_extern_calls
.as(not null))
2195 if _n_extern_code_block
!= null then
2196 v
.enter_visit
(_n_extern_code_block
.as(not null))
2200 redef class AMainMethPropdef
2201 private init empty_init
do end
2203 init init_amainmethpropdef
(
2204 n_kwredef
: nullable TKwredef,
2205 n_block
: nullable AExpr
2209 _n_kwredef
= n_kwredef
2210 if n_kwredef
!= null then
2211 n_kwredef
.parent
= self
2214 if n_block
!= null then
2215 n_block
.parent
= self
2219 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2221 if _n_kwredef
== old_child
then
2222 if new_child
!= null then
2223 new_child
.parent
= self
2224 assert new_child
isa TKwredef
2225 _n_kwredef
= new_child
2231 if _n_block
== old_child
then
2232 if new_child
!= null then
2233 new_child
.parent
= self
2234 assert new_child
isa AExpr
2235 _n_block
= new_child
2243 redef fun visit_all
(v
: Visitor)
2245 if _n_kwredef
!= null then
2246 v
.enter_visit
(_n_kwredef
.as(not null))
2248 if _n_block
!= null then
2249 v
.enter_visit
(_n_block
.as(not null))
2253 redef class ATypePropdef
2254 private init empty_init
do end
2256 init init_atypepropdef
(
2257 n_doc
: nullable ADoc,
2258 n_kwredef
: nullable TKwredef,
2259 n_visibility
: nullable AVisibility,
2260 n_kwtype
: nullable TKwtype,
2261 n_id
: nullable TClassid,
2262 n_type
: nullable AType,
2263 n_annotations
: nullable AAnnotations
2268 if n_doc
!= null then
2271 _n_kwredef
= n_kwredef
2272 if n_kwredef
!= null then
2273 n_kwredef
.parent
= self
2275 _n_visibility
= n_visibility
.as(not null)
2276 n_visibility
.parent
= self
2277 _n_kwtype
= n_kwtype
.as(not null)
2278 n_kwtype
.parent
= self
2279 _n_id
= n_id
.as(not null)
2281 _n_type
= n_type
.as(not null)
2282 n_type
.parent
= self
2283 _n_annotations
= n_annotations
2284 if n_annotations
!= null then
2285 n_annotations
.parent
= self
2289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2291 if _n_doc
== old_child
then
2292 if new_child
!= null then
2293 new_child
.parent
= self
2294 assert new_child
isa ADoc
2301 if _n_kwredef
== old_child
then
2302 if new_child
!= null then
2303 new_child
.parent
= self
2304 assert new_child
isa TKwredef
2305 _n_kwredef
= new_child
2311 if _n_visibility
== old_child
then
2312 if new_child
!= null then
2313 new_child
.parent
= self
2314 assert new_child
isa AVisibility
2315 _n_visibility
= new_child
2321 if _n_kwtype
== old_child
then
2322 if new_child
!= null then
2323 new_child
.parent
= self
2324 assert new_child
isa TKwtype
2325 _n_kwtype
= new_child
2331 if _n_id
== old_child
then
2332 if new_child
!= null then
2333 new_child
.parent
= self
2334 assert new_child
isa TClassid
2341 if _n_type
== old_child
then
2342 if new_child
!= null then
2343 new_child
.parent
= self
2344 assert new_child
isa AType
2351 if _n_annotations
== old_child
then
2352 if new_child
!= null then
2353 new_child
.parent
= self
2354 assert new_child
isa AAnnotations
2355 _n_annotations
= new_child
2357 _n_annotations
= null
2363 redef fun visit_all
(v
: Visitor)
2365 if _n_doc
!= null then
2366 v
.enter_visit
(_n_doc
.as(not null))
2368 if _n_kwredef
!= null then
2369 v
.enter_visit
(_n_kwredef
.as(not null))
2371 v
.enter_visit
(_n_visibility
)
2372 v
.enter_visit
(_n_kwtype
)
2373 v
.enter_visit
(_n_id
)
2374 v
.enter_visit
(_n_type
)
2375 if _n_annotations
!= null then
2376 v
.enter_visit
(_n_annotations
.as(not null))
2380 redef class AReadAble
2381 private init empty_init
do end
2383 init init_areadable
(
2384 n_kwredef
: nullable TKwredef,
2385 n_kwreadable
: nullable TKwreadable
2389 _n_kwredef
= n_kwredef
2390 if n_kwredef
!= null then
2391 n_kwredef
.parent
= self
2393 _n_kwreadable
= n_kwreadable
.as(not null)
2394 n_kwreadable
.parent
= self
2397 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2399 if _n_kwredef
== old_child
then
2400 if new_child
!= null then
2401 new_child
.parent
= self
2402 assert new_child
isa TKwredef
2403 _n_kwredef
= new_child
2409 if _n_kwreadable
== old_child
then
2410 if new_child
!= null then
2411 new_child
.parent
= self
2412 assert new_child
isa TKwreadable
2413 _n_kwreadable
= new_child
2421 redef fun visit_all
(v
: Visitor)
2423 if _n_kwredef
!= null then
2424 v
.enter_visit
(_n_kwredef
.as(not null))
2426 v
.enter_visit
(_n_kwreadable
)
2429 redef class AWriteAble
2430 private init empty_init
do end
2432 init init_awriteable
(
2433 n_kwredef
: nullable TKwredef,
2434 n_visibility
: nullable AVisibility,
2435 n_kwwritable
: nullable TKwwritable
2439 _n_kwredef
= n_kwredef
2440 if n_kwredef
!= null then
2441 n_kwredef
.parent
= self
2443 _n_visibility
= n_visibility
2444 if n_visibility
!= null then
2445 n_visibility
.parent
= self
2447 _n_kwwritable
= n_kwwritable
.as(not null)
2448 n_kwwritable
.parent
= self
2451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2453 if _n_kwredef
== old_child
then
2454 if new_child
!= null then
2455 new_child
.parent
= self
2456 assert new_child
isa TKwredef
2457 _n_kwredef
= new_child
2463 if _n_visibility
== old_child
then
2464 if new_child
!= null then
2465 new_child
.parent
= self
2466 assert new_child
isa AVisibility
2467 _n_visibility
= new_child
2469 _n_visibility
= null
2473 if _n_kwwritable
== old_child
then
2474 if new_child
!= null then
2475 new_child
.parent
= self
2476 assert new_child
isa TKwwritable
2477 _n_kwwritable
= new_child
2485 redef fun visit_all
(v
: Visitor)
2487 if _n_kwredef
!= null then
2488 v
.enter_visit
(_n_kwredef
.as(not null))
2490 if _n_visibility
!= null then
2491 v
.enter_visit
(_n_visibility
.as(not null))
2493 v
.enter_visit
(_n_kwwritable
)
2496 redef class AIdMethid
2497 private init empty_init
do end
2499 init init_aidmethid
(
2504 _n_id
= n_id
.as(not null)
2508 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2510 if _n_id
== old_child
then
2511 if new_child
!= null then
2512 new_child
.parent
= self
2513 assert new_child
isa TId
2522 redef fun visit_all
(v
: Visitor)
2524 v
.enter_visit
(_n_id
)
2527 redef class APlusMethid
2528 private init empty_init
do end
2530 init init_aplusmethid
(
2531 n_plus
: nullable TPlus
2535 _n_plus
= n_plus
.as(not null)
2536 n_plus
.parent
= self
2539 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2541 if _n_plus
== old_child
then
2542 if new_child
!= null then
2543 new_child
.parent
= self
2544 assert new_child
isa TPlus
2553 redef fun visit_all
(v
: Visitor)
2555 v
.enter_visit
(_n_plus
)
2558 redef class AMinusMethid
2559 private init empty_init
do end
2561 init init_aminusmethid
(
2562 n_minus
: nullable TMinus
2566 _n_minus
= n_minus
.as(not null)
2567 n_minus
.parent
= self
2570 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2572 if _n_minus
== old_child
then
2573 if new_child
!= null then
2574 new_child
.parent
= self
2575 assert new_child
isa TMinus
2576 _n_minus
= new_child
2584 redef fun visit_all
(v
: Visitor)
2586 v
.enter_visit
(_n_minus
)
2589 redef class AStarMethid
2590 private init empty_init
do end
2592 init init_astarmethid
(
2593 n_star
: nullable TStar
2597 _n_star
= n_star
.as(not null)
2598 n_star
.parent
= self
2601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2603 if _n_star
== old_child
then
2604 if new_child
!= null then
2605 new_child
.parent
= self
2606 assert new_child
isa TStar
2615 redef fun visit_all
(v
: Visitor)
2617 v
.enter_visit
(_n_star
)
2620 redef class ASlashMethid
2621 private init empty_init
do end
2623 init init_aslashmethid
(
2624 n_slash
: nullable TSlash
2628 _n_slash
= n_slash
.as(not null)
2629 n_slash
.parent
= self
2632 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2634 if _n_slash
== old_child
then
2635 if new_child
!= null then
2636 new_child
.parent
= self
2637 assert new_child
isa TSlash
2638 _n_slash
= new_child
2646 redef fun visit_all
(v
: Visitor)
2648 v
.enter_visit
(_n_slash
)
2651 redef class APercentMethid
2652 private init empty_init
do end
2654 init init_apercentmethid
(
2655 n_percent
: nullable TPercent
2659 _n_percent
= n_percent
.as(not null)
2660 n_percent
.parent
= self
2663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2665 if _n_percent
== old_child
then
2666 if new_child
!= null then
2667 new_child
.parent
= self
2668 assert new_child
isa TPercent
2669 _n_percent
= new_child
2677 redef fun visit_all
(v
: Visitor)
2679 v
.enter_visit
(_n_percent
)
2682 redef class AEqMethid
2683 private init empty_init
do end
2685 init init_aeqmethid
(
2690 _n_eq
= n_eq
.as(not null)
2694 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2696 if _n_eq
== old_child
then
2697 if new_child
!= null then
2698 new_child
.parent
= self
2699 assert new_child
isa TEq
2708 redef fun visit_all
(v
: Visitor)
2710 v
.enter_visit
(_n_eq
)
2713 redef class ANeMethid
2714 private init empty_init
do end
2716 init init_anemethid
(
2721 _n_ne
= n_ne
.as(not null)
2725 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2727 if _n_ne
== old_child
then
2728 if new_child
!= null then
2729 new_child
.parent
= self
2730 assert new_child
isa TNe
2739 redef fun visit_all
(v
: Visitor)
2741 v
.enter_visit
(_n_ne
)
2744 redef class ALeMethid
2745 private init empty_init
do end
2747 init init_alemethid
(
2752 _n_le
= n_le
.as(not null)
2756 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2758 if _n_le
== old_child
then
2759 if new_child
!= null then
2760 new_child
.parent
= self
2761 assert new_child
isa TLe
2770 redef fun visit_all
(v
: Visitor)
2772 v
.enter_visit
(_n_le
)
2775 redef class AGeMethid
2776 private init empty_init
do end
2778 init init_agemethid
(
2783 _n_ge
= n_ge
.as(not null)
2787 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2789 if _n_ge
== old_child
then
2790 if new_child
!= null then
2791 new_child
.parent
= self
2792 assert new_child
isa TGe
2801 redef fun visit_all
(v
: Visitor)
2803 v
.enter_visit
(_n_ge
)
2806 redef class ALtMethid
2807 private init empty_init
do end
2809 init init_altmethid
(
2814 _n_lt
= n_lt
.as(not null)
2818 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2820 if _n_lt
== old_child
then
2821 if new_child
!= null then
2822 new_child
.parent
= self
2823 assert new_child
isa TLt
2832 redef fun visit_all
(v
: Visitor)
2834 v
.enter_visit
(_n_lt
)
2837 redef class AGtMethid
2838 private init empty_init
do end
2840 init init_agtmethid
(
2845 _n_gt
= n_gt
.as(not null)
2849 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2851 if _n_gt
== old_child
then
2852 if new_child
!= null then
2853 new_child
.parent
= self
2854 assert new_child
isa TGt
2863 redef fun visit_all
(v
: Visitor)
2865 v
.enter_visit
(_n_gt
)
2868 redef class ALlMethid
2869 private init empty_init
do end
2871 init init_allmethid
(
2876 _n_ll
= n_ll
.as(not null)
2880 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2882 if _n_ll
== old_child
then
2883 if new_child
!= null then
2884 new_child
.parent
= self
2885 assert new_child
isa TLl
2894 redef fun visit_all
(v
: Visitor)
2896 v
.enter_visit
(_n_ll
)
2899 redef class AGgMethid
2900 private init empty_init
do end
2902 init init_aggmethid
(
2907 _n_gg
= n_gg
.as(not null)
2911 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2913 if _n_gg
== old_child
then
2914 if new_child
!= null then
2915 new_child
.parent
= self
2916 assert new_child
isa TGg
2925 redef fun visit_all
(v
: Visitor)
2927 v
.enter_visit
(_n_gg
)
2930 redef class ABraMethid
2931 private init empty_init
do end
2933 init init_abramethid
(
2934 n_obra
: nullable TObra,
2935 n_cbra
: nullable TCbra
2939 _n_obra
= n_obra
.as(not null)
2940 n_obra
.parent
= self
2941 _n_cbra
= n_cbra
.as(not null)
2942 n_cbra
.parent
= self
2945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2947 if _n_obra
== old_child
then
2948 if new_child
!= null then
2949 new_child
.parent
= self
2950 assert new_child
isa TObra
2957 if _n_cbra
== old_child
then
2958 if new_child
!= null then
2959 new_child
.parent
= self
2960 assert new_child
isa TCbra
2969 redef fun visit_all
(v
: Visitor)
2971 v
.enter_visit
(_n_obra
)
2972 v
.enter_visit
(_n_cbra
)
2975 redef class AStarshipMethid
2976 private init empty_init
do end
2978 init init_astarshipmethid
(
2979 n_starship
: nullable TStarship
2983 _n_starship
= n_starship
.as(not null)
2984 n_starship
.parent
= self
2987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2989 if _n_starship
== old_child
then
2990 if new_child
!= null then
2991 new_child
.parent
= self
2992 assert new_child
isa TStarship
2993 _n_starship
= new_child
3001 redef fun visit_all
(v
: Visitor)
3003 v
.enter_visit
(_n_starship
)
3006 redef class AAssignMethid
3007 private init empty_init
do end
3009 init init_aassignmethid
(
3011 n_assign
: nullable TAssign
3015 _n_id
= n_id
.as(not null)
3017 _n_assign
= n_assign
.as(not null)
3018 n_assign
.parent
= self
3021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3023 if _n_id
== old_child
then
3024 if new_child
!= null then
3025 new_child
.parent
= self
3026 assert new_child
isa TId
3033 if _n_assign
== old_child
then
3034 if new_child
!= null then
3035 new_child
.parent
= self
3036 assert new_child
isa TAssign
3037 _n_assign
= new_child
3045 redef fun visit_all
(v
: Visitor)
3047 v
.enter_visit
(_n_id
)
3048 v
.enter_visit
(_n_assign
)
3051 redef class ABraassignMethid
3052 private init empty_init
do end
3054 init init_abraassignmethid
(
3055 n_obra
: nullable TObra,
3056 n_cbra
: nullable TCbra,
3057 n_assign
: nullable TAssign
3061 _n_obra
= n_obra
.as(not null)
3062 n_obra
.parent
= self
3063 _n_cbra
= n_cbra
.as(not null)
3064 n_cbra
.parent
= self
3065 _n_assign
= n_assign
.as(not null)
3066 n_assign
.parent
= self
3069 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3071 if _n_obra
== old_child
then
3072 if new_child
!= null then
3073 new_child
.parent
= self
3074 assert new_child
isa TObra
3081 if _n_cbra
== old_child
then
3082 if new_child
!= null then
3083 new_child
.parent
= self
3084 assert new_child
isa TCbra
3091 if _n_assign
== old_child
then
3092 if new_child
!= null then
3093 new_child
.parent
= self
3094 assert new_child
isa TAssign
3095 _n_assign
= new_child
3103 redef fun visit_all
(v
: Visitor)
3105 v
.enter_visit
(_n_obra
)
3106 v
.enter_visit
(_n_cbra
)
3107 v
.enter_visit
(_n_assign
)
3110 redef class ASignature
3111 private init empty_init
do end
3113 init init_asignature
(
3114 n_opar
: nullable TOpar,
3115 n_params
: Collection[Object], # Should be Collection[AParam]
3116 n_cpar
: nullable TCpar,
3117 n_type
: nullable AType,
3118 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3123 if n_opar
!= null then
3124 n_opar
.parent
= self
3126 for n
in n_params
do
3132 if n_cpar
!= null then
3133 n_cpar
.parent
= self
3136 if n_type
!= null then
3137 n_type
.parent
= self
3139 for n
in n_closure_decls
do
3140 assert n
isa AClosureDecl
3141 _n_closure_decls
.add
(n
)
3146 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3148 if _n_opar
== old_child
then
3149 if new_child
!= null then
3150 new_child
.parent
= self
3151 assert new_child
isa TOpar
3158 for i
in [0.._n_params
.length
[ do
3159 if _n_params
[i
] == old_child
then
3160 if new_child
!= null then
3161 assert new_child
isa AParam
3162 _n_params
[i
] = new_child
3163 new_child
.parent
= self
3165 _n_params
.remove_at
(i
)
3170 if _n_cpar
== old_child
then
3171 if new_child
!= null then
3172 new_child
.parent
= self
3173 assert new_child
isa TCpar
3180 if _n_type
== old_child
then
3181 if new_child
!= null then
3182 new_child
.parent
= self
3183 assert new_child
isa AType
3190 for i
in [0.._n_closure_decls
.length
[ do
3191 if _n_closure_decls
[i
] == old_child
then
3192 if new_child
!= null then
3193 assert new_child
isa AClosureDecl
3194 _n_closure_decls
[i
] = new_child
3195 new_child
.parent
= self
3197 _n_closure_decls
.remove_at
(i
)
3204 redef fun visit_all
(v
: Visitor)
3206 if _n_opar
!= null then
3207 v
.enter_visit
(_n_opar
.as(not null))
3209 for n
in _n_params
do
3212 if _n_cpar
!= null then
3213 v
.enter_visit
(_n_cpar
.as(not null))
3215 if _n_type
!= null then
3216 v
.enter_visit
(_n_type
.as(not null))
3218 for n
in _n_closure_decls
do
3224 private init empty_init
do end
3228 n_type
: nullable AType,
3229 n_dotdotdot
: nullable TDotdotdot,
3230 n_annotations
: nullable AAnnotations
3234 _n_id
= n_id
.as(not null)
3237 if n_type
!= null then
3238 n_type
.parent
= self
3240 _n_dotdotdot
= n_dotdotdot
3241 if n_dotdotdot
!= null then
3242 n_dotdotdot
.parent
= self
3244 _n_annotations
= n_annotations
3245 if n_annotations
!= null then
3246 n_annotations
.parent
= self
3250 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3252 if _n_id
== old_child
then
3253 if new_child
!= null then
3254 new_child
.parent
= self
3255 assert new_child
isa TId
3262 if _n_type
== old_child
then
3263 if new_child
!= null then
3264 new_child
.parent
= self
3265 assert new_child
isa AType
3272 if _n_dotdotdot
== old_child
then
3273 if new_child
!= null then
3274 new_child
.parent
= self
3275 assert new_child
isa TDotdotdot
3276 _n_dotdotdot
= new_child
3282 if _n_annotations
== old_child
then
3283 if new_child
!= null then
3284 new_child
.parent
= self
3285 assert new_child
isa AAnnotations
3286 _n_annotations
= new_child
3288 _n_annotations
= null
3294 redef fun visit_all
(v
: Visitor)
3296 v
.enter_visit
(_n_id
)
3297 if _n_type
!= null then
3298 v
.enter_visit
(_n_type
.as(not null))
3300 if _n_dotdotdot
!= null then
3301 v
.enter_visit
(_n_dotdotdot
.as(not null))
3303 if _n_annotations
!= null then
3304 v
.enter_visit
(_n_annotations
.as(not null))
3308 redef class AClosureDecl
3309 private init empty_init
do end
3311 init init_aclosuredecl
(
3312 n_kwbreak
: nullable TKwbreak,
3313 n_bang
: nullable TBang,
3315 n_signature
: nullable ASignature,
3316 n_expr
: nullable AExpr
3320 _n_kwbreak
= n_kwbreak
3321 if n_kwbreak
!= null then
3322 n_kwbreak
.parent
= self
3324 _n_bang
= n_bang
.as(not null)
3325 n_bang
.parent
= self
3326 _n_id
= n_id
.as(not null)
3328 _n_signature
= n_signature
.as(not null)
3329 n_signature
.parent
= self
3331 if n_expr
!= null then
3332 n_expr
.parent
= self
3336 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3338 if _n_kwbreak
== old_child
then
3339 if new_child
!= null then
3340 new_child
.parent
= self
3341 assert new_child
isa TKwbreak
3342 _n_kwbreak
= new_child
3348 if _n_bang
== old_child
then
3349 if new_child
!= null then
3350 new_child
.parent
= self
3351 assert new_child
isa TBang
3358 if _n_id
== old_child
then
3359 if new_child
!= null then
3360 new_child
.parent
= self
3361 assert new_child
isa TId
3368 if _n_signature
== old_child
then
3369 if new_child
!= null then
3370 new_child
.parent
= self
3371 assert new_child
isa ASignature
3372 _n_signature
= new_child
3378 if _n_expr
== old_child
then
3379 if new_child
!= null then
3380 new_child
.parent
= self
3381 assert new_child
isa AExpr
3390 redef fun visit_all
(v
: Visitor)
3392 if _n_kwbreak
!= null then
3393 v
.enter_visit
(_n_kwbreak
.as(not null))
3395 v
.enter_visit
(_n_bang
)
3396 v
.enter_visit
(_n_id
)
3397 v
.enter_visit
(_n_signature
)
3398 if _n_expr
!= null then
3399 v
.enter_visit
(_n_expr
.as(not null))
3404 private init empty_init
do end
3407 n_kwnullable
: nullable TKwnullable,
3408 n_id
: nullable TClassid,
3409 n_types
: Collection[Object], # Should be Collection[AType]
3410 n_annotations
: nullable AAnnotations
3414 _n_kwnullable
= n_kwnullable
3415 if n_kwnullable
!= null then
3416 n_kwnullable
.parent
= self
3418 _n_id
= n_id
.as(not null)
3425 _n_annotations
= n_annotations
3426 if n_annotations
!= null then
3427 n_annotations
.parent
= self
3431 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3433 if _n_kwnullable
== old_child
then
3434 if new_child
!= null then
3435 new_child
.parent
= self
3436 assert new_child
isa TKwnullable
3437 _n_kwnullable
= new_child
3439 _n_kwnullable
= null
3443 if _n_id
== old_child
then
3444 if new_child
!= null then
3445 new_child
.parent
= self
3446 assert new_child
isa TClassid
3453 for i
in [0.._n_types
.length
[ do
3454 if _n_types
[i
] == old_child
then
3455 if new_child
!= null then
3456 assert new_child
isa AType
3457 _n_types
[i
] = new_child
3458 new_child
.parent
= self
3460 _n_types
.remove_at
(i
)
3465 if _n_annotations
== old_child
then
3466 if new_child
!= null then
3467 new_child
.parent
= self
3468 assert new_child
isa AAnnotations
3469 _n_annotations
= new_child
3471 _n_annotations
= null
3477 redef fun visit_all
(v
: Visitor)
3479 if _n_kwnullable
!= null then
3480 v
.enter_visit
(_n_kwnullable
.as(not null))
3482 v
.enter_visit
(_n_id
)
3483 for n
in _n_types
do
3486 if _n_annotations
!= null then
3487 v
.enter_visit
(_n_annotations
.as(not null))
3492 private init empty_init
do end
3495 n_kwlabel
: nullable TKwlabel,
3500 _n_kwlabel
= n_kwlabel
.as(not null)
3501 n_kwlabel
.parent
= self
3502 _n_id
= n_id
.as(not null)
3506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3508 if _n_kwlabel
== old_child
then
3509 if new_child
!= null then
3510 new_child
.parent
= self
3511 assert new_child
isa TKwlabel
3512 _n_kwlabel
= new_child
3518 if _n_id
== old_child
then
3519 if new_child
!= null then
3520 new_child
.parent
= self
3521 assert new_child
isa TId
3530 redef fun visit_all
(v
: Visitor)
3532 v
.enter_visit
(_n_kwlabel
)
3533 v
.enter_visit
(_n_id
)
3536 redef class ABlockExpr
3537 private init empty_init
do end
3539 init init_ablockexpr
(
3540 n_expr
: Collection[Object], # Should be Collection[AExpr]
3541 n_kwend
: nullable TKwend
3551 if n_kwend
!= null then
3552 n_kwend
.parent
= self
3556 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3558 for i
in [0.._n_expr
.length
[ do
3559 if _n_expr
[i
] == old_child
then
3560 if new_child
!= null then
3561 assert new_child
isa AExpr
3562 _n_expr
[i
] = new_child
3563 new_child
.parent
= self
3565 _n_expr
.remove_at
(i
)
3570 if _n_kwend
== old_child
then
3571 if new_child
!= null then
3572 new_child
.parent
= self
3573 assert new_child
isa TKwend
3574 _n_kwend
= new_child
3582 redef fun visit_all
(v
: Visitor)
3587 if _n_kwend
!= null then
3588 v
.enter_visit
(_n_kwend
.as(not null))
3592 redef class AVardeclExpr
3593 private init empty_init
do end
3595 init init_avardeclexpr
(
3596 n_kwvar
: nullable TKwvar,
3598 n_type
: nullable AType,
3599 n_assign
: nullable TAssign,
3600 n_expr
: nullable AExpr,
3601 n_annotations
: nullable AAnnotations
3605 _n_kwvar
= n_kwvar
.as(not null)
3606 n_kwvar
.parent
= self
3607 _n_id
= n_id
.as(not null)
3610 if n_type
!= null then
3611 n_type
.parent
= self
3613 _n_assign
= n_assign
3614 if n_assign
!= null then
3615 n_assign
.parent
= self
3618 if n_expr
!= null then
3619 n_expr
.parent
= self
3621 _n_annotations
= n_annotations
3622 if n_annotations
!= null then
3623 n_annotations
.parent
= self
3627 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3629 if _n_kwvar
== old_child
then
3630 if new_child
!= null then
3631 new_child
.parent
= self
3632 assert new_child
isa TKwvar
3633 _n_kwvar
= new_child
3639 if _n_id
== old_child
then
3640 if new_child
!= null then
3641 new_child
.parent
= self
3642 assert new_child
isa TId
3649 if _n_type
== old_child
then
3650 if new_child
!= null then
3651 new_child
.parent
= self
3652 assert new_child
isa AType
3659 if _n_assign
== old_child
then
3660 if new_child
!= null then
3661 new_child
.parent
= self
3662 assert new_child
isa TAssign
3663 _n_assign
= new_child
3669 if _n_expr
== old_child
then
3670 if new_child
!= null then
3671 new_child
.parent
= self
3672 assert new_child
isa AExpr
3679 if _n_annotations
== old_child
then
3680 if new_child
!= null then
3681 new_child
.parent
= self
3682 assert new_child
isa AAnnotations
3683 _n_annotations
= new_child
3685 _n_annotations
= null
3691 redef fun visit_all
(v
: Visitor)
3693 v
.enter_visit
(_n_kwvar
)
3694 v
.enter_visit
(_n_id
)
3695 if _n_type
!= null then
3696 v
.enter_visit
(_n_type
.as(not null))
3698 if _n_assign
!= null then
3699 v
.enter_visit
(_n_assign
.as(not null))
3701 if _n_expr
!= null then
3702 v
.enter_visit
(_n_expr
.as(not null))
3704 if _n_annotations
!= null then
3705 v
.enter_visit
(_n_annotations
.as(not null))
3709 redef class AReturnExpr
3710 private init empty_init
do end
3712 init init_areturnexpr
(
3713 n_kwreturn
: nullable TKwreturn,
3714 n_expr
: nullable AExpr
3718 _n_kwreturn
= n_kwreturn
3719 if n_kwreturn
!= null then
3720 n_kwreturn
.parent
= self
3723 if n_expr
!= null then
3724 n_expr
.parent
= self
3728 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3730 if _n_kwreturn
== old_child
then
3731 if new_child
!= null then
3732 new_child
.parent
= self
3733 assert new_child
isa TKwreturn
3734 _n_kwreturn
= new_child
3740 if _n_expr
== old_child
then
3741 if new_child
!= null then
3742 new_child
.parent
= self
3743 assert new_child
isa AExpr
3752 redef fun visit_all
(v
: Visitor)
3754 if _n_kwreturn
!= null then
3755 v
.enter_visit
(_n_kwreturn
.as(not null))
3757 if _n_expr
!= null then
3758 v
.enter_visit
(_n_expr
.as(not null))
3762 redef class ABreakExpr
3763 private init empty_init
do end
3765 init init_abreakexpr
(
3766 n_kwbreak
: nullable TKwbreak,
3767 n_label
: nullable ALabel,
3768 n_expr
: nullable AExpr
3772 _n_kwbreak
= n_kwbreak
.as(not null)
3773 n_kwbreak
.parent
= self
3775 if n_label
!= null then
3776 n_label
.parent
= self
3779 if n_expr
!= null then
3780 n_expr
.parent
= self
3784 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3786 if _n_kwbreak
== old_child
then
3787 if new_child
!= null then
3788 new_child
.parent
= self
3789 assert new_child
isa TKwbreak
3790 _n_kwbreak
= new_child
3796 if _n_label
== old_child
then
3797 if new_child
!= null then
3798 new_child
.parent
= self
3799 assert new_child
isa ALabel
3800 _n_label
= new_child
3806 if _n_expr
== old_child
then
3807 if new_child
!= null then
3808 new_child
.parent
= self
3809 assert new_child
isa AExpr
3818 redef fun visit_all
(v
: Visitor)
3820 v
.enter_visit
(_n_kwbreak
)
3821 if _n_label
!= null then
3822 v
.enter_visit
(_n_label
.as(not null))
3824 if _n_expr
!= null then
3825 v
.enter_visit
(_n_expr
.as(not null))
3829 redef class AAbortExpr
3830 private init empty_init
do end
3832 init init_aabortexpr
(
3833 n_kwabort
: nullable TKwabort
3837 _n_kwabort
= n_kwabort
.as(not null)
3838 n_kwabort
.parent
= self
3841 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3843 if _n_kwabort
== old_child
then
3844 if new_child
!= null then
3845 new_child
.parent
= self
3846 assert new_child
isa TKwabort
3847 _n_kwabort
= new_child
3855 redef fun visit_all
(v
: Visitor)
3857 v
.enter_visit
(_n_kwabort
)
3860 redef class AContinueExpr
3861 private init empty_init
do end
3863 init init_acontinueexpr
(
3864 n_kwcontinue
: nullable TKwcontinue,
3865 n_label
: nullable ALabel,
3866 n_expr
: nullable AExpr
3870 _n_kwcontinue
= n_kwcontinue
3871 if n_kwcontinue
!= null then
3872 n_kwcontinue
.parent
= self
3875 if n_label
!= null then
3876 n_label
.parent
= self
3879 if n_expr
!= null then
3880 n_expr
.parent
= self
3884 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3886 if _n_kwcontinue
== old_child
then
3887 if new_child
!= null then
3888 new_child
.parent
= self
3889 assert new_child
isa TKwcontinue
3890 _n_kwcontinue
= new_child
3892 _n_kwcontinue
= null
3896 if _n_label
== old_child
then
3897 if new_child
!= null then
3898 new_child
.parent
= self
3899 assert new_child
isa ALabel
3900 _n_label
= new_child
3906 if _n_expr
== old_child
then
3907 if new_child
!= null then
3908 new_child
.parent
= self
3909 assert new_child
isa AExpr
3918 redef fun visit_all
(v
: Visitor)
3920 if _n_kwcontinue
!= null then
3921 v
.enter_visit
(_n_kwcontinue
.as(not null))
3923 if _n_label
!= null then
3924 v
.enter_visit
(_n_label
.as(not null))
3926 if _n_expr
!= null then
3927 v
.enter_visit
(_n_expr
.as(not null))
3932 private init empty_init
do end
3935 n_kwdo
: nullable TKwdo,
3936 n_block
: nullable AExpr,
3937 n_label
: nullable ALabel
3941 _n_kwdo
= n_kwdo
.as(not null)
3942 n_kwdo
.parent
= self
3944 if n_block
!= null then
3945 n_block
.parent
= self
3948 if n_label
!= null then
3949 n_label
.parent
= self
3953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3955 if _n_kwdo
== old_child
then
3956 if new_child
!= null then
3957 new_child
.parent
= self
3958 assert new_child
isa TKwdo
3965 if _n_block
== old_child
then
3966 if new_child
!= null then
3967 new_child
.parent
= self
3968 assert new_child
isa AExpr
3969 _n_block
= new_child
3975 if _n_label
== old_child
then
3976 if new_child
!= null then
3977 new_child
.parent
= self
3978 assert new_child
isa ALabel
3979 _n_label
= new_child
3987 redef fun visit_all
(v
: Visitor)
3989 v
.enter_visit
(_n_kwdo
)
3990 if _n_block
!= null then
3991 v
.enter_visit
(_n_block
.as(not null))
3993 if _n_label
!= null then
3994 v
.enter_visit
(_n_label
.as(not null))
3999 private init empty_init
do end
4002 n_kwif
: nullable TKwif,
4003 n_expr
: nullable AExpr,
4004 n_then
: nullable AExpr,
4005 n_else
: nullable AExpr
4009 _n_kwif
= n_kwif
.as(not null)
4010 n_kwif
.parent
= self
4011 _n_expr
= n_expr
.as(not null)
4012 n_expr
.parent
= self
4014 if n_then
!= null then
4015 n_then
.parent
= self
4018 if n_else
!= null then
4019 n_else
.parent
= self
4023 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4025 if _n_kwif
== old_child
then
4026 if new_child
!= null then
4027 new_child
.parent
= self
4028 assert new_child
isa TKwif
4035 if _n_expr
== old_child
then
4036 if new_child
!= null then
4037 new_child
.parent
= self
4038 assert new_child
isa AExpr
4045 if _n_then
== old_child
then
4046 if new_child
!= null then
4047 new_child
.parent
= self
4048 assert new_child
isa AExpr
4055 if _n_else
== old_child
then
4056 if new_child
!= null then
4057 new_child
.parent
= self
4058 assert new_child
isa AExpr
4067 redef fun visit_all
(v
: Visitor)
4069 v
.enter_visit
(_n_kwif
)
4070 v
.enter_visit
(_n_expr
)
4071 if _n_then
!= null then
4072 v
.enter_visit
(_n_then
.as(not null))
4074 if _n_else
!= null then
4075 v
.enter_visit
(_n_else
.as(not null))
4079 redef class AIfexprExpr
4080 private init empty_init
do end
4082 init init_aifexprexpr
(
4083 n_kwif
: nullable TKwif,
4084 n_expr
: nullable AExpr,
4085 n_kwthen
: nullable TKwthen,
4086 n_then
: nullable AExpr,
4087 n_kwelse
: nullable TKwelse,
4088 n_else
: nullable AExpr
4092 _n_kwif
= n_kwif
.as(not null)
4093 n_kwif
.parent
= self
4094 _n_expr
= n_expr
.as(not null)
4095 n_expr
.parent
= self
4096 _n_kwthen
= n_kwthen
.as(not null)
4097 n_kwthen
.parent
= self
4098 _n_then
= n_then
.as(not null)
4099 n_then
.parent
= self
4100 _n_kwelse
= n_kwelse
.as(not null)
4101 n_kwelse
.parent
= self
4102 _n_else
= n_else
.as(not null)
4103 n_else
.parent
= self
4106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4108 if _n_kwif
== old_child
then
4109 if new_child
!= null then
4110 new_child
.parent
= self
4111 assert new_child
isa TKwif
4118 if _n_expr
== old_child
then
4119 if new_child
!= null then
4120 new_child
.parent
= self
4121 assert new_child
isa AExpr
4128 if _n_kwthen
== old_child
then
4129 if new_child
!= null then
4130 new_child
.parent
= self
4131 assert new_child
isa TKwthen
4132 _n_kwthen
= new_child
4138 if _n_then
== old_child
then
4139 if new_child
!= null then
4140 new_child
.parent
= self
4141 assert new_child
isa AExpr
4148 if _n_kwelse
== old_child
then
4149 if new_child
!= null then
4150 new_child
.parent
= self
4151 assert new_child
isa TKwelse
4152 _n_kwelse
= new_child
4158 if _n_else
== old_child
then
4159 if new_child
!= null then
4160 new_child
.parent
= self
4161 assert new_child
isa AExpr
4170 redef fun visit_all
(v
: Visitor)
4172 v
.enter_visit
(_n_kwif
)
4173 v
.enter_visit
(_n_expr
)
4174 v
.enter_visit
(_n_kwthen
)
4175 v
.enter_visit
(_n_then
)
4176 v
.enter_visit
(_n_kwelse
)
4177 v
.enter_visit
(_n_else
)
4180 redef class AWhileExpr
4181 private init empty_init
do end
4183 init init_awhileexpr
(
4184 n_kwwhile
: nullable TKwwhile,
4185 n_expr
: nullable AExpr,
4186 n_kwdo
: nullable TKwdo,
4187 n_block
: nullable AExpr,
4188 n_label
: nullable ALabel
4192 _n_kwwhile
= n_kwwhile
.as(not null)
4193 n_kwwhile
.parent
= self
4194 _n_expr
= n_expr
.as(not null)
4195 n_expr
.parent
= self
4196 _n_kwdo
= n_kwdo
.as(not null)
4197 n_kwdo
.parent
= self
4199 if n_block
!= null then
4200 n_block
.parent
= self
4203 if n_label
!= null then
4204 n_label
.parent
= self
4208 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4210 if _n_kwwhile
== old_child
then
4211 if new_child
!= null then
4212 new_child
.parent
= self
4213 assert new_child
isa TKwwhile
4214 _n_kwwhile
= new_child
4220 if _n_expr
== old_child
then
4221 if new_child
!= null then
4222 new_child
.parent
= self
4223 assert new_child
isa AExpr
4230 if _n_kwdo
== old_child
then
4231 if new_child
!= null then
4232 new_child
.parent
= self
4233 assert new_child
isa TKwdo
4240 if _n_block
== old_child
then
4241 if new_child
!= null then
4242 new_child
.parent
= self
4243 assert new_child
isa AExpr
4244 _n_block
= new_child
4250 if _n_label
== old_child
then
4251 if new_child
!= null then
4252 new_child
.parent
= self
4253 assert new_child
isa ALabel
4254 _n_label
= new_child
4262 redef fun visit_all
(v
: Visitor)
4264 v
.enter_visit
(_n_kwwhile
)
4265 v
.enter_visit
(_n_expr
)
4266 v
.enter_visit
(_n_kwdo
)
4267 if _n_block
!= null then
4268 v
.enter_visit
(_n_block
.as(not null))
4270 if _n_label
!= null then
4271 v
.enter_visit
(_n_label
.as(not null))
4275 redef class ALoopExpr
4276 private init empty_init
do end
4278 init init_aloopexpr
(
4279 n_kwloop
: nullable TKwloop,
4280 n_block
: nullable AExpr,
4281 n_label
: nullable ALabel
4285 _n_kwloop
= n_kwloop
.as(not null)
4286 n_kwloop
.parent
= self
4288 if n_block
!= null then
4289 n_block
.parent
= self
4292 if n_label
!= null then
4293 n_label
.parent
= self
4297 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4299 if _n_kwloop
== old_child
then
4300 if new_child
!= null then
4301 new_child
.parent
= self
4302 assert new_child
isa TKwloop
4303 _n_kwloop
= new_child
4309 if _n_block
== old_child
then
4310 if new_child
!= null then
4311 new_child
.parent
= self
4312 assert new_child
isa AExpr
4313 _n_block
= new_child
4319 if _n_label
== old_child
then
4320 if new_child
!= null then
4321 new_child
.parent
= self
4322 assert new_child
isa ALabel
4323 _n_label
= new_child
4331 redef fun visit_all
(v
: Visitor)
4333 v
.enter_visit
(_n_kwloop
)
4334 if _n_block
!= null then
4335 v
.enter_visit
(_n_block
.as(not null))
4337 if _n_label
!= null then
4338 v
.enter_visit
(_n_label
.as(not null))
4342 redef class AForExpr
4343 private init empty_init
do end
4345 init init_aforexpr
(
4346 n_kwfor
: nullable TKwfor,
4347 n_ids
: Collection[Object], # Should be Collection[TId]
4348 n_expr
: nullable AExpr,
4349 n_kwdo
: nullable TKwdo,
4350 n_block
: nullable AExpr,
4351 n_label
: nullable ALabel
4355 _n_kwfor
= n_kwfor
.as(not null)
4356 n_kwfor
.parent
= self
4362 _n_expr
= n_expr
.as(not null)
4363 n_expr
.parent
= self
4364 _n_kwdo
= n_kwdo
.as(not null)
4365 n_kwdo
.parent
= self
4367 if n_block
!= null then
4368 n_block
.parent
= self
4371 if n_label
!= null then
4372 n_label
.parent
= self
4376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4378 if _n_kwfor
== old_child
then
4379 if new_child
!= null then
4380 new_child
.parent
= self
4381 assert new_child
isa TKwfor
4382 _n_kwfor
= new_child
4388 for i
in [0.._n_ids
.length
[ do
4389 if _n_ids
[i
] == old_child
then
4390 if new_child
!= null then
4391 assert new_child
isa TId
4392 _n_ids
[i
] = new_child
4393 new_child
.parent
= self
4400 if _n_expr
== old_child
then
4401 if new_child
!= null then
4402 new_child
.parent
= self
4403 assert new_child
isa AExpr
4410 if _n_kwdo
== old_child
then
4411 if new_child
!= null then
4412 new_child
.parent
= self
4413 assert new_child
isa TKwdo
4420 if _n_block
== old_child
then
4421 if new_child
!= null then
4422 new_child
.parent
= self
4423 assert new_child
isa AExpr
4424 _n_block
= new_child
4430 if _n_label
== old_child
then
4431 if new_child
!= null then
4432 new_child
.parent
= self
4433 assert new_child
isa ALabel
4434 _n_label
= new_child
4442 redef fun visit_all
(v
: Visitor)
4444 v
.enter_visit
(_n_kwfor
)
4448 v
.enter_visit
(_n_expr
)
4449 v
.enter_visit
(_n_kwdo
)
4450 if _n_block
!= null then
4451 v
.enter_visit
(_n_block
.as(not null))
4453 if _n_label
!= null then
4454 v
.enter_visit
(_n_label
.as(not null))
4458 redef class AAssertExpr
4459 private init empty_init
do end
4461 init init_aassertexpr
(
4462 n_kwassert
: nullable TKwassert,
4464 n_expr
: nullable AExpr,
4465 n_else
: nullable AExpr
4469 _n_kwassert
= n_kwassert
.as(not null)
4470 n_kwassert
.parent
= self
4472 if n_id
!= null then
4475 _n_expr
= n_expr
.as(not null)
4476 n_expr
.parent
= self
4478 if n_else
!= null then
4479 n_else
.parent
= self
4483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4485 if _n_kwassert
== old_child
then
4486 if new_child
!= null then
4487 new_child
.parent
= self
4488 assert new_child
isa TKwassert
4489 _n_kwassert
= new_child
4495 if _n_id
== old_child
then
4496 if new_child
!= null then
4497 new_child
.parent
= self
4498 assert new_child
isa TId
4505 if _n_expr
== old_child
then
4506 if new_child
!= null then
4507 new_child
.parent
= self
4508 assert new_child
isa AExpr
4515 if _n_else
== old_child
then
4516 if new_child
!= null then
4517 new_child
.parent
= self
4518 assert new_child
isa AExpr
4527 redef fun visit_all
(v
: Visitor)
4529 v
.enter_visit
(_n_kwassert
)
4530 if _n_id
!= null then
4531 v
.enter_visit
(_n_id
.as(not null))
4533 v
.enter_visit
(_n_expr
)
4534 if _n_else
!= null then
4535 v
.enter_visit
(_n_else
.as(not null))
4539 redef class AOnceExpr
4540 private init empty_init
do end
4542 init init_aonceexpr
(
4543 n_kwonce
: nullable TKwonce,
4544 n_expr
: nullable AExpr
4548 _n_kwonce
= n_kwonce
.as(not null)
4549 n_kwonce
.parent
= self
4550 _n_expr
= n_expr
.as(not null)
4551 n_expr
.parent
= self
4554 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4556 if _n_kwonce
== old_child
then
4557 if new_child
!= null then
4558 new_child
.parent
= self
4559 assert new_child
isa TKwonce
4560 _n_kwonce
= new_child
4566 if _n_expr
== old_child
then
4567 if new_child
!= null then
4568 new_child
.parent
= self
4569 assert new_child
isa AExpr
4578 redef fun visit_all
(v
: Visitor)
4580 v
.enter_visit
(_n_kwonce
)
4581 v
.enter_visit
(_n_expr
)
4584 redef class ASendExpr
4585 private init empty_init
do end
4587 init init_asendexpr
(
4588 n_expr
: nullable AExpr
4592 _n_expr
= n_expr
.as(not null)
4593 n_expr
.parent
= self
4596 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4598 if _n_expr
== old_child
then
4599 if new_child
!= null then
4600 new_child
.parent
= self
4601 assert new_child
isa AExpr
4610 redef fun visit_all
(v
: Visitor)
4612 v
.enter_visit
(_n_expr
)
4615 redef class ABinopExpr
4616 private init empty_init
do end
4618 init init_abinopexpr
(
4619 n_expr
: nullable AExpr,
4620 n_expr2
: nullable AExpr
4624 _n_expr
= n_expr
.as(not null)
4625 n_expr
.parent
= self
4626 _n_expr2
= n_expr2
.as(not null)
4627 n_expr2
.parent
= self
4630 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4632 if _n_expr
== old_child
then
4633 if new_child
!= null then
4634 new_child
.parent
= self
4635 assert new_child
isa AExpr
4642 if _n_expr2
== old_child
then
4643 if new_child
!= null then
4644 new_child
.parent
= self
4645 assert new_child
isa AExpr
4646 _n_expr2
= new_child
4654 redef fun visit_all
(v
: Visitor)
4656 v
.enter_visit
(_n_expr
)
4657 v
.enter_visit
(_n_expr2
)
4661 private init empty_init
do end
4664 n_expr
: nullable AExpr,
4665 n_expr2
: nullable AExpr
4669 _n_expr
= n_expr
.as(not null)
4670 n_expr
.parent
= self
4671 _n_expr2
= n_expr2
.as(not null)
4672 n_expr2
.parent
= self
4675 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4677 if _n_expr
== old_child
then
4678 if new_child
!= null then
4679 new_child
.parent
= self
4680 assert new_child
isa AExpr
4687 if _n_expr2
== old_child
then
4688 if new_child
!= null then
4689 new_child
.parent
= self
4690 assert new_child
isa AExpr
4691 _n_expr2
= new_child
4699 redef fun visit_all
(v
: Visitor)
4701 v
.enter_visit
(_n_expr
)
4702 v
.enter_visit
(_n_expr2
)
4705 redef class AAndExpr
4706 private init empty_init
do end
4708 init init_aandexpr
(
4709 n_expr
: nullable AExpr,
4710 n_expr2
: nullable AExpr
4714 _n_expr
= n_expr
.as(not null)
4715 n_expr
.parent
= self
4716 _n_expr2
= n_expr2
.as(not null)
4717 n_expr2
.parent
= self
4720 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4722 if _n_expr
== old_child
then
4723 if new_child
!= null then
4724 new_child
.parent
= self
4725 assert new_child
isa AExpr
4732 if _n_expr2
== old_child
then
4733 if new_child
!= null then
4734 new_child
.parent
= self
4735 assert new_child
isa AExpr
4736 _n_expr2
= new_child
4744 redef fun visit_all
(v
: Visitor)
4746 v
.enter_visit
(_n_expr
)
4747 v
.enter_visit
(_n_expr2
)
4750 redef class AOrElseExpr
4751 private init empty_init
do end
4753 init init_aorelseexpr
(
4754 n_expr
: nullable AExpr,
4755 n_expr2
: nullable AExpr
4759 _n_expr
= n_expr
.as(not null)
4760 n_expr
.parent
= self
4761 _n_expr2
= n_expr2
.as(not null)
4762 n_expr2
.parent
= self
4765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4767 if _n_expr
== old_child
then
4768 if new_child
!= null then
4769 new_child
.parent
= self
4770 assert new_child
isa AExpr
4777 if _n_expr2
== old_child
then
4778 if new_child
!= null then
4779 new_child
.parent
= self
4780 assert new_child
isa AExpr
4781 _n_expr2
= new_child
4789 redef fun visit_all
(v
: Visitor)
4791 v
.enter_visit
(_n_expr
)
4792 v
.enter_visit
(_n_expr2
)
4795 redef class ANotExpr
4796 private init empty_init
do end
4798 init init_anotexpr
(
4799 n_kwnot
: nullable TKwnot,
4800 n_expr
: nullable AExpr
4804 _n_kwnot
= n_kwnot
.as(not null)
4805 n_kwnot
.parent
= self
4806 _n_expr
= n_expr
.as(not null)
4807 n_expr
.parent
= self
4810 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4812 if _n_kwnot
== old_child
then
4813 if new_child
!= null then
4814 new_child
.parent
= self
4815 assert new_child
isa TKwnot
4816 _n_kwnot
= new_child
4822 if _n_expr
== old_child
then
4823 if new_child
!= null then
4824 new_child
.parent
= self
4825 assert new_child
isa AExpr
4834 redef fun visit_all
(v
: Visitor)
4836 v
.enter_visit
(_n_kwnot
)
4837 v
.enter_visit
(_n_expr
)
4841 private init empty_init
do end
4844 n_expr
: nullable AExpr,
4845 n_expr2
: nullable AExpr
4849 _n_expr
= n_expr
.as(not null)
4850 n_expr
.parent
= self
4851 _n_expr2
= n_expr2
.as(not null)
4852 n_expr2
.parent
= self
4855 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4857 if _n_expr
== old_child
then
4858 if new_child
!= null then
4859 new_child
.parent
= self
4860 assert new_child
isa AExpr
4867 if _n_expr2
== old_child
then
4868 if new_child
!= null then
4869 new_child
.parent
= self
4870 assert new_child
isa AExpr
4871 _n_expr2
= new_child
4879 redef fun visit_all
(v
: Visitor)
4881 v
.enter_visit
(_n_expr
)
4882 v
.enter_visit
(_n_expr2
)
4886 private init empty_init
do end
4889 n_expr
: nullable AExpr,
4890 n_expr2
: nullable AExpr
4894 _n_expr
= n_expr
.as(not null)
4895 n_expr
.parent
= self
4896 _n_expr2
= n_expr2
.as(not null)
4897 n_expr2
.parent
= self
4900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4902 if _n_expr
== old_child
then
4903 if new_child
!= null then
4904 new_child
.parent
= self
4905 assert new_child
isa AExpr
4912 if _n_expr2
== old_child
then
4913 if new_child
!= null then
4914 new_child
.parent
= self
4915 assert new_child
isa AExpr
4916 _n_expr2
= new_child
4924 redef fun visit_all
(v
: Visitor)
4926 v
.enter_visit
(_n_expr
)
4927 v
.enter_visit
(_n_expr2
)
4931 private init empty_init
do end
4934 n_expr
: nullable AExpr,
4935 n_expr2
: nullable AExpr
4939 _n_expr
= n_expr
.as(not null)
4940 n_expr
.parent
= self
4941 _n_expr2
= n_expr2
.as(not null)
4942 n_expr2
.parent
= self
4945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4947 if _n_expr
== old_child
then
4948 if new_child
!= null then
4949 new_child
.parent
= self
4950 assert new_child
isa AExpr
4957 if _n_expr2
== old_child
then
4958 if new_child
!= null then
4959 new_child
.parent
= self
4960 assert new_child
isa AExpr
4961 _n_expr2
= new_child
4969 redef fun visit_all
(v
: Visitor)
4971 v
.enter_visit
(_n_expr
)
4972 v
.enter_visit
(_n_expr2
)
4976 private init empty_init
do end
4979 n_expr
: nullable AExpr,
4980 n_expr2
: nullable AExpr
4984 _n_expr
= n_expr
.as(not null)
4985 n_expr
.parent
= self
4986 _n_expr2
= n_expr2
.as(not null)
4987 n_expr2
.parent
= self
4990 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4992 if _n_expr
== old_child
then
4993 if new_child
!= null then
4994 new_child
.parent
= self
4995 assert new_child
isa AExpr
5002 if _n_expr2
== old_child
then
5003 if new_child
!= null then
5004 new_child
.parent
= self
5005 assert new_child
isa AExpr
5006 _n_expr2
= new_child
5014 redef fun visit_all
(v
: Visitor)
5016 v
.enter_visit
(_n_expr
)
5017 v
.enter_visit
(_n_expr2
)
5021 private init empty_init
do end
5024 n_expr
: nullable AExpr,
5025 n_expr2
: nullable AExpr
5029 _n_expr
= n_expr
.as(not null)
5030 n_expr
.parent
= self
5031 _n_expr2
= n_expr2
.as(not null)
5032 n_expr2
.parent
= self
5035 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5037 if _n_expr
== old_child
then
5038 if new_child
!= null then
5039 new_child
.parent
= self
5040 assert new_child
isa AExpr
5047 if _n_expr2
== old_child
then
5048 if new_child
!= null then
5049 new_child
.parent
= self
5050 assert new_child
isa AExpr
5051 _n_expr2
= new_child
5059 redef fun visit_all
(v
: Visitor)
5061 v
.enter_visit
(_n_expr
)
5062 v
.enter_visit
(_n_expr2
)
5066 private init empty_init
do end
5069 n_expr
: nullable AExpr,
5070 n_expr2
: nullable AExpr
5074 _n_expr
= n_expr
.as(not null)
5075 n_expr
.parent
= self
5076 _n_expr2
= n_expr2
.as(not null)
5077 n_expr2
.parent
= self
5080 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5082 if _n_expr
== old_child
then
5083 if new_child
!= null then
5084 new_child
.parent
= self
5085 assert new_child
isa AExpr
5092 if _n_expr2
== old_child
then
5093 if new_child
!= null then
5094 new_child
.parent
= self
5095 assert new_child
isa AExpr
5096 _n_expr2
= new_child
5104 redef fun visit_all
(v
: Visitor)
5106 v
.enter_visit
(_n_expr
)
5107 v
.enter_visit
(_n_expr2
)
5111 private init empty_init
do end
5114 n_expr
: nullable AExpr,
5115 n_expr2
: nullable AExpr
5119 _n_expr
= n_expr
.as(not null)
5120 n_expr
.parent
= self
5121 _n_expr2
= n_expr2
.as(not null)
5122 n_expr2
.parent
= self
5125 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5127 if _n_expr
== old_child
then
5128 if new_child
!= null then
5129 new_child
.parent
= self
5130 assert new_child
isa AExpr
5137 if _n_expr2
== old_child
then
5138 if new_child
!= null then
5139 new_child
.parent
= self
5140 assert new_child
isa AExpr
5141 _n_expr2
= new_child
5149 redef fun visit_all
(v
: Visitor)
5151 v
.enter_visit
(_n_expr
)
5152 v
.enter_visit
(_n_expr2
)
5156 private init empty_init
do end
5159 n_expr
: nullable AExpr,
5160 n_expr2
: nullable AExpr
5164 _n_expr
= n_expr
.as(not null)
5165 n_expr
.parent
= self
5166 _n_expr2
= n_expr2
.as(not null)
5167 n_expr2
.parent
= self
5170 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5172 if _n_expr
== old_child
then
5173 if new_child
!= null then
5174 new_child
.parent
= self
5175 assert new_child
isa AExpr
5182 if _n_expr2
== old_child
then
5183 if new_child
!= null then
5184 new_child
.parent
= self
5185 assert new_child
isa AExpr
5186 _n_expr2
= new_child
5194 redef fun visit_all
(v
: Visitor)
5196 v
.enter_visit
(_n_expr
)
5197 v
.enter_visit
(_n_expr2
)
5201 private init empty_init
do end
5204 n_expr
: nullable AExpr,
5205 n_expr2
: nullable AExpr
5209 _n_expr
= n_expr
.as(not null)
5210 n_expr
.parent
= self
5211 _n_expr2
= n_expr2
.as(not null)
5212 n_expr2
.parent
= self
5215 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5217 if _n_expr
== old_child
then
5218 if new_child
!= null then
5219 new_child
.parent
= self
5220 assert new_child
isa AExpr
5227 if _n_expr2
== old_child
then
5228 if new_child
!= null then
5229 new_child
.parent
= self
5230 assert new_child
isa AExpr
5231 _n_expr2
= new_child
5239 redef fun visit_all
(v
: Visitor)
5241 v
.enter_visit
(_n_expr
)
5242 v
.enter_visit
(_n_expr2
)
5245 redef class AIsaExpr
5246 private init empty_init
do end
5248 init init_aisaexpr
(
5249 n_expr
: nullable AExpr,
5250 n_type
: nullable AType
5254 _n_expr
= n_expr
.as(not null)
5255 n_expr
.parent
= self
5256 _n_type
= n_type
.as(not null)
5257 n_type
.parent
= self
5260 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5262 if _n_expr
== old_child
then
5263 if new_child
!= null then
5264 new_child
.parent
= self
5265 assert new_child
isa AExpr
5272 if _n_type
== old_child
then
5273 if new_child
!= null then
5274 new_child
.parent
= self
5275 assert new_child
isa AType
5284 redef fun visit_all
(v
: Visitor)
5286 v
.enter_visit
(_n_expr
)
5287 v
.enter_visit
(_n_type
)
5290 redef class APlusExpr
5291 private init empty_init
do end
5293 init init_aplusexpr
(
5294 n_expr
: nullable AExpr,
5295 n_expr2
: nullable AExpr
5299 _n_expr
= n_expr
.as(not null)
5300 n_expr
.parent
= self
5301 _n_expr2
= n_expr2
.as(not null)
5302 n_expr2
.parent
= self
5305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5307 if _n_expr
== old_child
then
5308 if new_child
!= null then
5309 new_child
.parent
= self
5310 assert new_child
isa AExpr
5317 if _n_expr2
== old_child
then
5318 if new_child
!= null then
5319 new_child
.parent
= self
5320 assert new_child
isa AExpr
5321 _n_expr2
= new_child
5329 redef fun visit_all
(v
: Visitor)
5331 v
.enter_visit
(_n_expr
)
5332 v
.enter_visit
(_n_expr2
)
5335 redef class AMinusExpr
5336 private init empty_init
do end
5338 init init_aminusexpr
(
5339 n_expr
: nullable AExpr,
5340 n_expr2
: nullable AExpr
5344 _n_expr
= n_expr
.as(not null)
5345 n_expr
.parent
= self
5346 _n_expr2
= n_expr2
.as(not null)
5347 n_expr2
.parent
= self
5350 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5352 if _n_expr
== old_child
then
5353 if new_child
!= null then
5354 new_child
.parent
= self
5355 assert new_child
isa AExpr
5362 if _n_expr2
== old_child
then
5363 if new_child
!= null then
5364 new_child
.parent
= self
5365 assert new_child
isa AExpr
5366 _n_expr2
= new_child
5374 redef fun visit_all
(v
: Visitor)
5376 v
.enter_visit
(_n_expr
)
5377 v
.enter_visit
(_n_expr2
)
5380 redef class AStarshipExpr
5381 private init empty_init
do end
5383 init init_astarshipexpr
(
5384 n_expr
: nullable AExpr,
5385 n_expr2
: nullable AExpr
5389 _n_expr
= n_expr
.as(not null)
5390 n_expr
.parent
= self
5391 _n_expr2
= n_expr2
.as(not null)
5392 n_expr2
.parent
= self
5395 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5397 if _n_expr
== old_child
then
5398 if new_child
!= null then
5399 new_child
.parent
= self
5400 assert new_child
isa AExpr
5407 if _n_expr2
== old_child
then
5408 if new_child
!= null then
5409 new_child
.parent
= self
5410 assert new_child
isa AExpr
5411 _n_expr2
= new_child
5419 redef fun visit_all
(v
: Visitor)
5421 v
.enter_visit
(_n_expr
)
5422 v
.enter_visit
(_n_expr2
)
5425 redef class AStarExpr
5426 private init empty_init
do end
5428 init init_astarexpr
(
5429 n_expr
: nullable AExpr,
5430 n_expr2
: nullable AExpr
5434 _n_expr
= n_expr
.as(not null)
5435 n_expr
.parent
= self
5436 _n_expr2
= n_expr2
.as(not null)
5437 n_expr2
.parent
= self
5440 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5442 if _n_expr
== old_child
then
5443 if new_child
!= null then
5444 new_child
.parent
= self
5445 assert new_child
isa AExpr
5452 if _n_expr2
== old_child
then
5453 if new_child
!= null then
5454 new_child
.parent
= self
5455 assert new_child
isa AExpr
5456 _n_expr2
= new_child
5464 redef fun visit_all
(v
: Visitor)
5466 v
.enter_visit
(_n_expr
)
5467 v
.enter_visit
(_n_expr2
)
5470 redef class ASlashExpr
5471 private init empty_init
do end
5473 init init_aslashexpr
(
5474 n_expr
: nullable AExpr,
5475 n_expr2
: nullable AExpr
5479 _n_expr
= n_expr
.as(not null)
5480 n_expr
.parent
= self
5481 _n_expr2
= n_expr2
.as(not null)
5482 n_expr2
.parent
= self
5485 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5487 if _n_expr
== old_child
then
5488 if new_child
!= null then
5489 new_child
.parent
= self
5490 assert new_child
isa AExpr
5497 if _n_expr2
== old_child
then
5498 if new_child
!= null then
5499 new_child
.parent
= self
5500 assert new_child
isa AExpr
5501 _n_expr2
= new_child
5509 redef fun visit_all
(v
: Visitor)
5511 v
.enter_visit
(_n_expr
)
5512 v
.enter_visit
(_n_expr2
)
5515 redef class APercentExpr
5516 private init empty_init
do end
5518 init init_apercentexpr
(
5519 n_expr
: nullable AExpr,
5520 n_expr2
: nullable AExpr
5524 _n_expr
= n_expr
.as(not null)
5525 n_expr
.parent
= self
5526 _n_expr2
= n_expr2
.as(not null)
5527 n_expr2
.parent
= self
5530 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5532 if _n_expr
== old_child
then
5533 if new_child
!= null then
5534 new_child
.parent
= self
5535 assert new_child
isa AExpr
5542 if _n_expr2
== old_child
then
5543 if new_child
!= null then
5544 new_child
.parent
= self
5545 assert new_child
isa AExpr
5546 _n_expr2
= new_child
5554 redef fun visit_all
(v
: Visitor)
5556 v
.enter_visit
(_n_expr
)
5557 v
.enter_visit
(_n_expr2
)
5560 redef class AUminusExpr
5561 private init empty_init
do end
5563 init init_auminusexpr
(
5564 n_minus
: nullable TMinus,
5565 n_expr
: nullable AExpr
5569 _n_minus
= n_minus
.as(not null)
5570 n_minus
.parent
= self
5571 _n_expr
= n_expr
.as(not null)
5572 n_expr
.parent
= self
5575 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5577 if _n_minus
== old_child
then
5578 if new_child
!= null then
5579 new_child
.parent
= self
5580 assert new_child
isa TMinus
5581 _n_minus
= new_child
5587 if _n_expr
== old_child
then
5588 if new_child
!= null then
5589 new_child
.parent
= self
5590 assert new_child
isa AExpr
5599 redef fun visit_all
(v
: Visitor)
5601 v
.enter_visit
(_n_minus
)
5602 v
.enter_visit
(_n_expr
)
5605 redef class ANewExpr
5606 private init empty_init
do end
5608 init init_anewexpr
(
5609 n_kwnew
: nullable TKwnew,
5610 n_type
: nullable AType,
5612 n_args
: nullable AExprs
5616 _n_kwnew
= n_kwnew
.as(not null)
5617 n_kwnew
.parent
= self
5618 _n_type
= n_type
.as(not null)
5619 n_type
.parent
= self
5621 if n_id
!= null then
5624 _n_args
= n_args
.as(not null)
5625 n_args
.parent
= self
5628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5630 if _n_kwnew
== old_child
then
5631 if new_child
!= null then
5632 new_child
.parent
= self
5633 assert new_child
isa TKwnew
5634 _n_kwnew
= new_child
5640 if _n_type
== old_child
then
5641 if new_child
!= null then
5642 new_child
.parent
= self
5643 assert new_child
isa AType
5650 if _n_id
== old_child
then
5651 if new_child
!= null then
5652 new_child
.parent
= self
5653 assert new_child
isa TId
5660 if _n_args
== old_child
then
5661 if new_child
!= null then
5662 new_child
.parent
= self
5663 assert new_child
isa AExprs
5672 redef fun visit_all
(v
: Visitor)
5674 v
.enter_visit
(_n_kwnew
)
5675 v
.enter_visit
(_n_type
)
5676 if _n_id
!= null then
5677 v
.enter_visit
(_n_id
.as(not null))
5679 v
.enter_visit
(_n_args
)
5682 redef class AAttrExpr
5683 private init empty_init
do end
5685 init init_aattrexpr
(
5686 n_expr
: nullable AExpr,
5687 n_id
: nullable TAttrid
5691 _n_expr
= n_expr
.as(not null)
5692 n_expr
.parent
= self
5693 _n_id
= n_id
.as(not null)
5697 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5699 if _n_expr
== old_child
then
5700 if new_child
!= null then
5701 new_child
.parent
= self
5702 assert new_child
isa AExpr
5709 if _n_id
== old_child
then
5710 if new_child
!= null then
5711 new_child
.parent
= self
5712 assert new_child
isa TAttrid
5721 redef fun visit_all
(v
: Visitor)
5723 v
.enter_visit
(_n_expr
)
5724 v
.enter_visit
(_n_id
)
5727 redef class AAttrAssignExpr
5728 private init empty_init
do end
5730 init init_aattrassignexpr
(
5731 n_expr
: nullable AExpr,
5732 n_id
: nullable TAttrid,
5733 n_assign
: nullable TAssign,
5734 n_value
: nullable AExpr
5738 _n_expr
= n_expr
.as(not null)
5739 n_expr
.parent
= self
5740 _n_id
= n_id
.as(not null)
5742 _n_assign
= n_assign
.as(not null)
5743 n_assign
.parent
= self
5744 _n_value
= n_value
.as(not null)
5745 n_value
.parent
= self
5748 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5750 if _n_expr
== old_child
then
5751 if new_child
!= null then
5752 new_child
.parent
= self
5753 assert new_child
isa AExpr
5760 if _n_id
== old_child
then
5761 if new_child
!= null then
5762 new_child
.parent
= self
5763 assert new_child
isa TAttrid
5770 if _n_assign
== old_child
then
5771 if new_child
!= null then
5772 new_child
.parent
= self
5773 assert new_child
isa TAssign
5774 _n_assign
= new_child
5780 if _n_value
== old_child
then
5781 if new_child
!= null then
5782 new_child
.parent
= self
5783 assert new_child
isa AExpr
5784 _n_value
= new_child
5792 redef fun visit_all
(v
: Visitor)
5794 v
.enter_visit
(_n_expr
)
5795 v
.enter_visit
(_n_id
)
5796 v
.enter_visit
(_n_assign
)
5797 v
.enter_visit
(_n_value
)
5800 redef class AAttrReassignExpr
5801 private init empty_init
do end
5803 init init_aattrreassignexpr
(
5804 n_expr
: nullable AExpr,
5805 n_id
: nullable TAttrid,
5806 n_assign_op
: nullable AAssignOp,
5807 n_value
: nullable AExpr
5811 _n_expr
= n_expr
.as(not null)
5812 n_expr
.parent
= self
5813 _n_id
= n_id
.as(not null)
5815 _n_assign_op
= n_assign_op
.as(not null)
5816 n_assign_op
.parent
= self
5817 _n_value
= n_value
.as(not null)
5818 n_value
.parent
= self
5821 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5823 if _n_expr
== old_child
then
5824 if new_child
!= null then
5825 new_child
.parent
= self
5826 assert new_child
isa AExpr
5833 if _n_id
== old_child
then
5834 if new_child
!= null then
5835 new_child
.parent
= self
5836 assert new_child
isa TAttrid
5843 if _n_assign_op
== old_child
then
5844 if new_child
!= null then
5845 new_child
.parent
= self
5846 assert new_child
isa AAssignOp
5847 _n_assign_op
= new_child
5853 if _n_value
== old_child
then
5854 if new_child
!= null then
5855 new_child
.parent
= self
5856 assert new_child
isa AExpr
5857 _n_value
= new_child
5865 redef fun visit_all
(v
: Visitor)
5867 v
.enter_visit
(_n_expr
)
5868 v
.enter_visit
(_n_id
)
5869 v
.enter_visit
(_n_assign_op
)
5870 v
.enter_visit
(_n_value
)
5873 redef class ACallExpr
5874 private init empty_init
do end
5876 init init_acallexpr
(
5877 n_expr
: nullable AExpr,
5879 n_args
: nullable AExprs,
5880 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
5884 _n_expr
= n_expr
.as(not null)
5885 n_expr
.parent
= self
5886 _n_id
= n_id
.as(not null)
5888 _n_args
= n_args
.as(not null)
5889 n_args
.parent
= self
5890 for n
in n_closure_defs
do
5891 assert n
isa AClosureDef
5892 _n_closure_defs
.add
(n
)
5897 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5899 if _n_expr
== old_child
then
5900 if new_child
!= null then
5901 new_child
.parent
= self
5902 assert new_child
isa AExpr
5909 if _n_id
== old_child
then
5910 if new_child
!= null then
5911 new_child
.parent
= self
5912 assert new_child
isa TId
5919 if _n_args
== old_child
then
5920 if new_child
!= null then
5921 new_child
.parent
= self
5922 assert new_child
isa AExprs
5929 for i
in [0.._n_closure_defs
.length
[ do
5930 if _n_closure_defs
[i
] == old_child
then
5931 if new_child
!= null then
5932 assert new_child
isa AClosureDef
5933 _n_closure_defs
[i
] = new_child
5934 new_child
.parent
= self
5936 _n_closure_defs
.remove_at
(i
)
5943 redef fun visit_all
(v
: Visitor)
5945 v
.enter_visit
(_n_expr
)
5946 v
.enter_visit
(_n_id
)
5947 v
.enter_visit
(_n_args
)
5948 for n
in _n_closure_defs
do
5953 redef class ACallAssignExpr
5954 private init empty_init
do end
5956 init init_acallassignexpr
(
5957 n_expr
: nullable AExpr,
5959 n_args
: nullable AExprs,
5960 n_assign
: nullable TAssign,
5961 n_value
: nullable AExpr
5965 _n_expr
= n_expr
.as(not null)
5966 n_expr
.parent
= self
5967 _n_id
= n_id
.as(not null)
5969 _n_args
= n_args
.as(not null)
5970 n_args
.parent
= self
5971 _n_assign
= n_assign
.as(not null)
5972 n_assign
.parent
= self
5973 _n_value
= n_value
.as(not null)
5974 n_value
.parent
= self
5977 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5979 if _n_expr
== old_child
then
5980 if new_child
!= null then
5981 new_child
.parent
= self
5982 assert new_child
isa AExpr
5989 if _n_id
== old_child
then
5990 if new_child
!= null then
5991 new_child
.parent
= self
5992 assert new_child
isa TId
5999 if _n_args
== old_child
then
6000 if new_child
!= null then
6001 new_child
.parent
= self
6002 assert new_child
isa AExprs
6009 if _n_assign
== old_child
then
6010 if new_child
!= null then
6011 new_child
.parent
= self
6012 assert new_child
isa TAssign
6013 _n_assign
= new_child
6019 if _n_value
== old_child
then
6020 if new_child
!= null then
6021 new_child
.parent
= self
6022 assert new_child
isa AExpr
6023 _n_value
= new_child
6031 redef fun visit_all
(v
: Visitor)
6033 v
.enter_visit
(_n_expr
)
6034 v
.enter_visit
(_n_id
)
6035 v
.enter_visit
(_n_args
)
6036 v
.enter_visit
(_n_assign
)
6037 v
.enter_visit
(_n_value
)
6040 redef class ACallReassignExpr
6041 private init empty_init
do end
6043 init init_acallreassignexpr
(
6044 n_expr
: nullable AExpr,
6046 n_args
: nullable AExprs,
6047 n_assign_op
: nullable AAssignOp,
6048 n_value
: nullable AExpr
6052 _n_expr
= n_expr
.as(not null)
6053 n_expr
.parent
= self
6054 _n_id
= n_id
.as(not null)
6056 _n_args
= n_args
.as(not null)
6057 n_args
.parent
= self
6058 _n_assign_op
= n_assign_op
.as(not null)
6059 n_assign_op
.parent
= self
6060 _n_value
= n_value
.as(not null)
6061 n_value
.parent
= self
6064 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6066 if _n_expr
== old_child
then
6067 if new_child
!= null then
6068 new_child
.parent
= self
6069 assert new_child
isa AExpr
6076 if _n_id
== old_child
then
6077 if new_child
!= null then
6078 new_child
.parent
= self
6079 assert new_child
isa TId
6086 if _n_args
== old_child
then
6087 if new_child
!= null then
6088 new_child
.parent
= self
6089 assert new_child
isa AExprs
6096 if _n_assign_op
== old_child
then
6097 if new_child
!= null then
6098 new_child
.parent
= self
6099 assert new_child
isa AAssignOp
6100 _n_assign_op
= new_child
6106 if _n_value
== old_child
then
6107 if new_child
!= null then
6108 new_child
.parent
= self
6109 assert new_child
isa AExpr
6110 _n_value
= new_child
6118 redef fun visit_all
(v
: Visitor)
6120 v
.enter_visit
(_n_expr
)
6121 v
.enter_visit
(_n_id
)
6122 v
.enter_visit
(_n_args
)
6123 v
.enter_visit
(_n_assign_op
)
6124 v
.enter_visit
(_n_value
)
6127 redef class ASuperExpr
6128 private init empty_init
do end
6130 init init_asuperexpr
(
6131 n_qualified
: nullable AQualified,
6132 n_kwsuper
: nullable TKwsuper,
6133 n_args
: nullable AExprs
6137 _n_qualified
= n_qualified
6138 if n_qualified
!= null then
6139 n_qualified
.parent
= self
6141 _n_kwsuper
= n_kwsuper
.as(not null)
6142 n_kwsuper
.parent
= self
6143 _n_args
= n_args
.as(not null)
6144 n_args
.parent
= self
6147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6149 if _n_qualified
== old_child
then
6150 if new_child
!= null then
6151 new_child
.parent
= self
6152 assert new_child
isa AQualified
6153 _n_qualified
= new_child
6159 if _n_kwsuper
== old_child
then
6160 if new_child
!= null then
6161 new_child
.parent
= self
6162 assert new_child
isa TKwsuper
6163 _n_kwsuper
= new_child
6169 if _n_args
== old_child
then
6170 if new_child
!= null then
6171 new_child
.parent
= self
6172 assert new_child
isa AExprs
6181 redef fun visit_all
(v
: Visitor)
6183 if _n_qualified
!= null then
6184 v
.enter_visit
(_n_qualified
.as(not null))
6186 v
.enter_visit
(_n_kwsuper
)
6187 v
.enter_visit
(_n_args
)
6190 redef class AInitExpr
6191 private init empty_init
do end
6193 init init_ainitexpr
(
6194 n_expr
: nullable AExpr,
6195 n_kwinit
: nullable TKwinit,
6196 n_args
: nullable AExprs
6200 _n_expr
= n_expr
.as(not null)
6201 n_expr
.parent
= self
6202 _n_kwinit
= n_kwinit
.as(not null)
6203 n_kwinit
.parent
= self
6204 _n_args
= n_args
.as(not null)
6205 n_args
.parent
= self
6208 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6210 if _n_expr
== old_child
then
6211 if new_child
!= null then
6212 new_child
.parent
= self
6213 assert new_child
isa AExpr
6220 if _n_kwinit
== old_child
then
6221 if new_child
!= null then
6222 new_child
.parent
= self
6223 assert new_child
isa TKwinit
6224 _n_kwinit
= new_child
6230 if _n_args
== old_child
then
6231 if new_child
!= null then
6232 new_child
.parent
= self
6233 assert new_child
isa AExprs
6242 redef fun visit_all
(v
: Visitor)
6244 v
.enter_visit
(_n_expr
)
6245 v
.enter_visit
(_n_kwinit
)
6246 v
.enter_visit
(_n_args
)
6249 redef class ABraExpr
6250 private init empty_init
do end
6252 init init_abraexpr
(
6253 n_expr
: nullable AExpr,
6254 n_args
: nullable AExprs,
6255 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
6259 _n_expr
= n_expr
.as(not null)
6260 n_expr
.parent
= self
6261 _n_args
= n_args
.as(not null)
6262 n_args
.parent
= self
6263 for n
in n_closure_defs
do
6264 assert n
isa AClosureDef
6265 _n_closure_defs
.add
(n
)
6270 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6272 if _n_expr
== old_child
then
6273 if new_child
!= null then
6274 new_child
.parent
= self
6275 assert new_child
isa AExpr
6282 if _n_args
== old_child
then
6283 if new_child
!= null then
6284 new_child
.parent
= self
6285 assert new_child
isa AExprs
6292 for i
in [0.._n_closure_defs
.length
[ do
6293 if _n_closure_defs
[i
] == old_child
then
6294 if new_child
!= null then
6295 assert new_child
isa AClosureDef
6296 _n_closure_defs
[i
] = new_child
6297 new_child
.parent
= self
6299 _n_closure_defs
.remove_at
(i
)
6306 redef fun visit_all
(v
: Visitor)
6308 v
.enter_visit
(_n_expr
)
6309 v
.enter_visit
(_n_args
)
6310 for n
in _n_closure_defs
do
6315 redef class ABraAssignExpr
6316 private init empty_init
do end
6318 init init_abraassignexpr
(
6319 n_expr
: nullable AExpr,
6320 n_args
: nullable AExprs,
6321 n_assign
: nullable TAssign,
6322 n_value
: nullable AExpr
6326 _n_expr
= n_expr
.as(not null)
6327 n_expr
.parent
= self
6328 _n_args
= n_args
.as(not null)
6329 n_args
.parent
= self
6330 _n_assign
= n_assign
.as(not null)
6331 n_assign
.parent
= self
6332 _n_value
= n_value
.as(not null)
6333 n_value
.parent
= self
6336 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6338 if _n_expr
== old_child
then
6339 if new_child
!= null then
6340 new_child
.parent
= self
6341 assert new_child
isa AExpr
6348 if _n_args
== old_child
then
6349 if new_child
!= null then
6350 new_child
.parent
= self
6351 assert new_child
isa AExprs
6358 if _n_assign
== old_child
then
6359 if new_child
!= null then
6360 new_child
.parent
= self
6361 assert new_child
isa TAssign
6362 _n_assign
= new_child
6368 if _n_value
== old_child
then
6369 if new_child
!= null then
6370 new_child
.parent
= self
6371 assert new_child
isa AExpr
6372 _n_value
= new_child
6380 redef fun visit_all
(v
: Visitor)
6382 v
.enter_visit
(_n_expr
)
6383 v
.enter_visit
(_n_args
)
6384 v
.enter_visit
(_n_assign
)
6385 v
.enter_visit
(_n_value
)
6388 redef class ABraReassignExpr
6389 private init empty_init
do end
6391 init init_abrareassignexpr
(
6392 n_expr
: nullable AExpr,
6393 n_args
: nullable AExprs,
6394 n_assign_op
: nullable AAssignOp,
6395 n_value
: nullable AExpr
6399 _n_expr
= n_expr
.as(not null)
6400 n_expr
.parent
= self
6401 _n_args
= n_args
.as(not null)
6402 n_args
.parent
= self
6403 _n_assign_op
= n_assign_op
.as(not null)
6404 n_assign_op
.parent
= self
6405 _n_value
= n_value
.as(not null)
6406 n_value
.parent
= self
6409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6411 if _n_expr
== old_child
then
6412 if new_child
!= null then
6413 new_child
.parent
= self
6414 assert new_child
isa AExpr
6421 if _n_args
== old_child
then
6422 if new_child
!= null then
6423 new_child
.parent
= self
6424 assert new_child
isa AExprs
6431 if _n_assign_op
== old_child
then
6432 if new_child
!= null then
6433 new_child
.parent
= self
6434 assert new_child
isa AAssignOp
6435 _n_assign_op
= new_child
6441 if _n_value
== old_child
then
6442 if new_child
!= null then
6443 new_child
.parent
= self
6444 assert new_child
isa AExpr
6445 _n_value
= new_child
6453 redef fun visit_all
(v
: Visitor)
6455 v
.enter_visit
(_n_expr
)
6456 v
.enter_visit
(_n_args
)
6457 v
.enter_visit
(_n_assign_op
)
6458 v
.enter_visit
(_n_value
)
6461 redef class AClosureCallExpr
6462 private init empty_init
do end
6464 init init_aclosurecallexpr
(
6466 n_args
: nullable AExprs,
6467 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
6471 _n_id
= n_id
.as(not null)
6473 _n_args
= n_args
.as(not null)
6474 n_args
.parent
= self
6475 for n
in n_closure_defs
do
6476 assert n
isa AClosureDef
6477 _n_closure_defs
.add
(n
)
6482 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6484 if _n_id
== old_child
then
6485 if new_child
!= null then
6486 new_child
.parent
= self
6487 assert new_child
isa TId
6494 if _n_args
== old_child
then
6495 if new_child
!= null then
6496 new_child
.parent
= self
6497 assert new_child
isa AExprs
6504 for i
in [0.._n_closure_defs
.length
[ do
6505 if _n_closure_defs
[i
] == old_child
then
6506 if new_child
!= null then
6507 assert new_child
isa AClosureDef
6508 _n_closure_defs
[i
] = new_child
6509 new_child
.parent
= self
6511 _n_closure_defs
.remove_at
(i
)
6518 redef fun visit_all
(v
: Visitor)
6520 v
.enter_visit
(_n_id
)
6521 v
.enter_visit
(_n_args
)
6522 for n
in _n_closure_defs
do
6527 redef class AVarExpr
6528 private init empty_init
do end
6530 init init_avarexpr
(
6535 _n_id
= n_id
.as(not null)
6539 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6541 if _n_id
== old_child
then
6542 if new_child
!= null then
6543 new_child
.parent
= self
6544 assert new_child
isa TId
6553 redef fun visit_all
(v
: Visitor)
6555 v
.enter_visit
(_n_id
)
6558 redef class AVarAssignExpr
6559 private init empty_init
do end
6561 init init_avarassignexpr
(
6563 n_assign
: nullable TAssign,
6564 n_value
: nullable AExpr
6568 _n_id
= n_id
.as(not null)
6570 _n_assign
= n_assign
.as(not null)
6571 n_assign
.parent
= self
6572 _n_value
= n_value
.as(not null)
6573 n_value
.parent
= self
6576 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6578 if _n_id
== old_child
then
6579 if new_child
!= null then
6580 new_child
.parent
= self
6581 assert new_child
isa TId
6588 if _n_assign
== old_child
then
6589 if new_child
!= null then
6590 new_child
.parent
= self
6591 assert new_child
isa TAssign
6592 _n_assign
= new_child
6598 if _n_value
== old_child
then
6599 if new_child
!= null then
6600 new_child
.parent
= self
6601 assert new_child
isa AExpr
6602 _n_value
= new_child
6610 redef fun visit_all
(v
: Visitor)
6612 v
.enter_visit
(_n_id
)
6613 v
.enter_visit
(_n_assign
)
6614 v
.enter_visit
(_n_value
)
6617 redef class AVarReassignExpr
6618 private init empty_init
do end
6620 init init_avarreassignexpr
(
6622 n_assign_op
: nullable AAssignOp,
6623 n_value
: nullable AExpr
6627 _n_id
= n_id
.as(not null)
6629 _n_assign_op
= n_assign_op
.as(not null)
6630 n_assign_op
.parent
= self
6631 _n_value
= n_value
.as(not null)
6632 n_value
.parent
= self
6635 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6637 if _n_id
== old_child
then
6638 if new_child
!= null then
6639 new_child
.parent
= self
6640 assert new_child
isa TId
6647 if _n_assign_op
== old_child
then
6648 if new_child
!= null then
6649 new_child
.parent
= self
6650 assert new_child
isa AAssignOp
6651 _n_assign_op
= new_child
6657 if _n_value
== old_child
then
6658 if new_child
!= null then
6659 new_child
.parent
= self
6660 assert new_child
isa AExpr
6661 _n_value
= new_child
6669 redef fun visit_all
(v
: Visitor)
6671 v
.enter_visit
(_n_id
)
6672 v
.enter_visit
(_n_assign_op
)
6673 v
.enter_visit
(_n_value
)
6676 redef class ARangeExpr
6677 private init empty_init
do end
6679 init init_arangeexpr
(
6680 n_expr
: nullable AExpr,
6681 n_expr2
: nullable AExpr,
6682 n_annotations
: nullable AAnnotations
6686 _n_expr
= n_expr
.as(not null)
6687 n_expr
.parent
= self
6688 _n_expr2
= n_expr2
.as(not null)
6689 n_expr2
.parent
= self
6690 _n_annotations
= n_annotations
6691 if n_annotations
!= null then
6692 n_annotations
.parent
= self
6696 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6698 if _n_expr
== old_child
then
6699 if new_child
!= null then
6700 new_child
.parent
= self
6701 assert new_child
isa AExpr
6708 if _n_expr2
== old_child
then
6709 if new_child
!= null then
6710 new_child
.parent
= self
6711 assert new_child
isa AExpr
6712 _n_expr2
= new_child
6718 if _n_annotations
== old_child
then
6719 if new_child
!= null then
6720 new_child
.parent
= self
6721 assert new_child
isa AAnnotations
6722 _n_annotations
= new_child
6724 _n_annotations
= null
6730 redef fun visit_all
(v
: Visitor)
6732 v
.enter_visit
(_n_expr
)
6733 v
.enter_visit
(_n_expr2
)
6734 if _n_annotations
!= null then
6735 v
.enter_visit
(_n_annotations
.as(not null))
6739 redef class ACrangeExpr
6740 private init empty_init
do end
6742 init init_acrangeexpr
(
6743 n_obra
: nullable TObra,
6744 n_expr
: nullable AExpr,
6745 n_expr2
: nullable AExpr,
6746 n_cbra
: nullable TCbra,
6747 n_annotations
: nullable AAnnotations
6751 _n_obra
= n_obra
.as(not null)
6752 n_obra
.parent
= self
6753 _n_expr
= n_expr
.as(not null)
6754 n_expr
.parent
= self
6755 _n_expr2
= n_expr2
.as(not null)
6756 n_expr2
.parent
= self
6757 _n_cbra
= n_cbra
.as(not null)
6758 n_cbra
.parent
= self
6759 _n_annotations
= n_annotations
6760 if n_annotations
!= null then
6761 n_annotations
.parent
= self
6765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6767 if _n_obra
== old_child
then
6768 if new_child
!= null then
6769 new_child
.parent
= self
6770 assert new_child
isa TObra
6777 if _n_expr
== old_child
then
6778 if new_child
!= null then
6779 new_child
.parent
= self
6780 assert new_child
isa AExpr
6787 if _n_expr2
== old_child
then
6788 if new_child
!= null then
6789 new_child
.parent
= self
6790 assert new_child
isa AExpr
6791 _n_expr2
= new_child
6797 if _n_cbra
== old_child
then
6798 if new_child
!= null then
6799 new_child
.parent
= self
6800 assert new_child
isa TCbra
6807 if _n_annotations
== old_child
then
6808 if new_child
!= null then
6809 new_child
.parent
= self
6810 assert new_child
isa AAnnotations
6811 _n_annotations
= new_child
6813 _n_annotations
= null
6819 redef fun visit_all
(v
: Visitor)
6821 v
.enter_visit
(_n_obra
)
6822 v
.enter_visit
(_n_expr
)
6823 v
.enter_visit
(_n_expr2
)
6824 v
.enter_visit
(_n_cbra
)
6825 if _n_annotations
!= null then
6826 v
.enter_visit
(_n_annotations
.as(not null))
6830 redef class AOrangeExpr
6831 private init empty_init
do end
6833 init init_aorangeexpr
(
6834 n_obra
: nullable TObra,
6835 n_expr
: nullable AExpr,
6836 n_expr2
: nullable AExpr,
6837 n_cbra
: nullable TObra,
6838 n_annotations
: nullable AAnnotations
6842 _n_obra
= n_obra
.as(not null)
6843 n_obra
.parent
= self
6844 _n_expr
= n_expr
.as(not null)
6845 n_expr
.parent
= self
6846 _n_expr2
= n_expr2
.as(not null)
6847 n_expr2
.parent
= self
6848 _n_cbra
= n_cbra
.as(not null)
6849 n_cbra
.parent
= self
6850 _n_annotations
= n_annotations
6851 if n_annotations
!= null then
6852 n_annotations
.parent
= self
6856 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6858 if _n_obra
== old_child
then
6859 if new_child
!= null then
6860 new_child
.parent
= self
6861 assert new_child
isa TObra
6868 if _n_expr
== old_child
then
6869 if new_child
!= null then
6870 new_child
.parent
= self
6871 assert new_child
isa AExpr
6878 if _n_expr2
== old_child
then
6879 if new_child
!= null then
6880 new_child
.parent
= self
6881 assert new_child
isa AExpr
6882 _n_expr2
= new_child
6888 if _n_cbra
== old_child
then
6889 if new_child
!= null then
6890 new_child
.parent
= self
6891 assert new_child
isa TObra
6898 if _n_annotations
== old_child
then
6899 if new_child
!= null then
6900 new_child
.parent
= self
6901 assert new_child
isa AAnnotations
6902 _n_annotations
= new_child
6904 _n_annotations
= null
6910 redef fun visit_all
(v
: Visitor)
6912 v
.enter_visit
(_n_obra
)
6913 v
.enter_visit
(_n_expr
)
6914 v
.enter_visit
(_n_expr2
)
6915 v
.enter_visit
(_n_cbra
)
6916 if _n_annotations
!= null then
6917 v
.enter_visit
(_n_annotations
.as(not null))
6921 redef class AArrayExpr
6922 private init empty_init
do end
6924 init init_aarrayexpr
(
6925 n_exprs
: nullable AExprs,
6926 n_annotations
: nullable AAnnotations
6930 _n_exprs
= n_exprs
.as(not null)
6931 n_exprs
.parent
= self
6932 _n_annotations
= n_annotations
6933 if n_annotations
!= null then
6934 n_annotations
.parent
= self
6938 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6940 if _n_exprs
== old_child
then
6941 if new_child
!= null then
6942 new_child
.parent
= self
6943 assert new_child
isa AExprs
6944 _n_exprs
= new_child
6950 if _n_annotations
== old_child
then
6951 if new_child
!= null then
6952 new_child
.parent
= self
6953 assert new_child
isa AAnnotations
6954 _n_annotations
= new_child
6956 _n_annotations
= null
6962 redef fun visit_all
(v
: Visitor)
6964 v
.enter_visit
(_n_exprs
)
6965 if _n_annotations
!= null then
6966 v
.enter_visit
(_n_annotations
.as(not null))
6970 redef class ASelfExpr
6971 private init empty_init
do end
6973 init init_aselfexpr
(
6974 n_kwself
: nullable TKwself,
6975 n_annotations
: nullable AAnnotations
6979 _n_kwself
= n_kwself
.as(not null)
6980 n_kwself
.parent
= self
6981 _n_annotations
= n_annotations
6982 if n_annotations
!= null then
6983 n_annotations
.parent
= self
6987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6989 if _n_kwself
== old_child
then
6990 if new_child
!= null then
6991 new_child
.parent
= self
6992 assert new_child
isa TKwself
6993 _n_kwself
= new_child
6999 if _n_annotations
== old_child
then
7000 if new_child
!= null then
7001 new_child
.parent
= self
7002 assert new_child
isa AAnnotations
7003 _n_annotations
= new_child
7005 _n_annotations
= null
7011 redef fun visit_all
(v
: Visitor)
7013 v
.enter_visit
(_n_kwself
)
7014 if _n_annotations
!= null then
7015 v
.enter_visit
(_n_annotations
.as(not null))
7019 redef class AImplicitSelfExpr
7020 private init empty_init
do end
7022 init init_aimplicitselfexpr
7027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7031 redef fun visit_all
(v
: Visitor)
7035 redef class ATrueExpr
7036 private init empty_init
do end
7038 init init_atrueexpr
(
7039 n_kwtrue
: nullable TKwtrue,
7040 n_annotations
: nullable AAnnotations
7044 _n_kwtrue
= n_kwtrue
.as(not null)
7045 n_kwtrue
.parent
= self
7046 _n_annotations
= n_annotations
7047 if n_annotations
!= null then
7048 n_annotations
.parent
= self
7052 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7054 if _n_kwtrue
== old_child
then
7055 if new_child
!= null then
7056 new_child
.parent
= self
7057 assert new_child
isa TKwtrue
7058 _n_kwtrue
= new_child
7064 if _n_annotations
== old_child
then
7065 if new_child
!= null then
7066 new_child
.parent
= self
7067 assert new_child
isa AAnnotations
7068 _n_annotations
= new_child
7070 _n_annotations
= null
7076 redef fun visit_all
(v
: Visitor)
7078 v
.enter_visit
(_n_kwtrue
)
7079 if _n_annotations
!= null then
7080 v
.enter_visit
(_n_annotations
.as(not null))
7084 redef class AFalseExpr
7085 private init empty_init
do end
7087 init init_afalseexpr
(
7088 n_kwfalse
: nullable TKwfalse,
7089 n_annotations
: nullable AAnnotations
7093 _n_kwfalse
= n_kwfalse
.as(not null)
7094 n_kwfalse
.parent
= self
7095 _n_annotations
= n_annotations
7096 if n_annotations
!= null then
7097 n_annotations
.parent
= self
7101 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7103 if _n_kwfalse
== old_child
then
7104 if new_child
!= null then
7105 new_child
.parent
= self
7106 assert new_child
isa TKwfalse
7107 _n_kwfalse
= new_child
7113 if _n_annotations
== old_child
then
7114 if new_child
!= null then
7115 new_child
.parent
= self
7116 assert new_child
isa AAnnotations
7117 _n_annotations
= new_child
7119 _n_annotations
= null
7125 redef fun visit_all
(v
: Visitor)
7127 v
.enter_visit
(_n_kwfalse
)
7128 if _n_annotations
!= null then
7129 v
.enter_visit
(_n_annotations
.as(not null))
7133 redef class ANullExpr
7134 private init empty_init
do end
7136 init init_anullexpr
(
7137 n_kwnull
: nullable TKwnull,
7138 n_annotations
: nullable AAnnotations
7142 _n_kwnull
= n_kwnull
.as(not null)
7143 n_kwnull
.parent
= self
7144 _n_annotations
= n_annotations
7145 if n_annotations
!= null then
7146 n_annotations
.parent
= self
7150 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7152 if _n_kwnull
== old_child
then
7153 if new_child
!= null then
7154 new_child
.parent
= self
7155 assert new_child
isa TKwnull
7156 _n_kwnull
= new_child
7162 if _n_annotations
== old_child
then
7163 if new_child
!= null then
7164 new_child
.parent
= self
7165 assert new_child
isa AAnnotations
7166 _n_annotations
= new_child
7168 _n_annotations
= null
7174 redef fun visit_all
(v
: Visitor)
7176 v
.enter_visit
(_n_kwnull
)
7177 if _n_annotations
!= null then
7178 v
.enter_visit
(_n_annotations
.as(not null))
7182 redef class AIntExpr
7183 private init empty_init
do end
7185 init init_aintexpr
(
7186 n_number
: nullable TNumber,
7187 n_annotations
: nullable AAnnotations
7191 _n_number
= n_number
.as(not null)
7192 n_number
.parent
= self
7193 _n_annotations
= n_annotations
7194 if n_annotations
!= null then
7195 n_annotations
.parent
= self
7199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7201 if _n_number
== old_child
then
7202 if new_child
!= null then
7203 new_child
.parent
= self
7204 assert new_child
isa TNumber
7205 _n_number
= new_child
7211 if _n_annotations
== old_child
then
7212 if new_child
!= null then
7213 new_child
.parent
= self
7214 assert new_child
isa AAnnotations
7215 _n_annotations
= new_child
7217 _n_annotations
= null
7223 redef fun visit_all
(v
: Visitor)
7225 v
.enter_visit
(_n_number
)
7226 if _n_annotations
!= null then
7227 v
.enter_visit
(_n_annotations
.as(not null))
7231 redef class AFloatExpr
7232 private init empty_init
do end
7234 init init_afloatexpr
(
7235 n_float
: nullable TFloat,
7236 n_annotations
: nullable AAnnotations
7240 _n_float
= n_float
.as(not null)
7241 n_float
.parent
= self
7242 _n_annotations
= n_annotations
7243 if n_annotations
!= null then
7244 n_annotations
.parent
= self
7248 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7250 if _n_float
== old_child
then
7251 if new_child
!= null then
7252 new_child
.parent
= self
7253 assert new_child
isa TFloat
7254 _n_float
= new_child
7260 if _n_annotations
== old_child
then
7261 if new_child
!= null then
7262 new_child
.parent
= self
7263 assert new_child
isa AAnnotations
7264 _n_annotations
= new_child
7266 _n_annotations
= null
7272 redef fun visit_all
(v
: Visitor)
7274 v
.enter_visit
(_n_float
)
7275 if _n_annotations
!= null then
7276 v
.enter_visit
(_n_annotations
.as(not null))
7280 redef class ACharExpr
7281 private init empty_init
do end
7283 init init_acharexpr
(
7284 n_char
: nullable TChar,
7285 n_annotations
: nullable AAnnotations
7289 _n_char
= n_char
.as(not null)
7290 n_char
.parent
= self
7291 _n_annotations
= n_annotations
7292 if n_annotations
!= null then
7293 n_annotations
.parent
= self
7297 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7299 if _n_char
== old_child
then
7300 if new_child
!= null then
7301 new_child
.parent
= self
7302 assert new_child
isa TChar
7309 if _n_annotations
== old_child
then
7310 if new_child
!= null then
7311 new_child
.parent
= self
7312 assert new_child
isa AAnnotations
7313 _n_annotations
= new_child
7315 _n_annotations
= null
7321 redef fun visit_all
(v
: Visitor)
7323 v
.enter_visit
(_n_char
)
7324 if _n_annotations
!= null then
7325 v
.enter_visit
(_n_annotations
.as(not null))
7329 redef class AStringExpr
7330 private init empty_init
do end
7332 init init_astringexpr
(
7333 n_string
: nullable TString,
7334 n_annotations
: nullable AAnnotations
7338 _n_string
= n_string
.as(not null)
7339 n_string
.parent
= self
7340 _n_annotations
= n_annotations
7341 if n_annotations
!= null then
7342 n_annotations
.parent
= self
7346 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7348 if _n_string
== old_child
then
7349 if new_child
!= null then
7350 new_child
.parent
= self
7351 assert new_child
isa TString
7352 _n_string
= new_child
7358 if _n_annotations
== old_child
then
7359 if new_child
!= null then
7360 new_child
.parent
= self
7361 assert new_child
isa AAnnotations
7362 _n_annotations
= new_child
7364 _n_annotations
= null
7370 redef fun visit_all
(v
: Visitor)
7372 v
.enter_visit
(_n_string
)
7373 if _n_annotations
!= null then
7374 v
.enter_visit
(_n_annotations
.as(not null))
7378 redef class AStartStringExpr
7379 private init empty_init
do end
7381 init init_astartstringexpr
(
7382 n_string
: nullable TStartString
7386 _n_string
= n_string
.as(not null)
7387 n_string
.parent
= self
7390 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7392 if _n_string
== old_child
then
7393 if new_child
!= null then
7394 new_child
.parent
= self
7395 assert new_child
isa TStartString
7396 _n_string
= new_child
7404 redef fun visit_all
(v
: Visitor)
7406 v
.enter_visit
(_n_string
)
7409 redef class AMidStringExpr
7410 private init empty_init
do end
7412 init init_amidstringexpr
(
7413 n_string
: nullable TMidString
7417 _n_string
= n_string
.as(not null)
7418 n_string
.parent
= self
7421 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7423 if _n_string
== old_child
then
7424 if new_child
!= null then
7425 new_child
.parent
= self
7426 assert new_child
isa TMidString
7427 _n_string
= new_child
7435 redef fun visit_all
(v
: Visitor)
7437 v
.enter_visit
(_n_string
)
7440 redef class AEndStringExpr
7441 private init empty_init
do end
7443 init init_aendstringexpr
(
7444 n_string
: nullable TEndString
7448 _n_string
= n_string
.as(not null)
7449 n_string
.parent
= self
7452 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7454 if _n_string
== old_child
then
7455 if new_child
!= null then
7456 new_child
.parent
= self
7457 assert new_child
isa TEndString
7458 _n_string
= new_child
7466 redef fun visit_all
(v
: Visitor)
7468 v
.enter_visit
(_n_string
)
7471 redef class ASuperstringExpr
7472 private init empty_init
do end
7474 init init_asuperstringexpr
(
7475 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7476 n_annotations
: nullable AAnnotations
7485 _n_annotations
= n_annotations
7486 if n_annotations
!= null then
7487 n_annotations
.parent
= self
7491 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7493 for i
in [0.._n_exprs
.length
[ do
7494 if _n_exprs
[i
] == old_child
then
7495 if new_child
!= null then
7496 assert new_child
isa AExpr
7497 _n_exprs
[i
] = new_child
7498 new_child
.parent
= self
7500 _n_exprs
.remove_at
(i
)
7505 if _n_annotations
== old_child
then
7506 if new_child
!= null then
7507 new_child
.parent
= self
7508 assert new_child
isa AAnnotations
7509 _n_annotations
= new_child
7511 _n_annotations
= null
7517 redef fun visit_all
(v
: Visitor)
7519 for n
in _n_exprs
do
7522 if _n_annotations
!= null then
7523 v
.enter_visit
(_n_annotations
.as(not null))
7527 redef class AParExpr
7528 private init empty_init
do end
7530 init init_aparexpr
(
7531 n_opar
: nullable TOpar,
7532 n_expr
: nullable AExpr,
7533 n_cpar
: nullable TCpar,
7534 n_annotations
: nullable AAnnotations
7538 _n_opar
= n_opar
.as(not null)
7539 n_opar
.parent
= self
7540 _n_expr
= n_expr
.as(not null)
7541 n_expr
.parent
= self
7542 _n_cpar
= n_cpar
.as(not null)
7543 n_cpar
.parent
= self
7544 _n_annotations
= n_annotations
7545 if n_annotations
!= null then
7546 n_annotations
.parent
= self
7550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7552 if _n_opar
== old_child
then
7553 if new_child
!= null then
7554 new_child
.parent
= self
7555 assert new_child
isa TOpar
7562 if _n_expr
== old_child
then
7563 if new_child
!= null then
7564 new_child
.parent
= self
7565 assert new_child
isa AExpr
7572 if _n_cpar
== old_child
then
7573 if new_child
!= null then
7574 new_child
.parent
= self
7575 assert new_child
isa TCpar
7582 if _n_annotations
== old_child
then
7583 if new_child
!= null then
7584 new_child
.parent
= self
7585 assert new_child
isa AAnnotations
7586 _n_annotations
= new_child
7588 _n_annotations
= null
7594 redef fun visit_all
(v
: Visitor)
7596 v
.enter_visit
(_n_opar
)
7597 v
.enter_visit
(_n_expr
)
7598 v
.enter_visit
(_n_cpar
)
7599 if _n_annotations
!= null then
7600 v
.enter_visit
(_n_annotations
.as(not null))
7604 redef class AAsCastExpr
7605 private init empty_init
do end
7607 init init_aascastexpr
(
7608 n_expr
: nullable AExpr,
7609 n_kwas
: nullable TKwas,
7610 n_opar
: nullable TOpar,
7611 n_type
: nullable AType,
7612 n_cpar
: nullable TCpar
7616 _n_expr
= n_expr
.as(not null)
7617 n_expr
.parent
= self
7618 _n_kwas
= n_kwas
.as(not null)
7619 n_kwas
.parent
= self
7620 _n_opar
= n_opar
.as(not null)
7621 n_opar
.parent
= self
7622 _n_type
= n_type
.as(not null)
7623 n_type
.parent
= self
7624 _n_cpar
= n_cpar
.as(not null)
7625 n_cpar
.parent
= self
7628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7630 if _n_expr
== old_child
then
7631 if new_child
!= null then
7632 new_child
.parent
= self
7633 assert new_child
isa AExpr
7640 if _n_kwas
== old_child
then
7641 if new_child
!= null then
7642 new_child
.parent
= self
7643 assert new_child
isa TKwas
7650 if _n_opar
== old_child
then
7651 if new_child
!= null then
7652 new_child
.parent
= self
7653 assert new_child
isa TOpar
7660 if _n_type
== old_child
then
7661 if new_child
!= null then
7662 new_child
.parent
= self
7663 assert new_child
isa AType
7670 if _n_cpar
== old_child
then
7671 if new_child
!= null then
7672 new_child
.parent
= self
7673 assert new_child
isa TCpar
7682 redef fun visit_all
(v
: Visitor)
7684 v
.enter_visit
(_n_expr
)
7685 v
.enter_visit
(_n_kwas
)
7686 v
.enter_visit
(_n_opar
)
7687 v
.enter_visit
(_n_type
)
7688 v
.enter_visit
(_n_cpar
)
7691 redef class AAsNotnullExpr
7692 private init empty_init
do end
7694 init init_aasnotnullexpr
(
7695 n_expr
: nullable AExpr,
7696 n_kwas
: nullable TKwas,
7697 n_opar
: nullable TOpar,
7698 n_kwnot
: nullable TKwnot,
7699 n_kwnull
: nullable TKwnull,
7700 n_cpar
: nullable TCpar
7704 _n_expr
= n_expr
.as(not null)
7705 n_expr
.parent
= self
7706 _n_kwas
= n_kwas
.as(not null)
7707 n_kwas
.parent
= self
7708 _n_opar
= n_opar
.as(not null)
7709 n_opar
.parent
= self
7710 _n_kwnot
= n_kwnot
.as(not null)
7711 n_kwnot
.parent
= self
7712 _n_kwnull
= n_kwnull
.as(not null)
7713 n_kwnull
.parent
= self
7714 _n_cpar
= n_cpar
.as(not null)
7715 n_cpar
.parent
= self
7718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7720 if _n_expr
== old_child
then
7721 if new_child
!= null then
7722 new_child
.parent
= self
7723 assert new_child
isa AExpr
7730 if _n_kwas
== old_child
then
7731 if new_child
!= null then
7732 new_child
.parent
= self
7733 assert new_child
isa TKwas
7740 if _n_opar
== old_child
then
7741 if new_child
!= null then
7742 new_child
.parent
= self
7743 assert new_child
isa TOpar
7750 if _n_kwnot
== old_child
then
7751 if new_child
!= null then
7752 new_child
.parent
= self
7753 assert new_child
isa TKwnot
7754 _n_kwnot
= new_child
7760 if _n_kwnull
== old_child
then
7761 if new_child
!= null then
7762 new_child
.parent
= self
7763 assert new_child
isa TKwnull
7764 _n_kwnull
= new_child
7770 if _n_cpar
== old_child
then
7771 if new_child
!= null then
7772 new_child
.parent
= self
7773 assert new_child
isa TCpar
7782 redef fun visit_all
(v
: Visitor)
7784 v
.enter_visit
(_n_expr
)
7785 v
.enter_visit
(_n_kwas
)
7786 v
.enter_visit
(_n_opar
)
7787 v
.enter_visit
(_n_kwnot
)
7788 v
.enter_visit
(_n_kwnull
)
7789 v
.enter_visit
(_n_cpar
)
7792 redef class AIssetAttrExpr
7793 private init empty_init
do end
7795 init init_aissetattrexpr
(
7796 n_kwisset
: nullable TKwisset,
7797 n_expr
: nullable AExpr,
7798 n_id
: nullable TAttrid
7802 _n_kwisset
= n_kwisset
.as(not null)
7803 n_kwisset
.parent
= self
7804 _n_expr
= n_expr
.as(not null)
7805 n_expr
.parent
= self
7806 _n_id
= n_id
.as(not null)
7810 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7812 if _n_kwisset
== old_child
then
7813 if new_child
!= null then
7814 new_child
.parent
= self
7815 assert new_child
isa TKwisset
7816 _n_kwisset
= new_child
7822 if _n_expr
== old_child
then
7823 if new_child
!= null then
7824 new_child
.parent
= self
7825 assert new_child
isa AExpr
7832 if _n_id
== old_child
then
7833 if new_child
!= null then
7834 new_child
.parent
= self
7835 assert new_child
isa TAttrid
7844 redef fun visit_all
(v
: Visitor)
7846 v
.enter_visit
(_n_kwisset
)
7847 v
.enter_visit
(_n_expr
)
7848 v
.enter_visit
(_n_id
)
7851 redef class ADebugTypeExpr
7852 private init empty_init
do end
7854 init init_adebugtypeexpr
(
7855 n_kwdebug
: nullable TKwdebug,
7856 n_kwtype
: nullable TKwtype,
7857 n_expr
: nullable AExpr,
7858 n_type
: nullable AType
7862 _n_kwdebug
= n_kwdebug
.as(not null)
7863 n_kwdebug
.parent
= self
7864 _n_kwtype
= n_kwtype
.as(not null)
7865 n_kwtype
.parent
= self
7866 _n_expr
= n_expr
.as(not null)
7867 n_expr
.parent
= self
7868 _n_type
= n_type
.as(not null)
7869 n_type
.parent
= self
7872 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7874 if _n_kwdebug
== old_child
then
7875 if new_child
!= null then
7876 new_child
.parent
= self
7877 assert new_child
isa TKwdebug
7878 _n_kwdebug
= new_child
7884 if _n_kwtype
== old_child
then
7885 if new_child
!= null then
7886 new_child
.parent
= self
7887 assert new_child
isa TKwtype
7888 _n_kwtype
= new_child
7894 if _n_expr
== old_child
then
7895 if new_child
!= null then
7896 new_child
.parent
= self
7897 assert new_child
isa AExpr
7904 if _n_type
== old_child
then
7905 if new_child
!= null then
7906 new_child
.parent
= self
7907 assert new_child
isa AType
7916 redef fun visit_all
(v
: Visitor)
7918 v
.enter_visit
(_n_kwdebug
)
7919 v
.enter_visit
(_n_kwtype
)
7920 v
.enter_visit
(_n_expr
)
7921 v
.enter_visit
(_n_type
)
7924 redef class AListExprs
7925 private init empty_init
do end
7927 init init_alistexprs
(
7928 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7939 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7941 for i
in [0.._n_exprs
.length
[ do
7942 if _n_exprs
[i
] == old_child
then
7943 if new_child
!= null then
7944 assert new_child
isa AExpr
7945 _n_exprs
[i
] = new_child
7946 new_child
.parent
= self
7948 _n_exprs
.remove_at
(i
)
7955 redef fun visit_all
(v
: Visitor)
7957 for n
in _n_exprs
do
7962 redef class AParExprs
7963 private init empty_init
do end
7965 init init_aparexprs
(
7966 n_opar
: nullable TOpar,
7967 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7968 n_cpar
: nullable TCpar
7972 _n_opar
= n_opar
.as(not null)
7973 n_opar
.parent
= self
7979 _n_cpar
= n_cpar
.as(not null)
7980 n_cpar
.parent
= self
7983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7985 if _n_opar
== old_child
then
7986 if new_child
!= null then
7987 new_child
.parent
= self
7988 assert new_child
isa TOpar
7995 for i
in [0.._n_exprs
.length
[ do
7996 if _n_exprs
[i
] == old_child
then
7997 if new_child
!= null then
7998 assert new_child
isa AExpr
7999 _n_exprs
[i
] = new_child
8000 new_child
.parent
= self
8002 _n_exprs
.remove_at
(i
)
8007 if _n_cpar
== old_child
then
8008 if new_child
!= null then
8009 new_child
.parent
= self
8010 assert new_child
isa TCpar
8019 redef fun visit_all
(v
: Visitor)
8021 v
.enter_visit
(_n_opar
)
8022 for n
in _n_exprs
do
8025 v
.enter_visit
(_n_cpar
)
8028 redef class ABraExprs
8029 private init empty_init
do end
8031 init init_abraexprs
(
8032 n_obra
: nullable TObra,
8033 n_exprs
: Collection[Object], # Should be Collection[AExpr]
8034 n_cbra
: nullable TCbra
8038 _n_obra
= n_obra
.as(not null)
8039 n_obra
.parent
= self
8045 _n_cbra
= n_cbra
.as(not null)
8046 n_cbra
.parent
= self
8049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8051 if _n_obra
== old_child
then
8052 if new_child
!= null then
8053 new_child
.parent
= self
8054 assert new_child
isa TObra
8061 for i
in [0.._n_exprs
.length
[ do
8062 if _n_exprs
[i
] == old_child
then
8063 if new_child
!= null then
8064 assert new_child
isa AExpr
8065 _n_exprs
[i
] = new_child
8066 new_child
.parent
= self
8068 _n_exprs
.remove_at
(i
)
8073 if _n_cbra
== old_child
then
8074 if new_child
!= null then
8075 new_child
.parent
= self
8076 assert new_child
isa TCbra
8085 redef fun visit_all
(v
: Visitor)
8087 v
.enter_visit
(_n_obra
)
8088 for n
in _n_exprs
do
8091 v
.enter_visit
(_n_cbra
)
8094 redef class APlusAssignOp
8095 private init empty_init
do end
8097 init init_aplusassignop
(
8098 n_pluseq
: nullable TPluseq
8102 _n_pluseq
= n_pluseq
.as(not null)
8103 n_pluseq
.parent
= self
8106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8108 if _n_pluseq
== old_child
then
8109 if new_child
!= null then
8110 new_child
.parent
= self
8111 assert new_child
isa TPluseq
8112 _n_pluseq
= new_child
8120 redef fun visit_all
(v
: Visitor)
8122 v
.enter_visit
(_n_pluseq
)
8125 redef class AMinusAssignOp
8126 private init empty_init
do end
8128 init init_aminusassignop
(
8129 n_minuseq
: nullable TMinuseq
8133 _n_minuseq
= n_minuseq
.as(not null)
8134 n_minuseq
.parent
= self
8137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8139 if _n_minuseq
== old_child
then
8140 if new_child
!= null then
8141 new_child
.parent
= self
8142 assert new_child
isa TMinuseq
8143 _n_minuseq
= new_child
8151 redef fun visit_all
(v
: Visitor)
8153 v
.enter_visit
(_n_minuseq
)
8156 redef class AClosureDef
8157 private init empty_init
do end
8159 init init_aclosuredef
(
8160 n_bang
: nullable TBang,
8161 n_id
: nullable AClosureId,
8162 n_ids
: Collection[Object], # Should be Collection[TId]
8163 n_kwdo
: nullable TKwdo,
8164 n_expr
: nullable AExpr,
8165 n_label
: nullable ALabel
8169 _n_bang
= n_bang
.as(not null)
8170 n_bang
.parent
= self
8171 _n_id
= n_id
.as(not null)
8179 if n_kwdo
!= null then
8180 n_kwdo
.parent
= self
8183 if n_expr
!= null then
8184 n_expr
.parent
= self
8187 if n_label
!= null then
8188 n_label
.parent
= self
8192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8194 if _n_bang
== old_child
then
8195 if new_child
!= null then
8196 new_child
.parent
= self
8197 assert new_child
isa TBang
8204 if _n_id
== old_child
then
8205 if new_child
!= null then
8206 new_child
.parent
= self
8207 assert new_child
isa AClosureId
8214 for i
in [0.._n_ids
.length
[ do
8215 if _n_ids
[i
] == old_child
then
8216 if new_child
!= null then
8217 assert new_child
isa TId
8218 _n_ids
[i
] = new_child
8219 new_child
.parent
= self
8226 if _n_kwdo
== old_child
then
8227 if new_child
!= null then
8228 new_child
.parent
= self
8229 assert new_child
isa TKwdo
8236 if _n_expr
== old_child
then
8237 if new_child
!= null then
8238 new_child
.parent
= self
8239 assert new_child
isa AExpr
8246 if _n_label
== old_child
then
8247 if new_child
!= null then
8248 new_child
.parent
= self
8249 assert new_child
isa ALabel
8250 _n_label
= new_child
8258 redef fun visit_all
(v
: Visitor)
8260 v
.enter_visit
(_n_bang
)
8261 v
.enter_visit
(_n_id
)
8265 if _n_kwdo
!= null then
8266 v
.enter_visit
(_n_kwdo
.as(not null))
8268 if _n_expr
!= null then
8269 v
.enter_visit
(_n_expr
.as(not null))
8271 if _n_label
!= null then
8272 v
.enter_visit
(_n_label
.as(not null))
8276 redef class ASimpleClosureId
8277 private init empty_init
do end
8279 init init_asimpleclosureid
(
8284 _n_id
= n_id
.as(not null)
8288 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8290 if _n_id
== old_child
then
8291 if new_child
!= null then
8292 new_child
.parent
= self
8293 assert new_child
isa TId
8302 redef fun visit_all
(v
: Visitor)
8304 v
.enter_visit
(_n_id
)
8307 redef class ABreakClosureId
8308 private init empty_init
do end
8310 init init_abreakclosureid
(
8311 n_kwbreak
: nullable TKwbreak
8315 _n_kwbreak
= n_kwbreak
.as(not null)
8316 n_kwbreak
.parent
= self
8319 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8321 if _n_kwbreak
== old_child
then
8322 if new_child
!= null then
8323 new_child
.parent
= self
8324 assert new_child
isa TKwbreak
8325 _n_kwbreak
= new_child
8333 redef fun visit_all
(v
: Visitor)
8335 v
.enter_visit
(_n_kwbreak
)
8338 redef class AModuleName
8339 private init empty_init
do end
8341 init init_amodulename
(
8342 n_quad
: nullable TQuad,
8343 n_path
: Collection[Object], # Should be Collection[TId]
8349 if n_quad
!= null then
8350 n_quad
.parent
= self
8357 _n_id
= n_id
.as(not null)
8361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8363 if _n_quad
== old_child
then
8364 if new_child
!= null then
8365 new_child
.parent
= self
8366 assert new_child
isa TQuad
8373 for i
in [0.._n_path
.length
[ do
8374 if _n_path
[i
] == old_child
then
8375 if new_child
!= null then
8376 assert new_child
isa TId
8377 _n_path
[i
] = new_child
8378 new_child
.parent
= self
8380 _n_path
.remove_at
(i
)
8385 if _n_id
== old_child
then
8386 if new_child
!= null then
8387 new_child
.parent
= self
8388 assert new_child
isa TId
8397 redef fun visit_all
(v
: Visitor)
8399 if _n_quad
!= null then
8400 v
.enter_visit
(_n_quad
.as(not null))
8405 v
.enter_visit
(_n_id
)
8408 redef class AExternCalls
8409 private init empty_init
do end
8411 init init_aexterncalls
(
8412 n_kwimport
: nullable TKwimport,
8413 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
8417 _n_kwimport
= n_kwimport
.as(not null)
8418 n_kwimport
.parent
= self
8419 for n
in n_extern_calls
do
8420 assert n
isa AExternCall
8421 _n_extern_calls
.add
(n
)
8426 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8428 if _n_kwimport
== old_child
then
8429 if new_child
!= null then
8430 new_child
.parent
= self
8431 assert new_child
isa TKwimport
8432 _n_kwimport
= new_child
8438 for i
in [0.._n_extern_calls
.length
[ do
8439 if _n_extern_calls
[i
] == old_child
then
8440 if new_child
!= null then
8441 assert new_child
isa AExternCall
8442 _n_extern_calls
[i
] = new_child
8443 new_child
.parent
= self
8445 _n_extern_calls
.remove_at
(i
)
8452 redef fun visit_all
(v
: Visitor)
8454 v
.enter_visit
(_n_kwimport
)
8455 for n
in _n_extern_calls
do
8460 redef class AExternCall
8461 private init empty_init
do end
8463 init init_aexterncall
8468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8472 redef fun visit_all
(v
: Visitor)
8476 redef class ASuperExternCall
8477 private init empty_init
do end
8479 init init_asuperexterncall
(
8480 n_kwsuper
: nullable TKwsuper
8484 _n_kwsuper
= n_kwsuper
.as(not null)
8485 n_kwsuper
.parent
= self
8488 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8490 if _n_kwsuper
== old_child
then
8491 if new_child
!= null then
8492 new_child
.parent
= self
8493 assert new_child
isa TKwsuper
8494 _n_kwsuper
= new_child
8502 redef fun visit_all
(v
: Visitor)
8504 v
.enter_visit
(_n_kwsuper
)
8507 redef class ALocalPropExternCall
8508 private init empty_init
do end
8510 init init_alocalpropexterncall
(
8511 n_methid
: nullable AMethid
8515 _n_methid
= n_methid
.as(not null)
8516 n_methid
.parent
= self
8519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8521 if _n_methid
== old_child
then
8522 if new_child
!= null then
8523 new_child
.parent
= self
8524 assert new_child
isa AMethid
8525 _n_methid
= new_child
8533 redef fun visit_all
(v
: Visitor)
8535 v
.enter_visit
(_n_methid
)
8538 redef class AFullPropExternCall
8539 private init empty_init
do end
8541 init init_afullpropexterncall
(
8542 n_classid
: nullable TClassid,
8543 n_quad
: nullable TQuad,
8544 n_methid
: nullable AMethid
8548 _n_classid
= n_classid
.as(not null)
8549 n_classid
.parent
= self
8551 if n_quad
!= null then
8552 n_quad
.parent
= self
8554 _n_methid
= n_methid
.as(not null)
8555 n_methid
.parent
= self
8558 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8560 if _n_classid
== old_child
then
8561 if new_child
!= null then
8562 new_child
.parent
= self
8563 assert new_child
isa TClassid
8564 _n_classid
= new_child
8570 if _n_quad
== old_child
then
8571 if new_child
!= null then
8572 new_child
.parent
= self
8573 assert new_child
isa TQuad
8580 if _n_methid
== old_child
then
8581 if new_child
!= null then
8582 new_child
.parent
= self
8583 assert new_child
isa AMethid
8584 _n_methid
= new_child
8592 redef fun visit_all
(v
: Visitor)
8594 v
.enter_visit
(_n_classid
)
8595 if _n_quad
!= null then
8596 v
.enter_visit
(_n_quad
.as(not null))
8598 v
.enter_visit
(_n_methid
)
8601 redef class AInitPropExternCall
8602 private init empty_init
do end
8604 init init_ainitpropexterncall
(
8605 n_classid
: nullable TClassid
8609 _n_classid
= n_classid
.as(not null)
8610 n_classid
.parent
= self
8613 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8615 if _n_classid
== old_child
then
8616 if new_child
!= null then
8617 new_child
.parent
= self
8618 assert new_child
isa TClassid
8619 _n_classid
= new_child
8627 redef fun visit_all
(v
: Visitor)
8629 v
.enter_visit
(_n_classid
)
8632 redef class ACastAsExternCall
8633 private init empty_init
do end
8635 init init_acastasexterncall
(
8636 n_from_type
: nullable AType,
8637 n_kwas
: nullable TKwas,
8638 n_to_type
: nullable AType
8642 _n_from_type
= n_from_type
.as(not null)
8643 n_from_type
.parent
= self
8644 _n_kwas
= n_kwas
.as(not null)
8645 n_kwas
.parent
= self
8646 _n_to_type
= n_to_type
.as(not null)
8647 n_to_type
.parent
= self
8650 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8652 if _n_from_type
== old_child
then
8653 if new_child
!= null then
8654 new_child
.parent
= self
8655 assert new_child
isa AType
8656 _n_from_type
= new_child
8662 if _n_kwas
== old_child
then
8663 if new_child
!= null then
8664 new_child
.parent
= self
8665 assert new_child
isa TKwas
8672 if _n_to_type
== old_child
then
8673 if new_child
!= null then
8674 new_child
.parent
= self
8675 assert new_child
isa AType
8676 _n_to_type
= new_child
8684 redef fun visit_all
(v
: Visitor)
8686 v
.enter_visit
(_n_from_type
)
8687 v
.enter_visit
(_n_kwas
)
8688 v
.enter_visit
(_n_to_type
)
8691 redef class AAsNullableExternCall
8692 private init empty_init
do end
8694 init init_aasnullableexterncall
(
8695 n_type
: nullable AType,
8696 n_kwas
: nullable TKwas,
8697 n_kwnullable
: nullable TKwnullable
8701 _n_type
= n_type
.as(not null)
8702 n_type
.parent
= self
8703 _n_kwas
= n_kwas
.as(not null)
8704 n_kwas
.parent
= self
8705 _n_kwnullable
= n_kwnullable
.as(not null)
8706 n_kwnullable
.parent
= self
8709 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8711 if _n_type
== old_child
then
8712 if new_child
!= null then
8713 new_child
.parent
= self
8714 assert new_child
isa AType
8721 if _n_kwas
== old_child
then
8722 if new_child
!= null then
8723 new_child
.parent
= self
8724 assert new_child
isa TKwas
8731 if _n_kwnullable
== old_child
then
8732 if new_child
!= null then
8733 new_child
.parent
= self
8734 assert new_child
isa TKwnullable
8735 _n_kwnullable
= new_child
8743 redef fun visit_all
(v
: Visitor)
8745 v
.enter_visit
(_n_type
)
8746 v
.enter_visit
(_n_kwas
)
8747 v
.enter_visit
(_n_kwnullable
)
8750 redef class AAsNotNullableExternCall
8751 private init empty_init
do end
8753 init init_aasnotnullableexterncall
(
8754 n_type
: nullable AType,
8755 n_kwas
: nullable TKwas,
8756 n_kwnot
: nullable TKwnot,
8757 n_kwnullable
: nullable TKwnullable
8761 _n_type
= n_type
.as(not null)
8762 n_type
.parent
= self
8763 _n_kwas
= n_kwas
.as(not null)
8764 n_kwas
.parent
= self
8765 _n_kwnot
= n_kwnot
.as(not null)
8766 n_kwnot
.parent
= self
8767 _n_kwnullable
= n_kwnullable
.as(not null)
8768 n_kwnullable
.parent
= self
8771 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8773 if _n_type
== old_child
then
8774 if new_child
!= null then
8775 new_child
.parent
= self
8776 assert new_child
isa AType
8783 if _n_kwas
== old_child
then
8784 if new_child
!= null then
8785 new_child
.parent
= self
8786 assert new_child
isa TKwas
8793 if _n_kwnot
== old_child
then
8794 if new_child
!= null then
8795 new_child
.parent
= self
8796 assert new_child
isa TKwnot
8797 _n_kwnot
= new_child
8803 if _n_kwnullable
== old_child
then
8804 if new_child
!= null then
8805 new_child
.parent
= self
8806 assert new_child
isa TKwnullable
8807 _n_kwnullable
= new_child
8815 redef fun visit_all
(v
: Visitor)
8817 v
.enter_visit
(_n_type
)
8818 v
.enter_visit
(_n_kwas
)
8819 v
.enter_visit
(_n_kwnot
)
8820 v
.enter_visit
(_n_kwnullable
)
8823 redef class AInLanguage
8824 private init empty_init
do end
8826 init init_ainlanguage
(
8827 n_kwin
: nullable TKwin,
8828 n_string
: nullable TString
8832 _n_kwin
= n_kwin
.as(not null)
8833 n_kwin
.parent
= self
8834 _n_string
= n_string
.as(not null)
8835 n_string
.parent
= self
8838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8840 if _n_kwin
== old_child
then
8841 if new_child
!= null then
8842 new_child
.parent
= self
8843 assert new_child
isa TKwin
8850 if _n_string
== old_child
then
8851 if new_child
!= null then
8852 new_child
.parent
= self
8853 assert new_child
isa TString
8854 _n_string
= new_child
8862 redef fun visit_all
(v
: Visitor)
8864 v
.enter_visit
(_n_kwin
)
8865 v
.enter_visit
(_n_string
)
8868 redef class AExternCodeBlock
8869 private init empty_init
do end
8871 init init_aexterncodeblock
(
8872 n_in_language
: nullable AInLanguage,
8873 n_extern_code_segment
: nullable TExternCodeSegment
8877 _n_in_language
= n_in_language
8878 if n_in_language
!= null then
8879 n_in_language
.parent
= self
8881 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8882 n_extern_code_segment
.parent
= self
8885 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8887 if _n_in_language
== old_child
then
8888 if new_child
!= null then
8889 new_child
.parent
= self
8890 assert new_child
isa AInLanguage
8891 _n_in_language
= new_child
8893 _n_in_language
= null
8897 if _n_extern_code_segment
== old_child
then
8898 if new_child
!= null then
8899 new_child
.parent
= self
8900 assert new_child
isa TExternCodeSegment
8901 _n_extern_code_segment
= new_child
8909 redef fun visit_all
(v
: Visitor)
8911 if _n_in_language
!= null then
8912 v
.enter_visit
(_n_in_language
.as(not null))
8914 v
.enter_visit
(_n_extern_code_segment
)
8917 redef class AQualified
8918 private init empty_init
do end
8920 init init_aqualified
(
8921 n_id
: Collection[Object], # Should be Collection[TId]
8922 n_classid
: nullable TClassid
8931 _n_classid
= n_classid
8932 if n_classid
!= null then
8933 n_classid
.parent
= self
8937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8939 for i
in [0.._n_id
.length
[ do
8940 if _n_id
[i
] == old_child
then
8941 if new_child
!= null then
8942 assert new_child
isa TId
8943 _n_id
[i
] = new_child
8944 new_child
.parent
= self
8951 if _n_classid
== old_child
then
8952 if new_child
!= null then
8953 new_child
.parent
= self
8954 assert new_child
isa TClassid
8955 _n_classid
= new_child
8963 redef fun visit_all
(v
: Visitor)
8968 if _n_classid
!= null then
8969 v
.enter_visit
(_n_classid
.as(not null))
8974 private init empty_init
do end
8977 n_comment
: Collection[Object] # Should be Collection[TComment]
8981 for n
in n_comment
do
8982 assert n
isa TComment
8988 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8990 for i
in [0.._n_comment
.length
[ do
8991 if _n_comment
[i
] == old_child
then
8992 if new_child
!= null then
8993 assert new_child
isa TComment
8994 _n_comment
[i
] = new_child
8995 new_child
.parent
= self
8997 _n_comment
.remove_at
(i
)
9004 redef fun visit_all
(v
: Visitor)
9006 for n
in _n_comment
do
9011 redef class AAnnotations
9012 private init empty_init
do end
9014 init init_aannotations
(
9016 n_opar
: nullable TOpar,
9017 n_items
: Collection[Object], # Should be Collection[AAnnotation]
9018 n_cpar
: nullable TCpar
9023 if n_at
!= null then
9027 if n_opar
!= null then
9028 n_opar
.parent
= self
9031 assert n
isa AAnnotation
9036 if n_cpar
!= null then
9037 n_cpar
.parent
= self
9041 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9043 if _n_at
== old_child
then
9044 if new_child
!= null then
9045 new_child
.parent
= self
9046 assert new_child
isa TAt
9053 if _n_opar
== old_child
then
9054 if new_child
!= null then
9055 new_child
.parent
= self
9056 assert new_child
isa TOpar
9063 for i
in [0.._n_items
.length
[ do
9064 if _n_items
[i
] == old_child
then
9065 if new_child
!= null then
9066 assert new_child
isa AAnnotation
9067 _n_items
[i
] = new_child
9068 new_child
.parent
= self
9070 _n_items
.remove_at
(i
)
9075 if _n_cpar
== old_child
then
9076 if new_child
!= null then
9077 new_child
.parent
= self
9078 assert new_child
isa TCpar
9087 redef fun visit_all
(v
: Visitor)
9089 if _n_at
!= null then
9090 v
.enter_visit
(_n_at
.as(not null))
9092 if _n_opar
!= null then
9093 v
.enter_visit
(_n_opar
.as(not null))
9095 for n
in _n_items
do
9098 if _n_cpar
!= null then
9099 v
.enter_visit
(_n_cpar
.as(not null))
9103 redef class AAnnotation
9104 private init empty_init
do end
9106 init init_aannotation
(
9107 n_atid
: nullable AAtid,
9108 n_opar
: nullable TOpar,
9109 n_args
: Collection[Object], # Should be Collection[AAtArg]
9110 n_cpar
: nullable TCpar,
9111 n_annotations
: nullable AAnnotations
9115 _n_atid
= n_atid
.as(not null)
9116 n_atid
.parent
= self
9118 if n_opar
!= null then
9119 n_opar
.parent
= self
9127 if n_cpar
!= null then
9128 n_cpar
.parent
= self
9130 _n_annotations
= n_annotations
9131 if n_annotations
!= null then
9132 n_annotations
.parent
= self
9136 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9138 if _n_atid
== old_child
then
9139 if new_child
!= null then
9140 new_child
.parent
= self
9141 assert new_child
isa AAtid
9148 if _n_opar
== old_child
then
9149 if new_child
!= null then
9150 new_child
.parent
= self
9151 assert new_child
isa TOpar
9158 for i
in [0.._n_args
.length
[ do
9159 if _n_args
[i
] == old_child
then
9160 if new_child
!= null then
9161 assert new_child
isa AAtArg
9162 _n_args
[i
] = new_child
9163 new_child
.parent
= self
9165 _n_args
.remove_at
(i
)
9170 if _n_cpar
== old_child
then
9171 if new_child
!= null then
9172 new_child
.parent
= self
9173 assert new_child
isa TCpar
9180 if _n_annotations
== old_child
then
9181 if new_child
!= null then
9182 new_child
.parent
= self
9183 assert new_child
isa AAnnotations
9184 _n_annotations
= new_child
9186 _n_annotations
= null
9192 redef fun visit_all
(v
: Visitor)
9194 v
.enter_visit
(_n_atid
)
9195 if _n_opar
!= null then
9196 v
.enter_visit
(_n_opar
.as(not null))
9201 if _n_cpar
!= null then
9202 v
.enter_visit
(_n_cpar
.as(not null))
9204 if _n_annotations
!= null then
9205 v
.enter_visit
(_n_annotations
.as(not null))
9209 redef class ATypeAtArg
9210 private init empty_init
do end
9212 init init_atypeatarg
(
9213 n_type
: nullable AType
9217 _n_type
= n_type
.as(not null)
9218 n_type
.parent
= self
9221 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9223 if _n_type
== old_child
then
9224 if new_child
!= null then
9225 new_child
.parent
= self
9226 assert new_child
isa AType
9235 redef fun visit_all
(v
: Visitor)
9237 v
.enter_visit
(_n_type
)
9240 redef class AExprAtArg
9241 private init empty_init
do end
9243 init init_aexpratarg
(
9244 n_expr
: nullable AExpr
9248 _n_expr
= n_expr
.as(not null)
9249 n_expr
.parent
= self
9252 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9254 if _n_expr
== old_child
then
9255 if new_child
!= null then
9256 new_child
.parent
= self
9257 assert new_child
isa AExpr
9266 redef fun visit_all
(v
: Visitor)
9268 v
.enter_visit
(_n_expr
)
9271 redef class AAtAtArg
9272 private init empty_init
do end
9274 init init_aatatarg
(
9275 n_annotations
: nullable AAnnotations
9279 _n_annotations
= n_annotations
.as(not null)
9280 n_annotations
.parent
= self
9283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9285 if _n_annotations
== old_child
then
9286 if new_child
!= null then
9287 new_child
.parent
= self
9288 assert new_child
isa AAnnotations
9289 _n_annotations
= new_child
9297 redef fun visit_all
(v
: Visitor)
9299 v
.enter_visit
(_n_annotations
)
9303 private init empty_init
do end
9310 _n_id
= n_id
.as(not null)
9314 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9316 if _n_id
== old_child
then
9317 if new_child
!= null then
9318 new_child
.parent
= self
9319 assert new_child
isa TId
9328 redef fun visit_all
(v
: Visitor)
9330 v
.enter_visit
(_n_id
)
9333 redef class AKwexternAtid
9334 private init empty_init
do end
9336 init init_akwexternatid
(
9337 n_id
: nullable TKwextern
9341 _n_id
= n_id
.as(not null)
9345 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9347 if _n_id
== old_child
then
9348 if new_child
!= null then
9349 new_child
.parent
= self
9350 assert new_child
isa TKwextern
9359 redef fun visit_all
(v
: Visitor)
9361 v
.enter_visit
(_n_id
)
9364 redef class AKwinternAtid
9365 private init empty_init
do end
9367 init init_akwinternatid
(
9368 n_id
: nullable TKwintern
9372 _n_id
= n_id
.as(not null)
9376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9378 if _n_id
== old_child
then
9379 if new_child
!= null then
9380 new_child
.parent
= self
9381 assert new_child
isa TKwintern
9390 redef fun visit_all
(v
: Visitor)
9392 v
.enter_visit
(_n_id
)
9395 redef class AKwreadableAtid
9396 private init empty_init
do end
9398 init init_akwreadableatid
(
9399 n_id
: nullable TKwreadable
9403 _n_id
= n_id
.as(not null)
9407 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9409 if _n_id
== old_child
then
9410 if new_child
!= null then
9411 new_child
.parent
= self
9412 assert new_child
isa TKwreadable
9421 redef fun visit_all
(v
: Visitor)
9423 v
.enter_visit
(_n_id
)
9426 redef class AKwwritableAtid
9427 private init empty_init
do end
9429 init init_akwwritableatid
(
9430 n_id
: nullable TKwwritable
9434 _n_id
= n_id
.as(not null)
9438 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9440 if _n_id
== old_child
then
9441 if new_child
!= null then
9442 new_child
.parent
= self
9443 assert new_child
isa TKwwritable
9452 redef fun visit_all
(v
: Visitor)
9454 v
.enter_visit
(_n_id
)
9457 redef class AKwimportAtid
9458 private init empty_init
do end
9460 init init_akwimportatid
(
9461 n_id
: nullable TKwimport
9465 _n_id
= n_id
.as(not null)
9469 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9471 if _n_id
== old_child
then
9472 if new_child
!= null then
9473 new_child
.parent
= self
9474 assert new_child
isa TKwimport
9483 redef fun visit_all
(v
: Visitor)
9485 v
.enter_visit
(_n_id
)
9490 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9492 if _n_base
== old_child
then
9493 if new_child
== null then
9495 new_child
.parent
= self
9496 assert new_child
isa AModule
9499 old_child
.parent
= null
9504 redef fun visit_all
(v
: Visitor)
9506 if _n_base
!= null then
9507 v
.enter_visit
(_n_base
.as(not null))
9509 v
.enter_visit
(_n_eof
)