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_qid
: nullable AQclassid,
390 n_obra
: nullable TObra,
391 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
392 n_cbra
: nullable TCbra,
393 n_extern_code_block
: nullable AExternCodeBlock,
394 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
395 n_kwend
: nullable TKwend
399 if n_doc
!= null then n_doc
.parent
= self
400 _n_kwredef
= n_kwredef
401 if n_kwredef
!= null then n_kwredef
.parent
= self
402 _n_visibility
= n_visibility
.as(not null)
403 n_visibility
.parent
= self
404 _n_classkind
= n_classkind
.as(not null)
405 n_classkind
.parent
= self
407 if n_qid
!= null then n_qid
.parent
= self
409 if n_obra
!= null then n_obra
.parent
= self
410 self.n_formaldefs
.unsafe_add_all
(n_formaldefs
)
412 if n_cbra
!= null then n_cbra
.parent
= self
413 _n_extern_code_block
= n_extern_code_block
414 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
415 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
416 _n_kwend
= n_kwend
.as(not null)
417 n_kwend
.parent
= self
420 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
422 if _n_doc
== old_child
then
423 n_doc
= new_child
.as(nullable ADoc)
426 if _n_kwredef
== old_child
then
427 n_kwredef
= new_child
.as(nullable TKwredef)
430 if _n_visibility
== old_child
then
431 n_visibility
= new_child
.as(AVisibility)
434 if _n_classkind
== old_child
then
435 n_classkind
= new_child
.as(AClasskind)
438 if _n_qid
== old_child
then
439 n_qid
= new_child
.as(nullable AQclassid)
442 if _n_obra
== old_child
then
443 n_obra
= new_child
.as(nullable TObra)
446 if n_formaldefs
.replace_child
(old_child
, new_child
) then return
447 if _n_cbra
== old_child
then
448 n_cbra
= new_child
.as(nullable TCbra)
451 if _n_extern_code_block
== old_child
then
452 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
455 if n_propdefs
.replace_child
(old_child
, new_child
) then return
456 if _n_kwend
== old_child
then
457 n_kwend
= new_child
.as(TKwend)
462 redef fun n_doc
=(node
)
465 if node
!= null then node
.parent
= self
467 redef fun n_kwredef
=(node
)
470 if node
!= null then node
.parent
= self
472 redef fun n_visibility
=(node
)
477 redef fun n_classkind
=(node
)
482 redef fun n_qid
=(node
)
485 if node
!= null then node
.parent
= self
487 redef fun n_obra
=(node
)
490 if node
!= null then node
.parent
= self
492 redef fun n_cbra
=(node
)
495 if node
!= null then node
.parent
= self
497 redef fun n_extern_code_block
=(node
)
499 _n_extern_code_block
= node
500 if node
!= null then node
.parent
= self
502 redef fun n_kwend
=(node
)
509 redef fun visit_all
(v
: Visitor)
511 v
.enter_visit
(_n_doc
)
512 v
.enter_visit
(_n_kwredef
)
513 v
.enter_visit
(_n_visibility
)
514 v
.enter_visit
(_n_classkind
)
515 v
.enter_visit
(_n_qid
)
516 v
.enter_visit
(_n_obra
)
517 n_formaldefs
.visit_all
(v
)
518 v
.enter_visit
(_n_cbra
)
519 v
.enter_visit
(_n_extern_code_block
)
520 n_propdefs
.visit_all
(v
)
521 v
.enter_visit
(_n_kwend
)
524 redef class ATopClassdef
525 init init_atopclassdef
(
526 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
529 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
532 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
534 if n_propdefs
.replace_child
(old_child
, new_child
) then return
539 redef fun visit_all
(v
: Visitor)
541 n_propdefs
.visit_all
(v
)
544 redef class AMainClassdef
545 init init_amainclassdef
(
546 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
549 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
554 if n_propdefs
.replace_child
(old_child
, new_child
) then return
559 redef fun visit_all
(v
: Visitor)
561 n_propdefs
.visit_all
(v
)
564 redef class AConcreteClasskind
565 init init_aconcreteclasskind
(
566 n_kwclass
: nullable TKwclass
569 _n_kwclass
= n_kwclass
.as(not null)
570 n_kwclass
.parent
= self
573 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
575 if _n_kwclass
== old_child
then
576 n_kwclass
= new_child
.as(TKwclass)
581 redef fun n_kwclass
=(node
)
588 redef fun visit_all
(v
: Visitor)
590 v
.enter_visit
(_n_kwclass
)
593 redef class AAbstractClasskind
594 init init_aabstractclasskind
(
595 n_kwabstract
: nullable TKwabstract,
596 n_kwclass
: nullable TKwclass
599 _n_kwabstract
= n_kwabstract
.as(not null)
600 n_kwabstract
.parent
= self
601 _n_kwclass
= n_kwclass
.as(not null)
602 n_kwclass
.parent
= self
605 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
607 if _n_kwabstract
== old_child
then
608 n_kwabstract
= new_child
.as(TKwabstract)
611 if _n_kwclass
== old_child
then
612 n_kwclass
= new_child
.as(TKwclass)
617 redef fun n_kwabstract
=(node
)
622 redef fun n_kwclass
=(node
)
629 redef fun visit_all
(v
: Visitor)
631 v
.enter_visit
(_n_kwabstract
)
632 v
.enter_visit
(_n_kwclass
)
635 redef class AInterfaceClasskind
636 init init_ainterfaceclasskind
(
637 n_kwinterface
: nullable TKwinterface
640 _n_kwinterface
= n_kwinterface
.as(not null)
641 n_kwinterface
.parent
= self
644 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
646 if _n_kwinterface
== old_child
then
647 n_kwinterface
= new_child
.as(TKwinterface)
652 redef fun n_kwinterface
=(node
)
654 _n_kwinterface
= node
659 redef fun visit_all
(v
: Visitor)
661 v
.enter_visit
(_n_kwinterface
)
664 redef class AEnumClasskind
665 init init_aenumclasskind
(
666 n_kwenum
: nullable TKwenum
669 _n_kwenum
= n_kwenum
.as(not null)
670 n_kwenum
.parent
= self
673 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
675 if _n_kwenum
== old_child
then
676 n_kwenum
= new_child
.as(TKwenum)
681 redef fun n_kwenum
=(node
)
688 redef fun visit_all
(v
: Visitor)
690 v
.enter_visit
(_n_kwenum
)
693 redef class AExternClasskind
694 init init_aexternclasskind
(
695 n_kwextern
: nullable TKwextern,
696 n_kwclass
: nullable TKwclass
699 _n_kwextern
= n_kwextern
.as(not null)
700 n_kwextern
.parent
= self
701 _n_kwclass
= n_kwclass
702 if n_kwclass
!= null then n_kwclass
.parent
= self
705 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
707 if _n_kwextern
== old_child
then
708 n_kwextern
= new_child
.as(TKwextern)
711 if _n_kwclass
== old_child
then
712 n_kwclass
= new_child
.as(nullable TKwclass)
717 redef fun n_kwextern
=(node
)
722 redef fun n_kwclass
=(node
)
725 if node
!= null then node
.parent
= self
729 redef fun visit_all
(v
: Visitor)
731 v
.enter_visit
(_n_kwextern
)
732 v
.enter_visit
(_n_kwclass
)
735 redef class AFormaldef
736 init init_aformaldef
(
737 n_id
: nullable TClassid,
738 n_type
: nullable AType,
739 n_annotations
: nullable AAnnotations
742 _n_id
= n_id
.as(not null)
745 if n_type
!= null then n_type
.parent
= self
746 _n_annotations
= n_annotations
747 if n_annotations
!= null then n_annotations
.parent
= self
750 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
752 if _n_id
== old_child
then
753 n_id
= new_child
.as(TClassid)
756 if _n_type
== old_child
then
757 n_type
= new_child
.as(nullable AType)
760 if _n_annotations
== old_child
then
761 n_annotations
= new_child
.as(nullable AAnnotations)
766 redef fun n_id
=(node
)
771 redef fun n_type
=(node
)
774 if node
!= null then node
.parent
= self
776 redef fun n_annotations
=(node
)
778 _n_annotations
= node
779 if node
!= null then node
.parent
= self
783 redef fun visit_all
(v
: Visitor)
786 v
.enter_visit
(_n_type
)
787 v
.enter_visit
(_n_annotations
)
790 redef class AAttrPropdef
791 init init_aattrpropdef
(
792 n_doc
: nullable ADoc,
793 n_kwredef
: nullable TKwredef,
794 n_visibility
: nullable AVisibility,
795 n_kwvar
: nullable TKwvar,
797 n_type
: nullable AType,
798 n_assign
: nullable TAssign,
799 n_expr
: nullable AExpr,
800 n_annotations
: nullable AAnnotations,
801 n_kwdo
: nullable TKwdo,
802 n_block
: nullable AExpr,
803 n_kwend
: nullable TKwend
807 if n_doc
!= null then n_doc
.parent
= self
808 _n_kwredef
= n_kwredef
809 if n_kwredef
!= null then n_kwredef
.parent
= self
810 _n_visibility
= n_visibility
.as(not null)
811 n_visibility
.parent
= self
812 _n_kwvar
= n_kwvar
.as(not null)
813 n_kwvar
.parent
= self
814 _n_id2
= n_id2
.as(not null)
817 if n_type
!= null then n_type
.parent
= self
819 if n_assign
!= null then n_assign
.parent
= self
821 if n_expr
!= null then n_expr
.parent
= self
822 _n_annotations
= n_annotations
823 if n_annotations
!= null then n_annotations
.parent
= self
825 if n_kwdo
!= null then n_kwdo
.parent
= self
827 if n_block
!= null then n_block
.parent
= self
829 if n_kwend
!= null then n_kwend
.parent
= self
832 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
834 if _n_doc
== old_child
then
835 n_doc
= new_child
.as(nullable ADoc)
838 if _n_kwredef
== old_child
then
839 n_kwredef
= new_child
.as(nullable TKwredef)
842 if _n_visibility
== old_child
then
843 n_visibility
= new_child
.as(AVisibility)
846 if _n_kwvar
== old_child
then
847 n_kwvar
= new_child
.as(TKwvar)
850 if _n_id2
== old_child
then
851 n_id2
= new_child
.as(TId)
854 if _n_type
== old_child
then
855 n_type
= new_child
.as(nullable AType)
858 if _n_assign
== old_child
then
859 n_assign
= new_child
.as(nullable TAssign)
862 if _n_expr
== old_child
then
863 n_expr
= new_child
.as(nullable AExpr)
866 if _n_annotations
== old_child
then
867 n_annotations
= new_child
.as(nullable AAnnotations)
870 if _n_kwdo
== old_child
then
871 n_kwdo
= new_child
.as(nullable TKwdo)
874 if _n_block
== old_child
then
875 n_block
= new_child
.as(nullable AExpr)
878 if _n_kwend
== old_child
then
879 n_kwend
= new_child
.as(nullable TKwend)
884 redef fun n_doc
=(node
)
887 if node
!= null then node
.parent
= self
889 redef fun n_kwredef
=(node
)
892 if node
!= null then node
.parent
= self
894 redef fun n_visibility
=(node
)
899 redef fun n_kwvar
=(node
)
904 redef fun n_id2
=(node
)
909 redef fun n_type
=(node
)
912 if node
!= null then node
.parent
= self
914 redef fun n_assign
=(node
)
917 if node
!= null then node
.parent
= self
919 redef fun n_expr
=(node
)
922 if node
!= null then node
.parent
= self
924 redef fun n_annotations
=(node
)
926 _n_annotations
= node
927 if node
!= null then node
.parent
= self
929 redef fun n_kwdo
=(node
)
932 if node
!= null then node
.parent
= self
934 redef fun n_block
=(node
)
937 if node
!= null then node
.parent
= self
939 redef fun n_kwend
=(node
)
942 if node
!= null then node
.parent
= self
946 redef fun visit_all
(v
: Visitor)
948 v
.enter_visit
(_n_doc
)
949 v
.enter_visit
(_n_kwredef
)
950 v
.enter_visit
(_n_visibility
)
951 v
.enter_visit
(_n_kwvar
)
952 v
.enter_visit
(_n_id2
)
953 v
.enter_visit
(_n_type
)
954 v
.enter_visit
(_n_assign
)
955 v
.enter_visit
(_n_expr
)
956 v
.enter_visit
(_n_annotations
)
957 v
.enter_visit
(_n_kwdo
)
958 v
.enter_visit
(_n_block
)
959 v
.enter_visit
(_n_kwend
)
962 redef class AMainMethPropdef
963 init init_amainmethpropdef
(
964 n_kwredef
: nullable TKwredef,
965 n_block
: nullable AExpr
968 _n_kwredef
= n_kwredef
969 if n_kwredef
!= null then n_kwredef
.parent
= self
971 if n_block
!= null then n_block
.parent
= self
974 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
976 if _n_kwredef
== old_child
then
977 n_kwredef
= new_child
.as(nullable TKwredef)
980 if _n_block
== old_child
then
981 n_block
= new_child
.as(nullable AExpr)
986 redef fun n_kwredef
=(node
)
989 if node
!= null then node
.parent
= self
991 redef fun n_block
=(node
)
994 if node
!= null then node
.parent
= self
998 redef fun visit_all
(v
: Visitor)
1000 v
.enter_visit
(_n_kwredef
)
1001 v
.enter_visit
(_n_block
)
1004 redef class ATypePropdef
1005 init init_atypepropdef
(
1006 n_doc
: nullable ADoc,
1007 n_kwredef
: nullable TKwredef,
1008 n_visibility
: nullable AVisibility,
1009 n_kwtype
: nullable TKwtype,
1010 n_qid
: nullable AQclassid,
1011 n_type
: nullable AType,
1012 n_annotations
: nullable AAnnotations
1016 if n_doc
!= null then n_doc
.parent
= self
1017 _n_kwredef
= n_kwredef
1018 if n_kwredef
!= null then n_kwredef
.parent
= self
1019 _n_visibility
= n_visibility
.as(not null)
1020 n_visibility
.parent
= self
1021 _n_kwtype
= n_kwtype
.as(not null)
1022 n_kwtype
.parent
= self
1023 _n_qid
= n_qid
.as(not null)
1025 _n_type
= n_type
.as(not null)
1026 n_type
.parent
= self
1027 _n_annotations
= n_annotations
1028 if n_annotations
!= null then n_annotations
.parent
= self
1031 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1033 if _n_doc
== old_child
then
1034 n_doc
= new_child
.as(nullable ADoc)
1037 if _n_kwredef
== old_child
then
1038 n_kwredef
= new_child
.as(nullable TKwredef)
1041 if _n_visibility
== old_child
then
1042 n_visibility
= new_child
.as(AVisibility)
1045 if _n_kwtype
== old_child
then
1046 n_kwtype
= new_child
.as(TKwtype)
1049 if _n_qid
== old_child
then
1050 n_qid
= new_child
.as(AQclassid)
1053 if _n_type
== old_child
then
1054 n_type
= new_child
.as(AType)
1057 if _n_annotations
== old_child
then
1058 n_annotations
= new_child
.as(nullable AAnnotations)
1063 redef fun n_doc
=(node
)
1066 if node
!= null then node
.parent
= self
1068 redef fun n_kwredef
=(node
)
1071 if node
!= null then node
.parent
= self
1073 redef fun n_visibility
=(node
)
1075 _n_visibility
= node
1078 redef fun n_kwtype
=(node
)
1083 redef fun n_qid
=(node
)
1088 redef fun n_type
=(node
)
1093 redef fun n_annotations
=(node
)
1095 _n_annotations
= node
1096 if node
!= null then node
.parent
= self
1100 redef fun visit_all
(v
: Visitor)
1102 v
.enter_visit
(_n_doc
)
1103 v
.enter_visit
(_n_kwredef
)
1104 v
.enter_visit
(_n_visibility
)
1105 v
.enter_visit
(_n_kwtype
)
1106 v
.enter_visit
(_n_qid
)
1107 v
.enter_visit
(_n_type
)
1108 v
.enter_visit
(_n_annotations
)
1111 redef class AMethPropdef
1112 init init_amethpropdef
(
1113 n_doc
: nullable ADoc,
1114 n_kwredef
: nullable TKwredef,
1115 n_visibility
: nullable AVisibility,
1116 n_kwmeth
: nullable TKwmeth,
1117 n_kwinit
: nullable TKwinit,
1118 n_kwnew
: nullable TKwnew,
1119 n_methid
: nullable AMethid,
1120 n_signature
: nullable ASignature,
1121 n_annotations
: nullable AAnnotations,
1122 n_extern_calls
: nullable AExternCalls,
1123 n_extern_code_block
: nullable AExternCodeBlock,
1124 n_kwdo
: nullable TKwdo,
1125 n_block
: nullable AExpr,
1126 n_kwend
: nullable TKwend
1130 if n_doc
!= null then n_doc
.parent
= self
1131 _n_kwredef
= n_kwredef
1132 if n_kwredef
!= null then n_kwredef
.parent
= self
1133 _n_visibility
= n_visibility
.as(not null)
1134 n_visibility
.parent
= self
1135 _n_kwmeth
= n_kwmeth
1136 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1137 _n_kwinit
= n_kwinit
1138 if n_kwinit
!= null then n_kwinit
.parent
= self
1140 if n_kwnew
!= null then n_kwnew
.parent
= self
1141 _n_methid
= n_methid
1142 if n_methid
!= null then n_methid
.parent
= self
1143 _n_signature
= n_signature
.as(not null)
1144 n_signature
.parent
= self
1145 _n_annotations
= n_annotations
1146 if n_annotations
!= null then n_annotations
.parent
= self
1147 _n_extern_calls
= n_extern_calls
1148 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1149 _n_extern_code_block
= n_extern_code_block
1150 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1152 if n_kwdo
!= null then n_kwdo
.parent
= self
1154 if n_block
!= null then n_block
.parent
= self
1156 if n_kwend
!= null then n_kwend
.parent
= self
1159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1161 if _n_doc
== old_child
then
1162 n_doc
= new_child
.as(nullable ADoc)
1165 if _n_kwredef
== old_child
then
1166 n_kwredef
= new_child
.as(nullable TKwredef)
1169 if _n_visibility
== old_child
then
1170 n_visibility
= new_child
.as(AVisibility)
1173 if _n_kwmeth
== old_child
then
1174 n_kwmeth
= new_child
.as(nullable TKwmeth)
1177 if _n_kwinit
== old_child
then
1178 n_kwinit
= new_child
.as(nullable TKwinit)
1181 if _n_kwnew
== old_child
then
1182 n_kwnew
= new_child
.as(nullable TKwnew)
1185 if _n_methid
== old_child
then
1186 n_methid
= new_child
.as(nullable AMethid)
1189 if _n_signature
== old_child
then
1190 n_signature
= new_child
.as(ASignature)
1193 if _n_annotations
== old_child
then
1194 n_annotations
= new_child
.as(nullable AAnnotations)
1197 if _n_extern_calls
== old_child
then
1198 n_extern_calls
= new_child
.as(nullable AExternCalls)
1201 if _n_extern_code_block
== old_child
then
1202 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1205 if _n_kwdo
== old_child
then
1206 n_kwdo
= new_child
.as(nullable TKwdo)
1209 if _n_block
== old_child
then
1210 n_block
= new_child
.as(nullable AExpr)
1213 if _n_kwend
== old_child
then
1214 n_kwend
= new_child
.as(nullable TKwend)
1219 redef fun n_doc
=(node
)
1222 if node
!= null then node
.parent
= self
1224 redef fun n_kwredef
=(node
)
1227 if node
!= null then node
.parent
= self
1229 redef fun n_visibility
=(node
)
1231 _n_visibility
= node
1234 redef fun n_kwmeth
=(node
)
1237 if node
!= null then node
.parent
= self
1239 redef fun n_kwinit
=(node
)
1242 if node
!= null then node
.parent
= self
1244 redef fun n_kwnew
=(node
)
1247 if node
!= null then node
.parent
= self
1249 redef fun n_methid
=(node
)
1252 if node
!= null then node
.parent
= self
1254 redef fun n_signature
=(node
)
1259 redef fun n_annotations
=(node
)
1261 _n_annotations
= node
1262 if node
!= null then node
.parent
= self
1264 redef fun n_extern_calls
=(node
)
1266 _n_extern_calls
= node
1267 if node
!= null then node
.parent
= self
1269 redef fun n_extern_code_block
=(node
)
1271 _n_extern_code_block
= node
1272 if node
!= null then node
.parent
= self
1274 redef fun n_kwdo
=(node
)
1277 if node
!= null then node
.parent
= self
1279 redef fun n_block
=(node
)
1282 if node
!= null then node
.parent
= self
1284 redef fun n_kwend
=(node
)
1287 if node
!= null then node
.parent
= self
1291 redef fun visit_all
(v
: Visitor)
1293 v
.enter_visit
(_n_doc
)
1294 v
.enter_visit
(_n_kwredef
)
1295 v
.enter_visit
(_n_visibility
)
1296 v
.enter_visit
(_n_kwmeth
)
1297 v
.enter_visit
(_n_kwinit
)
1298 v
.enter_visit
(_n_kwnew
)
1299 v
.enter_visit
(_n_methid
)
1300 v
.enter_visit
(_n_signature
)
1301 v
.enter_visit
(_n_annotations
)
1302 v
.enter_visit
(_n_extern_calls
)
1303 v
.enter_visit
(_n_extern_code_block
)
1304 v
.enter_visit
(_n_kwdo
)
1305 v
.enter_visit
(_n_block
)
1306 v
.enter_visit
(_n_kwend
)
1309 redef class ASuperPropdef
1310 init init_asuperpropdef
(
1311 n_doc
: nullable ADoc,
1312 n_kwredef
: nullable TKwredef,
1313 n_visibility
: nullable AVisibility,
1314 n_kwsuper
: nullable TKwsuper,
1315 n_type
: nullable AType,
1316 n_annotations
: nullable AAnnotations
1320 if n_doc
!= null then n_doc
.parent
= self
1321 _n_kwredef
= n_kwredef
1322 if n_kwredef
!= null then n_kwredef
.parent
= self
1323 _n_visibility
= n_visibility
.as(not null)
1324 n_visibility
.parent
= self
1325 _n_kwsuper
= n_kwsuper
.as(not null)
1326 n_kwsuper
.parent
= self
1327 _n_type
= n_type
.as(not null)
1328 n_type
.parent
= self
1329 _n_annotations
= n_annotations
1330 if n_annotations
!= null then n_annotations
.parent
= self
1333 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1335 if _n_doc
== old_child
then
1336 n_doc
= new_child
.as(nullable ADoc)
1339 if _n_kwredef
== old_child
then
1340 n_kwredef
= new_child
.as(nullable TKwredef)
1343 if _n_visibility
== old_child
then
1344 n_visibility
= new_child
.as(AVisibility)
1347 if _n_kwsuper
== old_child
then
1348 n_kwsuper
= new_child
.as(TKwsuper)
1351 if _n_type
== old_child
then
1352 n_type
= new_child
.as(AType)
1355 if _n_annotations
== old_child
then
1356 n_annotations
= new_child
.as(nullable AAnnotations)
1361 redef fun n_doc
=(node
)
1364 if node
!= null then node
.parent
= self
1366 redef fun n_kwredef
=(node
)
1369 if node
!= null then node
.parent
= self
1371 redef fun n_visibility
=(node
)
1373 _n_visibility
= node
1376 redef fun n_kwsuper
=(node
)
1381 redef fun n_type
=(node
)
1386 redef fun n_annotations
=(node
)
1388 _n_annotations
= node
1389 if node
!= null then node
.parent
= self
1393 redef fun visit_all
(v
: Visitor)
1395 v
.enter_visit
(_n_doc
)
1396 v
.enter_visit
(_n_kwredef
)
1397 v
.enter_visit
(_n_visibility
)
1398 v
.enter_visit
(_n_kwsuper
)
1399 v
.enter_visit
(_n_type
)
1400 v
.enter_visit
(_n_annotations
)
1403 redef class AAnnotPropdef
1404 init init_aannotpropdef
(
1405 n_doc
: nullable ADoc,
1406 n_kwredef
: nullable TKwredef,
1407 n_visibility
: nullable AVisibility,
1408 n_atid
: nullable AAtid,
1409 n_opar
: nullable TOpar,
1410 n_args
: Collection[Object], # Should be Collection[AExpr]
1411 n_cpar
: nullable TCpar,
1412 n_annotations
: nullable AAnnotations
1416 if n_doc
!= null then n_doc
.parent
= self
1417 _n_kwredef
= n_kwredef
1418 if n_kwredef
!= null then n_kwredef
.parent
= self
1419 _n_visibility
= n_visibility
1420 if n_visibility
!= null then n_visibility
.parent
= self
1421 _n_atid
= n_atid
.as(not null)
1422 n_atid
.parent
= self
1424 if n_opar
!= null then n_opar
.parent
= self
1425 self.n_args
.unsafe_add_all
(n_args
)
1427 if n_cpar
!= null then n_cpar
.parent
= self
1428 _n_annotations
= n_annotations
1429 if n_annotations
!= null then n_annotations
.parent
= self
1432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1434 if _n_doc
== old_child
then
1435 n_doc
= new_child
.as(nullable ADoc)
1438 if _n_kwredef
== old_child
then
1439 n_kwredef
= new_child
.as(nullable TKwredef)
1442 if _n_visibility
== old_child
then
1443 n_visibility
= new_child
.as(nullable AVisibility)
1446 if _n_atid
== old_child
then
1447 n_atid
= new_child
.as(AAtid)
1450 if _n_opar
== old_child
then
1451 n_opar
= new_child
.as(nullable TOpar)
1454 if n_args
.replace_child
(old_child
, new_child
) then return
1455 if _n_cpar
== old_child
then
1456 n_cpar
= new_child
.as(nullable TCpar)
1459 if _n_annotations
== old_child
then
1460 n_annotations
= new_child
.as(nullable AAnnotations)
1465 redef fun n_doc
=(node
)
1468 if node
!= null then node
.parent
= self
1470 redef fun n_kwredef
=(node
)
1473 if node
!= null then node
.parent
= self
1475 redef fun n_visibility
=(node
)
1477 _n_visibility
= node
1478 if node
!= null then node
.parent
= self
1480 redef fun n_atid
=(node
)
1485 redef fun n_opar
=(node
)
1488 if node
!= null then node
.parent
= self
1490 redef fun n_cpar
=(node
)
1493 if node
!= null then node
.parent
= self
1495 redef fun n_annotations
=(node
)
1497 _n_annotations
= node
1498 if node
!= null then node
.parent
= self
1502 redef fun visit_all
(v
: Visitor)
1504 v
.enter_visit
(_n_doc
)
1505 v
.enter_visit
(_n_kwredef
)
1506 v
.enter_visit
(_n_visibility
)
1507 v
.enter_visit
(_n_atid
)
1508 v
.enter_visit
(_n_opar
)
1510 v
.enter_visit
(_n_cpar
)
1511 v
.enter_visit
(_n_annotations
)
1514 redef class AIdMethid
1515 init init_aidmethid
(
1519 _n_id
= n_id
.as(not null)
1523 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1525 if _n_id
== old_child
then
1526 n_id
= new_child
.as(TId)
1531 redef fun n_id
=(node
)
1538 redef fun visit_all
(v
: Visitor)
1540 v
.enter_visit
(_n_id
)
1543 redef class APlusMethid
1544 init init_aplusmethid
(
1545 n_op
: nullable TPlus
1548 _n_op
= n_op
.as(not null)
1552 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1554 if _n_op
== old_child
then
1555 n_op
= new_child
.as(TPlus)
1560 redef fun n_op
=(node
)
1567 redef fun visit_all
(v
: Visitor)
1569 v
.enter_visit
(_n_op
)
1572 redef class AMinusMethid
1573 init init_aminusmethid
(
1574 n_op
: nullable TMinus
1577 _n_op
= n_op
.as(not null)
1581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1583 if _n_op
== old_child
then
1584 n_op
= new_child
.as(TMinus)
1589 redef fun n_op
=(node
)
1596 redef fun visit_all
(v
: Visitor)
1598 v
.enter_visit
(_n_op
)
1601 redef class AStarMethid
1602 init init_astarmethid
(
1603 n_op
: nullable TStar
1606 _n_op
= n_op
.as(not null)
1610 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1612 if _n_op
== old_child
then
1613 n_op
= new_child
.as(TStar)
1618 redef fun n_op
=(node
)
1625 redef fun visit_all
(v
: Visitor)
1627 v
.enter_visit
(_n_op
)
1630 redef class AStarstarMethid
1631 init init_astarstarmethid
(
1632 n_op
: nullable TStarstar
1635 _n_op
= n_op
.as(not null)
1639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1641 if _n_op
== old_child
then
1642 n_op
= new_child
.as(TStarstar)
1647 redef fun n_op
=(node
)
1654 redef fun visit_all
(v
: Visitor)
1656 v
.enter_visit
(_n_op
)
1659 redef class ASlashMethid
1660 init init_aslashmethid
(
1661 n_op
: nullable TSlash
1664 _n_op
= n_op
.as(not null)
1668 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1670 if _n_op
== old_child
then
1671 n_op
= new_child
.as(TSlash)
1676 redef fun n_op
=(node
)
1683 redef fun visit_all
(v
: Visitor)
1685 v
.enter_visit
(_n_op
)
1688 redef class APercentMethid
1689 init init_apercentmethid
(
1690 n_op
: nullable TPercent
1693 _n_op
= n_op
.as(not null)
1697 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1699 if _n_op
== old_child
then
1700 n_op
= new_child
.as(TPercent)
1705 redef fun n_op
=(node
)
1712 redef fun visit_all
(v
: Visitor)
1714 v
.enter_visit
(_n_op
)
1717 redef class AEqMethid
1718 init init_aeqmethid
(
1722 _n_op
= n_op
.as(not null)
1726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1728 if _n_op
== old_child
then
1729 n_op
= new_child
.as(TEq)
1734 redef fun n_op
=(node
)
1741 redef fun visit_all
(v
: Visitor)
1743 v
.enter_visit
(_n_op
)
1746 redef class ANeMethid
1747 init init_anemethid
(
1751 _n_op
= n_op
.as(not null)
1755 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1757 if _n_op
== old_child
then
1758 n_op
= new_child
.as(TNe)
1763 redef fun n_op
=(node
)
1770 redef fun visit_all
(v
: Visitor)
1772 v
.enter_visit
(_n_op
)
1775 redef class ALeMethid
1776 init init_alemethid
(
1780 _n_op
= n_op
.as(not null)
1784 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1786 if _n_op
== old_child
then
1787 n_op
= new_child
.as(TLe)
1792 redef fun n_op
=(node
)
1799 redef fun visit_all
(v
: Visitor)
1801 v
.enter_visit
(_n_op
)
1804 redef class AGeMethid
1805 init init_agemethid
(
1809 _n_op
= n_op
.as(not null)
1813 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1815 if _n_op
== old_child
then
1816 n_op
= new_child
.as(TGe)
1821 redef fun n_op
=(node
)
1828 redef fun visit_all
(v
: Visitor)
1830 v
.enter_visit
(_n_op
)
1833 redef class ALtMethid
1834 init init_altmethid
(
1838 _n_op
= n_op
.as(not null)
1842 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1844 if _n_op
== old_child
then
1845 n_op
= new_child
.as(TLt)
1850 redef fun n_op
=(node
)
1857 redef fun visit_all
(v
: Visitor)
1859 v
.enter_visit
(_n_op
)
1862 redef class AGtMethid
1863 init init_agtmethid
(
1867 _n_op
= n_op
.as(not null)
1871 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1873 if _n_op
== old_child
then
1874 n_op
= new_child
.as(TGt)
1879 redef fun n_op
=(node
)
1886 redef fun visit_all
(v
: Visitor)
1888 v
.enter_visit
(_n_op
)
1891 redef class ALlMethid
1892 init init_allmethid
(
1896 _n_op
= n_op
.as(not null)
1900 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1902 if _n_op
== old_child
then
1903 n_op
= new_child
.as(TLl)
1908 redef fun n_op
=(node
)
1915 redef fun visit_all
(v
: Visitor)
1917 v
.enter_visit
(_n_op
)
1920 redef class AGgMethid
1921 init init_aggmethid
(
1925 _n_op
= n_op
.as(not null)
1929 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1931 if _n_op
== old_child
then
1932 n_op
= new_child
.as(TGg)
1937 redef fun n_op
=(node
)
1944 redef fun visit_all
(v
: Visitor)
1946 v
.enter_visit
(_n_op
)
1949 redef class AStarshipMethid
1950 init init_astarshipmethid
(
1951 n_op
: nullable TStarship
1954 _n_op
= n_op
.as(not null)
1958 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1960 if _n_op
== old_child
then
1961 n_op
= new_child
.as(TStarship)
1966 redef fun n_op
=(node
)
1973 redef fun visit_all
(v
: Visitor)
1975 v
.enter_visit
(_n_op
)
1978 redef class APipeMethid
1979 init init_apipemethid
(
1980 n_op
: nullable TPipe
1983 _n_op
= n_op
.as(not null)
1987 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1989 if _n_op
== old_child
then
1990 n_op
= new_child
.as(TPipe)
1995 redef fun n_op
=(node
)
2002 redef fun visit_all
(v
: Visitor)
2004 v
.enter_visit
(_n_op
)
2007 redef class ACaretMethid
2008 init init_acaretmethid
(
2009 n_op
: nullable TCaret
2012 _n_op
= n_op
.as(not null)
2016 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2018 if _n_op
== old_child
then
2019 n_op
= new_child
.as(TCaret)
2024 redef fun n_op
=(node
)
2031 redef fun visit_all
(v
: Visitor)
2033 v
.enter_visit
(_n_op
)
2036 redef class AAmpMethid
2037 init init_aampmethid
(
2041 _n_op
= n_op
.as(not null)
2045 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2047 if _n_op
== old_child
then
2048 n_op
= new_child
.as(TAmp)
2053 redef fun n_op
=(node
)
2060 redef fun visit_all
(v
: Visitor)
2062 v
.enter_visit
(_n_op
)
2065 redef class ATildeMethid
2066 init init_atildemethid
(
2067 n_op
: nullable TTilde
2070 _n_op
= n_op
.as(not null)
2074 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2076 if _n_op
== old_child
then
2077 n_op
= new_child
.as(TTilde)
2082 redef fun n_op
=(node
)
2089 redef fun visit_all
(v
: Visitor)
2091 v
.enter_visit
(_n_op
)
2094 redef class ABraMethid
2095 init init_abramethid
(
2096 n_obra
: nullable TObra,
2097 n_cbra
: nullable TCbra
2100 _n_obra
= n_obra
.as(not null)
2101 n_obra
.parent
= self
2102 _n_cbra
= n_cbra
.as(not null)
2103 n_cbra
.parent
= self
2106 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2108 if _n_obra
== old_child
then
2109 n_obra
= new_child
.as(TObra)
2112 if _n_cbra
== old_child
then
2113 n_cbra
= new_child
.as(TCbra)
2118 redef fun n_obra
=(node
)
2123 redef fun n_cbra
=(node
)
2130 redef fun visit_all
(v
: Visitor)
2132 v
.enter_visit
(_n_obra
)
2133 v
.enter_visit
(_n_cbra
)
2136 redef class AAssignMethid
2137 init init_aassignmethid
(
2139 n_assign
: nullable TAssign
2142 _n_id
= n_id
.as(not null)
2144 _n_assign
= n_assign
.as(not null)
2145 n_assign
.parent
= self
2148 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2150 if _n_id
== old_child
then
2151 n_id
= new_child
.as(TId)
2154 if _n_assign
== old_child
then
2155 n_assign
= new_child
.as(TAssign)
2160 redef fun n_id
=(node
)
2165 redef fun n_assign
=(node
)
2172 redef fun visit_all
(v
: Visitor)
2174 v
.enter_visit
(_n_id
)
2175 v
.enter_visit
(_n_assign
)
2178 redef class ABraassignMethid
2179 init init_abraassignmethid
(
2180 n_obra
: nullable TObra,
2181 n_cbra
: nullable TCbra,
2182 n_assign
: nullable TAssign
2185 _n_obra
= n_obra
.as(not null)
2186 n_obra
.parent
= self
2187 _n_cbra
= n_cbra
.as(not null)
2188 n_cbra
.parent
= self
2189 _n_assign
= n_assign
.as(not null)
2190 n_assign
.parent
= self
2193 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2195 if _n_obra
== old_child
then
2196 n_obra
= new_child
.as(TObra)
2199 if _n_cbra
== old_child
then
2200 n_cbra
= new_child
.as(TCbra)
2203 if _n_assign
== old_child
then
2204 n_assign
= new_child
.as(TAssign)
2209 redef fun n_obra
=(node
)
2214 redef fun n_cbra
=(node
)
2219 redef fun n_assign
=(node
)
2226 redef fun visit_all
(v
: Visitor)
2228 v
.enter_visit
(_n_obra
)
2229 v
.enter_visit
(_n_cbra
)
2230 v
.enter_visit
(_n_assign
)
2235 n_qualified
: nullable AQualified,
2239 _n_qualified
= n_qualified
2240 if n_qualified
!= null then n_qualified
.parent
= self
2241 _n_id
= n_id
.as(not null)
2245 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2247 if _n_qualified
== old_child
then
2248 n_qualified
= new_child
.as(nullable AQualified)
2251 if _n_id
== old_child
then
2252 n_id
= new_child
.as(TId)
2257 redef fun n_qualified
=(node
)
2260 if node
!= null then node
.parent
= self
2262 redef fun n_id
=(node
)
2269 redef fun visit_all
(v
: Visitor)
2271 v
.enter_visit
(_n_qualified
)
2272 v
.enter_visit
(_n_id
)
2275 redef class AQclassid
2276 init init_aqclassid
(
2277 n_qualified
: nullable AQualified,
2278 n_id
: nullable TClassid
2281 _n_qualified
= n_qualified
2282 if n_qualified
!= null then n_qualified
.parent
= self
2283 _n_id
= n_id
.as(not null)
2287 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2289 if _n_qualified
== old_child
then
2290 n_qualified
= new_child
.as(nullable AQualified)
2293 if _n_id
== old_child
then
2294 n_id
= new_child
.as(TClassid)
2299 redef fun n_qualified
=(node
)
2302 if node
!= null then node
.parent
= self
2304 redef fun n_id
=(node
)
2311 redef fun visit_all
(v
: Visitor)
2313 v
.enter_visit
(_n_qualified
)
2314 v
.enter_visit
(_n_id
)
2317 redef class ASignature
2318 init init_asignature
(
2319 n_opar
: nullable TOpar,
2320 n_params
: Collection[Object], # Should be Collection[AParam]
2321 n_cpar
: nullable TCpar,
2322 n_type
: nullable AType
2326 if n_opar
!= null then n_opar
.parent
= self
2327 self.n_params
.unsafe_add_all
(n_params
)
2329 if n_cpar
!= null then n_cpar
.parent
= self
2331 if n_type
!= null then n_type
.parent
= self
2334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2336 if _n_opar
== old_child
then
2337 n_opar
= new_child
.as(nullable TOpar)
2340 if n_params
.replace_child
(old_child
, new_child
) then return
2341 if _n_cpar
== old_child
then
2342 n_cpar
= new_child
.as(nullable TCpar)
2345 if _n_type
== old_child
then
2346 n_type
= new_child
.as(nullable AType)
2351 redef fun n_opar
=(node
)
2354 if node
!= null then node
.parent
= self
2356 redef fun n_cpar
=(node
)
2359 if node
!= null then node
.parent
= self
2361 redef fun n_type
=(node
)
2364 if node
!= null then node
.parent
= self
2368 redef fun visit_all
(v
: Visitor)
2370 v
.enter_visit
(_n_opar
)
2371 n_params
.visit_all
(v
)
2372 v
.enter_visit
(_n_cpar
)
2373 v
.enter_visit
(_n_type
)
2379 n_type
: nullable AType,
2380 n_dotdotdot
: nullable TDotdotdot,
2381 n_annotations
: nullable AAnnotations
2384 _n_id
= n_id
.as(not null)
2387 if n_type
!= null then n_type
.parent
= self
2388 _n_dotdotdot
= n_dotdotdot
2389 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2390 _n_annotations
= n_annotations
2391 if n_annotations
!= null then n_annotations
.parent
= self
2394 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2396 if _n_id
== old_child
then
2397 n_id
= new_child
.as(TId)
2400 if _n_type
== old_child
then
2401 n_type
= new_child
.as(nullable AType)
2404 if _n_dotdotdot
== old_child
then
2405 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2408 if _n_annotations
== old_child
then
2409 n_annotations
= new_child
.as(nullable AAnnotations)
2414 redef fun n_id
=(node
)
2419 redef fun n_type
=(node
)
2422 if node
!= null then node
.parent
= self
2424 redef fun n_dotdotdot
=(node
)
2427 if node
!= null then node
.parent
= self
2429 redef fun n_annotations
=(node
)
2431 _n_annotations
= node
2432 if node
!= null then node
.parent
= self
2436 redef fun visit_all
(v
: Visitor)
2438 v
.enter_visit
(_n_id
)
2439 v
.enter_visit
(_n_type
)
2440 v
.enter_visit
(_n_dotdotdot
)
2441 v
.enter_visit
(_n_annotations
)
2446 n_kwnullable
: nullable TKwnullable,
2447 n_qid
: nullable AQclassid,
2448 n_obra
: nullable TObra,
2449 n_types
: Collection[Object], # Should be Collection[AType]
2450 n_cbra
: nullable TCbra,
2451 n_annotations
: nullable AAnnotations
2454 _n_kwnullable
= n_kwnullable
2455 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2456 _n_qid
= n_qid
.as(not null)
2459 if n_obra
!= null then n_obra
.parent
= self
2460 self.n_types
.unsafe_add_all
(n_types
)
2462 if n_cbra
!= null then n_cbra
.parent
= self
2463 _n_annotations
= n_annotations
2464 if n_annotations
!= null then n_annotations
.parent
= self
2467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2469 if _n_kwnullable
== old_child
then
2470 n_kwnullable
= new_child
.as(nullable TKwnullable)
2473 if _n_qid
== old_child
then
2474 n_qid
= new_child
.as(AQclassid)
2477 if _n_obra
== old_child
then
2478 n_obra
= new_child
.as(nullable TObra)
2481 if n_types
.replace_child
(old_child
, new_child
) then return
2482 if _n_cbra
== old_child
then
2483 n_cbra
= new_child
.as(nullable TCbra)
2486 if _n_annotations
== old_child
then
2487 n_annotations
= new_child
.as(nullable AAnnotations)
2492 redef fun n_kwnullable
=(node
)
2494 _n_kwnullable
= node
2495 if node
!= null then node
.parent
= self
2497 redef fun n_qid
=(node
)
2502 redef fun n_obra
=(node
)
2505 if node
!= null then node
.parent
= self
2507 redef fun n_cbra
=(node
)
2510 if node
!= null then node
.parent
= self
2512 redef fun n_annotations
=(node
)
2514 _n_annotations
= node
2515 if node
!= null then node
.parent
= self
2519 redef fun visit_all
(v
: Visitor)
2521 v
.enter_visit
(_n_kwnullable
)
2522 v
.enter_visit
(_n_qid
)
2523 v
.enter_visit
(_n_obra
)
2524 n_types
.visit_all
(v
)
2525 v
.enter_visit
(_n_cbra
)
2526 v
.enter_visit
(_n_annotations
)
2531 n_kwlabel
: nullable TKwlabel,
2535 _n_kwlabel
= n_kwlabel
.as(not null)
2536 n_kwlabel
.parent
= self
2538 if n_id
!= null then n_id
.parent
= self
2541 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2543 if _n_kwlabel
== old_child
then
2544 n_kwlabel
= new_child
.as(TKwlabel)
2547 if _n_id
== old_child
then
2548 n_id
= new_child
.as(nullable TId)
2553 redef fun n_kwlabel
=(node
)
2558 redef fun n_id
=(node
)
2561 if node
!= null then node
.parent
= self
2565 redef fun visit_all
(v
: Visitor)
2567 v
.enter_visit
(_n_kwlabel
)
2568 v
.enter_visit
(_n_id
)
2571 redef class ABlockExpr
2572 init init_ablockexpr
(
2573 n_expr
: Collection[Object], # Should be Collection[AExpr]
2574 n_kwend
: nullable TKwend
2577 self.n_expr
.unsafe_add_all
(n_expr
)
2579 if n_kwend
!= null then n_kwend
.parent
= self
2582 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2584 if n_expr
.replace_child
(old_child
, new_child
) then return
2585 if _n_kwend
== old_child
then
2586 n_kwend
= new_child
.as(nullable TKwend)
2591 redef fun n_kwend
=(node
)
2594 if node
!= null then node
.parent
= self
2598 redef fun visit_all
(v
: Visitor)
2601 v
.enter_visit
(_n_kwend
)
2604 redef class AVardeclExpr
2605 init init_avardeclexpr
(
2606 n_kwvar
: nullable TKwvar,
2608 n_type
: nullable AType,
2609 n_assign
: nullable TAssign,
2610 n_expr
: nullable AExpr,
2611 n_annotations
: nullable AAnnotations
2615 if n_kwvar
!= null then n_kwvar
.parent
= self
2616 _n_id
= n_id
.as(not null)
2619 if n_type
!= null then n_type
.parent
= self
2620 _n_assign
= n_assign
2621 if n_assign
!= null then n_assign
.parent
= self
2623 if n_expr
!= null then n_expr
.parent
= self
2624 _n_annotations
= n_annotations
2625 if n_annotations
!= null then n_annotations
.parent
= self
2628 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2630 if _n_kwvar
== old_child
then
2631 n_kwvar
= new_child
.as(nullable TKwvar)
2634 if _n_id
== old_child
then
2635 n_id
= new_child
.as(TId)
2638 if _n_type
== old_child
then
2639 n_type
= new_child
.as(nullable AType)
2642 if _n_assign
== old_child
then
2643 n_assign
= new_child
.as(nullable TAssign)
2646 if _n_expr
== old_child
then
2647 n_expr
= new_child
.as(nullable AExpr)
2650 if _n_annotations
== old_child
then
2651 n_annotations
= new_child
.as(nullable AAnnotations)
2656 redef fun n_kwvar
=(node
)
2659 if node
!= null then node
.parent
= self
2661 redef fun n_id
=(node
)
2666 redef fun n_type
=(node
)
2669 if node
!= null then node
.parent
= self
2671 redef fun n_assign
=(node
)
2674 if node
!= null then node
.parent
= self
2676 redef fun n_expr
=(node
)
2679 if node
!= null then node
.parent
= self
2681 redef fun n_annotations
=(node
)
2683 _n_annotations
= node
2684 if node
!= null then node
.parent
= self
2688 redef fun visit_all
(v
: Visitor)
2690 v
.enter_visit
(_n_kwvar
)
2691 v
.enter_visit
(_n_id
)
2692 v
.enter_visit
(_n_type
)
2693 v
.enter_visit
(_n_assign
)
2694 v
.enter_visit
(_n_expr
)
2695 v
.enter_visit
(_n_annotations
)
2698 redef class AReturnExpr
2699 init init_areturnexpr
(
2700 n_kwreturn
: nullable TKwreturn,
2701 n_expr
: nullable AExpr
2704 _n_kwreturn
= n_kwreturn
2705 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2707 if n_expr
!= null then n_expr
.parent
= self
2710 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2712 if _n_kwreturn
== old_child
then
2713 n_kwreturn
= new_child
.as(nullable TKwreturn)
2716 if _n_expr
== old_child
then
2717 n_expr
= new_child
.as(nullable AExpr)
2722 redef fun n_kwreturn
=(node
)
2725 if node
!= null then node
.parent
= self
2727 redef fun n_expr
=(node
)
2730 if node
!= null then node
.parent
= self
2734 redef fun visit_all
(v
: Visitor)
2736 v
.enter_visit
(_n_kwreturn
)
2737 v
.enter_visit
(_n_expr
)
2740 redef class ABreakExpr
2741 init init_abreakexpr
(
2742 n_kwbreak
: nullable TKwbreak,
2743 n_label
: nullable ALabel
2746 _n_kwbreak
= n_kwbreak
.as(not null)
2747 n_kwbreak
.parent
= self
2749 if n_label
!= null then n_label
.parent
= self
2752 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2754 if _n_kwbreak
== old_child
then
2755 n_kwbreak
= new_child
.as(TKwbreak)
2758 if _n_label
== old_child
then
2759 n_label
= new_child
.as(nullable ALabel)
2764 redef fun n_kwbreak
=(node
)
2769 redef fun n_label
=(node
)
2772 if node
!= null then node
.parent
= self
2776 redef fun visit_all
(v
: Visitor)
2778 v
.enter_visit
(_n_kwbreak
)
2779 v
.enter_visit
(_n_label
)
2782 redef class AAbortExpr
2783 init init_aabortexpr
(
2784 n_kwabort
: nullable TKwabort
2787 _n_kwabort
= n_kwabort
.as(not null)
2788 n_kwabort
.parent
= self
2791 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2793 if _n_kwabort
== old_child
then
2794 n_kwabort
= new_child
.as(TKwabort)
2799 redef fun n_kwabort
=(node
)
2806 redef fun visit_all
(v
: Visitor)
2808 v
.enter_visit
(_n_kwabort
)
2811 redef class AContinueExpr
2812 init init_acontinueexpr
(
2813 n_kwcontinue
: nullable TKwcontinue,
2814 n_label
: nullable ALabel
2817 _n_kwcontinue
= n_kwcontinue
2818 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2820 if n_label
!= null then n_label
.parent
= self
2823 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2825 if _n_kwcontinue
== old_child
then
2826 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2829 if _n_label
== old_child
then
2830 n_label
= new_child
.as(nullable ALabel)
2835 redef fun n_kwcontinue
=(node
)
2837 _n_kwcontinue
= node
2838 if node
!= null then node
.parent
= self
2840 redef fun n_label
=(node
)
2843 if node
!= null then node
.parent
= self
2847 redef fun visit_all
(v
: Visitor)
2849 v
.enter_visit
(_n_kwcontinue
)
2850 v
.enter_visit
(_n_label
)
2855 n_kwdo
: nullable TKwdo,
2856 n_block
: nullable AExpr,
2857 n_label
: nullable ALabel
2860 _n_kwdo
= n_kwdo
.as(not null)
2861 n_kwdo
.parent
= self
2863 if n_block
!= null then n_block
.parent
= self
2865 if n_label
!= null then n_label
.parent
= self
2868 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2870 if _n_kwdo
== old_child
then
2871 n_kwdo
= new_child
.as(TKwdo)
2874 if _n_block
== old_child
then
2875 n_block
= new_child
.as(nullable AExpr)
2878 if _n_label
== old_child
then
2879 n_label
= new_child
.as(nullable ALabel)
2884 redef fun n_kwdo
=(node
)
2889 redef fun n_block
=(node
)
2892 if node
!= null then node
.parent
= self
2894 redef fun n_label
=(node
)
2897 if node
!= null then node
.parent
= self
2901 redef fun visit_all
(v
: Visitor)
2903 v
.enter_visit
(_n_kwdo
)
2904 v
.enter_visit
(_n_block
)
2905 v
.enter_visit
(_n_label
)
2910 n_kwif
: nullable TKwif,
2911 n_expr
: nullable AExpr,
2912 n_kwthen
: nullable TKwthen,
2913 n_then
: nullable AExpr,
2914 n_kwelse
: nullable TKwelse,
2915 n_else
: nullable AExpr
2918 _n_kwif
= n_kwif
.as(not null)
2919 n_kwif
.parent
= self
2920 _n_expr
= n_expr
.as(not null)
2921 n_expr
.parent
= self
2922 _n_kwthen
= n_kwthen
.as(not null)
2923 n_kwthen
.parent
= self
2925 if n_then
!= null then n_then
.parent
= self
2926 _n_kwelse
= n_kwelse
2927 if n_kwelse
!= null then n_kwelse
.parent
= self
2929 if n_else
!= null then n_else
.parent
= self
2932 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2934 if _n_kwif
== old_child
then
2935 n_kwif
= new_child
.as(TKwif)
2938 if _n_expr
== old_child
then
2939 n_expr
= new_child
.as(AExpr)
2942 if _n_kwthen
== old_child
then
2943 n_kwthen
= new_child
.as(TKwthen)
2946 if _n_then
== old_child
then
2947 n_then
= new_child
.as(nullable AExpr)
2950 if _n_kwelse
== old_child
then
2951 n_kwelse
= new_child
.as(nullable TKwelse)
2954 if _n_else
== old_child
then
2955 n_else
= new_child
.as(nullable AExpr)
2960 redef fun n_kwif
=(node
)
2965 redef fun n_expr
=(node
)
2970 redef fun n_kwthen
=(node
)
2975 redef fun n_then
=(node
)
2978 if node
!= null then node
.parent
= self
2980 redef fun n_kwelse
=(node
)
2983 if node
!= null then node
.parent
= self
2985 redef fun n_else
=(node
)
2988 if node
!= null then node
.parent
= self
2992 redef fun visit_all
(v
: Visitor)
2994 v
.enter_visit
(_n_kwif
)
2995 v
.enter_visit
(_n_expr
)
2996 v
.enter_visit
(_n_kwthen
)
2997 v
.enter_visit
(_n_then
)
2998 v
.enter_visit
(_n_kwelse
)
2999 v
.enter_visit
(_n_else
)
3002 redef class AIfexprExpr
3003 init init_aifexprexpr
(
3004 n_kwif
: nullable TKwif,
3005 n_expr
: nullable AExpr,
3006 n_kwthen
: nullable TKwthen,
3007 n_then
: nullable AExpr,
3008 n_kwelse
: nullable TKwelse,
3009 n_else
: nullable AExpr
3012 _n_kwif
= n_kwif
.as(not null)
3013 n_kwif
.parent
= self
3014 _n_expr
= n_expr
.as(not null)
3015 n_expr
.parent
= self
3016 _n_kwthen
= n_kwthen
.as(not null)
3017 n_kwthen
.parent
= self
3018 _n_then
= n_then
.as(not null)
3019 n_then
.parent
= self
3020 _n_kwelse
= n_kwelse
.as(not null)
3021 n_kwelse
.parent
= self
3022 _n_else
= n_else
.as(not null)
3023 n_else
.parent
= self
3026 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3028 if _n_kwif
== old_child
then
3029 n_kwif
= new_child
.as(TKwif)
3032 if _n_expr
== old_child
then
3033 n_expr
= new_child
.as(AExpr)
3036 if _n_kwthen
== old_child
then
3037 n_kwthen
= new_child
.as(TKwthen)
3040 if _n_then
== old_child
then
3041 n_then
= new_child
.as(AExpr)
3044 if _n_kwelse
== old_child
then
3045 n_kwelse
= new_child
.as(TKwelse)
3048 if _n_else
== old_child
then
3049 n_else
= new_child
.as(AExpr)
3054 redef fun n_kwif
=(node
)
3059 redef fun n_expr
=(node
)
3064 redef fun n_kwthen
=(node
)
3069 redef fun n_then
=(node
)
3074 redef fun n_kwelse
=(node
)
3079 redef fun n_else
=(node
)
3086 redef fun visit_all
(v
: Visitor)
3088 v
.enter_visit
(_n_kwif
)
3089 v
.enter_visit
(_n_expr
)
3090 v
.enter_visit
(_n_kwthen
)
3091 v
.enter_visit
(_n_then
)
3092 v
.enter_visit
(_n_kwelse
)
3093 v
.enter_visit
(_n_else
)
3096 redef class AWhileExpr
3097 init init_awhileexpr
(
3098 n_kwwhile
: nullable TKwwhile,
3099 n_expr
: nullable AExpr,
3100 n_kwdo
: nullable TKwdo,
3101 n_block
: nullable AExpr,
3102 n_label
: nullable ALabel
3105 _n_kwwhile
= n_kwwhile
.as(not null)
3106 n_kwwhile
.parent
= self
3107 _n_expr
= n_expr
.as(not null)
3108 n_expr
.parent
= self
3109 _n_kwdo
= n_kwdo
.as(not null)
3110 n_kwdo
.parent
= self
3112 if n_block
!= null then n_block
.parent
= self
3114 if n_label
!= null then n_label
.parent
= self
3117 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3119 if _n_kwwhile
== old_child
then
3120 n_kwwhile
= new_child
.as(TKwwhile)
3123 if _n_expr
== old_child
then
3124 n_expr
= new_child
.as(AExpr)
3127 if _n_kwdo
== old_child
then
3128 n_kwdo
= new_child
.as(TKwdo)
3131 if _n_block
== old_child
then
3132 n_block
= new_child
.as(nullable AExpr)
3135 if _n_label
== old_child
then
3136 n_label
= new_child
.as(nullable ALabel)
3141 redef fun n_kwwhile
=(node
)
3146 redef fun n_expr
=(node
)
3151 redef fun n_kwdo
=(node
)
3156 redef fun n_block
=(node
)
3159 if node
!= null then node
.parent
= self
3161 redef fun n_label
=(node
)
3164 if node
!= null then node
.parent
= self
3168 redef fun visit_all
(v
: Visitor)
3170 v
.enter_visit
(_n_kwwhile
)
3171 v
.enter_visit
(_n_expr
)
3172 v
.enter_visit
(_n_kwdo
)
3173 v
.enter_visit
(_n_block
)
3174 v
.enter_visit
(_n_label
)
3177 redef class ALoopExpr
3178 init init_aloopexpr
(
3179 n_kwloop
: nullable TKwloop,
3180 n_block
: nullable AExpr,
3181 n_label
: nullable ALabel
3184 _n_kwloop
= n_kwloop
.as(not null)
3185 n_kwloop
.parent
= self
3187 if n_block
!= null then n_block
.parent
= self
3189 if n_label
!= null then n_label
.parent
= self
3192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3194 if _n_kwloop
== old_child
then
3195 n_kwloop
= new_child
.as(TKwloop)
3198 if _n_block
== old_child
then
3199 n_block
= new_child
.as(nullable AExpr)
3202 if _n_label
== old_child
then
3203 n_label
= new_child
.as(nullable ALabel)
3208 redef fun n_kwloop
=(node
)
3213 redef fun n_block
=(node
)
3216 if node
!= null then node
.parent
= self
3218 redef fun n_label
=(node
)
3221 if node
!= null then node
.parent
= self
3225 redef fun visit_all
(v
: Visitor)
3227 v
.enter_visit
(_n_kwloop
)
3228 v
.enter_visit
(_n_block
)
3229 v
.enter_visit
(_n_label
)
3232 redef class AForExpr
3233 init init_aforexpr
(
3234 n_kwfor
: nullable TKwfor,
3235 n_groups
: Collection[Object], # Should be Collection[AForGroup]
3236 n_kwdo
: nullable TKwdo,
3237 n_block
: nullable AExpr,
3238 n_label
: nullable ALabel
3241 _n_kwfor
= n_kwfor
.as(not null)
3242 n_kwfor
.parent
= self
3243 self.n_groups
.unsafe_add_all
(n_groups
)
3244 _n_kwdo
= n_kwdo
.as(not null)
3245 n_kwdo
.parent
= self
3247 if n_block
!= null then n_block
.parent
= self
3249 if n_label
!= null then n_label
.parent
= self
3252 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3254 if _n_kwfor
== old_child
then
3255 n_kwfor
= new_child
.as(TKwfor)
3258 if n_groups
.replace_child
(old_child
, new_child
) then return
3259 if _n_kwdo
== old_child
then
3260 n_kwdo
= new_child
.as(TKwdo)
3263 if _n_block
== old_child
then
3264 n_block
= new_child
.as(nullable AExpr)
3267 if _n_label
== old_child
then
3268 n_label
= new_child
.as(nullable ALabel)
3273 redef fun n_kwfor
=(node
)
3278 redef fun n_kwdo
=(node
)
3283 redef fun n_block
=(node
)
3286 if node
!= null then node
.parent
= self
3288 redef fun n_label
=(node
)
3291 if node
!= null then node
.parent
= self
3295 redef fun visit_all
(v
: Visitor)
3297 v
.enter_visit
(_n_kwfor
)
3298 n_groups
.visit_all
(v
)
3299 v
.enter_visit
(_n_kwdo
)
3300 v
.enter_visit
(_n_block
)
3301 v
.enter_visit
(_n_label
)
3304 redef class AWithExpr
3305 init init_awithexpr
(
3306 n_kwwith
: nullable TKwwith,
3307 n_expr
: nullable AExpr,
3308 n_kwdo
: nullable TKwdo,
3309 n_block
: nullable AExpr,
3310 n_label
: nullable ALabel
3313 _n_kwwith
= n_kwwith
.as(not null)
3314 n_kwwith
.parent
= self
3315 _n_expr
= n_expr
.as(not null)
3316 n_expr
.parent
= self
3317 _n_kwdo
= n_kwdo
.as(not null)
3318 n_kwdo
.parent
= self
3320 if n_block
!= null then n_block
.parent
= self
3322 if n_label
!= null then n_label
.parent
= self
3325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3327 if _n_kwwith
== old_child
then
3328 n_kwwith
= new_child
.as(TKwwith)
3331 if _n_expr
== old_child
then
3332 n_expr
= new_child
.as(AExpr)
3335 if _n_kwdo
== old_child
then
3336 n_kwdo
= new_child
.as(TKwdo)
3339 if _n_block
== old_child
then
3340 n_block
= new_child
.as(nullable AExpr)
3343 if _n_label
== old_child
then
3344 n_label
= new_child
.as(nullable ALabel)
3349 redef fun n_kwwith
=(node
)
3354 redef fun n_expr
=(node
)
3359 redef fun n_kwdo
=(node
)
3364 redef fun n_block
=(node
)
3367 if node
!= null then node
.parent
= self
3369 redef fun n_label
=(node
)
3372 if node
!= null then node
.parent
= self
3376 redef fun visit_all
(v
: Visitor)
3378 v
.enter_visit
(_n_kwwith
)
3379 v
.enter_visit
(_n_expr
)
3380 v
.enter_visit
(_n_kwdo
)
3381 v
.enter_visit
(_n_block
)
3382 v
.enter_visit
(_n_label
)
3385 redef class AAssertExpr
3386 init init_aassertexpr
(
3387 n_kwassert
: nullable TKwassert,
3389 n_expr
: nullable AExpr,
3390 n_kwelse
: nullable TKwelse,
3391 n_else
: nullable AExpr
3394 _n_kwassert
= n_kwassert
.as(not null)
3395 n_kwassert
.parent
= self
3397 if n_id
!= null then n_id
.parent
= self
3398 _n_expr
= n_expr
.as(not null)
3399 n_expr
.parent
= self
3400 _n_kwelse
= n_kwelse
3401 if n_kwelse
!= null then n_kwelse
.parent
= self
3403 if n_else
!= null then n_else
.parent
= self
3406 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3408 if _n_kwassert
== old_child
then
3409 n_kwassert
= new_child
.as(TKwassert)
3412 if _n_id
== old_child
then
3413 n_id
= new_child
.as(nullable TId)
3416 if _n_expr
== old_child
then
3417 n_expr
= new_child
.as(AExpr)
3420 if _n_kwelse
== old_child
then
3421 n_kwelse
= new_child
.as(nullable TKwelse)
3424 if _n_else
== old_child
then
3425 n_else
= new_child
.as(nullable AExpr)
3430 redef fun n_kwassert
=(node
)
3435 redef fun n_id
=(node
)
3438 if node
!= null then node
.parent
= self
3440 redef fun n_expr
=(node
)
3445 redef fun n_kwelse
=(node
)
3448 if node
!= null then node
.parent
= self
3450 redef fun n_else
=(node
)
3453 if node
!= null then node
.parent
= self
3457 redef fun visit_all
(v
: Visitor)
3459 v
.enter_visit
(_n_kwassert
)
3460 v
.enter_visit
(_n_id
)
3461 v
.enter_visit
(_n_expr
)
3462 v
.enter_visit
(_n_kwelse
)
3463 v
.enter_visit
(_n_else
)
3466 redef class AOnceExpr
3467 init init_aonceexpr
(
3468 n_kwonce
: nullable TKwonce,
3469 n_expr
: nullable AExpr
3472 _n_kwonce
= n_kwonce
.as(not null)
3473 n_kwonce
.parent
= self
3474 _n_expr
= n_expr
.as(not null)
3475 n_expr
.parent
= self
3478 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3480 if _n_kwonce
== old_child
then
3481 n_kwonce
= new_child
.as(TKwonce)
3484 if _n_expr
== old_child
then
3485 n_expr
= new_child
.as(AExpr)
3490 redef fun n_kwonce
=(node
)
3495 redef fun n_expr
=(node
)
3502 redef fun visit_all
(v
: Visitor)
3504 v
.enter_visit
(_n_kwonce
)
3505 v
.enter_visit
(_n_expr
)
3508 redef class ASendExpr
3509 init init_asendexpr
(
3510 n_expr
: nullable AExpr
3513 _n_expr
= n_expr
.as(not null)
3514 n_expr
.parent
= self
3517 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3519 if _n_expr
== old_child
then
3520 n_expr
= new_child
.as(AExpr)
3525 redef fun n_expr
=(node
)
3532 redef fun visit_all
(v
: Visitor)
3534 v
.enter_visit
(_n_expr
)
3537 redef class ABinopExpr
3538 init init_abinopexpr
(
3539 n_expr
: nullable AExpr,
3540 n_expr2
: nullable AExpr
3543 _n_expr
= n_expr
.as(not null)
3544 n_expr
.parent
= self
3545 _n_expr2
= n_expr2
.as(not null)
3546 n_expr2
.parent
= self
3549 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3551 if _n_expr
== old_child
then
3552 n_expr
= new_child
.as(AExpr)
3555 if _n_expr2
== old_child
then
3556 n_expr2
= new_child
.as(AExpr)
3561 redef fun n_expr
=(node
)
3566 redef fun n_expr2
=(node
)
3573 redef fun visit_all
(v
: Visitor)
3575 v
.enter_visit
(_n_expr
)
3576 v
.enter_visit
(_n_expr2
)
3581 n_expr
: nullable AExpr,
3582 n_op
: nullable TKwor,
3583 n_expr2
: nullable AExpr
3586 _n_expr
= n_expr
.as(not null)
3587 n_expr
.parent
= self
3588 _n_op
= n_op
.as(not null)
3590 _n_expr2
= n_expr2
.as(not null)
3591 n_expr2
.parent
= self
3594 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3596 if _n_expr
== old_child
then
3597 n_expr
= new_child
.as(AExpr)
3600 if _n_op
== old_child
then
3601 n_op
= new_child
.as(TKwor)
3604 if _n_expr2
== old_child
then
3605 n_expr2
= new_child
.as(AExpr)
3610 redef fun n_expr
=(node
)
3615 redef fun n_op
=(node
)
3620 redef fun n_expr2
=(node
)
3627 redef fun visit_all
(v
: Visitor)
3629 v
.enter_visit
(_n_expr
)
3630 v
.enter_visit
(_n_op
)
3631 v
.enter_visit
(_n_expr2
)
3634 redef class AAndExpr
3635 init init_aandexpr
(
3636 n_expr
: nullable AExpr,
3637 n_op
: nullable TKwand,
3638 n_expr2
: nullable AExpr
3641 _n_expr
= n_expr
.as(not null)
3642 n_expr
.parent
= self
3643 _n_op
= n_op
.as(not null)
3645 _n_expr2
= n_expr2
.as(not null)
3646 n_expr2
.parent
= self
3649 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3651 if _n_expr
== old_child
then
3652 n_expr
= new_child
.as(AExpr)
3655 if _n_op
== old_child
then
3656 n_op
= new_child
.as(TKwand)
3659 if _n_expr2
== old_child
then
3660 n_expr2
= new_child
.as(AExpr)
3665 redef fun n_expr
=(node
)
3670 redef fun n_op
=(node
)
3675 redef fun n_expr2
=(node
)
3682 redef fun visit_all
(v
: Visitor)
3684 v
.enter_visit
(_n_expr
)
3685 v
.enter_visit
(_n_op
)
3686 v
.enter_visit
(_n_expr2
)
3689 redef class AOrElseExpr
3690 init init_aorelseexpr
(
3691 n_expr
: nullable AExpr,
3692 n_op
: nullable TKwor,
3693 n_kwelse
: nullable TKwelse,
3694 n_expr2
: nullable AExpr
3697 _n_expr
= n_expr
.as(not null)
3698 n_expr
.parent
= self
3699 _n_op
= n_op
.as(not null)
3701 _n_kwelse
= n_kwelse
.as(not null)
3702 n_kwelse
.parent
= self
3703 _n_expr2
= n_expr2
.as(not null)
3704 n_expr2
.parent
= self
3707 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3709 if _n_expr
== old_child
then
3710 n_expr
= new_child
.as(AExpr)
3713 if _n_op
== old_child
then
3714 n_op
= new_child
.as(TKwor)
3717 if _n_kwelse
== old_child
then
3718 n_kwelse
= new_child
.as(TKwelse)
3721 if _n_expr2
== old_child
then
3722 n_expr2
= new_child
.as(AExpr)
3727 redef fun n_expr
=(node
)
3732 redef fun n_op
=(node
)
3737 redef fun n_kwelse
=(node
)
3742 redef fun n_expr2
=(node
)
3749 redef fun visit_all
(v
: Visitor)
3751 v
.enter_visit
(_n_expr
)
3752 v
.enter_visit
(_n_op
)
3753 v
.enter_visit
(_n_kwelse
)
3754 v
.enter_visit
(_n_expr2
)
3757 redef class AImpliesExpr
3758 init init_aimpliesexpr
(
3759 n_expr
: nullable AExpr,
3760 n_op
: nullable TKwimplies,
3761 n_expr2
: nullable AExpr
3764 _n_expr
= n_expr
.as(not null)
3765 n_expr
.parent
= self
3766 _n_op
= n_op
.as(not null)
3768 _n_expr2
= n_expr2
.as(not null)
3769 n_expr2
.parent
= self
3772 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3774 if _n_expr
== old_child
then
3775 n_expr
= new_child
.as(AExpr)
3778 if _n_op
== old_child
then
3779 n_op
= new_child
.as(TKwimplies)
3782 if _n_expr2
== old_child
then
3783 n_expr2
= new_child
.as(AExpr)
3788 redef fun n_expr
=(node
)
3793 redef fun n_op
=(node
)
3798 redef fun n_expr2
=(node
)
3805 redef fun visit_all
(v
: Visitor)
3807 v
.enter_visit
(_n_expr
)
3808 v
.enter_visit
(_n_op
)
3809 v
.enter_visit
(_n_expr2
)
3812 redef class ANotExpr
3813 init init_anotexpr
(
3814 n_kwnot
: nullable TKwnot,
3815 n_expr
: nullable AExpr
3818 _n_kwnot
= n_kwnot
.as(not null)
3819 n_kwnot
.parent
= self
3820 _n_expr
= n_expr
.as(not null)
3821 n_expr
.parent
= self
3824 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3826 if _n_kwnot
== old_child
then
3827 n_kwnot
= new_child
.as(TKwnot)
3830 if _n_expr
== old_child
then
3831 n_expr
= new_child
.as(AExpr)
3836 redef fun n_kwnot
=(node
)
3841 redef fun n_expr
=(node
)
3848 redef fun visit_all
(v
: Visitor)
3850 v
.enter_visit
(_n_kwnot
)
3851 v
.enter_visit
(_n_expr
)
3856 n_expr
: nullable AExpr,
3858 n_expr2
: nullable AExpr
3861 _n_expr
= n_expr
.as(not null)
3862 n_expr
.parent
= self
3863 _n_op
= n_op
.as(not null)
3865 _n_expr2
= n_expr2
.as(not null)
3866 n_expr2
.parent
= self
3869 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3871 if _n_expr
== old_child
then
3872 n_expr
= new_child
.as(AExpr)
3875 if _n_op
== old_child
then
3876 n_op
= new_child
.as(TEq)
3879 if _n_expr2
== old_child
then
3880 n_expr2
= new_child
.as(AExpr)
3885 redef fun n_expr
=(node
)
3890 redef fun n_op
=(node
)
3895 redef fun n_expr2
=(node
)
3902 redef fun visit_all
(v
: Visitor)
3904 v
.enter_visit
(_n_expr
)
3905 v
.enter_visit
(_n_op
)
3906 v
.enter_visit
(_n_expr2
)
3911 n_expr
: nullable AExpr,
3913 n_expr2
: nullable AExpr
3916 _n_expr
= n_expr
.as(not null)
3917 n_expr
.parent
= self
3918 _n_op
= n_op
.as(not null)
3920 _n_expr2
= n_expr2
.as(not null)
3921 n_expr2
.parent
= self
3924 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3926 if _n_expr
== old_child
then
3927 n_expr
= new_child
.as(AExpr)
3930 if _n_op
== old_child
then
3931 n_op
= new_child
.as(TNe)
3934 if _n_expr2
== old_child
then
3935 n_expr2
= new_child
.as(AExpr)
3940 redef fun n_expr
=(node
)
3945 redef fun n_op
=(node
)
3950 redef fun n_expr2
=(node
)
3957 redef fun visit_all
(v
: Visitor)
3959 v
.enter_visit
(_n_expr
)
3960 v
.enter_visit
(_n_op
)
3961 v
.enter_visit
(_n_expr2
)
3966 n_expr
: nullable AExpr,
3968 n_expr2
: nullable AExpr
3971 _n_expr
= n_expr
.as(not null)
3972 n_expr
.parent
= self
3973 _n_op
= n_op
.as(not null)
3975 _n_expr2
= n_expr2
.as(not null)
3976 n_expr2
.parent
= self
3979 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3981 if _n_expr
== old_child
then
3982 n_expr
= new_child
.as(AExpr)
3985 if _n_op
== old_child
then
3986 n_op
= new_child
.as(TLt)
3989 if _n_expr2
== old_child
then
3990 n_expr2
= new_child
.as(AExpr)
3995 redef fun n_expr
=(node
)
4000 redef fun n_op
=(node
)
4005 redef fun n_expr2
=(node
)
4012 redef fun visit_all
(v
: Visitor)
4014 v
.enter_visit
(_n_expr
)
4015 v
.enter_visit
(_n_op
)
4016 v
.enter_visit
(_n_expr2
)
4021 n_expr
: nullable AExpr,
4023 n_expr2
: nullable AExpr
4026 _n_expr
= n_expr
.as(not null)
4027 n_expr
.parent
= self
4028 _n_op
= n_op
.as(not null)
4030 _n_expr2
= n_expr2
.as(not null)
4031 n_expr2
.parent
= self
4034 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4036 if _n_expr
== old_child
then
4037 n_expr
= new_child
.as(AExpr)
4040 if _n_op
== old_child
then
4041 n_op
= new_child
.as(TLe)
4044 if _n_expr2
== old_child
then
4045 n_expr2
= new_child
.as(AExpr)
4050 redef fun n_expr
=(node
)
4055 redef fun n_op
=(node
)
4060 redef fun n_expr2
=(node
)
4067 redef fun visit_all
(v
: Visitor)
4069 v
.enter_visit
(_n_expr
)
4070 v
.enter_visit
(_n_op
)
4071 v
.enter_visit
(_n_expr2
)
4076 n_expr
: nullable AExpr,
4078 n_expr2
: nullable AExpr
4081 _n_expr
= n_expr
.as(not null)
4082 n_expr
.parent
= self
4083 _n_op
= n_op
.as(not null)
4085 _n_expr2
= n_expr2
.as(not null)
4086 n_expr2
.parent
= self
4089 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4091 if _n_expr
== old_child
then
4092 n_expr
= new_child
.as(AExpr)
4095 if _n_op
== old_child
then
4096 n_op
= new_child
.as(TLl)
4099 if _n_expr2
== old_child
then
4100 n_expr2
= new_child
.as(AExpr)
4105 redef fun n_expr
=(node
)
4110 redef fun n_op
=(node
)
4115 redef fun n_expr2
=(node
)
4122 redef fun visit_all
(v
: Visitor)
4124 v
.enter_visit
(_n_expr
)
4125 v
.enter_visit
(_n_op
)
4126 v
.enter_visit
(_n_expr2
)
4131 n_expr
: nullable AExpr,
4133 n_expr2
: nullable AExpr
4136 _n_expr
= n_expr
.as(not null)
4137 n_expr
.parent
= self
4138 _n_op
= n_op
.as(not null)
4140 _n_expr2
= n_expr2
.as(not null)
4141 n_expr2
.parent
= self
4144 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4146 if _n_expr
== old_child
then
4147 n_expr
= new_child
.as(AExpr)
4150 if _n_op
== old_child
then
4151 n_op
= new_child
.as(TGt)
4154 if _n_expr2
== old_child
then
4155 n_expr2
= new_child
.as(AExpr)
4160 redef fun n_expr
=(node
)
4165 redef fun n_op
=(node
)
4170 redef fun n_expr2
=(node
)
4177 redef fun visit_all
(v
: Visitor)
4179 v
.enter_visit
(_n_expr
)
4180 v
.enter_visit
(_n_op
)
4181 v
.enter_visit
(_n_expr2
)
4186 n_expr
: nullable AExpr,
4188 n_expr2
: nullable AExpr
4191 _n_expr
= n_expr
.as(not null)
4192 n_expr
.parent
= self
4193 _n_op
= n_op
.as(not null)
4195 _n_expr2
= n_expr2
.as(not null)
4196 n_expr2
.parent
= self
4199 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4201 if _n_expr
== old_child
then
4202 n_expr
= new_child
.as(AExpr)
4205 if _n_op
== old_child
then
4206 n_op
= new_child
.as(TGe)
4209 if _n_expr2
== old_child
then
4210 n_expr2
= new_child
.as(AExpr)
4215 redef fun n_expr
=(node
)
4220 redef fun n_op
=(node
)
4225 redef fun n_expr2
=(node
)
4232 redef fun visit_all
(v
: Visitor)
4234 v
.enter_visit
(_n_expr
)
4235 v
.enter_visit
(_n_op
)
4236 v
.enter_visit
(_n_expr2
)
4241 n_expr
: nullable AExpr,
4243 n_expr2
: nullable AExpr
4246 _n_expr
= n_expr
.as(not null)
4247 n_expr
.parent
= self
4248 _n_op
= n_op
.as(not null)
4250 _n_expr2
= n_expr2
.as(not null)
4251 n_expr2
.parent
= self
4254 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4256 if _n_expr
== old_child
then
4257 n_expr
= new_child
.as(AExpr)
4260 if _n_op
== old_child
then
4261 n_op
= new_child
.as(TGg)
4264 if _n_expr2
== old_child
then
4265 n_expr2
= new_child
.as(AExpr)
4270 redef fun n_expr
=(node
)
4275 redef fun n_op
=(node
)
4280 redef fun n_expr2
=(node
)
4287 redef fun visit_all
(v
: Visitor)
4289 v
.enter_visit
(_n_expr
)
4290 v
.enter_visit
(_n_op
)
4291 v
.enter_visit
(_n_expr2
)
4294 redef class AIsaExpr
4295 init init_aisaexpr
(
4296 n_expr
: nullable AExpr,
4297 n_kwisa
: nullable TKwisa,
4298 n_type
: nullable AType
4301 _n_expr
= n_expr
.as(not null)
4302 n_expr
.parent
= self
4303 _n_kwisa
= n_kwisa
.as(not null)
4304 n_kwisa
.parent
= self
4305 _n_type
= n_type
.as(not null)
4306 n_type
.parent
= self
4309 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4311 if _n_expr
== old_child
then
4312 n_expr
= new_child
.as(AExpr)
4315 if _n_kwisa
== old_child
then
4316 n_kwisa
= new_child
.as(TKwisa)
4319 if _n_type
== old_child
then
4320 n_type
= new_child
.as(AType)
4325 redef fun n_expr
=(node
)
4330 redef fun n_kwisa
=(node
)
4335 redef fun n_type
=(node
)
4342 redef fun visit_all
(v
: Visitor)
4344 v
.enter_visit
(_n_expr
)
4345 v
.enter_visit
(_n_kwisa
)
4346 v
.enter_visit
(_n_type
)
4349 redef class APlusExpr
4350 init init_aplusexpr
(
4351 n_expr
: nullable AExpr,
4352 n_op
: nullable TPlus,
4353 n_expr2
: nullable AExpr
4356 _n_expr
= n_expr
.as(not null)
4357 n_expr
.parent
= self
4358 _n_op
= n_op
.as(not null)
4360 _n_expr2
= n_expr2
.as(not null)
4361 n_expr2
.parent
= self
4364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4366 if _n_expr
== old_child
then
4367 n_expr
= new_child
.as(AExpr)
4370 if _n_op
== old_child
then
4371 n_op
= new_child
.as(TPlus)
4374 if _n_expr2
== old_child
then
4375 n_expr2
= new_child
.as(AExpr)
4380 redef fun n_expr
=(node
)
4385 redef fun n_op
=(node
)
4390 redef fun n_expr2
=(node
)
4397 redef fun visit_all
(v
: Visitor)
4399 v
.enter_visit
(_n_expr
)
4400 v
.enter_visit
(_n_op
)
4401 v
.enter_visit
(_n_expr2
)
4404 redef class AMinusExpr
4405 init init_aminusexpr
(
4406 n_expr
: nullable AExpr,
4407 n_op
: nullable TMinus,
4408 n_expr2
: nullable AExpr
4411 _n_expr
= n_expr
.as(not null)
4412 n_expr
.parent
= self
4413 _n_op
= n_op
.as(not null)
4415 _n_expr2
= n_expr2
.as(not null)
4416 n_expr2
.parent
= self
4419 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4421 if _n_expr
== old_child
then
4422 n_expr
= new_child
.as(AExpr)
4425 if _n_op
== old_child
then
4426 n_op
= new_child
.as(TMinus)
4429 if _n_expr2
== old_child
then
4430 n_expr2
= new_child
.as(AExpr)
4435 redef fun n_expr
=(node
)
4440 redef fun n_op
=(node
)
4445 redef fun n_expr2
=(node
)
4452 redef fun visit_all
(v
: Visitor)
4454 v
.enter_visit
(_n_expr
)
4455 v
.enter_visit
(_n_op
)
4456 v
.enter_visit
(_n_expr2
)
4459 redef class AStarshipExpr
4460 init init_astarshipexpr
(
4461 n_expr
: nullable AExpr,
4462 n_op
: nullable TStarship,
4463 n_expr2
: nullable AExpr
4466 _n_expr
= n_expr
.as(not null)
4467 n_expr
.parent
= self
4468 _n_op
= n_op
.as(not null)
4470 _n_expr2
= n_expr2
.as(not null)
4471 n_expr2
.parent
= self
4474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4476 if _n_expr
== old_child
then
4477 n_expr
= new_child
.as(AExpr)
4480 if _n_op
== old_child
then
4481 n_op
= new_child
.as(TStarship)
4484 if _n_expr2
== old_child
then
4485 n_expr2
= new_child
.as(AExpr)
4490 redef fun n_expr
=(node
)
4495 redef fun n_op
=(node
)
4500 redef fun n_expr2
=(node
)
4507 redef fun visit_all
(v
: Visitor)
4509 v
.enter_visit
(_n_expr
)
4510 v
.enter_visit
(_n_op
)
4511 v
.enter_visit
(_n_expr2
)
4514 redef class AStarExpr
4515 init init_astarexpr
(
4516 n_expr
: nullable AExpr,
4517 n_op
: nullable TStar,
4518 n_expr2
: nullable AExpr
4521 _n_expr
= n_expr
.as(not null)
4522 n_expr
.parent
= self
4523 _n_op
= n_op
.as(not null)
4525 _n_expr2
= n_expr2
.as(not null)
4526 n_expr2
.parent
= self
4529 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4531 if _n_expr
== old_child
then
4532 n_expr
= new_child
.as(AExpr)
4535 if _n_op
== old_child
then
4536 n_op
= new_child
.as(TStar)
4539 if _n_expr2
== old_child
then
4540 n_expr2
= new_child
.as(AExpr)
4545 redef fun n_expr
=(node
)
4550 redef fun n_op
=(node
)
4555 redef fun n_expr2
=(node
)
4562 redef fun visit_all
(v
: Visitor)
4564 v
.enter_visit
(_n_expr
)
4565 v
.enter_visit
(_n_op
)
4566 v
.enter_visit
(_n_expr2
)
4569 redef class AStarstarExpr
4570 init init_astarstarexpr
(
4571 n_expr
: nullable AExpr,
4572 n_op
: nullable TStarstar,
4573 n_expr2
: nullable AExpr
4576 _n_expr
= n_expr
.as(not null)
4577 n_expr
.parent
= self
4578 _n_op
= n_op
.as(not null)
4580 _n_expr2
= n_expr2
.as(not null)
4581 n_expr2
.parent
= self
4584 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4586 if _n_expr
== old_child
then
4587 n_expr
= new_child
.as(AExpr)
4590 if _n_op
== old_child
then
4591 n_op
= new_child
.as(TStarstar)
4594 if _n_expr2
== old_child
then
4595 n_expr2
= new_child
.as(AExpr)
4600 redef fun n_expr
=(node
)
4605 redef fun n_op
=(node
)
4610 redef fun n_expr2
=(node
)
4617 redef fun visit_all
(v
: Visitor)
4619 v
.enter_visit
(_n_expr
)
4620 v
.enter_visit
(_n_op
)
4621 v
.enter_visit
(_n_expr2
)
4624 redef class ASlashExpr
4625 init init_aslashexpr
(
4626 n_expr
: nullable AExpr,
4627 n_op
: nullable TSlash,
4628 n_expr2
: nullable AExpr
4631 _n_expr
= n_expr
.as(not null)
4632 n_expr
.parent
= self
4633 _n_op
= n_op
.as(not null)
4635 _n_expr2
= n_expr2
.as(not null)
4636 n_expr2
.parent
= self
4639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4641 if _n_expr
== old_child
then
4642 n_expr
= new_child
.as(AExpr)
4645 if _n_op
== old_child
then
4646 n_op
= new_child
.as(TSlash)
4649 if _n_expr2
== old_child
then
4650 n_expr2
= new_child
.as(AExpr)
4655 redef fun n_expr
=(node
)
4660 redef fun n_op
=(node
)
4665 redef fun n_expr2
=(node
)
4672 redef fun visit_all
(v
: Visitor)
4674 v
.enter_visit
(_n_expr
)
4675 v
.enter_visit
(_n_op
)
4676 v
.enter_visit
(_n_expr2
)
4679 redef class APercentExpr
4680 init init_apercentexpr
(
4681 n_expr
: nullable AExpr,
4682 n_op
: nullable TPercent,
4683 n_expr2
: nullable AExpr
4686 _n_expr
= n_expr
.as(not null)
4687 n_expr
.parent
= self
4688 _n_op
= n_op
.as(not null)
4690 _n_expr2
= n_expr2
.as(not null)
4691 n_expr2
.parent
= self
4694 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4696 if _n_expr
== old_child
then
4697 n_expr
= new_child
.as(AExpr)
4700 if _n_op
== old_child
then
4701 n_op
= new_child
.as(TPercent)
4704 if _n_expr2
== old_child
then
4705 n_expr2
= new_child
.as(AExpr)
4710 redef fun n_expr
=(node
)
4715 redef fun n_op
=(node
)
4720 redef fun n_expr2
=(node
)
4727 redef fun visit_all
(v
: Visitor)
4729 v
.enter_visit
(_n_expr
)
4730 v
.enter_visit
(_n_op
)
4731 v
.enter_visit
(_n_expr2
)
4734 redef class APipeExpr
4735 init init_apipeexpr
(
4736 n_expr
: nullable AExpr,
4737 n_op
: nullable TPipe,
4738 n_expr2
: nullable AExpr
4741 _n_expr
= n_expr
.as(not null)
4742 n_expr
.parent
= self
4743 _n_op
= n_op
.as(not null)
4745 _n_expr2
= n_expr2
.as(not null)
4746 n_expr2
.parent
= self
4749 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4751 if _n_expr
== old_child
then
4752 n_expr
= new_child
.as(AExpr)
4755 if _n_op
== old_child
then
4756 n_op
= new_child
.as(TPipe)
4759 if _n_expr2
== old_child
then
4760 n_expr2
= new_child
.as(AExpr)
4765 redef fun n_expr
=(node
)
4770 redef fun n_op
=(node
)
4775 redef fun n_expr2
=(node
)
4782 redef fun visit_all
(v
: Visitor)
4784 v
.enter_visit
(_n_expr
)
4785 v
.enter_visit
(_n_op
)
4786 v
.enter_visit
(_n_expr2
)
4789 redef class ACaretExpr
4790 init init_acaretexpr
(
4791 n_expr
: nullable AExpr,
4792 n_op
: nullable TCaret,
4793 n_expr2
: nullable AExpr
4796 _n_expr
= n_expr
.as(not null)
4797 n_expr
.parent
= self
4798 _n_op
= n_op
.as(not null)
4800 _n_expr2
= n_expr2
.as(not null)
4801 n_expr2
.parent
= self
4804 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4806 if _n_expr
== old_child
then
4807 n_expr
= new_child
.as(AExpr)
4810 if _n_op
== old_child
then
4811 n_op
= new_child
.as(TCaret)
4814 if _n_expr2
== old_child
then
4815 n_expr2
= new_child
.as(AExpr)
4820 redef fun n_expr
=(node
)
4825 redef fun n_op
=(node
)
4830 redef fun n_expr2
=(node
)
4837 redef fun visit_all
(v
: Visitor)
4839 v
.enter_visit
(_n_expr
)
4840 v
.enter_visit
(_n_op
)
4841 v
.enter_visit
(_n_expr2
)
4844 redef class AAmpExpr
4845 init init_aampexpr
(
4846 n_expr
: nullable AExpr,
4847 n_op
: nullable TAmp,
4848 n_expr2
: nullable AExpr
4851 _n_expr
= n_expr
.as(not null)
4852 n_expr
.parent
= self
4853 _n_op
= n_op
.as(not null)
4855 _n_expr2
= n_expr2
.as(not null)
4856 n_expr2
.parent
= self
4859 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4861 if _n_expr
== old_child
then
4862 n_expr
= new_child
.as(AExpr)
4865 if _n_op
== old_child
then
4866 n_op
= new_child
.as(TAmp)
4869 if _n_expr2
== old_child
then
4870 n_expr2
= new_child
.as(AExpr)
4875 redef fun n_expr
=(node
)
4880 redef fun n_op
=(node
)
4885 redef fun n_expr2
=(node
)
4892 redef fun visit_all
(v
: Visitor)
4894 v
.enter_visit
(_n_expr
)
4895 v
.enter_visit
(_n_op
)
4896 v
.enter_visit
(_n_expr2
)
4899 redef class AUminusExpr
4900 init init_auminusexpr
(
4901 n_op
: nullable TMinus,
4902 n_expr
: nullable AExpr
4905 _n_op
= n_op
.as(not null)
4907 _n_expr
= n_expr
.as(not null)
4908 n_expr
.parent
= self
4911 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4913 if _n_op
== old_child
then
4914 n_op
= new_child
.as(TMinus)
4917 if _n_expr
== old_child
then
4918 n_expr
= new_child
.as(AExpr)
4923 redef fun n_op
=(node
)
4928 redef fun n_expr
=(node
)
4935 redef fun visit_all
(v
: Visitor)
4937 v
.enter_visit
(_n_op
)
4938 v
.enter_visit
(_n_expr
)
4941 redef class AUplusExpr
4942 init init_auplusexpr
(
4943 n_op
: nullable TPlus,
4944 n_expr
: nullable AExpr
4947 _n_op
= n_op
.as(not null)
4949 _n_expr
= n_expr
.as(not null)
4950 n_expr
.parent
= self
4953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4955 if _n_op
== old_child
then
4956 n_op
= new_child
.as(TPlus)
4959 if _n_expr
== old_child
then
4960 n_expr
= new_child
.as(AExpr)
4965 redef fun n_op
=(node
)
4970 redef fun n_expr
=(node
)
4977 redef fun visit_all
(v
: Visitor)
4979 v
.enter_visit
(_n_op
)
4980 v
.enter_visit
(_n_expr
)
4983 redef class AUtildeExpr
4984 init init_autildeexpr
(
4985 n_op
: nullable TTilde,
4986 n_expr
: nullable AExpr
4989 _n_op
= n_op
.as(not null)
4991 _n_expr
= n_expr
.as(not null)
4992 n_expr
.parent
= self
4995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4997 if _n_op
== old_child
then
4998 n_op
= new_child
.as(TTilde)
5001 if _n_expr
== old_child
then
5002 n_expr
= new_child
.as(AExpr)
5007 redef fun n_op
=(node
)
5012 redef fun n_expr
=(node
)
5019 redef fun visit_all
(v
: Visitor)
5021 v
.enter_visit
(_n_op
)
5022 v
.enter_visit
(_n_expr
)
5025 redef class ANewExpr
5026 init init_anewexpr
(
5027 n_kwnew
: nullable TKwnew,
5028 n_type
: nullable AType,
5029 n_qid
: nullable AQid,
5030 n_args
: nullable AExprs
5033 _n_kwnew
= n_kwnew
.as(not null)
5034 n_kwnew
.parent
= self
5035 _n_type
= n_type
.as(not null)
5036 n_type
.parent
= self
5038 if n_qid
!= null then n_qid
.parent
= self
5039 _n_args
= n_args
.as(not null)
5040 n_args
.parent
= self
5043 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5045 if _n_kwnew
== old_child
then
5046 n_kwnew
= new_child
.as(TKwnew)
5049 if _n_type
== old_child
then
5050 n_type
= new_child
.as(AType)
5053 if _n_qid
== old_child
then
5054 n_qid
= new_child
.as(nullable AQid)
5057 if _n_args
== old_child
then
5058 n_args
= new_child
.as(AExprs)
5063 redef fun n_kwnew
=(node
)
5068 redef fun n_type
=(node
)
5073 redef fun n_qid
=(node
)
5076 if node
!= null then node
.parent
= self
5078 redef fun n_args
=(node
)
5085 redef fun visit_all
(v
: Visitor)
5087 v
.enter_visit
(_n_kwnew
)
5088 v
.enter_visit
(_n_type
)
5089 v
.enter_visit
(_n_qid
)
5090 v
.enter_visit
(_n_args
)
5093 redef class AAttrExpr
5094 init init_aattrexpr
(
5095 n_expr
: nullable AExpr,
5096 n_id
: nullable TAttrid
5099 _n_expr
= n_expr
.as(not null)
5100 n_expr
.parent
= self
5101 _n_id
= n_id
.as(not null)
5105 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5107 if _n_expr
== old_child
then
5108 n_expr
= new_child
.as(AExpr)
5111 if _n_id
== old_child
then
5112 n_id
= new_child
.as(TAttrid)
5117 redef fun n_expr
=(node
)
5122 redef fun n_id
=(node
)
5129 redef fun visit_all
(v
: Visitor)
5131 v
.enter_visit
(_n_expr
)
5132 v
.enter_visit
(_n_id
)
5135 redef class AAttrAssignExpr
5136 init init_aattrassignexpr
(
5137 n_expr
: nullable AExpr,
5138 n_id
: nullable TAttrid,
5139 n_assign
: nullable TAssign,
5140 n_value
: nullable AExpr
5143 _n_expr
= n_expr
.as(not null)
5144 n_expr
.parent
= self
5145 _n_id
= n_id
.as(not null)
5147 _n_assign
= n_assign
.as(not null)
5148 n_assign
.parent
= self
5149 _n_value
= n_value
.as(not null)
5150 n_value
.parent
= self
5153 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5155 if _n_expr
== old_child
then
5156 n_expr
= new_child
.as(AExpr)
5159 if _n_id
== old_child
then
5160 n_id
= new_child
.as(TAttrid)
5163 if _n_assign
== old_child
then
5164 n_assign
= new_child
.as(TAssign)
5167 if _n_value
== old_child
then
5168 n_value
= new_child
.as(AExpr)
5173 redef fun n_expr
=(node
)
5178 redef fun n_id
=(node
)
5183 redef fun n_assign
=(node
)
5188 redef fun n_value
=(node
)
5195 redef fun visit_all
(v
: Visitor)
5197 v
.enter_visit
(_n_expr
)
5198 v
.enter_visit
(_n_id
)
5199 v
.enter_visit
(_n_assign
)
5200 v
.enter_visit
(_n_value
)
5203 redef class AAttrReassignExpr
5204 init init_aattrreassignexpr
(
5205 n_expr
: nullable AExpr,
5206 n_id
: nullable TAttrid,
5207 n_assign_op
: nullable AAssignOp,
5208 n_value
: nullable AExpr
5211 _n_expr
= n_expr
.as(not null)
5212 n_expr
.parent
= self
5213 _n_id
= n_id
.as(not null)
5215 _n_assign_op
= n_assign_op
.as(not null)
5216 n_assign_op
.parent
= self
5217 _n_value
= n_value
.as(not null)
5218 n_value
.parent
= self
5221 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5223 if _n_expr
== old_child
then
5224 n_expr
= new_child
.as(AExpr)
5227 if _n_id
== old_child
then
5228 n_id
= new_child
.as(TAttrid)
5231 if _n_assign_op
== old_child
then
5232 n_assign_op
= new_child
.as(AAssignOp)
5235 if _n_value
== old_child
then
5236 n_value
= new_child
.as(AExpr)
5241 redef fun n_expr
=(node
)
5246 redef fun n_id
=(node
)
5251 redef fun n_assign_op
=(node
)
5256 redef fun n_value
=(node
)
5263 redef fun visit_all
(v
: Visitor)
5265 v
.enter_visit
(_n_expr
)
5266 v
.enter_visit
(_n_id
)
5267 v
.enter_visit
(_n_assign_op
)
5268 v
.enter_visit
(_n_value
)
5271 redef class ACallExpr
5272 init init_acallexpr
(
5273 n_expr
: nullable AExpr,
5274 n_qid
: nullable AQid,
5275 n_args
: nullable AExprs
5278 _n_expr
= n_expr
.as(not null)
5279 n_expr
.parent
= self
5280 _n_qid
= n_qid
.as(not null)
5282 _n_args
= n_args
.as(not null)
5283 n_args
.parent
= self
5286 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5288 if _n_expr
== old_child
then
5289 n_expr
= new_child
.as(AExpr)
5292 if _n_qid
== old_child
then
5293 n_qid
= new_child
.as(AQid)
5296 if _n_args
== old_child
then
5297 n_args
= new_child
.as(AExprs)
5302 redef fun n_expr
=(node
)
5307 redef fun n_qid
=(node
)
5312 redef fun n_args
=(node
)
5319 redef fun visit_all
(v
: Visitor)
5321 v
.enter_visit
(_n_expr
)
5322 v
.enter_visit
(_n_qid
)
5323 v
.enter_visit
(_n_args
)
5326 redef class ACallAssignExpr
5327 init init_acallassignexpr
(
5328 n_expr
: nullable AExpr,
5329 n_qid
: nullable AQid,
5330 n_args
: nullable AExprs,
5331 n_assign
: nullable TAssign,
5332 n_value
: nullable AExpr
5335 _n_expr
= n_expr
.as(not null)
5336 n_expr
.parent
= self
5337 _n_qid
= n_qid
.as(not null)
5339 _n_args
= n_args
.as(not null)
5340 n_args
.parent
= self
5341 _n_assign
= n_assign
.as(not null)
5342 n_assign
.parent
= self
5343 _n_value
= n_value
.as(not null)
5344 n_value
.parent
= self
5347 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5349 if _n_expr
== old_child
then
5350 n_expr
= new_child
.as(AExpr)
5353 if _n_qid
== old_child
then
5354 n_qid
= new_child
.as(AQid)
5357 if _n_args
== old_child
then
5358 n_args
= new_child
.as(AExprs)
5361 if _n_assign
== old_child
then
5362 n_assign
= new_child
.as(TAssign)
5365 if _n_value
== old_child
then
5366 n_value
= new_child
.as(AExpr)
5371 redef fun n_expr
=(node
)
5376 redef fun n_qid
=(node
)
5381 redef fun n_args
=(node
)
5386 redef fun n_assign
=(node
)
5391 redef fun n_value
=(node
)
5398 redef fun visit_all
(v
: Visitor)
5400 v
.enter_visit
(_n_expr
)
5401 v
.enter_visit
(_n_qid
)
5402 v
.enter_visit
(_n_args
)
5403 v
.enter_visit
(_n_assign
)
5404 v
.enter_visit
(_n_value
)
5407 redef class ACallReassignExpr
5408 init init_acallreassignexpr
(
5409 n_expr
: nullable AExpr,
5410 n_qid
: nullable AQid,
5411 n_args
: nullable AExprs,
5412 n_assign_op
: nullable AAssignOp,
5413 n_value
: nullable AExpr
5416 _n_expr
= n_expr
.as(not null)
5417 n_expr
.parent
= self
5418 _n_qid
= n_qid
.as(not null)
5420 _n_args
= n_args
.as(not null)
5421 n_args
.parent
= self
5422 _n_assign_op
= n_assign_op
.as(not null)
5423 n_assign_op
.parent
= self
5424 _n_value
= n_value
.as(not null)
5425 n_value
.parent
= self
5428 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5430 if _n_expr
== old_child
then
5431 n_expr
= new_child
.as(AExpr)
5434 if _n_qid
== old_child
then
5435 n_qid
= new_child
.as(AQid)
5438 if _n_args
== old_child
then
5439 n_args
= new_child
.as(AExprs)
5442 if _n_assign_op
== old_child
then
5443 n_assign_op
= new_child
.as(AAssignOp)
5446 if _n_value
== old_child
then
5447 n_value
= new_child
.as(AExpr)
5452 redef fun n_expr
=(node
)
5457 redef fun n_qid
=(node
)
5462 redef fun n_args
=(node
)
5467 redef fun n_assign_op
=(node
)
5472 redef fun n_value
=(node
)
5479 redef fun visit_all
(v
: Visitor)
5481 v
.enter_visit
(_n_expr
)
5482 v
.enter_visit
(_n_qid
)
5483 v
.enter_visit
(_n_args
)
5484 v
.enter_visit
(_n_assign_op
)
5485 v
.enter_visit
(_n_value
)
5488 redef class ASuperExpr
5489 init init_asuperexpr
(
5490 n_qualified
: nullable AQualified,
5491 n_kwsuper
: nullable TKwsuper,
5492 n_args
: nullable AExprs
5495 _n_qualified
= n_qualified
5496 if n_qualified
!= null then n_qualified
.parent
= self
5497 _n_kwsuper
= n_kwsuper
.as(not null)
5498 n_kwsuper
.parent
= self
5499 _n_args
= n_args
.as(not null)
5500 n_args
.parent
= self
5503 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5505 if _n_qualified
== old_child
then
5506 n_qualified
= new_child
.as(nullable AQualified)
5509 if _n_kwsuper
== old_child
then
5510 n_kwsuper
= new_child
.as(TKwsuper)
5513 if _n_args
== old_child
then
5514 n_args
= new_child
.as(AExprs)
5519 redef fun n_qualified
=(node
)
5522 if node
!= null then node
.parent
= self
5524 redef fun n_kwsuper
=(node
)
5529 redef fun n_args
=(node
)
5536 redef fun visit_all
(v
: Visitor)
5538 v
.enter_visit
(_n_qualified
)
5539 v
.enter_visit
(_n_kwsuper
)
5540 v
.enter_visit
(_n_args
)
5543 redef class AInitExpr
5544 init init_ainitexpr
(
5545 n_expr
: nullable AExpr,
5546 n_kwinit
: nullable TKwinit,
5547 n_args
: nullable AExprs
5550 _n_expr
= n_expr
.as(not null)
5551 n_expr
.parent
= self
5552 _n_kwinit
= n_kwinit
.as(not null)
5553 n_kwinit
.parent
= self
5554 _n_args
= n_args
.as(not null)
5555 n_args
.parent
= self
5558 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5560 if _n_expr
== old_child
then
5561 n_expr
= new_child
.as(AExpr)
5564 if _n_kwinit
== old_child
then
5565 n_kwinit
= new_child
.as(TKwinit)
5568 if _n_args
== old_child
then
5569 n_args
= new_child
.as(AExprs)
5574 redef fun n_expr
=(node
)
5579 redef fun n_kwinit
=(node
)
5584 redef fun n_args
=(node
)
5591 redef fun visit_all
(v
: Visitor)
5593 v
.enter_visit
(_n_expr
)
5594 v
.enter_visit
(_n_kwinit
)
5595 v
.enter_visit
(_n_args
)
5598 redef class ABraExpr
5599 init init_abraexpr
(
5600 n_expr
: nullable AExpr,
5601 n_args
: nullable AExprs
5604 _n_expr
= n_expr
.as(not null)
5605 n_expr
.parent
= self
5606 _n_args
= n_args
.as(not null)
5607 n_args
.parent
= self
5610 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5612 if _n_expr
== old_child
then
5613 n_expr
= new_child
.as(AExpr)
5616 if _n_args
== old_child
then
5617 n_args
= new_child
.as(AExprs)
5622 redef fun n_expr
=(node
)
5627 redef fun n_args
=(node
)
5634 redef fun visit_all
(v
: Visitor)
5636 v
.enter_visit
(_n_expr
)
5637 v
.enter_visit
(_n_args
)
5640 redef class ABraAssignExpr
5641 init init_abraassignexpr
(
5642 n_expr
: nullable AExpr,
5643 n_args
: nullable AExprs,
5644 n_assign
: nullable TAssign,
5645 n_value
: nullable AExpr
5648 _n_expr
= n_expr
.as(not null)
5649 n_expr
.parent
= self
5650 _n_args
= n_args
.as(not null)
5651 n_args
.parent
= self
5652 _n_assign
= n_assign
.as(not null)
5653 n_assign
.parent
= self
5654 _n_value
= n_value
.as(not null)
5655 n_value
.parent
= self
5658 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5660 if _n_expr
== old_child
then
5661 n_expr
= new_child
.as(AExpr)
5664 if _n_args
== old_child
then
5665 n_args
= new_child
.as(AExprs)
5668 if _n_assign
== old_child
then
5669 n_assign
= new_child
.as(TAssign)
5672 if _n_value
== old_child
then
5673 n_value
= new_child
.as(AExpr)
5678 redef fun n_expr
=(node
)
5683 redef fun n_args
=(node
)
5688 redef fun n_assign
=(node
)
5693 redef fun n_value
=(node
)
5700 redef fun visit_all
(v
: Visitor)
5702 v
.enter_visit
(_n_expr
)
5703 v
.enter_visit
(_n_args
)
5704 v
.enter_visit
(_n_assign
)
5705 v
.enter_visit
(_n_value
)
5708 redef class ABraReassignExpr
5709 init init_abrareassignexpr
(
5710 n_expr
: nullable AExpr,
5711 n_args
: nullable AExprs,
5712 n_assign_op
: nullable AAssignOp,
5713 n_value
: nullable AExpr
5716 _n_expr
= n_expr
.as(not null)
5717 n_expr
.parent
= self
5718 _n_args
= n_args
.as(not null)
5719 n_args
.parent
= self
5720 _n_assign_op
= n_assign_op
.as(not null)
5721 n_assign_op
.parent
= self
5722 _n_value
= n_value
.as(not null)
5723 n_value
.parent
= self
5726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5728 if _n_expr
== old_child
then
5729 n_expr
= new_child
.as(AExpr)
5732 if _n_args
== old_child
then
5733 n_args
= new_child
.as(AExprs)
5736 if _n_assign_op
== old_child
then
5737 n_assign_op
= new_child
.as(AAssignOp)
5740 if _n_value
== old_child
then
5741 n_value
= new_child
.as(AExpr)
5746 redef fun n_expr
=(node
)
5751 redef fun n_args
=(node
)
5756 redef fun n_assign_op
=(node
)
5761 redef fun n_value
=(node
)
5768 redef fun visit_all
(v
: Visitor)
5770 v
.enter_visit
(_n_expr
)
5771 v
.enter_visit
(_n_args
)
5772 v
.enter_visit
(_n_assign_op
)
5773 v
.enter_visit
(_n_value
)
5776 redef class AVarExpr
5777 init init_avarexpr
(
5781 _n_id
= n_id
.as(not null)
5785 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5787 if _n_id
== old_child
then
5788 n_id
= new_child
.as(TId)
5793 redef fun n_id
=(node
)
5800 redef fun visit_all
(v
: Visitor)
5802 v
.enter_visit
(_n_id
)
5805 redef class AVarAssignExpr
5806 init init_avarassignexpr
(
5808 n_assign
: nullable TAssign,
5809 n_value
: nullable AExpr
5812 _n_id
= n_id
.as(not null)
5814 _n_assign
= n_assign
.as(not null)
5815 n_assign
.parent
= self
5816 _n_value
= n_value
.as(not null)
5817 n_value
.parent
= self
5820 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5822 if _n_id
== old_child
then
5823 n_id
= new_child
.as(TId)
5826 if _n_assign
== old_child
then
5827 n_assign
= new_child
.as(TAssign)
5830 if _n_value
== old_child
then
5831 n_value
= new_child
.as(AExpr)
5836 redef fun n_id
=(node
)
5841 redef fun n_assign
=(node
)
5846 redef fun n_value
=(node
)
5853 redef fun visit_all
(v
: Visitor)
5855 v
.enter_visit
(_n_id
)
5856 v
.enter_visit
(_n_assign
)
5857 v
.enter_visit
(_n_value
)
5860 redef class AVarReassignExpr
5861 init init_avarreassignexpr
(
5863 n_assign_op
: nullable AAssignOp,
5864 n_value
: nullable AExpr
5867 _n_id
= n_id
.as(not null)
5869 _n_assign_op
= n_assign_op
.as(not null)
5870 n_assign_op
.parent
= self
5871 _n_value
= n_value
.as(not null)
5872 n_value
.parent
= self
5875 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5877 if _n_id
== old_child
then
5878 n_id
= new_child
.as(TId)
5881 if _n_assign_op
== old_child
then
5882 n_assign_op
= new_child
.as(AAssignOp)
5885 if _n_value
== old_child
then
5886 n_value
= new_child
.as(AExpr)
5891 redef fun n_id
=(node
)
5896 redef fun n_assign_op
=(node
)
5901 redef fun n_value
=(node
)
5908 redef fun visit_all
(v
: Visitor)
5910 v
.enter_visit
(_n_id
)
5911 v
.enter_visit
(_n_assign_op
)
5912 v
.enter_visit
(_n_value
)
5915 redef class ARangeExpr
5916 init init_arangeexpr
(
5917 n_expr
: nullable AExpr,
5918 n_expr2
: nullable AExpr,
5919 n_annotations
: nullable AAnnotations
5922 _n_expr
= n_expr
.as(not null)
5923 n_expr
.parent
= self
5924 _n_expr2
= n_expr2
.as(not null)
5925 n_expr2
.parent
= self
5926 _n_annotations
= n_annotations
5927 if n_annotations
!= null then n_annotations
.parent
= self
5930 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5932 if _n_expr
== old_child
then
5933 n_expr
= new_child
.as(AExpr)
5936 if _n_expr2
== old_child
then
5937 n_expr2
= new_child
.as(AExpr)
5940 if _n_annotations
== old_child
then
5941 n_annotations
= new_child
.as(nullable AAnnotations)
5946 redef fun n_expr
=(node
)
5951 redef fun n_expr2
=(node
)
5956 redef fun n_annotations
=(node
)
5958 _n_annotations
= node
5959 if node
!= null then node
.parent
= self
5963 redef fun visit_all
(v
: Visitor)
5965 v
.enter_visit
(_n_expr
)
5966 v
.enter_visit
(_n_expr2
)
5967 v
.enter_visit
(_n_annotations
)
5970 redef class ACrangeExpr
5971 init init_acrangeexpr
(
5972 n_obra
: nullable TObra,
5973 n_expr
: nullable AExpr,
5974 n_dotdot
: nullable TDotdot,
5975 n_expr2
: nullable AExpr,
5976 n_cbra
: nullable TCbra,
5977 n_annotations
: nullable AAnnotations
5980 _n_obra
= n_obra
.as(not null)
5981 n_obra
.parent
= self
5982 _n_expr
= n_expr
.as(not null)
5983 n_expr
.parent
= self
5984 _n_dotdot
= n_dotdot
.as(not null)
5985 n_dotdot
.parent
= self
5986 _n_expr2
= n_expr2
.as(not null)
5987 n_expr2
.parent
= self
5988 _n_cbra
= n_cbra
.as(not null)
5989 n_cbra
.parent
= self
5990 _n_annotations
= n_annotations
5991 if n_annotations
!= null then n_annotations
.parent
= self
5994 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5996 if _n_obra
== old_child
then
5997 n_obra
= new_child
.as(TObra)
6000 if _n_expr
== old_child
then
6001 n_expr
= new_child
.as(AExpr)
6004 if _n_dotdot
== old_child
then
6005 n_dotdot
= new_child
.as(TDotdot)
6008 if _n_expr2
== old_child
then
6009 n_expr2
= new_child
.as(AExpr)
6012 if _n_cbra
== old_child
then
6013 n_cbra
= new_child
.as(TCbra)
6016 if _n_annotations
== old_child
then
6017 n_annotations
= new_child
.as(nullable AAnnotations)
6022 redef fun n_obra
=(node
)
6027 redef fun n_expr
=(node
)
6032 redef fun n_dotdot
=(node
)
6037 redef fun n_expr2
=(node
)
6042 redef fun n_cbra
=(node
)
6047 redef fun n_annotations
=(node
)
6049 _n_annotations
= node
6050 if node
!= null then node
.parent
= self
6054 redef fun visit_all
(v
: Visitor)
6056 v
.enter_visit
(_n_obra
)
6057 v
.enter_visit
(_n_expr
)
6058 v
.enter_visit
(_n_dotdot
)
6059 v
.enter_visit
(_n_expr2
)
6060 v
.enter_visit
(_n_cbra
)
6061 v
.enter_visit
(_n_annotations
)
6064 redef class AOrangeExpr
6065 init init_aorangeexpr
(
6066 n_obra
: nullable TObra,
6067 n_expr
: nullable AExpr,
6068 n_dotdot
: nullable TDotdot,
6069 n_expr2
: nullable AExpr,
6070 n_cbra
: nullable TObra,
6071 n_annotations
: nullable AAnnotations
6074 _n_obra
= n_obra
.as(not null)
6075 n_obra
.parent
= self
6076 _n_expr
= n_expr
.as(not null)
6077 n_expr
.parent
= self
6078 _n_dotdot
= n_dotdot
.as(not null)
6079 n_dotdot
.parent
= self
6080 _n_expr2
= n_expr2
.as(not null)
6081 n_expr2
.parent
= self
6082 _n_cbra
= n_cbra
.as(not null)
6083 n_cbra
.parent
= self
6084 _n_annotations
= n_annotations
6085 if n_annotations
!= null then n_annotations
.parent
= self
6088 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6090 if _n_obra
== old_child
then
6091 n_obra
= new_child
.as(TObra)
6094 if _n_expr
== old_child
then
6095 n_expr
= new_child
.as(AExpr)
6098 if _n_dotdot
== old_child
then
6099 n_dotdot
= new_child
.as(TDotdot)
6102 if _n_expr2
== old_child
then
6103 n_expr2
= new_child
.as(AExpr)
6106 if _n_cbra
== old_child
then
6107 n_cbra
= new_child
.as(TObra)
6110 if _n_annotations
== old_child
then
6111 n_annotations
= new_child
.as(nullable AAnnotations)
6116 redef fun n_obra
=(node
)
6121 redef fun n_expr
=(node
)
6126 redef fun n_dotdot
=(node
)
6131 redef fun n_expr2
=(node
)
6136 redef fun n_cbra
=(node
)
6141 redef fun n_annotations
=(node
)
6143 _n_annotations
= node
6144 if node
!= null then node
.parent
= self
6148 redef fun visit_all
(v
: Visitor)
6150 v
.enter_visit
(_n_obra
)
6151 v
.enter_visit
(_n_expr
)
6152 v
.enter_visit
(_n_dotdot
)
6153 v
.enter_visit
(_n_expr2
)
6154 v
.enter_visit
(_n_cbra
)
6155 v
.enter_visit
(_n_annotations
)
6158 redef class AArrayExpr
6159 init init_aarrayexpr
(
6160 n_obra
: nullable TObra,
6161 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6162 n_type
: nullable AType,
6163 n_cbra
: nullable TCbra,
6164 n_annotations
: nullable AAnnotations
6167 _n_obra
= n_obra
.as(not null)
6168 n_obra
.parent
= self
6169 self.n_exprs
.unsafe_add_all
(n_exprs
)
6171 if n_type
!= null then n_type
.parent
= self
6172 _n_cbra
= n_cbra
.as(not null)
6173 n_cbra
.parent
= self
6174 _n_annotations
= n_annotations
6175 if n_annotations
!= null then n_annotations
.parent
= self
6178 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6180 if _n_obra
== old_child
then
6181 n_obra
= new_child
.as(TObra)
6184 if n_exprs
.replace_child
(old_child
, new_child
) then return
6185 if _n_type
== old_child
then
6186 n_type
= new_child
.as(nullable AType)
6189 if _n_cbra
== old_child
then
6190 n_cbra
= new_child
.as(TCbra)
6193 if _n_annotations
== old_child
then
6194 n_annotations
= new_child
.as(nullable AAnnotations)
6199 redef fun n_obra
=(node
)
6204 redef fun n_type
=(node
)
6207 if node
!= null then node
.parent
= self
6209 redef fun n_cbra
=(node
)
6214 redef fun n_annotations
=(node
)
6216 _n_annotations
= node
6217 if node
!= null then node
.parent
= self
6221 redef fun visit_all
(v
: Visitor)
6223 v
.enter_visit
(_n_obra
)
6224 n_exprs
.visit_all
(v
)
6225 v
.enter_visit
(_n_type
)
6226 v
.enter_visit
(_n_cbra
)
6227 v
.enter_visit
(_n_annotations
)
6230 redef class ASelfExpr
6231 init init_aselfexpr
(
6232 n_kwself
: nullable TKwself,
6233 n_annotations
: nullable AAnnotations
6236 _n_kwself
= n_kwself
.as(not null)
6237 n_kwself
.parent
= self
6238 _n_annotations
= n_annotations
6239 if n_annotations
!= null then n_annotations
.parent
= self
6242 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6244 if _n_kwself
== old_child
then
6245 n_kwself
= new_child
.as(TKwself)
6248 if _n_annotations
== old_child
then
6249 n_annotations
= new_child
.as(nullable AAnnotations)
6254 redef fun n_kwself
=(node
)
6259 redef fun n_annotations
=(node
)
6261 _n_annotations
= node
6262 if node
!= null then node
.parent
= self
6266 redef fun visit_all
(v
: Visitor)
6268 v
.enter_visit
(_n_kwself
)
6269 v
.enter_visit
(_n_annotations
)
6272 redef class AImplicitSelfExpr
6273 init init_aimplicitselfexpr
6277 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6283 redef fun visit_all
(v
: Visitor)
6287 redef class ATrueExpr
6288 init init_atrueexpr
(
6289 n_kwtrue
: nullable TKwtrue,
6290 n_annotations
: nullable AAnnotations
6293 _n_kwtrue
= n_kwtrue
.as(not null)
6294 n_kwtrue
.parent
= self
6295 _n_annotations
= n_annotations
6296 if n_annotations
!= null then n_annotations
.parent
= self
6299 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6301 if _n_kwtrue
== old_child
then
6302 n_kwtrue
= new_child
.as(TKwtrue)
6305 if _n_annotations
== old_child
then
6306 n_annotations
= new_child
.as(nullable AAnnotations)
6311 redef fun n_kwtrue
=(node
)
6316 redef fun n_annotations
=(node
)
6318 _n_annotations
= node
6319 if node
!= null then node
.parent
= self
6323 redef fun visit_all
(v
: Visitor)
6325 v
.enter_visit
(_n_kwtrue
)
6326 v
.enter_visit
(_n_annotations
)
6329 redef class AFalseExpr
6330 init init_afalseexpr
(
6331 n_kwfalse
: nullable TKwfalse,
6332 n_annotations
: nullable AAnnotations
6335 _n_kwfalse
= n_kwfalse
.as(not null)
6336 n_kwfalse
.parent
= self
6337 _n_annotations
= n_annotations
6338 if n_annotations
!= null then n_annotations
.parent
= self
6341 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6343 if _n_kwfalse
== old_child
then
6344 n_kwfalse
= new_child
.as(TKwfalse)
6347 if _n_annotations
== old_child
then
6348 n_annotations
= new_child
.as(nullable AAnnotations)
6353 redef fun n_kwfalse
=(node
)
6358 redef fun n_annotations
=(node
)
6360 _n_annotations
= node
6361 if node
!= null then node
.parent
= self
6365 redef fun visit_all
(v
: Visitor)
6367 v
.enter_visit
(_n_kwfalse
)
6368 v
.enter_visit
(_n_annotations
)
6371 redef class ANullExpr
6372 init init_anullexpr
(
6373 n_kwnull
: nullable TKwnull,
6374 n_annotations
: nullable AAnnotations
6377 _n_kwnull
= n_kwnull
.as(not null)
6378 n_kwnull
.parent
= self
6379 _n_annotations
= n_annotations
6380 if n_annotations
!= null then n_annotations
.parent
= self
6383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6385 if _n_kwnull
== old_child
then
6386 n_kwnull
= new_child
.as(TKwnull)
6389 if _n_annotations
== old_child
then
6390 n_annotations
= new_child
.as(nullable AAnnotations)
6395 redef fun n_kwnull
=(node
)
6400 redef fun n_annotations
=(node
)
6402 _n_annotations
= node
6403 if node
!= null then node
.parent
= self
6407 redef fun visit_all
(v
: Visitor)
6409 v
.enter_visit
(_n_kwnull
)
6410 v
.enter_visit
(_n_annotations
)
6413 redef class AIntegerExpr
6414 init init_aintegerexpr
(
6415 n_integer
: nullable TInteger,
6416 n_annotations
: nullable AAnnotations
6419 _n_integer
= n_integer
.as(not null)
6420 n_integer
.parent
= self
6421 _n_annotations
= n_annotations
6422 if n_annotations
!= null then n_annotations
.parent
= self
6425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6427 if _n_integer
== old_child
then
6428 n_integer
= new_child
.as(TInteger)
6431 if _n_annotations
== old_child
then
6432 n_annotations
= new_child
.as(nullable AAnnotations)
6437 redef fun n_integer
=(node
)
6442 redef fun n_annotations
=(node
)
6444 _n_annotations
= node
6445 if node
!= null then node
.parent
= self
6449 redef fun visit_all
(v
: Visitor)
6451 v
.enter_visit
(_n_integer
)
6452 v
.enter_visit
(_n_annotations
)
6455 redef class AFloatExpr
6456 init init_afloatexpr
(
6457 n_float
: nullable TFloat,
6458 n_annotations
: nullable AAnnotations
6461 _n_float
= n_float
.as(not null)
6462 n_float
.parent
= self
6463 _n_annotations
= n_annotations
6464 if n_annotations
!= null then n_annotations
.parent
= self
6467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6469 if _n_float
== old_child
then
6470 n_float
= new_child
.as(TFloat)
6473 if _n_annotations
== old_child
then
6474 n_annotations
= new_child
.as(nullable AAnnotations)
6479 redef fun n_float
=(node
)
6484 redef fun n_annotations
=(node
)
6486 _n_annotations
= node
6487 if node
!= null then node
.parent
= self
6491 redef fun visit_all
(v
: Visitor)
6493 v
.enter_visit
(_n_float
)
6494 v
.enter_visit
(_n_annotations
)
6497 redef class ACharExpr
6498 init init_acharexpr
(
6499 n_char
: nullable TChar,
6500 n_annotations
: nullable AAnnotations
6503 _n_char
= n_char
.as(not null)
6504 n_char
.parent
= self
6505 _n_annotations
= n_annotations
6506 if n_annotations
!= null then n_annotations
.parent
= self
6509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6511 if _n_char
== old_child
then
6512 n_char
= new_child
.as(TChar)
6515 if _n_annotations
== old_child
then
6516 n_annotations
= new_child
.as(nullable AAnnotations)
6521 redef fun n_char
=(node
)
6526 redef fun n_annotations
=(node
)
6528 _n_annotations
= node
6529 if node
!= null then node
.parent
= self
6533 redef fun visit_all
(v
: Visitor)
6535 v
.enter_visit
(_n_char
)
6536 v
.enter_visit
(_n_annotations
)
6539 redef class AStringExpr
6540 init init_astringexpr
(
6541 n_string
: nullable TString,
6542 n_annotations
: nullable AAnnotations
6545 _n_string
= n_string
.as(not null)
6546 n_string
.parent
= self
6547 _n_annotations
= n_annotations
6548 if n_annotations
!= null then n_annotations
.parent
= self
6551 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6553 if _n_string
== old_child
then
6554 n_string
= new_child
.as(TString)
6557 if _n_annotations
== old_child
then
6558 n_annotations
= new_child
.as(nullable AAnnotations)
6563 redef fun n_string
=(node
)
6568 redef fun n_annotations
=(node
)
6570 _n_annotations
= node
6571 if node
!= null then node
.parent
= self
6575 redef fun visit_all
(v
: Visitor)
6577 v
.enter_visit
(_n_string
)
6578 v
.enter_visit
(_n_annotations
)
6581 redef class AStartStringExpr
6582 init init_astartstringexpr
(
6583 n_string
: nullable TStartString
6586 _n_string
= n_string
.as(not null)
6587 n_string
.parent
= self
6590 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6592 if _n_string
== old_child
then
6593 n_string
= new_child
.as(TStartString)
6598 redef fun n_string
=(node
)
6605 redef fun visit_all
(v
: Visitor)
6607 v
.enter_visit
(_n_string
)
6610 redef class AMidStringExpr
6611 init init_amidstringexpr
(
6612 n_string
: nullable TMidString
6615 _n_string
= n_string
.as(not null)
6616 n_string
.parent
= self
6619 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6621 if _n_string
== old_child
then
6622 n_string
= new_child
.as(TMidString)
6627 redef fun n_string
=(node
)
6634 redef fun visit_all
(v
: Visitor)
6636 v
.enter_visit
(_n_string
)
6639 redef class AEndStringExpr
6640 init init_aendstringexpr
(
6641 n_string
: nullable TEndString
6644 _n_string
= n_string
.as(not null)
6645 n_string
.parent
= self
6648 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6650 if _n_string
== old_child
then
6651 n_string
= new_child
.as(TEndString)
6656 redef fun n_string
=(node
)
6663 redef fun visit_all
(v
: Visitor)
6665 v
.enter_visit
(_n_string
)
6668 redef class ASuperstringExpr
6669 init init_asuperstringexpr
(
6670 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6671 n_annotations
: nullable AAnnotations
6674 self.n_exprs
.unsafe_add_all
(n_exprs
)
6675 _n_annotations
= n_annotations
6676 if n_annotations
!= null then n_annotations
.parent
= self
6679 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6681 if n_exprs
.replace_child
(old_child
, new_child
) then return
6682 if _n_annotations
== old_child
then
6683 n_annotations
= new_child
.as(nullable AAnnotations)
6688 redef fun n_annotations
=(node
)
6690 _n_annotations
= node
6691 if node
!= null then node
.parent
= self
6695 redef fun visit_all
(v
: Visitor)
6697 n_exprs
.visit_all
(v
)
6698 v
.enter_visit
(_n_annotations
)
6701 redef class AParExpr
6702 init init_aparexpr
(
6703 n_opar
: nullable TOpar,
6704 n_expr
: nullable AExpr,
6705 n_cpar
: nullable TCpar,
6706 n_annotations
: nullable AAnnotations
6709 _n_opar
= n_opar
.as(not null)
6710 n_opar
.parent
= self
6711 _n_expr
= n_expr
.as(not null)
6712 n_expr
.parent
= self
6713 _n_cpar
= n_cpar
.as(not null)
6714 n_cpar
.parent
= self
6715 _n_annotations
= n_annotations
6716 if n_annotations
!= null then n_annotations
.parent
= self
6719 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6721 if _n_opar
== old_child
then
6722 n_opar
= new_child
.as(TOpar)
6725 if _n_expr
== old_child
then
6726 n_expr
= new_child
.as(AExpr)
6729 if _n_cpar
== old_child
then
6730 n_cpar
= new_child
.as(TCpar)
6733 if _n_annotations
== old_child
then
6734 n_annotations
= new_child
.as(nullable AAnnotations)
6739 redef fun n_opar
=(node
)
6744 redef fun n_expr
=(node
)
6749 redef fun n_cpar
=(node
)
6754 redef fun n_annotations
=(node
)
6756 _n_annotations
= node
6757 if node
!= null then node
.parent
= self
6761 redef fun visit_all
(v
: Visitor)
6763 v
.enter_visit
(_n_opar
)
6764 v
.enter_visit
(_n_expr
)
6765 v
.enter_visit
(_n_cpar
)
6766 v
.enter_visit
(_n_annotations
)
6769 redef class AAsCastExpr
6770 init init_aascastexpr
(
6771 n_expr
: nullable AExpr,
6772 n_kwas
: nullable TKwas,
6773 n_opar
: nullable TOpar,
6774 n_type
: nullable AType,
6775 n_cpar
: nullable TCpar
6778 _n_expr
= n_expr
.as(not null)
6779 n_expr
.parent
= self
6780 _n_kwas
= n_kwas
.as(not null)
6781 n_kwas
.parent
= self
6783 if n_opar
!= null then n_opar
.parent
= self
6784 _n_type
= n_type
.as(not null)
6785 n_type
.parent
= self
6787 if n_cpar
!= null then n_cpar
.parent
= self
6790 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6792 if _n_expr
== old_child
then
6793 n_expr
= new_child
.as(AExpr)
6796 if _n_kwas
== old_child
then
6797 n_kwas
= new_child
.as(TKwas)
6800 if _n_opar
== old_child
then
6801 n_opar
= new_child
.as(nullable TOpar)
6804 if _n_type
== old_child
then
6805 n_type
= new_child
.as(AType)
6808 if _n_cpar
== old_child
then
6809 n_cpar
= new_child
.as(nullable TCpar)
6814 redef fun n_expr
=(node
)
6819 redef fun n_kwas
=(node
)
6824 redef fun n_opar
=(node
)
6827 if node
!= null then node
.parent
= self
6829 redef fun n_type
=(node
)
6834 redef fun n_cpar
=(node
)
6837 if node
!= null then node
.parent
= self
6841 redef fun visit_all
(v
: Visitor)
6843 v
.enter_visit
(_n_expr
)
6844 v
.enter_visit
(_n_kwas
)
6845 v
.enter_visit
(_n_opar
)
6846 v
.enter_visit
(_n_type
)
6847 v
.enter_visit
(_n_cpar
)
6850 redef class AAsNotnullExpr
6851 init init_aasnotnullexpr
(
6852 n_expr
: nullable AExpr,
6853 n_kwas
: nullable TKwas,
6854 n_opar
: nullable TOpar,
6855 n_kwnot
: nullable TKwnot,
6856 n_kwnull
: nullable TKwnull,
6857 n_cpar
: nullable TCpar
6860 _n_expr
= n_expr
.as(not null)
6861 n_expr
.parent
= self
6862 _n_kwas
= n_kwas
.as(not null)
6863 n_kwas
.parent
= self
6865 if n_opar
!= null then n_opar
.parent
= self
6866 _n_kwnot
= n_kwnot
.as(not null)
6867 n_kwnot
.parent
= self
6868 _n_kwnull
= n_kwnull
.as(not null)
6869 n_kwnull
.parent
= self
6871 if n_cpar
!= null then n_cpar
.parent
= self
6874 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6876 if _n_expr
== old_child
then
6877 n_expr
= new_child
.as(AExpr)
6880 if _n_kwas
== old_child
then
6881 n_kwas
= new_child
.as(TKwas)
6884 if _n_opar
== old_child
then
6885 n_opar
= new_child
.as(nullable TOpar)
6888 if _n_kwnot
== old_child
then
6889 n_kwnot
= new_child
.as(TKwnot)
6892 if _n_kwnull
== old_child
then
6893 n_kwnull
= new_child
.as(TKwnull)
6896 if _n_cpar
== old_child
then
6897 n_cpar
= new_child
.as(nullable TCpar)
6902 redef fun n_expr
=(node
)
6907 redef fun n_kwas
=(node
)
6912 redef fun n_opar
=(node
)
6915 if node
!= null then node
.parent
= self
6917 redef fun n_kwnot
=(node
)
6922 redef fun n_kwnull
=(node
)
6927 redef fun n_cpar
=(node
)
6930 if node
!= null then node
.parent
= self
6934 redef fun visit_all
(v
: Visitor)
6936 v
.enter_visit
(_n_expr
)
6937 v
.enter_visit
(_n_kwas
)
6938 v
.enter_visit
(_n_opar
)
6939 v
.enter_visit
(_n_kwnot
)
6940 v
.enter_visit
(_n_kwnull
)
6941 v
.enter_visit
(_n_cpar
)
6944 redef class AIssetAttrExpr
6945 init init_aissetattrexpr
(
6946 n_kwisset
: nullable TKwisset,
6947 n_expr
: nullable AExpr,
6948 n_id
: nullable TAttrid
6951 _n_kwisset
= n_kwisset
.as(not null)
6952 n_kwisset
.parent
= self
6953 _n_expr
= n_expr
.as(not null)
6954 n_expr
.parent
= self
6955 _n_id
= n_id
.as(not null)
6959 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6961 if _n_kwisset
== old_child
then
6962 n_kwisset
= new_child
.as(TKwisset)
6965 if _n_expr
== old_child
then
6966 n_expr
= new_child
.as(AExpr)
6969 if _n_id
== old_child
then
6970 n_id
= new_child
.as(TAttrid)
6975 redef fun n_kwisset
=(node
)
6980 redef fun n_expr
=(node
)
6985 redef fun n_id
=(node
)
6992 redef fun visit_all
(v
: Visitor)
6994 v
.enter_visit
(_n_kwisset
)
6995 v
.enter_visit
(_n_expr
)
6996 v
.enter_visit
(_n_id
)
6999 redef class ADebugTypeExpr
7000 init init_adebugtypeexpr
(
7001 n_kwdebug
: nullable TKwdebug,
7002 n_kwtype
: nullable TKwtype,
7003 n_expr
: nullable AExpr,
7004 n_type
: nullable AType
7007 _n_kwdebug
= n_kwdebug
.as(not null)
7008 n_kwdebug
.parent
= self
7009 _n_kwtype
= n_kwtype
.as(not null)
7010 n_kwtype
.parent
= self
7011 _n_expr
= n_expr
.as(not null)
7012 n_expr
.parent
= self
7013 _n_type
= n_type
.as(not null)
7014 n_type
.parent
= self
7017 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7019 if _n_kwdebug
== old_child
then
7020 n_kwdebug
= new_child
.as(TKwdebug)
7023 if _n_kwtype
== old_child
then
7024 n_kwtype
= new_child
.as(TKwtype)
7027 if _n_expr
== old_child
then
7028 n_expr
= new_child
.as(AExpr)
7031 if _n_type
== old_child
then
7032 n_type
= new_child
.as(AType)
7037 redef fun n_kwdebug
=(node
)
7042 redef fun n_kwtype
=(node
)
7047 redef fun n_expr
=(node
)
7052 redef fun n_type
=(node
)
7059 redef fun visit_all
(v
: Visitor)
7061 v
.enter_visit
(_n_kwdebug
)
7062 v
.enter_visit
(_n_kwtype
)
7063 v
.enter_visit
(_n_expr
)
7064 v
.enter_visit
(_n_type
)
7067 redef class AVarargExpr
7068 init init_avarargexpr
(
7069 n_expr
: nullable AExpr,
7070 n_dotdotdot
: nullable TDotdotdot
7073 _n_expr
= n_expr
.as(not null)
7074 n_expr
.parent
= self
7075 _n_dotdotdot
= n_dotdotdot
.as(not null)
7076 n_dotdotdot
.parent
= self
7079 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7081 if _n_expr
== old_child
then
7082 n_expr
= new_child
.as(AExpr)
7085 if _n_dotdotdot
== old_child
then
7086 n_dotdotdot
= new_child
.as(TDotdotdot)
7091 redef fun n_expr
=(node
)
7096 redef fun n_dotdotdot
=(node
)
7103 redef fun visit_all
(v
: Visitor)
7105 v
.enter_visit
(_n_expr
)
7106 v
.enter_visit
(_n_dotdotdot
)
7109 redef class ANamedargExpr
7110 init init_anamedargexpr
(
7112 n_assign
: nullable TAssign,
7113 n_expr
: nullable AExpr
7116 _n_id
= n_id
.as(not null)
7118 _n_assign
= n_assign
.as(not null)
7119 n_assign
.parent
= self
7120 _n_expr
= n_expr
.as(not null)
7121 n_expr
.parent
= self
7124 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7126 if _n_id
== old_child
then
7127 n_id
= new_child
.as(TId)
7130 if _n_assign
== old_child
then
7131 n_assign
= new_child
.as(TAssign)
7134 if _n_expr
== old_child
then
7135 n_expr
= new_child
.as(AExpr)
7140 redef fun n_id
=(node
)
7145 redef fun n_assign
=(node
)
7150 redef fun n_expr
=(node
)
7157 redef fun visit_all
(v
: Visitor)
7159 v
.enter_visit
(_n_id
)
7160 v
.enter_visit
(_n_assign
)
7161 v
.enter_visit
(_n_expr
)
7164 redef class ATypeExpr
7165 init init_atypeexpr
(
7166 n_type
: nullable AType
7169 _n_type
= n_type
.as(not null)
7170 n_type
.parent
= self
7173 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7175 if _n_type
== old_child
then
7176 n_type
= new_child
.as(AType)
7181 redef fun n_type
=(node
)
7188 redef fun visit_all
(v
: Visitor)
7190 v
.enter_visit
(_n_type
)
7193 redef class AMethidExpr
7194 init init_amethidexpr
(
7195 n_expr
: nullable AExpr,
7196 n_id
: nullable AMethid
7199 _n_expr
= n_expr
.as(not null)
7200 n_expr
.parent
= self
7201 _n_id
= n_id
.as(not null)
7205 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7207 if _n_expr
== old_child
then
7208 n_expr
= new_child
.as(AExpr)
7211 if _n_id
== old_child
then
7212 n_id
= new_child
.as(AMethid)
7217 redef fun n_expr
=(node
)
7222 redef fun n_id
=(node
)
7229 redef fun visit_all
(v
: Visitor)
7231 v
.enter_visit
(_n_expr
)
7232 v
.enter_visit
(_n_id
)
7237 n_annotations
: nullable AAnnotations
7240 _n_annotations
= n_annotations
.as(not null)
7241 n_annotations
.parent
= self
7244 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7246 if _n_annotations
== old_child
then
7247 n_annotations
= new_child
.as(AAnnotations)
7252 redef fun n_annotations
=(node
)
7254 _n_annotations
= node
7259 redef fun visit_all
(v
: Visitor)
7261 v
.enter_visit
(_n_annotations
)
7264 redef class AManyExpr
7265 init init_amanyexpr
(
7266 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7269 self.n_exprs
.unsafe_add_all
(n_exprs
)
7272 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7274 if n_exprs
.replace_child
(old_child
, new_child
) then return
7279 redef fun visit_all
(v
: Visitor)
7281 n_exprs
.visit_all
(v
)
7284 redef class AListExprs
7285 init init_alistexprs
(
7286 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7289 self.n_exprs
.unsafe_add_all
(n_exprs
)
7292 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7294 if n_exprs
.replace_child
(old_child
, new_child
) then return
7299 redef fun visit_all
(v
: Visitor)
7301 n_exprs
.visit_all
(v
)
7304 redef class AParExprs
7305 init init_aparexprs
(
7306 n_opar
: nullable TOpar,
7307 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7308 n_cpar
: nullable TCpar
7311 _n_opar
= n_opar
.as(not null)
7312 n_opar
.parent
= self
7313 self.n_exprs
.unsafe_add_all
(n_exprs
)
7314 _n_cpar
= n_cpar
.as(not null)
7315 n_cpar
.parent
= self
7318 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7320 if _n_opar
== old_child
then
7321 n_opar
= new_child
.as(TOpar)
7324 if n_exprs
.replace_child
(old_child
, new_child
) then return
7325 if _n_cpar
== old_child
then
7326 n_cpar
= new_child
.as(TCpar)
7331 redef fun n_opar
=(node
)
7336 redef fun n_cpar
=(node
)
7343 redef fun visit_all
(v
: Visitor)
7345 v
.enter_visit
(_n_opar
)
7346 n_exprs
.visit_all
(v
)
7347 v
.enter_visit
(_n_cpar
)
7350 redef class ABraExprs
7351 init init_abraexprs
(
7352 n_obra
: nullable TObra,
7353 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7354 n_cbra
: nullable TCbra
7357 _n_obra
= n_obra
.as(not null)
7358 n_obra
.parent
= self
7359 self.n_exprs
.unsafe_add_all
(n_exprs
)
7360 _n_cbra
= n_cbra
.as(not null)
7361 n_cbra
.parent
= self
7364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7366 if _n_obra
== old_child
then
7367 n_obra
= new_child
.as(TObra)
7370 if n_exprs
.replace_child
(old_child
, new_child
) then return
7371 if _n_cbra
== old_child
then
7372 n_cbra
= new_child
.as(TCbra)
7377 redef fun n_obra
=(node
)
7382 redef fun n_cbra
=(node
)
7389 redef fun visit_all
(v
: Visitor)
7391 v
.enter_visit
(_n_obra
)
7392 n_exprs
.visit_all
(v
)
7393 v
.enter_visit
(_n_cbra
)
7396 redef class APlusAssignOp
7397 init init_aplusassignop
(
7398 n_op
: nullable TPluseq
7401 _n_op
= n_op
.as(not null)
7405 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7407 if _n_op
== old_child
then
7408 n_op
= new_child
.as(TPluseq)
7413 redef fun n_op
=(node
)
7420 redef fun visit_all
(v
: Visitor)
7422 v
.enter_visit
(_n_op
)
7425 redef class AMinusAssignOp
7426 init init_aminusassignop
(
7427 n_op
: nullable TMinuseq
7430 _n_op
= n_op
.as(not null)
7434 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7436 if _n_op
== old_child
then
7437 n_op
= new_child
.as(TMinuseq)
7442 redef fun n_op
=(node
)
7449 redef fun visit_all
(v
: Visitor)
7451 v
.enter_visit
(_n_op
)
7454 redef class AStarAssignOp
7455 init init_astarassignop
(
7456 n_op
: nullable TStareq
7459 _n_op
= n_op
.as(not null)
7463 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7465 if _n_op
== old_child
then
7466 n_op
= new_child
.as(TStareq)
7471 redef fun n_op
=(node
)
7478 redef fun visit_all
(v
: Visitor)
7480 v
.enter_visit
(_n_op
)
7483 redef class ASlashAssignOp
7484 init init_aslashassignop
(
7485 n_op
: nullable TSlasheq
7488 _n_op
= n_op
.as(not null)
7492 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7494 if _n_op
== old_child
then
7495 n_op
= new_child
.as(TSlasheq)
7500 redef fun n_op
=(node
)
7507 redef fun visit_all
(v
: Visitor)
7509 v
.enter_visit
(_n_op
)
7512 redef class APercentAssignOp
7513 init init_apercentassignop
(
7514 n_op
: nullable TPercenteq
7517 _n_op
= n_op
.as(not null)
7521 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7523 if _n_op
== old_child
then
7524 n_op
= new_child
.as(TPercenteq)
7529 redef fun n_op
=(node
)
7536 redef fun visit_all
(v
: Visitor)
7538 v
.enter_visit
(_n_op
)
7541 redef class AStarstarAssignOp
7542 init init_astarstarassignop
(
7543 n_op
: nullable TStarstareq
7546 _n_op
= n_op
.as(not null)
7550 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7552 if _n_op
== old_child
then
7553 n_op
= new_child
.as(TStarstareq)
7558 redef fun n_op
=(node
)
7565 redef fun visit_all
(v
: Visitor)
7567 v
.enter_visit
(_n_op
)
7570 redef class APipeAssignOp
7571 init init_apipeassignop
(
7572 n_op
: nullable TPipeeq
7575 _n_op
= n_op
.as(not null)
7579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7581 if _n_op
== old_child
then
7582 n_op
= new_child
.as(TPipeeq)
7587 redef fun n_op
=(node
)
7594 redef fun visit_all
(v
: Visitor)
7596 v
.enter_visit
(_n_op
)
7599 redef class ACaretAssignOp
7600 init init_acaretassignop
(
7601 n_op
: nullable TCareteq
7604 _n_op
= n_op
.as(not null)
7608 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7610 if _n_op
== old_child
then
7611 n_op
= new_child
.as(TCareteq)
7616 redef fun n_op
=(node
)
7623 redef fun visit_all
(v
: Visitor)
7625 v
.enter_visit
(_n_op
)
7628 redef class AAmpAssignOp
7629 init init_aampassignop
(
7630 n_op
: nullable TAmpeq
7633 _n_op
= n_op
.as(not null)
7637 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7639 if _n_op
== old_child
then
7640 n_op
= new_child
.as(TAmpeq)
7645 redef fun n_op
=(node
)
7652 redef fun visit_all
(v
: Visitor)
7654 v
.enter_visit
(_n_op
)
7657 redef class ALlAssignOp
7658 init init_allassignop
(
7659 n_op
: nullable TLleq
7662 _n_op
= n_op
.as(not null)
7666 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7668 if _n_op
== old_child
then
7669 n_op
= new_child
.as(TLleq)
7674 redef fun n_op
=(node
)
7681 redef fun visit_all
(v
: Visitor)
7683 v
.enter_visit
(_n_op
)
7686 redef class AGgAssignOp
7687 init init_aggassignop
(
7688 n_op
: nullable TGgeq
7691 _n_op
= n_op
.as(not null)
7695 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7697 if _n_op
== old_child
then
7698 n_op
= new_child
.as(TGgeq)
7703 redef fun n_op
=(node
)
7710 redef fun visit_all
(v
: Visitor)
7712 v
.enter_visit
(_n_op
)
7715 redef class AForGroup
7716 init init_aforgroup
(
7717 n_ids
: Collection[Object], # Should be Collection[TId]
7718 n_kwin
: nullable TKwin,
7719 n_expr
: nullable AExpr
7722 self.n_ids
.unsafe_add_all
(n_ids
)
7723 _n_kwin
= n_kwin
.as(not null)
7724 n_kwin
.parent
= self
7725 _n_expr
= n_expr
.as(not null)
7726 n_expr
.parent
= self
7729 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7731 if n_ids
.replace_child
(old_child
, new_child
) then return
7732 if _n_kwin
== old_child
then
7733 n_kwin
= new_child
.as(TKwin)
7736 if _n_expr
== old_child
then
7737 n_expr
= new_child
.as(AExpr)
7742 redef fun n_kwin
=(node
)
7747 redef fun n_expr
=(node
)
7754 redef fun visit_all
(v
: Visitor)
7757 v
.enter_visit
(_n_kwin
)
7758 v
.enter_visit
(_n_expr
)
7761 redef class AModuleName
7762 init init_amodulename
(
7763 n_quad
: nullable TQuad,
7764 n_path
: Collection[Object], # Should be Collection[TId]
7769 if n_quad
!= null then n_quad
.parent
= self
7770 self.n_path
.unsafe_add_all
(n_path
)
7771 _n_id
= n_id
.as(not null)
7775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7777 if _n_quad
== old_child
then
7778 n_quad
= new_child
.as(nullable TQuad)
7781 if n_path
.replace_child
(old_child
, new_child
) then return
7782 if _n_id
== old_child
then
7783 n_id
= new_child
.as(TId)
7788 redef fun n_quad
=(node
)
7791 if node
!= null then node
.parent
= self
7793 redef fun n_id
=(node
)
7800 redef fun visit_all
(v
: Visitor)
7802 v
.enter_visit
(_n_quad
)
7804 v
.enter_visit
(_n_id
)
7807 redef class AExternCalls
7808 init init_aexterncalls
(
7809 n_kwimport
: nullable TKwimport,
7810 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7813 _n_kwimport
= n_kwimport
.as(not null)
7814 n_kwimport
.parent
= self
7815 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7818 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7820 if _n_kwimport
== old_child
then
7821 n_kwimport
= new_child
.as(TKwimport)
7824 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7827 redef fun n_kwimport
=(node
)
7834 redef fun visit_all
(v
: Visitor)
7836 v
.enter_visit
(_n_kwimport
)
7837 n_extern_calls
.visit_all
(v
)
7840 redef class AExternCall
7841 init init_aexterncall
7845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7851 redef fun visit_all
(v
: Visitor)
7855 redef class ASuperExternCall
7856 init init_asuperexterncall
(
7857 n_kwsuper
: nullable TKwsuper
7860 _n_kwsuper
= n_kwsuper
.as(not null)
7861 n_kwsuper
.parent
= self
7864 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7866 if _n_kwsuper
== old_child
then
7867 n_kwsuper
= new_child
.as(TKwsuper)
7872 redef fun n_kwsuper
=(node
)
7879 redef fun visit_all
(v
: Visitor)
7881 v
.enter_visit
(_n_kwsuper
)
7884 redef class ALocalPropExternCall
7885 init init_alocalpropexterncall
(
7886 n_methid
: nullable AMethid
7889 _n_methid
= n_methid
.as(not null)
7890 n_methid
.parent
= self
7893 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7895 if _n_methid
== old_child
then
7896 n_methid
= new_child
.as(AMethid)
7901 redef fun n_methid
=(node
)
7908 redef fun visit_all
(v
: Visitor)
7910 v
.enter_visit
(_n_methid
)
7913 redef class AFullPropExternCall
7914 init init_afullpropexterncall
(
7915 n_type
: nullable AType,
7916 n_dot
: nullable TDot,
7917 n_methid
: nullable AMethid
7920 _n_type
= n_type
.as(not null)
7921 n_type
.parent
= self
7923 if n_dot
!= null then n_dot
.parent
= self
7924 _n_methid
= n_methid
.as(not null)
7925 n_methid
.parent
= self
7928 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7930 if _n_type
== old_child
then
7931 n_type
= new_child
.as(AType)
7934 if _n_dot
== old_child
then
7935 n_dot
= new_child
.as(nullable TDot)
7938 if _n_methid
== old_child
then
7939 n_methid
= new_child
.as(AMethid)
7944 redef fun n_type
=(node
)
7949 redef fun n_dot
=(node
)
7952 if node
!= null then node
.parent
= self
7954 redef fun n_methid
=(node
)
7961 redef fun visit_all
(v
: Visitor)
7963 v
.enter_visit
(_n_type
)
7964 v
.enter_visit
(_n_dot
)
7965 v
.enter_visit
(_n_methid
)
7968 redef class AInitPropExternCall
7969 init init_ainitpropexterncall
(
7970 n_type
: nullable AType
7973 _n_type
= n_type
.as(not null)
7974 n_type
.parent
= self
7977 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7979 if _n_type
== old_child
then
7980 n_type
= new_child
.as(AType)
7985 redef fun n_type
=(node
)
7992 redef fun visit_all
(v
: Visitor)
7994 v
.enter_visit
(_n_type
)
7997 redef class ACastAsExternCall
7998 init init_acastasexterncall
(
7999 n_from_type
: nullable AType,
8000 n_dot
: nullable TDot,
8001 n_kwas
: nullable TKwas,
8002 n_to_type
: nullable AType
8005 _n_from_type
= n_from_type
.as(not null)
8006 n_from_type
.parent
= self
8008 if n_dot
!= null then n_dot
.parent
= self
8009 _n_kwas
= n_kwas
.as(not null)
8010 n_kwas
.parent
= self
8011 _n_to_type
= n_to_type
.as(not null)
8012 n_to_type
.parent
= self
8015 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8017 if _n_from_type
== old_child
then
8018 n_from_type
= new_child
.as(AType)
8021 if _n_dot
== old_child
then
8022 n_dot
= new_child
.as(nullable TDot)
8025 if _n_kwas
== old_child
then
8026 n_kwas
= new_child
.as(TKwas)
8029 if _n_to_type
== old_child
then
8030 n_to_type
= new_child
.as(AType)
8035 redef fun n_from_type
=(node
)
8040 redef fun n_dot
=(node
)
8043 if node
!= null then node
.parent
= self
8045 redef fun n_kwas
=(node
)
8050 redef fun n_to_type
=(node
)
8057 redef fun visit_all
(v
: Visitor)
8059 v
.enter_visit
(_n_from_type
)
8060 v
.enter_visit
(_n_dot
)
8061 v
.enter_visit
(_n_kwas
)
8062 v
.enter_visit
(_n_to_type
)
8065 redef class AAsNullableExternCall
8066 init init_aasnullableexterncall
(
8067 n_type
: nullable AType,
8068 n_kwas
: nullable TKwas,
8069 n_kwnullable
: nullable TKwnullable
8072 _n_type
= n_type
.as(not null)
8073 n_type
.parent
= self
8074 _n_kwas
= n_kwas
.as(not null)
8075 n_kwas
.parent
= self
8076 _n_kwnullable
= n_kwnullable
.as(not null)
8077 n_kwnullable
.parent
= self
8080 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8082 if _n_type
== old_child
then
8083 n_type
= new_child
.as(AType)
8086 if _n_kwas
== old_child
then
8087 n_kwas
= new_child
.as(TKwas)
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_kwnullable
=(node
)
8108 _n_kwnullable
= node
8113 redef fun visit_all
(v
: Visitor)
8115 v
.enter_visit
(_n_type
)
8116 v
.enter_visit
(_n_kwas
)
8117 v
.enter_visit
(_n_kwnullable
)
8120 redef class AAsNotNullableExternCall
8121 init init_aasnotnullableexterncall
(
8122 n_type
: nullable AType,
8123 n_kwas
: nullable TKwas,
8124 n_kwnot
: nullable TKwnot,
8125 n_kwnullable
: nullable TKwnullable
8128 _n_type
= n_type
.as(not null)
8129 n_type
.parent
= self
8130 _n_kwas
= n_kwas
.as(not null)
8131 n_kwas
.parent
= self
8132 _n_kwnot
= n_kwnot
.as(not null)
8133 n_kwnot
.parent
= self
8134 _n_kwnullable
= n_kwnullable
.as(not null)
8135 n_kwnullable
.parent
= self
8138 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8140 if _n_type
== old_child
then
8141 n_type
= new_child
.as(AType)
8144 if _n_kwas
== old_child
then
8145 n_kwas
= new_child
.as(TKwas)
8148 if _n_kwnot
== old_child
then
8149 n_kwnot
= new_child
.as(TKwnot)
8152 if _n_kwnullable
== old_child
then
8153 n_kwnullable
= new_child
.as(TKwnullable)
8158 redef fun n_type
=(node
)
8163 redef fun n_kwas
=(node
)
8168 redef fun n_kwnot
=(node
)
8173 redef fun n_kwnullable
=(node
)
8175 _n_kwnullable
= node
8180 redef fun visit_all
(v
: Visitor)
8182 v
.enter_visit
(_n_type
)
8183 v
.enter_visit
(_n_kwas
)
8184 v
.enter_visit
(_n_kwnot
)
8185 v
.enter_visit
(_n_kwnullable
)
8188 redef class AInLanguage
8189 init init_ainlanguage
(
8190 n_kwin
: nullable TKwin,
8191 n_string
: nullable TString
8194 _n_kwin
= n_kwin
.as(not null)
8195 n_kwin
.parent
= self
8196 _n_string
= n_string
.as(not null)
8197 n_string
.parent
= self
8200 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8202 if _n_kwin
== old_child
then
8203 n_kwin
= new_child
.as(TKwin)
8206 if _n_string
== old_child
then
8207 n_string
= new_child
.as(TString)
8212 redef fun n_kwin
=(node
)
8217 redef fun n_string
=(node
)
8224 redef fun visit_all
(v
: Visitor)
8226 v
.enter_visit
(_n_kwin
)
8227 v
.enter_visit
(_n_string
)
8230 redef class AExternCodeBlock
8231 init init_aexterncodeblock
(
8232 n_in_language
: nullable AInLanguage,
8233 n_extern_code_segment
: nullable TExternCodeSegment
8236 _n_in_language
= n_in_language
8237 if n_in_language
!= null then n_in_language
.parent
= self
8238 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
8239 n_extern_code_segment
.parent
= self
8242 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8244 if _n_in_language
== old_child
then
8245 n_in_language
= new_child
.as(nullable AInLanguage)
8248 if _n_extern_code_segment
== old_child
then
8249 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
8254 redef fun n_in_language
=(node
)
8256 _n_in_language
= node
8257 if node
!= null then node
.parent
= self
8259 redef fun n_extern_code_segment
=(node
)
8261 _n_extern_code_segment
= node
8266 redef fun visit_all
(v
: Visitor)
8268 v
.enter_visit
(_n_in_language
)
8269 v
.enter_visit
(_n_extern_code_segment
)
8272 redef class AQualified
8273 init init_aqualified
(
8274 n_id
: Collection[Object], # Should be Collection[TId]
8275 n_classid
: nullable TClassid
8278 self.n_id
.unsafe_add_all
(n_id
)
8279 _n_classid
= n_classid
8280 if n_classid
!= null then n_classid
.parent
= self
8283 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8285 if n_id
.replace_child
(old_child
, new_child
) then return
8286 if _n_classid
== old_child
then
8287 n_classid
= new_child
.as(nullable TClassid)
8292 redef fun n_classid
=(node
)
8295 if node
!= null then node
.parent
= self
8299 redef fun visit_all
(v
: Visitor)
8302 v
.enter_visit
(_n_classid
)
8307 n_comment
: Collection[Object] # Should be Collection[TComment]
8310 self.n_comment
.unsafe_add_all
(n_comment
)
8313 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8315 if n_comment
.replace_child
(old_child
, new_child
) then return
8320 redef fun visit_all
(v
: Visitor)
8322 n_comment
.visit_all
(v
)
8325 redef class AAnnotations
8326 init init_aannotations
(
8327 n_kwis
: nullable TKwis,
8329 n_opar
: nullable TOpar,
8330 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8331 n_cpar
: nullable TCpar,
8332 n_kwend
: nullable TKwend
8336 if n_kwis
!= null then n_kwis
.parent
= self
8338 if n_at
!= null then n_at
.parent
= self
8340 if n_opar
!= null then n_opar
.parent
= self
8341 self.n_items
.unsafe_add_all
(n_items
)
8343 if n_cpar
!= null then n_cpar
.parent
= self
8345 if n_kwend
!= null then n_kwend
.parent
= self
8348 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8350 if _n_kwis
== old_child
then
8351 n_kwis
= new_child
.as(nullable TKwis)
8354 if _n_at
== old_child
then
8355 n_at
= new_child
.as(nullable TAt)
8358 if _n_opar
== old_child
then
8359 n_opar
= new_child
.as(nullable TOpar)
8362 if n_items
.replace_child
(old_child
, new_child
) then return
8363 if _n_cpar
== old_child
then
8364 n_cpar
= new_child
.as(nullable TCpar)
8367 if _n_kwend
== old_child
then
8368 n_kwend
= new_child
.as(nullable TKwend)
8373 redef fun n_kwis
=(node
)
8376 if node
!= null then node
.parent
= self
8378 redef fun n_at
=(node
)
8381 if node
!= null then node
.parent
= self
8383 redef fun n_opar
=(node
)
8386 if node
!= null then node
.parent
= self
8388 redef fun n_cpar
=(node
)
8391 if node
!= null then node
.parent
= self
8393 redef fun n_kwend
=(node
)
8396 if node
!= null then node
.parent
= self
8400 redef fun visit_all
(v
: Visitor)
8402 v
.enter_visit
(_n_kwis
)
8403 v
.enter_visit
(_n_at
)
8404 v
.enter_visit
(_n_opar
)
8405 n_items
.visit_all
(v
)
8406 v
.enter_visit
(_n_cpar
)
8407 v
.enter_visit
(_n_kwend
)
8410 redef class AAnnotation
8411 init init_aannotation
(
8412 n_doc
: nullable ADoc,
8413 n_kwredef
: nullable TKwredef,
8414 n_visibility
: nullable AVisibility,
8415 n_atid
: nullable AAtid,
8416 n_opar
: nullable TOpar,
8417 n_args
: Collection[Object], # Should be Collection[AExpr]
8418 n_cpar
: nullable TCpar,
8419 n_annotations
: nullable AAnnotations
8423 if n_doc
!= null then n_doc
.parent
= self
8424 _n_kwredef
= n_kwredef
8425 if n_kwredef
!= null then n_kwredef
.parent
= self
8426 _n_visibility
= n_visibility
8427 if n_visibility
!= null then n_visibility
.parent
= self
8428 _n_atid
= n_atid
.as(not null)
8429 n_atid
.parent
= self
8431 if n_opar
!= null then n_opar
.parent
= self
8432 self.n_args
.unsafe_add_all
(n_args
)
8434 if n_cpar
!= null then n_cpar
.parent
= self
8435 _n_annotations
= n_annotations
8436 if n_annotations
!= null then n_annotations
.parent
= self
8439 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8441 if _n_doc
== old_child
then
8442 n_doc
= new_child
.as(nullable ADoc)
8445 if _n_kwredef
== old_child
then
8446 n_kwredef
= new_child
.as(nullable TKwredef)
8449 if _n_visibility
== old_child
then
8450 n_visibility
= new_child
.as(nullable AVisibility)
8453 if _n_atid
== old_child
then
8454 n_atid
= new_child
.as(AAtid)
8457 if _n_opar
== old_child
then
8458 n_opar
= new_child
.as(nullable TOpar)
8461 if n_args
.replace_child
(old_child
, new_child
) then return
8462 if _n_cpar
== old_child
then
8463 n_cpar
= new_child
.as(nullable TCpar)
8466 if _n_annotations
== old_child
then
8467 n_annotations
= new_child
.as(nullable AAnnotations)
8472 redef fun n_doc
=(node
)
8475 if node
!= null then node
.parent
= self
8477 redef fun n_kwredef
=(node
)
8480 if node
!= null then node
.parent
= self
8482 redef fun n_visibility
=(node
)
8484 _n_visibility
= node
8485 if node
!= null then node
.parent
= self
8487 redef fun n_atid
=(node
)
8492 redef fun n_opar
=(node
)
8495 if node
!= null then node
.parent
= self
8497 redef fun n_cpar
=(node
)
8500 if node
!= null then node
.parent
= self
8502 redef fun n_annotations
=(node
)
8504 _n_annotations
= node
8505 if node
!= null then node
.parent
= self
8509 redef fun visit_all
(v
: Visitor)
8511 v
.enter_visit
(_n_doc
)
8512 v
.enter_visit
(_n_kwredef
)
8513 v
.enter_visit
(_n_visibility
)
8514 v
.enter_visit
(_n_atid
)
8515 v
.enter_visit
(_n_opar
)
8517 v
.enter_visit
(_n_cpar
)
8518 v
.enter_visit
(_n_annotations
)
8526 _n_id
= n_id
.as(not null)
8530 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8532 if _n_id
== old_child
then
8533 n_id
= new_child
.as(TId)
8538 redef fun n_id
=(node
)
8545 redef fun visit_all
(v
: Visitor)
8547 v
.enter_visit
(_n_id
)
8550 redef class AKwexternAtid
8551 init init_akwexternatid
(
8552 n_id
: nullable TKwextern
8555 _n_id
= n_id
.as(not null)
8559 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8561 if _n_id
== old_child
then
8562 n_id
= new_child
.as(TKwextern)
8567 redef fun n_id
=(node
)
8574 redef fun visit_all
(v
: Visitor)
8576 v
.enter_visit
(_n_id
)
8579 redef class AKwabstractAtid
8580 init init_akwabstractatid
(
8581 n_id
: nullable TKwabstract
8584 _n_id
= n_id
.as(not null)
8588 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8590 if _n_id
== old_child
then
8591 n_id
= new_child
.as(TKwabstract)
8596 redef fun n_id
=(node
)
8603 redef fun visit_all
(v
: Visitor)
8605 v
.enter_visit
(_n_id
)
8608 redef class AKwimportAtid
8609 init init_akwimportatid
(
8610 n_id
: nullable TKwimport
8613 _n_id
= n_id
.as(not null)
8617 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8619 if _n_id
== old_child
then
8620 n_id
= new_child
.as(TKwimport)
8625 redef fun n_id
=(node
)
8632 redef fun visit_all
(v
: Visitor)
8634 v
.enter_visit
(_n_id
)
8639 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8641 if _n_base
== old_child
then
8642 if new_child
== null then
8644 new_child
.parent
= self
8645 assert new_child
isa AModule
8648 old_child
.parent
= null
8653 redef fun visit_all
(v
: Visitor)
8655 if _n_base
!= null then
8656 v
.enter_visit
(_n_base
.as(not null))
8658 v
.enter_visit
(_n_eof
)