1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
is generated
, 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_qid
: nullable AQclassid,
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_qid
!= null then n_qid
.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_qid
== old_child
then
439 n_qid
= new_child
.as(nullable AQclassid)
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_qid
=(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
)
515 v
.enter_visit
(_n_qid
)
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_qid
: nullable AQclassid,
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_qid
= n_qid
.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_qid
== old_child
then
1050 n_qid
= new_child
.as(AQclassid)
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_qid
=(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_qid
)
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 AQclassid
2276 init init_aqclassid
(
2277 n_qualified
: nullable AQualified,
2278 n_id
: nullable TClassid
2281 _n_qualified
= n_qualified
2282 if n_qualified
!= null then n_qualified
.parent
= self
2283 _n_id
= n_id
.as(not null)
2287 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2289 if _n_qualified
== old_child
then
2290 n_qualified
= new_child
.as(nullable AQualified)
2293 if _n_id
== old_child
then
2294 n_id
= new_child
.as(TClassid)
2299 redef fun n_qualified
=(node
)
2302 if node
!= null then node
.parent
= self
2304 redef fun n_id
=(node
)
2311 redef fun visit_all
(v
: Visitor)
2313 v
.enter_visit
(_n_qualified
)
2314 v
.enter_visit
(_n_id
)
2317 redef class ASignature
2318 init init_asignature
(
2319 n_opar
: nullable TOpar,
2320 n_params
: Collection[Object], # Should be Collection[AParam]
2321 n_cpar
: nullable TCpar,
2322 n_type
: nullable AType
2326 if n_opar
!= null then n_opar
.parent
= self
2327 self.n_params
.unsafe_add_all
(n_params
)
2329 if n_cpar
!= null then n_cpar
.parent
= self
2331 if n_type
!= null then n_type
.parent
= self
2334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2336 if _n_opar
== old_child
then
2337 n_opar
= new_child
.as(nullable TOpar)
2340 if n_params
.replace_child
(old_child
, new_child
) then return
2341 if _n_cpar
== old_child
then
2342 n_cpar
= new_child
.as(nullable TCpar)
2345 if _n_type
== old_child
then
2346 n_type
= new_child
.as(nullable AType)
2351 redef fun n_opar
=(node
)
2354 if node
!= null then node
.parent
= self
2356 redef fun n_cpar
=(node
)
2359 if node
!= null then node
.parent
= self
2361 redef fun n_type
=(node
)
2364 if node
!= null then node
.parent
= self
2368 redef fun visit_all
(v
: Visitor)
2370 v
.enter_visit
(_n_opar
)
2371 n_params
.visit_all
(v
)
2372 v
.enter_visit
(_n_cpar
)
2373 v
.enter_visit
(_n_type
)
2379 n_type
: nullable AType,
2380 n_dotdotdot
: nullable TDotdotdot,
2381 n_annotations
: nullable AAnnotations
2384 _n_id
= n_id
.as(not null)
2387 if n_type
!= null then n_type
.parent
= self
2388 _n_dotdotdot
= n_dotdotdot
2389 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2390 _n_annotations
= n_annotations
2391 if n_annotations
!= null then n_annotations
.parent
= self
2394 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2396 if _n_id
== old_child
then
2397 n_id
= new_child
.as(TId)
2400 if _n_type
== old_child
then
2401 n_type
= new_child
.as(nullable AType)
2404 if _n_dotdotdot
== old_child
then
2405 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2408 if _n_annotations
== old_child
then
2409 n_annotations
= new_child
.as(nullable AAnnotations)
2414 redef fun n_id
=(node
)
2419 redef fun n_type
=(node
)
2422 if node
!= null then node
.parent
= self
2424 redef fun n_dotdotdot
=(node
)
2427 if node
!= null then node
.parent
= self
2429 redef fun n_annotations
=(node
)
2431 _n_annotations
= node
2432 if node
!= null then node
.parent
= self
2436 redef fun visit_all
(v
: Visitor)
2438 v
.enter_visit
(_n_id
)
2439 v
.enter_visit
(_n_type
)
2440 v
.enter_visit
(_n_dotdotdot
)
2441 v
.enter_visit
(_n_annotations
)
2446 n_kwnullable
: nullable TKwnullable,
2447 n_qid
: nullable AQclassid,
2448 n_obra
: nullable TObra,
2449 n_types
: Collection[Object], # Should be Collection[AType]
2450 n_cbra
: nullable TCbra,
2451 n_annotations
: nullable AAnnotations
2454 _n_kwnullable
= n_kwnullable
2455 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2456 _n_qid
= n_qid
.as(not null)
2459 if n_obra
!= null then n_obra
.parent
= self
2460 self.n_types
.unsafe_add_all
(n_types
)
2462 if n_cbra
!= null then n_cbra
.parent
= self
2463 _n_annotations
= n_annotations
2464 if n_annotations
!= null then n_annotations
.parent
= self
2467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2469 if _n_kwnullable
== old_child
then
2470 n_kwnullable
= new_child
.as(nullable TKwnullable)
2473 if _n_qid
== old_child
then
2474 n_qid
= new_child
.as(AQclassid)
2477 if _n_obra
== old_child
then
2478 n_obra
= new_child
.as(nullable TObra)
2481 if n_types
.replace_child
(old_child
, new_child
) then return
2482 if _n_cbra
== old_child
then
2483 n_cbra
= new_child
.as(nullable TCbra)
2486 if _n_annotations
== old_child
then
2487 n_annotations
= new_child
.as(nullable AAnnotations)
2492 redef fun n_kwnullable
=(node
)
2494 _n_kwnullable
= node
2495 if node
!= null then node
.parent
= self
2497 redef fun n_qid
=(node
)
2502 redef fun n_obra
=(node
)
2505 if node
!= null then node
.parent
= self
2507 redef fun n_cbra
=(node
)
2510 if node
!= null then node
.parent
= self
2512 redef fun n_annotations
=(node
)
2514 _n_annotations
= node
2515 if node
!= null then node
.parent
= self
2519 redef fun visit_all
(v
: Visitor)
2521 v
.enter_visit
(_n_kwnullable
)
2522 v
.enter_visit
(_n_qid
)
2523 v
.enter_visit
(_n_obra
)
2524 n_types
.visit_all
(v
)
2525 v
.enter_visit
(_n_cbra
)
2526 v
.enter_visit
(_n_annotations
)
2531 n_kwlabel
: nullable TKwlabel,
2535 _n_kwlabel
= n_kwlabel
.as(not null)
2536 n_kwlabel
.parent
= self
2538 if n_id
!= null then n_id
.parent
= self
2541 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2543 if _n_kwlabel
== old_child
then
2544 n_kwlabel
= new_child
.as(TKwlabel)
2547 if _n_id
== old_child
then
2548 n_id
= new_child
.as(nullable TId)
2553 redef fun n_kwlabel
=(node
)
2558 redef fun n_id
=(node
)
2561 if node
!= null then node
.parent
= self
2565 redef fun visit_all
(v
: Visitor)
2567 v
.enter_visit
(_n_kwlabel
)
2568 v
.enter_visit
(_n_id
)
2571 redef class ABlockExpr
2572 init init_ablockexpr
(
2573 n_expr
: Collection[Object], # Should be Collection[AExpr]
2574 n_kwend
: nullable TKwend
2577 self.n_expr
.unsafe_add_all
(n_expr
)
2579 if n_kwend
!= null then n_kwend
.parent
= self
2582 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2584 if n_expr
.replace_child
(old_child
, new_child
) then return
2585 if _n_kwend
== old_child
then
2586 n_kwend
= new_child
.as(nullable TKwend)
2591 redef fun n_kwend
=(node
)
2594 if node
!= null then node
.parent
= self
2598 redef fun visit_all
(v
: Visitor)
2601 v
.enter_visit
(_n_kwend
)
2604 redef class AVardeclExpr
2605 init init_avardeclexpr
(
2606 n_kwvar
: nullable TKwvar,
2608 n_type
: nullable AType,
2609 n_assign
: nullable TAssign,
2610 n_expr
: nullable AExpr,
2611 n_annotations
: nullable AAnnotations
2615 if n_kwvar
!= null then n_kwvar
.parent
= self
2616 _n_id
= n_id
.as(not null)
2619 if n_type
!= null then n_type
.parent
= self
2620 _n_assign
= n_assign
2621 if n_assign
!= null then n_assign
.parent
= self
2623 if n_expr
!= null then n_expr
.parent
= self
2624 _n_annotations
= n_annotations
2625 if n_annotations
!= null then n_annotations
.parent
= self
2628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2630 if _n_kwvar
== old_child
then
2631 n_kwvar
= new_child
.as(nullable TKwvar)
2634 if _n_id
== old_child
then
2635 n_id
= new_child
.as(TId)
2638 if _n_type
== old_child
then
2639 n_type
= new_child
.as(nullable AType)
2642 if _n_assign
== old_child
then
2643 n_assign
= new_child
.as(nullable TAssign)
2646 if _n_expr
== old_child
then
2647 n_expr
= new_child
.as(nullable AExpr)
2650 if _n_annotations
== old_child
then
2651 n_annotations
= new_child
.as(nullable AAnnotations)
2656 redef fun n_kwvar
=(node
)
2659 if node
!= null then node
.parent
= self
2661 redef fun n_id
=(node
)
2666 redef fun n_type
=(node
)
2669 if node
!= null then node
.parent
= self
2671 redef fun n_assign
=(node
)
2674 if node
!= null then node
.parent
= self
2676 redef fun n_expr
=(node
)
2679 if node
!= null then node
.parent
= self
2681 redef fun n_annotations
=(node
)
2683 _n_annotations
= node
2684 if node
!= null then node
.parent
= self
2688 redef fun visit_all
(v
: Visitor)
2690 v
.enter_visit
(_n_kwvar
)
2691 v
.enter_visit
(_n_id
)
2692 v
.enter_visit
(_n_type
)
2693 v
.enter_visit
(_n_assign
)
2694 v
.enter_visit
(_n_expr
)
2695 v
.enter_visit
(_n_annotations
)
2698 redef class AReturnExpr
2699 init init_areturnexpr
(
2700 n_kwreturn
: nullable TKwreturn,
2701 n_expr
: nullable AExpr
2704 _n_kwreturn
= n_kwreturn
2705 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2707 if n_expr
!= null then n_expr
.parent
= self
2710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2712 if _n_kwreturn
== old_child
then
2713 n_kwreturn
= new_child
.as(nullable TKwreturn)
2716 if _n_expr
== old_child
then
2717 n_expr
= new_child
.as(nullable AExpr)
2722 redef fun n_kwreturn
=(node
)
2725 if node
!= null then node
.parent
= self
2727 redef fun n_expr
=(node
)
2730 if node
!= null then node
.parent
= self
2734 redef fun visit_all
(v
: Visitor)
2736 v
.enter_visit
(_n_kwreturn
)
2737 v
.enter_visit
(_n_expr
)
2740 redef class AYieldExpr
2741 init init_ayieldexpr
(
2742 n_kwyield
: nullable TKwyield,
2743 n_expr
: nullable AExpr
2746 _n_kwyield
= n_kwyield
.as(not null)
2747 n_kwyield
.parent
= self
2748 _n_expr
= n_expr
.as(not null)
2749 n_expr
.parent
= self
2752 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2754 if _n_kwyield
== old_child
then
2755 n_kwyield
= new_child
.as(TKwyield)
2758 if _n_expr
== old_child
then
2759 n_expr
= new_child
.as(AExpr)
2764 redef fun n_kwyield
=(node
)
2769 redef fun n_expr
=(node
)
2776 redef fun visit_all
(v
: Visitor)
2778 v
.enter_visit
(_n_kwyield
)
2779 v
.enter_visit
(_n_expr
)
2782 redef class ABreakExpr
2783 init init_abreakexpr
(
2784 n_kwbreak
: nullable TKwbreak,
2785 n_label
: nullable ALabel
2788 _n_kwbreak
= n_kwbreak
.as(not null)
2789 n_kwbreak
.parent
= self
2791 if n_label
!= null then n_label
.parent
= self
2794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2796 if _n_kwbreak
== old_child
then
2797 n_kwbreak
= new_child
.as(TKwbreak)
2800 if _n_label
== old_child
then
2801 n_label
= new_child
.as(nullable ALabel)
2806 redef fun n_kwbreak
=(node
)
2811 redef fun n_label
=(node
)
2814 if node
!= null then node
.parent
= self
2818 redef fun visit_all
(v
: Visitor)
2820 v
.enter_visit
(_n_kwbreak
)
2821 v
.enter_visit
(_n_label
)
2824 redef class AAbortExpr
2825 init init_aabortexpr
(
2826 n_kwabort
: nullable TKwabort
2829 _n_kwabort
= n_kwabort
.as(not null)
2830 n_kwabort
.parent
= self
2833 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2835 if _n_kwabort
== old_child
then
2836 n_kwabort
= new_child
.as(TKwabort)
2841 redef fun n_kwabort
=(node
)
2848 redef fun visit_all
(v
: Visitor)
2850 v
.enter_visit
(_n_kwabort
)
2853 redef class AContinueExpr
2854 init init_acontinueexpr
(
2855 n_kwcontinue
: nullable TKwcontinue,
2856 n_label
: nullable ALabel
2859 _n_kwcontinue
= n_kwcontinue
2860 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2862 if n_label
!= null then n_label
.parent
= self
2865 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2867 if _n_kwcontinue
== old_child
then
2868 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2871 if _n_label
== old_child
then
2872 n_label
= new_child
.as(nullable ALabel)
2877 redef fun n_kwcontinue
=(node
)
2879 _n_kwcontinue
= node
2880 if node
!= null then node
.parent
= self
2882 redef fun n_label
=(node
)
2885 if node
!= null then node
.parent
= self
2889 redef fun visit_all
(v
: Visitor)
2891 v
.enter_visit
(_n_kwcontinue
)
2892 v
.enter_visit
(_n_label
)
2897 n_kwdo
: nullable TKwdo,
2898 n_block
: nullable AExpr,
2899 n_kwcatch
: nullable TKwcatch,
2900 n_catch
: nullable AExpr,
2901 n_label
: nullable ALabel
2904 _n_kwdo
= n_kwdo
.as(not null)
2905 n_kwdo
.parent
= self
2907 if n_block
!= null then n_block
.parent
= self
2908 _n_kwcatch
= n_kwcatch
2909 if n_kwcatch
!= null then n_kwcatch
.parent
= self
2911 if n_catch
!= null then n_catch
.parent
= self
2913 if n_label
!= null then n_label
.parent
= self
2916 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2918 if _n_kwdo
== old_child
then
2919 n_kwdo
= new_child
.as(TKwdo)
2922 if _n_block
== old_child
then
2923 n_block
= new_child
.as(nullable AExpr)
2926 if _n_kwcatch
== old_child
then
2927 n_kwcatch
= new_child
.as(nullable TKwcatch)
2930 if _n_catch
== old_child
then
2931 n_catch
= new_child
.as(nullable AExpr)
2934 if _n_label
== old_child
then
2935 n_label
= new_child
.as(nullable ALabel)
2940 redef fun n_kwdo
=(node
)
2945 redef fun n_block
=(node
)
2948 if node
!= null then node
.parent
= self
2950 redef fun n_kwcatch
=(node
)
2953 if node
!= null then node
.parent
= self
2955 redef fun n_catch
=(node
)
2958 if node
!= null then node
.parent
= self
2960 redef fun n_label
=(node
)
2963 if node
!= null then node
.parent
= self
2967 redef fun visit_all
(v
: Visitor)
2969 v
.enter_visit
(_n_kwdo
)
2970 v
.enter_visit
(_n_block
)
2971 v
.enter_visit
(_n_kwcatch
)
2972 v
.enter_visit
(_n_catch
)
2973 v
.enter_visit
(_n_label
)
2978 n_kwif
: nullable TKwif,
2979 n_expr
: nullable AExpr,
2980 n_kwthen
: nullable TKwthen,
2981 n_then
: nullable AExpr,
2982 n_kwelse
: nullable TKwelse,
2983 n_else
: nullable AExpr
2986 _n_kwif
= n_kwif
.as(not null)
2987 n_kwif
.parent
= self
2988 _n_expr
= n_expr
.as(not null)
2989 n_expr
.parent
= self
2990 _n_kwthen
= n_kwthen
.as(not null)
2991 n_kwthen
.parent
= self
2993 if n_then
!= null then n_then
.parent
= self
2994 _n_kwelse
= n_kwelse
2995 if n_kwelse
!= null then n_kwelse
.parent
= self
2997 if n_else
!= null then n_else
.parent
= self
3000 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3002 if _n_kwif
== old_child
then
3003 n_kwif
= new_child
.as(TKwif)
3006 if _n_expr
== old_child
then
3007 n_expr
= new_child
.as(AExpr)
3010 if _n_kwthen
== old_child
then
3011 n_kwthen
= new_child
.as(TKwthen)
3014 if _n_then
== old_child
then
3015 n_then
= new_child
.as(nullable AExpr)
3018 if _n_kwelse
== old_child
then
3019 n_kwelse
= new_child
.as(nullable TKwelse)
3022 if _n_else
== old_child
then
3023 n_else
= new_child
.as(nullable AExpr)
3028 redef fun n_kwif
=(node
)
3033 redef fun n_expr
=(node
)
3038 redef fun n_kwthen
=(node
)
3043 redef fun n_then
=(node
)
3046 if node
!= null then node
.parent
= self
3048 redef fun n_kwelse
=(node
)
3051 if node
!= null then node
.parent
= self
3053 redef fun n_else
=(node
)
3056 if node
!= null then node
.parent
= self
3060 redef fun visit_all
(v
: Visitor)
3062 v
.enter_visit
(_n_kwif
)
3063 v
.enter_visit
(_n_expr
)
3064 v
.enter_visit
(_n_kwthen
)
3065 v
.enter_visit
(_n_then
)
3066 v
.enter_visit
(_n_kwelse
)
3067 v
.enter_visit
(_n_else
)
3070 redef class AIfexprExpr
3071 init init_aifexprexpr
(
3072 n_kwif
: nullable TKwif,
3073 n_expr
: nullable AExpr,
3074 n_kwthen
: nullable TKwthen,
3075 n_then
: nullable AExpr,
3076 n_kwelse
: nullable TKwelse,
3077 n_else
: nullable AExpr
3080 _n_kwif
= n_kwif
.as(not null)
3081 n_kwif
.parent
= self
3082 _n_expr
= n_expr
.as(not null)
3083 n_expr
.parent
= self
3084 _n_kwthen
= n_kwthen
.as(not null)
3085 n_kwthen
.parent
= self
3086 _n_then
= n_then
.as(not null)
3087 n_then
.parent
= self
3088 _n_kwelse
= n_kwelse
.as(not null)
3089 n_kwelse
.parent
= self
3090 _n_else
= n_else
.as(not null)
3091 n_else
.parent
= self
3094 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3096 if _n_kwif
== old_child
then
3097 n_kwif
= new_child
.as(TKwif)
3100 if _n_expr
== old_child
then
3101 n_expr
= new_child
.as(AExpr)
3104 if _n_kwthen
== old_child
then
3105 n_kwthen
= new_child
.as(TKwthen)
3108 if _n_then
== old_child
then
3109 n_then
= new_child
.as(AExpr)
3112 if _n_kwelse
== old_child
then
3113 n_kwelse
= new_child
.as(TKwelse)
3116 if _n_else
== old_child
then
3117 n_else
= new_child
.as(AExpr)
3122 redef fun n_kwif
=(node
)
3127 redef fun n_expr
=(node
)
3132 redef fun n_kwthen
=(node
)
3137 redef fun n_then
=(node
)
3142 redef fun n_kwelse
=(node
)
3147 redef fun n_else
=(node
)
3154 redef fun visit_all
(v
: Visitor)
3156 v
.enter_visit
(_n_kwif
)
3157 v
.enter_visit
(_n_expr
)
3158 v
.enter_visit
(_n_kwthen
)
3159 v
.enter_visit
(_n_then
)
3160 v
.enter_visit
(_n_kwelse
)
3161 v
.enter_visit
(_n_else
)
3164 redef class AWhileExpr
3165 init init_awhileexpr
(
3166 n_kwwhile
: nullable TKwwhile,
3167 n_expr
: nullable AExpr,
3168 n_kwdo
: nullable TKwdo,
3169 n_block
: nullable AExpr,
3170 n_label
: nullable ALabel
3173 _n_kwwhile
= n_kwwhile
.as(not null)
3174 n_kwwhile
.parent
= self
3175 _n_expr
= n_expr
.as(not null)
3176 n_expr
.parent
= self
3177 _n_kwdo
= n_kwdo
.as(not null)
3178 n_kwdo
.parent
= self
3180 if n_block
!= null then n_block
.parent
= self
3182 if n_label
!= null then n_label
.parent
= self
3185 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3187 if _n_kwwhile
== old_child
then
3188 n_kwwhile
= new_child
.as(TKwwhile)
3191 if _n_expr
== old_child
then
3192 n_expr
= new_child
.as(AExpr)
3195 if _n_kwdo
== old_child
then
3196 n_kwdo
= new_child
.as(TKwdo)
3199 if _n_block
== old_child
then
3200 n_block
= new_child
.as(nullable AExpr)
3203 if _n_label
== old_child
then
3204 n_label
= new_child
.as(nullable ALabel)
3209 redef fun n_kwwhile
=(node
)
3214 redef fun n_expr
=(node
)
3219 redef fun n_kwdo
=(node
)
3224 redef fun n_block
=(node
)
3227 if node
!= null then node
.parent
= self
3229 redef fun n_label
=(node
)
3232 if node
!= null then node
.parent
= self
3236 redef fun visit_all
(v
: Visitor)
3238 v
.enter_visit
(_n_kwwhile
)
3239 v
.enter_visit
(_n_expr
)
3240 v
.enter_visit
(_n_kwdo
)
3241 v
.enter_visit
(_n_block
)
3242 v
.enter_visit
(_n_label
)
3245 redef class ALoopExpr
3246 init init_aloopexpr
(
3247 n_kwloop
: nullable TKwloop,
3248 n_block
: nullable AExpr,
3249 n_label
: nullable ALabel
3252 _n_kwloop
= n_kwloop
.as(not null)
3253 n_kwloop
.parent
= self
3255 if n_block
!= null then n_block
.parent
= self
3257 if n_label
!= null then n_label
.parent
= self
3260 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3262 if _n_kwloop
== old_child
then
3263 n_kwloop
= new_child
.as(TKwloop)
3266 if _n_block
== old_child
then
3267 n_block
= new_child
.as(nullable AExpr)
3270 if _n_label
== old_child
then
3271 n_label
= new_child
.as(nullable ALabel)
3276 redef fun n_kwloop
=(node
)
3281 redef fun n_block
=(node
)
3284 if node
!= null then node
.parent
= self
3286 redef fun n_label
=(node
)
3289 if node
!= null then node
.parent
= self
3293 redef fun visit_all
(v
: Visitor)
3295 v
.enter_visit
(_n_kwloop
)
3296 v
.enter_visit
(_n_block
)
3297 v
.enter_visit
(_n_label
)
3300 redef class AForExpr
3301 init init_aforexpr
(
3302 n_kwfor
: nullable TKwfor,
3303 n_groups
: Collection[Object], # Should be Collection[AForGroup]
3304 n_kwdo
: nullable TKwdo,
3305 n_block
: nullable AExpr,
3306 n_label
: nullable ALabel
3309 _n_kwfor
= n_kwfor
.as(not null)
3310 n_kwfor
.parent
= self
3311 self.n_groups
.unsafe_add_all
(n_groups
)
3312 _n_kwdo
= n_kwdo
.as(not null)
3313 n_kwdo
.parent
= self
3315 if n_block
!= null then n_block
.parent
= self
3317 if n_label
!= null then n_label
.parent
= self
3320 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3322 if _n_kwfor
== old_child
then
3323 n_kwfor
= new_child
.as(TKwfor)
3326 if n_groups
.replace_child
(old_child
, new_child
) then return
3327 if _n_kwdo
== old_child
then
3328 n_kwdo
= new_child
.as(TKwdo)
3331 if _n_block
== old_child
then
3332 n_block
= new_child
.as(nullable AExpr)
3335 if _n_label
== old_child
then
3336 n_label
= new_child
.as(nullable ALabel)
3341 redef fun n_kwfor
=(node
)
3346 redef fun n_kwdo
=(node
)
3351 redef fun n_block
=(node
)
3354 if node
!= null then node
.parent
= self
3356 redef fun n_label
=(node
)
3359 if node
!= null then node
.parent
= self
3363 redef fun visit_all
(v
: Visitor)
3365 v
.enter_visit
(_n_kwfor
)
3366 n_groups
.visit_all
(v
)
3367 v
.enter_visit
(_n_kwdo
)
3368 v
.enter_visit
(_n_block
)
3369 v
.enter_visit
(_n_label
)
3372 redef class AWithExpr
3373 init init_awithexpr
(
3374 n_kwwith
: nullable TKwwith,
3375 n_expr
: nullable AExpr,
3376 n_kwdo
: nullable TKwdo,
3377 n_block
: nullable AExpr,
3378 n_label
: nullable ALabel
3381 _n_kwwith
= n_kwwith
.as(not null)
3382 n_kwwith
.parent
= self
3383 _n_expr
= n_expr
.as(not null)
3384 n_expr
.parent
= self
3385 _n_kwdo
= n_kwdo
.as(not null)
3386 n_kwdo
.parent
= self
3388 if n_block
!= null then n_block
.parent
= self
3390 if n_label
!= null then n_label
.parent
= self
3393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3395 if _n_kwwith
== old_child
then
3396 n_kwwith
= new_child
.as(TKwwith)
3399 if _n_expr
== old_child
then
3400 n_expr
= new_child
.as(AExpr)
3403 if _n_kwdo
== old_child
then
3404 n_kwdo
= new_child
.as(TKwdo)
3407 if _n_block
== old_child
then
3408 n_block
= new_child
.as(nullable AExpr)
3411 if _n_label
== old_child
then
3412 n_label
= new_child
.as(nullable ALabel)
3417 redef fun n_kwwith
=(node
)
3422 redef fun n_expr
=(node
)
3427 redef fun n_kwdo
=(node
)
3432 redef fun n_block
=(node
)
3435 if node
!= null then node
.parent
= self
3437 redef fun n_label
=(node
)
3440 if node
!= null then node
.parent
= self
3444 redef fun visit_all
(v
: Visitor)
3446 v
.enter_visit
(_n_kwwith
)
3447 v
.enter_visit
(_n_expr
)
3448 v
.enter_visit
(_n_kwdo
)
3449 v
.enter_visit
(_n_block
)
3450 v
.enter_visit
(_n_label
)
3453 redef class AAssertExpr
3454 init init_aassertexpr
(
3455 n_kwassert
: nullable TKwassert,
3457 n_expr
: nullable AExpr,
3458 n_kwelse
: nullable TKwelse,
3459 n_else
: nullable AExpr
3462 _n_kwassert
= n_kwassert
.as(not null)
3463 n_kwassert
.parent
= self
3465 if n_id
!= null then n_id
.parent
= self
3466 _n_expr
= n_expr
.as(not null)
3467 n_expr
.parent
= self
3468 _n_kwelse
= n_kwelse
3469 if n_kwelse
!= null then n_kwelse
.parent
= self
3471 if n_else
!= null then n_else
.parent
= self
3474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3476 if _n_kwassert
== old_child
then
3477 n_kwassert
= new_child
.as(TKwassert)
3480 if _n_id
== old_child
then
3481 n_id
= new_child
.as(nullable TId)
3484 if _n_expr
== old_child
then
3485 n_expr
= new_child
.as(AExpr)
3488 if _n_kwelse
== old_child
then
3489 n_kwelse
= new_child
.as(nullable TKwelse)
3492 if _n_else
== old_child
then
3493 n_else
= new_child
.as(nullable AExpr)
3498 redef fun n_kwassert
=(node
)
3503 redef fun n_id
=(node
)
3506 if node
!= null then node
.parent
= self
3508 redef fun n_expr
=(node
)
3513 redef fun n_kwelse
=(node
)
3516 if node
!= null then node
.parent
= self
3518 redef fun n_else
=(node
)
3521 if node
!= null then node
.parent
= self
3525 redef fun visit_all
(v
: Visitor)
3527 v
.enter_visit
(_n_kwassert
)
3528 v
.enter_visit
(_n_id
)
3529 v
.enter_visit
(_n_expr
)
3530 v
.enter_visit
(_n_kwelse
)
3531 v
.enter_visit
(_n_else
)
3534 redef class AOnceExpr
3535 init init_aonceexpr
(
3536 n_kwonce
: nullable TKwonce,
3537 n_expr
: nullable AExpr
3540 _n_kwonce
= n_kwonce
.as(not null)
3541 n_kwonce
.parent
= self
3542 _n_expr
= n_expr
.as(not null)
3543 n_expr
.parent
= self
3546 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3548 if _n_kwonce
== old_child
then
3549 n_kwonce
= new_child
.as(TKwonce)
3552 if _n_expr
== old_child
then
3553 n_expr
= new_child
.as(AExpr)
3558 redef fun n_kwonce
=(node
)
3563 redef fun n_expr
=(node
)
3570 redef fun visit_all
(v
: Visitor)
3572 v
.enter_visit
(_n_kwonce
)
3573 v
.enter_visit
(_n_expr
)
3576 redef class ASendExpr
3577 init init_asendexpr
(
3578 n_expr
: nullable AExpr
3581 _n_expr
= n_expr
.as(not null)
3582 n_expr
.parent
= self
3585 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3587 if _n_expr
== old_child
then
3588 n_expr
= new_child
.as(AExpr)
3593 redef fun n_expr
=(node
)
3600 redef fun visit_all
(v
: Visitor)
3602 v
.enter_visit
(_n_expr
)
3605 redef class ABinopExpr
3606 init init_abinopexpr
(
3607 n_expr
: nullable AExpr,
3608 n_expr2
: nullable AExpr
3611 _n_expr
= n_expr
.as(not null)
3612 n_expr
.parent
= self
3613 _n_expr2
= n_expr2
.as(not null)
3614 n_expr2
.parent
= self
3617 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3619 if _n_expr
== old_child
then
3620 n_expr
= new_child
.as(AExpr)
3623 if _n_expr2
== old_child
then
3624 n_expr2
= new_child
.as(AExpr)
3629 redef fun n_expr
=(node
)
3634 redef fun n_expr2
=(node
)
3641 redef fun visit_all
(v
: Visitor)
3643 v
.enter_visit
(_n_expr
)
3644 v
.enter_visit
(_n_expr2
)
3649 n_expr
: nullable AExpr,
3650 n_op
: nullable TKwor,
3651 n_expr2
: nullable AExpr
3654 _n_expr
= n_expr
.as(not null)
3655 n_expr
.parent
= self
3656 _n_op
= n_op
.as(not null)
3658 _n_expr2
= n_expr2
.as(not null)
3659 n_expr2
.parent
= self
3662 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3664 if _n_expr
== old_child
then
3665 n_expr
= new_child
.as(AExpr)
3668 if _n_op
== old_child
then
3669 n_op
= new_child
.as(TKwor)
3672 if _n_expr2
== old_child
then
3673 n_expr2
= new_child
.as(AExpr)
3678 redef fun n_expr
=(node
)
3683 redef fun n_op
=(node
)
3688 redef fun n_expr2
=(node
)
3695 redef fun visit_all
(v
: Visitor)
3697 v
.enter_visit
(_n_expr
)
3698 v
.enter_visit
(_n_op
)
3699 v
.enter_visit
(_n_expr2
)
3702 redef class AAndExpr
3703 init init_aandexpr
(
3704 n_expr
: nullable AExpr,
3705 n_op
: nullable TKwand,
3706 n_expr2
: nullable AExpr
3709 _n_expr
= n_expr
.as(not null)
3710 n_expr
.parent
= self
3711 _n_op
= n_op
.as(not null)
3713 _n_expr2
= n_expr2
.as(not null)
3714 n_expr2
.parent
= self
3717 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3719 if _n_expr
== old_child
then
3720 n_expr
= new_child
.as(AExpr)
3723 if _n_op
== old_child
then
3724 n_op
= new_child
.as(TKwand)
3727 if _n_expr2
== old_child
then
3728 n_expr2
= new_child
.as(AExpr)
3733 redef fun n_expr
=(node
)
3738 redef fun n_op
=(node
)
3743 redef fun n_expr2
=(node
)
3750 redef fun visit_all
(v
: Visitor)
3752 v
.enter_visit
(_n_expr
)
3753 v
.enter_visit
(_n_op
)
3754 v
.enter_visit
(_n_expr2
)
3757 redef class AOrElseExpr
3758 init init_aorelseexpr
(
3759 n_expr
: nullable AExpr,
3760 n_op
: nullable TKwor,
3761 n_kwelse
: nullable TKwelse,
3762 n_expr2
: nullable AExpr
3765 _n_expr
= n_expr
.as(not null)
3766 n_expr
.parent
= self
3767 _n_op
= n_op
.as(not null)
3769 _n_kwelse
= n_kwelse
.as(not null)
3770 n_kwelse
.parent
= self
3771 _n_expr2
= n_expr2
.as(not null)
3772 n_expr2
.parent
= self
3775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3777 if _n_expr
== old_child
then
3778 n_expr
= new_child
.as(AExpr)
3781 if _n_op
== old_child
then
3782 n_op
= new_child
.as(TKwor)
3785 if _n_kwelse
== old_child
then
3786 n_kwelse
= new_child
.as(TKwelse)
3789 if _n_expr2
== old_child
then
3790 n_expr2
= new_child
.as(AExpr)
3795 redef fun n_expr
=(node
)
3800 redef fun n_op
=(node
)
3805 redef fun n_kwelse
=(node
)
3810 redef fun n_expr2
=(node
)
3817 redef fun visit_all
(v
: Visitor)
3819 v
.enter_visit
(_n_expr
)
3820 v
.enter_visit
(_n_op
)
3821 v
.enter_visit
(_n_kwelse
)
3822 v
.enter_visit
(_n_expr2
)
3825 redef class AImpliesExpr
3826 init init_aimpliesexpr
(
3827 n_expr
: nullable AExpr,
3828 n_op
: nullable TKwimplies,
3829 n_expr2
: nullable AExpr
3832 _n_expr
= n_expr
.as(not null)
3833 n_expr
.parent
= self
3834 _n_op
= n_op
.as(not null)
3836 _n_expr2
= n_expr2
.as(not null)
3837 n_expr2
.parent
= self
3840 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3842 if _n_expr
== old_child
then
3843 n_expr
= new_child
.as(AExpr)
3846 if _n_op
== old_child
then
3847 n_op
= new_child
.as(TKwimplies)
3850 if _n_expr2
== old_child
then
3851 n_expr2
= new_child
.as(AExpr)
3856 redef fun n_expr
=(node
)
3861 redef fun n_op
=(node
)
3866 redef fun n_expr2
=(node
)
3873 redef fun visit_all
(v
: Visitor)
3875 v
.enter_visit
(_n_expr
)
3876 v
.enter_visit
(_n_op
)
3877 v
.enter_visit
(_n_expr2
)
3880 redef class ANotExpr
3881 init init_anotexpr
(
3882 n_kwnot
: nullable TKwnot,
3883 n_expr
: nullable AExpr
3886 _n_kwnot
= n_kwnot
.as(not null)
3887 n_kwnot
.parent
= self
3888 _n_expr
= n_expr
.as(not null)
3889 n_expr
.parent
= self
3892 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3894 if _n_kwnot
== old_child
then
3895 n_kwnot
= new_child
.as(TKwnot)
3898 if _n_expr
== old_child
then
3899 n_expr
= new_child
.as(AExpr)
3904 redef fun n_kwnot
=(node
)
3909 redef fun n_expr
=(node
)
3916 redef fun visit_all
(v
: Visitor)
3918 v
.enter_visit
(_n_kwnot
)
3919 v
.enter_visit
(_n_expr
)
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(TEq)
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(TNe)
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(TLt)
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(TLe)
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(TLl)
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(TGt)
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
)
4254 n_expr
: nullable AExpr,
4256 n_expr2
: nullable AExpr
4259 _n_expr
= n_expr
.as(not null)
4260 n_expr
.parent
= self
4261 _n_op
= n_op
.as(not null)
4263 _n_expr2
= n_expr2
.as(not null)
4264 n_expr2
.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_op
== old_child
then
4274 n_op
= new_child
.as(TGe)
4277 if _n_expr2
== old_child
then
4278 n_expr2
= new_child
.as(AExpr)
4283 redef fun n_expr
=(node
)
4288 redef fun n_op
=(node
)
4293 redef fun n_expr2
=(node
)
4300 redef fun visit_all
(v
: Visitor)
4302 v
.enter_visit
(_n_expr
)
4303 v
.enter_visit
(_n_op
)
4304 v
.enter_visit
(_n_expr2
)
4309 n_expr
: nullable AExpr,
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(TGg)
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 AIsaExpr
4363 init init_aisaexpr
(
4364 n_expr
: nullable AExpr,
4365 n_kwisa
: nullable TKwisa,
4366 n_type
: nullable AType
4369 _n_expr
= n_expr
.as(not null)
4370 n_expr
.parent
= self
4371 _n_kwisa
= n_kwisa
.as(not null)
4372 n_kwisa
.parent
= self
4373 _n_type
= n_type
.as(not null)
4374 n_type
.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_kwisa
== old_child
then
4384 n_kwisa
= new_child
.as(TKwisa)
4387 if _n_type
== old_child
then
4388 n_type
= new_child
.as(AType)
4393 redef fun n_expr
=(node
)
4398 redef fun n_kwisa
=(node
)
4403 redef fun n_type
=(node
)
4410 redef fun visit_all
(v
: Visitor)
4412 v
.enter_visit
(_n_expr
)
4413 v
.enter_visit
(_n_kwisa
)
4414 v
.enter_visit
(_n_type
)
4417 redef class APlusExpr
4418 init init_aplusexpr
(
4419 n_expr
: nullable AExpr,
4420 n_op
: nullable TPlus,
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(TPlus)
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 AMinusExpr
4473 init init_aminusexpr
(
4474 n_expr
: nullable AExpr,
4475 n_op
: nullable TMinus,
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(TMinus)
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 AStarshipExpr
4528 init init_astarshipexpr
(
4529 n_expr
: nullable AExpr,
4530 n_op
: nullable TStarship,
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(TStarship)
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 AStarExpr
4583 init init_astarexpr
(
4584 n_expr
: nullable AExpr,
4585 n_op
: nullable TStar,
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(TStar)
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 AStarstarExpr
4638 init init_astarstarexpr
(
4639 n_expr
: nullable AExpr,
4640 n_op
: nullable TStarstar,
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(TStarstar)
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 ASlashExpr
4693 init init_aslashexpr
(
4694 n_expr
: nullable AExpr,
4695 n_op
: nullable TSlash,
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(TSlash)
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 APercentExpr
4748 init init_apercentexpr
(
4749 n_expr
: nullable AExpr,
4750 n_op
: nullable TPercent,
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(TPercent)
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 APipeExpr
4803 init init_apipeexpr
(
4804 n_expr
: nullable AExpr,
4805 n_op
: nullable TPipe,
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(TPipe)
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 ACaretExpr
4858 init init_acaretexpr
(
4859 n_expr
: nullable AExpr,
4860 n_op
: nullable TCaret,
4861 n_expr2
: nullable AExpr
4864 _n_expr
= n_expr
.as(not null)
4865 n_expr
.parent
= self
4866 _n_op
= n_op
.as(not null)
4868 _n_expr2
= n_expr2
.as(not null)
4869 n_expr2
.parent
= self
4872 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4874 if _n_expr
== old_child
then
4875 n_expr
= new_child
.as(AExpr)
4878 if _n_op
== old_child
then
4879 n_op
= new_child
.as(TCaret)
4882 if _n_expr2
== old_child
then
4883 n_expr2
= new_child
.as(AExpr)
4888 redef fun n_expr
=(node
)
4893 redef fun n_op
=(node
)
4898 redef fun n_expr2
=(node
)
4905 redef fun visit_all
(v
: Visitor)
4907 v
.enter_visit
(_n_expr
)
4908 v
.enter_visit
(_n_op
)
4909 v
.enter_visit
(_n_expr2
)
4912 redef class AAmpExpr
4913 init init_aampexpr
(
4914 n_expr
: nullable AExpr,
4915 n_op
: nullable TAmp,
4916 n_expr2
: nullable AExpr
4919 _n_expr
= n_expr
.as(not null)
4920 n_expr
.parent
= self
4921 _n_op
= n_op
.as(not null)
4923 _n_expr2
= n_expr2
.as(not null)
4924 n_expr2
.parent
= self
4927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4929 if _n_expr
== old_child
then
4930 n_expr
= new_child
.as(AExpr)
4933 if _n_op
== old_child
then
4934 n_op
= new_child
.as(TAmp)
4937 if _n_expr2
== old_child
then
4938 n_expr2
= new_child
.as(AExpr)
4943 redef fun n_expr
=(node
)
4948 redef fun n_op
=(node
)
4953 redef fun n_expr2
=(node
)
4960 redef fun visit_all
(v
: Visitor)
4962 v
.enter_visit
(_n_expr
)
4963 v
.enter_visit
(_n_op
)
4964 v
.enter_visit
(_n_expr2
)
4967 redef class AUminusExpr
4968 init init_auminusexpr
(
4969 n_op
: nullable TMinus,
4970 n_expr
: nullable AExpr
4973 _n_op
= n_op
.as(not null)
4975 _n_expr
= n_expr
.as(not null)
4976 n_expr
.parent
= self
4979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4981 if _n_op
== old_child
then
4982 n_op
= new_child
.as(TMinus)
4985 if _n_expr
== old_child
then
4986 n_expr
= new_child
.as(AExpr)
4991 redef fun n_op
=(node
)
4996 redef fun n_expr
=(node
)
5003 redef fun visit_all
(v
: Visitor)
5005 v
.enter_visit
(_n_op
)
5006 v
.enter_visit
(_n_expr
)
5009 redef class AUplusExpr
5010 init init_auplusexpr
(
5011 n_op
: nullable TPlus,
5012 n_expr
: nullable AExpr
5015 _n_op
= n_op
.as(not null)
5017 _n_expr
= n_expr
.as(not null)
5018 n_expr
.parent
= self
5021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5023 if _n_op
== old_child
then
5024 n_op
= new_child
.as(TPlus)
5027 if _n_expr
== old_child
then
5028 n_expr
= new_child
.as(AExpr)
5033 redef fun n_op
=(node
)
5038 redef fun n_expr
=(node
)
5045 redef fun visit_all
(v
: Visitor)
5047 v
.enter_visit
(_n_op
)
5048 v
.enter_visit
(_n_expr
)
5051 redef class AUtildeExpr
5052 init init_autildeexpr
(
5053 n_op
: nullable TTilde,
5054 n_expr
: nullable AExpr
5057 _n_op
= n_op
.as(not null)
5059 _n_expr
= n_expr
.as(not null)
5060 n_expr
.parent
= self
5063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5065 if _n_op
== old_child
then
5066 n_op
= new_child
.as(TTilde)
5069 if _n_expr
== old_child
then
5070 n_expr
= new_child
.as(AExpr)
5075 redef fun n_op
=(node
)
5080 redef fun n_expr
=(node
)
5087 redef fun visit_all
(v
: Visitor)
5089 v
.enter_visit
(_n_op
)
5090 v
.enter_visit
(_n_expr
)
5093 redef class ANewExpr
5094 init init_anewexpr
(
5095 n_kwnew
: nullable TKwnew,
5096 n_type
: nullable AType,
5097 n_qid
: nullable AQid,
5098 n_args
: nullable AExprs
5101 _n_kwnew
= n_kwnew
.as(not null)
5102 n_kwnew
.parent
= self
5103 _n_type
= n_type
.as(not null)
5104 n_type
.parent
= self
5106 if n_qid
!= null then n_qid
.parent
= self
5107 _n_args
= n_args
.as(not null)
5108 n_args
.parent
= self
5111 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5113 if _n_kwnew
== old_child
then
5114 n_kwnew
= new_child
.as(TKwnew)
5117 if _n_type
== old_child
then
5118 n_type
= new_child
.as(AType)
5121 if _n_qid
== old_child
then
5122 n_qid
= new_child
.as(nullable AQid)
5125 if _n_args
== old_child
then
5126 n_args
= new_child
.as(AExprs)
5131 redef fun n_kwnew
=(node
)
5136 redef fun n_type
=(node
)
5141 redef fun n_qid
=(node
)
5144 if node
!= null then node
.parent
= self
5146 redef fun n_args
=(node
)
5153 redef fun visit_all
(v
: Visitor)
5155 v
.enter_visit
(_n_kwnew
)
5156 v
.enter_visit
(_n_type
)
5157 v
.enter_visit
(_n_qid
)
5158 v
.enter_visit
(_n_args
)
5161 redef class AAttrExpr
5162 init init_aattrexpr
(
5163 n_expr
: nullable AExpr,
5164 n_id
: nullable TAttrid
5167 _n_expr
= n_expr
.as(not null)
5168 n_expr
.parent
= self
5169 _n_id
= n_id
.as(not null)
5173 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5175 if _n_expr
== old_child
then
5176 n_expr
= new_child
.as(AExpr)
5179 if _n_id
== old_child
then
5180 n_id
= new_child
.as(TAttrid)
5185 redef fun n_expr
=(node
)
5190 redef fun n_id
=(node
)
5197 redef fun visit_all
(v
: Visitor)
5199 v
.enter_visit
(_n_expr
)
5200 v
.enter_visit
(_n_id
)
5203 redef class AAttrAssignExpr
5204 init init_aattrassignexpr
(
5205 n_expr
: nullable AExpr,
5206 n_id
: nullable TAttrid,
5207 n_assign
: nullable TAssign,
5208 n_value
: nullable AExpr
5211 _n_expr
= n_expr
.as(not null)
5212 n_expr
.parent
= self
5213 _n_id
= n_id
.as(not null)
5215 _n_assign
= n_assign
.as(not null)
5216 n_assign
.parent
= self
5217 _n_value
= n_value
.as(not null)
5218 n_value
.parent
= self
5221 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5223 if _n_expr
== old_child
then
5224 n_expr
= new_child
.as(AExpr)
5227 if _n_id
== old_child
then
5228 n_id
= new_child
.as(TAttrid)
5231 if _n_assign
== old_child
then
5232 n_assign
= new_child
.as(TAssign)
5235 if _n_value
== old_child
then
5236 n_value
= new_child
.as(AExpr)
5241 redef fun n_expr
=(node
)
5246 redef fun n_id
=(node
)
5251 redef fun n_assign
=(node
)
5256 redef fun n_value
=(node
)
5263 redef fun visit_all
(v
: Visitor)
5265 v
.enter_visit
(_n_expr
)
5266 v
.enter_visit
(_n_id
)
5267 v
.enter_visit
(_n_assign
)
5268 v
.enter_visit
(_n_value
)
5271 redef class AAttrReassignExpr
5272 init init_aattrreassignexpr
(
5273 n_expr
: nullable AExpr,
5274 n_id
: nullable TAttrid,
5275 n_assign_op
: nullable AAssignOp,
5276 n_value
: nullable AExpr
5279 _n_expr
= n_expr
.as(not null)
5280 n_expr
.parent
= self
5281 _n_id
= n_id
.as(not null)
5283 _n_assign_op
= n_assign_op
.as(not null)
5284 n_assign_op
.parent
= self
5285 _n_value
= n_value
.as(not null)
5286 n_value
.parent
= self
5289 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5291 if _n_expr
== old_child
then
5292 n_expr
= new_child
.as(AExpr)
5295 if _n_id
== old_child
then
5296 n_id
= new_child
.as(TAttrid)
5299 if _n_assign_op
== old_child
then
5300 n_assign_op
= new_child
.as(AAssignOp)
5303 if _n_value
== old_child
then
5304 n_value
= new_child
.as(AExpr)
5309 redef fun n_expr
=(node
)
5314 redef fun n_id
=(node
)
5319 redef fun n_assign_op
=(node
)
5324 redef fun n_value
=(node
)
5331 redef fun visit_all
(v
: Visitor)
5333 v
.enter_visit
(_n_expr
)
5334 v
.enter_visit
(_n_id
)
5335 v
.enter_visit
(_n_assign_op
)
5336 v
.enter_visit
(_n_value
)
5339 redef class ACallExpr
5340 init init_acallexpr
(
5341 n_expr
: nullable AExpr,
5342 n_qid
: nullable AQid,
5343 n_args
: nullable AExprs
5346 _n_expr
= n_expr
.as(not null)
5347 n_expr
.parent
= self
5348 _n_qid
= n_qid
.as(not null)
5350 _n_args
= n_args
.as(not null)
5351 n_args
.parent
= self
5354 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5356 if _n_expr
== old_child
then
5357 n_expr
= new_child
.as(AExpr)
5360 if _n_qid
== old_child
then
5361 n_qid
= new_child
.as(AQid)
5364 if _n_args
== old_child
then
5365 n_args
= new_child
.as(AExprs)
5370 redef fun n_expr
=(node
)
5375 redef fun n_qid
=(node
)
5380 redef fun n_args
=(node
)
5387 redef fun visit_all
(v
: Visitor)
5389 v
.enter_visit
(_n_expr
)
5390 v
.enter_visit
(_n_qid
)
5391 v
.enter_visit
(_n_args
)
5394 redef class ACallAssignExpr
5395 init init_acallassignexpr
(
5396 n_expr
: nullable AExpr,
5397 n_qid
: nullable AQid,
5398 n_args
: nullable AExprs,
5399 n_assign
: nullable TAssign,
5400 n_value
: nullable AExpr
5403 _n_expr
= n_expr
.as(not null)
5404 n_expr
.parent
= self
5405 _n_qid
= n_qid
.as(not null)
5407 _n_args
= n_args
.as(not null)
5408 n_args
.parent
= self
5409 _n_assign
= n_assign
.as(not null)
5410 n_assign
.parent
= self
5411 _n_value
= n_value
.as(not null)
5412 n_value
.parent
= self
5415 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5417 if _n_expr
== old_child
then
5418 n_expr
= new_child
.as(AExpr)
5421 if _n_qid
== old_child
then
5422 n_qid
= new_child
.as(AQid)
5425 if _n_args
== old_child
then
5426 n_args
= new_child
.as(AExprs)
5429 if _n_assign
== old_child
then
5430 n_assign
= new_child
.as(TAssign)
5433 if _n_value
== old_child
then
5434 n_value
= new_child
.as(AExpr)
5439 redef fun n_expr
=(node
)
5444 redef fun n_qid
=(node
)
5449 redef fun n_args
=(node
)
5454 redef fun n_assign
=(node
)
5459 redef fun n_value
=(node
)
5466 redef fun visit_all
(v
: Visitor)
5468 v
.enter_visit
(_n_expr
)
5469 v
.enter_visit
(_n_qid
)
5470 v
.enter_visit
(_n_args
)
5471 v
.enter_visit
(_n_assign
)
5472 v
.enter_visit
(_n_value
)
5475 redef class ACallReassignExpr
5476 init init_acallreassignexpr
(
5477 n_expr
: nullable AExpr,
5478 n_qid
: nullable AQid,
5479 n_args
: nullable AExprs,
5480 n_assign_op
: nullable AAssignOp,
5481 n_value
: nullable AExpr
5484 _n_expr
= n_expr
.as(not null)
5485 n_expr
.parent
= self
5486 _n_qid
= n_qid
.as(not null)
5488 _n_args
= n_args
.as(not null)
5489 n_args
.parent
= self
5490 _n_assign_op
= n_assign_op
.as(not null)
5491 n_assign_op
.parent
= self
5492 _n_value
= n_value
.as(not null)
5493 n_value
.parent
= self
5496 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5498 if _n_expr
== old_child
then
5499 n_expr
= new_child
.as(AExpr)
5502 if _n_qid
== old_child
then
5503 n_qid
= new_child
.as(AQid)
5506 if _n_args
== old_child
then
5507 n_args
= new_child
.as(AExprs)
5510 if _n_assign_op
== old_child
then
5511 n_assign_op
= new_child
.as(AAssignOp)
5514 if _n_value
== old_child
then
5515 n_value
= new_child
.as(AExpr)
5520 redef fun n_expr
=(node
)
5525 redef fun n_qid
=(node
)
5530 redef fun n_args
=(node
)
5535 redef fun n_assign_op
=(node
)
5540 redef fun n_value
=(node
)
5547 redef fun visit_all
(v
: Visitor)
5549 v
.enter_visit
(_n_expr
)
5550 v
.enter_visit
(_n_qid
)
5551 v
.enter_visit
(_n_args
)
5552 v
.enter_visit
(_n_assign_op
)
5553 v
.enter_visit
(_n_value
)
5556 redef class ASuperExpr
5557 init init_asuperexpr
(
5558 n_qualified
: nullable AQualified,
5559 n_kwsuper
: nullable TKwsuper,
5560 n_args
: nullable AExprs
5563 _n_qualified
= n_qualified
5564 if n_qualified
!= null then n_qualified
.parent
= self
5565 _n_kwsuper
= n_kwsuper
.as(not null)
5566 n_kwsuper
.parent
= self
5567 _n_args
= n_args
.as(not null)
5568 n_args
.parent
= self
5571 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5573 if _n_qualified
== old_child
then
5574 n_qualified
= new_child
.as(nullable AQualified)
5577 if _n_kwsuper
== old_child
then
5578 n_kwsuper
= new_child
.as(TKwsuper)
5581 if _n_args
== old_child
then
5582 n_args
= new_child
.as(AExprs)
5587 redef fun n_qualified
=(node
)
5590 if node
!= null then node
.parent
= self
5592 redef fun n_kwsuper
=(node
)
5597 redef fun n_args
=(node
)
5604 redef fun visit_all
(v
: Visitor)
5606 v
.enter_visit
(_n_qualified
)
5607 v
.enter_visit
(_n_kwsuper
)
5608 v
.enter_visit
(_n_args
)
5611 redef class AInitExpr
5612 init init_ainitexpr
(
5613 n_expr
: nullable AExpr,
5614 n_kwinit
: nullable TKwinit,
5615 n_args
: nullable AExprs
5618 _n_expr
= n_expr
.as(not null)
5619 n_expr
.parent
= self
5620 _n_kwinit
= n_kwinit
.as(not null)
5621 n_kwinit
.parent
= self
5622 _n_args
= n_args
.as(not null)
5623 n_args
.parent
= self
5626 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5628 if _n_expr
== old_child
then
5629 n_expr
= new_child
.as(AExpr)
5632 if _n_kwinit
== old_child
then
5633 n_kwinit
= new_child
.as(TKwinit)
5636 if _n_args
== old_child
then
5637 n_args
= new_child
.as(AExprs)
5642 redef fun n_expr
=(node
)
5647 redef fun n_kwinit
=(node
)
5652 redef fun n_args
=(node
)
5659 redef fun visit_all
(v
: Visitor)
5661 v
.enter_visit
(_n_expr
)
5662 v
.enter_visit
(_n_kwinit
)
5663 v
.enter_visit
(_n_args
)
5666 redef class ABraExpr
5667 init init_abraexpr
(
5668 n_expr
: nullable AExpr,
5669 n_args
: nullable AExprs
5672 _n_expr
= n_expr
.as(not null)
5673 n_expr
.parent
= self
5674 _n_args
= n_args
.as(not null)
5675 n_args
.parent
= self
5678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5680 if _n_expr
== old_child
then
5681 n_expr
= new_child
.as(AExpr)
5684 if _n_args
== old_child
then
5685 n_args
= new_child
.as(AExprs)
5690 redef fun n_expr
=(node
)
5695 redef fun n_args
=(node
)
5702 redef fun visit_all
(v
: Visitor)
5704 v
.enter_visit
(_n_expr
)
5705 v
.enter_visit
(_n_args
)
5708 redef class ABraAssignExpr
5709 init init_abraassignexpr
(
5710 n_expr
: nullable AExpr,
5711 n_args
: nullable AExprs,
5712 n_assign
: nullable TAssign,
5713 n_value
: nullable AExpr
5716 _n_expr
= n_expr
.as(not null)
5717 n_expr
.parent
= self
5718 _n_args
= n_args
.as(not null)
5719 n_args
.parent
= self
5720 _n_assign
= n_assign
.as(not null)
5721 n_assign
.parent
= self
5722 _n_value
= n_value
.as(not null)
5723 n_value
.parent
= self
5726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5728 if _n_expr
== old_child
then
5729 n_expr
= new_child
.as(AExpr)
5732 if _n_args
== old_child
then
5733 n_args
= new_child
.as(AExprs)
5736 if _n_assign
== old_child
then
5737 n_assign
= new_child
.as(TAssign)
5740 if _n_value
== old_child
then
5741 n_value
= new_child
.as(AExpr)
5746 redef fun n_expr
=(node
)
5751 redef fun n_args
=(node
)
5756 redef fun n_assign
=(node
)
5761 redef fun n_value
=(node
)
5768 redef fun visit_all
(v
: Visitor)
5770 v
.enter_visit
(_n_expr
)
5771 v
.enter_visit
(_n_args
)
5772 v
.enter_visit
(_n_assign
)
5773 v
.enter_visit
(_n_value
)
5776 redef class ABraReassignExpr
5777 init init_abrareassignexpr
(
5778 n_expr
: nullable AExpr,
5779 n_args
: nullable AExprs,
5780 n_assign_op
: nullable AAssignOp,
5781 n_value
: nullable AExpr
5784 _n_expr
= n_expr
.as(not null)
5785 n_expr
.parent
= self
5786 _n_args
= n_args
.as(not null)
5787 n_args
.parent
= self
5788 _n_assign_op
= n_assign_op
.as(not null)
5789 n_assign_op
.parent
= self
5790 _n_value
= n_value
.as(not null)
5791 n_value
.parent
= self
5794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5796 if _n_expr
== old_child
then
5797 n_expr
= new_child
.as(AExpr)
5800 if _n_args
== old_child
then
5801 n_args
= new_child
.as(AExprs)
5804 if _n_assign_op
== old_child
then
5805 n_assign_op
= new_child
.as(AAssignOp)
5808 if _n_value
== old_child
then
5809 n_value
= new_child
.as(AExpr)
5814 redef fun n_expr
=(node
)
5819 redef fun n_args
=(node
)
5824 redef fun n_assign_op
=(node
)
5829 redef fun n_value
=(node
)
5836 redef fun visit_all
(v
: Visitor)
5838 v
.enter_visit
(_n_expr
)
5839 v
.enter_visit
(_n_args
)
5840 v
.enter_visit
(_n_assign_op
)
5841 v
.enter_visit
(_n_value
)
5844 redef class AVarExpr
5845 init init_avarexpr
(
5849 _n_id
= n_id
.as(not null)
5853 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5855 if _n_id
== old_child
then
5856 n_id
= new_child
.as(TId)
5861 redef fun n_id
=(node
)
5868 redef fun visit_all
(v
: Visitor)
5870 v
.enter_visit
(_n_id
)
5873 redef class AVarAssignExpr
5874 init init_avarassignexpr
(
5876 n_assign
: nullable TAssign,
5877 n_value
: nullable AExpr
5880 _n_id
= n_id
.as(not null)
5882 _n_assign
= n_assign
.as(not null)
5883 n_assign
.parent
= self
5884 _n_value
= n_value
.as(not null)
5885 n_value
.parent
= self
5888 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5890 if _n_id
== old_child
then
5891 n_id
= new_child
.as(TId)
5894 if _n_assign
== old_child
then
5895 n_assign
= new_child
.as(TAssign)
5898 if _n_value
== old_child
then
5899 n_value
= new_child
.as(AExpr)
5904 redef fun n_id
=(node
)
5909 redef fun n_assign
=(node
)
5914 redef fun n_value
=(node
)
5921 redef fun visit_all
(v
: Visitor)
5923 v
.enter_visit
(_n_id
)
5924 v
.enter_visit
(_n_assign
)
5925 v
.enter_visit
(_n_value
)
5928 redef class AVarReassignExpr
5929 init init_avarreassignexpr
(
5931 n_assign_op
: nullable AAssignOp,
5932 n_value
: nullable AExpr
5935 _n_id
= n_id
.as(not null)
5937 _n_assign_op
= n_assign_op
.as(not null)
5938 n_assign_op
.parent
= self
5939 _n_value
= n_value
.as(not null)
5940 n_value
.parent
= self
5943 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5945 if _n_id
== old_child
then
5946 n_id
= new_child
.as(TId)
5949 if _n_assign_op
== old_child
then
5950 n_assign_op
= new_child
.as(AAssignOp)
5953 if _n_value
== old_child
then
5954 n_value
= new_child
.as(AExpr)
5959 redef fun n_id
=(node
)
5964 redef fun n_assign_op
=(node
)
5969 redef fun n_value
=(node
)
5976 redef fun visit_all
(v
: Visitor)
5978 v
.enter_visit
(_n_id
)
5979 v
.enter_visit
(_n_assign_op
)
5980 v
.enter_visit
(_n_value
)
5983 redef class ARangeExpr
5984 init init_arangeexpr
(
5985 n_expr
: nullable AExpr,
5986 n_expr2
: nullable AExpr,
5987 n_annotations
: nullable AAnnotations
5990 _n_expr
= n_expr
.as(not null)
5991 n_expr
.parent
= self
5992 _n_expr2
= n_expr2
.as(not null)
5993 n_expr2
.parent
= self
5994 _n_annotations
= n_annotations
5995 if n_annotations
!= null then n_annotations
.parent
= self
5998 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6000 if _n_expr
== old_child
then
6001 n_expr
= new_child
.as(AExpr)
6004 if _n_expr2
== old_child
then
6005 n_expr2
= new_child
.as(AExpr)
6008 if _n_annotations
== old_child
then
6009 n_annotations
= new_child
.as(nullable AAnnotations)
6014 redef fun n_expr
=(node
)
6019 redef fun n_expr2
=(node
)
6024 redef fun n_annotations
=(node
)
6026 _n_annotations
= node
6027 if node
!= null then node
.parent
= self
6031 redef fun visit_all
(v
: Visitor)
6033 v
.enter_visit
(_n_expr
)
6034 v
.enter_visit
(_n_expr2
)
6035 v
.enter_visit
(_n_annotations
)
6038 redef class ACrangeExpr
6039 init init_acrangeexpr
(
6040 n_obra
: nullable TObra,
6041 n_expr
: nullable AExpr,
6042 n_dotdot
: nullable TDotdot,
6043 n_expr2
: nullable AExpr,
6044 n_cbra
: nullable TCbra,
6045 n_annotations
: nullable AAnnotations
6048 _n_obra
= n_obra
.as(not null)
6049 n_obra
.parent
= self
6050 _n_expr
= n_expr
.as(not null)
6051 n_expr
.parent
= self
6052 _n_dotdot
= n_dotdot
.as(not null)
6053 n_dotdot
.parent
= self
6054 _n_expr2
= n_expr2
.as(not null)
6055 n_expr2
.parent
= self
6056 _n_cbra
= n_cbra
.as(not null)
6057 n_cbra
.parent
= self
6058 _n_annotations
= n_annotations
6059 if n_annotations
!= null then n_annotations
.parent
= self
6062 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6064 if _n_obra
== old_child
then
6065 n_obra
= new_child
.as(TObra)
6068 if _n_expr
== old_child
then
6069 n_expr
= new_child
.as(AExpr)
6072 if _n_dotdot
== old_child
then
6073 n_dotdot
= new_child
.as(TDotdot)
6076 if _n_expr2
== old_child
then
6077 n_expr2
= new_child
.as(AExpr)
6080 if _n_cbra
== old_child
then
6081 n_cbra
= new_child
.as(TCbra)
6084 if _n_annotations
== old_child
then
6085 n_annotations
= new_child
.as(nullable AAnnotations)
6090 redef fun n_obra
=(node
)
6095 redef fun n_expr
=(node
)
6100 redef fun n_dotdot
=(node
)
6105 redef fun n_expr2
=(node
)
6110 redef fun n_cbra
=(node
)
6115 redef fun n_annotations
=(node
)
6117 _n_annotations
= node
6118 if node
!= null then node
.parent
= self
6122 redef fun visit_all
(v
: Visitor)
6124 v
.enter_visit
(_n_obra
)
6125 v
.enter_visit
(_n_expr
)
6126 v
.enter_visit
(_n_dotdot
)
6127 v
.enter_visit
(_n_expr2
)
6128 v
.enter_visit
(_n_cbra
)
6129 v
.enter_visit
(_n_annotations
)
6132 redef class AOrangeExpr
6133 init init_aorangeexpr
(
6134 n_obra
: nullable TObra,
6135 n_expr
: nullable AExpr,
6136 n_dotdot
: nullable TDotdot,
6137 n_expr2
: nullable AExpr,
6138 n_cbra
: nullable TObra,
6139 n_annotations
: nullable AAnnotations
6142 _n_obra
= n_obra
.as(not null)
6143 n_obra
.parent
= self
6144 _n_expr
= n_expr
.as(not null)
6145 n_expr
.parent
= self
6146 _n_dotdot
= n_dotdot
.as(not null)
6147 n_dotdot
.parent
= self
6148 _n_expr2
= n_expr2
.as(not null)
6149 n_expr2
.parent
= self
6150 _n_cbra
= n_cbra
.as(not null)
6151 n_cbra
.parent
= self
6152 _n_annotations
= n_annotations
6153 if n_annotations
!= null then n_annotations
.parent
= self
6156 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6158 if _n_obra
== old_child
then
6159 n_obra
= new_child
.as(TObra)
6162 if _n_expr
== old_child
then
6163 n_expr
= new_child
.as(AExpr)
6166 if _n_dotdot
== old_child
then
6167 n_dotdot
= new_child
.as(TDotdot)
6170 if _n_expr2
== old_child
then
6171 n_expr2
= new_child
.as(AExpr)
6174 if _n_cbra
== old_child
then
6175 n_cbra
= new_child
.as(TObra)
6178 if _n_annotations
== old_child
then
6179 n_annotations
= new_child
.as(nullable AAnnotations)
6184 redef fun n_obra
=(node
)
6189 redef fun n_expr
=(node
)
6194 redef fun n_dotdot
=(node
)
6199 redef fun n_expr2
=(node
)
6204 redef fun n_cbra
=(node
)
6209 redef fun n_annotations
=(node
)
6211 _n_annotations
= node
6212 if node
!= null then node
.parent
= self
6216 redef fun visit_all
(v
: Visitor)
6218 v
.enter_visit
(_n_obra
)
6219 v
.enter_visit
(_n_expr
)
6220 v
.enter_visit
(_n_dotdot
)
6221 v
.enter_visit
(_n_expr2
)
6222 v
.enter_visit
(_n_cbra
)
6223 v
.enter_visit
(_n_annotations
)
6226 redef class AArrayExpr
6227 init init_aarrayexpr
(
6228 n_obra
: nullable TObra,
6229 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6230 n_type
: nullable AType,
6231 n_cbra
: nullable TCbra,
6232 n_annotations
: nullable AAnnotations
6235 _n_obra
= n_obra
.as(not null)
6236 n_obra
.parent
= self
6237 self.n_exprs
.unsafe_add_all
(n_exprs
)
6239 if n_type
!= null then n_type
.parent
= self
6240 _n_cbra
= n_cbra
.as(not null)
6241 n_cbra
.parent
= self
6242 _n_annotations
= n_annotations
6243 if n_annotations
!= null then n_annotations
.parent
= self
6246 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6248 if _n_obra
== old_child
then
6249 n_obra
= new_child
.as(TObra)
6252 if n_exprs
.replace_child
(old_child
, new_child
) then return
6253 if _n_type
== old_child
then
6254 n_type
= new_child
.as(nullable AType)
6257 if _n_cbra
== old_child
then
6258 n_cbra
= new_child
.as(TCbra)
6261 if _n_annotations
== old_child
then
6262 n_annotations
= new_child
.as(nullable AAnnotations)
6267 redef fun n_obra
=(node
)
6272 redef fun n_type
=(node
)
6275 if node
!= null then node
.parent
= self
6277 redef fun n_cbra
=(node
)
6282 redef fun n_annotations
=(node
)
6284 _n_annotations
= node
6285 if node
!= null then node
.parent
= self
6289 redef fun visit_all
(v
: Visitor)
6291 v
.enter_visit
(_n_obra
)
6292 n_exprs
.visit_all
(v
)
6293 v
.enter_visit
(_n_type
)
6294 v
.enter_visit
(_n_cbra
)
6295 v
.enter_visit
(_n_annotations
)
6298 redef class ASelfExpr
6299 init init_aselfexpr
(
6300 n_kwself
: nullable TKwself,
6301 n_annotations
: nullable AAnnotations
6304 _n_kwself
= n_kwself
.as(not null)
6305 n_kwself
.parent
= self
6306 _n_annotations
= n_annotations
6307 if n_annotations
!= null then n_annotations
.parent
= self
6310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6312 if _n_kwself
== old_child
then
6313 n_kwself
= new_child
.as(TKwself)
6316 if _n_annotations
== old_child
then
6317 n_annotations
= new_child
.as(nullable AAnnotations)
6322 redef fun n_kwself
=(node
)
6327 redef fun n_annotations
=(node
)
6329 _n_annotations
= node
6330 if node
!= null then node
.parent
= self
6334 redef fun visit_all
(v
: Visitor)
6336 v
.enter_visit
(_n_kwself
)
6337 v
.enter_visit
(_n_annotations
)
6340 redef class AImplicitSelfExpr
6341 init init_aimplicitselfexpr
6345 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6351 redef fun visit_all
(v
: Visitor)
6355 redef class ATrueExpr
6356 init init_atrueexpr
(
6357 n_kwtrue
: nullable TKwtrue,
6358 n_annotations
: nullable AAnnotations
6361 _n_kwtrue
= n_kwtrue
.as(not null)
6362 n_kwtrue
.parent
= self
6363 _n_annotations
= n_annotations
6364 if n_annotations
!= null then n_annotations
.parent
= self
6367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6369 if _n_kwtrue
== old_child
then
6370 n_kwtrue
= new_child
.as(TKwtrue)
6373 if _n_annotations
== old_child
then
6374 n_annotations
= new_child
.as(nullable AAnnotations)
6379 redef fun n_kwtrue
=(node
)
6384 redef fun n_annotations
=(node
)
6386 _n_annotations
= node
6387 if node
!= null then node
.parent
= self
6391 redef fun visit_all
(v
: Visitor)
6393 v
.enter_visit
(_n_kwtrue
)
6394 v
.enter_visit
(_n_annotations
)
6397 redef class AFalseExpr
6398 init init_afalseexpr
(
6399 n_kwfalse
: nullable TKwfalse,
6400 n_annotations
: nullable AAnnotations
6403 _n_kwfalse
= n_kwfalse
.as(not null)
6404 n_kwfalse
.parent
= self
6405 _n_annotations
= n_annotations
6406 if n_annotations
!= null then n_annotations
.parent
= self
6409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6411 if _n_kwfalse
== old_child
then
6412 n_kwfalse
= new_child
.as(TKwfalse)
6415 if _n_annotations
== old_child
then
6416 n_annotations
= new_child
.as(nullable AAnnotations)
6421 redef fun n_kwfalse
=(node
)
6426 redef fun n_annotations
=(node
)
6428 _n_annotations
= node
6429 if node
!= null then node
.parent
= self
6433 redef fun visit_all
(v
: Visitor)
6435 v
.enter_visit
(_n_kwfalse
)
6436 v
.enter_visit
(_n_annotations
)
6439 redef class ANullExpr
6440 init init_anullexpr
(
6441 n_kwnull
: nullable TKwnull,
6442 n_annotations
: nullable AAnnotations
6445 _n_kwnull
= n_kwnull
.as(not null)
6446 n_kwnull
.parent
= self
6447 _n_annotations
= n_annotations
6448 if n_annotations
!= null then n_annotations
.parent
= self
6451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6453 if _n_kwnull
== old_child
then
6454 n_kwnull
= new_child
.as(TKwnull)
6457 if _n_annotations
== old_child
then
6458 n_annotations
= new_child
.as(nullable AAnnotations)
6463 redef fun n_kwnull
=(node
)
6468 redef fun n_annotations
=(node
)
6470 _n_annotations
= node
6471 if node
!= null then node
.parent
= self
6475 redef fun visit_all
(v
: Visitor)
6477 v
.enter_visit
(_n_kwnull
)
6478 v
.enter_visit
(_n_annotations
)
6481 redef class AIntegerExpr
6482 init init_aintegerexpr
(
6483 n_integer
: nullable TInteger,
6484 n_annotations
: nullable AAnnotations
6487 _n_integer
= n_integer
.as(not null)
6488 n_integer
.parent
= self
6489 _n_annotations
= n_annotations
6490 if n_annotations
!= null then n_annotations
.parent
= self
6493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6495 if _n_integer
== old_child
then
6496 n_integer
= new_child
.as(TInteger)
6499 if _n_annotations
== old_child
then
6500 n_annotations
= new_child
.as(nullable AAnnotations)
6505 redef fun n_integer
=(node
)
6510 redef fun n_annotations
=(node
)
6512 _n_annotations
= node
6513 if node
!= null then node
.parent
= self
6517 redef fun visit_all
(v
: Visitor)
6519 v
.enter_visit
(_n_integer
)
6520 v
.enter_visit
(_n_annotations
)
6523 redef class AFloatExpr
6524 init init_afloatexpr
(
6525 n_float
: nullable TFloat,
6526 n_annotations
: nullable AAnnotations
6529 _n_float
= n_float
.as(not null)
6530 n_float
.parent
= self
6531 _n_annotations
= n_annotations
6532 if n_annotations
!= null then n_annotations
.parent
= self
6535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6537 if _n_float
== old_child
then
6538 n_float
= new_child
.as(TFloat)
6541 if _n_annotations
== old_child
then
6542 n_annotations
= new_child
.as(nullable AAnnotations)
6547 redef fun n_float
=(node
)
6552 redef fun n_annotations
=(node
)
6554 _n_annotations
= node
6555 if node
!= null then node
.parent
= self
6559 redef fun visit_all
(v
: Visitor)
6561 v
.enter_visit
(_n_float
)
6562 v
.enter_visit
(_n_annotations
)
6565 redef class ACharExpr
6566 init init_acharexpr
(
6567 n_char
: nullable TChar,
6568 n_annotations
: nullable AAnnotations
6571 _n_char
= n_char
.as(not null)
6572 n_char
.parent
= self
6573 _n_annotations
= n_annotations
6574 if n_annotations
!= null then n_annotations
.parent
= self
6577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6579 if _n_char
== old_child
then
6580 n_char
= new_child
.as(TChar)
6583 if _n_annotations
== old_child
then
6584 n_annotations
= new_child
.as(nullable AAnnotations)
6589 redef fun n_char
=(node
)
6594 redef fun n_annotations
=(node
)
6596 _n_annotations
= node
6597 if node
!= null then node
.parent
= self
6601 redef fun visit_all
(v
: Visitor)
6603 v
.enter_visit
(_n_char
)
6604 v
.enter_visit
(_n_annotations
)
6607 redef class AStringExpr
6608 init init_astringexpr
(
6609 n_string
: nullable TString,
6610 n_annotations
: nullable AAnnotations
6613 _n_string
= n_string
.as(not null)
6614 n_string
.parent
= self
6615 _n_annotations
= n_annotations
6616 if n_annotations
!= null then n_annotations
.parent
= self
6619 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6621 if _n_string
== old_child
then
6622 n_string
= new_child
.as(TString)
6625 if _n_annotations
== old_child
then
6626 n_annotations
= new_child
.as(nullable AAnnotations)
6631 redef fun n_string
=(node
)
6636 redef fun n_annotations
=(node
)
6638 _n_annotations
= node
6639 if node
!= null then node
.parent
= self
6643 redef fun visit_all
(v
: Visitor)
6645 v
.enter_visit
(_n_string
)
6646 v
.enter_visit
(_n_annotations
)
6649 redef class AStartStringExpr
6650 init init_astartstringexpr
(
6651 n_string
: nullable TStartString
6654 _n_string
= n_string
.as(not null)
6655 n_string
.parent
= self
6658 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6660 if _n_string
== old_child
then
6661 n_string
= new_child
.as(TStartString)
6666 redef fun n_string
=(node
)
6673 redef fun visit_all
(v
: Visitor)
6675 v
.enter_visit
(_n_string
)
6678 redef class AMidStringExpr
6679 init init_amidstringexpr
(
6680 n_string
: nullable TMidString
6683 _n_string
= n_string
.as(not null)
6684 n_string
.parent
= self
6687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6689 if _n_string
== old_child
then
6690 n_string
= new_child
.as(TMidString)
6695 redef fun n_string
=(node
)
6702 redef fun visit_all
(v
: Visitor)
6704 v
.enter_visit
(_n_string
)
6707 redef class AEndStringExpr
6708 init init_aendstringexpr
(
6709 n_string
: nullable TEndString
6712 _n_string
= n_string
.as(not null)
6713 n_string
.parent
= self
6716 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6718 if _n_string
== old_child
then
6719 n_string
= new_child
.as(TEndString)
6724 redef fun n_string
=(node
)
6731 redef fun visit_all
(v
: Visitor)
6733 v
.enter_visit
(_n_string
)
6736 redef class ASuperstringExpr
6737 init init_asuperstringexpr
(
6738 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6739 n_annotations
: nullable AAnnotations
6742 self.n_exprs
.unsafe_add_all
(n_exprs
)
6743 _n_annotations
= n_annotations
6744 if n_annotations
!= null then n_annotations
.parent
= self
6747 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6749 if n_exprs
.replace_child
(old_child
, new_child
) then return
6750 if _n_annotations
== old_child
then
6751 n_annotations
= new_child
.as(nullable AAnnotations)
6756 redef fun n_annotations
=(node
)
6758 _n_annotations
= node
6759 if node
!= null then node
.parent
= self
6763 redef fun visit_all
(v
: Visitor)
6765 n_exprs
.visit_all
(v
)
6766 v
.enter_visit
(_n_annotations
)
6769 redef class AParExpr
6770 init init_aparexpr
(
6771 n_opar
: nullable TOpar,
6772 n_expr
: nullable AExpr,
6773 n_cpar
: nullable TCpar,
6774 n_annotations
: nullable AAnnotations
6777 _n_opar
= n_opar
.as(not null)
6778 n_opar
.parent
= self
6779 _n_expr
= n_expr
.as(not null)
6780 n_expr
.parent
= self
6781 _n_cpar
= n_cpar
.as(not null)
6782 n_cpar
.parent
= self
6783 _n_annotations
= n_annotations
6784 if n_annotations
!= null then n_annotations
.parent
= self
6787 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6789 if _n_opar
== old_child
then
6790 n_opar
= new_child
.as(TOpar)
6793 if _n_expr
== old_child
then
6794 n_expr
= new_child
.as(AExpr)
6797 if _n_cpar
== old_child
then
6798 n_cpar
= new_child
.as(TCpar)
6801 if _n_annotations
== old_child
then
6802 n_annotations
= new_child
.as(nullable AAnnotations)
6807 redef fun n_opar
=(node
)
6812 redef fun n_expr
=(node
)
6817 redef fun n_cpar
=(node
)
6822 redef fun n_annotations
=(node
)
6824 _n_annotations
= node
6825 if node
!= null then node
.parent
= self
6829 redef fun visit_all
(v
: Visitor)
6831 v
.enter_visit
(_n_opar
)
6832 v
.enter_visit
(_n_expr
)
6833 v
.enter_visit
(_n_cpar
)
6834 v
.enter_visit
(_n_annotations
)
6837 redef class AAsCastExpr
6838 init init_aascastexpr
(
6839 n_expr
: nullable AExpr,
6840 n_kwas
: nullable TKwas,
6841 n_opar
: nullable TOpar,
6842 n_type
: nullable AType,
6843 n_cpar
: nullable TCpar
6846 _n_expr
= n_expr
.as(not null)
6847 n_expr
.parent
= self
6848 _n_kwas
= n_kwas
.as(not null)
6849 n_kwas
.parent
= self
6851 if n_opar
!= null then n_opar
.parent
= self
6852 _n_type
= n_type
.as(not null)
6853 n_type
.parent
= self
6855 if n_cpar
!= null then n_cpar
.parent
= self
6858 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6860 if _n_expr
== old_child
then
6861 n_expr
= new_child
.as(AExpr)
6864 if _n_kwas
== old_child
then
6865 n_kwas
= new_child
.as(TKwas)
6868 if _n_opar
== old_child
then
6869 n_opar
= new_child
.as(nullable TOpar)
6872 if _n_type
== old_child
then
6873 n_type
= new_child
.as(AType)
6876 if _n_cpar
== old_child
then
6877 n_cpar
= new_child
.as(nullable TCpar)
6882 redef fun n_expr
=(node
)
6887 redef fun n_kwas
=(node
)
6892 redef fun n_opar
=(node
)
6895 if node
!= null then node
.parent
= self
6897 redef fun n_type
=(node
)
6902 redef fun n_cpar
=(node
)
6905 if node
!= null then node
.parent
= self
6909 redef fun visit_all
(v
: Visitor)
6911 v
.enter_visit
(_n_expr
)
6912 v
.enter_visit
(_n_kwas
)
6913 v
.enter_visit
(_n_opar
)
6914 v
.enter_visit
(_n_type
)
6915 v
.enter_visit
(_n_cpar
)
6918 redef class AAsNotnullExpr
6919 init init_aasnotnullexpr
(
6920 n_expr
: nullable AExpr,
6921 n_kwas
: nullable TKwas,
6922 n_opar
: nullable TOpar,
6923 n_kwnot
: nullable TKwnot,
6924 n_kwnull
: nullable TKwnull,
6925 n_cpar
: nullable TCpar
6928 _n_expr
= n_expr
.as(not null)
6929 n_expr
.parent
= self
6930 _n_kwas
= n_kwas
.as(not null)
6931 n_kwas
.parent
= self
6933 if n_opar
!= null then n_opar
.parent
= self
6934 _n_kwnot
= n_kwnot
.as(not null)
6935 n_kwnot
.parent
= self
6936 _n_kwnull
= n_kwnull
.as(not null)
6937 n_kwnull
.parent
= self
6939 if n_cpar
!= null then n_cpar
.parent
= self
6942 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6944 if _n_expr
== old_child
then
6945 n_expr
= new_child
.as(AExpr)
6948 if _n_kwas
== old_child
then
6949 n_kwas
= new_child
.as(TKwas)
6952 if _n_opar
== old_child
then
6953 n_opar
= new_child
.as(nullable TOpar)
6956 if _n_kwnot
== old_child
then
6957 n_kwnot
= new_child
.as(TKwnot)
6960 if _n_kwnull
== old_child
then
6961 n_kwnull
= new_child
.as(TKwnull)
6964 if _n_cpar
== old_child
then
6965 n_cpar
= new_child
.as(nullable TCpar)
6970 redef fun n_expr
=(node
)
6975 redef fun n_kwas
=(node
)
6980 redef fun n_opar
=(node
)
6983 if node
!= null then node
.parent
= self
6985 redef fun n_kwnot
=(node
)
6990 redef fun n_kwnull
=(node
)
6995 redef fun n_cpar
=(node
)
6998 if node
!= null then node
.parent
= self
7002 redef fun visit_all
(v
: Visitor)
7004 v
.enter_visit
(_n_expr
)
7005 v
.enter_visit
(_n_kwas
)
7006 v
.enter_visit
(_n_opar
)
7007 v
.enter_visit
(_n_kwnot
)
7008 v
.enter_visit
(_n_kwnull
)
7009 v
.enter_visit
(_n_cpar
)
7012 redef class AIssetAttrExpr
7013 init init_aissetattrexpr
(
7014 n_kwisset
: nullable TKwisset,
7015 n_expr
: nullable AExpr,
7016 n_id
: nullable TAttrid
7019 _n_kwisset
= n_kwisset
.as(not null)
7020 n_kwisset
.parent
= self
7021 _n_expr
= n_expr
.as(not null)
7022 n_expr
.parent
= self
7023 _n_id
= n_id
.as(not null)
7027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7029 if _n_kwisset
== old_child
then
7030 n_kwisset
= new_child
.as(TKwisset)
7033 if _n_expr
== old_child
then
7034 n_expr
= new_child
.as(AExpr)
7037 if _n_id
== old_child
then
7038 n_id
= new_child
.as(TAttrid)
7043 redef fun n_kwisset
=(node
)
7048 redef fun n_expr
=(node
)
7053 redef fun n_id
=(node
)
7060 redef fun visit_all
(v
: Visitor)
7062 v
.enter_visit
(_n_kwisset
)
7063 v
.enter_visit
(_n_expr
)
7064 v
.enter_visit
(_n_id
)
7067 redef class ADebugTypeExpr
7068 init init_adebugtypeexpr
(
7069 n_kwdebug
: nullable TKwdebug,
7070 n_kwtype
: nullable TKwtype,
7071 n_expr
: nullable AExpr,
7072 n_type
: nullable AType
7075 _n_kwdebug
= n_kwdebug
.as(not null)
7076 n_kwdebug
.parent
= self
7077 _n_kwtype
= n_kwtype
.as(not null)
7078 n_kwtype
.parent
= self
7079 _n_expr
= n_expr
.as(not null)
7080 n_expr
.parent
= self
7081 _n_type
= n_type
.as(not null)
7082 n_type
.parent
= self
7085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7087 if _n_kwdebug
== old_child
then
7088 n_kwdebug
= new_child
.as(TKwdebug)
7091 if _n_kwtype
== old_child
then
7092 n_kwtype
= new_child
.as(TKwtype)
7095 if _n_expr
== old_child
then
7096 n_expr
= new_child
.as(AExpr)
7099 if _n_type
== old_child
then
7100 n_type
= new_child
.as(AType)
7105 redef fun n_kwdebug
=(node
)
7110 redef fun n_kwtype
=(node
)
7115 redef fun n_expr
=(node
)
7120 redef fun n_type
=(node
)
7127 redef fun visit_all
(v
: Visitor)
7129 v
.enter_visit
(_n_kwdebug
)
7130 v
.enter_visit
(_n_kwtype
)
7131 v
.enter_visit
(_n_expr
)
7132 v
.enter_visit
(_n_type
)
7135 redef class AVarargExpr
7136 init init_avarargexpr
(
7137 n_expr
: nullable AExpr,
7138 n_dotdotdot
: nullable TDotdotdot
7141 _n_expr
= n_expr
.as(not null)
7142 n_expr
.parent
= self
7143 _n_dotdotdot
= n_dotdotdot
.as(not null)
7144 n_dotdotdot
.parent
= self
7147 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7149 if _n_expr
== old_child
then
7150 n_expr
= new_child
.as(AExpr)
7153 if _n_dotdotdot
== old_child
then
7154 n_dotdotdot
= new_child
.as(TDotdotdot)
7159 redef fun n_expr
=(node
)
7164 redef fun n_dotdotdot
=(node
)
7171 redef fun visit_all
(v
: Visitor)
7173 v
.enter_visit
(_n_expr
)
7174 v
.enter_visit
(_n_dotdotdot
)
7177 redef class ANamedargExpr
7178 init init_anamedargexpr
(
7180 n_assign
: nullable TAssign,
7181 n_expr
: nullable AExpr
7184 _n_id
= n_id
.as(not null)
7186 _n_assign
= n_assign
.as(not null)
7187 n_assign
.parent
= self
7188 _n_expr
= n_expr
.as(not null)
7189 n_expr
.parent
= self
7192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7194 if _n_id
== old_child
then
7195 n_id
= new_child
.as(TId)
7198 if _n_assign
== old_child
then
7199 n_assign
= new_child
.as(TAssign)
7202 if _n_expr
== old_child
then
7203 n_expr
= new_child
.as(AExpr)
7208 redef fun n_id
=(node
)
7213 redef fun n_assign
=(node
)
7218 redef fun n_expr
=(node
)
7225 redef fun visit_all
(v
: Visitor)
7227 v
.enter_visit
(_n_id
)
7228 v
.enter_visit
(_n_assign
)
7229 v
.enter_visit
(_n_expr
)
7232 redef class ATypeExpr
7233 init init_atypeexpr
(
7234 n_type
: nullable AType
7237 _n_type
= n_type
.as(not null)
7238 n_type
.parent
= self
7241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7243 if _n_type
== old_child
then
7244 n_type
= new_child
.as(AType)
7249 redef fun n_type
=(node
)
7256 redef fun visit_all
(v
: Visitor)
7258 v
.enter_visit
(_n_type
)
7261 redef class AMethidExpr
7262 init init_amethidexpr
(
7263 n_expr
: nullable AExpr,
7264 n_id
: nullable AMethid
7267 _n_expr
= n_expr
.as(not null)
7268 n_expr
.parent
= self
7269 _n_id
= n_id
.as(not null)
7273 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7275 if _n_expr
== old_child
then
7276 n_expr
= new_child
.as(AExpr)
7279 if _n_id
== old_child
then
7280 n_id
= new_child
.as(AMethid)
7285 redef fun n_expr
=(node
)
7290 redef fun n_id
=(node
)
7297 redef fun visit_all
(v
: Visitor)
7299 v
.enter_visit
(_n_expr
)
7300 v
.enter_visit
(_n_id
)
7305 n_annotations
: nullable AAnnotations
7308 _n_annotations
= n_annotations
.as(not null)
7309 n_annotations
.parent
= self
7312 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7314 if _n_annotations
== old_child
then
7315 n_annotations
= new_child
.as(AAnnotations)
7320 redef fun n_annotations
=(node
)
7322 _n_annotations
= node
7327 redef fun visit_all
(v
: Visitor)
7329 v
.enter_visit
(_n_annotations
)
7332 redef class AManyExpr
7333 init init_amanyexpr
(
7334 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7337 self.n_exprs
.unsafe_add_all
(n_exprs
)
7340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7342 if n_exprs
.replace_child
(old_child
, new_child
) then return
7347 redef fun visit_all
(v
: Visitor)
7349 n_exprs
.visit_all
(v
)
7352 redef class AListExprs
7353 init init_alistexprs
(
7354 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7357 self.n_exprs
.unsafe_add_all
(n_exprs
)
7360 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7362 if n_exprs
.replace_child
(old_child
, new_child
) then return
7367 redef fun visit_all
(v
: Visitor)
7369 n_exprs
.visit_all
(v
)
7372 redef class AParExprs
7373 init init_aparexprs
(
7374 n_opar
: nullable TOpar,
7375 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7376 n_cpar
: nullable TCpar
7379 _n_opar
= n_opar
.as(not null)
7380 n_opar
.parent
= self
7381 self.n_exprs
.unsafe_add_all
(n_exprs
)
7382 _n_cpar
= n_cpar
.as(not null)
7383 n_cpar
.parent
= self
7386 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7388 if _n_opar
== old_child
then
7389 n_opar
= new_child
.as(TOpar)
7392 if n_exprs
.replace_child
(old_child
, new_child
) then return
7393 if _n_cpar
== old_child
then
7394 n_cpar
= new_child
.as(TCpar)
7399 redef fun n_opar
=(node
)
7404 redef fun n_cpar
=(node
)
7411 redef fun visit_all
(v
: Visitor)
7413 v
.enter_visit
(_n_opar
)
7414 n_exprs
.visit_all
(v
)
7415 v
.enter_visit
(_n_cpar
)
7418 redef class ABraExprs
7419 init init_abraexprs
(
7420 n_obra
: nullable TObra,
7421 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7422 n_cbra
: nullable TCbra
7425 _n_obra
= n_obra
.as(not null)
7426 n_obra
.parent
= self
7427 self.n_exprs
.unsafe_add_all
(n_exprs
)
7428 _n_cbra
= n_cbra
.as(not null)
7429 n_cbra
.parent
= self
7432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7434 if _n_obra
== old_child
then
7435 n_obra
= new_child
.as(TObra)
7438 if n_exprs
.replace_child
(old_child
, new_child
) then return
7439 if _n_cbra
== old_child
then
7440 n_cbra
= new_child
.as(TCbra)
7445 redef fun n_obra
=(node
)
7450 redef fun n_cbra
=(node
)
7457 redef fun visit_all
(v
: Visitor)
7459 v
.enter_visit
(_n_obra
)
7460 n_exprs
.visit_all
(v
)
7461 v
.enter_visit
(_n_cbra
)
7464 redef class APlusAssignOp
7465 init init_aplusassignop
(
7466 n_op
: nullable TPluseq
7469 _n_op
= n_op
.as(not null)
7473 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7475 if _n_op
== old_child
then
7476 n_op
= new_child
.as(TPluseq)
7481 redef fun n_op
=(node
)
7488 redef fun visit_all
(v
: Visitor)
7490 v
.enter_visit
(_n_op
)
7493 redef class AMinusAssignOp
7494 init init_aminusassignop
(
7495 n_op
: nullable TMinuseq
7498 _n_op
= n_op
.as(not null)
7502 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7504 if _n_op
== old_child
then
7505 n_op
= new_child
.as(TMinuseq)
7510 redef fun n_op
=(node
)
7517 redef fun visit_all
(v
: Visitor)
7519 v
.enter_visit
(_n_op
)
7522 redef class AStarAssignOp
7523 init init_astarassignop
(
7524 n_op
: nullable TStareq
7527 _n_op
= n_op
.as(not null)
7531 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7533 if _n_op
== old_child
then
7534 n_op
= new_child
.as(TStareq)
7539 redef fun n_op
=(node
)
7546 redef fun visit_all
(v
: Visitor)
7548 v
.enter_visit
(_n_op
)
7551 redef class ASlashAssignOp
7552 init init_aslashassignop
(
7553 n_op
: nullable TSlasheq
7556 _n_op
= n_op
.as(not null)
7560 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7562 if _n_op
== old_child
then
7563 n_op
= new_child
.as(TSlasheq)
7568 redef fun n_op
=(node
)
7575 redef fun visit_all
(v
: Visitor)
7577 v
.enter_visit
(_n_op
)
7580 redef class APercentAssignOp
7581 init init_apercentassignop
(
7582 n_op
: nullable TPercenteq
7585 _n_op
= n_op
.as(not null)
7589 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7591 if _n_op
== old_child
then
7592 n_op
= new_child
.as(TPercenteq)
7597 redef fun n_op
=(node
)
7604 redef fun visit_all
(v
: Visitor)
7606 v
.enter_visit
(_n_op
)
7609 redef class AStarstarAssignOp
7610 init init_astarstarassignop
(
7611 n_op
: nullable TStarstareq
7614 _n_op
= n_op
.as(not null)
7618 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7620 if _n_op
== old_child
then
7621 n_op
= new_child
.as(TStarstareq)
7626 redef fun n_op
=(node
)
7633 redef fun visit_all
(v
: Visitor)
7635 v
.enter_visit
(_n_op
)
7638 redef class APipeAssignOp
7639 init init_apipeassignop
(
7640 n_op
: nullable TPipeeq
7643 _n_op
= n_op
.as(not null)
7647 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7649 if _n_op
== old_child
then
7650 n_op
= new_child
.as(TPipeeq)
7655 redef fun n_op
=(node
)
7662 redef fun visit_all
(v
: Visitor)
7664 v
.enter_visit
(_n_op
)
7667 redef class ACaretAssignOp
7668 init init_acaretassignop
(
7669 n_op
: nullable TCareteq
7672 _n_op
= n_op
.as(not null)
7676 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7678 if _n_op
== old_child
then
7679 n_op
= new_child
.as(TCareteq)
7684 redef fun n_op
=(node
)
7691 redef fun visit_all
(v
: Visitor)
7693 v
.enter_visit
(_n_op
)
7696 redef class AAmpAssignOp
7697 init init_aampassignop
(
7698 n_op
: nullable TAmpeq
7701 _n_op
= n_op
.as(not null)
7705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7707 if _n_op
== old_child
then
7708 n_op
= new_child
.as(TAmpeq)
7713 redef fun n_op
=(node
)
7720 redef fun visit_all
(v
: Visitor)
7722 v
.enter_visit
(_n_op
)
7725 redef class ALlAssignOp
7726 init init_allassignop
(
7727 n_op
: nullable TLleq
7730 _n_op
= n_op
.as(not null)
7734 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7736 if _n_op
== old_child
then
7737 n_op
= new_child
.as(TLleq)
7742 redef fun n_op
=(node
)
7749 redef fun visit_all
(v
: Visitor)
7751 v
.enter_visit
(_n_op
)
7754 redef class AGgAssignOp
7755 init init_aggassignop
(
7756 n_op
: nullable TGgeq
7759 _n_op
= n_op
.as(not null)
7763 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7765 if _n_op
== old_child
then
7766 n_op
= new_child
.as(TGgeq)
7771 redef fun n_op
=(node
)
7778 redef fun visit_all
(v
: Visitor)
7780 v
.enter_visit
(_n_op
)
7783 redef class AForGroup
7784 init init_aforgroup
(
7785 n_ids
: Collection[Object], # Should be Collection[TId]
7786 n_kwin
: nullable TKwin,
7787 n_expr
: nullable AExpr
7790 self.n_ids
.unsafe_add_all
(n_ids
)
7791 _n_kwin
= n_kwin
.as(not null)
7792 n_kwin
.parent
= self
7793 _n_expr
= n_expr
.as(not null)
7794 n_expr
.parent
= self
7797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7799 if n_ids
.replace_child
(old_child
, new_child
) then return
7800 if _n_kwin
== old_child
then
7801 n_kwin
= new_child
.as(TKwin)
7804 if _n_expr
== old_child
then
7805 n_expr
= new_child
.as(AExpr)
7810 redef fun n_kwin
=(node
)
7815 redef fun n_expr
=(node
)
7822 redef fun visit_all
(v
: Visitor)
7825 v
.enter_visit
(_n_kwin
)
7826 v
.enter_visit
(_n_expr
)
7829 redef class AModuleName
7830 init init_amodulename
(
7831 n_quad
: nullable TQuad,
7832 n_path
: Collection[Object], # Should be Collection[TId]
7837 if n_quad
!= null then n_quad
.parent
= self
7838 self.n_path
.unsafe_add_all
(n_path
)
7839 _n_id
= n_id
.as(not null)
7843 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7845 if _n_quad
== old_child
then
7846 n_quad
= new_child
.as(nullable TQuad)
7849 if n_path
.replace_child
(old_child
, new_child
) then return
7850 if _n_id
== old_child
then
7851 n_id
= new_child
.as(TId)
7856 redef fun n_quad
=(node
)
7859 if node
!= null then node
.parent
= self
7861 redef fun n_id
=(node
)
7868 redef fun visit_all
(v
: Visitor)
7870 v
.enter_visit
(_n_quad
)
7872 v
.enter_visit
(_n_id
)
7875 redef class AExternCalls
7876 init init_aexterncalls
(
7877 n_kwimport
: nullable TKwimport,
7878 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7881 _n_kwimport
= n_kwimport
.as(not null)
7882 n_kwimport
.parent
= self
7883 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7886 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7888 if _n_kwimport
== old_child
then
7889 n_kwimport
= new_child
.as(TKwimport)
7892 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7895 redef fun n_kwimport
=(node
)
7902 redef fun visit_all
(v
: Visitor)
7904 v
.enter_visit
(_n_kwimport
)
7905 n_extern_calls
.visit_all
(v
)
7908 redef class AExternCall
7909 init init_aexterncall
7913 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7919 redef fun visit_all
(v
: Visitor)
7923 redef class ASuperExternCall
7924 init init_asuperexterncall
(
7925 n_kwsuper
: nullable TKwsuper
7928 _n_kwsuper
= n_kwsuper
.as(not null)
7929 n_kwsuper
.parent
= self
7932 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7934 if _n_kwsuper
== old_child
then
7935 n_kwsuper
= new_child
.as(TKwsuper)
7940 redef fun n_kwsuper
=(node
)
7947 redef fun visit_all
(v
: Visitor)
7949 v
.enter_visit
(_n_kwsuper
)
7952 redef class ALocalPropExternCall
7953 init init_alocalpropexterncall
(
7954 n_methid
: nullable AMethid
7957 _n_methid
= n_methid
.as(not null)
7958 n_methid
.parent
= self
7961 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7963 if _n_methid
== old_child
then
7964 n_methid
= new_child
.as(AMethid)
7969 redef fun n_methid
=(node
)
7976 redef fun visit_all
(v
: Visitor)
7978 v
.enter_visit
(_n_methid
)
7981 redef class AFullPropExternCall
7982 init init_afullpropexterncall
(
7983 n_type
: nullable AType,
7984 n_dot
: nullable TDot,
7985 n_methid
: nullable AMethid
7988 _n_type
= n_type
.as(not null)
7989 n_type
.parent
= self
7991 if n_dot
!= null then n_dot
.parent
= self
7992 _n_methid
= n_methid
.as(not null)
7993 n_methid
.parent
= self
7996 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7998 if _n_type
== old_child
then
7999 n_type
= new_child
.as(AType)
8002 if _n_dot
== old_child
then
8003 n_dot
= new_child
.as(nullable TDot)
8006 if _n_methid
== old_child
then
8007 n_methid
= new_child
.as(AMethid)
8012 redef fun n_type
=(node
)
8017 redef fun n_dot
=(node
)
8020 if node
!= null then node
.parent
= self
8022 redef fun n_methid
=(node
)
8029 redef fun visit_all
(v
: Visitor)
8031 v
.enter_visit
(_n_type
)
8032 v
.enter_visit
(_n_dot
)
8033 v
.enter_visit
(_n_methid
)
8036 redef class AInitPropExternCall
8037 init init_ainitpropexterncall
(
8038 n_type
: nullable AType
8041 _n_type
= n_type
.as(not null)
8042 n_type
.parent
= self
8045 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8047 if _n_type
== old_child
then
8048 n_type
= new_child
.as(AType)
8053 redef fun n_type
=(node
)
8060 redef fun visit_all
(v
: Visitor)
8062 v
.enter_visit
(_n_type
)
8065 redef class ACastAsExternCall
8066 init init_acastasexterncall
(
8067 n_from_type
: nullable AType,
8068 n_dot
: nullable TDot,
8069 n_kwas
: nullable TKwas,
8070 n_to_type
: nullable AType
8073 _n_from_type
= n_from_type
.as(not null)
8074 n_from_type
.parent
= self
8076 if n_dot
!= null then n_dot
.parent
= self
8077 _n_kwas
= n_kwas
.as(not null)
8078 n_kwas
.parent
= self
8079 _n_to_type
= n_to_type
.as(not null)
8080 n_to_type
.parent
= self
8083 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8085 if _n_from_type
== old_child
then
8086 n_from_type
= new_child
.as(AType)
8089 if _n_dot
== old_child
then
8090 n_dot
= new_child
.as(nullable TDot)
8093 if _n_kwas
== old_child
then
8094 n_kwas
= new_child
.as(TKwas)
8097 if _n_to_type
== old_child
then
8098 n_to_type
= new_child
.as(AType)
8103 redef fun n_from_type
=(node
)
8108 redef fun n_dot
=(node
)
8111 if node
!= null then node
.parent
= self
8113 redef fun n_kwas
=(node
)
8118 redef fun n_to_type
=(node
)
8125 redef fun visit_all
(v
: Visitor)
8127 v
.enter_visit
(_n_from_type
)
8128 v
.enter_visit
(_n_dot
)
8129 v
.enter_visit
(_n_kwas
)
8130 v
.enter_visit
(_n_to_type
)
8133 redef class AAsNullableExternCall
8134 init init_aasnullableexterncall
(
8135 n_type
: nullable AType,
8136 n_kwas
: nullable TKwas,
8137 n_kwnullable
: nullable TKwnullable
8140 _n_type
= n_type
.as(not null)
8141 n_type
.parent
= self
8142 _n_kwas
= n_kwas
.as(not null)
8143 n_kwas
.parent
= self
8144 _n_kwnullable
= n_kwnullable
.as(not null)
8145 n_kwnullable
.parent
= self
8148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8150 if _n_type
== old_child
then
8151 n_type
= new_child
.as(AType)
8154 if _n_kwas
== old_child
then
8155 n_kwas
= new_child
.as(TKwas)
8158 if _n_kwnullable
== old_child
then
8159 n_kwnullable
= new_child
.as(TKwnullable)
8164 redef fun n_type
=(node
)
8169 redef fun n_kwas
=(node
)
8174 redef fun n_kwnullable
=(node
)
8176 _n_kwnullable
= node
8181 redef fun visit_all
(v
: Visitor)
8183 v
.enter_visit
(_n_type
)
8184 v
.enter_visit
(_n_kwas
)
8185 v
.enter_visit
(_n_kwnullable
)
8188 redef class AAsNotNullableExternCall
8189 init init_aasnotnullableexterncall
(
8190 n_type
: nullable AType,
8191 n_kwas
: nullable TKwas,
8192 n_kwnot
: nullable TKwnot,
8193 n_kwnullable
: nullable TKwnullable
8196 _n_type
= n_type
.as(not null)
8197 n_type
.parent
= self
8198 _n_kwas
= n_kwas
.as(not null)
8199 n_kwas
.parent
= self
8200 _n_kwnot
= n_kwnot
.as(not null)
8201 n_kwnot
.parent
= self
8202 _n_kwnullable
= n_kwnullable
.as(not null)
8203 n_kwnullable
.parent
= self
8206 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8208 if _n_type
== old_child
then
8209 n_type
= new_child
.as(AType)
8212 if _n_kwas
== old_child
then
8213 n_kwas
= new_child
.as(TKwas)
8216 if _n_kwnot
== old_child
then
8217 n_kwnot
= new_child
.as(TKwnot)
8220 if _n_kwnullable
== old_child
then
8221 n_kwnullable
= new_child
.as(TKwnullable)
8226 redef fun n_type
=(node
)
8231 redef fun n_kwas
=(node
)
8236 redef fun n_kwnot
=(node
)
8241 redef fun n_kwnullable
=(node
)
8243 _n_kwnullable
= node
8248 redef fun visit_all
(v
: Visitor)
8250 v
.enter_visit
(_n_type
)
8251 v
.enter_visit
(_n_kwas
)
8252 v
.enter_visit
(_n_kwnot
)
8253 v
.enter_visit
(_n_kwnullable
)
8256 redef class AInLanguage
8257 init init_ainlanguage
(
8258 n_kwin
: nullable TKwin,
8259 n_string
: nullable TString
8262 _n_kwin
= n_kwin
.as(not null)
8263 n_kwin
.parent
= self
8264 _n_string
= n_string
.as(not null)
8265 n_string
.parent
= self
8268 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8270 if _n_kwin
== old_child
then
8271 n_kwin
= new_child
.as(TKwin)
8274 if _n_string
== old_child
then
8275 n_string
= new_child
.as(TString)
8280 redef fun n_kwin
=(node
)
8285 redef fun n_string
=(node
)
8292 redef fun visit_all
(v
: Visitor)
8294 v
.enter_visit
(_n_kwin
)
8295 v
.enter_visit
(_n_string
)
8298 redef class AExternCodeBlock
8299 init init_aexterncodeblock
(
8300 n_in_language
: nullable AInLanguage,
8301 n_extern_code_segment
: nullable TExternCodeSegment
8304 _n_in_language
= n_in_language
8305 if n_in_language
!= null then n_in_language
.parent
= self
8306 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8307 n_extern_code_segment
.parent
= self
8310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8312 if _n_in_language
== old_child
then
8313 n_in_language
= new_child
.as(nullable AInLanguage)
8316 if _n_extern_code_segment
== old_child
then
8317 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8322 redef fun n_in_language
=(node
)
8324 _n_in_language
= node
8325 if node
!= null then node
.parent
= self
8327 redef fun n_extern_code_segment
=(node
)
8329 _n_extern_code_segment
= node
8334 redef fun visit_all
(v
: Visitor)
8336 v
.enter_visit
(_n_in_language
)
8337 v
.enter_visit
(_n_extern_code_segment
)
8340 redef class AQualified
8341 init init_aqualified
(
8342 n_id
: Collection[Object], # Should be Collection[TId]
8343 n_classid
: nullable TClassid
8346 self.n_id
.unsafe_add_all
(n_id
)
8347 _n_classid
= n_classid
8348 if n_classid
!= null then n_classid
.parent
= self
8351 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8353 if n_id
.replace_child
(old_child
, new_child
) then return
8354 if _n_classid
== old_child
then
8355 n_classid
= new_child
.as(nullable TClassid)
8360 redef fun n_classid
=(node
)
8363 if node
!= null then node
.parent
= self
8367 redef fun visit_all
(v
: Visitor)
8370 v
.enter_visit
(_n_classid
)
8375 n_comment
: Collection[Object] # Should be Collection[TComment]
8378 self.n_comment
.unsafe_add_all
(n_comment
)
8381 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8383 if n_comment
.replace_child
(old_child
, new_child
) then return
8388 redef fun visit_all
(v
: Visitor)
8390 n_comment
.visit_all
(v
)
8393 redef class AAnnotations
8394 init init_aannotations
(
8395 n_kwis
: nullable TKwis,
8397 n_opar
: nullable TOpar,
8398 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8399 n_cpar
: nullable TCpar,
8400 n_kwend
: nullable TKwend
8404 if n_kwis
!= null then n_kwis
.parent
= self
8406 if n_at
!= null then n_at
.parent
= self
8408 if n_opar
!= null then n_opar
.parent
= self
8409 self.n_items
.unsafe_add_all
(n_items
)
8411 if n_cpar
!= null then n_cpar
.parent
= self
8413 if n_kwend
!= null then n_kwend
.parent
= self
8416 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8418 if _n_kwis
== old_child
then
8419 n_kwis
= new_child
.as(nullable TKwis)
8422 if _n_at
== old_child
then
8423 n_at
= new_child
.as(nullable TAt)
8426 if _n_opar
== old_child
then
8427 n_opar
= new_child
.as(nullable TOpar)
8430 if n_items
.replace_child
(old_child
, new_child
) then return
8431 if _n_cpar
== old_child
then
8432 n_cpar
= new_child
.as(nullable TCpar)
8435 if _n_kwend
== old_child
then
8436 n_kwend
= new_child
.as(nullable TKwend)
8441 redef fun n_kwis
=(node
)
8444 if node
!= null then node
.parent
= self
8446 redef fun n_at
=(node
)
8449 if node
!= null then node
.parent
= self
8451 redef fun n_opar
=(node
)
8454 if node
!= null then node
.parent
= self
8456 redef fun n_cpar
=(node
)
8459 if node
!= null then node
.parent
= self
8461 redef fun n_kwend
=(node
)
8464 if node
!= null then node
.parent
= self
8468 redef fun visit_all
(v
: Visitor)
8470 v
.enter_visit
(_n_kwis
)
8471 v
.enter_visit
(_n_at
)
8472 v
.enter_visit
(_n_opar
)
8473 n_items
.visit_all
(v
)
8474 v
.enter_visit
(_n_cpar
)
8475 v
.enter_visit
(_n_kwend
)
8478 redef class AAnnotation
8479 init init_aannotation
(
8480 n_doc
: nullable ADoc,
8481 n_kwredef
: nullable TKwredef,
8482 n_visibility
: nullable AVisibility,
8483 n_atid
: nullable AAtid,
8484 n_opar
: nullable TOpar,
8485 n_args
: Collection[Object], # Should be Collection[AExpr]
8486 n_cpar
: nullable TCpar,
8487 n_annotations
: nullable AAnnotations
8491 if n_doc
!= null then n_doc
.parent
= self
8492 _n_kwredef
= n_kwredef
8493 if n_kwredef
!= null then n_kwredef
.parent
= self
8494 _n_visibility
= n_visibility
8495 if n_visibility
!= null then n_visibility
.parent
= self
8496 _n_atid
= n_atid
.as(not null)
8497 n_atid
.parent
= self
8499 if n_opar
!= null then n_opar
.parent
= self
8500 self.n_args
.unsafe_add_all
(n_args
)
8502 if n_cpar
!= null then n_cpar
.parent
= self
8503 _n_annotations
= n_annotations
8504 if n_annotations
!= null then n_annotations
.parent
= self
8507 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8509 if _n_doc
== old_child
then
8510 n_doc
= new_child
.as(nullable ADoc)
8513 if _n_kwredef
== old_child
then
8514 n_kwredef
= new_child
.as(nullable TKwredef)
8517 if _n_visibility
== old_child
then
8518 n_visibility
= new_child
.as(nullable AVisibility)
8521 if _n_atid
== old_child
then
8522 n_atid
= new_child
.as(AAtid)
8525 if _n_opar
== old_child
then
8526 n_opar
= new_child
.as(nullable TOpar)
8529 if n_args
.replace_child
(old_child
, new_child
) then return
8530 if _n_cpar
== old_child
then
8531 n_cpar
= new_child
.as(nullable TCpar)
8534 if _n_annotations
== old_child
then
8535 n_annotations
= new_child
.as(nullable AAnnotations)
8540 redef fun n_doc
=(node
)
8543 if node
!= null then node
.parent
= self
8545 redef fun n_kwredef
=(node
)
8548 if node
!= null then node
.parent
= self
8550 redef fun n_visibility
=(node
)
8552 _n_visibility
= node
8553 if node
!= null then node
.parent
= self
8555 redef fun n_atid
=(node
)
8560 redef fun n_opar
=(node
)
8563 if node
!= null then node
.parent
= self
8565 redef fun n_cpar
=(node
)
8568 if node
!= null then node
.parent
= self
8570 redef fun n_annotations
=(node
)
8572 _n_annotations
= node
8573 if node
!= null then node
.parent
= self
8577 redef fun visit_all
(v
: Visitor)
8579 v
.enter_visit
(_n_doc
)
8580 v
.enter_visit
(_n_kwredef
)
8581 v
.enter_visit
(_n_visibility
)
8582 v
.enter_visit
(_n_atid
)
8583 v
.enter_visit
(_n_opar
)
8585 v
.enter_visit
(_n_cpar
)
8586 v
.enter_visit
(_n_annotations
)
8594 _n_id
= n_id
.as(not null)
8598 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8600 if _n_id
== old_child
then
8601 n_id
= new_child
.as(TId)
8606 redef fun n_id
=(node
)
8613 redef fun visit_all
(v
: Visitor)
8615 v
.enter_visit
(_n_id
)
8618 redef class AKwexternAtid
8619 init init_akwexternatid
(
8620 n_id
: nullable TKwextern
8623 _n_id
= n_id
.as(not null)
8627 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8629 if _n_id
== old_child
then
8630 n_id
= new_child
.as(TKwextern)
8635 redef fun n_id
=(node
)
8642 redef fun visit_all
(v
: Visitor)
8644 v
.enter_visit
(_n_id
)
8647 redef class AKwabstractAtid
8648 init init_akwabstractatid
(
8649 n_id
: nullable TKwabstract
8652 _n_id
= n_id
.as(not null)
8656 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8658 if _n_id
== old_child
then
8659 n_id
= new_child
.as(TKwabstract)
8664 redef fun n_id
=(node
)
8671 redef fun visit_all
(v
: Visitor)
8673 v
.enter_visit
(_n_id
)
8676 redef class AKwimportAtid
8677 init init_akwimportatid
(
8678 n_id
: nullable TKwimport
8681 _n_id
= n_id
.as(not null)
8685 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8687 if _n_id
== old_child
then
8688 n_id
= new_child
.as(TKwimport)
8693 redef fun n_id
=(node
)
8700 redef fun visit_all
(v
: Visitor)
8702 v
.enter_visit
(_n_id
)
8707 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8709 if _n_base
== old_child
then
8710 if new_child
== null then
8712 new_child
.parent
= self
8713 assert new_child
isa AModule
8716 old_child
.parent
= null
8721 redef fun visit_all
(v
: Visitor)
8723 if _n_base
!= null then
8724 v
.enter_visit
(_n_base
.as(not null))
8726 v
.enter_visit
(_n_eof
)