1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
11 n_moduledecl
: nullable AModuledecl,
12 n_imports
: Collection[Object], # Should be Collection[AImport]
13 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
14 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
17 _n_moduledecl
= n_moduledecl
18 if n_moduledecl
!= null then n_moduledecl
.parent
= self
19 self.n_imports
.unsafe_add_all
(n_imports
)
20 self.n_extern_code_blocks
.unsafe_add_all
(n_extern_code_blocks
)
21 self.n_classdefs
.unsafe_add_all
(n_classdefs
)
24 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
26 if _n_moduledecl
== old_child
then
27 n_moduledecl
= new_child
.as(nullable AModuledecl)
30 if n_imports
.replace_child
(old_child
, new_child
) then return
31 if n_extern_code_blocks
.replace_child
(old_child
, new_child
) then return
32 if n_classdefs
.replace_child
(old_child
, new_child
) then return
35 redef fun n_moduledecl
=(node
)
38 if node
!= null then node
.parent
= self
42 redef fun visit_all
(v
: Visitor)
44 v
.enter_visit
(_n_moduledecl
)
45 n_imports
.visit_all
(v
)
46 n_extern_code_blocks
.visit_all
(v
)
47 n_classdefs
.visit_all
(v
)
50 redef class AModuledecl
51 init init_amoduledecl
(
53 n_kwredef
: nullable TKwredef,
54 n_visibility
: nullable AVisibility,
55 n_kwmodule
: nullable TKwmodule,
56 n_name
: nullable AModuleName,
57 n_annotations
: nullable AAnnotations
61 if n_doc
!= null then n_doc
.parent
= self
62 _n_kwredef
= n_kwredef
63 if n_kwredef
!= null then n_kwredef
.parent
= self
64 _n_visibility
= n_visibility
.as(not null)
65 n_visibility
.parent
= self
66 _n_kwmodule
= n_kwmodule
.as(not null)
67 n_kwmodule
.parent
= self
68 _n_name
= n_name
.as(not null)
70 _n_annotations
= n_annotations
71 if n_annotations
!= null then n_annotations
.parent
= self
74 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
76 if _n_doc
== old_child
then
77 n_doc
= new_child
.as(nullable ADoc)
80 if _n_kwredef
== old_child
then
81 n_kwredef
= new_child
.as(nullable TKwredef)
84 if _n_visibility
== old_child
then
85 n_visibility
= new_child
.as(AVisibility)
88 if _n_kwmodule
== old_child
then
89 n_kwmodule
= new_child
.as(TKwmodule)
92 if _n_name
== old_child
then
93 n_name
= new_child
.as(AModuleName)
96 if _n_annotations
== old_child
then
97 n_annotations
= new_child
.as(nullable AAnnotations)
102 redef fun n_doc
=(node
)
105 if node
!= null then node
.parent
= self
107 redef fun n_kwredef
=(node
)
110 if node
!= null then node
.parent
= self
112 redef fun n_visibility
=(node
)
117 redef fun n_kwmodule
=(node
)
122 redef fun n_name
=(node
)
127 redef fun n_annotations
=(node
)
129 _n_annotations
= node
130 if node
!= null then node
.parent
= self
134 redef fun visit_all
(v
: Visitor)
136 v
.enter_visit
(_n_doc
)
137 v
.enter_visit
(_n_kwredef
)
138 v
.enter_visit
(_n_visibility
)
139 v
.enter_visit
(_n_kwmodule
)
140 v
.enter_visit
(_n_name
)
141 v
.enter_visit
(_n_annotations
)
144 redef class AStdImport
145 init init_astdimport
(
146 n_visibility
: nullable AVisibility,
147 n_kwimport
: nullable TKwimport,
148 n_name
: nullable AModuleName,
149 n_annotations
: nullable AAnnotations
152 _n_visibility
= n_visibility
.as(not null)
153 n_visibility
.parent
= self
154 _n_kwimport
= n_kwimport
.as(not null)
155 n_kwimport
.parent
= self
156 _n_name
= n_name
.as(not null)
158 _n_annotations
= n_annotations
159 if n_annotations
!= null then n_annotations
.parent
= self
162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
164 if _n_visibility
== old_child
then
165 n_visibility
= new_child
.as(AVisibility)
168 if _n_kwimport
== old_child
then
169 n_kwimport
= new_child
.as(TKwimport)
172 if _n_name
== old_child
then
173 n_name
= new_child
.as(AModuleName)
176 if _n_annotations
== old_child
then
177 n_annotations
= new_child
.as(nullable AAnnotations)
182 redef fun n_visibility
=(node
)
187 redef fun n_kwimport
=(node
)
192 redef fun n_name
=(node
)
197 redef fun n_annotations
=(node
)
199 _n_annotations
= node
200 if node
!= null then node
.parent
= self
204 redef fun visit_all
(v
: Visitor)
206 v
.enter_visit
(_n_visibility
)
207 v
.enter_visit
(_n_kwimport
)
208 v
.enter_visit
(_n_name
)
209 v
.enter_visit
(_n_annotations
)
212 redef class ANoImport
213 init init_anoimport
(
214 n_visibility
: nullable AVisibility,
215 n_kwimport
: nullable TKwimport,
216 n_kwend
: nullable TKwend
219 _n_visibility
= n_visibility
.as(not null)
220 n_visibility
.parent
= self
221 _n_kwimport
= n_kwimport
.as(not null)
222 n_kwimport
.parent
= self
223 _n_kwend
= n_kwend
.as(not null)
224 n_kwend
.parent
= self
227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
229 if _n_visibility
== old_child
then
230 n_visibility
= new_child
.as(AVisibility)
233 if _n_kwimport
== old_child
then
234 n_kwimport
= new_child
.as(TKwimport)
237 if _n_kwend
== old_child
then
238 n_kwend
= new_child
.as(TKwend)
243 redef fun n_visibility
=(node
)
248 redef fun n_kwimport
=(node
)
253 redef fun n_kwend
=(node
)
260 redef fun visit_all
(v
: Visitor)
262 v
.enter_visit
(_n_visibility
)
263 v
.enter_visit
(_n_kwimport
)
264 v
.enter_visit
(_n_kwend
)
267 redef class APublicVisibility
268 init init_apublicvisibility
(
269 n_kwpublic
: nullable TKwpublic
272 _n_kwpublic
= n_kwpublic
273 if n_kwpublic
!= null then n_kwpublic
.parent
= self
276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
278 if _n_kwpublic
== old_child
then
279 n_kwpublic
= new_child
.as(nullable TKwpublic)
284 redef fun n_kwpublic
=(node
)
287 if node
!= null then node
.parent
= self
291 redef fun visit_all
(v
: Visitor)
293 v
.enter_visit
(_n_kwpublic
)
296 redef class APrivateVisibility
297 init init_aprivatevisibility
(
298 n_kwprivate
: nullable TKwprivate
301 _n_kwprivate
= n_kwprivate
.as(not null)
302 n_kwprivate
.parent
= self
305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
307 if _n_kwprivate
== old_child
then
308 n_kwprivate
= new_child
.as(TKwprivate)
313 redef fun n_kwprivate
=(node
)
320 redef fun visit_all
(v
: Visitor)
322 v
.enter_visit
(_n_kwprivate
)
325 redef class AProtectedVisibility
326 init init_aprotectedvisibility
(
327 n_kwprotected
: nullable TKwprotected
330 _n_kwprotected
= n_kwprotected
.as(not null)
331 n_kwprotected
.parent
= self
334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
336 if _n_kwprotected
== old_child
then
337 n_kwprotected
= new_child
.as(TKwprotected)
342 redef fun n_kwprotected
=(node
)
344 _n_kwprotected
= node
349 redef fun visit_all
(v
: Visitor)
351 v
.enter_visit
(_n_kwprotected
)
354 redef class AIntrudeVisibility
355 init init_aintrudevisibility
(
356 n_kwintrude
: nullable TKwintrude
359 _n_kwintrude
= n_kwintrude
.as(not null)
360 n_kwintrude
.parent
= self
363 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
365 if _n_kwintrude
== old_child
then
366 n_kwintrude
= new_child
.as(TKwintrude)
371 redef fun n_kwintrude
=(node
)
378 redef fun visit_all
(v
: Visitor)
380 v
.enter_visit
(_n_kwintrude
)
383 redef class AStdClassdef
384 init init_astdclassdef
(
385 n_doc
: nullable ADoc,
386 n_kwredef
: nullable TKwredef,
387 n_visibility
: nullable AVisibility,
388 n_classkind
: nullable AClasskind,
389 n_id
: nullable TClassid,
390 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
391 n_annotations
: nullable AAnnotations,
392 n_extern_code_block
: nullable AExternCodeBlock,
393 n_superclasses
: Collection[Object], # Should be Collection[ASuperclass]
394 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
395 n_kwend
: nullable TKwend
399 if n_doc
!= null then n_doc
.parent
= self
400 _n_kwredef
= n_kwredef
401 if n_kwredef
!= null then n_kwredef
.parent
= self
402 _n_visibility
= n_visibility
.as(not null)
403 n_visibility
.parent
= self
404 _n_classkind
= n_classkind
.as(not null)
405 n_classkind
.parent
= self
407 if n_id
!= null then n_id
.parent
= self
408 self.n_formaldefs
.unsafe_add_all
(n_formaldefs
)
409 _n_annotations
= n_annotations
410 if n_annotations
!= null then n_annotations
.parent
= self
411 _n_extern_code_block
= n_extern_code_block
412 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
413 self.n_superclasses
.unsafe_add_all
(n_superclasses
)
414 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
415 _n_kwend
= n_kwend
.as(not null)
416 n_kwend
.parent
= self
419 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
421 if _n_doc
== old_child
then
422 n_doc
= new_child
.as(nullable ADoc)
425 if _n_kwredef
== old_child
then
426 n_kwredef
= new_child
.as(nullable TKwredef)
429 if _n_visibility
== old_child
then
430 n_visibility
= new_child
.as(AVisibility)
433 if _n_classkind
== old_child
then
434 n_classkind
= new_child
.as(AClasskind)
437 if _n_id
== old_child
then
438 n_id
= new_child
.as(nullable TClassid)
441 if n_formaldefs
.replace_child
(old_child
, new_child
) then return
442 if _n_annotations
== old_child
then
443 n_annotations
= new_child
.as(nullable AAnnotations)
446 if _n_extern_code_block
== old_child
then
447 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
450 if n_superclasses
.replace_child
(old_child
, new_child
) then return
451 if n_propdefs
.replace_child
(old_child
, new_child
) then return
452 if _n_kwend
== old_child
then
453 n_kwend
= new_child
.as(TKwend)
458 redef fun n_doc
=(node
)
461 if node
!= null then node
.parent
= self
463 redef fun n_kwredef
=(node
)
466 if node
!= null then node
.parent
= self
468 redef fun n_visibility
=(node
)
473 redef fun n_classkind
=(node
)
478 redef fun n_id
=(node
)
481 if node
!= null then node
.parent
= self
483 redef fun n_annotations
=(node
)
485 _n_annotations
= node
486 if node
!= null then node
.parent
= self
488 redef fun n_extern_code_block
=(node
)
490 _n_extern_code_block
= node
491 if node
!= null then node
.parent
= self
493 redef fun n_kwend
=(node
)
500 redef fun visit_all
(v
: Visitor)
502 v
.enter_visit
(_n_doc
)
503 v
.enter_visit
(_n_kwredef
)
504 v
.enter_visit
(_n_visibility
)
505 v
.enter_visit
(_n_classkind
)
507 n_formaldefs
.visit_all
(v
)
508 v
.enter_visit
(_n_annotations
)
509 v
.enter_visit
(_n_extern_code_block
)
510 n_superclasses
.visit_all
(v
)
511 n_propdefs
.visit_all
(v
)
512 v
.enter_visit
(_n_kwend
)
515 redef class ATopClassdef
516 init init_atopclassdef
(
517 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
520 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
525 if n_propdefs
.replace_child
(old_child
, new_child
) then return
530 redef fun visit_all
(v
: Visitor)
532 n_propdefs
.visit_all
(v
)
535 redef class AMainClassdef
536 init init_amainclassdef
(
537 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
540 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
543 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
545 if n_propdefs
.replace_child
(old_child
, new_child
) then return
550 redef fun visit_all
(v
: Visitor)
552 n_propdefs
.visit_all
(v
)
555 redef class AConcreteClasskind
556 init init_aconcreteclasskind
(
557 n_kwclass
: nullable TKwclass
560 _n_kwclass
= n_kwclass
.as(not null)
561 n_kwclass
.parent
= self
564 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
566 if _n_kwclass
== old_child
then
567 n_kwclass
= new_child
.as(TKwclass)
572 redef fun n_kwclass
=(node
)
579 redef fun visit_all
(v
: Visitor)
581 v
.enter_visit
(_n_kwclass
)
584 redef class AAbstractClasskind
585 init init_aabstractclasskind
(
586 n_kwabstract
: nullable TKwabstract,
587 n_kwclass
: nullable TKwclass
590 _n_kwabstract
= n_kwabstract
.as(not null)
591 n_kwabstract
.parent
= self
592 _n_kwclass
= n_kwclass
.as(not null)
593 n_kwclass
.parent
= self
596 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
598 if _n_kwabstract
== old_child
then
599 n_kwabstract
= new_child
.as(TKwabstract)
602 if _n_kwclass
== old_child
then
603 n_kwclass
= new_child
.as(TKwclass)
608 redef fun n_kwabstract
=(node
)
613 redef fun n_kwclass
=(node
)
620 redef fun visit_all
(v
: Visitor)
622 v
.enter_visit
(_n_kwabstract
)
623 v
.enter_visit
(_n_kwclass
)
626 redef class AInterfaceClasskind
627 init init_ainterfaceclasskind
(
628 n_kwinterface
: nullable TKwinterface
631 _n_kwinterface
= n_kwinterface
.as(not null)
632 n_kwinterface
.parent
= self
635 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
637 if _n_kwinterface
== old_child
then
638 n_kwinterface
= new_child
.as(TKwinterface)
643 redef fun n_kwinterface
=(node
)
645 _n_kwinterface
= node
650 redef fun visit_all
(v
: Visitor)
652 v
.enter_visit
(_n_kwinterface
)
655 redef class AEnumClasskind
656 init init_aenumclasskind
(
657 n_kwenum
: nullable TKwenum
660 _n_kwenum
= n_kwenum
.as(not null)
661 n_kwenum
.parent
= self
664 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
666 if _n_kwenum
== old_child
then
667 n_kwenum
= new_child
.as(TKwenum)
672 redef fun n_kwenum
=(node
)
679 redef fun visit_all
(v
: Visitor)
681 v
.enter_visit
(_n_kwenum
)
684 redef class AExternClasskind
685 init init_aexternclasskind
(
686 n_kwextern
: nullable TKwextern,
687 n_kwclass
: nullable TKwclass
690 _n_kwextern
= n_kwextern
.as(not null)
691 n_kwextern
.parent
= self
692 _n_kwclass
= n_kwclass
693 if n_kwclass
!= null then n_kwclass
.parent
= self
696 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
698 if _n_kwextern
== old_child
then
699 n_kwextern
= new_child
.as(TKwextern)
702 if _n_kwclass
== old_child
then
703 n_kwclass
= new_child
.as(nullable TKwclass)
708 redef fun n_kwextern
=(node
)
713 redef fun n_kwclass
=(node
)
716 if node
!= null then node
.parent
= self
720 redef fun visit_all
(v
: Visitor)
722 v
.enter_visit
(_n_kwextern
)
723 v
.enter_visit
(_n_kwclass
)
726 redef class AFormaldef
727 init init_aformaldef
(
728 n_id
: nullable TClassid,
729 n_type
: nullable AType,
730 n_annotations
: nullable AAnnotations
733 _n_id
= n_id
.as(not null)
736 if n_type
!= null then n_type
.parent
= self
737 _n_annotations
= n_annotations
738 if n_annotations
!= null then n_annotations
.parent
= self
741 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
743 if _n_id
== old_child
then
744 n_id
= new_child
.as(TClassid)
747 if _n_type
== old_child
then
748 n_type
= new_child
.as(nullable AType)
751 if _n_annotations
== old_child
then
752 n_annotations
= new_child
.as(nullable AAnnotations)
757 redef fun n_id
=(node
)
762 redef fun n_type
=(node
)
765 if node
!= null then node
.parent
= self
767 redef fun n_annotations
=(node
)
769 _n_annotations
= node
770 if node
!= null then node
.parent
= self
774 redef fun visit_all
(v
: Visitor)
777 v
.enter_visit
(_n_type
)
778 v
.enter_visit
(_n_annotations
)
781 redef class ASuperclass
782 init init_asuperclass
(
783 n_kwsuper
: nullable TKwsuper,
784 n_type
: nullable AType,
785 n_annotations
: nullable AAnnotations
788 _n_kwsuper
= n_kwsuper
.as(not null)
789 n_kwsuper
.parent
= self
790 _n_type
= n_type
.as(not null)
792 _n_annotations
= n_annotations
793 if n_annotations
!= null then n_annotations
.parent
= self
796 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
798 if _n_kwsuper
== old_child
then
799 n_kwsuper
= new_child
.as(TKwsuper)
802 if _n_type
== old_child
then
803 n_type
= new_child
.as(AType)
806 if _n_annotations
== old_child
then
807 n_annotations
= new_child
.as(nullable AAnnotations)
812 redef fun n_kwsuper
=(node
)
817 redef fun n_type
=(node
)
822 redef fun n_annotations
=(node
)
824 _n_annotations
= node
825 if node
!= null then node
.parent
= self
829 redef fun visit_all
(v
: Visitor)
831 v
.enter_visit
(_n_kwsuper
)
832 v
.enter_visit
(_n_type
)
833 v
.enter_visit
(_n_annotations
)
836 redef class AAttrPropdef
837 init init_aattrpropdef
(
838 n_doc
: nullable ADoc,
839 n_kwredef
: nullable TKwredef,
840 n_visibility
: nullable AVisibility,
841 n_kwvar
: nullable TKwvar,
843 n_type
: nullable AType,
844 n_expr
: nullable AExpr,
845 n_annotations
: nullable AAnnotations
849 if n_doc
!= null then n_doc
.parent
= self
850 _n_kwredef
= n_kwredef
851 if n_kwredef
!= null then n_kwredef
.parent
= self
852 _n_visibility
= n_visibility
.as(not null)
853 n_visibility
.parent
= self
854 _n_kwvar
= n_kwvar
.as(not null)
855 n_kwvar
.parent
= self
856 _n_id2
= n_id2
.as(not null)
859 if n_type
!= null then n_type
.parent
= self
861 if n_expr
!= null then n_expr
.parent
= self
862 _n_annotations
= n_annotations
863 if n_annotations
!= null then n_annotations
.parent
= self
866 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
868 if _n_doc
== old_child
then
869 n_doc
= new_child
.as(nullable ADoc)
872 if _n_kwredef
== old_child
then
873 n_kwredef
= new_child
.as(nullable TKwredef)
876 if _n_visibility
== old_child
then
877 n_visibility
= new_child
.as(AVisibility)
880 if _n_kwvar
== old_child
then
881 n_kwvar
= new_child
.as(TKwvar)
884 if _n_id2
== old_child
then
885 n_id2
= new_child
.as(TId)
888 if _n_type
== old_child
then
889 n_type
= new_child
.as(nullable AType)
892 if _n_expr
== old_child
then
893 n_expr
= new_child
.as(nullable AExpr)
896 if _n_annotations
== old_child
then
897 n_annotations
= new_child
.as(nullable AAnnotations)
902 redef fun n_doc
=(node
)
905 if node
!= null then node
.parent
= self
907 redef fun n_kwredef
=(node
)
910 if node
!= null then node
.parent
= self
912 redef fun n_visibility
=(node
)
917 redef fun n_kwvar
=(node
)
922 redef fun n_id2
=(node
)
927 redef fun n_type
=(node
)
930 if node
!= null then node
.parent
= self
932 redef fun n_expr
=(node
)
935 if node
!= null then node
.parent
= self
937 redef fun n_annotations
=(node
)
939 _n_annotations
= node
940 if node
!= null then node
.parent
= self
944 redef fun visit_all
(v
: Visitor)
946 v
.enter_visit
(_n_doc
)
947 v
.enter_visit
(_n_kwredef
)
948 v
.enter_visit
(_n_visibility
)
949 v
.enter_visit
(_n_kwvar
)
950 v
.enter_visit
(_n_id2
)
951 v
.enter_visit
(_n_type
)
952 v
.enter_visit
(_n_expr
)
953 v
.enter_visit
(_n_annotations
)
956 redef class AMainMethPropdef
957 init init_amainmethpropdef
(
958 n_kwredef
: nullable TKwredef,
959 n_block
: nullable AExpr
962 _n_kwredef
= n_kwredef
963 if n_kwredef
!= null then n_kwredef
.parent
= self
965 if n_block
!= null then n_block
.parent
= self
968 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
970 if _n_kwredef
== old_child
then
971 n_kwredef
= new_child
.as(nullable TKwredef)
974 if _n_block
== old_child
then
975 n_block
= new_child
.as(nullable AExpr)
980 redef fun n_kwredef
=(node
)
983 if node
!= null then node
.parent
= self
985 redef fun n_block
=(node
)
988 if node
!= null then node
.parent
= self
992 redef fun visit_all
(v
: Visitor)
994 v
.enter_visit
(_n_kwredef
)
995 v
.enter_visit
(_n_block
)
998 redef class ATypePropdef
999 init init_atypepropdef
(
1000 n_doc
: nullable ADoc,
1001 n_kwredef
: nullable TKwredef,
1002 n_visibility
: nullable AVisibility,
1003 n_kwtype
: nullable TKwtype,
1004 n_id
: nullable TClassid,
1005 n_type
: nullable AType,
1006 n_annotations
: nullable AAnnotations
1010 if n_doc
!= null then n_doc
.parent
= self
1011 _n_kwredef
= n_kwredef
1012 if n_kwredef
!= null then n_kwredef
.parent
= self
1013 _n_visibility
= n_visibility
.as(not null)
1014 n_visibility
.parent
= self
1015 _n_kwtype
= n_kwtype
.as(not null)
1016 n_kwtype
.parent
= self
1017 _n_id
= n_id
.as(not null)
1019 _n_type
= n_type
.as(not null)
1020 n_type
.parent
= self
1021 _n_annotations
= n_annotations
1022 if n_annotations
!= null then n_annotations
.parent
= self
1025 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1027 if _n_doc
== old_child
then
1028 n_doc
= new_child
.as(nullable ADoc)
1031 if _n_kwredef
== old_child
then
1032 n_kwredef
= new_child
.as(nullable TKwredef)
1035 if _n_visibility
== old_child
then
1036 n_visibility
= new_child
.as(AVisibility)
1039 if _n_kwtype
== old_child
then
1040 n_kwtype
= new_child
.as(TKwtype)
1043 if _n_id
== old_child
then
1044 n_id
= new_child
.as(TClassid)
1047 if _n_type
== old_child
then
1048 n_type
= new_child
.as(AType)
1051 if _n_annotations
== old_child
then
1052 n_annotations
= new_child
.as(nullable AAnnotations)
1057 redef fun n_doc
=(node
)
1060 if node
!= null then node
.parent
= self
1062 redef fun n_kwredef
=(node
)
1065 if node
!= null then node
.parent
= self
1067 redef fun n_visibility
=(node
)
1069 _n_visibility
= node
1072 redef fun n_kwtype
=(node
)
1077 redef fun n_id
=(node
)
1082 redef fun n_type
=(node
)
1087 redef fun n_annotations
=(node
)
1089 _n_annotations
= node
1090 if node
!= null then node
.parent
= self
1094 redef fun visit_all
(v
: Visitor)
1096 v
.enter_visit
(_n_doc
)
1097 v
.enter_visit
(_n_kwredef
)
1098 v
.enter_visit
(_n_visibility
)
1099 v
.enter_visit
(_n_kwtype
)
1100 v
.enter_visit
(_n_id
)
1101 v
.enter_visit
(_n_type
)
1102 v
.enter_visit
(_n_annotations
)
1105 redef class AMethPropdef
1106 init init_amethpropdef
(
1107 n_doc
: nullable ADoc,
1108 n_kwredef
: nullable TKwredef,
1109 n_visibility
: nullable AVisibility,
1110 n_kwmeth
: nullable TKwmeth,
1111 n_kwinit
: nullable TKwinit,
1112 n_kwnew
: nullable TKwnew,
1113 n_methid
: nullable AMethid,
1114 n_signature
: nullable ASignature,
1115 n_annotations
: nullable AAnnotations,
1116 n_extern_calls
: nullable AExternCalls,
1117 n_extern_code_block
: nullable AExternCodeBlock,
1118 n_block
: nullable AExpr
1122 if n_doc
!= null then n_doc
.parent
= self
1123 _n_kwredef
= n_kwredef
1124 if n_kwredef
!= null then n_kwredef
.parent
= self
1125 _n_visibility
= n_visibility
.as(not null)
1126 n_visibility
.parent
= self
1127 _n_kwmeth
= n_kwmeth
1128 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1129 _n_kwinit
= n_kwinit
1130 if n_kwinit
!= null then n_kwinit
.parent
= self
1132 if n_kwnew
!= null then n_kwnew
.parent
= self
1133 _n_methid
= n_methid
1134 if n_methid
!= null then n_methid
.parent
= self
1135 _n_signature
= n_signature
.as(not null)
1136 n_signature
.parent
= self
1137 _n_annotations
= n_annotations
1138 if n_annotations
!= null then n_annotations
.parent
= self
1139 _n_extern_calls
= n_extern_calls
1140 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1141 _n_extern_code_block
= n_extern_code_block
1142 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1144 if n_block
!= null then n_block
.parent
= self
1147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1149 if _n_doc
== old_child
then
1150 n_doc
= new_child
.as(nullable ADoc)
1153 if _n_kwredef
== old_child
then
1154 n_kwredef
= new_child
.as(nullable TKwredef)
1157 if _n_visibility
== old_child
then
1158 n_visibility
= new_child
.as(AVisibility)
1161 if _n_kwmeth
== old_child
then
1162 n_kwmeth
= new_child
.as(nullable TKwmeth)
1165 if _n_kwinit
== old_child
then
1166 n_kwinit
= new_child
.as(nullable TKwinit)
1169 if _n_kwnew
== old_child
then
1170 n_kwnew
= new_child
.as(nullable TKwnew)
1173 if _n_methid
== old_child
then
1174 n_methid
= new_child
.as(nullable AMethid)
1177 if _n_signature
== old_child
then
1178 n_signature
= new_child
.as(ASignature)
1181 if _n_annotations
== old_child
then
1182 n_annotations
= new_child
.as(nullable AAnnotations)
1185 if _n_extern_calls
== old_child
then
1186 n_extern_calls
= new_child
.as(nullable AExternCalls)
1189 if _n_extern_code_block
== old_child
then
1190 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1193 if _n_block
== old_child
then
1194 n_block
= new_child
.as(nullable AExpr)
1199 redef fun n_doc
=(node
)
1202 if node
!= null then node
.parent
= self
1204 redef fun n_kwredef
=(node
)
1207 if node
!= null then node
.parent
= self
1209 redef fun n_visibility
=(node
)
1211 _n_visibility
= node
1214 redef fun n_kwmeth
=(node
)
1217 if node
!= null then node
.parent
= self
1219 redef fun n_kwinit
=(node
)
1222 if node
!= null then node
.parent
= self
1224 redef fun n_kwnew
=(node
)
1227 if node
!= null then node
.parent
= self
1229 redef fun n_methid
=(node
)
1232 if node
!= null then node
.parent
= self
1234 redef fun n_signature
=(node
)
1239 redef fun n_annotations
=(node
)
1241 _n_annotations
= node
1242 if node
!= null then node
.parent
= self
1244 redef fun n_extern_calls
=(node
)
1246 _n_extern_calls
= node
1247 if node
!= null then node
.parent
= self
1249 redef fun n_extern_code_block
=(node
)
1251 _n_extern_code_block
= node
1252 if node
!= null then node
.parent
= self
1254 redef fun n_block
=(node
)
1257 if node
!= null then node
.parent
= self
1261 redef fun visit_all
(v
: Visitor)
1263 v
.enter_visit
(_n_doc
)
1264 v
.enter_visit
(_n_kwredef
)
1265 v
.enter_visit
(_n_visibility
)
1266 v
.enter_visit
(_n_kwmeth
)
1267 v
.enter_visit
(_n_kwinit
)
1268 v
.enter_visit
(_n_kwnew
)
1269 v
.enter_visit
(_n_methid
)
1270 v
.enter_visit
(_n_signature
)
1271 v
.enter_visit
(_n_annotations
)
1272 v
.enter_visit
(_n_extern_calls
)
1273 v
.enter_visit
(_n_extern_code_block
)
1274 v
.enter_visit
(_n_block
)
1277 redef class AIdMethid
1278 init init_aidmethid
(
1282 _n_id
= n_id
.as(not null)
1286 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1288 if _n_id
== old_child
then
1289 n_id
= new_child
.as(TId)
1294 redef fun n_id
=(node
)
1301 redef fun visit_all
(v
: Visitor)
1303 v
.enter_visit
(_n_id
)
1306 redef class APlusMethid
1307 init init_aplusmethid
(
1308 n_plus
: nullable TPlus
1311 _n_plus
= n_plus
.as(not null)
1312 n_plus
.parent
= self
1315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1317 if _n_plus
== old_child
then
1318 n_plus
= new_child
.as(TPlus)
1323 redef fun n_plus
=(node
)
1330 redef fun visit_all
(v
: Visitor)
1332 v
.enter_visit
(_n_plus
)
1335 redef class AMinusMethid
1336 init init_aminusmethid
(
1337 n_minus
: nullable TMinus
1340 _n_minus
= n_minus
.as(not null)
1341 n_minus
.parent
= self
1344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1346 if _n_minus
== old_child
then
1347 n_minus
= new_child
.as(TMinus)
1352 redef fun n_minus
=(node
)
1359 redef fun visit_all
(v
: Visitor)
1361 v
.enter_visit
(_n_minus
)
1364 redef class AStarMethid
1365 init init_astarmethid
(
1366 n_star
: nullable TStar
1369 _n_star
= n_star
.as(not null)
1370 n_star
.parent
= self
1373 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1375 if _n_star
== old_child
then
1376 n_star
= new_child
.as(TStar)
1381 redef fun n_star
=(node
)
1388 redef fun visit_all
(v
: Visitor)
1390 v
.enter_visit
(_n_star
)
1393 redef class AStarstarMethid
1394 init init_astarstarmethid
(
1395 n_starstar
: nullable TStarstar
1398 _n_starstar
= n_starstar
.as(not null)
1399 n_starstar
.parent
= self
1402 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1404 if _n_starstar
== old_child
then
1405 n_starstar
= new_child
.as(TStarstar)
1410 redef fun n_starstar
=(node
)
1417 redef fun visit_all
(v
: Visitor)
1419 v
.enter_visit
(_n_starstar
)
1422 redef class ASlashMethid
1423 init init_aslashmethid
(
1424 n_slash
: nullable TSlash
1427 _n_slash
= n_slash
.as(not null)
1428 n_slash
.parent
= self
1431 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1433 if _n_slash
== old_child
then
1434 n_slash
= new_child
.as(TSlash)
1439 redef fun n_slash
=(node
)
1446 redef fun visit_all
(v
: Visitor)
1448 v
.enter_visit
(_n_slash
)
1451 redef class APercentMethid
1452 init init_apercentmethid
(
1453 n_percent
: nullable TPercent
1456 _n_percent
= n_percent
.as(not null)
1457 n_percent
.parent
= self
1460 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1462 if _n_percent
== old_child
then
1463 n_percent
= new_child
.as(TPercent)
1468 redef fun n_percent
=(node
)
1475 redef fun visit_all
(v
: Visitor)
1477 v
.enter_visit
(_n_percent
)
1480 redef class AEqMethid
1481 init init_aeqmethid
(
1485 _n_eq
= n_eq
.as(not null)
1489 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1491 if _n_eq
== old_child
then
1492 n_eq
= new_child
.as(TEq)
1497 redef fun n_eq
=(node
)
1504 redef fun visit_all
(v
: Visitor)
1506 v
.enter_visit
(_n_eq
)
1509 redef class ANeMethid
1510 init init_anemethid
(
1514 _n_ne
= n_ne
.as(not null)
1518 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1520 if _n_ne
== old_child
then
1521 n_ne
= new_child
.as(TNe)
1526 redef fun n_ne
=(node
)
1533 redef fun visit_all
(v
: Visitor)
1535 v
.enter_visit
(_n_ne
)
1538 redef class ALeMethid
1539 init init_alemethid
(
1543 _n_le
= n_le
.as(not null)
1547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1549 if _n_le
== old_child
then
1550 n_le
= new_child
.as(TLe)
1555 redef fun n_le
=(node
)
1562 redef fun visit_all
(v
: Visitor)
1564 v
.enter_visit
(_n_le
)
1567 redef class AGeMethid
1568 init init_agemethid
(
1572 _n_ge
= n_ge
.as(not null)
1576 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1578 if _n_ge
== old_child
then
1579 n_ge
= new_child
.as(TGe)
1584 redef fun n_ge
=(node
)
1591 redef fun visit_all
(v
: Visitor)
1593 v
.enter_visit
(_n_ge
)
1596 redef class ALtMethid
1597 init init_altmethid
(
1601 _n_lt
= n_lt
.as(not null)
1605 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1607 if _n_lt
== old_child
then
1608 n_lt
= new_child
.as(TLt)
1613 redef fun n_lt
=(node
)
1620 redef fun visit_all
(v
: Visitor)
1622 v
.enter_visit
(_n_lt
)
1625 redef class AGtMethid
1626 init init_agtmethid
(
1630 _n_gt
= n_gt
.as(not null)
1634 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1636 if _n_gt
== old_child
then
1637 n_gt
= new_child
.as(TGt)
1642 redef fun n_gt
=(node
)
1649 redef fun visit_all
(v
: Visitor)
1651 v
.enter_visit
(_n_gt
)
1654 redef class ALlMethid
1655 init init_allmethid
(
1659 _n_ll
= n_ll
.as(not null)
1663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1665 if _n_ll
== old_child
then
1666 n_ll
= new_child
.as(TLl)
1671 redef fun n_ll
=(node
)
1678 redef fun visit_all
(v
: Visitor)
1680 v
.enter_visit
(_n_ll
)
1683 redef class AGgMethid
1684 init init_aggmethid
(
1688 _n_gg
= n_gg
.as(not null)
1692 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1694 if _n_gg
== old_child
then
1695 n_gg
= new_child
.as(TGg)
1700 redef fun n_gg
=(node
)
1707 redef fun visit_all
(v
: Visitor)
1709 v
.enter_visit
(_n_gg
)
1712 redef class ABraMethid
1713 init init_abramethid
(
1714 n_obra
: nullable TObra,
1715 n_cbra
: nullable TCbra
1718 _n_obra
= n_obra
.as(not null)
1719 n_obra
.parent
= self
1720 _n_cbra
= n_cbra
.as(not null)
1721 n_cbra
.parent
= self
1724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1726 if _n_obra
== old_child
then
1727 n_obra
= new_child
.as(TObra)
1730 if _n_cbra
== old_child
then
1731 n_cbra
= new_child
.as(TCbra)
1736 redef fun n_obra
=(node
)
1741 redef fun n_cbra
=(node
)
1748 redef fun visit_all
(v
: Visitor)
1750 v
.enter_visit
(_n_obra
)
1751 v
.enter_visit
(_n_cbra
)
1754 redef class AStarshipMethid
1755 init init_astarshipmethid
(
1756 n_starship
: nullable TStarship
1759 _n_starship
= n_starship
.as(not null)
1760 n_starship
.parent
= self
1763 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1765 if _n_starship
== old_child
then
1766 n_starship
= new_child
.as(TStarship)
1771 redef fun n_starship
=(node
)
1778 redef fun visit_all
(v
: Visitor)
1780 v
.enter_visit
(_n_starship
)
1783 redef class AAssignMethid
1784 init init_aassignmethid
(
1786 n_assign
: nullable TAssign
1789 _n_id
= n_id
.as(not null)
1791 _n_assign
= n_assign
.as(not null)
1792 n_assign
.parent
= self
1795 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1797 if _n_id
== old_child
then
1798 n_id
= new_child
.as(TId)
1801 if _n_assign
== old_child
then
1802 n_assign
= new_child
.as(TAssign)
1807 redef fun n_id
=(node
)
1812 redef fun n_assign
=(node
)
1819 redef fun visit_all
(v
: Visitor)
1821 v
.enter_visit
(_n_id
)
1822 v
.enter_visit
(_n_assign
)
1825 redef class ABraassignMethid
1826 init init_abraassignmethid
(
1827 n_obra
: nullable TObra,
1828 n_cbra
: nullable TCbra,
1829 n_assign
: nullable TAssign
1832 _n_obra
= n_obra
.as(not null)
1833 n_obra
.parent
= self
1834 _n_cbra
= n_cbra
.as(not null)
1835 n_cbra
.parent
= self
1836 _n_assign
= n_assign
.as(not null)
1837 n_assign
.parent
= self
1840 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1842 if _n_obra
== old_child
then
1843 n_obra
= new_child
.as(TObra)
1846 if _n_cbra
== old_child
then
1847 n_cbra
= new_child
.as(TCbra)
1850 if _n_assign
== old_child
then
1851 n_assign
= new_child
.as(TAssign)
1856 redef fun n_obra
=(node
)
1861 redef fun n_cbra
=(node
)
1866 redef fun n_assign
=(node
)
1873 redef fun visit_all
(v
: Visitor)
1875 v
.enter_visit
(_n_obra
)
1876 v
.enter_visit
(_n_cbra
)
1877 v
.enter_visit
(_n_assign
)
1880 redef class ASignature
1881 init init_asignature
(
1882 n_opar
: nullable TOpar,
1883 n_params
: Collection[Object], # Should be Collection[AParam]
1884 n_cpar
: nullable TCpar,
1885 n_type
: nullable AType
1889 if n_opar
!= null then n_opar
.parent
= self
1890 self.n_params
.unsafe_add_all
(n_params
)
1892 if n_cpar
!= null then n_cpar
.parent
= self
1894 if n_type
!= null then n_type
.parent
= self
1897 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1899 if _n_opar
== old_child
then
1900 n_opar
= new_child
.as(nullable TOpar)
1903 if n_params
.replace_child
(old_child
, new_child
) then return
1904 if _n_cpar
== old_child
then
1905 n_cpar
= new_child
.as(nullable TCpar)
1908 if _n_type
== old_child
then
1909 n_type
= new_child
.as(nullable AType)
1914 redef fun n_opar
=(node
)
1917 if node
!= null then node
.parent
= self
1919 redef fun n_cpar
=(node
)
1922 if node
!= null then node
.parent
= self
1924 redef fun n_type
=(node
)
1927 if node
!= null then node
.parent
= self
1931 redef fun visit_all
(v
: Visitor)
1933 v
.enter_visit
(_n_opar
)
1934 n_params
.visit_all
(v
)
1935 v
.enter_visit
(_n_cpar
)
1936 v
.enter_visit
(_n_type
)
1942 n_type
: nullable AType,
1943 n_dotdotdot
: nullable TDotdotdot,
1944 n_annotations
: nullable AAnnotations
1947 _n_id
= n_id
.as(not null)
1950 if n_type
!= null then n_type
.parent
= self
1951 _n_dotdotdot
= n_dotdotdot
1952 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
1953 _n_annotations
= n_annotations
1954 if n_annotations
!= null then n_annotations
.parent
= self
1957 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1959 if _n_id
== old_child
then
1960 n_id
= new_child
.as(TId)
1963 if _n_type
== old_child
then
1964 n_type
= new_child
.as(nullable AType)
1967 if _n_dotdotdot
== old_child
then
1968 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
1971 if _n_annotations
== old_child
then
1972 n_annotations
= new_child
.as(nullable AAnnotations)
1977 redef fun n_id
=(node
)
1982 redef fun n_type
=(node
)
1985 if node
!= null then node
.parent
= self
1987 redef fun n_dotdotdot
=(node
)
1990 if node
!= null then node
.parent
= self
1992 redef fun n_annotations
=(node
)
1994 _n_annotations
= node
1995 if node
!= null then node
.parent
= self
1999 redef fun visit_all
(v
: Visitor)
2001 v
.enter_visit
(_n_id
)
2002 v
.enter_visit
(_n_type
)
2003 v
.enter_visit
(_n_dotdotdot
)
2004 v
.enter_visit
(_n_annotations
)
2009 n_kwnullable
: nullable TKwnullable,
2010 n_id
: nullable TClassid,
2011 n_types
: Collection[Object], # Should be Collection[AType]
2012 n_annotations
: nullable AAnnotations
2015 _n_kwnullable
= n_kwnullable
2016 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2017 _n_id
= n_id
.as(not null)
2019 self.n_types
.unsafe_add_all
(n_types
)
2020 _n_annotations
= n_annotations
2021 if n_annotations
!= null then n_annotations
.parent
= self
2024 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2026 if _n_kwnullable
== old_child
then
2027 n_kwnullable
= new_child
.as(nullable TKwnullable)
2030 if _n_id
== old_child
then
2031 n_id
= new_child
.as(TClassid)
2034 if n_types
.replace_child
(old_child
, new_child
) then return
2035 if _n_annotations
== old_child
then
2036 n_annotations
= new_child
.as(nullable AAnnotations)
2041 redef fun n_kwnullable
=(node
)
2043 _n_kwnullable
= node
2044 if node
!= null then node
.parent
= self
2046 redef fun n_id
=(node
)
2051 redef fun n_annotations
=(node
)
2053 _n_annotations
= node
2054 if node
!= null then node
.parent
= self
2058 redef fun visit_all
(v
: Visitor)
2060 v
.enter_visit
(_n_kwnullable
)
2061 v
.enter_visit
(_n_id
)
2062 n_types
.visit_all
(v
)
2063 v
.enter_visit
(_n_annotations
)
2068 n_kwlabel
: nullable TKwlabel,
2072 _n_kwlabel
= n_kwlabel
.as(not null)
2073 n_kwlabel
.parent
= self
2075 if n_id
!= null then n_id
.parent
= self
2078 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2080 if _n_kwlabel
== old_child
then
2081 n_kwlabel
= new_child
.as(TKwlabel)
2084 if _n_id
== old_child
then
2085 n_id
= new_child
.as(nullable TId)
2090 redef fun n_kwlabel
=(node
)
2095 redef fun n_id
=(node
)
2098 if node
!= null then node
.parent
= self
2102 redef fun visit_all
(v
: Visitor)
2104 v
.enter_visit
(_n_kwlabel
)
2105 v
.enter_visit
(_n_id
)
2108 redef class ABlockExpr
2109 init init_ablockexpr
(
2110 n_expr
: Collection[Object], # Should be Collection[AExpr]
2111 n_kwend
: nullable TKwend
2114 self.n_expr
.unsafe_add_all
(n_expr
)
2116 if n_kwend
!= null then n_kwend
.parent
= self
2119 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2121 if n_expr
.replace_child
(old_child
, new_child
) then return
2122 if _n_kwend
== old_child
then
2123 n_kwend
= new_child
.as(nullable TKwend)
2128 redef fun n_kwend
=(node
)
2131 if node
!= null then node
.parent
= self
2135 redef fun visit_all
(v
: Visitor)
2138 v
.enter_visit
(_n_kwend
)
2141 redef class AVardeclExpr
2142 init init_avardeclexpr
(
2143 n_kwvar
: nullable TKwvar,
2145 n_type
: nullable AType,
2146 n_assign
: nullable TAssign,
2147 n_expr
: nullable AExpr,
2148 n_annotations
: nullable AAnnotations
2151 _n_kwvar
= n_kwvar
.as(not null)
2152 n_kwvar
.parent
= self
2153 _n_id
= n_id
.as(not null)
2156 if n_type
!= null then n_type
.parent
= self
2157 _n_assign
= n_assign
2158 if n_assign
!= null then n_assign
.parent
= self
2160 if n_expr
!= null then n_expr
.parent
= self
2161 _n_annotations
= n_annotations
2162 if n_annotations
!= null then n_annotations
.parent
= self
2165 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2167 if _n_kwvar
== old_child
then
2168 n_kwvar
= new_child
.as(TKwvar)
2171 if _n_id
== old_child
then
2172 n_id
= new_child
.as(TId)
2175 if _n_type
== old_child
then
2176 n_type
= new_child
.as(nullable AType)
2179 if _n_assign
== old_child
then
2180 n_assign
= new_child
.as(nullable TAssign)
2183 if _n_expr
== old_child
then
2184 n_expr
= new_child
.as(nullable AExpr)
2187 if _n_annotations
== old_child
then
2188 n_annotations
= new_child
.as(nullable AAnnotations)
2193 redef fun n_kwvar
=(node
)
2198 redef fun n_id
=(node
)
2203 redef fun n_type
=(node
)
2206 if node
!= null then node
.parent
= self
2208 redef fun n_assign
=(node
)
2211 if node
!= null then node
.parent
= self
2213 redef fun n_expr
=(node
)
2216 if node
!= null then node
.parent
= self
2218 redef fun n_annotations
=(node
)
2220 _n_annotations
= node
2221 if node
!= null then node
.parent
= self
2225 redef fun visit_all
(v
: Visitor)
2227 v
.enter_visit
(_n_kwvar
)
2228 v
.enter_visit
(_n_id
)
2229 v
.enter_visit
(_n_type
)
2230 v
.enter_visit
(_n_assign
)
2231 v
.enter_visit
(_n_expr
)
2232 v
.enter_visit
(_n_annotations
)
2235 redef class AReturnExpr
2236 init init_areturnexpr
(
2237 n_kwreturn
: nullable TKwreturn,
2238 n_expr
: nullable AExpr
2241 _n_kwreturn
= n_kwreturn
2242 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2244 if n_expr
!= null then n_expr
.parent
= self
2247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2249 if _n_kwreturn
== old_child
then
2250 n_kwreturn
= new_child
.as(nullable TKwreturn)
2253 if _n_expr
== old_child
then
2254 n_expr
= new_child
.as(nullable AExpr)
2259 redef fun n_kwreturn
=(node
)
2262 if node
!= null then node
.parent
= self
2264 redef fun n_expr
=(node
)
2267 if node
!= null then node
.parent
= self
2271 redef fun visit_all
(v
: Visitor)
2273 v
.enter_visit
(_n_kwreturn
)
2274 v
.enter_visit
(_n_expr
)
2277 redef class ABreakExpr
2278 init init_abreakexpr
(
2279 n_kwbreak
: nullable TKwbreak,
2280 n_label
: nullable ALabel
2283 _n_kwbreak
= n_kwbreak
.as(not null)
2284 n_kwbreak
.parent
= self
2286 if n_label
!= null then n_label
.parent
= self
2289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2291 if _n_kwbreak
== old_child
then
2292 n_kwbreak
= new_child
.as(TKwbreak)
2295 if _n_label
== old_child
then
2296 n_label
= new_child
.as(nullable ALabel)
2301 redef fun n_kwbreak
=(node
)
2306 redef fun n_label
=(node
)
2309 if node
!= null then node
.parent
= self
2313 redef fun visit_all
(v
: Visitor)
2315 v
.enter_visit
(_n_kwbreak
)
2316 v
.enter_visit
(_n_label
)
2319 redef class AAbortExpr
2320 init init_aabortexpr
(
2321 n_kwabort
: nullable TKwabort
2324 _n_kwabort
= n_kwabort
.as(not null)
2325 n_kwabort
.parent
= self
2328 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2330 if _n_kwabort
== old_child
then
2331 n_kwabort
= new_child
.as(TKwabort)
2336 redef fun n_kwabort
=(node
)
2343 redef fun visit_all
(v
: Visitor)
2345 v
.enter_visit
(_n_kwabort
)
2348 redef class AContinueExpr
2349 init init_acontinueexpr
(
2350 n_kwcontinue
: nullable TKwcontinue,
2351 n_label
: nullable ALabel
2354 _n_kwcontinue
= n_kwcontinue
2355 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2357 if n_label
!= null then n_label
.parent
= self
2360 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2362 if _n_kwcontinue
== old_child
then
2363 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2366 if _n_label
== old_child
then
2367 n_label
= new_child
.as(nullable ALabel)
2372 redef fun n_kwcontinue
=(node
)
2374 _n_kwcontinue
= node
2375 if node
!= null then node
.parent
= self
2377 redef fun n_label
=(node
)
2380 if node
!= null then node
.parent
= self
2384 redef fun visit_all
(v
: Visitor)
2386 v
.enter_visit
(_n_kwcontinue
)
2387 v
.enter_visit
(_n_label
)
2392 n_kwdo
: nullable TKwdo,
2393 n_block
: nullable AExpr,
2394 n_label
: nullable ALabel
2397 _n_kwdo
= n_kwdo
.as(not null)
2398 n_kwdo
.parent
= self
2400 if n_block
!= null then n_block
.parent
= self
2402 if n_label
!= null then n_label
.parent
= self
2405 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2407 if _n_kwdo
== old_child
then
2408 n_kwdo
= new_child
.as(TKwdo)
2411 if _n_block
== old_child
then
2412 n_block
= new_child
.as(nullable AExpr)
2415 if _n_label
== old_child
then
2416 n_label
= new_child
.as(nullable ALabel)
2421 redef fun n_kwdo
=(node
)
2426 redef fun n_block
=(node
)
2429 if node
!= null then node
.parent
= self
2431 redef fun n_label
=(node
)
2434 if node
!= null then node
.parent
= self
2438 redef fun visit_all
(v
: Visitor)
2440 v
.enter_visit
(_n_kwdo
)
2441 v
.enter_visit
(_n_block
)
2442 v
.enter_visit
(_n_label
)
2447 n_kwif
: nullable TKwif,
2448 n_expr
: nullable AExpr,
2449 n_then
: nullable AExpr,
2450 n_else
: nullable AExpr
2453 _n_kwif
= n_kwif
.as(not null)
2454 n_kwif
.parent
= self
2455 _n_expr
= n_expr
.as(not null)
2456 n_expr
.parent
= self
2458 if n_then
!= null then n_then
.parent
= self
2460 if n_else
!= null then n_else
.parent
= self
2463 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2465 if _n_kwif
== old_child
then
2466 n_kwif
= new_child
.as(TKwif)
2469 if _n_expr
== old_child
then
2470 n_expr
= new_child
.as(AExpr)
2473 if _n_then
== old_child
then
2474 n_then
= new_child
.as(nullable AExpr)
2477 if _n_else
== old_child
then
2478 n_else
= new_child
.as(nullable AExpr)
2483 redef fun n_kwif
=(node
)
2488 redef fun n_expr
=(node
)
2493 redef fun n_then
=(node
)
2496 if node
!= null then node
.parent
= self
2498 redef fun n_else
=(node
)
2501 if node
!= null then node
.parent
= self
2505 redef fun visit_all
(v
: Visitor)
2507 v
.enter_visit
(_n_kwif
)
2508 v
.enter_visit
(_n_expr
)
2509 v
.enter_visit
(_n_then
)
2510 v
.enter_visit
(_n_else
)
2513 redef class AIfexprExpr
2514 init init_aifexprexpr
(
2515 n_kwif
: nullable TKwif,
2516 n_expr
: nullable AExpr,
2517 n_kwthen
: nullable TKwthen,
2518 n_then
: nullable AExpr,
2519 n_kwelse
: nullable TKwelse,
2520 n_else
: nullable AExpr
2523 _n_kwif
= n_kwif
.as(not null)
2524 n_kwif
.parent
= self
2525 _n_expr
= n_expr
.as(not null)
2526 n_expr
.parent
= self
2527 _n_kwthen
= n_kwthen
.as(not null)
2528 n_kwthen
.parent
= self
2529 _n_then
= n_then
.as(not null)
2530 n_then
.parent
= self
2531 _n_kwelse
= n_kwelse
.as(not null)
2532 n_kwelse
.parent
= self
2533 _n_else
= n_else
.as(not null)
2534 n_else
.parent
= self
2537 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2539 if _n_kwif
== old_child
then
2540 n_kwif
= new_child
.as(TKwif)
2543 if _n_expr
== old_child
then
2544 n_expr
= new_child
.as(AExpr)
2547 if _n_kwthen
== old_child
then
2548 n_kwthen
= new_child
.as(TKwthen)
2551 if _n_then
== old_child
then
2552 n_then
= new_child
.as(AExpr)
2555 if _n_kwelse
== old_child
then
2556 n_kwelse
= new_child
.as(TKwelse)
2559 if _n_else
== old_child
then
2560 n_else
= new_child
.as(AExpr)
2565 redef fun n_kwif
=(node
)
2570 redef fun n_expr
=(node
)
2575 redef fun n_kwthen
=(node
)
2580 redef fun n_then
=(node
)
2585 redef fun n_kwelse
=(node
)
2590 redef fun n_else
=(node
)
2597 redef fun visit_all
(v
: Visitor)
2599 v
.enter_visit
(_n_kwif
)
2600 v
.enter_visit
(_n_expr
)
2601 v
.enter_visit
(_n_kwthen
)
2602 v
.enter_visit
(_n_then
)
2603 v
.enter_visit
(_n_kwelse
)
2604 v
.enter_visit
(_n_else
)
2607 redef class AWhileExpr
2608 init init_awhileexpr
(
2609 n_kwwhile
: nullable TKwwhile,
2610 n_expr
: nullable AExpr,
2611 n_kwdo
: nullable TKwdo,
2612 n_block
: nullable AExpr,
2613 n_label
: nullable ALabel
2616 _n_kwwhile
= n_kwwhile
.as(not null)
2617 n_kwwhile
.parent
= self
2618 _n_expr
= n_expr
.as(not null)
2619 n_expr
.parent
= self
2620 _n_kwdo
= n_kwdo
.as(not null)
2621 n_kwdo
.parent
= self
2623 if n_block
!= null then n_block
.parent
= self
2625 if n_label
!= null then n_label
.parent
= self
2628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2630 if _n_kwwhile
== old_child
then
2631 n_kwwhile
= new_child
.as(TKwwhile)
2634 if _n_expr
== old_child
then
2635 n_expr
= new_child
.as(AExpr)
2638 if _n_kwdo
== old_child
then
2639 n_kwdo
= new_child
.as(TKwdo)
2642 if _n_block
== old_child
then
2643 n_block
= new_child
.as(nullable AExpr)
2646 if _n_label
== old_child
then
2647 n_label
= new_child
.as(nullable ALabel)
2652 redef fun n_kwwhile
=(node
)
2657 redef fun n_expr
=(node
)
2662 redef fun n_kwdo
=(node
)
2667 redef fun n_block
=(node
)
2670 if node
!= null then node
.parent
= self
2672 redef fun n_label
=(node
)
2675 if node
!= null then node
.parent
= self
2679 redef fun visit_all
(v
: Visitor)
2681 v
.enter_visit
(_n_kwwhile
)
2682 v
.enter_visit
(_n_expr
)
2683 v
.enter_visit
(_n_kwdo
)
2684 v
.enter_visit
(_n_block
)
2685 v
.enter_visit
(_n_label
)
2688 redef class ALoopExpr
2689 init init_aloopexpr
(
2690 n_kwloop
: nullable TKwloop,
2691 n_block
: nullable AExpr,
2692 n_label
: nullable ALabel
2695 _n_kwloop
= n_kwloop
.as(not null)
2696 n_kwloop
.parent
= self
2698 if n_block
!= null then n_block
.parent
= self
2700 if n_label
!= null then n_label
.parent
= self
2703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2705 if _n_kwloop
== old_child
then
2706 n_kwloop
= new_child
.as(TKwloop)
2709 if _n_block
== old_child
then
2710 n_block
= new_child
.as(nullable AExpr)
2713 if _n_label
== old_child
then
2714 n_label
= new_child
.as(nullable ALabel)
2719 redef fun n_kwloop
=(node
)
2724 redef fun n_block
=(node
)
2727 if node
!= null then node
.parent
= self
2729 redef fun n_label
=(node
)
2732 if node
!= null then node
.parent
= self
2736 redef fun visit_all
(v
: Visitor)
2738 v
.enter_visit
(_n_kwloop
)
2739 v
.enter_visit
(_n_block
)
2740 v
.enter_visit
(_n_label
)
2743 redef class AForExpr
2744 init init_aforexpr
(
2745 n_kwfor
: nullable TKwfor,
2746 n_ids
: Collection[Object], # Should be Collection[TId]
2747 n_expr
: nullable AExpr,
2748 n_kwdo
: nullable TKwdo,
2749 n_block
: nullable AExpr,
2750 n_label
: nullable ALabel
2753 _n_kwfor
= n_kwfor
.as(not null)
2754 n_kwfor
.parent
= self
2755 self.n_ids
.unsafe_add_all
(n_ids
)
2756 _n_expr
= n_expr
.as(not null)
2757 n_expr
.parent
= self
2758 _n_kwdo
= n_kwdo
.as(not null)
2759 n_kwdo
.parent
= self
2761 if n_block
!= null then n_block
.parent
= self
2763 if n_label
!= null then n_label
.parent
= self
2766 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2768 if _n_kwfor
== old_child
then
2769 n_kwfor
= new_child
.as(TKwfor)
2772 if n_ids
.replace_child
(old_child
, new_child
) then return
2773 if _n_expr
== old_child
then
2774 n_expr
= new_child
.as(AExpr)
2777 if _n_kwdo
== old_child
then
2778 n_kwdo
= new_child
.as(TKwdo)
2781 if _n_block
== old_child
then
2782 n_block
= new_child
.as(nullable AExpr)
2785 if _n_label
== old_child
then
2786 n_label
= new_child
.as(nullable ALabel)
2791 redef fun n_kwfor
=(node
)
2796 redef fun n_expr
=(node
)
2801 redef fun n_kwdo
=(node
)
2806 redef fun n_block
=(node
)
2809 if node
!= null then node
.parent
= self
2811 redef fun n_label
=(node
)
2814 if node
!= null then node
.parent
= self
2818 redef fun visit_all
(v
: Visitor)
2820 v
.enter_visit
(_n_kwfor
)
2822 v
.enter_visit
(_n_expr
)
2823 v
.enter_visit
(_n_kwdo
)
2824 v
.enter_visit
(_n_block
)
2825 v
.enter_visit
(_n_label
)
2828 redef class AAssertExpr
2829 init init_aassertexpr
(
2830 n_kwassert
: nullable TKwassert,
2832 n_expr
: nullable AExpr,
2833 n_else
: nullable AExpr
2836 _n_kwassert
= n_kwassert
.as(not null)
2837 n_kwassert
.parent
= self
2839 if n_id
!= null then n_id
.parent
= self
2840 _n_expr
= n_expr
.as(not null)
2841 n_expr
.parent
= self
2843 if n_else
!= null then n_else
.parent
= self
2846 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2848 if _n_kwassert
== old_child
then
2849 n_kwassert
= new_child
.as(TKwassert)
2852 if _n_id
== old_child
then
2853 n_id
= new_child
.as(nullable TId)
2856 if _n_expr
== old_child
then
2857 n_expr
= new_child
.as(AExpr)
2860 if _n_else
== old_child
then
2861 n_else
= new_child
.as(nullable AExpr)
2866 redef fun n_kwassert
=(node
)
2871 redef fun n_id
=(node
)
2874 if node
!= null then node
.parent
= self
2876 redef fun n_expr
=(node
)
2881 redef fun n_else
=(node
)
2884 if node
!= null then node
.parent
= self
2888 redef fun visit_all
(v
: Visitor)
2890 v
.enter_visit
(_n_kwassert
)
2891 v
.enter_visit
(_n_id
)
2892 v
.enter_visit
(_n_expr
)
2893 v
.enter_visit
(_n_else
)
2896 redef class AOnceExpr
2897 init init_aonceexpr
(
2898 n_kwonce
: nullable TKwonce,
2899 n_expr
: nullable AExpr
2902 _n_kwonce
= n_kwonce
.as(not null)
2903 n_kwonce
.parent
= self
2904 _n_expr
= n_expr
.as(not null)
2905 n_expr
.parent
= self
2908 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2910 if _n_kwonce
== old_child
then
2911 n_kwonce
= new_child
.as(TKwonce)
2914 if _n_expr
== old_child
then
2915 n_expr
= new_child
.as(AExpr)
2920 redef fun n_kwonce
=(node
)
2925 redef fun n_expr
=(node
)
2932 redef fun visit_all
(v
: Visitor)
2934 v
.enter_visit
(_n_kwonce
)
2935 v
.enter_visit
(_n_expr
)
2938 redef class ASendExpr
2939 init init_asendexpr
(
2940 n_expr
: nullable AExpr
2943 _n_expr
= n_expr
.as(not null)
2944 n_expr
.parent
= self
2947 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2949 if _n_expr
== old_child
then
2950 n_expr
= new_child
.as(AExpr)
2955 redef fun n_expr
=(node
)
2962 redef fun visit_all
(v
: Visitor)
2964 v
.enter_visit
(_n_expr
)
2967 redef class ABinopExpr
2968 init init_abinopexpr
(
2969 n_expr
: nullable AExpr,
2970 n_expr2
: nullable AExpr
2973 _n_expr
= n_expr
.as(not null)
2974 n_expr
.parent
= self
2975 _n_expr2
= n_expr2
.as(not null)
2976 n_expr2
.parent
= self
2979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2981 if _n_expr
== old_child
then
2982 n_expr
= new_child
.as(AExpr)
2985 if _n_expr2
== old_child
then
2986 n_expr2
= new_child
.as(AExpr)
2991 redef fun n_expr
=(node
)
2996 redef fun n_expr2
=(node
)
3003 redef fun visit_all
(v
: Visitor)
3005 v
.enter_visit
(_n_expr
)
3006 v
.enter_visit
(_n_expr2
)
3011 n_expr
: nullable AExpr,
3012 n_expr2
: nullable AExpr
3015 _n_expr
= n_expr
.as(not null)
3016 n_expr
.parent
= self
3017 _n_expr2
= n_expr2
.as(not null)
3018 n_expr2
.parent
= self
3021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3023 if _n_expr
== old_child
then
3024 n_expr
= new_child
.as(AExpr)
3027 if _n_expr2
== old_child
then
3028 n_expr2
= new_child
.as(AExpr)
3033 redef fun n_expr
=(node
)
3038 redef fun n_expr2
=(node
)
3045 redef fun visit_all
(v
: Visitor)
3047 v
.enter_visit
(_n_expr
)
3048 v
.enter_visit
(_n_expr2
)
3051 redef class AAndExpr
3052 init init_aandexpr
(
3053 n_expr
: nullable AExpr,
3054 n_expr2
: nullable AExpr
3057 _n_expr
= n_expr
.as(not null)
3058 n_expr
.parent
= self
3059 _n_expr2
= n_expr2
.as(not null)
3060 n_expr2
.parent
= self
3063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3065 if _n_expr
== old_child
then
3066 n_expr
= new_child
.as(AExpr)
3069 if _n_expr2
== old_child
then
3070 n_expr2
= new_child
.as(AExpr)
3075 redef fun n_expr
=(node
)
3080 redef fun n_expr2
=(node
)
3087 redef fun visit_all
(v
: Visitor)
3089 v
.enter_visit
(_n_expr
)
3090 v
.enter_visit
(_n_expr2
)
3093 redef class AOrElseExpr
3094 init init_aorelseexpr
(
3095 n_expr
: nullable AExpr,
3096 n_expr2
: nullable AExpr
3099 _n_expr
= n_expr
.as(not null)
3100 n_expr
.parent
= self
3101 _n_expr2
= n_expr2
.as(not null)
3102 n_expr2
.parent
= self
3105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3107 if _n_expr
== old_child
then
3108 n_expr
= new_child
.as(AExpr)
3111 if _n_expr2
== old_child
then
3112 n_expr2
= new_child
.as(AExpr)
3117 redef fun n_expr
=(node
)
3122 redef fun n_expr2
=(node
)
3129 redef fun visit_all
(v
: Visitor)
3131 v
.enter_visit
(_n_expr
)
3132 v
.enter_visit
(_n_expr2
)
3135 redef class AImpliesExpr
3136 init init_aimpliesexpr
(
3137 n_expr
: nullable AExpr,
3138 n_expr2
: nullable AExpr
3141 _n_expr
= n_expr
.as(not null)
3142 n_expr
.parent
= self
3143 _n_expr2
= n_expr2
.as(not null)
3144 n_expr2
.parent
= self
3147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3149 if _n_expr
== old_child
then
3150 n_expr
= new_child
.as(AExpr)
3153 if _n_expr2
== old_child
then
3154 n_expr2
= new_child
.as(AExpr)
3159 redef fun n_expr
=(node
)
3164 redef fun n_expr2
=(node
)
3171 redef fun visit_all
(v
: Visitor)
3173 v
.enter_visit
(_n_expr
)
3174 v
.enter_visit
(_n_expr2
)
3177 redef class ANotExpr
3178 init init_anotexpr
(
3179 n_kwnot
: nullable TKwnot,
3180 n_expr
: nullable AExpr
3183 _n_kwnot
= n_kwnot
.as(not null)
3184 n_kwnot
.parent
= self
3185 _n_expr
= n_expr
.as(not null)
3186 n_expr
.parent
= self
3189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3191 if _n_kwnot
== old_child
then
3192 n_kwnot
= new_child
.as(TKwnot)
3195 if _n_expr
== old_child
then
3196 n_expr
= new_child
.as(AExpr)
3201 redef fun n_kwnot
=(node
)
3206 redef fun n_expr
=(node
)
3213 redef fun visit_all
(v
: Visitor)
3215 v
.enter_visit
(_n_kwnot
)
3216 v
.enter_visit
(_n_expr
)
3221 n_expr
: nullable AExpr,
3222 n_expr2
: nullable AExpr
3225 _n_expr
= n_expr
.as(not null)
3226 n_expr
.parent
= self
3227 _n_expr2
= n_expr2
.as(not null)
3228 n_expr2
.parent
= self
3231 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3233 if _n_expr
== old_child
then
3234 n_expr
= new_child
.as(AExpr)
3237 if _n_expr2
== old_child
then
3238 n_expr2
= new_child
.as(AExpr)
3243 redef fun n_expr
=(node
)
3248 redef fun n_expr2
=(node
)
3255 redef fun visit_all
(v
: Visitor)
3257 v
.enter_visit
(_n_expr
)
3258 v
.enter_visit
(_n_expr2
)
3263 n_expr
: nullable AExpr,
3264 n_expr2
: nullable AExpr
3267 _n_expr
= n_expr
.as(not null)
3268 n_expr
.parent
= self
3269 _n_expr2
= n_expr2
.as(not null)
3270 n_expr2
.parent
= self
3273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3275 if _n_expr
== old_child
then
3276 n_expr
= new_child
.as(AExpr)
3279 if _n_expr2
== old_child
then
3280 n_expr2
= new_child
.as(AExpr)
3285 redef fun n_expr
=(node
)
3290 redef fun n_expr2
=(node
)
3297 redef fun visit_all
(v
: Visitor)
3299 v
.enter_visit
(_n_expr
)
3300 v
.enter_visit
(_n_expr2
)
3305 n_expr
: nullable AExpr,
3306 n_expr2
: nullable AExpr
3309 _n_expr
= n_expr
.as(not null)
3310 n_expr
.parent
= self
3311 _n_expr2
= n_expr2
.as(not null)
3312 n_expr2
.parent
= self
3315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3317 if _n_expr
== old_child
then
3318 n_expr
= new_child
.as(AExpr)
3321 if _n_expr2
== old_child
then
3322 n_expr2
= new_child
.as(AExpr)
3327 redef fun n_expr
=(node
)
3332 redef fun n_expr2
=(node
)
3339 redef fun visit_all
(v
: Visitor)
3341 v
.enter_visit
(_n_expr
)
3342 v
.enter_visit
(_n_expr2
)
3347 n_expr
: nullable AExpr,
3348 n_expr2
: nullable AExpr
3351 _n_expr
= n_expr
.as(not null)
3352 n_expr
.parent
= self
3353 _n_expr2
= n_expr2
.as(not null)
3354 n_expr2
.parent
= self
3357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3359 if _n_expr
== old_child
then
3360 n_expr
= new_child
.as(AExpr)
3363 if _n_expr2
== old_child
then
3364 n_expr2
= new_child
.as(AExpr)
3369 redef fun n_expr
=(node
)
3374 redef fun n_expr2
=(node
)
3381 redef fun visit_all
(v
: Visitor)
3383 v
.enter_visit
(_n_expr
)
3384 v
.enter_visit
(_n_expr2
)
3389 n_expr
: nullable AExpr,
3390 n_expr2
: nullable AExpr
3393 _n_expr
= n_expr
.as(not null)
3394 n_expr
.parent
= self
3395 _n_expr2
= n_expr2
.as(not null)
3396 n_expr2
.parent
= self
3399 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3401 if _n_expr
== old_child
then
3402 n_expr
= new_child
.as(AExpr)
3405 if _n_expr2
== old_child
then
3406 n_expr2
= new_child
.as(AExpr)
3411 redef fun n_expr
=(node
)
3416 redef fun n_expr2
=(node
)
3423 redef fun visit_all
(v
: Visitor)
3425 v
.enter_visit
(_n_expr
)
3426 v
.enter_visit
(_n_expr2
)
3431 n_expr
: nullable AExpr,
3432 n_expr2
: nullable AExpr
3435 _n_expr
= n_expr
.as(not null)
3436 n_expr
.parent
= self
3437 _n_expr2
= n_expr2
.as(not null)
3438 n_expr2
.parent
= self
3441 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3443 if _n_expr
== old_child
then
3444 n_expr
= new_child
.as(AExpr)
3447 if _n_expr2
== old_child
then
3448 n_expr2
= new_child
.as(AExpr)
3453 redef fun n_expr
=(node
)
3458 redef fun n_expr2
=(node
)
3465 redef fun visit_all
(v
: Visitor)
3467 v
.enter_visit
(_n_expr
)
3468 v
.enter_visit
(_n_expr2
)
3473 n_expr
: nullable AExpr,
3474 n_expr2
: nullable AExpr
3477 _n_expr
= n_expr
.as(not null)
3478 n_expr
.parent
= self
3479 _n_expr2
= n_expr2
.as(not null)
3480 n_expr2
.parent
= self
3483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3485 if _n_expr
== old_child
then
3486 n_expr
= new_child
.as(AExpr)
3489 if _n_expr2
== old_child
then
3490 n_expr2
= new_child
.as(AExpr)
3495 redef fun n_expr
=(node
)
3500 redef fun n_expr2
=(node
)
3507 redef fun visit_all
(v
: Visitor)
3509 v
.enter_visit
(_n_expr
)
3510 v
.enter_visit
(_n_expr2
)
3515 n_expr
: nullable AExpr,
3516 n_expr2
: nullable AExpr
3519 _n_expr
= n_expr
.as(not null)
3520 n_expr
.parent
= self
3521 _n_expr2
= n_expr2
.as(not null)
3522 n_expr2
.parent
= self
3525 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3527 if _n_expr
== old_child
then
3528 n_expr
= new_child
.as(AExpr)
3531 if _n_expr2
== old_child
then
3532 n_expr2
= new_child
.as(AExpr)
3537 redef fun n_expr
=(node
)
3542 redef fun n_expr2
=(node
)
3549 redef fun visit_all
(v
: Visitor)
3551 v
.enter_visit
(_n_expr
)
3552 v
.enter_visit
(_n_expr2
)
3555 redef class AIsaExpr
3556 init init_aisaexpr
(
3557 n_expr
: nullable AExpr,
3558 n_type
: nullable AType
3561 _n_expr
= n_expr
.as(not null)
3562 n_expr
.parent
= self
3563 _n_type
= n_type
.as(not null)
3564 n_type
.parent
= self
3567 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3569 if _n_expr
== old_child
then
3570 n_expr
= new_child
.as(AExpr)
3573 if _n_type
== old_child
then
3574 n_type
= new_child
.as(AType)
3579 redef fun n_expr
=(node
)
3584 redef fun n_type
=(node
)
3591 redef fun visit_all
(v
: Visitor)
3593 v
.enter_visit
(_n_expr
)
3594 v
.enter_visit
(_n_type
)
3597 redef class APlusExpr
3598 init init_aplusexpr
(
3599 n_expr
: nullable AExpr,
3600 n_expr2
: nullable AExpr
3603 _n_expr
= n_expr
.as(not null)
3604 n_expr
.parent
= self
3605 _n_expr2
= n_expr2
.as(not null)
3606 n_expr2
.parent
= self
3609 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3611 if _n_expr
== old_child
then
3612 n_expr
= new_child
.as(AExpr)
3615 if _n_expr2
== old_child
then
3616 n_expr2
= new_child
.as(AExpr)
3621 redef fun n_expr
=(node
)
3626 redef fun n_expr2
=(node
)
3633 redef fun visit_all
(v
: Visitor)
3635 v
.enter_visit
(_n_expr
)
3636 v
.enter_visit
(_n_expr2
)
3639 redef class AMinusExpr
3640 init init_aminusexpr
(
3641 n_expr
: nullable AExpr,
3642 n_expr2
: nullable AExpr
3645 _n_expr
= n_expr
.as(not null)
3646 n_expr
.parent
= self
3647 _n_expr2
= n_expr2
.as(not null)
3648 n_expr2
.parent
= self
3651 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3653 if _n_expr
== old_child
then
3654 n_expr
= new_child
.as(AExpr)
3657 if _n_expr2
== old_child
then
3658 n_expr2
= new_child
.as(AExpr)
3663 redef fun n_expr
=(node
)
3668 redef fun n_expr2
=(node
)
3675 redef fun visit_all
(v
: Visitor)
3677 v
.enter_visit
(_n_expr
)
3678 v
.enter_visit
(_n_expr2
)
3681 redef class AStarshipExpr
3682 init init_astarshipexpr
(
3683 n_expr
: nullable AExpr,
3684 n_expr2
: nullable AExpr
3687 _n_expr
= n_expr
.as(not null)
3688 n_expr
.parent
= self
3689 _n_expr2
= n_expr2
.as(not null)
3690 n_expr2
.parent
= self
3693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3695 if _n_expr
== old_child
then
3696 n_expr
= new_child
.as(AExpr)
3699 if _n_expr2
== old_child
then
3700 n_expr2
= new_child
.as(AExpr)
3705 redef fun n_expr
=(node
)
3710 redef fun n_expr2
=(node
)
3717 redef fun visit_all
(v
: Visitor)
3719 v
.enter_visit
(_n_expr
)
3720 v
.enter_visit
(_n_expr2
)
3723 redef class AStarExpr
3724 init init_astarexpr
(
3725 n_expr
: nullable AExpr,
3726 n_expr2
: nullable AExpr
3729 _n_expr
= n_expr
.as(not null)
3730 n_expr
.parent
= self
3731 _n_expr2
= n_expr2
.as(not null)
3732 n_expr2
.parent
= self
3735 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3737 if _n_expr
== old_child
then
3738 n_expr
= new_child
.as(AExpr)
3741 if _n_expr2
== old_child
then
3742 n_expr2
= new_child
.as(AExpr)
3747 redef fun n_expr
=(node
)
3752 redef fun n_expr2
=(node
)
3759 redef fun visit_all
(v
: Visitor)
3761 v
.enter_visit
(_n_expr
)
3762 v
.enter_visit
(_n_expr2
)
3765 redef class AStarstarExpr
3766 init init_astarstarexpr
(
3767 n_expr
: nullable AExpr,
3768 n_expr2
: nullable AExpr
3771 _n_expr
= n_expr
.as(not null)
3772 n_expr
.parent
= self
3773 _n_expr2
= n_expr2
.as(not null)
3774 n_expr2
.parent
= self
3777 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3779 if _n_expr
== old_child
then
3780 n_expr
= new_child
.as(AExpr)
3783 if _n_expr2
== old_child
then
3784 n_expr2
= new_child
.as(AExpr)
3789 redef fun n_expr
=(node
)
3794 redef fun n_expr2
=(node
)
3801 redef fun visit_all
(v
: Visitor)
3803 v
.enter_visit
(_n_expr
)
3804 v
.enter_visit
(_n_expr2
)
3807 redef class ASlashExpr
3808 init init_aslashexpr
(
3809 n_expr
: nullable AExpr,
3810 n_expr2
: nullable AExpr
3813 _n_expr
= n_expr
.as(not null)
3814 n_expr
.parent
= self
3815 _n_expr2
= n_expr2
.as(not null)
3816 n_expr2
.parent
= self
3819 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3821 if _n_expr
== old_child
then
3822 n_expr
= new_child
.as(AExpr)
3825 if _n_expr2
== old_child
then
3826 n_expr2
= new_child
.as(AExpr)
3831 redef fun n_expr
=(node
)
3836 redef fun n_expr2
=(node
)
3843 redef fun visit_all
(v
: Visitor)
3845 v
.enter_visit
(_n_expr
)
3846 v
.enter_visit
(_n_expr2
)
3849 redef class APercentExpr
3850 init init_apercentexpr
(
3851 n_expr
: nullable AExpr,
3852 n_expr2
: nullable AExpr
3855 _n_expr
= n_expr
.as(not null)
3856 n_expr
.parent
= self
3857 _n_expr2
= n_expr2
.as(not null)
3858 n_expr2
.parent
= self
3861 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3863 if _n_expr
== old_child
then
3864 n_expr
= new_child
.as(AExpr)
3867 if _n_expr2
== old_child
then
3868 n_expr2
= new_child
.as(AExpr)
3873 redef fun n_expr
=(node
)
3878 redef fun n_expr2
=(node
)
3885 redef fun visit_all
(v
: Visitor)
3887 v
.enter_visit
(_n_expr
)
3888 v
.enter_visit
(_n_expr2
)
3891 redef class AUminusExpr
3892 init init_auminusexpr
(
3893 n_minus
: nullable TMinus,
3894 n_expr
: nullable AExpr
3897 _n_minus
= n_minus
.as(not null)
3898 n_minus
.parent
= self
3899 _n_expr
= n_expr
.as(not null)
3900 n_expr
.parent
= self
3903 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3905 if _n_minus
== old_child
then
3906 n_minus
= new_child
.as(TMinus)
3909 if _n_expr
== old_child
then
3910 n_expr
= new_child
.as(AExpr)
3915 redef fun n_minus
=(node
)
3920 redef fun n_expr
=(node
)
3927 redef fun visit_all
(v
: Visitor)
3929 v
.enter_visit
(_n_minus
)
3930 v
.enter_visit
(_n_expr
)
3933 redef class ANewExpr
3934 init init_anewexpr
(
3935 n_kwnew
: nullable TKwnew,
3936 n_type
: nullable AType,
3938 n_args
: nullable AExprs
3941 _n_kwnew
= n_kwnew
.as(not null)
3942 n_kwnew
.parent
= self
3943 _n_type
= n_type
.as(not null)
3944 n_type
.parent
= self
3946 if n_id
!= null then n_id
.parent
= self
3947 _n_args
= n_args
.as(not null)
3948 n_args
.parent
= self
3951 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3953 if _n_kwnew
== old_child
then
3954 n_kwnew
= new_child
.as(TKwnew)
3957 if _n_type
== old_child
then
3958 n_type
= new_child
.as(AType)
3961 if _n_id
== old_child
then
3962 n_id
= new_child
.as(nullable TId)
3965 if _n_args
== old_child
then
3966 n_args
= new_child
.as(AExprs)
3971 redef fun n_kwnew
=(node
)
3976 redef fun n_type
=(node
)
3981 redef fun n_id
=(node
)
3984 if node
!= null then node
.parent
= self
3986 redef fun n_args
=(node
)
3993 redef fun visit_all
(v
: Visitor)
3995 v
.enter_visit
(_n_kwnew
)
3996 v
.enter_visit
(_n_type
)
3997 v
.enter_visit
(_n_id
)
3998 v
.enter_visit
(_n_args
)
4001 redef class AAttrExpr
4002 init init_aattrexpr
(
4003 n_expr
: nullable AExpr,
4004 n_id
: nullable TAttrid
4007 _n_expr
= n_expr
.as(not null)
4008 n_expr
.parent
= self
4009 _n_id
= n_id
.as(not null)
4013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4015 if _n_expr
== old_child
then
4016 n_expr
= new_child
.as(AExpr)
4019 if _n_id
== old_child
then
4020 n_id
= new_child
.as(TAttrid)
4025 redef fun n_expr
=(node
)
4030 redef fun n_id
=(node
)
4037 redef fun visit_all
(v
: Visitor)
4039 v
.enter_visit
(_n_expr
)
4040 v
.enter_visit
(_n_id
)
4043 redef class AAttrAssignExpr
4044 init init_aattrassignexpr
(
4045 n_expr
: nullable AExpr,
4046 n_id
: nullable TAttrid,
4047 n_assign
: nullable TAssign,
4048 n_value
: nullable AExpr
4051 _n_expr
= n_expr
.as(not null)
4052 n_expr
.parent
= self
4053 _n_id
= n_id
.as(not null)
4055 _n_assign
= n_assign
.as(not null)
4056 n_assign
.parent
= self
4057 _n_value
= n_value
.as(not null)
4058 n_value
.parent
= self
4061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4063 if _n_expr
== old_child
then
4064 n_expr
= new_child
.as(AExpr)
4067 if _n_id
== old_child
then
4068 n_id
= new_child
.as(TAttrid)
4071 if _n_assign
== old_child
then
4072 n_assign
= new_child
.as(TAssign)
4075 if _n_value
== old_child
then
4076 n_value
= new_child
.as(AExpr)
4081 redef fun n_expr
=(node
)
4086 redef fun n_id
=(node
)
4091 redef fun n_assign
=(node
)
4096 redef fun n_value
=(node
)
4103 redef fun visit_all
(v
: Visitor)
4105 v
.enter_visit
(_n_expr
)
4106 v
.enter_visit
(_n_id
)
4107 v
.enter_visit
(_n_assign
)
4108 v
.enter_visit
(_n_value
)
4111 redef class AAttrReassignExpr
4112 init init_aattrreassignexpr
(
4113 n_expr
: nullable AExpr,
4114 n_id
: nullable TAttrid,
4115 n_assign_op
: nullable AAssignOp,
4116 n_value
: nullable AExpr
4119 _n_expr
= n_expr
.as(not null)
4120 n_expr
.parent
= self
4121 _n_id
= n_id
.as(not null)
4123 _n_assign_op
= n_assign_op
.as(not null)
4124 n_assign_op
.parent
= self
4125 _n_value
= n_value
.as(not null)
4126 n_value
.parent
= self
4129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4131 if _n_expr
== old_child
then
4132 n_expr
= new_child
.as(AExpr)
4135 if _n_id
== old_child
then
4136 n_id
= new_child
.as(TAttrid)
4139 if _n_assign_op
== old_child
then
4140 n_assign_op
= new_child
.as(AAssignOp)
4143 if _n_value
== old_child
then
4144 n_value
= new_child
.as(AExpr)
4149 redef fun n_expr
=(node
)
4154 redef fun n_id
=(node
)
4159 redef fun n_assign_op
=(node
)
4164 redef fun n_value
=(node
)
4171 redef fun visit_all
(v
: Visitor)
4173 v
.enter_visit
(_n_expr
)
4174 v
.enter_visit
(_n_id
)
4175 v
.enter_visit
(_n_assign_op
)
4176 v
.enter_visit
(_n_value
)
4179 redef class ACallExpr
4180 init init_acallexpr
(
4181 n_expr
: nullable AExpr,
4183 n_args
: nullable AExprs
4186 _n_expr
= n_expr
.as(not null)
4187 n_expr
.parent
= self
4188 _n_id
= n_id
.as(not null)
4190 _n_args
= n_args
.as(not null)
4191 n_args
.parent
= self
4194 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4196 if _n_expr
== old_child
then
4197 n_expr
= new_child
.as(AExpr)
4200 if _n_id
== old_child
then
4201 n_id
= new_child
.as(TId)
4204 if _n_args
== old_child
then
4205 n_args
= new_child
.as(AExprs)
4210 redef fun n_expr
=(node
)
4215 redef fun n_id
=(node
)
4220 redef fun n_args
=(node
)
4227 redef fun visit_all
(v
: Visitor)
4229 v
.enter_visit
(_n_expr
)
4230 v
.enter_visit
(_n_id
)
4231 v
.enter_visit
(_n_args
)
4234 redef class ACallAssignExpr
4235 init init_acallassignexpr
(
4236 n_expr
: nullable AExpr,
4238 n_args
: nullable AExprs,
4239 n_assign
: nullable TAssign,
4240 n_value
: nullable AExpr
4243 _n_expr
= n_expr
.as(not null)
4244 n_expr
.parent
= self
4245 _n_id
= n_id
.as(not null)
4247 _n_args
= n_args
.as(not null)
4248 n_args
.parent
= self
4249 _n_assign
= n_assign
.as(not null)
4250 n_assign
.parent
= self
4251 _n_value
= n_value
.as(not null)
4252 n_value
.parent
= self
4255 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4257 if _n_expr
== old_child
then
4258 n_expr
= new_child
.as(AExpr)
4261 if _n_id
== old_child
then
4262 n_id
= new_child
.as(TId)
4265 if _n_args
== old_child
then
4266 n_args
= new_child
.as(AExprs)
4269 if _n_assign
== old_child
then
4270 n_assign
= new_child
.as(TAssign)
4273 if _n_value
== old_child
then
4274 n_value
= new_child
.as(AExpr)
4279 redef fun n_expr
=(node
)
4284 redef fun n_id
=(node
)
4289 redef fun n_args
=(node
)
4294 redef fun n_assign
=(node
)
4299 redef fun n_value
=(node
)
4306 redef fun visit_all
(v
: Visitor)
4308 v
.enter_visit
(_n_expr
)
4309 v
.enter_visit
(_n_id
)
4310 v
.enter_visit
(_n_args
)
4311 v
.enter_visit
(_n_assign
)
4312 v
.enter_visit
(_n_value
)
4315 redef class ACallReassignExpr
4316 init init_acallreassignexpr
(
4317 n_expr
: nullable AExpr,
4319 n_args
: nullable AExprs,
4320 n_assign_op
: nullable AAssignOp,
4321 n_value
: nullable AExpr
4324 _n_expr
= n_expr
.as(not null)
4325 n_expr
.parent
= self
4326 _n_id
= n_id
.as(not null)
4328 _n_args
= n_args
.as(not null)
4329 n_args
.parent
= self
4330 _n_assign_op
= n_assign_op
.as(not null)
4331 n_assign_op
.parent
= self
4332 _n_value
= n_value
.as(not null)
4333 n_value
.parent
= self
4336 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4338 if _n_expr
== old_child
then
4339 n_expr
= new_child
.as(AExpr)
4342 if _n_id
== old_child
then
4343 n_id
= new_child
.as(TId)
4346 if _n_args
== old_child
then
4347 n_args
= new_child
.as(AExprs)
4350 if _n_assign_op
== old_child
then
4351 n_assign_op
= new_child
.as(AAssignOp)
4354 if _n_value
== old_child
then
4355 n_value
= new_child
.as(AExpr)
4360 redef fun n_expr
=(node
)
4365 redef fun n_id
=(node
)
4370 redef fun n_args
=(node
)
4375 redef fun n_assign_op
=(node
)
4380 redef fun n_value
=(node
)
4387 redef fun visit_all
(v
: Visitor)
4389 v
.enter_visit
(_n_expr
)
4390 v
.enter_visit
(_n_id
)
4391 v
.enter_visit
(_n_args
)
4392 v
.enter_visit
(_n_assign_op
)
4393 v
.enter_visit
(_n_value
)
4396 redef class ASuperExpr
4397 init init_asuperexpr
(
4398 n_qualified
: nullable AQualified,
4399 n_kwsuper
: nullable TKwsuper,
4400 n_args
: nullable AExprs
4403 _n_qualified
= n_qualified
4404 if n_qualified
!= null then n_qualified
.parent
= self
4405 _n_kwsuper
= n_kwsuper
.as(not null)
4406 n_kwsuper
.parent
= self
4407 _n_args
= n_args
.as(not null)
4408 n_args
.parent
= self
4411 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4413 if _n_qualified
== old_child
then
4414 n_qualified
= new_child
.as(nullable AQualified)
4417 if _n_kwsuper
== old_child
then
4418 n_kwsuper
= new_child
.as(TKwsuper)
4421 if _n_args
== old_child
then
4422 n_args
= new_child
.as(AExprs)
4427 redef fun n_qualified
=(node
)
4430 if node
!= null then node
.parent
= self
4432 redef fun n_kwsuper
=(node
)
4437 redef fun n_args
=(node
)
4444 redef fun visit_all
(v
: Visitor)
4446 v
.enter_visit
(_n_qualified
)
4447 v
.enter_visit
(_n_kwsuper
)
4448 v
.enter_visit
(_n_args
)
4451 redef class AInitExpr
4452 init init_ainitexpr
(
4453 n_expr
: nullable AExpr,
4454 n_kwinit
: nullable TKwinit,
4455 n_args
: nullable AExprs
4458 _n_expr
= n_expr
.as(not null)
4459 n_expr
.parent
= self
4460 _n_kwinit
= n_kwinit
.as(not null)
4461 n_kwinit
.parent
= self
4462 _n_args
= n_args
.as(not null)
4463 n_args
.parent
= self
4466 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4468 if _n_expr
== old_child
then
4469 n_expr
= new_child
.as(AExpr)
4472 if _n_kwinit
== old_child
then
4473 n_kwinit
= new_child
.as(TKwinit)
4476 if _n_args
== old_child
then
4477 n_args
= new_child
.as(AExprs)
4482 redef fun n_expr
=(node
)
4487 redef fun n_kwinit
=(node
)
4492 redef fun n_args
=(node
)
4499 redef fun visit_all
(v
: Visitor)
4501 v
.enter_visit
(_n_expr
)
4502 v
.enter_visit
(_n_kwinit
)
4503 v
.enter_visit
(_n_args
)
4506 redef class ABraExpr
4507 init init_abraexpr
(
4508 n_expr
: nullable AExpr,
4509 n_args
: nullable AExprs
4512 _n_expr
= n_expr
.as(not null)
4513 n_expr
.parent
= self
4514 _n_args
= n_args
.as(not null)
4515 n_args
.parent
= self
4518 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4520 if _n_expr
== old_child
then
4521 n_expr
= new_child
.as(AExpr)
4524 if _n_args
== old_child
then
4525 n_args
= new_child
.as(AExprs)
4530 redef fun n_expr
=(node
)
4535 redef fun n_args
=(node
)
4542 redef fun visit_all
(v
: Visitor)
4544 v
.enter_visit
(_n_expr
)
4545 v
.enter_visit
(_n_args
)
4548 redef class ABraAssignExpr
4549 init init_abraassignexpr
(
4550 n_expr
: nullable AExpr,
4551 n_args
: nullable AExprs,
4552 n_assign
: nullable TAssign,
4553 n_value
: nullable AExpr
4556 _n_expr
= n_expr
.as(not null)
4557 n_expr
.parent
= self
4558 _n_args
= n_args
.as(not null)
4559 n_args
.parent
= self
4560 _n_assign
= n_assign
.as(not null)
4561 n_assign
.parent
= self
4562 _n_value
= n_value
.as(not null)
4563 n_value
.parent
= self
4566 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4568 if _n_expr
== old_child
then
4569 n_expr
= new_child
.as(AExpr)
4572 if _n_args
== old_child
then
4573 n_args
= new_child
.as(AExprs)
4576 if _n_assign
== old_child
then
4577 n_assign
= new_child
.as(TAssign)
4580 if _n_value
== old_child
then
4581 n_value
= new_child
.as(AExpr)
4586 redef fun n_expr
=(node
)
4591 redef fun n_args
=(node
)
4596 redef fun n_assign
=(node
)
4601 redef fun n_value
=(node
)
4608 redef fun visit_all
(v
: Visitor)
4610 v
.enter_visit
(_n_expr
)
4611 v
.enter_visit
(_n_args
)
4612 v
.enter_visit
(_n_assign
)
4613 v
.enter_visit
(_n_value
)
4616 redef class ABraReassignExpr
4617 init init_abrareassignexpr
(
4618 n_expr
: nullable AExpr,
4619 n_args
: nullable AExprs,
4620 n_assign_op
: nullable AAssignOp,
4621 n_value
: nullable AExpr
4624 _n_expr
= n_expr
.as(not null)
4625 n_expr
.parent
= self
4626 _n_args
= n_args
.as(not null)
4627 n_args
.parent
= self
4628 _n_assign_op
= n_assign_op
.as(not null)
4629 n_assign_op
.parent
= self
4630 _n_value
= n_value
.as(not null)
4631 n_value
.parent
= self
4634 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4636 if _n_expr
== old_child
then
4637 n_expr
= new_child
.as(AExpr)
4640 if _n_args
== old_child
then
4641 n_args
= new_child
.as(AExprs)
4644 if _n_assign_op
== old_child
then
4645 n_assign_op
= new_child
.as(AAssignOp)
4648 if _n_value
== old_child
then
4649 n_value
= new_child
.as(AExpr)
4654 redef fun n_expr
=(node
)
4659 redef fun n_args
=(node
)
4664 redef fun n_assign_op
=(node
)
4669 redef fun n_value
=(node
)
4676 redef fun visit_all
(v
: Visitor)
4678 v
.enter_visit
(_n_expr
)
4679 v
.enter_visit
(_n_args
)
4680 v
.enter_visit
(_n_assign_op
)
4681 v
.enter_visit
(_n_value
)
4684 redef class AVarExpr
4685 init init_avarexpr
(
4689 _n_id
= n_id
.as(not null)
4693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4695 if _n_id
== old_child
then
4696 n_id
= new_child
.as(TId)
4701 redef fun n_id
=(node
)
4708 redef fun visit_all
(v
: Visitor)
4710 v
.enter_visit
(_n_id
)
4713 redef class AVarAssignExpr
4714 init init_avarassignexpr
(
4716 n_assign
: nullable TAssign,
4717 n_value
: nullable AExpr
4720 _n_id
= n_id
.as(not null)
4722 _n_assign
= n_assign
.as(not null)
4723 n_assign
.parent
= self
4724 _n_value
= n_value
.as(not null)
4725 n_value
.parent
= self
4728 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4730 if _n_id
== old_child
then
4731 n_id
= new_child
.as(TId)
4734 if _n_assign
== old_child
then
4735 n_assign
= new_child
.as(TAssign)
4738 if _n_value
== old_child
then
4739 n_value
= new_child
.as(AExpr)
4744 redef fun n_id
=(node
)
4749 redef fun n_assign
=(node
)
4754 redef fun n_value
=(node
)
4761 redef fun visit_all
(v
: Visitor)
4763 v
.enter_visit
(_n_id
)
4764 v
.enter_visit
(_n_assign
)
4765 v
.enter_visit
(_n_value
)
4768 redef class AVarReassignExpr
4769 init init_avarreassignexpr
(
4771 n_assign_op
: nullable AAssignOp,
4772 n_value
: nullable AExpr
4775 _n_id
= n_id
.as(not null)
4777 _n_assign_op
= n_assign_op
.as(not null)
4778 n_assign_op
.parent
= self
4779 _n_value
= n_value
.as(not null)
4780 n_value
.parent
= self
4783 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4785 if _n_id
== old_child
then
4786 n_id
= new_child
.as(TId)
4789 if _n_assign_op
== old_child
then
4790 n_assign_op
= new_child
.as(AAssignOp)
4793 if _n_value
== old_child
then
4794 n_value
= new_child
.as(AExpr)
4799 redef fun n_id
=(node
)
4804 redef fun n_assign_op
=(node
)
4809 redef fun n_value
=(node
)
4816 redef fun visit_all
(v
: Visitor)
4818 v
.enter_visit
(_n_id
)
4819 v
.enter_visit
(_n_assign_op
)
4820 v
.enter_visit
(_n_value
)
4823 redef class ARangeExpr
4824 init init_arangeexpr
(
4825 n_expr
: nullable AExpr,
4826 n_expr2
: nullable AExpr,
4827 n_annotations
: nullable AAnnotations
4830 _n_expr
= n_expr
.as(not null)
4831 n_expr
.parent
= self
4832 _n_expr2
= n_expr2
.as(not null)
4833 n_expr2
.parent
= self
4834 _n_annotations
= n_annotations
4835 if n_annotations
!= null then n_annotations
.parent
= self
4838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4840 if _n_expr
== old_child
then
4841 n_expr
= new_child
.as(AExpr)
4844 if _n_expr2
== old_child
then
4845 n_expr2
= new_child
.as(AExpr)
4848 if _n_annotations
== old_child
then
4849 n_annotations
= new_child
.as(nullable AAnnotations)
4854 redef fun n_expr
=(node
)
4859 redef fun n_expr2
=(node
)
4864 redef fun n_annotations
=(node
)
4866 _n_annotations
= node
4867 if node
!= null then node
.parent
= self
4871 redef fun visit_all
(v
: Visitor)
4873 v
.enter_visit
(_n_expr
)
4874 v
.enter_visit
(_n_expr2
)
4875 v
.enter_visit
(_n_annotations
)
4878 redef class ACrangeExpr
4879 init init_acrangeexpr
(
4880 n_obra
: nullable TObra,
4881 n_expr
: nullable AExpr,
4882 n_expr2
: nullable AExpr,
4883 n_cbra
: nullable TCbra,
4884 n_annotations
: nullable AAnnotations
4887 _n_obra
= n_obra
.as(not null)
4888 n_obra
.parent
= self
4889 _n_expr
= n_expr
.as(not null)
4890 n_expr
.parent
= self
4891 _n_expr2
= n_expr2
.as(not null)
4892 n_expr2
.parent
= self
4893 _n_cbra
= n_cbra
.as(not null)
4894 n_cbra
.parent
= self
4895 _n_annotations
= n_annotations
4896 if n_annotations
!= null then n_annotations
.parent
= self
4899 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4901 if _n_obra
== old_child
then
4902 n_obra
= new_child
.as(TObra)
4905 if _n_expr
== old_child
then
4906 n_expr
= new_child
.as(AExpr)
4909 if _n_expr2
== old_child
then
4910 n_expr2
= new_child
.as(AExpr)
4913 if _n_cbra
== old_child
then
4914 n_cbra
= new_child
.as(TCbra)
4917 if _n_annotations
== old_child
then
4918 n_annotations
= new_child
.as(nullable AAnnotations)
4923 redef fun n_obra
=(node
)
4928 redef fun n_expr
=(node
)
4933 redef fun n_expr2
=(node
)
4938 redef fun n_cbra
=(node
)
4943 redef fun n_annotations
=(node
)
4945 _n_annotations
= node
4946 if node
!= null then node
.parent
= self
4950 redef fun visit_all
(v
: Visitor)
4952 v
.enter_visit
(_n_obra
)
4953 v
.enter_visit
(_n_expr
)
4954 v
.enter_visit
(_n_expr2
)
4955 v
.enter_visit
(_n_cbra
)
4956 v
.enter_visit
(_n_annotations
)
4959 redef class AOrangeExpr
4960 init init_aorangeexpr
(
4961 n_obra
: nullable TObra,
4962 n_expr
: nullable AExpr,
4963 n_expr2
: nullable AExpr,
4964 n_cbra
: nullable TObra,
4965 n_annotations
: nullable AAnnotations
4968 _n_obra
= n_obra
.as(not null)
4969 n_obra
.parent
= self
4970 _n_expr
= n_expr
.as(not null)
4971 n_expr
.parent
= self
4972 _n_expr2
= n_expr2
.as(not null)
4973 n_expr2
.parent
= self
4974 _n_cbra
= n_cbra
.as(not null)
4975 n_cbra
.parent
= self
4976 _n_annotations
= n_annotations
4977 if n_annotations
!= null then n_annotations
.parent
= self
4980 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4982 if _n_obra
== old_child
then
4983 n_obra
= new_child
.as(TObra)
4986 if _n_expr
== old_child
then
4987 n_expr
= new_child
.as(AExpr)
4990 if _n_expr2
== old_child
then
4991 n_expr2
= new_child
.as(AExpr)
4994 if _n_cbra
== old_child
then
4995 n_cbra
= new_child
.as(TObra)
4998 if _n_annotations
== old_child
then
4999 n_annotations
= new_child
.as(nullable AAnnotations)
5004 redef fun n_obra
=(node
)
5009 redef fun n_expr
=(node
)
5014 redef fun n_expr2
=(node
)
5019 redef fun n_cbra
=(node
)
5024 redef fun n_annotations
=(node
)
5026 _n_annotations
= node
5027 if node
!= null then node
.parent
= self
5031 redef fun visit_all
(v
: Visitor)
5033 v
.enter_visit
(_n_obra
)
5034 v
.enter_visit
(_n_expr
)
5035 v
.enter_visit
(_n_expr2
)
5036 v
.enter_visit
(_n_cbra
)
5037 v
.enter_visit
(_n_annotations
)
5040 redef class AArrayExpr
5041 init init_aarrayexpr
(
5042 n_exprs
: nullable AExprs,
5043 n_annotations
: nullable AAnnotations
5046 _n_exprs
= n_exprs
.as(not null)
5047 n_exprs
.parent
= self
5048 _n_annotations
= n_annotations
5049 if n_annotations
!= null then n_annotations
.parent
= self
5052 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5054 if _n_exprs
== old_child
then
5055 n_exprs
= new_child
.as(AExprs)
5058 if _n_annotations
== old_child
then
5059 n_annotations
= new_child
.as(nullable AAnnotations)
5064 redef fun n_exprs
=(node
)
5069 redef fun n_annotations
=(node
)
5071 _n_annotations
= node
5072 if node
!= null then node
.parent
= self
5076 redef fun visit_all
(v
: Visitor)
5078 v
.enter_visit
(_n_exprs
)
5079 v
.enter_visit
(_n_annotations
)
5082 redef class ASelfExpr
5083 init init_aselfexpr
(
5084 n_kwself
: nullable TKwself,
5085 n_annotations
: nullable AAnnotations
5088 _n_kwself
= n_kwself
.as(not null)
5089 n_kwself
.parent
= self
5090 _n_annotations
= n_annotations
5091 if n_annotations
!= null then n_annotations
.parent
= self
5094 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5096 if _n_kwself
== old_child
then
5097 n_kwself
= new_child
.as(TKwself)
5100 if _n_annotations
== old_child
then
5101 n_annotations
= new_child
.as(nullable AAnnotations)
5106 redef fun n_kwself
=(node
)
5111 redef fun n_annotations
=(node
)
5113 _n_annotations
= node
5114 if node
!= null then node
.parent
= self
5118 redef fun visit_all
(v
: Visitor)
5120 v
.enter_visit
(_n_kwself
)
5121 v
.enter_visit
(_n_annotations
)
5124 redef class AImplicitSelfExpr
5125 init init_aimplicitselfexpr
5129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5135 redef fun visit_all
(v
: Visitor)
5139 redef class ATrueExpr
5140 init init_atrueexpr
(
5141 n_kwtrue
: nullable TKwtrue,
5142 n_annotations
: nullable AAnnotations
5145 _n_kwtrue
= n_kwtrue
.as(not null)
5146 n_kwtrue
.parent
= self
5147 _n_annotations
= n_annotations
5148 if n_annotations
!= null then n_annotations
.parent
= self
5151 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5153 if _n_kwtrue
== old_child
then
5154 n_kwtrue
= new_child
.as(TKwtrue)
5157 if _n_annotations
== old_child
then
5158 n_annotations
= new_child
.as(nullable AAnnotations)
5163 redef fun n_kwtrue
=(node
)
5168 redef fun n_annotations
=(node
)
5170 _n_annotations
= node
5171 if node
!= null then node
.parent
= self
5175 redef fun visit_all
(v
: Visitor)
5177 v
.enter_visit
(_n_kwtrue
)
5178 v
.enter_visit
(_n_annotations
)
5181 redef class AFalseExpr
5182 init init_afalseexpr
(
5183 n_kwfalse
: nullable TKwfalse,
5184 n_annotations
: nullable AAnnotations
5187 _n_kwfalse
= n_kwfalse
.as(not null)
5188 n_kwfalse
.parent
= self
5189 _n_annotations
= n_annotations
5190 if n_annotations
!= null then n_annotations
.parent
= self
5193 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5195 if _n_kwfalse
== old_child
then
5196 n_kwfalse
= new_child
.as(TKwfalse)
5199 if _n_annotations
== old_child
then
5200 n_annotations
= new_child
.as(nullable AAnnotations)
5205 redef fun n_kwfalse
=(node
)
5210 redef fun n_annotations
=(node
)
5212 _n_annotations
= node
5213 if node
!= null then node
.parent
= self
5217 redef fun visit_all
(v
: Visitor)
5219 v
.enter_visit
(_n_kwfalse
)
5220 v
.enter_visit
(_n_annotations
)
5223 redef class ANullExpr
5224 init init_anullexpr
(
5225 n_kwnull
: nullable TKwnull,
5226 n_annotations
: nullable AAnnotations
5229 _n_kwnull
= n_kwnull
.as(not null)
5230 n_kwnull
.parent
= self
5231 _n_annotations
= n_annotations
5232 if n_annotations
!= null then n_annotations
.parent
= self
5235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5237 if _n_kwnull
== old_child
then
5238 n_kwnull
= new_child
.as(TKwnull)
5241 if _n_annotations
== old_child
then
5242 n_annotations
= new_child
.as(nullable AAnnotations)
5247 redef fun n_kwnull
=(node
)
5252 redef fun n_annotations
=(node
)
5254 _n_annotations
= node
5255 if node
!= null then node
.parent
= self
5259 redef fun visit_all
(v
: Visitor)
5261 v
.enter_visit
(_n_kwnull
)
5262 v
.enter_visit
(_n_annotations
)
5265 redef class ADecIntExpr
5266 init init_adecintexpr
(
5267 n_number
: nullable TNumber,
5268 n_annotations
: nullable AAnnotations
5271 _n_number
= n_number
.as(not null)
5272 n_number
.parent
= self
5273 _n_annotations
= n_annotations
5274 if n_annotations
!= null then n_annotations
.parent
= self
5277 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5279 if _n_number
== old_child
then
5280 n_number
= new_child
.as(TNumber)
5283 if _n_annotations
== old_child
then
5284 n_annotations
= new_child
.as(nullable AAnnotations)
5289 redef fun n_number
=(node
)
5294 redef fun n_annotations
=(node
)
5296 _n_annotations
= node
5297 if node
!= null then node
.parent
= self
5301 redef fun visit_all
(v
: Visitor)
5303 v
.enter_visit
(_n_number
)
5304 v
.enter_visit
(_n_annotations
)
5307 redef class AHexIntExpr
5308 init init_ahexintexpr
(
5309 n_hex_number
: nullable THexNumber,
5310 n_annotations
: nullable AAnnotations
5313 _n_hex_number
= n_hex_number
.as(not null)
5314 n_hex_number
.parent
= self
5315 _n_annotations
= n_annotations
5316 if n_annotations
!= null then n_annotations
.parent
= self
5319 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5321 if _n_hex_number
== old_child
then
5322 n_hex_number
= new_child
.as(THexNumber)
5325 if _n_annotations
== old_child
then
5326 n_annotations
= new_child
.as(nullable AAnnotations)
5331 redef fun n_hex_number
=(node
)
5333 _n_hex_number
= node
5336 redef fun n_annotations
=(node
)
5338 _n_annotations
= node
5339 if node
!= null then node
.parent
= self
5343 redef fun visit_all
(v
: Visitor)
5345 v
.enter_visit
(_n_hex_number
)
5346 v
.enter_visit
(_n_annotations
)
5349 redef class AFloatExpr
5350 init init_afloatexpr
(
5351 n_float
: nullable TFloat,
5352 n_annotations
: nullable AAnnotations
5355 _n_float
= n_float
.as(not null)
5356 n_float
.parent
= self
5357 _n_annotations
= n_annotations
5358 if n_annotations
!= null then n_annotations
.parent
= self
5361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5363 if _n_float
== old_child
then
5364 n_float
= new_child
.as(TFloat)
5367 if _n_annotations
== old_child
then
5368 n_annotations
= new_child
.as(nullable AAnnotations)
5373 redef fun n_float
=(node
)
5378 redef fun n_annotations
=(node
)
5380 _n_annotations
= node
5381 if node
!= null then node
.parent
= self
5385 redef fun visit_all
(v
: Visitor)
5387 v
.enter_visit
(_n_float
)
5388 v
.enter_visit
(_n_annotations
)
5391 redef class ACharExpr
5392 init init_acharexpr
(
5393 n_char
: nullable TChar,
5394 n_annotations
: nullable AAnnotations
5397 _n_char
= n_char
.as(not null)
5398 n_char
.parent
= self
5399 _n_annotations
= n_annotations
5400 if n_annotations
!= null then n_annotations
.parent
= self
5403 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5405 if _n_char
== old_child
then
5406 n_char
= new_child
.as(TChar)
5409 if _n_annotations
== old_child
then
5410 n_annotations
= new_child
.as(nullable AAnnotations)
5415 redef fun n_char
=(node
)
5420 redef fun n_annotations
=(node
)
5422 _n_annotations
= node
5423 if node
!= null then node
.parent
= self
5427 redef fun visit_all
(v
: Visitor)
5429 v
.enter_visit
(_n_char
)
5430 v
.enter_visit
(_n_annotations
)
5433 redef class AStringExpr
5434 init init_astringexpr
(
5435 n_string
: nullable TString,
5436 n_annotations
: nullable AAnnotations
5439 _n_string
= n_string
.as(not null)
5440 n_string
.parent
= self
5441 _n_annotations
= n_annotations
5442 if n_annotations
!= null then n_annotations
.parent
= self
5445 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5447 if _n_string
== old_child
then
5448 n_string
= new_child
.as(TString)
5451 if _n_annotations
== old_child
then
5452 n_annotations
= new_child
.as(nullable AAnnotations)
5457 redef fun n_string
=(node
)
5462 redef fun n_annotations
=(node
)
5464 _n_annotations
= node
5465 if node
!= null then node
.parent
= self
5469 redef fun visit_all
(v
: Visitor)
5471 v
.enter_visit
(_n_string
)
5472 v
.enter_visit
(_n_annotations
)
5475 redef class AStartStringExpr
5476 init init_astartstringexpr
(
5477 n_string
: nullable TStartString
5480 _n_string
= n_string
.as(not null)
5481 n_string
.parent
= self
5484 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5486 if _n_string
== old_child
then
5487 n_string
= new_child
.as(TStartString)
5492 redef fun n_string
=(node
)
5499 redef fun visit_all
(v
: Visitor)
5501 v
.enter_visit
(_n_string
)
5504 redef class AMidStringExpr
5505 init init_amidstringexpr
(
5506 n_string
: nullable TMidString
5509 _n_string
= n_string
.as(not null)
5510 n_string
.parent
= self
5513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5515 if _n_string
== old_child
then
5516 n_string
= new_child
.as(TMidString)
5521 redef fun n_string
=(node
)
5528 redef fun visit_all
(v
: Visitor)
5530 v
.enter_visit
(_n_string
)
5533 redef class AEndStringExpr
5534 init init_aendstringexpr
(
5535 n_string
: nullable TEndString
5538 _n_string
= n_string
.as(not null)
5539 n_string
.parent
= self
5542 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5544 if _n_string
== old_child
then
5545 n_string
= new_child
.as(TEndString)
5550 redef fun n_string
=(node
)
5557 redef fun visit_all
(v
: Visitor)
5559 v
.enter_visit
(_n_string
)
5562 redef class ASuperstringExpr
5563 init init_asuperstringexpr
(
5564 n_exprs
: Collection[Object], # Should be Collection[AExpr]
5565 n_annotations
: nullable AAnnotations
5568 self.n_exprs
.unsafe_add_all
(n_exprs
)
5569 _n_annotations
= n_annotations
5570 if n_annotations
!= null then n_annotations
.parent
= self
5573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5575 if n_exprs
.replace_child
(old_child
, new_child
) then return
5576 if _n_annotations
== old_child
then
5577 n_annotations
= new_child
.as(nullable AAnnotations)
5582 redef fun n_annotations
=(node
)
5584 _n_annotations
= node
5585 if node
!= null then node
.parent
= self
5589 redef fun visit_all
(v
: Visitor)
5591 n_exprs
.visit_all
(v
)
5592 v
.enter_visit
(_n_annotations
)
5595 redef class AParExpr
5596 init init_aparexpr
(
5597 n_opar
: nullable TOpar,
5598 n_expr
: nullable AExpr,
5599 n_cpar
: nullable TCpar,
5600 n_annotations
: nullable AAnnotations
5603 _n_opar
= n_opar
.as(not null)
5604 n_opar
.parent
= self
5605 _n_expr
= n_expr
.as(not null)
5606 n_expr
.parent
= self
5607 _n_cpar
= n_cpar
.as(not null)
5608 n_cpar
.parent
= self
5609 _n_annotations
= n_annotations
5610 if n_annotations
!= null then n_annotations
.parent
= self
5613 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5615 if _n_opar
== old_child
then
5616 n_opar
= new_child
.as(TOpar)
5619 if _n_expr
== old_child
then
5620 n_expr
= new_child
.as(AExpr)
5623 if _n_cpar
== old_child
then
5624 n_cpar
= new_child
.as(TCpar)
5627 if _n_annotations
== old_child
then
5628 n_annotations
= new_child
.as(nullable AAnnotations)
5633 redef fun n_opar
=(node
)
5638 redef fun n_expr
=(node
)
5643 redef fun n_cpar
=(node
)
5648 redef fun n_annotations
=(node
)
5650 _n_annotations
= node
5651 if node
!= null then node
.parent
= self
5655 redef fun visit_all
(v
: Visitor)
5657 v
.enter_visit
(_n_opar
)
5658 v
.enter_visit
(_n_expr
)
5659 v
.enter_visit
(_n_cpar
)
5660 v
.enter_visit
(_n_annotations
)
5663 redef class AAsCastExpr
5664 init init_aascastexpr
(
5665 n_expr
: nullable AExpr,
5666 n_kwas
: nullable TKwas,
5667 n_opar
: nullable TOpar,
5668 n_type
: nullable AType,
5669 n_cpar
: nullable TCpar
5672 _n_expr
= n_expr
.as(not null)
5673 n_expr
.parent
= self
5674 _n_kwas
= n_kwas
.as(not null)
5675 n_kwas
.parent
= self
5677 if n_opar
!= null then n_opar
.parent
= self
5678 _n_type
= n_type
.as(not null)
5679 n_type
.parent
= self
5681 if n_cpar
!= null then n_cpar
.parent
= self
5684 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5686 if _n_expr
== old_child
then
5687 n_expr
= new_child
.as(AExpr)
5690 if _n_kwas
== old_child
then
5691 n_kwas
= new_child
.as(TKwas)
5694 if _n_opar
== old_child
then
5695 n_opar
= new_child
.as(nullable TOpar)
5698 if _n_type
== old_child
then
5699 n_type
= new_child
.as(AType)
5702 if _n_cpar
== old_child
then
5703 n_cpar
= new_child
.as(nullable TCpar)
5708 redef fun n_expr
=(node
)
5713 redef fun n_kwas
=(node
)
5718 redef fun n_opar
=(node
)
5721 if node
!= null then node
.parent
= self
5723 redef fun n_type
=(node
)
5728 redef fun n_cpar
=(node
)
5731 if node
!= null then node
.parent
= self
5735 redef fun visit_all
(v
: Visitor)
5737 v
.enter_visit
(_n_expr
)
5738 v
.enter_visit
(_n_kwas
)
5739 v
.enter_visit
(_n_opar
)
5740 v
.enter_visit
(_n_type
)
5741 v
.enter_visit
(_n_cpar
)
5744 redef class AAsNotnullExpr
5745 init init_aasnotnullexpr
(
5746 n_expr
: nullable AExpr,
5747 n_kwas
: nullable TKwas,
5748 n_opar
: nullable TOpar,
5749 n_kwnot
: nullable TKwnot,
5750 n_kwnull
: nullable TKwnull,
5751 n_cpar
: nullable TCpar
5754 _n_expr
= n_expr
.as(not null)
5755 n_expr
.parent
= self
5756 _n_kwas
= n_kwas
.as(not null)
5757 n_kwas
.parent
= self
5759 if n_opar
!= null then n_opar
.parent
= self
5760 _n_kwnot
= n_kwnot
.as(not null)
5761 n_kwnot
.parent
= self
5762 _n_kwnull
= n_kwnull
.as(not null)
5763 n_kwnull
.parent
= self
5765 if n_cpar
!= null then n_cpar
.parent
= self
5768 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5770 if _n_expr
== old_child
then
5771 n_expr
= new_child
.as(AExpr)
5774 if _n_kwas
== old_child
then
5775 n_kwas
= new_child
.as(TKwas)
5778 if _n_opar
== old_child
then
5779 n_opar
= new_child
.as(nullable TOpar)
5782 if _n_kwnot
== old_child
then
5783 n_kwnot
= new_child
.as(TKwnot)
5786 if _n_kwnull
== old_child
then
5787 n_kwnull
= new_child
.as(TKwnull)
5790 if _n_cpar
== old_child
then
5791 n_cpar
= new_child
.as(nullable TCpar)
5796 redef fun n_expr
=(node
)
5801 redef fun n_kwas
=(node
)
5806 redef fun n_opar
=(node
)
5809 if node
!= null then node
.parent
= self
5811 redef fun n_kwnot
=(node
)
5816 redef fun n_kwnull
=(node
)
5821 redef fun n_cpar
=(node
)
5824 if node
!= null then node
.parent
= self
5828 redef fun visit_all
(v
: Visitor)
5830 v
.enter_visit
(_n_expr
)
5831 v
.enter_visit
(_n_kwas
)
5832 v
.enter_visit
(_n_opar
)
5833 v
.enter_visit
(_n_kwnot
)
5834 v
.enter_visit
(_n_kwnull
)
5835 v
.enter_visit
(_n_cpar
)
5838 redef class AIssetAttrExpr
5839 init init_aissetattrexpr
(
5840 n_kwisset
: nullable TKwisset,
5841 n_expr
: nullable AExpr,
5842 n_id
: nullable TAttrid
5845 _n_kwisset
= n_kwisset
.as(not null)
5846 n_kwisset
.parent
= self
5847 _n_expr
= n_expr
.as(not null)
5848 n_expr
.parent
= self
5849 _n_id
= n_id
.as(not null)
5853 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5855 if _n_kwisset
== old_child
then
5856 n_kwisset
= new_child
.as(TKwisset)
5859 if _n_expr
== old_child
then
5860 n_expr
= new_child
.as(AExpr)
5863 if _n_id
== old_child
then
5864 n_id
= new_child
.as(TAttrid)
5869 redef fun n_kwisset
=(node
)
5874 redef fun n_expr
=(node
)
5879 redef fun n_id
=(node
)
5886 redef fun visit_all
(v
: Visitor)
5888 v
.enter_visit
(_n_kwisset
)
5889 v
.enter_visit
(_n_expr
)
5890 v
.enter_visit
(_n_id
)
5893 redef class ADebugTypeExpr
5894 init init_adebugtypeexpr
(
5895 n_kwdebug
: nullable TKwdebug,
5896 n_kwtype
: nullable TKwtype,
5897 n_expr
: nullable AExpr,
5898 n_type
: nullable AType
5901 _n_kwdebug
= n_kwdebug
.as(not null)
5902 n_kwdebug
.parent
= self
5903 _n_kwtype
= n_kwtype
.as(not null)
5904 n_kwtype
.parent
= self
5905 _n_expr
= n_expr
.as(not null)
5906 n_expr
.parent
= self
5907 _n_type
= n_type
.as(not null)
5908 n_type
.parent
= self
5911 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5913 if _n_kwdebug
== old_child
then
5914 n_kwdebug
= new_child
.as(TKwdebug)
5917 if _n_kwtype
== old_child
then
5918 n_kwtype
= new_child
.as(TKwtype)
5921 if _n_expr
== old_child
then
5922 n_expr
= new_child
.as(AExpr)
5925 if _n_type
== old_child
then
5926 n_type
= new_child
.as(AType)
5931 redef fun n_kwdebug
=(node
)
5936 redef fun n_kwtype
=(node
)
5941 redef fun n_expr
=(node
)
5946 redef fun n_type
=(node
)
5953 redef fun visit_all
(v
: Visitor)
5955 v
.enter_visit
(_n_kwdebug
)
5956 v
.enter_visit
(_n_kwtype
)
5957 v
.enter_visit
(_n_expr
)
5958 v
.enter_visit
(_n_type
)
5961 redef class AVarargExpr
5962 init init_avarargexpr
(
5963 n_expr
: nullable AExpr,
5964 n_dotdotdot
: nullable TDotdotdot
5967 _n_expr
= n_expr
.as(not null)
5968 n_expr
.parent
= self
5969 _n_dotdotdot
= n_dotdotdot
.as(not null)
5970 n_dotdotdot
.parent
= self
5973 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5975 if _n_expr
== old_child
then
5976 n_expr
= new_child
.as(AExpr)
5979 if _n_dotdotdot
== old_child
then
5980 n_dotdotdot
= new_child
.as(TDotdotdot)
5985 redef fun n_expr
=(node
)
5990 redef fun n_dotdotdot
=(node
)
5997 redef fun visit_all
(v
: Visitor)
5999 v
.enter_visit
(_n_expr
)
6000 v
.enter_visit
(_n_dotdotdot
)
6003 redef class AListExprs
6004 init init_alistexprs
(
6005 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6008 self.n_exprs
.unsafe_add_all
(n_exprs
)
6011 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6013 if n_exprs
.replace_child
(old_child
, new_child
) then return
6018 redef fun visit_all
(v
: Visitor)
6020 n_exprs
.visit_all
(v
)
6023 redef class AParExprs
6024 init init_aparexprs
(
6025 n_opar
: nullable TOpar,
6026 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6027 n_cpar
: nullable TCpar
6030 _n_opar
= n_opar
.as(not null)
6031 n_opar
.parent
= self
6032 self.n_exprs
.unsafe_add_all
(n_exprs
)
6033 _n_cpar
= n_cpar
.as(not null)
6034 n_cpar
.parent
= self
6037 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6039 if _n_opar
== old_child
then
6040 n_opar
= new_child
.as(TOpar)
6043 if n_exprs
.replace_child
(old_child
, new_child
) then return
6044 if _n_cpar
== old_child
then
6045 n_cpar
= new_child
.as(TCpar)
6050 redef fun n_opar
=(node
)
6055 redef fun n_cpar
=(node
)
6062 redef fun visit_all
(v
: Visitor)
6064 v
.enter_visit
(_n_opar
)
6065 n_exprs
.visit_all
(v
)
6066 v
.enter_visit
(_n_cpar
)
6069 redef class ABraExprs
6070 init init_abraexprs
(
6071 n_obra
: nullable TObra,
6072 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6073 n_cbra
: nullable TCbra
6076 _n_obra
= n_obra
.as(not null)
6077 n_obra
.parent
= self
6078 self.n_exprs
.unsafe_add_all
(n_exprs
)
6079 _n_cbra
= n_cbra
.as(not null)
6080 n_cbra
.parent
= self
6083 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6085 if _n_obra
== old_child
then
6086 n_obra
= new_child
.as(TObra)
6089 if n_exprs
.replace_child
(old_child
, new_child
) then return
6090 if _n_cbra
== old_child
then
6091 n_cbra
= new_child
.as(TCbra)
6096 redef fun n_obra
=(node
)
6101 redef fun n_cbra
=(node
)
6108 redef fun visit_all
(v
: Visitor)
6110 v
.enter_visit
(_n_obra
)
6111 n_exprs
.visit_all
(v
)
6112 v
.enter_visit
(_n_cbra
)
6115 redef class APlusAssignOp
6116 init init_aplusassignop
(
6117 n_pluseq
: nullable TPluseq
6120 _n_pluseq
= n_pluseq
.as(not null)
6121 n_pluseq
.parent
= self
6124 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6126 if _n_pluseq
== old_child
then
6127 n_pluseq
= new_child
.as(TPluseq)
6132 redef fun n_pluseq
=(node
)
6139 redef fun visit_all
(v
: Visitor)
6141 v
.enter_visit
(_n_pluseq
)
6144 redef class AMinusAssignOp
6145 init init_aminusassignop
(
6146 n_minuseq
: nullable TMinuseq
6149 _n_minuseq
= n_minuseq
.as(not null)
6150 n_minuseq
.parent
= self
6153 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6155 if _n_minuseq
== old_child
then
6156 n_minuseq
= new_child
.as(TMinuseq)
6161 redef fun n_minuseq
=(node
)
6168 redef fun visit_all
(v
: Visitor)
6170 v
.enter_visit
(_n_minuseq
)
6173 redef class AModuleName
6174 init init_amodulename
(
6175 n_quad
: nullable TQuad,
6176 n_path
: Collection[Object], # Should be Collection[TId]
6181 if n_quad
!= null then n_quad
.parent
= self
6182 self.n_path
.unsafe_add_all
(n_path
)
6183 _n_id
= n_id
.as(not null)
6187 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6189 if _n_quad
== old_child
then
6190 n_quad
= new_child
.as(nullable TQuad)
6193 if n_path
.replace_child
(old_child
, new_child
) then return
6194 if _n_id
== old_child
then
6195 n_id
= new_child
.as(TId)
6200 redef fun n_quad
=(node
)
6203 if node
!= null then node
.parent
= self
6205 redef fun n_id
=(node
)
6212 redef fun visit_all
(v
: Visitor)
6214 v
.enter_visit
(_n_quad
)
6216 v
.enter_visit
(_n_id
)
6219 redef class AExternCalls
6220 init init_aexterncalls
(
6221 n_kwimport
: nullable TKwimport,
6222 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
6225 _n_kwimport
= n_kwimport
.as(not null)
6226 n_kwimport
.parent
= self
6227 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
6230 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6232 if _n_kwimport
== old_child
then
6233 n_kwimport
= new_child
.as(TKwimport)
6236 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
6239 redef fun n_kwimport
=(node
)
6246 redef fun visit_all
(v
: Visitor)
6248 v
.enter_visit
(_n_kwimport
)
6249 n_extern_calls
.visit_all
(v
)
6252 redef class AExternCall
6253 init init_aexterncall
6257 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6263 redef fun visit_all
(v
: Visitor)
6267 redef class ASuperExternCall
6268 init init_asuperexterncall
(
6269 n_kwsuper
: nullable TKwsuper
6272 _n_kwsuper
= n_kwsuper
.as(not null)
6273 n_kwsuper
.parent
= self
6276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6278 if _n_kwsuper
== old_child
then
6279 n_kwsuper
= new_child
.as(TKwsuper)
6284 redef fun n_kwsuper
=(node
)
6291 redef fun visit_all
(v
: Visitor)
6293 v
.enter_visit
(_n_kwsuper
)
6296 redef class ALocalPropExternCall
6297 init init_alocalpropexterncall
(
6298 n_methid
: nullable AMethid
6301 _n_methid
= n_methid
.as(not null)
6302 n_methid
.parent
= self
6305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6307 if _n_methid
== old_child
then
6308 n_methid
= new_child
.as(AMethid)
6313 redef fun n_methid
=(node
)
6320 redef fun visit_all
(v
: Visitor)
6322 v
.enter_visit
(_n_methid
)
6325 redef class AFullPropExternCall
6326 init init_afullpropexterncall
(
6327 n_type
: nullable AType,
6328 n_dot
: nullable TDot,
6329 n_methid
: nullable AMethid
6332 _n_type
= n_type
.as(not null)
6333 n_type
.parent
= self
6335 if n_dot
!= null then n_dot
.parent
= self
6336 _n_methid
= n_methid
.as(not null)
6337 n_methid
.parent
= self
6340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6342 if _n_type
== old_child
then
6343 n_type
= new_child
.as(AType)
6346 if _n_dot
== old_child
then
6347 n_dot
= new_child
.as(nullable TDot)
6350 if _n_methid
== old_child
then
6351 n_methid
= new_child
.as(AMethid)
6356 redef fun n_type
=(node
)
6361 redef fun n_dot
=(node
)
6364 if node
!= null then node
.parent
= self
6366 redef fun n_methid
=(node
)
6373 redef fun visit_all
(v
: Visitor)
6375 v
.enter_visit
(_n_type
)
6376 v
.enter_visit
(_n_dot
)
6377 v
.enter_visit
(_n_methid
)
6380 redef class AInitPropExternCall
6381 init init_ainitpropexterncall
(
6382 n_type
: nullable AType
6385 _n_type
= n_type
.as(not null)
6386 n_type
.parent
= self
6389 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6391 if _n_type
== old_child
then
6392 n_type
= new_child
.as(AType)
6397 redef fun n_type
=(node
)
6404 redef fun visit_all
(v
: Visitor)
6406 v
.enter_visit
(_n_type
)
6409 redef class ACastAsExternCall
6410 init init_acastasexterncall
(
6411 n_from_type
: nullable AType,
6412 n_dot
: nullable TDot,
6413 n_kwas
: nullable TKwas,
6414 n_to_type
: nullable AType
6417 _n_from_type
= n_from_type
.as(not null)
6418 n_from_type
.parent
= self
6420 if n_dot
!= null then n_dot
.parent
= self
6421 _n_kwas
= n_kwas
.as(not null)
6422 n_kwas
.parent
= self
6423 _n_to_type
= n_to_type
.as(not null)
6424 n_to_type
.parent
= self
6427 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6429 if _n_from_type
== old_child
then
6430 n_from_type
= new_child
.as(AType)
6433 if _n_dot
== old_child
then
6434 n_dot
= new_child
.as(nullable TDot)
6437 if _n_kwas
== old_child
then
6438 n_kwas
= new_child
.as(TKwas)
6441 if _n_to_type
== old_child
then
6442 n_to_type
= new_child
.as(AType)
6447 redef fun n_from_type
=(node
)
6452 redef fun n_dot
=(node
)
6455 if node
!= null then node
.parent
= self
6457 redef fun n_kwas
=(node
)
6462 redef fun n_to_type
=(node
)
6469 redef fun visit_all
(v
: Visitor)
6471 v
.enter_visit
(_n_from_type
)
6472 v
.enter_visit
(_n_dot
)
6473 v
.enter_visit
(_n_kwas
)
6474 v
.enter_visit
(_n_to_type
)
6477 redef class AAsNullableExternCall
6478 init init_aasnullableexterncall
(
6479 n_type
: nullable AType,
6480 n_kwas
: nullable TKwas,
6481 n_kwnullable
: nullable TKwnullable
6484 _n_type
= n_type
.as(not null)
6485 n_type
.parent
= self
6486 _n_kwas
= n_kwas
.as(not null)
6487 n_kwas
.parent
= self
6488 _n_kwnullable
= n_kwnullable
.as(not null)
6489 n_kwnullable
.parent
= self
6492 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6494 if _n_type
== old_child
then
6495 n_type
= new_child
.as(AType)
6498 if _n_kwas
== old_child
then
6499 n_kwas
= new_child
.as(TKwas)
6502 if _n_kwnullable
== old_child
then
6503 n_kwnullable
= new_child
.as(TKwnullable)
6508 redef fun n_type
=(node
)
6513 redef fun n_kwas
=(node
)
6518 redef fun n_kwnullable
=(node
)
6520 _n_kwnullable
= node
6525 redef fun visit_all
(v
: Visitor)
6527 v
.enter_visit
(_n_type
)
6528 v
.enter_visit
(_n_kwas
)
6529 v
.enter_visit
(_n_kwnullable
)
6532 redef class AAsNotNullableExternCall
6533 init init_aasnotnullableexterncall
(
6534 n_type
: nullable AType,
6535 n_kwas
: nullable TKwas,
6536 n_kwnot
: nullable TKwnot,
6537 n_kwnullable
: nullable TKwnullable
6540 _n_type
= n_type
.as(not null)
6541 n_type
.parent
= self
6542 _n_kwas
= n_kwas
.as(not null)
6543 n_kwas
.parent
= self
6544 _n_kwnot
= n_kwnot
.as(not null)
6545 n_kwnot
.parent
= self
6546 _n_kwnullable
= n_kwnullable
.as(not null)
6547 n_kwnullable
.parent
= self
6550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6552 if _n_type
== old_child
then
6553 n_type
= new_child
.as(AType)
6556 if _n_kwas
== old_child
then
6557 n_kwas
= new_child
.as(TKwas)
6560 if _n_kwnot
== old_child
then
6561 n_kwnot
= new_child
.as(TKwnot)
6564 if _n_kwnullable
== old_child
then
6565 n_kwnullable
= new_child
.as(TKwnullable)
6570 redef fun n_type
=(node
)
6575 redef fun n_kwas
=(node
)
6580 redef fun n_kwnot
=(node
)
6585 redef fun n_kwnullable
=(node
)
6587 _n_kwnullable
= node
6592 redef fun visit_all
(v
: Visitor)
6594 v
.enter_visit
(_n_type
)
6595 v
.enter_visit
(_n_kwas
)
6596 v
.enter_visit
(_n_kwnot
)
6597 v
.enter_visit
(_n_kwnullable
)
6600 redef class AInLanguage
6601 init init_ainlanguage
(
6602 n_kwin
: nullable TKwin,
6603 n_string
: nullable TString
6606 _n_kwin
= n_kwin
.as(not null)
6607 n_kwin
.parent
= self
6608 _n_string
= n_string
.as(not null)
6609 n_string
.parent
= self
6612 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6614 if _n_kwin
== old_child
then
6615 n_kwin
= new_child
.as(TKwin)
6618 if _n_string
== old_child
then
6619 n_string
= new_child
.as(TString)
6624 redef fun n_kwin
=(node
)
6629 redef fun n_string
=(node
)
6636 redef fun visit_all
(v
: Visitor)
6638 v
.enter_visit
(_n_kwin
)
6639 v
.enter_visit
(_n_string
)
6642 redef class AExternCodeBlock
6643 init init_aexterncodeblock
(
6644 n_in_language
: nullable AInLanguage,
6645 n_extern_code_segment
: nullable TExternCodeSegment
6648 _n_in_language
= n_in_language
6649 if n_in_language
!= null then n_in_language
.parent
= self
6650 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
6651 n_extern_code_segment
.parent
= self
6654 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6656 if _n_in_language
== old_child
then
6657 n_in_language
= new_child
.as(nullable AInLanguage)
6660 if _n_extern_code_segment
== old_child
then
6661 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
6666 redef fun n_in_language
=(node
)
6668 _n_in_language
= node
6669 if node
!= null then node
.parent
= self
6671 redef fun n_extern_code_segment
=(node
)
6673 _n_extern_code_segment
= node
6678 redef fun visit_all
(v
: Visitor)
6680 v
.enter_visit
(_n_in_language
)
6681 v
.enter_visit
(_n_extern_code_segment
)
6684 redef class AQualified
6685 init init_aqualified
(
6686 n_id
: Collection[Object], # Should be Collection[TId]
6687 n_classid
: nullable TClassid
6690 self.n_id
.unsafe_add_all
(n_id
)
6691 _n_classid
= n_classid
6692 if n_classid
!= null then n_classid
.parent
= self
6695 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6697 if n_id
.replace_child
(old_child
, new_child
) then return
6698 if _n_classid
== old_child
then
6699 n_classid
= new_child
.as(nullable TClassid)
6704 redef fun n_classid
=(node
)
6707 if node
!= null then node
.parent
= self
6711 redef fun visit_all
(v
: Visitor)
6714 v
.enter_visit
(_n_classid
)
6719 n_comment
: Collection[Object] # Should be Collection[TComment]
6722 self.n_comment
.unsafe_add_all
(n_comment
)
6725 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6727 if n_comment
.replace_child
(old_child
, new_child
) then return
6732 redef fun visit_all
(v
: Visitor)
6734 n_comment
.visit_all
(v
)
6737 redef class AAnnotations
6738 init init_aannotations
(
6740 n_opar
: nullable TOpar,
6741 n_items
: Collection[Object], # Should be Collection[AAnnotation]
6742 n_cpar
: nullable TCpar
6746 if n_at
!= null then n_at
.parent
= self
6748 if n_opar
!= null then n_opar
.parent
= self
6749 self.n_items
.unsafe_add_all
(n_items
)
6751 if n_cpar
!= null then n_cpar
.parent
= self
6754 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6756 if _n_at
== old_child
then
6757 n_at
= new_child
.as(nullable TAt)
6760 if _n_opar
== old_child
then
6761 n_opar
= new_child
.as(nullable TOpar)
6764 if n_items
.replace_child
(old_child
, new_child
) then return
6765 if _n_cpar
== old_child
then
6766 n_cpar
= new_child
.as(nullable TCpar)
6771 redef fun n_at
=(node
)
6774 if node
!= null then node
.parent
= self
6776 redef fun n_opar
=(node
)
6779 if node
!= null then node
.parent
= self
6781 redef fun n_cpar
=(node
)
6784 if node
!= null then node
.parent
= self
6788 redef fun visit_all
(v
: Visitor)
6790 v
.enter_visit
(_n_at
)
6791 v
.enter_visit
(_n_opar
)
6792 n_items
.visit_all
(v
)
6793 v
.enter_visit
(_n_cpar
)
6796 redef class AAnnotation
6797 init init_aannotation
(
6798 n_doc
: nullable ADoc,
6799 n_kwredef
: nullable TKwredef,
6800 n_visibility
: nullable AVisibility,
6801 n_atid
: nullable AAtid,
6802 n_opar
: nullable TOpar,
6803 n_args
: Collection[Object], # Should be Collection[AAtArg]
6804 n_cpar
: nullable TCpar,
6805 n_annotations
: nullable AAnnotations
6809 if n_doc
!= null then n_doc
.parent
= self
6810 _n_kwredef
= n_kwredef
6811 if n_kwredef
!= null then n_kwredef
.parent
= self
6812 _n_visibility
= n_visibility
6813 if n_visibility
!= null then n_visibility
.parent
= self
6814 _n_atid
= n_atid
.as(not null)
6815 n_atid
.parent
= self
6817 if n_opar
!= null then n_opar
.parent
= self
6818 self.n_args
.unsafe_add_all
(n_args
)
6820 if n_cpar
!= null then n_cpar
.parent
= self
6821 _n_annotations
= n_annotations
6822 if n_annotations
!= null then n_annotations
.parent
= self
6825 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6827 if _n_doc
== old_child
then
6828 n_doc
= new_child
.as(nullable ADoc)
6831 if _n_kwredef
== old_child
then
6832 n_kwredef
= new_child
.as(nullable TKwredef)
6835 if _n_visibility
== old_child
then
6836 n_visibility
= new_child
.as(nullable AVisibility)
6839 if _n_atid
== old_child
then
6840 n_atid
= new_child
.as(AAtid)
6843 if _n_opar
== old_child
then
6844 n_opar
= new_child
.as(nullable TOpar)
6847 if n_args
.replace_child
(old_child
, new_child
) then return
6848 if _n_cpar
== old_child
then
6849 n_cpar
= new_child
.as(nullable TCpar)
6852 if _n_annotations
== old_child
then
6853 n_annotations
= new_child
.as(nullable AAnnotations)
6858 redef fun n_doc
=(node
)
6861 if node
!= null then node
.parent
= self
6863 redef fun n_kwredef
=(node
)
6866 if node
!= null then node
.parent
= self
6868 redef fun n_visibility
=(node
)
6870 _n_visibility
= node
6871 if node
!= null then node
.parent
= self
6873 redef fun n_atid
=(node
)
6878 redef fun n_opar
=(node
)
6881 if node
!= null then node
.parent
= self
6883 redef fun n_cpar
=(node
)
6886 if node
!= null then node
.parent
= self
6888 redef fun n_annotations
=(node
)
6890 _n_annotations
= node
6891 if node
!= null then node
.parent
= self
6895 redef fun visit_all
(v
: Visitor)
6897 v
.enter_visit
(_n_doc
)
6898 v
.enter_visit
(_n_kwredef
)
6899 v
.enter_visit
(_n_visibility
)
6900 v
.enter_visit
(_n_atid
)
6901 v
.enter_visit
(_n_opar
)
6903 v
.enter_visit
(_n_cpar
)
6904 v
.enter_visit
(_n_annotations
)
6907 redef class ATypeAtArg
6908 init init_atypeatarg
(
6909 n_type
: nullable AType
6912 _n_type
= n_type
.as(not null)
6913 n_type
.parent
= self
6916 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6918 if _n_type
== old_child
then
6919 n_type
= new_child
.as(AType)
6924 redef fun n_type
=(node
)
6931 redef fun visit_all
(v
: Visitor)
6933 v
.enter_visit
(_n_type
)
6936 redef class AExprAtArg
6937 init init_aexpratarg
(
6938 n_expr
: nullable AExpr
6941 _n_expr
= n_expr
.as(not null)
6942 n_expr
.parent
= self
6945 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6947 if _n_expr
== old_child
then
6948 n_expr
= new_child
.as(AExpr)
6953 redef fun n_expr
=(node
)
6960 redef fun visit_all
(v
: Visitor)
6962 v
.enter_visit
(_n_expr
)
6965 redef class AAtAtArg
6966 init init_aatatarg
(
6967 n_annotations
: nullable AAnnotations
6970 _n_annotations
= n_annotations
.as(not null)
6971 n_annotations
.parent
= self
6974 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6976 if _n_annotations
== old_child
then
6977 n_annotations
= new_child
.as(AAnnotations)
6982 redef fun n_annotations
=(node
)
6984 _n_annotations
= node
6989 redef fun visit_all
(v
: Visitor)
6991 v
.enter_visit
(_n_annotations
)
6999 _n_id
= n_id
.as(not null)
7003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7005 if _n_id
== old_child
then
7006 n_id
= new_child
.as(TId)
7011 redef fun n_id
=(node
)
7018 redef fun visit_all
(v
: Visitor)
7020 v
.enter_visit
(_n_id
)
7023 redef class AKwexternAtid
7024 init init_akwexternatid
(
7025 n_id
: nullable TKwextern
7028 _n_id
= n_id
.as(not null)
7032 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7034 if _n_id
== old_child
then
7035 n_id
= new_child
.as(TKwextern)
7040 redef fun n_id
=(node
)
7047 redef fun visit_all
(v
: Visitor)
7049 v
.enter_visit
(_n_id
)
7052 redef class AKwabstractAtid
7053 init init_akwabstractatid
(
7054 n_id
: nullable TKwabstract
7057 _n_id
= n_id
.as(not null)
7061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7063 if _n_id
== old_child
then
7064 n_id
= new_child
.as(TKwabstract)
7069 redef fun n_id
=(node
)
7076 redef fun visit_all
(v
: Visitor)
7078 v
.enter_visit
(_n_id
)
7081 redef class AKwimportAtid
7082 init init_akwimportatid
(
7083 n_id
: nullable TKwimport
7086 _n_id
= n_id
.as(not null)
7090 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7092 if _n_id
== old_child
then
7093 n_id
= new_child
.as(TKwimport)
7098 redef fun n_id
=(node
)
7105 redef fun visit_all
(v
: Visitor)
7107 v
.enter_visit
(_n_id
)
7112 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7114 if _n_base
== old_child
then
7115 if new_child
== null then
7117 new_child
.parent
= self
7118 assert new_child
isa AModule
7121 old_child
.parent
= null
7126 redef fun visit_all
(v
: Visitor)
7128 if _n_base
!= null then
7129 v
.enter_visit
(_n_base
.as(not null))
7131 v
.enter_visit
(_n_eof
)