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 ACallrefExpr
5437 init init_acallrefexpr
(
5438 n_amp
: nullable TAmp,
5439 n_expr
: nullable AExpr,
5440 n_qid
: nullable AQid,
5441 n_args
: nullable AExprs
5444 _n_amp
= n_amp
.as(not null)
5446 _n_expr
= n_expr
.as(not null)
5447 n_expr
.parent
= self
5448 _n_qid
= n_qid
.as(not null)
5450 _n_args
= n_args
.as(not null)
5451 n_args
.parent
= self
5454 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5456 if _n_amp
== old_child
then
5457 n_amp
= new_child
.as(TAmp)
5460 if _n_expr
== old_child
then
5461 n_expr
= new_child
.as(AExpr)
5464 if _n_qid
== old_child
then
5465 n_qid
= new_child
.as(AQid)
5468 if _n_args
== old_child
then
5469 n_args
= new_child
.as(AExprs)
5474 redef fun n_amp
=(node
)
5479 redef fun n_expr
=(node
)
5484 redef fun n_qid
=(node
)
5489 redef fun n_args
=(node
)
5496 redef fun visit_all
(v
: Visitor)
5498 v
.enter_visit
(_n_amp
)
5499 v
.enter_visit
(_n_expr
)
5500 v
.enter_visit
(_n_qid
)
5501 v
.enter_visit
(_n_args
)
5504 redef class ACallAssignExpr
5505 init init_acallassignexpr
(
5506 n_expr
: nullable AExpr,
5507 n_qid
: nullable AQid,
5508 n_args
: nullable AExprs,
5509 n_assign
: nullable TAssign,
5510 n_value
: nullable AExpr
5513 _n_expr
= n_expr
.as(not null)
5514 n_expr
.parent
= self
5515 _n_qid
= n_qid
.as(not null)
5517 _n_args
= n_args
.as(not null)
5518 n_args
.parent
= self
5519 _n_assign
= n_assign
.as(not null)
5520 n_assign
.parent
= self
5521 _n_value
= n_value
.as(not null)
5522 n_value
.parent
= self
5525 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5527 if _n_expr
== old_child
then
5528 n_expr
= new_child
.as(AExpr)
5531 if _n_qid
== old_child
then
5532 n_qid
= new_child
.as(AQid)
5535 if _n_args
== old_child
then
5536 n_args
= new_child
.as(AExprs)
5539 if _n_assign
== old_child
then
5540 n_assign
= new_child
.as(TAssign)
5543 if _n_value
== old_child
then
5544 n_value
= new_child
.as(AExpr)
5549 redef fun n_expr
=(node
)
5554 redef fun n_qid
=(node
)
5559 redef fun n_args
=(node
)
5564 redef fun n_assign
=(node
)
5569 redef fun n_value
=(node
)
5576 redef fun visit_all
(v
: Visitor)
5578 v
.enter_visit
(_n_expr
)
5579 v
.enter_visit
(_n_qid
)
5580 v
.enter_visit
(_n_args
)
5581 v
.enter_visit
(_n_assign
)
5582 v
.enter_visit
(_n_value
)
5585 redef class ACallReassignExpr
5586 init init_acallreassignexpr
(
5587 n_expr
: nullable AExpr,
5588 n_qid
: nullable AQid,
5589 n_args
: nullable AExprs,
5590 n_assign_op
: nullable AAssignOp,
5591 n_value
: nullable AExpr
5594 _n_expr
= n_expr
.as(not null)
5595 n_expr
.parent
= self
5596 _n_qid
= n_qid
.as(not null)
5598 _n_args
= n_args
.as(not null)
5599 n_args
.parent
= self
5600 _n_assign_op
= n_assign_op
.as(not null)
5601 n_assign_op
.parent
= self
5602 _n_value
= n_value
.as(not null)
5603 n_value
.parent
= self
5606 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5608 if _n_expr
== old_child
then
5609 n_expr
= new_child
.as(AExpr)
5612 if _n_qid
== old_child
then
5613 n_qid
= new_child
.as(AQid)
5616 if _n_args
== old_child
then
5617 n_args
= new_child
.as(AExprs)
5620 if _n_assign_op
== old_child
then
5621 n_assign_op
= new_child
.as(AAssignOp)
5624 if _n_value
== old_child
then
5625 n_value
= new_child
.as(AExpr)
5630 redef fun n_expr
=(node
)
5635 redef fun n_qid
=(node
)
5640 redef fun n_args
=(node
)
5645 redef fun n_assign_op
=(node
)
5650 redef fun n_value
=(node
)
5657 redef fun visit_all
(v
: Visitor)
5659 v
.enter_visit
(_n_expr
)
5660 v
.enter_visit
(_n_qid
)
5661 v
.enter_visit
(_n_args
)
5662 v
.enter_visit
(_n_assign_op
)
5663 v
.enter_visit
(_n_value
)
5666 redef class ASuperExpr
5667 init init_asuperexpr
(
5668 n_qualified
: nullable AQualified,
5669 n_kwsuper
: nullable TKwsuper,
5670 n_args
: nullable AExprs
5673 _n_qualified
= n_qualified
5674 if n_qualified
!= null then n_qualified
.parent
= self
5675 _n_kwsuper
= n_kwsuper
.as(not null)
5676 n_kwsuper
.parent
= self
5677 _n_args
= n_args
.as(not null)
5678 n_args
.parent
= self
5681 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5683 if _n_qualified
== old_child
then
5684 n_qualified
= new_child
.as(nullable AQualified)
5687 if _n_kwsuper
== old_child
then
5688 n_kwsuper
= new_child
.as(TKwsuper)
5691 if _n_args
== old_child
then
5692 n_args
= new_child
.as(AExprs)
5697 redef fun n_qualified
=(node
)
5700 if node
!= null then node
.parent
= self
5702 redef fun n_kwsuper
=(node
)
5707 redef fun n_args
=(node
)
5714 redef fun visit_all
(v
: Visitor)
5716 v
.enter_visit
(_n_qualified
)
5717 v
.enter_visit
(_n_kwsuper
)
5718 v
.enter_visit
(_n_args
)
5721 redef class AInitExpr
5722 init init_ainitexpr
(
5723 n_expr
: nullable AExpr,
5724 n_kwinit
: nullable TKwinit,
5725 n_args
: nullable AExprs
5728 _n_expr
= n_expr
.as(not null)
5729 n_expr
.parent
= self
5730 _n_kwinit
= n_kwinit
.as(not null)
5731 n_kwinit
.parent
= self
5732 _n_args
= n_args
.as(not null)
5733 n_args
.parent
= self
5736 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5738 if _n_expr
== old_child
then
5739 n_expr
= new_child
.as(AExpr)
5742 if _n_kwinit
== old_child
then
5743 n_kwinit
= new_child
.as(TKwinit)
5746 if _n_args
== old_child
then
5747 n_args
= new_child
.as(AExprs)
5752 redef fun n_expr
=(node
)
5757 redef fun n_kwinit
=(node
)
5762 redef fun n_args
=(node
)
5769 redef fun visit_all
(v
: Visitor)
5771 v
.enter_visit
(_n_expr
)
5772 v
.enter_visit
(_n_kwinit
)
5773 v
.enter_visit
(_n_args
)
5776 redef class ABraExpr
5777 init init_abraexpr
(
5778 n_expr
: nullable AExpr,
5779 n_args
: nullable AExprs
5782 _n_expr
= n_expr
.as(not null)
5783 n_expr
.parent
= self
5784 _n_args
= n_args
.as(not null)
5785 n_args
.parent
= self
5788 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5790 if _n_expr
== old_child
then
5791 n_expr
= new_child
.as(AExpr)
5794 if _n_args
== old_child
then
5795 n_args
= new_child
.as(AExprs)
5800 redef fun n_expr
=(node
)
5805 redef fun n_args
=(node
)
5812 redef fun visit_all
(v
: Visitor)
5814 v
.enter_visit
(_n_expr
)
5815 v
.enter_visit
(_n_args
)
5818 redef class ABraAssignExpr
5819 init init_abraassignexpr
(
5820 n_expr
: nullable AExpr,
5821 n_args
: nullable AExprs,
5822 n_assign
: nullable TAssign,
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
= n_assign
.as(not null)
5831 n_assign
.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
== old_child
then
5847 n_assign
= new_child
.as(TAssign)
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
=(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
)
5883 v
.enter_visit
(_n_value
)
5886 redef class ABraReassignExpr
5887 init init_abrareassignexpr
(
5888 n_expr
: nullable AExpr,
5889 n_args
: nullable AExprs,
5890 n_assign_op
: nullable AAssignOp,
5891 n_value
: nullable AExpr
5894 _n_expr
= n_expr
.as(not null)
5895 n_expr
.parent
= self
5896 _n_args
= n_args
.as(not null)
5897 n_args
.parent
= self
5898 _n_assign_op
= n_assign_op
.as(not null)
5899 n_assign_op
.parent
= self
5900 _n_value
= n_value
.as(not null)
5901 n_value
.parent
= self
5904 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5906 if _n_expr
== old_child
then
5907 n_expr
= new_child
.as(AExpr)
5910 if _n_args
== old_child
then
5911 n_args
= new_child
.as(AExprs)
5914 if _n_assign_op
== old_child
then
5915 n_assign_op
= new_child
.as(AAssignOp)
5918 if _n_value
== old_child
then
5919 n_value
= new_child
.as(AExpr)
5924 redef fun n_expr
=(node
)
5929 redef fun n_args
=(node
)
5934 redef fun n_assign_op
=(node
)
5939 redef fun n_value
=(node
)
5946 redef fun visit_all
(v
: Visitor)
5948 v
.enter_visit
(_n_expr
)
5949 v
.enter_visit
(_n_args
)
5950 v
.enter_visit
(_n_assign_op
)
5951 v
.enter_visit
(_n_value
)
5954 redef class AVarExpr
5955 init init_avarexpr
(
5959 _n_id
= n_id
.as(not null)
5963 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5965 if _n_id
== old_child
then
5966 n_id
= new_child
.as(TId)
5971 redef fun n_id
=(node
)
5978 redef fun visit_all
(v
: Visitor)
5980 v
.enter_visit
(_n_id
)
5983 redef class AVarAssignExpr
5984 init init_avarassignexpr
(
5986 n_assign
: nullable TAssign,
5987 n_value
: nullable AExpr
5990 _n_id
= n_id
.as(not null)
5992 _n_assign
= n_assign
.as(not null)
5993 n_assign
.parent
= self
5994 _n_value
= n_value
.as(not null)
5995 n_value
.parent
= self
5998 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6000 if _n_id
== old_child
then
6001 n_id
= new_child
.as(TId)
6004 if _n_assign
== old_child
then
6005 n_assign
= new_child
.as(TAssign)
6008 if _n_value
== old_child
then
6009 n_value
= new_child
.as(AExpr)
6014 redef fun n_id
=(node
)
6019 redef fun n_assign
=(node
)
6024 redef fun n_value
=(node
)
6031 redef fun visit_all
(v
: Visitor)
6033 v
.enter_visit
(_n_id
)
6034 v
.enter_visit
(_n_assign
)
6035 v
.enter_visit
(_n_value
)
6038 redef class AVarReassignExpr
6039 init init_avarreassignexpr
(
6041 n_assign_op
: nullable AAssignOp,
6042 n_value
: nullable AExpr
6045 _n_id
= n_id
.as(not null)
6047 _n_assign_op
= n_assign_op
.as(not null)
6048 n_assign_op
.parent
= self
6049 _n_value
= n_value
.as(not null)
6050 n_value
.parent
= self
6053 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6055 if _n_id
== old_child
then
6056 n_id
= new_child
.as(TId)
6059 if _n_assign_op
== old_child
then
6060 n_assign_op
= new_child
.as(AAssignOp)
6063 if _n_value
== old_child
then
6064 n_value
= new_child
.as(AExpr)
6069 redef fun n_id
=(node
)
6074 redef fun n_assign_op
=(node
)
6079 redef fun n_value
=(node
)
6086 redef fun visit_all
(v
: Visitor)
6088 v
.enter_visit
(_n_id
)
6089 v
.enter_visit
(_n_assign_op
)
6090 v
.enter_visit
(_n_value
)
6093 redef class ARangeExpr
6094 init init_arangeexpr
(
6095 n_expr
: nullable AExpr,
6096 n_expr2
: nullable AExpr,
6097 n_annotations
: nullable AAnnotations
6100 _n_expr
= n_expr
.as(not null)
6101 n_expr
.parent
= self
6102 _n_expr2
= n_expr2
.as(not null)
6103 n_expr2
.parent
= self
6104 _n_annotations
= n_annotations
6105 if n_annotations
!= null then n_annotations
.parent
= self
6108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6110 if _n_expr
== old_child
then
6111 n_expr
= new_child
.as(AExpr)
6114 if _n_expr2
== old_child
then
6115 n_expr2
= new_child
.as(AExpr)
6118 if _n_annotations
== old_child
then
6119 n_annotations
= new_child
.as(nullable AAnnotations)
6124 redef fun n_expr
=(node
)
6129 redef fun n_expr2
=(node
)
6134 redef fun n_annotations
=(node
)
6136 _n_annotations
= node
6137 if node
!= null then node
.parent
= self
6141 redef fun visit_all
(v
: Visitor)
6143 v
.enter_visit
(_n_expr
)
6144 v
.enter_visit
(_n_expr2
)
6145 v
.enter_visit
(_n_annotations
)
6148 redef class ACrangeExpr
6149 init init_acrangeexpr
(
6150 n_obra
: nullable TObra,
6151 n_expr
: nullable AExpr,
6152 n_dotdot
: nullable TDotdot,
6153 n_expr2
: nullable AExpr,
6154 n_cbra
: nullable TCbra,
6155 n_annotations
: nullable AAnnotations
6158 _n_obra
= n_obra
.as(not null)
6159 n_obra
.parent
= self
6160 _n_expr
= n_expr
.as(not null)
6161 n_expr
.parent
= self
6162 _n_dotdot
= n_dotdot
.as(not null)
6163 n_dotdot
.parent
= self
6164 _n_expr2
= n_expr2
.as(not null)
6165 n_expr2
.parent
= self
6166 _n_cbra
= n_cbra
.as(not null)
6167 n_cbra
.parent
= self
6168 _n_annotations
= n_annotations
6169 if n_annotations
!= null then n_annotations
.parent
= self
6172 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6174 if _n_obra
== old_child
then
6175 n_obra
= new_child
.as(TObra)
6178 if _n_expr
== old_child
then
6179 n_expr
= new_child
.as(AExpr)
6182 if _n_dotdot
== old_child
then
6183 n_dotdot
= new_child
.as(TDotdot)
6186 if _n_expr2
== old_child
then
6187 n_expr2
= new_child
.as(AExpr)
6190 if _n_cbra
== old_child
then
6191 n_cbra
= new_child
.as(TCbra)
6194 if _n_annotations
== old_child
then
6195 n_annotations
= new_child
.as(nullable AAnnotations)
6200 redef fun n_obra
=(node
)
6205 redef fun n_expr
=(node
)
6210 redef fun n_dotdot
=(node
)
6215 redef fun n_expr2
=(node
)
6220 redef fun n_cbra
=(node
)
6225 redef fun n_annotations
=(node
)
6227 _n_annotations
= node
6228 if node
!= null then node
.parent
= self
6232 redef fun visit_all
(v
: Visitor)
6234 v
.enter_visit
(_n_obra
)
6235 v
.enter_visit
(_n_expr
)
6236 v
.enter_visit
(_n_dotdot
)
6237 v
.enter_visit
(_n_expr2
)
6238 v
.enter_visit
(_n_cbra
)
6239 v
.enter_visit
(_n_annotations
)
6242 redef class AOrangeExpr
6243 init init_aorangeexpr
(
6244 n_obra
: nullable TObra,
6245 n_expr
: nullable AExpr,
6246 n_dotdot
: nullable TDotdot,
6247 n_expr2
: nullable AExpr,
6248 n_cbra
: nullable TObra,
6249 n_annotations
: nullable AAnnotations
6252 _n_obra
= n_obra
.as(not null)
6253 n_obra
.parent
= self
6254 _n_expr
= n_expr
.as(not null)
6255 n_expr
.parent
= self
6256 _n_dotdot
= n_dotdot
.as(not null)
6257 n_dotdot
.parent
= self
6258 _n_expr2
= n_expr2
.as(not null)
6259 n_expr2
.parent
= self
6260 _n_cbra
= n_cbra
.as(not null)
6261 n_cbra
.parent
= self
6262 _n_annotations
= n_annotations
6263 if n_annotations
!= null then n_annotations
.parent
= self
6266 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6268 if _n_obra
== old_child
then
6269 n_obra
= new_child
.as(TObra)
6272 if _n_expr
== old_child
then
6273 n_expr
= new_child
.as(AExpr)
6276 if _n_dotdot
== old_child
then
6277 n_dotdot
= new_child
.as(TDotdot)
6280 if _n_expr2
== old_child
then
6281 n_expr2
= new_child
.as(AExpr)
6284 if _n_cbra
== old_child
then
6285 n_cbra
= new_child
.as(TObra)
6288 if _n_annotations
== old_child
then
6289 n_annotations
= new_child
.as(nullable AAnnotations)
6294 redef fun n_obra
=(node
)
6299 redef fun n_expr
=(node
)
6304 redef fun n_dotdot
=(node
)
6309 redef fun n_expr2
=(node
)
6314 redef fun n_cbra
=(node
)
6319 redef fun n_annotations
=(node
)
6321 _n_annotations
= node
6322 if node
!= null then node
.parent
= self
6326 redef fun visit_all
(v
: Visitor)
6328 v
.enter_visit
(_n_obra
)
6329 v
.enter_visit
(_n_expr
)
6330 v
.enter_visit
(_n_dotdot
)
6331 v
.enter_visit
(_n_expr2
)
6332 v
.enter_visit
(_n_cbra
)
6333 v
.enter_visit
(_n_annotations
)
6336 redef class AArrayExpr
6337 init init_aarrayexpr
(
6338 n_obra
: nullable TObra,
6339 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6340 n_type
: nullable AType,
6341 n_cbra
: nullable TCbra,
6342 n_annotations
: nullable AAnnotations
6345 _n_obra
= n_obra
.as(not null)
6346 n_obra
.parent
= self
6347 self.n_exprs
.unsafe_add_all
(n_exprs
)
6349 if n_type
!= null then n_type
.parent
= self
6350 _n_cbra
= n_cbra
.as(not null)
6351 n_cbra
.parent
= self
6352 _n_annotations
= n_annotations
6353 if n_annotations
!= null then n_annotations
.parent
= self
6356 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6358 if _n_obra
== old_child
then
6359 n_obra
= new_child
.as(TObra)
6362 if n_exprs
.replace_child
(old_child
, new_child
) then return
6363 if _n_type
== old_child
then
6364 n_type
= new_child
.as(nullable AType)
6367 if _n_cbra
== old_child
then
6368 n_cbra
= new_child
.as(TCbra)
6371 if _n_annotations
== old_child
then
6372 n_annotations
= new_child
.as(nullable AAnnotations)
6377 redef fun n_obra
=(node
)
6382 redef fun n_type
=(node
)
6385 if node
!= null then node
.parent
= self
6387 redef fun n_cbra
=(node
)
6392 redef fun n_annotations
=(node
)
6394 _n_annotations
= node
6395 if node
!= null then node
.parent
= self
6399 redef fun visit_all
(v
: Visitor)
6401 v
.enter_visit
(_n_obra
)
6402 n_exprs
.visit_all
(v
)
6403 v
.enter_visit
(_n_type
)
6404 v
.enter_visit
(_n_cbra
)
6405 v
.enter_visit
(_n_annotations
)
6408 redef class ASelfExpr
6409 init init_aselfexpr
(
6410 n_kwself
: nullable TKwself,
6411 n_annotations
: nullable AAnnotations
6414 _n_kwself
= n_kwself
.as(not null)
6415 n_kwself
.parent
= self
6416 _n_annotations
= n_annotations
6417 if n_annotations
!= null then n_annotations
.parent
= self
6420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6422 if _n_kwself
== old_child
then
6423 n_kwself
= new_child
.as(TKwself)
6426 if _n_annotations
== old_child
then
6427 n_annotations
= new_child
.as(nullable AAnnotations)
6432 redef fun n_kwself
=(node
)
6437 redef fun n_annotations
=(node
)
6439 _n_annotations
= node
6440 if node
!= null then node
.parent
= self
6444 redef fun visit_all
(v
: Visitor)
6446 v
.enter_visit
(_n_kwself
)
6447 v
.enter_visit
(_n_annotations
)
6450 redef class AImplicitSelfExpr
6451 init init_aimplicitselfexpr
6455 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6461 redef fun visit_all
(v
: Visitor)
6465 redef class ATrueExpr
6466 init init_atrueexpr
(
6467 n_kwtrue
: nullable TKwtrue,
6468 n_annotations
: nullable AAnnotations
6471 _n_kwtrue
= n_kwtrue
.as(not null)
6472 n_kwtrue
.parent
= self
6473 _n_annotations
= n_annotations
6474 if n_annotations
!= null then n_annotations
.parent
= self
6477 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6479 if _n_kwtrue
== old_child
then
6480 n_kwtrue
= new_child
.as(TKwtrue)
6483 if _n_annotations
== old_child
then
6484 n_annotations
= new_child
.as(nullable AAnnotations)
6489 redef fun n_kwtrue
=(node
)
6494 redef fun n_annotations
=(node
)
6496 _n_annotations
= node
6497 if node
!= null then node
.parent
= self
6501 redef fun visit_all
(v
: Visitor)
6503 v
.enter_visit
(_n_kwtrue
)
6504 v
.enter_visit
(_n_annotations
)
6507 redef class AFalseExpr
6508 init init_afalseexpr
(
6509 n_kwfalse
: nullable TKwfalse,
6510 n_annotations
: nullable AAnnotations
6513 _n_kwfalse
= n_kwfalse
.as(not null)
6514 n_kwfalse
.parent
= self
6515 _n_annotations
= n_annotations
6516 if n_annotations
!= null then n_annotations
.parent
= self
6519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6521 if _n_kwfalse
== old_child
then
6522 n_kwfalse
= new_child
.as(TKwfalse)
6525 if _n_annotations
== old_child
then
6526 n_annotations
= new_child
.as(nullable AAnnotations)
6531 redef fun n_kwfalse
=(node
)
6536 redef fun n_annotations
=(node
)
6538 _n_annotations
= node
6539 if node
!= null then node
.parent
= self
6543 redef fun visit_all
(v
: Visitor)
6545 v
.enter_visit
(_n_kwfalse
)
6546 v
.enter_visit
(_n_annotations
)
6549 redef class ANullExpr
6550 init init_anullexpr
(
6551 n_kwnull
: nullable TKwnull,
6552 n_annotations
: nullable AAnnotations
6555 _n_kwnull
= n_kwnull
.as(not null)
6556 n_kwnull
.parent
= self
6557 _n_annotations
= n_annotations
6558 if n_annotations
!= null then n_annotations
.parent
= self
6561 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6563 if _n_kwnull
== old_child
then
6564 n_kwnull
= new_child
.as(TKwnull)
6567 if _n_annotations
== old_child
then
6568 n_annotations
= new_child
.as(nullable AAnnotations)
6573 redef fun n_kwnull
=(node
)
6578 redef fun n_annotations
=(node
)
6580 _n_annotations
= node
6581 if node
!= null then node
.parent
= self
6585 redef fun visit_all
(v
: Visitor)
6587 v
.enter_visit
(_n_kwnull
)
6588 v
.enter_visit
(_n_annotations
)
6591 redef class AIntegerExpr
6592 init init_aintegerexpr
(
6593 n_integer
: nullable TInteger,
6594 n_annotations
: nullable AAnnotations
6597 _n_integer
= n_integer
.as(not null)
6598 n_integer
.parent
= self
6599 _n_annotations
= n_annotations
6600 if n_annotations
!= null then n_annotations
.parent
= self
6603 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6605 if _n_integer
== old_child
then
6606 n_integer
= new_child
.as(TInteger)
6609 if _n_annotations
== old_child
then
6610 n_annotations
= new_child
.as(nullable AAnnotations)
6615 redef fun n_integer
=(node
)
6620 redef fun n_annotations
=(node
)
6622 _n_annotations
= node
6623 if node
!= null then node
.parent
= self
6627 redef fun visit_all
(v
: Visitor)
6629 v
.enter_visit
(_n_integer
)
6630 v
.enter_visit
(_n_annotations
)
6633 redef class AFloatExpr
6634 init init_afloatexpr
(
6635 n_float
: nullable TFloat,
6636 n_annotations
: nullable AAnnotations
6639 _n_float
= n_float
.as(not null)
6640 n_float
.parent
= self
6641 _n_annotations
= n_annotations
6642 if n_annotations
!= null then n_annotations
.parent
= self
6645 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6647 if _n_float
== old_child
then
6648 n_float
= new_child
.as(TFloat)
6651 if _n_annotations
== old_child
then
6652 n_annotations
= new_child
.as(nullable AAnnotations)
6657 redef fun n_float
=(node
)
6662 redef fun n_annotations
=(node
)
6664 _n_annotations
= node
6665 if node
!= null then node
.parent
= self
6669 redef fun visit_all
(v
: Visitor)
6671 v
.enter_visit
(_n_float
)
6672 v
.enter_visit
(_n_annotations
)
6675 redef class ACharExpr
6676 init init_acharexpr
(
6677 n_char
: nullable TChar,
6678 n_annotations
: nullable AAnnotations
6681 _n_char
= n_char
.as(not null)
6682 n_char
.parent
= self
6683 _n_annotations
= n_annotations
6684 if n_annotations
!= null then n_annotations
.parent
= self
6687 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6689 if _n_char
== old_child
then
6690 n_char
= new_child
.as(TChar)
6693 if _n_annotations
== old_child
then
6694 n_annotations
= new_child
.as(nullable AAnnotations)
6699 redef fun n_char
=(node
)
6704 redef fun n_annotations
=(node
)
6706 _n_annotations
= node
6707 if node
!= null then node
.parent
= self
6711 redef fun visit_all
(v
: Visitor)
6713 v
.enter_visit
(_n_char
)
6714 v
.enter_visit
(_n_annotations
)
6717 redef class AStringExpr
6718 init init_astringexpr
(
6719 n_string
: nullable TString,
6720 n_annotations
: nullable AAnnotations
6723 _n_string
= n_string
.as(not null)
6724 n_string
.parent
= self
6725 _n_annotations
= n_annotations
6726 if n_annotations
!= null then n_annotations
.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(TString)
6735 if _n_annotations
== old_child
then
6736 n_annotations
= new_child
.as(nullable AAnnotations)
6741 redef fun n_string
=(node
)
6746 redef fun n_annotations
=(node
)
6748 _n_annotations
= node
6749 if node
!= null then node
.parent
= self
6753 redef fun visit_all
(v
: Visitor)
6755 v
.enter_visit
(_n_string
)
6756 v
.enter_visit
(_n_annotations
)
6759 redef class AStartStringExpr
6760 init init_astartstringexpr
(
6761 n_string
: nullable TStartString
6764 _n_string
= n_string
.as(not null)
6765 n_string
.parent
= self
6768 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6770 if _n_string
== old_child
then
6771 n_string
= new_child
.as(TStartString)
6776 redef fun n_string
=(node
)
6783 redef fun visit_all
(v
: Visitor)
6785 v
.enter_visit
(_n_string
)
6788 redef class AMidStringExpr
6789 init init_amidstringexpr
(
6790 n_string
: nullable TMidString
6793 _n_string
= n_string
.as(not null)
6794 n_string
.parent
= self
6797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6799 if _n_string
== old_child
then
6800 n_string
= new_child
.as(TMidString)
6805 redef fun n_string
=(node
)
6812 redef fun visit_all
(v
: Visitor)
6814 v
.enter_visit
(_n_string
)
6817 redef class AEndStringExpr
6818 init init_aendstringexpr
(
6819 n_string
: nullable TEndString
6822 _n_string
= n_string
.as(not null)
6823 n_string
.parent
= self
6826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6828 if _n_string
== old_child
then
6829 n_string
= new_child
.as(TEndString)
6834 redef fun n_string
=(node
)
6841 redef fun visit_all
(v
: Visitor)
6843 v
.enter_visit
(_n_string
)
6846 redef class ASuperstringExpr
6847 init init_asuperstringexpr
(
6848 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6849 n_annotations
: nullable AAnnotations
6852 self.n_exprs
.unsafe_add_all
(n_exprs
)
6853 _n_annotations
= n_annotations
6854 if n_annotations
!= null then n_annotations
.parent
= self
6857 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6859 if n_exprs
.replace_child
(old_child
, new_child
) then return
6860 if _n_annotations
== old_child
then
6861 n_annotations
= new_child
.as(nullable AAnnotations)
6866 redef fun n_annotations
=(node
)
6868 _n_annotations
= node
6869 if node
!= null then node
.parent
= self
6873 redef fun visit_all
(v
: Visitor)
6875 n_exprs
.visit_all
(v
)
6876 v
.enter_visit
(_n_annotations
)
6879 redef class ALambdaExpr
6880 init init_alambdaexpr
(
6881 n_kwmeth
: nullable TKwmeth,
6882 n_signature
: nullable ASignature,
6883 n_kwdo
: nullable TKwdo,
6884 n_expr
: nullable AExpr
6887 _n_kwmeth
= n_kwmeth
.as(not null)
6888 n_kwmeth
.parent
= self
6889 _n_signature
= n_signature
.as(not null)
6890 n_signature
.parent
= self
6891 _n_kwdo
= n_kwdo
.as(not null)
6892 n_kwdo
.parent
= self
6893 _n_expr
= n_expr
.as(not null)
6894 n_expr
.parent
= self
6897 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6899 if _n_kwmeth
== old_child
then
6900 n_kwmeth
= new_child
.as(TKwmeth)
6903 if _n_signature
== old_child
then
6904 n_signature
= new_child
.as(ASignature)
6907 if _n_kwdo
== old_child
then
6908 n_kwdo
= new_child
.as(TKwdo)
6911 if _n_expr
== old_child
then
6912 n_expr
= new_child
.as(AExpr)
6917 redef fun n_kwmeth
=(node
)
6922 redef fun n_signature
=(node
)
6927 redef fun n_kwdo
=(node
)
6932 redef fun n_expr
=(node
)
6939 redef fun visit_all
(v
: Visitor)
6941 v
.enter_visit
(_n_kwmeth
)
6942 v
.enter_visit
(_n_signature
)
6943 v
.enter_visit
(_n_kwdo
)
6944 v
.enter_visit
(_n_expr
)
6947 redef class AParExpr
6948 init init_aparexpr
(
6949 n_opar
: nullable TOpar,
6950 n_expr
: nullable AExpr,
6951 n_cpar
: nullable TCpar,
6952 n_annotations
: nullable AAnnotations
6955 _n_opar
= n_opar
.as(not null)
6956 n_opar
.parent
= self
6957 _n_expr
= n_expr
.as(not null)
6958 n_expr
.parent
= self
6959 _n_cpar
= n_cpar
.as(not null)
6960 n_cpar
.parent
= self
6961 _n_annotations
= n_annotations
6962 if n_annotations
!= null then n_annotations
.parent
= self
6965 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6967 if _n_opar
== old_child
then
6968 n_opar
= new_child
.as(TOpar)
6971 if _n_expr
== old_child
then
6972 n_expr
= new_child
.as(AExpr)
6975 if _n_cpar
== old_child
then
6976 n_cpar
= new_child
.as(TCpar)
6979 if _n_annotations
== old_child
then
6980 n_annotations
= new_child
.as(nullable AAnnotations)
6985 redef fun n_opar
=(node
)
6990 redef fun n_expr
=(node
)
6995 redef fun n_cpar
=(node
)
7000 redef fun n_annotations
=(node
)
7002 _n_annotations
= node
7003 if node
!= null then node
.parent
= self
7007 redef fun visit_all
(v
: Visitor)
7009 v
.enter_visit
(_n_opar
)
7010 v
.enter_visit
(_n_expr
)
7011 v
.enter_visit
(_n_cpar
)
7012 v
.enter_visit
(_n_annotations
)
7015 redef class AAsCastExpr
7016 init init_aascastexpr
(
7017 n_expr
: nullable AExpr,
7018 n_kwas
: nullable TKwas,
7019 n_opar
: nullable TOpar,
7020 n_type
: nullable AType,
7021 n_cpar
: nullable TCpar
7024 _n_expr
= n_expr
.as(not null)
7025 n_expr
.parent
= self
7026 _n_kwas
= n_kwas
.as(not null)
7027 n_kwas
.parent
= self
7029 if n_opar
!= null then n_opar
.parent
= self
7030 _n_type
= n_type
.as(not null)
7031 n_type
.parent
= self
7033 if n_cpar
!= null then n_cpar
.parent
= self
7036 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7038 if _n_expr
== old_child
then
7039 n_expr
= new_child
.as(AExpr)
7042 if _n_kwas
== old_child
then
7043 n_kwas
= new_child
.as(TKwas)
7046 if _n_opar
== old_child
then
7047 n_opar
= new_child
.as(nullable TOpar)
7050 if _n_type
== old_child
then
7051 n_type
= new_child
.as(AType)
7054 if _n_cpar
== old_child
then
7055 n_cpar
= new_child
.as(nullable TCpar)
7060 redef fun n_expr
=(node
)
7065 redef fun n_kwas
=(node
)
7070 redef fun n_opar
=(node
)
7073 if node
!= null then node
.parent
= self
7075 redef fun n_type
=(node
)
7080 redef fun n_cpar
=(node
)
7083 if node
!= null then node
.parent
= self
7087 redef fun visit_all
(v
: Visitor)
7089 v
.enter_visit
(_n_expr
)
7090 v
.enter_visit
(_n_kwas
)
7091 v
.enter_visit
(_n_opar
)
7092 v
.enter_visit
(_n_type
)
7093 v
.enter_visit
(_n_cpar
)
7096 redef class AAsNotnullExpr
7097 init init_aasnotnullexpr
(
7098 n_expr
: nullable AExpr,
7099 n_kwas
: nullable TKwas,
7100 n_opar
: nullable TOpar,
7101 n_kwnot
: nullable TKwnot,
7102 n_kwnull
: nullable TKwnull,
7103 n_cpar
: nullable TCpar
7106 _n_expr
= n_expr
.as(not null)
7107 n_expr
.parent
= self
7108 _n_kwas
= n_kwas
.as(not null)
7109 n_kwas
.parent
= self
7111 if n_opar
!= null then n_opar
.parent
= self
7112 _n_kwnot
= n_kwnot
.as(not null)
7113 n_kwnot
.parent
= self
7114 _n_kwnull
= n_kwnull
.as(not null)
7115 n_kwnull
.parent
= self
7117 if n_cpar
!= null then n_cpar
.parent
= self
7120 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7122 if _n_expr
== old_child
then
7123 n_expr
= new_child
.as(AExpr)
7126 if _n_kwas
== old_child
then
7127 n_kwas
= new_child
.as(TKwas)
7130 if _n_opar
== old_child
then
7131 n_opar
= new_child
.as(nullable TOpar)
7134 if _n_kwnot
== old_child
then
7135 n_kwnot
= new_child
.as(TKwnot)
7138 if _n_kwnull
== old_child
then
7139 n_kwnull
= new_child
.as(TKwnull)
7142 if _n_cpar
== old_child
then
7143 n_cpar
= new_child
.as(nullable TCpar)
7148 redef fun n_expr
=(node
)
7153 redef fun n_kwas
=(node
)
7158 redef fun n_opar
=(node
)
7161 if node
!= null then node
.parent
= self
7163 redef fun n_kwnot
=(node
)
7168 redef fun n_kwnull
=(node
)
7173 redef fun n_cpar
=(node
)
7176 if node
!= null then node
.parent
= self
7180 redef fun visit_all
(v
: Visitor)
7182 v
.enter_visit
(_n_expr
)
7183 v
.enter_visit
(_n_kwas
)
7184 v
.enter_visit
(_n_opar
)
7185 v
.enter_visit
(_n_kwnot
)
7186 v
.enter_visit
(_n_kwnull
)
7187 v
.enter_visit
(_n_cpar
)
7190 redef class AIssetAttrExpr
7191 init init_aissetattrexpr
(
7192 n_kwisset
: nullable TKwisset,
7193 n_expr
: nullable AExpr,
7194 n_id
: nullable TAttrid
7197 _n_kwisset
= n_kwisset
.as(not null)
7198 n_kwisset
.parent
= self
7199 _n_expr
= n_expr
.as(not null)
7200 n_expr
.parent
= self
7201 _n_id
= n_id
.as(not null)
7205 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7207 if _n_kwisset
== old_child
then
7208 n_kwisset
= new_child
.as(TKwisset)
7211 if _n_expr
== old_child
then
7212 n_expr
= new_child
.as(AExpr)
7215 if _n_id
== old_child
then
7216 n_id
= new_child
.as(TAttrid)
7221 redef fun n_kwisset
=(node
)
7226 redef fun n_expr
=(node
)
7231 redef fun n_id
=(node
)
7238 redef fun visit_all
(v
: Visitor)
7240 v
.enter_visit
(_n_kwisset
)
7241 v
.enter_visit
(_n_expr
)
7242 v
.enter_visit
(_n_id
)
7245 redef class ADebugTypeExpr
7246 init init_adebugtypeexpr
(
7247 n_kwdebug
: nullable TKwdebug,
7248 n_kwtype
: nullable TKwtype,
7249 n_expr
: nullable AExpr,
7250 n_type
: nullable AType
7253 _n_kwdebug
= n_kwdebug
.as(not null)
7254 n_kwdebug
.parent
= self
7255 _n_kwtype
= n_kwtype
.as(not null)
7256 n_kwtype
.parent
= self
7257 _n_expr
= n_expr
.as(not null)
7258 n_expr
.parent
= self
7259 _n_type
= n_type
.as(not null)
7260 n_type
.parent
= self
7263 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7265 if _n_kwdebug
== old_child
then
7266 n_kwdebug
= new_child
.as(TKwdebug)
7269 if _n_kwtype
== old_child
then
7270 n_kwtype
= new_child
.as(TKwtype)
7273 if _n_expr
== old_child
then
7274 n_expr
= new_child
.as(AExpr)
7277 if _n_type
== old_child
then
7278 n_type
= new_child
.as(AType)
7283 redef fun n_kwdebug
=(node
)
7288 redef fun n_kwtype
=(node
)
7293 redef fun n_expr
=(node
)
7298 redef fun n_type
=(node
)
7305 redef fun visit_all
(v
: Visitor)
7307 v
.enter_visit
(_n_kwdebug
)
7308 v
.enter_visit
(_n_kwtype
)
7309 v
.enter_visit
(_n_expr
)
7310 v
.enter_visit
(_n_type
)
7313 redef class AVarargExpr
7314 init init_avarargexpr
(
7315 n_expr
: nullable AExpr,
7316 n_dotdotdot
: nullable TDotdotdot
7319 _n_expr
= n_expr
.as(not null)
7320 n_expr
.parent
= self
7321 _n_dotdotdot
= n_dotdotdot
.as(not null)
7322 n_dotdotdot
.parent
= self
7325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7327 if _n_expr
== old_child
then
7328 n_expr
= new_child
.as(AExpr)
7331 if _n_dotdotdot
== old_child
then
7332 n_dotdotdot
= new_child
.as(TDotdotdot)
7337 redef fun n_expr
=(node
)
7342 redef fun n_dotdotdot
=(node
)
7349 redef fun visit_all
(v
: Visitor)
7351 v
.enter_visit
(_n_expr
)
7352 v
.enter_visit
(_n_dotdotdot
)
7355 redef class ANamedargExpr
7356 init init_anamedargexpr
(
7358 n_assign
: nullable TAssign,
7359 n_expr
: nullable AExpr
7362 _n_id
= n_id
.as(not null)
7364 _n_assign
= n_assign
.as(not null)
7365 n_assign
.parent
= self
7366 _n_expr
= n_expr
.as(not null)
7367 n_expr
.parent
= self
7370 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7372 if _n_id
== old_child
then
7373 n_id
= new_child
.as(TId)
7376 if _n_assign
== old_child
then
7377 n_assign
= new_child
.as(TAssign)
7380 if _n_expr
== old_child
then
7381 n_expr
= new_child
.as(AExpr)
7386 redef fun n_id
=(node
)
7391 redef fun n_assign
=(node
)
7396 redef fun n_expr
=(node
)
7403 redef fun visit_all
(v
: Visitor)
7405 v
.enter_visit
(_n_id
)
7406 v
.enter_visit
(_n_assign
)
7407 v
.enter_visit
(_n_expr
)
7410 redef class ASafeExpr
7411 init init_asafeexpr
(
7412 n_expr
: nullable AExpr,
7413 n_quest
: nullable TQuest
7416 _n_expr
= n_expr
.as(not null)
7417 n_expr
.parent
= self
7418 _n_quest
= n_quest
.as(not null)
7419 n_quest
.parent
= self
7422 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7424 if _n_expr
== old_child
then
7425 n_expr
= new_child
.as(AExpr)
7428 if _n_quest
== old_child
then
7429 n_quest
= new_child
.as(TQuest)
7434 redef fun n_expr
=(node
)
7439 redef fun n_quest
=(node
)
7446 redef fun visit_all
(v
: Visitor)
7448 v
.enter_visit
(_n_expr
)
7449 v
.enter_visit
(_n_quest
)
7452 redef class ATypeExpr
7453 init init_atypeexpr
(
7454 n_type
: nullable AType
7457 _n_type
= n_type
.as(not null)
7458 n_type
.parent
= self
7461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7463 if _n_type
== old_child
then
7464 n_type
= new_child
.as(AType)
7469 redef fun n_type
=(node
)
7476 redef fun visit_all
(v
: Visitor)
7478 v
.enter_visit
(_n_type
)
7481 redef class AMethidExpr
7482 init init_amethidexpr
(
7483 n_expr
: nullable AExpr,
7484 n_id
: nullable AMethid
7487 _n_expr
= n_expr
.as(not null)
7488 n_expr
.parent
= self
7489 _n_id
= n_id
.as(not null)
7493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7495 if _n_expr
== old_child
then
7496 n_expr
= new_child
.as(AExpr)
7499 if _n_id
== old_child
then
7500 n_id
= new_child
.as(AMethid)
7505 redef fun n_expr
=(node
)
7510 redef fun n_id
=(node
)
7517 redef fun visit_all
(v
: Visitor)
7519 v
.enter_visit
(_n_expr
)
7520 v
.enter_visit
(_n_id
)
7525 n_annotations
: nullable AAnnotations
7528 _n_annotations
= n_annotations
.as(not null)
7529 n_annotations
.parent
= self
7532 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7534 if _n_annotations
== old_child
then
7535 n_annotations
= new_child
.as(AAnnotations)
7540 redef fun n_annotations
=(node
)
7542 _n_annotations
= node
7547 redef fun visit_all
(v
: Visitor)
7549 v
.enter_visit
(_n_annotations
)
7552 redef class AManyExpr
7553 init init_amanyexpr
(
7554 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7557 self.n_exprs
.unsafe_add_all
(n_exprs
)
7560 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7562 if n_exprs
.replace_child
(old_child
, new_child
) then return
7567 redef fun visit_all
(v
: Visitor)
7569 n_exprs
.visit_all
(v
)
7572 redef class AListExprs
7573 init init_alistexprs
(
7574 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7577 self.n_exprs
.unsafe_add_all
(n_exprs
)
7580 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7582 if n_exprs
.replace_child
(old_child
, new_child
) then return
7587 redef fun visit_all
(v
: Visitor)
7589 n_exprs
.visit_all
(v
)
7592 redef class AParExprs
7593 init init_aparexprs
(
7594 n_opar
: nullable TOpar,
7595 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7596 n_cpar
: nullable TCpar
7599 _n_opar
= n_opar
.as(not null)
7600 n_opar
.parent
= self
7601 self.n_exprs
.unsafe_add_all
(n_exprs
)
7602 _n_cpar
= n_cpar
.as(not null)
7603 n_cpar
.parent
= self
7606 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7608 if _n_opar
== old_child
then
7609 n_opar
= new_child
.as(TOpar)
7612 if n_exprs
.replace_child
(old_child
, new_child
) then return
7613 if _n_cpar
== old_child
then
7614 n_cpar
= new_child
.as(TCpar)
7619 redef fun n_opar
=(node
)
7624 redef fun n_cpar
=(node
)
7631 redef fun visit_all
(v
: Visitor)
7633 v
.enter_visit
(_n_opar
)
7634 n_exprs
.visit_all
(v
)
7635 v
.enter_visit
(_n_cpar
)
7638 redef class ABraExprs
7639 init init_abraexprs
(
7640 n_obra
: nullable TObra,
7641 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7642 n_cbra
: nullable TCbra
7645 _n_obra
= n_obra
.as(not null)
7646 n_obra
.parent
= self
7647 self.n_exprs
.unsafe_add_all
(n_exprs
)
7648 _n_cbra
= n_cbra
.as(not null)
7649 n_cbra
.parent
= self
7652 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7654 if _n_obra
== old_child
then
7655 n_obra
= new_child
.as(TObra)
7658 if n_exprs
.replace_child
(old_child
, new_child
) then return
7659 if _n_cbra
== old_child
then
7660 n_cbra
= new_child
.as(TCbra)
7665 redef fun n_obra
=(node
)
7670 redef fun n_cbra
=(node
)
7677 redef fun visit_all
(v
: Visitor)
7679 v
.enter_visit
(_n_obra
)
7680 n_exprs
.visit_all
(v
)
7681 v
.enter_visit
(_n_cbra
)
7684 redef class APlusAssignOp
7685 init init_aplusassignop
(
7686 n_op
: nullable TPluseq
7689 _n_op
= n_op
.as(not null)
7693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7695 if _n_op
== old_child
then
7696 n_op
= new_child
.as(TPluseq)
7701 redef fun n_op
=(node
)
7708 redef fun visit_all
(v
: Visitor)
7710 v
.enter_visit
(_n_op
)
7713 redef class AMinusAssignOp
7714 init init_aminusassignop
(
7715 n_op
: nullable TMinuseq
7718 _n_op
= n_op
.as(not null)
7722 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7724 if _n_op
== old_child
then
7725 n_op
= new_child
.as(TMinuseq)
7730 redef fun n_op
=(node
)
7737 redef fun visit_all
(v
: Visitor)
7739 v
.enter_visit
(_n_op
)
7742 redef class AStarAssignOp
7743 init init_astarassignop
(
7744 n_op
: nullable TStareq
7747 _n_op
= n_op
.as(not null)
7751 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7753 if _n_op
== old_child
then
7754 n_op
= new_child
.as(TStareq)
7759 redef fun n_op
=(node
)
7766 redef fun visit_all
(v
: Visitor)
7768 v
.enter_visit
(_n_op
)
7771 redef class ASlashAssignOp
7772 init init_aslashassignop
(
7773 n_op
: nullable TSlasheq
7776 _n_op
= n_op
.as(not null)
7780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7782 if _n_op
== old_child
then
7783 n_op
= new_child
.as(TSlasheq)
7788 redef fun n_op
=(node
)
7795 redef fun visit_all
(v
: Visitor)
7797 v
.enter_visit
(_n_op
)
7800 redef class APercentAssignOp
7801 init init_apercentassignop
(
7802 n_op
: nullable TPercenteq
7805 _n_op
= n_op
.as(not null)
7809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7811 if _n_op
== old_child
then
7812 n_op
= new_child
.as(TPercenteq)
7817 redef fun n_op
=(node
)
7824 redef fun visit_all
(v
: Visitor)
7826 v
.enter_visit
(_n_op
)
7829 redef class AStarstarAssignOp
7830 init init_astarstarassignop
(
7831 n_op
: nullable TStarstareq
7834 _n_op
= n_op
.as(not null)
7838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7840 if _n_op
== old_child
then
7841 n_op
= new_child
.as(TStarstareq)
7846 redef fun n_op
=(node
)
7853 redef fun visit_all
(v
: Visitor)
7855 v
.enter_visit
(_n_op
)
7858 redef class APipeAssignOp
7859 init init_apipeassignop
(
7860 n_op
: nullable TPipeeq
7863 _n_op
= n_op
.as(not null)
7867 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7869 if _n_op
== old_child
then
7870 n_op
= new_child
.as(TPipeeq)
7875 redef fun n_op
=(node
)
7882 redef fun visit_all
(v
: Visitor)
7884 v
.enter_visit
(_n_op
)
7887 redef class ACaretAssignOp
7888 init init_acaretassignop
(
7889 n_op
: nullable TCareteq
7892 _n_op
= n_op
.as(not null)
7896 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7898 if _n_op
== old_child
then
7899 n_op
= new_child
.as(TCareteq)
7904 redef fun n_op
=(node
)
7911 redef fun visit_all
(v
: Visitor)
7913 v
.enter_visit
(_n_op
)
7916 redef class AAmpAssignOp
7917 init init_aampassignop
(
7918 n_op
: nullable TAmpeq
7921 _n_op
= n_op
.as(not null)
7925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7927 if _n_op
== old_child
then
7928 n_op
= new_child
.as(TAmpeq)
7933 redef fun n_op
=(node
)
7940 redef fun visit_all
(v
: Visitor)
7942 v
.enter_visit
(_n_op
)
7945 redef class ALlAssignOp
7946 init init_allassignop
(
7947 n_op
: nullable TLleq
7950 _n_op
= n_op
.as(not null)
7954 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7956 if _n_op
== old_child
then
7957 n_op
= new_child
.as(TLleq)
7962 redef fun n_op
=(node
)
7969 redef fun visit_all
(v
: Visitor)
7971 v
.enter_visit
(_n_op
)
7974 redef class AGgAssignOp
7975 init init_aggassignop
(
7976 n_op
: nullable TGgeq
7979 _n_op
= n_op
.as(not null)
7983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7985 if _n_op
== old_child
then
7986 n_op
= new_child
.as(TGgeq)
7991 redef fun n_op
=(node
)
7998 redef fun visit_all
(v
: Visitor)
8000 v
.enter_visit
(_n_op
)
8003 redef class AForGroup
8004 init init_aforgroup
(
8005 n_ids
: Collection[Object], # Should be Collection[TId]
8006 n_kwin
: nullable TKwin,
8007 n_expr
: nullable AExpr
8010 self.n_ids
.unsafe_add_all
(n_ids
)
8011 _n_kwin
= n_kwin
.as(not null)
8012 n_kwin
.parent
= self
8013 _n_expr
= n_expr
.as(not null)
8014 n_expr
.parent
= self
8017 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8019 if n_ids
.replace_child
(old_child
, new_child
) then return
8020 if _n_kwin
== old_child
then
8021 n_kwin
= new_child
.as(TKwin)
8024 if _n_expr
== old_child
then
8025 n_expr
= new_child
.as(AExpr)
8030 redef fun n_kwin
=(node
)
8035 redef fun n_expr
=(node
)
8042 redef fun visit_all
(v
: Visitor)
8045 v
.enter_visit
(_n_kwin
)
8046 v
.enter_visit
(_n_expr
)
8049 redef class AModuleName
8050 init init_amodulename
(
8051 n_quad
: nullable TQuad,
8052 n_path
: Collection[Object], # Should be Collection[TId]
8057 if n_quad
!= null then n_quad
.parent
= self
8058 self.n_path
.unsafe_add_all
(n_path
)
8059 _n_id
= n_id
.as(not null)
8063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8065 if _n_quad
== old_child
then
8066 n_quad
= new_child
.as(nullable TQuad)
8069 if n_path
.replace_child
(old_child
, new_child
) then return
8070 if _n_id
== old_child
then
8071 n_id
= new_child
.as(TId)
8076 redef fun n_quad
=(node
)
8079 if node
!= null then node
.parent
= self
8081 redef fun n_id
=(node
)
8088 redef fun visit_all
(v
: Visitor)
8090 v
.enter_visit
(_n_quad
)
8092 v
.enter_visit
(_n_id
)
8095 redef class AExternCalls
8096 init init_aexterncalls
(
8097 n_kwimport
: nullable TKwimport,
8098 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
8101 _n_kwimport
= n_kwimport
.as(not null)
8102 n_kwimport
.parent
= self
8103 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
8106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8108 if _n_kwimport
== old_child
then
8109 n_kwimport
= new_child
.as(TKwimport)
8112 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
8115 redef fun n_kwimport
=(node
)
8122 redef fun visit_all
(v
: Visitor)
8124 v
.enter_visit
(_n_kwimport
)
8125 n_extern_calls
.visit_all
(v
)
8128 redef class AExternCall
8129 init init_aexterncall
8133 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8139 redef fun visit_all
(v
: Visitor)
8143 redef class ASuperExternCall
8144 init init_asuperexterncall
(
8145 n_kwsuper
: nullable TKwsuper
8148 _n_kwsuper
= n_kwsuper
.as(not null)
8149 n_kwsuper
.parent
= self
8152 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8154 if _n_kwsuper
== old_child
then
8155 n_kwsuper
= new_child
.as(TKwsuper)
8160 redef fun n_kwsuper
=(node
)
8167 redef fun visit_all
(v
: Visitor)
8169 v
.enter_visit
(_n_kwsuper
)
8172 redef class ALocalPropExternCall
8173 init init_alocalpropexterncall
(
8174 n_methid
: nullable AMethid
8177 _n_methid
= n_methid
.as(not null)
8178 n_methid
.parent
= self
8181 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8183 if _n_methid
== old_child
then
8184 n_methid
= new_child
.as(AMethid)
8189 redef fun n_methid
=(node
)
8196 redef fun visit_all
(v
: Visitor)
8198 v
.enter_visit
(_n_methid
)
8201 redef class AFullPropExternCall
8202 init init_afullpropexterncall
(
8203 n_type
: nullable AType,
8204 n_dot
: nullable TDot,
8205 n_methid
: nullable AMethid
8208 _n_type
= n_type
.as(not null)
8209 n_type
.parent
= self
8211 if n_dot
!= null then n_dot
.parent
= self
8212 _n_methid
= n_methid
.as(not null)
8213 n_methid
.parent
= self
8216 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8218 if _n_type
== old_child
then
8219 n_type
= new_child
.as(AType)
8222 if _n_dot
== old_child
then
8223 n_dot
= new_child
.as(nullable TDot)
8226 if _n_methid
== old_child
then
8227 n_methid
= new_child
.as(AMethid)
8232 redef fun n_type
=(node
)
8237 redef fun n_dot
=(node
)
8240 if node
!= null then node
.parent
= self
8242 redef fun n_methid
=(node
)
8249 redef fun visit_all
(v
: Visitor)
8251 v
.enter_visit
(_n_type
)
8252 v
.enter_visit
(_n_dot
)
8253 v
.enter_visit
(_n_methid
)
8256 redef class AInitPropExternCall
8257 init init_ainitpropexterncall
(
8258 n_type
: nullable AType
8261 _n_type
= n_type
.as(not null)
8262 n_type
.parent
= self
8265 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8267 if _n_type
== old_child
then
8268 n_type
= new_child
.as(AType)
8273 redef fun n_type
=(node
)
8280 redef fun visit_all
(v
: Visitor)
8282 v
.enter_visit
(_n_type
)
8285 redef class ACastAsExternCall
8286 init init_acastasexterncall
(
8287 n_from_type
: nullable AType,
8288 n_dot
: nullable TDot,
8289 n_kwas
: nullable TKwas,
8290 n_to_type
: nullable AType
8293 _n_from_type
= n_from_type
.as(not null)
8294 n_from_type
.parent
= self
8296 if n_dot
!= null then n_dot
.parent
= self
8297 _n_kwas
= n_kwas
.as(not null)
8298 n_kwas
.parent
= self
8299 _n_to_type
= n_to_type
.as(not null)
8300 n_to_type
.parent
= self
8303 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8305 if _n_from_type
== old_child
then
8306 n_from_type
= new_child
.as(AType)
8309 if _n_dot
== old_child
then
8310 n_dot
= new_child
.as(nullable TDot)
8313 if _n_kwas
== old_child
then
8314 n_kwas
= new_child
.as(TKwas)
8317 if _n_to_type
== old_child
then
8318 n_to_type
= new_child
.as(AType)
8323 redef fun n_from_type
=(node
)
8328 redef fun n_dot
=(node
)
8331 if node
!= null then node
.parent
= self
8333 redef fun n_kwas
=(node
)
8338 redef fun n_to_type
=(node
)
8345 redef fun visit_all
(v
: Visitor)
8347 v
.enter_visit
(_n_from_type
)
8348 v
.enter_visit
(_n_dot
)
8349 v
.enter_visit
(_n_kwas
)
8350 v
.enter_visit
(_n_to_type
)
8353 redef class AAsNullableExternCall
8354 init init_aasnullableexterncall
(
8355 n_type
: nullable AType,
8356 n_kwas
: nullable TKwas,
8357 n_kwnullable
: nullable TKwnullable
8360 _n_type
= n_type
.as(not null)
8361 n_type
.parent
= self
8362 _n_kwas
= n_kwas
.as(not null)
8363 n_kwas
.parent
= self
8364 _n_kwnullable
= n_kwnullable
.as(not null)
8365 n_kwnullable
.parent
= self
8368 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8370 if _n_type
== old_child
then
8371 n_type
= new_child
.as(AType)
8374 if _n_kwas
== old_child
then
8375 n_kwas
= new_child
.as(TKwas)
8378 if _n_kwnullable
== old_child
then
8379 n_kwnullable
= new_child
.as(TKwnullable)
8384 redef fun n_type
=(node
)
8389 redef fun n_kwas
=(node
)
8394 redef fun n_kwnullable
=(node
)
8396 _n_kwnullable
= node
8401 redef fun visit_all
(v
: Visitor)
8403 v
.enter_visit
(_n_type
)
8404 v
.enter_visit
(_n_kwas
)
8405 v
.enter_visit
(_n_kwnullable
)
8408 redef class AAsNotNullableExternCall
8409 init init_aasnotnullableexterncall
(
8410 n_type
: nullable AType,
8411 n_kwas
: nullable TKwas,
8412 n_kwnot
: nullable TKwnot,
8413 n_kwnullable
: nullable TKwnullable
8416 _n_type
= n_type
.as(not null)
8417 n_type
.parent
= self
8418 _n_kwas
= n_kwas
.as(not null)
8419 n_kwas
.parent
= self
8420 _n_kwnot
= n_kwnot
.as(not null)
8421 n_kwnot
.parent
= self
8422 _n_kwnullable
= n_kwnullable
.as(not null)
8423 n_kwnullable
.parent
= self
8426 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8428 if _n_type
== old_child
then
8429 n_type
= new_child
.as(AType)
8432 if _n_kwas
== old_child
then
8433 n_kwas
= new_child
.as(TKwas)
8436 if _n_kwnot
== old_child
then
8437 n_kwnot
= new_child
.as(TKwnot)
8440 if _n_kwnullable
== old_child
then
8441 n_kwnullable
= new_child
.as(TKwnullable)
8446 redef fun n_type
=(node
)
8451 redef fun n_kwas
=(node
)
8456 redef fun n_kwnot
=(node
)
8461 redef fun n_kwnullable
=(node
)
8463 _n_kwnullable
= node
8468 redef fun visit_all
(v
: Visitor)
8470 v
.enter_visit
(_n_type
)
8471 v
.enter_visit
(_n_kwas
)
8472 v
.enter_visit
(_n_kwnot
)
8473 v
.enter_visit
(_n_kwnullable
)
8476 redef class AInLanguage
8477 init init_ainlanguage
(
8478 n_kwin
: nullable TKwin,
8479 n_string
: nullable TString
8482 _n_kwin
= n_kwin
.as(not null)
8483 n_kwin
.parent
= self
8484 _n_string
= n_string
.as(not null)
8485 n_string
.parent
= self
8488 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8490 if _n_kwin
== old_child
then
8491 n_kwin
= new_child
.as(TKwin)
8494 if _n_string
== old_child
then
8495 n_string
= new_child
.as(TString)
8500 redef fun n_kwin
=(node
)
8505 redef fun n_string
=(node
)
8512 redef fun visit_all
(v
: Visitor)
8514 v
.enter_visit
(_n_kwin
)
8515 v
.enter_visit
(_n_string
)
8518 redef class AExternCodeBlock
8519 init init_aexterncodeblock
(
8520 n_in_language
: nullable AInLanguage,
8521 n_extern_code_segment
: nullable TExternCodeSegment
8524 _n_in_language
= n_in_language
8525 if n_in_language
!= null then n_in_language
.parent
= self
8526 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8527 n_extern_code_segment
.parent
= self
8530 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8532 if _n_in_language
== old_child
then
8533 n_in_language
= new_child
.as(nullable AInLanguage)
8536 if _n_extern_code_segment
== old_child
then
8537 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8542 redef fun n_in_language
=(node
)
8544 _n_in_language
= node
8545 if node
!= null then node
.parent
= self
8547 redef fun n_extern_code_segment
=(node
)
8549 _n_extern_code_segment
= node
8554 redef fun visit_all
(v
: Visitor)
8556 v
.enter_visit
(_n_in_language
)
8557 v
.enter_visit
(_n_extern_code_segment
)
8560 redef class AQualified
8561 init init_aqualified
(
8562 n_id
: Collection[Object], # Should be Collection[TId]
8563 n_classid
: nullable TClassid
8566 self.n_id
.unsafe_add_all
(n_id
)
8567 _n_classid
= n_classid
8568 if n_classid
!= null then n_classid
.parent
= self
8571 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8573 if n_id
.replace_child
(old_child
, new_child
) then return
8574 if _n_classid
== old_child
then
8575 n_classid
= new_child
.as(nullable TClassid)
8580 redef fun n_classid
=(node
)
8583 if node
!= null then node
.parent
= self
8587 redef fun visit_all
(v
: Visitor)
8590 v
.enter_visit
(_n_classid
)
8595 n_comment
: Collection[Object] # Should be Collection[TComment]
8598 self.n_comment
.unsafe_add_all
(n_comment
)
8601 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8603 if n_comment
.replace_child
(old_child
, new_child
) then return
8608 redef fun visit_all
(v
: Visitor)
8610 n_comment
.visit_all
(v
)
8613 redef class AAnnotations
8614 init init_aannotations
(
8615 n_kwis
: nullable TKwis,
8617 n_opar
: nullable TOpar,
8618 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8619 n_cpar
: nullable TCpar,
8620 n_kwend
: nullable TKwend
8624 if n_kwis
!= null then n_kwis
.parent
= self
8626 if n_at
!= null then n_at
.parent
= self
8628 if n_opar
!= null then n_opar
.parent
= self
8629 self.n_items
.unsafe_add_all
(n_items
)
8631 if n_cpar
!= null then n_cpar
.parent
= self
8633 if n_kwend
!= null then n_kwend
.parent
= self
8636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8638 if _n_kwis
== old_child
then
8639 n_kwis
= new_child
.as(nullable TKwis)
8642 if _n_at
== old_child
then
8643 n_at
= new_child
.as(nullable TAt)
8646 if _n_opar
== old_child
then
8647 n_opar
= new_child
.as(nullable TOpar)
8650 if n_items
.replace_child
(old_child
, new_child
) then return
8651 if _n_cpar
== old_child
then
8652 n_cpar
= new_child
.as(nullable TCpar)
8655 if _n_kwend
== old_child
then
8656 n_kwend
= new_child
.as(nullable TKwend)
8661 redef fun n_kwis
=(node
)
8664 if node
!= null then node
.parent
= self
8666 redef fun n_at
=(node
)
8669 if node
!= null then node
.parent
= self
8671 redef fun n_opar
=(node
)
8674 if node
!= null then node
.parent
= self
8676 redef fun n_cpar
=(node
)
8679 if node
!= null then node
.parent
= self
8681 redef fun n_kwend
=(node
)
8684 if node
!= null then node
.parent
= self
8688 redef fun visit_all
(v
: Visitor)
8690 v
.enter_visit
(_n_kwis
)
8691 v
.enter_visit
(_n_at
)
8692 v
.enter_visit
(_n_opar
)
8693 n_items
.visit_all
(v
)
8694 v
.enter_visit
(_n_cpar
)
8695 v
.enter_visit
(_n_kwend
)
8698 redef class AAnnotation
8699 init init_aannotation
(
8700 n_doc
: nullable ADoc,
8701 n_kwredef
: nullable TKwredef,
8702 n_visibility
: nullable AVisibility,
8703 n_atid
: nullable AAtid,
8704 n_opar
: nullable TOpar,
8705 n_args
: Collection[Object], # Should be Collection[AExpr]
8706 n_cpar
: nullable TCpar,
8707 n_annotations
: nullable AAnnotations
8711 if n_doc
!= null then n_doc
.parent
= self
8712 _n_kwredef
= n_kwredef
8713 if n_kwredef
!= null then n_kwredef
.parent
= self
8714 _n_visibility
= n_visibility
8715 if n_visibility
!= null then n_visibility
.parent
= self
8716 _n_atid
= n_atid
.as(not null)
8717 n_atid
.parent
= self
8719 if n_opar
!= null then n_opar
.parent
= self
8720 self.n_args
.unsafe_add_all
(n_args
)
8722 if n_cpar
!= null then n_cpar
.parent
= self
8723 _n_annotations
= n_annotations
8724 if n_annotations
!= null then n_annotations
.parent
= self
8727 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8729 if _n_doc
== old_child
then
8730 n_doc
= new_child
.as(nullable ADoc)
8733 if _n_kwredef
== old_child
then
8734 n_kwredef
= new_child
.as(nullable TKwredef)
8737 if _n_visibility
== old_child
then
8738 n_visibility
= new_child
.as(nullable AVisibility)
8741 if _n_atid
== old_child
then
8742 n_atid
= new_child
.as(AAtid)
8745 if _n_opar
== old_child
then
8746 n_opar
= new_child
.as(nullable TOpar)
8749 if n_args
.replace_child
(old_child
, new_child
) then return
8750 if _n_cpar
== old_child
then
8751 n_cpar
= new_child
.as(nullable TCpar)
8754 if _n_annotations
== old_child
then
8755 n_annotations
= new_child
.as(nullable AAnnotations)
8760 redef fun n_doc
=(node
)
8763 if node
!= null then node
.parent
= self
8765 redef fun n_kwredef
=(node
)
8768 if node
!= null then node
.parent
= self
8770 redef fun n_visibility
=(node
)
8772 _n_visibility
= node
8773 if node
!= null then node
.parent
= self
8775 redef fun n_atid
=(node
)
8780 redef fun n_opar
=(node
)
8783 if node
!= null then node
.parent
= self
8785 redef fun n_cpar
=(node
)
8788 if node
!= null then node
.parent
= self
8790 redef fun n_annotations
=(node
)
8792 _n_annotations
= node
8793 if node
!= null then node
.parent
= self
8797 redef fun visit_all
(v
: Visitor)
8799 v
.enter_visit
(_n_doc
)
8800 v
.enter_visit
(_n_kwredef
)
8801 v
.enter_visit
(_n_visibility
)
8802 v
.enter_visit
(_n_atid
)
8803 v
.enter_visit
(_n_opar
)
8805 v
.enter_visit
(_n_cpar
)
8806 v
.enter_visit
(_n_annotations
)
8814 _n_id
= n_id
.as(not null)
8818 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8820 if _n_id
== old_child
then
8821 n_id
= new_child
.as(TId)
8826 redef fun n_id
=(node
)
8833 redef fun visit_all
(v
: Visitor)
8835 v
.enter_visit
(_n_id
)
8838 redef class AKwexternAtid
8839 init init_akwexternatid
(
8840 n_id
: nullable TKwextern
8843 _n_id
= n_id
.as(not null)
8847 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8849 if _n_id
== old_child
then
8850 n_id
= new_child
.as(TKwextern)
8855 redef fun n_id
=(node
)
8862 redef fun visit_all
(v
: Visitor)
8864 v
.enter_visit
(_n_id
)
8867 redef class AKwabstractAtid
8868 init init_akwabstractatid
(
8869 n_id
: nullable TKwabstract
8872 _n_id
= n_id
.as(not null)
8876 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8878 if _n_id
== old_child
then
8879 n_id
= new_child
.as(TKwabstract)
8884 redef fun n_id
=(node
)
8891 redef fun visit_all
(v
: Visitor)
8893 v
.enter_visit
(_n_id
)
8896 redef class AKwimportAtid
8897 init init_akwimportatid
(
8898 n_id
: nullable TKwimport
8901 _n_id
= n_id
.as(not null)
8905 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8907 if _n_id
== old_child
then
8908 n_id
= new_child
.as(TKwimport)
8913 redef fun n_id
=(node
)
8920 redef fun visit_all
(v
: Visitor)
8922 v
.enter_visit
(_n_id
)
8927 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8929 if _n_base
== old_child
then
8930 if new_child
== null then
8932 new_child
.parent
= self
8933 assert new_child
isa AModule
8936 old_child
.parent
= null
8941 redef fun visit_all
(v
: Visitor)
8943 if _n_base
!= null then
8944 v
.enter_visit
(_n_base
.as(not null))
8946 v
.enter_visit
(_n_eof
)