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_obra
: nullable TObra,
5043 n_exprs
: nullable AExprs,
5044 n_type
: nullable AType,
5045 n_cbra
: nullable TCbra,
5046 n_annotations
: nullable AAnnotations
5049 _n_obra
= n_obra
.as(not null)
5050 n_obra
.parent
= self
5051 _n_exprs
= n_exprs
.as(not null)
5052 n_exprs
.parent
= self
5054 if n_type
!= null then n_type
.parent
= self
5055 _n_cbra
= n_cbra
.as(not null)
5056 n_cbra
.parent
= self
5057 _n_annotations
= n_annotations
5058 if n_annotations
!= null then n_annotations
.parent
= self
5061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5063 if _n_obra
== old_child
then
5064 n_obra
= new_child
.as(TObra)
5067 if _n_exprs
== old_child
then
5068 n_exprs
= new_child
.as(AExprs)
5071 if _n_type
== old_child
then
5072 n_type
= new_child
.as(nullable AType)
5075 if _n_cbra
== old_child
then
5076 n_cbra
= new_child
.as(TCbra)
5079 if _n_annotations
== old_child
then
5080 n_annotations
= new_child
.as(nullable AAnnotations)
5085 redef fun n_obra
=(node
)
5090 redef fun n_exprs
=(node
)
5095 redef fun n_type
=(node
)
5098 if node
!= null then node
.parent
= self
5100 redef fun n_cbra
=(node
)
5105 redef fun n_annotations
=(node
)
5107 _n_annotations
= node
5108 if node
!= null then node
.parent
= self
5112 redef fun visit_all
(v
: Visitor)
5114 v
.enter_visit
(_n_obra
)
5115 v
.enter_visit
(_n_exprs
)
5116 v
.enter_visit
(_n_type
)
5117 v
.enter_visit
(_n_cbra
)
5118 v
.enter_visit
(_n_annotations
)
5121 redef class ASelfExpr
5122 init init_aselfexpr
(
5123 n_kwself
: nullable TKwself,
5124 n_annotations
: nullable AAnnotations
5127 _n_kwself
= n_kwself
.as(not null)
5128 n_kwself
.parent
= self
5129 _n_annotations
= n_annotations
5130 if n_annotations
!= null then n_annotations
.parent
= self
5133 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5135 if _n_kwself
== old_child
then
5136 n_kwself
= new_child
.as(TKwself)
5139 if _n_annotations
== old_child
then
5140 n_annotations
= new_child
.as(nullable AAnnotations)
5145 redef fun n_kwself
=(node
)
5150 redef fun n_annotations
=(node
)
5152 _n_annotations
= node
5153 if node
!= null then node
.parent
= self
5157 redef fun visit_all
(v
: Visitor)
5159 v
.enter_visit
(_n_kwself
)
5160 v
.enter_visit
(_n_annotations
)
5163 redef class AImplicitSelfExpr
5164 init init_aimplicitselfexpr
5168 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5174 redef fun visit_all
(v
: Visitor)
5178 redef class ATrueExpr
5179 init init_atrueexpr
(
5180 n_kwtrue
: nullable TKwtrue,
5181 n_annotations
: nullable AAnnotations
5184 _n_kwtrue
= n_kwtrue
.as(not null)
5185 n_kwtrue
.parent
= self
5186 _n_annotations
= n_annotations
5187 if n_annotations
!= null then n_annotations
.parent
= self
5190 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5192 if _n_kwtrue
== old_child
then
5193 n_kwtrue
= new_child
.as(TKwtrue)
5196 if _n_annotations
== old_child
then
5197 n_annotations
= new_child
.as(nullable AAnnotations)
5202 redef fun n_kwtrue
=(node
)
5207 redef fun n_annotations
=(node
)
5209 _n_annotations
= node
5210 if node
!= null then node
.parent
= self
5214 redef fun visit_all
(v
: Visitor)
5216 v
.enter_visit
(_n_kwtrue
)
5217 v
.enter_visit
(_n_annotations
)
5220 redef class AFalseExpr
5221 init init_afalseexpr
(
5222 n_kwfalse
: nullable TKwfalse,
5223 n_annotations
: nullable AAnnotations
5226 _n_kwfalse
= n_kwfalse
.as(not null)
5227 n_kwfalse
.parent
= self
5228 _n_annotations
= n_annotations
5229 if n_annotations
!= null then n_annotations
.parent
= self
5232 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5234 if _n_kwfalse
== old_child
then
5235 n_kwfalse
= new_child
.as(TKwfalse)
5238 if _n_annotations
== old_child
then
5239 n_annotations
= new_child
.as(nullable AAnnotations)
5244 redef fun n_kwfalse
=(node
)
5249 redef fun n_annotations
=(node
)
5251 _n_annotations
= node
5252 if node
!= null then node
.parent
= self
5256 redef fun visit_all
(v
: Visitor)
5258 v
.enter_visit
(_n_kwfalse
)
5259 v
.enter_visit
(_n_annotations
)
5262 redef class ANullExpr
5263 init init_anullexpr
(
5264 n_kwnull
: nullable TKwnull,
5265 n_annotations
: nullable AAnnotations
5268 _n_kwnull
= n_kwnull
.as(not null)
5269 n_kwnull
.parent
= self
5270 _n_annotations
= n_annotations
5271 if n_annotations
!= null then n_annotations
.parent
= self
5274 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5276 if _n_kwnull
== old_child
then
5277 n_kwnull
= new_child
.as(TKwnull)
5280 if _n_annotations
== old_child
then
5281 n_annotations
= new_child
.as(nullable AAnnotations)
5286 redef fun n_kwnull
=(node
)
5291 redef fun n_annotations
=(node
)
5293 _n_annotations
= node
5294 if node
!= null then node
.parent
= self
5298 redef fun visit_all
(v
: Visitor)
5300 v
.enter_visit
(_n_kwnull
)
5301 v
.enter_visit
(_n_annotations
)
5304 redef class ADecIntExpr
5305 init init_adecintexpr
(
5306 n_number
: nullable TNumber,
5307 n_annotations
: nullable AAnnotations
5310 _n_number
= n_number
.as(not null)
5311 n_number
.parent
= self
5312 _n_annotations
= n_annotations
5313 if n_annotations
!= null then n_annotations
.parent
= self
5316 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5318 if _n_number
== old_child
then
5319 n_number
= new_child
.as(TNumber)
5322 if _n_annotations
== old_child
then
5323 n_annotations
= new_child
.as(nullable AAnnotations)
5328 redef fun n_number
=(node
)
5333 redef fun n_annotations
=(node
)
5335 _n_annotations
= node
5336 if node
!= null then node
.parent
= self
5340 redef fun visit_all
(v
: Visitor)
5342 v
.enter_visit
(_n_number
)
5343 v
.enter_visit
(_n_annotations
)
5346 redef class AHexIntExpr
5347 init init_ahexintexpr
(
5348 n_hex_number
: nullable THexNumber,
5349 n_annotations
: nullable AAnnotations
5352 _n_hex_number
= n_hex_number
.as(not null)
5353 n_hex_number
.parent
= self
5354 _n_annotations
= n_annotations
5355 if n_annotations
!= null then n_annotations
.parent
= self
5358 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5360 if _n_hex_number
== old_child
then
5361 n_hex_number
= new_child
.as(THexNumber)
5364 if _n_annotations
== old_child
then
5365 n_annotations
= new_child
.as(nullable AAnnotations)
5370 redef fun n_hex_number
=(node
)
5372 _n_hex_number
= node
5375 redef fun n_annotations
=(node
)
5377 _n_annotations
= node
5378 if node
!= null then node
.parent
= self
5382 redef fun visit_all
(v
: Visitor)
5384 v
.enter_visit
(_n_hex_number
)
5385 v
.enter_visit
(_n_annotations
)
5388 redef class AFloatExpr
5389 init init_afloatexpr
(
5390 n_float
: nullable TFloat,
5391 n_annotations
: nullable AAnnotations
5394 _n_float
= n_float
.as(not null)
5395 n_float
.parent
= self
5396 _n_annotations
= n_annotations
5397 if n_annotations
!= null then n_annotations
.parent
= self
5400 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5402 if _n_float
== old_child
then
5403 n_float
= new_child
.as(TFloat)
5406 if _n_annotations
== old_child
then
5407 n_annotations
= new_child
.as(nullable AAnnotations)
5412 redef fun n_float
=(node
)
5417 redef fun n_annotations
=(node
)
5419 _n_annotations
= node
5420 if node
!= null then node
.parent
= self
5424 redef fun visit_all
(v
: Visitor)
5426 v
.enter_visit
(_n_float
)
5427 v
.enter_visit
(_n_annotations
)
5430 redef class ACharExpr
5431 init init_acharexpr
(
5432 n_char
: nullable TChar,
5433 n_annotations
: nullable AAnnotations
5436 _n_char
= n_char
.as(not null)
5437 n_char
.parent
= self
5438 _n_annotations
= n_annotations
5439 if n_annotations
!= null then n_annotations
.parent
= self
5442 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5444 if _n_char
== old_child
then
5445 n_char
= new_child
.as(TChar)
5448 if _n_annotations
== old_child
then
5449 n_annotations
= new_child
.as(nullable AAnnotations)
5454 redef fun n_char
=(node
)
5459 redef fun n_annotations
=(node
)
5461 _n_annotations
= node
5462 if node
!= null then node
.parent
= self
5466 redef fun visit_all
(v
: Visitor)
5468 v
.enter_visit
(_n_char
)
5469 v
.enter_visit
(_n_annotations
)
5472 redef class AStringExpr
5473 init init_astringexpr
(
5474 n_string
: nullable TString,
5475 n_annotations
: nullable AAnnotations
5478 _n_string
= n_string
.as(not null)
5479 n_string
.parent
= self
5480 _n_annotations
= n_annotations
5481 if n_annotations
!= null then n_annotations
.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(TString)
5490 if _n_annotations
== old_child
then
5491 n_annotations
= new_child
.as(nullable AAnnotations)
5496 redef fun n_string
=(node
)
5501 redef fun n_annotations
=(node
)
5503 _n_annotations
= node
5504 if node
!= null then node
.parent
= self
5508 redef fun visit_all
(v
: Visitor)
5510 v
.enter_visit
(_n_string
)
5511 v
.enter_visit
(_n_annotations
)
5514 redef class AStartStringExpr
5515 init init_astartstringexpr
(
5516 n_string
: nullable TStartString
5519 _n_string
= n_string
.as(not null)
5520 n_string
.parent
= self
5523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5525 if _n_string
== old_child
then
5526 n_string
= new_child
.as(TStartString)
5531 redef fun n_string
=(node
)
5538 redef fun visit_all
(v
: Visitor)
5540 v
.enter_visit
(_n_string
)
5543 redef class AMidStringExpr
5544 init init_amidstringexpr
(
5545 n_string
: nullable TMidString
5548 _n_string
= n_string
.as(not null)
5549 n_string
.parent
= self
5552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5554 if _n_string
== old_child
then
5555 n_string
= new_child
.as(TMidString)
5560 redef fun n_string
=(node
)
5567 redef fun visit_all
(v
: Visitor)
5569 v
.enter_visit
(_n_string
)
5572 redef class AEndStringExpr
5573 init init_aendstringexpr
(
5574 n_string
: nullable TEndString
5577 _n_string
= n_string
.as(not null)
5578 n_string
.parent
= self
5581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5583 if _n_string
== old_child
then
5584 n_string
= new_child
.as(TEndString)
5589 redef fun n_string
=(node
)
5596 redef fun visit_all
(v
: Visitor)
5598 v
.enter_visit
(_n_string
)
5601 redef class ASuperstringExpr
5602 init init_asuperstringexpr
(
5603 n_exprs
: Collection[Object], # Should be Collection[AExpr]
5604 n_annotations
: nullable AAnnotations
5607 self.n_exprs
.unsafe_add_all
(n_exprs
)
5608 _n_annotations
= n_annotations
5609 if n_annotations
!= null then n_annotations
.parent
= self
5612 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5614 if n_exprs
.replace_child
(old_child
, new_child
) then return
5615 if _n_annotations
== old_child
then
5616 n_annotations
= new_child
.as(nullable AAnnotations)
5621 redef fun n_annotations
=(node
)
5623 _n_annotations
= node
5624 if node
!= null then node
.parent
= self
5628 redef fun visit_all
(v
: Visitor)
5630 n_exprs
.visit_all
(v
)
5631 v
.enter_visit
(_n_annotations
)
5634 redef class AParExpr
5635 init init_aparexpr
(
5636 n_opar
: nullable TOpar,
5637 n_expr
: nullable AExpr,
5638 n_cpar
: nullable TCpar,
5639 n_annotations
: nullable AAnnotations
5642 _n_opar
= n_opar
.as(not null)
5643 n_opar
.parent
= self
5644 _n_expr
= n_expr
.as(not null)
5645 n_expr
.parent
= self
5646 _n_cpar
= n_cpar
.as(not null)
5647 n_cpar
.parent
= self
5648 _n_annotations
= n_annotations
5649 if n_annotations
!= null then n_annotations
.parent
= self
5652 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5654 if _n_opar
== old_child
then
5655 n_opar
= new_child
.as(TOpar)
5658 if _n_expr
== old_child
then
5659 n_expr
= new_child
.as(AExpr)
5662 if _n_cpar
== old_child
then
5663 n_cpar
= new_child
.as(TCpar)
5666 if _n_annotations
== old_child
then
5667 n_annotations
= new_child
.as(nullable AAnnotations)
5672 redef fun n_opar
=(node
)
5677 redef fun n_expr
=(node
)
5682 redef fun n_cpar
=(node
)
5687 redef fun n_annotations
=(node
)
5689 _n_annotations
= node
5690 if node
!= null then node
.parent
= self
5694 redef fun visit_all
(v
: Visitor)
5696 v
.enter_visit
(_n_opar
)
5697 v
.enter_visit
(_n_expr
)
5698 v
.enter_visit
(_n_cpar
)
5699 v
.enter_visit
(_n_annotations
)
5702 redef class AAsCastExpr
5703 init init_aascastexpr
(
5704 n_expr
: nullable AExpr,
5705 n_kwas
: nullable TKwas,
5706 n_opar
: nullable TOpar,
5707 n_type
: nullable AType,
5708 n_cpar
: nullable TCpar
5711 _n_expr
= n_expr
.as(not null)
5712 n_expr
.parent
= self
5713 _n_kwas
= n_kwas
.as(not null)
5714 n_kwas
.parent
= self
5716 if n_opar
!= null then n_opar
.parent
= self
5717 _n_type
= n_type
.as(not null)
5718 n_type
.parent
= self
5720 if n_cpar
!= null then n_cpar
.parent
= self
5723 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5725 if _n_expr
== old_child
then
5726 n_expr
= new_child
.as(AExpr)
5729 if _n_kwas
== old_child
then
5730 n_kwas
= new_child
.as(TKwas)
5733 if _n_opar
== old_child
then
5734 n_opar
= new_child
.as(nullable TOpar)
5737 if _n_type
== old_child
then
5738 n_type
= new_child
.as(AType)
5741 if _n_cpar
== old_child
then
5742 n_cpar
= new_child
.as(nullable TCpar)
5747 redef fun n_expr
=(node
)
5752 redef fun n_kwas
=(node
)
5757 redef fun n_opar
=(node
)
5760 if node
!= null then node
.parent
= self
5762 redef fun n_type
=(node
)
5767 redef fun n_cpar
=(node
)
5770 if node
!= null then node
.parent
= self
5774 redef fun visit_all
(v
: Visitor)
5776 v
.enter_visit
(_n_expr
)
5777 v
.enter_visit
(_n_kwas
)
5778 v
.enter_visit
(_n_opar
)
5779 v
.enter_visit
(_n_type
)
5780 v
.enter_visit
(_n_cpar
)
5783 redef class AAsNotnullExpr
5784 init init_aasnotnullexpr
(
5785 n_expr
: nullable AExpr,
5786 n_kwas
: nullable TKwas,
5787 n_opar
: nullable TOpar,
5788 n_kwnot
: nullable TKwnot,
5789 n_kwnull
: nullable TKwnull,
5790 n_cpar
: nullable TCpar
5793 _n_expr
= n_expr
.as(not null)
5794 n_expr
.parent
= self
5795 _n_kwas
= n_kwas
.as(not null)
5796 n_kwas
.parent
= self
5798 if n_opar
!= null then n_opar
.parent
= self
5799 _n_kwnot
= n_kwnot
.as(not null)
5800 n_kwnot
.parent
= self
5801 _n_kwnull
= n_kwnull
.as(not null)
5802 n_kwnull
.parent
= self
5804 if n_cpar
!= null then n_cpar
.parent
= self
5807 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5809 if _n_expr
== old_child
then
5810 n_expr
= new_child
.as(AExpr)
5813 if _n_kwas
== old_child
then
5814 n_kwas
= new_child
.as(TKwas)
5817 if _n_opar
== old_child
then
5818 n_opar
= new_child
.as(nullable TOpar)
5821 if _n_kwnot
== old_child
then
5822 n_kwnot
= new_child
.as(TKwnot)
5825 if _n_kwnull
== old_child
then
5826 n_kwnull
= new_child
.as(TKwnull)
5829 if _n_cpar
== old_child
then
5830 n_cpar
= new_child
.as(nullable TCpar)
5835 redef fun n_expr
=(node
)
5840 redef fun n_kwas
=(node
)
5845 redef fun n_opar
=(node
)
5848 if node
!= null then node
.parent
= self
5850 redef fun n_kwnot
=(node
)
5855 redef fun n_kwnull
=(node
)
5860 redef fun n_cpar
=(node
)
5863 if node
!= null then node
.parent
= self
5867 redef fun visit_all
(v
: Visitor)
5869 v
.enter_visit
(_n_expr
)
5870 v
.enter_visit
(_n_kwas
)
5871 v
.enter_visit
(_n_opar
)
5872 v
.enter_visit
(_n_kwnot
)
5873 v
.enter_visit
(_n_kwnull
)
5874 v
.enter_visit
(_n_cpar
)
5877 redef class AIssetAttrExpr
5878 init init_aissetattrexpr
(
5879 n_kwisset
: nullable TKwisset,
5880 n_expr
: nullable AExpr,
5881 n_id
: nullable TAttrid
5884 _n_kwisset
= n_kwisset
.as(not null)
5885 n_kwisset
.parent
= self
5886 _n_expr
= n_expr
.as(not null)
5887 n_expr
.parent
= self
5888 _n_id
= n_id
.as(not null)
5892 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5894 if _n_kwisset
== old_child
then
5895 n_kwisset
= new_child
.as(TKwisset)
5898 if _n_expr
== old_child
then
5899 n_expr
= new_child
.as(AExpr)
5902 if _n_id
== old_child
then
5903 n_id
= new_child
.as(TAttrid)
5908 redef fun n_kwisset
=(node
)
5913 redef fun n_expr
=(node
)
5918 redef fun n_id
=(node
)
5925 redef fun visit_all
(v
: Visitor)
5927 v
.enter_visit
(_n_kwisset
)
5928 v
.enter_visit
(_n_expr
)
5929 v
.enter_visit
(_n_id
)
5932 redef class ADebugTypeExpr
5933 init init_adebugtypeexpr
(
5934 n_kwdebug
: nullable TKwdebug,
5935 n_kwtype
: nullable TKwtype,
5936 n_expr
: nullable AExpr,
5937 n_type
: nullable AType
5940 _n_kwdebug
= n_kwdebug
.as(not null)
5941 n_kwdebug
.parent
= self
5942 _n_kwtype
= n_kwtype
.as(not null)
5943 n_kwtype
.parent
= self
5944 _n_expr
= n_expr
.as(not null)
5945 n_expr
.parent
= self
5946 _n_type
= n_type
.as(not null)
5947 n_type
.parent
= self
5950 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5952 if _n_kwdebug
== old_child
then
5953 n_kwdebug
= new_child
.as(TKwdebug)
5956 if _n_kwtype
== old_child
then
5957 n_kwtype
= new_child
.as(TKwtype)
5960 if _n_expr
== old_child
then
5961 n_expr
= new_child
.as(AExpr)
5964 if _n_type
== old_child
then
5965 n_type
= new_child
.as(AType)
5970 redef fun n_kwdebug
=(node
)
5975 redef fun n_kwtype
=(node
)
5980 redef fun n_expr
=(node
)
5985 redef fun n_type
=(node
)
5992 redef fun visit_all
(v
: Visitor)
5994 v
.enter_visit
(_n_kwdebug
)
5995 v
.enter_visit
(_n_kwtype
)
5996 v
.enter_visit
(_n_expr
)
5997 v
.enter_visit
(_n_type
)
6000 redef class AVarargExpr
6001 init init_avarargexpr
(
6002 n_expr
: nullable AExpr,
6003 n_dotdotdot
: nullable TDotdotdot
6006 _n_expr
= n_expr
.as(not null)
6007 n_expr
.parent
= self
6008 _n_dotdotdot
= n_dotdotdot
.as(not null)
6009 n_dotdotdot
.parent
= self
6012 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6014 if _n_expr
== old_child
then
6015 n_expr
= new_child
.as(AExpr)
6018 if _n_dotdotdot
== old_child
then
6019 n_dotdotdot
= new_child
.as(TDotdotdot)
6024 redef fun n_expr
=(node
)
6029 redef fun n_dotdotdot
=(node
)
6036 redef fun visit_all
(v
: Visitor)
6038 v
.enter_visit
(_n_expr
)
6039 v
.enter_visit
(_n_dotdotdot
)
6042 redef class AListExprs
6043 init init_alistexprs
(
6044 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6047 self.n_exprs
.unsafe_add_all
(n_exprs
)
6050 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6052 if n_exprs
.replace_child
(old_child
, new_child
) then return
6057 redef fun visit_all
(v
: Visitor)
6059 n_exprs
.visit_all
(v
)
6062 redef class AParExprs
6063 init init_aparexprs
(
6064 n_opar
: nullable TOpar,
6065 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6066 n_cpar
: nullable TCpar
6069 _n_opar
= n_opar
.as(not null)
6070 n_opar
.parent
= self
6071 self.n_exprs
.unsafe_add_all
(n_exprs
)
6072 _n_cpar
= n_cpar
.as(not null)
6073 n_cpar
.parent
= self
6076 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6078 if _n_opar
== old_child
then
6079 n_opar
= new_child
.as(TOpar)
6082 if n_exprs
.replace_child
(old_child
, new_child
) then return
6083 if _n_cpar
== old_child
then
6084 n_cpar
= new_child
.as(TCpar)
6089 redef fun n_opar
=(node
)
6094 redef fun n_cpar
=(node
)
6101 redef fun visit_all
(v
: Visitor)
6103 v
.enter_visit
(_n_opar
)
6104 n_exprs
.visit_all
(v
)
6105 v
.enter_visit
(_n_cpar
)
6108 redef class ABraExprs
6109 init init_abraexprs
(
6110 n_obra
: nullable TObra,
6111 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6112 n_cbra
: nullable TCbra
6115 _n_obra
= n_obra
.as(not null)
6116 n_obra
.parent
= self
6117 self.n_exprs
.unsafe_add_all
(n_exprs
)
6118 _n_cbra
= n_cbra
.as(not null)
6119 n_cbra
.parent
= self
6122 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6124 if _n_obra
== old_child
then
6125 n_obra
= new_child
.as(TObra)
6128 if n_exprs
.replace_child
(old_child
, new_child
) then return
6129 if _n_cbra
== old_child
then
6130 n_cbra
= new_child
.as(TCbra)
6135 redef fun n_obra
=(node
)
6140 redef fun n_cbra
=(node
)
6147 redef fun visit_all
(v
: Visitor)
6149 v
.enter_visit
(_n_obra
)
6150 n_exprs
.visit_all
(v
)
6151 v
.enter_visit
(_n_cbra
)
6154 redef class APlusAssignOp
6155 init init_aplusassignop
(
6156 n_pluseq
: nullable TPluseq
6159 _n_pluseq
= n_pluseq
.as(not null)
6160 n_pluseq
.parent
= self
6163 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6165 if _n_pluseq
== old_child
then
6166 n_pluseq
= new_child
.as(TPluseq)
6171 redef fun n_pluseq
=(node
)
6178 redef fun visit_all
(v
: Visitor)
6180 v
.enter_visit
(_n_pluseq
)
6183 redef class AMinusAssignOp
6184 init init_aminusassignop
(
6185 n_minuseq
: nullable TMinuseq
6188 _n_minuseq
= n_minuseq
.as(not null)
6189 n_minuseq
.parent
= self
6192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6194 if _n_minuseq
== old_child
then
6195 n_minuseq
= new_child
.as(TMinuseq)
6200 redef fun n_minuseq
=(node
)
6207 redef fun visit_all
(v
: Visitor)
6209 v
.enter_visit
(_n_minuseq
)
6212 redef class AModuleName
6213 init init_amodulename
(
6214 n_quad
: nullable TQuad,
6215 n_path
: Collection[Object], # Should be Collection[TId]
6220 if n_quad
!= null then n_quad
.parent
= self
6221 self.n_path
.unsafe_add_all
(n_path
)
6222 _n_id
= n_id
.as(not null)
6226 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6228 if _n_quad
== old_child
then
6229 n_quad
= new_child
.as(nullable TQuad)
6232 if n_path
.replace_child
(old_child
, new_child
) then return
6233 if _n_id
== old_child
then
6234 n_id
= new_child
.as(TId)
6239 redef fun n_quad
=(node
)
6242 if node
!= null then node
.parent
= self
6244 redef fun n_id
=(node
)
6251 redef fun visit_all
(v
: Visitor)
6253 v
.enter_visit
(_n_quad
)
6255 v
.enter_visit
(_n_id
)
6258 redef class AExternCalls
6259 init init_aexterncalls
(
6260 n_kwimport
: nullable TKwimport,
6261 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
6264 _n_kwimport
= n_kwimport
.as(not null)
6265 n_kwimport
.parent
= self
6266 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
6269 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6271 if _n_kwimport
== old_child
then
6272 n_kwimport
= new_child
.as(TKwimport)
6275 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
6278 redef fun n_kwimport
=(node
)
6285 redef fun visit_all
(v
: Visitor)
6287 v
.enter_visit
(_n_kwimport
)
6288 n_extern_calls
.visit_all
(v
)
6291 redef class AExternCall
6292 init init_aexterncall
6296 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6302 redef fun visit_all
(v
: Visitor)
6306 redef class ASuperExternCall
6307 init init_asuperexterncall
(
6308 n_kwsuper
: nullable TKwsuper
6311 _n_kwsuper
= n_kwsuper
.as(not null)
6312 n_kwsuper
.parent
= self
6315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6317 if _n_kwsuper
== old_child
then
6318 n_kwsuper
= new_child
.as(TKwsuper)
6323 redef fun n_kwsuper
=(node
)
6330 redef fun visit_all
(v
: Visitor)
6332 v
.enter_visit
(_n_kwsuper
)
6335 redef class ALocalPropExternCall
6336 init init_alocalpropexterncall
(
6337 n_methid
: nullable AMethid
6340 _n_methid
= n_methid
.as(not null)
6341 n_methid
.parent
= self
6344 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6346 if _n_methid
== old_child
then
6347 n_methid
= new_child
.as(AMethid)
6352 redef fun n_methid
=(node
)
6359 redef fun visit_all
(v
: Visitor)
6361 v
.enter_visit
(_n_methid
)
6364 redef class AFullPropExternCall
6365 init init_afullpropexterncall
(
6366 n_type
: nullable AType,
6367 n_dot
: nullable TDot,
6368 n_methid
: nullable AMethid
6371 _n_type
= n_type
.as(not null)
6372 n_type
.parent
= self
6374 if n_dot
!= null then n_dot
.parent
= self
6375 _n_methid
= n_methid
.as(not null)
6376 n_methid
.parent
= self
6379 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6381 if _n_type
== old_child
then
6382 n_type
= new_child
.as(AType)
6385 if _n_dot
== old_child
then
6386 n_dot
= new_child
.as(nullable TDot)
6389 if _n_methid
== old_child
then
6390 n_methid
= new_child
.as(AMethid)
6395 redef fun n_type
=(node
)
6400 redef fun n_dot
=(node
)
6403 if node
!= null then node
.parent
= self
6405 redef fun n_methid
=(node
)
6412 redef fun visit_all
(v
: Visitor)
6414 v
.enter_visit
(_n_type
)
6415 v
.enter_visit
(_n_dot
)
6416 v
.enter_visit
(_n_methid
)
6419 redef class AInitPropExternCall
6420 init init_ainitpropexterncall
(
6421 n_type
: nullable AType
6424 _n_type
= n_type
.as(not null)
6425 n_type
.parent
= self
6428 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6430 if _n_type
== old_child
then
6431 n_type
= new_child
.as(AType)
6436 redef fun n_type
=(node
)
6443 redef fun visit_all
(v
: Visitor)
6445 v
.enter_visit
(_n_type
)
6448 redef class ACastAsExternCall
6449 init init_acastasexterncall
(
6450 n_from_type
: nullable AType,
6451 n_dot
: nullable TDot,
6452 n_kwas
: nullable TKwas,
6453 n_to_type
: nullable AType
6456 _n_from_type
= n_from_type
.as(not null)
6457 n_from_type
.parent
= self
6459 if n_dot
!= null then n_dot
.parent
= self
6460 _n_kwas
= n_kwas
.as(not null)
6461 n_kwas
.parent
= self
6462 _n_to_type
= n_to_type
.as(not null)
6463 n_to_type
.parent
= self
6466 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6468 if _n_from_type
== old_child
then
6469 n_from_type
= new_child
.as(AType)
6472 if _n_dot
== old_child
then
6473 n_dot
= new_child
.as(nullable TDot)
6476 if _n_kwas
== old_child
then
6477 n_kwas
= new_child
.as(TKwas)
6480 if _n_to_type
== old_child
then
6481 n_to_type
= new_child
.as(AType)
6486 redef fun n_from_type
=(node
)
6491 redef fun n_dot
=(node
)
6494 if node
!= null then node
.parent
= self
6496 redef fun n_kwas
=(node
)
6501 redef fun n_to_type
=(node
)
6508 redef fun visit_all
(v
: Visitor)
6510 v
.enter_visit
(_n_from_type
)
6511 v
.enter_visit
(_n_dot
)
6512 v
.enter_visit
(_n_kwas
)
6513 v
.enter_visit
(_n_to_type
)
6516 redef class AAsNullableExternCall
6517 init init_aasnullableexterncall
(
6518 n_type
: nullable AType,
6519 n_kwas
: nullable TKwas,
6520 n_kwnullable
: nullable TKwnullable
6523 _n_type
= n_type
.as(not null)
6524 n_type
.parent
= self
6525 _n_kwas
= n_kwas
.as(not null)
6526 n_kwas
.parent
= self
6527 _n_kwnullable
= n_kwnullable
.as(not null)
6528 n_kwnullable
.parent
= self
6531 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6533 if _n_type
== old_child
then
6534 n_type
= new_child
.as(AType)
6537 if _n_kwas
== old_child
then
6538 n_kwas
= new_child
.as(TKwas)
6541 if _n_kwnullable
== old_child
then
6542 n_kwnullable
= new_child
.as(TKwnullable)
6547 redef fun n_type
=(node
)
6552 redef fun n_kwas
=(node
)
6557 redef fun n_kwnullable
=(node
)
6559 _n_kwnullable
= node
6564 redef fun visit_all
(v
: Visitor)
6566 v
.enter_visit
(_n_type
)
6567 v
.enter_visit
(_n_kwas
)
6568 v
.enter_visit
(_n_kwnullable
)
6571 redef class AAsNotNullableExternCall
6572 init init_aasnotnullableexterncall
(
6573 n_type
: nullable AType,
6574 n_kwas
: nullable TKwas,
6575 n_kwnot
: nullable TKwnot,
6576 n_kwnullable
: nullable TKwnullable
6579 _n_type
= n_type
.as(not null)
6580 n_type
.parent
= self
6581 _n_kwas
= n_kwas
.as(not null)
6582 n_kwas
.parent
= self
6583 _n_kwnot
= n_kwnot
.as(not null)
6584 n_kwnot
.parent
= self
6585 _n_kwnullable
= n_kwnullable
.as(not null)
6586 n_kwnullable
.parent
= self
6589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6591 if _n_type
== old_child
then
6592 n_type
= new_child
.as(AType)
6595 if _n_kwas
== old_child
then
6596 n_kwas
= new_child
.as(TKwas)
6599 if _n_kwnot
== old_child
then
6600 n_kwnot
= new_child
.as(TKwnot)
6603 if _n_kwnullable
== old_child
then
6604 n_kwnullable
= new_child
.as(TKwnullable)
6609 redef fun n_type
=(node
)
6614 redef fun n_kwas
=(node
)
6619 redef fun n_kwnot
=(node
)
6624 redef fun n_kwnullable
=(node
)
6626 _n_kwnullable
= node
6631 redef fun visit_all
(v
: Visitor)
6633 v
.enter_visit
(_n_type
)
6634 v
.enter_visit
(_n_kwas
)
6635 v
.enter_visit
(_n_kwnot
)
6636 v
.enter_visit
(_n_kwnullable
)
6639 redef class AInLanguage
6640 init init_ainlanguage
(
6641 n_kwin
: nullable TKwin,
6642 n_string
: nullable TString
6645 _n_kwin
= n_kwin
.as(not null)
6646 n_kwin
.parent
= self
6647 _n_string
= n_string
.as(not null)
6648 n_string
.parent
= self
6651 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6653 if _n_kwin
== old_child
then
6654 n_kwin
= new_child
.as(TKwin)
6657 if _n_string
== old_child
then
6658 n_string
= new_child
.as(TString)
6663 redef fun n_kwin
=(node
)
6668 redef fun n_string
=(node
)
6675 redef fun visit_all
(v
: Visitor)
6677 v
.enter_visit
(_n_kwin
)
6678 v
.enter_visit
(_n_string
)
6681 redef class AExternCodeBlock
6682 init init_aexterncodeblock
(
6683 n_in_language
: nullable AInLanguage,
6684 n_extern_code_segment
: nullable TExternCodeSegment
6687 _n_in_language
= n_in_language
6688 if n_in_language
!= null then n_in_language
.parent
= self
6689 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
6690 n_extern_code_segment
.parent
= self
6693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6695 if _n_in_language
== old_child
then
6696 n_in_language
= new_child
.as(nullable AInLanguage)
6699 if _n_extern_code_segment
== old_child
then
6700 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
6705 redef fun n_in_language
=(node
)
6707 _n_in_language
= node
6708 if node
!= null then node
.parent
= self
6710 redef fun n_extern_code_segment
=(node
)
6712 _n_extern_code_segment
= node
6717 redef fun visit_all
(v
: Visitor)
6719 v
.enter_visit
(_n_in_language
)
6720 v
.enter_visit
(_n_extern_code_segment
)
6723 redef class AQualified
6724 init init_aqualified
(
6725 n_id
: Collection[Object], # Should be Collection[TId]
6726 n_classid
: nullable TClassid
6729 self.n_id
.unsafe_add_all
(n_id
)
6730 _n_classid
= n_classid
6731 if n_classid
!= null then n_classid
.parent
= self
6734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6736 if n_id
.replace_child
(old_child
, new_child
) then return
6737 if _n_classid
== old_child
then
6738 n_classid
= new_child
.as(nullable TClassid)
6743 redef fun n_classid
=(node
)
6746 if node
!= null then node
.parent
= self
6750 redef fun visit_all
(v
: Visitor)
6753 v
.enter_visit
(_n_classid
)
6758 n_comment
: Collection[Object] # Should be Collection[TComment]
6761 self.n_comment
.unsafe_add_all
(n_comment
)
6764 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6766 if n_comment
.replace_child
(old_child
, new_child
) then return
6771 redef fun visit_all
(v
: Visitor)
6773 n_comment
.visit_all
(v
)
6776 redef class AAnnotations
6777 init init_aannotations
(
6779 n_opar
: nullable TOpar,
6780 n_items
: Collection[Object], # Should be Collection[AAnnotation]
6781 n_cpar
: nullable TCpar
6785 if n_at
!= null then n_at
.parent
= self
6787 if n_opar
!= null then n_opar
.parent
= self
6788 self.n_items
.unsafe_add_all
(n_items
)
6790 if n_cpar
!= null then n_cpar
.parent
= self
6793 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6795 if _n_at
== old_child
then
6796 n_at
= new_child
.as(nullable TAt)
6799 if _n_opar
== old_child
then
6800 n_opar
= new_child
.as(nullable TOpar)
6803 if n_items
.replace_child
(old_child
, new_child
) then return
6804 if _n_cpar
== old_child
then
6805 n_cpar
= new_child
.as(nullable TCpar)
6810 redef fun n_at
=(node
)
6813 if node
!= null then node
.parent
= self
6815 redef fun n_opar
=(node
)
6818 if node
!= null then node
.parent
= self
6820 redef fun n_cpar
=(node
)
6823 if node
!= null then node
.parent
= self
6827 redef fun visit_all
(v
: Visitor)
6829 v
.enter_visit
(_n_at
)
6830 v
.enter_visit
(_n_opar
)
6831 n_items
.visit_all
(v
)
6832 v
.enter_visit
(_n_cpar
)
6835 redef class AAnnotation
6836 init init_aannotation
(
6837 n_doc
: nullable ADoc,
6838 n_kwredef
: nullable TKwredef,
6839 n_visibility
: nullable AVisibility,
6840 n_atid
: nullable AAtid,
6841 n_opar
: nullable TOpar,
6842 n_args
: Collection[Object], # Should be Collection[AAtArg]
6843 n_cpar
: nullable TCpar,
6844 n_annotations
: nullable AAnnotations
6848 if n_doc
!= null then n_doc
.parent
= self
6849 _n_kwredef
= n_kwredef
6850 if n_kwredef
!= null then n_kwredef
.parent
= self
6851 _n_visibility
= n_visibility
6852 if n_visibility
!= null then n_visibility
.parent
= self
6853 _n_atid
= n_atid
.as(not null)
6854 n_atid
.parent
= self
6856 if n_opar
!= null then n_opar
.parent
= self
6857 self.n_args
.unsafe_add_all
(n_args
)
6859 if n_cpar
!= null then n_cpar
.parent
= self
6860 _n_annotations
= n_annotations
6861 if n_annotations
!= null then n_annotations
.parent
= self
6864 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6866 if _n_doc
== old_child
then
6867 n_doc
= new_child
.as(nullable ADoc)
6870 if _n_kwredef
== old_child
then
6871 n_kwredef
= new_child
.as(nullable TKwredef)
6874 if _n_visibility
== old_child
then
6875 n_visibility
= new_child
.as(nullable AVisibility)
6878 if _n_atid
== old_child
then
6879 n_atid
= new_child
.as(AAtid)
6882 if _n_opar
== old_child
then
6883 n_opar
= new_child
.as(nullable TOpar)
6886 if n_args
.replace_child
(old_child
, new_child
) then return
6887 if _n_cpar
== old_child
then
6888 n_cpar
= new_child
.as(nullable TCpar)
6891 if _n_annotations
== old_child
then
6892 n_annotations
= new_child
.as(nullable AAnnotations)
6897 redef fun n_doc
=(node
)
6900 if node
!= null then node
.parent
= self
6902 redef fun n_kwredef
=(node
)
6905 if node
!= null then node
.parent
= self
6907 redef fun n_visibility
=(node
)
6909 _n_visibility
= node
6910 if node
!= null then node
.parent
= self
6912 redef fun n_atid
=(node
)
6917 redef fun n_opar
=(node
)
6920 if node
!= null then node
.parent
= self
6922 redef fun n_cpar
=(node
)
6925 if node
!= null then node
.parent
= self
6927 redef fun n_annotations
=(node
)
6929 _n_annotations
= node
6930 if node
!= null then node
.parent
= self
6934 redef fun visit_all
(v
: Visitor)
6936 v
.enter_visit
(_n_doc
)
6937 v
.enter_visit
(_n_kwredef
)
6938 v
.enter_visit
(_n_visibility
)
6939 v
.enter_visit
(_n_atid
)
6940 v
.enter_visit
(_n_opar
)
6942 v
.enter_visit
(_n_cpar
)
6943 v
.enter_visit
(_n_annotations
)
6946 redef class ATypeAtArg
6947 init init_atypeatarg
(
6948 n_type
: nullable AType
6951 _n_type
= n_type
.as(not null)
6952 n_type
.parent
= self
6955 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6957 if _n_type
== old_child
then
6958 n_type
= new_child
.as(AType)
6963 redef fun n_type
=(node
)
6970 redef fun visit_all
(v
: Visitor)
6972 v
.enter_visit
(_n_type
)
6975 redef class AExprAtArg
6976 init init_aexpratarg
(
6977 n_expr
: nullable AExpr
6980 _n_expr
= n_expr
.as(not null)
6981 n_expr
.parent
= self
6984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6986 if _n_expr
== old_child
then
6987 n_expr
= new_child
.as(AExpr)
6992 redef fun n_expr
=(node
)
6999 redef fun visit_all
(v
: Visitor)
7001 v
.enter_visit
(_n_expr
)
7004 redef class AAtAtArg
7005 init init_aatatarg
(
7006 n_annotations
: nullable AAnnotations
7009 _n_annotations
= n_annotations
.as(not null)
7010 n_annotations
.parent
= self
7013 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7015 if _n_annotations
== old_child
then
7016 n_annotations
= new_child
.as(AAnnotations)
7021 redef fun n_annotations
=(node
)
7023 _n_annotations
= node
7028 redef fun visit_all
(v
: Visitor)
7030 v
.enter_visit
(_n_annotations
)
7038 _n_id
= n_id
.as(not null)
7042 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7044 if _n_id
== old_child
then
7045 n_id
= new_child
.as(TId)
7050 redef fun n_id
=(node
)
7057 redef fun visit_all
(v
: Visitor)
7059 v
.enter_visit
(_n_id
)
7062 redef class AKwexternAtid
7063 init init_akwexternatid
(
7064 n_id
: nullable TKwextern
7067 _n_id
= n_id
.as(not null)
7071 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7073 if _n_id
== old_child
then
7074 n_id
= new_child
.as(TKwextern)
7079 redef fun n_id
=(node
)
7086 redef fun visit_all
(v
: Visitor)
7088 v
.enter_visit
(_n_id
)
7091 redef class AKwabstractAtid
7092 init init_akwabstractatid
(
7093 n_id
: nullable TKwabstract
7096 _n_id
= n_id
.as(not null)
7100 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7102 if _n_id
== old_child
then
7103 n_id
= new_child
.as(TKwabstract)
7108 redef fun n_id
=(node
)
7115 redef fun visit_all
(v
: Visitor)
7117 v
.enter_visit
(_n_id
)
7120 redef class AKwimportAtid
7121 init init_akwimportatid
(
7122 n_id
: nullable TKwimport
7125 _n_id
= n_id
.as(not null)
7129 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7131 if _n_id
== old_child
then
7132 n_id
= new_child
.as(TKwimport)
7137 redef fun n_id
=(node
)
7144 redef fun visit_all
(v
: Visitor)
7146 v
.enter_visit
(_n_id
)
7151 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7153 if _n_base
== old_child
then
7154 if new_child
== null then
7156 new_child
.parent
= self
7157 assert new_child
isa AModule
7160 old_child
.parent
= null
7165 redef fun visit_all
(v
: Visitor)
7167 if _n_base
!= null then
7168 v
.enter_visit
(_n_base
.as(not null))
7170 v
.enter_visit
(_n_eof
)