1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
10 # Parent of the node in the AST
11 readable writable var _parent
: nullable ANode
13 # Remove a child from the AST
14 fun remove_child
(child
: ANode)
16 replace_child
(child
, null)
19 # Replace a child with an other node in the AST
20 fun replace_child
(old_child
: ANode, new_child
: nullable ANode) is abstract
22 # Replace itself with an other node in the AST
23 fun replace_with
(node
: ANode)
25 if _parent
!= null then
26 _parent
.replace_child
(self, node
)
30 # Visit all nodes in order.
31 # Thus, call "v.visit(e)" for each node e
32 fun visit_all
(v
: Visitor) is abstract
36 redef fun visit_all
(v
: Visitor) do end
37 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode) do end
41 redef fun replace_with
(n
: ANode)
49 # Abstract standard visitor
50 abstract class Visitor
51 # What the visitor do when a node is visited
52 # Concrete visitors should redefine this method.
53 protected fun visit
(e
: nullable ANode) is abstract
55 # Ask the visitor to visit a given node.
56 # Usually automatically called by visit_all* methods.
57 # This methos should not be redefined
58 fun enter_visit
(e
: nullable ANode)
60 var old
= _current_node
66 # The current visited node
67 readable var _current_node
: nullable ANode = null
71 private init empty_init
do end
74 n_moduledecl
: nullable AModuledecl,
75 n_imports
: Collection[Object], # Should be Collection[AImport]
76 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
77 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
81 _n_moduledecl
= n_moduledecl
82 if n_moduledecl
!= null then
83 n_moduledecl
.parent
= self
90 for n
in n_extern_code_blocks
do
91 assert n
isa AExternCodeBlock
92 _n_extern_code_blocks
.add
(n
)
95 for n
in n_classdefs
do
96 assert n
isa AClassdef
102 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
104 if _n_moduledecl
== old_child
then
105 if new_child
!= null then
106 new_child
.parent
= self
107 assert new_child
isa AModuledecl
108 _n_moduledecl
= new_child
114 for i
in [0.._n_imports
.length
[ do
115 if _n_imports
[i
] == old_child
then
116 if new_child
!= null then
117 assert new_child
isa AImport
118 _n_imports
[i
] = new_child
119 new_child
.parent
= self
121 _n_imports
.remove_at
(i
)
126 for i
in [0.._n_extern_code_blocks
.length
[ do
127 if _n_extern_code_blocks
[i
] == old_child
then
128 if new_child
!= null then
129 assert new_child
isa AExternCodeBlock
130 _n_extern_code_blocks
[i
] = new_child
131 new_child
.parent
= self
133 _n_extern_code_blocks
.remove_at
(i
)
138 for i
in [0.._n_classdefs
.length
[ do
139 if _n_classdefs
[i
] == old_child
then
140 if new_child
!= null then
141 assert new_child
isa AClassdef
142 _n_classdefs
[i
] = new_child
143 new_child
.parent
= self
145 _n_classdefs
.remove_at
(i
)
152 redef fun visit_all
(v
: Visitor)
154 if _n_moduledecl
!= null then
155 v
.enter_visit
(_n_moduledecl
.as(not null))
157 for n
in _n_imports
do
160 for n
in _n_extern_code_blocks
do
163 for n
in _n_classdefs
do
168 redef class AModuledecl
169 private init empty_init
do end
171 init init_amoduledecl
(
172 n_doc
: nullable ADoc,
173 n_kwmodule
: nullable TKwmodule,
174 n_name
: nullable AModuleName,
175 n_annotations
: nullable AAnnotations
180 if n_doc
!= null then
183 _n_kwmodule
= n_kwmodule
.as(not null)
184 n_kwmodule
.parent
= self
185 _n_name
= n_name
.as(not null)
187 _n_annotations
= n_annotations
188 if n_annotations
!= null then
189 n_annotations
.parent
= self
193 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
195 if _n_doc
== old_child
then
196 if new_child
!= null then
197 new_child
.parent
= self
198 assert new_child
isa ADoc
205 if _n_kwmodule
== old_child
then
206 if new_child
!= null then
207 new_child
.parent
= self
208 assert new_child
isa TKwmodule
209 _n_kwmodule
= new_child
215 if _n_name
== old_child
then
216 if new_child
!= null then
217 new_child
.parent
= self
218 assert new_child
isa AModuleName
225 if _n_annotations
== old_child
then
226 if new_child
!= null then
227 new_child
.parent
= self
228 assert new_child
isa AAnnotations
229 _n_annotations
= new_child
231 _n_annotations
= null
237 redef fun visit_all
(v
: Visitor)
239 if _n_doc
!= null then
240 v
.enter_visit
(_n_doc
.as(not null))
242 v
.enter_visit
(_n_kwmodule
)
243 v
.enter_visit
(_n_name
)
244 if _n_annotations
!= null then
245 v
.enter_visit
(_n_annotations
.as(not null))
249 redef class AStdImport
250 private init empty_init
do end
252 init init_astdimport
(
253 n_visibility
: nullable AVisibility,
254 n_kwimport
: nullable TKwimport,
255 n_name
: nullable AModuleName,
256 n_annotations
: nullable AAnnotations
260 _n_visibility
= n_visibility
.as(not null)
261 n_visibility
.parent
= self
262 _n_kwimport
= n_kwimport
.as(not null)
263 n_kwimport
.parent
= self
264 _n_name
= n_name
.as(not null)
266 _n_annotations
= n_annotations
267 if n_annotations
!= null then
268 n_annotations
.parent
= self
272 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
274 if _n_visibility
== old_child
then
275 if new_child
!= null then
276 new_child
.parent
= self
277 assert new_child
isa AVisibility
278 _n_visibility
= new_child
284 if _n_kwimport
== old_child
then
285 if new_child
!= null then
286 new_child
.parent
= self
287 assert new_child
isa TKwimport
288 _n_kwimport
= new_child
294 if _n_name
== old_child
then
295 if new_child
!= null then
296 new_child
.parent
= self
297 assert new_child
isa AModuleName
304 if _n_annotations
== old_child
then
305 if new_child
!= null then
306 new_child
.parent
= self
307 assert new_child
isa AAnnotations
308 _n_annotations
= new_child
310 _n_annotations
= null
316 redef fun visit_all
(v
: Visitor)
318 v
.enter_visit
(_n_visibility
)
319 v
.enter_visit
(_n_kwimport
)
320 v
.enter_visit
(_n_name
)
321 if _n_annotations
!= null then
322 v
.enter_visit
(_n_annotations
.as(not null))
326 redef class ANoImport
327 private init empty_init
do end
329 init init_anoimport
(
330 n_visibility
: nullable AVisibility,
331 n_kwimport
: nullable TKwimport,
332 n_kwend
: nullable TKwend
336 _n_visibility
= n_visibility
.as(not null)
337 n_visibility
.parent
= self
338 _n_kwimport
= n_kwimport
.as(not null)
339 n_kwimport
.parent
= self
340 _n_kwend
= n_kwend
.as(not null)
341 n_kwend
.parent
= self
344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
346 if _n_visibility
== old_child
then
347 if new_child
!= null then
348 new_child
.parent
= self
349 assert new_child
isa AVisibility
350 _n_visibility
= new_child
356 if _n_kwimport
== old_child
then
357 if new_child
!= null then
358 new_child
.parent
= self
359 assert new_child
isa TKwimport
360 _n_kwimport
= new_child
366 if _n_kwend
== old_child
then
367 if new_child
!= null then
368 new_child
.parent
= self
369 assert new_child
isa TKwend
378 redef fun visit_all
(v
: Visitor)
380 v
.enter_visit
(_n_visibility
)
381 v
.enter_visit
(_n_kwimport
)
382 v
.enter_visit
(_n_kwend
)
385 redef class APublicVisibility
386 private init empty_init
do end
388 init init_apublicvisibility
393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
397 redef fun visit_all
(v
: Visitor)
401 redef class APrivateVisibility
402 private init empty_init
do end
404 init init_aprivatevisibility
(
405 n_kwprivate
: nullable TKwprivate
409 _n_kwprivate
= n_kwprivate
.as(not null)
410 n_kwprivate
.parent
= self
413 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
415 if _n_kwprivate
== old_child
then
416 if new_child
!= null then
417 new_child
.parent
= self
418 assert new_child
isa TKwprivate
419 _n_kwprivate
= new_child
427 redef fun visit_all
(v
: Visitor)
429 v
.enter_visit
(_n_kwprivate
)
432 redef class AProtectedVisibility
433 private init empty_init
do end
435 init init_aprotectedvisibility
(
436 n_kwprotected
: nullable TKwprotected
440 _n_kwprotected
= n_kwprotected
.as(not null)
441 n_kwprotected
.parent
= self
444 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
446 if _n_kwprotected
== old_child
then
447 if new_child
!= null then
448 new_child
.parent
= self
449 assert new_child
isa TKwprotected
450 _n_kwprotected
= new_child
458 redef fun visit_all
(v
: Visitor)
460 v
.enter_visit
(_n_kwprotected
)
463 redef class AIntrudeVisibility
464 private init empty_init
do end
466 init init_aintrudevisibility
(
467 n_kwintrude
: nullable TKwintrude
471 _n_kwintrude
= n_kwintrude
.as(not null)
472 n_kwintrude
.parent
= self
475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
477 if _n_kwintrude
== old_child
then
478 if new_child
!= null then
479 new_child
.parent
= self
480 assert new_child
isa TKwintrude
481 _n_kwintrude
= new_child
489 redef fun visit_all
(v
: Visitor)
491 v
.enter_visit
(_n_kwintrude
)
494 redef class AStdClassdef
495 private init empty_init
do end
497 init init_astdclassdef
(
498 n_doc
: nullable ADoc,
499 n_kwredef
: nullable TKwredef,
500 n_visibility
: nullable AVisibility,
501 n_classkind
: nullable AClasskind,
502 n_id
: nullable TClassid,
503 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
504 n_annotations
: nullable AAnnotations,
505 n_extern_code_block
: nullable AExternCodeBlock,
506 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
507 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
508 n_kwend
: nullable TKwend
513 if n_doc
!= null then
516 _n_kwredef
= n_kwredef
517 if n_kwredef
!= null then
518 n_kwredef
.parent
= self
520 _n_visibility
= n_visibility
.as(not null)
521 n_visibility
.parent
= self
522 _n_classkind
= n_classkind
.as(not null)
523 n_classkind
.parent
= self
528 for n
in n_formaldefs
do
529 assert n
isa AFormaldef
533 _n_annotations
= n_annotations
534 if n_annotations
!= null then
535 n_annotations
.parent
= self
537 _n_extern_code_block
= n_extern_code_block
538 if n_extern_code_block
!= null then
539 n_extern_code_block
.parent
= self
541 for n
in n_superclasses
do
542 assert n
isa ASuperclass
543 _n_superclasses
.add
(n
)
546 for n
in n_propdefs
do
547 assert n
isa APropdef
551 _n_kwend
= n_kwend
.as(not null)
552 n_kwend
.parent
= self
555 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
557 if _n_doc
== old_child
then
558 if new_child
!= null then
559 new_child
.parent
= self
560 assert new_child
isa ADoc
567 if _n_kwredef
== old_child
then
568 if new_child
!= null then
569 new_child
.parent
= self
570 assert new_child
isa TKwredef
571 _n_kwredef
= new_child
577 if _n_visibility
== old_child
then
578 if new_child
!= null then
579 new_child
.parent
= self
580 assert new_child
isa AVisibility
581 _n_visibility
= new_child
587 if _n_classkind
== old_child
then
588 if new_child
!= null then
589 new_child
.parent
= self
590 assert new_child
isa AClasskind
591 _n_classkind
= new_child
597 if _n_id
== old_child
then
598 if new_child
!= null then
599 new_child
.parent
= self
600 assert new_child
isa TClassid
607 for i
in [0.._n_formaldefs
.length
[ do
608 if _n_formaldefs
[i
] == old_child
then
609 if new_child
!= null then
610 assert new_child
isa AFormaldef
611 _n_formaldefs
[i
] = new_child
612 new_child
.parent
= self
614 _n_formaldefs
.remove_at
(i
)
619 if _n_annotations
== old_child
then
620 if new_child
!= null then
621 new_child
.parent
= self
622 assert new_child
isa AAnnotations
623 _n_annotations
= new_child
625 _n_annotations
= null
629 if _n_extern_code_block
== old_child
then
630 if new_child
!= null then
631 new_child
.parent
= self
632 assert new_child
isa AExternCodeBlock
633 _n_extern_code_block
= new_child
635 _n_extern_code_block
= null
639 for i
in [0.._n_superclasses
.length
[ do
640 if _n_superclasses
[i
] == old_child
then
641 if new_child
!= null then
642 assert new_child
isa ASuperclass
643 _n_superclasses
[i
] = new_child
644 new_child
.parent
= self
646 _n_superclasses
.remove_at
(i
)
651 for i
in [0.._n_propdefs
.length
[ do
652 if _n_propdefs
[i
] == old_child
then
653 if new_child
!= null then
654 assert new_child
isa APropdef
655 _n_propdefs
[i
] = new_child
656 new_child
.parent
= self
658 _n_propdefs
.remove_at
(i
)
663 if _n_kwend
== old_child
then
664 if new_child
!= null then
665 new_child
.parent
= self
666 assert new_child
isa TKwend
675 redef fun visit_all
(v
: Visitor)
677 if _n_doc
!= null then
678 v
.enter_visit
(_n_doc
.as(not null))
680 if _n_kwredef
!= null then
681 v
.enter_visit
(_n_kwredef
.as(not null))
683 v
.enter_visit
(_n_visibility
)
684 v
.enter_visit
(_n_classkind
)
685 if _n_id
!= null then
686 v
.enter_visit
(_n_id
.as(not null))
688 for n
in _n_formaldefs
do
691 if _n_annotations
!= null then
692 v
.enter_visit
(_n_annotations
.as(not null))
694 if _n_extern_code_block
!= null then
695 v
.enter_visit
(_n_extern_code_block
.as(not null))
697 for n
in _n_superclasses
do
700 for n
in _n_propdefs
do
703 v
.enter_visit
(_n_kwend
)
706 redef class ATopClassdef
707 private init empty_init
do end
709 init init_atopclassdef
(
710 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
714 for n
in n_propdefs
do
715 assert n
isa APropdef
721 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
723 for i
in [0.._n_propdefs
.length
[ do
724 if _n_propdefs
[i
] == old_child
then
725 if new_child
!= null then
726 assert new_child
isa APropdef
727 _n_propdefs
[i
] = new_child
728 new_child
.parent
= self
730 _n_propdefs
.remove_at
(i
)
737 redef fun visit_all
(v
: Visitor)
739 for n
in _n_propdefs
do
744 redef class AMainClassdef
745 private init empty_init
do end
747 init init_amainclassdef
(
748 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
752 for n
in n_propdefs
do
753 assert n
isa APropdef
759 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
761 for i
in [0.._n_propdefs
.length
[ do
762 if _n_propdefs
[i
] == old_child
then
763 if new_child
!= null then
764 assert new_child
isa APropdef
765 _n_propdefs
[i
] = new_child
766 new_child
.parent
= self
768 _n_propdefs
.remove_at
(i
)
775 redef fun visit_all
(v
: Visitor)
777 for n
in _n_propdefs
do
782 redef class AConcreteClasskind
783 private init empty_init
do end
785 init init_aconcreteclasskind
(
786 n_kwclass
: nullable TKwclass
790 _n_kwclass
= n_kwclass
.as(not null)
791 n_kwclass
.parent
= self
794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
796 if _n_kwclass
== old_child
then
797 if new_child
!= null then
798 new_child
.parent
= self
799 assert new_child
isa TKwclass
800 _n_kwclass
= new_child
808 redef fun visit_all
(v
: Visitor)
810 v
.enter_visit
(_n_kwclass
)
813 redef class AAbstractClasskind
814 private init empty_init
do end
816 init init_aabstractclasskind
(
817 n_kwabstract
: nullable TKwabstract,
818 n_kwclass
: nullable TKwclass
822 _n_kwabstract
= n_kwabstract
.as(not null)
823 n_kwabstract
.parent
= self
824 _n_kwclass
= n_kwclass
.as(not null)
825 n_kwclass
.parent
= self
828 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
830 if _n_kwabstract
== old_child
then
831 if new_child
!= null then
832 new_child
.parent
= self
833 assert new_child
isa TKwabstract
834 _n_kwabstract
= new_child
840 if _n_kwclass
== old_child
then
841 if new_child
!= null then
842 new_child
.parent
= self
843 assert new_child
isa TKwclass
844 _n_kwclass
= new_child
852 redef fun visit_all
(v
: Visitor)
854 v
.enter_visit
(_n_kwabstract
)
855 v
.enter_visit
(_n_kwclass
)
858 redef class AInterfaceClasskind
859 private init empty_init
do end
861 init init_ainterfaceclasskind
(
862 n_kwinterface
: nullable TKwinterface
866 _n_kwinterface
= n_kwinterface
.as(not null)
867 n_kwinterface
.parent
= self
870 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
872 if _n_kwinterface
== old_child
then
873 if new_child
!= null then
874 new_child
.parent
= self
875 assert new_child
isa TKwinterface
876 _n_kwinterface
= new_child
884 redef fun visit_all
(v
: Visitor)
886 v
.enter_visit
(_n_kwinterface
)
889 redef class AEnumClasskind
890 private init empty_init
do end
892 init init_aenumclasskind
(
893 n_kwenum
: nullable TKwenum
897 _n_kwenum
= n_kwenum
.as(not null)
898 n_kwenum
.parent
= self
901 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
903 if _n_kwenum
== old_child
then
904 if new_child
!= null then
905 new_child
.parent
= self
906 assert new_child
isa TKwenum
907 _n_kwenum
= new_child
915 redef fun visit_all
(v
: Visitor)
917 v
.enter_visit
(_n_kwenum
)
920 redef class AExternClasskind
921 private init empty_init
do end
923 init init_aexternclasskind
(
924 n_kwextern
: nullable TKwextern,
925 n_kwclass
: nullable TKwclass
929 _n_kwextern
= n_kwextern
.as(not null)
930 n_kwextern
.parent
= self
931 _n_kwclass
= n_kwclass
932 if n_kwclass
!= null then
933 n_kwclass
.parent
= self
937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
939 if _n_kwextern
== old_child
then
940 if new_child
!= null then
941 new_child
.parent
= self
942 assert new_child
isa TKwextern
943 _n_kwextern
= new_child
949 if _n_kwclass
== old_child
then
950 if new_child
!= null then
951 new_child
.parent
= self
952 assert new_child
isa TKwclass
953 _n_kwclass
= new_child
961 redef fun visit_all
(v
: Visitor)
963 v
.enter_visit
(_n_kwextern
)
964 if _n_kwclass
!= null then
965 v
.enter_visit
(_n_kwclass
.as(not null))
969 redef class AFormaldef
970 private init empty_init
do end
972 init init_aformaldef
(
973 n_id
: nullable TClassid,
974 n_type
: nullable AType,
975 n_annotations
: nullable AAnnotations
979 _n_id
= n_id
.as(not null)
982 if n_type
!= null then
985 _n_annotations
= n_annotations
986 if n_annotations
!= null then
987 n_annotations
.parent
= self
991 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
993 if _n_id
== old_child
then
994 if new_child
!= null then
995 new_child
.parent
= self
996 assert new_child
isa TClassid
1003 if _n_type
== old_child
then
1004 if new_child
!= null then
1005 new_child
.parent
= self
1006 assert new_child
isa AType
1013 if _n_annotations
== old_child
then
1014 if new_child
!= null then
1015 new_child
.parent
= self
1016 assert new_child
isa AAnnotations
1017 _n_annotations
= new_child
1019 _n_annotations
= null
1025 redef fun visit_all
(v
: Visitor)
1027 v
.enter_visit
(_n_id
)
1028 if _n_type
!= null then
1029 v
.enter_visit
(_n_type
.as(not null))
1031 if _n_annotations
!= null then
1032 v
.enter_visit
(_n_annotations
.as(not null))
1036 redef class ASuperclass
1037 private init empty_init
do end
1039 init init_asuperclass
(
1040 n_kwsuper
: nullable TKwsuper,
1041 n_type
: nullable AType,
1042 n_annotations
: nullable AAnnotations
1046 _n_kwsuper
= n_kwsuper
.as(not null)
1047 n_kwsuper
.parent
= self
1048 _n_type
= n_type
.as(not null)
1049 n_type
.parent
= self
1050 _n_annotations
= n_annotations
1051 if n_annotations
!= null then
1052 n_annotations
.parent
= self
1056 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1058 if _n_kwsuper
== old_child
then
1059 if new_child
!= null then
1060 new_child
.parent
= self
1061 assert new_child
isa TKwsuper
1062 _n_kwsuper
= new_child
1068 if _n_type
== old_child
then
1069 if new_child
!= null then
1070 new_child
.parent
= self
1071 assert new_child
isa AType
1078 if _n_annotations
== old_child
then
1079 if new_child
!= null then
1080 new_child
.parent
= self
1081 assert new_child
isa AAnnotations
1082 _n_annotations
= new_child
1084 _n_annotations
= null
1090 redef fun visit_all
(v
: Visitor)
1092 v
.enter_visit
(_n_kwsuper
)
1093 v
.enter_visit
(_n_type
)
1094 if _n_annotations
!= null then
1095 v
.enter_visit
(_n_annotations
.as(not null))
1099 redef class AAttrPropdef
1100 private init empty_init
do end
1102 init init_aattrpropdef
(
1103 n_doc
: nullable ADoc,
1104 n_readable
: nullable AAble,
1105 n_writable
: nullable AAble,
1106 n_kwredef
: nullable TKwredef,
1107 n_visibility
: nullable AVisibility,
1108 n_kwvar
: nullable TKwvar,
1109 n_id
: nullable TAttrid,
1110 n_id2
: nullable TId,
1111 n_type
: nullable AType,
1112 n_annotations
: nullable AAnnotations,
1113 n_expr
: nullable AExpr
1118 if n_doc
!= null then
1121 _n_readable
= n_readable
1122 if n_readable
!= null then
1123 n_readable
.parent
= self
1125 _n_writable
= n_writable
1126 if n_writable
!= null then
1127 n_writable
.parent
= self
1129 _n_kwredef
= n_kwredef
1130 if n_kwredef
!= null then
1131 n_kwredef
.parent
= self
1133 _n_visibility
= n_visibility
.as(not null)
1134 n_visibility
.parent
= self
1135 _n_kwvar
= n_kwvar
.as(not null)
1136 n_kwvar
.parent
= self
1138 if n_id
!= null then
1142 if n_id2
!= null then
1146 if n_type
!= null then
1147 n_type
.parent
= self
1149 _n_annotations
= n_annotations
1150 if n_annotations
!= null then
1151 n_annotations
.parent
= self
1154 if n_expr
!= null then
1155 n_expr
.parent
= self
1159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1161 if _n_doc
== old_child
then
1162 if new_child
!= null then
1163 new_child
.parent
= self
1164 assert new_child
isa ADoc
1171 if _n_readable
== old_child
then
1172 if new_child
!= null then
1173 new_child
.parent
= self
1174 assert new_child
isa AAble
1175 _n_readable
= new_child
1181 if _n_writable
== old_child
then
1182 if new_child
!= null then
1183 new_child
.parent
= self
1184 assert new_child
isa AAble
1185 _n_writable
= new_child
1191 if _n_kwredef
== old_child
then
1192 if new_child
!= null then
1193 new_child
.parent
= self
1194 assert new_child
isa TKwredef
1195 _n_kwredef
= new_child
1201 if _n_visibility
== old_child
then
1202 if new_child
!= null then
1203 new_child
.parent
= self
1204 assert new_child
isa AVisibility
1205 _n_visibility
= new_child
1211 if _n_kwvar
== old_child
then
1212 if new_child
!= null then
1213 new_child
.parent
= self
1214 assert new_child
isa TKwvar
1215 _n_kwvar
= new_child
1221 if _n_id
== old_child
then
1222 if new_child
!= null then
1223 new_child
.parent
= self
1224 assert new_child
isa TAttrid
1231 if _n_id2
== old_child
then
1232 if new_child
!= null then
1233 new_child
.parent
= self
1234 assert new_child
isa TId
1241 if _n_type
== old_child
then
1242 if new_child
!= null then
1243 new_child
.parent
= self
1244 assert new_child
isa AType
1251 if _n_annotations
== old_child
then
1252 if new_child
!= null then
1253 new_child
.parent
= self
1254 assert new_child
isa AAnnotations
1255 _n_annotations
= new_child
1257 _n_annotations
= null
1261 if _n_expr
== old_child
then
1262 if new_child
!= null then
1263 new_child
.parent
= self
1264 assert new_child
isa AExpr
1273 redef fun visit_all
(v
: Visitor)
1275 if _n_doc
!= null then
1276 v
.enter_visit
(_n_doc
.as(not null))
1278 if _n_readable
!= null then
1279 v
.enter_visit
(_n_readable
.as(not null))
1281 if _n_writable
!= null then
1282 v
.enter_visit
(_n_writable
.as(not null))
1284 if _n_kwredef
!= null then
1285 v
.enter_visit
(_n_kwredef
.as(not null))
1287 v
.enter_visit
(_n_visibility
)
1288 v
.enter_visit
(_n_kwvar
)
1289 if _n_id
!= null then
1290 v
.enter_visit
(_n_id
.as(not null))
1292 if _n_id2
!= null then
1293 v
.enter_visit
(_n_id2
.as(not null))
1295 if _n_type
!= null then
1296 v
.enter_visit
(_n_type
.as(not null))
1298 if _n_annotations
!= null then
1299 v
.enter_visit
(_n_annotations
.as(not null))
1301 if _n_expr
!= null then
1302 v
.enter_visit
(_n_expr
.as(not null))
1306 redef class AMethPropdef
1307 private init empty_init
do end
1309 init init_amethpropdef
(
1310 n_doc
: nullable ADoc,
1311 n_kwredef
: nullable TKwredef,
1312 n_visibility
: nullable AVisibility,
1313 n_methid
: nullable AMethid,
1314 n_signature
: nullable ASignature
1319 if n_doc
!= null then
1322 _n_kwredef
= n_kwredef
1323 if n_kwredef
!= null then
1324 n_kwredef
.parent
= self
1326 _n_visibility
= n_visibility
.as(not null)
1327 n_visibility
.parent
= self
1328 _n_methid
= n_methid
.as(not null)
1329 n_methid
.parent
= self
1330 _n_signature
= n_signature
.as(not null)
1331 n_signature
.parent
= self
1334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1336 if _n_doc
== old_child
then
1337 if new_child
!= null then
1338 new_child
.parent
= self
1339 assert new_child
isa ADoc
1346 if _n_kwredef
== old_child
then
1347 if new_child
!= null then
1348 new_child
.parent
= self
1349 assert new_child
isa TKwredef
1350 _n_kwredef
= new_child
1356 if _n_visibility
== old_child
then
1357 if new_child
!= null then
1358 new_child
.parent
= self
1359 assert new_child
isa AVisibility
1360 _n_visibility
= new_child
1366 if _n_methid
== old_child
then
1367 if new_child
!= null then
1368 new_child
.parent
= self
1369 assert new_child
isa AMethid
1370 _n_methid
= new_child
1376 if _n_signature
== old_child
then
1377 if new_child
!= null then
1378 new_child
.parent
= self
1379 assert new_child
isa ASignature
1380 _n_signature
= new_child
1388 redef fun visit_all
(v
: Visitor)
1390 if _n_doc
!= null then
1391 v
.enter_visit
(_n_doc
.as(not null))
1393 if _n_kwredef
!= null then
1394 v
.enter_visit
(_n_kwredef
.as(not null))
1396 v
.enter_visit
(_n_visibility
)
1397 v
.enter_visit
(_n_methid
)
1398 v
.enter_visit
(_n_signature
)
1401 redef class ADeferredMethPropdef
1402 private init empty_init
do end
1404 init init_adeferredmethpropdef
(
1405 n_doc
: nullable ADoc,
1406 n_kwredef
: nullable TKwredef,
1407 n_visibility
: nullable AVisibility,
1408 n_kwmeth
: nullable TKwmeth,
1409 n_methid
: nullable AMethid,
1410 n_signature
: nullable ASignature,
1411 n_annotations
: nullable AAnnotations
1416 if n_doc
!= null then
1419 _n_kwredef
= n_kwredef
1420 if n_kwredef
!= null then
1421 n_kwredef
.parent
= self
1423 _n_visibility
= n_visibility
.as(not null)
1424 n_visibility
.parent
= self
1425 _n_kwmeth
= n_kwmeth
.as(not null)
1426 n_kwmeth
.parent
= self
1427 _n_methid
= n_methid
.as(not null)
1428 n_methid
.parent
= self
1429 _n_signature
= n_signature
.as(not null)
1430 n_signature
.parent
= self
1431 _n_annotations
= n_annotations
1432 if n_annotations
!= null then
1433 n_annotations
.parent
= self
1437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1439 if _n_doc
== old_child
then
1440 if new_child
!= null then
1441 new_child
.parent
= self
1442 assert new_child
isa ADoc
1449 if _n_kwredef
== old_child
then
1450 if new_child
!= null then
1451 new_child
.parent
= self
1452 assert new_child
isa TKwredef
1453 _n_kwredef
= new_child
1459 if _n_visibility
== old_child
then
1460 if new_child
!= null then
1461 new_child
.parent
= self
1462 assert new_child
isa AVisibility
1463 _n_visibility
= new_child
1469 if _n_kwmeth
== old_child
then
1470 if new_child
!= null then
1471 new_child
.parent
= self
1472 assert new_child
isa TKwmeth
1473 _n_kwmeth
= new_child
1479 if _n_methid
== old_child
then
1480 if new_child
!= null then
1481 new_child
.parent
= self
1482 assert new_child
isa AMethid
1483 _n_methid
= new_child
1489 if _n_signature
== old_child
then
1490 if new_child
!= null then
1491 new_child
.parent
= self
1492 assert new_child
isa ASignature
1493 _n_signature
= new_child
1499 if _n_annotations
== old_child
then
1500 if new_child
!= null then
1501 new_child
.parent
= self
1502 assert new_child
isa AAnnotations
1503 _n_annotations
= new_child
1505 _n_annotations
= null
1511 redef fun visit_all
(v
: Visitor)
1513 if _n_doc
!= null then
1514 v
.enter_visit
(_n_doc
.as(not null))
1516 if _n_kwredef
!= null then
1517 v
.enter_visit
(_n_kwredef
.as(not null))
1519 v
.enter_visit
(_n_visibility
)
1520 v
.enter_visit
(_n_kwmeth
)
1521 v
.enter_visit
(_n_methid
)
1522 v
.enter_visit
(_n_signature
)
1523 if _n_annotations
!= null then
1524 v
.enter_visit
(_n_annotations
.as(not null))
1528 redef class AInternMethPropdef
1529 private init empty_init
do end
1531 init init_ainternmethpropdef
(
1532 n_doc
: nullable ADoc,
1533 n_kwredef
: nullable TKwredef,
1534 n_visibility
: nullable AVisibility,
1535 n_kwmeth
: nullable TKwmeth,
1536 n_methid
: nullable AMethid,
1537 n_signature
: nullable ASignature
1542 if n_doc
!= null then
1545 _n_kwredef
= n_kwredef
1546 if n_kwredef
!= null then
1547 n_kwredef
.parent
= self
1549 _n_visibility
= n_visibility
.as(not null)
1550 n_visibility
.parent
= self
1551 _n_kwmeth
= n_kwmeth
.as(not null)
1552 n_kwmeth
.parent
= self
1553 _n_methid
= n_methid
.as(not null)
1554 n_methid
.parent
= self
1555 _n_signature
= n_signature
.as(not null)
1556 n_signature
.parent
= self
1559 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1561 if _n_doc
== old_child
then
1562 if new_child
!= null then
1563 new_child
.parent
= self
1564 assert new_child
isa ADoc
1571 if _n_kwredef
== old_child
then
1572 if new_child
!= null then
1573 new_child
.parent
= self
1574 assert new_child
isa TKwredef
1575 _n_kwredef
= new_child
1581 if _n_visibility
== old_child
then
1582 if new_child
!= null then
1583 new_child
.parent
= self
1584 assert new_child
isa AVisibility
1585 _n_visibility
= new_child
1591 if _n_kwmeth
== old_child
then
1592 if new_child
!= null then
1593 new_child
.parent
= self
1594 assert new_child
isa TKwmeth
1595 _n_kwmeth
= new_child
1601 if _n_methid
== old_child
then
1602 if new_child
!= null then
1603 new_child
.parent
= self
1604 assert new_child
isa AMethid
1605 _n_methid
= new_child
1611 if _n_signature
== old_child
then
1612 if new_child
!= null then
1613 new_child
.parent
= self
1614 assert new_child
isa ASignature
1615 _n_signature
= new_child
1623 redef fun visit_all
(v
: Visitor)
1625 if _n_doc
!= null then
1626 v
.enter_visit
(_n_doc
.as(not null))
1628 if _n_kwredef
!= null then
1629 v
.enter_visit
(_n_kwredef
.as(not null))
1631 v
.enter_visit
(_n_visibility
)
1632 v
.enter_visit
(_n_kwmeth
)
1633 v
.enter_visit
(_n_methid
)
1634 v
.enter_visit
(_n_signature
)
1637 redef class AExternMethPropdef
1638 private init empty_init
do end
1640 init init_aexternmethpropdef
(
1641 n_doc
: nullable ADoc,
1642 n_kwredef
: nullable TKwredef,
1643 n_visibility
: nullable AVisibility,
1644 n_kwmeth
: nullable TKwmeth,
1645 n_methid
: nullable AMethid,
1646 n_signature
: nullable ASignature,
1647 n_extern
: nullable TString,
1648 n_extern_calls
: nullable AExternCalls,
1649 n_extern_code_block
: nullable AExternCodeBlock
1654 if n_doc
!= null then
1657 _n_kwredef
= n_kwredef
1658 if n_kwredef
!= null then
1659 n_kwredef
.parent
= self
1661 _n_visibility
= n_visibility
.as(not null)
1662 n_visibility
.parent
= self
1663 _n_kwmeth
= n_kwmeth
.as(not null)
1664 n_kwmeth
.parent
= self
1665 _n_methid
= n_methid
.as(not null)
1666 n_methid
.parent
= self
1667 _n_signature
= n_signature
.as(not null)
1668 n_signature
.parent
= self
1669 _n_extern
= n_extern
1670 if n_extern
!= null then
1671 n_extern
.parent
= self
1673 _n_extern_calls
= n_extern_calls
1674 if n_extern_calls
!= null then
1675 n_extern_calls
.parent
= self
1677 _n_extern_code_block
= n_extern_code_block
1678 if n_extern_code_block
!= null then
1679 n_extern_code_block
.parent
= self
1683 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1685 if _n_doc
== old_child
then
1686 if new_child
!= null then
1687 new_child
.parent
= self
1688 assert new_child
isa ADoc
1695 if _n_kwredef
== old_child
then
1696 if new_child
!= null then
1697 new_child
.parent
= self
1698 assert new_child
isa TKwredef
1699 _n_kwredef
= new_child
1705 if _n_visibility
== old_child
then
1706 if new_child
!= null then
1707 new_child
.parent
= self
1708 assert new_child
isa AVisibility
1709 _n_visibility
= new_child
1715 if _n_kwmeth
== old_child
then
1716 if new_child
!= null then
1717 new_child
.parent
= self
1718 assert new_child
isa TKwmeth
1719 _n_kwmeth
= new_child
1725 if _n_methid
== old_child
then
1726 if new_child
!= null then
1727 new_child
.parent
= self
1728 assert new_child
isa AMethid
1729 _n_methid
= new_child
1735 if _n_signature
== old_child
then
1736 if new_child
!= null then
1737 new_child
.parent
= self
1738 assert new_child
isa ASignature
1739 _n_signature
= new_child
1745 if _n_extern
== old_child
then
1746 if new_child
!= null then
1747 new_child
.parent
= self
1748 assert new_child
isa TString
1749 _n_extern
= new_child
1755 if _n_extern_calls
== old_child
then
1756 if new_child
!= null then
1757 new_child
.parent
= self
1758 assert new_child
isa AExternCalls
1759 _n_extern_calls
= new_child
1761 _n_extern_calls
= null
1765 if _n_extern_code_block
== old_child
then
1766 if new_child
!= null then
1767 new_child
.parent
= self
1768 assert new_child
isa AExternCodeBlock
1769 _n_extern_code_block
= new_child
1771 _n_extern_code_block
= null
1777 redef fun visit_all
(v
: Visitor)
1779 if _n_doc
!= null then
1780 v
.enter_visit
(_n_doc
.as(not null))
1782 if _n_kwredef
!= null then
1783 v
.enter_visit
(_n_kwredef
.as(not null))
1785 v
.enter_visit
(_n_visibility
)
1786 v
.enter_visit
(_n_kwmeth
)
1787 v
.enter_visit
(_n_methid
)
1788 v
.enter_visit
(_n_signature
)
1789 if _n_extern
!= null then
1790 v
.enter_visit
(_n_extern
.as(not null))
1792 if _n_extern_calls
!= null then
1793 v
.enter_visit
(_n_extern_calls
.as(not null))
1795 if _n_extern_code_block
!= null then
1796 v
.enter_visit
(_n_extern_code_block
.as(not null))
1800 redef class AConcreteMethPropdef
1801 private init empty_init
do end
1803 init init_aconcretemethpropdef
(
1804 n_doc
: nullable ADoc,
1805 n_kwredef
: nullable TKwredef,
1806 n_visibility
: nullable AVisibility,
1807 n_kwmeth
: nullable TKwmeth,
1808 n_methid
: nullable AMethid,
1809 n_signature
: nullable ASignature,
1810 n_annotations
: nullable AAnnotations,
1811 n_block
: nullable AExpr
1816 if n_doc
!= null then
1819 _n_kwredef
= n_kwredef
1820 if n_kwredef
!= null then
1821 n_kwredef
.parent
= self
1823 _n_visibility
= n_visibility
.as(not null)
1824 n_visibility
.parent
= self
1825 _n_kwmeth
= n_kwmeth
.as(not null)
1826 n_kwmeth
.parent
= self
1827 _n_methid
= n_methid
.as(not null)
1828 n_methid
.parent
= self
1829 _n_signature
= n_signature
.as(not null)
1830 n_signature
.parent
= self
1831 _n_annotations
= n_annotations
1832 if n_annotations
!= null then
1833 n_annotations
.parent
= self
1836 if n_block
!= null then
1837 n_block
.parent
= self
1841 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1843 if _n_doc
== old_child
then
1844 if new_child
!= null then
1845 new_child
.parent
= self
1846 assert new_child
isa ADoc
1853 if _n_kwredef
== old_child
then
1854 if new_child
!= null then
1855 new_child
.parent
= self
1856 assert new_child
isa TKwredef
1857 _n_kwredef
= new_child
1863 if _n_visibility
== old_child
then
1864 if new_child
!= null then
1865 new_child
.parent
= self
1866 assert new_child
isa AVisibility
1867 _n_visibility
= new_child
1873 if _n_kwmeth
== old_child
then
1874 if new_child
!= null then
1875 new_child
.parent
= self
1876 assert new_child
isa TKwmeth
1877 _n_kwmeth
= new_child
1883 if _n_methid
== old_child
then
1884 if new_child
!= null then
1885 new_child
.parent
= self
1886 assert new_child
isa AMethid
1887 _n_methid
= new_child
1893 if _n_signature
== old_child
then
1894 if new_child
!= null then
1895 new_child
.parent
= self
1896 assert new_child
isa ASignature
1897 _n_signature
= new_child
1903 if _n_annotations
== old_child
then
1904 if new_child
!= null then
1905 new_child
.parent
= self
1906 assert new_child
isa AAnnotations
1907 _n_annotations
= new_child
1909 _n_annotations
= null
1913 if _n_block
== old_child
then
1914 if new_child
!= null then
1915 new_child
.parent
= self
1916 assert new_child
isa AExpr
1917 _n_block
= new_child
1925 redef fun visit_all
(v
: Visitor)
1927 if _n_doc
!= null then
1928 v
.enter_visit
(_n_doc
.as(not null))
1930 if _n_kwredef
!= null then
1931 v
.enter_visit
(_n_kwredef
.as(not null))
1933 v
.enter_visit
(_n_visibility
)
1934 v
.enter_visit
(_n_kwmeth
)
1935 v
.enter_visit
(_n_methid
)
1936 v
.enter_visit
(_n_signature
)
1937 if _n_annotations
!= null then
1938 v
.enter_visit
(_n_annotations
.as(not null))
1940 if _n_block
!= null then
1941 v
.enter_visit
(_n_block
.as(not null))
1945 redef class AConcreteInitPropdef
1946 private init empty_init
do end
1948 init init_aconcreteinitpropdef
(
1949 n_doc
: nullable ADoc,
1950 n_kwredef
: nullable TKwredef,
1951 n_visibility
: nullable AVisibility,
1952 n_kwinit
: nullable TKwinit,
1953 n_methid
: nullable AMethid,
1954 n_signature
: nullable ASignature,
1955 n_annotations
: nullable AAnnotations,
1956 n_block
: nullable AExpr
1961 if n_doc
!= null then
1964 _n_kwredef
= n_kwredef
1965 if n_kwredef
!= null then
1966 n_kwredef
.parent
= self
1968 _n_visibility
= n_visibility
.as(not null)
1969 n_visibility
.parent
= self
1970 _n_kwinit
= n_kwinit
.as(not null)
1971 n_kwinit
.parent
= self
1972 _n_methid
= n_methid
1973 if n_methid
!= null then
1974 n_methid
.parent
= self
1976 _n_signature
= n_signature
.as(not null)
1977 n_signature
.parent
= self
1978 _n_annotations
= n_annotations
1979 if n_annotations
!= null then
1980 n_annotations
.parent
= self
1983 if n_block
!= null then
1984 n_block
.parent
= self
1988 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1990 if _n_doc
== old_child
then
1991 if new_child
!= null then
1992 new_child
.parent
= self
1993 assert new_child
isa ADoc
2000 if _n_kwredef
== old_child
then
2001 if new_child
!= null then
2002 new_child
.parent
= self
2003 assert new_child
isa TKwredef
2004 _n_kwredef
= new_child
2010 if _n_visibility
== old_child
then
2011 if new_child
!= null then
2012 new_child
.parent
= self
2013 assert new_child
isa AVisibility
2014 _n_visibility
= new_child
2020 if _n_kwinit
== old_child
then
2021 if new_child
!= null then
2022 new_child
.parent
= self
2023 assert new_child
isa TKwinit
2024 _n_kwinit
= new_child
2030 if _n_methid
== old_child
then
2031 if new_child
!= null then
2032 new_child
.parent
= self
2033 assert new_child
isa AMethid
2034 _n_methid
= new_child
2040 if _n_signature
== old_child
then
2041 if new_child
!= null then
2042 new_child
.parent
= self
2043 assert new_child
isa ASignature
2044 _n_signature
= new_child
2050 if _n_annotations
== old_child
then
2051 if new_child
!= null then
2052 new_child
.parent
= self
2053 assert new_child
isa AAnnotations
2054 _n_annotations
= new_child
2056 _n_annotations
= null
2060 if _n_block
== old_child
then
2061 if new_child
!= null then
2062 new_child
.parent
= self
2063 assert new_child
isa AExpr
2064 _n_block
= new_child
2072 redef fun visit_all
(v
: Visitor)
2074 if _n_doc
!= null then
2075 v
.enter_visit
(_n_doc
.as(not null))
2077 if _n_kwredef
!= null then
2078 v
.enter_visit
(_n_kwredef
.as(not null))
2080 v
.enter_visit
(_n_visibility
)
2081 v
.enter_visit
(_n_kwinit
)
2082 if _n_methid
!= null then
2083 v
.enter_visit
(_n_methid
.as(not null))
2085 v
.enter_visit
(_n_signature
)
2086 if _n_annotations
!= null then
2087 v
.enter_visit
(_n_annotations
.as(not null))
2089 if _n_block
!= null then
2090 v
.enter_visit
(_n_block
.as(not null))
2094 redef class AExternInitPropdef
2095 private init empty_init
do end
2097 init init_aexterninitpropdef
(
2098 n_doc
: nullable ADoc,
2099 n_kwredef
: nullable TKwredef,
2100 n_visibility
: nullable AVisibility,
2101 n_kwnew
: nullable TKwnew,
2102 n_methid
: nullable AMethid,
2103 n_signature
: nullable ASignature,
2104 n_extern
: nullable TString,
2105 n_extern_calls
: nullable AExternCalls,
2106 n_extern_code_block
: nullable AExternCodeBlock
2111 if n_doc
!= null then
2114 _n_kwredef
= n_kwredef
2115 if n_kwredef
!= null then
2116 n_kwredef
.parent
= self
2118 _n_visibility
= n_visibility
.as(not null)
2119 n_visibility
.parent
= self
2120 _n_kwnew
= n_kwnew
.as(not null)
2121 n_kwnew
.parent
= self
2122 _n_methid
= n_methid
2123 if n_methid
!= null then
2124 n_methid
.parent
= self
2126 _n_signature
= n_signature
.as(not null)
2127 n_signature
.parent
= self
2128 _n_extern
= n_extern
2129 if n_extern
!= null then
2130 n_extern
.parent
= self
2132 _n_extern_calls
= n_extern_calls
2133 if n_extern_calls
!= null then
2134 n_extern_calls
.parent
= self
2136 _n_extern_code_block
= n_extern_code_block
2137 if n_extern_code_block
!= null then
2138 n_extern_code_block
.parent
= self
2142 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2144 if _n_doc
== old_child
then
2145 if new_child
!= null then
2146 new_child
.parent
= self
2147 assert new_child
isa ADoc
2154 if _n_kwredef
== old_child
then
2155 if new_child
!= null then
2156 new_child
.parent
= self
2157 assert new_child
isa TKwredef
2158 _n_kwredef
= new_child
2164 if _n_visibility
== old_child
then
2165 if new_child
!= null then
2166 new_child
.parent
= self
2167 assert new_child
isa AVisibility
2168 _n_visibility
= new_child
2174 if _n_kwnew
== old_child
then
2175 if new_child
!= null then
2176 new_child
.parent
= self
2177 assert new_child
isa TKwnew
2178 _n_kwnew
= new_child
2184 if _n_methid
== old_child
then
2185 if new_child
!= null then
2186 new_child
.parent
= self
2187 assert new_child
isa AMethid
2188 _n_methid
= new_child
2194 if _n_signature
== old_child
then
2195 if new_child
!= null then
2196 new_child
.parent
= self
2197 assert new_child
isa ASignature
2198 _n_signature
= new_child
2204 if _n_extern
== old_child
then
2205 if new_child
!= null then
2206 new_child
.parent
= self
2207 assert new_child
isa TString
2208 _n_extern
= new_child
2214 if _n_extern_calls
== old_child
then
2215 if new_child
!= null then
2216 new_child
.parent
= self
2217 assert new_child
isa AExternCalls
2218 _n_extern_calls
= new_child
2220 _n_extern_calls
= null
2224 if _n_extern_code_block
== old_child
then
2225 if new_child
!= null then
2226 new_child
.parent
= self
2227 assert new_child
isa AExternCodeBlock
2228 _n_extern_code_block
= new_child
2230 _n_extern_code_block
= null
2236 redef fun visit_all
(v
: Visitor)
2238 if _n_doc
!= null then
2239 v
.enter_visit
(_n_doc
.as(not null))
2241 if _n_kwredef
!= null then
2242 v
.enter_visit
(_n_kwredef
.as(not null))
2244 v
.enter_visit
(_n_visibility
)
2245 v
.enter_visit
(_n_kwnew
)
2246 if _n_methid
!= null then
2247 v
.enter_visit
(_n_methid
.as(not null))
2249 v
.enter_visit
(_n_signature
)
2250 if _n_extern
!= null then
2251 v
.enter_visit
(_n_extern
.as(not null))
2253 if _n_extern_calls
!= null then
2254 v
.enter_visit
(_n_extern_calls
.as(not null))
2256 if _n_extern_code_block
!= null then
2257 v
.enter_visit
(_n_extern_code_block
.as(not null))
2261 redef class AMainMethPropdef
2262 private init empty_init
do end
2264 init init_amainmethpropdef
(
2265 n_kwredef
: nullable TKwredef,
2266 n_block
: nullable AExpr
2270 _n_kwredef
= n_kwredef
2271 if n_kwredef
!= null then
2272 n_kwredef
.parent
= self
2275 if n_block
!= null then
2276 n_block
.parent
= self
2280 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2282 if _n_kwredef
== old_child
then
2283 if new_child
!= null then
2284 new_child
.parent
= self
2285 assert new_child
isa TKwredef
2286 _n_kwredef
= new_child
2292 if _n_block
== old_child
then
2293 if new_child
!= null then
2294 new_child
.parent
= self
2295 assert new_child
isa AExpr
2296 _n_block
= new_child
2304 redef fun visit_all
(v
: Visitor)
2306 if _n_kwredef
!= null then
2307 v
.enter_visit
(_n_kwredef
.as(not null))
2309 if _n_block
!= null then
2310 v
.enter_visit
(_n_block
.as(not null))
2314 redef class ATypePropdef
2315 private init empty_init
do end
2317 init init_atypepropdef
(
2318 n_doc
: nullable ADoc,
2319 n_kwredef
: nullable TKwredef,
2320 n_visibility
: nullable AVisibility,
2321 n_kwtype
: nullable TKwtype,
2322 n_id
: nullable TClassid,
2323 n_type
: nullable AType,
2324 n_annotations
: nullable AAnnotations
2329 if n_doc
!= null then
2332 _n_kwredef
= n_kwredef
2333 if n_kwredef
!= null then
2334 n_kwredef
.parent
= self
2336 _n_visibility
= n_visibility
.as(not null)
2337 n_visibility
.parent
= self
2338 _n_kwtype
= n_kwtype
.as(not null)
2339 n_kwtype
.parent
= self
2340 _n_id
= n_id
.as(not null)
2342 _n_type
= n_type
.as(not null)
2343 n_type
.parent
= self
2344 _n_annotations
= n_annotations
2345 if n_annotations
!= null then
2346 n_annotations
.parent
= self
2350 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2352 if _n_doc
== old_child
then
2353 if new_child
!= null then
2354 new_child
.parent
= self
2355 assert new_child
isa ADoc
2362 if _n_kwredef
== old_child
then
2363 if new_child
!= null then
2364 new_child
.parent
= self
2365 assert new_child
isa TKwredef
2366 _n_kwredef
= new_child
2372 if _n_visibility
== old_child
then
2373 if new_child
!= null then
2374 new_child
.parent
= self
2375 assert new_child
isa AVisibility
2376 _n_visibility
= new_child
2382 if _n_kwtype
== old_child
then
2383 if new_child
!= null then
2384 new_child
.parent
= self
2385 assert new_child
isa TKwtype
2386 _n_kwtype
= new_child
2392 if _n_id
== old_child
then
2393 if new_child
!= null then
2394 new_child
.parent
= self
2395 assert new_child
isa TClassid
2402 if _n_type
== old_child
then
2403 if new_child
!= null then
2404 new_child
.parent
= self
2405 assert new_child
isa AType
2412 if _n_annotations
== old_child
then
2413 if new_child
!= null then
2414 new_child
.parent
= self
2415 assert new_child
isa AAnnotations
2416 _n_annotations
= new_child
2418 _n_annotations
= null
2424 redef fun visit_all
(v
: Visitor)
2426 if _n_doc
!= null then
2427 v
.enter_visit
(_n_doc
.as(not null))
2429 if _n_kwredef
!= null then
2430 v
.enter_visit
(_n_kwredef
.as(not null))
2432 v
.enter_visit
(_n_visibility
)
2433 v
.enter_visit
(_n_kwtype
)
2434 v
.enter_visit
(_n_id
)
2435 v
.enter_visit
(_n_type
)
2436 if _n_annotations
!= null then
2437 v
.enter_visit
(_n_annotations
.as(not null))
2441 redef class AReadAble
2442 private init empty_init
do end
2444 init init_areadable
(
2445 n_kwredef
: nullable TKwredef,
2446 n_kwreadable
: nullable TKwreadable
2450 _n_kwredef
= n_kwredef
2451 if n_kwredef
!= null then
2452 n_kwredef
.parent
= self
2454 _n_kwreadable
= n_kwreadable
.as(not null)
2455 n_kwreadable
.parent
= self
2458 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2460 if _n_kwredef
== old_child
then
2461 if new_child
!= null then
2462 new_child
.parent
= self
2463 assert new_child
isa TKwredef
2464 _n_kwredef
= new_child
2470 if _n_kwreadable
== old_child
then
2471 if new_child
!= null then
2472 new_child
.parent
= self
2473 assert new_child
isa TKwreadable
2474 _n_kwreadable
= new_child
2482 redef fun visit_all
(v
: Visitor)
2484 if _n_kwredef
!= null then
2485 v
.enter_visit
(_n_kwredef
.as(not null))
2487 v
.enter_visit
(_n_kwreadable
)
2490 redef class AWriteAble
2491 private init empty_init
do end
2493 init init_awriteable
(
2494 n_kwredef
: nullable TKwredef,
2495 n_visibility
: nullable AVisibility,
2496 n_kwwritable
: nullable TKwwritable
2500 _n_kwredef
= n_kwredef
2501 if n_kwredef
!= null then
2502 n_kwredef
.parent
= self
2504 _n_visibility
= n_visibility
2505 if n_visibility
!= null then
2506 n_visibility
.parent
= self
2508 _n_kwwritable
= n_kwwritable
.as(not null)
2509 n_kwwritable
.parent
= self
2512 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2514 if _n_kwredef
== old_child
then
2515 if new_child
!= null then
2516 new_child
.parent
= self
2517 assert new_child
isa TKwredef
2518 _n_kwredef
= new_child
2524 if _n_visibility
== old_child
then
2525 if new_child
!= null then
2526 new_child
.parent
= self
2527 assert new_child
isa AVisibility
2528 _n_visibility
= new_child
2530 _n_visibility
= null
2534 if _n_kwwritable
== old_child
then
2535 if new_child
!= null then
2536 new_child
.parent
= self
2537 assert new_child
isa TKwwritable
2538 _n_kwwritable
= new_child
2546 redef fun visit_all
(v
: Visitor)
2548 if _n_kwredef
!= null then
2549 v
.enter_visit
(_n_kwredef
.as(not null))
2551 if _n_visibility
!= null then
2552 v
.enter_visit
(_n_visibility
.as(not null))
2554 v
.enter_visit
(_n_kwwritable
)
2557 redef class AIdMethid
2558 private init empty_init
do end
2560 init init_aidmethid
(
2565 _n_id
= n_id
.as(not null)
2569 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2571 if _n_id
== old_child
then
2572 if new_child
!= null then
2573 new_child
.parent
= self
2574 assert new_child
isa TId
2583 redef fun visit_all
(v
: Visitor)
2585 v
.enter_visit
(_n_id
)
2588 redef class APlusMethid
2589 private init empty_init
do end
2591 init init_aplusmethid
(
2592 n_plus
: nullable TPlus
2596 _n_plus
= n_plus
.as(not null)
2597 n_plus
.parent
= self
2600 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2602 if _n_plus
== old_child
then
2603 if new_child
!= null then
2604 new_child
.parent
= self
2605 assert new_child
isa TPlus
2614 redef fun visit_all
(v
: Visitor)
2616 v
.enter_visit
(_n_plus
)
2619 redef class AMinusMethid
2620 private init empty_init
do end
2622 init init_aminusmethid
(
2623 n_minus
: nullable TMinus
2627 _n_minus
= n_minus
.as(not null)
2628 n_minus
.parent
= self
2631 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2633 if _n_minus
== old_child
then
2634 if new_child
!= null then
2635 new_child
.parent
= self
2636 assert new_child
isa TMinus
2637 _n_minus
= new_child
2645 redef fun visit_all
(v
: Visitor)
2647 v
.enter_visit
(_n_minus
)
2650 redef class AStarMethid
2651 private init empty_init
do end
2653 init init_astarmethid
(
2654 n_star
: nullable TStar
2658 _n_star
= n_star
.as(not null)
2659 n_star
.parent
= self
2662 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2664 if _n_star
== old_child
then
2665 if new_child
!= null then
2666 new_child
.parent
= self
2667 assert new_child
isa TStar
2676 redef fun visit_all
(v
: Visitor)
2678 v
.enter_visit
(_n_star
)
2681 redef class ASlashMethid
2682 private init empty_init
do end
2684 init init_aslashmethid
(
2685 n_slash
: nullable TSlash
2689 _n_slash
= n_slash
.as(not null)
2690 n_slash
.parent
= self
2693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2695 if _n_slash
== old_child
then
2696 if new_child
!= null then
2697 new_child
.parent
= self
2698 assert new_child
isa TSlash
2699 _n_slash
= new_child
2707 redef fun visit_all
(v
: Visitor)
2709 v
.enter_visit
(_n_slash
)
2712 redef class APercentMethid
2713 private init empty_init
do end
2715 init init_apercentmethid
(
2716 n_percent
: nullable TPercent
2720 _n_percent
= n_percent
.as(not null)
2721 n_percent
.parent
= self
2724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2726 if _n_percent
== old_child
then
2727 if new_child
!= null then
2728 new_child
.parent
= self
2729 assert new_child
isa TPercent
2730 _n_percent
= new_child
2738 redef fun visit_all
(v
: Visitor)
2740 v
.enter_visit
(_n_percent
)
2743 redef class AEqMethid
2744 private init empty_init
do end
2746 init init_aeqmethid
(
2751 _n_eq
= n_eq
.as(not null)
2755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2757 if _n_eq
== old_child
then
2758 if new_child
!= null then
2759 new_child
.parent
= self
2760 assert new_child
isa TEq
2769 redef fun visit_all
(v
: Visitor)
2771 v
.enter_visit
(_n_eq
)
2774 redef class ANeMethid
2775 private init empty_init
do end
2777 init init_anemethid
(
2782 _n_ne
= n_ne
.as(not null)
2786 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2788 if _n_ne
== old_child
then
2789 if new_child
!= null then
2790 new_child
.parent
= self
2791 assert new_child
isa TNe
2800 redef fun visit_all
(v
: Visitor)
2802 v
.enter_visit
(_n_ne
)
2805 redef class ALeMethid
2806 private init empty_init
do end
2808 init init_alemethid
(
2813 _n_le
= n_le
.as(not null)
2817 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2819 if _n_le
== old_child
then
2820 if new_child
!= null then
2821 new_child
.parent
= self
2822 assert new_child
isa TLe
2831 redef fun visit_all
(v
: Visitor)
2833 v
.enter_visit
(_n_le
)
2836 redef class AGeMethid
2837 private init empty_init
do end
2839 init init_agemethid
(
2844 _n_ge
= n_ge
.as(not null)
2848 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2850 if _n_ge
== old_child
then
2851 if new_child
!= null then
2852 new_child
.parent
= self
2853 assert new_child
isa TGe
2862 redef fun visit_all
(v
: Visitor)
2864 v
.enter_visit
(_n_ge
)
2867 redef class ALtMethid
2868 private init empty_init
do end
2870 init init_altmethid
(
2875 _n_lt
= n_lt
.as(not null)
2879 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2881 if _n_lt
== old_child
then
2882 if new_child
!= null then
2883 new_child
.parent
= self
2884 assert new_child
isa TLt
2893 redef fun visit_all
(v
: Visitor)
2895 v
.enter_visit
(_n_lt
)
2898 redef class AGtMethid
2899 private init empty_init
do end
2901 init init_agtmethid
(
2906 _n_gt
= n_gt
.as(not null)
2910 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2912 if _n_gt
== old_child
then
2913 if new_child
!= null then
2914 new_child
.parent
= self
2915 assert new_child
isa TGt
2924 redef fun visit_all
(v
: Visitor)
2926 v
.enter_visit
(_n_gt
)
2929 redef class ALlMethid
2930 private init empty_init
do end
2932 init init_allmethid
(
2937 _n_ll
= n_ll
.as(not null)
2941 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2943 if _n_ll
== old_child
then
2944 if new_child
!= null then
2945 new_child
.parent
= self
2946 assert new_child
isa TLl
2955 redef fun visit_all
(v
: Visitor)
2957 v
.enter_visit
(_n_ll
)
2960 redef class AGgMethid
2961 private init empty_init
do end
2963 init init_aggmethid
(
2968 _n_gg
= n_gg
.as(not null)
2972 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2974 if _n_gg
== old_child
then
2975 if new_child
!= null then
2976 new_child
.parent
= self
2977 assert new_child
isa TGg
2986 redef fun visit_all
(v
: Visitor)
2988 v
.enter_visit
(_n_gg
)
2991 redef class ABraMethid
2992 private init empty_init
do end
2994 init init_abramethid
(
2995 n_obra
: nullable TObra,
2996 n_cbra
: nullable TCbra
3000 _n_obra
= n_obra
.as(not null)
3001 n_obra
.parent
= self
3002 _n_cbra
= n_cbra
.as(not null)
3003 n_cbra
.parent
= self
3006 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3008 if _n_obra
== old_child
then
3009 if new_child
!= null then
3010 new_child
.parent
= self
3011 assert new_child
isa TObra
3018 if _n_cbra
== old_child
then
3019 if new_child
!= null then
3020 new_child
.parent
= self
3021 assert new_child
isa TCbra
3030 redef fun visit_all
(v
: Visitor)
3032 v
.enter_visit
(_n_obra
)
3033 v
.enter_visit
(_n_cbra
)
3036 redef class AStarshipMethid
3037 private init empty_init
do end
3039 init init_astarshipmethid
(
3040 n_starship
: nullable TStarship
3044 _n_starship
= n_starship
.as(not null)
3045 n_starship
.parent
= self
3048 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3050 if _n_starship
== old_child
then
3051 if new_child
!= null then
3052 new_child
.parent
= self
3053 assert new_child
isa TStarship
3054 _n_starship
= new_child
3062 redef fun visit_all
(v
: Visitor)
3064 v
.enter_visit
(_n_starship
)
3067 redef class AAssignMethid
3068 private init empty_init
do end
3070 init init_aassignmethid
(
3072 n_assign
: nullable TAssign
3076 _n_id
= n_id
.as(not null)
3078 _n_assign
= n_assign
.as(not null)
3079 n_assign
.parent
= self
3082 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3084 if _n_id
== old_child
then
3085 if new_child
!= null then
3086 new_child
.parent
= self
3087 assert new_child
isa TId
3094 if _n_assign
== old_child
then
3095 if new_child
!= null then
3096 new_child
.parent
= self
3097 assert new_child
isa TAssign
3098 _n_assign
= new_child
3106 redef fun visit_all
(v
: Visitor)
3108 v
.enter_visit
(_n_id
)
3109 v
.enter_visit
(_n_assign
)
3112 redef class ABraassignMethid
3113 private init empty_init
do end
3115 init init_abraassignmethid
(
3116 n_obra
: nullable TObra,
3117 n_cbra
: nullable TCbra,
3118 n_assign
: nullable TAssign
3122 _n_obra
= n_obra
.as(not null)
3123 n_obra
.parent
= self
3124 _n_cbra
= n_cbra
.as(not null)
3125 n_cbra
.parent
= self
3126 _n_assign
= n_assign
.as(not null)
3127 n_assign
.parent
= self
3130 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3132 if _n_obra
== old_child
then
3133 if new_child
!= null then
3134 new_child
.parent
= self
3135 assert new_child
isa TObra
3142 if _n_cbra
== old_child
then
3143 if new_child
!= null then
3144 new_child
.parent
= self
3145 assert new_child
isa TCbra
3152 if _n_assign
== old_child
then
3153 if new_child
!= null then
3154 new_child
.parent
= self
3155 assert new_child
isa TAssign
3156 _n_assign
= new_child
3164 redef fun visit_all
(v
: Visitor)
3166 v
.enter_visit
(_n_obra
)
3167 v
.enter_visit
(_n_cbra
)
3168 v
.enter_visit
(_n_assign
)
3171 redef class ASignature
3172 private init empty_init
do end
3174 init init_asignature
(
3175 n_opar
: nullable TOpar,
3176 n_params
: Collection[Object], # Should be Collection[AParam]
3177 n_cpar
: nullable TCpar,
3178 n_type
: nullable AType,
3179 n_closure_decls
: Collection[Object] # Should be Collection[AClosureDecl]
3184 if n_opar
!= null then
3185 n_opar
.parent
= self
3187 for n
in n_params
do
3193 if n_cpar
!= null then
3194 n_cpar
.parent
= self
3197 if n_type
!= null then
3198 n_type
.parent
= self
3200 for n
in n_closure_decls
do
3201 assert n
isa AClosureDecl
3202 _n_closure_decls
.add
(n
)
3207 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3209 if _n_opar
== old_child
then
3210 if new_child
!= null then
3211 new_child
.parent
= self
3212 assert new_child
isa TOpar
3219 for i
in [0.._n_params
.length
[ do
3220 if _n_params
[i
] == old_child
then
3221 if new_child
!= null then
3222 assert new_child
isa AParam
3223 _n_params
[i
] = new_child
3224 new_child
.parent
= self
3226 _n_params
.remove_at
(i
)
3231 if _n_cpar
== old_child
then
3232 if new_child
!= null then
3233 new_child
.parent
= self
3234 assert new_child
isa TCpar
3241 if _n_type
== old_child
then
3242 if new_child
!= null then
3243 new_child
.parent
= self
3244 assert new_child
isa AType
3251 for i
in [0.._n_closure_decls
.length
[ do
3252 if _n_closure_decls
[i
] == old_child
then
3253 if new_child
!= null then
3254 assert new_child
isa AClosureDecl
3255 _n_closure_decls
[i
] = new_child
3256 new_child
.parent
= self
3258 _n_closure_decls
.remove_at
(i
)
3265 redef fun visit_all
(v
: Visitor)
3267 if _n_opar
!= null then
3268 v
.enter_visit
(_n_opar
.as(not null))
3270 for n
in _n_params
do
3273 if _n_cpar
!= null then
3274 v
.enter_visit
(_n_cpar
.as(not null))
3276 if _n_type
!= null then
3277 v
.enter_visit
(_n_type
.as(not null))
3279 for n
in _n_closure_decls
do
3285 private init empty_init
do end
3289 n_type
: nullable AType,
3290 n_dotdotdot
: nullable TDotdotdot,
3291 n_annotations
: nullable AAnnotations
3295 _n_id
= n_id
.as(not null)
3298 if n_type
!= null then
3299 n_type
.parent
= self
3301 _n_dotdotdot
= n_dotdotdot
3302 if n_dotdotdot
!= null then
3303 n_dotdotdot
.parent
= self
3305 _n_annotations
= n_annotations
3306 if n_annotations
!= null then
3307 n_annotations
.parent
= self
3311 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3313 if _n_id
== old_child
then
3314 if new_child
!= null then
3315 new_child
.parent
= self
3316 assert new_child
isa TId
3323 if _n_type
== old_child
then
3324 if new_child
!= null then
3325 new_child
.parent
= self
3326 assert new_child
isa AType
3333 if _n_dotdotdot
== old_child
then
3334 if new_child
!= null then
3335 new_child
.parent
= self
3336 assert new_child
isa TDotdotdot
3337 _n_dotdotdot
= new_child
3343 if _n_annotations
== old_child
then
3344 if new_child
!= null then
3345 new_child
.parent
= self
3346 assert new_child
isa AAnnotations
3347 _n_annotations
= new_child
3349 _n_annotations
= null
3355 redef fun visit_all
(v
: Visitor)
3357 v
.enter_visit
(_n_id
)
3358 if _n_type
!= null then
3359 v
.enter_visit
(_n_type
.as(not null))
3361 if _n_dotdotdot
!= null then
3362 v
.enter_visit
(_n_dotdotdot
.as(not null))
3364 if _n_annotations
!= null then
3365 v
.enter_visit
(_n_annotations
.as(not null))
3369 redef class AClosureDecl
3370 private init empty_init
do end
3372 init init_aclosuredecl
(
3373 n_kwbreak
: nullable TKwbreak,
3374 n_bang
: nullable TBang,
3376 n_signature
: nullable ASignature,
3377 n_expr
: nullable AExpr
3381 _n_kwbreak
= n_kwbreak
3382 if n_kwbreak
!= null then
3383 n_kwbreak
.parent
= self
3385 _n_bang
= n_bang
.as(not null)
3386 n_bang
.parent
= self
3387 _n_id
= n_id
.as(not null)
3389 _n_signature
= n_signature
.as(not null)
3390 n_signature
.parent
= self
3392 if n_expr
!= null then
3393 n_expr
.parent
= self
3397 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3399 if _n_kwbreak
== old_child
then
3400 if new_child
!= null then
3401 new_child
.parent
= self
3402 assert new_child
isa TKwbreak
3403 _n_kwbreak
= new_child
3409 if _n_bang
== old_child
then
3410 if new_child
!= null then
3411 new_child
.parent
= self
3412 assert new_child
isa TBang
3419 if _n_id
== old_child
then
3420 if new_child
!= null then
3421 new_child
.parent
= self
3422 assert new_child
isa TId
3429 if _n_signature
== old_child
then
3430 if new_child
!= null then
3431 new_child
.parent
= self
3432 assert new_child
isa ASignature
3433 _n_signature
= new_child
3439 if _n_expr
== old_child
then
3440 if new_child
!= null then
3441 new_child
.parent
= self
3442 assert new_child
isa AExpr
3451 redef fun visit_all
(v
: Visitor)
3453 if _n_kwbreak
!= null then
3454 v
.enter_visit
(_n_kwbreak
.as(not null))
3456 v
.enter_visit
(_n_bang
)
3457 v
.enter_visit
(_n_id
)
3458 v
.enter_visit
(_n_signature
)
3459 if _n_expr
!= null then
3460 v
.enter_visit
(_n_expr
.as(not null))
3465 private init empty_init
do end
3468 n_kwnullable
: nullable TKwnullable,
3469 n_id
: nullable TClassid,
3470 n_types
: Collection[Object], # Should be Collection[AType]
3471 n_annotations
: nullable AAnnotations
3475 _n_kwnullable
= n_kwnullable
3476 if n_kwnullable
!= null then
3477 n_kwnullable
.parent
= self
3479 _n_id
= n_id
.as(not null)
3486 _n_annotations
= n_annotations
3487 if n_annotations
!= null then
3488 n_annotations
.parent
= self
3492 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3494 if _n_kwnullable
== old_child
then
3495 if new_child
!= null then
3496 new_child
.parent
= self
3497 assert new_child
isa TKwnullable
3498 _n_kwnullable
= new_child
3500 _n_kwnullable
= null
3504 if _n_id
== old_child
then
3505 if new_child
!= null then
3506 new_child
.parent
= self
3507 assert new_child
isa TClassid
3514 for i
in [0.._n_types
.length
[ do
3515 if _n_types
[i
] == old_child
then
3516 if new_child
!= null then
3517 assert new_child
isa AType
3518 _n_types
[i
] = new_child
3519 new_child
.parent
= self
3521 _n_types
.remove_at
(i
)
3526 if _n_annotations
== old_child
then
3527 if new_child
!= null then
3528 new_child
.parent
= self
3529 assert new_child
isa AAnnotations
3530 _n_annotations
= new_child
3532 _n_annotations
= null
3538 redef fun visit_all
(v
: Visitor)
3540 if _n_kwnullable
!= null then
3541 v
.enter_visit
(_n_kwnullable
.as(not null))
3543 v
.enter_visit
(_n_id
)
3544 for n
in _n_types
do
3547 if _n_annotations
!= null then
3548 v
.enter_visit
(_n_annotations
.as(not null))
3553 private init empty_init
do end
3556 n_kwlabel
: nullable TKwlabel,
3561 _n_kwlabel
= n_kwlabel
.as(not null)
3562 n_kwlabel
.parent
= self
3563 _n_id
= n_id
.as(not null)
3567 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3569 if _n_kwlabel
== old_child
then
3570 if new_child
!= null then
3571 new_child
.parent
= self
3572 assert new_child
isa TKwlabel
3573 _n_kwlabel
= new_child
3579 if _n_id
== old_child
then
3580 if new_child
!= null then
3581 new_child
.parent
= self
3582 assert new_child
isa TId
3591 redef fun visit_all
(v
: Visitor)
3593 v
.enter_visit
(_n_kwlabel
)
3594 v
.enter_visit
(_n_id
)
3597 redef class ABlockExpr
3598 private init empty_init
do end
3600 init init_ablockexpr
(
3601 n_expr
: Collection[Object], # Should be Collection[AExpr]
3602 n_kwend
: nullable TKwend
3612 if n_kwend
!= null then
3613 n_kwend
.parent
= self
3617 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3619 for i
in [0.._n_expr
.length
[ do
3620 if _n_expr
[i
] == old_child
then
3621 if new_child
!= null then
3622 assert new_child
isa AExpr
3623 _n_expr
[i
] = new_child
3624 new_child
.parent
= self
3626 _n_expr
.remove_at
(i
)
3631 if _n_kwend
== old_child
then
3632 if new_child
!= null then
3633 new_child
.parent
= self
3634 assert new_child
isa TKwend
3635 _n_kwend
= new_child
3643 redef fun visit_all
(v
: Visitor)
3648 if _n_kwend
!= null then
3649 v
.enter_visit
(_n_kwend
.as(not null))
3653 redef class AVardeclExpr
3654 private init empty_init
do end
3656 init init_avardeclexpr
(
3657 n_kwvar
: nullable TKwvar,
3659 n_type
: nullable AType,
3660 n_assign
: nullable TAssign,
3661 n_expr
: nullable AExpr,
3662 n_annotations
: nullable AAnnotations
3666 _n_kwvar
= n_kwvar
.as(not null)
3667 n_kwvar
.parent
= self
3668 _n_id
= n_id
.as(not null)
3671 if n_type
!= null then
3672 n_type
.parent
= self
3674 _n_assign
= n_assign
3675 if n_assign
!= null then
3676 n_assign
.parent
= self
3679 if n_expr
!= null then
3680 n_expr
.parent
= self
3682 _n_annotations
= n_annotations
3683 if n_annotations
!= null then
3684 n_annotations
.parent
= self
3688 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3690 if _n_kwvar
== old_child
then
3691 if new_child
!= null then
3692 new_child
.parent
= self
3693 assert new_child
isa TKwvar
3694 _n_kwvar
= new_child
3700 if _n_id
== old_child
then
3701 if new_child
!= null then
3702 new_child
.parent
= self
3703 assert new_child
isa TId
3710 if _n_type
== old_child
then
3711 if new_child
!= null then
3712 new_child
.parent
= self
3713 assert new_child
isa AType
3720 if _n_assign
== old_child
then
3721 if new_child
!= null then
3722 new_child
.parent
= self
3723 assert new_child
isa TAssign
3724 _n_assign
= new_child
3730 if _n_expr
== old_child
then
3731 if new_child
!= null then
3732 new_child
.parent
= self
3733 assert new_child
isa AExpr
3740 if _n_annotations
== old_child
then
3741 if new_child
!= null then
3742 new_child
.parent
= self
3743 assert new_child
isa AAnnotations
3744 _n_annotations
= new_child
3746 _n_annotations
= null
3752 redef fun visit_all
(v
: Visitor)
3754 v
.enter_visit
(_n_kwvar
)
3755 v
.enter_visit
(_n_id
)
3756 if _n_type
!= null then
3757 v
.enter_visit
(_n_type
.as(not null))
3759 if _n_assign
!= null then
3760 v
.enter_visit
(_n_assign
.as(not null))
3762 if _n_expr
!= null then
3763 v
.enter_visit
(_n_expr
.as(not null))
3765 if _n_annotations
!= null then
3766 v
.enter_visit
(_n_annotations
.as(not null))
3770 redef class AReturnExpr
3771 private init empty_init
do end
3773 init init_areturnexpr
(
3774 n_kwreturn
: nullable TKwreturn,
3775 n_expr
: nullable AExpr
3779 _n_kwreturn
= n_kwreturn
3780 if n_kwreturn
!= null then
3781 n_kwreturn
.parent
= self
3784 if n_expr
!= null then
3785 n_expr
.parent
= self
3789 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3791 if _n_kwreturn
== old_child
then
3792 if new_child
!= null then
3793 new_child
.parent
= self
3794 assert new_child
isa TKwreturn
3795 _n_kwreturn
= new_child
3801 if _n_expr
== old_child
then
3802 if new_child
!= null then
3803 new_child
.parent
= self
3804 assert new_child
isa AExpr
3813 redef fun visit_all
(v
: Visitor)
3815 if _n_kwreturn
!= null then
3816 v
.enter_visit
(_n_kwreturn
.as(not null))
3818 if _n_expr
!= null then
3819 v
.enter_visit
(_n_expr
.as(not null))
3823 redef class ABreakExpr
3824 private init empty_init
do end
3826 init init_abreakexpr
(
3827 n_kwbreak
: nullable TKwbreak,
3828 n_label
: nullable ALabel,
3829 n_expr
: nullable AExpr
3833 _n_kwbreak
= n_kwbreak
.as(not null)
3834 n_kwbreak
.parent
= self
3836 if n_label
!= null then
3837 n_label
.parent
= self
3840 if n_expr
!= null then
3841 n_expr
.parent
= self
3845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3847 if _n_kwbreak
== old_child
then
3848 if new_child
!= null then
3849 new_child
.parent
= self
3850 assert new_child
isa TKwbreak
3851 _n_kwbreak
= new_child
3857 if _n_label
== old_child
then
3858 if new_child
!= null then
3859 new_child
.parent
= self
3860 assert new_child
isa ALabel
3861 _n_label
= new_child
3867 if _n_expr
== old_child
then
3868 if new_child
!= null then
3869 new_child
.parent
= self
3870 assert new_child
isa AExpr
3879 redef fun visit_all
(v
: Visitor)
3881 v
.enter_visit
(_n_kwbreak
)
3882 if _n_label
!= null then
3883 v
.enter_visit
(_n_label
.as(not null))
3885 if _n_expr
!= null then
3886 v
.enter_visit
(_n_expr
.as(not null))
3890 redef class AAbortExpr
3891 private init empty_init
do end
3893 init init_aabortexpr
(
3894 n_kwabort
: nullable TKwabort
3898 _n_kwabort
= n_kwabort
.as(not null)
3899 n_kwabort
.parent
= self
3902 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3904 if _n_kwabort
== old_child
then
3905 if new_child
!= null then
3906 new_child
.parent
= self
3907 assert new_child
isa TKwabort
3908 _n_kwabort
= new_child
3916 redef fun visit_all
(v
: Visitor)
3918 v
.enter_visit
(_n_kwabort
)
3921 redef class AContinueExpr
3922 private init empty_init
do end
3924 init init_acontinueexpr
(
3925 n_kwcontinue
: nullable TKwcontinue,
3926 n_label
: nullable ALabel,
3927 n_expr
: nullable AExpr
3931 _n_kwcontinue
= n_kwcontinue
3932 if n_kwcontinue
!= null then
3933 n_kwcontinue
.parent
= self
3936 if n_label
!= null then
3937 n_label
.parent
= self
3940 if n_expr
!= null then
3941 n_expr
.parent
= self
3945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3947 if _n_kwcontinue
== old_child
then
3948 if new_child
!= null then
3949 new_child
.parent
= self
3950 assert new_child
isa TKwcontinue
3951 _n_kwcontinue
= new_child
3953 _n_kwcontinue
= null
3957 if _n_label
== old_child
then
3958 if new_child
!= null then
3959 new_child
.parent
= self
3960 assert new_child
isa ALabel
3961 _n_label
= new_child
3967 if _n_expr
== old_child
then
3968 if new_child
!= null then
3969 new_child
.parent
= self
3970 assert new_child
isa AExpr
3979 redef fun visit_all
(v
: Visitor)
3981 if _n_kwcontinue
!= null then
3982 v
.enter_visit
(_n_kwcontinue
.as(not null))
3984 if _n_label
!= null then
3985 v
.enter_visit
(_n_label
.as(not null))
3987 if _n_expr
!= null then
3988 v
.enter_visit
(_n_expr
.as(not null))
3993 private init empty_init
do end
3996 n_kwdo
: nullable TKwdo,
3997 n_block
: nullable AExpr,
3998 n_label
: nullable ALabel
4002 _n_kwdo
= n_kwdo
.as(not null)
4003 n_kwdo
.parent
= self
4005 if n_block
!= null then
4006 n_block
.parent
= self
4009 if n_label
!= null then
4010 n_label
.parent
= self
4014 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4016 if _n_kwdo
== old_child
then
4017 if new_child
!= null then
4018 new_child
.parent
= self
4019 assert new_child
isa TKwdo
4026 if _n_block
== old_child
then
4027 if new_child
!= null then
4028 new_child
.parent
= self
4029 assert new_child
isa AExpr
4030 _n_block
= new_child
4036 if _n_label
== old_child
then
4037 if new_child
!= null then
4038 new_child
.parent
= self
4039 assert new_child
isa ALabel
4040 _n_label
= new_child
4048 redef fun visit_all
(v
: Visitor)
4050 v
.enter_visit
(_n_kwdo
)
4051 if _n_block
!= null then
4052 v
.enter_visit
(_n_block
.as(not null))
4054 if _n_label
!= null then
4055 v
.enter_visit
(_n_label
.as(not null))
4060 private init empty_init
do end
4063 n_kwif
: nullable TKwif,
4064 n_expr
: nullable AExpr,
4065 n_then
: nullable AExpr,
4066 n_else
: nullable AExpr
4070 _n_kwif
= n_kwif
.as(not null)
4071 n_kwif
.parent
= self
4072 _n_expr
= n_expr
.as(not null)
4073 n_expr
.parent
= self
4075 if n_then
!= null then
4076 n_then
.parent
= self
4079 if n_else
!= null then
4080 n_else
.parent
= self
4084 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4086 if _n_kwif
== old_child
then
4087 if new_child
!= null then
4088 new_child
.parent
= self
4089 assert new_child
isa TKwif
4096 if _n_expr
== old_child
then
4097 if new_child
!= null then
4098 new_child
.parent
= self
4099 assert new_child
isa AExpr
4106 if _n_then
== old_child
then
4107 if new_child
!= null then
4108 new_child
.parent
= self
4109 assert new_child
isa AExpr
4116 if _n_else
== old_child
then
4117 if new_child
!= null then
4118 new_child
.parent
= self
4119 assert new_child
isa AExpr
4128 redef fun visit_all
(v
: Visitor)
4130 v
.enter_visit
(_n_kwif
)
4131 v
.enter_visit
(_n_expr
)
4132 if _n_then
!= null then
4133 v
.enter_visit
(_n_then
.as(not null))
4135 if _n_else
!= null then
4136 v
.enter_visit
(_n_else
.as(not null))
4140 redef class AIfexprExpr
4141 private init empty_init
do end
4143 init init_aifexprexpr
(
4144 n_kwif
: nullable TKwif,
4145 n_expr
: nullable AExpr,
4146 n_kwthen
: nullable TKwthen,
4147 n_then
: nullable AExpr,
4148 n_kwelse
: nullable TKwelse,
4149 n_else
: nullable AExpr
4153 _n_kwif
= n_kwif
.as(not null)
4154 n_kwif
.parent
= self
4155 _n_expr
= n_expr
.as(not null)
4156 n_expr
.parent
= self
4157 _n_kwthen
= n_kwthen
.as(not null)
4158 n_kwthen
.parent
= self
4159 _n_then
= n_then
.as(not null)
4160 n_then
.parent
= self
4161 _n_kwelse
= n_kwelse
.as(not null)
4162 n_kwelse
.parent
= self
4163 _n_else
= n_else
.as(not null)
4164 n_else
.parent
= self
4167 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4169 if _n_kwif
== old_child
then
4170 if new_child
!= null then
4171 new_child
.parent
= self
4172 assert new_child
isa TKwif
4179 if _n_expr
== old_child
then
4180 if new_child
!= null then
4181 new_child
.parent
= self
4182 assert new_child
isa AExpr
4189 if _n_kwthen
== old_child
then
4190 if new_child
!= null then
4191 new_child
.parent
= self
4192 assert new_child
isa TKwthen
4193 _n_kwthen
= new_child
4199 if _n_then
== old_child
then
4200 if new_child
!= null then
4201 new_child
.parent
= self
4202 assert new_child
isa AExpr
4209 if _n_kwelse
== old_child
then
4210 if new_child
!= null then
4211 new_child
.parent
= self
4212 assert new_child
isa TKwelse
4213 _n_kwelse
= new_child
4219 if _n_else
== old_child
then
4220 if new_child
!= null then
4221 new_child
.parent
= self
4222 assert new_child
isa AExpr
4231 redef fun visit_all
(v
: Visitor)
4233 v
.enter_visit
(_n_kwif
)
4234 v
.enter_visit
(_n_expr
)
4235 v
.enter_visit
(_n_kwthen
)
4236 v
.enter_visit
(_n_then
)
4237 v
.enter_visit
(_n_kwelse
)
4238 v
.enter_visit
(_n_else
)
4241 redef class AWhileExpr
4242 private init empty_init
do end
4244 init init_awhileexpr
(
4245 n_kwwhile
: nullable TKwwhile,
4246 n_expr
: nullable AExpr,
4247 n_kwdo
: nullable TKwdo,
4248 n_block
: nullable AExpr,
4249 n_label
: nullable ALabel
4253 _n_kwwhile
= n_kwwhile
.as(not null)
4254 n_kwwhile
.parent
= self
4255 _n_expr
= n_expr
.as(not null)
4256 n_expr
.parent
= self
4257 _n_kwdo
= n_kwdo
.as(not null)
4258 n_kwdo
.parent
= self
4260 if n_block
!= null then
4261 n_block
.parent
= self
4264 if n_label
!= null then
4265 n_label
.parent
= self
4269 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4271 if _n_kwwhile
== old_child
then
4272 if new_child
!= null then
4273 new_child
.parent
= self
4274 assert new_child
isa TKwwhile
4275 _n_kwwhile
= new_child
4281 if _n_expr
== old_child
then
4282 if new_child
!= null then
4283 new_child
.parent
= self
4284 assert new_child
isa AExpr
4291 if _n_kwdo
== old_child
then
4292 if new_child
!= null then
4293 new_child
.parent
= self
4294 assert new_child
isa TKwdo
4301 if _n_block
== old_child
then
4302 if new_child
!= null then
4303 new_child
.parent
= self
4304 assert new_child
isa AExpr
4305 _n_block
= new_child
4311 if _n_label
== old_child
then
4312 if new_child
!= null then
4313 new_child
.parent
= self
4314 assert new_child
isa ALabel
4315 _n_label
= new_child
4323 redef fun visit_all
(v
: Visitor)
4325 v
.enter_visit
(_n_kwwhile
)
4326 v
.enter_visit
(_n_expr
)
4327 v
.enter_visit
(_n_kwdo
)
4328 if _n_block
!= null then
4329 v
.enter_visit
(_n_block
.as(not null))
4331 if _n_label
!= null then
4332 v
.enter_visit
(_n_label
.as(not null))
4336 redef class ALoopExpr
4337 private init empty_init
do end
4339 init init_aloopexpr
(
4340 n_kwloop
: nullable TKwloop,
4341 n_block
: nullable AExpr,
4342 n_label
: nullable ALabel
4346 _n_kwloop
= n_kwloop
.as(not null)
4347 n_kwloop
.parent
= self
4349 if n_block
!= null then
4350 n_block
.parent
= self
4353 if n_label
!= null then
4354 n_label
.parent
= self
4358 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4360 if _n_kwloop
== old_child
then
4361 if new_child
!= null then
4362 new_child
.parent
= self
4363 assert new_child
isa TKwloop
4364 _n_kwloop
= new_child
4370 if _n_block
== old_child
then
4371 if new_child
!= null then
4372 new_child
.parent
= self
4373 assert new_child
isa AExpr
4374 _n_block
= new_child
4380 if _n_label
== old_child
then
4381 if new_child
!= null then
4382 new_child
.parent
= self
4383 assert new_child
isa ALabel
4384 _n_label
= new_child
4392 redef fun visit_all
(v
: Visitor)
4394 v
.enter_visit
(_n_kwloop
)
4395 if _n_block
!= null then
4396 v
.enter_visit
(_n_block
.as(not null))
4398 if _n_label
!= null then
4399 v
.enter_visit
(_n_label
.as(not null))
4403 redef class AForExpr
4404 private init empty_init
do end
4406 init init_aforexpr
(
4407 n_kwfor
: nullable TKwfor,
4408 n_ids
: Collection[Object], # Should be Collection[TId]
4409 n_expr
: nullable AExpr,
4410 n_kwdo
: nullable TKwdo,
4411 n_block
: nullable AExpr,
4412 n_label
: nullable ALabel
4416 _n_kwfor
= n_kwfor
.as(not null)
4417 n_kwfor
.parent
= self
4423 _n_expr
= n_expr
.as(not null)
4424 n_expr
.parent
= self
4425 _n_kwdo
= n_kwdo
.as(not null)
4426 n_kwdo
.parent
= self
4428 if n_block
!= null then
4429 n_block
.parent
= self
4432 if n_label
!= null then
4433 n_label
.parent
= self
4437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4439 if _n_kwfor
== old_child
then
4440 if new_child
!= null then
4441 new_child
.parent
= self
4442 assert new_child
isa TKwfor
4443 _n_kwfor
= new_child
4449 for i
in [0.._n_ids
.length
[ do
4450 if _n_ids
[i
] == old_child
then
4451 if new_child
!= null then
4452 assert new_child
isa TId
4453 _n_ids
[i
] = new_child
4454 new_child
.parent
= self
4461 if _n_expr
== old_child
then
4462 if new_child
!= null then
4463 new_child
.parent
= self
4464 assert new_child
isa AExpr
4471 if _n_kwdo
== old_child
then
4472 if new_child
!= null then
4473 new_child
.parent
= self
4474 assert new_child
isa TKwdo
4481 if _n_block
== old_child
then
4482 if new_child
!= null then
4483 new_child
.parent
= self
4484 assert new_child
isa AExpr
4485 _n_block
= new_child
4491 if _n_label
== old_child
then
4492 if new_child
!= null then
4493 new_child
.parent
= self
4494 assert new_child
isa ALabel
4495 _n_label
= new_child
4503 redef fun visit_all
(v
: Visitor)
4505 v
.enter_visit
(_n_kwfor
)
4509 v
.enter_visit
(_n_expr
)
4510 v
.enter_visit
(_n_kwdo
)
4511 if _n_block
!= null then
4512 v
.enter_visit
(_n_block
.as(not null))
4514 if _n_label
!= null then
4515 v
.enter_visit
(_n_label
.as(not null))
4519 redef class AAssertExpr
4520 private init empty_init
do end
4522 init init_aassertexpr
(
4523 n_kwassert
: nullable TKwassert,
4525 n_expr
: nullable AExpr,
4526 n_else
: nullable AExpr
4530 _n_kwassert
= n_kwassert
.as(not null)
4531 n_kwassert
.parent
= self
4533 if n_id
!= null then
4536 _n_expr
= n_expr
.as(not null)
4537 n_expr
.parent
= self
4539 if n_else
!= null then
4540 n_else
.parent
= self
4544 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4546 if _n_kwassert
== old_child
then
4547 if new_child
!= null then
4548 new_child
.parent
= self
4549 assert new_child
isa TKwassert
4550 _n_kwassert
= new_child
4556 if _n_id
== old_child
then
4557 if new_child
!= null then
4558 new_child
.parent
= self
4559 assert new_child
isa TId
4566 if _n_expr
== old_child
then
4567 if new_child
!= null then
4568 new_child
.parent
= self
4569 assert new_child
isa AExpr
4576 if _n_else
== old_child
then
4577 if new_child
!= null then
4578 new_child
.parent
= self
4579 assert new_child
isa AExpr
4588 redef fun visit_all
(v
: Visitor)
4590 v
.enter_visit
(_n_kwassert
)
4591 if _n_id
!= null then
4592 v
.enter_visit
(_n_id
.as(not null))
4594 v
.enter_visit
(_n_expr
)
4595 if _n_else
!= null then
4596 v
.enter_visit
(_n_else
.as(not null))
4600 redef class AOnceExpr
4601 private init empty_init
do end
4603 init init_aonceexpr
(
4604 n_kwonce
: nullable TKwonce,
4605 n_expr
: nullable AExpr
4609 _n_kwonce
= n_kwonce
.as(not null)
4610 n_kwonce
.parent
= self
4611 _n_expr
= n_expr
.as(not null)
4612 n_expr
.parent
= self
4615 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4617 if _n_kwonce
== old_child
then
4618 if new_child
!= null then
4619 new_child
.parent
= self
4620 assert new_child
isa TKwonce
4621 _n_kwonce
= new_child
4627 if _n_expr
== old_child
then
4628 if new_child
!= null then
4629 new_child
.parent
= self
4630 assert new_child
isa AExpr
4639 redef fun visit_all
(v
: Visitor)
4641 v
.enter_visit
(_n_kwonce
)
4642 v
.enter_visit
(_n_expr
)
4645 redef class ASendExpr
4646 private init empty_init
do end
4648 init init_asendexpr
(
4649 n_expr
: nullable AExpr
4653 _n_expr
= n_expr
.as(not null)
4654 n_expr
.parent
= self
4657 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4659 if _n_expr
== old_child
then
4660 if new_child
!= null then
4661 new_child
.parent
= self
4662 assert new_child
isa AExpr
4671 redef fun visit_all
(v
: Visitor)
4673 v
.enter_visit
(_n_expr
)
4676 redef class ABinopExpr
4677 private init empty_init
do end
4679 init init_abinopexpr
(
4680 n_expr
: nullable AExpr,
4681 n_expr2
: nullable AExpr
4685 _n_expr
= n_expr
.as(not null)
4686 n_expr
.parent
= self
4687 _n_expr2
= n_expr2
.as(not null)
4688 n_expr2
.parent
= self
4691 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4693 if _n_expr
== old_child
then
4694 if new_child
!= null then
4695 new_child
.parent
= self
4696 assert new_child
isa AExpr
4703 if _n_expr2
== old_child
then
4704 if new_child
!= null then
4705 new_child
.parent
= self
4706 assert new_child
isa AExpr
4707 _n_expr2
= new_child
4715 redef fun visit_all
(v
: Visitor)
4717 v
.enter_visit
(_n_expr
)
4718 v
.enter_visit
(_n_expr2
)
4722 private init empty_init
do end
4725 n_expr
: nullable AExpr,
4726 n_expr2
: nullable AExpr
4730 _n_expr
= n_expr
.as(not null)
4731 n_expr
.parent
= self
4732 _n_expr2
= n_expr2
.as(not null)
4733 n_expr2
.parent
= self
4736 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4738 if _n_expr
== old_child
then
4739 if new_child
!= null then
4740 new_child
.parent
= self
4741 assert new_child
isa AExpr
4748 if _n_expr2
== old_child
then
4749 if new_child
!= null then
4750 new_child
.parent
= self
4751 assert new_child
isa AExpr
4752 _n_expr2
= new_child
4760 redef fun visit_all
(v
: Visitor)
4762 v
.enter_visit
(_n_expr
)
4763 v
.enter_visit
(_n_expr2
)
4766 redef class AAndExpr
4767 private init empty_init
do end
4769 init init_aandexpr
(
4770 n_expr
: nullable AExpr,
4771 n_expr2
: nullable AExpr
4775 _n_expr
= n_expr
.as(not null)
4776 n_expr
.parent
= self
4777 _n_expr2
= n_expr2
.as(not null)
4778 n_expr2
.parent
= self
4781 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4783 if _n_expr
== old_child
then
4784 if new_child
!= null then
4785 new_child
.parent
= self
4786 assert new_child
isa AExpr
4793 if _n_expr2
== old_child
then
4794 if new_child
!= null then
4795 new_child
.parent
= self
4796 assert new_child
isa AExpr
4797 _n_expr2
= new_child
4805 redef fun visit_all
(v
: Visitor)
4807 v
.enter_visit
(_n_expr
)
4808 v
.enter_visit
(_n_expr2
)
4811 redef class AOrElseExpr
4812 private init empty_init
do end
4814 init init_aorelseexpr
(
4815 n_expr
: nullable AExpr,
4816 n_expr2
: nullable AExpr
4820 _n_expr
= n_expr
.as(not null)
4821 n_expr
.parent
= self
4822 _n_expr2
= n_expr2
.as(not null)
4823 n_expr2
.parent
= self
4826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4828 if _n_expr
== old_child
then
4829 if new_child
!= null then
4830 new_child
.parent
= self
4831 assert new_child
isa AExpr
4838 if _n_expr2
== old_child
then
4839 if new_child
!= null then
4840 new_child
.parent
= self
4841 assert new_child
isa AExpr
4842 _n_expr2
= new_child
4850 redef fun visit_all
(v
: Visitor)
4852 v
.enter_visit
(_n_expr
)
4853 v
.enter_visit
(_n_expr2
)
4856 redef class ANotExpr
4857 private init empty_init
do end
4859 init init_anotexpr
(
4860 n_kwnot
: nullable TKwnot,
4861 n_expr
: nullable AExpr
4865 _n_kwnot
= n_kwnot
.as(not null)
4866 n_kwnot
.parent
= self
4867 _n_expr
= n_expr
.as(not null)
4868 n_expr
.parent
= self
4871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4873 if _n_kwnot
== old_child
then
4874 if new_child
!= null then
4875 new_child
.parent
= self
4876 assert new_child
isa TKwnot
4877 _n_kwnot
= new_child
4883 if _n_expr
== old_child
then
4884 if new_child
!= null then
4885 new_child
.parent
= self
4886 assert new_child
isa AExpr
4895 redef fun visit_all
(v
: Visitor)
4897 v
.enter_visit
(_n_kwnot
)
4898 v
.enter_visit
(_n_expr
)
4902 private init empty_init
do end
4905 n_expr
: nullable AExpr,
4906 n_expr2
: nullable AExpr
4910 _n_expr
= n_expr
.as(not null)
4911 n_expr
.parent
= self
4912 _n_expr2
= n_expr2
.as(not null)
4913 n_expr2
.parent
= self
4916 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4918 if _n_expr
== old_child
then
4919 if new_child
!= null then
4920 new_child
.parent
= self
4921 assert new_child
isa AExpr
4928 if _n_expr2
== old_child
then
4929 if new_child
!= null then
4930 new_child
.parent
= self
4931 assert new_child
isa AExpr
4932 _n_expr2
= new_child
4940 redef fun visit_all
(v
: Visitor)
4942 v
.enter_visit
(_n_expr
)
4943 v
.enter_visit
(_n_expr2
)
4947 private init empty_init
do end
4950 n_expr
: nullable AExpr,
4951 n_expr2
: nullable AExpr
4955 _n_expr
= n_expr
.as(not null)
4956 n_expr
.parent
= self
4957 _n_expr2
= n_expr2
.as(not null)
4958 n_expr2
.parent
= self
4961 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4963 if _n_expr
== old_child
then
4964 if new_child
!= null then
4965 new_child
.parent
= self
4966 assert new_child
isa AExpr
4973 if _n_expr2
== old_child
then
4974 if new_child
!= null then
4975 new_child
.parent
= self
4976 assert new_child
isa AExpr
4977 _n_expr2
= new_child
4985 redef fun visit_all
(v
: Visitor)
4987 v
.enter_visit
(_n_expr
)
4988 v
.enter_visit
(_n_expr2
)
4992 private init empty_init
do end
4995 n_expr
: nullable AExpr,
4996 n_expr2
: nullable AExpr
5000 _n_expr
= n_expr
.as(not null)
5001 n_expr
.parent
= self
5002 _n_expr2
= n_expr2
.as(not null)
5003 n_expr2
.parent
= self
5006 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5008 if _n_expr
== old_child
then
5009 if new_child
!= null then
5010 new_child
.parent
= self
5011 assert new_child
isa AExpr
5018 if _n_expr2
== old_child
then
5019 if new_child
!= null then
5020 new_child
.parent
= self
5021 assert new_child
isa AExpr
5022 _n_expr2
= new_child
5030 redef fun visit_all
(v
: Visitor)
5032 v
.enter_visit
(_n_expr
)
5033 v
.enter_visit
(_n_expr2
)
5037 private init empty_init
do end
5040 n_expr
: nullable AExpr,
5041 n_expr2
: nullable AExpr
5045 _n_expr
= n_expr
.as(not null)
5046 n_expr
.parent
= self
5047 _n_expr2
= n_expr2
.as(not null)
5048 n_expr2
.parent
= self
5051 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5053 if _n_expr
== old_child
then
5054 if new_child
!= null then
5055 new_child
.parent
= self
5056 assert new_child
isa AExpr
5063 if _n_expr2
== old_child
then
5064 if new_child
!= null then
5065 new_child
.parent
= self
5066 assert new_child
isa AExpr
5067 _n_expr2
= new_child
5075 redef fun visit_all
(v
: Visitor)
5077 v
.enter_visit
(_n_expr
)
5078 v
.enter_visit
(_n_expr2
)
5082 private init empty_init
do end
5085 n_expr
: nullable AExpr,
5086 n_expr2
: nullable AExpr
5090 _n_expr
= n_expr
.as(not null)
5091 n_expr
.parent
= self
5092 _n_expr2
= n_expr2
.as(not null)
5093 n_expr2
.parent
= self
5096 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5098 if _n_expr
== old_child
then
5099 if new_child
!= null then
5100 new_child
.parent
= self
5101 assert new_child
isa AExpr
5108 if _n_expr2
== old_child
then
5109 if new_child
!= null then
5110 new_child
.parent
= self
5111 assert new_child
isa AExpr
5112 _n_expr2
= new_child
5120 redef fun visit_all
(v
: Visitor)
5122 v
.enter_visit
(_n_expr
)
5123 v
.enter_visit
(_n_expr2
)
5127 private init empty_init
do end
5130 n_expr
: nullable AExpr,
5131 n_expr2
: nullable AExpr
5135 _n_expr
= n_expr
.as(not null)
5136 n_expr
.parent
= self
5137 _n_expr2
= n_expr2
.as(not null)
5138 n_expr2
.parent
= self
5141 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5143 if _n_expr
== old_child
then
5144 if new_child
!= null then
5145 new_child
.parent
= self
5146 assert new_child
isa AExpr
5153 if _n_expr2
== old_child
then
5154 if new_child
!= null then
5155 new_child
.parent
= self
5156 assert new_child
isa AExpr
5157 _n_expr2
= new_child
5165 redef fun visit_all
(v
: Visitor)
5167 v
.enter_visit
(_n_expr
)
5168 v
.enter_visit
(_n_expr2
)
5172 private init empty_init
do end
5175 n_expr
: nullable AExpr,
5176 n_expr2
: nullable AExpr
5180 _n_expr
= n_expr
.as(not null)
5181 n_expr
.parent
= self
5182 _n_expr2
= n_expr2
.as(not null)
5183 n_expr2
.parent
= self
5186 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5188 if _n_expr
== old_child
then
5189 if new_child
!= null then
5190 new_child
.parent
= self
5191 assert new_child
isa AExpr
5198 if _n_expr2
== old_child
then
5199 if new_child
!= null then
5200 new_child
.parent
= self
5201 assert new_child
isa AExpr
5202 _n_expr2
= new_child
5210 redef fun visit_all
(v
: Visitor)
5212 v
.enter_visit
(_n_expr
)
5213 v
.enter_visit
(_n_expr2
)
5217 private init empty_init
do end
5220 n_expr
: nullable AExpr,
5221 n_expr2
: nullable AExpr
5225 _n_expr
= n_expr
.as(not null)
5226 n_expr
.parent
= self
5227 _n_expr2
= n_expr2
.as(not null)
5228 n_expr2
.parent
= self
5231 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5233 if _n_expr
== old_child
then
5234 if new_child
!= null then
5235 new_child
.parent
= self
5236 assert new_child
isa AExpr
5243 if _n_expr2
== old_child
then
5244 if new_child
!= null then
5245 new_child
.parent
= self
5246 assert new_child
isa AExpr
5247 _n_expr2
= new_child
5255 redef fun visit_all
(v
: Visitor)
5257 v
.enter_visit
(_n_expr
)
5258 v
.enter_visit
(_n_expr2
)
5262 private init empty_init
do end
5265 n_expr
: nullable AExpr,
5266 n_expr2
: nullable AExpr
5270 _n_expr
= n_expr
.as(not null)
5271 n_expr
.parent
= self
5272 _n_expr2
= n_expr2
.as(not null)
5273 n_expr2
.parent
= self
5276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5278 if _n_expr
== old_child
then
5279 if new_child
!= null then
5280 new_child
.parent
= self
5281 assert new_child
isa AExpr
5288 if _n_expr2
== old_child
then
5289 if new_child
!= null then
5290 new_child
.parent
= self
5291 assert new_child
isa AExpr
5292 _n_expr2
= new_child
5300 redef fun visit_all
(v
: Visitor)
5302 v
.enter_visit
(_n_expr
)
5303 v
.enter_visit
(_n_expr2
)
5306 redef class AIsaExpr
5307 private init empty_init
do end
5309 init init_aisaexpr
(
5310 n_expr
: nullable AExpr,
5311 n_type
: nullable AType
5315 _n_expr
= n_expr
.as(not null)
5316 n_expr
.parent
= self
5317 _n_type
= n_type
.as(not null)
5318 n_type
.parent
= self
5321 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5323 if _n_expr
== old_child
then
5324 if new_child
!= null then
5325 new_child
.parent
= self
5326 assert new_child
isa AExpr
5333 if _n_type
== old_child
then
5334 if new_child
!= null then
5335 new_child
.parent
= self
5336 assert new_child
isa AType
5345 redef fun visit_all
(v
: Visitor)
5347 v
.enter_visit
(_n_expr
)
5348 v
.enter_visit
(_n_type
)
5351 redef class APlusExpr
5352 private init empty_init
do end
5354 init init_aplusexpr
(
5355 n_expr
: nullable AExpr,
5356 n_expr2
: nullable AExpr
5360 _n_expr
= n_expr
.as(not null)
5361 n_expr
.parent
= self
5362 _n_expr2
= n_expr2
.as(not null)
5363 n_expr2
.parent
= self
5366 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5368 if _n_expr
== old_child
then
5369 if new_child
!= null then
5370 new_child
.parent
= self
5371 assert new_child
isa AExpr
5378 if _n_expr2
== old_child
then
5379 if new_child
!= null then
5380 new_child
.parent
= self
5381 assert new_child
isa AExpr
5382 _n_expr2
= new_child
5390 redef fun visit_all
(v
: Visitor)
5392 v
.enter_visit
(_n_expr
)
5393 v
.enter_visit
(_n_expr2
)
5396 redef class AMinusExpr
5397 private init empty_init
do end
5399 init init_aminusexpr
(
5400 n_expr
: nullable AExpr,
5401 n_expr2
: nullable AExpr
5405 _n_expr
= n_expr
.as(not null)
5406 n_expr
.parent
= self
5407 _n_expr2
= n_expr2
.as(not null)
5408 n_expr2
.parent
= self
5411 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5413 if _n_expr
== old_child
then
5414 if new_child
!= null then
5415 new_child
.parent
= self
5416 assert new_child
isa AExpr
5423 if _n_expr2
== old_child
then
5424 if new_child
!= null then
5425 new_child
.parent
= self
5426 assert new_child
isa AExpr
5427 _n_expr2
= new_child
5435 redef fun visit_all
(v
: Visitor)
5437 v
.enter_visit
(_n_expr
)
5438 v
.enter_visit
(_n_expr2
)
5441 redef class AStarshipExpr
5442 private init empty_init
do end
5444 init init_astarshipexpr
(
5445 n_expr
: nullable AExpr,
5446 n_expr2
: nullable AExpr
5450 _n_expr
= n_expr
.as(not null)
5451 n_expr
.parent
= self
5452 _n_expr2
= n_expr2
.as(not null)
5453 n_expr2
.parent
= self
5456 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5458 if _n_expr
== old_child
then
5459 if new_child
!= null then
5460 new_child
.parent
= self
5461 assert new_child
isa AExpr
5468 if _n_expr2
== old_child
then
5469 if new_child
!= null then
5470 new_child
.parent
= self
5471 assert new_child
isa AExpr
5472 _n_expr2
= new_child
5480 redef fun visit_all
(v
: Visitor)
5482 v
.enter_visit
(_n_expr
)
5483 v
.enter_visit
(_n_expr2
)
5486 redef class AStarExpr
5487 private init empty_init
do end
5489 init init_astarexpr
(
5490 n_expr
: nullable AExpr,
5491 n_expr2
: nullable AExpr
5495 _n_expr
= n_expr
.as(not null)
5496 n_expr
.parent
= self
5497 _n_expr2
= n_expr2
.as(not null)
5498 n_expr2
.parent
= self
5501 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5503 if _n_expr
== old_child
then
5504 if new_child
!= null then
5505 new_child
.parent
= self
5506 assert new_child
isa AExpr
5513 if _n_expr2
== old_child
then
5514 if new_child
!= null then
5515 new_child
.parent
= self
5516 assert new_child
isa AExpr
5517 _n_expr2
= new_child
5525 redef fun visit_all
(v
: Visitor)
5527 v
.enter_visit
(_n_expr
)
5528 v
.enter_visit
(_n_expr2
)
5531 redef class ASlashExpr
5532 private init empty_init
do end
5534 init init_aslashexpr
(
5535 n_expr
: nullable AExpr,
5536 n_expr2
: nullable AExpr
5540 _n_expr
= n_expr
.as(not null)
5541 n_expr
.parent
= self
5542 _n_expr2
= n_expr2
.as(not null)
5543 n_expr2
.parent
= self
5546 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5548 if _n_expr
== old_child
then
5549 if new_child
!= null then
5550 new_child
.parent
= self
5551 assert new_child
isa AExpr
5558 if _n_expr2
== old_child
then
5559 if new_child
!= null then
5560 new_child
.parent
= self
5561 assert new_child
isa AExpr
5562 _n_expr2
= new_child
5570 redef fun visit_all
(v
: Visitor)
5572 v
.enter_visit
(_n_expr
)
5573 v
.enter_visit
(_n_expr2
)
5576 redef class APercentExpr
5577 private init empty_init
do end
5579 init init_apercentexpr
(
5580 n_expr
: nullable AExpr,
5581 n_expr2
: nullable AExpr
5585 _n_expr
= n_expr
.as(not null)
5586 n_expr
.parent
= self
5587 _n_expr2
= n_expr2
.as(not null)
5588 n_expr2
.parent
= self
5591 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5593 if _n_expr
== old_child
then
5594 if new_child
!= null then
5595 new_child
.parent
= self
5596 assert new_child
isa AExpr
5603 if _n_expr2
== old_child
then
5604 if new_child
!= null then
5605 new_child
.parent
= self
5606 assert new_child
isa AExpr
5607 _n_expr2
= new_child
5615 redef fun visit_all
(v
: Visitor)
5617 v
.enter_visit
(_n_expr
)
5618 v
.enter_visit
(_n_expr2
)
5621 redef class AUminusExpr
5622 private init empty_init
do end
5624 init init_auminusexpr
(
5625 n_minus
: nullable TMinus,
5626 n_expr
: nullable AExpr
5630 _n_minus
= n_minus
.as(not null)
5631 n_minus
.parent
= self
5632 _n_expr
= n_expr
.as(not null)
5633 n_expr
.parent
= self
5636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5638 if _n_minus
== old_child
then
5639 if new_child
!= null then
5640 new_child
.parent
= self
5641 assert new_child
isa TMinus
5642 _n_minus
= new_child
5648 if _n_expr
== old_child
then
5649 if new_child
!= null then
5650 new_child
.parent
= self
5651 assert new_child
isa AExpr
5660 redef fun visit_all
(v
: Visitor)
5662 v
.enter_visit
(_n_minus
)
5663 v
.enter_visit
(_n_expr
)
5666 redef class ANewExpr
5667 private init empty_init
do end
5669 init init_anewexpr
(
5670 n_kwnew
: nullable TKwnew,
5671 n_type
: nullable AType,
5673 n_args
: nullable AExprs
5677 _n_kwnew
= n_kwnew
.as(not null)
5678 n_kwnew
.parent
= self
5679 _n_type
= n_type
.as(not null)
5680 n_type
.parent
= self
5682 if n_id
!= null then
5685 _n_args
= n_args
.as(not null)
5686 n_args
.parent
= self
5689 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5691 if _n_kwnew
== old_child
then
5692 if new_child
!= null then
5693 new_child
.parent
= self
5694 assert new_child
isa TKwnew
5695 _n_kwnew
= new_child
5701 if _n_type
== old_child
then
5702 if new_child
!= null then
5703 new_child
.parent
= self
5704 assert new_child
isa AType
5711 if _n_id
== old_child
then
5712 if new_child
!= null then
5713 new_child
.parent
= self
5714 assert new_child
isa TId
5721 if _n_args
== old_child
then
5722 if new_child
!= null then
5723 new_child
.parent
= self
5724 assert new_child
isa AExprs
5733 redef fun visit_all
(v
: Visitor)
5735 v
.enter_visit
(_n_kwnew
)
5736 v
.enter_visit
(_n_type
)
5737 if _n_id
!= null then
5738 v
.enter_visit
(_n_id
.as(not null))
5740 v
.enter_visit
(_n_args
)
5743 redef class AAttrExpr
5744 private init empty_init
do end
5746 init init_aattrexpr
(
5747 n_expr
: nullable AExpr,
5748 n_id
: nullable TAttrid
5752 _n_expr
= n_expr
.as(not null)
5753 n_expr
.parent
= self
5754 _n_id
= n_id
.as(not null)
5758 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5760 if _n_expr
== old_child
then
5761 if new_child
!= null then
5762 new_child
.parent
= self
5763 assert new_child
isa AExpr
5770 if _n_id
== old_child
then
5771 if new_child
!= null then
5772 new_child
.parent
= self
5773 assert new_child
isa TAttrid
5782 redef fun visit_all
(v
: Visitor)
5784 v
.enter_visit
(_n_expr
)
5785 v
.enter_visit
(_n_id
)
5788 redef class AAttrAssignExpr
5789 private init empty_init
do end
5791 init init_aattrassignexpr
(
5792 n_expr
: nullable AExpr,
5793 n_id
: nullable TAttrid,
5794 n_assign
: nullable TAssign,
5795 n_value
: nullable AExpr
5799 _n_expr
= n_expr
.as(not null)
5800 n_expr
.parent
= self
5801 _n_id
= n_id
.as(not null)
5803 _n_assign
= n_assign
.as(not null)
5804 n_assign
.parent
= self
5805 _n_value
= n_value
.as(not null)
5806 n_value
.parent
= self
5809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5811 if _n_expr
== old_child
then
5812 if new_child
!= null then
5813 new_child
.parent
= self
5814 assert new_child
isa AExpr
5821 if _n_id
== old_child
then
5822 if new_child
!= null then
5823 new_child
.parent
= self
5824 assert new_child
isa TAttrid
5831 if _n_assign
== old_child
then
5832 if new_child
!= null then
5833 new_child
.parent
= self
5834 assert new_child
isa TAssign
5835 _n_assign
= new_child
5841 if _n_value
== old_child
then
5842 if new_child
!= null then
5843 new_child
.parent
= self
5844 assert new_child
isa AExpr
5845 _n_value
= new_child
5853 redef fun visit_all
(v
: Visitor)
5855 v
.enter_visit
(_n_expr
)
5856 v
.enter_visit
(_n_id
)
5857 v
.enter_visit
(_n_assign
)
5858 v
.enter_visit
(_n_value
)
5861 redef class AAttrReassignExpr
5862 private init empty_init
do end
5864 init init_aattrreassignexpr
(
5865 n_expr
: nullable AExpr,
5866 n_id
: nullable TAttrid,
5867 n_assign_op
: nullable AAssignOp,
5868 n_value
: nullable AExpr
5872 _n_expr
= n_expr
.as(not null)
5873 n_expr
.parent
= self
5874 _n_id
= n_id
.as(not null)
5876 _n_assign_op
= n_assign_op
.as(not null)
5877 n_assign_op
.parent
= self
5878 _n_value
= n_value
.as(not null)
5879 n_value
.parent
= self
5882 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5884 if _n_expr
== old_child
then
5885 if new_child
!= null then
5886 new_child
.parent
= self
5887 assert new_child
isa AExpr
5894 if _n_id
== old_child
then
5895 if new_child
!= null then
5896 new_child
.parent
= self
5897 assert new_child
isa TAttrid
5904 if _n_assign_op
== old_child
then
5905 if new_child
!= null then
5906 new_child
.parent
= self
5907 assert new_child
isa AAssignOp
5908 _n_assign_op
= new_child
5914 if _n_value
== old_child
then
5915 if new_child
!= null then
5916 new_child
.parent
= self
5917 assert new_child
isa AExpr
5918 _n_value
= new_child
5926 redef fun visit_all
(v
: Visitor)
5928 v
.enter_visit
(_n_expr
)
5929 v
.enter_visit
(_n_id
)
5930 v
.enter_visit
(_n_assign_op
)
5931 v
.enter_visit
(_n_value
)
5934 redef class ACallExpr
5935 private init empty_init
do end
5937 init init_acallexpr
(
5938 n_expr
: nullable AExpr,
5940 n_args
: nullable AExprs,
5941 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
5945 _n_expr
= n_expr
.as(not null)
5946 n_expr
.parent
= self
5947 _n_id
= n_id
.as(not null)
5949 _n_args
= n_args
.as(not null)
5950 n_args
.parent
= self
5951 for n
in n_closure_defs
do
5952 assert n
isa AClosureDef
5953 _n_closure_defs
.add
(n
)
5958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5960 if _n_expr
== old_child
then
5961 if new_child
!= null then
5962 new_child
.parent
= self
5963 assert new_child
isa AExpr
5970 if _n_id
== old_child
then
5971 if new_child
!= null then
5972 new_child
.parent
= self
5973 assert new_child
isa TId
5980 if _n_args
== old_child
then
5981 if new_child
!= null then
5982 new_child
.parent
= self
5983 assert new_child
isa AExprs
5990 for i
in [0.._n_closure_defs
.length
[ do
5991 if _n_closure_defs
[i
] == old_child
then
5992 if new_child
!= null then
5993 assert new_child
isa AClosureDef
5994 _n_closure_defs
[i
] = new_child
5995 new_child
.parent
= self
5997 _n_closure_defs
.remove_at
(i
)
6004 redef fun visit_all
(v
: Visitor)
6006 v
.enter_visit
(_n_expr
)
6007 v
.enter_visit
(_n_id
)
6008 v
.enter_visit
(_n_args
)
6009 for n
in _n_closure_defs
do
6014 redef class ACallAssignExpr
6015 private init empty_init
do end
6017 init init_acallassignexpr
(
6018 n_expr
: nullable AExpr,
6020 n_args
: nullable AExprs,
6021 n_assign
: nullable TAssign,
6022 n_value
: nullable AExpr
6026 _n_expr
= n_expr
.as(not null)
6027 n_expr
.parent
= self
6028 _n_id
= n_id
.as(not null)
6030 _n_args
= n_args
.as(not null)
6031 n_args
.parent
= self
6032 _n_assign
= n_assign
.as(not null)
6033 n_assign
.parent
= self
6034 _n_value
= n_value
.as(not null)
6035 n_value
.parent
= self
6038 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6040 if _n_expr
== old_child
then
6041 if new_child
!= null then
6042 new_child
.parent
= self
6043 assert new_child
isa AExpr
6050 if _n_id
== old_child
then
6051 if new_child
!= null then
6052 new_child
.parent
= self
6053 assert new_child
isa TId
6060 if _n_args
== old_child
then
6061 if new_child
!= null then
6062 new_child
.parent
= self
6063 assert new_child
isa AExprs
6070 if _n_assign
== old_child
then
6071 if new_child
!= null then
6072 new_child
.parent
= self
6073 assert new_child
isa TAssign
6074 _n_assign
= new_child
6080 if _n_value
== old_child
then
6081 if new_child
!= null then
6082 new_child
.parent
= self
6083 assert new_child
isa AExpr
6084 _n_value
= new_child
6092 redef fun visit_all
(v
: Visitor)
6094 v
.enter_visit
(_n_expr
)
6095 v
.enter_visit
(_n_id
)
6096 v
.enter_visit
(_n_args
)
6097 v
.enter_visit
(_n_assign
)
6098 v
.enter_visit
(_n_value
)
6101 redef class ACallReassignExpr
6102 private init empty_init
do end
6104 init init_acallreassignexpr
(
6105 n_expr
: nullable AExpr,
6107 n_args
: nullable AExprs,
6108 n_assign_op
: nullable AAssignOp,
6109 n_value
: nullable AExpr
6113 _n_expr
= n_expr
.as(not null)
6114 n_expr
.parent
= self
6115 _n_id
= n_id
.as(not null)
6117 _n_args
= n_args
.as(not null)
6118 n_args
.parent
= self
6119 _n_assign_op
= n_assign_op
.as(not null)
6120 n_assign_op
.parent
= self
6121 _n_value
= n_value
.as(not null)
6122 n_value
.parent
= self
6125 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6127 if _n_expr
== old_child
then
6128 if new_child
!= null then
6129 new_child
.parent
= self
6130 assert new_child
isa AExpr
6137 if _n_id
== old_child
then
6138 if new_child
!= null then
6139 new_child
.parent
= self
6140 assert new_child
isa TId
6147 if _n_args
== old_child
then
6148 if new_child
!= null then
6149 new_child
.parent
= self
6150 assert new_child
isa AExprs
6157 if _n_assign_op
== old_child
then
6158 if new_child
!= null then
6159 new_child
.parent
= self
6160 assert new_child
isa AAssignOp
6161 _n_assign_op
= new_child
6167 if _n_value
== old_child
then
6168 if new_child
!= null then
6169 new_child
.parent
= self
6170 assert new_child
isa AExpr
6171 _n_value
= new_child
6179 redef fun visit_all
(v
: Visitor)
6181 v
.enter_visit
(_n_expr
)
6182 v
.enter_visit
(_n_id
)
6183 v
.enter_visit
(_n_args
)
6184 v
.enter_visit
(_n_assign_op
)
6185 v
.enter_visit
(_n_value
)
6188 redef class ASuperExpr
6189 private init empty_init
do end
6191 init init_asuperexpr
(
6192 n_qualified
: nullable AQualified,
6193 n_kwsuper
: nullable TKwsuper,
6194 n_args
: nullable AExprs
6198 _n_qualified
= n_qualified
6199 if n_qualified
!= null then
6200 n_qualified
.parent
= self
6202 _n_kwsuper
= n_kwsuper
.as(not null)
6203 n_kwsuper
.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_qualified
== old_child
then
6211 if new_child
!= null then
6212 new_child
.parent
= self
6213 assert new_child
isa AQualified
6214 _n_qualified
= new_child
6220 if _n_kwsuper
== old_child
then
6221 if new_child
!= null then
6222 new_child
.parent
= self
6223 assert new_child
isa TKwsuper
6224 _n_kwsuper
= 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 if _n_qualified
!= null then
6245 v
.enter_visit
(_n_qualified
.as(not null))
6247 v
.enter_visit
(_n_kwsuper
)
6248 v
.enter_visit
(_n_args
)
6251 redef class AInitExpr
6252 private init empty_init
do end
6254 init init_ainitexpr
(
6255 n_expr
: nullable AExpr,
6256 n_kwinit
: nullable TKwinit,
6257 n_args
: nullable AExprs
6261 _n_expr
= n_expr
.as(not null)
6262 n_expr
.parent
= self
6263 _n_kwinit
= n_kwinit
.as(not null)
6264 n_kwinit
.parent
= self
6265 _n_args
= n_args
.as(not null)
6266 n_args
.parent
= self
6269 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6271 if _n_expr
== old_child
then
6272 if new_child
!= null then
6273 new_child
.parent
= self
6274 assert new_child
isa AExpr
6281 if _n_kwinit
== old_child
then
6282 if new_child
!= null then
6283 new_child
.parent
= self
6284 assert new_child
isa TKwinit
6285 _n_kwinit
= new_child
6291 if _n_args
== old_child
then
6292 if new_child
!= null then
6293 new_child
.parent
= self
6294 assert new_child
isa AExprs
6303 redef fun visit_all
(v
: Visitor)
6305 v
.enter_visit
(_n_expr
)
6306 v
.enter_visit
(_n_kwinit
)
6307 v
.enter_visit
(_n_args
)
6310 redef class ABraExpr
6311 private init empty_init
do end
6313 init init_abraexpr
(
6314 n_expr
: nullable AExpr,
6315 n_args
: nullable AExprs,
6316 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
6320 _n_expr
= n_expr
.as(not null)
6321 n_expr
.parent
= self
6322 _n_args
= n_args
.as(not null)
6323 n_args
.parent
= self
6324 for n
in n_closure_defs
do
6325 assert n
isa AClosureDef
6326 _n_closure_defs
.add
(n
)
6331 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6333 if _n_expr
== old_child
then
6334 if new_child
!= null then
6335 new_child
.parent
= self
6336 assert new_child
isa AExpr
6343 if _n_args
== old_child
then
6344 if new_child
!= null then
6345 new_child
.parent
= self
6346 assert new_child
isa AExprs
6353 for i
in [0.._n_closure_defs
.length
[ do
6354 if _n_closure_defs
[i
] == old_child
then
6355 if new_child
!= null then
6356 assert new_child
isa AClosureDef
6357 _n_closure_defs
[i
] = new_child
6358 new_child
.parent
= self
6360 _n_closure_defs
.remove_at
(i
)
6367 redef fun visit_all
(v
: Visitor)
6369 v
.enter_visit
(_n_expr
)
6370 v
.enter_visit
(_n_args
)
6371 for n
in _n_closure_defs
do
6376 redef class ABraAssignExpr
6377 private init empty_init
do end
6379 init init_abraassignexpr
(
6380 n_expr
: nullable AExpr,
6381 n_args
: nullable AExprs,
6382 n_assign
: nullable TAssign,
6383 n_value
: nullable AExpr
6387 _n_expr
= n_expr
.as(not null)
6388 n_expr
.parent
= self
6389 _n_args
= n_args
.as(not null)
6390 n_args
.parent
= self
6391 _n_assign
= n_assign
.as(not null)
6392 n_assign
.parent
= self
6393 _n_value
= n_value
.as(not null)
6394 n_value
.parent
= self
6397 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6399 if _n_expr
== old_child
then
6400 if new_child
!= null then
6401 new_child
.parent
= self
6402 assert new_child
isa AExpr
6409 if _n_args
== old_child
then
6410 if new_child
!= null then
6411 new_child
.parent
= self
6412 assert new_child
isa AExprs
6419 if _n_assign
== old_child
then
6420 if new_child
!= null then
6421 new_child
.parent
= self
6422 assert new_child
isa TAssign
6423 _n_assign
= new_child
6429 if _n_value
== old_child
then
6430 if new_child
!= null then
6431 new_child
.parent
= self
6432 assert new_child
isa AExpr
6433 _n_value
= new_child
6441 redef fun visit_all
(v
: Visitor)
6443 v
.enter_visit
(_n_expr
)
6444 v
.enter_visit
(_n_args
)
6445 v
.enter_visit
(_n_assign
)
6446 v
.enter_visit
(_n_value
)
6449 redef class ABraReassignExpr
6450 private init empty_init
do end
6452 init init_abrareassignexpr
(
6453 n_expr
: nullable AExpr,
6454 n_args
: nullable AExprs,
6455 n_assign_op
: nullable AAssignOp,
6456 n_value
: nullable AExpr
6460 _n_expr
= n_expr
.as(not null)
6461 n_expr
.parent
= self
6462 _n_args
= n_args
.as(not null)
6463 n_args
.parent
= self
6464 _n_assign_op
= n_assign_op
.as(not null)
6465 n_assign_op
.parent
= self
6466 _n_value
= n_value
.as(not null)
6467 n_value
.parent
= self
6470 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6472 if _n_expr
== old_child
then
6473 if new_child
!= null then
6474 new_child
.parent
= self
6475 assert new_child
isa AExpr
6482 if _n_args
== old_child
then
6483 if new_child
!= null then
6484 new_child
.parent
= self
6485 assert new_child
isa AExprs
6492 if _n_assign_op
== old_child
then
6493 if new_child
!= null then
6494 new_child
.parent
= self
6495 assert new_child
isa AAssignOp
6496 _n_assign_op
= new_child
6502 if _n_value
== old_child
then
6503 if new_child
!= null then
6504 new_child
.parent
= self
6505 assert new_child
isa AExpr
6506 _n_value
= new_child
6514 redef fun visit_all
(v
: Visitor)
6516 v
.enter_visit
(_n_expr
)
6517 v
.enter_visit
(_n_args
)
6518 v
.enter_visit
(_n_assign_op
)
6519 v
.enter_visit
(_n_value
)
6522 redef class AClosureCallExpr
6523 private init empty_init
do end
6525 init init_aclosurecallexpr
(
6527 n_args
: nullable AExprs,
6528 n_closure_defs
: Collection[Object] # Should be Collection[AClosureDef]
6532 _n_id
= n_id
.as(not null)
6534 _n_args
= n_args
.as(not null)
6535 n_args
.parent
= self
6536 for n
in n_closure_defs
do
6537 assert n
isa AClosureDef
6538 _n_closure_defs
.add
(n
)
6543 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6545 if _n_id
== old_child
then
6546 if new_child
!= null then
6547 new_child
.parent
= self
6548 assert new_child
isa TId
6555 if _n_args
== old_child
then
6556 if new_child
!= null then
6557 new_child
.parent
= self
6558 assert new_child
isa AExprs
6565 for i
in [0.._n_closure_defs
.length
[ do
6566 if _n_closure_defs
[i
] == old_child
then
6567 if new_child
!= null then
6568 assert new_child
isa AClosureDef
6569 _n_closure_defs
[i
] = new_child
6570 new_child
.parent
= self
6572 _n_closure_defs
.remove_at
(i
)
6579 redef fun visit_all
(v
: Visitor)
6581 v
.enter_visit
(_n_id
)
6582 v
.enter_visit
(_n_args
)
6583 for n
in _n_closure_defs
do
6588 redef class AVarExpr
6589 private init empty_init
do end
6591 init init_avarexpr
(
6596 _n_id
= n_id
.as(not null)
6600 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6602 if _n_id
== old_child
then
6603 if new_child
!= null then
6604 new_child
.parent
= self
6605 assert new_child
isa TId
6614 redef fun visit_all
(v
: Visitor)
6616 v
.enter_visit
(_n_id
)
6619 redef class AVarAssignExpr
6620 private init empty_init
do end
6622 init init_avarassignexpr
(
6624 n_assign
: nullable TAssign,
6625 n_value
: nullable AExpr
6629 _n_id
= n_id
.as(not null)
6631 _n_assign
= n_assign
.as(not null)
6632 n_assign
.parent
= self
6633 _n_value
= n_value
.as(not null)
6634 n_value
.parent
= self
6637 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6639 if _n_id
== old_child
then
6640 if new_child
!= null then
6641 new_child
.parent
= self
6642 assert new_child
isa TId
6649 if _n_assign
== old_child
then
6650 if new_child
!= null then
6651 new_child
.parent
= self
6652 assert new_child
isa TAssign
6653 _n_assign
= new_child
6659 if _n_value
== old_child
then
6660 if new_child
!= null then
6661 new_child
.parent
= self
6662 assert new_child
isa AExpr
6663 _n_value
= new_child
6671 redef fun visit_all
(v
: Visitor)
6673 v
.enter_visit
(_n_id
)
6674 v
.enter_visit
(_n_assign
)
6675 v
.enter_visit
(_n_value
)
6678 redef class AVarReassignExpr
6679 private init empty_init
do end
6681 init init_avarreassignexpr
(
6683 n_assign_op
: nullable AAssignOp,
6684 n_value
: nullable AExpr
6688 _n_id
= n_id
.as(not null)
6690 _n_assign_op
= n_assign_op
.as(not null)
6691 n_assign_op
.parent
= self
6692 _n_value
= n_value
.as(not null)
6693 n_value
.parent
= self
6696 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6698 if _n_id
== old_child
then
6699 if new_child
!= null then
6700 new_child
.parent
= self
6701 assert new_child
isa TId
6708 if _n_assign_op
== old_child
then
6709 if new_child
!= null then
6710 new_child
.parent
= self
6711 assert new_child
isa AAssignOp
6712 _n_assign_op
= new_child
6718 if _n_value
== old_child
then
6719 if new_child
!= null then
6720 new_child
.parent
= self
6721 assert new_child
isa AExpr
6722 _n_value
= new_child
6730 redef fun visit_all
(v
: Visitor)
6732 v
.enter_visit
(_n_id
)
6733 v
.enter_visit
(_n_assign_op
)
6734 v
.enter_visit
(_n_value
)
6737 redef class ARangeExpr
6738 private init empty_init
do end
6740 init init_arangeexpr
(
6741 n_expr
: nullable AExpr,
6742 n_expr2
: nullable AExpr,
6743 n_annotations
: nullable AAnnotations
6747 _n_expr
= n_expr
.as(not null)
6748 n_expr
.parent
= self
6749 _n_expr2
= n_expr2
.as(not null)
6750 n_expr2
.parent
= self
6751 _n_annotations
= n_annotations
6752 if n_annotations
!= null then
6753 n_annotations
.parent
= self
6757 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6759 if _n_expr
== old_child
then
6760 if new_child
!= null then
6761 new_child
.parent
= self
6762 assert new_child
isa AExpr
6769 if _n_expr2
== old_child
then
6770 if new_child
!= null then
6771 new_child
.parent
= self
6772 assert new_child
isa AExpr
6773 _n_expr2
= new_child
6779 if _n_annotations
== old_child
then
6780 if new_child
!= null then
6781 new_child
.parent
= self
6782 assert new_child
isa AAnnotations
6783 _n_annotations
= new_child
6785 _n_annotations
= null
6791 redef fun visit_all
(v
: Visitor)
6793 v
.enter_visit
(_n_expr
)
6794 v
.enter_visit
(_n_expr2
)
6795 if _n_annotations
!= null then
6796 v
.enter_visit
(_n_annotations
.as(not null))
6800 redef class ACrangeExpr
6801 private init empty_init
do end
6803 init init_acrangeexpr
(
6804 n_obra
: nullable TObra,
6805 n_expr
: nullable AExpr,
6806 n_expr2
: nullable AExpr,
6807 n_cbra
: nullable TCbra,
6808 n_annotations
: nullable AAnnotations
6812 _n_obra
= n_obra
.as(not null)
6813 n_obra
.parent
= self
6814 _n_expr
= n_expr
.as(not null)
6815 n_expr
.parent
= self
6816 _n_expr2
= n_expr2
.as(not null)
6817 n_expr2
.parent
= self
6818 _n_cbra
= n_cbra
.as(not null)
6819 n_cbra
.parent
= self
6820 _n_annotations
= n_annotations
6821 if n_annotations
!= null then
6822 n_annotations
.parent
= self
6826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6828 if _n_obra
== old_child
then
6829 if new_child
!= null then
6830 new_child
.parent
= self
6831 assert new_child
isa TObra
6838 if _n_expr
== old_child
then
6839 if new_child
!= null then
6840 new_child
.parent
= self
6841 assert new_child
isa AExpr
6848 if _n_expr2
== old_child
then
6849 if new_child
!= null then
6850 new_child
.parent
= self
6851 assert new_child
isa AExpr
6852 _n_expr2
= new_child
6858 if _n_cbra
== old_child
then
6859 if new_child
!= null then
6860 new_child
.parent
= self
6861 assert new_child
isa TCbra
6868 if _n_annotations
== old_child
then
6869 if new_child
!= null then
6870 new_child
.parent
= self
6871 assert new_child
isa AAnnotations
6872 _n_annotations
= new_child
6874 _n_annotations
= null
6880 redef fun visit_all
(v
: Visitor)
6882 v
.enter_visit
(_n_obra
)
6883 v
.enter_visit
(_n_expr
)
6884 v
.enter_visit
(_n_expr2
)
6885 v
.enter_visit
(_n_cbra
)
6886 if _n_annotations
!= null then
6887 v
.enter_visit
(_n_annotations
.as(not null))
6891 redef class AOrangeExpr
6892 private init empty_init
do end
6894 init init_aorangeexpr
(
6895 n_obra
: nullable TObra,
6896 n_expr
: nullable AExpr,
6897 n_expr2
: nullable AExpr,
6898 n_cbra
: nullable TObra,
6899 n_annotations
: nullable AAnnotations
6903 _n_obra
= n_obra
.as(not null)
6904 n_obra
.parent
= self
6905 _n_expr
= n_expr
.as(not null)
6906 n_expr
.parent
= self
6907 _n_expr2
= n_expr2
.as(not null)
6908 n_expr2
.parent
= self
6909 _n_cbra
= n_cbra
.as(not null)
6910 n_cbra
.parent
= self
6911 _n_annotations
= n_annotations
6912 if n_annotations
!= null then
6913 n_annotations
.parent
= self
6917 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6919 if _n_obra
== old_child
then
6920 if new_child
!= null then
6921 new_child
.parent
= self
6922 assert new_child
isa TObra
6929 if _n_expr
== old_child
then
6930 if new_child
!= null then
6931 new_child
.parent
= self
6932 assert new_child
isa AExpr
6939 if _n_expr2
== old_child
then
6940 if new_child
!= null then
6941 new_child
.parent
= self
6942 assert new_child
isa AExpr
6943 _n_expr2
= new_child
6949 if _n_cbra
== old_child
then
6950 if new_child
!= null then
6951 new_child
.parent
= self
6952 assert new_child
isa TObra
6959 if _n_annotations
== old_child
then
6960 if new_child
!= null then
6961 new_child
.parent
= self
6962 assert new_child
isa AAnnotations
6963 _n_annotations
= new_child
6965 _n_annotations
= null
6971 redef fun visit_all
(v
: Visitor)
6973 v
.enter_visit
(_n_obra
)
6974 v
.enter_visit
(_n_expr
)
6975 v
.enter_visit
(_n_expr2
)
6976 v
.enter_visit
(_n_cbra
)
6977 if _n_annotations
!= null then
6978 v
.enter_visit
(_n_annotations
.as(not null))
6982 redef class AArrayExpr
6983 private init empty_init
do end
6985 init init_aarrayexpr
(
6986 n_exprs
: nullable AExprs,
6987 n_annotations
: nullable AAnnotations
6991 _n_exprs
= n_exprs
.as(not null)
6992 n_exprs
.parent
= self
6993 _n_annotations
= n_annotations
6994 if n_annotations
!= null then
6995 n_annotations
.parent
= self
6999 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7001 if _n_exprs
== old_child
then
7002 if new_child
!= null then
7003 new_child
.parent
= self
7004 assert new_child
isa AExprs
7005 _n_exprs
= new_child
7011 if _n_annotations
== old_child
then
7012 if new_child
!= null then
7013 new_child
.parent
= self
7014 assert new_child
isa AAnnotations
7015 _n_annotations
= new_child
7017 _n_annotations
= null
7023 redef fun visit_all
(v
: Visitor)
7025 v
.enter_visit
(_n_exprs
)
7026 if _n_annotations
!= null then
7027 v
.enter_visit
(_n_annotations
.as(not null))
7031 redef class ASelfExpr
7032 private init empty_init
do end
7034 init init_aselfexpr
(
7035 n_kwself
: nullable TKwself,
7036 n_annotations
: nullable AAnnotations
7040 _n_kwself
= n_kwself
.as(not null)
7041 n_kwself
.parent
= self
7042 _n_annotations
= n_annotations
7043 if n_annotations
!= null then
7044 n_annotations
.parent
= self
7048 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7050 if _n_kwself
== old_child
then
7051 if new_child
!= null then
7052 new_child
.parent
= self
7053 assert new_child
isa TKwself
7054 _n_kwself
= new_child
7060 if _n_annotations
== old_child
then
7061 if new_child
!= null then
7062 new_child
.parent
= self
7063 assert new_child
isa AAnnotations
7064 _n_annotations
= new_child
7066 _n_annotations
= null
7072 redef fun visit_all
(v
: Visitor)
7074 v
.enter_visit
(_n_kwself
)
7075 if _n_annotations
!= null then
7076 v
.enter_visit
(_n_annotations
.as(not null))
7080 redef class AImplicitSelfExpr
7081 private init empty_init
do end
7083 init init_aimplicitselfexpr
7088 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7092 redef fun visit_all
(v
: Visitor)
7096 redef class ATrueExpr
7097 private init empty_init
do end
7099 init init_atrueexpr
(
7100 n_kwtrue
: nullable TKwtrue,
7101 n_annotations
: nullable AAnnotations
7105 _n_kwtrue
= n_kwtrue
.as(not null)
7106 n_kwtrue
.parent
= self
7107 _n_annotations
= n_annotations
7108 if n_annotations
!= null then
7109 n_annotations
.parent
= self
7113 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7115 if _n_kwtrue
== old_child
then
7116 if new_child
!= null then
7117 new_child
.parent
= self
7118 assert new_child
isa TKwtrue
7119 _n_kwtrue
= new_child
7125 if _n_annotations
== old_child
then
7126 if new_child
!= null then
7127 new_child
.parent
= self
7128 assert new_child
isa AAnnotations
7129 _n_annotations
= new_child
7131 _n_annotations
= null
7137 redef fun visit_all
(v
: Visitor)
7139 v
.enter_visit
(_n_kwtrue
)
7140 if _n_annotations
!= null then
7141 v
.enter_visit
(_n_annotations
.as(not null))
7145 redef class AFalseExpr
7146 private init empty_init
do end
7148 init init_afalseexpr
(
7149 n_kwfalse
: nullable TKwfalse,
7150 n_annotations
: nullable AAnnotations
7154 _n_kwfalse
= n_kwfalse
.as(not null)
7155 n_kwfalse
.parent
= self
7156 _n_annotations
= n_annotations
7157 if n_annotations
!= null then
7158 n_annotations
.parent
= self
7162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7164 if _n_kwfalse
== old_child
then
7165 if new_child
!= null then
7166 new_child
.parent
= self
7167 assert new_child
isa TKwfalse
7168 _n_kwfalse
= new_child
7174 if _n_annotations
== old_child
then
7175 if new_child
!= null then
7176 new_child
.parent
= self
7177 assert new_child
isa AAnnotations
7178 _n_annotations
= new_child
7180 _n_annotations
= null
7186 redef fun visit_all
(v
: Visitor)
7188 v
.enter_visit
(_n_kwfalse
)
7189 if _n_annotations
!= null then
7190 v
.enter_visit
(_n_annotations
.as(not null))
7194 redef class ANullExpr
7195 private init empty_init
do end
7197 init init_anullexpr
(
7198 n_kwnull
: nullable TKwnull,
7199 n_annotations
: nullable AAnnotations
7203 _n_kwnull
= n_kwnull
.as(not null)
7204 n_kwnull
.parent
= self
7205 _n_annotations
= n_annotations
7206 if n_annotations
!= null then
7207 n_annotations
.parent
= self
7211 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7213 if _n_kwnull
== old_child
then
7214 if new_child
!= null then
7215 new_child
.parent
= self
7216 assert new_child
isa TKwnull
7217 _n_kwnull
= new_child
7223 if _n_annotations
== old_child
then
7224 if new_child
!= null then
7225 new_child
.parent
= self
7226 assert new_child
isa AAnnotations
7227 _n_annotations
= new_child
7229 _n_annotations
= null
7235 redef fun visit_all
(v
: Visitor)
7237 v
.enter_visit
(_n_kwnull
)
7238 if _n_annotations
!= null then
7239 v
.enter_visit
(_n_annotations
.as(not null))
7243 redef class AIntExpr
7244 private init empty_init
do end
7246 init init_aintexpr
(
7247 n_number
: nullable TNumber,
7248 n_annotations
: nullable AAnnotations
7252 _n_number
= n_number
.as(not null)
7253 n_number
.parent
= self
7254 _n_annotations
= n_annotations
7255 if n_annotations
!= null then
7256 n_annotations
.parent
= self
7260 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7262 if _n_number
== old_child
then
7263 if new_child
!= null then
7264 new_child
.parent
= self
7265 assert new_child
isa TNumber
7266 _n_number
= new_child
7272 if _n_annotations
== old_child
then
7273 if new_child
!= null then
7274 new_child
.parent
= self
7275 assert new_child
isa AAnnotations
7276 _n_annotations
= new_child
7278 _n_annotations
= null
7284 redef fun visit_all
(v
: Visitor)
7286 v
.enter_visit
(_n_number
)
7287 if _n_annotations
!= null then
7288 v
.enter_visit
(_n_annotations
.as(not null))
7292 redef class AFloatExpr
7293 private init empty_init
do end
7295 init init_afloatexpr
(
7296 n_float
: nullable TFloat,
7297 n_annotations
: nullable AAnnotations
7301 _n_float
= n_float
.as(not null)
7302 n_float
.parent
= self
7303 _n_annotations
= n_annotations
7304 if n_annotations
!= null then
7305 n_annotations
.parent
= self
7309 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7311 if _n_float
== old_child
then
7312 if new_child
!= null then
7313 new_child
.parent
= self
7314 assert new_child
isa TFloat
7315 _n_float
= new_child
7321 if _n_annotations
== old_child
then
7322 if new_child
!= null then
7323 new_child
.parent
= self
7324 assert new_child
isa AAnnotations
7325 _n_annotations
= new_child
7327 _n_annotations
= null
7333 redef fun visit_all
(v
: Visitor)
7335 v
.enter_visit
(_n_float
)
7336 if _n_annotations
!= null then
7337 v
.enter_visit
(_n_annotations
.as(not null))
7341 redef class ACharExpr
7342 private init empty_init
do end
7344 init init_acharexpr
(
7345 n_char
: nullable TChar,
7346 n_annotations
: nullable AAnnotations
7350 _n_char
= n_char
.as(not null)
7351 n_char
.parent
= self
7352 _n_annotations
= n_annotations
7353 if n_annotations
!= null then
7354 n_annotations
.parent
= self
7358 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7360 if _n_char
== old_child
then
7361 if new_child
!= null then
7362 new_child
.parent
= self
7363 assert new_child
isa TChar
7370 if _n_annotations
== old_child
then
7371 if new_child
!= null then
7372 new_child
.parent
= self
7373 assert new_child
isa AAnnotations
7374 _n_annotations
= new_child
7376 _n_annotations
= null
7382 redef fun visit_all
(v
: Visitor)
7384 v
.enter_visit
(_n_char
)
7385 if _n_annotations
!= null then
7386 v
.enter_visit
(_n_annotations
.as(not null))
7390 redef class AStringExpr
7391 private init empty_init
do end
7393 init init_astringexpr
(
7394 n_string
: nullable TString,
7395 n_annotations
: nullable AAnnotations
7399 _n_string
= n_string
.as(not null)
7400 n_string
.parent
= self
7401 _n_annotations
= n_annotations
7402 if n_annotations
!= null then
7403 n_annotations
.parent
= self
7407 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7409 if _n_string
== old_child
then
7410 if new_child
!= null then
7411 new_child
.parent
= self
7412 assert new_child
isa TString
7413 _n_string
= new_child
7419 if _n_annotations
== old_child
then
7420 if new_child
!= null then
7421 new_child
.parent
= self
7422 assert new_child
isa AAnnotations
7423 _n_annotations
= new_child
7425 _n_annotations
= null
7431 redef fun visit_all
(v
: Visitor)
7433 v
.enter_visit
(_n_string
)
7434 if _n_annotations
!= null then
7435 v
.enter_visit
(_n_annotations
.as(not null))
7439 redef class AStartStringExpr
7440 private init empty_init
do end
7442 init init_astartstringexpr
(
7443 n_string
: nullable TStartString
7447 _n_string
= n_string
.as(not null)
7448 n_string
.parent
= self
7451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7453 if _n_string
== old_child
then
7454 if new_child
!= null then
7455 new_child
.parent
= self
7456 assert new_child
isa TStartString
7457 _n_string
= new_child
7465 redef fun visit_all
(v
: Visitor)
7467 v
.enter_visit
(_n_string
)
7470 redef class AMidStringExpr
7471 private init empty_init
do end
7473 init init_amidstringexpr
(
7474 n_string
: nullable TMidString
7478 _n_string
= n_string
.as(not null)
7479 n_string
.parent
= self
7482 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7484 if _n_string
== old_child
then
7485 if new_child
!= null then
7486 new_child
.parent
= self
7487 assert new_child
isa TMidString
7488 _n_string
= new_child
7496 redef fun visit_all
(v
: Visitor)
7498 v
.enter_visit
(_n_string
)
7501 redef class AEndStringExpr
7502 private init empty_init
do end
7504 init init_aendstringexpr
(
7505 n_string
: nullable TEndString
7509 _n_string
= n_string
.as(not null)
7510 n_string
.parent
= self
7513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7515 if _n_string
== old_child
then
7516 if new_child
!= null then
7517 new_child
.parent
= self
7518 assert new_child
isa TEndString
7519 _n_string
= new_child
7527 redef fun visit_all
(v
: Visitor)
7529 v
.enter_visit
(_n_string
)
7532 redef class ASuperstringExpr
7533 private init empty_init
do end
7535 init init_asuperstringexpr
(
7536 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7537 n_annotations
: nullable AAnnotations
7546 _n_annotations
= n_annotations
7547 if n_annotations
!= null then
7548 n_annotations
.parent
= self
7552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7554 for i
in [0.._n_exprs
.length
[ do
7555 if _n_exprs
[i
] == old_child
then
7556 if new_child
!= null then
7557 assert new_child
isa AExpr
7558 _n_exprs
[i
] = new_child
7559 new_child
.parent
= self
7561 _n_exprs
.remove_at
(i
)
7566 if _n_annotations
== old_child
then
7567 if new_child
!= null then
7568 new_child
.parent
= self
7569 assert new_child
isa AAnnotations
7570 _n_annotations
= new_child
7572 _n_annotations
= null
7578 redef fun visit_all
(v
: Visitor)
7580 for n
in _n_exprs
do
7583 if _n_annotations
!= null then
7584 v
.enter_visit
(_n_annotations
.as(not null))
7588 redef class AParExpr
7589 private init empty_init
do end
7591 init init_aparexpr
(
7592 n_opar
: nullable TOpar,
7593 n_expr
: nullable AExpr,
7594 n_cpar
: nullable TCpar,
7595 n_annotations
: nullable AAnnotations
7599 _n_opar
= n_opar
.as(not null)
7600 n_opar
.parent
= self
7601 _n_expr
= n_expr
.as(not null)
7602 n_expr
.parent
= self
7603 _n_cpar
= n_cpar
.as(not null)
7604 n_cpar
.parent
= self
7605 _n_annotations
= n_annotations
7606 if n_annotations
!= null then
7607 n_annotations
.parent
= self
7611 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7613 if _n_opar
== old_child
then
7614 if new_child
!= null then
7615 new_child
.parent
= self
7616 assert new_child
isa TOpar
7623 if _n_expr
== old_child
then
7624 if new_child
!= null then
7625 new_child
.parent
= self
7626 assert new_child
isa AExpr
7633 if _n_cpar
== old_child
then
7634 if new_child
!= null then
7635 new_child
.parent
= self
7636 assert new_child
isa TCpar
7643 if _n_annotations
== old_child
then
7644 if new_child
!= null then
7645 new_child
.parent
= self
7646 assert new_child
isa AAnnotations
7647 _n_annotations
= new_child
7649 _n_annotations
= null
7655 redef fun visit_all
(v
: Visitor)
7657 v
.enter_visit
(_n_opar
)
7658 v
.enter_visit
(_n_expr
)
7659 v
.enter_visit
(_n_cpar
)
7660 if _n_annotations
!= null then
7661 v
.enter_visit
(_n_annotations
.as(not null))
7665 redef class AAsCastExpr
7666 private init empty_init
do end
7668 init init_aascastexpr
(
7669 n_expr
: nullable AExpr,
7670 n_kwas
: nullable TKwas,
7671 n_opar
: nullable TOpar,
7672 n_type
: nullable AType,
7673 n_cpar
: nullable TCpar
7677 _n_expr
= n_expr
.as(not null)
7678 n_expr
.parent
= self
7679 _n_kwas
= n_kwas
.as(not null)
7680 n_kwas
.parent
= self
7681 _n_opar
= n_opar
.as(not null)
7682 n_opar
.parent
= self
7683 _n_type
= n_type
.as(not null)
7684 n_type
.parent
= self
7685 _n_cpar
= n_cpar
.as(not null)
7686 n_cpar
.parent
= self
7689 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7691 if _n_expr
== old_child
then
7692 if new_child
!= null then
7693 new_child
.parent
= self
7694 assert new_child
isa AExpr
7701 if _n_kwas
== old_child
then
7702 if new_child
!= null then
7703 new_child
.parent
= self
7704 assert new_child
isa TKwas
7711 if _n_opar
== old_child
then
7712 if new_child
!= null then
7713 new_child
.parent
= self
7714 assert new_child
isa TOpar
7721 if _n_type
== old_child
then
7722 if new_child
!= null then
7723 new_child
.parent
= self
7724 assert new_child
isa AType
7731 if _n_cpar
== old_child
then
7732 if new_child
!= null then
7733 new_child
.parent
= self
7734 assert new_child
isa TCpar
7743 redef fun visit_all
(v
: Visitor)
7745 v
.enter_visit
(_n_expr
)
7746 v
.enter_visit
(_n_kwas
)
7747 v
.enter_visit
(_n_opar
)
7748 v
.enter_visit
(_n_type
)
7749 v
.enter_visit
(_n_cpar
)
7752 redef class AAsNotnullExpr
7753 private init empty_init
do end
7755 init init_aasnotnullexpr
(
7756 n_expr
: nullable AExpr,
7757 n_kwas
: nullable TKwas,
7758 n_opar
: nullable TOpar,
7759 n_kwnot
: nullable TKwnot,
7760 n_kwnull
: nullable TKwnull,
7761 n_cpar
: nullable TCpar
7765 _n_expr
= n_expr
.as(not null)
7766 n_expr
.parent
= self
7767 _n_kwas
= n_kwas
.as(not null)
7768 n_kwas
.parent
= self
7769 _n_opar
= n_opar
.as(not null)
7770 n_opar
.parent
= self
7771 _n_kwnot
= n_kwnot
.as(not null)
7772 n_kwnot
.parent
= self
7773 _n_kwnull
= n_kwnull
.as(not null)
7774 n_kwnull
.parent
= self
7775 _n_cpar
= n_cpar
.as(not null)
7776 n_cpar
.parent
= self
7779 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7781 if _n_expr
== old_child
then
7782 if new_child
!= null then
7783 new_child
.parent
= self
7784 assert new_child
isa AExpr
7791 if _n_kwas
== old_child
then
7792 if new_child
!= null then
7793 new_child
.parent
= self
7794 assert new_child
isa TKwas
7801 if _n_opar
== old_child
then
7802 if new_child
!= null then
7803 new_child
.parent
= self
7804 assert new_child
isa TOpar
7811 if _n_kwnot
== old_child
then
7812 if new_child
!= null then
7813 new_child
.parent
= self
7814 assert new_child
isa TKwnot
7815 _n_kwnot
= new_child
7821 if _n_kwnull
== old_child
then
7822 if new_child
!= null then
7823 new_child
.parent
= self
7824 assert new_child
isa TKwnull
7825 _n_kwnull
= new_child
7831 if _n_cpar
== old_child
then
7832 if new_child
!= null then
7833 new_child
.parent
= self
7834 assert new_child
isa TCpar
7843 redef fun visit_all
(v
: Visitor)
7845 v
.enter_visit
(_n_expr
)
7846 v
.enter_visit
(_n_kwas
)
7847 v
.enter_visit
(_n_opar
)
7848 v
.enter_visit
(_n_kwnot
)
7849 v
.enter_visit
(_n_kwnull
)
7850 v
.enter_visit
(_n_cpar
)
7853 redef class AIssetAttrExpr
7854 private init empty_init
do end
7856 init init_aissetattrexpr
(
7857 n_kwisset
: nullable TKwisset,
7858 n_expr
: nullable AExpr,
7859 n_id
: nullable TAttrid
7863 _n_kwisset
= n_kwisset
.as(not null)
7864 n_kwisset
.parent
= self
7865 _n_expr
= n_expr
.as(not null)
7866 n_expr
.parent
= self
7867 _n_id
= n_id
.as(not null)
7871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7873 if _n_kwisset
== old_child
then
7874 if new_child
!= null then
7875 new_child
.parent
= self
7876 assert new_child
isa TKwisset
7877 _n_kwisset
= new_child
7883 if _n_expr
== old_child
then
7884 if new_child
!= null then
7885 new_child
.parent
= self
7886 assert new_child
isa AExpr
7893 if _n_id
== old_child
then
7894 if new_child
!= null then
7895 new_child
.parent
= self
7896 assert new_child
isa TAttrid
7905 redef fun visit_all
(v
: Visitor)
7907 v
.enter_visit
(_n_kwisset
)
7908 v
.enter_visit
(_n_expr
)
7909 v
.enter_visit
(_n_id
)
7912 redef class ADebugTypeExpr
7913 private init empty_init
do end
7915 init init_adebugtypeexpr
(
7916 n_kwdebug
: nullable TKwdebug,
7917 n_kwtype
: nullable TKwtype,
7918 n_expr
: nullable AExpr,
7919 n_type
: nullable AType
7923 _n_kwdebug
= n_kwdebug
.as(not null)
7924 n_kwdebug
.parent
= self
7925 _n_kwtype
= n_kwtype
.as(not null)
7926 n_kwtype
.parent
= self
7927 _n_expr
= n_expr
.as(not null)
7928 n_expr
.parent
= self
7929 _n_type
= n_type
.as(not null)
7930 n_type
.parent
= self
7933 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7935 if _n_kwdebug
== old_child
then
7936 if new_child
!= null then
7937 new_child
.parent
= self
7938 assert new_child
isa TKwdebug
7939 _n_kwdebug
= new_child
7945 if _n_kwtype
== old_child
then
7946 if new_child
!= null then
7947 new_child
.parent
= self
7948 assert new_child
isa TKwtype
7949 _n_kwtype
= new_child
7955 if _n_expr
== old_child
then
7956 if new_child
!= null then
7957 new_child
.parent
= self
7958 assert new_child
isa AExpr
7965 if _n_type
== old_child
then
7966 if new_child
!= null then
7967 new_child
.parent
= self
7968 assert new_child
isa AType
7977 redef fun visit_all
(v
: Visitor)
7979 v
.enter_visit
(_n_kwdebug
)
7980 v
.enter_visit
(_n_kwtype
)
7981 v
.enter_visit
(_n_expr
)
7982 v
.enter_visit
(_n_type
)
7985 redef class AListExprs
7986 private init empty_init
do end
7988 init init_alistexprs
(
7989 n_exprs
: Collection[Object] # Should be Collection[AExpr]
8000 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8002 for i
in [0.._n_exprs
.length
[ do
8003 if _n_exprs
[i
] == old_child
then
8004 if new_child
!= null then
8005 assert new_child
isa AExpr
8006 _n_exprs
[i
] = new_child
8007 new_child
.parent
= self
8009 _n_exprs
.remove_at
(i
)
8016 redef fun visit_all
(v
: Visitor)
8018 for n
in _n_exprs
do
8023 redef class AParExprs
8024 private init empty_init
do end
8026 init init_aparexprs
(
8027 n_opar
: nullable TOpar,
8028 n_exprs
: Collection[Object], # Should be Collection[AExpr]
8029 n_cpar
: nullable TCpar
8033 _n_opar
= n_opar
.as(not null)
8034 n_opar
.parent
= self
8040 _n_cpar
= n_cpar
.as(not null)
8041 n_cpar
.parent
= self
8044 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8046 if _n_opar
== old_child
then
8047 if new_child
!= null then
8048 new_child
.parent
= self
8049 assert new_child
isa TOpar
8056 for i
in [0.._n_exprs
.length
[ do
8057 if _n_exprs
[i
] == old_child
then
8058 if new_child
!= null then
8059 assert new_child
isa AExpr
8060 _n_exprs
[i
] = new_child
8061 new_child
.parent
= self
8063 _n_exprs
.remove_at
(i
)
8068 if _n_cpar
== old_child
then
8069 if new_child
!= null then
8070 new_child
.parent
= self
8071 assert new_child
isa TCpar
8080 redef fun visit_all
(v
: Visitor)
8082 v
.enter_visit
(_n_opar
)
8083 for n
in _n_exprs
do
8086 v
.enter_visit
(_n_cpar
)
8089 redef class ABraExprs
8090 private init empty_init
do end
8092 init init_abraexprs
(
8093 n_obra
: nullable TObra,
8094 n_exprs
: Collection[Object], # Should be Collection[AExpr]
8095 n_cbra
: nullable TCbra
8099 _n_obra
= n_obra
.as(not null)
8100 n_obra
.parent
= self
8106 _n_cbra
= n_cbra
.as(not null)
8107 n_cbra
.parent
= self
8110 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8112 if _n_obra
== old_child
then
8113 if new_child
!= null then
8114 new_child
.parent
= self
8115 assert new_child
isa TObra
8122 for i
in [0.._n_exprs
.length
[ do
8123 if _n_exprs
[i
] == old_child
then
8124 if new_child
!= null then
8125 assert new_child
isa AExpr
8126 _n_exprs
[i
] = new_child
8127 new_child
.parent
= self
8129 _n_exprs
.remove_at
(i
)
8134 if _n_cbra
== old_child
then
8135 if new_child
!= null then
8136 new_child
.parent
= self
8137 assert new_child
isa TCbra
8146 redef fun visit_all
(v
: Visitor)
8148 v
.enter_visit
(_n_obra
)
8149 for n
in _n_exprs
do
8152 v
.enter_visit
(_n_cbra
)
8155 redef class APlusAssignOp
8156 private init empty_init
do end
8158 init init_aplusassignop
(
8159 n_pluseq
: nullable TPluseq
8163 _n_pluseq
= n_pluseq
.as(not null)
8164 n_pluseq
.parent
= self
8167 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8169 if _n_pluseq
== old_child
then
8170 if new_child
!= null then
8171 new_child
.parent
= self
8172 assert new_child
isa TPluseq
8173 _n_pluseq
= new_child
8181 redef fun visit_all
(v
: Visitor)
8183 v
.enter_visit
(_n_pluseq
)
8186 redef class AMinusAssignOp
8187 private init empty_init
do end
8189 init init_aminusassignop
(
8190 n_minuseq
: nullable TMinuseq
8194 _n_minuseq
= n_minuseq
.as(not null)
8195 n_minuseq
.parent
= self
8198 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8200 if _n_minuseq
== old_child
then
8201 if new_child
!= null then
8202 new_child
.parent
= self
8203 assert new_child
isa TMinuseq
8204 _n_minuseq
= new_child
8212 redef fun visit_all
(v
: Visitor)
8214 v
.enter_visit
(_n_minuseq
)
8217 redef class AClosureDef
8218 private init empty_init
do end
8220 init init_aclosuredef
(
8221 n_bang
: nullable TBang,
8222 n_id
: nullable AClosureId,
8223 n_ids
: Collection[Object], # Should be Collection[TId]
8224 n_kwdo
: nullable TKwdo,
8225 n_expr
: nullable AExpr,
8226 n_label
: nullable ALabel
8230 _n_bang
= n_bang
.as(not null)
8231 n_bang
.parent
= self
8232 _n_id
= n_id
.as(not null)
8240 if n_kwdo
!= null then
8241 n_kwdo
.parent
= self
8244 if n_expr
!= null then
8245 n_expr
.parent
= self
8248 if n_label
!= null then
8249 n_label
.parent
= self
8253 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8255 if _n_bang
== old_child
then
8256 if new_child
!= null then
8257 new_child
.parent
= self
8258 assert new_child
isa TBang
8265 if _n_id
== old_child
then
8266 if new_child
!= null then
8267 new_child
.parent
= self
8268 assert new_child
isa AClosureId
8275 for i
in [0.._n_ids
.length
[ do
8276 if _n_ids
[i
] == old_child
then
8277 if new_child
!= null then
8278 assert new_child
isa TId
8279 _n_ids
[i
] = new_child
8280 new_child
.parent
= self
8287 if _n_kwdo
== old_child
then
8288 if new_child
!= null then
8289 new_child
.parent
= self
8290 assert new_child
isa TKwdo
8297 if _n_expr
== old_child
then
8298 if new_child
!= null then
8299 new_child
.parent
= self
8300 assert new_child
isa AExpr
8307 if _n_label
== old_child
then
8308 if new_child
!= null then
8309 new_child
.parent
= self
8310 assert new_child
isa ALabel
8311 _n_label
= new_child
8319 redef fun visit_all
(v
: Visitor)
8321 v
.enter_visit
(_n_bang
)
8322 v
.enter_visit
(_n_id
)
8326 if _n_kwdo
!= null then
8327 v
.enter_visit
(_n_kwdo
.as(not null))
8329 if _n_expr
!= null then
8330 v
.enter_visit
(_n_expr
.as(not null))
8332 if _n_label
!= null then
8333 v
.enter_visit
(_n_label
.as(not null))
8337 redef class ASimpleClosureId
8338 private init empty_init
do end
8340 init init_asimpleclosureid
(
8345 _n_id
= n_id
.as(not null)
8349 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8351 if _n_id
== old_child
then
8352 if new_child
!= null then
8353 new_child
.parent
= self
8354 assert new_child
isa TId
8363 redef fun visit_all
(v
: Visitor)
8365 v
.enter_visit
(_n_id
)
8368 redef class ABreakClosureId
8369 private init empty_init
do end
8371 init init_abreakclosureid
(
8372 n_kwbreak
: nullable TKwbreak
8376 _n_kwbreak
= n_kwbreak
.as(not null)
8377 n_kwbreak
.parent
= self
8380 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8382 if _n_kwbreak
== old_child
then
8383 if new_child
!= null then
8384 new_child
.parent
= self
8385 assert new_child
isa TKwbreak
8386 _n_kwbreak
= new_child
8394 redef fun visit_all
(v
: Visitor)
8396 v
.enter_visit
(_n_kwbreak
)
8399 redef class AModuleName
8400 private init empty_init
do end
8402 init init_amodulename
(
8403 n_quad
: nullable TQuad,
8404 n_path
: Collection[Object], # Should be Collection[TId]
8410 if n_quad
!= null then
8411 n_quad
.parent
= self
8418 _n_id
= n_id
.as(not null)
8422 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8424 if _n_quad
== old_child
then
8425 if new_child
!= null then
8426 new_child
.parent
= self
8427 assert new_child
isa TQuad
8434 for i
in [0.._n_path
.length
[ do
8435 if _n_path
[i
] == old_child
then
8436 if new_child
!= null then
8437 assert new_child
isa TId
8438 _n_path
[i
] = new_child
8439 new_child
.parent
= self
8441 _n_path
.remove_at
(i
)
8446 if _n_id
== old_child
then
8447 if new_child
!= null then
8448 new_child
.parent
= self
8449 assert new_child
isa TId
8458 redef fun visit_all
(v
: Visitor)
8460 if _n_quad
!= null then
8461 v
.enter_visit
(_n_quad
.as(not null))
8466 v
.enter_visit
(_n_id
)
8469 redef class AExternCalls
8470 private init empty_init
do end
8472 init init_aexterncalls
(
8473 n_kwimport
: nullable TKwimport,
8474 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
8478 _n_kwimport
= n_kwimport
.as(not null)
8479 n_kwimport
.parent
= self
8480 for n
in n_extern_calls
do
8481 assert n
isa AExternCall
8482 _n_extern_calls
.add
(n
)
8487 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8489 if _n_kwimport
== old_child
then
8490 if new_child
!= null then
8491 new_child
.parent
= self
8492 assert new_child
isa TKwimport
8493 _n_kwimport
= new_child
8499 for i
in [0.._n_extern_calls
.length
[ do
8500 if _n_extern_calls
[i
] == old_child
then
8501 if new_child
!= null then
8502 assert new_child
isa AExternCall
8503 _n_extern_calls
[i
] = new_child
8504 new_child
.parent
= self
8506 _n_extern_calls
.remove_at
(i
)
8513 redef fun visit_all
(v
: Visitor)
8515 v
.enter_visit
(_n_kwimport
)
8516 for n
in _n_extern_calls
do
8521 redef class AExternCall
8522 private init empty_init
do end
8524 init init_aexterncall
8529 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8533 redef fun visit_all
(v
: Visitor)
8537 redef class ASuperExternCall
8538 private init empty_init
do end
8540 init init_asuperexterncall
(
8541 n_kwsuper
: nullable TKwsuper
8545 _n_kwsuper
= n_kwsuper
.as(not null)
8546 n_kwsuper
.parent
= self
8549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8551 if _n_kwsuper
== old_child
then
8552 if new_child
!= null then
8553 new_child
.parent
= self
8554 assert new_child
isa TKwsuper
8555 _n_kwsuper
= new_child
8563 redef fun visit_all
(v
: Visitor)
8565 v
.enter_visit
(_n_kwsuper
)
8568 redef class ALocalPropExternCall
8569 private init empty_init
do end
8571 init init_alocalpropexterncall
(
8572 n_methid
: nullable AMethid
8576 _n_methid
= n_methid
.as(not null)
8577 n_methid
.parent
= self
8580 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8582 if _n_methid
== old_child
then
8583 if new_child
!= null then
8584 new_child
.parent
= self
8585 assert new_child
isa AMethid
8586 _n_methid
= new_child
8594 redef fun visit_all
(v
: Visitor)
8596 v
.enter_visit
(_n_methid
)
8599 redef class AFullPropExternCall
8600 private init empty_init
do end
8602 init init_afullpropexterncall
(
8603 n_classid
: nullable TClassid,
8604 n_quad
: nullable TQuad,
8605 n_methid
: nullable AMethid
8609 _n_classid
= n_classid
.as(not null)
8610 n_classid
.parent
= self
8612 if n_quad
!= null then
8613 n_quad
.parent
= self
8615 _n_methid
= n_methid
.as(not null)
8616 n_methid
.parent
= self
8619 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8621 if _n_classid
== old_child
then
8622 if new_child
!= null then
8623 new_child
.parent
= self
8624 assert new_child
isa TClassid
8625 _n_classid
= new_child
8631 if _n_quad
== old_child
then
8632 if new_child
!= null then
8633 new_child
.parent
= self
8634 assert new_child
isa TQuad
8641 if _n_methid
== old_child
then
8642 if new_child
!= null then
8643 new_child
.parent
= self
8644 assert new_child
isa AMethid
8645 _n_methid
= new_child
8653 redef fun visit_all
(v
: Visitor)
8655 v
.enter_visit
(_n_classid
)
8656 if _n_quad
!= null then
8657 v
.enter_visit
(_n_quad
.as(not null))
8659 v
.enter_visit
(_n_methid
)
8662 redef class AInitPropExternCall
8663 private init empty_init
do end
8665 init init_ainitpropexterncall
(
8666 n_classid
: nullable TClassid
8670 _n_classid
= n_classid
.as(not null)
8671 n_classid
.parent
= self
8674 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8676 if _n_classid
== old_child
then
8677 if new_child
!= null then
8678 new_child
.parent
= self
8679 assert new_child
isa TClassid
8680 _n_classid
= new_child
8688 redef fun visit_all
(v
: Visitor)
8690 v
.enter_visit
(_n_classid
)
8693 redef class ACastAsExternCall
8694 private init empty_init
do end
8696 init init_acastasexterncall
(
8697 n_from_type
: nullable AType,
8698 n_kwas
: nullable TKwas,
8699 n_to_type
: nullable AType
8703 _n_from_type
= n_from_type
.as(not null)
8704 n_from_type
.parent
= self
8705 _n_kwas
= n_kwas
.as(not null)
8706 n_kwas
.parent
= self
8707 _n_to_type
= n_to_type
.as(not null)
8708 n_to_type
.parent
= self
8711 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8713 if _n_from_type
== old_child
then
8714 if new_child
!= null then
8715 new_child
.parent
= self
8716 assert new_child
isa AType
8717 _n_from_type
= new_child
8723 if _n_kwas
== old_child
then
8724 if new_child
!= null then
8725 new_child
.parent
= self
8726 assert new_child
isa TKwas
8733 if _n_to_type
== old_child
then
8734 if new_child
!= null then
8735 new_child
.parent
= self
8736 assert new_child
isa AType
8737 _n_to_type
= new_child
8745 redef fun visit_all
(v
: Visitor)
8747 v
.enter_visit
(_n_from_type
)
8748 v
.enter_visit
(_n_kwas
)
8749 v
.enter_visit
(_n_to_type
)
8752 redef class AAsNullableExternCall
8753 private init empty_init
do end
8755 init init_aasnullableexterncall
(
8756 n_type
: nullable AType,
8757 n_kwas
: nullable TKwas,
8758 n_kwnullable
: nullable TKwnullable
8762 _n_type
= n_type
.as(not null)
8763 n_type
.parent
= self
8764 _n_kwas
= n_kwas
.as(not null)
8765 n_kwas
.parent
= self
8766 _n_kwnullable
= n_kwnullable
.as(not null)
8767 n_kwnullable
.parent
= self
8770 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8772 if _n_type
== old_child
then
8773 if new_child
!= null then
8774 new_child
.parent
= self
8775 assert new_child
isa AType
8782 if _n_kwas
== old_child
then
8783 if new_child
!= null then
8784 new_child
.parent
= self
8785 assert new_child
isa TKwas
8792 if _n_kwnullable
== old_child
then
8793 if new_child
!= null then
8794 new_child
.parent
= self
8795 assert new_child
isa TKwnullable
8796 _n_kwnullable
= new_child
8804 redef fun visit_all
(v
: Visitor)
8806 v
.enter_visit
(_n_type
)
8807 v
.enter_visit
(_n_kwas
)
8808 v
.enter_visit
(_n_kwnullable
)
8811 redef class AAsNotNullableExternCall
8812 private init empty_init
do end
8814 init init_aasnotnullableexterncall
(
8815 n_type
: nullable AType,
8816 n_kwas
: nullable TKwas,
8817 n_kwnot
: nullable TKwnot,
8818 n_kwnullable
: nullable TKwnullable
8822 _n_type
= n_type
.as(not null)
8823 n_type
.parent
= self
8824 _n_kwas
= n_kwas
.as(not null)
8825 n_kwas
.parent
= self
8826 _n_kwnot
= n_kwnot
.as(not null)
8827 n_kwnot
.parent
= self
8828 _n_kwnullable
= n_kwnullable
.as(not null)
8829 n_kwnullable
.parent
= self
8832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8834 if _n_type
== old_child
then
8835 if new_child
!= null then
8836 new_child
.parent
= self
8837 assert new_child
isa AType
8844 if _n_kwas
== old_child
then
8845 if new_child
!= null then
8846 new_child
.parent
= self
8847 assert new_child
isa TKwas
8854 if _n_kwnot
== old_child
then
8855 if new_child
!= null then
8856 new_child
.parent
= self
8857 assert new_child
isa TKwnot
8858 _n_kwnot
= new_child
8864 if _n_kwnullable
== old_child
then
8865 if new_child
!= null then
8866 new_child
.parent
= self
8867 assert new_child
isa TKwnullable
8868 _n_kwnullable
= new_child
8876 redef fun visit_all
(v
: Visitor)
8878 v
.enter_visit
(_n_type
)
8879 v
.enter_visit
(_n_kwas
)
8880 v
.enter_visit
(_n_kwnot
)
8881 v
.enter_visit
(_n_kwnullable
)
8884 redef class AInLanguage
8885 private init empty_init
do end
8887 init init_ainlanguage
(
8888 n_kwin
: nullable TKwin,
8889 n_string
: nullable TString
8893 _n_kwin
= n_kwin
.as(not null)
8894 n_kwin
.parent
= self
8895 _n_string
= n_string
.as(not null)
8896 n_string
.parent
= self
8899 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8901 if _n_kwin
== old_child
then
8902 if new_child
!= null then
8903 new_child
.parent
= self
8904 assert new_child
isa TKwin
8911 if _n_string
== old_child
then
8912 if new_child
!= null then
8913 new_child
.parent
= self
8914 assert new_child
isa TString
8915 _n_string
= new_child
8923 redef fun visit_all
(v
: Visitor)
8925 v
.enter_visit
(_n_kwin
)
8926 v
.enter_visit
(_n_string
)
8929 redef class AExternCodeBlock
8930 private init empty_init
do end
8932 init init_aexterncodeblock
(
8933 n_in_language
: nullable AInLanguage,
8934 n_extern_code_segment
: nullable TExternCodeSegment
8938 _n_in_language
= n_in_language
8939 if n_in_language
!= null then
8940 n_in_language
.parent
= self
8942 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8943 n_extern_code_segment
.parent
= self
8946 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8948 if _n_in_language
== old_child
then
8949 if new_child
!= null then
8950 new_child
.parent
= self
8951 assert new_child
isa AInLanguage
8952 _n_in_language
= new_child
8954 _n_in_language
= null
8958 if _n_extern_code_segment
== old_child
then
8959 if new_child
!= null then
8960 new_child
.parent
= self
8961 assert new_child
isa TExternCodeSegment
8962 _n_extern_code_segment
= new_child
8970 redef fun visit_all
(v
: Visitor)
8972 if _n_in_language
!= null then
8973 v
.enter_visit
(_n_in_language
.as(not null))
8975 v
.enter_visit
(_n_extern_code_segment
)
8978 redef class AQualified
8979 private init empty_init
do end
8981 init init_aqualified
(
8982 n_id
: Collection[Object], # Should be Collection[TId]
8983 n_classid
: nullable TClassid
8992 _n_classid
= n_classid
8993 if n_classid
!= null then
8994 n_classid
.parent
= self
8998 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9000 for i
in [0.._n_id
.length
[ do
9001 if _n_id
[i
] == old_child
then
9002 if new_child
!= null then
9003 assert new_child
isa TId
9004 _n_id
[i
] = new_child
9005 new_child
.parent
= self
9012 if _n_classid
== old_child
then
9013 if new_child
!= null then
9014 new_child
.parent
= self
9015 assert new_child
isa TClassid
9016 _n_classid
= new_child
9024 redef fun visit_all
(v
: Visitor)
9029 if _n_classid
!= null then
9030 v
.enter_visit
(_n_classid
.as(not null))
9035 private init empty_init
do end
9038 n_comment
: Collection[Object] # Should be Collection[TComment]
9042 for n
in n_comment
do
9043 assert n
isa TComment
9049 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9051 for i
in [0.._n_comment
.length
[ do
9052 if _n_comment
[i
] == old_child
then
9053 if new_child
!= null then
9054 assert new_child
isa TComment
9055 _n_comment
[i
] = new_child
9056 new_child
.parent
= self
9058 _n_comment
.remove_at
(i
)
9065 redef fun visit_all
(v
: Visitor)
9067 for n
in _n_comment
do
9072 redef class AAnnotations
9073 private init empty_init
do end
9075 init init_aannotations
(
9077 n_opar
: nullable TOpar,
9078 n_items
: Collection[Object], # Should be Collection[AAnnotation]
9079 n_cpar
: nullable TCpar
9084 if n_at
!= null then
9088 if n_opar
!= null then
9089 n_opar
.parent
= self
9092 assert n
isa AAnnotation
9097 if n_cpar
!= null then
9098 n_cpar
.parent
= self
9102 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9104 if _n_at
== old_child
then
9105 if new_child
!= null then
9106 new_child
.parent
= self
9107 assert new_child
isa TAt
9114 if _n_opar
== old_child
then
9115 if new_child
!= null then
9116 new_child
.parent
= self
9117 assert new_child
isa TOpar
9124 for i
in [0.._n_items
.length
[ do
9125 if _n_items
[i
] == old_child
then
9126 if new_child
!= null then
9127 assert new_child
isa AAnnotation
9128 _n_items
[i
] = new_child
9129 new_child
.parent
= self
9131 _n_items
.remove_at
(i
)
9136 if _n_cpar
== old_child
then
9137 if new_child
!= null then
9138 new_child
.parent
= self
9139 assert new_child
isa TCpar
9148 redef fun visit_all
(v
: Visitor)
9150 if _n_at
!= null then
9151 v
.enter_visit
(_n_at
.as(not null))
9153 if _n_opar
!= null then
9154 v
.enter_visit
(_n_opar
.as(not null))
9156 for n
in _n_items
do
9159 if _n_cpar
!= null then
9160 v
.enter_visit
(_n_cpar
.as(not null))
9164 redef class AAnnotation
9165 private init empty_init
do end
9167 init init_aannotation
(
9168 n_atid
: nullable AAtid,
9169 n_opar
: nullable TOpar,
9170 n_args
: Collection[Object], # Should be Collection[AAtArg]
9171 n_cpar
: nullable TCpar,
9172 n_annotations
: nullable AAnnotations
9176 _n_atid
= n_atid
.as(not null)
9177 n_atid
.parent
= self
9179 if n_opar
!= null then
9180 n_opar
.parent
= self
9188 if n_cpar
!= null then
9189 n_cpar
.parent
= self
9191 _n_annotations
= n_annotations
9192 if n_annotations
!= null then
9193 n_annotations
.parent
= self
9197 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9199 if _n_atid
== old_child
then
9200 if new_child
!= null then
9201 new_child
.parent
= self
9202 assert new_child
isa AAtid
9209 if _n_opar
== old_child
then
9210 if new_child
!= null then
9211 new_child
.parent
= self
9212 assert new_child
isa TOpar
9219 for i
in [0.._n_args
.length
[ do
9220 if _n_args
[i
] == old_child
then
9221 if new_child
!= null then
9222 assert new_child
isa AAtArg
9223 _n_args
[i
] = new_child
9224 new_child
.parent
= self
9226 _n_args
.remove_at
(i
)
9231 if _n_cpar
== old_child
then
9232 if new_child
!= null then
9233 new_child
.parent
= self
9234 assert new_child
isa TCpar
9241 if _n_annotations
== old_child
then
9242 if new_child
!= null then
9243 new_child
.parent
= self
9244 assert new_child
isa AAnnotations
9245 _n_annotations
= new_child
9247 _n_annotations
= null
9253 redef fun visit_all
(v
: Visitor)
9255 v
.enter_visit
(_n_atid
)
9256 if _n_opar
!= null then
9257 v
.enter_visit
(_n_opar
.as(not null))
9262 if _n_cpar
!= null then
9263 v
.enter_visit
(_n_cpar
.as(not null))
9265 if _n_annotations
!= null then
9266 v
.enter_visit
(_n_annotations
.as(not null))
9270 redef class ATypeAtArg
9271 private init empty_init
do end
9273 init init_atypeatarg
(
9274 n_type
: nullable AType
9278 _n_type
= n_type
.as(not null)
9279 n_type
.parent
= self
9282 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9284 if _n_type
== old_child
then
9285 if new_child
!= null then
9286 new_child
.parent
= self
9287 assert new_child
isa AType
9296 redef fun visit_all
(v
: Visitor)
9298 v
.enter_visit
(_n_type
)
9301 redef class AExprAtArg
9302 private init empty_init
do end
9304 init init_aexpratarg
(
9305 n_expr
: nullable AExpr
9309 _n_expr
= n_expr
.as(not null)
9310 n_expr
.parent
= self
9313 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9315 if _n_expr
== old_child
then
9316 if new_child
!= null then
9317 new_child
.parent
= self
9318 assert new_child
isa AExpr
9327 redef fun visit_all
(v
: Visitor)
9329 v
.enter_visit
(_n_expr
)
9332 redef class AAtAtArg
9333 private init empty_init
do end
9335 init init_aatatarg
(
9336 n_annotations
: nullable AAnnotations
9340 _n_annotations
= n_annotations
.as(not null)
9341 n_annotations
.parent
= self
9344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9346 if _n_annotations
== old_child
then
9347 if new_child
!= null then
9348 new_child
.parent
= self
9349 assert new_child
isa AAnnotations
9350 _n_annotations
= new_child
9358 redef fun visit_all
(v
: Visitor)
9360 v
.enter_visit
(_n_annotations
)
9364 private init empty_init
do end
9371 _n_id
= n_id
.as(not null)
9375 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9377 if _n_id
== old_child
then
9378 if new_child
!= null then
9379 new_child
.parent
= self
9380 assert new_child
isa TId
9389 redef fun visit_all
(v
: Visitor)
9391 v
.enter_visit
(_n_id
)
9394 redef class AKwexternAtid
9395 private init empty_init
do end
9397 init init_akwexternatid
(
9398 n_id
: nullable TKwextern
9402 _n_id
= n_id
.as(not null)
9406 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9408 if _n_id
== old_child
then
9409 if new_child
!= null then
9410 new_child
.parent
= self
9411 assert new_child
isa TKwextern
9420 redef fun visit_all
(v
: Visitor)
9422 v
.enter_visit
(_n_id
)
9425 redef class AKwinternAtid
9426 private init empty_init
do end
9428 init init_akwinternatid
(
9429 n_id
: nullable TKwintern
9433 _n_id
= n_id
.as(not null)
9437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9439 if _n_id
== old_child
then
9440 if new_child
!= null then
9441 new_child
.parent
= self
9442 assert new_child
isa TKwintern
9451 redef fun visit_all
(v
: Visitor)
9453 v
.enter_visit
(_n_id
)
9456 redef class AKwreadableAtid
9457 private init empty_init
do end
9459 init init_akwreadableatid
(
9460 n_id
: nullable TKwreadable
9464 _n_id
= n_id
.as(not null)
9468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9470 if _n_id
== old_child
then
9471 if new_child
!= null then
9472 new_child
.parent
= self
9473 assert new_child
isa TKwreadable
9482 redef fun visit_all
(v
: Visitor)
9484 v
.enter_visit
(_n_id
)
9487 redef class AKwwritableAtid
9488 private init empty_init
do end
9490 init init_akwwritableatid
(
9491 n_id
: nullable TKwwritable
9495 _n_id
= n_id
.as(not null)
9499 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9501 if _n_id
== old_child
then
9502 if new_child
!= null then
9503 new_child
.parent
= self
9504 assert new_child
isa TKwwritable
9513 redef fun visit_all
(v
: Visitor)
9515 v
.enter_visit
(_n_id
)
9518 redef class AKwimportAtid
9519 private init empty_init
do end
9521 init init_akwimportatid
(
9522 n_id
: nullable TKwimport
9526 _n_id
= n_id
.as(not null)
9530 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9532 if _n_id
== old_child
then
9533 if new_child
!= null then
9534 new_child
.parent
= self
9535 assert new_child
isa TKwimport
9544 redef fun visit_all
(v
: Visitor)
9546 v
.enter_visit
(_n_id
)
9551 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
9553 if _n_base
== old_child
then
9554 if new_child
== null then
9556 new_child
.parent
= self
9557 assert new_child
isa AModule
9560 old_child
.parent
= null
9565 redef fun visit_all
(v
: Visitor)
9567 if _n_base
!= null then
9568 v
.enter_visit
(_n_base
.as(not null))
9570 v
.enter_visit
(_n_eof
)