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 ASubsetClasskind
736 init init_asubsetclasskind
(
737 n_kwsubset
: nullable TKwsubset
740 _n_kwsubset
= n_kwsubset
.as(not null)
741 n_kwsubset
.parent
= self
744 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
746 if _n_kwsubset
== old_child
then
747 n_kwsubset
= new_child
.as(TKwsubset)
752 redef fun n_kwsubset
=(node
)
759 redef fun visit_all
(v
: Visitor)
761 v
.enter_visit
(_n_kwsubset
)
764 redef class AFormaldef
765 init init_aformaldef
(
766 n_id
: nullable TClassid,
767 n_type
: nullable AType,
768 n_annotations
: nullable AAnnotations
771 _n_id
= n_id
.as(not null)
774 if n_type
!= null then n_type
.parent
= self
775 _n_annotations
= n_annotations
776 if n_annotations
!= null then n_annotations
.parent
= self
779 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
781 if _n_id
== old_child
then
782 n_id
= new_child
.as(TClassid)
785 if _n_type
== old_child
then
786 n_type
= new_child
.as(nullable AType)
789 if _n_annotations
== old_child
then
790 n_annotations
= new_child
.as(nullable AAnnotations)
795 redef fun n_id
=(node
)
800 redef fun n_type
=(node
)
803 if node
!= null then node
.parent
= self
805 redef fun n_annotations
=(node
)
807 _n_annotations
= node
808 if node
!= null then node
.parent
= self
812 redef fun visit_all
(v
: Visitor)
815 v
.enter_visit
(_n_type
)
816 v
.enter_visit
(_n_annotations
)
819 redef class AAttrPropdef
820 init init_aattrpropdef
(
821 n_doc
: nullable ADoc,
822 n_kwredef
: nullable TKwredef,
823 n_visibility
: nullable AVisibility,
824 n_kwvar
: nullable TKwvar,
826 n_type
: nullable AType,
827 n_assign
: nullable TAssign,
828 n_expr
: nullable AExpr,
829 n_annotations
: nullable AAnnotations,
830 n_kwdo
: nullable TKwdo,
831 n_block
: nullable AExpr,
832 n_kwend
: nullable TKwend
836 if n_doc
!= null then n_doc
.parent
= self
837 _n_kwredef
= n_kwredef
838 if n_kwredef
!= null then n_kwredef
.parent
= self
839 _n_visibility
= n_visibility
.as(not null)
840 n_visibility
.parent
= self
841 _n_kwvar
= n_kwvar
.as(not null)
842 n_kwvar
.parent
= self
843 _n_id2
= n_id2
.as(not null)
846 if n_type
!= null then n_type
.parent
= self
848 if n_assign
!= null then n_assign
.parent
= self
850 if n_expr
!= null then n_expr
.parent
= self
851 _n_annotations
= n_annotations
852 if n_annotations
!= null then n_annotations
.parent
= self
854 if n_kwdo
!= null then n_kwdo
.parent
= self
856 if n_block
!= null then n_block
.parent
= self
858 if n_kwend
!= null then n_kwend
.parent
= self
861 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
863 if _n_doc
== old_child
then
864 n_doc
= new_child
.as(nullable ADoc)
867 if _n_kwredef
== old_child
then
868 n_kwredef
= new_child
.as(nullable TKwredef)
871 if _n_visibility
== old_child
then
872 n_visibility
= new_child
.as(AVisibility)
875 if _n_kwvar
== old_child
then
876 n_kwvar
= new_child
.as(TKwvar)
879 if _n_id2
== old_child
then
880 n_id2
= new_child
.as(TId)
883 if _n_type
== old_child
then
884 n_type
= new_child
.as(nullable AType)
887 if _n_assign
== old_child
then
888 n_assign
= new_child
.as(nullable TAssign)
891 if _n_expr
== old_child
then
892 n_expr
= new_child
.as(nullable AExpr)
895 if _n_annotations
== old_child
then
896 n_annotations
= new_child
.as(nullable AAnnotations)
899 if _n_kwdo
== old_child
then
900 n_kwdo
= new_child
.as(nullable TKwdo)
903 if _n_block
== old_child
then
904 n_block
= new_child
.as(nullable AExpr)
907 if _n_kwend
== old_child
then
908 n_kwend
= new_child
.as(nullable TKwend)
913 redef fun n_doc
=(node
)
916 if node
!= null then node
.parent
= self
918 redef fun n_kwredef
=(node
)
921 if node
!= null then node
.parent
= self
923 redef fun n_visibility
=(node
)
928 redef fun n_kwvar
=(node
)
933 redef fun n_id2
=(node
)
938 redef fun n_type
=(node
)
941 if node
!= null then node
.parent
= self
943 redef fun n_assign
=(node
)
946 if node
!= null then node
.parent
= self
948 redef fun n_expr
=(node
)
951 if node
!= null then node
.parent
= self
953 redef fun n_annotations
=(node
)
955 _n_annotations
= node
956 if node
!= null then node
.parent
= self
958 redef fun n_kwdo
=(node
)
961 if node
!= null then node
.parent
= self
963 redef fun n_block
=(node
)
966 if node
!= null then node
.parent
= self
968 redef fun n_kwend
=(node
)
971 if node
!= null then node
.parent
= self
975 redef fun visit_all
(v
: Visitor)
977 v
.enter_visit
(_n_doc
)
978 v
.enter_visit
(_n_kwredef
)
979 v
.enter_visit
(_n_visibility
)
980 v
.enter_visit
(_n_kwvar
)
981 v
.enter_visit
(_n_id2
)
982 v
.enter_visit
(_n_type
)
983 v
.enter_visit
(_n_assign
)
984 v
.enter_visit
(_n_expr
)
985 v
.enter_visit
(_n_annotations
)
986 v
.enter_visit
(_n_kwdo
)
987 v
.enter_visit
(_n_block
)
988 v
.enter_visit
(_n_kwend
)
991 redef class AMainMethPropdef
992 init init_amainmethpropdef
(
993 n_kwredef
: nullable TKwredef,
994 n_block
: nullable AExpr
997 _n_kwredef
= n_kwredef
998 if n_kwredef
!= null then n_kwredef
.parent
= self
1000 if n_block
!= null then n_block
.parent
= self
1003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1005 if _n_kwredef
== old_child
then
1006 n_kwredef
= new_child
.as(nullable TKwredef)
1009 if _n_block
== old_child
then
1010 n_block
= new_child
.as(nullable AExpr)
1015 redef fun n_kwredef
=(node
)
1018 if node
!= null then node
.parent
= self
1020 redef fun n_block
=(node
)
1023 if node
!= null then node
.parent
= self
1027 redef fun visit_all
(v
: Visitor)
1029 v
.enter_visit
(_n_kwredef
)
1030 v
.enter_visit
(_n_block
)
1033 redef class ATypePropdef
1034 init init_atypepropdef
(
1035 n_doc
: nullable ADoc,
1036 n_kwredef
: nullable TKwredef,
1037 n_visibility
: nullable AVisibility,
1038 n_kwtype
: nullable TKwtype,
1039 n_qid
: nullable AQclassid,
1040 n_type
: nullable AType,
1041 n_annotations
: nullable AAnnotations
1045 if n_doc
!= null then n_doc
.parent
= self
1046 _n_kwredef
= n_kwredef
1047 if n_kwredef
!= null then n_kwredef
.parent
= self
1048 _n_visibility
= n_visibility
.as(not null)
1049 n_visibility
.parent
= self
1050 _n_kwtype
= n_kwtype
.as(not null)
1051 n_kwtype
.parent
= self
1052 _n_qid
= n_qid
.as(not null)
1054 _n_type
= n_type
.as(not null)
1055 n_type
.parent
= self
1056 _n_annotations
= n_annotations
1057 if n_annotations
!= null then n_annotations
.parent
= self
1060 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1062 if _n_doc
== old_child
then
1063 n_doc
= new_child
.as(nullable ADoc)
1066 if _n_kwredef
== old_child
then
1067 n_kwredef
= new_child
.as(nullable TKwredef)
1070 if _n_visibility
== old_child
then
1071 n_visibility
= new_child
.as(AVisibility)
1074 if _n_kwtype
== old_child
then
1075 n_kwtype
= new_child
.as(TKwtype)
1078 if _n_qid
== old_child
then
1079 n_qid
= new_child
.as(AQclassid)
1082 if _n_type
== old_child
then
1083 n_type
= new_child
.as(AType)
1086 if _n_annotations
== old_child
then
1087 n_annotations
= new_child
.as(nullable AAnnotations)
1092 redef fun n_doc
=(node
)
1095 if node
!= null then node
.parent
= self
1097 redef fun n_kwredef
=(node
)
1100 if node
!= null then node
.parent
= self
1102 redef fun n_visibility
=(node
)
1104 _n_visibility
= node
1107 redef fun n_kwtype
=(node
)
1112 redef fun n_qid
=(node
)
1117 redef fun n_type
=(node
)
1122 redef fun n_annotations
=(node
)
1124 _n_annotations
= node
1125 if node
!= null then node
.parent
= self
1129 redef fun visit_all
(v
: Visitor)
1131 v
.enter_visit
(_n_doc
)
1132 v
.enter_visit
(_n_kwredef
)
1133 v
.enter_visit
(_n_visibility
)
1134 v
.enter_visit
(_n_kwtype
)
1135 v
.enter_visit
(_n_qid
)
1136 v
.enter_visit
(_n_type
)
1137 v
.enter_visit
(_n_annotations
)
1140 redef class AMethPropdef
1141 init init_amethpropdef
(
1142 n_doc
: nullable ADoc,
1143 n_kwredef
: nullable TKwredef,
1144 n_visibility
: nullable AVisibility,
1145 n_kwmeth
: nullable TKwmeth,
1146 n_kwinit
: nullable TKwinit,
1147 n_kwisa
: nullable TKwisa,
1148 n_kwnew
: nullable TKwnew,
1149 n_methid
: nullable AMethid,
1150 n_signature
: nullable ASignature,
1151 n_annotations
: nullable AAnnotations,
1152 n_extern_calls
: nullable AExternCalls,
1153 n_extern_code_block
: nullable AExternCodeBlock,
1154 n_kwdo
: nullable TKwdo,
1155 n_block
: nullable AExpr,
1156 n_kwend
: nullable TKwend
1160 if n_doc
!= null then n_doc
.parent
= self
1161 _n_kwredef
= n_kwredef
1162 if n_kwredef
!= null then n_kwredef
.parent
= self
1163 _n_visibility
= n_visibility
.as(not null)
1164 n_visibility
.parent
= self
1165 _n_kwmeth
= n_kwmeth
1166 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1167 _n_kwinit
= n_kwinit
1168 if n_kwinit
!= null then n_kwinit
.parent
= self
1170 if n_kwisa
!= null then n_kwisa
.parent
= self
1172 if n_kwnew
!= null then n_kwnew
.parent
= self
1173 _n_methid
= n_methid
1174 if n_methid
!= null then n_methid
.parent
= self
1175 _n_signature
= n_signature
.as(not null)
1176 n_signature
.parent
= self
1177 _n_annotations
= n_annotations
1178 if n_annotations
!= null then n_annotations
.parent
= self
1179 _n_extern_calls
= n_extern_calls
1180 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1181 _n_extern_code_block
= n_extern_code_block
1182 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1184 if n_kwdo
!= null then n_kwdo
.parent
= self
1186 if n_block
!= null then n_block
.parent
= self
1188 if n_kwend
!= null then n_kwend
.parent
= self
1191 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1193 if _n_doc
== old_child
then
1194 n_doc
= new_child
.as(nullable ADoc)
1197 if _n_kwredef
== old_child
then
1198 n_kwredef
= new_child
.as(nullable TKwredef)
1201 if _n_visibility
== old_child
then
1202 n_visibility
= new_child
.as(AVisibility)
1205 if _n_kwmeth
== old_child
then
1206 n_kwmeth
= new_child
.as(nullable TKwmeth)
1209 if _n_kwinit
== old_child
then
1210 n_kwinit
= new_child
.as(nullable TKwinit)
1213 if _n_kwisa
== old_child
then
1214 n_kwisa
= new_child
.as(nullable TKwisa)
1217 if _n_kwnew
== old_child
then
1218 n_kwnew
= new_child
.as(nullable TKwnew)
1221 if _n_methid
== old_child
then
1222 n_methid
= new_child
.as(nullable AMethid)
1225 if _n_signature
== old_child
then
1226 n_signature
= new_child
.as(ASignature)
1229 if _n_annotations
== old_child
then
1230 n_annotations
= new_child
.as(nullable AAnnotations)
1233 if _n_extern_calls
== old_child
then
1234 n_extern_calls
= new_child
.as(nullable AExternCalls)
1237 if _n_extern_code_block
== old_child
then
1238 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1241 if _n_kwdo
== old_child
then
1242 n_kwdo
= new_child
.as(nullable TKwdo)
1245 if _n_block
== old_child
then
1246 n_block
= new_child
.as(nullable AExpr)
1249 if _n_kwend
== old_child
then
1250 n_kwend
= new_child
.as(nullable TKwend)
1255 redef fun n_doc
=(node
)
1258 if node
!= null then node
.parent
= self
1260 redef fun n_kwredef
=(node
)
1263 if node
!= null then node
.parent
= self
1265 redef fun n_visibility
=(node
)
1267 _n_visibility
= node
1270 redef fun n_kwmeth
=(node
)
1273 if node
!= null then node
.parent
= self
1275 redef fun n_kwinit
=(node
)
1278 if node
!= null then node
.parent
= self
1280 redef fun n_kwisa
=(node
)
1283 if node
!= null then node
.parent
= self
1285 redef fun n_kwnew
=(node
)
1288 if node
!= null then node
.parent
= self
1290 redef fun n_methid
=(node
)
1293 if node
!= null then node
.parent
= self
1295 redef fun n_signature
=(node
)
1300 redef fun n_annotations
=(node
)
1302 _n_annotations
= node
1303 if node
!= null then node
.parent
= self
1305 redef fun n_extern_calls
=(node
)
1307 _n_extern_calls
= node
1308 if node
!= null then node
.parent
= self
1310 redef fun n_extern_code_block
=(node
)
1312 _n_extern_code_block
= node
1313 if node
!= null then node
.parent
= self
1315 redef fun n_kwdo
=(node
)
1318 if node
!= null then node
.parent
= self
1320 redef fun n_block
=(node
)
1323 if node
!= null then node
.parent
= self
1325 redef fun n_kwend
=(node
)
1328 if node
!= null then node
.parent
= self
1332 redef fun visit_all
(v
: Visitor)
1334 v
.enter_visit
(_n_doc
)
1335 v
.enter_visit
(_n_kwredef
)
1336 v
.enter_visit
(_n_visibility
)
1337 v
.enter_visit
(_n_kwmeth
)
1338 v
.enter_visit
(_n_kwinit
)
1339 v
.enter_visit
(_n_kwisa
)
1340 v
.enter_visit
(_n_kwnew
)
1341 v
.enter_visit
(_n_methid
)
1342 v
.enter_visit
(_n_signature
)
1343 v
.enter_visit
(_n_annotations
)
1344 v
.enter_visit
(_n_extern_calls
)
1345 v
.enter_visit
(_n_extern_code_block
)
1346 v
.enter_visit
(_n_kwdo
)
1347 v
.enter_visit
(_n_block
)
1348 v
.enter_visit
(_n_kwend
)
1351 redef class ASuperPropdef
1352 init init_asuperpropdef
(
1353 n_doc
: nullable ADoc,
1354 n_kwredef
: nullable TKwredef,
1355 n_visibility
: nullable AVisibility,
1356 n_kwsuper
: nullable TKwsuper,
1357 n_type
: nullable AType,
1358 n_annotations
: nullable AAnnotations
1362 if n_doc
!= null then n_doc
.parent
= self
1363 _n_kwredef
= n_kwredef
1364 if n_kwredef
!= null then n_kwredef
.parent
= self
1365 _n_visibility
= n_visibility
.as(not null)
1366 n_visibility
.parent
= self
1367 _n_kwsuper
= n_kwsuper
.as(not null)
1368 n_kwsuper
.parent
= self
1369 _n_type
= n_type
.as(not null)
1370 n_type
.parent
= self
1371 _n_annotations
= n_annotations
1372 if n_annotations
!= null then n_annotations
.parent
= self
1375 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1377 if _n_doc
== old_child
then
1378 n_doc
= new_child
.as(nullable ADoc)
1381 if _n_kwredef
== old_child
then
1382 n_kwredef
= new_child
.as(nullable TKwredef)
1385 if _n_visibility
== old_child
then
1386 n_visibility
= new_child
.as(AVisibility)
1389 if _n_kwsuper
== old_child
then
1390 n_kwsuper
= new_child
.as(TKwsuper)
1393 if _n_type
== old_child
then
1394 n_type
= new_child
.as(AType)
1397 if _n_annotations
== old_child
then
1398 n_annotations
= new_child
.as(nullable AAnnotations)
1403 redef fun n_doc
=(node
)
1406 if node
!= null then node
.parent
= self
1408 redef fun n_kwredef
=(node
)
1411 if node
!= null then node
.parent
= self
1413 redef fun n_visibility
=(node
)
1415 _n_visibility
= node
1418 redef fun n_kwsuper
=(node
)
1423 redef fun n_type
=(node
)
1428 redef fun n_annotations
=(node
)
1430 _n_annotations
= node
1431 if node
!= null then node
.parent
= self
1435 redef fun visit_all
(v
: Visitor)
1437 v
.enter_visit
(_n_doc
)
1438 v
.enter_visit
(_n_kwredef
)
1439 v
.enter_visit
(_n_visibility
)
1440 v
.enter_visit
(_n_kwsuper
)
1441 v
.enter_visit
(_n_type
)
1442 v
.enter_visit
(_n_annotations
)
1445 redef class AAnnotPropdef
1446 init init_aannotpropdef
(
1447 n_doc
: nullable ADoc,
1448 n_kwredef
: nullable TKwredef,
1449 n_visibility
: nullable AVisibility,
1450 n_atid
: nullable AAtid,
1451 n_opar
: nullable TOpar,
1452 n_args
: Collection[Object], # Should be Collection[AExpr]
1453 n_cpar
: nullable TCpar,
1454 n_annotations
: nullable AAnnotations
1458 if n_doc
!= null then n_doc
.parent
= self
1459 _n_kwredef
= n_kwredef
1460 if n_kwredef
!= null then n_kwredef
.parent
= self
1461 _n_visibility
= n_visibility
1462 if n_visibility
!= null then n_visibility
.parent
= self
1463 _n_atid
= n_atid
.as(not null)
1464 n_atid
.parent
= self
1466 if n_opar
!= null then n_opar
.parent
= self
1467 self.n_args
.unsafe_add_all
(n_args
)
1469 if n_cpar
!= null then n_cpar
.parent
= self
1470 _n_annotations
= n_annotations
1471 if n_annotations
!= null then n_annotations
.parent
= self
1474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1476 if _n_doc
== old_child
then
1477 n_doc
= new_child
.as(nullable ADoc)
1480 if _n_kwredef
== old_child
then
1481 n_kwredef
= new_child
.as(nullable TKwredef)
1484 if _n_visibility
== old_child
then
1485 n_visibility
= new_child
.as(nullable AVisibility)
1488 if _n_atid
== old_child
then
1489 n_atid
= new_child
.as(AAtid)
1492 if _n_opar
== old_child
then
1493 n_opar
= new_child
.as(nullable TOpar)
1496 if n_args
.replace_child
(old_child
, new_child
) then return
1497 if _n_cpar
== old_child
then
1498 n_cpar
= new_child
.as(nullable TCpar)
1501 if _n_annotations
== old_child
then
1502 n_annotations
= new_child
.as(nullable AAnnotations)
1507 redef fun n_doc
=(node
)
1510 if node
!= null then node
.parent
= self
1512 redef fun n_kwredef
=(node
)
1515 if node
!= null then node
.parent
= self
1517 redef fun n_visibility
=(node
)
1519 _n_visibility
= node
1520 if node
!= null then node
.parent
= self
1522 redef fun n_atid
=(node
)
1527 redef fun n_opar
=(node
)
1530 if node
!= null then node
.parent
= self
1532 redef fun n_cpar
=(node
)
1535 if node
!= null then node
.parent
= self
1537 redef fun n_annotations
=(node
)
1539 _n_annotations
= node
1540 if node
!= null then node
.parent
= self
1544 redef fun visit_all
(v
: Visitor)
1546 v
.enter_visit
(_n_doc
)
1547 v
.enter_visit
(_n_kwredef
)
1548 v
.enter_visit
(_n_visibility
)
1549 v
.enter_visit
(_n_atid
)
1550 v
.enter_visit
(_n_opar
)
1552 v
.enter_visit
(_n_cpar
)
1553 v
.enter_visit
(_n_annotations
)
1556 redef class AIdMethid
1557 init init_aidmethid
(
1561 _n_id
= n_id
.as(not null)
1565 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1567 if _n_id
== old_child
then
1568 n_id
= new_child
.as(TId)
1573 redef fun n_id
=(node
)
1580 redef fun visit_all
(v
: Visitor)
1582 v
.enter_visit
(_n_id
)
1585 redef class APlusMethid
1586 init init_aplusmethid
(
1587 n_op
: nullable TPlus
1590 _n_op
= n_op
.as(not null)
1594 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1596 if _n_op
== old_child
then
1597 n_op
= new_child
.as(TPlus)
1602 redef fun n_op
=(node
)
1609 redef fun visit_all
(v
: Visitor)
1611 v
.enter_visit
(_n_op
)
1614 redef class AMinusMethid
1615 init init_aminusmethid
(
1616 n_op
: nullable TMinus
1619 _n_op
= n_op
.as(not null)
1623 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1625 if _n_op
== old_child
then
1626 n_op
= new_child
.as(TMinus)
1631 redef fun n_op
=(node
)
1638 redef fun visit_all
(v
: Visitor)
1640 v
.enter_visit
(_n_op
)
1643 redef class AStarMethid
1644 init init_astarmethid
(
1645 n_op
: nullable TStar
1648 _n_op
= n_op
.as(not null)
1652 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1654 if _n_op
== old_child
then
1655 n_op
= new_child
.as(TStar)
1660 redef fun n_op
=(node
)
1667 redef fun visit_all
(v
: Visitor)
1669 v
.enter_visit
(_n_op
)
1672 redef class AStarstarMethid
1673 init init_astarstarmethid
(
1674 n_op
: nullable TStarstar
1677 _n_op
= n_op
.as(not null)
1681 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1683 if _n_op
== old_child
then
1684 n_op
= new_child
.as(TStarstar)
1689 redef fun n_op
=(node
)
1696 redef fun visit_all
(v
: Visitor)
1698 v
.enter_visit
(_n_op
)
1701 redef class ASlashMethid
1702 init init_aslashmethid
(
1703 n_op
: nullable TSlash
1706 _n_op
= n_op
.as(not null)
1710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1712 if _n_op
== old_child
then
1713 n_op
= new_child
.as(TSlash)
1718 redef fun n_op
=(node
)
1725 redef fun visit_all
(v
: Visitor)
1727 v
.enter_visit
(_n_op
)
1730 redef class APercentMethid
1731 init init_apercentmethid
(
1732 n_op
: nullable TPercent
1735 _n_op
= n_op
.as(not null)
1739 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1741 if _n_op
== old_child
then
1742 n_op
= new_child
.as(TPercent)
1747 redef fun n_op
=(node
)
1754 redef fun visit_all
(v
: Visitor)
1756 v
.enter_visit
(_n_op
)
1759 redef class AEqMethid
1760 init init_aeqmethid
(
1764 _n_op
= n_op
.as(not null)
1768 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1770 if _n_op
== old_child
then
1771 n_op
= new_child
.as(TEq)
1776 redef fun n_op
=(node
)
1783 redef fun visit_all
(v
: Visitor)
1785 v
.enter_visit
(_n_op
)
1788 redef class ANeMethid
1789 init init_anemethid
(
1793 _n_op
= n_op
.as(not null)
1797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1799 if _n_op
== old_child
then
1800 n_op
= new_child
.as(TNe)
1805 redef fun n_op
=(node
)
1812 redef fun visit_all
(v
: Visitor)
1814 v
.enter_visit
(_n_op
)
1817 redef class ALeMethid
1818 init init_alemethid
(
1822 _n_op
= n_op
.as(not null)
1826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1828 if _n_op
== old_child
then
1829 n_op
= new_child
.as(TLe)
1834 redef fun n_op
=(node
)
1841 redef fun visit_all
(v
: Visitor)
1843 v
.enter_visit
(_n_op
)
1846 redef class AGeMethid
1847 init init_agemethid
(
1851 _n_op
= n_op
.as(not null)
1855 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1857 if _n_op
== old_child
then
1858 n_op
= new_child
.as(TGe)
1863 redef fun n_op
=(node
)
1870 redef fun visit_all
(v
: Visitor)
1872 v
.enter_visit
(_n_op
)
1875 redef class ALtMethid
1876 init init_altmethid
(
1880 _n_op
= n_op
.as(not null)
1884 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1886 if _n_op
== old_child
then
1887 n_op
= new_child
.as(TLt)
1892 redef fun n_op
=(node
)
1899 redef fun visit_all
(v
: Visitor)
1901 v
.enter_visit
(_n_op
)
1904 redef class AGtMethid
1905 init init_agtmethid
(
1909 _n_op
= n_op
.as(not null)
1913 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1915 if _n_op
== old_child
then
1916 n_op
= new_child
.as(TGt)
1921 redef fun n_op
=(node
)
1928 redef fun visit_all
(v
: Visitor)
1930 v
.enter_visit
(_n_op
)
1933 redef class ALlMethid
1934 init init_allmethid
(
1938 _n_op
= n_op
.as(not null)
1942 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1944 if _n_op
== old_child
then
1945 n_op
= new_child
.as(TLl)
1950 redef fun n_op
=(node
)
1957 redef fun visit_all
(v
: Visitor)
1959 v
.enter_visit
(_n_op
)
1962 redef class AGgMethid
1963 init init_aggmethid
(
1967 _n_op
= n_op
.as(not null)
1971 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1973 if _n_op
== old_child
then
1974 n_op
= new_child
.as(TGg)
1979 redef fun n_op
=(node
)
1986 redef fun visit_all
(v
: Visitor)
1988 v
.enter_visit
(_n_op
)
1991 redef class AStarshipMethid
1992 init init_astarshipmethid
(
1993 n_op
: nullable TStarship
1996 _n_op
= n_op
.as(not null)
2000 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2002 if _n_op
== old_child
then
2003 n_op
= new_child
.as(TStarship)
2008 redef fun n_op
=(node
)
2015 redef fun visit_all
(v
: Visitor)
2017 v
.enter_visit
(_n_op
)
2020 redef class APipeMethid
2021 init init_apipemethid
(
2022 n_op
: nullable TPipe
2025 _n_op
= n_op
.as(not null)
2029 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2031 if _n_op
== old_child
then
2032 n_op
= new_child
.as(TPipe)
2037 redef fun n_op
=(node
)
2044 redef fun visit_all
(v
: Visitor)
2046 v
.enter_visit
(_n_op
)
2049 redef class ACaretMethid
2050 init init_acaretmethid
(
2051 n_op
: nullable TCaret
2054 _n_op
= n_op
.as(not null)
2058 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2060 if _n_op
== old_child
then
2061 n_op
= new_child
.as(TCaret)
2066 redef fun n_op
=(node
)
2073 redef fun visit_all
(v
: Visitor)
2075 v
.enter_visit
(_n_op
)
2078 redef class AAmpMethid
2079 init init_aampmethid
(
2083 _n_op
= n_op
.as(not null)
2087 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2089 if _n_op
== old_child
then
2090 n_op
= new_child
.as(TAmp)
2095 redef fun n_op
=(node
)
2102 redef fun visit_all
(v
: Visitor)
2104 v
.enter_visit
(_n_op
)
2107 redef class ATildeMethid
2108 init init_atildemethid
(
2109 n_op
: nullable TTilde
2112 _n_op
= n_op
.as(not null)
2116 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2118 if _n_op
== old_child
then
2119 n_op
= new_child
.as(TTilde)
2124 redef fun n_op
=(node
)
2131 redef fun visit_all
(v
: Visitor)
2133 v
.enter_visit
(_n_op
)
2136 redef class ABraMethid
2137 init init_abramethid
(
2138 n_obra
: nullable TObra,
2139 n_cbra
: nullable TCbra
2142 _n_obra
= n_obra
.as(not null)
2143 n_obra
.parent
= self
2144 _n_cbra
= n_cbra
.as(not null)
2145 n_cbra
.parent
= self
2148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2150 if _n_obra
== old_child
then
2151 n_obra
= new_child
.as(TObra)
2154 if _n_cbra
== old_child
then
2155 n_cbra
= new_child
.as(TCbra)
2160 redef fun n_obra
=(node
)
2165 redef fun n_cbra
=(node
)
2172 redef fun visit_all
(v
: Visitor)
2174 v
.enter_visit
(_n_obra
)
2175 v
.enter_visit
(_n_cbra
)
2178 redef class AAssignMethid
2179 init init_aassignmethid
(
2181 n_assign
: nullable TAssign
2184 _n_id
= n_id
.as(not null)
2186 _n_assign
= n_assign
.as(not null)
2187 n_assign
.parent
= self
2190 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2192 if _n_id
== old_child
then
2193 n_id
= new_child
.as(TId)
2196 if _n_assign
== old_child
then
2197 n_assign
= new_child
.as(TAssign)
2202 redef fun n_id
=(node
)
2207 redef fun n_assign
=(node
)
2214 redef fun visit_all
(v
: Visitor)
2216 v
.enter_visit
(_n_id
)
2217 v
.enter_visit
(_n_assign
)
2220 redef class ABraassignMethid
2221 init init_abraassignmethid
(
2222 n_obra
: nullable TObra,
2223 n_cbra
: nullable TCbra,
2224 n_assign
: nullable TAssign
2227 _n_obra
= n_obra
.as(not null)
2228 n_obra
.parent
= self
2229 _n_cbra
= n_cbra
.as(not null)
2230 n_cbra
.parent
= self
2231 _n_assign
= n_assign
.as(not null)
2232 n_assign
.parent
= self
2235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2237 if _n_obra
== old_child
then
2238 n_obra
= new_child
.as(TObra)
2241 if _n_cbra
== old_child
then
2242 n_cbra
= new_child
.as(TCbra)
2245 if _n_assign
== old_child
then
2246 n_assign
= new_child
.as(TAssign)
2251 redef fun n_obra
=(node
)
2256 redef fun n_cbra
=(node
)
2261 redef fun n_assign
=(node
)
2268 redef fun visit_all
(v
: Visitor)
2270 v
.enter_visit
(_n_obra
)
2271 v
.enter_visit
(_n_cbra
)
2272 v
.enter_visit
(_n_assign
)
2277 n_qualified
: nullable AQualified,
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(TId)
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 AQclassid
2318 init init_aqclassid
(
2319 n_qualified
: nullable AQualified,
2320 n_id
: nullable TClassid
2323 _n_qualified
= n_qualified
2324 if n_qualified
!= null then n_qualified
.parent
= self
2325 _n_id
= n_id
.as(not null)
2329 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2331 if _n_qualified
== old_child
then
2332 n_qualified
= new_child
.as(nullable AQualified)
2335 if _n_id
== old_child
then
2336 n_id
= new_child
.as(TClassid)
2341 redef fun n_qualified
=(node
)
2344 if node
!= null then node
.parent
= self
2346 redef fun n_id
=(node
)
2353 redef fun visit_all
(v
: Visitor)
2355 v
.enter_visit
(_n_qualified
)
2356 v
.enter_visit
(_n_id
)
2359 redef class ASignature
2360 init init_asignature
(
2361 n_opar
: nullable TOpar,
2362 n_params
: Collection[Object], # Should be Collection[AParam]
2363 n_cpar
: nullable TCpar,
2364 n_type
: nullable AType
2368 if n_opar
!= null then n_opar
.parent
= self
2369 self.n_params
.unsafe_add_all
(n_params
)
2371 if n_cpar
!= null then n_cpar
.parent
= self
2373 if n_type
!= null then n_type
.parent
= self
2376 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2378 if _n_opar
== old_child
then
2379 n_opar
= new_child
.as(nullable TOpar)
2382 if n_params
.replace_child
(old_child
, new_child
) then return
2383 if _n_cpar
== old_child
then
2384 n_cpar
= new_child
.as(nullable TCpar)
2387 if _n_type
== old_child
then
2388 n_type
= new_child
.as(nullable AType)
2393 redef fun n_opar
=(node
)
2396 if node
!= null then node
.parent
= self
2398 redef fun n_cpar
=(node
)
2401 if node
!= null then node
.parent
= self
2403 redef fun n_type
=(node
)
2406 if node
!= null then node
.parent
= self
2410 redef fun visit_all
(v
: Visitor)
2412 v
.enter_visit
(_n_opar
)
2413 n_params
.visit_all
(v
)
2414 v
.enter_visit
(_n_cpar
)
2415 v
.enter_visit
(_n_type
)
2421 n_type
: nullable AType,
2422 n_dotdotdot
: nullable TDotdotdot,
2423 n_annotations
: nullable AAnnotations
2426 _n_id
= n_id
.as(not null)
2429 if n_type
!= null then n_type
.parent
= self
2430 _n_dotdotdot
= n_dotdotdot
2431 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2432 _n_annotations
= n_annotations
2433 if n_annotations
!= null then n_annotations
.parent
= self
2436 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2438 if _n_id
== old_child
then
2439 n_id
= new_child
.as(TId)
2442 if _n_type
== old_child
then
2443 n_type
= new_child
.as(nullable AType)
2446 if _n_dotdotdot
== old_child
then
2447 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2450 if _n_annotations
== old_child
then
2451 n_annotations
= new_child
.as(nullable AAnnotations)
2456 redef fun n_id
=(node
)
2461 redef fun n_type
=(node
)
2464 if node
!= null then node
.parent
= self
2466 redef fun n_dotdotdot
=(node
)
2469 if node
!= null then node
.parent
= self
2471 redef fun n_annotations
=(node
)
2473 _n_annotations
= node
2474 if node
!= null then node
.parent
= self
2478 redef fun visit_all
(v
: Visitor)
2480 v
.enter_visit
(_n_id
)
2481 v
.enter_visit
(_n_type
)
2482 v
.enter_visit
(_n_dotdotdot
)
2483 v
.enter_visit
(_n_annotations
)
2488 n_kwnullable
: nullable TKwnullable,
2489 n_qid
: nullable AQclassid,
2490 n_obra
: nullable TObra,
2491 n_types
: Collection[Object], # Should be Collection[AType]
2492 n_cbra
: nullable TCbra,
2493 n_annotations
: nullable AAnnotations
2496 _n_kwnullable
= n_kwnullable
2497 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2498 _n_qid
= n_qid
.as(not null)
2501 if n_obra
!= null then n_obra
.parent
= self
2502 self.n_types
.unsafe_add_all
(n_types
)
2504 if n_cbra
!= null then n_cbra
.parent
= self
2505 _n_annotations
= n_annotations
2506 if n_annotations
!= null then n_annotations
.parent
= self
2509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2511 if _n_kwnullable
== old_child
then
2512 n_kwnullable
= new_child
.as(nullable TKwnullable)
2515 if _n_qid
== old_child
then
2516 n_qid
= new_child
.as(AQclassid)
2519 if _n_obra
== old_child
then
2520 n_obra
= new_child
.as(nullable TObra)
2523 if n_types
.replace_child
(old_child
, new_child
) then return
2524 if _n_cbra
== old_child
then
2525 n_cbra
= new_child
.as(nullable TCbra)
2528 if _n_annotations
== old_child
then
2529 n_annotations
= new_child
.as(nullable AAnnotations)
2534 redef fun n_kwnullable
=(node
)
2536 _n_kwnullable
= node
2537 if node
!= null then node
.parent
= self
2539 redef fun n_qid
=(node
)
2544 redef fun n_obra
=(node
)
2547 if node
!= null then node
.parent
= self
2549 redef fun n_cbra
=(node
)
2552 if node
!= null then node
.parent
= self
2554 redef fun n_annotations
=(node
)
2556 _n_annotations
= node
2557 if node
!= null then node
.parent
= self
2561 redef fun visit_all
(v
: Visitor)
2563 v
.enter_visit
(_n_kwnullable
)
2564 v
.enter_visit
(_n_qid
)
2565 v
.enter_visit
(_n_obra
)
2566 n_types
.visit_all
(v
)
2567 v
.enter_visit
(_n_cbra
)
2568 v
.enter_visit
(_n_annotations
)
2573 n_kwlabel
: nullable TKwlabel,
2577 _n_kwlabel
= n_kwlabel
.as(not null)
2578 n_kwlabel
.parent
= self
2580 if n_id
!= null then n_id
.parent
= self
2583 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2585 if _n_kwlabel
== old_child
then
2586 n_kwlabel
= new_child
.as(TKwlabel)
2589 if _n_id
== old_child
then
2590 n_id
= new_child
.as(nullable TId)
2595 redef fun n_kwlabel
=(node
)
2600 redef fun n_id
=(node
)
2603 if node
!= null then node
.parent
= self
2607 redef fun visit_all
(v
: Visitor)
2609 v
.enter_visit
(_n_kwlabel
)
2610 v
.enter_visit
(_n_id
)
2613 redef class ABlockExpr
2614 init init_ablockexpr
(
2615 n_expr
: Collection[Object], # Should be Collection[AExpr]
2616 n_kwend
: nullable TKwend
2619 self.n_expr
.unsafe_add_all
(n_expr
)
2621 if n_kwend
!= null then n_kwend
.parent
= self
2624 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2626 if n_expr
.replace_child
(old_child
, new_child
) then return
2627 if _n_kwend
== old_child
then
2628 n_kwend
= new_child
.as(nullable TKwend)
2633 redef fun n_kwend
=(node
)
2636 if node
!= null then node
.parent
= self
2640 redef fun visit_all
(v
: Visitor)
2643 v
.enter_visit
(_n_kwend
)
2646 redef class AVardeclExpr
2647 init init_avardeclexpr
(
2648 n_kwvar
: nullable TKwvar,
2650 n_type
: nullable AType,
2651 n_assign
: nullable TAssign,
2652 n_expr
: nullable AExpr,
2653 n_annotations
: nullable AAnnotations
2657 if n_kwvar
!= null then n_kwvar
.parent
= self
2658 _n_id
= n_id
.as(not null)
2661 if n_type
!= null then n_type
.parent
= self
2662 _n_assign
= n_assign
2663 if n_assign
!= null then n_assign
.parent
= self
2665 if n_expr
!= null then n_expr
.parent
= self
2666 _n_annotations
= n_annotations
2667 if n_annotations
!= null then n_annotations
.parent
= self
2670 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2672 if _n_kwvar
== old_child
then
2673 n_kwvar
= new_child
.as(nullable TKwvar)
2676 if _n_id
== old_child
then
2677 n_id
= new_child
.as(TId)
2680 if _n_type
== old_child
then
2681 n_type
= new_child
.as(nullable AType)
2684 if _n_assign
== old_child
then
2685 n_assign
= new_child
.as(nullable TAssign)
2688 if _n_expr
== old_child
then
2689 n_expr
= new_child
.as(nullable AExpr)
2692 if _n_annotations
== old_child
then
2693 n_annotations
= new_child
.as(nullable AAnnotations)
2698 redef fun n_kwvar
=(node
)
2701 if node
!= null then node
.parent
= self
2703 redef fun n_id
=(node
)
2708 redef fun n_type
=(node
)
2711 if node
!= null then node
.parent
= self
2713 redef fun n_assign
=(node
)
2716 if node
!= null then node
.parent
= self
2718 redef fun n_expr
=(node
)
2721 if node
!= null then node
.parent
= self
2723 redef fun n_annotations
=(node
)
2725 _n_annotations
= node
2726 if node
!= null then node
.parent
= self
2730 redef fun visit_all
(v
: Visitor)
2732 v
.enter_visit
(_n_kwvar
)
2733 v
.enter_visit
(_n_id
)
2734 v
.enter_visit
(_n_type
)
2735 v
.enter_visit
(_n_assign
)
2736 v
.enter_visit
(_n_expr
)
2737 v
.enter_visit
(_n_annotations
)
2740 redef class AReturnExpr
2741 init init_areturnexpr
(
2742 n_kwreturn
: nullable TKwreturn,
2743 n_expr
: nullable AExpr
2746 _n_kwreturn
= n_kwreturn
2747 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2749 if n_expr
!= null then n_expr
.parent
= self
2752 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2754 if _n_kwreturn
== old_child
then
2755 n_kwreturn
= new_child
.as(nullable TKwreturn)
2758 if _n_expr
== old_child
then
2759 n_expr
= new_child
.as(nullable AExpr)
2764 redef fun n_kwreturn
=(node
)
2767 if node
!= null then node
.parent
= self
2769 redef fun n_expr
=(node
)
2772 if node
!= null then node
.parent
= self
2776 redef fun visit_all
(v
: Visitor)
2778 v
.enter_visit
(_n_kwreturn
)
2779 v
.enter_visit
(_n_expr
)
2782 redef class AYieldExpr
2783 init init_ayieldexpr
(
2784 n_kwyield
: nullable TKwyield,
2785 n_expr
: nullable AExpr
2788 _n_kwyield
= n_kwyield
.as(not null)
2789 n_kwyield
.parent
= self
2790 _n_expr
= n_expr
.as(not null)
2791 n_expr
.parent
= self
2794 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2796 if _n_kwyield
== old_child
then
2797 n_kwyield
= new_child
.as(TKwyield)
2800 if _n_expr
== old_child
then
2801 n_expr
= new_child
.as(AExpr)
2806 redef fun n_kwyield
=(node
)
2811 redef fun n_expr
=(node
)
2818 redef fun visit_all
(v
: Visitor)
2820 v
.enter_visit
(_n_kwyield
)
2821 v
.enter_visit
(_n_expr
)
2824 redef class ABreakExpr
2825 init init_abreakexpr
(
2826 n_kwbreak
: nullable TKwbreak,
2827 n_label
: nullable ALabel
2830 _n_kwbreak
= n_kwbreak
.as(not null)
2831 n_kwbreak
.parent
= self
2833 if n_label
!= null then n_label
.parent
= self
2836 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2838 if _n_kwbreak
== old_child
then
2839 n_kwbreak
= new_child
.as(TKwbreak)
2842 if _n_label
== old_child
then
2843 n_label
= new_child
.as(nullable ALabel)
2848 redef fun n_kwbreak
=(node
)
2853 redef fun n_label
=(node
)
2856 if node
!= null then node
.parent
= self
2860 redef fun visit_all
(v
: Visitor)
2862 v
.enter_visit
(_n_kwbreak
)
2863 v
.enter_visit
(_n_label
)
2866 redef class AAbortExpr
2867 init init_aabortexpr
(
2868 n_kwabort
: nullable TKwabort
2871 _n_kwabort
= n_kwabort
.as(not null)
2872 n_kwabort
.parent
= self
2875 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2877 if _n_kwabort
== old_child
then
2878 n_kwabort
= new_child
.as(TKwabort)
2883 redef fun n_kwabort
=(node
)
2890 redef fun visit_all
(v
: Visitor)
2892 v
.enter_visit
(_n_kwabort
)
2895 redef class AContinueExpr
2896 init init_acontinueexpr
(
2897 n_kwcontinue
: nullable TKwcontinue,
2898 n_label
: nullable ALabel
2901 _n_kwcontinue
= n_kwcontinue
2902 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2904 if n_label
!= null then n_label
.parent
= self
2907 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2909 if _n_kwcontinue
== old_child
then
2910 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2913 if _n_label
== old_child
then
2914 n_label
= new_child
.as(nullable ALabel)
2919 redef fun n_kwcontinue
=(node
)
2921 _n_kwcontinue
= node
2922 if node
!= null then node
.parent
= self
2924 redef fun n_label
=(node
)
2927 if node
!= null then node
.parent
= self
2931 redef fun visit_all
(v
: Visitor)
2933 v
.enter_visit
(_n_kwcontinue
)
2934 v
.enter_visit
(_n_label
)
2939 n_kwdo
: nullable TKwdo,
2940 n_block
: nullable AExpr,
2941 n_kwcatch
: nullable TKwcatch,
2942 n_catch
: nullable AExpr,
2943 n_label
: nullable ALabel
2946 _n_kwdo
= n_kwdo
.as(not null)
2947 n_kwdo
.parent
= self
2949 if n_block
!= null then n_block
.parent
= self
2950 _n_kwcatch
= n_kwcatch
2951 if n_kwcatch
!= null then n_kwcatch
.parent
= self
2953 if n_catch
!= null then n_catch
.parent
= self
2955 if n_label
!= null then n_label
.parent
= self
2958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2960 if _n_kwdo
== old_child
then
2961 n_kwdo
= new_child
.as(TKwdo)
2964 if _n_block
== old_child
then
2965 n_block
= new_child
.as(nullable AExpr)
2968 if _n_kwcatch
== old_child
then
2969 n_kwcatch
= new_child
.as(nullable TKwcatch)
2972 if _n_catch
== old_child
then
2973 n_catch
= new_child
.as(nullable AExpr)
2976 if _n_label
== old_child
then
2977 n_label
= new_child
.as(nullable ALabel)
2982 redef fun n_kwdo
=(node
)
2987 redef fun n_block
=(node
)
2990 if node
!= null then node
.parent
= self
2992 redef fun n_kwcatch
=(node
)
2995 if node
!= null then node
.parent
= self
2997 redef fun n_catch
=(node
)
3000 if node
!= null then node
.parent
= self
3002 redef fun n_label
=(node
)
3005 if node
!= null then node
.parent
= self
3009 redef fun visit_all
(v
: Visitor)
3011 v
.enter_visit
(_n_kwdo
)
3012 v
.enter_visit
(_n_block
)
3013 v
.enter_visit
(_n_kwcatch
)
3014 v
.enter_visit
(_n_catch
)
3015 v
.enter_visit
(_n_label
)
3020 n_kwif
: nullable TKwif,
3021 n_expr
: nullable AExpr,
3022 n_kwthen
: nullable TKwthen,
3023 n_then
: nullable AExpr,
3024 n_kwelse
: nullable TKwelse,
3025 n_else
: nullable AExpr
3028 _n_kwif
= n_kwif
.as(not null)
3029 n_kwif
.parent
= self
3030 _n_expr
= n_expr
.as(not null)
3031 n_expr
.parent
= self
3032 _n_kwthen
= n_kwthen
.as(not null)
3033 n_kwthen
.parent
= self
3035 if n_then
!= null then n_then
.parent
= self
3036 _n_kwelse
= n_kwelse
3037 if n_kwelse
!= null then n_kwelse
.parent
= self
3039 if n_else
!= null then n_else
.parent
= self
3042 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3044 if _n_kwif
== old_child
then
3045 n_kwif
= new_child
.as(TKwif)
3048 if _n_expr
== old_child
then
3049 n_expr
= new_child
.as(AExpr)
3052 if _n_kwthen
== old_child
then
3053 n_kwthen
= new_child
.as(TKwthen)
3056 if _n_then
== old_child
then
3057 n_then
= new_child
.as(nullable AExpr)
3060 if _n_kwelse
== old_child
then
3061 n_kwelse
= new_child
.as(nullable TKwelse)
3064 if _n_else
== old_child
then
3065 n_else
= new_child
.as(nullable AExpr)
3070 redef fun n_kwif
=(node
)
3075 redef fun n_expr
=(node
)
3080 redef fun n_kwthen
=(node
)
3085 redef fun n_then
=(node
)
3088 if node
!= null then node
.parent
= self
3090 redef fun n_kwelse
=(node
)
3093 if node
!= null then node
.parent
= self
3095 redef fun n_else
=(node
)
3098 if node
!= null then node
.parent
= self
3102 redef fun visit_all
(v
: Visitor)
3104 v
.enter_visit
(_n_kwif
)
3105 v
.enter_visit
(_n_expr
)
3106 v
.enter_visit
(_n_kwthen
)
3107 v
.enter_visit
(_n_then
)
3108 v
.enter_visit
(_n_kwelse
)
3109 v
.enter_visit
(_n_else
)
3112 redef class AIfexprExpr
3113 init init_aifexprexpr
(
3114 n_kwif
: nullable TKwif,
3115 n_expr
: nullable AExpr,
3116 n_kwthen
: nullable TKwthen,
3117 n_then
: nullable AExpr,
3118 n_kwelse
: nullable TKwelse,
3119 n_else
: nullable AExpr
3122 _n_kwif
= n_kwif
.as(not null)
3123 n_kwif
.parent
= self
3124 _n_expr
= n_expr
.as(not null)
3125 n_expr
.parent
= self
3126 _n_kwthen
= n_kwthen
.as(not null)
3127 n_kwthen
.parent
= self
3128 _n_then
= n_then
.as(not null)
3129 n_then
.parent
= self
3130 _n_kwelse
= n_kwelse
.as(not null)
3131 n_kwelse
.parent
= self
3132 _n_else
= n_else
.as(not null)
3133 n_else
.parent
= self
3136 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3138 if _n_kwif
== old_child
then
3139 n_kwif
= new_child
.as(TKwif)
3142 if _n_expr
== old_child
then
3143 n_expr
= new_child
.as(AExpr)
3146 if _n_kwthen
== old_child
then
3147 n_kwthen
= new_child
.as(TKwthen)
3150 if _n_then
== old_child
then
3151 n_then
= new_child
.as(AExpr)
3154 if _n_kwelse
== old_child
then
3155 n_kwelse
= new_child
.as(TKwelse)
3158 if _n_else
== old_child
then
3159 n_else
= new_child
.as(AExpr)
3164 redef fun n_kwif
=(node
)
3169 redef fun n_expr
=(node
)
3174 redef fun n_kwthen
=(node
)
3179 redef fun n_then
=(node
)
3184 redef fun n_kwelse
=(node
)
3189 redef fun n_else
=(node
)
3196 redef fun visit_all
(v
: Visitor)
3198 v
.enter_visit
(_n_kwif
)
3199 v
.enter_visit
(_n_expr
)
3200 v
.enter_visit
(_n_kwthen
)
3201 v
.enter_visit
(_n_then
)
3202 v
.enter_visit
(_n_kwelse
)
3203 v
.enter_visit
(_n_else
)
3206 redef class AWhileExpr
3207 init init_awhileexpr
(
3208 n_kwwhile
: nullable TKwwhile,
3209 n_expr
: nullable AExpr,
3210 n_kwdo
: nullable TKwdo,
3211 n_block
: nullable AExpr,
3212 n_label
: nullable ALabel
3215 _n_kwwhile
= n_kwwhile
.as(not null)
3216 n_kwwhile
.parent
= self
3217 _n_expr
= n_expr
.as(not null)
3218 n_expr
.parent
= self
3219 _n_kwdo
= n_kwdo
.as(not null)
3220 n_kwdo
.parent
= self
3222 if n_block
!= null then n_block
.parent
= self
3224 if n_label
!= null then n_label
.parent
= self
3227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3229 if _n_kwwhile
== old_child
then
3230 n_kwwhile
= new_child
.as(TKwwhile)
3233 if _n_expr
== old_child
then
3234 n_expr
= new_child
.as(AExpr)
3237 if _n_kwdo
== old_child
then
3238 n_kwdo
= new_child
.as(TKwdo)
3241 if _n_block
== old_child
then
3242 n_block
= new_child
.as(nullable AExpr)
3245 if _n_label
== old_child
then
3246 n_label
= new_child
.as(nullable ALabel)
3251 redef fun n_kwwhile
=(node
)
3256 redef fun n_expr
=(node
)
3261 redef fun n_kwdo
=(node
)
3266 redef fun n_block
=(node
)
3269 if node
!= null then node
.parent
= self
3271 redef fun n_label
=(node
)
3274 if node
!= null then node
.parent
= self
3278 redef fun visit_all
(v
: Visitor)
3280 v
.enter_visit
(_n_kwwhile
)
3281 v
.enter_visit
(_n_expr
)
3282 v
.enter_visit
(_n_kwdo
)
3283 v
.enter_visit
(_n_block
)
3284 v
.enter_visit
(_n_label
)
3287 redef class ALoopExpr
3288 init init_aloopexpr
(
3289 n_kwloop
: nullable TKwloop,
3290 n_block
: nullable AExpr,
3291 n_label
: nullable ALabel
3294 _n_kwloop
= n_kwloop
.as(not null)
3295 n_kwloop
.parent
= self
3297 if n_block
!= null then n_block
.parent
= self
3299 if n_label
!= null then n_label
.parent
= self
3302 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3304 if _n_kwloop
== old_child
then
3305 n_kwloop
= new_child
.as(TKwloop)
3308 if _n_block
== old_child
then
3309 n_block
= new_child
.as(nullable AExpr)
3312 if _n_label
== old_child
then
3313 n_label
= new_child
.as(nullable ALabel)
3318 redef fun n_kwloop
=(node
)
3323 redef fun n_block
=(node
)
3326 if node
!= null then node
.parent
= self
3328 redef fun n_label
=(node
)
3331 if node
!= null then node
.parent
= self
3335 redef fun visit_all
(v
: Visitor)
3337 v
.enter_visit
(_n_kwloop
)
3338 v
.enter_visit
(_n_block
)
3339 v
.enter_visit
(_n_label
)
3342 redef class AForExpr
3343 init init_aforexpr
(
3344 n_kwfor
: nullable TKwfor,
3345 n_groups
: Collection[Object], # Should be Collection[AForGroup]
3346 n_kwdo
: nullable TKwdo,
3347 n_block
: nullable AExpr,
3348 n_label
: nullable ALabel
3351 _n_kwfor
= n_kwfor
.as(not null)
3352 n_kwfor
.parent
= self
3353 self.n_groups
.unsafe_add_all
(n_groups
)
3354 _n_kwdo
= n_kwdo
.as(not null)
3355 n_kwdo
.parent
= self
3357 if n_block
!= null then n_block
.parent
= self
3359 if n_label
!= null then n_label
.parent
= self
3362 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3364 if _n_kwfor
== old_child
then
3365 n_kwfor
= new_child
.as(TKwfor)
3368 if n_groups
.replace_child
(old_child
, new_child
) then return
3369 if _n_kwdo
== old_child
then
3370 n_kwdo
= new_child
.as(TKwdo)
3373 if _n_block
== old_child
then
3374 n_block
= new_child
.as(nullable AExpr)
3377 if _n_label
== old_child
then
3378 n_label
= new_child
.as(nullable ALabel)
3383 redef fun n_kwfor
=(node
)
3388 redef fun n_kwdo
=(node
)
3393 redef fun n_block
=(node
)
3396 if node
!= null then node
.parent
= self
3398 redef fun n_label
=(node
)
3401 if node
!= null then node
.parent
= self
3405 redef fun visit_all
(v
: Visitor)
3407 v
.enter_visit
(_n_kwfor
)
3408 n_groups
.visit_all
(v
)
3409 v
.enter_visit
(_n_kwdo
)
3410 v
.enter_visit
(_n_block
)
3411 v
.enter_visit
(_n_label
)
3414 redef class AWithExpr
3415 init init_awithexpr
(
3416 n_kwwith
: nullable TKwwith,
3417 n_expr
: nullable AExpr,
3418 n_kwdo
: nullable TKwdo,
3419 n_block
: nullable AExpr,
3420 n_label
: nullable ALabel
3423 _n_kwwith
= n_kwwith
.as(not null)
3424 n_kwwith
.parent
= self
3425 _n_expr
= n_expr
.as(not null)
3426 n_expr
.parent
= self
3427 _n_kwdo
= n_kwdo
.as(not null)
3428 n_kwdo
.parent
= self
3430 if n_block
!= null then n_block
.parent
= self
3432 if n_label
!= null then n_label
.parent
= self
3435 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3437 if _n_kwwith
== old_child
then
3438 n_kwwith
= new_child
.as(TKwwith)
3441 if _n_expr
== old_child
then
3442 n_expr
= new_child
.as(AExpr)
3445 if _n_kwdo
== old_child
then
3446 n_kwdo
= new_child
.as(TKwdo)
3449 if _n_block
== old_child
then
3450 n_block
= new_child
.as(nullable AExpr)
3453 if _n_label
== old_child
then
3454 n_label
= new_child
.as(nullable ALabel)
3459 redef fun n_kwwith
=(node
)
3464 redef fun n_expr
=(node
)
3469 redef fun n_kwdo
=(node
)
3474 redef fun n_block
=(node
)
3477 if node
!= null then node
.parent
= self
3479 redef fun n_label
=(node
)
3482 if node
!= null then node
.parent
= self
3486 redef fun visit_all
(v
: Visitor)
3488 v
.enter_visit
(_n_kwwith
)
3489 v
.enter_visit
(_n_expr
)
3490 v
.enter_visit
(_n_kwdo
)
3491 v
.enter_visit
(_n_block
)
3492 v
.enter_visit
(_n_label
)
3495 redef class AAssertExpr
3496 init init_aassertexpr
(
3497 n_kwassert
: nullable TKwassert,
3499 n_expr
: nullable AExpr,
3500 n_kwelse
: nullable TKwelse,
3501 n_else
: nullable AExpr
3504 _n_kwassert
= n_kwassert
.as(not null)
3505 n_kwassert
.parent
= self
3507 if n_id
!= null then n_id
.parent
= self
3508 _n_expr
= n_expr
.as(not null)
3509 n_expr
.parent
= self
3510 _n_kwelse
= n_kwelse
3511 if n_kwelse
!= null then n_kwelse
.parent
= self
3513 if n_else
!= null then n_else
.parent
= self
3516 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3518 if _n_kwassert
== old_child
then
3519 n_kwassert
= new_child
.as(TKwassert)
3522 if _n_id
== old_child
then
3523 n_id
= new_child
.as(nullable TId)
3526 if _n_expr
== old_child
then
3527 n_expr
= new_child
.as(AExpr)
3530 if _n_kwelse
== old_child
then
3531 n_kwelse
= new_child
.as(nullable TKwelse)
3534 if _n_else
== old_child
then
3535 n_else
= new_child
.as(nullable AExpr)
3540 redef fun n_kwassert
=(node
)
3545 redef fun n_id
=(node
)
3548 if node
!= null then node
.parent
= self
3550 redef fun n_expr
=(node
)
3555 redef fun n_kwelse
=(node
)
3558 if node
!= null then node
.parent
= self
3560 redef fun n_else
=(node
)
3563 if node
!= null then node
.parent
= self
3567 redef fun visit_all
(v
: Visitor)
3569 v
.enter_visit
(_n_kwassert
)
3570 v
.enter_visit
(_n_id
)
3571 v
.enter_visit
(_n_expr
)
3572 v
.enter_visit
(_n_kwelse
)
3573 v
.enter_visit
(_n_else
)
3576 redef class AOnceExpr
3577 init init_aonceexpr
(
3578 n_kwonce
: nullable TKwonce,
3579 n_expr
: nullable AExpr
3582 _n_kwonce
= n_kwonce
.as(not null)
3583 n_kwonce
.parent
= self
3584 _n_expr
= n_expr
.as(not null)
3585 n_expr
.parent
= self
3588 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3590 if _n_kwonce
== old_child
then
3591 n_kwonce
= new_child
.as(TKwonce)
3594 if _n_expr
== old_child
then
3595 n_expr
= new_child
.as(AExpr)
3600 redef fun n_kwonce
=(node
)
3605 redef fun n_expr
=(node
)
3612 redef fun visit_all
(v
: Visitor)
3614 v
.enter_visit
(_n_kwonce
)
3615 v
.enter_visit
(_n_expr
)
3618 redef class ASendExpr
3619 init init_asendexpr
(
3620 n_expr
: nullable AExpr
3623 _n_expr
= n_expr
.as(not null)
3624 n_expr
.parent
= self
3627 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3629 if _n_expr
== old_child
then
3630 n_expr
= new_child
.as(AExpr)
3635 redef fun n_expr
=(node
)
3642 redef fun visit_all
(v
: Visitor)
3644 v
.enter_visit
(_n_expr
)
3647 redef class ABinopExpr
3648 init init_abinopexpr
(
3649 n_expr
: nullable AExpr,
3650 n_expr2
: nullable AExpr
3653 _n_expr
= n_expr
.as(not null)
3654 n_expr
.parent
= self
3655 _n_expr2
= n_expr2
.as(not null)
3656 n_expr2
.parent
= self
3659 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3661 if _n_expr
== old_child
then
3662 n_expr
= new_child
.as(AExpr)
3665 if _n_expr2
== old_child
then
3666 n_expr2
= new_child
.as(AExpr)
3671 redef fun n_expr
=(node
)
3676 redef fun n_expr2
=(node
)
3683 redef fun visit_all
(v
: Visitor)
3685 v
.enter_visit
(_n_expr
)
3686 v
.enter_visit
(_n_expr2
)
3691 n_expr
: nullable AExpr,
3692 n_op
: nullable TKwor,
3693 n_expr2
: nullable AExpr
3696 _n_expr
= n_expr
.as(not null)
3697 n_expr
.parent
= self
3698 _n_op
= n_op
.as(not null)
3700 _n_expr2
= n_expr2
.as(not null)
3701 n_expr2
.parent
= self
3704 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3706 if _n_expr
== old_child
then
3707 n_expr
= new_child
.as(AExpr)
3710 if _n_op
== old_child
then
3711 n_op
= new_child
.as(TKwor)
3714 if _n_expr2
== old_child
then
3715 n_expr2
= new_child
.as(AExpr)
3720 redef fun n_expr
=(node
)
3725 redef fun n_op
=(node
)
3730 redef fun n_expr2
=(node
)
3737 redef fun visit_all
(v
: Visitor)
3739 v
.enter_visit
(_n_expr
)
3740 v
.enter_visit
(_n_op
)
3741 v
.enter_visit
(_n_expr2
)
3744 redef class AAndExpr
3745 init init_aandexpr
(
3746 n_expr
: nullable AExpr,
3747 n_op
: nullable TKwand,
3748 n_expr2
: nullable AExpr
3751 _n_expr
= n_expr
.as(not null)
3752 n_expr
.parent
= self
3753 _n_op
= n_op
.as(not null)
3755 _n_expr2
= n_expr2
.as(not null)
3756 n_expr2
.parent
= self
3759 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3761 if _n_expr
== old_child
then
3762 n_expr
= new_child
.as(AExpr)
3765 if _n_op
== old_child
then
3766 n_op
= new_child
.as(TKwand)
3769 if _n_expr2
== old_child
then
3770 n_expr2
= new_child
.as(AExpr)
3775 redef fun n_expr
=(node
)
3780 redef fun n_op
=(node
)
3785 redef fun n_expr2
=(node
)
3792 redef fun visit_all
(v
: Visitor)
3794 v
.enter_visit
(_n_expr
)
3795 v
.enter_visit
(_n_op
)
3796 v
.enter_visit
(_n_expr2
)
3799 redef class AOrElseExpr
3800 init init_aorelseexpr
(
3801 n_expr
: nullable AExpr,
3802 n_op
: nullable TKwor,
3803 n_kwelse
: nullable TKwelse,
3804 n_expr2
: nullable AExpr
3807 _n_expr
= n_expr
.as(not null)
3808 n_expr
.parent
= self
3809 _n_op
= n_op
.as(not null)
3811 _n_kwelse
= n_kwelse
.as(not null)
3812 n_kwelse
.parent
= self
3813 _n_expr2
= n_expr2
.as(not null)
3814 n_expr2
.parent
= self
3817 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3819 if _n_expr
== old_child
then
3820 n_expr
= new_child
.as(AExpr)
3823 if _n_op
== old_child
then
3824 n_op
= new_child
.as(TKwor)
3827 if _n_kwelse
== old_child
then
3828 n_kwelse
= new_child
.as(TKwelse)
3831 if _n_expr2
== old_child
then
3832 n_expr2
= new_child
.as(AExpr)
3837 redef fun n_expr
=(node
)
3842 redef fun n_op
=(node
)
3847 redef fun n_kwelse
=(node
)
3852 redef fun n_expr2
=(node
)
3859 redef fun visit_all
(v
: Visitor)
3861 v
.enter_visit
(_n_expr
)
3862 v
.enter_visit
(_n_op
)
3863 v
.enter_visit
(_n_kwelse
)
3864 v
.enter_visit
(_n_expr2
)
3867 redef class AImpliesExpr
3868 init init_aimpliesexpr
(
3869 n_expr
: nullable AExpr,
3870 n_op
: nullable TKwimplies,
3871 n_expr2
: nullable AExpr
3874 _n_expr
= n_expr
.as(not null)
3875 n_expr
.parent
= self
3876 _n_op
= n_op
.as(not null)
3878 _n_expr2
= n_expr2
.as(not null)
3879 n_expr2
.parent
= self
3882 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3884 if _n_expr
== old_child
then
3885 n_expr
= new_child
.as(AExpr)
3888 if _n_op
== old_child
then
3889 n_op
= new_child
.as(TKwimplies)
3892 if _n_expr2
== old_child
then
3893 n_expr2
= new_child
.as(AExpr)
3898 redef fun n_expr
=(node
)
3903 redef fun n_op
=(node
)
3908 redef fun n_expr2
=(node
)
3915 redef fun visit_all
(v
: Visitor)
3917 v
.enter_visit
(_n_expr
)
3918 v
.enter_visit
(_n_op
)
3919 v
.enter_visit
(_n_expr2
)
3922 redef class ANotExpr
3923 init init_anotexpr
(
3924 n_kwnot
: nullable TKwnot,
3925 n_expr
: nullable AExpr
3928 _n_kwnot
= n_kwnot
.as(not null)
3929 n_kwnot
.parent
= self
3930 _n_expr
= n_expr
.as(not null)
3931 n_expr
.parent
= self
3934 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3936 if _n_kwnot
== old_child
then
3937 n_kwnot
= new_child
.as(TKwnot)
3940 if _n_expr
== old_child
then
3941 n_expr
= new_child
.as(AExpr)
3946 redef fun n_kwnot
=(node
)
3951 redef fun n_expr
=(node
)
3958 redef fun visit_all
(v
: Visitor)
3960 v
.enter_visit
(_n_kwnot
)
3961 v
.enter_visit
(_n_expr
)
3966 n_expr
: nullable AExpr,
3968 n_expr2
: nullable AExpr
3971 _n_expr
= n_expr
.as(not null)
3972 n_expr
.parent
= self
3973 _n_op
= n_op
.as(not null)
3975 _n_expr2
= n_expr2
.as(not null)
3976 n_expr2
.parent
= self
3979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3981 if _n_expr
== old_child
then
3982 n_expr
= new_child
.as(AExpr)
3985 if _n_op
== old_child
then
3986 n_op
= new_child
.as(TEq)
3989 if _n_expr2
== old_child
then
3990 n_expr2
= new_child
.as(AExpr)
3995 redef fun n_expr
=(node
)
4000 redef fun n_op
=(node
)
4005 redef fun n_expr2
=(node
)
4012 redef fun visit_all
(v
: Visitor)
4014 v
.enter_visit
(_n_expr
)
4015 v
.enter_visit
(_n_op
)
4016 v
.enter_visit
(_n_expr2
)
4021 n_expr
: nullable AExpr,
4023 n_expr2
: nullable AExpr
4026 _n_expr
= n_expr
.as(not null)
4027 n_expr
.parent
= self
4028 _n_op
= n_op
.as(not null)
4030 _n_expr2
= n_expr2
.as(not null)
4031 n_expr2
.parent
= self
4034 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4036 if _n_expr
== old_child
then
4037 n_expr
= new_child
.as(AExpr)
4040 if _n_op
== old_child
then
4041 n_op
= new_child
.as(TNe)
4044 if _n_expr2
== old_child
then
4045 n_expr2
= new_child
.as(AExpr)
4050 redef fun n_expr
=(node
)
4055 redef fun n_op
=(node
)
4060 redef fun n_expr2
=(node
)
4067 redef fun visit_all
(v
: Visitor)
4069 v
.enter_visit
(_n_expr
)
4070 v
.enter_visit
(_n_op
)
4071 v
.enter_visit
(_n_expr2
)
4076 n_expr
: nullable AExpr,
4078 n_expr2
: nullable AExpr
4081 _n_expr
= n_expr
.as(not null)
4082 n_expr
.parent
= self
4083 _n_op
= n_op
.as(not null)
4085 _n_expr2
= n_expr2
.as(not null)
4086 n_expr2
.parent
= self
4089 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4091 if _n_expr
== old_child
then
4092 n_expr
= new_child
.as(AExpr)
4095 if _n_op
== old_child
then
4096 n_op
= new_child
.as(TLt)
4099 if _n_expr2
== old_child
then
4100 n_expr2
= new_child
.as(AExpr)
4105 redef fun n_expr
=(node
)
4110 redef fun n_op
=(node
)
4115 redef fun n_expr2
=(node
)
4122 redef fun visit_all
(v
: Visitor)
4124 v
.enter_visit
(_n_expr
)
4125 v
.enter_visit
(_n_op
)
4126 v
.enter_visit
(_n_expr2
)
4131 n_expr
: nullable AExpr,
4133 n_expr2
: nullable AExpr
4136 _n_expr
= n_expr
.as(not null)
4137 n_expr
.parent
= self
4138 _n_op
= n_op
.as(not null)
4140 _n_expr2
= n_expr2
.as(not null)
4141 n_expr2
.parent
= self
4144 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4146 if _n_expr
== old_child
then
4147 n_expr
= new_child
.as(AExpr)
4150 if _n_op
== old_child
then
4151 n_op
= new_child
.as(TLe)
4154 if _n_expr2
== old_child
then
4155 n_expr2
= new_child
.as(AExpr)
4160 redef fun n_expr
=(node
)
4165 redef fun n_op
=(node
)
4170 redef fun n_expr2
=(node
)
4177 redef fun visit_all
(v
: Visitor)
4179 v
.enter_visit
(_n_expr
)
4180 v
.enter_visit
(_n_op
)
4181 v
.enter_visit
(_n_expr2
)
4186 n_expr
: nullable AExpr,
4188 n_expr2
: nullable AExpr
4191 _n_expr
= n_expr
.as(not null)
4192 n_expr
.parent
= self
4193 _n_op
= n_op
.as(not null)
4195 _n_expr2
= n_expr2
.as(not null)
4196 n_expr2
.parent
= self
4199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4201 if _n_expr
== old_child
then
4202 n_expr
= new_child
.as(AExpr)
4205 if _n_op
== old_child
then
4206 n_op
= new_child
.as(TLl)
4209 if _n_expr2
== old_child
then
4210 n_expr2
= new_child
.as(AExpr)
4215 redef fun n_expr
=(node
)
4220 redef fun n_op
=(node
)
4225 redef fun n_expr2
=(node
)
4232 redef fun visit_all
(v
: Visitor)
4234 v
.enter_visit
(_n_expr
)
4235 v
.enter_visit
(_n_op
)
4236 v
.enter_visit
(_n_expr2
)
4241 n_expr
: nullable AExpr,
4243 n_expr2
: nullable AExpr
4246 _n_expr
= n_expr
.as(not null)
4247 n_expr
.parent
= self
4248 _n_op
= n_op
.as(not null)
4250 _n_expr2
= n_expr2
.as(not null)
4251 n_expr2
.parent
= self
4254 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4256 if _n_expr
== old_child
then
4257 n_expr
= new_child
.as(AExpr)
4260 if _n_op
== old_child
then
4261 n_op
= new_child
.as(TGt)
4264 if _n_expr2
== old_child
then
4265 n_expr2
= new_child
.as(AExpr)
4270 redef fun n_expr
=(node
)
4275 redef fun n_op
=(node
)
4280 redef fun n_expr2
=(node
)
4287 redef fun visit_all
(v
: Visitor)
4289 v
.enter_visit
(_n_expr
)
4290 v
.enter_visit
(_n_op
)
4291 v
.enter_visit
(_n_expr2
)
4296 n_expr
: nullable AExpr,
4298 n_expr2
: nullable AExpr
4301 _n_expr
= n_expr
.as(not null)
4302 n_expr
.parent
= self
4303 _n_op
= n_op
.as(not null)
4305 _n_expr2
= n_expr2
.as(not null)
4306 n_expr2
.parent
= self
4309 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4311 if _n_expr
== old_child
then
4312 n_expr
= new_child
.as(AExpr)
4315 if _n_op
== old_child
then
4316 n_op
= new_child
.as(TGe)
4319 if _n_expr2
== old_child
then
4320 n_expr2
= new_child
.as(AExpr)
4325 redef fun n_expr
=(node
)
4330 redef fun n_op
=(node
)
4335 redef fun n_expr2
=(node
)
4342 redef fun visit_all
(v
: Visitor)
4344 v
.enter_visit
(_n_expr
)
4345 v
.enter_visit
(_n_op
)
4346 v
.enter_visit
(_n_expr2
)
4351 n_expr
: nullable AExpr,
4353 n_expr2
: nullable AExpr
4356 _n_expr
= n_expr
.as(not null)
4357 n_expr
.parent
= self
4358 _n_op
= n_op
.as(not null)
4360 _n_expr2
= n_expr2
.as(not null)
4361 n_expr2
.parent
= self
4364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4366 if _n_expr
== old_child
then
4367 n_expr
= new_child
.as(AExpr)
4370 if _n_op
== old_child
then
4371 n_op
= new_child
.as(TGg)
4374 if _n_expr2
== old_child
then
4375 n_expr2
= new_child
.as(AExpr)
4380 redef fun n_expr
=(node
)
4385 redef fun n_op
=(node
)
4390 redef fun n_expr2
=(node
)
4397 redef fun visit_all
(v
: Visitor)
4399 v
.enter_visit
(_n_expr
)
4400 v
.enter_visit
(_n_op
)
4401 v
.enter_visit
(_n_expr2
)
4404 redef class AIsaExpr
4405 init init_aisaexpr
(
4406 n_expr
: nullable AExpr,
4407 n_kwisa
: nullable TKwisa,
4408 n_type
: nullable AType
4411 _n_expr
= n_expr
.as(not null)
4412 n_expr
.parent
= self
4413 _n_kwisa
= n_kwisa
.as(not null)
4414 n_kwisa
.parent
= self
4415 _n_type
= n_type
.as(not null)
4416 n_type
.parent
= self
4419 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4421 if _n_expr
== old_child
then
4422 n_expr
= new_child
.as(AExpr)
4425 if _n_kwisa
== old_child
then
4426 n_kwisa
= new_child
.as(TKwisa)
4429 if _n_type
== old_child
then
4430 n_type
= new_child
.as(AType)
4435 redef fun n_expr
=(node
)
4440 redef fun n_kwisa
=(node
)
4445 redef fun n_type
=(node
)
4452 redef fun visit_all
(v
: Visitor)
4454 v
.enter_visit
(_n_expr
)
4455 v
.enter_visit
(_n_kwisa
)
4456 v
.enter_visit
(_n_type
)
4459 redef class APlusExpr
4460 init init_aplusexpr
(
4461 n_expr
: nullable AExpr,
4462 n_op
: nullable TPlus,
4463 n_expr2
: nullable AExpr
4466 _n_expr
= n_expr
.as(not null)
4467 n_expr
.parent
= self
4468 _n_op
= n_op
.as(not null)
4470 _n_expr2
= n_expr2
.as(not null)
4471 n_expr2
.parent
= self
4474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4476 if _n_expr
== old_child
then
4477 n_expr
= new_child
.as(AExpr)
4480 if _n_op
== old_child
then
4481 n_op
= new_child
.as(TPlus)
4484 if _n_expr2
== old_child
then
4485 n_expr2
= new_child
.as(AExpr)
4490 redef fun n_expr
=(node
)
4495 redef fun n_op
=(node
)
4500 redef fun n_expr2
=(node
)
4507 redef fun visit_all
(v
: Visitor)
4509 v
.enter_visit
(_n_expr
)
4510 v
.enter_visit
(_n_op
)
4511 v
.enter_visit
(_n_expr2
)
4514 redef class AMinusExpr
4515 init init_aminusexpr
(
4516 n_expr
: nullable AExpr,
4517 n_op
: nullable TMinus,
4518 n_expr2
: nullable AExpr
4521 _n_expr
= n_expr
.as(not null)
4522 n_expr
.parent
= self
4523 _n_op
= n_op
.as(not null)
4525 _n_expr2
= n_expr2
.as(not null)
4526 n_expr2
.parent
= self
4529 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4531 if _n_expr
== old_child
then
4532 n_expr
= new_child
.as(AExpr)
4535 if _n_op
== old_child
then
4536 n_op
= new_child
.as(TMinus)
4539 if _n_expr2
== old_child
then
4540 n_expr2
= new_child
.as(AExpr)
4545 redef fun n_expr
=(node
)
4550 redef fun n_op
=(node
)
4555 redef fun n_expr2
=(node
)
4562 redef fun visit_all
(v
: Visitor)
4564 v
.enter_visit
(_n_expr
)
4565 v
.enter_visit
(_n_op
)
4566 v
.enter_visit
(_n_expr2
)
4569 redef class AStarshipExpr
4570 init init_astarshipexpr
(
4571 n_expr
: nullable AExpr,
4572 n_op
: nullable TStarship,
4573 n_expr2
: nullable AExpr
4576 _n_expr
= n_expr
.as(not null)
4577 n_expr
.parent
= self
4578 _n_op
= n_op
.as(not null)
4580 _n_expr2
= n_expr2
.as(not null)
4581 n_expr2
.parent
= self
4584 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4586 if _n_expr
== old_child
then
4587 n_expr
= new_child
.as(AExpr)
4590 if _n_op
== old_child
then
4591 n_op
= new_child
.as(TStarship)
4594 if _n_expr2
== old_child
then
4595 n_expr2
= new_child
.as(AExpr)
4600 redef fun n_expr
=(node
)
4605 redef fun n_op
=(node
)
4610 redef fun n_expr2
=(node
)
4617 redef fun visit_all
(v
: Visitor)
4619 v
.enter_visit
(_n_expr
)
4620 v
.enter_visit
(_n_op
)
4621 v
.enter_visit
(_n_expr2
)
4624 redef class AStarExpr
4625 init init_astarexpr
(
4626 n_expr
: nullable AExpr,
4627 n_op
: nullable TStar,
4628 n_expr2
: nullable AExpr
4631 _n_expr
= n_expr
.as(not null)
4632 n_expr
.parent
= self
4633 _n_op
= n_op
.as(not null)
4635 _n_expr2
= n_expr2
.as(not null)
4636 n_expr2
.parent
= self
4639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4641 if _n_expr
== old_child
then
4642 n_expr
= new_child
.as(AExpr)
4645 if _n_op
== old_child
then
4646 n_op
= new_child
.as(TStar)
4649 if _n_expr2
== old_child
then
4650 n_expr2
= new_child
.as(AExpr)
4655 redef fun n_expr
=(node
)
4660 redef fun n_op
=(node
)
4665 redef fun n_expr2
=(node
)
4672 redef fun visit_all
(v
: Visitor)
4674 v
.enter_visit
(_n_expr
)
4675 v
.enter_visit
(_n_op
)
4676 v
.enter_visit
(_n_expr2
)
4679 redef class AStarstarExpr
4680 init init_astarstarexpr
(
4681 n_expr
: nullable AExpr,
4682 n_op
: nullable TStarstar,
4683 n_expr2
: nullable AExpr
4686 _n_expr
= n_expr
.as(not null)
4687 n_expr
.parent
= self
4688 _n_op
= n_op
.as(not null)
4690 _n_expr2
= n_expr2
.as(not null)
4691 n_expr2
.parent
= self
4694 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4696 if _n_expr
== old_child
then
4697 n_expr
= new_child
.as(AExpr)
4700 if _n_op
== old_child
then
4701 n_op
= new_child
.as(TStarstar)
4704 if _n_expr2
== old_child
then
4705 n_expr2
= new_child
.as(AExpr)
4710 redef fun n_expr
=(node
)
4715 redef fun n_op
=(node
)
4720 redef fun n_expr2
=(node
)
4727 redef fun visit_all
(v
: Visitor)
4729 v
.enter_visit
(_n_expr
)
4730 v
.enter_visit
(_n_op
)
4731 v
.enter_visit
(_n_expr2
)
4734 redef class ASlashExpr
4735 init init_aslashexpr
(
4736 n_expr
: nullable AExpr,
4737 n_op
: nullable TSlash,
4738 n_expr2
: nullable AExpr
4741 _n_expr
= n_expr
.as(not null)
4742 n_expr
.parent
= self
4743 _n_op
= n_op
.as(not null)
4745 _n_expr2
= n_expr2
.as(not null)
4746 n_expr2
.parent
= self
4749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4751 if _n_expr
== old_child
then
4752 n_expr
= new_child
.as(AExpr)
4755 if _n_op
== old_child
then
4756 n_op
= new_child
.as(TSlash)
4759 if _n_expr2
== old_child
then
4760 n_expr2
= new_child
.as(AExpr)
4765 redef fun n_expr
=(node
)
4770 redef fun n_op
=(node
)
4775 redef fun n_expr2
=(node
)
4782 redef fun visit_all
(v
: Visitor)
4784 v
.enter_visit
(_n_expr
)
4785 v
.enter_visit
(_n_op
)
4786 v
.enter_visit
(_n_expr2
)
4789 redef class APercentExpr
4790 init init_apercentexpr
(
4791 n_expr
: nullable AExpr,
4792 n_op
: nullable TPercent,
4793 n_expr2
: nullable AExpr
4796 _n_expr
= n_expr
.as(not null)
4797 n_expr
.parent
= self
4798 _n_op
= n_op
.as(not null)
4800 _n_expr2
= n_expr2
.as(not null)
4801 n_expr2
.parent
= self
4804 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4806 if _n_expr
== old_child
then
4807 n_expr
= new_child
.as(AExpr)
4810 if _n_op
== old_child
then
4811 n_op
= new_child
.as(TPercent)
4814 if _n_expr2
== old_child
then
4815 n_expr2
= new_child
.as(AExpr)
4820 redef fun n_expr
=(node
)
4825 redef fun n_op
=(node
)
4830 redef fun n_expr2
=(node
)
4837 redef fun visit_all
(v
: Visitor)
4839 v
.enter_visit
(_n_expr
)
4840 v
.enter_visit
(_n_op
)
4841 v
.enter_visit
(_n_expr2
)
4844 redef class APipeExpr
4845 init init_apipeexpr
(
4846 n_expr
: nullable AExpr,
4847 n_op
: nullable TPipe,
4848 n_expr2
: nullable AExpr
4851 _n_expr
= n_expr
.as(not null)
4852 n_expr
.parent
= self
4853 _n_op
= n_op
.as(not null)
4855 _n_expr2
= n_expr2
.as(not null)
4856 n_expr2
.parent
= self
4859 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4861 if _n_expr
== old_child
then
4862 n_expr
= new_child
.as(AExpr)
4865 if _n_op
== old_child
then
4866 n_op
= new_child
.as(TPipe)
4869 if _n_expr2
== old_child
then
4870 n_expr2
= new_child
.as(AExpr)
4875 redef fun n_expr
=(node
)
4880 redef fun n_op
=(node
)
4885 redef fun n_expr2
=(node
)
4892 redef fun visit_all
(v
: Visitor)
4894 v
.enter_visit
(_n_expr
)
4895 v
.enter_visit
(_n_op
)
4896 v
.enter_visit
(_n_expr2
)
4899 redef class ACaretExpr
4900 init init_acaretexpr
(
4901 n_expr
: nullable AExpr,
4902 n_op
: nullable TCaret,
4903 n_expr2
: nullable AExpr
4906 _n_expr
= n_expr
.as(not null)
4907 n_expr
.parent
= self
4908 _n_op
= n_op
.as(not null)
4910 _n_expr2
= n_expr2
.as(not null)
4911 n_expr2
.parent
= self
4914 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4916 if _n_expr
== old_child
then
4917 n_expr
= new_child
.as(AExpr)
4920 if _n_op
== old_child
then
4921 n_op
= new_child
.as(TCaret)
4924 if _n_expr2
== old_child
then
4925 n_expr2
= new_child
.as(AExpr)
4930 redef fun n_expr
=(node
)
4935 redef fun n_op
=(node
)
4940 redef fun n_expr2
=(node
)
4947 redef fun visit_all
(v
: Visitor)
4949 v
.enter_visit
(_n_expr
)
4950 v
.enter_visit
(_n_op
)
4951 v
.enter_visit
(_n_expr2
)
4954 redef class AAmpExpr
4955 init init_aampexpr
(
4956 n_expr
: nullable AExpr,
4957 n_op
: nullable TAmp,
4958 n_expr2
: nullable AExpr
4961 _n_expr
= n_expr
.as(not null)
4962 n_expr
.parent
= self
4963 _n_op
= n_op
.as(not null)
4965 _n_expr2
= n_expr2
.as(not null)
4966 n_expr2
.parent
= self
4969 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4971 if _n_expr
== old_child
then
4972 n_expr
= new_child
.as(AExpr)
4975 if _n_op
== old_child
then
4976 n_op
= new_child
.as(TAmp)
4979 if _n_expr2
== old_child
then
4980 n_expr2
= new_child
.as(AExpr)
4985 redef fun n_expr
=(node
)
4990 redef fun n_op
=(node
)
4995 redef fun n_expr2
=(node
)
5002 redef fun visit_all
(v
: Visitor)
5004 v
.enter_visit
(_n_expr
)
5005 v
.enter_visit
(_n_op
)
5006 v
.enter_visit
(_n_expr2
)
5009 redef class AUminusExpr
5010 init init_auminusexpr
(
5011 n_op
: nullable TMinus,
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(TMinus)
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 AUplusExpr
5052 init init_auplusexpr
(
5053 n_op
: nullable TPlus,
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(TPlus)
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 AUtildeExpr
5094 init init_autildeexpr
(
5095 n_op
: nullable TTilde,
5096 n_expr
: nullable AExpr
5099 _n_op
= n_op
.as(not null)
5101 _n_expr
= n_expr
.as(not null)
5102 n_expr
.parent
= self
5105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5107 if _n_op
== old_child
then
5108 n_op
= new_child
.as(TTilde)
5111 if _n_expr
== old_child
then
5112 n_expr
= new_child
.as(AExpr)
5117 redef fun n_op
=(node
)
5122 redef fun n_expr
=(node
)
5129 redef fun visit_all
(v
: Visitor)
5131 v
.enter_visit
(_n_op
)
5132 v
.enter_visit
(_n_expr
)
5135 redef class ANewExpr
5136 init init_anewexpr
(
5137 n_kwnew
: nullable TKwnew,
5138 n_type
: nullable AType,
5139 n_qid
: nullable AQid,
5140 n_args
: nullable AExprs
5143 _n_kwnew
= n_kwnew
.as(not null)
5144 n_kwnew
.parent
= self
5145 _n_type
= n_type
.as(not null)
5146 n_type
.parent
= self
5148 if n_qid
!= null then n_qid
.parent
= self
5149 _n_args
= n_args
.as(not null)
5150 n_args
.parent
= self
5153 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5155 if _n_kwnew
== old_child
then
5156 n_kwnew
= new_child
.as(TKwnew)
5159 if _n_type
== old_child
then
5160 n_type
= new_child
.as(AType)
5163 if _n_qid
== old_child
then
5164 n_qid
= new_child
.as(nullable AQid)
5167 if _n_args
== old_child
then
5168 n_args
= new_child
.as(AExprs)
5173 redef fun n_kwnew
=(node
)
5178 redef fun n_type
=(node
)
5183 redef fun n_qid
=(node
)
5186 if node
!= null then node
.parent
= self
5188 redef fun n_args
=(node
)
5195 redef fun visit_all
(v
: Visitor)
5197 v
.enter_visit
(_n_kwnew
)
5198 v
.enter_visit
(_n_type
)
5199 v
.enter_visit
(_n_qid
)
5200 v
.enter_visit
(_n_args
)
5203 redef class AAttrExpr
5204 init init_aattrexpr
(
5205 n_expr
: nullable AExpr,
5206 n_id
: nullable TAttrid
5209 _n_expr
= n_expr
.as(not null)
5210 n_expr
.parent
= self
5211 _n_id
= n_id
.as(not null)
5215 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5217 if _n_expr
== old_child
then
5218 n_expr
= new_child
.as(AExpr)
5221 if _n_id
== old_child
then
5222 n_id
= new_child
.as(TAttrid)
5227 redef fun n_expr
=(node
)
5232 redef fun n_id
=(node
)
5239 redef fun visit_all
(v
: Visitor)
5241 v
.enter_visit
(_n_expr
)
5242 v
.enter_visit
(_n_id
)
5245 redef class AAttrAssignExpr
5246 init init_aattrassignexpr
(
5247 n_expr
: nullable AExpr,
5248 n_id
: nullable TAttrid,
5249 n_assign
: nullable TAssign,
5250 n_value
: nullable AExpr
5253 _n_expr
= n_expr
.as(not null)
5254 n_expr
.parent
= self
5255 _n_id
= n_id
.as(not null)
5257 _n_assign
= n_assign
.as(not null)
5258 n_assign
.parent
= self
5259 _n_value
= n_value
.as(not null)
5260 n_value
.parent
= self
5263 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5265 if _n_expr
== old_child
then
5266 n_expr
= new_child
.as(AExpr)
5269 if _n_id
== old_child
then
5270 n_id
= new_child
.as(TAttrid)
5273 if _n_assign
== old_child
then
5274 n_assign
= new_child
.as(TAssign)
5277 if _n_value
== old_child
then
5278 n_value
= new_child
.as(AExpr)
5283 redef fun n_expr
=(node
)
5288 redef fun n_id
=(node
)
5293 redef fun n_assign
=(node
)
5298 redef fun n_value
=(node
)
5305 redef fun visit_all
(v
: Visitor)
5307 v
.enter_visit
(_n_expr
)
5308 v
.enter_visit
(_n_id
)
5309 v
.enter_visit
(_n_assign
)
5310 v
.enter_visit
(_n_value
)
5313 redef class AAttrReassignExpr
5314 init init_aattrreassignexpr
(
5315 n_expr
: nullable AExpr,
5316 n_id
: nullable TAttrid,
5317 n_assign_op
: nullable AAssignOp,
5318 n_value
: nullable AExpr
5321 _n_expr
= n_expr
.as(not null)
5322 n_expr
.parent
= self
5323 _n_id
= n_id
.as(not null)
5325 _n_assign_op
= n_assign_op
.as(not null)
5326 n_assign_op
.parent
= self
5327 _n_value
= n_value
.as(not null)
5328 n_value
.parent
= self
5331 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5333 if _n_expr
== old_child
then
5334 n_expr
= new_child
.as(AExpr)
5337 if _n_id
== old_child
then
5338 n_id
= new_child
.as(TAttrid)
5341 if _n_assign_op
== old_child
then
5342 n_assign_op
= new_child
.as(AAssignOp)
5345 if _n_value
== old_child
then
5346 n_value
= new_child
.as(AExpr)
5351 redef fun n_expr
=(node
)
5356 redef fun n_id
=(node
)
5361 redef fun n_assign_op
=(node
)
5366 redef fun n_value
=(node
)
5373 redef fun visit_all
(v
: Visitor)
5375 v
.enter_visit
(_n_expr
)
5376 v
.enter_visit
(_n_id
)
5377 v
.enter_visit
(_n_assign_op
)
5378 v
.enter_visit
(_n_value
)
5381 redef class ACallExpr
5382 init init_acallexpr
(
5383 n_expr
: nullable AExpr,
5384 n_qid
: nullable AQid,
5385 n_args
: nullable AExprs
5388 _n_expr
= n_expr
.as(not null)
5389 n_expr
.parent
= self
5390 _n_qid
= n_qid
.as(not null)
5392 _n_args
= n_args
.as(not null)
5393 n_args
.parent
= self
5396 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5398 if _n_expr
== old_child
then
5399 n_expr
= new_child
.as(AExpr)
5402 if _n_qid
== old_child
then
5403 n_qid
= new_child
.as(AQid)
5406 if _n_args
== old_child
then
5407 n_args
= new_child
.as(AExprs)
5412 redef fun n_expr
=(node
)
5417 redef fun n_qid
=(node
)
5422 redef fun n_args
=(node
)
5429 redef fun visit_all
(v
: Visitor)
5431 v
.enter_visit
(_n_expr
)
5432 v
.enter_visit
(_n_qid
)
5433 v
.enter_visit
(_n_args
)
5436 redef class ACallAssignExpr
5437 init init_acallassignexpr
(
5438 n_expr
: nullable AExpr,
5439 n_qid
: nullable AQid,
5440 n_args
: nullable AExprs,
5441 n_assign
: nullable TAssign,
5442 n_value
: nullable AExpr
5445 _n_expr
= n_expr
.as(not null)
5446 n_expr
.parent
= self
5447 _n_qid
= n_qid
.as(not null)
5449 _n_args
= n_args
.as(not null)
5450 n_args
.parent
= self
5451 _n_assign
= n_assign
.as(not null)
5452 n_assign
.parent
= self
5453 _n_value
= n_value
.as(not null)
5454 n_value
.parent
= self
5457 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5459 if _n_expr
== old_child
then
5460 n_expr
= new_child
.as(AExpr)
5463 if _n_qid
== old_child
then
5464 n_qid
= new_child
.as(AQid)
5467 if _n_args
== old_child
then
5468 n_args
= new_child
.as(AExprs)
5471 if _n_assign
== old_child
then
5472 n_assign
= new_child
.as(TAssign)
5475 if _n_value
== old_child
then
5476 n_value
= new_child
.as(AExpr)
5481 redef fun n_expr
=(node
)
5486 redef fun n_qid
=(node
)
5491 redef fun n_args
=(node
)
5496 redef fun n_assign
=(node
)
5501 redef fun n_value
=(node
)
5508 redef fun visit_all
(v
: Visitor)
5510 v
.enter_visit
(_n_expr
)
5511 v
.enter_visit
(_n_qid
)
5512 v
.enter_visit
(_n_args
)
5513 v
.enter_visit
(_n_assign
)
5514 v
.enter_visit
(_n_value
)
5517 redef class ACallReassignExpr
5518 init init_acallreassignexpr
(
5519 n_expr
: nullable AExpr,
5520 n_qid
: nullable AQid,
5521 n_args
: nullable AExprs,
5522 n_assign_op
: nullable AAssignOp,
5523 n_value
: nullable AExpr
5526 _n_expr
= n_expr
.as(not null)
5527 n_expr
.parent
= self
5528 _n_qid
= n_qid
.as(not null)
5530 _n_args
= n_args
.as(not null)
5531 n_args
.parent
= self
5532 _n_assign_op
= n_assign_op
.as(not null)
5533 n_assign_op
.parent
= self
5534 _n_value
= n_value
.as(not null)
5535 n_value
.parent
= self
5538 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5540 if _n_expr
== old_child
then
5541 n_expr
= new_child
.as(AExpr)
5544 if _n_qid
== old_child
then
5545 n_qid
= new_child
.as(AQid)
5548 if _n_args
== old_child
then
5549 n_args
= new_child
.as(AExprs)
5552 if _n_assign_op
== old_child
then
5553 n_assign_op
= new_child
.as(AAssignOp)
5556 if _n_value
== old_child
then
5557 n_value
= new_child
.as(AExpr)
5562 redef fun n_expr
=(node
)
5567 redef fun n_qid
=(node
)
5572 redef fun n_args
=(node
)
5577 redef fun n_assign_op
=(node
)
5582 redef fun n_value
=(node
)
5589 redef fun visit_all
(v
: Visitor)
5591 v
.enter_visit
(_n_expr
)
5592 v
.enter_visit
(_n_qid
)
5593 v
.enter_visit
(_n_args
)
5594 v
.enter_visit
(_n_assign_op
)
5595 v
.enter_visit
(_n_value
)
5598 redef class ASuperExpr
5599 init init_asuperexpr
(
5600 n_qualified
: nullable AQualified,
5601 n_kwsuper
: nullable TKwsuper,
5602 n_args
: nullable AExprs
5605 _n_qualified
= n_qualified
5606 if n_qualified
!= null then n_qualified
.parent
= self
5607 _n_kwsuper
= n_kwsuper
.as(not null)
5608 n_kwsuper
.parent
= self
5609 _n_args
= n_args
.as(not null)
5610 n_args
.parent
= self
5613 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5615 if _n_qualified
== old_child
then
5616 n_qualified
= new_child
.as(nullable AQualified)
5619 if _n_kwsuper
== old_child
then
5620 n_kwsuper
= new_child
.as(TKwsuper)
5623 if _n_args
== old_child
then
5624 n_args
= new_child
.as(AExprs)
5629 redef fun n_qualified
=(node
)
5632 if node
!= null then node
.parent
= self
5634 redef fun n_kwsuper
=(node
)
5639 redef fun n_args
=(node
)
5646 redef fun visit_all
(v
: Visitor)
5648 v
.enter_visit
(_n_qualified
)
5649 v
.enter_visit
(_n_kwsuper
)
5650 v
.enter_visit
(_n_args
)
5653 redef class AInitExpr
5654 init init_ainitexpr
(
5655 n_expr
: nullable AExpr,
5656 n_kwinit
: nullable TKwinit,
5657 n_args
: nullable AExprs
5660 _n_expr
= n_expr
.as(not null)
5661 n_expr
.parent
= self
5662 _n_kwinit
= n_kwinit
.as(not null)
5663 n_kwinit
.parent
= self
5664 _n_args
= n_args
.as(not null)
5665 n_args
.parent
= self
5668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5670 if _n_expr
== old_child
then
5671 n_expr
= new_child
.as(AExpr)
5674 if _n_kwinit
== old_child
then
5675 n_kwinit
= new_child
.as(TKwinit)
5678 if _n_args
== old_child
then
5679 n_args
= new_child
.as(AExprs)
5684 redef fun n_expr
=(node
)
5689 redef fun n_kwinit
=(node
)
5694 redef fun n_args
=(node
)
5701 redef fun visit_all
(v
: Visitor)
5703 v
.enter_visit
(_n_expr
)
5704 v
.enter_visit
(_n_kwinit
)
5705 v
.enter_visit
(_n_args
)
5708 redef class ABraExpr
5709 init init_abraexpr
(
5710 n_expr
: nullable AExpr,
5711 n_args
: nullable AExprs
5714 _n_expr
= n_expr
.as(not null)
5715 n_expr
.parent
= self
5716 _n_args
= n_args
.as(not null)
5717 n_args
.parent
= self
5720 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5722 if _n_expr
== old_child
then
5723 n_expr
= new_child
.as(AExpr)
5726 if _n_args
== old_child
then
5727 n_args
= new_child
.as(AExprs)
5732 redef fun n_expr
=(node
)
5737 redef fun n_args
=(node
)
5744 redef fun visit_all
(v
: Visitor)
5746 v
.enter_visit
(_n_expr
)
5747 v
.enter_visit
(_n_args
)
5750 redef class ABraAssignExpr
5751 init init_abraassignexpr
(
5752 n_expr
: nullable AExpr,
5753 n_args
: nullable AExprs,
5754 n_assign
: nullable TAssign,
5755 n_value
: nullable AExpr
5758 _n_expr
= n_expr
.as(not null)
5759 n_expr
.parent
= self
5760 _n_args
= n_args
.as(not null)
5761 n_args
.parent
= self
5762 _n_assign
= n_assign
.as(not null)
5763 n_assign
.parent
= self
5764 _n_value
= n_value
.as(not null)
5765 n_value
.parent
= self
5768 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5770 if _n_expr
== old_child
then
5771 n_expr
= new_child
.as(AExpr)
5774 if _n_args
== old_child
then
5775 n_args
= new_child
.as(AExprs)
5778 if _n_assign
== old_child
then
5779 n_assign
= new_child
.as(TAssign)
5782 if _n_value
== old_child
then
5783 n_value
= new_child
.as(AExpr)
5788 redef fun n_expr
=(node
)
5793 redef fun n_args
=(node
)
5798 redef fun n_assign
=(node
)
5803 redef fun n_value
=(node
)
5810 redef fun visit_all
(v
: Visitor)
5812 v
.enter_visit
(_n_expr
)
5813 v
.enter_visit
(_n_args
)
5814 v
.enter_visit
(_n_assign
)
5815 v
.enter_visit
(_n_value
)
5818 redef class ABraReassignExpr
5819 init init_abrareassignexpr
(
5820 n_expr
: nullable AExpr,
5821 n_args
: nullable AExprs,
5822 n_assign_op
: nullable AAssignOp,
5823 n_value
: nullable AExpr
5826 _n_expr
= n_expr
.as(not null)
5827 n_expr
.parent
= self
5828 _n_args
= n_args
.as(not null)
5829 n_args
.parent
= self
5830 _n_assign_op
= n_assign_op
.as(not null)
5831 n_assign_op
.parent
= self
5832 _n_value
= n_value
.as(not null)
5833 n_value
.parent
= self
5836 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5838 if _n_expr
== old_child
then
5839 n_expr
= new_child
.as(AExpr)
5842 if _n_args
== old_child
then
5843 n_args
= new_child
.as(AExprs)
5846 if _n_assign_op
== old_child
then
5847 n_assign_op
= new_child
.as(AAssignOp)
5850 if _n_value
== old_child
then
5851 n_value
= new_child
.as(AExpr)
5856 redef fun n_expr
=(node
)
5861 redef fun n_args
=(node
)
5866 redef fun n_assign_op
=(node
)
5871 redef fun n_value
=(node
)
5878 redef fun visit_all
(v
: Visitor)
5880 v
.enter_visit
(_n_expr
)
5881 v
.enter_visit
(_n_args
)
5882 v
.enter_visit
(_n_assign_op
)
5883 v
.enter_visit
(_n_value
)
5886 redef class AVarExpr
5887 init init_avarexpr
(
5891 _n_id
= n_id
.as(not null)
5895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5897 if _n_id
== old_child
then
5898 n_id
= new_child
.as(TId)
5903 redef fun n_id
=(node
)
5910 redef fun visit_all
(v
: Visitor)
5912 v
.enter_visit
(_n_id
)
5915 redef class AVarAssignExpr
5916 init init_avarassignexpr
(
5918 n_assign
: nullable TAssign,
5919 n_value
: nullable AExpr
5922 _n_id
= n_id
.as(not null)
5924 _n_assign
= n_assign
.as(not null)
5925 n_assign
.parent
= self
5926 _n_value
= n_value
.as(not null)
5927 n_value
.parent
= self
5930 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5932 if _n_id
== old_child
then
5933 n_id
= new_child
.as(TId)
5936 if _n_assign
== old_child
then
5937 n_assign
= new_child
.as(TAssign)
5940 if _n_value
== old_child
then
5941 n_value
= new_child
.as(AExpr)
5946 redef fun n_id
=(node
)
5951 redef fun n_assign
=(node
)
5956 redef fun n_value
=(node
)
5963 redef fun visit_all
(v
: Visitor)
5965 v
.enter_visit
(_n_id
)
5966 v
.enter_visit
(_n_assign
)
5967 v
.enter_visit
(_n_value
)
5970 redef class AVarReassignExpr
5971 init init_avarreassignexpr
(
5973 n_assign_op
: nullable AAssignOp,
5974 n_value
: nullable AExpr
5977 _n_id
= n_id
.as(not null)
5979 _n_assign_op
= n_assign_op
.as(not null)
5980 n_assign_op
.parent
= self
5981 _n_value
= n_value
.as(not null)
5982 n_value
.parent
= self
5985 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5987 if _n_id
== old_child
then
5988 n_id
= new_child
.as(TId)
5991 if _n_assign_op
== old_child
then
5992 n_assign_op
= new_child
.as(AAssignOp)
5995 if _n_value
== old_child
then
5996 n_value
= new_child
.as(AExpr)
6001 redef fun n_id
=(node
)
6006 redef fun n_assign_op
=(node
)
6011 redef fun n_value
=(node
)
6018 redef fun visit_all
(v
: Visitor)
6020 v
.enter_visit
(_n_id
)
6021 v
.enter_visit
(_n_assign_op
)
6022 v
.enter_visit
(_n_value
)
6025 redef class ARangeExpr
6026 init init_arangeexpr
(
6027 n_expr
: nullable AExpr,
6028 n_expr2
: nullable AExpr,
6029 n_annotations
: nullable AAnnotations
6032 _n_expr
= n_expr
.as(not null)
6033 n_expr
.parent
= self
6034 _n_expr2
= n_expr2
.as(not null)
6035 n_expr2
.parent
= self
6036 _n_annotations
= n_annotations
6037 if n_annotations
!= null then n_annotations
.parent
= self
6040 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6042 if _n_expr
== old_child
then
6043 n_expr
= new_child
.as(AExpr)
6046 if _n_expr2
== old_child
then
6047 n_expr2
= new_child
.as(AExpr)
6050 if _n_annotations
== old_child
then
6051 n_annotations
= new_child
.as(nullable AAnnotations)
6056 redef fun n_expr
=(node
)
6061 redef fun n_expr2
=(node
)
6066 redef fun n_annotations
=(node
)
6068 _n_annotations
= node
6069 if node
!= null then node
.parent
= self
6073 redef fun visit_all
(v
: Visitor)
6075 v
.enter_visit
(_n_expr
)
6076 v
.enter_visit
(_n_expr2
)
6077 v
.enter_visit
(_n_annotations
)
6080 redef class ACrangeExpr
6081 init init_acrangeexpr
(
6082 n_obra
: nullable TObra,
6083 n_expr
: nullable AExpr,
6084 n_dotdot
: nullable TDotdot,
6085 n_expr2
: nullable AExpr,
6086 n_cbra
: nullable TCbra,
6087 n_annotations
: nullable AAnnotations
6090 _n_obra
= n_obra
.as(not null)
6091 n_obra
.parent
= self
6092 _n_expr
= n_expr
.as(not null)
6093 n_expr
.parent
= self
6094 _n_dotdot
= n_dotdot
.as(not null)
6095 n_dotdot
.parent
= self
6096 _n_expr2
= n_expr2
.as(not null)
6097 n_expr2
.parent
= self
6098 _n_cbra
= n_cbra
.as(not null)
6099 n_cbra
.parent
= self
6100 _n_annotations
= n_annotations
6101 if n_annotations
!= null then n_annotations
.parent
= self
6104 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6106 if _n_obra
== old_child
then
6107 n_obra
= new_child
.as(TObra)
6110 if _n_expr
== old_child
then
6111 n_expr
= new_child
.as(AExpr)
6114 if _n_dotdot
== old_child
then
6115 n_dotdot
= new_child
.as(TDotdot)
6118 if _n_expr2
== old_child
then
6119 n_expr2
= new_child
.as(AExpr)
6122 if _n_cbra
== old_child
then
6123 n_cbra
= new_child
.as(TCbra)
6126 if _n_annotations
== old_child
then
6127 n_annotations
= new_child
.as(nullable AAnnotations)
6132 redef fun n_obra
=(node
)
6137 redef fun n_expr
=(node
)
6142 redef fun n_dotdot
=(node
)
6147 redef fun n_expr2
=(node
)
6152 redef fun n_cbra
=(node
)
6157 redef fun n_annotations
=(node
)
6159 _n_annotations
= node
6160 if node
!= null then node
.parent
= self
6164 redef fun visit_all
(v
: Visitor)
6166 v
.enter_visit
(_n_obra
)
6167 v
.enter_visit
(_n_expr
)
6168 v
.enter_visit
(_n_dotdot
)
6169 v
.enter_visit
(_n_expr2
)
6170 v
.enter_visit
(_n_cbra
)
6171 v
.enter_visit
(_n_annotations
)
6174 redef class AOrangeExpr
6175 init init_aorangeexpr
(
6176 n_obra
: nullable TObra,
6177 n_expr
: nullable AExpr,
6178 n_dotdot
: nullable TDotdot,
6179 n_expr2
: nullable AExpr,
6180 n_cbra
: nullable TObra,
6181 n_annotations
: nullable AAnnotations
6184 _n_obra
= n_obra
.as(not null)
6185 n_obra
.parent
= self
6186 _n_expr
= n_expr
.as(not null)
6187 n_expr
.parent
= self
6188 _n_dotdot
= n_dotdot
.as(not null)
6189 n_dotdot
.parent
= self
6190 _n_expr2
= n_expr2
.as(not null)
6191 n_expr2
.parent
= self
6192 _n_cbra
= n_cbra
.as(not null)
6193 n_cbra
.parent
= self
6194 _n_annotations
= n_annotations
6195 if n_annotations
!= null then n_annotations
.parent
= self
6198 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6200 if _n_obra
== old_child
then
6201 n_obra
= new_child
.as(TObra)
6204 if _n_expr
== old_child
then
6205 n_expr
= new_child
.as(AExpr)
6208 if _n_dotdot
== old_child
then
6209 n_dotdot
= new_child
.as(TDotdot)
6212 if _n_expr2
== old_child
then
6213 n_expr2
= new_child
.as(AExpr)
6216 if _n_cbra
== old_child
then
6217 n_cbra
= new_child
.as(TObra)
6220 if _n_annotations
== old_child
then
6221 n_annotations
= new_child
.as(nullable AAnnotations)
6226 redef fun n_obra
=(node
)
6231 redef fun n_expr
=(node
)
6236 redef fun n_dotdot
=(node
)
6241 redef fun n_expr2
=(node
)
6246 redef fun n_cbra
=(node
)
6251 redef fun n_annotations
=(node
)
6253 _n_annotations
= node
6254 if node
!= null then node
.parent
= self
6258 redef fun visit_all
(v
: Visitor)
6260 v
.enter_visit
(_n_obra
)
6261 v
.enter_visit
(_n_expr
)
6262 v
.enter_visit
(_n_dotdot
)
6263 v
.enter_visit
(_n_expr2
)
6264 v
.enter_visit
(_n_cbra
)
6265 v
.enter_visit
(_n_annotations
)
6268 redef class AArrayExpr
6269 init init_aarrayexpr
(
6270 n_obra
: nullable TObra,
6271 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6272 n_type
: nullable AType,
6273 n_cbra
: nullable TCbra,
6274 n_annotations
: nullable AAnnotations
6277 _n_obra
= n_obra
.as(not null)
6278 n_obra
.parent
= self
6279 self.n_exprs
.unsafe_add_all
(n_exprs
)
6281 if n_type
!= null then n_type
.parent
= self
6282 _n_cbra
= n_cbra
.as(not null)
6283 n_cbra
.parent
= self
6284 _n_annotations
= n_annotations
6285 if n_annotations
!= null then n_annotations
.parent
= self
6288 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6290 if _n_obra
== old_child
then
6291 n_obra
= new_child
.as(TObra)
6294 if n_exprs
.replace_child
(old_child
, new_child
) then return
6295 if _n_type
== old_child
then
6296 n_type
= new_child
.as(nullable AType)
6299 if _n_cbra
== old_child
then
6300 n_cbra
= new_child
.as(TCbra)
6303 if _n_annotations
== old_child
then
6304 n_annotations
= new_child
.as(nullable AAnnotations)
6309 redef fun n_obra
=(node
)
6314 redef fun n_type
=(node
)
6317 if node
!= null then node
.parent
= self
6319 redef fun n_cbra
=(node
)
6324 redef fun n_annotations
=(node
)
6326 _n_annotations
= node
6327 if node
!= null then node
.parent
= self
6331 redef fun visit_all
(v
: Visitor)
6333 v
.enter_visit
(_n_obra
)
6334 n_exprs
.visit_all
(v
)
6335 v
.enter_visit
(_n_type
)
6336 v
.enter_visit
(_n_cbra
)
6337 v
.enter_visit
(_n_annotations
)
6340 redef class ASelfExpr
6341 init init_aselfexpr
(
6342 n_kwself
: nullable TKwself,
6343 n_annotations
: nullable AAnnotations
6346 _n_kwself
= n_kwself
.as(not null)
6347 n_kwself
.parent
= self
6348 _n_annotations
= n_annotations
6349 if n_annotations
!= null then n_annotations
.parent
= self
6352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6354 if _n_kwself
== old_child
then
6355 n_kwself
= new_child
.as(TKwself)
6358 if _n_annotations
== old_child
then
6359 n_annotations
= new_child
.as(nullable AAnnotations)
6364 redef fun n_kwself
=(node
)
6369 redef fun n_annotations
=(node
)
6371 _n_annotations
= node
6372 if node
!= null then node
.parent
= self
6376 redef fun visit_all
(v
: Visitor)
6378 v
.enter_visit
(_n_kwself
)
6379 v
.enter_visit
(_n_annotations
)
6382 redef class AImplicitSelfExpr
6383 init init_aimplicitselfexpr
6387 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6393 redef fun visit_all
(v
: Visitor)
6397 redef class ATrueExpr
6398 init init_atrueexpr
(
6399 n_kwtrue
: nullable TKwtrue,
6400 n_annotations
: nullable AAnnotations
6403 _n_kwtrue
= n_kwtrue
.as(not null)
6404 n_kwtrue
.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_kwtrue
== old_child
then
6412 n_kwtrue
= new_child
.as(TKwtrue)
6415 if _n_annotations
== old_child
then
6416 n_annotations
= new_child
.as(nullable AAnnotations)
6421 redef fun n_kwtrue
=(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_kwtrue
)
6436 v
.enter_visit
(_n_annotations
)
6439 redef class AFalseExpr
6440 init init_afalseexpr
(
6441 n_kwfalse
: nullable TKwfalse,
6442 n_annotations
: nullable AAnnotations
6445 _n_kwfalse
= n_kwfalse
.as(not null)
6446 n_kwfalse
.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_kwfalse
== old_child
then
6454 n_kwfalse
= new_child
.as(TKwfalse)
6457 if _n_annotations
== old_child
then
6458 n_annotations
= new_child
.as(nullable AAnnotations)
6463 redef fun n_kwfalse
=(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_kwfalse
)
6478 v
.enter_visit
(_n_annotations
)
6481 redef class ANullExpr
6482 init init_anullexpr
(
6483 n_kwnull
: nullable TKwnull,
6484 n_annotations
: nullable AAnnotations
6487 _n_kwnull
= n_kwnull
.as(not null)
6488 n_kwnull
.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_kwnull
== old_child
then
6496 n_kwnull
= new_child
.as(TKwnull)
6499 if _n_annotations
== old_child
then
6500 n_annotations
= new_child
.as(nullable AAnnotations)
6505 redef fun n_kwnull
=(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_kwnull
)
6520 v
.enter_visit
(_n_annotations
)
6523 redef class AIntegerExpr
6524 init init_aintegerexpr
(
6525 n_integer
: nullable TInteger,
6526 n_annotations
: nullable AAnnotations
6529 _n_integer
= n_integer
.as(not null)
6530 n_integer
.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_integer
== old_child
then
6538 n_integer
= new_child
.as(TInteger)
6541 if _n_annotations
== old_child
then
6542 n_annotations
= new_child
.as(nullable AAnnotations)
6547 redef fun n_integer
=(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_integer
)
6562 v
.enter_visit
(_n_annotations
)
6565 redef class AFloatExpr
6566 init init_afloatexpr
(
6567 n_float
: nullable TFloat,
6568 n_annotations
: nullable AAnnotations
6571 _n_float
= n_float
.as(not null)
6572 n_float
.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_float
== old_child
then
6580 n_float
= new_child
.as(TFloat)
6583 if _n_annotations
== old_child
then
6584 n_annotations
= new_child
.as(nullable AAnnotations)
6589 redef fun n_float
=(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_float
)
6604 v
.enter_visit
(_n_annotations
)
6607 redef class ACharExpr
6608 init init_acharexpr
(
6609 n_char
: nullable TChar,
6610 n_annotations
: nullable AAnnotations
6613 _n_char
= n_char
.as(not null)
6614 n_char
.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_char
== old_child
then
6622 n_char
= new_child
.as(TChar)
6625 if _n_annotations
== old_child
then
6626 n_annotations
= new_child
.as(nullable AAnnotations)
6631 redef fun n_char
=(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_char
)
6646 v
.enter_visit
(_n_annotations
)
6649 redef class AStringExpr
6650 init init_astringexpr
(
6651 n_string
: nullable TString,
6652 n_annotations
: nullable AAnnotations
6655 _n_string
= n_string
.as(not null)
6656 n_string
.parent
= self
6657 _n_annotations
= n_annotations
6658 if n_annotations
!= null then n_annotations
.parent
= self
6661 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6663 if _n_string
== old_child
then
6664 n_string
= new_child
.as(TString)
6667 if _n_annotations
== old_child
then
6668 n_annotations
= new_child
.as(nullable AAnnotations)
6673 redef fun n_string
=(node
)
6678 redef fun n_annotations
=(node
)
6680 _n_annotations
= node
6681 if node
!= null then node
.parent
= self
6685 redef fun visit_all
(v
: Visitor)
6687 v
.enter_visit
(_n_string
)
6688 v
.enter_visit
(_n_annotations
)
6691 redef class AStartStringExpr
6692 init init_astartstringexpr
(
6693 n_string
: nullable TStartString
6696 _n_string
= n_string
.as(not null)
6697 n_string
.parent
= self
6700 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6702 if _n_string
== old_child
then
6703 n_string
= new_child
.as(TStartString)
6708 redef fun n_string
=(node
)
6715 redef fun visit_all
(v
: Visitor)
6717 v
.enter_visit
(_n_string
)
6720 redef class AMidStringExpr
6721 init init_amidstringexpr
(
6722 n_string
: nullable TMidString
6725 _n_string
= n_string
.as(not null)
6726 n_string
.parent
= self
6729 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6731 if _n_string
== old_child
then
6732 n_string
= new_child
.as(TMidString)
6737 redef fun n_string
=(node
)
6744 redef fun visit_all
(v
: Visitor)
6746 v
.enter_visit
(_n_string
)
6749 redef class AEndStringExpr
6750 init init_aendstringexpr
(
6751 n_string
: nullable TEndString
6754 _n_string
= n_string
.as(not null)
6755 n_string
.parent
= self
6758 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6760 if _n_string
== old_child
then
6761 n_string
= new_child
.as(TEndString)
6766 redef fun n_string
=(node
)
6773 redef fun visit_all
(v
: Visitor)
6775 v
.enter_visit
(_n_string
)
6778 redef class ASuperstringExpr
6779 init init_asuperstringexpr
(
6780 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6781 n_annotations
: nullable AAnnotations
6784 self.n_exprs
.unsafe_add_all
(n_exprs
)
6785 _n_annotations
= n_annotations
6786 if n_annotations
!= null then n_annotations
.parent
= self
6789 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6791 if n_exprs
.replace_child
(old_child
, new_child
) then return
6792 if _n_annotations
== old_child
then
6793 n_annotations
= new_child
.as(nullable AAnnotations)
6798 redef fun n_annotations
=(node
)
6800 _n_annotations
= node
6801 if node
!= null then node
.parent
= self
6805 redef fun visit_all
(v
: Visitor)
6807 n_exprs
.visit_all
(v
)
6808 v
.enter_visit
(_n_annotations
)
6811 redef class AParExpr
6812 init init_aparexpr
(
6813 n_opar
: nullable TOpar,
6814 n_expr
: nullable AExpr,
6815 n_cpar
: nullable TCpar,
6816 n_annotations
: nullable AAnnotations
6819 _n_opar
= n_opar
.as(not null)
6820 n_opar
.parent
= self
6821 _n_expr
= n_expr
.as(not null)
6822 n_expr
.parent
= self
6823 _n_cpar
= n_cpar
.as(not null)
6824 n_cpar
.parent
= self
6825 _n_annotations
= n_annotations
6826 if n_annotations
!= null then n_annotations
.parent
= self
6829 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6831 if _n_opar
== old_child
then
6832 n_opar
= new_child
.as(TOpar)
6835 if _n_expr
== old_child
then
6836 n_expr
= new_child
.as(AExpr)
6839 if _n_cpar
== old_child
then
6840 n_cpar
= new_child
.as(TCpar)
6843 if _n_annotations
== old_child
then
6844 n_annotations
= new_child
.as(nullable AAnnotations)
6849 redef fun n_opar
=(node
)
6854 redef fun n_expr
=(node
)
6859 redef fun n_cpar
=(node
)
6864 redef fun n_annotations
=(node
)
6866 _n_annotations
= node
6867 if node
!= null then node
.parent
= self
6871 redef fun visit_all
(v
: Visitor)
6873 v
.enter_visit
(_n_opar
)
6874 v
.enter_visit
(_n_expr
)
6875 v
.enter_visit
(_n_cpar
)
6876 v
.enter_visit
(_n_annotations
)
6879 redef class AAsCastExpr
6880 init init_aascastexpr
(
6881 n_expr
: nullable AExpr,
6882 n_kwas
: nullable TKwas,
6883 n_opar
: nullable TOpar,
6884 n_type
: nullable AType,
6885 n_cpar
: nullable TCpar
6888 _n_expr
= n_expr
.as(not null)
6889 n_expr
.parent
= self
6890 _n_kwas
= n_kwas
.as(not null)
6891 n_kwas
.parent
= self
6893 if n_opar
!= null then n_opar
.parent
= self
6894 _n_type
= n_type
.as(not null)
6895 n_type
.parent
= self
6897 if n_cpar
!= null then n_cpar
.parent
= self
6900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6902 if _n_expr
== old_child
then
6903 n_expr
= new_child
.as(AExpr)
6906 if _n_kwas
== old_child
then
6907 n_kwas
= new_child
.as(TKwas)
6910 if _n_opar
== old_child
then
6911 n_opar
= new_child
.as(nullable TOpar)
6914 if _n_type
== old_child
then
6915 n_type
= new_child
.as(AType)
6918 if _n_cpar
== old_child
then
6919 n_cpar
= new_child
.as(nullable TCpar)
6924 redef fun n_expr
=(node
)
6929 redef fun n_kwas
=(node
)
6934 redef fun n_opar
=(node
)
6937 if node
!= null then node
.parent
= self
6939 redef fun n_type
=(node
)
6944 redef fun n_cpar
=(node
)
6947 if node
!= null then node
.parent
= self
6951 redef fun visit_all
(v
: Visitor)
6953 v
.enter_visit
(_n_expr
)
6954 v
.enter_visit
(_n_kwas
)
6955 v
.enter_visit
(_n_opar
)
6956 v
.enter_visit
(_n_type
)
6957 v
.enter_visit
(_n_cpar
)
6960 redef class AAsNotnullExpr
6961 init init_aasnotnullexpr
(
6962 n_expr
: nullable AExpr,
6963 n_kwas
: nullable TKwas,
6964 n_opar
: nullable TOpar,
6965 n_kwnot
: nullable TKwnot,
6966 n_kwnull
: nullable TKwnull,
6967 n_cpar
: nullable TCpar
6970 _n_expr
= n_expr
.as(not null)
6971 n_expr
.parent
= self
6972 _n_kwas
= n_kwas
.as(not null)
6973 n_kwas
.parent
= self
6975 if n_opar
!= null then n_opar
.parent
= self
6976 _n_kwnot
= n_kwnot
.as(not null)
6977 n_kwnot
.parent
= self
6978 _n_kwnull
= n_kwnull
.as(not null)
6979 n_kwnull
.parent
= self
6981 if n_cpar
!= null then n_cpar
.parent
= self
6984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6986 if _n_expr
== old_child
then
6987 n_expr
= new_child
.as(AExpr)
6990 if _n_kwas
== old_child
then
6991 n_kwas
= new_child
.as(TKwas)
6994 if _n_opar
== old_child
then
6995 n_opar
= new_child
.as(nullable TOpar)
6998 if _n_kwnot
== old_child
then
6999 n_kwnot
= new_child
.as(TKwnot)
7002 if _n_kwnull
== old_child
then
7003 n_kwnull
= new_child
.as(TKwnull)
7006 if _n_cpar
== old_child
then
7007 n_cpar
= new_child
.as(nullable TCpar)
7012 redef fun n_expr
=(node
)
7017 redef fun n_kwas
=(node
)
7022 redef fun n_opar
=(node
)
7025 if node
!= null then node
.parent
= self
7027 redef fun n_kwnot
=(node
)
7032 redef fun n_kwnull
=(node
)
7037 redef fun n_cpar
=(node
)
7040 if node
!= null then node
.parent
= self
7044 redef fun visit_all
(v
: Visitor)
7046 v
.enter_visit
(_n_expr
)
7047 v
.enter_visit
(_n_kwas
)
7048 v
.enter_visit
(_n_opar
)
7049 v
.enter_visit
(_n_kwnot
)
7050 v
.enter_visit
(_n_kwnull
)
7051 v
.enter_visit
(_n_cpar
)
7054 redef class AIssetAttrExpr
7055 init init_aissetattrexpr
(
7056 n_kwisset
: nullable TKwisset,
7057 n_expr
: nullable AExpr,
7058 n_id
: nullable TAttrid
7061 _n_kwisset
= n_kwisset
.as(not null)
7062 n_kwisset
.parent
= self
7063 _n_expr
= n_expr
.as(not null)
7064 n_expr
.parent
= self
7065 _n_id
= n_id
.as(not null)
7069 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7071 if _n_kwisset
== old_child
then
7072 n_kwisset
= new_child
.as(TKwisset)
7075 if _n_expr
== old_child
then
7076 n_expr
= new_child
.as(AExpr)
7079 if _n_id
== old_child
then
7080 n_id
= new_child
.as(TAttrid)
7085 redef fun n_kwisset
=(node
)
7090 redef fun n_expr
=(node
)
7095 redef fun n_id
=(node
)
7102 redef fun visit_all
(v
: Visitor)
7104 v
.enter_visit
(_n_kwisset
)
7105 v
.enter_visit
(_n_expr
)
7106 v
.enter_visit
(_n_id
)
7109 redef class ADebugTypeExpr
7110 init init_adebugtypeexpr
(
7111 n_kwdebug
: nullable TKwdebug,
7112 n_kwtype
: nullable TKwtype,
7113 n_expr
: nullable AExpr,
7114 n_type
: nullable AType
7117 _n_kwdebug
= n_kwdebug
.as(not null)
7118 n_kwdebug
.parent
= self
7119 _n_kwtype
= n_kwtype
.as(not null)
7120 n_kwtype
.parent
= self
7121 _n_expr
= n_expr
.as(not null)
7122 n_expr
.parent
= self
7123 _n_type
= n_type
.as(not null)
7124 n_type
.parent
= self
7127 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7129 if _n_kwdebug
== old_child
then
7130 n_kwdebug
= new_child
.as(TKwdebug)
7133 if _n_kwtype
== old_child
then
7134 n_kwtype
= new_child
.as(TKwtype)
7137 if _n_expr
== old_child
then
7138 n_expr
= new_child
.as(AExpr)
7141 if _n_type
== old_child
then
7142 n_type
= new_child
.as(AType)
7147 redef fun n_kwdebug
=(node
)
7152 redef fun n_kwtype
=(node
)
7157 redef fun n_expr
=(node
)
7162 redef fun n_type
=(node
)
7169 redef fun visit_all
(v
: Visitor)
7171 v
.enter_visit
(_n_kwdebug
)
7172 v
.enter_visit
(_n_kwtype
)
7173 v
.enter_visit
(_n_expr
)
7174 v
.enter_visit
(_n_type
)
7177 redef class AVarargExpr
7178 init init_avarargexpr
(
7179 n_expr
: nullable AExpr,
7180 n_dotdotdot
: nullable TDotdotdot
7183 _n_expr
= n_expr
.as(not null)
7184 n_expr
.parent
= self
7185 _n_dotdotdot
= n_dotdotdot
.as(not null)
7186 n_dotdotdot
.parent
= self
7189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7191 if _n_expr
== old_child
then
7192 n_expr
= new_child
.as(AExpr)
7195 if _n_dotdotdot
== old_child
then
7196 n_dotdotdot
= new_child
.as(TDotdotdot)
7201 redef fun n_expr
=(node
)
7206 redef fun n_dotdotdot
=(node
)
7213 redef fun visit_all
(v
: Visitor)
7215 v
.enter_visit
(_n_expr
)
7216 v
.enter_visit
(_n_dotdotdot
)
7219 redef class ANamedargExpr
7220 init init_anamedargexpr
(
7222 n_assign
: nullable TAssign,
7223 n_expr
: nullable AExpr
7226 _n_id
= n_id
.as(not null)
7228 _n_assign
= n_assign
.as(not null)
7229 n_assign
.parent
= self
7230 _n_expr
= n_expr
.as(not null)
7231 n_expr
.parent
= self
7234 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7236 if _n_id
== old_child
then
7237 n_id
= new_child
.as(TId)
7240 if _n_assign
== old_child
then
7241 n_assign
= new_child
.as(TAssign)
7244 if _n_expr
== old_child
then
7245 n_expr
= new_child
.as(AExpr)
7250 redef fun n_id
=(node
)
7255 redef fun n_assign
=(node
)
7260 redef fun n_expr
=(node
)
7267 redef fun visit_all
(v
: Visitor)
7269 v
.enter_visit
(_n_id
)
7270 v
.enter_visit
(_n_assign
)
7271 v
.enter_visit
(_n_expr
)
7274 redef class ATypeExpr
7275 init init_atypeexpr
(
7276 n_type
: nullable AType
7279 _n_type
= n_type
.as(not null)
7280 n_type
.parent
= self
7283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7285 if _n_type
== old_child
then
7286 n_type
= new_child
.as(AType)
7291 redef fun n_type
=(node
)
7298 redef fun visit_all
(v
: Visitor)
7300 v
.enter_visit
(_n_type
)
7303 redef class AMethidExpr
7304 init init_amethidexpr
(
7305 n_expr
: nullable AExpr,
7306 n_id
: nullable AMethid
7309 _n_expr
= n_expr
.as(not null)
7310 n_expr
.parent
= self
7311 _n_id
= n_id
.as(not null)
7315 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7317 if _n_expr
== old_child
then
7318 n_expr
= new_child
.as(AExpr)
7321 if _n_id
== old_child
then
7322 n_id
= new_child
.as(AMethid)
7327 redef fun n_expr
=(node
)
7332 redef fun n_id
=(node
)
7339 redef fun visit_all
(v
: Visitor)
7341 v
.enter_visit
(_n_expr
)
7342 v
.enter_visit
(_n_id
)
7347 n_annotations
: nullable AAnnotations
7350 _n_annotations
= n_annotations
.as(not null)
7351 n_annotations
.parent
= self
7354 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7356 if _n_annotations
== old_child
then
7357 n_annotations
= new_child
.as(AAnnotations)
7362 redef fun n_annotations
=(node
)
7364 _n_annotations
= node
7369 redef fun visit_all
(v
: Visitor)
7371 v
.enter_visit
(_n_annotations
)
7374 redef class AManyExpr
7375 init init_amanyexpr
(
7376 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7379 self.n_exprs
.unsafe_add_all
(n_exprs
)
7382 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7384 if n_exprs
.replace_child
(old_child
, new_child
) then return
7389 redef fun visit_all
(v
: Visitor)
7391 n_exprs
.visit_all
(v
)
7394 redef class AListExprs
7395 init init_alistexprs
(
7396 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7399 self.n_exprs
.unsafe_add_all
(n_exprs
)
7402 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7404 if n_exprs
.replace_child
(old_child
, new_child
) then return
7409 redef fun visit_all
(v
: Visitor)
7411 n_exprs
.visit_all
(v
)
7414 redef class AParExprs
7415 init init_aparexprs
(
7416 n_opar
: nullable TOpar,
7417 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7418 n_cpar
: nullable TCpar
7421 _n_opar
= n_opar
.as(not null)
7422 n_opar
.parent
= self
7423 self.n_exprs
.unsafe_add_all
(n_exprs
)
7424 _n_cpar
= n_cpar
.as(not null)
7425 n_cpar
.parent
= self
7428 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7430 if _n_opar
== old_child
then
7431 n_opar
= new_child
.as(TOpar)
7434 if n_exprs
.replace_child
(old_child
, new_child
) then return
7435 if _n_cpar
== old_child
then
7436 n_cpar
= new_child
.as(TCpar)
7441 redef fun n_opar
=(node
)
7446 redef fun n_cpar
=(node
)
7453 redef fun visit_all
(v
: Visitor)
7455 v
.enter_visit
(_n_opar
)
7456 n_exprs
.visit_all
(v
)
7457 v
.enter_visit
(_n_cpar
)
7460 redef class ABraExprs
7461 init init_abraexprs
(
7462 n_obra
: nullable TObra,
7463 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7464 n_cbra
: nullable TCbra
7467 _n_obra
= n_obra
.as(not null)
7468 n_obra
.parent
= self
7469 self.n_exprs
.unsafe_add_all
(n_exprs
)
7470 _n_cbra
= n_cbra
.as(not null)
7471 n_cbra
.parent
= self
7474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7476 if _n_obra
== old_child
then
7477 n_obra
= new_child
.as(TObra)
7480 if n_exprs
.replace_child
(old_child
, new_child
) then return
7481 if _n_cbra
== old_child
then
7482 n_cbra
= new_child
.as(TCbra)
7487 redef fun n_obra
=(node
)
7492 redef fun n_cbra
=(node
)
7499 redef fun visit_all
(v
: Visitor)
7501 v
.enter_visit
(_n_obra
)
7502 n_exprs
.visit_all
(v
)
7503 v
.enter_visit
(_n_cbra
)
7506 redef class APlusAssignOp
7507 init init_aplusassignop
(
7508 n_op
: nullable TPluseq
7511 _n_op
= n_op
.as(not null)
7515 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7517 if _n_op
== old_child
then
7518 n_op
= new_child
.as(TPluseq)
7523 redef fun n_op
=(node
)
7530 redef fun visit_all
(v
: Visitor)
7532 v
.enter_visit
(_n_op
)
7535 redef class AMinusAssignOp
7536 init init_aminusassignop
(
7537 n_op
: nullable TMinuseq
7540 _n_op
= n_op
.as(not null)
7544 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7546 if _n_op
== old_child
then
7547 n_op
= new_child
.as(TMinuseq)
7552 redef fun n_op
=(node
)
7559 redef fun visit_all
(v
: Visitor)
7561 v
.enter_visit
(_n_op
)
7564 redef class AStarAssignOp
7565 init init_astarassignop
(
7566 n_op
: nullable TStareq
7569 _n_op
= n_op
.as(not null)
7573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7575 if _n_op
== old_child
then
7576 n_op
= new_child
.as(TStareq)
7581 redef fun n_op
=(node
)
7588 redef fun visit_all
(v
: Visitor)
7590 v
.enter_visit
(_n_op
)
7593 redef class ASlashAssignOp
7594 init init_aslashassignop
(
7595 n_op
: nullable TSlasheq
7598 _n_op
= n_op
.as(not null)
7602 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7604 if _n_op
== old_child
then
7605 n_op
= new_child
.as(TSlasheq)
7610 redef fun n_op
=(node
)
7617 redef fun visit_all
(v
: Visitor)
7619 v
.enter_visit
(_n_op
)
7622 redef class APercentAssignOp
7623 init init_apercentassignop
(
7624 n_op
: nullable TPercenteq
7627 _n_op
= n_op
.as(not null)
7631 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7633 if _n_op
== old_child
then
7634 n_op
= new_child
.as(TPercenteq)
7639 redef fun n_op
=(node
)
7646 redef fun visit_all
(v
: Visitor)
7648 v
.enter_visit
(_n_op
)
7651 redef class AStarstarAssignOp
7652 init init_astarstarassignop
(
7653 n_op
: nullable TStarstareq
7656 _n_op
= n_op
.as(not null)
7660 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7662 if _n_op
== old_child
then
7663 n_op
= new_child
.as(TStarstareq)
7668 redef fun n_op
=(node
)
7675 redef fun visit_all
(v
: Visitor)
7677 v
.enter_visit
(_n_op
)
7680 redef class APipeAssignOp
7681 init init_apipeassignop
(
7682 n_op
: nullable TPipeeq
7685 _n_op
= n_op
.as(not null)
7689 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7691 if _n_op
== old_child
then
7692 n_op
= new_child
.as(TPipeeq)
7697 redef fun n_op
=(node
)
7704 redef fun visit_all
(v
: Visitor)
7706 v
.enter_visit
(_n_op
)
7709 redef class ACaretAssignOp
7710 init init_acaretassignop
(
7711 n_op
: nullable TCareteq
7714 _n_op
= n_op
.as(not null)
7718 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7720 if _n_op
== old_child
then
7721 n_op
= new_child
.as(TCareteq)
7726 redef fun n_op
=(node
)
7733 redef fun visit_all
(v
: Visitor)
7735 v
.enter_visit
(_n_op
)
7738 redef class AAmpAssignOp
7739 init init_aampassignop
(
7740 n_op
: nullable TAmpeq
7743 _n_op
= n_op
.as(not null)
7747 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7749 if _n_op
== old_child
then
7750 n_op
= new_child
.as(TAmpeq)
7755 redef fun n_op
=(node
)
7762 redef fun visit_all
(v
: Visitor)
7764 v
.enter_visit
(_n_op
)
7767 redef class ALlAssignOp
7768 init init_allassignop
(
7769 n_op
: nullable TLleq
7772 _n_op
= n_op
.as(not null)
7776 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7778 if _n_op
== old_child
then
7779 n_op
= new_child
.as(TLleq)
7784 redef fun n_op
=(node
)
7791 redef fun visit_all
(v
: Visitor)
7793 v
.enter_visit
(_n_op
)
7796 redef class AGgAssignOp
7797 init init_aggassignop
(
7798 n_op
: nullable TGgeq
7801 _n_op
= n_op
.as(not null)
7805 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7807 if _n_op
== old_child
then
7808 n_op
= new_child
.as(TGgeq)
7813 redef fun n_op
=(node
)
7820 redef fun visit_all
(v
: Visitor)
7822 v
.enter_visit
(_n_op
)
7825 redef class AForGroup
7826 init init_aforgroup
(
7827 n_ids
: Collection[Object], # Should be Collection[TId]
7828 n_kwin
: nullable TKwin,
7829 n_expr
: nullable AExpr
7832 self.n_ids
.unsafe_add_all
(n_ids
)
7833 _n_kwin
= n_kwin
.as(not null)
7834 n_kwin
.parent
= self
7835 _n_expr
= n_expr
.as(not null)
7836 n_expr
.parent
= self
7839 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7841 if n_ids
.replace_child
(old_child
, new_child
) then return
7842 if _n_kwin
== old_child
then
7843 n_kwin
= new_child
.as(TKwin)
7846 if _n_expr
== old_child
then
7847 n_expr
= new_child
.as(AExpr)
7852 redef fun n_kwin
=(node
)
7857 redef fun n_expr
=(node
)
7864 redef fun visit_all
(v
: Visitor)
7867 v
.enter_visit
(_n_kwin
)
7868 v
.enter_visit
(_n_expr
)
7871 redef class AModuleName
7872 init init_amodulename
(
7873 n_quad
: nullable TQuad,
7874 n_path
: Collection[Object], # Should be Collection[TId]
7879 if n_quad
!= null then n_quad
.parent
= self
7880 self.n_path
.unsafe_add_all
(n_path
)
7881 _n_id
= n_id
.as(not null)
7885 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7887 if _n_quad
== old_child
then
7888 n_quad
= new_child
.as(nullable TQuad)
7891 if n_path
.replace_child
(old_child
, new_child
) then return
7892 if _n_id
== old_child
then
7893 n_id
= new_child
.as(TId)
7898 redef fun n_quad
=(node
)
7901 if node
!= null then node
.parent
= self
7903 redef fun n_id
=(node
)
7910 redef fun visit_all
(v
: Visitor)
7912 v
.enter_visit
(_n_quad
)
7914 v
.enter_visit
(_n_id
)
7917 redef class AExternCalls
7918 init init_aexterncalls
(
7919 n_kwimport
: nullable TKwimport,
7920 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7923 _n_kwimport
= n_kwimport
.as(not null)
7924 n_kwimport
.parent
= self
7925 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7928 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7930 if _n_kwimport
== old_child
then
7931 n_kwimport
= new_child
.as(TKwimport)
7934 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7937 redef fun n_kwimport
=(node
)
7944 redef fun visit_all
(v
: Visitor)
7946 v
.enter_visit
(_n_kwimport
)
7947 n_extern_calls
.visit_all
(v
)
7950 redef class AExternCall
7951 init init_aexterncall
7955 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7961 redef fun visit_all
(v
: Visitor)
7965 redef class ASuperExternCall
7966 init init_asuperexterncall
(
7967 n_kwsuper
: nullable TKwsuper
7970 _n_kwsuper
= n_kwsuper
.as(not null)
7971 n_kwsuper
.parent
= self
7974 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7976 if _n_kwsuper
== old_child
then
7977 n_kwsuper
= new_child
.as(TKwsuper)
7982 redef fun n_kwsuper
=(node
)
7989 redef fun visit_all
(v
: Visitor)
7991 v
.enter_visit
(_n_kwsuper
)
7994 redef class ALocalPropExternCall
7995 init init_alocalpropexterncall
(
7996 n_methid
: nullable AMethid
7999 _n_methid
= n_methid
.as(not null)
8000 n_methid
.parent
= self
8003 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8005 if _n_methid
== old_child
then
8006 n_methid
= new_child
.as(AMethid)
8011 redef fun n_methid
=(node
)
8018 redef fun visit_all
(v
: Visitor)
8020 v
.enter_visit
(_n_methid
)
8023 redef class AFullPropExternCall
8024 init init_afullpropexterncall
(
8025 n_type
: nullable AType,
8026 n_dot
: nullable TDot,
8027 n_methid
: nullable AMethid
8030 _n_type
= n_type
.as(not null)
8031 n_type
.parent
= self
8033 if n_dot
!= null then n_dot
.parent
= self
8034 _n_methid
= n_methid
.as(not null)
8035 n_methid
.parent
= self
8038 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8040 if _n_type
== old_child
then
8041 n_type
= new_child
.as(AType)
8044 if _n_dot
== old_child
then
8045 n_dot
= new_child
.as(nullable TDot)
8048 if _n_methid
== old_child
then
8049 n_methid
= new_child
.as(AMethid)
8054 redef fun n_type
=(node
)
8059 redef fun n_dot
=(node
)
8062 if node
!= null then node
.parent
= self
8064 redef fun n_methid
=(node
)
8071 redef fun visit_all
(v
: Visitor)
8073 v
.enter_visit
(_n_type
)
8074 v
.enter_visit
(_n_dot
)
8075 v
.enter_visit
(_n_methid
)
8078 redef class AInitPropExternCall
8079 init init_ainitpropexterncall
(
8080 n_type
: nullable AType
8083 _n_type
= n_type
.as(not null)
8084 n_type
.parent
= self
8087 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8089 if _n_type
== old_child
then
8090 n_type
= new_child
.as(AType)
8095 redef fun n_type
=(node
)
8102 redef fun visit_all
(v
: Visitor)
8104 v
.enter_visit
(_n_type
)
8107 redef class ACastAsExternCall
8108 init init_acastasexterncall
(
8109 n_from_type
: nullable AType,
8110 n_dot
: nullable TDot,
8111 n_kwas
: nullable TKwas,
8112 n_to_type
: nullable AType
8115 _n_from_type
= n_from_type
.as(not null)
8116 n_from_type
.parent
= self
8118 if n_dot
!= null then n_dot
.parent
= self
8119 _n_kwas
= n_kwas
.as(not null)
8120 n_kwas
.parent
= self
8121 _n_to_type
= n_to_type
.as(not null)
8122 n_to_type
.parent
= self
8125 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8127 if _n_from_type
== old_child
then
8128 n_from_type
= new_child
.as(AType)
8131 if _n_dot
== old_child
then
8132 n_dot
= new_child
.as(nullable TDot)
8135 if _n_kwas
== old_child
then
8136 n_kwas
= new_child
.as(TKwas)
8139 if _n_to_type
== old_child
then
8140 n_to_type
= new_child
.as(AType)
8145 redef fun n_from_type
=(node
)
8150 redef fun n_dot
=(node
)
8153 if node
!= null then node
.parent
= self
8155 redef fun n_kwas
=(node
)
8160 redef fun n_to_type
=(node
)
8167 redef fun visit_all
(v
: Visitor)
8169 v
.enter_visit
(_n_from_type
)
8170 v
.enter_visit
(_n_dot
)
8171 v
.enter_visit
(_n_kwas
)
8172 v
.enter_visit
(_n_to_type
)
8175 redef class AAsNullableExternCall
8176 init init_aasnullableexterncall
(
8177 n_type
: nullable AType,
8178 n_kwas
: nullable TKwas,
8179 n_kwnullable
: nullable TKwnullable
8182 _n_type
= n_type
.as(not null)
8183 n_type
.parent
= self
8184 _n_kwas
= n_kwas
.as(not null)
8185 n_kwas
.parent
= self
8186 _n_kwnullable
= n_kwnullable
.as(not null)
8187 n_kwnullable
.parent
= self
8190 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8192 if _n_type
== old_child
then
8193 n_type
= new_child
.as(AType)
8196 if _n_kwas
== old_child
then
8197 n_kwas
= new_child
.as(TKwas)
8200 if _n_kwnullable
== old_child
then
8201 n_kwnullable
= new_child
.as(TKwnullable)
8206 redef fun n_type
=(node
)
8211 redef fun n_kwas
=(node
)
8216 redef fun n_kwnullable
=(node
)
8218 _n_kwnullable
= node
8223 redef fun visit_all
(v
: Visitor)
8225 v
.enter_visit
(_n_type
)
8226 v
.enter_visit
(_n_kwas
)
8227 v
.enter_visit
(_n_kwnullable
)
8230 redef class AAsNotNullableExternCall
8231 init init_aasnotnullableexterncall
(
8232 n_type
: nullable AType,
8233 n_kwas
: nullable TKwas,
8234 n_kwnot
: nullable TKwnot,
8235 n_kwnullable
: nullable TKwnullable
8238 _n_type
= n_type
.as(not null)
8239 n_type
.parent
= self
8240 _n_kwas
= n_kwas
.as(not null)
8241 n_kwas
.parent
= self
8242 _n_kwnot
= n_kwnot
.as(not null)
8243 n_kwnot
.parent
= self
8244 _n_kwnullable
= n_kwnullable
.as(not null)
8245 n_kwnullable
.parent
= self
8248 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8250 if _n_type
== old_child
then
8251 n_type
= new_child
.as(AType)
8254 if _n_kwas
== old_child
then
8255 n_kwas
= new_child
.as(TKwas)
8258 if _n_kwnot
== old_child
then
8259 n_kwnot
= new_child
.as(TKwnot)
8262 if _n_kwnullable
== old_child
then
8263 n_kwnullable
= new_child
.as(TKwnullable)
8268 redef fun n_type
=(node
)
8273 redef fun n_kwas
=(node
)
8278 redef fun n_kwnot
=(node
)
8283 redef fun n_kwnullable
=(node
)
8285 _n_kwnullable
= node
8290 redef fun visit_all
(v
: Visitor)
8292 v
.enter_visit
(_n_type
)
8293 v
.enter_visit
(_n_kwas
)
8294 v
.enter_visit
(_n_kwnot
)
8295 v
.enter_visit
(_n_kwnullable
)
8298 redef class AInLanguage
8299 init init_ainlanguage
(
8300 n_kwin
: nullable TKwin,
8301 n_string
: nullable TString
8304 _n_kwin
= n_kwin
.as(not null)
8305 n_kwin
.parent
= self
8306 _n_string
= n_string
.as(not null)
8307 n_string
.parent
= self
8310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8312 if _n_kwin
== old_child
then
8313 n_kwin
= new_child
.as(TKwin)
8316 if _n_string
== old_child
then
8317 n_string
= new_child
.as(TString)
8322 redef fun n_kwin
=(node
)
8327 redef fun n_string
=(node
)
8334 redef fun visit_all
(v
: Visitor)
8336 v
.enter_visit
(_n_kwin
)
8337 v
.enter_visit
(_n_string
)
8340 redef class AExternCodeBlock
8341 init init_aexterncodeblock
(
8342 n_in_language
: nullable AInLanguage,
8343 n_extern_code_segment
: nullable TExternCodeSegment
8346 _n_in_language
= n_in_language
8347 if n_in_language
!= null then n_in_language
.parent
= self
8348 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8349 n_extern_code_segment
.parent
= self
8352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8354 if _n_in_language
== old_child
then
8355 n_in_language
= new_child
.as(nullable AInLanguage)
8358 if _n_extern_code_segment
== old_child
then
8359 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8364 redef fun n_in_language
=(node
)
8366 _n_in_language
= node
8367 if node
!= null then node
.parent
= self
8369 redef fun n_extern_code_segment
=(node
)
8371 _n_extern_code_segment
= node
8376 redef fun visit_all
(v
: Visitor)
8378 v
.enter_visit
(_n_in_language
)
8379 v
.enter_visit
(_n_extern_code_segment
)
8382 redef class AQualified
8383 init init_aqualified
(
8384 n_id
: Collection[Object], # Should be Collection[TId]
8385 n_classid
: nullable TClassid
8388 self.n_id
.unsafe_add_all
(n_id
)
8389 _n_classid
= n_classid
8390 if n_classid
!= null then n_classid
.parent
= self
8393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8395 if n_id
.replace_child
(old_child
, new_child
) then return
8396 if _n_classid
== old_child
then
8397 n_classid
= new_child
.as(nullable TClassid)
8402 redef fun n_classid
=(node
)
8405 if node
!= null then node
.parent
= self
8409 redef fun visit_all
(v
: Visitor)
8412 v
.enter_visit
(_n_classid
)
8417 n_comment
: Collection[Object] # Should be Collection[TComment]
8420 self.n_comment
.unsafe_add_all
(n_comment
)
8423 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8425 if n_comment
.replace_child
(old_child
, new_child
) then return
8430 redef fun visit_all
(v
: Visitor)
8432 n_comment
.visit_all
(v
)
8435 redef class AAnnotations
8436 init init_aannotations
(
8437 n_kwis
: nullable TKwis,
8439 n_opar
: nullable TOpar,
8440 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8441 n_cpar
: nullable TCpar,
8442 n_kwend
: nullable TKwend
8446 if n_kwis
!= null then n_kwis
.parent
= self
8448 if n_at
!= null then n_at
.parent
= self
8450 if n_opar
!= null then n_opar
.parent
= self
8451 self.n_items
.unsafe_add_all
(n_items
)
8453 if n_cpar
!= null then n_cpar
.parent
= self
8455 if n_kwend
!= null then n_kwend
.parent
= self
8458 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8460 if _n_kwis
== old_child
then
8461 n_kwis
= new_child
.as(nullable TKwis)
8464 if _n_at
== old_child
then
8465 n_at
= new_child
.as(nullable TAt)
8468 if _n_opar
== old_child
then
8469 n_opar
= new_child
.as(nullable TOpar)
8472 if n_items
.replace_child
(old_child
, new_child
) then return
8473 if _n_cpar
== old_child
then
8474 n_cpar
= new_child
.as(nullable TCpar)
8477 if _n_kwend
== old_child
then
8478 n_kwend
= new_child
.as(nullable TKwend)
8483 redef fun n_kwis
=(node
)
8486 if node
!= null then node
.parent
= self
8488 redef fun n_at
=(node
)
8491 if node
!= null then node
.parent
= self
8493 redef fun n_opar
=(node
)
8496 if node
!= null then node
.parent
= self
8498 redef fun n_cpar
=(node
)
8501 if node
!= null then node
.parent
= self
8503 redef fun n_kwend
=(node
)
8506 if node
!= null then node
.parent
= self
8510 redef fun visit_all
(v
: Visitor)
8512 v
.enter_visit
(_n_kwis
)
8513 v
.enter_visit
(_n_at
)
8514 v
.enter_visit
(_n_opar
)
8515 n_items
.visit_all
(v
)
8516 v
.enter_visit
(_n_cpar
)
8517 v
.enter_visit
(_n_kwend
)
8520 redef class AAnnotation
8521 init init_aannotation
(
8522 n_doc
: nullable ADoc,
8523 n_kwredef
: nullable TKwredef,
8524 n_visibility
: nullable AVisibility,
8525 n_atid
: nullable AAtid,
8526 n_opar
: nullable TOpar,
8527 n_args
: Collection[Object], # Should be Collection[AExpr]
8528 n_cpar
: nullable TCpar,
8529 n_annotations
: nullable AAnnotations
8533 if n_doc
!= null then n_doc
.parent
= self
8534 _n_kwredef
= n_kwredef
8535 if n_kwredef
!= null then n_kwredef
.parent
= self
8536 _n_visibility
= n_visibility
8537 if n_visibility
!= null then n_visibility
.parent
= self
8538 _n_atid
= n_atid
.as(not null)
8539 n_atid
.parent
= self
8541 if n_opar
!= null then n_opar
.parent
= self
8542 self.n_args
.unsafe_add_all
(n_args
)
8544 if n_cpar
!= null then n_cpar
.parent
= self
8545 _n_annotations
= n_annotations
8546 if n_annotations
!= null then n_annotations
.parent
= self
8549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8551 if _n_doc
== old_child
then
8552 n_doc
= new_child
.as(nullable ADoc)
8555 if _n_kwredef
== old_child
then
8556 n_kwredef
= new_child
.as(nullable TKwredef)
8559 if _n_visibility
== old_child
then
8560 n_visibility
= new_child
.as(nullable AVisibility)
8563 if _n_atid
== old_child
then
8564 n_atid
= new_child
.as(AAtid)
8567 if _n_opar
== old_child
then
8568 n_opar
= new_child
.as(nullable TOpar)
8571 if n_args
.replace_child
(old_child
, new_child
) then return
8572 if _n_cpar
== old_child
then
8573 n_cpar
= new_child
.as(nullable TCpar)
8576 if _n_annotations
== old_child
then
8577 n_annotations
= new_child
.as(nullable AAnnotations)
8582 redef fun n_doc
=(node
)
8585 if node
!= null then node
.parent
= self
8587 redef fun n_kwredef
=(node
)
8590 if node
!= null then node
.parent
= self
8592 redef fun n_visibility
=(node
)
8594 _n_visibility
= node
8595 if node
!= null then node
.parent
= self
8597 redef fun n_atid
=(node
)
8602 redef fun n_opar
=(node
)
8605 if node
!= null then node
.parent
= self
8607 redef fun n_cpar
=(node
)
8610 if node
!= null then node
.parent
= self
8612 redef fun n_annotations
=(node
)
8614 _n_annotations
= node
8615 if node
!= null then node
.parent
= self
8619 redef fun visit_all
(v
: Visitor)
8621 v
.enter_visit
(_n_doc
)
8622 v
.enter_visit
(_n_kwredef
)
8623 v
.enter_visit
(_n_visibility
)
8624 v
.enter_visit
(_n_atid
)
8625 v
.enter_visit
(_n_opar
)
8627 v
.enter_visit
(_n_cpar
)
8628 v
.enter_visit
(_n_annotations
)
8636 _n_id
= n_id
.as(not null)
8640 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8642 if _n_id
== old_child
then
8643 n_id
= new_child
.as(TId)
8648 redef fun n_id
=(node
)
8655 redef fun visit_all
(v
: Visitor)
8657 v
.enter_visit
(_n_id
)
8660 redef class AKwexternAtid
8661 init init_akwexternatid
(
8662 n_id
: nullable TKwextern
8665 _n_id
= n_id
.as(not null)
8669 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8671 if _n_id
== old_child
then
8672 n_id
= new_child
.as(TKwextern)
8677 redef fun n_id
=(node
)
8684 redef fun visit_all
(v
: Visitor)
8686 v
.enter_visit
(_n_id
)
8689 redef class AKwabstractAtid
8690 init init_akwabstractatid
(
8691 n_id
: nullable TKwabstract
8694 _n_id
= n_id
.as(not null)
8698 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8700 if _n_id
== old_child
then
8701 n_id
= new_child
.as(TKwabstract)
8706 redef fun n_id
=(node
)
8713 redef fun visit_all
(v
: Visitor)
8715 v
.enter_visit
(_n_id
)
8718 redef class AKwimportAtid
8719 init init_akwimportatid
(
8720 n_id
: nullable TKwimport
8723 _n_id
= n_id
.as(not null)
8727 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8729 if _n_id
== old_child
then
8730 n_id
= new_child
.as(TKwimport)
8735 redef fun n_id
=(node
)
8742 redef fun visit_all
(v
: Visitor)
8744 v
.enter_visit
(_n_id
)
8749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8751 if _n_base
== old_child
then
8752 if new_child
== null then
8754 new_child
.parent
= self
8755 assert new_child
isa AModule
8758 old_child
.parent
= null
8763 redef fun visit_all
(v
: Visitor)
8765 if _n_base
!= null then
8766 v
.enter_visit
(_n_base
.as(not null))
8768 v
.enter_visit
(_n_eof
)