1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
is no_warning
("missing-doc")
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_obra
: nullable TObra,
391 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
392 n_cbra
: nullable TCbra,
393 n_extern_code_block
: nullable AExternCodeBlock,
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
409 if n_obra
!= null then n_obra
.parent
= self
410 self.n_formaldefs
.unsafe_add_all
(n_formaldefs
)
412 if n_cbra
!= null then n_cbra
.parent
= self
413 _n_extern_code_block
= n_extern_code_block
414 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
415 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
416 _n_kwend
= n_kwend
.as(not null)
417 n_kwend
.parent
= self
420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
422 if _n_doc
== old_child
then
423 n_doc
= new_child
.as(nullable ADoc)
426 if _n_kwredef
== old_child
then
427 n_kwredef
= new_child
.as(nullable TKwredef)
430 if _n_visibility
== old_child
then
431 n_visibility
= new_child
.as(AVisibility)
434 if _n_classkind
== old_child
then
435 n_classkind
= new_child
.as(AClasskind)
438 if _n_id
== old_child
then
439 n_id
= new_child
.as(nullable TClassid)
442 if _n_obra
== old_child
then
443 n_obra
= new_child
.as(nullable TObra)
446 if n_formaldefs
.replace_child
(old_child
, new_child
) then return
447 if _n_cbra
== old_child
then
448 n_cbra
= new_child
.as(nullable TCbra)
451 if _n_extern_code_block
== old_child
then
452 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
455 if n_propdefs
.replace_child
(old_child
, new_child
) then return
456 if _n_kwend
== old_child
then
457 n_kwend
= new_child
.as(TKwend)
462 redef fun n_doc
=(node
)
465 if node
!= null then node
.parent
= self
467 redef fun n_kwredef
=(node
)
470 if node
!= null then node
.parent
= self
472 redef fun n_visibility
=(node
)
477 redef fun n_classkind
=(node
)
482 redef fun n_id
=(node
)
485 if node
!= null then node
.parent
= self
487 redef fun n_obra
=(node
)
490 if node
!= null then node
.parent
= self
492 redef fun n_cbra
=(node
)
495 if node
!= null then node
.parent
= self
497 redef fun n_extern_code_block
=(node
)
499 _n_extern_code_block
= node
500 if node
!= null then node
.parent
= self
502 redef fun n_kwend
=(node
)
509 redef fun visit_all
(v
: Visitor)
511 v
.enter_visit
(_n_doc
)
512 v
.enter_visit
(_n_kwredef
)
513 v
.enter_visit
(_n_visibility
)
514 v
.enter_visit
(_n_classkind
)
516 v
.enter_visit
(_n_obra
)
517 n_formaldefs
.visit_all
(v
)
518 v
.enter_visit
(_n_cbra
)
519 v
.enter_visit
(_n_extern_code_block
)
520 n_propdefs
.visit_all
(v
)
521 v
.enter_visit
(_n_kwend
)
524 redef class ATopClassdef
525 init init_atopclassdef
(
526 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
529 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
532 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
534 if n_propdefs
.replace_child
(old_child
, new_child
) then return
539 redef fun visit_all
(v
: Visitor)
541 n_propdefs
.visit_all
(v
)
544 redef class AMainClassdef
545 init init_amainclassdef
(
546 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
549 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
554 if n_propdefs
.replace_child
(old_child
, new_child
) then return
559 redef fun visit_all
(v
: Visitor)
561 n_propdefs
.visit_all
(v
)
564 redef class AConcreteClasskind
565 init init_aconcreteclasskind
(
566 n_kwclass
: nullable TKwclass
569 _n_kwclass
= n_kwclass
.as(not null)
570 n_kwclass
.parent
= self
573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
575 if _n_kwclass
== old_child
then
576 n_kwclass
= new_child
.as(TKwclass)
581 redef fun n_kwclass
=(node
)
588 redef fun visit_all
(v
: Visitor)
590 v
.enter_visit
(_n_kwclass
)
593 redef class AAbstractClasskind
594 init init_aabstractclasskind
(
595 n_kwabstract
: nullable TKwabstract,
596 n_kwclass
: nullable TKwclass
599 _n_kwabstract
= n_kwabstract
.as(not null)
600 n_kwabstract
.parent
= self
601 _n_kwclass
= n_kwclass
.as(not null)
602 n_kwclass
.parent
= self
605 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
607 if _n_kwabstract
== old_child
then
608 n_kwabstract
= new_child
.as(TKwabstract)
611 if _n_kwclass
== old_child
then
612 n_kwclass
= new_child
.as(TKwclass)
617 redef fun n_kwabstract
=(node
)
622 redef fun n_kwclass
=(node
)
629 redef fun visit_all
(v
: Visitor)
631 v
.enter_visit
(_n_kwabstract
)
632 v
.enter_visit
(_n_kwclass
)
635 redef class AInterfaceClasskind
636 init init_ainterfaceclasskind
(
637 n_kwinterface
: nullable TKwinterface
640 _n_kwinterface
= n_kwinterface
.as(not null)
641 n_kwinterface
.parent
= self
644 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
646 if _n_kwinterface
== old_child
then
647 n_kwinterface
= new_child
.as(TKwinterface)
652 redef fun n_kwinterface
=(node
)
654 _n_kwinterface
= node
659 redef fun visit_all
(v
: Visitor)
661 v
.enter_visit
(_n_kwinterface
)
664 redef class AEnumClasskind
665 init init_aenumclasskind
(
666 n_kwenum
: nullable TKwenum
669 _n_kwenum
= n_kwenum
.as(not null)
670 n_kwenum
.parent
= self
673 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
675 if _n_kwenum
== old_child
then
676 n_kwenum
= new_child
.as(TKwenum)
681 redef fun n_kwenum
=(node
)
688 redef fun visit_all
(v
: Visitor)
690 v
.enter_visit
(_n_kwenum
)
693 redef class AExternClasskind
694 init init_aexternclasskind
(
695 n_kwextern
: nullable TKwextern,
696 n_kwclass
: nullable TKwclass
699 _n_kwextern
= n_kwextern
.as(not null)
700 n_kwextern
.parent
= self
701 _n_kwclass
= n_kwclass
702 if n_kwclass
!= null then n_kwclass
.parent
= self
705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
707 if _n_kwextern
== old_child
then
708 n_kwextern
= new_child
.as(TKwextern)
711 if _n_kwclass
== old_child
then
712 n_kwclass
= new_child
.as(nullable TKwclass)
717 redef fun n_kwextern
=(node
)
722 redef fun n_kwclass
=(node
)
725 if node
!= null then node
.parent
= self
729 redef fun visit_all
(v
: Visitor)
731 v
.enter_visit
(_n_kwextern
)
732 v
.enter_visit
(_n_kwclass
)
735 redef class AFormaldef
736 init init_aformaldef
(
737 n_id
: nullable TClassid,
738 n_type
: nullable AType,
739 n_annotations
: nullable AAnnotations
742 _n_id
= n_id
.as(not null)
745 if n_type
!= null then n_type
.parent
= self
746 _n_annotations
= n_annotations
747 if n_annotations
!= null then n_annotations
.parent
= self
750 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
752 if _n_id
== old_child
then
753 n_id
= new_child
.as(TClassid)
756 if _n_type
== old_child
then
757 n_type
= new_child
.as(nullable AType)
760 if _n_annotations
== old_child
then
761 n_annotations
= new_child
.as(nullable AAnnotations)
766 redef fun n_id
=(node
)
771 redef fun n_type
=(node
)
774 if node
!= null then node
.parent
= self
776 redef fun n_annotations
=(node
)
778 _n_annotations
= node
779 if node
!= null then node
.parent
= self
783 redef fun visit_all
(v
: Visitor)
786 v
.enter_visit
(_n_type
)
787 v
.enter_visit
(_n_annotations
)
790 redef class AAttrPropdef
791 init init_aattrpropdef
(
792 n_doc
: nullable ADoc,
793 n_kwredef
: nullable TKwredef,
794 n_visibility
: nullable AVisibility,
795 n_kwvar
: nullable TKwvar,
797 n_type
: nullable AType,
798 n_assign
: nullable TAssign,
799 n_expr
: nullable AExpr,
800 n_annotations
: nullable AAnnotations,
801 n_kwdo
: nullable TKwdo,
802 n_block
: nullable AExpr,
803 n_kwend
: nullable TKwend
807 if n_doc
!= null then n_doc
.parent
= self
808 _n_kwredef
= n_kwredef
809 if n_kwredef
!= null then n_kwredef
.parent
= self
810 _n_visibility
= n_visibility
.as(not null)
811 n_visibility
.parent
= self
812 _n_kwvar
= n_kwvar
.as(not null)
813 n_kwvar
.parent
= self
814 _n_id2
= n_id2
.as(not null)
817 if n_type
!= null then n_type
.parent
= self
819 if n_assign
!= null then n_assign
.parent
= self
821 if n_expr
!= null then n_expr
.parent
= self
822 _n_annotations
= n_annotations
823 if n_annotations
!= null then n_annotations
.parent
= self
825 if n_kwdo
!= null then n_kwdo
.parent
= self
827 if n_block
!= null then n_block
.parent
= self
829 if n_kwend
!= null then n_kwend
.parent
= self
832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
834 if _n_doc
== old_child
then
835 n_doc
= new_child
.as(nullable ADoc)
838 if _n_kwredef
== old_child
then
839 n_kwredef
= new_child
.as(nullable TKwredef)
842 if _n_visibility
== old_child
then
843 n_visibility
= new_child
.as(AVisibility)
846 if _n_kwvar
== old_child
then
847 n_kwvar
= new_child
.as(TKwvar)
850 if _n_id2
== old_child
then
851 n_id2
= new_child
.as(TId)
854 if _n_type
== old_child
then
855 n_type
= new_child
.as(nullable AType)
858 if _n_assign
== old_child
then
859 n_assign
= new_child
.as(nullable TAssign)
862 if _n_expr
== old_child
then
863 n_expr
= new_child
.as(nullable AExpr)
866 if _n_annotations
== old_child
then
867 n_annotations
= new_child
.as(nullable AAnnotations)
870 if _n_kwdo
== old_child
then
871 n_kwdo
= new_child
.as(nullable TKwdo)
874 if _n_block
== old_child
then
875 n_block
= new_child
.as(nullable AExpr)
878 if _n_kwend
== old_child
then
879 n_kwend
= new_child
.as(nullable TKwend)
884 redef fun n_doc
=(node
)
887 if node
!= null then node
.parent
= self
889 redef fun n_kwredef
=(node
)
892 if node
!= null then node
.parent
= self
894 redef fun n_visibility
=(node
)
899 redef fun n_kwvar
=(node
)
904 redef fun n_id2
=(node
)
909 redef fun n_type
=(node
)
912 if node
!= null then node
.parent
= self
914 redef fun n_assign
=(node
)
917 if node
!= null then node
.parent
= self
919 redef fun n_expr
=(node
)
922 if node
!= null then node
.parent
= self
924 redef fun n_annotations
=(node
)
926 _n_annotations
= node
927 if node
!= null then node
.parent
= self
929 redef fun n_kwdo
=(node
)
932 if node
!= null then node
.parent
= self
934 redef fun n_block
=(node
)
937 if node
!= null then node
.parent
= self
939 redef fun n_kwend
=(node
)
942 if node
!= null then node
.parent
= self
946 redef fun visit_all
(v
: Visitor)
948 v
.enter_visit
(_n_doc
)
949 v
.enter_visit
(_n_kwredef
)
950 v
.enter_visit
(_n_visibility
)
951 v
.enter_visit
(_n_kwvar
)
952 v
.enter_visit
(_n_id2
)
953 v
.enter_visit
(_n_type
)
954 v
.enter_visit
(_n_assign
)
955 v
.enter_visit
(_n_expr
)
956 v
.enter_visit
(_n_annotations
)
957 v
.enter_visit
(_n_kwdo
)
958 v
.enter_visit
(_n_block
)
959 v
.enter_visit
(_n_kwend
)
962 redef class AMainMethPropdef
963 init init_amainmethpropdef
(
964 n_kwredef
: nullable TKwredef,
965 n_block
: nullable AExpr
968 _n_kwredef
= n_kwredef
969 if n_kwredef
!= null then n_kwredef
.parent
= self
971 if n_block
!= null then n_block
.parent
= self
974 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
976 if _n_kwredef
== old_child
then
977 n_kwredef
= new_child
.as(nullable TKwredef)
980 if _n_block
== old_child
then
981 n_block
= new_child
.as(nullable AExpr)
986 redef fun n_kwredef
=(node
)
989 if node
!= null then node
.parent
= self
991 redef fun n_block
=(node
)
994 if node
!= null then node
.parent
= self
998 redef fun visit_all
(v
: Visitor)
1000 v
.enter_visit
(_n_kwredef
)
1001 v
.enter_visit
(_n_block
)
1004 redef class ATypePropdef
1005 init init_atypepropdef
(
1006 n_doc
: nullable ADoc,
1007 n_kwredef
: nullable TKwredef,
1008 n_visibility
: nullable AVisibility,
1009 n_kwtype
: nullable TKwtype,
1010 n_id
: nullable TClassid,
1011 n_type
: nullable AType,
1012 n_annotations
: nullable AAnnotations
1016 if n_doc
!= null then n_doc
.parent
= self
1017 _n_kwredef
= n_kwredef
1018 if n_kwredef
!= null then n_kwredef
.parent
= self
1019 _n_visibility
= n_visibility
.as(not null)
1020 n_visibility
.parent
= self
1021 _n_kwtype
= n_kwtype
.as(not null)
1022 n_kwtype
.parent
= self
1023 _n_id
= n_id
.as(not null)
1025 _n_type
= n_type
.as(not null)
1026 n_type
.parent
= self
1027 _n_annotations
= n_annotations
1028 if n_annotations
!= null then n_annotations
.parent
= self
1031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1033 if _n_doc
== old_child
then
1034 n_doc
= new_child
.as(nullable ADoc)
1037 if _n_kwredef
== old_child
then
1038 n_kwredef
= new_child
.as(nullable TKwredef)
1041 if _n_visibility
== old_child
then
1042 n_visibility
= new_child
.as(AVisibility)
1045 if _n_kwtype
== old_child
then
1046 n_kwtype
= new_child
.as(TKwtype)
1049 if _n_id
== old_child
then
1050 n_id
= new_child
.as(TClassid)
1053 if _n_type
== old_child
then
1054 n_type
= new_child
.as(AType)
1057 if _n_annotations
== old_child
then
1058 n_annotations
= new_child
.as(nullable AAnnotations)
1063 redef fun n_doc
=(node
)
1066 if node
!= null then node
.parent
= self
1068 redef fun n_kwredef
=(node
)
1071 if node
!= null then node
.parent
= self
1073 redef fun n_visibility
=(node
)
1075 _n_visibility
= node
1078 redef fun n_kwtype
=(node
)
1083 redef fun n_id
=(node
)
1088 redef fun n_type
=(node
)
1093 redef fun n_annotations
=(node
)
1095 _n_annotations
= node
1096 if node
!= null then node
.parent
= self
1100 redef fun visit_all
(v
: Visitor)
1102 v
.enter_visit
(_n_doc
)
1103 v
.enter_visit
(_n_kwredef
)
1104 v
.enter_visit
(_n_visibility
)
1105 v
.enter_visit
(_n_kwtype
)
1106 v
.enter_visit
(_n_id
)
1107 v
.enter_visit
(_n_type
)
1108 v
.enter_visit
(_n_annotations
)
1111 redef class AMethPropdef
1112 init init_amethpropdef
(
1113 n_doc
: nullable ADoc,
1114 n_kwredef
: nullable TKwredef,
1115 n_visibility
: nullable AVisibility,
1116 n_kwmeth
: nullable TKwmeth,
1117 n_kwinit
: nullable TKwinit,
1118 n_kwnew
: nullable TKwnew,
1119 n_methid
: nullable AMethid,
1120 n_signature
: nullable ASignature,
1121 n_annotations
: nullable AAnnotations,
1122 n_extern_calls
: nullable AExternCalls,
1123 n_extern_code_block
: nullable AExternCodeBlock,
1124 n_kwdo
: nullable TKwdo,
1125 n_block
: nullable AExpr,
1126 n_kwend
: nullable TKwend
1130 if n_doc
!= null then n_doc
.parent
= self
1131 _n_kwredef
= n_kwredef
1132 if n_kwredef
!= null then n_kwredef
.parent
= self
1133 _n_visibility
= n_visibility
.as(not null)
1134 n_visibility
.parent
= self
1135 _n_kwmeth
= n_kwmeth
1136 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1137 _n_kwinit
= n_kwinit
1138 if n_kwinit
!= null then n_kwinit
.parent
= self
1140 if n_kwnew
!= null then n_kwnew
.parent
= self
1141 _n_methid
= n_methid
1142 if n_methid
!= null then n_methid
.parent
= self
1143 _n_signature
= n_signature
.as(not null)
1144 n_signature
.parent
= self
1145 _n_annotations
= n_annotations
1146 if n_annotations
!= null then n_annotations
.parent
= self
1147 _n_extern_calls
= n_extern_calls
1148 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1149 _n_extern_code_block
= n_extern_code_block
1150 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1152 if n_kwdo
!= null then n_kwdo
.parent
= self
1154 if n_block
!= null then n_block
.parent
= self
1156 if n_kwend
!= null then n_kwend
.parent
= self
1159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1161 if _n_doc
== old_child
then
1162 n_doc
= new_child
.as(nullable ADoc)
1165 if _n_kwredef
== old_child
then
1166 n_kwredef
= new_child
.as(nullable TKwredef)
1169 if _n_visibility
== old_child
then
1170 n_visibility
= new_child
.as(AVisibility)
1173 if _n_kwmeth
== old_child
then
1174 n_kwmeth
= new_child
.as(nullable TKwmeth)
1177 if _n_kwinit
== old_child
then
1178 n_kwinit
= new_child
.as(nullable TKwinit)
1181 if _n_kwnew
== old_child
then
1182 n_kwnew
= new_child
.as(nullable TKwnew)
1185 if _n_methid
== old_child
then
1186 n_methid
= new_child
.as(nullable AMethid)
1189 if _n_signature
== old_child
then
1190 n_signature
= new_child
.as(ASignature)
1193 if _n_annotations
== old_child
then
1194 n_annotations
= new_child
.as(nullable AAnnotations)
1197 if _n_extern_calls
== old_child
then
1198 n_extern_calls
= new_child
.as(nullable AExternCalls)
1201 if _n_extern_code_block
== old_child
then
1202 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1205 if _n_kwdo
== old_child
then
1206 n_kwdo
= new_child
.as(nullable TKwdo)
1209 if _n_block
== old_child
then
1210 n_block
= new_child
.as(nullable AExpr)
1213 if _n_kwend
== old_child
then
1214 n_kwend
= new_child
.as(nullable TKwend)
1219 redef fun n_doc
=(node
)
1222 if node
!= null then node
.parent
= self
1224 redef fun n_kwredef
=(node
)
1227 if node
!= null then node
.parent
= self
1229 redef fun n_visibility
=(node
)
1231 _n_visibility
= node
1234 redef fun n_kwmeth
=(node
)
1237 if node
!= null then node
.parent
= self
1239 redef fun n_kwinit
=(node
)
1242 if node
!= null then node
.parent
= self
1244 redef fun n_kwnew
=(node
)
1247 if node
!= null then node
.parent
= self
1249 redef fun n_methid
=(node
)
1252 if node
!= null then node
.parent
= self
1254 redef fun n_signature
=(node
)
1259 redef fun n_annotations
=(node
)
1261 _n_annotations
= node
1262 if node
!= null then node
.parent
= self
1264 redef fun n_extern_calls
=(node
)
1266 _n_extern_calls
= node
1267 if node
!= null then node
.parent
= self
1269 redef fun n_extern_code_block
=(node
)
1271 _n_extern_code_block
= node
1272 if node
!= null then node
.parent
= self
1274 redef fun n_kwdo
=(node
)
1277 if node
!= null then node
.parent
= self
1279 redef fun n_block
=(node
)
1282 if node
!= null then node
.parent
= self
1284 redef fun n_kwend
=(node
)
1287 if node
!= null then node
.parent
= self
1291 redef fun visit_all
(v
: Visitor)
1293 v
.enter_visit
(_n_doc
)
1294 v
.enter_visit
(_n_kwredef
)
1295 v
.enter_visit
(_n_visibility
)
1296 v
.enter_visit
(_n_kwmeth
)
1297 v
.enter_visit
(_n_kwinit
)
1298 v
.enter_visit
(_n_kwnew
)
1299 v
.enter_visit
(_n_methid
)
1300 v
.enter_visit
(_n_signature
)
1301 v
.enter_visit
(_n_annotations
)
1302 v
.enter_visit
(_n_extern_calls
)
1303 v
.enter_visit
(_n_extern_code_block
)
1304 v
.enter_visit
(_n_kwdo
)
1305 v
.enter_visit
(_n_block
)
1306 v
.enter_visit
(_n_kwend
)
1309 redef class ASuperPropdef
1310 init init_asuperpropdef
(
1311 n_doc
: nullable ADoc,
1312 n_kwredef
: nullable TKwredef,
1313 n_visibility
: nullable AVisibility,
1314 n_kwsuper
: nullable TKwsuper,
1315 n_type
: nullable AType,
1316 n_annotations
: nullable AAnnotations
1320 if n_doc
!= null then n_doc
.parent
= self
1321 _n_kwredef
= n_kwredef
1322 if n_kwredef
!= null then n_kwredef
.parent
= self
1323 _n_visibility
= n_visibility
.as(not null)
1324 n_visibility
.parent
= self
1325 _n_kwsuper
= n_kwsuper
.as(not null)
1326 n_kwsuper
.parent
= self
1327 _n_type
= n_type
.as(not null)
1328 n_type
.parent
= self
1329 _n_annotations
= n_annotations
1330 if n_annotations
!= null then n_annotations
.parent
= self
1333 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1335 if _n_doc
== old_child
then
1336 n_doc
= new_child
.as(nullable ADoc)
1339 if _n_kwredef
== old_child
then
1340 n_kwredef
= new_child
.as(nullable TKwredef)
1343 if _n_visibility
== old_child
then
1344 n_visibility
= new_child
.as(AVisibility)
1347 if _n_kwsuper
== old_child
then
1348 n_kwsuper
= new_child
.as(TKwsuper)
1351 if _n_type
== old_child
then
1352 n_type
= new_child
.as(AType)
1355 if _n_annotations
== old_child
then
1356 n_annotations
= new_child
.as(nullable AAnnotations)
1361 redef fun n_doc
=(node
)
1364 if node
!= null then node
.parent
= self
1366 redef fun n_kwredef
=(node
)
1369 if node
!= null then node
.parent
= self
1371 redef fun n_visibility
=(node
)
1373 _n_visibility
= node
1376 redef fun n_kwsuper
=(node
)
1381 redef fun n_type
=(node
)
1386 redef fun n_annotations
=(node
)
1388 _n_annotations
= node
1389 if node
!= null then node
.parent
= self
1393 redef fun visit_all
(v
: Visitor)
1395 v
.enter_visit
(_n_doc
)
1396 v
.enter_visit
(_n_kwredef
)
1397 v
.enter_visit
(_n_visibility
)
1398 v
.enter_visit
(_n_kwsuper
)
1399 v
.enter_visit
(_n_type
)
1400 v
.enter_visit
(_n_annotations
)
1403 redef class AAnnotPropdef
1404 init init_aannotpropdef
(
1405 n_doc
: nullable ADoc,
1406 n_kwredef
: nullable TKwredef,
1407 n_visibility
: nullable AVisibility,
1408 n_atid
: nullable AAtid,
1409 n_opar
: nullable TOpar,
1410 n_args
: Collection[Object], # Should be Collection[AExpr]
1411 n_cpar
: nullable TCpar,
1412 n_annotations
: nullable AAnnotations
1416 if n_doc
!= null then n_doc
.parent
= self
1417 _n_kwredef
= n_kwredef
1418 if n_kwredef
!= null then n_kwredef
.parent
= self
1419 _n_visibility
= n_visibility
1420 if n_visibility
!= null then n_visibility
.parent
= self
1421 _n_atid
= n_atid
.as(not null)
1422 n_atid
.parent
= self
1424 if n_opar
!= null then n_opar
.parent
= self
1425 self.n_args
.unsafe_add_all
(n_args
)
1427 if n_cpar
!= null then n_cpar
.parent
= self
1428 _n_annotations
= n_annotations
1429 if n_annotations
!= null then n_annotations
.parent
= self
1432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1434 if _n_doc
== old_child
then
1435 n_doc
= new_child
.as(nullable ADoc)
1438 if _n_kwredef
== old_child
then
1439 n_kwredef
= new_child
.as(nullable TKwredef)
1442 if _n_visibility
== old_child
then
1443 n_visibility
= new_child
.as(nullable AVisibility)
1446 if _n_atid
== old_child
then
1447 n_atid
= new_child
.as(AAtid)
1450 if _n_opar
== old_child
then
1451 n_opar
= new_child
.as(nullable TOpar)
1454 if n_args
.replace_child
(old_child
, new_child
) then return
1455 if _n_cpar
== old_child
then
1456 n_cpar
= new_child
.as(nullable TCpar)
1459 if _n_annotations
== old_child
then
1460 n_annotations
= new_child
.as(nullable AAnnotations)
1465 redef fun n_doc
=(node
)
1468 if node
!= null then node
.parent
= self
1470 redef fun n_kwredef
=(node
)
1473 if node
!= null then node
.parent
= self
1475 redef fun n_visibility
=(node
)
1477 _n_visibility
= node
1478 if node
!= null then node
.parent
= self
1480 redef fun n_atid
=(node
)
1485 redef fun n_opar
=(node
)
1488 if node
!= null then node
.parent
= self
1490 redef fun n_cpar
=(node
)
1493 if node
!= null then node
.parent
= self
1495 redef fun n_annotations
=(node
)
1497 _n_annotations
= node
1498 if node
!= null then node
.parent
= self
1502 redef fun visit_all
(v
: Visitor)
1504 v
.enter_visit
(_n_doc
)
1505 v
.enter_visit
(_n_kwredef
)
1506 v
.enter_visit
(_n_visibility
)
1507 v
.enter_visit
(_n_atid
)
1508 v
.enter_visit
(_n_opar
)
1510 v
.enter_visit
(_n_cpar
)
1511 v
.enter_visit
(_n_annotations
)
1514 redef class AIdMethid
1515 init init_aidmethid
(
1519 _n_id
= n_id
.as(not null)
1523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1525 if _n_id
== old_child
then
1526 n_id
= new_child
.as(TId)
1531 redef fun n_id
=(node
)
1538 redef fun visit_all
(v
: Visitor)
1540 v
.enter_visit
(_n_id
)
1543 redef class APlusMethid
1544 init init_aplusmethid
(
1545 n_op
: nullable TPlus
1548 _n_op
= n_op
.as(not null)
1552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1554 if _n_op
== old_child
then
1555 n_op
= new_child
.as(TPlus)
1560 redef fun n_op
=(node
)
1567 redef fun visit_all
(v
: Visitor)
1569 v
.enter_visit
(_n_op
)
1572 redef class AMinusMethid
1573 init init_aminusmethid
(
1574 n_op
: nullable TMinus
1577 _n_op
= n_op
.as(not null)
1581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1583 if _n_op
== old_child
then
1584 n_op
= new_child
.as(TMinus)
1589 redef fun n_op
=(node
)
1596 redef fun visit_all
(v
: Visitor)
1598 v
.enter_visit
(_n_op
)
1601 redef class AStarMethid
1602 init init_astarmethid
(
1603 n_op
: nullable TStar
1606 _n_op
= n_op
.as(not null)
1610 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1612 if _n_op
== old_child
then
1613 n_op
= new_child
.as(TStar)
1618 redef fun n_op
=(node
)
1625 redef fun visit_all
(v
: Visitor)
1627 v
.enter_visit
(_n_op
)
1630 redef class AStarstarMethid
1631 init init_astarstarmethid
(
1632 n_op
: nullable TStarstar
1635 _n_op
= n_op
.as(not null)
1639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1641 if _n_op
== old_child
then
1642 n_op
= new_child
.as(TStarstar)
1647 redef fun n_op
=(node
)
1654 redef fun visit_all
(v
: Visitor)
1656 v
.enter_visit
(_n_op
)
1659 redef class ASlashMethid
1660 init init_aslashmethid
(
1661 n_op
: nullable TSlash
1664 _n_op
= n_op
.as(not null)
1668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1670 if _n_op
== old_child
then
1671 n_op
= new_child
.as(TSlash)
1676 redef fun n_op
=(node
)
1683 redef fun visit_all
(v
: Visitor)
1685 v
.enter_visit
(_n_op
)
1688 redef class APercentMethid
1689 init init_apercentmethid
(
1690 n_op
: nullable TPercent
1693 _n_op
= n_op
.as(not null)
1697 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1699 if _n_op
== old_child
then
1700 n_op
= new_child
.as(TPercent)
1705 redef fun n_op
=(node
)
1712 redef fun visit_all
(v
: Visitor)
1714 v
.enter_visit
(_n_op
)
1717 redef class AEqMethid
1718 init init_aeqmethid
(
1722 _n_op
= n_op
.as(not null)
1726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1728 if _n_op
== old_child
then
1729 n_op
= new_child
.as(TEq)
1734 redef fun n_op
=(node
)
1741 redef fun visit_all
(v
: Visitor)
1743 v
.enter_visit
(_n_op
)
1746 redef class ANeMethid
1747 init init_anemethid
(
1751 _n_op
= n_op
.as(not null)
1755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1757 if _n_op
== old_child
then
1758 n_op
= new_child
.as(TNe)
1763 redef fun n_op
=(node
)
1770 redef fun visit_all
(v
: Visitor)
1772 v
.enter_visit
(_n_op
)
1775 redef class ALeMethid
1776 init init_alemethid
(
1780 _n_op
= n_op
.as(not null)
1784 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1786 if _n_op
== old_child
then
1787 n_op
= new_child
.as(TLe)
1792 redef fun n_op
=(node
)
1799 redef fun visit_all
(v
: Visitor)
1801 v
.enter_visit
(_n_op
)
1804 redef class AGeMethid
1805 init init_agemethid
(
1809 _n_op
= n_op
.as(not null)
1813 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1815 if _n_op
== old_child
then
1816 n_op
= new_child
.as(TGe)
1821 redef fun n_op
=(node
)
1828 redef fun visit_all
(v
: Visitor)
1830 v
.enter_visit
(_n_op
)
1833 redef class ALtMethid
1834 init init_altmethid
(
1838 _n_op
= n_op
.as(not null)
1842 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1844 if _n_op
== old_child
then
1845 n_op
= new_child
.as(TLt)
1850 redef fun n_op
=(node
)
1857 redef fun visit_all
(v
: Visitor)
1859 v
.enter_visit
(_n_op
)
1862 redef class AGtMethid
1863 init init_agtmethid
(
1867 _n_op
= n_op
.as(not null)
1871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1873 if _n_op
== old_child
then
1874 n_op
= new_child
.as(TGt)
1879 redef fun n_op
=(node
)
1886 redef fun visit_all
(v
: Visitor)
1888 v
.enter_visit
(_n_op
)
1891 redef class ALlMethid
1892 init init_allmethid
(
1896 _n_op
= n_op
.as(not null)
1900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1902 if _n_op
== old_child
then
1903 n_op
= new_child
.as(TLl)
1908 redef fun n_op
=(node
)
1915 redef fun visit_all
(v
: Visitor)
1917 v
.enter_visit
(_n_op
)
1920 redef class AGgMethid
1921 init init_aggmethid
(
1925 _n_op
= n_op
.as(not null)
1929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1931 if _n_op
== old_child
then
1932 n_op
= new_child
.as(TGg)
1937 redef fun n_op
=(node
)
1944 redef fun visit_all
(v
: Visitor)
1946 v
.enter_visit
(_n_op
)
1949 redef class AStarshipMethid
1950 init init_astarshipmethid
(
1951 n_op
: nullable TStarship
1954 _n_op
= n_op
.as(not null)
1958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1960 if _n_op
== old_child
then
1961 n_op
= new_child
.as(TStarship)
1966 redef fun n_op
=(node
)
1973 redef fun visit_all
(v
: Visitor)
1975 v
.enter_visit
(_n_op
)
1978 redef class APipeMethid
1979 init init_apipemethid
(
1980 n_op
: nullable TPipe
1983 _n_op
= n_op
.as(not null)
1987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1989 if _n_op
== old_child
then
1990 n_op
= new_child
.as(TPipe)
1995 redef fun n_op
=(node
)
2002 redef fun visit_all
(v
: Visitor)
2004 v
.enter_visit
(_n_op
)
2007 redef class ACaretMethid
2008 init init_acaretmethid
(
2009 n_op
: nullable TCaret
2012 _n_op
= n_op
.as(not null)
2016 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2018 if _n_op
== old_child
then
2019 n_op
= new_child
.as(TCaret)
2024 redef fun n_op
=(node
)
2031 redef fun visit_all
(v
: Visitor)
2033 v
.enter_visit
(_n_op
)
2036 redef class AAmpMethid
2037 init init_aampmethid
(
2041 _n_op
= n_op
.as(not null)
2045 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2047 if _n_op
== old_child
then
2048 n_op
= new_child
.as(TAmp)
2053 redef fun n_op
=(node
)
2060 redef fun visit_all
(v
: Visitor)
2062 v
.enter_visit
(_n_op
)
2065 redef class ATildeMethid
2066 init init_atildemethid
(
2067 n_op
: nullable TTilde
2070 _n_op
= n_op
.as(not null)
2074 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2076 if _n_op
== old_child
then
2077 n_op
= new_child
.as(TTilde)
2082 redef fun n_op
=(node
)
2089 redef fun visit_all
(v
: Visitor)
2091 v
.enter_visit
(_n_op
)
2094 redef class ABraMethid
2095 init init_abramethid
(
2096 n_obra
: nullable TObra,
2097 n_cbra
: nullable TCbra
2100 _n_obra
= n_obra
.as(not null)
2101 n_obra
.parent
= self
2102 _n_cbra
= n_cbra
.as(not null)
2103 n_cbra
.parent
= self
2106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2108 if _n_obra
== old_child
then
2109 n_obra
= new_child
.as(TObra)
2112 if _n_cbra
== old_child
then
2113 n_cbra
= new_child
.as(TCbra)
2118 redef fun n_obra
=(node
)
2123 redef fun n_cbra
=(node
)
2130 redef fun visit_all
(v
: Visitor)
2132 v
.enter_visit
(_n_obra
)
2133 v
.enter_visit
(_n_cbra
)
2136 redef class AAssignMethid
2137 init init_aassignmethid
(
2139 n_assign
: nullable TAssign
2142 _n_id
= n_id
.as(not null)
2144 _n_assign
= n_assign
.as(not null)
2145 n_assign
.parent
= self
2148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2150 if _n_id
== old_child
then
2151 n_id
= new_child
.as(TId)
2154 if _n_assign
== old_child
then
2155 n_assign
= new_child
.as(TAssign)
2160 redef fun n_id
=(node
)
2165 redef fun n_assign
=(node
)
2172 redef fun visit_all
(v
: Visitor)
2174 v
.enter_visit
(_n_id
)
2175 v
.enter_visit
(_n_assign
)
2178 redef class ABraassignMethid
2179 init init_abraassignmethid
(
2180 n_obra
: nullable TObra,
2181 n_cbra
: nullable TCbra,
2182 n_assign
: nullable TAssign
2185 _n_obra
= n_obra
.as(not null)
2186 n_obra
.parent
= self
2187 _n_cbra
= n_cbra
.as(not null)
2188 n_cbra
.parent
= self
2189 _n_assign
= n_assign
.as(not null)
2190 n_assign
.parent
= self
2193 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2195 if _n_obra
== old_child
then
2196 n_obra
= new_child
.as(TObra)
2199 if _n_cbra
== old_child
then
2200 n_cbra
= new_child
.as(TCbra)
2203 if _n_assign
== old_child
then
2204 n_assign
= new_child
.as(TAssign)
2209 redef fun n_obra
=(node
)
2214 redef fun n_cbra
=(node
)
2219 redef fun n_assign
=(node
)
2226 redef fun visit_all
(v
: Visitor)
2228 v
.enter_visit
(_n_obra
)
2229 v
.enter_visit
(_n_cbra
)
2230 v
.enter_visit
(_n_assign
)
2233 redef class ASignature
2234 init init_asignature
(
2235 n_opar
: nullable TOpar,
2236 n_params
: Collection[Object], # Should be Collection[AParam]
2237 n_cpar
: nullable TCpar,
2238 n_type
: nullable AType
2242 if n_opar
!= null then n_opar
.parent
= self
2243 self.n_params
.unsafe_add_all
(n_params
)
2245 if n_cpar
!= null then n_cpar
.parent
= self
2247 if n_type
!= null then n_type
.parent
= self
2250 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2252 if _n_opar
== old_child
then
2253 n_opar
= new_child
.as(nullable TOpar)
2256 if n_params
.replace_child
(old_child
, new_child
) then return
2257 if _n_cpar
== old_child
then
2258 n_cpar
= new_child
.as(nullable TCpar)
2261 if _n_type
== old_child
then
2262 n_type
= new_child
.as(nullable AType)
2267 redef fun n_opar
=(node
)
2270 if node
!= null then node
.parent
= self
2272 redef fun n_cpar
=(node
)
2275 if node
!= null then node
.parent
= self
2277 redef fun n_type
=(node
)
2280 if node
!= null then node
.parent
= self
2284 redef fun visit_all
(v
: Visitor)
2286 v
.enter_visit
(_n_opar
)
2287 n_params
.visit_all
(v
)
2288 v
.enter_visit
(_n_cpar
)
2289 v
.enter_visit
(_n_type
)
2295 n_type
: nullable AType,
2296 n_dotdotdot
: nullable TDotdotdot,
2297 n_annotations
: nullable AAnnotations
2300 _n_id
= n_id
.as(not null)
2303 if n_type
!= null then n_type
.parent
= self
2304 _n_dotdotdot
= n_dotdotdot
2305 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2306 _n_annotations
= n_annotations
2307 if n_annotations
!= null then n_annotations
.parent
= self
2310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2312 if _n_id
== old_child
then
2313 n_id
= new_child
.as(TId)
2316 if _n_type
== old_child
then
2317 n_type
= new_child
.as(nullable AType)
2320 if _n_dotdotdot
== old_child
then
2321 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2324 if _n_annotations
== old_child
then
2325 n_annotations
= new_child
.as(nullable AAnnotations)
2330 redef fun n_id
=(node
)
2335 redef fun n_type
=(node
)
2338 if node
!= null then node
.parent
= self
2340 redef fun n_dotdotdot
=(node
)
2343 if node
!= null then node
.parent
= self
2345 redef fun n_annotations
=(node
)
2347 _n_annotations
= node
2348 if node
!= null then node
.parent
= self
2352 redef fun visit_all
(v
: Visitor)
2354 v
.enter_visit
(_n_id
)
2355 v
.enter_visit
(_n_type
)
2356 v
.enter_visit
(_n_dotdotdot
)
2357 v
.enter_visit
(_n_annotations
)
2362 n_kwnullable
: nullable TKwnullable,
2363 n_id
: nullable TClassid,
2364 n_obra
: nullable TObra,
2365 n_types
: Collection[Object], # Should be Collection[AType]
2366 n_cbra
: nullable TCbra,
2367 n_annotations
: nullable AAnnotations
2370 _n_kwnullable
= n_kwnullable
2371 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2372 _n_id
= n_id
.as(not null)
2375 if n_obra
!= null then n_obra
.parent
= self
2376 self.n_types
.unsafe_add_all
(n_types
)
2378 if n_cbra
!= null then n_cbra
.parent
= self
2379 _n_annotations
= n_annotations
2380 if n_annotations
!= null then n_annotations
.parent
= self
2383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2385 if _n_kwnullable
== old_child
then
2386 n_kwnullable
= new_child
.as(nullable TKwnullable)
2389 if _n_id
== old_child
then
2390 n_id
= new_child
.as(TClassid)
2393 if _n_obra
== old_child
then
2394 n_obra
= new_child
.as(nullable TObra)
2397 if n_types
.replace_child
(old_child
, new_child
) then return
2398 if _n_cbra
== old_child
then
2399 n_cbra
= new_child
.as(nullable TCbra)
2402 if _n_annotations
== old_child
then
2403 n_annotations
= new_child
.as(nullable AAnnotations)
2408 redef fun n_kwnullable
=(node
)
2410 _n_kwnullable
= node
2411 if node
!= null then node
.parent
= self
2413 redef fun n_id
=(node
)
2418 redef fun n_obra
=(node
)
2421 if node
!= null then node
.parent
= self
2423 redef fun n_cbra
=(node
)
2426 if node
!= null then node
.parent
= self
2428 redef fun n_annotations
=(node
)
2430 _n_annotations
= node
2431 if node
!= null then node
.parent
= self
2435 redef fun visit_all
(v
: Visitor)
2437 v
.enter_visit
(_n_kwnullable
)
2438 v
.enter_visit
(_n_id
)
2439 v
.enter_visit
(_n_obra
)
2440 n_types
.visit_all
(v
)
2441 v
.enter_visit
(_n_cbra
)
2442 v
.enter_visit
(_n_annotations
)
2447 n_kwlabel
: nullable TKwlabel,
2451 _n_kwlabel
= n_kwlabel
.as(not null)
2452 n_kwlabel
.parent
= self
2454 if n_id
!= null then n_id
.parent
= self
2457 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2459 if _n_kwlabel
== old_child
then
2460 n_kwlabel
= new_child
.as(TKwlabel)
2463 if _n_id
== old_child
then
2464 n_id
= new_child
.as(nullable TId)
2469 redef fun n_kwlabel
=(node
)
2474 redef fun n_id
=(node
)
2477 if node
!= null then node
.parent
= self
2481 redef fun visit_all
(v
: Visitor)
2483 v
.enter_visit
(_n_kwlabel
)
2484 v
.enter_visit
(_n_id
)
2487 redef class ABlockExpr
2488 init init_ablockexpr
(
2489 n_expr
: Collection[Object], # Should be Collection[AExpr]
2490 n_kwend
: nullable TKwend
2493 self.n_expr
.unsafe_add_all
(n_expr
)
2495 if n_kwend
!= null then n_kwend
.parent
= self
2498 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2500 if n_expr
.replace_child
(old_child
, new_child
) then return
2501 if _n_kwend
== old_child
then
2502 n_kwend
= new_child
.as(nullable TKwend)
2507 redef fun n_kwend
=(node
)
2510 if node
!= null then node
.parent
= self
2514 redef fun visit_all
(v
: Visitor)
2517 v
.enter_visit
(_n_kwend
)
2520 redef class AVardeclExpr
2521 init init_avardeclexpr
(
2522 n_kwvar
: nullable TKwvar,
2524 n_type
: nullable AType,
2525 n_assign
: nullable TAssign,
2526 n_expr
: nullable AExpr,
2527 n_annotations
: nullable AAnnotations
2531 if n_kwvar
!= null then n_kwvar
.parent
= self
2532 _n_id
= n_id
.as(not null)
2535 if n_type
!= null then n_type
.parent
= self
2536 _n_assign
= n_assign
2537 if n_assign
!= null then n_assign
.parent
= self
2539 if n_expr
!= null then n_expr
.parent
= self
2540 _n_annotations
= n_annotations
2541 if n_annotations
!= null then n_annotations
.parent
= self
2544 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2546 if _n_kwvar
== old_child
then
2547 n_kwvar
= new_child
.as(nullable TKwvar)
2550 if _n_id
== old_child
then
2551 n_id
= new_child
.as(TId)
2554 if _n_type
== old_child
then
2555 n_type
= new_child
.as(nullable AType)
2558 if _n_assign
== old_child
then
2559 n_assign
= new_child
.as(nullable TAssign)
2562 if _n_expr
== old_child
then
2563 n_expr
= new_child
.as(nullable AExpr)
2566 if _n_annotations
== old_child
then
2567 n_annotations
= new_child
.as(nullable AAnnotations)
2572 redef fun n_kwvar
=(node
)
2575 if node
!= null then node
.parent
= self
2577 redef fun n_id
=(node
)
2582 redef fun n_type
=(node
)
2585 if node
!= null then node
.parent
= self
2587 redef fun n_assign
=(node
)
2590 if node
!= null then node
.parent
= self
2592 redef fun n_expr
=(node
)
2595 if node
!= null then node
.parent
= self
2597 redef fun n_annotations
=(node
)
2599 _n_annotations
= node
2600 if node
!= null then node
.parent
= self
2604 redef fun visit_all
(v
: Visitor)
2606 v
.enter_visit
(_n_kwvar
)
2607 v
.enter_visit
(_n_id
)
2608 v
.enter_visit
(_n_type
)
2609 v
.enter_visit
(_n_assign
)
2610 v
.enter_visit
(_n_expr
)
2611 v
.enter_visit
(_n_annotations
)
2614 redef class AReturnExpr
2615 init init_areturnexpr
(
2616 n_kwreturn
: nullable TKwreturn,
2617 n_expr
: nullable AExpr
2620 _n_kwreturn
= n_kwreturn
2621 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2623 if n_expr
!= null then n_expr
.parent
= self
2626 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2628 if _n_kwreturn
== old_child
then
2629 n_kwreturn
= new_child
.as(nullable TKwreturn)
2632 if _n_expr
== old_child
then
2633 n_expr
= new_child
.as(nullable AExpr)
2638 redef fun n_kwreturn
=(node
)
2641 if node
!= null then node
.parent
= self
2643 redef fun n_expr
=(node
)
2646 if node
!= null then node
.parent
= self
2650 redef fun visit_all
(v
: Visitor)
2652 v
.enter_visit
(_n_kwreturn
)
2653 v
.enter_visit
(_n_expr
)
2656 redef class ABreakExpr
2657 init init_abreakexpr
(
2658 n_kwbreak
: nullable TKwbreak,
2659 n_label
: nullable ALabel
2662 _n_kwbreak
= n_kwbreak
.as(not null)
2663 n_kwbreak
.parent
= self
2665 if n_label
!= null then n_label
.parent
= self
2668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2670 if _n_kwbreak
== old_child
then
2671 n_kwbreak
= new_child
.as(TKwbreak)
2674 if _n_label
== old_child
then
2675 n_label
= new_child
.as(nullable ALabel)
2680 redef fun n_kwbreak
=(node
)
2685 redef fun n_label
=(node
)
2688 if node
!= null then node
.parent
= self
2692 redef fun visit_all
(v
: Visitor)
2694 v
.enter_visit
(_n_kwbreak
)
2695 v
.enter_visit
(_n_label
)
2698 redef class AAbortExpr
2699 init init_aabortexpr
(
2700 n_kwabort
: nullable TKwabort
2703 _n_kwabort
= n_kwabort
.as(not null)
2704 n_kwabort
.parent
= self
2707 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2709 if _n_kwabort
== old_child
then
2710 n_kwabort
= new_child
.as(TKwabort)
2715 redef fun n_kwabort
=(node
)
2722 redef fun visit_all
(v
: Visitor)
2724 v
.enter_visit
(_n_kwabort
)
2727 redef class AContinueExpr
2728 init init_acontinueexpr
(
2729 n_kwcontinue
: nullable TKwcontinue,
2730 n_label
: nullable ALabel
2733 _n_kwcontinue
= n_kwcontinue
2734 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2736 if n_label
!= null then n_label
.parent
= self
2739 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2741 if _n_kwcontinue
== old_child
then
2742 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2745 if _n_label
== old_child
then
2746 n_label
= new_child
.as(nullable ALabel)
2751 redef fun n_kwcontinue
=(node
)
2753 _n_kwcontinue
= node
2754 if node
!= null then node
.parent
= self
2756 redef fun n_label
=(node
)
2759 if node
!= null then node
.parent
= self
2763 redef fun visit_all
(v
: Visitor)
2765 v
.enter_visit
(_n_kwcontinue
)
2766 v
.enter_visit
(_n_label
)
2771 n_kwdo
: nullable TKwdo,
2772 n_block
: nullable AExpr,
2773 n_label
: nullable ALabel
2776 _n_kwdo
= n_kwdo
.as(not null)
2777 n_kwdo
.parent
= self
2779 if n_block
!= null then n_block
.parent
= self
2781 if n_label
!= null then n_label
.parent
= self
2784 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2786 if _n_kwdo
== old_child
then
2787 n_kwdo
= new_child
.as(TKwdo)
2790 if _n_block
== old_child
then
2791 n_block
= new_child
.as(nullable AExpr)
2794 if _n_label
== old_child
then
2795 n_label
= new_child
.as(nullable ALabel)
2800 redef fun n_kwdo
=(node
)
2805 redef fun n_block
=(node
)
2808 if node
!= null then node
.parent
= self
2810 redef fun n_label
=(node
)
2813 if node
!= null then node
.parent
= self
2817 redef fun visit_all
(v
: Visitor)
2819 v
.enter_visit
(_n_kwdo
)
2820 v
.enter_visit
(_n_block
)
2821 v
.enter_visit
(_n_label
)
2826 n_kwif
: nullable TKwif,
2827 n_expr
: nullable AExpr,
2828 n_kwthen
: nullable TKwthen,
2829 n_then
: nullable AExpr,
2830 n_kwelse
: nullable TKwelse,
2831 n_else
: nullable AExpr
2834 _n_kwif
= n_kwif
.as(not null)
2835 n_kwif
.parent
= self
2836 _n_expr
= n_expr
.as(not null)
2837 n_expr
.parent
= self
2838 _n_kwthen
= n_kwthen
.as(not null)
2839 n_kwthen
.parent
= self
2841 if n_then
!= null then n_then
.parent
= self
2842 _n_kwelse
= n_kwelse
2843 if n_kwelse
!= null then n_kwelse
.parent
= self
2845 if n_else
!= null then n_else
.parent
= self
2848 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2850 if _n_kwif
== old_child
then
2851 n_kwif
= new_child
.as(TKwif)
2854 if _n_expr
== old_child
then
2855 n_expr
= new_child
.as(AExpr)
2858 if _n_kwthen
== old_child
then
2859 n_kwthen
= new_child
.as(TKwthen)
2862 if _n_then
== old_child
then
2863 n_then
= new_child
.as(nullable AExpr)
2866 if _n_kwelse
== old_child
then
2867 n_kwelse
= new_child
.as(nullable TKwelse)
2870 if _n_else
== old_child
then
2871 n_else
= new_child
.as(nullable AExpr)
2876 redef fun n_kwif
=(node
)
2881 redef fun n_expr
=(node
)
2886 redef fun n_kwthen
=(node
)
2891 redef fun n_then
=(node
)
2894 if node
!= null then node
.parent
= self
2896 redef fun n_kwelse
=(node
)
2899 if node
!= null then node
.parent
= self
2901 redef fun n_else
=(node
)
2904 if node
!= null then node
.parent
= self
2908 redef fun visit_all
(v
: Visitor)
2910 v
.enter_visit
(_n_kwif
)
2911 v
.enter_visit
(_n_expr
)
2912 v
.enter_visit
(_n_kwthen
)
2913 v
.enter_visit
(_n_then
)
2914 v
.enter_visit
(_n_kwelse
)
2915 v
.enter_visit
(_n_else
)
2918 redef class AIfexprExpr
2919 init init_aifexprexpr
(
2920 n_kwif
: nullable TKwif,
2921 n_expr
: nullable AExpr,
2922 n_kwthen
: nullable TKwthen,
2923 n_then
: nullable AExpr,
2924 n_kwelse
: nullable TKwelse,
2925 n_else
: nullable AExpr
2928 _n_kwif
= n_kwif
.as(not null)
2929 n_kwif
.parent
= self
2930 _n_expr
= n_expr
.as(not null)
2931 n_expr
.parent
= self
2932 _n_kwthen
= n_kwthen
.as(not null)
2933 n_kwthen
.parent
= self
2934 _n_then
= n_then
.as(not null)
2935 n_then
.parent
= self
2936 _n_kwelse
= n_kwelse
.as(not null)
2937 n_kwelse
.parent
= self
2938 _n_else
= n_else
.as(not null)
2939 n_else
.parent
= self
2942 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2944 if _n_kwif
== old_child
then
2945 n_kwif
= new_child
.as(TKwif)
2948 if _n_expr
== old_child
then
2949 n_expr
= new_child
.as(AExpr)
2952 if _n_kwthen
== old_child
then
2953 n_kwthen
= new_child
.as(TKwthen)
2956 if _n_then
== old_child
then
2957 n_then
= new_child
.as(AExpr)
2960 if _n_kwelse
== old_child
then
2961 n_kwelse
= new_child
.as(TKwelse)
2964 if _n_else
== old_child
then
2965 n_else
= new_child
.as(AExpr)
2970 redef fun n_kwif
=(node
)
2975 redef fun n_expr
=(node
)
2980 redef fun n_kwthen
=(node
)
2985 redef fun n_then
=(node
)
2990 redef fun n_kwelse
=(node
)
2995 redef fun n_else
=(node
)
3002 redef fun visit_all
(v
: Visitor)
3004 v
.enter_visit
(_n_kwif
)
3005 v
.enter_visit
(_n_expr
)
3006 v
.enter_visit
(_n_kwthen
)
3007 v
.enter_visit
(_n_then
)
3008 v
.enter_visit
(_n_kwelse
)
3009 v
.enter_visit
(_n_else
)
3012 redef class AWhileExpr
3013 init init_awhileexpr
(
3014 n_kwwhile
: nullable TKwwhile,
3015 n_expr
: nullable AExpr,
3016 n_kwdo
: nullable TKwdo,
3017 n_block
: nullable AExpr,
3018 n_label
: nullable ALabel
3021 _n_kwwhile
= n_kwwhile
.as(not null)
3022 n_kwwhile
.parent
= self
3023 _n_expr
= n_expr
.as(not null)
3024 n_expr
.parent
= self
3025 _n_kwdo
= n_kwdo
.as(not null)
3026 n_kwdo
.parent
= self
3028 if n_block
!= null then n_block
.parent
= self
3030 if n_label
!= null then n_label
.parent
= self
3033 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3035 if _n_kwwhile
== old_child
then
3036 n_kwwhile
= new_child
.as(TKwwhile)
3039 if _n_expr
== old_child
then
3040 n_expr
= new_child
.as(AExpr)
3043 if _n_kwdo
== old_child
then
3044 n_kwdo
= new_child
.as(TKwdo)
3047 if _n_block
== old_child
then
3048 n_block
= new_child
.as(nullable AExpr)
3051 if _n_label
== old_child
then
3052 n_label
= new_child
.as(nullable ALabel)
3057 redef fun n_kwwhile
=(node
)
3062 redef fun n_expr
=(node
)
3067 redef fun n_kwdo
=(node
)
3072 redef fun n_block
=(node
)
3075 if node
!= null then node
.parent
= self
3077 redef fun n_label
=(node
)
3080 if node
!= null then node
.parent
= self
3084 redef fun visit_all
(v
: Visitor)
3086 v
.enter_visit
(_n_kwwhile
)
3087 v
.enter_visit
(_n_expr
)
3088 v
.enter_visit
(_n_kwdo
)
3089 v
.enter_visit
(_n_block
)
3090 v
.enter_visit
(_n_label
)
3093 redef class ALoopExpr
3094 init init_aloopexpr
(
3095 n_kwloop
: nullable TKwloop,
3096 n_block
: nullable AExpr,
3097 n_label
: nullable ALabel
3100 _n_kwloop
= n_kwloop
.as(not null)
3101 n_kwloop
.parent
= self
3103 if n_block
!= null then n_block
.parent
= self
3105 if n_label
!= null then n_label
.parent
= self
3108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3110 if _n_kwloop
== old_child
then
3111 n_kwloop
= new_child
.as(TKwloop)
3114 if _n_block
== old_child
then
3115 n_block
= new_child
.as(nullable AExpr)
3118 if _n_label
== old_child
then
3119 n_label
= new_child
.as(nullable ALabel)
3124 redef fun n_kwloop
=(node
)
3129 redef fun n_block
=(node
)
3132 if node
!= null then node
.parent
= self
3134 redef fun n_label
=(node
)
3137 if node
!= null then node
.parent
= self
3141 redef fun visit_all
(v
: Visitor)
3143 v
.enter_visit
(_n_kwloop
)
3144 v
.enter_visit
(_n_block
)
3145 v
.enter_visit
(_n_label
)
3148 redef class AForExpr
3149 init init_aforexpr
(
3150 n_kwfor
: nullable TKwfor,
3151 n_ids
: Collection[Object], # Should be Collection[TId]
3152 n_kwin
: nullable TKwin,
3153 n_expr
: nullable AExpr,
3154 n_kwdo
: nullable TKwdo,
3155 n_block
: nullable AExpr,
3156 n_label
: nullable ALabel
3159 _n_kwfor
= n_kwfor
.as(not null)
3160 n_kwfor
.parent
= self
3161 self.n_ids
.unsafe_add_all
(n_ids
)
3162 _n_kwin
= n_kwin
.as(not null)
3163 n_kwin
.parent
= self
3164 _n_expr
= n_expr
.as(not null)
3165 n_expr
.parent
= self
3166 _n_kwdo
= n_kwdo
.as(not null)
3167 n_kwdo
.parent
= self
3169 if n_block
!= null then n_block
.parent
= self
3171 if n_label
!= null then n_label
.parent
= self
3174 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3176 if _n_kwfor
== old_child
then
3177 n_kwfor
= new_child
.as(TKwfor)
3180 if n_ids
.replace_child
(old_child
, new_child
) then return
3181 if _n_kwin
== old_child
then
3182 n_kwin
= new_child
.as(TKwin)
3185 if _n_expr
== old_child
then
3186 n_expr
= new_child
.as(AExpr)
3189 if _n_kwdo
== old_child
then
3190 n_kwdo
= new_child
.as(TKwdo)
3193 if _n_block
== old_child
then
3194 n_block
= new_child
.as(nullable AExpr)
3197 if _n_label
== old_child
then
3198 n_label
= new_child
.as(nullable ALabel)
3203 redef fun n_kwfor
=(node
)
3208 redef fun n_kwin
=(node
)
3213 redef fun n_expr
=(node
)
3218 redef fun n_kwdo
=(node
)
3223 redef fun n_block
=(node
)
3226 if node
!= null then node
.parent
= self
3228 redef fun n_label
=(node
)
3231 if node
!= null then node
.parent
= self
3235 redef fun visit_all
(v
: Visitor)
3237 v
.enter_visit
(_n_kwfor
)
3239 v
.enter_visit
(_n_kwin
)
3240 v
.enter_visit
(_n_expr
)
3241 v
.enter_visit
(_n_kwdo
)
3242 v
.enter_visit
(_n_block
)
3243 v
.enter_visit
(_n_label
)
3246 redef class AWithExpr
3247 init init_awithexpr
(
3248 n_kwwith
: nullable TKwwith,
3249 n_expr
: nullable AExpr,
3250 n_kwdo
: nullable TKwdo,
3251 n_block
: nullable AExpr,
3252 n_label
: nullable ALabel
3255 _n_kwwith
= n_kwwith
.as(not null)
3256 n_kwwith
.parent
= self
3257 _n_expr
= n_expr
.as(not null)
3258 n_expr
.parent
= self
3259 _n_kwdo
= n_kwdo
.as(not null)
3260 n_kwdo
.parent
= self
3262 if n_block
!= null then n_block
.parent
= self
3264 if n_label
!= null then n_label
.parent
= self
3267 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3269 if _n_kwwith
== old_child
then
3270 n_kwwith
= new_child
.as(TKwwith)
3273 if _n_expr
== old_child
then
3274 n_expr
= new_child
.as(AExpr)
3277 if _n_kwdo
== old_child
then
3278 n_kwdo
= new_child
.as(TKwdo)
3281 if _n_block
== old_child
then
3282 n_block
= new_child
.as(nullable AExpr)
3285 if _n_label
== old_child
then
3286 n_label
= new_child
.as(nullable ALabel)
3291 redef fun n_kwwith
=(node
)
3296 redef fun n_expr
=(node
)
3301 redef fun n_kwdo
=(node
)
3306 redef fun n_block
=(node
)
3309 if node
!= null then node
.parent
= self
3311 redef fun n_label
=(node
)
3314 if node
!= null then node
.parent
= self
3318 redef fun visit_all
(v
: Visitor)
3320 v
.enter_visit
(_n_kwwith
)
3321 v
.enter_visit
(_n_expr
)
3322 v
.enter_visit
(_n_kwdo
)
3323 v
.enter_visit
(_n_block
)
3324 v
.enter_visit
(_n_label
)
3327 redef class AAssertExpr
3328 init init_aassertexpr
(
3329 n_kwassert
: nullable TKwassert,
3331 n_expr
: nullable AExpr,
3332 n_kwelse
: nullable TKwelse,
3333 n_else
: nullable AExpr
3336 _n_kwassert
= n_kwassert
.as(not null)
3337 n_kwassert
.parent
= self
3339 if n_id
!= null then n_id
.parent
= self
3340 _n_expr
= n_expr
.as(not null)
3341 n_expr
.parent
= self
3342 _n_kwelse
= n_kwelse
3343 if n_kwelse
!= null then n_kwelse
.parent
= self
3345 if n_else
!= null then n_else
.parent
= self
3348 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3350 if _n_kwassert
== old_child
then
3351 n_kwassert
= new_child
.as(TKwassert)
3354 if _n_id
== old_child
then
3355 n_id
= new_child
.as(nullable TId)
3358 if _n_expr
== old_child
then
3359 n_expr
= new_child
.as(AExpr)
3362 if _n_kwelse
== old_child
then
3363 n_kwelse
= new_child
.as(nullable TKwelse)
3366 if _n_else
== old_child
then
3367 n_else
= new_child
.as(nullable AExpr)
3372 redef fun n_kwassert
=(node
)
3377 redef fun n_id
=(node
)
3380 if node
!= null then node
.parent
= self
3382 redef fun n_expr
=(node
)
3387 redef fun n_kwelse
=(node
)
3390 if node
!= null then node
.parent
= self
3392 redef fun n_else
=(node
)
3395 if node
!= null then node
.parent
= self
3399 redef fun visit_all
(v
: Visitor)
3401 v
.enter_visit
(_n_kwassert
)
3402 v
.enter_visit
(_n_id
)
3403 v
.enter_visit
(_n_expr
)
3404 v
.enter_visit
(_n_kwelse
)
3405 v
.enter_visit
(_n_else
)
3408 redef class AOnceExpr
3409 init init_aonceexpr
(
3410 n_kwonce
: nullable TKwonce,
3411 n_expr
: nullable AExpr
3414 _n_kwonce
= n_kwonce
.as(not null)
3415 n_kwonce
.parent
= self
3416 _n_expr
= n_expr
.as(not null)
3417 n_expr
.parent
= self
3420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3422 if _n_kwonce
== old_child
then
3423 n_kwonce
= new_child
.as(TKwonce)
3426 if _n_expr
== old_child
then
3427 n_expr
= new_child
.as(AExpr)
3432 redef fun n_kwonce
=(node
)
3437 redef fun n_expr
=(node
)
3444 redef fun visit_all
(v
: Visitor)
3446 v
.enter_visit
(_n_kwonce
)
3447 v
.enter_visit
(_n_expr
)
3450 redef class ASendExpr
3451 init init_asendexpr
(
3452 n_expr
: nullable AExpr
3455 _n_expr
= n_expr
.as(not null)
3456 n_expr
.parent
= self
3459 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3461 if _n_expr
== old_child
then
3462 n_expr
= new_child
.as(AExpr)
3467 redef fun n_expr
=(node
)
3474 redef fun visit_all
(v
: Visitor)
3476 v
.enter_visit
(_n_expr
)
3479 redef class ABinopExpr
3480 init init_abinopexpr
(
3481 n_expr
: nullable AExpr,
3482 n_expr2
: nullable AExpr
3485 _n_expr
= n_expr
.as(not null)
3486 n_expr
.parent
= self
3487 _n_expr2
= n_expr2
.as(not null)
3488 n_expr2
.parent
= self
3491 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3493 if _n_expr
== old_child
then
3494 n_expr
= new_child
.as(AExpr)
3497 if _n_expr2
== old_child
then
3498 n_expr2
= new_child
.as(AExpr)
3503 redef fun n_expr
=(node
)
3508 redef fun n_expr2
=(node
)
3515 redef fun visit_all
(v
: Visitor)
3517 v
.enter_visit
(_n_expr
)
3518 v
.enter_visit
(_n_expr2
)
3523 n_expr
: nullable AExpr,
3524 n_op
: nullable TKwor,
3525 n_expr2
: nullable AExpr
3528 _n_expr
= n_expr
.as(not null)
3529 n_expr
.parent
= self
3530 _n_op
= n_op
.as(not null)
3532 _n_expr2
= n_expr2
.as(not null)
3533 n_expr2
.parent
= self
3536 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3538 if _n_expr
== old_child
then
3539 n_expr
= new_child
.as(AExpr)
3542 if _n_op
== old_child
then
3543 n_op
= new_child
.as(TKwor)
3546 if _n_expr2
== old_child
then
3547 n_expr2
= new_child
.as(AExpr)
3552 redef fun n_expr
=(node
)
3557 redef fun n_op
=(node
)
3562 redef fun n_expr2
=(node
)
3569 redef fun visit_all
(v
: Visitor)
3571 v
.enter_visit
(_n_expr
)
3572 v
.enter_visit
(_n_op
)
3573 v
.enter_visit
(_n_expr2
)
3576 redef class AAndExpr
3577 init init_aandexpr
(
3578 n_expr
: nullable AExpr,
3579 n_op
: nullable TKwand,
3580 n_expr2
: nullable AExpr
3583 _n_expr
= n_expr
.as(not null)
3584 n_expr
.parent
= self
3585 _n_op
= n_op
.as(not null)
3587 _n_expr2
= n_expr2
.as(not null)
3588 n_expr2
.parent
= self
3591 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3593 if _n_expr
== old_child
then
3594 n_expr
= new_child
.as(AExpr)
3597 if _n_op
== old_child
then
3598 n_op
= new_child
.as(TKwand)
3601 if _n_expr2
== old_child
then
3602 n_expr2
= new_child
.as(AExpr)
3607 redef fun n_expr
=(node
)
3612 redef fun n_op
=(node
)
3617 redef fun n_expr2
=(node
)
3624 redef fun visit_all
(v
: Visitor)
3626 v
.enter_visit
(_n_expr
)
3627 v
.enter_visit
(_n_op
)
3628 v
.enter_visit
(_n_expr2
)
3631 redef class AOrElseExpr
3632 init init_aorelseexpr
(
3633 n_expr
: nullable AExpr,
3634 n_op
: nullable TKwor,
3635 n_kwelse
: nullable TKwelse,
3636 n_expr2
: nullable AExpr
3639 _n_expr
= n_expr
.as(not null)
3640 n_expr
.parent
= self
3641 _n_op
= n_op
.as(not null)
3643 _n_kwelse
= n_kwelse
.as(not null)
3644 n_kwelse
.parent
= self
3645 _n_expr2
= n_expr2
.as(not null)
3646 n_expr2
.parent
= self
3649 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3651 if _n_expr
== old_child
then
3652 n_expr
= new_child
.as(AExpr)
3655 if _n_op
== old_child
then
3656 n_op
= new_child
.as(TKwor)
3659 if _n_kwelse
== old_child
then
3660 n_kwelse
= new_child
.as(TKwelse)
3663 if _n_expr2
== old_child
then
3664 n_expr2
= new_child
.as(AExpr)
3669 redef fun n_expr
=(node
)
3674 redef fun n_op
=(node
)
3679 redef fun n_kwelse
=(node
)
3684 redef fun n_expr2
=(node
)
3691 redef fun visit_all
(v
: Visitor)
3693 v
.enter_visit
(_n_expr
)
3694 v
.enter_visit
(_n_op
)
3695 v
.enter_visit
(_n_kwelse
)
3696 v
.enter_visit
(_n_expr2
)
3699 redef class AImpliesExpr
3700 init init_aimpliesexpr
(
3701 n_expr
: nullable AExpr,
3702 n_op
: nullable TKwimplies,
3703 n_expr2
: nullable AExpr
3706 _n_expr
= n_expr
.as(not null)
3707 n_expr
.parent
= self
3708 _n_op
= n_op
.as(not null)
3710 _n_expr2
= n_expr2
.as(not null)
3711 n_expr2
.parent
= self
3714 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3716 if _n_expr
== old_child
then
3717 n_expr
= new_child
.as(AExpr)
3720 if _n_op
== old_child
then
3721 n_op
= new_child
.as(TKwimplies)
3724 if _n_expr2
== old_child
then
3725 n_expr2
= new_child
.as(AExpr)
3730 redef fun n_expr
=(node
)
3735 redef fun n_op
=(node
)
3740 redef fun n_expr2
=(node
)
3747 redef fun visit_all
(v
: Visitor)
3749 v
.enter_visit
(_n_expr
)
3750 v
.enter_visit
(_n_op
)
3751 v
.enter_visit
(_n_expr2
)
3754 redef class ANotExpr
3755 init init_anotexpr
(
3756 n_kwnot
: nullable TKwnot,
3757 n_expr
: nullable AExpr
3760 _n_kwnot
= n_kwnot
.as(not null)
3761 n_kwnot
.parent
= self
3762 _n_expr
= n_expr
.as(not null)
3763 n_expr
.parent
= self
3766 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3768 if _n_kwnot
== old_child
then
3769 n_kwnot
= new_child
.as(TKwnot)
3772 if _n_expr
== old_child
then
3773 n_expr
= new_child
.as(AExpr)
3778 redef fun n_kwnot
=(node
)
3783 redef fun n_expr
=(node
)
3790 redef fun visit_all
(v
: Visitor)
3792 v
.enter_visit
(_n_kwnot
)
3793 v
.enter_visit
(_n_expr
)
3798 n_expr
: nullable AExpr,
3800 n_expr2
: nullable AExpr
3803 _n_expr
= n_expr
.as(not null)
3804 n_expr
.parent
= self
3805 _n_op
= n_op
.as(not null)
3807 _n_expr2
= n_expr2
.as(not null)
3808 n_expr2
.parent
= self
3811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3813 if _n_expr
== old_child
then
3814 n_expr
= new_child
.as(AExpr)
3817 if _n_op
== old_child
then
3818 n_op
= new_child
.as(TEq)
3821 if _n_expr2
== old_child
then
3822 n_expr2
= new_child
.as(AExpr)
3827 redef fun n_expr
=(node
)
3832 redef fun n_op
=(node
)
3837 redef fun n_expr2
=(node
)
3844 redef fun visit_all
(v
: Visitor)
3846 v
.enter_visit
(_n_expr
)
3847 v
.enter_visit
(_n_op
)
3848 v
.enter_visit
(_n_expr2
)
3853 n_expr
: nullable AExpr,
3855 n_expr2
: nullable AExpr
3858 _n_expr
= n_expr
.as(not null)
3859 n_expr
.parent
= self
3860 _n_op
= n_op
.as(not null)
3862 _n_expr2
= n_expr2
.as(not null)
3863 n_expr2
.parent
= self
3866 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3868 if _n_expr
== old_child
then
3869 n_expr
= new_child
.as(AExpr)
3872 if _n_op
== old_child
then
3873 n_op
= new_child
.as(TNe)
3876 if _n_expr2
== old_child
then
3877 n_expr2
= new_child
.as(AExpr)
3882 redef fun n_expr
=(node
)
3887 redef fun n_op
=(node
)
3892 redef fun n_expr2
=(node
)
3899 redef fun visit_all
(v
: Visitor)
3901 v
.enter_visit
(_n_expr
)
3902 v
.enter_visit
(_n_op
)
3903 v
.enter_visit
(_n_expr2
)
3908 n_expr
: nullable AExpr,
3910 n_expr2
: nullable AExpr
3913 _n_expr
= n_expr
.as(not null)
3914 n_expr
.parent
= self
3915 _n_op
= n_op
.as(not null)
3917 _n_expr2
= n_expr2
.as(not null)
3918 n_expr2
.parent
= self
3921 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3923 if _n_expr
== old_child
then
3924 n_expr
= new_child
.as(AExpr)
3927 if _n_op
== old_child
then
3928 n_op
= new_child
.as(TLt)
3931 if _n_expr2
== old_child
then
3932 n_expr2
= new_child
.as(AExpr)
3937 redef fun n_expr
=(node
)
3942 redef fun n_op
=(node
)
3947 redef fun n_expr2
=(node
)
3954 redef fun visit_all
(v
: Visitor)
3956 v
.enter_visit
(_n_expr
)
3957 v
.enter_visit
(_n_op
)
3958 v
.enter_visit
(_n_expr2
)
3963 n_expr
: nullable AExpr,
3965 n_expr2
: nullable AExpr
3968 _n_expr
= n_expr
.as(not null)
3969 n_expr
.parent
= self
3970 _n_op
= n_op
.as(not null)
3972 _n_expr2
= n_expr2
.as(not null)
3973 n_expr2
.parent
= self
3976 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3978 if _n_expr
== old_child
then
3979 n_expr
= new_child
.as(AExpr)
3982 if _n_op
== old_child
then
3983 n_op
= new_child
.as(TLe)
3986 if _n_expr2
== old_child
then
3987 n_expr2
= new_child
.as(AExpr)
3992 redef fun n_expr
=(node
)
3997 redef fun n_op
=(node
)
4002 redef fun n_expr2
=(node
)
4009 redef fun visit_all
(v
: Visitor)
4011 v
.enter_visit
(_n_expr
)
4012 v
.enter_visit
(_n_op
)
4013 v
.enter_visit
(_n_expr2
)
4018 n_expr
: nullable AExpr,
4020 n_expr2
: nullable AExpr
4023 _n_expr
= n_expr
.as(not null)
4024 n_expr
.parent
= self
4025 _n_op
= n_op
.as(not null)
4027 _n_expr2
= n_expr2
.as(not null)
4028 n_expr2
.parent
= self
4031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4033 if _n_expr
== old_child
then
4034 n_expr
= new_child
.as(AExpr)
4037 if _n_op
== old_child
then
4038 n_op
= new_child
.as(TLl)
4041 if _n_expr2
== old_child
then
4042 n_expr2
= new_child
.as(AExpr)
4047 redef fun n_expr
=(node
)
4052 redef fun n_op
=(node
)
4057 redef fun n_expr2
=(node
)
4064 redef fun visit_all
(v
: Visitor)
4066 v
.enter_visit
(_n_expr
)
4067 v
.enter_visit
(_n_op
)
4068 v
.enter_visit
(_n_expr2
)
4073 n_expr
: nullable AExpr,
4075 n_expr2
: nullable AExpr
4078 _n_expr
= n_expr
.as(not null)
4079 n_expr
.parent
= self
4080 _n_op
= n_op
.as(not null)
4082 _n_expr2
= n_expr2
.as(not null)
4083 n_expr2
.parent
= self
4086 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4088 if _n_expr
== old_child
then
4089 n_expr
= new_child
.as(AExpr)
4092 if _n_op
== old_child
then
4093 n_op
= new_child
.as(TGt)
4096 if _n_expr2
== old_child
then
4097 n_expr2
= new_child
.as(AExpr)
4102 redef fun n_expr
=(node
)
4107 redef fun n_op
=(node
)
4112 redef fun n_expr2
=(node
)
4119 redef fun visit_all
(v
: Visitor)
4121 v
.enter_visit
(_n_expr
)
4122 v
.enter_visit
(_n_op
)
4123 v
.enter_visit
(_n_expr2
)
4128 n_expr
: nullable AExpr,
4130 n_expr2
: nullable AExpr
4133 _n_expr
= n_expr
.as(not null)
4134 n_expr
.parent
= self
4135 _n_op
= n_op
.as(not null)
4137 _n_expr2
= n_expr2
.as(not null)
4138 n_expr2
.parent
= self
4141 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4143 if _n_expr
== old_child
then
4144 n_expr
= new_child
.as(AExpr)
4147 if _n_op
== old_child
then
4148 n_op
= new_child
.as(TGe)
4151 if _n_expr2
== old_child
then
4152 n_expr2
= new_child
.as(AExpr)
4157 redef fun n_expr
=(node
)
4162 redef fun n_op
=(node
)
4167 redef fun n_expr2
=(node
)
4174 redef fun visit_all
(v
: Visitor)
4176 v
.enter_visit
(_n_expr
)
4177 v
.enter_visit
(_n_op
)
4178 v
.enter_visit
(_n_expr2
)
4183 n_expr
: nullable AExpr,
4185 n_expr2
: nullable AExpr
4188 _n_expr
= n_expr
.as(not null)
4189 n_expr
.parent
= self
4190 _n_op
= n_op
.as(not null)
4192 _n_expr2
= n_expr2
.as(not null)
4193 n_expr2
.parent
= self
4196 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4198 if _n_expr
== old_child
then
4199 n_expr
= new_child
.as(AExpr)
4202 if _n_op
== old_child
then
4203 n_op
= new_child
.as(TGg)
4206 if _n_expr2
== old_child
then
4207 n_expr2
= new_child
.as(AExpr)
4212 redef fun n_expr
=(node
)
4217 redef fun n_op
=(node
)
4222 redef fun n_expr2
=(node
)
4229 redef fun visit_all
(v
: Visitor)
4231 v
.enter_visit
(_n_expr
)
4232 v
.enter_visit
(_n_op
)
4233 v
.enter_visit
(_n_expr2
)
4236 redef class AIsaExpr
4237 init init_aisaexpr
(
4238 n_expr
: nullable AExpr,
4239 n_kwisa
: nullable TKwisa,
4240 n_type
: nullable AType
4243 _n_expr
= n_expr
.as(not null)
4244 n_expr
.parent
= self
4245 _n_kwisa
= n_kwisa
.as(not null)
4246 n_kwisa
.parent
= self
4247 _n_type
= n_type
.as(not null)
4248 n_type
.parent
= self
4251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4253 if _n_expr
== old_child
then
4254 n_expr
= new_child
.as(AExpr)
4257 if _n_kwisa
== old_child
then
4258 n_kwisa
= new_child
.as(TKwisa)
4261 if _n_type
== old_child
then
4262 n_type
= new_child
.as(AType)
4267 redef fun n_expr
=(node
)
4272 redef fun n_kwisa
=(node
)
4277 redef fun n_type
=(node
)
4284 redef fun visit_all
(v
: Visitor)
4286 v
.enter_visit
(_n_expr
)
4287 v
.enter_visit
(_n_kwisa
)
4288 v
.enter_visit
(_n_type
)
4291 redef class APlusExpr
4292 init init_aplusexpr
(
4293 n_expr
: nullable AExpr,
4294 n_op
: nullable TPlus,
4295 n_expr2
: nullable AExpr
4298 _n_expr
= n_expr
.as(not null)
4299 n_expr
.parent
= self
4300 _n_op
= n_op
.as(not null)
4302 _n_expr2
= n_expr2
.as(not null)
4303 n_expr2
.parent
= self
4306 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4308 if _n_expr
== old_child
then
4309 n_expr
= new_child
.as(AExpr)
4312 if _n_op
== old_child
then
4313 n_op
= new_child
.as(TPlus)
4316 if _n_expr2
== old_child
then
4317 n_expr2
= new_child
.as(AExpr)
4322 redef fun n_expr
=(node
)
4327 redef fun n_op
=(node
)
4332 redef fun n_expr2
=(node
)
4339 redef fun visit_all
(v
: Visitor)
4341 v
.enter_visit
(_n_expr
)
4342 v
.enter_visit
(_n_op
)
4343 v
.enter_visit
(_n_expr2
)
4346 redef class AMinusExpr
4347 init init_aminusexpr
(
4348 n_expr
: nullable AExpr,
4349 n_op
: nullable TMinus,
4350 n_expr2
: nullable AExpr
4353 _n_expr
= n_expr
.as(not null)
4354 n_expr
.parent
= self
4355 _n_op
= n_op
.as(not null)
4357 _n_expr2
= n_expr2
.as(not null)
4358 n_expr2
.parent
= self
4361 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4363 if _n_expr
== old_child
then
4364 n_expr
= new_child
.as(AExpr)
4367 if _n_op
== old_child
then
4368 n_op
= new_child
.as(TMinus)
4371 if _n_expr2
== old_child
then
4372 n_expr2
= new_child
.as(AExpr)
4377 redef fun n_expr
=(node
)
4382 redef fun n_op
=(node
)
4387 redef fun n_expr2
=(node
)
4394 redef fun visit_all
(v
: Visitor)
4396 v
.enter_visit
(_n_expr
)
4397 v
.enter_visit
(_n_op
)
4398 v
.enter_visit
(_n_expr2
)
4401 redef class AStarshipExpr
4402 init init_astarshipexpr
(
4403 n_expr
: nullable AExpr,
4404 n_op
: nullable TStarship,
4405 n_expr2
: nullable AExpr
4408 _n_expr
= n_expr
.as(not null)
4409 n_expr
.parent
= self
4410 _n_op
= n_op
.as(not null)
4412 _n_expr2
= n_expr2
.as(not null)
4413 n_expr2
.parent
= self
4416 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4418 if _n_expr
== old_child
then
4419 n_expr
= new_child
.as(AExpr)
4422 if _n_op
== old_child
then
4423 n_op
= new_child
.as(TStarship)
4426 if _n_expr2
== old_child
then
4427 n_expr2
= new_child
.as(AExpr)
4432 redef fun n_expr
=(node
)
4437 redef fun n_op
=(node
)
4442 redef fun n_expr2
=(node
)
4449 redef fun visit_all
(v
: Visitor)
4451 v
.enter_visit
(_n_expr
)
4452 v
.enter_visit
(_n_op
)
4453 v
.enter_visit
(_n_expr2
)
4456 redef class AStarExpr
4457 init init_astarexpr
(
4458 n_expr
: nullable AExpr,
4459 n_op
: nullable TStar,
4460 n_expr2
: nullable AExpr
4463 _n_expr
= n_expr
.as(not null)
4464 n_expr
.parent
= self
4465 _n_op
= n_op
.as(not null)
4467 _n_expr2
= n_expr2
.as(not null)
4468 n_expr2
.parent
= self
4471 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4473 if _n_expr
== old_child
then
4474 n_expr
= new_child
.as(AExpr)
4477 if _n_op
== old_child
then
4478 n_op
= new_child
.as(TStar)
4481 if _n_expr2
== old_child
then
4482 n_expr2
= new_child
.as(AExpr)
4487 redef fun n_expr
=(node
)
4492 redef fun n_op
=(node
)
4497 redef fun n_expr2
=(node
)
4504 redef fun visit_all
(v
: Visitor)
4506 v
.enter_visit
(_n_expr
)
4507 v
.enter_visit
(_n_op
)
4508 v
.enter_visit
(_n_expr2
)
4511 redef class AStarstarExpr
4512 init init_astarstarexpr
(
4513 n_expr
: nullable AExpr,
4514 n_op
: nullable TStarstar,
4515 n_expr2
: nullable AExpr
4518 _n_expr
= n_expr
.as(not null)
4519 n_expr
.parent
= self
4520 _n_op
= n_op
.as(not null)
4522 _n_expr2
= n_expr2
.as(not null)
4523 n_expr2
.parent
= self
4526 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4528 if _n_expr
== old_child
then
4529 n_expr
= new_child
.as(AExpr)
4532 if _n_op
== old_child
then
4533 n_op
= new_child
.as(TStarstar)
4536 if _n_expr2
== old_child
then
4537 n_expr2
= new_child
.as(AExpr)
4542 redef fun n_expr
=(node
)
4547 redef fun n_op
=(node
)
4552 redef fun n_expr2
=(node
)
4559 redef fun visit_all
(v
: Visitor)
4561 v
.enter_visit
(_n_expr
)
4562 v
.enter_visit
(_n_op
)
4563 v
.enter_visit
(_n_expr2
)
4566 redef class ASlashExpr
4567 init init_aslashexpr
(
4568 n_expr
: nullable AExpr,
4569 n_op
: nullable TSlash,
4570 n_expr2
: nullable AExpr
4573 _n_expr
= n_expr
.as(not null)
4574 n_expr
.parent
= self
4575 _n_op
= n_op
.as(not null)
4577 _n_expr2
= n_expr2
.as(not null)
4578 n_expr2
.parent
= self
4581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4583 if _n_expr
== old_child
then
4584 n_expr
= new_child
.as(AExpr)
4587 if _n_op
== old_child
then
4588 n_op
= new_child
.as(TSlash)
4591 if _n_expr2
== old_child
then
4592 n_expr2
= new_child
.as(AExpr)
4597 redef fun n_expr
=(node
)
4602 redef fun n_op
=(node
)
4607 redef fun n_expr2
=(node
)
4614 redef fun visit_all
(v
: Visitor)
4616 v
.enter_visit
(_n_expr
)
4617 v
.enter_visit
(_n_op
)
4618 v
.enter_visit
(_n_expr2
)
4621 redef class APercentExpr
4622 init init_apercentexpr
(
4623 n_expr
: nullable AExpr,
4624 n_op
: nullable TPercent,
4625 n_expr2
: nullable AExpr
4628 _n_expr
= n_expr
.as(not null)
4629 n_expr
.parent
= self
4630 _n_op
= n_op
.as(not null)
4632 _n_expr2
= n_expr2
.as(not null)
4633 n_expr2
.parent
= self
4636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4638 if _n_expr
== old_child
then
4639 n_expr
= new_child
.as(AExpr)
4642 if _n_op
== old_child
then
4643 n_op
= new_child
.as(TPercent)
4646 if _n_expr2
== old_child
then
4647 n_expr2
= new_child
.as(AExpr)
4652 redef fun n_expr
=(node
)
4657 redef fun n_op
=(node
)
4662 redef fun n_expr2
=(node
)
4669 redef fun visit_all
(v
: Visitor)
4671 v
.enter_visit
(_n_expr
)
4672 v
.enter_visit
(_n_op
)
4673 v
.enter_visit
(_n_expr2
)
4676 redef class APipeExpr
4677 init init_apipeexpr
(
4678 n_expr
: nullable AExpr,
4679 n_op
: nullable TPipe,
4680 n_expr2
: nullable AExpr
4683 _n_expr
= n_expr
.as(not null)
4684 n_expr
.parent
= self
4685 _n_op
= n_op
.as(not null)
4687 _n_expr2
= n_expr2
.as(not null)
4688 n_expr2
.parent
= self
4691 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4693 if _n_expr
== old_child
then
4694 n_expr
= new_child
.as(AExpr)
4697 if _n_op
== old_child
then
4698 n_op
= new_child
.as(TPipe)
4701 if _n_expr2
== old_child
then
4702 n_expr2
= new_child
.as(AExpr)
4707 redef fun n_expr
=(node
)
4712 redef fun n_op
=(node
)
4717 redef fun n_expr2
=(node
)
4724 redef fun visit_all
(v
: Visitor)
4726 v
.enter_visit
(_n_expr
)
4727 v
.enter_visit
(_n_op
)
4728 v
.enter_visit
(_n_expr2
)
4731 redef class ACaretExpr
4732 init init_acaretexpr
(
4733 n_expr
: nullable AExpr,
4734 n_op
: nullable TCaret,
4735 n_expr2
: nullable AExpr
4738 _n_expr
= n_expr
.as(not null)
4739 n_expr
.parent
= self
4740 _n_op
= n_op
.as(not null)
4742 _n_expr2
= n_expr2
.as(not null)
4743 n_expr2
.parent
= self
4746 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4748 if _n_expr
== old_child
then
4749 n_expr
= new_child
.as(AExpr)
4752 if _n_op
== old_child
then
4753 n_op
= new_child
.as(TCaret)
4756 if _n_expr2
== old_child
then
4757 n_expr2
= new_child
.as(AExpr)
4762 redef fun n_expr
=(node
)
4767 redef fun n_op
=(node
)
4772 redef fun n_expr2
=(node
)
4779 redef fun visit_all
(v
: Visitor)
4781 v
.enter_visit
(_n_expr
)
4782 v
.enter_visit
(_n_op
)
4783 v
.enter_visit
(_n_expr2
)
4786 redef class AAmpExpr
4787 init init_aampexpr
(
4788 n_expr
: nullable AExpr,
4789 n_op
: nullable TAmp,
4790 n_expr2
: nullable AExpr
4793 _n_expr
= n_expr
.as(not null)
4794 n_expr
.parent
= self
4795 _n_op
= n_op
.as(not null)
4797 _n_expr2
= n_expr2
.as(not null)
4798 n_expr2
.parent
= self
4801 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4803 if _n_expr
== old_child
then
4804 n_expr
= new_child
.as(AExpr)
4807 if _n_op
== old_child
then
4808 n_op
= new_child
.as(TAmp)
4811 if _n_expr2
== old_child
then
4812 n_expr2
= new_child
.as(AExpr)
4817 redef fun n_expr
=(node
)
4822 redef fun n_op
=(node
)
4827 redef fun n_expr2
=(node
)
4834 redef fun visit_all
(v
: Visitor)
4836 v
.enter_visit
(_n_expr
)
4837 v
.enter_visit
(_n_op
)
4838 v
.enter_visit
(_n_expr2
)
4841 redef class AUminusExpr
4842 init init_auminusexpr
(
4843 n_op
: nullable TMinus,
4844 n_expr
: nullable AExpr
4847 _n_op
= n_op
.as(not null)
4849 _n_expr
= n_expr
.as(not null)
4850 n_expr
.parent
= self
4853 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4855 if _n_op
== old_child
then
4856 n_op
= new_child
.as(TMinus)
4859 if _n_expr
== old_child
then
4860 n_expr
= new_child
.as(AExpr)
4865 redef fun n_op
=(node
)
4870 redef fun n_expr
=(node
)
4877 redef fun visit_all
(v
: Visitor)
4879 v
.enter_visit
(_n_op
)
4880 v
.enter_visit
(_n_expr
)
4883 redef class AUplusExpr
4884 init init_auplusexpr
(
4885 n_op
: nullable TPlus,
4886 n_expr
: nullable AExpr
4889 _n_op
= n_op
.as(not null)
4891 _n_expr
= n_expr
.as(not null)
4892 n_expr
.parent
= self
4895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4897 if _n_op
== old_child
then
4898 n_op
= new_child
.as(TPlus)
4901 if _n_expr
== old_child
then
4902 n_expr
= new_child
.as(AExpr)
4907 redef fun n_op
=(node
)
4912 redef fun n_expr
=(node
)
4919 redef fun visit_all
(v
: Visitor)
4921 v
.enter_visit
(_n_op
)
4922 v
.enter_visit
(_n_expr
)
4925 redef class AUtildeExpr
4926 init init_autildeexpr
(
4927 n_op
: nullable TTilde,
4928 n_expr
: nullable AExpr
4931 _n_op
= n_op
.as(not null)
4933 _n_expr
= n_expr
.as(not null)
4934 n_expr
.parent
= self
4937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4939 if _n_op
== old_child
then
4940 n_op
= new_child
.as(TTilde)
4943 if _n_expr
== old_child
then
4944 n_expr
= new_child
.as(AExpr)
4949 redef fun n_op
=(node
)
4954 redef fun n_expr
=(node
)
4961 redef fun visit_all
(v
: Visitor)
4963 v
.enter_visit
(_n_op
)
4964 v
.enter_visit
(_n_expr
)
4967 redef class ANewExpr
4968 init init_anewexpr
(
4969 n_kwnew
: nullable TKwnew,
4970 n_type
: nullable AType,
4972 n_args
: nullable AExprs
4975 _n_kwnew
= n_kwnew
.as(not null)
4976 n_kwnew
.parent
= self
4977 _n_type
= n_type
.as(not null)
4978 n_type
.parent
= self
4980 if n_id
!= null then n_id
.parent
= self
4981 _n_args
= n_args
.as(not null)
4982 n_args
.parent
= self
4985 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4987 if _n_kwnew
== old_child
then
4988 n_kwnew
= new_child
.as(TKwnew)
4991 if _n_type
== old_child
then
4992 n_type
= new_child
.as(AType)
4995 if _n_id
== old_child
then
4996 n_id
= new_child
.as(nullable TId)
4999 if _n_args
== old_child
then
5000 n_args
= new_child
.as(AExprs)
5005 redef fun n_kwnew
=(node
)
5010 redef fun n_type
=(node
)
5015 redef fun n_id
=(node
)
5018 if node
!= null then node
.parent
= self
5020 redef fun n_args
=(node
)
5027 redef fun visit_all
(v
: Visitor)
5029 v
.enter_visit
(_n_kwnew
)
5030 v
.enter_visit
(_n_type
)
5031 v
.enter_visit
(_n_id
)
5032 v
.enter_visit
(_n_args
)
5035 redef class AAttrExpr
5036 init init_aattrexpr
(
5037 n_expr
: nullable AExpr,
5038 n_id
: nullable TAttrid
5041 _n_expr
= n_expr
.as(not null)
5042 n_expr
.parent
= self
5043 _n_id
= n_id
.as(not null)
5047 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5049 if _n_expr
== old_child
then
5050 n_expr
= new_child
.as(AExpr)
5053 if _n_id
== old_child
then
5054 n_id
= new_child
.as(TAttrid)
5059 redef fun n_expr
=(node
)
5064 redef fun n_id
=(node
)
5071 redef fun visit_all
(v
: Visitor)
5073 v
.enter_visit
(_n_expr
)
5074 v
.enter_visit
(_n_id
)
5077 redef class AAttrAssignExpr
5078 init init_aattrassignexpr
(
5079 n_expr
: nullable AExpr,
5080 n_id
: nullable TAttrid,
5081 n_assign
: nullable TAssign,
5082 n_value
: nullable AExpr
5085 _n_expr
= n_expr
.as(not null)
5086 n_expr
.parent
= self
5087 _n_id
= n_id
.as(not null)
5089 _n_assign
= n_assign
.as(not null)
5090 n_assign
.parent
= self
5091 _n_value
= n_value
.as(not null)
5092 n_value
.parent
= self
5095 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5097 if _n_expr
== old_child
then
5098 n_expr
= new_child
.as(AExpr)
5101 if _n_id
== old_child
then
5102 n_id
= new_child
.as(TAttrid)
5105 if _n_assign
== old_child
then
5106 n_assign
= new_child
.as(TAssign)
5109 if _n_value
== old_child
then
5110 n_value
= new_child
.as(AExpr)
5115 redef fun n_expr
=(node
)
5120 redef fun n_id
=(node
)
5125 redef fun n_assign
=(node
)
5130 redef fun n_value
=(node
)
5137 redef fun visit_all
(v
: Visitor)
5139 v
.enter_visit
(_n_expr
)
5140 v
.enter_visit
(_n_id
)
5141 v
.enter_visit
(_n_assign
)
5142 v
.enter_visit
(_n_value
)
5145 redef class AAttrReassignExpr
5146 init init_aattrreassignexpr
(
5147 n_expr
: nullable AExpr,
5148 n_id
: nullable TAttrid,
5149 n_assign_op
: nullable AAssignOp,
5150 n_value
: nullable AExpr
5153 _n_expr
= n_expr
.as(not null)
5154 n_expr
.parent
= self
5155 _n_id
= n_id
.as(not null)
5157 _n_assign_op
= n_assign_op
.as(not null)
5158 n_assign_op
.parent
= self
5159 _n_value
= n_value
.as(not null)
5160 n_value
.parent
= self
5163 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5165 if _n_expr
== old_child
then
5166 n_expr
= new_child
.as(AExpr)
5169 if _n_id
== old_child
then
5170 n_id
= new_child
.as(TAttrid)
5173 if _n_assign_op
== old_child
then
5174 n_assign_op
= new_child
.as(AAssignOp)
5177 if _n_value
== old_child
then
5178 n_value
= new_child
.as(AExpr)
5183 redef fun n_expr
=(node
)
5188 redef fun n_id
=(node
)
5193 redef fun n_assign_op
=(node
)
5198 redef fun n_value
=(node
)
5205 redef fun visit_all
(v
: Visitor)
5207 v
.enter_visit
(_n_expr
)
5208 v
.enter_visit
(_n_id
)
5209 v
.enter_visit
(_n_assign_op
)
5210 v
.enter_visit
(_n_value
)
5213 redef class ACallExpr
5214 init init_acallexpr
(
5215 n_expr
: nullable AExpr,
5217 n_args
: nullable AExprs
5220 _n_expr
= n_expr
.as(not null)
5221 n_expr
.parent
= self
5222 _n_id
= n_id
.as(not null)
5224 _n_args
= n_args
.as(not null)
5225 n_args
.parent
= self
5228 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5230 if _n_expr
== old_child
then
5231 n_expr
= new_child
.as(AExpr)
5234 if _n_id
== old_child
then
5235 n_id
= new_child
.as(TId)
5238 if _n_args
== old_child
then
5239 n_args
= new_child
.as(AExprs)
5244 redef fun n_expr
=(node
)
5249 redef fun n_id
=(node
)
5254 redef fun n_args
=(node
)
5261 redef fun visit_all
(v
: Visitor)
5263 v
.enter_visit
(_n_expr
)
5264 v
.enter_visit
(_n_id
)
5265 v
.enter_visit
(_n_args
)
5268 redef class ACallAssignExpr
5269 init init_acallassignexpr
(
5270 n_expr
: nullable AExpr,
5272 n_args
: nullable AExprs,
5273 n_assign
: nullable TAssign,
5274 n_value
: nullable AExpr
5277 _n_expr
= n_expr
.as(not null)
5278 n_expr
.parent
= self
5279 _n_id
= n_id
.as(not null)
5281 _n_args
= n_args
.as(not null)
5282 n_args
.parent
= self
5283 _n_assign
= n_assign
.as(not null)
5284 n_assign
.parent
= self
5285 _n_value
= n_value
.as(not null)
5286 n_value
.parent
= self
5289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5291 if _n_expr
== old_child
then
5292 n_expr
= new_child
.as(AExpr)
5295 if _n_id
== old_child
then
5296 n_id
= new_child
.as(TId)
5299 if _n_args
== old_child
then
5300 n_args
= new_child
.as(AExprs)
5303 if _n_assign
== old_child
then
5304 n_assign
= new_child
.as(TAssign)
5307 if _n_value
== old_child
then
5308 n_value
= new_child
.as(AExpr)
5313 redef fun n_expr
=(node
)
5318 redef fun n_id
=(node
)
5323 redef fun n_args
=(node
)
5328 redef fun n_assign
=(node
)
5333 redef fun n_value
=(node
)
5340 redef fun visit_all
(v
: Visitor)
5342 v
.enter_visit
(_n_expr
)
5343 v
.enter_visit
(_n_id
)
5344 v
.enter_visit
(_n_args
)
5345 v
.enter_visit
(_n_assign
)
5346 v
.enter_visit
(_n_value
)
5349 redef class ACallReassignExpr
5350 init init_acallreassignexpr
(
5351 n_expr
: nullable AExpr,
5353 n_args
: nullable AExprs,
5354 n_assign_op
: nullable AAssignOp,
5355 n_value
: nullable AExpr
5358 _n_expr
= n_expr
.as(not null)
5359 n_expr
.parent
= self
5360 _n_id
= n_id
.as(not null)
5362 _n_args
= n_args
.as(not null)
5363 n_args
.parent
= self
5364 _n_assign_op
= n_assign_op
.as(not null)
5365 n_assign_op
.parent
= self
5366 _n_value
= n_value
.as(not null)
5367 n_value
.parent
= self
5370 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5372 if _n_expr
== old_child
then
5373 n_expr
= new_child
.as(AExpr)
5376 if _n_id
== old_child
then
5377 n_id
= new_child
.as(TId)
5380 if _n_args
== old_child
then
5381 n_args
= new_child
.as(AExprs)
5384 if _n_assign_op
== old_child
then
5385 n_assign_op
= new_child
.as(AAssignOp)
5388 if _n_value
== old_child
then
5389 n_value
= new_child
.as(AExpr)
5394 redef fun n_expr
=(node
)
5399 redef fun n_id
=(node
)
5404 redef fun n_args
=(node
)
5409 redef fun n_assign_op
=(node
)
5414 redef fun n_value
=(node
)
5421 redef fun visit_all
(v
: Visitor)
5423 v
.enter_visit
(_n_expr
)
5424 v
.enter_visit
(_n_id
)
5425 v
.enter_visit
(_n_args
)
5426 v
.enter_visit
(_n_assign_op
)
5427 v
.enter_visit
(_n_value
)
5430 redef class ASuperExpr
5431 init init_asuperexpr
(
5432 n_qualified
: nullable AQualified,
5433 n_kwsuper
: nullable TKwsuper,
5434 n_args
: nullable AExprs
5437 _n_qualified
= n_qualified
5438 if n_qualified
!= null then n_qualified
.parent
= self
5439 _n_kwsuper
= n_kwsuper
.as(not null)
5440 n_kwsuper
.parent
= self
5441 _n_args
= n_args
.as(not null)
5442 n_args
.parent
= self
5445 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5447 if _n_qualified
== old_child
then
5448 n_qualified
= new_child
.as(nullable AQualified)
5451 if _n_kwsuper
== old_child
then
5452 n_kwsuper
= new_child
.as(TKwsuper)
5455 if _n_args
== old_child
then
5456 n_args
= new_child
.as(AExprs)
5461 redef fun n_qualified
=(node
)
5464 if node
!= null then node
.parent
= self
5466 redef fun n_kwsuper
=(node
)
5471 redef fun n_args
=(node
)
5478 redef fun visit_all
(v
: Visitor)
5480 v
.enter_visit
(_n_qualified
)
5481 v
.enter_visit
(_n_kwsuper
)
5482 v
.enter_visit
(_n_args
)
5485 redef class AInitExpr
5486 init init_ainitexpr
(
5487 n_expr
: nullable AExpr,
5488 n_kwinit
: nullable TKwinit,
5489 n_args
: nullable AExprs
5492 _n_expr
= n_expr
.as(not null)
5493 n_expr
.parent
= self
5494 _n_kwinit
= n_kwinit
.as(not null)
5495 n_kwinit
.parent
= self
5496 _n_args
= n_args
.as(not null)
5497 n_args
.parent
= self
5500 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5502 if _n_expr
== old_child
then
5503 n_expr
= new_child
.as(AExpr)
5506 if _n_kwinit
== old_child
then
5507 n_kwinit
= new_child
.as(TKwinit)
5510 if _n_args
== old_child
then
5511 n_args
= new_child
.as(AExprs)
5516 redef fun n_expr
=(node
)
5521 redef fun n_kwinit
=(node
)
5526 redef fun n_args
=(node
)
5533 redef fun visit_all
(v
: Visitor)
5535 v
.enter_visit
(_n_expr
)
5536 v
.enter_visit
(_n_kwinit
)
5537 v
.enter_visit
(_n_args
)
5540 redef class ABraExpr
5541 init init_abraexpr
(
5542 n_expr
: nullable AExpr,
5543 n_args
: nullable AExprs
5546 _n_expr
= n_expr
.as(not null)
5547 n_expr
.parent
= self
5548 _n_args
= n_args
.as(not null)
5549 n_args
.parent
= self
5552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5554 if _n_expr
== old_child
then
5555 n_expr
= new_child
.as(AExpr)
5558 if _n_args
== old_child
then
5559 n_args
= new_child
.as(AExprs)
5564 redef fun n_expr
=(node
)
5569 redef fun n_args
=(node
)
5576 redef fun visit_all
(v
: Visitor)
5578 v
.enter_visit
(_n_expr
)
5579 v
.enter_visit
(_n_args
)
5582 redef class ABraAssignExpr
5583 init init_abraassignexpr
(
5584 n_expr
: nullable AExpr,
5585 n_args
: nullable AExprs,
5586 n_assign
: nullable TAssign,
5587 n_value
: nullable AExpr
5590 _n_expr
= n_expr
.as(not null)
5591 n_expr
.parent
= self
5592 _n_args
= n_args
.as(not null)
5593 n_args
.parent
= self
5594 _n_assign
= n_assign
.as(not null)
5595 n_assign
.parent
= self
5596 _n_value
= n_value
.as(not null)
5597 n_value
.parent
= self
5600 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5602 if _n_expr
== old_child
then
5603 n_expr
= new_child
.as(AExpr)
5606 if _n_args
== old_child
then
5607 n_args
= new_child
.as(AExprs)
5610 if _n_assign
== old_child
then
5611 n_assign
= new_child
.as(TAssign)
5614 if _n_value
== old_child
then
5615 n_value
= new_child
.as(AExpr)
5620 redef fun n_expr
=(node
)
5625 redef fun n_args
=(node
)
5630 redef fun n_assign
=(node
)
5635 redef fun n_value
=(node
)
5642 redef fun visit_all
(v
: Visitor)
5644 v
.enter_visit
(_n_expr
)
5645 v
.enter_visit
(_n_args
)
5646 v
.enter_visit
(_n_assign
)
5647 v
.enter_visit
(_n_value
)
5650 redef class ABraReassignExpr
5651 init init_abrareassignexpr
(
5652 n_expr
: nullable AExpr,
5653 n_args
: nullable AExprs,
5654 n_assign_op
: nullable AAssignOp,
5655 n_value
: nullable AExpr
5658 _n_expr
= n_expr
.as(not null)
5659 n_expr
.parent
= self
5660 _n_args
= n_args
.as(not null)
5661 n_args
.parent
= self
5662 _n_assign_op
= n_assign_op
.as(not null)
5663 n_assign_op
.parent
= self
5664 _n_value
= n_value
.as(not null)
5665 n_value
.parent
= self
5668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5670 if _n_expr
== old_child
then
5671 n_expr
= new_child
.as(AExpr)
5674 if _n_args
== old_child
then
5675 n_args
= new_child
.as(AExprs)
5678 if _n_assign_op
== old_child
then
5679 n_assign_op
= new_child
.as(AAssignOp)
5682 if _n_value
== old_child
then
5683 n_value
= new_child
.as(AExpr)
5688 redef fun n_expr
=(node
)
5693 redef fun n_args
=(node
)
5698 redef fun n_assign_op
=(node
)
5703 redef fun n_value
=(node
)
5710 redef fun visit_all
(v
: Visitor)
5712 v
.enter_visit
(_n_expr
)
5713 v
.enter_visit
(_n_args
)
5714 v
.enter_visit
(_n_assign_op
)
5715 v
.enter_visit
(_n_value
)
5718 redef class AVarExpr
5719 init init_avarexpr
(
5723 _n_id
= n_id
.as(not null)
5727 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5729 if _n_id
== old_child
then
5730 n_id
= new_child
.as(TId)
5735 redef fun n_id
=(node
)
5742 redef fun visit_all
(v
: Visitor)
5744 v
.enter_visit
(_n_id
)
5747 redef class AVarAssignExpr
5748 init init_avarassignexpr
(
5750 n_assign
: nullable TAssign,
5751 n_value
: nullable AExpr
5754 _n_id
= n_id
.as(not null)
5756 _n_assign
= n_assign
.as(not null)
5757 n_assign
.parent
= self
5758 _n_value
= n_value
.as(not null)
5759 n_value
.parent
= self
5762 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5764 if _n_id
== old_child
then
5765 n_id
= new_child
.as(TId)
5768 if _n_assign
== old_child
then
5769 n_assign
= new_child
.as(TAssign)
5772 if _n_value
== old_child
then
5773 n_value
= new_child
.as(AExpr)
5778 redef fun n_id
=(node
)
5783 redef fun n_assign
=(node
)
5788 redef fun n_value
=(node
)
5795 redef fun visit_all
(v
: Visitor)
5797 v
.enter_visit
(_n_id
)
5798 v
.enter_visit
(_n_assign
)
5799 v
.enter_visit
(_n_value
)
5802 redef class AVarReassignExpr
5803 init init_avarreassignexpr
(
5805 n_assign_op
: nullable AAssignOp,
5806 n_value
: nullable AExpr
5809 _n_id
= n_id
.as(not null)
5811 _n_assign_op
= n_assign_op
.as(not null)
5812 n_assign_op
.parent
= self
5813 _n_value
= n_value
.as(not null)
5814 n_value
.parent
= self
5817 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5819 if _n_id
== old_child
then
5820 n_id
= new_child
.as(TId)
5823 if _n_assign_op
== old_child
then
5824 n_assign_op
= new_child
.as(AAssignOp)
5827 if _n_value
== old_child
then
5828 n_value
= new_child
.as(AExpr)
5833 redef fun n_id
=(node
)
5838 redef fun n_assign_op
=(node
)
5843 redef fun n_value
=(node
)
5850 redef fun visit_all
(v
: Visitor)
5852 v
.enter_visit
(_n_id
)
5853 v
.enter_visit
(_n_assign_op
)
5854 v
.enter_visit
(_n_value
)
5857 redef class ARangeExpr
5858 init init_arangeexpr
(
5859 n_expr
: nullable AExpr,
5860 n_expr2
: nullable AExpr,
5861 n_annotations
: nullable AAnnotations
5864 _n_expr
= n_expr
.as(not null)
5865 n_expr
.parent
= self
5866 _n_expr2
= n_expr2
.as(not null)
5867 n_expr2
.parent
= self
5868 _n_annotations
= n_annotations
5869 if n_annotations
!= null then n_annotations
.parent
= self
5872 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5874 if _n_expr
== old_child
then
5875 n_expr
= new_child
.as(AExpr)
5878 if _n_expr2
== old_child
then
5879 n_expr2
= new_child
.as(AExpr)
5882 if _n_annotations
== old_child
then
5883 n_annotations
= new_child
.as(nullable AAnnotations)
5888 redef fun n_expr
=(node
)
5893 redef fun n_expr2
=(node
)
5898 redef fun n_annotations
=(node
)
5900 _n_annotations
= node
5901 if node
!= null then node
.parent
= self
5905 redef fun visit_all
(v
: Visitor)
5907 v
.enter_visit
(_n_expr
)
5908 v
.enter_visit
(_n_expr2
)
5909 v
.enter_visit
(_n_annotations
)
5912 redef class ACrangeExpr
5913 init init_acrangeexpr
(
5914 n_obra
: nullable TObra,
5915 n_expr
: nullable AExpr,
5916 n_dotdot
: nullable TDotdot,
5917 n_expr2
: nullable AExpr,
5918 n_cbra
: nullable TCbra,
5919 n_annotations
: nullable AAnnotations
5922 _n_obra
= n_obra
.as(not null)
5923 n_obra
.parent
= self
5924 _n_expr
= n_expr
.as(not null)
5925 n_expr
.parent
= self
5926 _n_dotdot
= n_dotdot
.as(not null)
5927 n_dotdot
.parent
= self
5928 _n_expr2
= n_expr2
.as(not null)
5929 n_expr2
.parent
= self
5930 _n_cbra
= n_cbra
.as(not null)
5931 n_cbra
.parent
= self
5932 _n_annotations
= n_annotations
5933 if n_annotations
!= null then n_annotations
.parent
= self
5936 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5938 if _n_obra
== old_child
then
5939 n_obra
= new_child
.as(TObra)
5942 if _n_expr
== old_child
then
5943 n_expr
= new_child
.as(AExpr)
5946 if _n_dotdot
== old_child
then
5947 n_dotdot
= new_child
.as(TDotdot)
5950 if _n_expr2
== old_child
then
5951 n_expr2
= new_child
.as(AExpr)
5954 if _n_cbra
== old_child
then
5955 n_cbra
= new_child
.as(TCbra)
5958 if _n_annotations
== old_child
then
5959 n_annotations
= new_child
.as(nullable AAnnotations)
5964 redef fun n_obra
=(node
)
5969 redef fun n_expr
=(node
)
5974 redef fun n_dotdot
=(node
)
5979 redef fun n_expr2
=(node
)
5984 redef fun n_cbra
=(node
)
5989 redef fun n_annotations
=(node
)
5991 _n_annotations
= node
5992 if node
!= null then node
.parent
= self
5996 redef fun visit_all
(v
: Visitor)
5998 v
.enter_visit
(_n_obra
)
5999 v
.enter_visit
(_n_expr
)
6000 v
.enter_visit
(_n_dotdot
)
6001 v
.enter_visit
(_n_expr2
)
6002 v
.enter_visit
(_n_cbra
)
6003 v
.enter_visit
(_n_annotations
)
6006 redef class AOrangeExpr
6007 init init_aorangeexpr
(
6008 n_obra
: nullable TObra,
6009 n_expr
: nullable AExpr,
6010 n_dotdot
: nullable TDotdot,
6011 n_expr2
: nullable AExpr,
6012 n_cbra
: nullable TObra,
6013 n_annotations
: nullable AAnnotations
6016 _n_obra
= n_obra
.as(not null)
6017 n_obra
.parent
= self
6018 _n_expr
= n_expr
.as(not null)
6019 n_expr
.parent
= self
6020 _n_dotdot
= n_dotdot
.as(not null)
6021 n_dotdot
.parent
= self
6022 _n_expr2
= n_expr2
.as(not null)
6023 n_expr2
.parent
= self
6024 _n_cbra
= n_cbra
.as(not null)
6025 n_cbra
.parent
= self
6026 _n_annotations
= n_annotations
6027 if n_annotations
!= null then n_annotations
.parent
= self
6030 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6032 if _n_obra
== old_child
then
6033 n_obra
= new_child
.as(TObra)
6036 if _n_expr
== old_child
then
6037 n_expr
= new_child
.as(AExpr)
6040 if _n_dotdot
== old_child
then
6041 n_dotdot
= new_child
.as(TDotdot)
6044 if _n_expr2
== old_child
then
6045 n_expr2
= new_child
.as(AExpr)
6048 if _n_cbra
== old_child
then
6049 n_cbra
= new_child
.as(TObra)
6052 if _n_annotations
== old_child
then
6053 n_annotations
= new_child
.as(nullable AAnnotations)
6058 redef fun n_obra
=(node
)
6063 redef fun n_expr
=(node
)
6068 redef fun n_dotdot
=(node
)
6073 redef fun n_expr2
=(node
)
6078 redef fun n_cbra
=(node
)
6083 redef fun n_annotations
=(node
)
6085 _n_annotations
= node
6086 if node
!= null then node
.parent
= self
6090 redef fun visit_all
(v
: Visitor)
6092 v
.enter_visit
(_n_obra
)
6093 v
.enter_visit
(_n_expr
)
6094 v
.enter_visit
(_n_dotdot
)
6095 v
.enter_visit
(_n_expr2
)
6096 v
.enter_visit
(_n_cbra
)
6097 v
.enter_visit
(_n_annotations
)
6100 redef class AArrayExpr
6101 init init_aarrayexpr
(
6102 n_obra
: nullable TObra,
6103 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6104 n_type
: nullable AType,
6105 n_cbra
: nullable TCbra,
6106 n_annotations
: nullable AAnnotations
6109 _n_obra
= n_obra
.as(not null)
6110 n_obra
.parent
= self
6111 self.n_exprs
.unsafe_add_all
(n_exprs
)
6113 if n_type
!= null then n_type
.parent
= self
6114 _n_cbra
= n_cbra
.as(not null)
6115 n_cbra
.parent
= self
6116 _n_annotations
= n_annotations
6117 if n_annotations
!= null then n_annotations
.parent
= self
6120 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6122 if _n_obra
== old_child
then
6123 n_obra
= new_child
.as(TObra)
6126 if n_exprs
.replace_child
(old_child
, new_child
) then return
6127 if _n_type
== old_child
then
6128 n_type
= new_child
.as(nullable AType)
6131 if _n_cbra
== old_child
then
6132 n_cbra
= new_child
.as(TCbra)
6135 if _n_annotations
== old_child
then
6136 n_annotations
= new_child
.as(nullable AAnnotations)
6141 redef fun n_obra
=(node
)
6146 redef fun n_type
=(node
)
6149 if node
!= null then node
.parent
= self
6151 redef fun n_cbra
=(node
)
6156 redef fun n_annotations
=(node
)
6158 _n_annotations
= node
6159 if node
!= null then node
.parent
= self
6163 redef fun visit_all
(v
: Visitor)
6165 v
.enter_visit
(_n_obra
)
6166 n_exprs
.visit_all
(v
)
6167 v
.enter_visit
(_n_type
)
6168 v
.enter_visit
(_n_cbra
)
6169 v
.enter_visit
(_n_annotations
)
6172 redef class ASelfExpr
6173 init init_aselfexpr
(
6174 n_kwself
: nullable TKwself,
6175 n_annotations
: nullable AAnnotations
6178 _n_kwself
= n_kwself
.as(not null)
6179 n_kwself
.parent
= self
6180 _n_annotations
= n_annotations
6181 if n_annotations
!= null then n_annotations
.parent
= self
6184 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6186 if _n_kwself
== old_child
then
6187 n_kwself
= new_child
.as(TKwself)
6190 if _n_annotations
== old_child
then
6191 n_annotations
= new_child
.as(nullable AAnnotations)
6196 redef fun n_kwself
=(node
)
6201 redef fun n_annotations
=(node
)
6203 _n_annotations
= node
6204 if node
!= null then node
.parent
= self
6208 redef fun visit_all
(v
: Visitor)
6210 v
.enter_visit
(_n_kwself
)
6211 v
.enter_visit
(_n_annotations
)
6214 redef class AImplicitSelfExpr
6215 init init_aimplicitselfexpr
6219 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6225 redef fun visit_all
(v
: Visitor)
6229 redef class ATrueExpr
6230 init init_atrueexpr
(
6231 n_kwtrue
: nullable TKwtrue,
6232 n_annotations
: nullable AAnnotations
6235 _n_kwtrue
= n_kwtrue
.as(not null)
6236 n_kwtrue
.parent
= self
6237 _n_annotations
= n_annotations
6238 if n_annotations
!= null then n_annotations
.parent
= self
6241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6243 if _n_kwtrue
== old_child
then
6244 n_kwtrue
= new_child
.as(TKwtrue)
6247 if _n_annotations
== old_child
then
6248 n_annotations
= new_child
.as(nullable AAnnotations)
6253 redef fun n_kwtrue
=(node
)
6258 redef fun n_annotations
=(node
)
6260 _n_annotations
= node
6261 if node
!= null then node
.parent
= self
6265 redef fun visit_all
(v
: Visitor)
6267 v
.enter_visit
(_n_kwtrue
)
6268 v
.enter_visit
(_n_annotations
)
6271 redef class AFalseExpr
6272 init init_afalseexpr
(
6273 n_kwfalse
: nullable TKwfalse,
6274 n_annotations
: nullable AAnnotations
6277 _n_kwfalse
= n_kwfalse
.as(not null)
6278 n_kwfalse
.parent
= self
6279 _n_annotations
= n_annotations
6280 if n_annotations
!= null then n_annotations
.parent
= self
6283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6285 if _n_kwfalse
== old_child
then
6286 n_kwfalse
= new_child
.as(TKwfalse)
6289 if _n_annotations
== old_child
then
6290 n_annotations
= new_child
.as(nullable AAnnotations)
6295 redef fun n_kwfalse
=(node
)
6300 redef fun n_annotations
=(node
)
6302 _n_annotations
= node
6303 if node
!= null then node
.parent
= self
6307 redef fun visit_all
(v
: Visitor)
6309 v
.enter_visit
(_n_kwfalse
)
6310 v
.enter_visit
(_n_annotations
)
6313 redef class ANullExpr
6314 init init_anullexpr
(
6315 n_kwnull
: nullable TKwnull,
6316 n_annotations
: nullable AAnnotations
6319 _n_kwnull
= n_kwnull
.as(not null)
6320 n_kwnull
.parent
= self
6321 _n_annotations
= n_annotations
6322 if n_annotations
!= null then n_annotations
.parent
= self
6325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6327 if _n_kwnull
== old_child
then
6328 n_kwnull
= new_child
.as(TKwnull)
6331 if _n_annotations
== old_child
then
6332 n_annotations
= new_child
.as(nullable AAnnotations)
6337 redef fun n_kwnull
=(node
)
6342 redef fun n_annotations
=(node
)
6344 _n_annotations
= node
6345 if node
!= null then node
.parent
= self
6349 redef fun visit_all
(v
: Visitor)
6351 v
.enter_visit
(_n_kwnull
)
6352 v
.enter_visit
(_n_annotations
)
6355 redef class ADecIntExpr
6356 init init_adecintexpr
(
6357 n_number
: nullable TNumber,
6358 n_annotations
: nullable AAnnotations
6361 _n_number
= n_number
.as(not null)
6362 n_number
.parent
= self
6363 _n_annotations
= n_annotations
6364 if n_annotations
!= null then n_annotations
.parent
= self
6367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6369 if _n_number
== old_child
then
6370 n_number
= new_child
.as(TNumber)
6373 if _n_annotations
== old_child
then
6374 n_annotations
= new_child
.as(nullable AAnnotations)
6379 redef fun n_number
=(node
)
6384 redef fun n_annotations
=(node
)
6386 _n_annotations
= node
6387 if node
!= null then node
.parent
= self
6391 redef fun visit_all
(v
: Visitor)
6393 v
.enter_visit
(_n_number
)
6394 v
.enter_visit
(_n_annotations
)
6397 redef class AHexIntExpr
6398 init init_ahexintexpr
(
6399 n_hex_number
: nullable THexNumber,
6400 n_annotations
: nullable AAnnotations
6403 _n_hex_number
= n_hex_number
.as(not null)
6404 n_hex_number
.parent
= self
6405 _n_annotations
= n_annotations
6406 if n_annotations
!= null then n_annotations
.parent
= self
6409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6411 if _n_hex_number
== old_child
then
6412 n_hex_number
= new_child
.as(THexNumber)
6415 if _n_annotations
== old_child
then
6416 n_annotations
= new_child
.as(nullable AAnnotations)
6421 redef fun n_hex_number
=(node
)
6423 _n_hex_number
= node
6426 redef fun n_annotations
=(node
)
6428 _n_annotations
= node
6429 if node
!= null then node
.parent
= self
6433 redef fun visit_all
(v
: Visitor)
6435 v
.enter_visit
(_n_hex_number
)
6436 v
.enter_visit
(_n_annotations
)
6439 redef class ABinIntExpr
6440 init init_abinintexpr
(
6441 n_bin_number
: nullable TBinNumber,
6442 n_annotations
: nullable AAnnotations
6445 _n_bin_number
= n_bin_number
.as(not null)
6446 n_bin_number
.parent
= self
6447 _n_annotations
= n_annotations
6448 if n_annotations
!= null then n_annotations
.parent
= self
6451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6453 if _n_bin_number
== old_child
then
6454 n_bin_number
= new_child
.as(TBinNumber)
6457 if _n_annotations
== old_child
then
6458 n_annotations
= new_child
.as(nullable AAnnotations)
6463 redef fun n_bin_number
=(node
)
6465 _n_bin_number
= node
6468 redef fun n_annotations
=(node
)
6470 _n_annotations
= node
6471 if node
!= null then node
.parent
= self
6475 redef fun visit_all
(v
: Visitor)
6477 v
.enter_visit
(_n_bin_number
)
6478 v
.enter_visit
(_n_annotations
)
6481 redef class AOctIntExpr
6482 init init_aoctintexpr
(
6483 n_oct_number
: nullable TOctNumber,
6484 n_annotations
: nullable AAnnotations
6487 _n_oct_number
= n_oct_number
.as(not null)
6488 n_oct_number
.parent
= self
6489 _n_annotations
= n_annotations
6490 if n_annotations
!= null then n_annotations
.parent
= self
6493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6495 if _n_oct_number
== old_child
then
6496 n_oct_number
= new_child
.as(TOctNumber)
6499 if _n_annotations
== old_child
then
6500 n_annotations
= new_child
.as(nullable AAnnotations)
6505 redef fun n_oct_number
=(node
)
6507 _n_oct_number
= node
6510 redef fun n_annotations
=(node
)
6512 _n_annotations
= node
6513 if node
!= null then node
.parent
= self
6517 redef fun visit_all
(v
: Visitor)
6519 v
.enter_visit
(_n_oct_number
)
6520 v
.enter_visit
(_n_annotations
)
6523 redef class AFloatExpr
6524 init init_afloatexpr
(
6525 n_float
: nullable TFloat,
6526 n_annotations
: nullable AAnnotations
6529 _n_float
= n_float
.as(not null)
6530 n_float
.parent
= self
6531 _n_annotations
= n_annotations
6532 if n_annotations
!= null then n_annotations
.parent
= self
6535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6537 if _n_float
== old_child
then
6538 n_float
= new_child
.as(TFloat)
6541 if _n_annotations
== old_child
then
6542 n_annotations
= new_child
.as(nullable AAnnotations)
6547 redef fun n_float
=(node
)
6552 redef fun n_annotations
=(node
)
6554 _n_annotations
= node
6555 if node
!= null then node
.parent
= self
6559 redef fun visit_all
(v
: Visitor)
6561 v
.enter_visit
(_n_float
)
6562 v
.enter_visit
(_n_annotations
)
6565 redef class ACharExpr
6566 init init_acharexpr
(
6567 n_char
: nullable TChar,
6568 n_annotations
: nullable AAnnotations
6571 _n_char
= n_char
.as(not null)
6572 n_char
.parent
= self
6573 _n_annotations
= n_annotations
6574 if n_annotations
!= null then n_annotations
.parent
= self
6577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6579 if _n_char
== old_child
then
6580 n_char
= new_child
.as(TChar)
6583 if _n_annotations
== old_child
then
6584 n_annotations
= new_child
.as(nullable AAnnotations)
6589 redef fun n_char
=(node
)
6594 redef fun n_annotations
=(node
)
6596 _n_annotations
= node
6597 if node
!= null then node
.parent
= self
6601 redef fun visit_all
(v
: Visitor)
6603 v
.enter_visit
(_n_char
)
6604 v
.enter_visit
(_n_annotations
)
6607 redef class AStringExpr
6608 init init_astringexpr
(
6609 n_string
: nullable TString,
6610 n_annotations
: nullable AAnnotations
6613 _n_string
= n_string
.as(not null)
6614 n_string
.parent
= self
6615 _n_annotations
= n_annotations
6616 if n_annotations
!= null then n_annotations
.parent
= self
6619 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6621 if _n_string
== old_child
then
6622 n_string
= new_child
.as(TString)
6625 if _n_annotations
== old_child
then
6626 n_annotations
= new_child
.as(nullable AAnnotations)
6631 redef fun n_string
=(node
)
6636 redef fun n_annotations
=(node
)
6638 _n_annotations
= node
6639 if node
!= null then node
.parent
= self
6643 redef fun visit_all
(v
: Visitor)
6645 v
.enter_visit
(_n_string
)
6646 v
.enter_visit
(_n_annotations
)
6649 redef class AStartStringExpr
6650 init init_astartstringexpr
(
6651 n_string
: nullable TStartString
6654 _n_string
= n_string
.as(not null)
6655 n_string
.parent
= self
6658 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6660 if _n_string
== old_child
then
6661 n_string
= new_child
.as(TStartString)
6666 redef fun n_string
=(node
)
6673 redef fun visit_all
(v
: Visitor)
6675 v
.enter_visit
(_n_string
)
6678 redef class AMidStringExpr
6679 init init_amidstringexpr
(
6680 n_string
: nullable TMidString
6683 _n_string
= n_string
.as(not null)
6684 n_string
.parent
= self
6687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6689 if _n_string
== old_child
then
6690 n_string
= new_child
.as(TMidString)
6695 redef fun n_string
=(node
)
6702 redef fun visit_all
(v
: Visitor)
6704 v
.enter_visit
(_n_string
)
6707 redef class AEndStringExpr
6708 init init_aendstringexpr
(
6709 n_string
: nullable TEndString
6712 _n_string
= n_string
.as(not null)
6713 n_string
.parent
= self
6716 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6718 if _n_string
== old_child
then
6719 n_string
= new_child
.as(TEndString)
6724 redef fun n_string
=(node
)
6731 redef fun visit_all
(v
: Visitor)
6733 v
.enter_visit
(_n_string
)
6736 redef class ASuperstringExpr
6737 init init_asuperstringexpr
(
6738 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6739 n_annotations
: nullable AAnnotations
6742 self.n_exprs
.unsafe_add_all
(n_exprs
)
6743 _n_annotations
= n_annotations
6744 if n_annotations
!= null then n_annotations
.parent
= self
6747 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6749 if n_exprs
.replace_child
(old_child
, new_child
) then return
6750 if _n_annotations
== old_child
then
6751 n_annotations
= new_child
.as(nullable AAnnotations)
6756 redef fun n_annotations
=(node
)
6758 _n_annotations
= node
6759 if node
!= null then node
.parent
= self
6763 redef fun visit_all
(v
: Visitor)
6765 n_exprs
.visit_all
(v
)
6766 v
.enter_visit
(_n_annotations
)
6769 redef class AParExpr
6770 init init_aparexpr
(
6771 n_opar
: nullable TOpar,
6772 n_expr
: nullable AExpr,
6773 n_cpar
: nullable TCpar,
6774 n_annotations
: nullable AAnnotations
6777 _n_opar
= n_opar
.as(not null)
6778 n_opar
.parent
= self
6779 _n_expr
= n_expr
.as(not null)
6780 n_expr
.parent
= self
6781 _n_cpar
= n_cpar
.as(not null)
6782 n_cpar
.parent
= self
6783 _n_annotations
= n_annotations
6784 if n_annotations
!= null then n_annotations
.parent
= self
6787 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6789 if _n_opar
== old_child
then
6790 n_opar
= new_child
.as(TOpar)
6793 if _n_expr
== old_child
then
6794 n_expr
= new_child
.as(AExpr)
6797 if _n_cpar
== old_child
then
6798 n_cpar
= new_child
.as(TCpar)
6801 if _n_annotations
== old_child
then
6802 n_annotations
= new_child
.as(nullable AAnnotations)
6807 redef fun n_opar
=(node
)
6812 redef fun n_expr
=(node
)
6817 redef fun n_cpar
=(node
)
6822 redef fun n_annotations
=(node
)
6824 _n_annotations
= node
6825 if node
!= null then node
.parent
= self
6829 redef fun visit_all
(v
: Visitor)
6831 v
.enter_visit
(_n_opar
)
6832 v
.enter_visit
(_n_expr
)
6833 v
.enter_visit
(_n_cpar
)
6834 v
.enter_visit
(_n_annotations
)
6837 redef class AAsCastExpr
6838 init init_aascastexpr
(
6839 n_expr
: nullable AExpr,
6840 n_kwas
: nullable TKwas,
6841 n_opar
: nullable TOpar,
6842 n_type
: nullable AType,
6843 n_cpar
: nullable TCpar
6846 _n_expr
= n_expr
.as(not null)
6847 n_expr
.parent
= self
6848 _n_kwas
= n_kwas
.as(not null)
6849 n_kwas
.parent
= self
6851 if n_opar
!= null then n_opar
.parent
= self
6852 _n_type
= n_type
.as(not null)
6853 n_type
.parent
= self
6855 if n_cpar
!= null then n_cpar
.parent
= self
6858 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6860 if _n_expr
== old_child
then
6861 n_expr
= new_child
.as(AExpr)
6864 if _n_kwas
== old_child
then
6865 n_kwas
= new_child
.as(TKwas)
6868 if _n_opar
== old_child
then
6869 n_opar
= new_child
.as(nullable TOpar)
6872 if _n_type
== old_child
then
6873 n_type
= new_child
.as(AType)
6876 if _n_cpar
== old_child
then
6877 n_cpar
= new_child
.as(nullable TCpar)
6882 redef fun n_expr
=(node
)
6887 redef fun n_kwas
=(node
)
6892 redef fun n_opar
=(node
)
6895 if node
!= null then node
.parent
= self
6897 redef fun n_type
=(node
)
6902 redef fun n_cpar
=(node
)
6905 if node
!= null then node
.parent
= self
6909 redef fun visit_all
(v
: Visitor)
6911 v
.enter_visit
(_n_expr
)
6912 v
.enter_visit
(_n_kwas
)
6913 v
.enter_visit
(_n_opar
)
6914 v
.enter_visit
(_n_type
)
6915 v
.enter_visit
(_n_cpar
)
6918 redef class AAsNotnullExpr
6919 init init_aasnotnullexpr
(
6920 n_expr
: nullable AExpr,
6921 n_kwas
: nullable TKwas,
6922 n_opar
: nullable TOpar,
6923 n_kwnot
: nullable TKwnot,
6924 n_kwnull
: nullable TKwnull,
6925 n_cpar
: nullable TCpar
6928 _n_expr
= n_expr
.as(not null)
6929 n_expr
.parent
= self
6930 _n_kwas
= n_kwas
.as(not null)
6931 n_kwas
.parent
= self
6933 if n_opar
!= null then n_opar
.parent
= self
6934 _n_kwnot
= n_kwnot
.as(not null)
6935 n_kwnot
.parent
= self
6936 _n_kwnull
= n_kwnull
.as(not null)
6937 n_kwnull
.parent
= self
6939 if n_cpar
!= null then n_cpar
.parent
= self
6942 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6944 if _n_expr
== old_child
then
6945 n_expr
= new_child
.as(AExpr)
6948 if _n_kwas
== old_child
then
6949 n_kwas
= new_child
.as(TKwas)
6952 if _n_opar
== old_child
then
6953 n_opar
= new_child
.as(nullable TOpar)
6956 if _n_kwnot
== old_child
then
6957 n_kwnot
= new_child
.as(TKwnot)
6960 if _n_kwnull
== old_child
then
6961 n_kwnull
= new_child
.as(TKwnull)
6964 if _n_cpar
== old_child
then
6965 n_cpar
= new_child
.as(nullable TCpar)
6970 redef fun n_expr
=(node
)
6975 redef fun n_kwas
=(node
)
6980 redef fun n_opar
=(node
)
6983 if node
!= null then node
.parent
= self
6985 redef fun n_kwnot
=(node
)
6990 redef fun n_kwnull
=(node
)
6995 redef fun n_cpar
=(node
)
6998 if node
!= null then node
.parent
= self
7002 redef fun visit_all
(v
: Visitor)
7004 v
.enter_visit
(_n_expr
)
7005 v
.enter_visit
(_n_kwas
)
7006 v
.enter_visit
(_n_opar
)
7007 v
.enter_visit
(_n_kwnot
)
7008 v
.enter_visit
(_n_kwnull
)
7009 v
.enter_visit
(_n_cpar
)
7012 redef class AIssetAttrExpr
7013 init init_aissetattrexpr
(
7014 n_kwisset
: nullable TKwisset,
7015 n_expr
: nullable AExpr,
7016 n_id
: nullable TAttrid
7019 _n_kwisset
= n_kwisset
.as(not null)
7020 n_kwisset
.parent
= self
7021 _n_expr
= n_expr
.as(not null)
7022 n_expr
.parent
= self
7023 _n_id
= n_id
.as(not null)
7027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7029 if _n_kwisset
== old_child
then
7030 n_kwisset
= new_child
.as(TKwisset)
7033 if _n_expr
== old_child
then
7034 n_expr
= new_child
.as(AExpr)
7037 if _n_id
== old_child
then
7038 n_id
= new_child
.as(TAttrid)
7043 redef fun n_kwisset
=(node
)
7048 redef fun n_expr
=(node
)
7053 redef fun n_id
=(node
)
7060 redef fun visit_all
(v
: Visitor)
7062 v
.enter_visit
(_n_kwisset
)
7063 v
.enter_visit
(_n_expr
)
7064 v
.enter_visit
(_n_id
)
7067 redef class ADebugTypeExpr
7068 init init_adebugtypeexpr
(
7069 n_kwdebug
: nullable TKwdebug,
7070 n_kwtype
: nullable TKwtype,
7071 n_expr
: nullable AExpr,
7072 n_type
: nullable AType
7075 _n_kwdebug
= n_kwdebug
.as(not null)
7076 n_kwdebug
.parent
= self
7077 _n_kwtype
= n_kwtype
.as(not null)
7078 n_kwtype
.parent
= self
7079 _n_expr
= n_expr
.as(not null)
7080 n_expr
.parent
= self
7081 _n_type
= n_type
.as(not null)
7082 n_type
.parent
= self
7085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7087 if _n_kwdebug
== old_child
then
7088 n_kwdebug
= new_child
.as(TKwdebug)
7091 if _n_kwtype
== old_child
then
7092 n_kwtype
= new_child
.as(TKwtype)
7095 if _n_expr
== old_child
then
7096 n_expr
= new_child
.as(AExpr)
7099 if _n_type
== old_child
then
7100 n_type
= new_child
.as(AType)
7105 redef fun n_kwdebug
=(node
)
7110 redef fun n_kwtype
=(node
)
7115 redef fun n_expr
=(node
)
7120 redef fun n_type
=(node
)
7127 redef fun visit_all
(v
: Visitor)
7129 v
.enter_visit
(_n_kwdebug
)
7130 v
.enter_visit
(_n_kwtype
)
7131 v
.enter_visit
(_n_expr
)
7132 v
.enter_visit
(_n_type
)
7135 redef class AVarargExpr
7136 init init_avarargexpr
(
7137 n_expr
: nullable AExpr,
7138 n_dotdotdot
: nullable TDotdotdot
7141 _n_expr
= n_expr
.as(not null)
7142 n_expr
.parent
= self
7143 _n_dotdotdot
= n_dotdotdot
.as(not null)
7144 n_dotdotdot
.parent
= self
7147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7149 if _n_expr
== old_child
then
7150 n_expr
= new_child
.as(AExpr)
7153 if _n_dotdotdot
== old_child
then
7154 n_dotdotdot
= new_child
.as(TDotdotdot)
7159 redef fun n_expr
=(node
)
7164 redef fun n_dotdotdot
=(node
)
7171 redef fun visit_all
(v
: Visitor)
7173 v
.enter_visit
(_n_expr
)
7174 v
.enter_visit
(_n_dotdotdot
)
7177 redef class ANamedargExpr
7178 init init_anamedargexpr
(
7180 n_assign
: nullable TAssign,
7181 n_expr
: nullable AExpr
7184 _n_id
= n_id
.as(not null)
7186 _n_assign
= n_assign
.as(not null)
7187 n_assign
.parent
= self
7188 _n_expr
= n_expr
.as(not null)
7189 n_expr
.parent
= self
7192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7194 if _n_id
== old_child
then
7195 n_id
= new_child
.as(TId)
7198 if _n_assign
== old_child
then
7199 n_assign
= new_child
.as(TAssign)
7202 if _n_expr
== old_child
then
7203 n_expr
= new_child
.as(AExpr)
7208 redef fun n_id
=(node
)
7213 redef fun n_assign
=(node
)
7218 redef fun n_expr
=(node
)
7225 redef fun visit_all
(v
: Visitor)
7227 v
.enter_visit
(_n_id
)
7228 v
.enter_visit
(_n_assign
)
7229 v
.enter_visit
(_n_expr
)
7232 redef class ATypeExpr
7233 init init_atypeexpr
(
7234 n_type
: nullable AType
7237 _n_type
= n_type
.as(not null)
7238 n_type
.parent
= self
7241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7243 if _n_type
== old_child
then
7244 n_type
= new_child
.as(AType)
7249 redef fun n_type
=(node
)
7256 redef fun visit_all
(v
: Visitor)
7258 v
.enter_visit
(_n_type
)
7261 redef class AMethidExpr
7262 init init_amethidexpr
(
7263 n_expr
: nullable AExpr,
7264 n_id
: nullable AMethid
7267 _n_expr
= n_expr
.as(not null)
7268 n_expr
.parent
= self
7269 _n_id
= n_id
.as(not null)
7273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7275 if _n_expr
== old_child
then
7276 n_expr
= new_child
.as(AExpr)
7279 if _n_id
== old_child
then
7280 n_id
= new_child
.as(AMethid)
7285 redef fun n_expr
=(node
)
7290 redef fun n_id
=(node
)
7297 redef fun visit_all
(v
: Visitor)
7299 v
.enter_visit
(_n_expr
)
7300 v
.enter_visit
(_n_id
)
7305 n_annotations
: nullable AAnnotations
7308 _n_annotations
= n_annotations
.as(not null)
7309 n_annotations
.parent
= self
7312 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7314 if _n_annotations
== old_child
then
7315 n_annotations
= new_child
.as(AAnnotations)
7320 redef fun n_annotations
=(node
)
7322 _n_annotations
= node
7327 redef fun visit_all
(v
: Visitor)
7329 v
.enter_visit
(_n_annotations
)
7332 redef class AManyExpr
7333 init init_amanyexpr
(
7334 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7337 self.n_exprs
.unsafe_add_all
(n_exprs
)
7340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7342 if n_exprs
.replace_child
(old_child
, new_child
) then return
7347 redef fun visit_all
(v
: Visitor)
7349 n_exprs
.visit_all
(v
)
7352 redef class AListExprs
7353 init init_alistexprs
(
7354 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7357 self.n_exprs
.unsafe_add_all
(n_exprs
)
7360 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7362 if n_exprs
.replace_child
(old_child
, new_child
) then return
7367 redef fun visit_all
(v
: Visitor)
7369 n_exprs
.visit_all
(v
)
7372 redef class AParExprs
7373 init init_aparexprs
(
7374 n_opar
: nullable TOpar,
7375 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7376 n_cpar
: nullable TCpar
7379 _n_opar
= n_opar
.as(not null)
7380 n_opar
.parent
= self
7381 self.n_exprs
.unsafe_add_all
(n_exprs
)
7382 _n_cpar
= n_cpar
.as(not null)
7383 n_cpar
.parent
= self
7386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7388 if _n_opar
== old_child
then
7389 n_opar
= new_child
.as(TOpar)
7392 if n_exprs
.replace_child
(old_child
, new_child
) then return
7393 if _n_cpar
== old_child
then
7394 n_cpar
= new_child
.as(TCpar)
7399 redef fun n_opar
=(node
)
7404 redef fun n_cpar
=(node
)
7411 redef fun visit_all
(v
: Visitor)
7413 v
.enter_visit
(_n_opar
)
7414 n_exprs
.visit_all
(v
)
7415 v
.enter_visit
(_n_cpar
)
7418 redef class ABraExprs
7419 init init_abraexprs
(
7420 n_obra
: nullable TObra,
7421 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7422 n_cbra
: nullable TCbra
7425 _n_obra
= n_obra
.as(not null)
7426 n_obra
.parent
= self
7427 self.n_exprs
.unsafe_add_all
(n_exprs
)
7428 _n_cbra
= n_cbra
.as(not null)
7429 n_cbra
.parent
= self
7432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7434 if _n_obra
== old_child
then
7435 n_obra
= new_child
.as(TObra)
7438 if n_exprs
.replace_child
(old_child
, new_child
) then return
7439 if _n_cbra
== old_child
then
7440 n_cbra
= new_child
.as(TCbra)
7445 redef fun n_obra
=(node
)
7450 redef fun n_cbra
=(node
)
7457 redef fun visit_all
(v
: Visitor)
7459 v
.enter_visit
(_n_obra
)
7460 n_exprs
.visit_all
(v
)
7461 v
.enter_visit
(_n_cbra
)
7464 redef class APlusAssignOp
7465 init init_aplusassignop
(
7466 n_op
: nullable TPluseq
7469 _n_op
= n_op
.as(not null)
7473 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7475 if _n_op
== old_child
then
7476 n_op
= new_child
.as(TPluseq)
7481 redef fun n_op
=(node
)
7488 redef fun visit_all
(v
: Visitor)
7490 v
.enter_visit
(_n_op
)
7493 redef class AMinusAssignOp
7494 init init_aminusassignop
(
7495 n_op
: nullable TMinuseq
7498 _n_op
= n_op
.as(not null)
7502 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7504 if _n_op
== old_child
then
7505 n_op
= new_child
.as(TMinuseq)
7510 redef fun n_op
=(node
)
7517 redef fun visit_all
(v
: Visitor)
7519 v
.enter_visit
(_n_op
)
7522 redef class AStarAssignOp
7523 init init_astarassignop
(
7524 n_op
: nullable TStareq
7527 _n_op
= n_op
.as(not null)
7531 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7533 if _n_op
== old_child
then
7534 n_op
= new_child
.as(TStareq)
7539 redef fun n_op
=(node
)
7546 redef fun visit_all
(v
: Visitor)
7548 v
.enter_visit
(_n_op
)
7551 redef class ASlashAssignOp
7552 init init_aslashassignop
(
7553 n_op
: nullable TSlasheq
7556 _n_op
= n_op
.as(not null)
7560 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7562 if _n_op
== old_child
then
7563 n_op
= new_child
.as(TSlasheq)
7568 redef fun n_op
=(node
)
7575 redef fun visit_all
(v
: Visitor)
7577 v
.enter_visit
(_n_op
)
7580 redef class APercentAssignOp
7581 init init_apercentassignop
(
7582 n_op
: nullable TPercenteq
7585 _n_op
= n_op
.as(not null)
7589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7591 if _n_op
== old_child
then
7592 n_op
= new_child
.as(TPercenteq)
7597 redef fun n_op
=(node
)
7604 redef fun visit_all
(v
: Visitor)
7606 v
.enter_visit
(_n_op
)
7609 redef class AStarstarAssignOp
7610 init init_astarstarassignop
(
7611 n_op
: nullable TStarstareq
7614 _n_op
= n_op
.as(not null)
7618 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7620 if _n_op
== old_child
then
7621 n_op
= new_child
.as(TStarstareq)
7626 redef fun n_op
=(node
)
7633 redef fun visit_all
(v
: Visitor)
7635 v
.enter_visit
(_n_op
)
7638 redef class APipeAssignOp
7639 init init_apipeassignop
(
7640 n_op
: nullable TPipeeq
7643 _n_op
= n_op
.as(not null)
7647 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7649 if _n_op
== old_child
then
7650 n_op
= new_child
.as(TPipeeq)
7655 redef fun n_op
=(node
)
7662 redef fun visit_all
(v
: Visitor)
7664 v
.enter_visit
(_n_op
)
7667 redef class ACaretAssignOp
7668 init init_acaretassignop
(
7669 n_op
: nullable TCareteq
7672 _n_op
= n_op
.as(not null)
7676 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7678 if _n_op
== old_child
then
7679 n_op
= new_child
.as(TCareteq)
7684 redef fun n_op
=(node
)
7691 redef fun visit_all
(v
: Visitor)
7693 v
.enter_visit
(_n_op
)
7696 redef class AAmpAssignOp
7697 init init_aampassignop
(
7698 n_op
: nullable TAmpeq
7701 _n_op
= n_op
.as(not null)
7705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7707 if _n_op
== old_child
then
7708 n_op
= new_child
.as(TAmpeq)
7713 redef fun n_op
=(node
)
7720 redef fun visit_all
(v
: Visitor)
7722 v
.enter_visit
(_n_op
)
7725 redef class ALlAssignOp
7726 init init_allassignop
(
7727 n_op
: nullable TLleq
7730 _n_op
= n_op
.as(not null)
7734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7736 if _n_op
== old_child
then
7737 n_op
= new_child
.as(TLleq)
7742 redef fun n_op
=(node
)
7749 redef fun visit_all
(v
: Visitor)
7751 v
.enter_visit
(_n_op
)
7754 redef class AGgAssignOp
7755 init init_aggassignop
(
7756 n_op
: nullable TGgeq
7759 _n_op
= n_op
.as(not null)
7763 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7765 if _n_op
== old_child
then
7766 n_op
= new_child
.as(TGgeq)
7771 redef fun n_op
=(node
)
7778 redef fun visit_all
(v
: Visitor)
7780 v
.enter_visit
(_n_op
)
7783 redef class AModuleName
7784 init init_amodulename
(
7785 n_quad
: nullable TQuad,
7786 n_path
: Collection[Object], # Should be Collection[TId]
7791 if n_quad
!= null then n_quad
.parent
= self
7792 self.n_path
.unsafe_add_all
(n_path
)
7793 _n_id
= n_id
.as(not null)
7797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7799 if _n_quad
== old_child
then
7800 n_quad
= new_child
.as(nullable TQuad)
7803 if n_path
.replace_child
(old_child
, new_child
) then return
7804 if _n_id
== old_child
then
7805 n_id
= new_child
.as(TId)
7810 redef fun n_quad
=(node
)
7813 if node
!= null then node
.parent
= self
7815 redef fun n_id
=(node
)
7822 redef fun visit_all
(v
: Visitor)
7824 v
.enter_visit
(_n_quad
)
7826 v
.enter_visit
(_n_id
)
7829 redef class AExternCalls
7830 init init_aexterncalls
(
7831 n_kwimport
: nullable TKwimport,
7832 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7835 _n_kwimport
= n_kwimport
.as(not null)
7836 n_kwimport
.parent
= self
7837 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7840 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7842 if _n_kwimport
== old_child
then
7843 n_kwimport
= new_child
.as(TKwimport)
7846 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7849 redef fun n_kwimport
=(node
)
7856 redef fun visit_all
(v
: Visitor)
7858 v
.enter_visit
(_n_kwimport
)
7859 n_extern_calls
.visit_all
(v
)
7862 redef class AExternCall
7863 init init_aexterncall
7867 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7873 redef fun visit_all
(v
: Visitor)
7877 redef class ASuperExternCall
7878 init init_asuperexterncall
(
7879 n_kwsuper
: nullable TKwsuper
7882 _n_kwsuper
= n_kwsuper
.as(not null)
7883 n_kwsuper
.parent
= self
7886 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7888 if _n_kwsuper
== old_child
then
7889 n_kwsuper
= new_child
.as(TKwsuper)
7894 redef fun n_kwsuper
=(node
)
7901 redef fun visit_all
(v
: Visitor)
7903 v
.enter_visit
(_n_kwsuper
)
7906 redef class ALocalPropExternCall
7907 init init_alocalpropexterncall
(
7908 n_methid
: nullable AMethid
7911 _n_methid
= n_methid
.as(not null)
7912 n_methid
.parent
= self
7915 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7917 if _n_methid
== old_child
then
7918 n_methid
= new_child
.as(AMethid)
7923 redef fun n_methid
=(node
)
7930 redef fun visit_all
(v
: Visitor)
7932 v
.enter_visit
(_n_methid
)
7935 redef class AFullPropExternCall
7936 init init_afullpropexterncall
(
7937 n_type
: nullable AType,
7938 n_dot
: nullable TDot,
7939 n_methid
: nullable AMethid
7942 _n_type
= n_type
.as(not null)
7943 n_type
.parent
= self
7945 if n_dot
!= null then n_dot
.parent
= self
7946 _n_methid
= n_methid
.as(not null)
7947 n_methid
.parent
= self
7950 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7952 if _n_type
== old_child
then
7953 n_type
= new_child
.as(AType)
7956 if _n_dot
== old_child
then
7957 n_dot
= new_child
.as(nullable TDot)
7960 if _n_methid
== old_child
then
7961 n_methid
= new_child
.as(AMethid)
7966 redef fun n_type
=(node
)
7971 redef fun n_dot
=(node
)
7974 if node
!= null then node
.parent
= self
7976 redef fun n_methid
=(node
)
7983 redef fun visit_all
(v
: Visitor)
7985 v
.enter_visit
(_n_type
)
7986 v
.enter_visit
(_n_dot
)
7987 v
.enter_visit
(_n_methid
)
7990 redef class AInitPropExternCall
7991 init init_ainitpropexterncall
(
7992 n_type
: nullable AType
7995 _n_type
= n_type
.as(not null)
7996 n_type
.parent
= self
7999 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8001 if _n_type
== old_child
then
8002 n_type
= new_child
.as(AType)
8007 redef fun n_type
=(node
)
8014 redef fun visit_all
(v
: Visitor)
8016 v
.enter_visit
(_n_type
)
8019 redef class ACastAsExternCall
8020 init init_acastasexterncall
(
8021 n_from_type
: nullable AType,
8022 n_dot
: nullable TDot,
8023 n_kwas
: nullable TKwas,
8024 n_to_type
: nullable AType
8027 _n_from_type
= n_from_type
.as(not null)
8028 n_from_type
.parent
= self
8030 if n_dot
!= null then n_dot
.parent
= self
8031 _n_kwas
= n_kwas
.as(not null)
8032 n_kwas
.parent
= self
8033 _n_to_type
= n_to_type
.as(not null)
8034 n_to_type
.parent
= self
8037 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8039 if _n_from_type
== old_child
then
8040 n_from_type
= new_child
.as(AType)
8043 if _n_dot
== old_child
then
8044 n_dot
= new_child
.as(nullable TDot)
8047 if _n_kwas
== old_child
then
8048 n_kwas
= new_child
.as(TKwas)
8051 if _n_to_type
== old_child
then
8052 n_to_type
= new_child
.as(AType)
8057 redef fun n_from_type
=(node
)
8062 redef fun n_dot
=(node
)
8065 if node
!= null then node
.parent
= self
8067 redef fun n_kwas
=(node
)
8072 redef fun n_to_type
=(node
)
8079 redef fun visit_all
(v
: Visitor)
8081 v
.enter_visit
(_n_from_type
)
8082 v
.enter_visit
(_n_dot
)
8083 v
.enter_visit
(_n_kwas
)
8084 v
.enter_visit
(_n_to_type
)
8087 redef class AAsNullableExternCall
8088 init init_aasnullableexterncall
(
8089 n_type
: nullable AType,
8090 n_kwas
: nullable TKwas,
8091 n_kwnullable
: nullable TKwnullable
8094 _n_type
= n_type
.as(not null)
8095 n_type
.parent
= self
8096 _n_kwas
= n_kwas
.as(not null)
8097 n_kwas
.parent
= self
8098 _n_kwnullable
= n_kwnullable
.as(not null)
8099 n_kwnullable
.parent
= self
8102 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8104 if _n_type
== old_child
then
8105 n_type
= new_child
.as(AType)
8108 if _n_kwas
== old_child
then
8109 n_kwas
= new_child
.as(TKwas)
8112 if _n_kwnullable
== old_child
then
8113 n_kwnullable
= new_child
.as(TKwnullable)
8118 redef fun n_type
=(node
)
8123 redef fun n_kwas
=(node
)
8128 redef fun n_kwnullable
=(node
)
8130 _n_kwnullable
= node
8135 redef fun visit_all
(v
: Visitor)
8137 v
.enter_visit
(_n_type
)
8138 v
.enter_visit
(_n_kwas
)
8139 v
.enter_visit
(_n_kwnullable
)
8142 redef class AAsNotNullableExternCall
8143 init init_aasnotnullableexterncall
(
8144 n_type
: nullable AType,
8145 n_kwas
: nullable TKwas,
8146 n_kwnot
: nullable TKwnot,
8147 n_kwnullable
: nullable TKwnullable
8150 _n_type
= n_type
.as(not null)
8151 n_type
.parent
= self
8152 _n_kwas
= n_kwas
.as(not null)
8153 n_kwas
.parent
= self
8154 _n_kwnot
= n_kwnot
.as(not null)
8155 n_kwnot
.parent
= self
8156 _n_kwnullable
= n_kwnullable
.as(not null)
8157 n_kwnullable
.parent
= self
8160 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8162 if _n_type
== old_child
then
8163 n_type
= new_child
.as(AType)
8166 if _n_kwas
== old_child
then
8167 n_kwas
= new_child
.as(TKwas)
8170 if _n_kwnot
== old_child
then
8171 n_kwnot
= new_child
.as(TKwnot)
8174 if _n_kwnullable
== old_child
then
8175 n_kwnullable
= new_child
.as(TKwnullable)
8180 redef fun n_type
=(node
)
8185 redef fun n_kwas
=(node
)
8190 redef fun n_kwnot
=(node
)
8195 redef fun n_kwnullable
=(node
)
8197 _n_kwnullable
= node
8202 redef fun visit_all
(v
: Visitor)
8204 v
.enter_visit
(_n_type
)
8205 v
.enter_visit
(_n_kwas
)
8206 v
.enter_visit
(_n_kwnot
)
8207 v
.enter_visit
(_n_kwnullable
)
8210 redef class AInLanguage
8211 init init_ainlanguage
(
8212 n_kwin
: nullable TKwin,
8213 n_string
: nullable TString
8216 _n_kwin
= n_kwin
.as(not null)
8217 n_kwin
.parent
= self
8218 _n_string
= n_string
.as(not null)
8219 n_string
.parent
= self
8222 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8224 if _n_kwin
== old_child
then
8225 n_kwin
= new_child
.as(TKwin)
8228 if _n_string
== old_child
then
8229 n_string
= new_child
.as(TString)
8234 redef fun n_kwin
=(node
)
8239 redef fun n_string
=(node
)
8246 redef fun visit_all
(v
: Visitor)
8248 v
.enter_visit
(_n_kwin
)
8249 v
.enter_visit
(_n_string
)
8252 redef class AExternCodeBlock
8253 init init_aexterncodeblock
(
8254 n_in_language
: nullable AInLanguage,
8255 n_extern_code_segment
: nullable TExternCodeSegment
8258 _n_in_language
= n_in_language
8259 if n_in_language
!= null then n_in_language
.parent
= self
8260 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8261 n_extern_code_segment
.parent
= self
8264 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8266 if _n_in_language
== old_child
then
8267 n_in_language
= new_child
.as(nullable AInLanguage)
8270 if _n_extern_code_segment
== old_child
then
8271 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8276 redef fun n_in_language
=(node
)
8278 _n_in_language
= node
8279 if node
!= null then node
.parent
= self
8281 redef fun n_extern_code_segment
=(node
)
8283 _n_extern_code_segment
= node
8288 redef fun visit_all
(v
: Visitor)
8290 v
.enter_visit
(_n_in_language
)
8291 v
.enter_visit
(_n_extern_code_segment
)
8294 redef class AQualified
8295 init init_aqualified
(
8296 n_id
: Collection[Object], # Should be Collection[TId]
8297 n_classid
: nullable TClassid
8300 self.n_id
.unsafe_add_all
(n_id
)
8301 _n_classid
= n_classid
8302 if n_classid
!= null then n_classid
.parent
= self
8305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8307 if n_id
.replace_child
(old_child
, new_child
) then return
8308 if _n_classid
== old_child
then
8309 n_classid
= new_child
.as(nullable TClassid)
8314 redef fun n_classid
=(node
)
8317 if node
!= null then node
.parent
= self
8321 redef fun visit_all
(v
: Visitor)
8324 v
.enter_visit
(_n_classid
)
8329 n_comment
: Collection[Object] # Should be Collection[TComment]
8332 self.n_comment
.unsafe_add_all
(n_comment
)
8335 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8337 if n_comment
.replace_child
(old_child
, new_child
) then return
8342 redef fun visit_all
(v
: Visitor)
8344 n_comment
.visit_all
(v
)
8347 redef class AAnnotations
8348 init init_aannotations
(
8349 n_kwis
: nullable TKwis,
8351 n_opar
: nullable TOpar,
8352 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8353 n_cpar
: nullable TCpar,
8354 n_kwend
: nullable TKwend
8358 if n_kwis
!= null then n_kwis
.parent
= self
8360 if n_at
!= null then n_at
.parent
= self
8362 if n_opar
!= null then n_opar
.parent
= self
8363 self.n_items
.unsafe_add_all
(n_items
)
8365 if n_cpar
!= null then n_cpar
.parent
= self
8367 if n_kwend
!= null then n_kwend
.parent
= self
8370 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8372 if _n_kwis
== old_child
then
8373 n_kwis
= new_child
.as(nullable TKwis)
8376 if _n_at
== old_child
then
8377 n_at
= new_child
.as(nullable TAt)
8380 if _n_opar
== old_child
then
8381 n_opar
= new_child
.as(nullable TOpar)
8384 if n_items
.replace_child
(old_child
, new_child
) then return
8385 if _n_cpar
== old_child
then
8386 n_cpar
= new_child
.as(nullable TCpar)
8389 if _n_kwend
== old_child
then
8390 n_kwend
= new_child
.as(nullable TKwend)
8395 redef fun n_kwis
=(node
)
8398 if node
!= null then node
.parent
= self
8400 redef fun n_at
=(node
)
8403 if node
!= null then node
.parent
= self
8405 redef fun n_opar
=(node
)
8408 if node
!= null then node
.parent
= self
8410 redef fun n_cpar
=(node
)
8413 if node
!= null then node
.parent
= self
8415 redef fun n_kwend
=(node
)
8418 if node
!= null then node
.parent
= self
8422 redef fun visit_all
(v
: Visitor)
8424 v
.enter_visit
(_n_kwis
)
8425 v
.enter_visit
(_n_at
)
8426 v
.enter_visit
(_n_opar
)
8427 n_items
.visit_all
(v
)
8428 v
.enter_visit
(_n_cpar
)
8429 v
.enter_visit
(_n_kwend
)
8432 redef class AAnnotation
8433 init init_aannotation
(
8434 n_doc
: nullable ADoc,
8435 n_kwredef
: nullable TKwredef,
8436 n_visibility
: nullable AVisibility,
8437 n_atid
: nullable AAtid,
8438 n_opar
: nullable TOpar,
8439 n_args
: Collection[Object], # Should be Collection[AExpr]
8440 n_cpar
: nullable TCpar,
8441 n_annotations
: nullable AAnnotations
8445 if n_doc
!= null then n_doc
.parent
= self
8446 _n_kwredef
= n_kwredef
8447 if n_kwredef
!= null then n_kwredef
.parent
= self
8448 _n_visibility
= n_visibility
8449 if n_visibility
!= null then n_visibility
.parent
= self
8450 _n_atid
= n_atid
.as(not null)
8451 n_atid
.parent
= self
8453 if n_opar
!= null then n_opar
.parent
= self
8454 self.n_args
.unsafe_add_all
(n_args
)
8456 if n_cpar
!= null then n_cpar
.parent
= self
8457 _n_annotations
= n_annotations
8458 if n_annotations
!= null then n_annotations
.parent
= self
8461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8463 if _n_doc
== old_child
then
8464 n_doc
= new_child
.as(nullable ADoc)
8467 if _n_kwredef
== old_child
then
8468 n_kwredef
= new_child
.as(nullable TKwredef)
8471 if _n_visibility
== old_child
then
8472 n_visibility
= new_child
.as(nullable AVisibility)
8475 if _n_atid
== old_child
then
8476 n_atid
= new_child
.as(AAtid)
8479 if _n_opar
== old_child
then
8480 n_opar
= new_child
.as(nullable TOpar)
8483 if n_args
.replace_child
(old_child
, new_child
) then return
8484 if _n_cpar
== old_child
then
8485 n_cpar
= new_child
.as(nullable TCpar)
8488 if _n_annotations
== old_child
then
8489 n_annotations
= new_child
.as(nullable AAnnotations)
8494 redef fun n_doc
=(node
)
8497 if node
!= null then node
.parent
= self
8499 redef fun n_kwredef
=(node
)
8502 if node
!= null then node
.parent
= self
8504 redef fun n_visibility
=(node
)
8506 _n_visibility
= node
8507 if node
!= null then node
.parent
= self
8509 redef fun n_atid
=(node
)
8514 redef fun n_opar
=(node
)
8517 if node
!= null then node
.parent
= self
8519 redef fun n_cpar
=(node
)
8522 if node
!= null then node
.parent
= self
8524 redef fun n_annotations
=(node
)
8526 _n_annotations
= node
8527 if node
!= null then node
.parent
= self
8531 redef fun visit_all
(v
: Visitor)
8533 v
.enter_visit
(_n_doc
)
8534 v
.enter_visit
(_n_kwredef
)
8535 v
.enter_visit
(_n_visibility
)
8536 v
.enter_visit
(_n_atid
)
8537 v
.enter_visit
(_n_opar
)
8539 v
.enter_visit
(_n_cpar
)
8540 v
.enter_visit
(_n_annotations
)
8548 _n_id
= n_id
.as(not null)
8552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8554 if _n_id
== old_child
then
8555 n_id
= new_child
.as(TId)
8560 redef fun n_id
=(node
)
8567 redef fun visit_all
(v
: Visitor)
8569 v
.enter_visit
(_n_id
)
8572 redef class AKwexternAtid
8573 init init_akwexternatid
(
8574 n_id
: nullable TKwextern
8577 _n_id
= n_id
.as(not null)
8581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8583 if _n_id
== old_child
then
8584 n_id
= new_child
.as(TKwextern)
8589 redef fun n_id
=(node
)
8596 redef fun visit_all
(v
: Visitor)
8598 v
.enter_visit
(_n_id
)
8601 redef class AKwabstractAtid
8602 init init_akwabstractatid
(
8603 n_id
: nullable TKwabstract
8606 _n_id
= n_id
.as(not null)
8610 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8612 if _n_id
== old_child
then
8613 n_id
= new_child
.as(TKwabstract)
8618 redef fun n_id
=(node
)
8625 redef fun visit_all
(v
: Visitor)
8627 v
.enter_visit
(_n_id
)
8630 redef class AKwimportAtid
8631 init init_akwimportatid
(
8632 n_id
: nullable TKwimport
8635 _n_id
= n_id
.as(not null)
8639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8641 if _n_id
== old_child
then
8642 n_id
= new_child
.as(TKwimport)
8647 redef fun n_id
=(node
)
8654 redef fun visit_all
(v
: Visitor)
8656 v
.enter_visit
(_n_id
)
8661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8663 if _n_base
== old_child
then
8664 if new_child
== null then
8666 new_child
.parent
= self
8667 assert new_child
isa AModule
8670 old_child
.parent
= null
8675 redef fun visit_all
(v
: Visitor)
8677 if _n_base
!= null then
8678 v
.enter_visit
(_n_base
.as(not null))
8680 v
.enter_visit
(_n_eof
)