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
)
2235 n_qualified
: nullable AQualified,
2239 _n_qualified
= n_qualified
2240 if n_qualified
!= null then n_qualified
.parent
= self
2241 _n_id
= n_id
.as(not null)
2245 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2247 if _n_qualified
== old_child
then
2248 n_qualified
= new_child
.as(nullable AQualified)
2251 if _n_id
== old_child
then
2252 n_id
= new_child
.as(TId)
2257 redef fun n_qualified
=(node
)
2260 if node
!= null then node
.parent
= self
2262 redef fun n_id
=(node
)
2269 redef fun visit_all
(v
: Visitor)
2271 v
.enter_visit
(_n_qualified
)
2272 v
.enter_visit
(_n_id
)
2275 redef class ASignature
2276 init init_asignature
(
2277 n_opar
: nullable TOpar,
2278 n_params
: Collection[Object], # Should be Collection[AParam]
2279 n_cpar
: nullable TCpar,
2280 n_type
: nullable AType
2284 if n_opar
!= null then n_opar
.parent
= self
2285 self.n_params
.unsafe_add_all
(n_params
)
2287 if n_cpar
!= null then n_cpar
.parent
= self
2289 if n_type
!= null then n_type
.parent
= self
2292 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2294 if _n_opar
== old_child
then
2295 n_opar
= new_child
.as(nullable TOpar)
2298 if n_params
.replace_child
(old_child
, new_child
) then return
2299 if _n_cpar
== old_child
then
2300 n_cpar
= new_child
.as(nullable TCpar)
2303 if _n_type
== old_child
then
2304 n_type
= new_child
.as(nullable AType)
2309 redef fun n_opar
=(node
)
2312 if node
!= null then node
.parent
= self
2314 redef fun n_cpar
=(node
)
2317 if node
!= null then node
.parent
= self
2319 redef fun n_type
=(node
)
2322 if node
!= null then node
.parent
= self
2326 redef fun visit_all
(v
: Visitor)
2328 v
.enter_visit
(_n_opar
)
2329 n_params
.visit_all
(v
)
2330 v
.enter_visit
(_n_cpar
)
2331 v
.enter_visit
(_n_type
)
2337 n_type
: nullable AType,
2338 n_dotdotdot
: nullable TDotdotdot,
2339 n_annotations
: nullable AAnnotations
2342 _n_id
= n_id
.as(not null)
2345 if n_type
!= null then n_type
.parent
= self
2346 _n_dotdotdot
= n_dotdotdot
2347 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2348 _n_annotations
= n_annotations
2349 if n_annotations
!= null then n_annotations
.parent
= self
2352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2354 if _n_id
== old_child
then
2355 n_id
= new_child
.as(TId)
2358 if _n_type
== old_child
then
2359 n_type
= new_child
.as(nullable AType)
2362 if _n_dotdotdot
== old_child
then
2363 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2366 if _n_annotations
== old_child
then
2367 n_annotations
= new_child
.as(nullable AAnnotations)
2372 redef fun n_id
=(node
)
2377 redef fun n_type
=(node
)
2380 if node
!= null then node
.parent
= self
2382 redef fun n_dotdotdot
=(node
)
2385 if node
!= null then node
.parent
= self
2387 redef fun n_annotations
=(node
)
2389 _n_annotations
= node
2390 if node
!= null then node
.parent
= self
2394 redef fun visit_all
(v
: Visitor)
2396 v
.enter_visit
(_n_id
)
2397 v
.enter_visit
(_n_type
)
2398 v
.enter_visit
(_n_dotdotdot
)
2399 v
.enter_visit
(_n_annotations
)
2404 n_kwnullable
: nullable TKwnullable,
2405 n_id
: nullable TClassid,
2406 n_obra
: nullable TObra,
2407 n_types
: Collection[Object], # Should be Collection[AType]
2408 n_cbra
: nullable TCbra,
2409 n_annotations
: nullable AAnnotations
2412 _n_kwnullable
= n_kwnullable
2413 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2414 _n_id
= n_id
.as(not null)
2417 if n_obra
!= null then n_obra
.parent
= self
2418 self.n_types
.unsafe_add_all
(n_types
)
2420 if n_cbra
!= null then n_cbra
.parent
= self
2421 _n_annotations
= n_annotations
2422 if n_annotations
!= null then n_annotations
.parent
= self
2425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2427 if _n_kwnullable
== old_child
then
2428 n_kwnullable
= new_child
.as(nullable TKwnullable)
2431 if _n_id
== old_child
then
2432 n_id
= new_child
.as(TClassid)
2435 if _n_obra
== old_child
then
2436 n_obra
= new_child
.as(nullable TObra)
2439 if n_types
.replace_child
(old_child
, new_child
) then return
2440 if _n_cbra
== old_child
then
2441 n_cbra
= new_child
.as(nullable TCbra)
2444 if _n_annotations
== old_child
then
2445 n_annotations
= new_child
.as(nullable AAnnotations)
2450 redef fun n_kwnullable
=(node
)
2452 _n_kwnullable
= node
2453 if node
!= null then node
.parent
= self
2455 redef fun n_id
=(node
)
2460 redef fun n_obra
=(node
)
2463 if node
!= null then node
.parent
= self
2465 redef fun n_cbra
=(node
)
2468 if node
!= null then node
.parent
= self
2470 redef fun n_annotations
=(node
)
2472 _n_annotations
= node
2473 if node
!= null then node
.parent
= self
2477 redef fun visit_all
(v
: Visitor)
2479 v
.enter_visit
(_n_kwnullable
)
2480 v
.enter_visit
(_n_id
)
2481 v
.enter_visit
(_n_obra
)
2482 n_types
.visit_all
(v
)
2483 v
.enter_visit
(_n_cbra
)
2484 v
.enter_visit
(_n_annotations
)
2489 n_kwlabel
: nullable TKwlabel,
2493 _n_kwlabel
= n_kwlabel
.as(not null)
2494 n_kwlabel
.parent
= self
2496 if n_id
!= null then n_id
.parent
= self
2499 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2501 if _n_kwlabel
== old_child
then
2502 n_kwlabel
= new_child
.as(TKwlabel)
2505 if _n_id
== old_child
then
2506 n_id
= new_child
.as(nullable TId)
2511 redef fun n_kwlabel
=(node
)
2516 redef fun n_id
=(node
)
2519 if node
!= null then node
.parent
= self
2523 redef fun visit_all
(v
: Visitor)
2525 v
.enter_visit
(_n_kwlabel
)
2526 v
.enter_visit
(_n_id
)
2529 redef class ABlockExpr
2530 init init_ablockexpr
(
2531 n_expr
: Collection[Object], # Should be Collection[AExpr]
2532 n_kwend
: nullable TKwend
2535 self.n_expr
.unsafe_add_all
(n_expr
)
2537 if n_kwend
!= null then n_kwend
.parent
= self
2540 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2542 if n_expr
.replace_child
(old_child
, new_child
) then return
2543 if _n_kwend
== old_child
then
2544 n_kwend
= new_child
.as(nullable TKwend)
2549 redef fun n_kwend
=(node
)
2552 if node
!= null then node
.parent
= self
2556 redef fun visit_all
(v
: Visitor)
2559 v
.enter_visit
(_n_kwend
)
2562 redef class AVardeclExpr
2563 init init_avardeclexpr
(
2564 n_kwvar
: nullable TKwvar,
2566 n_type
: nullable AType,
2567 n_assign
: nullable TAssign,
2568 n_expr
: nullable AExpr,
2569 n_annotations
: nullable AAnnotations
2573 if n_kwvar
!= null then n_kwvar
.parent
= self
2574 _n_id
= n_id
.as(not null)
2577 if n_type
!= null then n_type
.parent
= self
2578 _n_assign
= n_assign
2579 if n_assign
!= null then n_assign
.parent
= self
2581 if n_expr
!= null then n_expr
.parent
= self
2582 _n_annotations
= n_annotations
2583 if n_annotations
!= null then n_annotations
.parent
= self
2586 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2588 if _n_kwvar
== old_child
then
2589 n_kwvar
= new_child
.as(nullable TKwvar)
2592 if _n_id
== old_child
then
2593 n_id
= new_child
.as(TId)
2596 if _n_type
== old_child
then
2597 n_type
= new_child
.as(nullable AType)
2600 if _n_assign
== old_child
then
2601 n_assign
= new_child
.as(nullable TAssign)
2604 if _n_expr
== old_child
then
2605 n_expr
= new_child
.as(nullable AExpr)
2608 if _n_annotations
== old_child
then
2609 n_annotations
= new_child
.as(nullable AAnnotations)
2614 redef fun n_kwvar
=(node
)
2617 if node
!= null then node
.parent
= self
2619 redef fun n_id
=(node
)
2624 redef fun n_type
=(node
)
2627 if node
!= null then node
.parent
= self
2629 redef fun n_assign
=(node
)
2632 if node
!= null then node
.parent
= self
2634 redef fun n_expr
=(node
)
2637 if node
!= null then node
.parent
= self
2639 redef fun n_annotations
=(node
)
2641 _n_annotations
= node
2642 if node
!= null then node
.parent
= self
2646 redef fun visit_all
(v
: Visitor)
2648 v
.enter_visit
(_n_kwvar
)
2649 v
.enter_visit
(_n_id
)
2650 v
.enter_visit
(_n_type
)
2651 v
.enter_visit
(_n_assign
)
2652 v
.enter_visit
(_n_expr
)
2653 v
.enter_visit
(_n_annotations
)
2656 redef class AReturnExpr
2657 init init_areturnexpr
(
2658 n_kwreturn
: nullable TKwreturn,
2659 n_expr
: nullable AExpr
2662 _n_kwreturn
= n_kwreturn
2663 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2665 if n_expr
!= null then n_expr
.parent
= self
2668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2670 if _n_kwreturn
== old_child
then
2671 n_kwreturn
= new_child
.as(nullable TKwreturn)
2674 if _n_expr
== old_child
then
2675 n_expr
= new_child
.as(nullable AExpr)
2680 redef fun n_kwreturn
=(node
)
2683 if node
!= null then node
.parent
= self
2685 redef fun n_expr
=(node
)
2688 if node
!= null then node
.parent
= self
2692 redef fun visit_all
(v
: Visitor)
2694 v
.enter_visit
(_n_kwreturn
)
2695 v
.enter_visit
(_n_expr
)
2698 redef class ABreakExpr
2699 init init_abreakexpr
(
2700 n_kwbreak
: nullable TKwbreak,
2701 n_label
: nullable ALabel
2704 _n_kwbreak
= n_kwbreak
.as(not null)
2705 n_kwbreak
.parent
= self
2707 if n_label
!= null then n_label
.parent
= self
2710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2712 if _n_kwbreak
== old_child
then
2713 n_kwbreak
= new_child
.as(TKwbreak)
2716 if _n_label
== old_child
then
2717 n_label
= new_child
.as(nullable ALabel)
2722 redef fun n_kwbreak
=(node
)
2727 redef fun n_label
=(node
)
2730 if node
!= null then node
.parent
= self
2734 redef fun visit_all
(v
: Visitor)
2736 v
.enter_visit
(_n_kwbreak
)
2737 v
.enter_visit
(_n_label
)
2740 redef class AAbortExpr
2741 init init_aabortexpr
(
2742 n_kwabort
: nullable TKwabort
2745 _n_kwabort
= n_kwabort
.as(not null)
2746 n_kwabort
.parent
= self
2749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2751 if _n_kwabort
== old_child
then
2752 n_kwabort
= new_child
.as(TKwabort)
2757 redef fun n_kwabort
=(node
)
2764 redef fun visit_all
(v
: Visitor)
2766 v
.enter_visit
(_n_kwabort
)
2769 redef class AContinueExpr
2770 init init_acontinueexpr
(
2771 n_kwcontinue
: nullable TKwcontinue,
2772 n_label
: nullable ALabel
2775 _n_kwcontinue
= n_kwcontinue
2776 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2778 if n_label
!= null then n_label
.parent
= self
2781 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2783 if _n_kwcontinue
== old_child
then
2784 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2787 if _n_label
== old_child
then
2788 n_label
= new_child
.as(nullable ALabel)
2793 redef fun n_kwcontinue
=(node
)
2795 _n_kwcontinue
= node
2796 if node
!= null then node
.parent
= self
2798 redef fun n_label
=(node
)
2801 if node
!= null then node
.parent
= self
2805 redef fun visit_all
(v
: Visitor)
2807 v
.enter_visit
(_n_kwcontinue
)
2808 v
.enter_visit
(_n_label
)
2813 n_kwdo
: nullable TKwdo,
2814 n_block
: nullable AExpr,
2815 n_label
: nullable ALabel
2818 _n_kwdo
= n_kwdo
.as(not null)
2819 n_kwdo
.parent
= self
2821 if n_block
!= null then n_block
.parent
= self
2823 if n_label
!= null then n_label
.parent
= self
2826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2828 if _n_kwdo
== old_child
then
2829 n_kwdo
= new_child
.as(TKwdo)
2832 if _n_block
== old_child
then
2833 n_block
= new_child
.as(nullable AExpr)
2836 if _n_label
== old_child
then
2837 n_label
= new_child
.as(nullable ALabel)
2842 redef fun n_kwdo
=(node
)
2847 redef fun n_block
=(node
)
2850 if node
!= null then node
.parent
= self
2852 redef fun n_label
=(node
)
2855 if node
!= null then node
.parent
= self
2859 redef fun visit_all
(v
: Visitor)
2861 v
.enter_visit
(_n_kwdo
)
2862 v
.enter_visit
(_n_block
)
2863 v
.enter_visit
(_n_label
)
2868 n_kwif
: nullable TKwif,
2869 n_expr
: nullable AExpr,
2870 n_kwthen
: nullable TKwthen,
2871 n_then
: nullable AExpr,
2872 n_kwelse
: nullable TKwelse,
2873 n_else
: nullable AExpr
2876 _n_kwif
= n_kwif
.as(not null)
2877 n_kwif
.parent
= self
2878 _n_expr
= n_expr
.as(not null)
2879 n_expr
.parent
= self
2880 _n_kwthen
= n_kwthen
.as(not null)
2881 n_kwthen
.parent
= self
2883 if n_then
!= null then n_then
.parent
= self
2884 _n_kwelse
= n_kwelse
2885 if n_kwelse
!= null then n_kwelse
.parent
= self
2887 if n_else
!= null then n_else
.parent
= self
2890 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2892 if _n_kwif
== old_child
then
2893 n_kwif
= new_child
.as(TKwif)
2896 if _n_expr
== old_child
then
2897 n_expr
= new_child
.as(AExpr)
2900 if _n_kwthen
== old_child
then
2901 n_kwthen
= new_child
.as(TKwthen)
2904 if _n_then
== old_child
then
2905 n_then
= new_child
.as(nullable AExpr)
2908 if _n_kwelse
== old_child
then
2909 n_kwelse
= new_child
.as(nullable TKwelse)
2912 if _n_else
== old_child
then
2913 n_else
= new_child
.as(nullable AExpr)
2918 redef fun n_kwif
=(node
)
2923 redef fun n_expr
=(node
)
2928 redef fun n_kwthen
=(node
)
2933 redef fun n_then
=(node
)
2936 if node
!= null then node
.parent
= self
2938 redef fun n_kwelse
=(node
)
2941 if node
!= null then node
.parent
= self
2943 redef fun n_else
=(node
)
2946 if node
!= null then node
.parent
= self
2950 redef fun visit_all
(v
: Visitor)
2952 v
.enter_visit
(_n_kwif
)
2953 v
.enter_visit
(_n_expr
)
2954 v
.enter_visit
(_n_kwthen
)
2955 v
.enter_visit
(_n_then
)
2956 v
.enter_visit
(_n_kwelse
)
2957 v
.enter_visit
(_n_else
)
2960 redef class AIfexprExpr
2961 init init_aifexprexpr
(
2962 n_kwif
: nullable TKwif,
2963 n_expr
: nullable AExpr,
2964 n_kwthen
: nullable TKwthen,
2965 n_then
: nullable AExpr,
2966 n_kwelse
: nullable TKwelse,
2967 n_else
: nullable AExpr
2970 _n_kwif
= n_kwif
.as(not null)
2971 n_kwif
.parent
= self
2972 _n_expr
= n_expr
.as(not null)
2973 n_expr
.parent
= self
2974 _n_kwthen
= n_kwthen
.as(not null)
2975 n_kwthen
.parent
= self
2976 _n_then
= n_then
.as(not null)
2977 n_then
.parent
= self
2978 _n_kwelse
= n_kwelse
.as(not null)
2979 n_kwelse
.parent
= self
2980 _n_else
= n_else
.as(not null)
2981 n_else
.parent
= self
2984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2986 if _n_kwif
== old_child
then
2987 n_kwif
= new_child
.as(TKwif)
2990 if _n_expr
== old_child
then
2991 n_expr
= new_child
.as(AExpr)
2994 if _n_kwthen
== old_child
then
2995 n_kwthen
= new_child
.as(TKwthen)
2998 if _n_then
== old_child
then
2999 n_then
= new_child
.as(AExpr)
3002 if _n_kwelse
== old_child
then
3003 n_kwelse
= new_child
.as(TKwelse)
3006 if _n_else
== old_child
then
3007 n_else
= new_child
.as(AExpr)
3012 redef fun n_kwif
=(node
)
3017 redef fun n_expr
=(node
)
3022 redef fun n_kwthen
=(node
)
3027 redef fun n_then
=(node
)
3032 redef fun n_kwelse
=(node
)
3037 redef fun n_else
=(node
)
3044 redef fun visit_all
(v
: Visitor)
3046 v
.enter_visit
(_n_kwif
)
3047 v
.enter_visit
(_n_expr
)
3048 v
.enter_visit
(_n_kwthen
)
3049 v
.enter_visit
(_n_then
)
3050 v
.enter_visit
(_n_kwelse
)
3051 v
.enter_visit
(_n_else
)
3054 redef class AWhileExpr
3055 init init_awhileexpr
(
3056 n_kwwhile
: nullable TKwwhile,
3057 n_expr
: nullable AExpr,
3058 n_kwdo
: nullable TKwdo,
3059 n_block
: nullable AExpr,
3060 n_label
: nullable ALabel
3063 _n_kwwhile
= n_kwwhile
.as(not null)
3064 n_kwwhile
.parent
= self
3065 _n_expr
= n_expr
.as(not null)
3066 n_expr
.parent
= self
3067 _n_kwdo
= n_kwdo
.as(not null)
3068 n_kwdo
.parent
= self
3070 if n_block
!= null then n_block
.parent
= self
3072 if n_label
!= null then n_label
.parent
= self
3075 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3077 if _n_kwwhile
== old_child
then
3078 n_kwwhile
= new_child
.as(TKwwhile)
3081 if _n_expr
== old_child
then
3082 n_expr
= new_child
.as(AExpr)
3085 if _n_kwdo
== old_child
then
3086 n_kwdo
= new_child
.as(TKwdo)
3089 if _n_block
== old_child
then
3090 n_block
= new_child
.as(nullable AExpr)
3093 if _n_label
== old_child
then
3094 n_label
= new_child
.as(nullable ALabel)
3099 redef fun n_kwwhile
=(node
)
3104 redef fun n_expr
=(node
)
3109 redef fun n_kwdo
=(node
)
3114 redef fun n_block
=(node
)
3117 if node
!= null then node
.parent
= self
3119 redef fun n_label
=(node
)
3122 if node
!= null then node
.parent
= self
3126 redef fun visit_all
(v
: Visitor)
3128 v
.enter_visit
(_n_kwwhile
)
3129 v
.enter_visit
(_n_expr
)
3130 v
.enter_visit
(_n_kwdo
)
3131 v
.enter_visit
(_n_block
)
3132 v
.enter_visit
(_n_label
)
3135 redef class ALoopExpr
3136 init init_aloopexpr
(
3137 n_kwloop
: nullable TKwloop,
3138 n_block
: nullable AExpr,
3139 n_label
: nullable ALabel
3142 _n_kwloop
= n_kwloop
.as(not null)
3143 n_kwloop
.parent
= self
3145 if n_block
!= null then n_block
.parent
= self
3147 if n_label
!= null then n_label
.parent
= self
3150 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3152 if _n_kwloop
== old_child
then
3153 n_kwloop
= new_child
.as(TKwloop)
3156 if _n_block
== old_child
then
3157 n_block
= new_child
.as(nullable AExpr)
3160 if _n_label
== old_child
then
3161 n_label
= new_child
.as(nullable ALabel)
3166 redef fun n_kwloop
=(node
)
3171 redef fun n_block
=(node
)
3174 if node
!= null then node
.parent
= self
3176 redef fun n_label
=(node
)
3179 if node
!= null then node
.parent
= self
3183 redef fun visit_all
(v
: Visitor)
3185 v
.enter_visit
(_n_kwloop
)
3186 v
.enter_visit
(_n_block
)
3187 v
.enter_visit
(_n_label
)
3190 redef class AForExpr
3191 init init_aforexpr
(
3192 n_kwfor
: nullable TKwfor,
3193 n_groups
: Collection[Object], # Should be Collection[AForGroup]
3194 n_kwdo
: nullable TKwdo,
3195 n_block
: nullable AExpr,
3196 n_label
: nullable ALabel
3199 _n_kwfor
= n_kwfor
.as(not null)
3200 n_kwfor
.parent
= self
3201 self.n_groups
.unsafe_add_all
(n_groups
)
3202 _n_kwdo
= n_kwdo
.as(not null)
3203 n_kwdo
.parent
= self
3205 if n_block
!= null then n_block
.parent
= self
3207 if n_label
!= null then n_label
.parent
= self
3210 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3212 if _n_kwfor
== old_child
then
3213 n_kwfor
= new_child
.as(TKwfor)
3216 if n_groups
.replace_child
(old_child
, new_child
) then return
3217 if _n_kwdo
== old_child
then
3218 n_kwdo
= new_child
.as(TKwdo)
3221 if _n_block
== old_child
then
3222 n_block
= new_child
.as(nullable AExpr)
3225 if _n_label
== old_child
then
3226 n_label
= new_child
.as(nullable ALabel)
3231 redef fun n_kwfor
=(node
)
3236 redef fun n_kwdo
=(node
)
3241 redef fun n_block
=(node
)
3244 if node
!= null then node
.parent
= self
3246 redef fun n_label
=(node
)
3249 if node
!= null then node
.parent
= self
3253 redef fun visit_all
(v
: Visitor)
3255 v
.enter_visit
(_n_kwfor
)
3256 n_groups
.visit_all
(v
)
3257 v
.enter_visit
(_n_kwdo
)
3258 v
.enter_visit
(_n_block
)
3259 v
.enter_visit
(_n_label
)
3262 redef class AWithExpr
3263 init init_awithexpr
(
3264 n_kwwith
: nullable TKwwith,
3265 n_expr
: nullable AExpr,
3266 n_kwdo
: nullable TKwdo,
3267 n_block
: nullable AExpr,
3268 n_label
: nullable ALabel
3271 _n_kwwith
= n_kwwith
.as(not null)
3272 n_kwwith
.parent
= self
3273 _n_expr
= n_expr
.as(not null)
3274 n_expr
.parent
= self
3275 _n_kwdo
= n_kwdo
.as(not null)
3276 n_kwdo
.parent
= self
3278 if n_block
!= null then n_block
.parent
= self
3280 if n_label
!= null then n_label
.parent
= self
3283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3285 if _n_kwwith
== old_child
then
3286 n_kwwith
= new_child
.as(TKwwith)
3289 if _n_expr
== old_child
then
3290 n_expr
= new_child
.as(AExpr)
3293 if _n_kwdo
== old_child
then
3294 n_kwdo
= new_child
.as(TKwdo)
3297 if _n_block
== old_child
then
3298 n_block
= new_child
.as(nullable AExpr)
3301 if _n_label
== old_child
then
3302 n_label
= new_child
.as(nullable ALabel)
3307 redef fun n_kwwith
=(node
)
3312 redef fun n_expr
=(node
)
3317 redef fun n_kwdo
=(node
)
3322 redef fun n_block
=(node
)
3325 if node
!= null then node
.parent
= self
3327 redef fun n_label
=(node
)
3330 if node
!= null then node
.parent
= self
3334 redef fun visit_all
(v
: Visitor)
3336 v
.enter_visit
(_n_kwwith
)
3337 v
.enter_visit
(_n_expr
)
3338 v
.enter_visit
(_n_kwdo
)
3339 v
.enter_visit
(_n_block
)
3340 v
.enter_visit
(_n_label
)
3343 redef class AAssertExpr
3344 init init_aassertexpr
(
3345 n_kwassert
: nullable TKwassert,
3347 n_expr
: nullable AExpr,
3348 n_kwelse
: nullable TKwelse,
3349 n_else
: nullable AExpr
3352 _n_kwassert
= n_kwassert
.as(not null)
3353 n_kwassert
.parent
= self
3355 if n_id
!= null then n_id
.parent
= self
3356 _n_expr
= n_expr
.as(not null)
3357 n_expr
.parent
= self
3358 _n_kwelse
= n_kwelse
3359 if n_kwelse
!= null then n_kwelse
.parent
= self
3361 if n_else
!= null then n_else
.parent
= self
3364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3366 if _n_kwassert
== old_child
then
3367 n_kwassert
= new_child
.as(TKwassert)
3370 if _n_id
== old_child
then
3371 n_id
= new_child
.as(nullable TId)
3374 if _n_expr
== old_child
then
3375 n_expr
= new_child
.as(AExpr)
3378 if _n_kwelse
== old_child
then
3379 n_kwelse
= new_child
.as(nullable TKwelse)
3382 if _n_else
== old_child
then
3383 n_else
= new_child
.as(nullable AExpr)
3388 redef fun n_kwassert
=(node
)
3393 redef fun n_id
=(node
)
3396 if node
!= null then node
.parent
= self
3398 redef fun n_expr
=(node
)
3403 redef fun n_kwelse
=(node
)
3406 if node
!= null then node
.parent
= self
3408 redef fun n_else
=(node
)
3411 if node
!= null then node
.parent
= self
3415 redef fun visit_all
(v
: Visitor)
3417 v
.enter_visit
(_n_kwassert
)
3418 v
.enter_visit
(_n_id
)
3419 v
.enter_visit
(_n_expr
)
3420 v
.enter_visit
(_n_kwelse
)
3421 v
.enter_visit
(_n_else
)
3424 redef class AOnceExpr
3425 init init_aonceexpr
(
3426 n_kwonce
: nullable TKwonce,
3427 n_expr
: nullable AExpr
3430 _n_kwonce
= n_kwonce
.as(not null)
3431 n_kwonce
.parent
= self
3432 _n_expr
= n_expr
.as(not null)
3433 n_expr
.parent
= self
3436 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3438 if _n_kwonce
== old_child
then
3439 n_kwonce
= new_child
.as(TKwonce)
3442 if _n_expr
== old_child
then
3443 n_expr
= new_child
.as(AExpr)
3448 redef fun n_kwonce
=(node
)
3453 redef fun n_expr
=(node
)
3460 redef fun visit_all
(v
: Visitor)
3462 v
.enter_visit
(_n_kwonce
)
3463 v
.enter_visit
(_n_expr
)
3466 redef class ASendExpr
3467 init init_asendexpr
(
3468 n_expr
: nullable AExpr
3471 _n_expr
= n_expr
.as(not null)
3472 n_expr
.parent
= self
3475 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3477 if _n_expr
== old_child
then
3478 n_expr
= new_child
.as(AExpr)
3483 redef fun n_expr
=(node
)
3490 redef fun visit_all
(v
: Visitor)
3492 v
.enter_visit
(_n_expr
)
3495 redef class ABinopExpr
3496 init init_abinopexpr
(
3497 n_expr
: nullable AExpr,
3498 n_expr2
: nullable AExpr
3501 _n_expr
= n_expr
.as(not null)
3502 n_expr
.parent
= self
3503 _n_expr2
= n_expr2
.as(not null)
3504 n_expr2
.parent
= self
3507 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3509 if _n_expr
== old_child
then
3510 n_expr
= new_child
.as(AExpr)
3513 if _n_expr2
== old_child
then
3514 n_expr2
= new_child
.as(AExpr)
3519 redef fun n_expr
=(node
)
3524 redef fun n_expr2
=(node
)
3531 redef fun visit_all
(v
: Visitor)
3533 v
.enter_visit
(_n_expr
)
3534 v
.enter_visit
(_n_expr2
)
3539 n_expr
: nullable AExpr,
3540 n_op
: nullable TKwor,
3541 n_expr2
: nullable AExpr
3544 _n_expr
= n_expr
.as(not null)
3545 n_expr
.parent
= self
3546 _n_op
= n_op
.as(not null)
3548 _n_expr2
= n_expr2
.as(not null)
3549 n_expr2
.parent
= self
3552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3554 if _n_expr
== old_child
then
3555 n_expr
= new_child
.as(AExpr)
3558 if _n_op
== old_child
then
3559 n_op
= new_child
.as(TKwor)
3562 if _n_expr2
== old_child
then
3563 n_expr2
= new_child
.as(AExpr)
3568 redef fun n_expr
=(node
)
3573 redef fun n_op
=(node
)
3578 redef fun n_expr2
=(node
)
3585 redef fun visit_all
(v
: Visitor)
3587 v
.enter_visit
(_n_expr
)
3588 v
.enter_visit
(_n_op
)
3589 v
.enter_visit
(_n_expr2
)
3592 redef class AAndExpr
3593 init init_aandexpr
(
3594 n_expr
: nullable AExpr,
3595 n_op
: nullable TKwand,
3596 n_expr2
: nullable AExpr
3599 _n_expr
= n_expr
.as(not null)
3600 n_expr
.parent
= self
3601 _n_op
= n_op
.as(not null)
3603 _n_expr2
= n_expr2
.as(not null)
3604 n_expr2
.parent
= self
3607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3609 if _n_expr
== old_child
then
3610 n_expr
= new_child
.as(AExpr)
3613 if _n_op
== old_child
then
3614 n_op
= new_child
.as(TKwand)
3617 if _n_expr2
== old_child
then
3618 n_expr2
= new_child
.as(AExpr)
3623 redef fun n_expr
=(node
)
3628 redef fun n_op
=(node
)
3633 redef fun n_expr2
=(node
)
3640 redef fun visit_all
(v
: Visitor)
3642 v
.enter_visit
(_n_expr
)
3643 v
.enter_visit
(_n_op
)
3644 v
.enter_visit
(_n_expr2
)
3647 redef class AOrElseExpr
3648 init init_aorelseexpr
(
3649 n_expr
: nullable AExpr,
3650 n_op
: nullable TKwor,
3651 n_kwelse
: nullable TKwelse,
3652 n_expr2
: nullable AExpr
3655 _n_expr
= n_expr
.as(not null)
3656 n_expr
.parent
= self
3657 _n_op
= n_op
.as(not null)
3659 _n_kwelse
= n_kwelse
.as(not null)
3660 n_kwelse
.parent
= self
3661 _n_expr2
= n_expr2
.as(not null)
3662 n_expr2
.parent
= self
3665 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3667 if _n_expr
== old_child
then
3668 n_expr
= new_child
.as(AExpr)
3671 if _n_op
== old_child
then
3672 n_op
= new_child
.as(TKwor)
3675 if _n_kwelse
== old_child
then
3676 n_kwelse
= new_child
.as(TKwelse)
3679 if _n_expr2
== old_child
then
3680 n_expr2
= new_child
.as(AExpr)
3685 redef fun n_expr
=(node
)
3690 redef fun n_op
=(node
)
3695 redef fun n_kwelse
=(node
)
3700 redef fun n_expr2
=(node
)
3707 redef fun visit_all
(v
: Visitor)
3709 v
.enter_visit
(_n_expr
)
3710 v
.enter_visit
(_n_op
)
3711 v
.enter_visit
(_n_kwelse
)
3712 v
.enter_visit
(_n_expr2
)
3715 redef class AImpliesExpr
3716 init init_aimpliesexpr
(
3717 n_expr
: nullable AExpr,
3718 n_op
: nullable TKwimplies,
3719 n_expr2
: nullable AExpr
3722 _n_expr
= n_expr
.as(not null)
3723 n_expr
.parent
= self
3724 _n_op
= n_op
.as(not null)
3726 _n_expr2
= n_expr2
.as(not null)
3727 n_expr2
.parent
= self
3730 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3732 if _n_expr
== old_child
then
3733 n_expr
= new_child
.as(AExpr)
3736 if _n_op
== old_child
then
3737 n_op
= new_child
.as(TKwimplies)
3740 if _n_expr2
== old_child
then
3741 n_expr2
= new_child
.as(AExpr)
3746 redef fun n_expr
=(node
)
3751 redef fun n_op
=(node
)
3756 redef fun n_expr2
=(node
)
3763 redef fun visit_all
(v
: Visitor)
3765 v
.enter_visit
(_n_expr
)
3766 v
.enter_visit
(_n_op
)
3767 v
.enter_visit
(_n_expr2
)
3770 redef class ANotExpr
3771 init init_anotexpr
(
3772 n_kwnot
: nullable TKwnot,
3773 n_expr
: nullable AExpr
3776 _n_kwnot
= n_kwnot
.as(not null)
3777 n_kwnot
.parent
= self
3778 _n_expr
= n_expr
.as(not null)
3779 n_expr
.parent
= self
3782 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3784 if _n_kwnot
== old_child
then
3785 n_kwnot
= new_child
.as(TKwnot)
3788 if _n_expr
== old_child
then
3789 n_expr
= new_child
.as(AExpr)
3794 redef fun n_kwnot
=(node
)
3799 redef fun n_expr
=(node
)
3806 redef fun visit_all
(v
: Visitor)
3808 v
.enter_visit
(_n_kwnot
)
3809 v
.enter_visit
(_n_expr
)
3814 n_expr
: nullable AExpr,
3816 n_expr2
: nullable AExpr
3819 _n_expr
= n_expr
.as(not null)
3820 n_expr
.parent
= self
3821 _n_op
= n_op
.as(not null)
3823 _n_expr2
= n_expr2
.as(not null)
3824 n_expr2
.parent
= self
3827 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3829 if _n_expr
== old_child
then
3830 n_expr
= new_child
.as(AExpr)
3833 if _n_op
== old_child
then
3834 n_op
= new_child
.as(TEq)
3837 if _n_expr2
== old_child
then
3838 n_expr2
= new_child
.as(AExpr)
3843 redef fun n_expr
=(node
)
3848 redef fun n_op
=(node
)
3853 redef fun n_expr2
=(node
)
3860 redef fun visit_all
(v
: Visitor)
3862 v
.enter_visit
(_n_expr
)
3863 v
.enter_visit
(_n_op
)
3864 v
.enter_visit
(_n_expr2
)
3869 n_expr
: nullable AExpr,
3871 n_expr2
: nullable AExpr
3874 _n_expr
= n_expr
.as(not null)
3875 n_expr
.parent
= self
3876 _n_op
= n_op
.as(not null)
3878 _n_expr2
= n_expr2
.as(not null)
3879 n_expr2
.parent
= self
3882 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3884 if _n_expr
== old_child
then
3885 n_expr
= new_child
.as(AExpr)
3888 if _n_op
== old_child
then
3889 n_op
= new_child
.as(TNe)
3892 if _n_expr2
== old_child
then
3893 n_expr2
= new_child
.as(AExpr)
3898 redef fun n_expr
=(node
)
3903 redef fun n_op
=(node
)
3908 redef fun n_expr2
=(node
)
3915 redef fun visit_all
(v
: Visitor)
3917 v
.enter_visit
(_n_expr
)
3918 v
.enter_visit
(_n_op
)
3919 v
.enter_visit
(_n_expr2
)
3924 n_expr
: nullable AExpr,
3926 n_expr2
: nullable AExpr
3929 _n_expr
= n_expr
.as(not null)
3930 n_expr
.parent
= self
3931 _n_op
= n_op
.as(not null)
3933 _n_expr2
= n_expr2
.as(not null)
3934 n_expr2
.parent
= self
3937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3939 if _n_expr
== old_child
then
3940 n_expr
= new_child
.as(AExpr)
3943 if _n_op
== old_child
then
3944 n_op
= new_child
.as(TLt)
3947 if _n_expr2
== old_child
then
3948 n_expr2
= new_child
.as(AExpr)
3953 redef fun n_expr
=(node
)
3958 redef fun n_op
=(node
)
3963 redef fun n_expr2
=(node
)
3970 redef fun visit_all
(v
: Visitor)
3972 v
.enter_visit
(_n_expr
)
3973 v
.enter_visit
(_n_op
)
3974 v
.enter_visit
(_n_expr2
)
3979 n_expr
: nullable AExpr,
3981 n_expr2
: nullable AExpr
3984 _n_expr
= n_expr
.as(not null)
3985 n_expr
.parent
= self
3986 _n_op
= n_op
.as(not null)
3988 _n_expr2
= n_expr2
.as(not null)
3989 n_expr2
.parent
= self
3992 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3994 if _n_expr
== old_child
then
3995 n_expr
= new_child
.as(AExpr)
3998 if _n_op
== old_child
then
3999 n_op
= new_child
.as(TLe)
4002 if _n_expr2
== old_child
then
4003 n_expr2
= new_child
.as(AExpr)
4008 redef fun n_expr
=(node
)
4013 redef fun n_op
=(node
)
4018 redef fun n_expr2
=(node
)
4025 redef fun visit_all
(v
: Visitor)
4027 v
.enter_visit
(_n_expr
)
4028 v
.enter_visit
(_n_op
)
4029 v
.enter_visit
(_n_expr2
)
4034 n_expr
: nullable AExpr,
4036 n_expr2
: nullable AExpr
4039 _n_expr
= n_expr
.as(not null)
4040 n_expr
.parent
= self
4041 _n_op
= n_op
.as(not null)
4043 _n_expr2
= n_expr2
.as(not null)
4044 n_expr2
.parent
= self
4047 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4049 if _n_expr
== old_child
then
4050 n_expr
= new_child
.as(AExpr)
4053 if _n_op
== old_child
then
4054 n_op
= new_child
.as(TLl)
4057 if _n_expr2
== old_child
then
4058 n_expr2
= new_child
.as(AExpr)
4063 redef fun n_expr
=(node
)
4068 redef fun n_op
=(node
)
4073 redef fun n_expr2
=(node
)
4080 redef fun visit_all
(v
: Visitor)
4082 v
.enter_visit
(_n_expr
)
4083 v
.enter_visit
(_n_op
)
4084 v
.enter_visit
(_n_expr2
)
4089 n_expr
: nullable AExpr,
4091 n_expr2
: nullable AExpr
4094 _n_expr
= n_expr
.as(not null)
4095 n_expr
.parent
= self
4096 _n_op
= n_op
.as(not null)
4098 _n_expr2
= n_expr2
.as(not null)
4099 n_expr2
.parent
= self
4102 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4104 if _n_expr
== old_child
then
4105 n_expr
= new_child
.as(AExpr)
4108 if _n_op
== old_child
then
4109 n_op
= new_child
.as(TGt)
4112 if _n_expr2
== old_child
then
4113 n_expr2
= new_child
.as(AExpr)
4118 redef fun n_expr
=(node
)
4123 redef fun n_op
=(node
)
4128 redef fun n_expr2
=(node
)
4135 redef fun visit_all
(v
: Visitor)
4137 v
.enter_visit
(_n_expr
)
4138 v
.enter_visit
(_n_op
)
4139 v
.enter_visit
(_n_expr2
)
4144 n_expr
: nullable AExpr,
4146 n_expr2
: nullable AExpr
4149 _n_expr
= n_expr
.as(not null)
4150 n_expr
.parent
= self
4151 _n_op
= n_op
.as(not null)
4153 _n_expr2
= n_expr2
.as(not null)
4154 n_expr2
.parent
= self
4157 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4159 if _n_expr
== old_child
then
4160 n_expr
= new_child
.as(AExpr)
4163 if _n_op
== old_child
then
4164 n_op
= new_child
.as(TGe)
4167 if _n_expr2
== old_child
then
4168 n_expr2
= new_child
.as(AExpr)
4173 redef fun n_expr
=(node
)
4178 redef fun n_op
=(node
)
4183 redef fun n_expr2
=(node
)
4190 redef fun visit_all
(v
: Visitor)
4192 v
.enter_visit
(_n_expr
)
4193 v
.enter_visit
(_n_op
)
4194 v
.enter_visit
(_n_expr2
)
4199 n_expr
: nullable AExpr,
4201 n_expr2
: nullable AExpr
4204 _n_expr
= n_expr
.as(not null)
4205 n_expr
.parent
= self
4206 _n_op
= n_op
.as(not null)
4208 _n_expr2
= n_expr2
.as(not null)
4209 n_expr2
.parent
= self
4212 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4214 if _n_expr
== old_child
then
4215 n_expr
= new_child
.as(AExpr)
4218 if _n_op
== old_child
then
4219 n_op
= new_child
.as(TGg)
4222 if _n_expr2
== old_child
then
4223 n_expr2
= new_child
.as(AExpr)
4228 redef fun n_expr
=(node
)
4233 redef fun n_op
=(node
)
4238 redef fun n_expr2
=(node
)
4245 redef fun visit_all
(v
: Visitor)
4247 v
.enter_visit
(_n_expr
)
4248 v
.enter_visit
(_n_op
)
4249 v
.enter_visit
(_n_expr2
)
4252 redef class AIsaExpr
4253 init init_aisaexpr
(
4254 n_expr
: nullable AExpr,
4255 n_kwisa
: nullable TKwisa,
4256 n_type
: nullable AType
4259 _n_expr
= n_expr
.as(not null)
4260 n_expr
.parent
= self
4261 _n_kwisa
= n_kwisa
.as(not null)
4262 n_kwisa
.parent
= self
4263 _n_type
= n_type
.as(not null)
4264 n_type
.parent
= self
4267 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4269 if _n_expr
== old_child
then
4270 n_expr
= new_child
.as(AExpr)
4273 if _n_kwisa
== old_child
then
4274 n_kwisa
= new_child
.as(TKwisa)
4277 if _n_type
== old_child
then
4278 n_type
= new_child
.as(AType)
4283 redef fun n_expr
=(node
)
4288 redef fun n_kwisa
=(node
)
4293 redef fun n_type
=(node
)
4300 redef fun visit_all
(v
: Visitor)
4302 v
.enter_visit
(_n_expr
)
4303 v
.enter_visit
(_n_kwisa
)
4304 v
.enter_visit
(_n_type
)
4307 redef class APlusExpr
4308 init init_aplusexpr
(
4309 n_expr
: nullable AExpr,
4310 n_op
: nullable TPlus,
4311 n_expr2
: nullable AExpr
4314 _n_expr
= n_expr
.as(not null)
4315 n_expr
.parent
= self
4316 _n_op
= n_op
.as(not null)
4318 _n_expr2
= n_expr2
.as(not null)
4319 n_expr2
.parent
= self
4322 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4324 if _n_expr
== old_child
then
4325 n_expr
= new_child
.as(AExpr)
4328 if _n_op
== old_child
then
4329 n_op
= new_child
.as(TPlus)
4332 if _n_expr2
== old_child
then
4333 n_expr2
= new_child
.as(AExpr)
4338 redef fun n_expr
=(node
)
4343 redef fun n_op
=(node
)
4348 redef fun n_expr2
=(node
)
4355 redef fun visit_all
(v
: Visitor)
4357 v
.enter_visit
(_n_expr
)
4358 v
.enter_visit
(_n_op
)
4359 v
.enter_visit
(_n_expr2
)
4362 redef class AMinusExpr
4363 init init_aminusexpr
(
4364 n_expr
: nullable AExpr,
4365 n_op
: nullable TMinus,
4366 n_expr2
: nullable AExpr
4369 _n_expr
= n_expr
.as(not null)
4370 n_expr
.parent
= self
4371 _n_op
= n_op
.as(not null)
4373 _n_expr2
= n_expr2
.as(not null)
4374 n_expr2
.parent
= self
4377 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4379 if _n_expr
== old_child
then
4380 n_expr
= new_child
.as(AExpr)
4383 if _n_op
== old_child
then
4384 n_op
= new_child
.as(TMinus)
4387 if _n_expr2
== old_child
then
4388 n_expr2
= new_child
.as(AExpr)
4393 redef fun n_expr
=(node
)
4398 redef fun n_op
=(node
)
4403 redef fun n_expr2
=(node
)
4410 redef fun visit_all
(v
: Visitor)
4412 v
.enter_visit
(_n_expr
)
4413 v
.enter_visit
(_n_op
)
4414 v
.enter_visit
(_n_expr2
)
4417 redef class AStarshipExpr
4418 init init_astarshipexpr
(
4419 n_expr
: nullable AExpr,
4420 n_op
: nullable TStarship,
4421 n_expr2
: nullable AExpr
4424 _n_expr
= n_expr
.as(not null)
4425 n_expr
.parent
= self
4426 _n_op
= n_op
.as(not null)
4428 _n_expr2
= n_expr2
.as(not null)
4429 n_expr2
.parent
= self
4432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4434 if _n_expr
== old_child
then
4435 n_expr
= new_child
.as(AExpr)
4438 if _n_op
== old_child
then
4439 n_op
= new_child
.as(TStarship)
4442 if _n_expr2
== old_child
then
4443 n_expr2
= new_child
.as(AExpr)
4448 redef fun n_expr
=(node
)
4453 redef fun n_op
=(node
)
4458 redef fun n_expr2
=(node
)
4465 redef fun visit_all
(v
: Visitor)
4467 v
.enter_visit
(_n_expr
)
4468 v
.enter_visit
(_n_op
)
4469 v
.enter_visit
(_n_expr2
)
4472 redef class AStarExpr
4473 init init_astarexpr
(
4474 n_expr
: nullable AExpr,
4475 n_op
: nullable TStar,
4476 n_expr2
: nullable AExpr
4479 _n_expr
= n_expr
.as(not null)
4480 n_expr
.parent
= self
4481 _n_op
= n_op
.as(not null)
4483 _n_expr2
= n_expr2
.as(not null)
4484 n_expr2
.parent
= self
4487 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4489 if _n_expr
== old_child
then
4490 n_expr
= new_child
.as(AExpr)
4493 if _n_op
== old_child
then
4494 n_op
= new_child
.as(TStar)
4497 if _n_expr2
== old_child
then
4498 n_expr2
= new_child
.as(AExpr)
4503 redef fun n_expr
=(node
)
4508 redef fun n_op
=(node
)
4513 redef fun n_expr2
=(node
)
4520 redef fun visit_all
(v
: Visitor)
4522 v
.enter_visit
(_n_expr
)
4523 v
.enter_visit
(_n_op
)
4524 v
.enter_visit
(_n_expr2
)
4527 redef class AStarstarExpr
4528 init init_astarstarexpr
(
4529 n_expr
: nullable AExpr,
4530 n_op
: nullable TStarstar,
4531 n_expr2
: nullable AExpr
4534 _n_expr
= n_expr
.as(not null)
4535 n_expr
.parent
= self
4536 _n_op
= n_op
.as(not null)
4538 _n_expr2
= n_expr2
.as(not null)
4539 n_expr2
.parent
= self
4542 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4544 if _n_expr
== old_child
then
4545 n_expr
= new_child
.as(AExpr)
4548 if _n_op
== old_child
then
4549 n_op
= new_child
.as(TStarstar)
4552 if _n_expr2
== old_child
then
4553 n_expr2
= new_child
.as(AExpr)
4558 redef fun n_expr
=(node
)
4563 redef fun n_op
=(node
)
4568 redef fun n_expr2
=(node
)
4575 redef fun visit_all
(v
: Visitor)
4577 v
.enter_visit
(_n_expr
)
4578 v
.enter_visit
(_n_op
)
4579 v
.enter_visit
(_n_expr2
)
4582 redef class ASlashExpr
4583 init init_aslashexpr
(
4584 n_expr
: nullable AExpr,
4585 n_op
: nullable TSlash,
4586 n_expr2
: nullable AExpr
4589 _n_expr
= n_expr
.as(not null)
4590 n_expr
.parent
= self
4591 _n_op
= n_op
.as(not null)
4593 _n_expr2
= n_expr2
.as(not null)
4594 n_expr2
.parent
= self
4597 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4599 if _n_expr
== old_child
then
4600 n_expr
= new_child
.as(AExpr)
4603 if _n_op
== old_child
then
4604 n_op
= new_child
.as(TSlash)
4607 if _n_expr2
== old_child
then
4608 n_expr2
= new_child
.as(AExpr)
4613 redef fun n_expr
=(node
)
4618 redef fun n_op
=(node
)
4623 redef fun n_expr2
=(node
)
4630 redef fun visit_all
(v
: Visitor)
4632 v
.enter_visit
(_n_expr
)
4633 v
.enter_visit
(_n_op
)
4634 v
.enter_visit
(_n_expr2
)
4637 redef class APercentExpr
4638 init init_apercentexpr
(
4639 n_expr
: nullable AExpr,
4640 n_op
: nullable TPercent,
4641 n_expr2
: nullable AExpr
4644 _n_expr
= n_expr
.as(not null)
4645 n_expr
.parent
= self
4646 _n_op
= n_op
.as(not null)
4648 _n_expr2
= n_expr2
.as(not null)
4649 n_expr2
.parent
= self
4652 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4654 if _n_expr
== old_child
then
4655 n_expr
= new_child
.as(AExpr)
4658 if _n_op
== old_child
then
4659 n_op
= new_child
.as(TPercent)
4662 if _n_expr2
== old_child
then
4663 n_expr2
= new_child
.as(AExpr)
4668 redef fun n_expr
=(node
)
4673 redef fun n_op
=(node
)
4678 redef fun n_expr2
=(node
)
4685 redef fun visit_all
(v
: Visitor)
4687 v
.enter_visit
(_n_expr
)
4688 v
.enter_visit
(_n_op
)
4689 v
.enter_visit
(_n_expr2
)
4692 redef class APipeExpr
4693 init init_apipeexpr
(
4694 n_expr
: nullable AExpr,
4695 n_op
: nullable TPipe,
4696 n_expr2
: nullable AExpr
4699 _n_expr
= n_expr
.as(not null)
4700 n_expr
.parent
= self
4701 _n_op
= n_op
.as(not null)
4703 _n_expr2
= n_expr2
.as(not null)
4704 n_expr2
.parent
= self
4707 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4709 if _n_expr
== old_child
then
4710 n_expr
= new_child
.as(AExpr)
4713 if _n_op
== old_child
then
4714 n_op
= new_child
.as(TPipe)
4717 if _n_expr2
== old_child
then
4718 n_expr2
= new_child
.as(AExpr)
4723 redef fun n_expr
=(node
)
4728 redef fun n_op
=(node
)
4733 redef fun n_expr2
=(node
)
4740 redef fun visit_all
(v
: Visitor)
4742 v
.enter_visit
(_n_expr
)
4743 v
.enter_visit
(_n_op
)
4744 v
.enter_visit
(_n_expr2
)
4747 redef class ACaretExpr
4748 init init_acaretexpr
(
4749 n_expr
: nullable AExpr,
4750 n_op
: nullable TCaret,
4751 n_expr2
: nullable AExpr
4754 _n_expr
= n_expr
.as(not null)
4755 n_expr
.parent
= self
4756 _n_op
= n_op
.as(not null)
4758 _n_expr2
= n_expr2
.as(not null)
4759 n_expr2
.parent
= self
4762 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4764 if _n_expr
== old_child
then
4765 n_expr
= new_child
.as(AExpr)
4768 if _n_op
== old_child
then
4769 n_op
= new_child
.as(TCaret)
4772 if _n_expr2
== old_child
then
4773 n_expr2
= new_child
.as(AExpr)
4778 redef fun n_expr
=(node
)
4783 redef fun n_op
=(node
)
4788 redef fun n_expr2
=(node
)
4795 redef fun visit_all
(v
: Visitor)
4797 v
.enter_visit
(_n_expr
)
4798 v
.enter_visit
(_n_op
)
4799 v
.enter_visit
(_n_expr2
)
4802 redef class AAmpExpr
4803 init init_aampexpr
(
4804 n_expr
: nullable AExpr,
4805 n_op
: nullable TAmp,
4806 n_expr2
: nullable AExpr
4809 _n_expr
= n_expr
.as(not null)
4810 n_expr
.parent
= self
4811 _n_op
= n_op
.as(not null)
4813 _n_expr2
= n_expr2
.as(not null)
4814 n_expr2
.parent
= self
4817 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4819 if _n_expr
== old_child
then
4820 n_expr
= new_child
.as(AExpr)
4823 if _n_op
== old_child
then
4824 n_op
= new_child
.as(TAmp)
4827 if _n_expr2
== old_child
then
4828 n_expr2
= new_child
.as(AExpr)
4833 redef fun n_expr
=(node
)
4838 redef fun n_op
=(node
)
4843 redef fun n_expr2
=(node
)
4850 redef fun visit_all
(v
: Visitor)
4852 v
.enter_visit
(_n_expr
)
4853 v
.enter_visit
(_n_op
)
4854 v
.enter_visit
(_n_expr2
)
4857 redef class AUminusExpr
4858 init init_auminusexpr
(
4859 n_op
: nullable TMinus,
4860 n_expr
: nullable AExpr
4863 _n_op
= n_op
.as(not null)
4865 _n_expr
= n_expr
.as(not null)
4866 n_expr
.parent
= self
4869 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4871 if _n_op
== old_child
then
4872 n_op
= new_child
.as(TMinus)
4875 if _n_expr
== old_child
then
4876 n_expr
= new_child
.as(AExpr)
4881 redef fun n_op
=(node
)
4886 redef fun n_expr
=(node
)
4893 redef fun visit_all
(v
: Visitor)
4895 v
.enter_visit
(_n_op
)
4896 v
.enter_visit
(_n_expr
)
4899 redef class AUplusExpr
4900 init init_auplusexpr
(
4901 n_op
: nullable TPlus,
4902 n_expr
: nullable AExpr
4905 _n_op
= n_op
.as(not null)
4907 _n_expr
= n_expr
.as(not null)
4908 n_expr
.parent
= self
4911 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4913 if _n_op
== old_child
then
4914 n_op
= new_child
.as(TPlus)
4917 if _n_expr
== old_child
then
4918 n_expr
= new_child
.as(AExpr)
4923 redef fun n_op
=(node
)
4928 redef fun n_expr
=(node
)
4935 redef fun visit_all
(v
: Visitor)
4937 v
.enter_visit
(_n_op
)
4938 v
.enter_visit
(_n_expr
)
4941 redef class AUtildeExpr
4942 init init_autildeexpr
(
4943 n_op
: nullable TTilde,
4944 n_expr
: nullable AExpr
4947 _n_op
= n_op
.as(not null)
4949 _n_expr
= n_expr
.as(not null)
4950 n_expr
.parent
= self
4953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4955 if _n_op
== old_child
then
4956 n_op
= new_child
.as(TTilde)
4959 if _n_expr
== old_child
then
4960 n_expr
= new_child
.as(AExpr)
4965 redef fun n_op
=(node
)
4970 redef fun n_expr
=(node
)
4977 redef fun visit_all
(v
: Visitor)
4979 v
.enter_visit
(_n_op
)
4980 v
.enter_visit
(_n_expr
)
4983 redef class ANewExpr
4984 init init_anewexpr
(
4985 n_kwnew
: nullable TKwnew,
4986 n_type
: nullable AType,
4987 n_qid
: nullable AQid,
4988 n_args
: nullable AExprs
4991 _n_kwnew
= n_kwnew
.as(not null)
4992 n_kwnew
.parent
= self
4993 _n_type
= n_type
.as(not null)
4994 n_type
.parent
= self
4996 if n_qid
!= null then n_qid
.parent
= self
4997 _n_args
= n_args
.as(not null)
4998 n_args
.parent
= self
5001 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5003 if _n_kwnew
== old_child
then
5004 n_kwnew
= new_child
.as(TKwnew)
5007 if _n_type
== old_child
then
5008 n_type
= new_child
.as(AType)
5011 if _n_qid
== old_child
then
5012 n_qid
= new_child
.as(nullable AQid)
5015 if _n_args
== old_child
then
5016 n_args
= new_child
.as(AExprs)
5021 redef fun n_kwnew
=(node
)
5026 redef fun n_type
=(node
)
5031 redef fun n_qid
=(node
)
5034 if node
!= null then node
.parent
= self
5036 redef fun n_args
=(node
)
5043 redef fun visit_all
(v
: Visitor)
5045 v
.enter_visit
(_n_kwnew
)
5046 v
.enter_visit
(_n_type
)
5047 v
.enter_visit
(_n_qid
)
5048 v
.enter_visit
(_n_args
)
5051 redef class AAttrExpr
5052 init init_aattrexpr
(
5053 n_expr
: nullable AExpr,
5054 n_id
: nullable TAttrid
5057 _n_expr
= n_expr
.as(not null)
5058 n_expr
.parent
= self
5059 _n_id
= n_id
.as(not null)
5063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5065 if _n_expr
== old_child
then
5066 n_expr
= new_child
.as(AExpr)
5069 if _n_id
== old_child
then
5070 n_id
= new_child
.as(TAttrid)
5075 redef fun n_expr
=(node
)
5080 redef fun n_id
=(node
)
5087 redef fun visit_all
(v
: Visitor)
5089 v
.enter_visit
(_n_expr
)
5090 v
.enter_visit
(_n_id
)
5093 redef class AAttrAssignExpr
5094 init init_aattrassignexpr
(
5095 n_expr
: nullable AExpr,
5096 n_id
: nullable TAttrid,
5097 n_assign
: nullable TAssign,
5098 n_value
: nullable AExpr
5101 _n_expr
= n_expr
.as(not null)
5102 n_expr
.parent
= self
5103 _n_id
= n_id
.as(not null)
5105 _n_assign
= n_assign
.as(not null)
5106 n_assign
.parent
= self
5107 _n_value
= n_value
.as(not null)
5108 n_value
.parent
= self
5111 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5113 if _n_expr
== old_child
then
5114 n_expr
= new_child
.as(AExpr)
5117 if _n_id
== old_child
then
5118 n_id
= new_child
.as(TAttrid)
5121 if _n_assign
== old_child
then
5122 n_assign
= new_child
.as(TAssign)
5125 if _n_value
== old_child
then
5126 n_value
= new_child
.as(AExpr)
5131 redef fun n_expr
=(node
)
5136 redef fun n_id
=(node
)
5141 redef fun n_assign
=(node
)
5146 redef fun n_value
=(node
)
5153 redef fun visit_all
(v
: Visitor)
5155 v
.enter_visit
(_n_expr
)
5156 v
.enter_visit
(_n_id
)
5157 v
.enter_visit
(_n_assign
)
5158 v
.enter_visit
(_n_value
)
5161 redef class AAttrReassignExpr
5162 init init_aattrreassignexpr
(
5163 n_expr
: nullable AExpr,
5164 n_id
: nullable TAttrid,
5165 n_assign_op
: nullable AAssignOp,
5166 n_value
: nullable AExpr
5169 _n_expr
= n_expr
.as(not null)
5170 n_expr
.parent
= self
5171 _n_id
= n_id
.as(not null)
5173 _n_assign_op
= n_assign_op
.as(not null)
5174 n_assign_op
.parent
= self
5175 _n_value
= n_value
.as(not null)
5176 n_value
.parent
= self
5179 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5181 if _n_expr
== old_child
then
5182 n_expr
= new_child
.as(AExpr)
5185 if _n_id
== old_child
then
5186 n_id
= new_child
.as(TAttrid)
5189 if _n_assign_op
== old_child
then
5190 n_assign_op
= new_child
.as(AAssignOp)
5193 if _n_value
== old_child
then
5194 n_value
= new_child
.as(AExpr)
5199 redef fun n_expr
=(node
)
5204 redef fun n_id
=(node
)
5209 redef fun n_assign_op
=(node
)
5214 redef fun n_value
=(node
)
5221 redef fun visit_all
(v
: Visitor)
5223 v
.enter_visit
(_n_expr
)
5224 v
.enter_visit
(_n_id
)
5225 v
.enter_visit
(_n_assign_op
)
5226 v
.enter_visit
(_n_value
)
5229 redef class ACallExpr
5230 init init_acallexpr
(
5231 n_expr
: nullable AExpr,
5232 n_qid
: nullable AQid,
5233 n_args
: nullable AExprs
5236 _n_expr
= n_expr
.as(not null)
5237 n_expr
.parent
= self
5238 _n_qid
= n_qid
.as(not null)
5240 _n_args
= n_args
.as(not null)
5241 n_args
.parent
= self
5244 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5246 if _n_expr
== old_child
then
5247 n_expr
= new_child
.as(AExpr)
5250 if _n_qid
== old_child
then
5251 n_qid
= new_child
.as(AQid)
5254 if _n_args
== old_child
then
5255 n_args
= new_child
.as(AExprs)
5260 redef fun n_expr
=(node
)
5265 redef fun n_qid
=(node
)
5270 redef fun n_args
=(node
)
5277 redef fun visit_all
(v
: Visitor)
5279 v
.enter_visit
(_n_expr
)
5280 v
.enter_visit
(_n_qid
)
5281 v
.enter_visit
(_n_args
)
5284 redef class ACallAssignExpr
5285 init init_acallassignexpr
(
5286 n_expr
: nullable AExpr,
5287 n_qid
: nullable AQid,
5288 n_args
: nullable AExprs,
5289 n_assign
: nullable TAssign,
5290 n_value
: nullable AExpr
5293 _n_expr
= n_expr
.as(not null)
5294 n_expr
.parent
= self
5295 _n_qid
= n_qid
.as(not null)
5297 _n_args
= n_args
.as(not null)
5298 n_args
.parent
= self
5299 _n_assign
= n_assign
.as(not null)
5300 n_assign
.parent
= self
5301 _n_value
= n_value
.as(not null)
5302 n_value
.parent
= self
5305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5307 if _n_expr
== old_child
then
5308 n_expr
= new_child
.as(AExpr)
5311 if _n_qid
== old_child
then
5312 n_qid
= new_child
.as(AQid)
5315 if _n_args
== old_child
then
5316 n_args
= new_child
.as(AExprs)
5319 if _n_assign
== old_child
then
5320 n_assign
= new_child
.as(TAssign)
5323 if _n_value
== old_child
then
5324 n_value
= new_child
.as(AExpr)
5329 redef fun n_expr
=(node
)
5334 redef fun n_qid
=(node
)
5339 redef fun n_args
=(node
)
5344 redef fun n_assign
=(node
)
5349 redef fun n_value
=(node
)
5356 redef fun visit_all
(v
: Visitor)
5358 v
.enter_visit
(_n_expr
)
5359 v
.enter_visit
(_n_qid
)
5360 v
.enter_visit
(_n_args
)
5361 v
.enter_visit
(_n_assign
)
5362 v
.enter_visit
(_n_value
)
5365 redef class ACallReassignExpr
5366 init init_acallreassignexpr
(
5367 n_expr
: nullable AExpr,
5368 n_qid
: nullable AQid,
5369 n_args
: nullable AExprs,
5370 n_assign_op
: nullable AAssignOp,
5371 n_value
: nullable AExpr
5374 _n_expr
= n_expr
.as(not null)
5375 n_expr
.parent
= self
5376 _n_qid
= n_qid
.as(not null)
5378 _n_args
= n_args
.as(not null)
5379 n_args
.parent
= self
5380 _n_assign_op
= n_assign_op
.as(not null)
5381 n_assign_op
.parent
= self
5382 _n_value
= n_value
.as(not null)
5383 n_value
.parent
= self
5386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5388 if _n_expr
== old_child
then
5389 n_expr
= new_child
.as(AExpr)
5392 if _n_qid
== old_child
then
5393 n_qid
= new_child
.as(AQid)
5396 if _n_args
== old_child
then
5397 n_args
= new_child
.as(AExprs)
5400 if _n_assign_op
== old_child
then
5401 n_assign_op
= new_child
.as(AAssignOp)
5404 if _n_value
== old_child
then
5405 n_value
= new_child
.as(AExpr)
5410 redef fun n_expr
=(node
)
5415 redef fun n_qid
=(node
)
5420 redef fun n_args
=(node
)
5425 redef fun n_assign_op
=(node
)
5430 redef fun n_value
=(node
)
5437 redef fun visit_all
(v
: Visitor)
5439 v
.enter_visit
(_n_expr
)
5440 v
.enter_visit
(_n_qid
)
5441 v
.enter_visit
(_n_args
)
5442 v
.enter_visit
(_n_assign_op
)
5443 v
.enter_visit
(_n_value
)
5446 redef class ASuperExpr
5447 init init_asuperexpr
(
5448 n_qualified
: nullable AQualified,
5449 n_kwsuper
: nullable TKwsuper,
5450 n_args
: nullable AExprs
5453 _n_qualified
= n_qualified
5454 if n_qualified
!= null then n_qualified
.parent
= self
5455 _n_kwsuper
= n_kwsuper
.as(not null)
5456 n_kwsuper
.parent
= self
5457 _n_args
= n_args
.as(not null)
5458 n_args
.parent
= self
5461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5463 if _n_qualified
== old_child
then
5464 n_qualified
= new_child
.as(nullable AQualified)
5467 if _n_kwsuper
== old_child
then
5468 n_kwsuper
= new_child
.as(TKwsuper)
5471 if _n_args
== old_child
then
5472 n_args
= new_child
.as(AExprs)
5477 redef fun n_qualified
=(node
)
5480 if node
!= null then node
.parent
= self
5482 redef fun n_kwsuper
=(node
)
5487 redef fun n_args
=(node
)
5494 redef fun visit_all
(v
: Visitor)
5496 v
.enter_visit
(_n_qualified
)
5497 v
.enter_visit
(_n_kwsuper
)
5498 v
.enter_visit
(_n_args
)
5501 redef class AInitExpr
5502 init init_ainitexpr
(
5503 n_expr
: nullable AExpr,
5504 n_kwinit
: nullable TKwinit,
5505 n_args
: nullable AExprs
5508 _n_expr
= n_expr
.as(not null)
5509 n_expr
.parent
= self
5510 _n_kwinit
= n_kwinit
.as(not null)
5511 n_kwinit
.parent
= self
5512 _n_args
= n_args
.as(not null)
5513 n_args
.parent
= self
5516 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5518 if _n_expr
== old_child
then
5519 n_expr
= new_child
.as(AExpr)
5522 if _n_kwinit
== old_child
then
5523 n_kwinit
= new_child
.as(TKwinit)
5526 if _n_args
== old_child
then
5527 n_args
= new_child
.as(AExprs)
5532 redef fun n_expr
=(node
)
5537 redef fun n_kwinit
=(node
)
5542 redef fun n_args
=(node
)
5549 redef fun visit_all
(v
: Visitor)
5551 v
.enter_visit
(_n_expr
)
5552 v
.enter_visit
(_n_kwinit
)
5553 v
.enter_visit
(_n_args
)
5556 redef class ABraExpr
5557 init init_abraexpr
(
5558 n_expr
: nullable AExpr,
5559 n_args
: nullable AExprs
5562 _n_expr
= n_expr
.as(not null)
5563 n_expr
.parent
= self
5564 _n_args
= n_args
.as(not null)
5565 n_args
.parent
= self
5568 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5570 if _n_expr
== old_child
then
5571 n_expr
= new_child
.as(AExpr)
5574 if _n_args
== old_child
then
5575 n_args
= new_child
.as(AExprs)
5580 redef fun n_expr
=(node
)
5585 redef fun n_args
=(node
)
5592 redef fun visit_all
(v
: Visitor)
5594 v
.enter_visit
(_n_expr
)
5595 v
.enter_visit
(_n_args
)
5598 redef class ABraAssignExpr
5599 init init_abraassignexpr
(
5600 n_expr
: nullable AExpr,
5601 n_args
: nullable AExprs,
5602 n_assign
: nullable TAssign,
5603 n_value
: nullable AExpr
5606 _n_expr
= n_expr
.as(not null)
5607 n_expr
.parent
= self
5608 _n_args
= n_args
.as(not null)
5609 n_args
.parent
= self
5610 _n_assign
= n_assign
.as(not null)
5611 n_assign
.parent
= self
5612 _n_value
= n_value
.as(not null)
5613 n_value
.parent
= self
5616 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5618 if _n_expr
== old_child
then
5619 n_expr
= new_child
.as(AExpr)
5622 if _n_args
== old_child
then
5623 n_args
= new_child
.as(AExprs)
5626 if _n_assign
== old_child
then
5627 n_assign
= new_child
.as(TAssign)
5630 if _n_value
== old_child
then
5631 n_value
= new_child
.as(AExpr)
5636 redef fun n_expr
=(node
)
5641 redef fun n_args
=(node
)
5646 redef fun n_assign
=(node
)
5651 redef fun n_value
=(node
)
5658 redef fun visit_all
(v
: Visitor)
5660 v
.enter_visit
(_n_expr
)
5661 v
.enter_visit
(_n_args
)
5662 v
.enter_visit
(_n_assign
)
5663 v
.enter_visit
(_n_value
)
5666 redef class ABraReassignExpr
5667 init init_abrareassignexpr
(
5668 n_expr
: nullable AExpr,
5669 n_args
: nullable AExprs,
5670 n_assign_op
: nullable AAssignOp,
5671 n_value
: nullable AExpr
5674 _n_expr
= n_expr
.as(not null)
5675 n_expr
.parent
= self
5676 _n_args
= n_args
.as(not null)
5677 n_args
.parent
= self
5678 _n_assign_op
= n_assign_op
.as(not null)
5679 n_assign_op
.parent
= self
5680 _n_value
= n_value
.as(not null)
5681 n_value
.parent
= self
5684 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5686 if _n_expr
== old_child
then
5687 n_expr
= new_child
.as(AExpr)
5690 if _n_args
== old_child
then
5691 n_args
= new_child
.as(AExprs)
5694 if _n_assign_op
== old_child
then
5695 n_assign_op
= new_child
.as(AAssignOp)
5698 if _n_value
== old_child
then
5699 n_value
= new_child
.as(AExpr)
5704 redef fun n_expr
=(node
)
5709 redef fun n_args
=(node
)
5714 redef fun n_assign_op
=(node
)
5719 redef fun n_value
=(node
)
5726 redef fun visit_all
(v
: Visitor)
5728 v
.enter_visit
(_n_expr
)
5729 v
.enter_visit
(_n_args
)
5730 v
.enter_visit
(_n_assign_op
)
5731 v
.enter_visit
(_n_value
)
5734 redef class AVarExpr
5735 init init_avarexpr
(
5739 _n_id
= n_id
.as(not null)
5743 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5745 if _n_id
== old_child
then
5746 n_id
= new_child
.as(TId)
5751 redef fun n_id
=(node
)
5758 redef fun visit_all
(v
: Visitor)
5760 v
.enter_visit
(_n_id
)
5763 redef class AVarAssignExpr
5764 init init_avarassignexpr
(
5766 n_assign
: nullable TAssign,
5767 n_value
: nullable AExpr
5770 _n_id
= n_id
.as(not null)
5772 _n_assign
= n_assign
.as(not null)
5773 n_assign
.parent
= self
5774 _n_value
= n_value
.as(not null)
5775 n_value
.parent
= self
5778 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5780 if _n_id
== old_child
then
5781 n_id
= new_child
.as(TId)
5784 if _n_assign
== old_child
then
5785 n_assign
= new_child
.as(TAssign)
5788 if _n_value
== old_child
then
5789 n_value
= new_child
.as(AExpr)
5794 redef fun n_id
=(node
)
5799 redef fun n_assign
=(node
)
5804 redef fun n_value
=(node
)
5811 redef fun visit_all
(v
: Visitor)
5813 v
.enter_visit
(_n_id
)
5814 v
.enter_visit
(_n_assign
)
5815 v
.enter_visit
(_n_value
)
5818 redef class AVarReassignExpr
5819 init init_avarreassignexpr
(
5821 n_assign_op
: nullable AAssignOp,
5822 n_value
: nullable AExpr
5825 _n_id
= n_id
.as(not null)
5827 _n_assign_op
= n_assign_op
.as(not null)
5828 n_assign_op
.parent
= self
5829 _n_value
= n_value
.as(not null)
5830 n_value
.parent
= self
5833 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5835 if _n_id
== old_child
then
5836 n_id
= new_child
.as(TId)
5839 if _n_assign_op
== old_child
then
5840 n_assign_op
= new_child
.as(AAssignOp)
5843 if _n_value
== old_child
then
5844 n_value
= new_child
.as(AExpr)
5849 redef fun n_id
=(node
)
5854 redef fun n_assign_op
=(node
)
5859 redef fun n_value
=(node
)
5866 redef fun visit_all
(v
: Visitor)
5868 v
.enter_visit
(_n_id
)
5869 v
.enter_visit
(_n_assign_op
)
5870 v
.enter_visit
(_n_value
)
5873 redef class ARangeExpr
5874 init init_arangeexpr
(
5875 n_expr
: nullable AExpr,
5876 n_expr2
: nullable AExpr,
5877 n_annotations
: nullable AAnnotations
5880 _n_expr
= n_expr
.as(not null)
5881 n_expr
.parent
= self
5882 _n_expr2
= n_expr2
.as(not null)
5883 n_expr2
.parent
= self
5884 _n_annotations
= n_annotations
5885 if n_annotations
!= null then n_annotations
.parent
= self
5888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5890 if _n_expr
== old_child
then
5891 n_expr
= new_child
.as(AExpr)
5894 if _n_expr2
== old_child
then
5895 n_expr2
= new_child
.as(AExpr)
5898 if _n_annotations
== old_child
then
5899 n_annotations
= new_child
.as(nullable AAnnotations)
5904 redef fun n_expr
=(node
)
5909 redef fun n_expr2
=(node
)
5914 redef fun n_annotations
=(node
)
5916 _n_annotations
= node
5917 if node
!= null then node
.parent
= self
5921 redef fun visit_all
(v
: Visitor)
5923 v
.enter_visit
(_n_expr
)
5924 v
.enter_visit
(_n_expr2
)
5925 v
.enter_visit
(_n_annotations
)
5928 redef class ACrangeExpr
5929 init init_acrangeexpr
(
5930 n_obra
: nullable TObra,
5931 n_expr
: nullable AExpr,
5932 n_dotdot
: nullable TDotdot,
5933 n_expr2
: nullable AExpr,
5934 n_cbra
: nullable TCbra,
5935 n_annotations
: nullable AAnnotations
5938 _n_obra
= n_obra
.as(not null)
5939 n_obra
.parent
= self
5940 _n_expr
= n_expr
.as(not null)
5941 n_expr
.parent
= self
5942 _n_dotdot
= n_dotdot
.as(not null)
5943 n_dotdot
.parent
= self
5944 _n_expr2
= n_expr2
.as(not null)
5945 n_expr2
.parent
= self
5946 _n_cbra
= n_cbra
.as(not null)
5947 n_cbra
.parent
= self
5948 _n_annotations
= n_annotations
5949 if n_annotations
!= null then n_annotations
.parent
= self
5952 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5954 if _n_obra
== old_child
then
5955 n_obra
= new_child
.as(TObra)
5958 if _n_expr
== old_child
then
5959 n_expr
= new_child
.as(AExpr)
5962 if _n_dotdot
== old_child
then
5963 n_dotdot
= new_child
.as(TDotdot)
5966 if _n_expr2
== old_child
then
5967 n_expr2
= new_child
.as(AExpr)
5970 if _n_cbra
== old_child
then
5971 n_cbra
= new_child
.as(TCbra)
5974 if _n_annotations
== old_child
then
5975 n_annotations
= new_child
.as(nullable AAnnotations)
5980 redef fun n_obra
=(node
)
5985 redef fun n_expr
=(node
)
5990 redef fun n_dotdot
=(node
)
5995 redef fun n_expr2
=(node
)
6000 redef fun n_cbra
=(node
)
6005 redef fun n_annotations
=(node
)
6007 _n_annotations
= node
6008 if node
!= null then node
.parent
= self
6012 redef fun visit_all
(v
: Visitor)
6014 v
.enter_visit
(_n_obra
)
6015 v
.enter_visit
(_n_expr
)
6016 v
.enter_visit
(_n_dotdot
)
6017 v
.enter_visit
(_n_expr2
)
6018 v
.enter_visit
(_n_cbra
)
6019 v
.enter_visit
(_n_annotations
)
6022 redef class AOrangeExpr
6023 init init_aorangeexpr
(
6024 n_obra
: nullable TObra,
6025 n_expr
: nullable AExpr,
6026 n_dotdot
: nullable TDotdot,
6027 n_expr2
: nullable AExpr,
6028 n_cbra
: nullable TObra,
6029 n_annotations
: nullable AAnnotations
6032 _n_obra
= n_obra
.as(not null)
6033 n_obra
.parent
= self
6034 _n_expr
= n_expr
.as(not null)
6035 n_expr
.parent
= self
6036 _n_dotdot
= n_dotdot
.as(not null)
6037 n_dotdot
.parent
= self
6038 _n_expr2
= n_expr2
.as(not null)
6039 n_expr2
.parent
= self
6040 _n_cbra
= n_cbra
.as(not null)
6041 n_cbra
.parent
= self
6042 _n_annotations
= n_annotations
6043 if n_annotations
!= null then n_annotations
.parent
= self
6046 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6048 if _n_obra
== old_child
then
6049 n_obra
= new_child
.as(TObra)
6052 if _n_expr
== old_child
then
6053 n_expr
= new_child
.as(AExpr)
6056 if _n_dotdot
== old_child
then
6057 n_dotdot
= new_child
.as(TDotdot)
6060 if _n_expr2
== old_child
then
6061 n_expr2
= new_child
.as(AExpr)
6064 if _n_cbra
== old_child
then
6065 n_cbra
= new_child
.as(TObra)
6068 if _n_annotations
== old_child
then
6069 n_annotations
= new_child
.as(nullable AAnnotations)
6074 redef fun n_obra
=(node
)
6079 redef fun n_expr
=(node
)
6084 redef fun n_dotdot
=(node
)
6089 redef fun n_expr2
=(node
)
6094 redef fun n_cbra
=(node
)
6099 redef fun n_annotations
=(node
)
6101 _n_annotations
= node
6102 if node
!= null then node
.parent
= self
6106 redef fun visit_all
(v
: Visitor)
6108 v
.enter_visit
(_n_obra
)
6109 v
.enter_visit
(_n_expr
)
6110 v
.enter_visit
(_n_dotdot
)
6111 v
.enter_visit
(_n_expr2
)
6112 v
.enter_visit
(_n_cbra
)
6113 v
.enter_visit
(_n_annotations
)
6116 redef class AArrayExpr
6117 init init_aarrayexpr
(
6118 n_obra
: nullable TObra,
6119 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6120 n_type
: nullable AType,
6121 n_cbra
: nullable TCbra,
6122 n_annotations
: nullable AAnnotations
6125 _n_obra
= n_obra
.as(not null)
6126 n_obra
.parent
= self
6127 self.n_exprs
.unsafe_add_all
(n_exprs
)
6129 if n_type
!= null then n_type
.parent
= self
6130 _n_cbra
= n_cbra
.as(not null)
6131 n_cbra
.parent
= self
6132 _n_annotations
= n_annotations
6133 if n_annotations
!= null then n_annotations
.parent
= self
6136 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6138 if _n_obra
== old_child
then
6139 n_obra
= new_child
.as(TObra)
6142 if n_exprs
.replace_child
(old_child
, new_child
) then return
6143 if _n_type
== old_child
then
6144 n_type
= new_child
.as(nullable AType)
6147 if _n_cbra
== old_child
then
6148 n_cbra
= new_child
.as(TCbra)
6151 if _n_annotations
== old_child
then
6152 n_annotations
= new_child
.as(nullable AAnnotations)
6157 redef fun n_obra
=(node
)
6162 redef fun n_type
=(node
)
6165 if node
!= null then node
.parent
= self
6167 redef fun n_cbra
=(node
)
6172 redef fun n_annotations
=(node
)
6174 _n_annotations
= node
6175 if node
!= null then node
.parent
= self
6179 redef fun visit_all
(v
: Visitor)
6181 v
.enter_visit
(_n_obra
)
6182 n_exprs
.visit_all
(v
)
6183 v
.enter_visit
(_n_type
)
6184 v
.enter_visit
(_n_cbra
)
6185 v
.enter_visit
(_n_annotations
)
6188 redef class ASelfExpr
6189 init init_aselfexpr
(
6190 n_kwself
: nullable TKwself,
6191 n_annotations
: nullable AAnnotations
6194 _n_kwself
= n_kwself
.as(not null)
6195 n_kwself
.parent
= self
6196 _n_annotations
= n_annotations
6197 if n_annotations
!= null then n_annotations
.parent
= self
6200 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6202 if _n_kwself
== old_child
then
6203 n_kwself
= new_child
.as(TKwself)
6206 if _n_annotations
== old_child
then
6207 n_annotations
= new_child
.as(nullable AAnnotations)
6212 redef fun n_kwself
=(node
)
6217 redef fun n_annotations
=(node
)
6219 _n_annotations
= node
6220 if node
!= null then node
.parent
= self
6224 redef fun visit_all
(v
: Visitor)
6226 v
.enter_visit
(_n_kwself
)
6227 v
.enter_visit
(_n_annotations
)
6230 redef class AImplicitSelfExpr
6231 init init_aimplicitselfexpr
6235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6241 redef fun visit_all
(v
: Visitor)
6245 redef class ATrueExpr
6246 init init_atrueexpr
(
6247 n_kwtrue
: nullable TKwtrue,
6248 n_annotations
: nullable AAnnotations
6251 _n_kwtrue
= n_kwtrue
.as(not null)
6252 n_kwtrue
.parent
= self
6253 _n_annotations
= n_annotations
6254 if n_annotations
!= null then n_annotations
.parent
= self
6257 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6259 if _n_kwtrue
== old_child
then
6260 n_kwtrue
= new_child
.as(TKwtrue)
6263 if _n_annotations
== old_child
then
6264 n_annotations
= new_child
.as(nullable AAnnotations)
6269 redef fun n_kwtrue
=(node
)
6274 redef fun n_annotations
=(node
)
6276 _n_annotations
= node
6277 if node
!= null then node
.parent
= self
6281 redef fun visit_all
(v
: Visitor)
6283 v
.enter_visit
(_n_kwtrue
)
6284 v
.enter_visit
(_n_annotations
)
6287 redef class AFalseExpr
6288 init init_afalseexpr
(
6289 n_kwfalse
: nullable TKwfalse,
6290 n_annotations
: nullable AAnnotations
6293 _n_kwfalse
= n_kwfalse
.as(not null)
6294 n_kwfalse
.parent
= self
6295 _n_annotations
= n_annotations
6296 if n_annotations
!= null then n_annotations
.parent
= self
6299 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6301 if _n_kwfalse
== old_child
then
6302 n_kwfalse
= new_child
.as(TKwfalse)
6305 if _n_annotations
== old_child
then
6306 n_annotations
= new_child
.as(nullable AAnnotations)
6311 redef fun n_kwfalse
=(node
)
6316 redef fun n_annotations
=(node
)
6318 _n_annotations
= node
6319 if node
!= null then node
.parent
= self
6323 redef fun visit_all
(v
: Visitor)
6325 v
.enter_visit
(_n_kwfalse
)
6326 v
.enter_visit
(_n_annotations
)
6329 redef class ANullExpr
6330 init init_anullexpr
(
6331 n_kwnull
: nullable TKwnull,
6332 n_annotations
: nullable AAnnotations
6335 _n_kwnull
= n_kwnull
.as(not null)
6336 n_kwnull
.parent
= self
6337 _n_annotations
= n_annotations
6338 if n_annotations
!= null then n_annotations
.parent
= self
6341 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6343 if _n_kwnull
== old_child
then
6344 n_kwnull
= new_child
.as(TKwnull)
6347 if _n_annotations
== old_child
then
6348 n_annotations
= new_child
.as(nullable AAnnotations)
6353 redef fun n_kwnull
=(node
)
6358 redef fun n_annotations
=(node
)
6360 _n_annotations
= node
6361 if node
!= null then node
.parent
= self
6365 redef fun visit_all
(v
: Visitor)
6367 v
.enter_visit
(_n_kwnull
)
6368 v
.enter_visit
(_n_annotations
)
6371 redef class AIntegerExpr
6372 init init_aintegerexpr
(
6373 n_integer
: nullable TInteger,
6374 n_annotations
: nullable AAnnotations
6377 _n_integer
= n_integer
.as(not null)
6378 n_integer
.parent
= self
6379 _n_annotations
= n_annotations
6380 if n_annotations
!= null then n_annotations
.parent
= self
6383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6385 if _n_integer
== old_child
then
6386 n_integer
= new_child
.as(TInteger)
6389 if _n_annotations
== old_child
then
6390 n_annotations
= new_child
.as(nullable AAnnotations)
6395 redef fun n_integer
=(node
)
6400 redef fun n_annotations
=(node
)
6402 _n_annotations
= node
6403 if node
!= null then node
.parent
= self
6407 redef fun visit_all
(v
: Visitor)
6409 v
.enter_visit
(_n_integer
)
6410 v
.enter_visit
(_n_annotations
)
6413 redef class AFloatExpr
6414 init init_afloatexpr
(
6415 n_float
: nullable TFloat,
6416 n_annotations
: nullable AAnnotations
6419 _n_float
= n_float
.as(not null)
6420 n_float
.parent
= self
6421 _n_annotations
= n_annotations
6422 if n_annotations
!= null then n_annotations
.parent
= self
6425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6427 if _n_float
== old_child
then
6428 n_float
= new_child
.as(TFloat)
6431 if _n_annotations
== old_child
then
6432 n_annotations
= new_child
.as(nullable AAnnotations)
6437 redef fun n_float
=(node
)
6442 redef fun n_annotations
=(node
)
6444 _n_annotations
= node
6445 if node
!= null then node
.parent
= self
6449 redef fun visit_all
(v
: Visitor)
6451 v
.enter_visit
(_n_float
)
6452 v
.enter_visit
(_n_annotations
)
6455 redef class ACharExpr
6456 init init_acharexpr
(
6457 n_char
: nullable TChar,
6458 n_annotations
: nullable AAnnotations
6461 _n_char
= n_char
.as(not null)
6462 n_char
.parent
= self
6463 _n_annotations
= n_annotations
6464 if n_annotations
!= null then n_annotations
.parent
= self
6467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6469 if _n_char
== old_child
then
6470 n_char
= new_child
.as(TChar)
6473 if _n_annotations
== old_child
then
6474 n_annotations
= new_child
.as(nullable AAnnotations)
6479 redef fun n_char
=(node
)
6484 redef fun n_annotations
=(node
)
6486 _n_annotations
= node
6487 if node
!= null then node
.parent
= self
6491 redef fun visit_all
(v
: Visitor)
6493 v
.enter_visit
(_n_char
)
6494 v
.enter_visit
(_n_annotations
)
6497 redef class AStringExpr
6498 init init_astringexpr
(
6499 n_string
: nullable TString,
6500 n_annotations
: nullable AAnnotations
6503 _n_string
= n_string
.as(not null)
6504 n_string
.parent
= self
6505 _n_annotations
= n_annotations
6506 if n_annotations
!= null then n_annotations
.parent
= self
6509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6511 if _n_string
== old_child
then
6512 n_string
= new_child
.as(TString)
6515 if _n_annotations
== old_child
then
6516 n_annotations
= new_child
.as(nullable AAnnotations)
6521 redef fun n_string
=(node
)
6526 redef fun n_annotations
=(node
)
6528 _n_annotations
= node
6529 if node
!= null then node
.parent
= self
6533 redef fun visit_all
(v
: Visitor)
6535 v
.enter_visit
(_n_string
)
6536 v
.enter_visit
(_n_annotations
)
6539 redef class AStartStringExpr
6540 init init_astartstringexpr
(
6541 n_string
: nullable TStartString
6544 _n_string
= n_string
.as(not null)
6545 n_string
.parent
= self
6548 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6550 if _n_string
== old_child
then
6551 n_string
= new_child
.as(TStartString)
6556 redef fun n_string
=(node
)
6563 redef fun visit_all
(v
: Visitor)
6565 v
.enter_visit
(_n_string
)
6568 redef class AMidStringExpr
6569 init init_amidstringexpr
(
6570 n_string
: nullable TMidString
6573 _n_string
= n_string
.as(not null)
6574 n_string
.parent
= self
6577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6579 if _n_string
== old_child
then
6580 n_string
= new_child
.as(TMidString)
6585 redef fun n_string
=(node
)
6592 redef fun visit_all
(v
: Visitor)
6594 v
.enter_visit
(_n_string
)
6597 redef class AEndStringExpr
6598 init init_aendstringexpr
(
6599 n_string
: nullable TEndString
6602 _n_string
= n_string
.as(not null)
6603 n_string
.parent
= self
6606 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6608 if _n_string
== old_child
then
6609 n_string
= new_child
.as(TEndString)
6614 redef fun n_string
=(node
)
6621 redef fun visit_all
(v
: Visitor)
6623 v
.enter_visit
(_n_string
)
6626 redef class ASuperstringExpr
6627 init init_asuperstringexpr
(
6628 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6629 n_annotations
: nullable AAnnotations
6632 self.n_exprs
.unsafe_add_all
(n_exprs
)
6633 _n_annotations
= n_annotations
6634 if n_annotations
!= null then n_annotations
.parent
= self
6637 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6639 if n_exprs
.replace_child
(old_child
, new_child
) then return
6640 if _n_annotations
== old_child
then
6641 n_annotations
= new_child
.as(nullable AAnnotations)
6646 redef fun n_annotations
=(node
)
6648 _n_annotations
= node
6649 if node
!= null then node
.parent
= self
6653 redef fun visit_all
(v
: Visitor)
6655 n_exprs
.visit_all
(v
)
6656 v
.enter_visit
(_n_annotations
)
6659 redef class AParExpr
6660 init init_aparexpr
(
6661 n_opar
: nullable TOpar,
6662 n_expr
: nullable AExpr,
6663 n_cpar
: nullable TCpar,
6664 n_annotations
: nullable AAnnotations
6667 _n_opar
= n_opar
.as(not null)
6668 n_opar
.parent
= self
6669 _n_expr
= n_expr
.as(not null)
6670 n_expr
.parent
= self
6671 _n_cpar
= n_cpar
.as(not null)
6672 n_cpar
.parent
= self
6673 _n_annotations
= n_annotations
6674 if n_annotations
!= null then n_annotations
.parent
= self
6677 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6679 if _n_opar
== old_child
then
6680 n_opar
= new_child
.as(TOpar)
6683 if _n_expr
== old_child
then
6684 n_expr
= new_child
.as(AExpr)
6687 if _n_cpar
== old_child
then
6688 n_cpar
= new_child
.as(TCpar)
6691 if _n_annotations
== old_child
then
6692 n_annotations
= new_child
.as(nullable AAnnotations)
6697 redef fun n_opar
=(node
)
6702 redef fun n_expr
=(node
)
6707 redef fun n_cpar
=(node
)
6712 redef fun n_annotations
=(node
)
6714 _n_annotations
= node
6715 if node
!= null then node
.parent
= self
6719 redef fun visit_all
(v
: Visitor)
6721 v
.enter_visit
(_n_opar
)
6722 v
.enter_visit
(_n_expr
)
6723 v
.enter_visit
(_n_cpar
)
6724 v
.enter_visit
(_n_annotations
)
6727 redef class AAsCastExpr
6728 init init_aascastexpr
(
6729 n_expr
: nullable AExpr,
6730 n_kwas
: nullable TKwas,
6731 n_opar
: nullable TOpar,
6732 n_type
: nullable AType,
6733 n_cpar
: nullable TCpar
6736 _n_expr
= n_expr
.as(not null)
6737 n_expr
.parent
= self
6738 _n_kwas
= n_kwas
.as(not null)
6739 n_kwas
.parent
= self
6741 if n_opar
!= null then n_opar
.parent
= self
6742 _n_type
= n_type
.as(not null)
6743 n_type
.parent
= self
6745 if n_cpar
!= null then n_cpar
.parent
= self
6748 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6750 if _n_expr
== old_child
then
6751 n_expr
= new_child
.as(AExpr)
6754 if _n_kwas
== old_child
then
6755 n_kwas
= new_child
.as(TKwas)
6758 if _n_opar
== old_child
then
6759 n_opar
= new_child
.as(nullable TOpar)
6762 if _n_type
== old_child
then
6763 n_type
= new_child
.as(AType)
6766 if _n_cpar
== old_child
then
6767 n_cpar
= new_child
.as(nullable TCpar)
6772 redef fun n_expr
=(node
)
6777 redef fun n_kwas
=(node
)
6782 redef fun n_opar
=(node
)
6785 if node
!= null then node
.parent
= self
6787 redef fun n_type
=(node
)
6792 redef fun n_cpar
=(node
)
6795 if node
!= null then node
.parent
= self
6799 redef fun visit_all
(v
: Visitor)
6801 v
.enter_visit
(_n_expr
)
6802 v
.enter_visit
(_n_kwas
)
6803 v
.enter_visit
(_n_opar
)
6804 v
.enter_visit
(_n_type
)
6805 v
.enter_visit
(_n_cpar
)
6808 redef class AAsNotnullExpr
6809 init init_aasnotnullexpr
(
6810 n_expr
: nullable AExpr,
6811 n_kwas
: nullable TKwas,
6812 n_opar
: nullable TOpar,
6813 n_kwnot
: nullable TKwnot,
6814 n_kwnull
: nullable TKwnull,
6815 n_cpar
: nullable TCpar
6818 _n_expr
= n_expr
.as(not null)
6819 n_expr
.parent
= self
6820 _n_kwas
= n_kwas
.as(not null)
6821 n_kwas
.parent
= self
6823 if n_opar
!= null then n_opar
.parent
= self
6824 _n_kwnot
= n_kwnot
.as(not null)
6825 n_kwnot
.parent
= self
6826 _n_kwnull
= n_kwnull
.as(not null)
6827 n_kwnull
.parent
= self
6829 if n_cpar
!= null then n_cpar
.parent
= self
6832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6834 if _n_expr
== old_child
then
6835 n_expr
= new_child
.as(AExpr)
6838 if _n_kwas
== old_child
then
6839 n_kwas
= new_child
.as(TKwas)
6842 if _n_opar
== old_child
then
6843 n_opar
= new_child
.as(nullable TOpar)
6846 if _n_kwnot
== old_child
then
6847 n_kwnot
= new_child
.as(TKwnot)
6850 if _n_kwnull
== old_child
then
6851 n_kwnull
= new_child
.as(TKwnull)
6854 if _n_cpar
== old_child
then
6855 n_cpar
= new_child
.as(nullable TCpar)
6860 redef fun n_expr
=(node
)
6865 redef fun n_kwas
=(node
)
6870 redef fun n_opar
=(node
)
6873 if node
!= null then node
.parent
= self
6875 redef fun n_kwnot
=(node
)
6880 redef fun n_kwnull
=(node
)
6885 redef fun n_cpar
=(node
)
6888 if node
!= null then node
.parent
= self
6892 redef fun visit_all
(v
: Visitor)
6894 v
.enter_visit
(_n_expr
)
6895 v
.enter_visit
(_n_kwas
)
6896 v
.enter_visit
(_n_opar
)
6897 v
.enter_visit
(_n_kwnot
)
6898 v
.enter_visit
(_n_kwnull
)
6899 v
.enter_visit
(_n_cpar
)
6902 redef class AIssetAttrExpr
6903 init init_aissetattrexpr
(
6904 n_kwisset
: nullable TKwisset,
6905 n_expr
: nullable AExpr,
6906 n_id
: nullable TAttrid
6909 _n_kwisset
= n_kwisset
.as(not null)
6910 n_kwisset
.parent
= self
6911 _n_expr
= n_expr
.as(not null)
6912 n_expr
.parent
= self
6913 _n_id
= n_id
.as(not null)
6917 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6919 if _n_kwisset
== old_child
then
6920 n_kwisset
= new_child
.as(TKwisset)
6923 if _n_expr
== old_child
then
6924 n_expr
= new_child
.as(AExpr)
6927 if _n_id
== old_child
then
6928 n_id
= new_child
.as(TAttrid)
6933 redef fun n_kwisset
=(node
)
6938 redef fun n_expr
=(node
)
6943 redef fun n_id
=(node
)
6950 redef fun visit_all
(v
: Visitor)
6952 v
.enter_visit
(_n_kwisset
)
6953 v
.enter_visit
(_n_expr
)
6954 v
.enter_visit
(_n_id
)
6957 redef class ADebugTypeExpr
6958 init init_adebugtypeexpr
(
6959 n_kwdebug
: nullable TKwdebug,
6960 n_kwtype
: nullable TKwtype,
6961 n_expr
: nullable AExpr,
6962 n_type
: nullable AType
6965 _n_kwdebug
= n_kwdebug
.as(not null)
6966 n_kwdebug
.parent
= self
6967 _n_kwtype
= n_kwtype
.as(not null)
6968 n_kwtype
.parent
= self
6969 _n_expr
= n_expr
.as(not null)
6970 n_expr
.parent
= self
6971 _n_type
= n_type
.as(not null)
6972 n_type
.parent
= self
6975 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6977 if _n_kwdebug
== old_child
then
6978 n_kwdebug
= new_child
.as(TKwdebug)
6981 if _n_kwtype
== old_child
then
6982 n_kwtype
= new_child
.as(TKwtype)
6985 if _n_expr
== old_child
then
6986 n_expr
= new_child
.as(AExpr)
6989 if _n_type
== old_child
then
6990 n_type
= new_child
.as(AType)
6995 redef fun n_kwdebug
=(node
)
7000 redef fun n_kwtype
=(node
)
7005 redef fun n_expr
=(node
)
7010 redef fun n_type
=(node
)
7017 redef fun visit_all
(v
: Visitor)
7019 v
.enter_visit
(_n_kwdebug
)
7020 v
.enter_visit
(_n_kwtype
)
7021 v
.enter_visit
(_n_expr
)
7022 v
.enter_visit
(_n_type
)
7025 redef class AVarargExpr
7026 init init_avarargexpr
(
7027 n_expr
: nullable AExpr,
7028 n_dotdotdot
: nullable TDotdotdot
7031 _n_expr
= n_expr
.as(not null)
7032 n_expr
.parent
= self
7033 _n_dotdotdot
= n_dotdotdot
.as(not null)
7034 n_dotdotdot
.parent
= self
7037 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7039 if _n_expr
== old_child
then
7040 n_expr
= new_child
.as(AExpr)
7043 if _n_dotdotdot
== old_child
then
7044 n_dotdotdot
= new_child
.as(TDotdotdot)
7049 redef fun n_expr
=(node
)
7054 redef fun n_dotdotdot
=(node
)
7061 redef fun visit_all
(v
: Visitor)
7063 v
.enter_visit
(_n_expr
)
7064 v
.enter_visit
(_n_dotdotdot
)
7067 redef class ANamedargExpr
7068 init init_anamedargexpr
(
7070 n_assign
: nullable TAssign,
7071 n_expr
: nullable AExpr
7074 _n_id
= n_id
.as(not null)
7076 _n_assign
= n_assign
.as(not null)
7077 n_assign
.parent
= self
7078 _n_expr
= n_expr
.as(not null)
7079 n_expr
.parent
= self
7082 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7084 if _n_id
== old_child
then
7085 n_id
= new_child
.as(TId)
7088 if _n_assign
== old_child
then
7089 n_assign
= new_child
.as(TAssign)
7092 if _n_expr
== old_child
then
7093 n_expr
= new_child
.as(AExpr)
7098 redef fun n_id
=(node
)
7103 redef fun n_assign
=(node
)
7108 redef fun n_expr
=(node
)
7115 redef fun visit_all
(v
: Visitor)
7117 v
.enter_visit
(_n_id
)
7118 v
.enter_visit
(_n_assign
)
7119 v
.enter_visit
(_n_expr
)
7122 redef class ATypeExpr
7123 init init_atypeexpr
(
7124 n_type
: nullable AType
7127 _n_type
= n_type
.as(not null)
7128 n_type
.parent
= self
7131 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7133 if _n_type
== old_child
then
7134 n_type
= new_child
.as(AType)
7139 redef fun n_type
=(node
)
7146 redef fun visit_all
(v
: Visitor)
7148 v
.enter_visit
(_n_type
)
7151 redef class AMethidExpr
7152 init init_amethidexpr
(
7153 n_expr
: nullable AExpr,
7154 n_id
: nullable AMethid
7157 _n_expr
= n_expr
.as(not null)
7158 n_expr
.parent
= self
7159 _n_id
= n_id
.as(not null)
7163 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7165 if _n_expr
== old_child
then
7166 n_expr
= new_child
.as(AExpr)
7169 if _n_id
== old_child
then
7170 n_id
= new_child
.as(AMethid)
7175 redef fun n_expr
=(node
)
7180 redef fun n_id
=(node
)
7187 redef fun visit_all
(v
: Visitor)
7189 v
.enter_visit
(_n_expr
)
7190 v
.enter_visit
(_n_id
)
7195 n_annotations
: nullable AAnnotations
7198 _n_annotations
= n_annotations
.as(not null)
7199 n_annotations
.parent
= self
7202 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7204 if _n_annotations
== old_child
then
7205 n_annotations
= new_child
.as(AAnnotations)
7210 redef fun n_annotations
=(node
)
7212 _n_annotations
= node
7217 redef fun visit_all
(v
: Visitor)
7219 v
.enter_visit
(_n_annotations
)
7222 redef class AManyExpr
7223 init init_amanyexpr
(
7224 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7227 self.n_exprs
.unsafe_add_all
(n_exprs
)
7230 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7232 if n_exprs
.replace_child
(old_child
, new_child
) then return
7237 redef fun visit_all
(v
: Visitor)
7239 n_exprs
.visit_all
(v
)
7242 redef class AListExprs
7243 init init_alistexprs
(
7244 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7247 self.n_exprs
.unsafe_add_all
(n_exprs
)
7250 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7252 if n_exprs
.replace_child
(old_child
, new_child
) then return
7257 redef fun visit_all
(v
: Visitor)
7259 n_exprs
.visit_all
(v
)
7262 redef class AParExprs
7263 init init_aparexprs
(
7264 n_opar
: nullable TOpar,
7265 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7266 n_cpar
: nullable TCpar
7269 _n_opar
= n_opar
.as(not null)
7270 n_opar
.parent
= self
7271 self.n_exprs
.unsafe_add_all
(n_exprs
)
7272 _n_cpar
= n_cpar
.as(not null)
7273 n_cpar
.parent
= self
7276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7278 if _n_opar
== old_child
then
7279 n_opar
= new_child
.as(TOpar)
7282 if n_exprs
.replace_child
(old_child
, new_child
) then return
7283 if _n_cpar
== old_child
then
7284 n_cpar
= new_child
.as(TCpar)
7289 redef fun n_opar
=(node
)
7294 redef fun n_cpar
=(node
)
7301 redef fun visit_all
(v
: Visitor)
7303 v
.enter_visit
(_n_opar
)
7304 n_exprs
.visit_all
(v
)
7305 v
.enter_visit
(_n_cpar
)
7308 redef class ABraExprs
7309 init init_abraexprs
(
7310 n_obra
: nullable TObra,
7311 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7312 n_cbra
: nullable TCbra
7315 _n_obra
= n_obra
.as(not null)
7316 n_obra
.parent
= self
7317 self.n_exprs
.unsafe_add_all
(n_exprs
)
7318 _n_cbra
= n_cbra
.as(not null)
7319 n_cbra
.parent
= self
7322 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7324 if _n_obra
== old_child
then
7325 n_obra
= new_child
.as(TObra)
7328 if n_exprs
.replace_child
(old_child
, new_child
) then return
7329 if _n_cbra
== old_child
then
7330 n_cbra
= new_child
.as(TCbra)
7335 redef fun n_obra
=(node
)
7340 redef fun n_cbra
=(node
)
7347 redef fun visit_all
(v
: Visitor)
7349 v
.enter_visit
(_n_obra
)
7350 n_exprs
.visit_all
(v
)
7351 v
.enter_visit
(_n_cbra
)
7354 redef class APlusAssignOp
7355 init init_aplusassignop
(
7356 n_op
: nullable TPluseq
7359 _n_op
= n_op
.as(not null)
7363 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7365 if _n_op
== old_child
then
7366 n_op
= new_child
.as(TPluseq)
7371 redef fun n_op
=(node
)
7378 redef fun visit_all
(v
: Visitor)
7380 v
.enter_visit
(_n_op
)
7383 redef class AMinusAssignOp
7384 init init_aminusassignop
(
7385 n_op
: nullable TMinuseq
7388 _n_op
= n_op
.as(not null)
7392 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7394 if _n_op
== old_child
then
7395 n_op
= new_child
.as(TMinuseq)
7400 redef fun n_op
=(node
)
7407 redef fun visit_all
(v
: Visitor)
7409 v
.enter_visit
(_n_op
)
7412 redef class AStarAssignOp
7413 init init_astarassignop
(
7414 n_op
: nullable TStareq
7417 _n_op
= n_op
.as(not null)
7421 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7423 if _n_op
== old_child
then
7424 n_op
= new_child
.as(TStareq)
7429 redef fun n_op
=(node
)
7436 redef fun visit_all
(v
: Visitor)
7438 v
.enter_visit
(_n_op
)
7441 redef class ASlashAssignOp
7442 init init_aslashassignop
(
7443 n_op
: nullable TSlasheq
7446 _n_op
= n_op
.as(not null)
7450 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7452 if _n_op
== old_child
then
7453 n_op
= new_child
.as(TSlasheq)
7458 redef fun n_op
=(node
)
7465 redef fun visit_all
(v
: Visitor)
7467 v
.enter_visit
(_n_op
)
7470 redef class APercentAssignOp
7471 init init_apercentassignop
(
7472 n_op
: nullable TPercenteq
7475 _n_op
= n_op
.as(not null)
7479 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7481 if _n_op
== old_child
then
7482 n_op
= new_child
.as(TPercenteq)
7487 redef fun n_op
=(node
)
7494 redef fun visit_all
(v
: Visitor)
7496 v
.enter_visit
(_n_op
)
7499 redef class AStarstarAssignOp
7500 init init_astarstarassignop
(
7501 n_op
: nullable TStarstareq
7504 _n_op
= n_op
.as(not null)
7508 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7510 if _n_op
== old_child
then
7511 n_op
= new_child
.as(TStarstareq)
7516 redef fun n_op
=(node
)
7523 redef fun visit_all
(v
: Visitor)
7525 v
.enter_visit
(_n_op
)
7528 redef class APipeAssignOp
7529 init init_apipeassignop
(
7530 n_op
: nullable TPipeeq
7533 _n_op
= n_op
.as(not null)
7537 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7539 if _n_op
== old_child
then
7540 n_op
= new_child
.as(TPipeeq)
7545 redef fun n_op
=(node
)
7552 redef fun visit_all
(v
: Visitor)
7554 v
.enter_visit
(_n_op
)
7557 redef class ACaretAssignOp
7558 init init_acaretassignop
(
7559 n_op
: nullable TCareteq
7562 _n_op
= n_op
.as(not null)
7566 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7568 if _n_op
== old_child
then
7569 n_op
= new_child
.as(TCareteq)
7574 redef fun n_op
=(node
)
7581 redef fun visit_all
(v
: Visitor)
7583 v
.enter_visit
(_n_op
)
7586 redef class AAmpAssignOp
7587 init init_aampassignop
(
7588 n_op
: nullable TAmpeq
7591 _n_op
= n_op
.as(not null)
7595 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7597 if _n_op
== old_child
then
7598 n_op
= new_child
.as(TAmpeq)
7603 redef fun n_op
=(node
)
7610 redef fun visit_all
(v
: Visitor)
7612 v
.enter_visit
(_n_op
)
7615 redef class ALlAssignOp
7616 init init_allassignop
(
7617 n_op
: nullable TLleq
7620 _n_op
= n_op
.as(not null)
7624 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7626 if _n_op
== old_child
then
7627 n_op
= new_child
.as(TLleq)
7632 redef fun n_op
=(node
)
7639 redef fun visit_all
(v
: Visitor)
7641 v
.enter_visit
(_n_op
)
7644 redef class AGgAssignOp
7645 init init_aggassignop
(
7646 n_op
: nullable TGgeq
7649 _n_op
= n_op
.as(not null)
7653 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7655 if _n_op
== old_child
then
7656 n_op
= new_child
.as(TGgeq)
7661 redef fun n_op
=(node
)
7668 redef fun visit_all
(v
: Visitor)
7670 v
.enter_visit
(_n_op
)
7673 redef class AForGroup
7674 init init_aforgroup
(
7675 n_ids
: Collection[Object], # Should be Collection[TId]
7676 n_kwin
: nullable TKwin,
7677 n_expr
: nullable AExpr
7680 self.n_ids
.unsafe_add_all
(n_ids
)
7681 _n_kwin
= n_kwin
.as(not null)
7682 n_kwin
.parent
= self
7683 _n_expr
= n_expr
.as(not null)
7684 n_expr
.parent
= self
7687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7689 if n_ids
.replace_child
(old_child
, new_child
) then return
7690 if _n_kwin
== old_child
then
7691 n_kwin
= new_child
.as(TKwin)
7694 if _n_expr
== old_child
then
7695 n_expr
= new_child
.as(AExpr)
7700 redef fun n_kwin
=(node
)
7705 redef fun n_expr
=(node
)
7712 redef fun visit_all
(v
: Visitor)
7715 v
.enter_visit
(_n_kwin
)
7716 v
.enter_visit
(_n_expr
)
7719 redef class AModuleName
7720 init init_amodulename
(
7721 n_quad
: nullable TQuad,
7722 n_path
: Collection[Object], # Should be Collection[TId]
7727 if n_quad
!= null then n_quad
.parent
= self
7728 self.n_path
.unsafe_add_all
(n_path
)
7729 _n_id
= n_id
.as(not null)
7733 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7735 if _n_quad
== old_child
then
7736 n_quad
= new_child
.as(nullable TQuad)
7739 if n_path
.replace_child
(old_child
, new_child
) then return
7740 if _n_id
== old_child
then
7741 n_id
= new_child
.as(TId)
7746 redef fun n_quad
=(node
)
7749 if node
!= null then node
.parent
= self
7751 redef fun n_id
=(node
)
7758 redef fun visit_all
(v
: Visitor)
7760 v
.enter_visit
(_n_quad
)
7762 v
.enter_visit
(_n_id
)
7765 redef class AExternCalls
7766 init init_aexterncalls
(
7767 n_kwimport
: nullable TKwimport,
7768 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7771 _n_kwimport
= n_kwimport
.as(not null)
7772 n_kwimport
.parent
= self
7773 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7776 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7778 if _n_kwimport
== old_child
then
7779 n_kwimport
= new_child
.as(TKwimport)
7782 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7785 redef fun n_kwimport
=(node
)
7792 redef fun visit_all
(v
: Visitor)
7794 v
.enter_visit
(_n_kwimport
)
7795 n_extern_calls
.visit_all
(v
)
7798 redef class AExternCall
7799 init init_aexterncall
7803 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7809 redef fun visit_all
(v
: Visitor)
7813 redef class ASuperExternCall
7814 init init_asuperexterncall
(
7815 n_kwsuper
: nullable TKwsuper
7818 _n_kwsuper
= n_kwsuper
.as(not null)
7819 n_kwsuper
.parent
= self
7822 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7824 if _n_kwsuper
== old_child
then
7825 n_kwsuper
= new_child
.as(TKwsuper)
7830 redef fun n_kwsuper
=(node
)
7837 redef fun visit_all
(v
: Visitor)
7839 v
.enter_visit
(_n_kwsuper
)
7842 redef class ALocalPropExternCall
7843 init init_alocalpropexterncall
(
7844 n_methid
: nullable AMethid
7847 _n_methid
= n_methid
.as(not null)
7848 n_methid
.parent
= self
7851 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7853 if _n_methid
== old_child
then
7854 n_methid
= new_child
.as(AMethid)
7859 redef fun n_methid
=(node
)
7866 redef fun visit_all
(v
: Visitor)
7868 v
.enter_visit
(_n_methid
)
7871 redef class AFullPropExternCall
7872 init init_afullpropexterncall
(
7873 n_type
: nullable AType,
7874 n_dot
: nullable TDot,
7875 n_methid
: nullable AMethid
7878 _n_type
= n_type
.as(not null)
7879 n_type
.parent
= self
7881 if n_dot
!= null then n_dot
.parent
= self
7882 _n_methid
= n_methid
.as(not null)
7883 n_methid
.parent
= self
7886 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7888 if _n_type
== old_child
then
7889 n_type
= new_child
.as(AType)
7892 if _n_dot
== old_child
then
7893 n_dot
= new_child
.as(nullable TDot)
7896 if _n_methid
== old_child
then
7897 n_methid
= new_child
.as(AMethid)
7902 redef fun n_type
=(node
)
7907 redef fun n_dot
=(node
)
7910 if node
!= null then node
.parent
= self
7912 redef fun n_methid
=(node
)
7919 redef fun visit_all
(v
: Visitor)
7921 v
.enter_visit
(_n_type
)
7922 v
.enter_visit
(_n_dot
)
7923 v
.enter_visit
(_n_methid
)
7926 redef class AInitPropExternCall
7927 init init_ainitpropexterncall
(
7928 n_type
: nullable AType
7931 _n_type
= n_type
.as(not null)
7932 n_type
.parent
= self
7935 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7937 if _n_type
== old_child
then
7938 n_type
= new_child
.as(AType)
7943 redef fun n_type
=(node
)
7950 redef fun visit_all
(v
: Visitor)
7952 v
.enter_visit
(_n_type
)
7955 redef class ACastAsExternCall
7956 init init_acastasexterncall
(
7957 n_from_type
: nullable AType,
7958 n_dot
: nullable TDot,
7959 n_kwas
: nullable TKwas,
7960 n_to_type
: nullable AType
7963 _n_from_type
= n_from_type
.as(not null)
7964 n_from_type
.parent
= self
7966 if n_dot
!= null then n_dot
.parent
= self
7967 _n_kwas
= n_kwas
.as(not null)
7968 n_kwas
.parent
= self
7969 _n_to_type
= n_to_type
.as(not null)
7970 n_to_type
.parent
= self
7973 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7975 if _n_from_type
== old_child
then
7976 n_from_type
= new_child
.as(AType)
7979 if _n_dot
== old_child
then
7980 n_dot
= new_child
.as(nullable TDot)
7983 if _n_kwas
== old_child
then
7984 n_kwas
= new_child
.as(TKwas)
7987 if _n_to_type
== old_child
then
7988 n_to_type
= new_child
.as(AType)
7993 redef fun n_from_type
=(node
)
7998 redef fun n_dot
=(node
)
8001 if node
!= null then node
.parent
= self
8003 redef fun n_kwas
=(node
)
8008 redef fun n_to_type
=(node
)
8015 redef fun visit_all
(v
: Visitor)
8017 v
.enter_visit
(_n_from_type
)
8018 v
.enter_visit
(_n_dot
)
8019 v
.enter_visit
(_n_kwas
)
8020 v
.enter_visit
(_n_to_type
)
8023 redef class AAsNullableExternCall
8024 init init_aasnullableexterncall
(
8025 n_type
: nullable AType,
8026 n_kwas
: nullable TKwas,
8027 n_kwnullable
: nullable TKwnullable
8030 _n_type
= n_type
.as(not null)
8031 n_type
.parent
= self
8032 _n_kwas
= n_kwas
.as(not null)
8033 n_kwas
.parent
= self
8034 _n_kwnullable
= n_kwnullable
.as(not null)
8035 n_kwnullable
.parent
= self
8038 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8040 if _n_type
== old_child
then
8041 n_type
= new_child
.as(AType)
8044 if _n_kwas
== old_child
then
8045 n_kwas
= new_child
.as(TKwas)
8048 if _n_kwnullable
== old_child
then
8049 n_kwnullable
= new_child
.as(TKwnullable)
8054 redef fun n_type
=(node
)
8059 redef fun n_kwas
=(node
)
8064 redef fun n_kwnullable
=(node
)
8066 _n_kwnullable
= node
8071 redef fun visit_all
(v
: Visitor)
8073 v
.enter_visit
(_n_type
)
8074 v
.enter_visit
(_n_kwas
)
8075 v
.enter_visit
(_n_kwnullable
)
8078 redef class AAsNotNullableExternCall
8079 init init_aasnotnullableexterncall
(
8080 n_type
: nullable AType,
8081 n_kwas
: nullable TKwas,
8082 n_kwnot
: nullable TKwnot,
8083 n_kwnullable
: nullable TKwnullable
8086 _n_type
= n_type
.as(not null)
8087 n_type
.parent
= self
8088 _n_kwas
= n_kwas
.as(not null)
8089 n_kwas
.parent
= self
8090 _n_kwnot
= n_kwnot
.as(not null)
8091 n_kwnot
.parent
= self
8092 _n_kwnullable
= n_kwnullable
.as(not null)
8093 n_kwnullable
.parent
= self
8096 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8098 if _n_type
== old_child
then
8099 n_type
= new_child
.as(AType)
8102 if _n_kwas
== old_child
then
8103 n_kwas
= new_child
.as(TKwas)
8106 if _n_kwnot
== old_child
then
8107 n_kwnot
= new_child
.as(TKwnot)
8110 if _n_kwnullable
== old_child
then
8111 n_kwnullable
= new_child
.as(TKwnullable)
8116 redef fun n_type
=(node
)
8121 redef fun n_kwas
=(node
)
8126 redef fun n_kwnot
=(node
)
8131 redef fun n_kwnullable
=(node
)
8133 _n_kwnullable
= node
8138 redef fun visit_all
(v
: Visitor)
8140 v
.enter_visit
(_n_type
)
8141 v
.enter_visit
(_n_kwas
)
8142 v
.enter_visit
(_n_kwnot
)
8143 v
.enter_visit
(_n_kwnullable
)
8146 redef class AInLanguage
8147 init init_ainlanguage
(
8148 n_kwin
: nullable TKwin,
8149 n_string
: nullable TString
8152 _n_kwin
= n_kwin
.as(not null)
8153 n_kwin
.parent
= self
8154 _n_string
= n_string
.as(not null)
8155 n_string
.parent
= self
8158 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8160 if _n_kwin
== old_child
then
8161 n_kwin
= new_child
.as(TKwin)
8164 if _n_string
== old_child
then
8165 n_string
= new_child
.as(TString)
8170 redef fun n_kwin
=(node
)
8175 redef fun n_string
=(node
)
8182 redef fun visit_all
(v
: Visitor)
8184 v
.enter_visit
(_n_kwin
)
8185 v
.enter_visit
(_n_string
)
8188 redef class AExternCodeBlock
8189 init init_aexterncodeblock
(
8190 n_in_language
: nullable AInLanguage,
8191 n_extern_code_segment
: nullable TExternCodeSegment
8194 _n_in_language
= n_in_language
8195 if n_in_language
!= null then n_in_language
.parent
= self
8196 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8197 n_extern_code_segment
.parent
= self
8200 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8202 if _n_in_language
== old_child
then
8203 n_in_language
= new_child
.as(nullable AInLanguage)
8206 if _n_extern_code_segment
== old_child
then
8207 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8212 redef fun n_in_language
=(node
)
8214 _n_in_language
= node
8215 if node
!= null then node
.parent
= self
8217 redef fun n_extern_code_segment
=(node
)
8219 _n_extern_code_segment
= node
8224 redef fun visit_all
(v
: Visitor)
8226 v
.enter_visit
(_n_in_language
)
8227 v
.enter_visit
(_n_extern_code_segment
)
8230 redef class AQualified
8231 init init_aqualified
(
8232 n_id
: Collection[Object], # Should be Collection[TId]
8233 n_classid
: nullable TClassid
8236 self.n_id
.unsafe_add_all
(n_id
)
8237 _n_classid
= n_classid
8238 if n_classid
!= null then n_classid
.parent
= self
8241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8243 if n_id
.replace_child
(old_child
, new_child
) then return
8244 if _n_classid
== old_child
then
8245 n_classid
= new_child
.as(nullable TClassid)
8250 redef fun n_classid
=(node
)
8253 if node
!= null then node
.parent
= self
8257 redef fun visit_all
(v
: Visitor)
8260 v
.enter_visit
(_n_classid
)
8265 n_comment
: Collection[Object] # Should be Collection[TComment]
8268 self.n_comment
.unsafe_add_all
(n_comment
)
8271 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8273 if n_comment
.replace_child
(old_child
, new_child
) then return
8278 redef fun visit_all
(v
: Visitor)
8280 n_comment
.visit_all
(v
)
8283 redef class AAnnotations
8284 init init_aannotations
(
8285 n_kwis
: nullable TKwis,
8287 n_opar
: nullable TOpar,
8288 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8289 n_cpar
: nullable TCpar,
8290 n_kwend
: nullable TKwend
8294 if n_kwis
!= null then n_kwis
.parent
= self
8296 if n_at
!= null then n_at
.parent
= self
8298 if n_opar
!= null then n_opar
.parent
= self
8299 self.n_items
.unsafe_add_all
(n_items
)
8301 if n_cpar
!= null then n_cpar
.parent
= self
8303 if n_kwend
!= null then n_kwend
.parent
= self
8306 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8308 if _n_kwis
== old_child
then
8309 n_kwis
= new_child
.as(nullable TKwis)
8312 if _n_at
== old_child
then
8313 n_at
= new_child
.as(nullable TAt)
8316 if _n_opar
== old_child
then
8317 n_opar
= new_child
.as(nullable TOpar)
8320 if n_items
.replace_child
(old_child
, new_child
) then return
8321 if _n_cpar
== old_child
then
8322 n_cpar
= new_child
.as(nullable TCpar)
8325 if _n_kwend
== old_child
then
8326 n_kwend
= new_child
.as(nullable TKwend)
8331 redef fun n_kwis
=(node
)
8334 if node
!= null then node
.parent
= self
8336 redef fun n_at
=(node
)
8339 if node
!= null then node
.parent
= self
8341 redef fun n_opar
=(node
)
8344 if node
!= null then node
.parent
= self
8346 redef fun n_cpar
=(node
)
8349 if node
!= null then node
.parent
= self
8351 redef fun n_kwend
=(node
)
8354 if node
!= null then node
.parent
= self
8358 redef fun visit_all
(v
: Visitor)
8360 v
.enter_visit
(_n_kwis
)
8361 v
.enter_visit
(_n_at
)
8362 v
.enter_visit
(_n_opar
)
8363 n_items
.visit_all
(v
)
8364 v
.enter_visit
(_n_cpar
)
8365 v
.enter_visit
(_n_kwend
)
8368 redef class AAnnotation
8369 init init_aannotation
(
8370 n_doc
: nullable ADoc,
8371 n_kwredef
: nullable TKwredef,
8372 n_visibility
: nullable AVisibility,
8373 n_atid
: nullable AAtid,
8374 n_opar
: nullable TOpar,
8375 n_args
: Collection[Object], # Should be Collection[AExpr]
8376 n_cpar
: nullable TCpar,
8377 n_annotations
: nullable AAnnotations
8381 if n_doc
!= null then n_doc
.parent
= self
8382 _n_kwredef
= n_kwredef
8383 if n_kwredef
!= null then n_kwredef
.parent
= self
8384 _n_visibility
= n_visibility
8385 if n_visibility
!= null then n_visibility
.parent
= self
8386 _n_atid
= n_atid
.as(not null)
8387 n_atid
.parent
= self
8389 if n_opar
!= null then n_opar
.parent
= self
8390 self.n_args
.unsafe_add_all
(n_args
)
8392 if n_cpar
!= null then n_cpar
.parent
= self
8393 _n_annotations
= n_annotations
8394 if n_annotations
!= null then n_annotations
.parent
= self
8397 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8399 if _n_doc
== old_child
then
8400 n_doc
= new_child
.as(nullable ADoc)
8403 if _n_kwredef
== old_child
then
8404 n_kwredef
= new_child
.as(nullable TKwredef)
8407 if _n_visibility
== old_child
then
8408 n_visibility
= new_child
.as(nullable AVisibility)
8411 if _n_atid
== old_child
then
8412 n_atid
= new_child
.as(AAtid)
8415 if _n_opar
== old_child
then
8416 n_opar
= new_child
.as(nullable TOpar)
8419 if n_args
.replace_child
(old_child
, new_child
) then return
8420 if _n_cpar
== old_child
then
8421 n_cpar
= new_child
.as(nullable TCpar)
8424 if _n_annotations
== old_child
then
8425 n_annotations
= new_child
.as(nullable AAnnotations)
8430 redef fun n_doc
=(node
)
8433 if node
!= null then node
.parent
= self
8435 redef fun n_kwredef
=(node
)
8438 if node
!= null then node
.parent
= self
8440 redef fun n_visibility
=(node
)
8442 _n_visibility
= node
8443 if node
!= null then node
.parent
= self
8445 redef fun n_atid
=(node
)
8450 redef fun n_opar
=(node
)
8453 if node
!= null then node
.parent
= self
8455 redef fun n_cpar
=(node
)
8458 if node
!= null then node
.parent
= self
8460 redef fun n_annotations
=(node
)
8462 _n_annotations
= node
8463 if node
!= null then node
.parent
= self
8467 redef fun visit_all
(v
: Visitor)
8469 v
.enter_visit
(_n_doc
)
8470 v
.enter_visit
(_n_kwredef
)
8471 v
.enter_visit
(_n_visibility
)
8472 v
.enter_visit
(_n_atid
)
8473 v
.enter_visit
(_n_opar
)
8475 v
.enter_visit
(_n_cpar
)
8476 v
.enter_visit
(_n_annotations
)
8484 _n_id
= n_id
.as(not null)
8488 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8490 if _n_id
== old_child
then
8491 n_id
= new_child
.as(TId)
8496 redef fun n_id
=(node
)
8503 redef fun visit_all
(v
: Visitor)
8505 v
.enter_visit
(_n_id
)
8508 redef class AKwexternAtid
8509 init init_akwexternatid
(
8510 n_id
: nullable TKwextern
8513 _n_id
= n_id
.as(not null)
8517 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8519 if _n_id
== old_child
then
8520 n_id
= new_child
.as(TKwextern)
8525 redef fun n_id
=(node
)
8532 redef fun visit_all
(v
: Visitor)
8534 v
.enter_visit
(_n_id
)
8537 redef class AKwabstractAtid
8538 init init_akwabstractatid
(
8539 n_id
: nullable TKwabstract
8542 _n_id
= n_id
.as(not null)
8546 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8548 if _n_id
== old_child
then
8549 n_id
= new_child
.as(TKwabstract)
8554 redef fun n_id
=(node
)
8561 redef fun visit_all
(v
: Visitor)
8563 v
.enter_visit
(_n_id
)
8566 redef class AKwimportAtid
8567 init init_akwimportatid
(
8568 n_id
: nullable TKwimport
8571 _n_id
= n_id
.as(not null)
8575 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8577 if _n_id
== old_child
then
8578 n_id
= new_child
.as(TKwimport)
8583 redef fun n_id
=(node
)
8590 redef fun visit_all
(v
: Visitor)
8592 v
.enter_visit
(_n_id
)
8597 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8599 if _n_base
== old_child
then
8600 if new_child
== null then
8602 new_child
.parent
= self
8603 assert new_child
isa AModule
8606 old_child
.parent
= null
8611 redef fun visit_all
(v
: Visitor)
8613 if _n_base
!= null then
8614 v
.enter_visit
(_n_base
.as(not null))
8616 v
.enter_visit
(_n_eof
)