1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
is no_warning
("missing-doc")
6 intrude import parser_nodes
11 n_moduledecl
: nullable AModuledecl,
12 n_imports
: Collection[Object], # Should be Collection[AImport]
13 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
14 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
17 _n_moduledecl
= n_moduledecl
18 if n_moduledecl
!= null then n_moduledecl
.parent
= self
19 self.n_imports
.unsafe_add_all
(n_imports
)
20 self.n_extern_code_blocks
.unsafe_add_all
(n_extern_code_blocks
)
21 self.n_classdefs
.unsafe_add_all
(n_classdefs
)
24 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
26 if _n_moduledecl
== old_child
then
27 n_moduledecl
= new_child
.as(nullable AModuledecl)
30 if n_imports
.replace_child
(old_child
, new_child
) then return
31 if n_extern_code_blocks
.replace_child
(old_child
, new_child
) then return
32 if n_classdefs
.replace_child
(old_child
, new_child
) then return
35 redef fun n_moduledecl
=(node
)
38 if node
!= null then node
.parent
= self
42 redef fun visit_all
(v
: Visitor)
44 v
.enter_visit
(_n_moduledecl
)
45 n_imports
.visit_all
(v
)
46 n_extern_code_blocks
.visit_all
(v
)
47 n_classdefs
.visit_all
(v
)
50 redef class AModuledecl
51 init init_amoduledecl
(
53 n_kwredef
: nullable TKwredef,
54 n_visibility
: nullable AVisibility,
55 n_kwmodule
: nullable TKwmodule,
56 n_name
: nullable AModuleName,
57 n_annotations
: nullable AAnnotations
61 if n_doc
!= null then n_doc
.parent
= self
62 _n_kwredef
= n_kwredef
63 if n_kwredef
!= null then n_kwredef
.parent
= self
64 _n_visibility
= n_visibility
.as(not null)
65 n_visibility
.parent
= self
66 _n_kwmodule
= n_kwmodule
.as(not null)
67 n_kwmodule
.parent
= self
68 _n_name
= n_name
.as(not null)
70 _n_annotations
= n_annotations
71 if n_annotations
!= null then n_annotations
.parent
= self
74 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
76 if _n_doc
== old_child
then
77 n_doc
= new_child
.as(nullable ADoc)
80 if _n_kwredef
== old_child
then
81 n_kwredef
= new_child
.as(nullable TKwredef)
84 if _n_visibility
== old_child
then
85 n_visibility
= new_child
.as(AVisibility)
88 if _n_kwmodule
== old_child
then
89 n_kwmodule
= new_child
.as(TKwmodule)
92 if _n_name
== old_child
then
93 n_name
= new_child
.as(AModuleName)
96 if _n_annotations
== old_child
then
97 n_annotations
= new_child
.as(nullable AAnnotations)
102 redef fun n_doc
=(node
)
105 if node
!= null then node
.parent
= self
107 redef fun n_kwredef
=(node
)
110 if node
!= null then node
.parent
= self
112 redef fun n_visibility
=(node
)
117 redef fun n_kwmodule
=(node
)
122 redef fun n_name
=(node
)
127 redef fun n_annotations
=(node
)
129 _n_annotations
= node
130 if node
!= null then node
.parent
= self
134 redef fun visit_all
(v
: Visitor)
136 v
.enter_visit
(_n_doc
)
137 v
.enter_visit
(_n_kwredef
)
138 v
.enter_visit
(_n_visibility
)
139 v
.enter_visit
(_n_kwmodule
)
140 v
.enter_visit
(_n_name
)
141 v
.enter_visit
(_n_annotations
)
144 redef class AStdImport
145 init init_astdimport
(
146 n_visibility
: nullable AVisibility,
147 n_kwimport
: nullable TKwimport,
148 n_name
: nullable AModuleName,
149 n_annotations
: nullable AAnnotations
152 _n_visibility
= n_visibility
.as(not null)
153 n_visibility
.parent
= self
154 _n_kwimport
= n_kwimport
.as(not null)
155 n_kwimport
.parent
= self
156 _n_name
= n_name
.as(not null)
158 _n_annotations
= n_annotations
159 if n_annotations
!= null then n_annotations
.parent
= self
162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
164 if _n_visibility
== old_child
then
165 n_visibility
= new_child
.as(AVisibility)
168 if _n_kwimport
== old_child
then
169 n_kwimport
= new_child
.as(TKwimport)
172 if _n_name
== old_child
then
173 n_name
= new_child
.as(AModuleName)
176 if _n_annotations
== old_child
then
177 n_annotations
= new_child
.as(nullable AAnnotations)
182 redef fun n_visibility
=(node
)
187 redef fun n_kwimport
=(node
)
192 redef fun n_name
=(node
)
197 redef fun n_annotations
=(node
)
199 _n_annotations
= node
200 if node
!= null then node
.parent
= self
204 redef fun visit_all
(v
: Visitor)
206 v
.enter_visit
(_n_visibility
)
207 v
.enter_visit
(_n_kwimport
)
208 v
.enter_visit
(_n_name
)
209 v
.enter_visit
(_n_annotations
)
212 redef class ANoImport
213 init init_anoimport
(
214 n_visibility
: nullable AVisibility,
215 n_kwimport
: nullable TKwimport,
216 n_kwend
: nullable TKwend
219 _n_visibility
= n_visibility
.as(not null)
220 n_visibility
.parent
= self
221 _n_kwimport
= n_kwimport
.as(not null)
222 n_kwimport
.parent
= self
223 _n_kwend
= n_kwend
.as(not null)
224 n_kwend
.parent
= self
227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
229 if _n_visibility
== old_child
then
230 n_visibility
= new_child
.as(AVisibility)
233 if _n_kwimport
== old_child
then
234 n_kwimport
= new_child
.as(TKwimport)
237 if _n_kwend
== old_child
then
238 n_kwend
= new_child
.as(TKwend)
243 redef fun n_visibility
=(node
)
248 redef fun n_kwimport
=(node
)
253 redef fun n_kwend
=(node
)
260 redef fun visit_all
(v
: Visitor)
262 v
.enter_visit
(_n_visibility
)
263 v
.enter_visit
(_n_kwimport
)
264 v
.enter_visit
(_n_kwend
)
267 redef class APublicVisibility
268 init init_apublicvisibility
(
269 n_kwpublic
: nullable TKwpublic
272 _n_kwpublic
= n_kwpublic
273 if n_kwpublic
!= null then n_kwpublic
.parent
= self
276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
278 if _n_kwpublic
== old_child
then
279 n_kwpublic
= new_child
.as(nullable TKwpublic)
284 redef fun n_kwpublic
=(node
)
287 if node
!= null then node
.parent
= self
291 redef fun visit_all
(v
: Visitor)
293 v
.enter_visit
(_n_kwpublic
)
296 redef class APrivateVisibility
297 init init_aprivatevisibility
(
298 n_kwprivate
: nullable TKwprivate
301 _n_kwprivate
= n_kwprivate
.as(not null)
302 n_kwprivate
.parent
= self
305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
307 if _n_kwprivate
== old_child
then
308 n_kwprivate
= new_child
.as(TKwprivate)
313 redef fun n_kwprivate
=(node
)
320 redef fun visit_all
(v
: Visitor)
322 v
.enter_visit
(_n_kwprivate
)
325 redef class AProtectedVisibility
326 init init_aprotectedvisibility
(
327 n_kwprotected
: nullable TKwprotected
330 _n_kwprotected
= n_kwprotected
.as(not null)
331 n_kwprotected
.parent
= self
334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
336 if _n_kwprotected
== old_child
then
337 n_kwprotected
= new_child
.as(TKwprotected)
342 redef fun n_kwprotected
=(node
)
344 _n_kwprotected
= node
349 redef fun visit_all
(v
: Visitor)
351 v
.enter_visit
(_n_kwprotected
)
354 redef class AIntrudeVisibility
355 init init_aintrudevisibility
(
356 n_kwintrude
: nullable TKwintrude
359 _n_kwintrude
= n_kwintrude
.as(not null)
360 n_kwintrude
.parent
= self
363 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
365 if _n_kwintrude
== old_child
then
366 n_kwintrude
= new_child
.as(TKwintrude)
371 redef fun n_kwintrude
=(node
)
378 redef fun visit_all
(v
: Visitor)
380 v
.enter_visit
(_n_kwintrude
)
383 redef class AStdClassdef
384 init init_astdclassdef
(
385 n_doc
: nullable ADoc,
386 n_kwredef
: nullable TKwredef,
387 n_visibility
: nullable AVisibility,
388 n_classkind
: nullable AClasskind,
389 n_id
: nullable TClassid,
390 n_obra
: nullable TObra,
391 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
392 n_cbra
: nullable TCbra,
393 n_extern_code_block
: nullable AExternCodeBlock,
394 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
395 n_kwend
: nullable TKwend
399 if n_doc
!= null then n_doc
.parent
= self
400 _n_kwredef
= n_kwredef
401 if n_kwredef
!= null then n_kwredef
.parent
= self
402 _n_visibility
= n_visibility
.as(not null)
403 n_visibility
.parent
= self
404 _n_classkind
= n_classkind
.as(not null)
405 n_classkind
.parent
= self
407 if n_id
!= null then n_id
.parent
= self
409 if n_obra
!= null then n_obra
.parent
= self
410 self.n_formaldefs
.unsafe_add_all
(n_formaldefs
)
412 if n_cbra
!= null then n_cbra
.parent
= self
413 _n_extern_code_block
= n_extern_code_block
414 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
415 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
416 _n_kwend
= n_kwend
.as(not null)
417 n_kwend
.parent
= self
420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
422 if _n_doc
== old_child
then
423 n_doc
= new_child
.as(nullable ADoc)
426 if _n_kwredef
== old_child
then
427 n_kwredef
= new_child
.as(nullable TKwredef)
430 if _n_visibility
== old_child
then
431 n_visibility
= new_child
.as(AVisibility)
434 if _n_classkind
== old_child
then
435 n_classkind
= new_child
.as(AClasskind)
438 if _n_id
== old_child
then
439 n_id
= new_child
.as(nullable TClassid)
442 if _n_obra
== old_child
then
443 n_obra
= new_child
.as(nullable TObra)
446 if n_formaldefs
.replace_child
(old_child
, new_child
) then return
447 if _n_cbra
== old_child
then
448 n_cbra
= new_child
.as(nullable TCbra)
451 if _n_extern_code_block
== old_child
then
452 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
455 if n_propdefs
.replace_child
(old_child
, new_child
) then return
456 if _n_kwend
== old_child
then
457 n_kwend
= new_child
.as(TKwend)
462 redef fun n_doc
=(node
)
465 if node
!= null then node
.parent
= self
467 redef fun n_kwredef
=(node
)
470 if node
!= null then node
.parent
= self
472 redef fun n_visibility
=(node
)
477 redef fun n_classkind
=(node
)
482 redef fun n_id
=(node
)
485 if node
!= null then node
.parent
= self
487 redef fun n_obra
=(node
)
490 if node
!= null then node
.parent
= self
492 redef fun n_cbra
=(node
)
495 if node
!= null then node
.parent
= self
497 redef fun n_extern_code_block
=(node
)
499 _n_extern_code_block
= node
500 if node
!= null then node
.parent
= self
502 redef fun n_kwend
=(node
)
509 redef fun visit_all
(v
: Visitor)
511 v
.enter_visit
(_n_doc
)
512 v
.enter_visit
(_n_kwredef
)
513 v
.enter_visit
(_n_visibility
)
514 v
.enter_visit
(_n_classkind
)
516 v
.enter_visit
(_n_obra
)
517 n_formaldefs
.visit_all
(v
)
518 v
.enter_visit
(_n_cbra
)
519 v
.enter_visit
(_n_extern_code_block
)
520 n_propdefs
.visit_all
(v
)
521 v
.enter_visit
(_n_kwend
)
524 redef class ATopClassdef
525 init init_atopclassdef
(
526 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
529 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
532 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
534 if n_propdefs
.replace_child
(old_child
, new_child
) then return
539 redef fun visit_all
(v
: Visitor)
541 n_propdefs
.visit_all
(v
)
544 redef class AMainClassdef
545 init init_amainclassdef
(
546 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
549 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
554 if n_propdefs
.replace_child
(old_child
, new_child
) then return
559 redef fun visit_all
(v
: Visitor)
561 n_propdefs
.visit_all
(v
)
564 redef class AConcreteClasskind
565 init init_aconcreteclasskind
(
566 n_kwclass
: nullable TKwclass
569 _n_kwclass
= n_kwclass
.as(not null)
570 n_kwclass
.parent
= self
573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
575 if _n_kwclass
== old_child
then
576 n_kwclass
= new_child
.as(TKwclass)
581 redef fun n_kwclass
=(node
)
588 redef fun visit_all
(v
: Visitor)
590 v
.enter_visit
(_n_kwclass
)
593 redef class AAbstractClasskind
594 init init_aabstractclasskind
(
595 n_kwabstract
: nullable TKwabstract,
596 n_kwclass
: nullable TKwclass
599 _n_kwabstract
= n_kwabstract
.as(not null)
600 n_kwabstract
.parent
= self
601 _n_kwclass
= n_kwclass
.as(not null)
602 n_kwclass
.parent
= self
605 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
607 if _n_kwabstract
== old_child
then
608 n_kwabstract
= new_child
.as(TKwabstract)
611 if _n_kwclass
== old_child
then
612 n_kwclass
= new_child
.as(TKwclass)
617 redef fun n_kwabstract
=(node
)
622 redef fun n_kwclass
=(node
)
629 redef fun visit_all
(v
: Visitor)
631 v
.enter_visit
(_n_kwabstract
)
632 v
.enter_visit
(_n_kwclass
)
635 redef class AInterfaceClasskind
636 init init_ainterfaceclasskind
(
637 n_kwinterface
: nullable TKwinterface
640 _n_kwinterface
= n_kwinterface
.as(not null)
641 n_kwinterface
.parent
= self
644 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
646 if _n_kwinterface
== old_child
then
647 n_kwinterface
= new_child
.as(TKwinterface)
652 redef fun n_kwinterface
=(node
)
654 _n_kwinterface
= node
659 redef fun visit_all
(v
: Visitor)
661 v
.enter_visit
(_n_kwinterface
)
664 redef class AEnumClasskind
665 init init_aenumclasskind
(
666 n_kwenum
: nullable TKwenum
669 _n_kwenum
= n_kwenum
.as(not null)
670 n_kwenum
.parent
= self
673 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
675 if _n_kwenum
== old_child
then
676 n_kwenum
= new_child
.as(TKwenum)
681 redef fun n_kwenum
=(node
)
688 redef fun visit_all
(v
: Visitor)
690 v
.enter_visit
(_n_kwenum
)
693 redef class AExternClasskind
694 init init_aexternclasskind
(
695 n_kwextern
: nullable TKwextern,
696 n_kwclass
: nullable TKwclass
699 _n_kwextern
= n_kwextern
.as(not null)
700 n_kwextern
.parent
= self
701 _n_kwclass
= n_kwclass
702 if n_kwclass
!= null then n_kwclass
.parent
= self
705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
707 if _n_kwextern
== old_child
then
708 n_kwextern
= new_child
.as(TKwextern)
711 if _n_kwclass
== old_child
then
712 n_kwclass
= new_child
.as(nullable TKwclass)
717 redef fun n_kwextern
=(node
)
722 redef fun n_kwclass
=(node
)
725 if node
!= null then node
.parent
= self
729 redef fun visit_all
(v
: Visitor)
731 v
.enter_visit
(_n_kwextern
)
732 v
.enter_visit
(_n_kwclass
)
735 redef class AFormaldef
736 init init_aformaldef
(
737 n_id
: nullable TClassid,
738 n_type
: nullable AType,
739 n_annotations
: nullable AAnnotations
742 _n_id
= n_id
.as(not null)
745 if n_type
!= null then n_type
.parent
= self
746 _n_annotations
= n_annotations
747 if n_annotations
!= null then n_annotations
.parent
= self
750 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
752 if _n_id
== old_child
then
753 n_id
= new_child
.as(TClassid)
756 if _n_type
== old_child
then
757 n_type
= new_child
.as(nullable AType)
760 if _n_annotations
== old_child
then
761 n_annotations
= new_child
.as(nullable AAnnotations)
766 redef fun n_id
=(node
)
771 redef fun n_type
=(node
)
774 if node
!= null then node
.parent
= self
776 redef fun n_annotations
=(node
)
778 _n_annotations
= node
779 if node
!= null then node
.parent
= self
783 redef fun visit_all
(v
: Visitor)
786 v
.enter_visit
(_n_type
)
787 v
.enter_visit
(_n_annotations
)
790 redef class AAttrPropdef
791 init init_aattrpropdef
(
792 n_doc
: nullable ADoc,
793 n_kwredef
: nullable TKwredef,
794 n_visibility
: nullable AVisibility,
795 n_kwvar
: nullable TKwvar,
797 n_type
: nullable AType,
798 n_assign
: nullable TAssign,
799 n_expr
: nullable AExpr,
800 n_annotations
: nullable AAnnotations,
801 n_kwdo
: nullable TKwdo,
802 n_block
: nullable AExpr,
803 n_kwend
: nullable TKwend
807 if n_doc
!= null then n_doc
.parent
= self
808 _n_kwredef
= n_kwredef
809 if n_kwredef
!= null then n_kwredef
.parent
= self
810 _n_visibility
= n_visibility
.as(not null)
811 n_visibility
.parent
= self
812 _n_kwvar
= n_kwvar
.as(not null)
813 n_kwvar
.parent
= self
814 _n_id2
= n_id2
.as(not null)
817 if n_type
!= null then n_type
.parent
= self
819 if n_assign
!= null then n_assign
.parent
= self
821 if n_expr
!= null then n_expr
.parent
= self
822 _n_annotations
= n_annotations
823 if n_annotations
!= null then n_annotations
.parent
= self
825 if n_kwdo
!= null then n_kwdo
.parent
= self
827 if n_block
!= null then n_block
.parent
= self
829 if n_kwend
!= null then n_kwend
.parent
= self
832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
834 if _n_doc
== old_child
then
835 n_doc
= new_child
.as(nullable ADoc)
838 if _n_kwredef
== old_child
then
839 n_kwredef
= new_child
.as(nullable TKwredef)
842 if _n_visibility
== old_child
then
843 n_visibility
= new_child
.as(AVisibility)
846 if _n_kwvar
== old_child
then
847 n_kwvar
= new_child
.as(TKwvar)
850 if _n_id2
== old_child
then
851 n_id2
= new_child
.as(TId)
854 if _n_type
== old_child
then
855 n_type
= new_child
.as(nullable AType)
858 if _n_assign
== old_child
then
859 n_assign
= new_child
.as(nullable TAssign)
862 if _n_expr
== old_child
then
863 n_expr
= new_child
.as(nullable AExpr)
866 if _n_annotations
== old_child
then
867 n_annotations
= new_child
.as(nullable AAnnotations)
870 if _n_kwdo
== old_child
then
871 n_kwdo
= new_child
.as(nullable TKwdo)
874 if _n_block
== old_child
then
875 n_block
= new_child
.as(nullable AExpr)
878 if _n_kwend
== old_child
then
879 n_kwend
= new_child
.as(nullable TKwend)
884 redef fun n_doc
=(node
)
887 if node
!= null then node
.parent
= self
889 redef fun n_kwredef
=(node
)
892 if node
!= null then node
.parent
= self
894 redef fun n_visibility
=(node
)
899 redef fun n_kwvar
=(node
)
904 redef fun n_id2
=(node
)
909 redef fun n_type
=(node
)
912 if node
!= null then node
.parent
= self
914 redef fun n_assign
=(node
)
917 if node
!= null then node
.parent
= self
919 redef fun n_expr
=(node
)
922 if node
!= null then node
.parent
= self
924 redef fun n_annotations
=(node
)
926 _n_annotations
= node
927 if node
!= null then node
.parent
= self
929 redef fun n_kwdo
=(node
)
932 if node
!= null then node
.parent
= self
934 redef fun n_block
=(node
)
937 if node
!= null then node
.parent
= self
939 redef fun n_kwend
=(node
)
942 if node
!= null then node
.parent
= self
946 redef fun visit_all
(v
: Visitor)
948 v
.enter_visit
(_n_doc
)
949 v
.enter_visit
(_n_kwredef
)
950 v
.enter_visit
(_n_visibility
)
951 v
.enter_visit
(_n_kwvar
)
952 v
.enter_visit
(_n_id2
)
953 v
.enter_visit
(_n_type
)
954 v
.enter_visit
(_n_assign
)
955 v
.enter_visit
(_n_expr
)
956 v
.enter_visit
(_n_annotations
)
957 v
.enter_visit
(_n_kwdo
)
958 v
.enter_visit
(_n_block
)
959 v
.enter_visit
(_n_kwend
)
962 redef class AMainMethPropdef
963 init init_amainmethpropdef
(
964 n_kwredef
: nullable TKwredef,
965 n_block
: nullable AExpr
968 _n_kwredef
= n_kwredef
969 if n_kwredef
!= null then n_kwredef
.parent
= self
971 if n_block
!= null then n_block
.parent
= self
974 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
976 if _n_kwredef
== old_child
then
977 n_kwredef
= new_child
.as(nullable TKwredef)
980 if _n_block
== old_child
then
981 n_block
= new_child
.as(nullable AExpr)
986 redef fun n_kwredef
=(node
)
989 if node
!= null then node
.parent
= self
991 redef fun n_block
=(node
)
994 if node
!= null then node
.parent
= self
998 redef fun visit_all
(v
: Visitor)
1000 v
.enter_visit
(_n_kwredef
)
1001 v
.enter_visit
(_n_block
)
1004 redef class ATypePropdef
1005 init init_atypepropdef
(
1006 n_doc
: nullable ADoc,
1007 n_kwredef
: nullable TKwredef,
1008 n_visibility
: nullable AVisibility,
1009 n_kwtype
: nullable TKwtype,
1010 n_id
: nullable TClassid,
1011 n_type
: nullable AType,
1012 n_annotations
: nullable AAnnotations
1016 if n_doc
!= null then n_doc
.parent
= self
1017 _n_kwredef
= n_kwredef
1018 if n_kwredef
!= null then n_kwredef
.parent
= self
1019 _n_visibility
= n_visibility
.as(not null)
1020 n_visibility
.parent
= self
1021 _n_kwtype
= n_kwtype
.as(not null)
1022 n_kwtype
.parent
= self
1023 _n_id
= n_id
.as(not null)
1025 _n_type
= n_type
.as(not null)
1026 n_type
.parent
= self
1027 _n_annotations
= n_annotations
1028 if n_annotations
!= null then n_annotations
.parent
= self
1031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1033 if _n_doc
== old_child
then
1034 n_doc
= new_child
.as(nullable ADoc)
1037 if _n_kwredef
== old_child
then
1038 n_kwredef
= new_child
.as(nullable TKwredef)
1041 if _n_visibility
== old_child
then
1042 n_visibility
= new_child
.as(AVisibility)
1045 if _n_kwtype
== old_child
then
1046 n_kwtype
= new_child
.as(TKwtype)
1049 if _n_id
== old_child
then
1050 n_id
= new_child
.as(TClassid)
1053 if _n_type
== old_child
then
1054 n_type
= new_child
.as(AType)
1057 if _n_annotations
== old_child
then
1058 n_annotations
= new_child
.as(nullable AAnnotations)
1063 redef fun n_doc
=(node
)
1066 if node
!= null then node
.parent
= self
1068 redef fun n_kwredef
=(node
)
1071 if node
!= null then node
.parent
= self
1073 redef fun n_visibility
=(node
)
1075 _n_visibility
= node
1078 redef fun n_kwtype
=(node
)
1083 redef fun n_id
=(node
)
1088 redef fun n_type
=(node
)
1093 redef fun n_annotations
=(node
)
1095 _n_annotations
= node
1096 if node
!= null then node
.parent
= self
1100 redef fun visit_all
(v
: Visitor)
1102 v
.enter_visit
(_n_doc
)
1103 v
.enter_visit
(_n_kwredef
)
1104 v
.enter_visit
(_n_visibility
)
1105 v
.enter_visit
(_n_kwtype
)
1106 v
.enter_visit
(_n_id
)
1107 v
.enter_visit
(_n_type
)
1108 v
.enter_visit
(_n_annotations
)
1111 redef class AMethPropdef
1112 init init_amethpropdef
(
1113 n_doc
: nullable ADoc,
1114 n_kwredef
: nullable TKwredef,
1115 n_visibility
: nullable AVisibility,
1116 n_kwmeth
: nullable TKwmeth,
1117 n_kwinit
: nullable TKwinit,
1118 n_kwnew
: nullable TKwnew,
1119 n_methid
: nullable AMethid,
1120 n_signature
: nullable ASignature,
1121 n_annotations
: nullable AAnnotations,
1122 n_extern_calls
: nullable AExternCalls,
1123 n_extern_code_block
: nullable AExternCodeBlock,
1124 n_kwdo
: nullable TKwdo,
1125 n_block
: nullable AExpr,
1126 n_kwend
: nullable TKwend
1130 if n_doc
!= null then n_doc
.parent
= self
1131 _n_kwredef
= n_kwredef
1132 if n_kwredef
!= null then n_kwredef
.parent
= self
1133 _n_visibility
= n_visibility
.as(not null)
1134 n_visibility
.parent
= self
1135 _n_kwmeth
= n_kwmeth
1136 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1137 _n_kwinit
= n_kwinit
1138 if n_kwinit
!= null then n_kwinit
.parent
= self
1140 if n_kwnew
!= null then n_kwnew
.parent
= self
1141 _n_methid
= n_methid
1142 if n_methid
!= null then n_methid
.parent
= self
1143 _n_signature
= n_signature
.as(not null)
1144 n_signature
.parent
= self
1145 _n_annotations
= n_annotations
1146 if n_annotations
!= null then n_annotations
.parent
= self
1147 _n_extern_calls
= n_extern_calls
1148 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1149 _n_extern_code_block
= n_extern_code_block
1150 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1152 if n_kwdo
!= null then n_kwdo
.parent
= self
1154 if n_block
!= null then n_block
.parent
= self
1156 if n_kwend
!= null then n_kwend
.parent
= self
1159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1161 if _n_doc
== old_child
then
1162 n_doc
= new_child
.as(nullable ADoc)
1165 if _n_kwredef
== old_child
then
1166 n_kwredef
= new_child
.as(nullable TKwredef)
1169 if _n_visibility
== old_child
then
1170 n_visibility
= new_child
.as(AVisibility)
1173 if _n_kwmeth
== old_child
then
1174 n_kwmeth
= new_child
.as(nullable TKwmeth)
1177 if _n_kwinit
== old_child
then
1178 n_kwinit
= new_child
.as(nullable TKwinit)
1181 if _n_kwnew
== old_child
then
1182 n_kwnew
= new_child
.as(nullable TKwnew)
1185 if _n_methid
== old_child
then
1186 n_methid
= new_child
.as(nullable AMethid)
1189 if _n_signature
== old_child
then
1190 n_signature
= new_child
.as(ASignature)
1193 if _n_annotations
== old_child
then
1194 n_annotations
= new_child
.as(nullable AAnnotations)
1197 if _n_extern_calls
== old_child
then
1198 n_extern_calls
= new_child
.as(nullable AExternCalls)
1201 if _n_extern_code_block
== old_child
then
1202 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1205 if _n_kwdo
== old_child
then
1206 n_kwdo
= new_child
.as(nullable TKwdo)
1209 if _n_block
== old_child
then
1210 n_block
= new_child
.as(nullable AExpr)
1213 if _n_kwend
== old_child
then
1214 n_kwend
= new_child
.as(nullable TKwend)
1219 redef fun n_doc
=(node
)
1222 if node
!= null then node
.parent
= self
1224 redef fun n_kwredef
=(node
)
1227 if node
!= null then node
.parent
= self
1229 redef fun n_visibility
=(node
)
1231 _n_visibility
= node
1234 redef fun n_kwmeth
=(node
)
1237 if node
!= null then node
.parent
= self
1239 redef fun n_kwinit
=(node
)
1242 if node
!= null then node
.parent
= self
1244 redef fun n_kwnew
=(node
)
1247 if node
!= null then node
.parent
= self
1249 redef fun n_methid
=(node
)
1252 if node
!= null then node
.parent
= self
1254 redef fun n_signature
=(node
)
1259 redef fun n_annotations
=(node
)
1261 _n_annotations
= node
1262 if node
!= null then node
.parent
= self
1264 redef fun n_extern_calls
=(node
)
1266 _n_extern_calls
= node
1267 if node
!= null then node
.parent
= self
1269 redef fun n_extern_code_block
=(node
)
1271 _n_extern_code_block
= node
1272 if node
!= null then node
.parent
= self
1274 redef fun n_kwdo
=(node
)
1277 if node
!= null then node
.parent
= self
1279 redef fun n_block
=(node
)
1282 if node
!= null then node
.parent
= self
1284 redef fun n_kwend
=(node
)
1287 if node
!= null then node
.parent
= self
1291 redef fun visit_all
(v
: Visitor)
1293 v
.enter_visit
(_n_doc
)
1294 v
.enter_visit
(_n_kwredef
)
1295 v
.enter_visit
(_n_visibility
)
1296 v
.enter_visit
(_n_kwmeth
)
1297 v
.enter_visit
(_n_kwinit
)
1298 v
.enter_visit
(_n_kwnew
)
1299 v
.enter_visit
(_n_methid
)
1300 v
.enter_visit
(_n_signature
)
1301 v
.enter_visit
(_n_annotations
)
1302 v
.enter_visit
(_n_extern_calls
)
1303 v
.enter_visit
(_n_extern_code_block
)
1304 v
.enter_visit
(_n_kwdo
)
1305 v
.enter_visit
(_n_block
)
1306 v
.enter_visit
(_n_kwend
)
1309 redef class ASuperPropdef
1310 init init_asuperpropdef
(
1311 n_doc
: nullable ADoc,
1312 n_kwredef
: nullable TKwredef,
1313 n_visibility
: nullable AVisibility,
1314 n_kwsuper
: nullable TKwsuper,
1315 n_type
: nullable AType,
1316 n_annotations
: nullable AAnnotations
1320 if n_doc
!= null then n_doc
.parent
= self
1321 _n_kwredef
= n_kwredef
1322 if n_kwredef
!= null then n_kwredef
.parent
= self
1323 _n_visibility
= n_visibility
.as(not null)
1324 n_visibility
.parent
= self
1325 _n_kwsuper
= n_kwsuper
.as(not null)
1326 n_kwsuper
.parent
= self
1327 _n_type
= n_type
.as(not null)
1328 n_type
.parent
= self
1329 _n_annotations
= n_annotations
1330 if n_annotations
!= null then n_annotations
.parent
= self
1333 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1335 if _n_doc
== old_child
then
1336 n_doc
= new_child
.as(nullable ADoc)
1339 if _n_kwredef
== old_child
then
1340 n_kwredef
= new_child
.as(nullable TKwredef)
1343 if _n_visibility
== old_child
then
1344 n_visibility
= new_child
.as(AVisibility)
1347 if _n_kwsuper
== old_child
then
1348 n_kwsuper
= new_child
.as(TKwsuper)
1351 if _n_type
== old_child
then
1352 n_type
= new_child
.as(AType)
1355 if _n_annotations
== old_child
then
1356 n_annotations
= new_child
.as(nullable AAnnotations)
1361 redef fun n_doc
=(node
)
1364 if node
!= null then node
.parent
= self
1366 redef fun n_kwredef
=(node
)
1369 if node
!= null then node
.parent
= self
1371 redef fun n_visibility
=(node
)
1373 _n_visibility
= node
1376 redef fun n_kwsuper
=(node
)
1381 redef fun n_type
=(node
)
1386 redef fun n_annotations
=(node
)
1388 _n_annotations
= node
1389 if node
!= null then node
.parent
= self
1393 redef fun visit_all
(v
: Visitor)
1395 v
.enter_visit
(_n_doc
)
1396 v
.enter_visit
(_n_kwredef
)
1397 v
.enter_visit
(_n_visibility
)
1398 v
.enter_visit
(_n_kwsuper
)
1399 v
.enter_visit
(_n_type
)
1400 v
.enter_visit
(_n_annotations
)
1403 redef class AAnnotPropdef
1404 init init_aannotpropdef
(
1405 n_doc
: nullable ADoc,
1406 n_kwredef
: nullable TKwredef,
1407 n_visibility
: nullable AVisibility,
1408 n_atid
: nullable AAtid,
1409 n_opar
: nullable TOpar,
1410 n_args
: Collection[Object], # Should be Collection[AExpr]
1411 n_cpar
: nullable TCpar,
1412 n_annotations
: nullable AAnnotations
1416 if n_doc
!= null then n_doc
.parent
= self
1417 _n_kwredef
= n_kwredef
1418 if n_kwredef
!= null then n_kwredef
.parent
= self
1419 _n_visibility
= n_visibility
1420 if n_visibility
!= null then n_visibility
.parent
= self
1421 _n_atid
= n_atid
.as(not null)
1422 n_atid
.parent
= self
1424 if n_opar
!= null then n_opar
.parent
= self
1425 self.n_args
.unsafe_add_all
(n_args
)
1427 if n_cpar
!= null then n_cpar
.parent
= self
1428 _n_annotations
= n_annotations
1429 if n_annotations
!= null then n_annotations
.parent
= self
1432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1434 if _n_doc
== old_child
then
1435 n_doc
= new_child
.as(nullable ADoc)
1438 if _n_kwredef
== old_child
then
1439 n_kwredef
= new_child
.as(nullable TKwredef)
1442 if _n_visibility
== old_child
then
1443 n_visibility
= new_child
.as(nullable AVisibility)
1446 if _n_atid
== old_child
then
1447 n_atid
= new_child
.as(AAtid)
1450 if _n_opar
== old_child
then
1451 n_opar
= new_child
.as(nullable TOpar)
1454 if n_args
.replace_child
(old_child
, new_child
) then return
1455 if _n_cpar
== old_child
then
1456 n_cpar
= new_child
.as(nullable TCpar)
1459 if _n_annotations
== old_child
then
1460 n_annotations
= new_child
.as(nullable AAnnotations)
1465 redef fun n_doc
=(node
)
1468 if node
!= null then node
.parent
= self
1470 redef fun n_kwredef
=(node
)
1473 if node
!= null then node
.parent
= self
1475 redef fun n_visibility
=(node
)
1477 _n_visibility
= node
1478 if node
!= null then node
.parent
= self
1480 redef fun n_atid
=(node
)
1485 redef fun n_opar
=(node
)
1488 if node
!= null then node
.parent
= self
1490 redef fun n_cpar
=(node
)
1493 if node
!= null then node
.parent
= self
1495 redef fun n_annotations
=(node
)
1497 _n_annotations
= node
1498 if node
!= null then node
.parent
= self
1502 redef fun visit_all
(v
: Visitor)
1504 v
.enter_visit
(_n_doc
)
1505 v
.enter_visit
(_n_kwredef
)
1506 v
.enter_visit
(_n_visibility
)
1507 v
.enter_visit
(_n_atid
)
1508 v
.enter_visit
(_n_opar
)
1510 v
.enter_visit
(_n_cpar
)
1511 v
.enter_visit
(_n_annotations
)
1514 redef class AIdMethid
1515 init init_aidmethid
(
1519 _n_id
= n_id
.as(not null)
1523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1525 if _n_id
== old_child
then
1526 n_id
= new_child
.as(TId)
1531 redef fun n_id
=(node
)
1538 redef fun visit_all
(v
: Visitor)
1540 v
.enter_visit
(_n_id
)
1543 redef class APlusMethid
1544 init init_aplusmethid
(
1545 n_op
: nullable TPlus
1548 _n_op
= n_op
.as(not null)
1552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1554 if _n_op
== old_child
then
1555 n_op
= new_child
.as(TPlus)
1560 redef fun n_op
=(node
)
1567 redef fun visit_all
(v
: Visitor)
1569 v
.enter_visit
(_n_op
)
1572 redef class AMinusMethid
1573 init init_aminusmethid
(
1574 n_op
: nullable TMinus
1577 _n_op
= n_op
.as(not null)
1581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1583 if _n_op
== old_child
then
1584 n_op
= new_child
.as(TMinus)
1589 redef fun n_op
=(node
)
1596 redef fun visit_all
(v
: Visitor)
1598 v
.enter_visit
(_n_op
)
1601 redef class AStarMethid
1602 init init_astarmethid
(
1603 n_op
: nullable TStar
1606 _n_op
= n_op
.as(not null)
1610 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1612 if _n_op
== old_child
then
1613 n_op
= new_child
.as(TStar)
1618 redef fun n_op
=(node
)
1625 redef fun visit_all
(v
: Visitor)
1627 v
.enter_visit
(_n_op
)
1630 redef class AStarstarMethid
1631 init init_astarstarmethid
(
1632 n_op
: nullable TStarstar
1635 _n_op
= n_op
.as(not null)
1639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1641 if _n_op
== old_child
then
1642 n_op
= new_child
.as(TStarstar)
1647 redef fun n_op
=(node
)
1654 redef fun visit_all
(v
: Visitor)
1656 v
.enter_visit
(_n_op
)
1659 redef class ASlashMethid
1660 init init_aslashmethid
(
1661 n_op
: nullable TSlash
1664 _n_op
= n_op
.as(not null)
1668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1670 if _n_op
== old_child
then
1671 n_op
= new_child
.as(TSlash)
1676 redef fun n_op
=(node
)
1683 redef fun visit_all
(v
: Visitor)
1685 v
.enter_visit
(_n_op
)
1688 redef class APercentMethid
1689 init init_apercentmethid
(
1690 n_op
: nullable TPercent
1693 _n_op
= n_op
.as(not null)
1697 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1699 if _n_op
== old_child
then
1700 n_op
= new_child
.as(TPercent)
1705 redef fun n_op
=(node
)
1712 redef fun visit_all
(v
: Visitor)
1714 v
.enter_visit
(_n_op
)
1717 redef class AEqMethid
1718 init init_aeqmethid
(
1722 _n_op
= n_op
.as(not null)
1726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1728 if _n_op
== old_child
then
1729 n_op
= new_child
.as(TEq)
1734 redef fun n_op
=(node
)
1741 redef fun visit_all
(v
: Visitor)
1743 v
.enter_visit
(_n_op
)
1746 redef class ANeMethid
1747 init init_anemethid
(
1751 _n_op
= n_op
.as(not null)
1755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1757 if _n_op
== old_child
then
1758 n_op
= new_child
.as(TNe)
1763 redef fun n_op
=(node
)
1770 redef fun visit_all
(v
: Visitor)
1772 v
.enter_visit
(_n_op
)
1775 redef class ALeMethid
1776 init init_alemethid
(
1780 _n_op
= n_op
.as(not null)
1784 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1786 if _n_op
== old_child
then
1787 n_op
= new_child
.as(TLe)
1792 redef fun n_op
=(node
)
1799 redef fun visit_all
(v
: Visitor)
1801 v
.enter_visit
(_n_op
)
1804 redef class AGeMethid
1805 init init_agemethid
(
1809 _n_op
= n_op
.as(not null)
1813 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1815 if _n_op
== old_child
then
1816 n_op
= new_child
.as(TGe)
1821 redef fun n_op
=(node
)
1828 redef fun visit_all
(v
: Visitor)
1830 v
.enter_visit
(_n_op
)
1833 redef class ALtMethid
1834 init init_altmethid
(
1838 _n_op
= n_op
.as(not null)
1842 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1844 if _n_op
== old_child
then
1845 n_op
= new_child
.as(TLt)
1850 redef fun n_op
=(node
)
1857 redef fun visit_all
(v
: Visitor)
1859 v
.enter_visit
(_n_op
)
1862 redef class AGtMethid
1863 init init_agtmethid
(
1867 _n_op
= n_op
.as(not null)
1871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1873 if _n_op
== old_child
then
1874 n_op
= new_child
.as(TGt)
1879 redef fun n_op
=(node
)
1886 redef fun visit_all
(v
: Visitor)
1888 v
.enter_visit
(_n_op
)
1891 redef class ALlMethid
1892 init init_allmethid
(
1896 _n_op
= n_op
.as(not null)
1900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1902 if _n_op
== old_child
then
1903 n_op
= new_child
.as(TLl)
1908 redef fun n_op
=(node
)
1915 redef fun visit_all
(v
: Visitor)
1917 v
.enter_visit
(_n_op
)
1920 redef class AGgMethid
1921 init init_aggmethid
(
1925 _n_op
= n_op
.as(not null)
1929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1931 if _n_op
== old_child
then
1932 n_op
= new_child
.as(TGg)
1937 redef fun n_op
=(node
)
1944 redef fun visit_all
(v
: Visitor)
1946 v
.enter_visit
(_n_op
)
1949 redef class AStarshipMethid
1950 init init_astarshipmethid
(
1951 n_op
: nullable TStarship
1954 _n_op
= n_op
.as(not null)
1958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1960 if _n_op
== old_child
then
1961 n_op
= new_child
.as(TStarship)
1966 redef fun n_op
=(node
)
1973 redef fun visit_all
(v
: Visitor)
1975 v
.enter_visit
(_n_op
)
1978 redef class APipeMethid
1979 init init_apipemethid
(
1980 n_op
: nullable TPipe
1983 _n_op
= n_op
.as(not null)
1987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1989 if _n_op
== old_child
then
1990 n_op
= new_child
.as(TPipe)
1995 redef fun n_op
=(node
)
2002 redef fun visit_all
(v
: Visitor)
2004 v
.enter_visit
(_n_op
)
2007 redef class ACaretMethid
2008 init init_acaretmethid
(
2009 n_op
: nullable TCaret
2012 _n_op
= n_op
.as(not null)
2016 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2018 if _n_op
== old_child
then
2019 n_op
= new_child
.as(TCaret)
2024 redef fun n_op
=(node
)
2031 redef fun visit_all
(v
: Visitor)
2033 v
.enter_visit
(_n_op
)
2036 redef class AAmpMethid
2037 init init_aampmethid
(
2041 _n_op
= n_op
.as(not null)
2045 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2047 if _n_op
== old_child
then
2048 n_op
= new_child
.as(TAmp)
2053 redef fun n_op
=(node
)
2060 redef fun visit_all
(v
: Visitor)
2062 v
.enter_visit
(_n_op
)
2065 redef class ATildeMethid
2066 init init_atildemethid
(
2067 n_op
: nullable TTilde
2070 _n_op
= n_op
.as(not null)
2074 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2076 if _n_op
== old_child
then
2077 n_op
= new_child
.as(TTilde)
2082 redef fun n_op
=(node
)
2089 redef fun visit_all
(v
: Visitor)
2091 v
.enter_visit
(_n_op
)
2094 redef class ABraMethid
2095 init init_abramethid
(
2096 n_obra
: nullable TObra,
2097 n_cbra
: nullable TCbra
2100 _n_obra
= n_obra
.as(not null)
2101 n_obra
.parent
= self
2102 _n_cbra
= n_cbra
.as(not null)
2103 n_cbra
.parent
= self
2106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2108 if _n_obra
== old_child
then
2109 n_obra
= new_child
.as(TObra)
2112 if _n_cbra
== old_child
then
2113 n_cbra
= new_child
.as(TCbra)
2118 redef fun n_obra
=(node
)
2123 redef fun n_cbra
=(node
)
2130 redef fun visit_all
(v
: Visitor)
2132 v
.enter_visit
(_n_obra
)
2133 v
.enter_visit
(_n_cbra
)
2136 redef class AAssignMethid
2137 init init_aassignmethid
(
2139 n_assign
: nullable TAssign
2142 _n_id
= n_id
.as(not null)
2144 _n_assign
= n_assign
.as(not null)
2145 n_assign
.parent
= self
2148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2150 if _n_id
== old_child
then
2151 n_id
= new_child
.as(TId)
2154 if _n_assign
== old_child
then
2155 n_assign
= new_child
.as(TAssign)
2160 redef fun n_id
=(node
)
2165 redef fun n_assign
=(node
)
2172 redef fun visit_all
(v
: Visitor)
2174 v
.enter_visit
(_n_id
)
2175 v
.enter_visit
(_n_assign
)
2178 redef class ABraassignMethid
2179 init init_abraassignmethid
(
2180 n_obra
: nullable TObra,
2181 n_cbra
: nullable TCbra,
2182 n_assign
: nullable TAssign
2185 _n_obra
= n_obra
.as(not null)
2186 n_obra
.parent
= self
2187 _n_cbra
= n_cbra
.as(not null)
2188 n_cbra
.parent
= self
2189 _n_assign
= n_assign
.as(not null)
2190 n_assign
.parent
= self
2193 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2195 if _n_obra
== old_child
then
2196 n_obra
= new_child
.as(TObra)
2199 if _n_cbra
== old_child
then
2200 n_cbra
= new_child
.as(TCbra)
2203 if _n_assign
== old_child
then
2204 n_assign
= new_child
.as(TAssign)
2209 redef fun n_obra
=(node
)
2214 redef fun n_cbra
=(node
)
2219 redef fun n_assign
=(node
)
2226 redef fun visit_all
(v
: Visitor)
2228 v
.enter_visit
(_n_obra
)
2229 v
.enter_visit
(_n_cbra
)
2230 v
.enter_visit
(_n_assign
)
2235 n_qualified
: nullable AQualified,
2239 _n_qualified
= n_qualified
2240 if n_qualified
!= null then n_qualified
.parent
= self
2241 _n_id
= n_id
.as(not null)
2245 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2247 if _n_qualified
== old_child
then
2248 n_qualified
= new_child
.as(nullable AQualified)
2251 if _n_id
== old_child
then
2252 n_id
= new_child
.as(TId)
2257 redef fun n_qualified
=(node
)
2260 if node
!= null then node
.parent
= self
2262 redef fun n_id
=(node
)
2269 redef fun visit_all
(v
: Visitor)
2271 v
.enter_visit
(_n_qualified
)
2272 v
.enter_visit
(_n_id
)
2275 redef class ASignature
2276 init init_asignature
(
2277 n_opar
: nullable TOpar,
2278 n_params
: Collection[Object], # Should be Collection[AParam]
2279 n_cpar
: nullable TCpar,
2280 n_type
: nullable AType
2284 if n_opar
!= null then n_opar
.parent
= self
2285 self.n_params
.unsafe_add_all
(n_params
)
2287 if n_cpar
!= null then n_cpar
.parent
= self
2289 if n_type
!= null then n_type
.parent
= self
2292 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2294 if _n_opar
== old_child
then
2295 n_opar
= new_child
.as(nullable TOpar)
2298 if n_params
.replace_child
(old_child
, new_child
) then return
2299 if _n_cpar
== old_child
then
2300 n_cpar
= new_child
.as(nullable TCpar)
2303 if _n_type
== old_child
then
2304 n_type
= new_child
.as(nullable AType)
2309 redef fun n_opar
=(node
)
2312 if node
!= null then node
.parent
= self
2314 redef fun n_cpar
=(node
)
2317 if node
!= null then node
.parent
= self
2319 redef fun n_type
=(node
)
2322 if node
!= null then node
.parent
= self
2326 redef fun visit_all
(v
: Visitor)
2328 v
.enter_visit
(_n_opar
)
2329 n_params
.visit_all
(v
)
2330 v
.enter_visit
(_n_cpar
)
2331 v
.enter_visit
(_n_type
)
2337 n_type
: nullable AType,
2338 n_dotdotdot
: nullable TDotdotdot,
2339 n_annotations
: nullable AAnnotations
2342 _n_id
= n_id
.as(not null)
2345 if n_type
!= null then n_type
.parent
= self
2346 _n_dotdotdot
= n_dotdotdot
2347 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2348 _n_annotations
= n_annotations
2349 if n_annotations
!= null then n_annotations
.parent
= self
2352 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2354 if _n_id
== old_child
then
2355 n_id
= new_child
.as(TId)
2358 if _n_type
== old_child
then
2359 n_type
= new_child
.as(nullable AType)
2362 if _n_dotdotdot
== old_child
then
2363 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2366 if _n_annotations
== old_child
then
2367 n_annotations
= new_child
.as(nullable AAnnotations)
2372 redef fun n_id
=(node
)
2377 redef fun n_type
=(node
)
2380 if node
!= null then node
.parent
= self
2382 redef fun n_dotdotdot
=(node
)
2385 if node
!= null then node
.parent
= self
2387 redef fun n_annotations
=(node
)
2389 _n_annotations
= node
2390 if node
!= null then node
.parent
= self
2394 redef fun visit_all
(v
: Visitor)
2396 v
.enter_visit
(_n_id
)
2397 v
.enter_visit
(_n_type
)
2398 v
.enter_visit
(_n_dotdotdot
)
2399 v
.enter_visit
(_n_annotations
)
2404 n_kwnullable
: nullable TKwnullable,
2405 n_id
: nullable TClassid,
2406 n_obra
: nullable TObra,
2407 n_types
: Collection[Object], # Should be Collection[AType]
2408 n_cbra
: nullable TCbra,
2409 n_annotations
: nullable AAnnotations
2412 _n_kwnullable
= n_kwnullable
2413 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2414 _n_id
= n_id
.as(not null)
2417 if n_obra
!= null then n_obra
.parent
= self
2418 self.n_types
.unsafe_add_all
(n_types
)
2420 if n_cbra
!= null then n_cbra
.parent
= self
2421 _n_annotations
= n_annotations
2422 if n_annotations
!= null then n_annotations
.parent
= self
2425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2427 if _n_kwnullable
== old_child
then
2428 n_kwnullable
= new_child
.as(nullable TKwnullable)
2431 if _n_id
== old_child
then
2432 n_id
= new_child
.as(TClassid)
2435 if _n_obra
== old_child
then
2436 n_obra
= new_child
.as(nullable TObra)
2439 if n_types
.replace_child
(old_child
, new_child
) then return
2440 if _n_cbra
== old_child
then
2441 n_cbra
= new_child
.as(nullable TCbra)
2444 if _n_annotations
== old_child
then
2445 n_annotations
= new_child
.as(nullable AAnnotations)
2450 redef fun n_kwnullable
=(node
)
2452 _n_kwnullable
= node
2453 if node
!= null then node
.parent
= self
2455 redef fun n_id
=(node
)
2460 redef fun n_obra
=(node
)
2463 if node
!= null then node
.parent
= self
2465 redef fun n_cbra
=(node
)
2468 if node
!= null then node
.parent
= self
2470 redef fun n_annotations
=(node
)
2472 _n_annotations
= node
2473 if node
!= null then node
.parent
= self
2477 redef fun visit_all
(v
: Visitor)
2479 v
.enter_visit
(_n_kwnullable
)
2480 v
.enter_visit
(_n_id
)
2481 v
.enter_visit
(_n_obra
)
2482 n_types
.visit_all
(v
)
2483 v
.enter_visit
(_n_cbra
)
2484 v
.enter_visit
(_n_annotations
)
2489 n_kwlabel
: nullable TKwlabel,
2493 _n_kwlabel
= n_kwlabel
.as(not null)
2494 n_kwlabel
.parent
= self
2496 if n_id
!= null then n_id
.parent
= self
2499 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2501 if _n_kwlabel
== old_child
then
2502 n_kwlabel
= new_child
.as(TKwlabel)
2505 if _n_id
== old_child
then
2506 n_id
= new_child
.as(nullable TId)
2511 redef fun n_kwlabel
=(node
)
2516 redef fun n_id
=(node
)
2519 if node
!= null then node
.parent
= self
2523 redef fun visit_all
(v
: Visitor)
2525 v
.enter_visit
(_n_kwlabel
)
2526 v
.enter_visit
(_n_id
)
2529 redef class ABlockExpr
2530 init init_ablockexpr
(
2531 n_expr
: Collection[Object], # Should be Collection[AExpr]
2532 n_kwend
: nullable TKwend
2535 self.n_expr
.unsafe_add_all
(n_expr
)
2537 if n_kwend
!= null then n_kwend
.parent
= self
2540 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2542 if n_expr
.replace_child
(old_child
, new_child
) then return
2543 if _n_kwend
== old_child
then
2544 n_kwend
= new_child
.as(nullable TKwend)
2549 redef fun n_kwend
=(node
)
2552 if node
!= null then node
.parent
= self
2556 redef fun visit_all
(v
: Visitor)
2559 v
.enter_visit
(_n_kwend
)
2562 redef class AVardeclExpr
2563 init init_avardeclexpr
(
2564 n_kwvar
: nullable TKwvar,
2566 n_type
: nullable AType,
2567 n_assign
: nullable TAssign,
2568 n_expr
: nullable AExpr,
2569 n_annotations
: nullable AAnnotations
2573 if n_kwvar
!= null then n_kwvar
.parent
= self
2574 _n_id
= n_id
.as(not null)
2577 if n_type
!= null then n_type
.parent
= self
2578 _n_assign
= n_assign
2579 if n_assign
!= null then n_assign
.parent
= self
2581 if n_expr
!= null then n_expr
.parent
= self
2582 _n_annotations
= n_annotations
2583 if n_annotations
!= null then n_annotations
.parent
= self
2586 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2588 if _n_kwvar
== old_child
then
2589 n_kwvar
= new_child
.as(nullable TKwvar)
2592 if _n_id
== old_child
then
2593 n_id
= new_child
.as(TId)
2596 if _n_type
== old_child
then
2597 n_type
= new_child
.as(nullable AType)
2600 if _n_assign
== old_child
then
2601 n_assign
= new_child
.as(nullable TAssign)
2604 if _n_expr
== old_child
then
2605 n_expr
= new_child
.as(nullable AExpr)
2608 if _n_annotations
== old_child
then
2609 n_annotations
= new_child
.as(nullable AAnnotations)
2614 redef fun n_kwvar
=(node
)
2617 if node
!= null then node
.parent
= self
2619 redef fun n_id
=(node
)
2624 redef fun n_type
=(node
)
2627 if node
!= null then node
.parent
= self
2629 redef fun n_assign
=(node
)
2632 if node
!= null then node
.parent
= self
2634 redef fun n_expr
=(node
)
2637 if node
!= null then node
.parent
= self
2639 redef fun n_annotations
=(node
)
2641 _n_annotations
= node
2642 if node
!= null then node
.parent
= self
2646 redef fun visit_all
(v
: Visitor)
2648 v
.enter_visit
(_n_kwvar
)
2649 v
.enter_visit
(_n_id
)
2650 v
.enter_visit
(_n_type
)
2651 v
.enter_visit
(_n_assign
)
2652 v
.enter_visit
(_n_expr
)
2653 v
.enter_visit
(_n_annotations
)
2656 redef class AReturnExpr
2657 init init_areturnexpr
(
2658 n_kwreturn
: nullable TKwreturn,
2659 n_expr
: nullable AExpr
2662 _n_kwreturn
= n_kwreturn
2663 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2665 if n_expr
!= null then n_expr
.parent
= self
2668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2670 if _n_kwreturn
== old_child
then
2671 n_kwreturn
= new_child
.as(nullable TKwreturn)
2674 if _n_expr
== old_child
then
2675 n_expr
= new_child
.as(nullable AExpr)
2680 redef fun n_kwreturn
=(node
)
2683 if node
!= null then node
.parent
= self
2685 redef fun n_expr
=(node
)
2688 if node
!= null then node
.parent
= self
2692 redef fun visit_all
(v
: Visitor)
2694 v
.enter_visit
(_n_kwreturn
)
2695 v
.enter_visit
(_n_expr
)
2698 redef class ABreakExpr
2699 init init_abreakexpr
(
2700 n_kwbreak
: nullable TKwbreak,
2701 n_label
: nullable ALabel
2704 _n_kwbreak
= n_kwbreak
.as(not null)
2705 n_kwbreak
.parent
= self
2707 if n_label
!= null then n_label
.parent
= self
2710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2712 if _n_kwbreak
== old_child
then
2713 n_kwbreak
= new_child
.as(TKwbreak)
2716 if _n_label
== old_child
then
2717 n_label
= new_child
.as(nullable ALabel)
2722 redef fun n_kwbreak
=(node
)
2727 redef fun n_label
=(node
)
2730 if node
!= null then node
.parent
= self
2734 redef fun visit_all
(v
: Visitor)
2736 v
.enter_visit
(_n_kwbreak
)
2737 v
.enter_visit
(_n_label
)
2740 redef class AAbortExpr
2741 init init_aabortexpr
(
2742 n_kwabort
: nullable TKwabort
2745 _n_kwabort
= n_kwabort
.as(not null)
2746 n_kwabort
.parent
= self
2749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2751 if _n_kwabort
== old_child
then
2752 n_kwabort
= new_child
.as(TKwabort)
2757 redef fun n_kwabort
=(node
)
2764 redef fun visit_all
(v
: Visitor)
2766 v
.enter_visit
(_n_kwabort
)
2769 redef class AContinueExpr
2770 init init_acontinueexpr
(
2771 n_kwcontinue
: nullable TKwcontinue,
2772 n_label
: nullable ALabel
2775 _n_kwcontinue
= n_kwcontinue
2776 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2778 if n_label
!= null then n_label
.parent
= self
2781 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2783 if _n_kwcontinue
== old_child
then
2784 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2787 if _n_label
== old_child
then
2788 n_label
= new_child
.as(nullable ALabel)
2793 redef fun n_kwcontinue
=(node
)
2795 _n_kwcontinue
= node
2796 if node
!= null then node
.parent
= self
2798 redef fun n_label
=(node
)
2801 if node
!= null then node
.parent
= self
2805 redef fun visit_all
(v
: Visitor)
2807 v
.enter_visit
(_n_kwcontinue
)
2808 v
.enter_visit
(_n_label
)
2813 n_kwdo
: nullable TKwdo,
2814 n_block
: nullable AExpr,
2815 n_label
: nullable ALabel
2818 _n_kwdo
= n_kwdo
.as(not null)
2819 n_kwdo
.parent
= self
2821 if n_block
!= null then n_block
.parent
= self
2823 if n_label
!= null then n_label
.parent
= self
2826 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2828 if _n_kwdo
== old_child
then
2829 n_kwdo
= new_child
.as(TKwdo)
2832 if _n_block
== old_child
then
2833 n_block
= new_child
.as(nullable AExpr)
2836 if _n_label
== old_child
then
2837 n_label
= new_child
.as(nullable ALabel)
2842 redef fun n_kwdo
=(node
)
2847 redef fun n_block
=(node
)
2850 if node
!= null then node
.parent
= self
2852 redef fun n_label
=(node
)
2855 if node
!= null then node
.parent
= self
2859 redef fun visit_all
(v
: Visitor)
2861 v
.enter_visit
(_n_kwdo
)
2862 v
.enter_visit
(_n_block
)
2863 v
.enter_visit
(_n_label
)
2868 n_kwif
: nullable TKwif,
2869 n_expr
: nullable AExpr,
2870 n_kwthen
: nullable TKwthen,
2871 n_then
: nullable AExpr,
2872 n_kwelse
: nullable TKwelse,
2873 n_else
: nullable AExpr
2876 _n_kwif
= n_kwif
.as(not null)
2877 n_kwif
.parent
= self
2878 _n_expr
= n_expr
.as(not null)
2879 n_expr
.parent
= self
2880 _n_kwthen
= n_kwthen
.as(not null)
2881 n_kwthen
.parent
= self
2883 if n_then
!= null then n_then
.parent
= self
2884 _n_kwelse
= n_kwelse
2885 if n_kwelse
!= null then n_kwelse
.parent
= self
2887 if n_else
!= null then n_else
.parent
= self
2890 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2892 if _n_kwif
== old_child
then
2893 n_kwif
= new_child
.as(TKwif)
2896 if _n_expr
== old_child
then
2897 n_expr
= new_child
.as(AExpr)
2900 if _n_kwthen
== old_child
then
2901 n_kwthen
= new_child
.as(TKwthen)
2904 if _n_then
== old_child
then
2905 n_then
= new_child
.as(nullable AExpr)
2908 if _n_kwelse
== old_child
then
2909 n_kwelse
= new_child
.as(nullable TKwelse)
2912 if _n_else
== old_child
then
2913 n_else
= new_child
.as(nullable AExpr)
2918 redef fun n_kwif
=(node
)
2923 redef fun n_expr
=(node
)
2928 redef fun n_kwthen
=(node
)
2933 redef fun n_then
=(node
)
2936 if node
!= null then node
.parent
= self
2938 redef fun n_kwelse
=(node
)
2941 if node
!= null then node
.parent
= self
2943 redef fun n_else
=(node
)
2946 if node
!= null then node
.parent
= self
2950 redef fun visit_all
(v
: Visitor)
2952 v
.enter_visit
(_n_kwif
)
2953 v
.enter_visit
(_n_expr
)
2954 v
.enter_visit
(_n_kwthen
)
2955 v
.enter_visit
(_n_then
)
2956 v
.enter_visit
(_n_kwelse
)
2957 v
.enter_visit
(_n_else
)
2960 redef class AIfexprExpr
2961 init init_aifexprexpr
(
2962 n_kwif
: nullable TKwif,
2963 n_expr
: nullable AExpr,
2964 n_kwthen
: nullable TKwthen,
2965 n_then
: nullable AExpr,
2966 n_kwelse
: nullable TKwelse,
2967 n_else
: nullable AExpr
2970 _n_kwif
= n_kwif
.as(not null)
2971 n_kwif
.parent
= self
2972 _n_expr
= n_expr
.as(not null)
2973 n_expr
.parent
= self
2974 _n_kwthen
= n_kwthen
.as(not null)
2975 n_kwthen
.parent
= self
2976 _n_then
= n_then
.as(not null)
2977 n_then
.parent
= self
2978 _n_kwelse
= n_kwelse
.as(not null)
2979 n_kwelse
.parent
= self
2980 _n_else
= n_else
.as(not null)
2981 n_else
.parent
= self
2984 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2986 if _n_kwif
== old_child
then
2987 n_kwif
= new_child
.as(TKwif)
2990 if _n_expr
== old_child
then
2991 n_expr
= new_child
.as(AExpr)
2994 if _n_kwthen
== old_child
then
2995 n_kwthen
= new_child
.as(TKwthen)
2998 if _n_then
== old_child
then
2999 n_then
= new_child
.as(AExpr)
3002 if _n_kwelse
== old_child
then
3003 n_kwelse
= new_child
.as(TKwelse)
3006 if _n_else
== old_child
then
3007 n_else
= new_child
.as(AExpr)
3012 redef fun n_kwif
=(node
)
3017 redef fun n_expr
=(node
)
3022 redef fun n_kwthen
=(node
)
3027 redef fun n_then
=(node
)
3032 redef fun n_kwelse
=(node
)
3037 redef fun n_else
=(node
)
3044 redef fun visit_all
(v
: Visitor)
3046 v
.enter_visit
(_n_kwif
)
3047 v
.enter_visit
(_n_expr
)
3048 v
.enter_visit
(_n_kwthen
)
3049 v
.enter_visit
(_n_then
)
3050 v
.enter_visit
(_n_kwelse
)
3051 v
.enter_visit
(_n_else
)
3054 redef class AWhileExpr
3055 init init_awhileexpr
(
3056 n_kwwhile
: nullable TKwwhile,
3057 n_expr
: nullable AExpr,
3058 n_kwdo
: nullable TKwdo,
3059 n_block
: nullable AExpr,
3060 n_label
: nullable ALabel
3063 _n_kwwhile
= n_kwwhile
.as(not null)
3064 n_kwwhile
.parent
= self
3065 _n_expr
= n_expr
.as(not null)
3066 n_expr
.parent
= self
3067 _n_kwdo
= n_kwdo
.as(not null)
3068 n_kwdo
.parent
= self
3070 if n_block
!= null then n_block
.parent
= self
3072 if n_label
!= null then n_label
.parent
= self
3075 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3077 if _n_kwwhile
== old_child
then
3078 n_kwwhile
= new_child
.as(TKwwhile)
3081 if _n_expr
== old_child
then
3082 n_expr
= new_child
.as(AExpr)
3085 if _n_kwdo
== old_child
then
3086 n_kwdo
= new_child
.as(TKwdo)
3089 if _n_block
== old_child
then
3090 n_block
= new_child
.as(nullable AExpr)
3093 if _n_label
== old_child
then
3094 n_label
= new_child
.as(nullable ALabel)
3099 redef fun n_kwwhile
=(node
)
3104 redef fun n_expr
=(node
)
3109 redef fun n_kwdo
=(node
)
3114 redef fun n_block
=(node
)
3117 if node
!= null then node
.parent
= self
3119 redef fun n_label
=(node
)
3122 if node
!= null then node
.parent
= self
3126 redef fun visit_all
(v
: Visitor)
3128 v
.enter_visit
(_n_kwwhile
)
3129 v
.enter_visit
(_n_expr
)
3130 v
.enter_visit
(_n_kwdo
)
3131 v
.enter_visit
(_n_block
)
3132 v
.enter_visit
(_n_label
)
3135 redef class ALoopExpr
3136 init init_aloopexpr
(
3137 n_kwloop
: nullable TKwloop,
3138 n_block
: nullable AExpr,
3139 n_label
: nullable ALabel
3142 _n_kwloop
= n_kwloop
.as(not null)
3143 n_kwloop
.parent
= self
3145 if n_block
!= null then n_block
.parent
= self
3147 if n_label
!= null then n_label
.parent
= self
3150 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3152 if _n_kwloop
== old_child
then
3153 n_kwloop
= new_child
.as(TKwloop)
3156 if _n_block
== old_child
then
3157 n_block
= new_child
.as(nullable AExpr)
3160 if _n_label
== old_child
then
3161 n_label
= new_child
.as(nullable ALabel)
3166 redef fun n_kwloop
=(node
)
3171 redef fun n_block
=(node
)
3174 if node
!= null then node
.parent
= self
3176 redef fun n_label
=(node
)
3179 if node
!= null then node
.parent
= self
3183 redef fun visit_all
(v
: Visitor)
3185 v
.enter_visit
(_n_kwloop
)
3186 v
.enter_visit
(_n_block
)
3187 v
.enter_visit
(_n_label
)
3190 redef class AForExpr
3191 init init_aforexpr
(
3192 n_kwfor
: nullable TKwfor,
3193 n_ids
: Collection[Object], # Should be Collection[TId]
3194 n_kwin
: nullable TKwin,
3195 n_expr
: nullable AExpr,
3196 n_kwdo
: nullable TKwdo,
3197 n_block
: nullable AExpr,
3198 n_label
: nullable ALabel
3201 _n_kwfor
= n_kwfor
.as(not null)
3202 n_kwfor
.parent
= self
3203 self.n_ids
.unsafe_add_all
(n_ids
)
3204 _n_kwin
= n_kwin
.as(not null)
3205 n_kwin
.parent
= self
3206 _n_expr
= n_expr
.as(not null)
3207 n_expr
.parent
= self
3208 _n_kwdo
= n_kwdo
.as(not null)
3209 n_kwdo
.parent
= self
3211 if n_block
!= null then n_block
.parent
= self
3213 if n_label
!= null then n_label
.parent
= self
3216 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3218 if _n_kwfor
== old_child
then
3219 n_kwfor
= new_child
.as(TKwfor)
3222 if n_ids
.replace_child
(old_child
, new_child
) then return
3223 if _n_kwin
== old_child
then
3224 n_kwin
= new_child
.as(TKwin)
3227 if _n_expr
== old_child
then
3228 n_expr
= new_child
.as(AExpr)
3231 if _n_kwdo
== old_child
then
3232 n_kwdo
= new_child
.as(TKwdo)
3235 if _n_block
== old_child
then
3236 n_block
= new_child
.as(nullable AExpr)
3239 if _n_label
== old_child
then
3240 n_label
= new_child
.as(nullable ALabel)
3245 redef fun n_kwfor
=(node
)
3250 redef fun n_kwin
=(node
)
3255 redef fun n_expr
=(node
)
3260 redef fun n_kwdo
=(node
)
3265 redef fun n_block
=(node
)
3268 if node
!= null then node
.parent
= self
3270 redef fun n_label
=(node
)
3273 if node
!= null then node
.parent
= self
3277 redef fun visit_all
(v
: Visitor)
3279 v
.enter_visit
(_n_kwfor
)
3281 v
.enter_visit
(_n_kwin
)
3282 v
.enter_visit
(_n_expr
)
3283 v
.enter_visit
(_n_kwdo
)
3284 v
.enter_visit
(_n_block
)
3285 v
.enter_visit
(_n_label
)
3288 redef class AWithExpr
3289 init init_awithexpr
(
3290 n_kwwith
: nullable TKwwith,
3291 n_expr
: nullable AExpr,
3292 n_kwdo
: nullable TKwdo,
3293 n_block
: nullable AExpr,
3294 n_label
: nullable ALabel
3297 _n_kwwith
= n_kwwith
.as(not null)
3298 n_kwwith
.parent
= self
3299 _n_expr
= n_expr
.as(not null)
3300 n_expr
.parent
= self
3301 _n_kwdo
= n_kwdo
.as(not null)
3302 n_kwdo
.parent
= self
3304 if n_block
!= null then n_block
.parent
= self
3306 if n_label
!= null then n_label
.parent
= self
3309 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3311 if _n_kwwith
== old_child
then
3312 n_kwwith
= new_child
.as(TKwwith)
3315 if _n_expr
== old_child
then
3316 n_expr
= new_child
.as(AExpr)
3319 if _n_kwdo
== old_child
then
3320 n_kwdo
= new_child
.as(TKwdo)
3323 if _n_block
== old_child
then
3324 n_block
= new_child
.as(nullable AExpr)
3327 if _n_label
== old_child
then
3328 n_label
= new_child
.as(nullable ALabel)
3333 redef fun n_kwwith
=(node
)
3338 redef fun n_expr
=(node
)
3343 redef fun n_kwdo
=(node
)
3348 redef fun n_block
=(node
)
3351 if node
!= null then node
.parent
= self
3353 redef fun n_label
=(node
)
3356 if node
!= null then node
.parent
= self
3360 redef fun visit_all
(v
: Visitor)
3362 v
.enter_visit
(_n_kwwith
)
3363 v
.enter_visit
(_n_expr
)
3364 v
.enter_visit
(_n_kwdo
)
3365 v
.enter_visit
(_n_block
)
3366 v
.enter_visit
(_n_label
)
3369 redef class AAssertExpr
3370 init init_aassertexpr
(
3371 n_kwassert
: nullable TKwassert,
3373 n_expr
: nullable AExpr,
3374 n_kwelse
: nullable TKwelse,
3375 n_else
: nullable AExpr
3378 _n_kwassert
= n_kwassert
.as(not null)
3379 n_kwassert
.parent
= self
3381 if n_id
!= null then n_id
.parent
= self
3382 _n_expr
= n_expr
.as(not null)
3383 n_expr
.parent
= self
3384 _n_kwelse
= n_kwelse
3385 if n_kwelse
!= null then n_kwelse
.parent
= self
3387 if n_else
!= null then n_else
.parent
= self
3390 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3392 if _n_kwassert
== old_child
then
3393 n_kwassert
= new_child
.as(TKwassert)
3396 if _n_id
== old_child
then
3397 n_id
= new_child
.as(nullable TId)
3400 if _n_expr
== old_child
then
3401 n_expr
= new_child
.as(AExpr)
3404 if _n_kwelse
== old_child
then
3405 n_kwelse
= new_child
.as(nullable TKwelse)
3408 if _n_else
== old_child
then
3409 n_else
= new_child
.as(nullable AExpr)
3414 redef fun n_kwassert
=(node
)
3419 redef fun n_id
=(node
)
3422 if node
!= null then node
.parent
= self
3424 redef fun n_expr
=(node
)
3429 redef fun n_kwelse
=(node
)
3432 if node
!= null then node
.parent
= self
3434 redef fun n_else
=(node
)
3437 if node
!= null then node
.parent
= self
3441 redef fun visit_all
(v
: Visitor)
3443 v
.enter_visit
(_n_kwassert
)
3444 v
.enter_visit
(_n_id
)
3445 v
.enter_visit
(_n_expr
)
3446 v
.enter_visit
(_n_kwelse
)
3447 v
.enter_visit
(_n_else
)
3450 redef class AOnceExpr
3451 init init_aonceexpr
(
3452 n_kwonce
: nullable TKwonce,
3453 n_expr
: nullable AExpr
3456 _n_kwonce
= n_kwonce
.as(not null)
3457 n_kwonce
.parent
= self
3458 _n_expr
= n_expr
.as(not null)
3459 n_expr
.parent
= self
3462 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3464 if _n_kwonce
== old_child
then
3465 n_kwonce
= new_child
.as(TKwonce)
3468 if _n_expr
== old_child
then
3469 n_expr
= new_child
.as(AExpr)
3474 redef fun n_kwonce
=(node
)
3479 redef fun n_expr
=(node
)
3486 redef fun visit_all
(v
: Visitor)
3488 v
.enter_visit
(_n_kwonce
)
3489 v
.enter_visit
(_n_expr
)
3492 redef class ASendExpr
3493 init init_asendexpr
(
3494 n_expr
: nullable AExpr
3497 _n_expr
= n_expr
.as(not null)
3498 n_expr
.parent
= self
3501 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3503 if _n_expr
== old_child
then
3504 n_expr
= new_child
.as(AExpr)
3509 redef fun n_expr
=(node
)
3516 redef fun visit_all
(v
: Visitor)
3518 v
.enter_visit
(_n_expr
)
3521 redef class ABinopExpr
3522 init init_abinopexpr
(
3523 n_expr
: nullable AExpr,
3524 n_expr2
: nullable AExpr
3527 _n_expr
= n_expr
.as(not null)
3528 n_expr
.parent
= self
3529 _n_expr2
= n_expr2
.as(not null)
3530 n_expr2
.parent
= self
3533 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3535 if _n_expr
== old_child
then
3536 n_expr
= new_child
.as(AExpr)
3539 if _n_expr2
== old_child
then
3540 n_expr2
= new_child
.as(AExpr)
3545 redef fun n_expr
=(node
)
3550 redef fun n_expr2
=(node
)
3557 redef fun visit_all
(v
: Visitor)
3559 v
.enter_visit
(_n_expr
)
3560 v
.enter_visit
(_n_expr2
)
3565 n_expr
: nullable AExpr,
3566 n_op
: nullable TKwor,
3567 n_expr2
: nullable AExpr
3570 _n_expr
= n_expr
.as(not null)
3571 n_expr
.parent
= self
3572 _n_op
= n_op
.as(not null)
3574 _n_expr2
= n_expr2
.as(not null)
3575 n_expr2
.parent
= self
3578 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3580 if _n_expr
== old_child
then
3581 n_expr
= new_child
.as(AExpr)
3584 if _n_op
== old_child
then
3585 n_op
= new_child
.as(TKwor)
3588 if _n_expr2
== old_child
then
3589 n_expr2
= new_child
.as(AExpr)
3594 redef fun n_expr
=(node
)
3599 redef fun n_op
=(node
)
3604 redef fun n_expr2
=(node
)
3611 redef fun visit_all
(v
: Visitor)
3613 v
.enter_visit
(_n_expr
)
3614 v
.enter_visit
(_n_op
)
3615 v
.enter_visit
(_n_expr2
)
3618 redef class AAndExpr
3619 init init_aandexpr
(
3620 n_expr
: nullable AExpr,
3621 n_op
: nullable TKwand,
3622 n_expr2
: nullable AExpr
3625 _n_expr
= n_expr
.as(not null)
3626 n_expr
.parent
= self
3627 _n_op
= n_op
.as(not null)
3629 _n_expr2
= n_expr2
.as(not null)
3630 n_expr2
.parent
= self
3633 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3635 if _n_expr
== old_child
then
3636 n_expr
= new_child
.as(AExpr)
3639 if _n_op
== old_child
then
3640 n_op
= new_child
.as(TKwand)
3643 if _n_expr2
== old_child
then
3644 n_expr2
= new_child
.as(AExpr)
3649 redef fun n_expr
=(node
)
3654 redef fun n_op
=(node
)
3659 redef fun n_expr2
=(node
)
3666 redef fun visit_all
(v
: Visitor)
3668 v
.enter_visit
(_n_expr
)
3669 v
.enter_visit
(_n_op
)
3670 v
.enter_visit
(_n_expr2
)
3673 redef class AOrElseExpr
3674 init init_aorelseexpr
(
3675 n_expr
: nullable AExpr,
3676 n_op
: nullable TKwor,
3677 n_kwelse
: nullable TKwelse,
3678 n_expr2
: nullable AExpr
3681 _n_expr
= n_expr
.as(not null)
3682 n_expr
.parent
= self
3683 _n_op
= n_op
.as(not null)
3685 _n_kwelse
= n_kwelse
.as(not null)
3686 n_kwelse
.parent
= self
3687 _n_expr2
= n_expr2
.as(not null)
3688 n_expr2
.parent
= self
3691 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3693 if _n_expr
== old_child
then
3694 n_expr
= new_child
.as(AExpr)
3697 if _n_op
== old_child
then
3698 n_op
= new_child
.as(TKwor)
3701 if _n_kwelse
== old_child
then
3702 n_kwelse
= new_child
.as(TKwelse)
3705 if _n_expr2
== old_child
then
3706 n_expr2
= new_child
.as(AExpr)
3711 redef fun n_expr
=(node
)
3716 redef fun n_op
=(node
)
3721 redef fun n_kwelse
=(node
)
3726 redef fun n_expr2
=(node
)
3733 redef fun visit_all
(v
: Visitor)
3735 v
.enter_visit
(_n_expr
)
3736 v
.enter_visit
(_n_op
)
3737 v
.enter_visit
(_n_kwelse
)
3738 v
.enter_visit
(_n_expr2
)
3741 redef class AImpliesExpr
3742 init init_aimpliesexpr
(
3743 n_expr
: nullable AExpr,
3744 n_op
: nullable TKwimplies,
3745 n_expr2
: nullable AExpr
3748 _n_expr
= n_expr
.as(not null)
3749 n_expr
.parent
= self
3750 _n_op
= n_op
.as(not null)
3752 _n_expr2
= n_expr2
.as(not null)
3753 n_expr2
.parent
= self
3756 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3758 if _n_expr
== old_child
then
3759 n_expr
= new_child
.as(AExpr)
3762 if _n_op
== old_child
then
3763 n_op
= new_child
.as(TKwimplies)
3766 if _n_expr2
== old_child
then
3767 n_expr2
= new_child
.as(AExpr)
3772 redef fun n_expr
=(node
)
3777 redef fun n_op
=(node
)
3782 redef fun n_expr2
=(node
)
3789 redef fun visit_all
(v
: Visitor)
3791 v
.enter_visit
(_n_expr
)
3792 v
.enter_visit
(_n_op
)
3793 v
.enter_visit
(_n_expr2
)
3796 redef class ANotExpr
3797 init init_anotexpr
(
3798 n_kwnot
: nullable TKwnot,
3799 n_expr
: nullable AExpr
3802 _n_kwnot
= n_kwnot
.as(not null)
3803 n_kwnot
.parent
= self
3804 _n_expr
= n_expr
.as(not null)
3805 n_expr
.parent
= self
3808 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3810 if _n_kwnot
== old_child
then
3811 n_kwnot
= new_child
.as(TKwnot)
3814 if _n_expr
== old_child
then
3815 n_expr
= new_child
.as(AExpr)
3820 redef fun n_kwnot
=(node
)
3825 redef fun n_expr
=(node
)
3832 redef fun visit_all
(v
: Visitor)
3834 v
.enter_visit
(_n_kwnot
)
3835 v
.enter_visit
(_n_expr
)
3840 n_expr
: nullable AExpr,
3842 n_expr2
: nullable AExpr
3845 _n_expr
= n_expr
.as(not null)
3846 n_expr
.parent
= self
3847 _n_op
= n_op
.as(not null)
3849 _n_expr2
= n_expr2
.as(not null)
3850 n_expr2
.parent
= self
3853 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3855 if _n_expr
== old_child
then
3856 n_expr
= new_child
.as(AExpr)
3859 if _n_op
== old_child
then
3860 n_op
= new_child
.as(TEq)
3863 if _n_expr2
== old_child
then
3864 n_expr2
= new_child
.as(AExpr)
3869 redef fun n_expr
=(node
)
3874 redef fun n_op
=(node
)
3879 redef fun n_expr2
=(node
)
3886 redef fun visit_all
(v
: Visitor)
3888 v
.enter_visit
(_n_expr
)
3889 v
.enter_visit
(_n_op
)
3890 v
.enter_visit
(_n_expr2
)
3895 n_expr
: nullable AExpr,
3897 n_expr2
: nullable AExpr
3900 _n_expr
= n_expr
.as(not null)
3901 n_expr
.parent
= self
3902 _n_op
= n_op
.as(not null)
3904 _n_expr2
= n_expr2
.as(not null)
3905 n_expr2
.parent
= self
3908 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3910 if _n_expr
== old_child
then
3911 n_expr
= new_child
.as(AExpr)
3914 if _n_op
== old_child
then
3915 n_op
= new_child
.as(TNe)
3918 if _n_expr2
== old_child
then
3919 n_expr2
= new_child
.as(AExpr)
3924 redef fun n_expr
=(node
)
3929 redef fun n_op
=(node
)
3934 redef fun n_expr2
=(node
)
3941 redef fun visit_all
(v
: Visitor)
3943 v
.enter_visit
(_n_expr
)
3944 v
.enter_visit
(_n_op
)
3945 v
.enter_visit
(_n_expr2
)
3950 n_expr
: nullable AExpr,
3952 n_expr2
: nullable AExpr
3955 _n_expr
= n_expr
.as(not null)
3956 n_expr
.parent
= self
3957 _n_op
= n_op
.as(not null)
3959 _n_expr2
= n_expr2
.as(not null)
3960 n_expr2
.parent
= self
3963 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3965 if _n_expr
== old_child
then
3966 n_expr
= new_child
.as(AExpr)
3969 if _n_op
== old_child
then
3970 n_op
= new_child
.as(TLt)
3973 if _n_expr2
== old_child
then
3974 n_expr2
= new_child
.as(AExpr)
3979 redef fun n_expr
=(node
)
3984 redef fun n_op
=(node
)
3989 redef fun n_expr2
=(node
)
3996 redef fun visit_all
(v
: Visitor)
3998 v
.enter_visit
(_n_expr
)
3999 v
.enter_visit
(_n_op
)
4000 v
.enter_visit
(_n_expr2
)
4005 n_expr
: nullable AExpr,
4007 n_expr2
: nullable AExpr
4010 _n_expr
= n_expr
.as(not null)
4011 n_expr
.parent
= self
4012 _n_op
= n_op
.as(not null)
4014 _n_expr2
= n_expr2
.as(not null)
4015 n_expr2
.parent
= self
4018 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4020 if _n_expr
== old_child
then
4021 n_expr
= new_child
.as(AExpr)
4024 if _n_op
== old_child
then
4025 n_op
= new_child
.as(TLe)
4028 if _n_expr2
== old_child
then
4029 n_expr2
= new_child
.as(AExpr)
4034 redef fun n_expr
=(node
)
4039 redef fun n_op
=(node
)
4044 redef fun n_expr2
=(node
)
4051 redef fun visit_all
(v
: Visitor)
4053 v
.enter_visit
(_n_expr
)
4054 v
.enter_visit
(_n_op
)
4055 v
.enter_visit
(_n_expr2
)
4060 n_expr
: nullable AExpr,
4062 n_expr2
: nullable AExpr
4065 _n_expr
= n_expr
.as(not null)
4066 n_expr
.parent
= self
4067 _n_op
= n_op
.as(not null)
4069 _n_expr2
= n_expr2
.as(not null)
4070 n_expr2
.parent
= self
4073 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4075 if _n_expr
== old_child
then
4076 n_expr
= new_child
.as(AExpr)
4079 if _n_op
== old_child
then
4080 n_op
= new_child
.as(TLl)
4083 if _n_expr2
== old_child
then
4084 n_expr2
= new_child
.as(AExpr)
4089 redef fun n_expr
=(node
)
4094 redef fun n_op
=(node
)
4099 redef fun n_expr2
=(node
)
4106 redef fun visit_all
(v
: Visitor)
4108 v
.enter_visit
(_n_expr
)
4109 v
.enter_visit
(_n_op
)
4110 v
.enter_visit
(_n_expr2
)
4115 n_expr
: nullable AExpr,
4117 n_expr2
: nullable AExpr
4120 _n_expr
= n_expr
.as(not null)
4121 n_expr
.parent
= self
4122 _n_op
= n_op
.as(not null)
4124 _n_expr2
= n_expr2
.as(not null)
4125 n_expr2
.parent
= self
4128 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4130 if _n_expr
== old_child
then
4131 n_expr
= new_child
.as(AExpr)
4134 if _n_op
== old_child
then
4135 n_op
= new_child
.as(TGt)
4138 if _n_expr2
== old_child
then
4139 n_expr2
= new_child
.as(AExpr)
4144 redef fun n_expr
=(node
)
4149 redef fun n_op
=(node
)
4154 redef fun n_expr2
=(node
)
4161 redef fun visit_all
(v
: Visitor)
4163 v
.enter_visit
(_n_expr
)
4164 v
.enter_visit
(_n_op
)
4165 v
.enter_visit
(_n_expr2
)
4170 n_expr
: nullable AExpr,
4172 n_expr2
: nullable AExpr
4175 _n_expr
= n_expr
.as(not null)
4176 n_expr
.parent
= self
4177 _n_op
= n_op
.as(not null)
4179 _n_expr2
= n_expr2
.as(not null)
4180 n_expr2
.parent
= self
4183 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4185 if _n_expr
== old_child
then
4186 n_expr
= new_child
.as(AExpr)
4189 if _n_op
== old_child
then
4190 n_op
= new_child
.as(TGe)
4193 if _n_expr2
== old_child
then
4194 n_expr2
= new_child
.as(AExpr)
4199 redef fun n_expr
=(node
)
4204 redef fun n_op
=(node
)
4209 redef fun n_expr2
=(node
)
4216 redef fun visit_all
(v
: Visitor)
4218 v
.enter_visit
(_n_expr
)
4219 v
.enter_visit
(_n_op
)
4220 v
.enter_visit
(_n_expr2
)
4225 n_expr
: nullable AExpr,
4227 n_expr2
: nullable AExpr
4230 _n_expr
= n_expr
.as(not null)
4231 n_expr
.parent
= self
4232 _n_op
= n_op
.as(not null)
4234 _n_expr2
= n_expr2
.as(not null)
4235 n_expr2
.parent
= self
4238 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4240 if _n_expr
== old_child
then
4241 n_expr
= new_child
.as(AExpr)
4244 if _n_op
== old_child
then
4245 n_op
= new_child
.as(TGg)
4248 if _n_expr2
== old_child
then
4249 n_expr2
= new_child
.as(AExpr)
4254 redef fun n_expr
=(node
)
4259 redef fun n_op
=(node
)
4264 redef fun n_expr2
=(node
)
4271 redef fun visit_all
(v
: Visitor)
4273 v
.enter_visit
(_n_expr
)
4274 v
.enter_visit
(_n_op
)
4275 v
.enter_visit
(_n_expr2
)
4278 redef class AIsaExpr
4279 init init_aisaexpr
(
4280 n_expr
: nullable AExpr,
4281 n_kwisa
: nullable TKwisa,
4282 n_type
: nullable AType
4285 _n_expr
= n_expr
.as(not null)
4286 n_expr
.parent
= self
4287 _n_kwisa
= n_kwisa
.as(not null)
4288 n_kwisa
.parent
= self
4289 _n_type
= n_type
.as(not null)
4290 n_type
.parent
= self
4293 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4295 if _n_expr
== old_child
then
4296 n_expr
= new_child
.as(AExpr)
4299 if _n_kwisa
== old_child
then
4300 n_kwisa
= new_child
.as(TKwisa)
4303 if _n_type
== old_child
then
4304 n_type
= new_child
.as(AType)
4309 redef fun n_expr
=(node
)
4314 redef fun n_kwisa
=(node
)
4319 redef fun n_type
=(node
)
4326 redef fun visit_all
(v
: Visitor)
4328 v
.enter_visit
(_n_expr
)
4329 v
.enter_visit
(_n_kwisa
)
4330 v
.enter_visit
(_n_type
)
4333 redef class APlusExpr
4334 init init_aplusexpr
(
4335 n_expr
: nullable AExpr,
4336 n_op
: nullable TPlus,
4337 n_expr2
: nullable AExpr
4340 _n_expr
= n_expr
.as(not null)
4341 n_expr
.parent
= self
4342 _n_op
= n_op
.as(not null)
4344 _n_expr2
= n_expr2
.as(not null)
4345 n_expr2
.parent
= self
4348 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4350 if _n_expr
== old_child
then
4351 n_expr
= new_child
.as(AExpr)
4354 if _n_op
== old_child
then
4355 n_op
= new_child
.as(TPlus)
4358 if _n_expr2
== old_child
then
4359 n_expr2
= new_child
.as(AExpr)
4364 redef fun n_expr
=(node
)
4369 redef fun n_op
=(node
)
4374 redef fun n_expr2
=(node
)
4381 redef fun visit_all
(v
: Visitor)
4383 v
.enter_visit
(_n_expr
)
4384 v
.enter_visit
(_n_op
)
4385 v
.enter_visit
(_n_expr2
)
4388 redef class AMinusExpr
4389 init init_aminusexpr
(
4390 n_expr
: nullable AExpr,
4391 n_op
: nullable TMinus,
4392 n_expr2
: nullable AExpr
4395 _n_expr
= n_expr
.as(not null)
4396 n_expr
.parent
= self
4397 _n_op
= n_op
.as(not null)
4399 _n_expr2
= n_expr2
.as(not null)
4400 n_expr2
.parent
= self
4403 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4405 if _n_expr
== old_child
then
4406 n_expr
= new_child
.as(AExpr)
4409 if _n_op
== old_child
then
4410 n_op
= new_child
.as(TMinus)
4413 if _n_expr2
== old_child
then
4414 n_expr2
= new_child
.as(AExpr)
4419 redef fun n_expr
=(node
)
4424 redef fun n_op
=(node
)
4429 redef fun n_expr2
=(node
)
4436 redef fun visit_all
(v
: Visitor)
4438 v
.enter_visit
(_n_expr
)
4439 v
.enter_visit
(_n_op
)
4440 v
.enter_visit
(_n_expr2
)
4443 redef class AStarshipExpr
4444 init init_astarshipexpr
(
4445 n_expr
: nullable AExpr,
4446 n_op
: nullable TStarship,
4447 n_expr2
: nullable AExpr
4450 _n_expr
= n_expr
.as(not null)
4451 n_expr
.parent
= self
4452 _n_op
= n_op
.as(not null)
4454 _n_expr2
= n_expr2
.as(not null)
4455 n_expr2
.parent
= self
4458 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4460 if _n_expr
== old_child
then
4461 n_expr
= new_child
.as(AExpr)
4464 if _n_op
== old_child
then
4465 n_op
= new_child
.as(TStarship)
4468 if _n_expr2
== old_child
then
4469 n_expr2
= new_child
.as(AExpr)
4474 redef fun n_expr
=(node
)
4479 redef fun n_op
=(node
)
4484 redef fun n_expr2
=(node
)
4491 redef fun visit_all
(v
: Visitor)
4493 v
.enter_visit
(_n_expr
)
4494 v
.enter_visit
(_n_op
)
4495 v
.enter_visit
(_n_expr2
)
4498 redef class AStarExpr
4499 init init_astarexpr
(
4500 n_expr
: nullable AExpr,
4501 n_op
: nullable TStar,
4502 n_expr2
: nullable AExpr
4505 _n_expr
= n_expr
.as(not null)
4506 n_expr
.parent
= self
4507 _n_op
= n_op
.as(not null)
4509 _n_expr2
= n_expr2
.as(not null)
4510 n_expr2
.parent
= self
4513 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4515 if _n_expr
== old_child
then
4516 n_expr
= new_child
.as(AExpr)
4519 if _n_op
== old_child
then
4520 n_op
= new_child
.as(TStar)
4523 if _n_expr2
== old_child
then
4524 n_expr2
= new_child
.as(AExpr)
4529 redef fun n_expr
=(node
)
4534 redef fun n_op
=(node
)
4539 redef fun n_expr2
=(node
)
4546 redef fun visit_all
(v
: Visitor)
4548 v
.enter_visit
(_n_expr
)
4549 v
.enter_visit
(_n_op
)
4550 v
.enter_visit
(_n_expr2
)
4553 redef class AStarstarExpr
4554 init init_astarstarexpr
(
4555 n_expr
: nullable AExpr,
4556 n_op
: nullable TStarstar,
4557 n_expr2
: nullable AExpr
4560 _n_expr
= n_expr
.as(not null)
4561 n_expr
.parent
= self
4562 _n_op
= n_op
.as(not null)
4564 _n_expr2
= n_expr2
.as(not null)
4565 n_expr2
.parent
= self
4568 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4570 if _n_expr
== old_child
then
4571 n_expr
= new_child
.as(AExpr)
4574 if _n_op
== old_child
then
4575 n_op
= new_child
.as(TStarstar)
4578 if _n_expr2
== old_child
then
4579 n_expr2
= new_child
.as(AExpr)
4584 redef fun n_expr
=(node
)
4589 redef fun n_op
=(node
)
4594 redef fun n_expr2
=(node
)
4601 redef fun visit_all
(v
: Visitor)
4603 v
.enter_visit
(_n_expr
)
4604 v
.enter_visit
(_n_op
)
4605 v
.enter_visit
(_n_expr2
)
4608 redef class ASlashExpr
4609 init init_aslashexpr
(
4610 n_expr
: nullable AExpr,
4611 n_op
: nullable TSlash,
4612 n_expr2
: nullable AExpr
4615 _n_expr
= n_expr
.as(not null)
4616 n_expr
.parent
= self
4617 _n_op
= n_op
.as(not null)
4619 _n_expr2
= n_expr2
.as(not null)
4620 n_expr2
.parent
= self
4623 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4625 if _n_expr
== old_child
then
4626 n_expr
= new_child
.as(AExpr)
4629 if _n_op
== old_child
then
4630 n_op
= new_child
.as(TSlash)
4633 if _n_expr2
== old_child
then
4634 n_expr2
= new_child
.as(AExpr)
4639 redef fun n_expr
=(node
)
4644 redef fun n_op
=(node
)
4649 redef fun n_expr2
=(node
)
4656 redef fun visit_all
(v
: Visitor)
4658 v
.enter_visit
(_n_expr
)
4659 v
.enter_visit
(_n_op
)
4660 v
.enter_visit
(_n_expr2
)
4663 redef class APercentExpr
4664 init init_apercentexpr
(
4665 n_expr
: nullable AExpr,
4666 n_op
: nullable TPercent,
4667 n_expr2
: nullable AExpr
4670 _n_expr
= n_expr
.as(not null)
4671 n_expr
.parent
= self
4672 _n_op
= n_op
.as(not null)
4674 _n_expr2
= n_expr2
.as(not null)
4675 n_expr2
.parent
= self
4678 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4680 if _n_expr
== old_child
then
4681 n_expr
= new_child
.as(AExpr)
4684 if _n_op
== old_child
then
4685 n_op
= new_child
.as(TPercent)
4688 if _n_expr2
== old_child
then
4689 n_expr2
= new_child
.as(AExpr)
4694 redef fun n_expr
=(node
)
4699 redef fun n_op
=(node
)
4704 redef fun n_expr2
=(node
)
4711 redef fun visit_all
(v
: Visitor)
4713 v
.enter_visit
(_n_expr
)
4714 v
.enter_visit
(_n_op
)
4715 v
.enter_visit
(_n_expr2
)
4718 redef class APipeExpr
4719 init init_apipeexpr
(
4720 n_expr
: nullable AExpr,
4721 n_op
: nullable TPipe,
4722 n_expr2
: nullable AExpr
4725 _n_expr
= n_expr
.as(not null)
4726 n_expr
.parent
= self
4727 _n_op
= n_op
.as(not null)
4729 _n_expr2
= n_expr2
.as(not null)
4730 n_expr2
.parent
= self
4733 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4735 if _n_expr
== old_child
then
4736 n_expr
= new_child
.as(AExpr)
4739 if _n_op
== old_child
then
4740 n_op
= new_child
.as(TPipe)
4743 if _n_expr2
== old_child
then
4744 n_expr2
= new_child
.as(AExpr)
4749 redef fun n_expr
=(node
)
4754 redef fun n_op
=(node
)
4759 redef fun n_expr2
=(node
)
4766 redef fun visit_all
(v
: Visitor)
4768 v
.enter_visit
(_n_expr
)
4769 v
.enter_visit
(_n_op
)
4770 v
.enter_visit
(_n_expr2
)
4773 redef class ACaretExpr
4774 init init_acaretexpr
(
4775 n_expr
: nullable AExpr,
4776 n_op
: nullable TCaret,
4777 n_expr2
: nullable AExpr
4780 _n_expr
= n_expr
.as(not null)
4781 n_expr
.parent
= self
4782 _n_op
= n_op
.as(not null)
4784 _n_expr2
= n_expr2
.as(not null)
4785 n_expr2
.parent
= self
4788 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4790 if _n_expr
== old_child
then
4791 n_expr
= new_child
.as(AExpr)
4794 if _n_op
== old_child
then
4795 n_op
= new_child
.as(TCaret)
4798 if _n_expr2
== old_child
then
4799 n_expr2
= new_child
.as(AExpr)
4804 redef fun n_expr
=(node
)
4809 redef fun n_op
=(node
)
4814 redef fun n_expr2
=(node
)
4821 redef fun visit_all
(v
: Visitor)
4823 v
.enter_visit
(_n_expr
)
4824 v
.enter_visit
(_n_op
)
4825 v
.enter_visit
(_n_expr2
)
4828 redef class AAmpExpr
4829 init init_aampexpr
(
4830 n_expr
: nullable AExpr,
4831 n_op
: nullable TAmp,
4832 n_expr2
: nullable AExpr
4835 _n_expr
= n_expr
.as(not null)
4836 n_expr
.parent
= self
4837 _n_op
= n_op
.as(not null)
4839 _n_expr2
= n_expr2
.as(not null)
4840 n_expr2
.parent
= self
4843 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4845 if _n_expr
== old_child
then
4846 n_expr
= new_child
.as(AExpr)
4849 if _n_op
== old_child
then
4850 n_op
= new_child
.as(TAmp)
4853 if _n_expr2
== old_child
then
4854 n_expr2
= new_child
.as(AExpr)
4859 redef fun n_expr
=(node
)
4864 redef fun n_op
=(node
)
4869 redef fun n_expr2
=(node
)
4876 redef fun visit_all
(v
: Visitor)
4878 v
.enter_visit
(_n_expr
)
4879 v
.enter_visit
(_n_op
)
4880 v
.enter_visit
(_n_expr2
)
4883 redef class AUminusExpr
4884 init init_auminusexpr
(
4885 n_op
: nullable TMinus,
4886 n_expr
: nullable AExpr
4889 _n_op
= n_op
.as(not null)
4891 _n_expr
= n_expr
.as(not null)
4892 n_expr
.parent
= self
4895 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4897 if _n_op
== old_child
then
4898 n_op
= new_child
.as(TMinus)
4901 if _n_expr
== old_child
then
4902 n_expr
= new_child
.as(AExpr)
4907 redef fun n_op
=(node
)
4912 redef fun n_expr
=(node
)
4919 redef fun visit_all
(v
: Visitor)
4921 v
.enter_visit
(_n_op
)
4922 v
.enter_visit
(_n_expr
)
4925 redef class AUplusExpr
4926 init init_auplusexpr
(
4927 n_op
: nullable TPlus,
4928 n_expr
: nullable AExpr
4931 _n_op
= n_op
.as(not null)
4933 _n_expr
= n_expr
.as(not null)
4934 n_expr
.parent
= self
4937 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4939 if _n_op
== old_child
then
4940 n_op
= new_child
.as(TPlus)
4943 if _n_expr
== old_child
then
4944 n_expr
= new_child
.as(AExpr)
4949 redef fun n_op
=(node
)
4954 redef fun n_expr
=(node
)
4961 redef fun visit_all
(v
: Visitor)
4963 v
.enter_visit
(_n_op
)
4964 v
.enter_visit
(_n_expr
)
4967 redef class AUtildeExpr
4968 init init_autildeexpr
(
4969 n_op
: nullable TTilde,
4970 n_expr
: nullable AExpr
4973 _n_op
= n_op
.as(not null)
4975 _n_expr
= n_expr
.as(not null)
4976 n_expr
.parent
= self
4979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4981 if _n_op
== old_child
then
4982 n_op
= new_child
.as(TTilde)
4985 if _n_expr
== old_child
then
4986 n_expr
= new_child
.as(AExpr)
4991 redef fun n_op
=(node
)
4996 redef fun n_expr
=(node
)
5003 redef fun visit_all
(v
: Visitor)
5005 v
.enter_visit
(_n_op
)
5006 v
.enter_visit
(_n_expr
)
5009 redef class ANewExpr
5010 init init_anewexpr
(
5011 n_kwnew
: nullable TKwnew,
5012 n_type
: nullable AType,
5013 n_qid
: nullable AQid,
5014 n_args
: nullable AExprs
5017 _n_kwnew
= n_kwnew
.as(not null)
5018 n_kwnew
.parent
= self
5019 _n_type
= n_type
.as(not null)
5020 n_type
.parent
= self
5022 if n_qid
!= null then n_qid
.parent
= self
5023 _n_args
= n_args
.as(not null)
5024 n_args
.parent
= self
5027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5029 if _n_kwnew
== old_child
then
5030 n_kwnew
= new_child
.as(TKwnew)
5033 if _n_type
== old_child
then
5034 n_type
= new_child
.as(AType)
5037 if _n_qid
== old_child
then
5038 n_qid
= new_child
.as(nullable AQid)
5041 if _n_args
== old_child
then
5042 n_args
= new_child
.as(AExprs)
5047 redef fun n_kwnew
=(node
)
5052 redef fun n_type
=(node
)
5057 redef fun n_qid
=(node
)
5060 if node
!= null then node
.parent
= self
5062 redef fun n_args
=(node
)
5069 redef fun visit_all
(v
: Visitor)
5071 v
.enter_visit
(_n_kwnew
)
5072 v
.enter_visit
(_n_type
)
5073 v
.enter_visit
(_n_qid
)
5074 v
.enter_visit
(_n_args
)
5077 redef class AAttrExpr
5078 init init_aattrexpr
(
5079 n_expr
: nullable AExpr,
5080 n_id
: nullable TAttrid
5083 _n_expr
= n_expr
.as(not null)
5084 n_expr
.parent
= self
5085 _n_id
= n_id
.as(not null)
5089 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5091 if _n_expr
== old_child
then
5092 n_expr
= new_child
.as(AExpr)
5095 if _n_id
== old_child
then
5096 n_id
= new_child
.as(TAttrid)
5101 redef fun n_expr
=(node
)
5106 redef fun n_id
=(node
)
5113 redef fun visit_all
(v
: Visitor)
5115 v
.enter_visit
(_n_expr
)
5116 v
.enter_visit
(_n_id
)
5119 redef class AAttrAssignExpr
5120 init init_aattrassignexpr
(
5121 n_expr
: nullable AExpr,
5122 n_id
: nullable TAttrid,
5123 n_assign
: nullable TAssign,
5124 n_value
: nullable AExpr
5127 _n_expr
= n_expr
.as(not null)
5128 n_expr
.parent
= self
5129 _n_id
= n_id
.as(not null)
5131 _n_assign
= n_assign
.as(not null)
5132 n_assign
.parent
= self
5133 _n_value
= n_value
.as(not null)
5134 n_value
.parent
= self
5137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5139 if _n_expr
== old_child
then
5140 n_expr
= new_child
.as(AExpr)
5143 if _n_id
== old_child
then
5144 n_id
= new_child
.as(TAttrid)
5147 if _n_assign
== old_child
then
5148 n_assign
= new_child
.as(TAssign)
5151 if _n_value
== old_child
then
5152 n_value
= new_child
.as(AExpr)
5157 redef fun n_expr
=(node
)
5162 redef fun n_id
=(node
)
5167 redef fun n_assign
=(node
)
5172 redef fun n_value
=(node
)
5179 redef fun visit_all
(v
: Visitor)
5181 v
.enter_visit
(_n_expr
)
5182 v
.enter_visit
(_n_id
)
5183 v
.enter_visit
(_n_assign
)
5184 v
.enter_visit
(_n_value
)
5187 redef class AAttrReassignExpr
5188 init init_aattrreassignexpr
(
5189 n_expr
: nullable AExpr,
5190 n_id
: nullable TAttrid,
5191 n_assign_op
: nullable AAssignOp,
5192 n_value
: nullable AExpr
5195 _n_expr
= n_expr
.as(not null)
5196 n_expr
.parent
= self
5197 _n_id
= n_id
.as(not null)
5199 _n_assign_op
= n_assign_op
.as(not null)
5200 n_assign_op
.parent
= self
5201 _n_value
= n_value
.as(not null)
5202 n_value
.parent
= self
5205 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5207 if _n_expr
== old_child
then
5208 n_expr
= new_child
.as(AExpr)
5211 if _n_id
== old_child
then
5212 n_id
= new_child
.as(TAttrid)
5215 if _n_assign_op
== old_child
then
5216 n_assign_op
= new_child
.as(AAssignOp)
5219 if _n_value
== old_child
then
5220 n_value
= new_child
.as(AExpr)
5225 redef fun n_expr
=(node
)
5230 redef fun n_id
=(node
)
5235 redef fun n_assign_op
=(node
)
5240 redef fun n_value
=(node
)
5247 redef fun visit_all
(v
: Visitor)
5249 v
.enter_visit
(_n_expr
)
5250 v
.enter_visit
(_n_id
)
5251 v
.enter_visit
(_n_assign_op
)
5252 v
.enter_visit
(_n_value
)
5255 redef class ACallExpr
5256 init init_acallexpr
(
5257 n_expr
: nullable AExpr,
5258 n_qid
: nullable AQid,
5259 n_args
: nullable AExprs
5262 _n_expr
= n_expr
.as(not null)
5263 n_expr
.parent
= self
5264 _n_qid
= n_qid
.as(not null)
5266 _n_args
= n_args
.as(not null)
5267 n_args
.parent
= self
5270 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5272 if _n_expr
== old_child
then
5273 n_expr
= new_child
.as(AExpr)
5276 if _n_qid
== old_child
then
5277 n_qid
= new_child
.as(AQid)
5280 if _n_args
== old_child
then
5281 n_args
= new_child
.as(AExprs)
5286 redef fun n_expr
=(node
)
5291 redef fun n_qid
=(node
)
5296 redef fun n_args
=(node
)
5303 redef fun visit_all
(v
: Visitor)
5305 v
.enter_visit
(_n_expr
)
5306 v
.enter_visit
(_n_qid
)
5307 v
.enter_visit
(_n_args
)
5310 redef class ACallAssignExpr
5311 init init_acallassignexpr
(
5312 n_expr
: nullable AExpr,
5313 n_qid
: nullable AQid,
5314 n_args
: nullable AExprs,
5315 n_assign
: nullable TAssign,
5316 n_value
: nullable AExpr
5319 _n_expr
= n_expr
.as(not null)
5320 n_expr
.parent
= self
5321 _n_qid
= n_qid
.as(not null)
5323 _n_args
= n_args
.as(not null)
5324 n_args
.parent
= self
5325 _n_assign
= n_assign
.as(not null)
5326 n_assign
.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_qid
== old_child
then
5338 n_qid
= new_child
.as(AQid)
5341 if _n_args
== old_child
then
5342 n_args
= new_child
.as(AExprs)
5345 if _n_assign
== old_child
then
5346 n_assign
= new_child
.as(TAssign)
5349 if _n_value
== old_child
then
5350 n_value
= new_child
.as(AExpr)
5355 redef fun n_expr
=(node
)
5360 redef fun n_qid
=(node
)
5365 redef fun n_args
=(node
)
5370 redef fun n_assign
=(node
)
5375 redef fun n_value
=(node
)
5382 redef fun visit_all
(v
: Visitor)
5384 v
.enter_visit
(_n_expr
)
5385 v
.enter_visit
(_n_qid
)
5386 v
.enter_visit
(_n_args
)
5387 v
.enter_visit
(_n_assign
)
5388 v
.enter_visit
(_n_value
)
5391 redef class ACallReassignExpr
5392 init init_acallreassignexpr
(
5393 n_expr
: nullable AExpr,
5394 n_qid
: nullable AQid,
5395 n_args
: nullable AExprs,
5396 n_assign_op
: nullable AAssignOp,
5397 n_value
: nullable AExpr
5400 _n_expr
= n_expr
.as(not null)
5401 n_expr
.parent
= self
5402 _n_qid
= n_qid
.as(not null)
5404 _n_args
= n_args
.as(not null)
5405 n_args
.parent
= self
5406 _n_assign_op
= n_assign_op
.as(not null)
5407 n_assign_op
.parent
= self
5408 _n_value
= n_value
.as(not null)
5409 n_value
.parent
= self
5412 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5414 if _n_expr
== old_child
then
5415 n_expr
= new_child
.as(AExpr)
5418 if _n_qid
== old_child
then
5419 n_qid
= new_child
.as(AQid)
5422 if _n_args
== old_child
then
5423 n_args
= new_child
.as(AExprs)
5426 if _n_assign_op
== old_child
then
5427 n_assign_op
= new_child
.as(AAssignOp)
5430 if _n_value
== old_child
then
5431 n_value
= new_child
.as(AExpr)
5436 redef fun n_expr
=(node
)
5441 redef fun n_qid
=(node
)
5446 redef fun n_args
=(node
)
5451 redef fun n_assign_op
=(node
)
5456 redef fun n_value
=(node
)
5463 redef fun visit_all
(v
: Visitor)
5465 v
.enter_visit
(_n_expr
)
5466 v
.enter_visit
(_n_qid
)
5467 v
.enter_visit
(_n_args
)
5468 v
.enter_visit
(_n_assign_op
)
5469 v
.enter_visit
(_n_value
)
5472 redef class ASuperExpr
5473 init init_asuperexpr
(
5474 n_qualified
: nullable AQualified,
5475 n_kwsuper
: nullable TKwsuper,
5476 n_args
: nullable AExprs
5479 _n_qualified
= n_qualified
5480 if n_qualified
!= null then n_qualified
.parent
= self
5481 _n_kwsuper
= n_kwsuper
.as(not null)
5482 n_kwsuper
.parent
= self
5483 _n_args
= n_args
.as(not null)
5484 n_args
.parent
= self
5487 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5489 if _n_qualified
== old_child
then
5490 n_qualified
= new_child
.as(nullable AQualified)
5493 if _n_kwsuper
== old_child
then
5494 n_kwsuper
= new_child
.as(TKwsuper)
5497 if _n_args
== old_child
then
5498 n_args
= new_child
.as(AExprs)
5503 redef fun n_qualified
=(node
)
5506 if node
!= null then node
.parent
= self
5508 redef fun n_kwsuper
=(node
)
5513 redef fun n_args
=(node
)
5520 redef fun visit_all
(v
: Visitor)
5522 v
.enter_visit
(_n_qualified
)
5523 v
.enter_visit
(_n_kwsuper
)
5524 v
.enter_visit
(_n_args
)
5527 redef class AInitExpr
5528 init init_ainitexpr
(
5529 n_expr
: nullable AExpr,
5530 n_kwinit
: nullable TKwinit,
5531 n_args
: nullable AExprs
5534 _n_expr
= n_expr
.as(not null)
5535 n_expr
.parent
= self
5536 _n_kwinit
= n_kwinit
.as(not null)
5537 n_kwinit
.parent
= self
5538 _n_args
= n_args
.as(not null)
5539 n_args
.parent
= self
5542 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5544 if _n_expr
== old_child
then
5545 n_expr
= new_child
.as(AExpr)
5548 if _n_kwinit
== old_child
then
5549 n_kwinit
= new_child
.as(TKwinit)
5552 if _n_args
== old_child
then
5553 n_args
= new_child
.as(AExprs)
5558 redef fun n_expr
=(node
)
5563 redef fun n_kwinit
=(node
)
5568 redef fun n_args
=(node
)
5575 redef fun visit_all
(v
: Visitor)
5577 v
.enter_visit
(_n_expr
)
5578 v
.enter_visit
(_n_kwinit
)
5579 v
.enter_visit
(_n_args
)
5582 redef class ABraExpr
5583 init init_abraexpr
(
5584 n_expr
: nullable AExpr,
5585 n_args
: nullable AExprs
5588 _n_expr
= n_expr
.as(not null)
5589 n_expr
.parent
= self
5590 _n_args
= n_args
.as(not null)
5591 n_args
.parent
= self
5594 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5596 if _n_expr
== old_child
then
5597 n_expr
= new_child
.as(AExpr)
5600 if _n_args
== old_child
then
5601 n_args
= new_child
.as(AExprs)
5606 redef fun n_expr
=(node
)
5611 redef fun n_args
=(node
)
5618 redef fun visit_all
(v
: Visitor)
5620 v
.enter_visit
(_n_expr
)
5621 v
.enter_visit
(_n_args
)
5624 redef class ABraAssignExpr
5625 init init_abraassignexpr
(
5626 n_expr
: nullable AExpr,
5627 n_args
: nullable AExprs,
5628 n_assign
: nullable TAssign,
5629 n_value
: nullable AExpr
5632 _n_expr
= n_expr
.as(not null)
5633 n_expr
.parent
= self
5634 _n_args
= n_args
.as(not null)
5635 n_args
.parent
= self
5636 _n_assign
= n_assign
.as(not null)
5637 n_assign
.parent
= self
5638 _n_value
= n_value
.as(not null)
5639 n_value
.parent
= self
5642 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5644 if _n_expr
== old_child
then
5645 n_expr
= new_child
.as(AExpr)
5648 if _n_args
== old_child
then
5649 n_args
= new_child
.as(AExprs)
5652 if _n_assign
== old_child
then
5653 n_assign
= new_child
.as(TAssign)
5656 if _n_value
== old_child
then
5657 n_value
= new_child
.as(AExpr)
5662 redef fun n_expr
=(node
)
5667 redef fun n_args
=(node
)
5672 redef fun n_assign
=(node
)
5677 redef fun n_value
=(node
)
5684 redef fun visit_all
(v
: Visitor)
5686 v
.enter_visit
(_n_expr
)
5687 v
.enter_visit
(_n_args
)
5688 v
.enter_visit
(_n_assign
)
5689 v
.enter_visit
(_n_value
)
5692 redef class ABraReassignExpr
5693 init init_abrareassignexpr
(
5694 n_expr
: nullable AExpr,
5695 n_args
: nullable AExprs,
5696 n_assign_op
: nullable AAssignOp,
5697 n_value
: nullable AExpr
5700 _n_expr
= n_expr
.as(not null)
5701 n_expr
.parent
= self
5702 _n_args
= n_args
.as(not null)
5703 n_args
.parent
= self
5704 _n_assign_op
= n_assign_op
.as(not null)
5705 n_assign_op
.parent
= self
5706 _n_value
= n_value
.as(not null)
5707 n_value
.parent
= self
5710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5712 if _n_expr
== old_child
then
5713 n_expr
= new_child
.as(AExpr)
5716 if _n_args
== old_child
then
5717 n_args
= new_child
.as(AExprs)
5720 if _n_assign_op
== old_child
then
5721 n_assign_op
= new_child
.as(AAssignOp)
5724 if _n_value
== old_child
then
5725 n_value
= new_child
.as(AExpr)
5730 redef fun n_expr
=(node
)
5735 redef fun n_args
=(node
)
5740 redef fun n_assign_op
=(node
)
5745 redef fun n_value
=(node
)
5752 redef fun visit_all
(v
: Visitor)
5754 v
.enter_visit
(_n_expr
)
5755 v
.enter_visit
(_n_args
)
5756 v
.enter_visit
(_n_assign_op
)
5757 v
.enter_visit
(_n_value
)
5760 redef class AVarExpr
5761 init init_avarexpr
(
5765 _n_id
= n_id
.as(not null)
5769 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5771 if _n_id
== old_child
then
5772 n_id
= new_child
.as(TId)
5777 redef fun n_id
=(node
)
5784 redef fun visit_all
(v
: Visitor)
5786 v
.enter_visit
(_n_id
)
5789 redef class AVarAssignExpr
5790 init init_avarassignexpr
(
5792 n_assign
: nullable TAssign,
5793 n_value
: nullable AExpr
5796 _n_id
= n_id
.as(not null)
5798 _n_assign
= n_assign
.as(not null)
5799 n_assign
.parent
= self
5800 _n_value
= n_value
.as(not null)
5801 n_value
.parent
= self
5804 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5806 if _n_id
== old_child
then
5807 n_id
= new_child
.as(TId)
5810 if _n_assign
== old_child
then
5811 n_assign
= new_child
.as(TAssign)
5814 if _n_value
== old_child
then
5815 n_value
= new_child
.as(AExpr)
5820 redef fun n_id
=(node
)
5825 redef fun n_assign
=(node
)
5830 redef fun n_value
=(node
)
5837 redef fun visit_all
(v
: Visitor)
5839 v
.enter_visit
(_n_id
)
5840 v
.enter_visit
(_n_assign
)
5841 v
.enter_visit
(_n_value
)
5844 redef class AVarReassignExpr
5845 init init_avarreassignexpr
(
5847 n_assign_op
: nullable AAssignOp,
5848 n_value
: nullable AExpr
5851 _n_id
= n_id
.as(not null)
5853 _n_assign_op
= n_assign_op
.as(not null)
5854 n_assign_op
.parent
= self
5855 _n_value
= n_value
.as(not null)
5856 n_value
.parent
= self
5859 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5861 if _n_id
== old_child
then
5862 n_id
= new_child
.as(TId)
5865 if _n_assign_op
== old_child
then
5866 n_assign_op
= new_child
.as(AAssignOp)
5869 if _n_value
== old_child
then
5870 n_value
= new_child
.as(AExpr)
5875 redef fun n_id
=(node
)
5880 redef fun n_assign_op
=(node
)
5885 redef fun n_value
=(node
)
5892 redef fun visit_all
(v
: Visitor)
5894 v
.enter_visit
(_n_id
)
5895 v
.enter_visit
(_n_assign_op
)
5896 v
.enter_visit
(_n_value
)
5899 redef class ARangeExpr
5900 init init_arangeexpr
(
5901 n_expr
: nullable AExpr,
5902 n_expr2
: nullable AExpr,
5903 n_annotations
: nullable AAnnotations
5906 _n_expr
= n_expr
.as(not null)
5907 n_expr
.parent
= self
5908 _n_expr2
= n_expr2
.as(not null)
5909 n_expr2
.parent
= self
5910 _n_annotations
= n_annotations
5911 if n_annotations
!= null then n_annotations
.parent
= self
5914 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5916 if _n_expr
== old_child
then
5917 n_expr
= new_child
.as(AExpr)
5920 if _n_expr2
== old_child
then
5921 n_expr2
= new_child
.as(AExpr)
5924 if _n_annotations
== old_child
then
5925 n_annotations
= new_child
.as(nullable AAnnotations)
5930 redef fun n_expr
=(node
)
5935 redef fun n_expr2
=(node
)
5940 redef fun n_annotations
=(node
)
5942 _n_annotations
= node
5943 if node
!= null then node
.parent
= self
5947 redef fun visit_all
(v
: Visitor)
5949 v
.enter_visit
(_n_expr
)
5950 v
.enter_visit
(_n_expr2
)
5951 v
.enter_visit
(_n_annotations
)
5954 redef class ACrangeExpr
5955 init init_acrangeexpr
(
5956 n_obra
: nullable TObra,
5957 n_expr
: nullable AExpr,
5958 n_dotdot
: nullable TDotdot,
5959 n_expr2
: nullable AExpr,
5960 n_cbra
: nullable TCbra,
5961 n_annotations
: nullable AAnnotations
5964 _n_obra
= n_obra
.as(not null)
5965 n_obra
.parent
= self
5966 _n_expr
= n_expr
.as(not null)
5967 n_expr
.parent
= self
5968 _n_dotdot
= n_dotdot
.as(not null)
5969 n_dotdot
.parent
= self
5970 _n_expr2
= n_expr2
.as(not null)
5971 n_expr2
.parent
= self
5972 _n_cbra
= n_cbra
.as(not null)
5973 n_cbra
.parent
= self
5974 _n_annotations
= n_annotations
5975 if n_annotations
!= null then n_annotations
.parent
= self
5978 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5980 if _n_obra
== old_child
then
5981 n_obra
= new_child
.as(TObra)
5984 if _n_expr
== old_child
then
5985 n_expr
= new_child
.as(AExpr)
5988 if _n_dotdot
== old_child
then
5989 n_dotdot
= new_child
.as(TDotdot)
5992 if _n_expr2
== old_child
then
5993 n_expr2
= new_child
.as(AExpr)
5996 if _n_cbra
== old_child
then
5997 n_cbra
= new_child
.as(TCbra)
6000 if _n_annotations
== old_child
then
6001 n_annotations
= new_child
.as(nullable AAnnotations)
6006 redef fun n_obra
=(node
)
6011 redef fun n_expr
=(node
)
6016 redef fun n_dotdot
=(node
)
6021 redef fun n_expr2
=(node
)
6026 redef fun n_cbra
=(node
)
6031 redef fun n_annotations
=(node
)
6033 _n_annotations
= node
6034 if node
!= null then node
.parent
= self
6038 redef fun visit_all
(v
: Visitor)
6040 v
.enter_visit
(_n_obra
)
6041 v
.enter_visit
(_n_expr
)
6042 v
.enter_visit
(_n_dotdot
)
6043 v
.enter_visit
(_n_expr2
)
6044 v
.enter_visit
(_n_cbra
)
6045 v
.enter_visit
(_n_annotations
)
6048 redef class AOrangeExpr
6049 init init_aorangeexpr
(
6050 n_obra
: nullable TObra,
6051 n_expr
: nullable AExpr,
6052 n_dotdot
: nullable TDotdot,
6053 n_expr2
: nullable AExpr,
6054 n_cbra
: nullable TObra,
6055 n_annotations
: nullable AAnnotations
6058 _n_obra
= n_obra
.as(not null)
6059 n_obra
.parent
= self
6060 _n_expr
= n_expr
.as(not null)
6061 n_expr
.parent
= self
6062 _n_dotdot
= n_dotdot
.as(not null)
6063 n_dotdot
.parent
= self
6064 _n_expr2
= n_expr2
.as(not null)
6065 n_expr2
.parent
= self
6066 _n_cbra
= n_cbra
.as(not null)
6067 n_cbra
.parent
= self
6068 _n_annotations
= n_annotations
6069 if n_annotations
!= null then n_annotations
.parent
= self
6072 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6074 if _n_obra
== old_child
then
6075 n_obra
= new_child
.as(TObra)
6078 if _n_expr
== old_child
then
6079 n_expr
= new_child
.as(AExpr)
6082 if _n_dotdot
== old_child
then
6083 n_dotdot
= new_child
.as(TDotdot)
6086 if _n_expr2
== old_child
then
6087 n_expr2
= new_child
.as(AExpr)
6090 if _n_cbra
== old_child
then
6091 n_cbra
= new_child
.as(TObra)
6094 if _n_annotations
== old_child
then
6095 n_annotations
= new_child
.as(nullable AAnnotations)
6100 redef fun n_obra
=(node
)
6105 redef fun n_expr
=(node
)
6110 redef fun n_dotdot
=(node
)
6115 redef fun n_expr2
=(node
)
6120 redef fun n_cbra
=(node
)
6125 redef fun n_annotations
=(node
)
6127 _n_annotations
= node
6128 if node
!= null then node
.parent
= self
6132 redef fun visit_all
(v
: Visitor)
6134 v
.enter_visit
(_n_obra
)
6135 v
.enter_visit
(_n_expr
)
6136 v
.enter_visit
(_n_dotdot
)
6137 v
.enter_visit
(_n_expr2
)
6138 v
.enter_visit
(_n_cbra
)
6139 v
.enter_visit
(_n_annotations
)
6142 redef class AArrayExpr
6143 init init_aarrayexpr
(
6144 n_obra
: nullable TObra,
6145 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6146 n_type
: nullable AType,
6147 n_cbra
: nullable TCbra,
6148 n_annotations
: nullable AAnnotations
6151 _n_obra
= n_obra
.as(not null)
6152 n_obra
.parent
= self
6153 self.n_exprs
.unsafe_add_all
(n_exprs
)
6155 if n_type
!= null then n_type
.parent
= self
6156 _n_cbra
= n_cbra
.as(not null)
6157 n_cbra
.parent
= self
6158 _n_annotations
= n_annotations
6159 if n_annotations
!= null then n_annotations
.parent
= self
6162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6164 if _n_obra
== old_child
then
6165 n_obra
= new_child
.as(TObra)
6168 if n_exprs
.replace_child
(old_child
, new_child
) then return
6169 if _n_type
== old_child
then
6170 n_type
= new_child
.as(nullable AType)
6173 if _n_cbra
== old_child
then
6174 n_cbra
= new_child
.as(TCbra)
6177 if _n_annotations
== old_child
then
6178 n_annotations
= new_child
.as(nullable AAnnotations)
6183 redef fun n_obra
=(node
)
6188 redef fun n_type
=(node
)
6191 if node
!= null then node
.parent
= self
6193 redef fun n_cbra
=(node
)
6198 redef fun n_annotations
=(node
)
6200 _n_annotations
= node
6201 if node
!= null then node
.parent
= self
6205 redef fun visit_all
(v
: Visitor)
6207 v
.enter_visit
(_n_obra
)
6208 n_exprs
.visit_all
(v
)
6209 v
.enter_visit
(_n_type
)
6210 v
.enter_visit
(_n_cbra
)
6211 v
.enter_visit
(_n_annotations
)
6214 redef class ASelfExpr
6215 init init_aselfexpr
(
6216 n_kwself
: nullable TKwself,
6217 n_annotations
: nullable AAnnotations
6220 _n_kwself
= n_kwself
.as(not null)
6221 n_kwself
.parent
= self
6222 _n_annotations
= n_annotations
6223 if n_annotations
!= null then n_annotations
.parent
= self
6226 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6228 if _n_kwself
== old_child
then
6229 n_kwself
= new_child
.as(TKwself)
6232 if _n_annotations
== old_child
then
6233 n_annotations
= new_child
.as(nullable AAnnotations)
6238 redef fun n_kwself
=(node
)
6243 redef fun n_annotations
=(node
)
6245 _n_annotations
= node
6246 if node
!= null then node
.parent
= self
6250 redef fun visit_all
(v
: Visitor)
6252 v
.enter_visit
(_n_kwself
)
6253 v
.enter_visit
(_n_annotations
)
6256 redef class AImplicitSelfExpr
6257 init init_aimplicitselfexpr
6261 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6267 redef fun visit_all
(v
: Visitor)
6271 redef class ATrueExpr
6272 init init_atrueexpr
(
6273 n_kwtrue
: nullable TKwtrue,
6274 n_annotations
: nullable AAnnotations
6277 _n_kwtrue
= n_kwtrue
.as(not null)
6278 n_kwtrue
.parent
= self
6279 _n_annotations
= n_annotations
6280 if n_annotations
!= null then n_annotations
.parent
= self
6283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6285 if _n_kwtrue
== old_child
then
6286 n_kwtrue
= new_child
.as(TKwtrue)
6289 if _n_annotations
== old_child
then
6290 n_annotations
= new_child
.as(nullable AAnnotations)
6295 redef fun n_kwtrue
=(node
)
6300 redef fun n_annotations
=(node
)
6302 _n_annotations
= node
6303 if node
!= null then node
.parent
= self
6307 redef fun visit_all
(v
: Visitor)
6309 v
.enter_visit
(_n_kwtrue
)
6310 v
.enter_visit
(_n_annotations
)
6313 redef class AFalseExpr
6314 init init_afalseexpr
(
6315 n_kwfalse
: nullable TKwfalse,
6316 n_annotations
: nullable AAnnotations
6319 _n_kwfalse
= n_kwfalse
.as(not null)
6320 n_kwfalse
.parent
= self
6321 _n_annotations
= n_annotations
6322 if n_annotations
!= null then n_annotations
.parent
= self
6325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6327 if _n_kwfalse
== old_child
then
6328 n_kwfalse
= new_child
.as(TKwfalse)
6331 if _n_annotations
== old_child
then
6332 n_annotations
= new_child
.as(nullable AAnnotations)
6337 redef fun n_kwfalse
=(node
)
6342 redef fun n_annotations
=(node
)
6344 _n_annotations
= node
6345 if node
!= null then node
.parent
= self
6349 redef fun visit_all
(v
: Visitor)
6351 v
.enter_visit
(_n_kwfalse
)
6352 v
.enter_visit
(_n_annotations
)
6355 redef class ANullExpr
6356 init init_anullexpr
(
6357 n_kwnull
: nullable TKwnull,
6358 n_annotations
: nullable AAnnotations
6361 _n_kwnull
= n_kwnull
.as(not null)
6362 n_kwnull
.parent
= self
6363 _n_annotations
= n_annotations
6364 if n_annotations
!= null then n_annotations
.parent
= self
6367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6369 if _n_kwnull
== old_child
then
6370 n_kwnull
= new_child
.as(TKwnull)
6373 if _n_annotations
== old_child
then
6374 n_annotations
= new_child
.as(nullable AAnnotations)
6379 redef fun n_kwnull
=(node
)
6384 redef fun n_annotations
=(node
)
6386 _n_annotations
= node
6387 if node
!= null then node
.parent
= self
6391 redef fun visit_all
(v
: Visitor)
6393 v
.enter_visit
(_n_kwnull
)
6394 v
.enter_visit
(_n_annotations
)
6397 redef class AIntegerExpr
6398 init init_aintegerexpr
(
6399 n_integer
: nullable TInteger,
6400 n_annotations
: nullable AAnnotations
6403 _n_integer
= n_integer
.as(not null)
6404 n_integer
.parent
= self
6405 _n_annotations
= n_annotations
6406 if n_annotations
!= null then n_annotations
.parent
= self
6409 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6411 if _n_integer
== old_child
then
6412 n_integer
= new_child
.as(TInteger)
6415 if _n_annotations
== old_child
then
6416 n_annotations
= new_child
.as(nullable AAnnotations)
6421 redef fun n_integer
=(node
)
6426 redef fun n_annotations
=(node
)
6428 _n_annotations
= node
6429 if node
!= null then node
.parent
= self
6433 redef fun visit_all
(v
: Visitor)
6435 v
.enter_visit
(_n_integer
)
6436 v
.enter_visit
(_n_annotations
)
6439 redef class AFloatExpr
6440 init init_afloatexpr
(
6441 n_float
: nullable TFloat,
6442 n_annotations
: nullable AAnnotations
6445 _n_float
= n_float
.as(not null)
6446 n_float
.parent
= self
6447 _n_annotations
= n_annotations
6448 if n_annotations
!= null then n_annotations
.parent
= self
6451 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6453 if _n_float
== old_child
then
6454 n_float
= new_child
.as(TFloat)
6457 if _n_annotations
== old_child
then
6458 n_annotations
= new_child
.as(nullable AAnnotations)
6463 redef fun n_float
=(node
)
6468 redef fun n_annotations
=(node
)
6470 _n_annotations
= node
6471 if node
!= null then node
.parent
= self
6475 redef fun visit_all
(v
: Visitor)
6477 v
.enter_visit
(_n_float
)
6478 v
.enter_visit
(_n_annotations
)
6481 redef class ACharExpr
6482 init init_acharexpr
(
6483 n_char
: nullable TChar,
6484 n_annotations
: nullable AAnnotations
6487 _n_char
= n_char
.as(not null)
6488 n_char
.parent
= self
6489 _n_annotations
= n_annotations
6490 if n_annotations
!= null then n_annotations
.parent
= self
6493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6495 if _n_char
== old_child
then
6496 n_char
= new_child
.as(TChar)
6499 if _n_annotations
== old_child
then
6500 n_annotations
= new_child
.as(nullable AAnnotations)
6505 redef fun n_char
=(node
)
6510 redef fun n_annotations
=(node
)
6512 _n_annotations
= node
6513 if node
!= null then node
.parent
= self
6517 redef fun visit_all
(v
: Visitor)
6519 v
.enter_visit
(_n_char
)
6520 v
.enter_visit
(_n_annotations
)
6523 redef class AStringExpr
6524 init init_astringexpr
(
6525 n_string
: nullable TString,
6526 n_annotations
: nullable AAnnotations
6529 _n_string
= n_string
.as(not null)
6530 n_string
.parent
= self
6531 _n_annotations
= n_annotations
6532 if n_annotations
!= null then n_annotations
.parent
= self
6535 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6537 if _n_string
== old_child
then
6538 n_string
= new_child
.as(TString)
6541 if _n_annotations
== old_child
then
6542 n_annotations
= new_child
.as(nullable AAnnotations)
6547 redef fun n_string
=(node
)
6552 redef fun n_annotations
=(node
)
6554 _n_annotations
= node
6555 if node
!= null then node
.parent
= self
6559 redef fun visit_all
(v
: Visitor)
6561 v
.enter_visit
(_n_string
)
6562 v
.enter_visit
(_n_annotations
)
6565 redef class AStartStringExpr
6566 init init_astartstringexpr
(
6567 n_string
: nullable TStartString
6570 _n_string
= n_string
.as(not null)
6571 n_string
.parent
= self
6574 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6576 if _n_string
== old_child
then
6577 n_string
= new_child
.as(TStartString)
6582 redef fun n_string
=(node
)
6589 redef fun visit_all
(v
: Visitor)
6591 v
.enter_visit
(_n_string
)
6594 redef class AMidStringExpr
6595 init init_amidstringexpr
(
6596 n_string
: nullable TMidString
6599 _n_string
= n_string
.as(not null)
6600 n_string
.parent
= self
6603 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6605 if _n_string
== old_child
then
6606 n_string
= new_child
.as(TMidString)
6611 redef fun n_string
=(node
)
6618 redef fun visit_all
(v
: Visitor)
6620 v
.enter_visit
(_n_string
)
6623 redef class AEndStringExpr
6624 init init_aendstringexpr
(
6625 n_string
: nullable TEndString
6628 _n_string
= n_string
.as(not null)
6629 n_string
.parent
= self
6632 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6634 if _n_string
== old_child
then
6635 n_string
= new_child
.as(TEndString)
6640 redef fun n_string
=(node
)
6647 redef fun visit_all
(v
: Visitor)
6649 v
.enter_visit
(_n_string
)
6652 redef class ASuperstringExpr
6653 init init_asuperstringexpr
(
6654 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6655 n_annotations
: nullable AAnnotations
6658 self.n_exprs
.unsafe_add_all
(n_exprs
)
6659 _n_annotations
= n_annotations
6660 if n_annotations
!= null then n_annotations
.parent
= self
6663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6665 if n_exprs
.replace_child
(old_child
, new_child
) then return
6666 if _n_annotations
== old_child
then
6667 n_annotations
= new_child
.as(nullable AAnnotations)
6672 redef fun n_annotations
=(node
)
6674 _n_annotations
= node
6675 if node
!= null then node
.parent
= self
6679 redef fun visit_all
(v
: Visitor)
6681 n_exprs
.visit_all
(v
)
6682 v
.enter_visit
(_n_annotations
)
6685 redef class AParExpr
6686 init init_aparexpr
(
6687 n_opar
: nullable TOpar,
6688 n_expr
: nullable AExpr,
6689 n_cpar
: nullable TCpar,
6690 n_annotations
: nullable AAnnotations
6693 _n_opar
= n_opar
.as(not null)
6694 n_opar
.parent
= self
6695 _n_expr
= n_expr
.as(not null)
6696 n_expr
.parent
= self
6697 _n_cpar
= n_cpar
.as(not null)
6698 n_cpar
.parent
= self
6699 _n_annotations
= n_annotations
6700 if n_annotations
!= null then n_annotations
.parent
= self
6703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6705 if _n_opar
== old_child
then
6706 n_opar
= new_child
.as(TOpar)
6709 if _n_expr
== old_child
then
6710 n_expr
= new_child
.as(AExpr)
6713 if _n_cpar
== old_child
then
6714 n_cpar
= new_child
.as(TCpar)
6717 if _n_annotations
== old_child
then
6718 n_annotations
= new_child
.as(nullable AAnnotations)
6723 redef fun n_opar
=(node
)
6728 redef fun n_expr
=(node
)
6733 redef fun n_cpar
=(node
)
6738 redef fun n_annotations
=(node
)
6740 _n_annotations
= node
6741 if node
!= null then node
.parent
= self
6745 redef fun visit_all
(v
: Visitor)
6747 v
.enter_visit
(_n_opar
)
6748 v
.enter_visit
(_n_expr
)
6749 v
.enter_visit
(_n_cpar
)
6750 v
.enter_visit
(_n_annotations
)
6753 redef class AAsCastExpr
6754 init init_aascastexpr
(
6755 n_expr
: nullable AExpr,
6756 n_kwas
: nullable TKwas,
6757 n_opar
: nullable TOpar,
6758 n_type
: nullable AType,
6759 n_cpar
: nullable TCpar
6762 _n_expr
= n_expr
.as(not null)
6763 n_expr
.parent
= self
6764 _n_kwas
= n_kwas
.as(not null)
6765 n_kwas
.parent
= self
6767 if n_opar
!= null then n_opar
.parent
= self
6768 _n_type
= n_type
.as(not null)
6769 n_type
.parent
= self
6771 if n_cpar
!= null then n_cpar
.parent
= self
6774 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6776 if _n_expr
== old_child
then
6777 n_expr
= new_child
.as(AExpr)
6780 if _n_kwas
== old_child
then
6781 n_kwas
= new_child
.as(TKwas)
6784 if _n_opar
== old_child
then
6785 n_opar
= new_child
.as(nullable TOpar)
6788 if _n_type
== old_child
then
6789 n_type
= new_child
.as(AType)
6792 if _n_cpar
== old_child
then
6793 n_cpar
= new_child
.as(nullable TCpar)
6798 redef fun n_expr
=(node
)
6803 redef fun n_kwas
=(node
)
6808 redef fun n_opar
=(node
)
6811 if node
!= null then node
.parent
= self
6813 redef fun n_type
=(node
)
6818 redef fun n_cpar
=(node
)
6821 if node
!= null then node
.parent
= self
6825 redef fun visit_all
(v
: Visitor)
6827 v
.enter_visit
(_n_expr
)
6828 v
.enter_visit
(_n_kwas
)
6829 v
.enter_visit
(_n_opar
)
6830 v
.enter_visit
(_n_type
)
6831 v
.enter_visit
(_n_cpar
)
6834 redef class AAsNotnullExpr
6835 init init_aasnotnullexpr
(
6836 n_expr
: nullable AExpr,
6837 n_kwas
: nullable TKwas,
6838 n_opar
: nullable TOpar,
6839 n_kwnot
: nullable TKwnot,
6840 n_kwnull
: nullable TKwnull,
6841 n_cpar
: nullable TCpar
6844 _n_expr
= n_expr
.as(not null)
6845 n_expr
.parent
= self
6846 _n_kwas
= n_kwas
.as(not null)
6847 n_kwas
.parent
= self
6849 if n_opar
!= null then n_opar
.parent
= self
6850 _n_kwnot
= n_kwnot
.as(not null)
6851 n_kwnot
.parent
= self
6852 _n_kwnull
= n_kwnull
.as(not null)
6853 n_kwnull
.parent
= self
6855 if n_cpar
!= null then n_cpar
.parent
= self
6858 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6860 if _n_expr
== old_child
then
6861 n_expr
= new_child
.as(AExpr)
6864 if _n_kwas
== old_child
then
6865 n_kwas
= new_child
.as(TKwas)
6868 if _n_opar
== old_child
then
6869 n_opar
= new_child
.as(nullable TOpar)
6872 if _n_kwnot
== old_child
then
6873 n_kwnot
= new_child
.as(TKwnot)
6876 if _n_kwnull
== old_child
then
6877 n_kwnull
= new_child
.as(TKwnull)
6880 if _n_cpar
== old_child
then
6881 n_cpar
= new_child
.as(nullable TCpar)
6886 redef fun n_expr
=(node
)
6891 redef fun n_kwas
=(node
)
6896 redef fun n_opar
=(node
)
6899 if node
!= null then node
.parent
= self
6901 redef fun n_kwnot
=(node
)
6906 redef fun n_kwnull
=(node
)
6911 redef fun n_cpar
=(node
)
6914 if node
!= null then node
.parent
= self
6918 redef fun visit_all
(v
: Visitor)
6920 v
.enter_visit
(_n_expr
)
6921 v
.enter_visit
(_n_kwas
)
6922 v
.enter_visit
(_n_opar
)
6923 v
.enter_visit
(_n_kwnot
)
6924 v
.enter_visit
(_n_kwnull
)
6925 v
.enter_visit
(_n_cpar
)
6928 redef class AIssetAttrExpr
6929 init init_aissetattrexpr
(
6930 n_kwisset
: nullable TKwisset,
6931 n_expr
: nullable AExpr,
6932 n_id
: nullable TAttrid
6935 _n_kwisset
= n_kwisset
.as(not null)
6936 n_kwisset
.parent
= self
6937 _n_expr
= n_expr
.as(not null)
6938 n_expr
.parent
= self
6939 _n_id
= n_id
.as(not null)
6943 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6945 if _n_kwisset
== old_child
then
6946 n_kwisset
= new_child
.as(TKwisset)
6949 if _n_expr
== old_child
then
6950 n_expr
= new_child
.as(AExpr)
6953 if _n_id
== old_child
then
6954 n_id
= new_child
.as(TAttrid)
6959 redef fun n_kwisset
=(node
)
6964 redef fun n_expr
=(node
)
6969 redef fun n_id
=(node
)
6976 redef fun visit_all
(v
: Visitor)
6978 v
.enter_visit
(_n_kwisset
)
6979 v
.enter_visit
(_n_expr
)
6980 v
.enter_visit
(_n_id
)
6983 redef class ADebugTypeExpr
6984 init init_adebugtypeexpr
(
6985 n_kwdebug
: nullable TKwdebug,
6986 n_kwtype
: nullable TKwtype,
6987 n_expr
: nullable AExpr,
6988 n_type
: nullable AType
6991 _n_kwdebug
= n_kwdebug
.as(not null)
6992 n_kwdebug
.parent
= self
6993 _n_kwtype
= n_kwtype
.as(not null)
6994 n_kwtype
.parent
= self
6995 _n_expr
= n_expr
.as(not null)
6996 n_expr
.parent
= self
6997 _n_type
= n_type
.as(not null)
6998 n_type
.parent
= self
7001 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7003 if _n_kwdebug
== old_child
then
7004 n_kwdebug
= new_child
.as(TKwdebug)
7007 if _n_kwtype
== old_child
then
7008 n_kwtype
= new_child
.as(TKwtype)
7011 if _n_expr
== old_child
then
7012 n_expr
= new_child
.as(AExpr)
7015 if _n_type
== old_child
then
7016 n_type
= new_child
.as(AType)
7021 redef fun n_kwdebug
=(node
)
7026 redef fun n_kwtype
=(node
)
7031 redef fun n_expr
=(node
)
7036 redef fun n_type
=(node
)
7043 redef fun visit_all
(v
: Visitor)
7045 v
.enter_visit
(_n_kwdebug
)
7046 v
.enter_visit
(_n_kwtype
)
7047 v
.enter_visit
(_n_expr
)
7048 v
.enter_visit
(_n_type
)
7051 redef class AVarargExpr
7052 init init_avarargexpr
(
7053 n_expr
: nullable AExpr,
7054 n_dotdotdot
: nullable TDotdotdot
7057 _n_expr
= n_expr
.as(not null)
7058 n_expr
.parent
= self
7059 _n_dotdotdot
= n_dotdotdot
.as(not null)
7060 n_dotdotdot
.parent
= self
7063 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7065 if _n_expr
== old_child
then
7066 n_expr
= new_child
.as(AExpr)
7069 if _n_dotdotdot
== old_child
then
7070 n_dotdotdot
= new_child
.as(TDotdotdot)
7075 redef fun n_expr
=(node
)
7080 redef fun n_dotdotdot
=(node
)
7087 redef fun visit_all
(v
: Visitor)
7089 v
.enter_visit
(_n_expr
)
7090 v
.enter_visit
(_n_dotdotdot
)
7093 redef class ANamedargExpr
7094 init init_anamedargexpr
(
7096 n_assign
: nullable TAssign,
7097 n_expr
: nullable AExpr
7100 _n_id
= n_id
.as(not null)
7102 _n_assign
= n_assign
.as(not null)
7103 n_assign
.parent
= self
7104 _n_expr
= n_expr
.as(not null)
7105 n_expr
.parent
= self
7108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7110 if _n_id
== old_child
then
7111 n_id
= new_child
.as(TId)
7114 if _n_assign
== old_child
then
7115 n_assign
= new_child
.as(TAssign)
7118 if _n_expr
== old_child
then
7119 n_expr
= new_child
.as(AExpr)
7124 redef fun n_id
=(node
)
7129 redef fun n_assign
=(node
)
7134 redef fun n_expr
=(node
)
7141 redef fun visit_all
(v
: Visitor)
7143 v
.enter_visit
(_n_id
)
7144 v
.enter_visit
(_n_assign
)
7145 v
.enter_visit
(_n_expr
)
7148 redef class ATypeExpr
7149 init init_atypeexpr
(
7150 n_type
: nullable AType
7153 _n_type
= n_type
.as(not null)
7154 n_type
.parent
= self
7157 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7159 if _n_type
== old_child
then
7160 n_type
= new_child
.as(AType)
7165 redef fun n_type
=(node
)
7172 redef fun visit_all
(v
: Visitor)
7174 v
.enter_visit
(_n_type
)
7177 redef class AMethidExpr
7178 init init_amethidexpr
(
7179 n_expr
: nullable AExpr,
7180 n_id
: nullable AMethid
7183 _n_expr
= n_expr
.as(not null)
7184 n_expr
.parent
= self
7185 _n_id
= n_id
.as(not null)
7189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7191 if _n_expr
== old_child
then
7192 n_expr
= new_child
.as(AExpr)
7195 if _n_id
== old_child
then
7196 n_id
= new_child
.as(AMethid)
7201 redef fun n_expr
=(node
)
7206 redef fun n_id
=(node
)
7213 redef fun visit_all
(v
: Visitor)
7215 v
.enter_visit
(_n_expr
)
7216 v
.enter_visit
(_n_id
)
7221 n_annotations
: nullable AAnnotations
7224 _n_annotations
= n_annotations
.as(not null)
7225 n_annotations
.parent
= self
7228 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7230 if _n_annotations
== old_child
then
7231 n_annotations
= new_child
.as(AAnnotations)
7236 redef fun n_annotations
=(node
)
7238 _n_annotations
= node
7243 redef fun visit_all
(v
: Visitor)
7245 v
.enter_visit
(_n_annotations
)
7248 redef class AManyExpr
7249 init init_amanyexpr
(
7250 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7253 self.n_exprs
.unsafe_add_all
(n_exprs
)
7256 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7258 if n_exprs
.replace_child
(old_child
, new_child
) then return
7263 redef fun visit_all
(v
: Visitor)
7265 n_exprs
.visit_all
(v
)
7268 redef class AListExprs
7269 init init_alistexprs
(
7270 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7273 self.n_exprs
.unsafe_add_all
(n_exprs
)
7276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7278 if n_exprs
.replace_child
(old_child
, new_child
) then return
7283 redef fun visit_all
(v
: Visitor)
7285 n_exprs
.visit_all
(v
)
7288 redef class AParExprs
7289 init init_aparexprs
(
7290 n_opar
: nullable TOpar,
7291 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7292 n_cpar
: nullable TCpar
7295 _n_opar
= n_opar
.as(not null)
7296 n_opar
.parent
= self
7297 self.n_exprs
.unsafe_add_all
(n_exprs
)
7298 _n_cpar
= n_cpar
.as(not null)
7299 n_cpar
.parent
= self
7302 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7304 if _n_opar
== old_child
then
7305 n_opar
= new_child
.as(TOpar)
7308 if n_exprs
.replace_child
(old_child
, new_child
) then return
7309 if _n_cpar
== old_child
then
7310 n_cpar
= new_child
.as(TCpar)
7315 redef fun n_opar
=(node
)
7320 redef fun n_cpar
=(node
)
7327 redef fun visit_all
(v
: Visitor)
7329 v
.enter_visit
(_n_opar
)
7330 n_exprs
.visit_all
(v
)
7331 v
.enter_visit
(_n_cpar
)
7334 redef class ABraExprs
7335 init init_abraexprs
(
7336 n_obra
: nullable TObra,
7337 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7338 n_cbra
: nullable TCbra
7341 _n_obra
= n_obra
.as(not null)
7342 n_obra
.parent
= self
7343 self.n_exprs
.unsafe_add_all
(n_exprs
)
7344 _n_cbra
= n_cbra
.as(not null)
7345 n_cbra
.parent
= self
7348 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7350 if _n_obra
== old_child
then
7351 n_obra
= new_child
.as(TObra)
7354 if n_exprs
.replace_child
(old_child
, new_child
) then return
7355 if _n_cbra
== old_child
then
7356 n_cbra
= new_child
.as(TCbra)
7361 redef fun n_obra
=(node
)
7366 redef fun n_cbra
=(node
)
7373 redef fun visit_all
(v
: Visitor)
7375 v
.enter_visit
(_n_obra
)
7376 n_exprs
.visit_all
(v
)
7377 v
.enter_visit
(_n_cbra
)
7380 redef class APlusAssignOp
7381 init init_aplusassignop
(
7382 n_op
: nullable TPluseq
7385 _n_op
= n_op
.as(not null)
7389 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7391 if _n_op
== old_child
then
7392 n_op
= new_child
.as(TPluseq)
7397 redef fun n_op
=(node
)
7404 redef fun visit_all
(v
: Visitor)
7406 v
.enter_visit
(_n_op
)
7409 redef class AMinusAssignOp
7410 init init_aminusassignop
(
7411 n_op
: nullable TMinuseq
7414 _n_op
= n_op
.as(not null)
7418 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7420 if _n_op
== old_child
then
7421 n_op
= new_child
.as(TMinuseq)
7426 redef fun n_op
=(node
)
7433 redef fun visit_all
(v
: Visitor)
7435 v
.enter_visit
(_n_op
)
7438 redef class AStarAssignOp
7439 init init_astarassignop
(
7440 n_op
: nullable TStareq
7443 _n_op
= n_op
.as(not null)
7447 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7449 if _n_op
== old_child
then
7450 n_op
= new_child
.as(TStareq)
7455 redef fun n_op
=(node
)
7462 redef fun visit_all
(v
: Visitor)
7464 v
.enter_visit
(_n_op
)
7467 redef class ASlashAssignOp
7468 init init_aslashassignop
(
7469 n_op
: nullable TSlasheq
7472 _n_op
= n_op
.as(not null)
7476 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7478 if _n_op
== old_child
then
7479 n_op
= new_child
.as(TSlasheq)
7484 redef fun n_op
=(node
)
7491 redef fun visit_all
(v
: Visitor)
7493 v
.enter_visit
(_n_op
)
7496 redef class APercentAssignOp
7497 init init_apercentassignop
(
7498 n_op
: nullable TPercenteq
7501 _n_op
= n_op
.as(not null)
7505 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7507 if _n_op
== old_child
then
7508 n_op
= new_child
.as(TPercenteq)
7513 redef fun n_op
=(node
)
7520 redef fun visit_all
(v
: Visitor)
7522 v
.enter_visit
(_n_op
)
7525 redef class AStarstarAssignOp
7526 init init_astarstarassignop
(
7527 n_op
: nullable TStarstareq
7530 _n_op
= n_op
.as(not null)
7534 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7536 if _n_op
== old_child
then
7537 n_op
= new_child
.as(TStarstareq)
7542 redef fun n_op
=(node
)
7549 redef fun visit_all
(v
: Visitor)
7551 v
.enter_visit
(_n_op
)
7554 redef class APipeAssignOp
7555 init init_apipeassignop
(
7556 n_op
: nullable TPipeeq
7559 _n_op
= n_op
.as(not null)
7563 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7565 if _n_op
== old_child
then
7566 n_op
= new_child
.as(TPipeeq)
7571 redef fun n_op
=(node
)
7578 redef fun visit_all
(v
: Visitor)
7580 v
.enter_visit
(_n_op
)
7583 redef class ACaretAssignOp
7584 init init_acaretassignop
(
7585 n_op
: nullable TCareteq
7588 _n_op
= n_op
.as(not null)
7592 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7594 if _n_op
== old_child
then
7595 n_op
= new_child
.as(TCareteq)
7600 redef fun n_op
=(node
)
7607 redef fun visit_all
(v
: Visitor)
7609 v
.enter_visit
(_n_op
)
7612 redef class AAmpAssignOp
7613 init init_aampassignop
(
7614 n_op
: nullable TAmpeq
7617 _n_op
= n_op
.as(not null)
7621 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7623 if _n_op
== old_child
then
7624 n_op
= new_child
.as(TAmpeq)
7629 redef fun n_op
=(node
)
7636 redef fun visit_all
(v
: Visitor)
7638 v
.enter_visit
(_n_op
)
7641 redef class ALlAssignOp
7642 init init_allassignop
(
7643 n_op
: nullable TLleq
7646 _n_op
= n_op
.as(not null)
7650 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7652 if _n_op
== old_child
then
7653 n_op
= new_child
.as(TLleq)
7658 redef fun n_op
=(node
)
7665 redef fun visit_all
(v
: Visitor)
7667 v
.enter_visit
(_n_op
)
7670 redef class AGgAssignOp
7671 init init_aggassignop
(
7672 n_op
: nullable TGgeq
7675 _n_op
= n_op
.as(not null)
7679 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7681 if _n_op
== old_child
then
7682 n_op
= new_child
.as(TGgeq)
7687 redef fun n_op
=(node
)
7694 redef fun visit_all
(v
: Visitor)
7696 v
.enter_visit
(_n_op
)
7699 redef class AModuleName
7700 init init_amodulename
(
7701 n_quad
: nullable TQuad,
7702 n_path
: Collection[Object], # Should be Collection[TId]
7707 if n_quad
!= null then n_quad
.parent
= self
7708 self.n_path
.unsafe_add_all
(n_path
)
7709 _n_id
= n_id
.as(not null)
7713 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7715 if _n_quad
== old_child
then
7716 n_quad
= new_child
.as(nullable TQuad)
7719 if n_path
.replace_child
(old_child
, new_child
) then return
7720 if _n_id
== old_child
then
7721 n_id
= new_child
.as(TId)
7726 redef fun n_quad
=(node
)
7729 if node
!= null then node
.parent
= self
7731 redef fun n_id
=(node
)
7738 redef fun visit_all
(v
: Visitor)
7740 v
.enter_visit
(_n_quad
)
7742 v
.enter_visit
(_n_id
)
7745 redef class AExternCalls
7746 init init_aexterncalls
(
7747 n_kwimport
: nullable TKwimport,
7748 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7751 _n_kwimport
= n_kwimport
.as(not null)
7752 n_kwimport
.parent
= self
7753 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7756 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7758 if _n_kwimport
== old_child
then
7759 n_kwimport
= new_child
.as(TKwimport)
7762 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7765 redef fun n_kwimport
=(node
)
7772 redef fun visit_all
(v
: Visitor)
7774 v
.enter_visit
(_n_kwimport
)
7775 n_extern_calls
.visit_all
(v
)
7778 redef class AExternCall
7779 init init_aexterncall
7783 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7789 redef fun visit_all
(v
: Visitor)
7793 redef class ASuperExternCall
7794 init init_asuperexterncall
(
7795 n_kwsuper
: nullable TKwsuper
7798 _n_kwsuper
= n_kwsuper
.as(not null)
7799 n_kwsuper
.parent
= self
7802 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7804 if _n_kwsuper
== old_child
then
7805 n_kwsuper
= new_child
.as(TKwsuper)
7810 redef fun n_kwsuper
=(node
)
7817 redef fun visit_all
(v
: Visitor)
7819 v
.enter_visit
(_n_kwsuper
)
7822 redef class ALocalPropExternCall
7823 init init_alocalpropexterncall
(
7824 n_methid
: nullable AMethid
7827 _n_methid
= n_methid
.as(not null)
7828 n_methid
.parent
= self
7831 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7833 if _n_methid
== old_child
then
7834 n_methid
= new_child
.as(AMethid)
7839 redef fun n_methid
=(node
)
7846 redef fun visit_all
(v
: Visitor)
7848 v
.enter_visit
(_n_methid
)
7851 redef class AFullPropExternCall
7852 init init_afullpropexterncall
(
7853 n_type
: nullable AType,
7854 n_dot
: nullable TDot,
7855 n_methid
: nullable AMethid
7858 _n_type
= n_type
.as(not null)
7859 n_type
.parent
= self
7861 if n_dot
!= null then n_dot
.parent
= self
7862 _n_methid
= n_methid
.as(not null)
7863 n_methid
.parent
= self
7866 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7868 if _n_type
== old_child
then
7869 n_type
= new_child
.as(AType)
7872 if _n_dot
== old_child
then
7873 n_dot
= new_child
.as(nullable TDot)
7876 if _n_methid
== old_child
then
7877 n_methid
= new_child
.as(AMethid)
7882 redef fun n_type
=(node
)
7887 redef fun n_dot
=(node
)
7890 if node
!= null then node
.parent
= self
7892 redef fun n_methid
=(node
)
7899 redef fun visit_all
(v
: Visitor)
7901 v
.enter_visit
(_n_type
)
7902 v
.enter_visit
(_n_dot
)
7903 v
.enter_visit
(_n_methid
)
7906 redef class AInitPropExternCall
7907 init init_ainitpropexterncall
(
7908 n_type
: nullable AType
7911 _n_type
= n_type
.as(not null)
7912 n_type
.parent
= self
7915 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7917 if _n_type
== old_child
then
7918 n_type
= new_child
.as(AType)
7923 redef fun n_type
=(node
)
7930 redef fun visit_all
(v
: Visitor)
7932 v
.enter_visit
(_n_type
)
7935 redef class ACastAsExternCall
7936 init init_acastasexterncall
(
7937 n_from_type
: nullable AType,
7938 n_dot
: nullable TDot,
7939 n_kwas
: nullable TKwas,
7940 n_to_type
: nullable AType
7943 _n_from_type
= n_from_type
.as(not null)
7944 n_from_type
.parent
= self
7946 if n_dot
!= null then n_dot
.parent
= self
7947 _n_kwas
= n_kwas
.as(not null)
7948 n_kwas
.parent
= self
7949 _n_to_type
= n_to_type
.as(not null)
7950 n_to_type
.parent
= self
7953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7955 if _n_from_type
== old_child
then
7956 n_from_type
= new_child
.as(AType)
7959 if _n_dot
== old_child
then
7960 n_dot
= new_child
.as(nullable TDot)
7963 if _n_kwas
== old_child
then
7964 n_kwas
= new_child
.as(TKwas)
7967 if _n_to_type
== old_child
then
7968 n_to_type
= new_child
.as(AType)
7973 redef fun n_from_type
=(node
)
7978 redef fun n_dot
=(node
)
7981 if node
!= null then node
.parent
= self
7983 redef fun n_kwas
=(node
)
7988 redef fun n_to_type
=(node
)
7995 redef fun visit_all
(v
: Visitor)
7997 v
.enter_visit
(_n_from_type
)
7998 v
.enter_visit
(_n_dot
)
7999 v
.enter_visit
(_n_kwas
)
8000 v
.enter_visit
(_n_to_type
)
8003 redef class AAsNullableExternCall
8004 init init_aasnullableexterncall
(
8005 n_type
: nullable AType,
8006 n_kwas
: nullable TKwas,
8007 n_kwnullable
: nullable TKwnullable
8010 _n_type
= n_type
.as(not null)
8011 n_type
.parent
= self
8012 _n_kwas
= n_kwas
.as(not null)
8013 n_kwas
.parent
= self
8014 _n_kwnullable
= n_kwnullable
.as(not null)
8015 n_kwnullable
.parent
= self
8018 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8020 if _n_type
== old_child
then
8021 n_type
= new_child
.as(AType)
8024 if _n_kwas
== old_child
then
8025 n_kwas
= new_child
.as(TKwas)
8028 if _n_kwnullable
== old_child
then
8029 n_kwnullable
= new_child
.as(TKwnullable)
8034 redef fun n_type
=(node
)
8039 redef fun n_kwas
=(node
)
8044 redef fun n_kwnullable
=(node
)
8046 _n_kwnullable
= node
8051 redef fun visit_all
(v
: Visitor)
8053 v
.enter_visit
(_n_type
)
8054 v
.enter_visit
(_n_kwas
)
8055 v
.enter_visit
(_n_kwnullable
)
8058 redef class AAsNotNullableExternCall
8059 init init_aasnotnullableexterncall
(
8060 n_type
: nullable AType,
8061 n_kwas
: nullable TKwas,
8062 n_kwnot
: nullable TKwnot,
8063 n_kwnullable
: nullable TKwnullable
8066 _n_type
= n_type
.as(not null)
8067 n_type
.parent
= self
8068 _n_kwas
= n_kwas
.as(not null)
8069 n_kwas
.parent
= self
8070 _n_kwnot
= n_kwnot
.as(not null)
8071 n_kwnot
.parent
= self
8072 _n_kwnullable
= n_kwnullable
.as(not null)
8073 n_kwnullable
.parent
= self
8076 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8078 if _n_type
== old_child
then
8079 n_type
= new_child
.as(AType)
8082 if _n_kwas
== old_child
then
8083 n_kwas
= new_child
.as(TKwas)
8086 if _n_kwnot
== old_child
then
8087 n_kwnot
= new_child
.as(TKwnot)
8090 if _n_kwnullable
== old_child
then
8091 n_kwnullable
= new_child
.as(TKwnullable)
8096 redef fun n_type
=(node
)
8101 redef fun n_kwas
=(node
)
8106 redef fun n_kwnot
=(node
)
8111 redef fun n_kwnullable
=(node
)
8113 _n_kwnullable
= node
8118 redef fun visit_all
(v
: Visitor)
8120 v
.enter_visit
(_n_type
)
8121 v
.enter_visit
(_n_kwas
)
8122 v
.enter_visit
(_n_kwnot
)
8123 v
.enter_visit
(_n_kwnullable
)
8126 redef class AInLanguage
8127 init init_ainlanguage
(
8128 n_kwin
: nullable TKwin,
8129 n_string
: nullable TString
8132 _n_kwin
= n_kwin
.as(not null)
8133 n_kwin
.parent
= self
8134 _n_string
= n_string
.as(not null)
8135 n_string
.parent
= self
8138 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8140 if _n_kwin
== old_child
then
8141 n_kwin
= new_child
.as(TKwin)
8144 if _n_string
== old_child
then
8145 n_string
= new_child
.as(TString)
8150 redef fun n_kwin
=(node
)
8155 redef fun n_string
=(node
)
8162 redef fun visit_all
(v
: Visitor)
8164 v
.enter_visit
(_n_kwin
)
8165 v
.enter_visit
(_n_string
)
8168 redef class AExternCodeBlock
8169 init init_aexterncodeblock
(
8170 n_in_language
: nullable AInLanguage,
8171 n_extern_code_segment
: nullable TExternCodeSegment
8174 _n_in_language
= n_in_language
8175 if n_in_language
!= null then n_in_language
.parent
= self
8176 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8177 n_extern_code_segment
.parent
= self
8180 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8182 if _n_in_language
== old_child
then
8183 n_in_language
= new_child
.as(nullable AInLanguage)
8186 if _n_extern_code_segment
== old_child
then
8187 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8192 redef fun n_in_language
=(node
)
8194 _n_in_language
= node
8195 if node
!= null then node
.parent
= self
8197 redef fun n_extern_code_segment
=(node
)
8199 _n_extern_code_segment
= node
8204 redef fun visit_all
(v
: Visitor)
8206 v
.enter_visit
(_n_in_language
)
8207 v
.enter_visit
(_n_extern_code_segment
)
8210 redef class AQualified
8211 init init_aqualified
(
8212 n_id
: Collection[Object], # Should be Collection[TId]
8213 n_classid
: nullable TClassid
8216 self.n_id
.unsafe_add_all
(n_id
)
8217 _n_classid
= n_classid
8218 if n_classid
!= null then n_classid
.parent
= self
8221 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8223 if n_id
.replace_child
(old_child
, new_child
) then return
8224 if _n_classid
== old_child
then
8225 n_classid
= new_child
.as(nullable TClassid)
8230 redef fun n_classid
=(node
)
8233 if node
!= null then node
.parent
= self
8237 redef fun visit_all
(v
: Visitor)
8240 v
.enter_visit
(_n_classid
)
8245 n_comment
: Collection[Object] # Should be Collection[TComment]
8248 self.n_comment
.unsafe_add_all
(n_comment
)
8251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8253 if n_comment
.replace_child
(old_child
, new_child
) then return
8258 redef fun visit_all
(v
: Visitor)
8260 n_comment
.visit_all
(v
)
8263 redef class AAnnotations
8264 init init_aannotations
(
8265 n_kwis
: nullable TKwis,
8267 n_opar
: nullable TOpar,
8268 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8269 n_cpar
: nullable TCpar,
8270 n_kwend
: nullable TKwend
8274 if n_kwis
!= null then n_kwis
.parent
= self
8276 if n_at
!= null then n_at
.parent
= self
8278 if n_opar
!= null then n_opar
.parent
= self
8279 self.n_items
.unsafe_add_all
(n_items
)
8281 if n_cpar
!= null then n_cpar
.parent
= self
8283 if n_kwend
!= null then n_kwend
.parent
= self
8286 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8288 if _n_kwis
== old_child
then
8289 n_kwis
= new_child
.as(nullable TKwis)
8292 if _n_at
== old_child
then
8293 n_at
= new_child
.as(nullable TAt)
8296 if _n_opar
== old_child
then
8297 n_opar
= new_child
.as(nullable TOpar)
8300 if n_items
.replace_child
(old_child
, new_child
) then return
8301 if _n_cpar
== old_child
then
8302 n_cpar
= new_child
.as(nullable TCpar)
8305 if _n_kwend
== old_child
then
8306 n_kwend
= new_child
.as(nullable TKwend)
8311 redef fun n_kwis
=(node
)
8314 if node
!= null then node
.parent
= self
8316 redef fun n_at
=(node
)
8319 if node
!= null then node
.parent
= self
8321 redef fun n_opar
=(node
)
8324 if node
!= null then node
.parent
= self
8326 redef fun n_cpar
=(node
)
8329 if node
!= null then node
.parent
= self
8331 redef fun n_kwend
=(node
)
8334 if node
!= null then node
.parent
= self
8338 redef fun visit_all
(v
: Visitor)
8340 v
.enter_visit
(_n_kwis
)
8341 v
.enter_visit
(_n_at
)
8342 v
.enter_visit
(_n_opar
)
8343 n_items
.visit_all
(v
)
8344 v
.enter_visit
(_n_cpar
)
8345 v
.enter_visit
(_n_kwend
)
8348 redef class AAnnotation
8349 init init_aannotation
(
8350 n_doc
: nullable ADoc,
8351 n_kwredef
: nullable TKwredef,
8352 n_visibility
: nullable AVisibility,
8353 n_atid
: nullable AAtid,
8354 n_opar
: nullable TOpar,
8355 n_args
: Collection[Object], # Should be Collection[AExpr]
8356 n_cpar
: nullable TCpar,
8357 n_annotations
: nullable AAnnotations
8361 if n_doc
!= null then n_doc
.parent
= self
8362 _n_kwredef
= n_kwredef
8363 if n_kwredef
!= null then n_kwredef
.parent
= self
8364 _n_visibility
= n_visibility
8365 if n_visibility
!= null then n_visibility
.parent
= self
8366 _n_atid
= n_atid
.as(not null)
8367 n_atid
.parent
= self
8369 if n_opar
!= null then n_opar
.parent
= self
8370 self.n_args
.unsafe_add_all
(n_args
)
8372 if n_cpar
!= null then n_cpar
.parent
= self
8373 _n_annotations
= n_annotations
8374 if n_annotations
!= null then n_annotations
.parent
= self
8377 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8379 if _n_doc
== old_child
then
8380 n_doc
= new_child
.as(nullable ADoc)
8383 if _n_kwredef
== old_child
then
8384 n_kwredef
= new_child
.as(nullable TKwredef)
8387 if _n_visibility
== old_child
then
8388 n_visibility
= new_child
.as(nullable AVisibility)
8391 if _n_atid
== old_child
then
8392 n_atid
= new_child
.as(AAtid)
8395 if _n_opar
== old_child
then
8396 n_opar
= new_child
.as(nullable TOpar)
8399 if n_args
.replace_child
(old_child
, new_child
) then return
8400 if _n_cpar
== old_child
then
8401 n_cpar
= new_child
.as(nullable TCpar)
8404 if _n_annotations
== old_child
then
8405 n_annotations
= new_child
.as(nullable AAnnotations)
8410 redef fun n_doc
=(node
)
8413 if node
!= null then node
.parent
= self
8415 redef fun n_kwredef
=(node
)
8418 if node
!= null then node
.parent
= self
8420 redef fun n_visibility
=(node
)
8422 _n_visibility
= node
8423 if node
!= null then node
.parent
= self
8425 redef fun n_atid
=(node
)
8430 redef fun n_opar
=(node
)
8433 if node
!= null then node
.parent
= self
8435 redef fun n_cpar
=(node
)
8438 if node
!= null then node
.parent
= self
8440 redef fun n_annotations
=(node
)
8442 _n_annotations
= node
8443 if node
!= null then node
.parent
= self
8447 redef fun visit_all
(v
: Visitor)
8449 v
.enter_visit
(_n_doc
)
8450 v
.enter_visit
(_n_kwredef
)
8451 v
.enter_visit
(_n_visibility
)
8452 v
.enter_visit
(_n_atid
)
8453 v
.enter_visit
(_n_opar
)
8455 v
.enter_visit
(_n_cpar
)
8456 v
.enter_visit
(_n_annotations
)
8464 _n_id
= n_id
.as(not null)
8468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8470 if _n_id
== old_child
then
8471 n_id
= new_child
.as(TId)
8476 redef fun n_id
=(node
)
8483 redef fun visit_all
(v
: Visitor)
8485 v
.enter_visit
(_n_id
)
8488 redef class AKwexternAtid
8489 init init_akwexternatid
(
8490 n_id
: nullable TKwextern
8493 _n_id
= n_id
.as(not null)
8497 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8499 if _n_id
== old_child
then
8500 n_id
= new_child
.as(TKwextern)
8505 redef fun n_id
=(node
)
8512 redef fun visit_all
(v
: Visitor)
8514 v
.enter_visit
(_n_id
)
8517 redef class AKwabstractAtid
8518 init init_akwabstractatid
(
8519 n_id
: nullable TKwabstract
8522 _n_id
= n_id
.as(not null)
8526 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8528 if _n_id
== old_child
then
8529 n_id
= new_child
.as(TKwabstract)
8534 redef fun n_id
=(node
)
8541 redef fun visit_all
(v
: Visitor)
8543 v
.enter_visit
(_n_id
)
8546 redef class AKwimportAtid
8547 init init_akwimportatid
(
8548 n_id
: nullable TKwimport
8551 _n_id
= n_id
.as(not null)
8555 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8557 if _n_id
== old_child
then
8558 n_id
= new_child
.as(TKwimport)
8563 redef fun n_id
=(node
)
8570 redef fun visit_all
(v
: Visitor)
8572 v
.enter_visit
(_n_id
)
8577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8579 if _n_base
== old_child
then
8580 if new_child
== null then
8582 new_child
.parent
= self
8583 assert new_child
isa AModule
8586 old_child
.parent
= null
8591 redef fun visit_all
(v
: Visitor)
8593 if _n_base
!= null then
8594 v
.enter_visit
(_n_base
.as(not null))
8596 v
.enter_visit
(_n_eof
)