1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
is no_warning
("missing-doc")
6 intrude import parser_nodes
11 n_moduledecl
: nullable AModuledecl,
12 n_imports
: Collection[Object], # Should be Collection[AImport]
13 n_extern_code_blocks
: Collection[Object], # Should be Collection[AExternCodeBlock]
14 n_classdefs
: Collection[Object] # Should be Collection[AClassdef]
17 _n_moduledecl
= n_moduledecl
18 if n_moduledecl
!= null then n_moduledecl
.parent
= self
19 self.n_imports
.unsafe_add_all
(n_imports
)
20 self.n_extern_code_blocks
.unsafe_add_all
(n_extern_code_blocks
)
21 self.n_classdefs
.unsafe_add_all
(n_classdefs
)
24 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
26 if _n_moduledecl
== old_child
then
27 n_moduledecl
= new_child
.as(nullable AModuledecl)
30 if n_imports
.replace_child
(old_child
, new_child
) then return
31 if n_extern_code_blocks
.replace_child
(old_child
, new_child
) then return
32 if n_classdefs
.replace_child
(old_child
, new_child
) then return
35 redef fun n_moduledecl
=(node
)
38 if node
!= null then node
.parent
= self
42 redef fun visit_all
(v
: Visitor)
44 v
.enter_visit
(_n_moduledecl
)
45 n_imports
.visit_all
(v
)
46 n_extern_code_blocks
.visit_all
(v
)
47 n_classdefs
.visit_all
(v
)
50 redef class AModuledecl
51 init init_amoduledecl
(
53 n_kwredef
: nullable TKwredef,
54 n_visibility
: nullable AVisibility,
55 n_kwmodule
: nullable TKwmodule,
56 n_name
: nullable AModuleName,
57 n_annotations
: nullable AAnnotations
61 if n_doc
!= null then n_doc
.parent
= self
62 _n_kwredef
= n_kwredef
63 if n_kwredef
!= null then n_kwredef
.parent
= self
64 _n_visibility
= n_visibility
.as(not null)
65 n_visibility
.parent
= self
66 _n_kwmodule
= n_kwmodule
.as(not null)
67 n_kwmodule
.parent
= self
68 _n_name
= n_name
.as(not null)
70 _n_annotations
= n_annotations
71 if n_annotations
!= null then n_annotations
.parent
= self
74 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
76 if _n_doc
== old_child
then
77 n_doc
= new_child
.as(nullable ADoc)
80 if _n_kwredef
== old_child
then
81 n_kwredef
= new_child
.as(nullable TKwredef)
84 if _n_visibility
== old_child
then
85 n_visibility
= new_child
.as(AVisibility)
88 if _n_kwmodule
== old_child
then
89 n_kwmodule
= new_child
.as(TKwmodule)
92 if _n_name
== old_child
then
93 n_name
= new_child
.as(AModuleName)
96 if _n_annotations
== old_child
then
97 n_annotations
= new_child
.as(nullable AAnnotations)
102 redef fun n_doc
=(node
)
105 if node
!= null then node
.parent
= self
107 redef fun n_kwredef
=(node
)
110 if node
!= null then node
.parent
= self
112 redef fun n_visibility
=(node
)
117 redef fun n_kwmodule
=(node
)
122 redef fun n_name
=(node
)
127 redef fun n_annotations
=(node
)
129 _n_annotations
= node
130 if node
!= null then node
.parent
= self
134 redef fun visit_all
(v
: Visitor)
136 v
.enter_visit
(_n_doc
)
137 v
.enter_visit
(_n_kwredef
)
138 v
.enter_visit
(_n_visibility
)
139 v
.enter_visit
(_n_kwmodule
)
140 v
.enter_visit
(_n_name
)
141 v
.enter_visit
(_n_annotations
)
144 redef class AStdImport
145 init init_astdimport
(
146 n_visibility
: nullable AVisibility,
147 n_kwimport
: nullable TKwimport,
148 n_name
: nullable AModuleName,
149 n_annotations
: nullable AAnnotations
152 _n_visibility
= n_visibility
.as(not null)
153 n_visibility
.parent
= self
154 _n_kwimport
= n_kwimport
.as(not null)
155 n_kwimport
.parent
= self
156 _n_name
= n_name
.as(not null)
158 _n_annotations
= n_annotations
159 if n_annotations
!= null then n_annotations
.parent
= self
162 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
164 if _n_visibility
== old_child
then
165 n_visibility
= new_child
.as(AVisibility)
168 if _n_kwimport
== old_child
then
169 n_kwimport
= new_child
.as(TKwimport)
172 if _n_name
== old_child
then
173 n_name
= new_child
.as(AModuleName)
176 if _n_annotations
== old_child
then
177 n_annotations
= new_child
.as(nullable AAnnotations)
182 redef fun n_visibility
=(node
)
187 redef fun n_kwimport
=(node
)
192 redef fun n_name
=(node
)
197 redef fun n_annotations
=(node
)
199 _n_annotations
= node
200 if node
!= null then node
.parent
= self
204 redef fun visit_all
(v
: Visitor)
206 v
.enter_visit
(_n_visibility
)
207 v
.enter_visit
(_n_kwimport
)
208 v
.enter_visit
(_n_name
)
209 v
.enter_visit
(_n_annotations
)
212 redef class ANoImport
213 init init_anoimport
(
214 n_visibility
: nullable AVisibility,
215 n_kwimport
: nullable TKwimport,
216 n_kwend
: nullable TKwend
219 _n_visibility
= n_visibility
.as(not null)
220 n_visibility
.parent
= self
221 _n_kwimport
= n_kwimport
.as(not null)
222 n_kwimport
.parent
= self
223 _n_kwend
= n_kwend
.as(not null)
224 n_kwend
.parent
= self
227 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
229 if _n_visibility
== old_child
then
230 n_visibility
= new_child
.as(AVisibility)
233 if _n_kwimport
== old_child
then
234 n_kwimport
= new_child
.as(TKwimport)
237 if _n_kwend
== old_child
then
238 n_kwend
= new_child
.as(TKwend)
243 redef fun n_visibility
=(node
)
248 redef fun n_kwimport
=(node
)
253 redef fun n_kwend
=(node
)
260 redef fun visit_all
(v
: Visitor)
262 v
.enter_visit
(_n_visibility
)
263 v
.enter_visit
(_n_kwimport
)
264 v
.enter_visit
(_n_kwend
)
267 redef class APublicVisibility
268 init init_apublicvisibility
(
269 n_kwpublic
: nullable TKwpublic
272 _n_kwpublic
= n_kwpublic
273 if n_kwpublic
!= null then n_kwpublic
.parent
= self
276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
278 if _n_kwpublic
== old_child
then
279 n_kwpublic
= new_child
.as(nullable TKwpublic)
284 redef fun n_kwpublic
=(node
)
287 if node
!= null then node
.parent
= self
291 redef fun visit_all
(v
: Visitor)
293 v
.enter_visit
(_n_kwpublic
)
296 redef class APrivateVisibility
297 init init_aprivatevisibility
(
298 n_kwprivate
: nullable TKwprivate
301 _n_kwprivate
= n_kwprivate
.as(not null)
302 n_kwprivate
.parent
= self
305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
307 if _n_kwprivate
== old_child
then
308 n_kwprivate
= new_child
.as(TKwprivate)
313 redef fun n_kwprivate
=(node
)
320 redef fun visit_all
(v
: Visitor)
322 v
.enter_visit
(_n_kwprivate
)
325 redef class AProtectedVisibility
326 init init_aprotectedvisibility
(
327 n_kwprotected
: nullable TKwprotected
330 _n_kwprotected
= n_kwprotected
.as(not null)
331 n_kwprotected
.parent
= self
334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
336 if _n_kwprotected
== old_child
then
337 n_kwprotected
= new_child
.as(TKwprotected)
342 redef fun n_kwprotected
=(node
)
344 _n_kwprotected
= node
349 redef fun visit_all
(v
: Visitor)
351 v
.enter_visit
(_n_kwprotected
)
354 redef class AIntrudeVisibility
355 init init_aintrudevisibility
(
356 n_kwintrude
: nullable TKwintrude
359 _n_kwintrude
= n_kwintrude
.as(not null)
360 n_kwintrude
.parent
= self
363 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
365 if _n_kwintrude
== old_child
then
366 n_kwintrude
= new_child
.as(TKwintrude)
371 redef fun n_kwintrude
=(node
)
378 redef fun visit_all
(v
: Visitor)
380 v
.enter_visit
(_n_kwintrude
)
383 redef class AStdClassdef
384 init init_astdclassdef
(
385 n_doc
: nullable ADoc,
386 n_kwredef
: nullable TKwredef,
387 n_visibility
: nullable AVisibility,
388 n_classkind
: nullable AClasskind,
389 n_id
: nullable TClassid,
390 n_formaldefs
: Collection[Object], # Should be Collection[AFormaldef]
391 n_extern_code_block
: nullable AExternCodeBlock,
392 n_propdefs
: Collection[Object], # Should be Collection[APropdef]
393 n_kwend
: nullable TKwend
397 if n_doc
!= null then n_doc
.parent
= self
398 _n_kwredef
= n_kwredef
399 if n_kwredef
!= null then n_kwredef
.parent
= self
400 _n_visibility
= n_visibility
.as(not null)
401 n_visibility
.parent
= self
402 _n_classkind
= n_classkind
.as(not null)
403 n_classkind
.parent
= self
405 if n_id
!= null then n_id
.parent
= self
406 self.n_formaldefs
.unsafe_add_all
(n_formaldefs
)
407 _n_extern_code_block
= n_extern_code_block
408 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
409 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
410 _n_kwend
= n_kwend
.as(not null)
411 n_kwend
.parent
= self
414 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
416 if _n_doc
== old_child
then
417 n_doc
= new_child
.as(nullable ADoc)
420 if _n_kwredef
== old_child
then
421 n_kwredef
= new_child
.as(nullable TKwredef)
424 if _n_visibility
== old_child
then
425 n_visibility
= new_child
.as(AVisibility)
428 if _n_classkind
== old_child
then
429 n_classkind
= new_child
.as(AClasskind)
432 if _n_id
== old_child
then
433 n_id
= new_child
.as(nullable TClassid)
436 if n_formaldefs
.replace_child
(old_child
, new_child
) then return
437 if _n_extern_code_block
== old_child
then
438 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
441 if n_propdefs
.replace_child
(old_child
, new_child
) then return
442 if _n_kwend
== old_child
then
443 n_kwend
= new_child
.as(TKwend)
448 redef fun n_doc
=(node
)
451 if node
!= null then node
.parent
= self
453 redef fun n_kwredef
=(node
)
456 if node
!= null then node
.parent
= self
458 redef fun n_visibility
=(node
)
463 redef fun n_classkind
=(node
)
468 redef fun n_id
=(node
)
471 if node
!= null then node
.parent
= self
473 redef fun n_extern_code_block
=(node
)
475 _n_extern_code_block
= node
476 if node
!= null then node
.parent
= self
478 redef fun n_kwend
=(node
)
485 redef fun visit_all
(v
: Visitor)
487 v
.enter_visit
(_n_doc
)
488 v
.enter_visit
(_n_kwredef
)
489 v
.enter_visit
(_n_visibility
)
490 v
.enter_visit
(_n_classkind
)
492 n_formaldefs
.visit_all
(v
)
493 v
.enter_visit
(_n_extern_code_block
)
494 n_propdefs
.visit_all
(v
)
495 v
.enter_visit
(_n_kwend
)
498 redef class ATopClassdef
499 init init_atopclassdef
(
500 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
503 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
508 if n_propdefs
.replace_child
(old_child
, new_child
) then return
513 redef fun visit_all
(v
: Visitor)
515 n_propdefs
.visit_all
(v
)
518 redef class AMainClassdef
519 init init_amainclassdef
(
520 n_propdefs
: Collection[Object] # Should be Collection[APropdef]
523 self.n_propdefs
.unsafe_add_all
(n_propdefs
)
526 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
528 if n_propdefs
.replace_child
(old_child
, new_child
) then return
533 redef fun visit_all
(v
: Visitor)
535 n_propdefs
.visit_all
(v
)
538 redef class AConcreteClasskind
539 init init_aconcreteclasskind
(
540 n_kwclass
: nullable TKwclass
543 _n_kwclass
= n_kwclass
.as(not null)
544 n_kwclass
.parent
= self
547 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
549 if _n_kwclass
== old_child
then
550 n_kwclass
= new_child
.as(TKwclass)
555 redef fun n_kwclass
=(node
)
562 redef fun visit_all
(v
: Visitor)
564 v
.enter_visit
(_n_kwclass
)
567 redef class AAbstractClasskind
568 init init_aabstractclasskind
(
569 n_kwabstract
: nullable TKwabstract,
570 n_kwclass
: nullable TKwclass
573 _n_kwabstract
= n_kwabstract
.as(not null)
574 n_kwabstract
.parent
= self
575 _n_kwclass
= n_kwclass
.as(not null)
576 n_kwclass
.parent
= self
579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
581 if _n_kwabstract
== old_child
then
582 n_kwabstract
= new_child
.as(TKwabstract)
585 if _n_kwclass
== old_child
then
586 n_kwclass
= new_child
.as(TKwclass)
591 redef fun n_kwabstract
=(node
)
596 redef fun n_kwclass
=(node
)
603 redef fun visit_all
(v
: Visitor)
605 v
.enter_visit
(_n_kwabstract
)
606 v
.enter_visit
(_n_kwclass
)
609 redef class AInterfaceClasskind
610 init init_ainterfaceclasskind
(
611 n_kwinterface
: nullable TKwinterface
614 _n_kwinterface
= n_kwinterface
.as(not null)
615 n_kwinterface
.parent
= self
618 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
620 if _n_kwinterface
== old_child
then
621 n_kwinterface
= new_child
.as(TKwinterface)
626 redef fun n_kwinterface
=(node
)
628 _n_kwinterface
= node
633 redef fun visit_all
(v
: Visitor)
635 v
.enter_visit
(_n_kwinterface
)
638 redef class AEnumClasskind
639 init init_aenumclasskind
(
640 n_kwenum
: nullable TKwenum
643 _n_kwenum
= n_kwenum
.as(not null)
644 n_kwenum
.parent
= self
647 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
649 if _n_kwenum
== old_child
then
650 n_kwenum
= new_child
.as(TKwenum)
655 redef fun n_kwenum
=(node
)
662 redef fun visit_all
(v
: Visitor)
664 v
.enter_visit
(_n_kwenum
)
667 redef class AExternClasskind
668 init init_aexternclasskind
(
669 n_kwextern
: nullable TKwextern,
670 n_kwclass
: nullable TKwclass
673 _n_kwextern
= n_kwextern
.as(not null)
674 n_kwextern
.parent
= self
675 _n_kwclass
= n_kwclass
676 if n_kwclass
!= null then n_kwclass
.parent
= self
679 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
681 if _n_kwextern
== old_child
then
682 n_kwextern
= new_child
.as(TKwextern)
685 if _n_kwclass
== old_child
then
686 n_kwclass
= new_child
.as(nullable TKwclass)
691 redef fun n_kwextern
=(node
)
696 redef fun n_kwclass
=(node
)
699 if node
!= null then node
.parent
= self
703 redef fun visit_all
(v
: Visitor)
705 v
.enter_visit
(_n_kwextern
)
706 v
.enter_visit
(_n_kwclass
)
709 redef class AFormaldef
710 init init_aformaldef
(
711 n_id
: nullable TClassid,
712 n_type
: nullable AType,
713 n_annotations
: nullable AAnnotations
716 _n_id
= n_id
.as(not null)
719 if n_type
!= null then n_type
.parent
= self
720 _n_annotations
= n_annotations
721 if n_annotations
!= null then n_annotations
.parent
= self
724 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
726 if _n_id
== old_child
then
727 n_id
= new_child
.as(TClassid)
730 if _n_type
== old_child
then
731 n_type
= new_child
.as(nullable AType)
734 if _n_annotations
== old_child
then
735 n_annotations
= new_child
.as(nullable AAnnotations)
740 redef fun n_id
=(node
)
745 redef fun n_type
=(node
)
748 if node
!= null then node
.parent
= self
750 redef fun n_annotations
=(node
)
752 _n_annotations
= node
753 if node
!= null then node
.parent
= self
757 redef fun visit_all
(v
: Visitor)
760 v
.enter_visit
(_n_type
)
761 v
.enter_visit
(_n_annotations
)
764 redef class AAttrPropdef
765 init init_aattrpropdef
(
766 n_doc
: nullable ADoc,
767 n_kwredef
: nullable TKwredef,
768 n_visibility
: nullable AVisibility,
769 n_kwvar
: nullable TKwvar,
771 n_type
: nullable AType,
772 n_expr
: nullable AExpr,
773 n_annotations
: nullable AAnnotations,
774 n_block
: nullable AExpr
778 if n_doc
!= null then n_doc
.parent
= self
779 _n_kwredef
= n_kwredef
780 if n_kwredef
!= null then n_kwredef
.parent
= self
781 _n_visibility
= n_visibility
.as(not null)
782 n_visibility
.parent
= self
783 _n_kwvar
= n_kwvar
.as(not null)
784 n_kwvar
.parent
= self
785 _n_id2
= n_id2
.as(not null)
788 if n_type
!= null then n_type
.parent
= self
790 if n_expr
!= null then n_expr
.parent
= self
791 _n_annotations
= n_annotations
792 if n_annotations
!= null then n_annotations
.parent
= self
794 if n_block
!= null then n_block
.parent
= self
797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
799 if _n_doc
== old_child
then
800 n_doc
= new_child
.as(nullable ADoc)
803 if _n_kwredef
== old_child
then
804 n_kwredef
= new_child
.as(nullable TKwredef)
807 if _n_visibility
== old_child
then
808 n_visibility
= new_child
.as(AVisibility)
811 if _n_kwvar
== old_child
then
812 n_kwvar
= new_child
.as(TKwvar)
815 if _n_id2
== old_child
then
816 n_id2
= new_child
.as(TId)
819 if _n_type
== old_child
then
820 n_type
= new_child
.as(nullable AType)
823 if _n_expr
== old_child
then
824 n_expr
= new_child
.as(nullable AExpr)
827 if _n_annotations
== old_child
then
828 n_annotations
= new_child
.as(nullable AAnnotations)
831 if _n_block
== old_child
then
832 n_block
= new_child
.as(nullable AExpr)
837 redef fun n_doc
=(node
)
840 if node
!= null then node
.parent
= self
842 redef fun n_kwredef
=(node
)
845 if node
!= null then node
.parent
= self
847 redef fun n_visibility
=(node
)
852 redef fun n_kwvar
=(node
)
857 redef fun n_id2
=(node
)
862 redef fun n_type
=(node
)
865 if node
!= null then node
.parent
= self
867 redef fun n_expr
=(node
)
870 if node
!= null then node
.parent
= self
872 redef fun n_annotations
=(node
)
874 _n_annotations
= node
875 if node
!= null then node
.parent
= self
877 redef fun n_block
=(node
)
880 if node
!= null then node
.parent
= self
884 redef fun visit_all
(v
: Visitor)
886 v
.enter_visit
(_n_doc
)
887 v
.enter_visit
(_n_kwredef
)
888 v
.enter_visit
(_n_visibility
)
889 v
.enter_visit
(_n_kwvar
)
890 v
.enter_visit
(_n_id2
)
891 v
.enter_visit
(_n_type
)
892 v
.enter_visit
(_n_expr
)
893 v
.enter_visit
(_n_annotations
)
894 v
.enter_visit
(_n_block
)
897 redef class AMainMethPropdef
898 init init_amainmethpropdef
(
899 n_kwredef
: nullable TKwredef,
900 n_block
: nullable AExpr
903 _n_kwredef
= n_kwredef
904 if n_kwredef
!= null then n_kwredef
.parent
= self
906 if n_block
!= null then n_block
.parent
= self
909 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
911 if _n_kwredef
== old_child
then
912 n_kwredef
= new_child
.as(nullable TKwredef)
915 if _n_block
== old_child
then
916 n_block
= new_child
.as(nullable AExpr)
921 redef fun n_kwredef
=(node
)
924 if node
!= null then node
.parent
= self
926 redef fun n_block
=(node
)
929 if node
!= null then node
.parent
= self
933 redef fun visit_all
(v
: Visitor)
935 v
.enter_visit
(_n_kwredef
)
936 v
.enter_visit
(_n_block
)
939 redef class ATypePropdef
940 init init_atypepropdef
(
941 n_doc
: nullable ADoc,
942 n_kwredef
: nullable TKwredef,
943 n_visibility
: nullable AVisibility,
944 n_kwtype
: nullable TKwtype,
945 n_id
: nullable TClassid,
946 n_type
: nullable AType,
947 n_annotations
: nullable AAnnotations
951 if n_doc
!= null then n_doc
.parent
= self
952 _n_kwredef
= n_kwredef
953 if n_kwredef
!= null then n_kwredef
.parent
= self
954 _n_visibility
= n_visibility
.as(not null)
955 n_visibility
.parent
= self
956 _n_kwtype
= n_kwtype
.as(not null)
957 n_kwtype
.parent
= self
958 _n_id
= n_id
.as(not null)
960 _n_type
= n_type
.as(not null)
962 _n_annotations
= n_annotations
963 if n_annotations
!= null then n_annotations
.parent
= self
966 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
968 if _n_doc
== old_child
then
969 n_doc
= new_child
.as(nullable ADoc)
972 if _n_kwredef
== old_child
then
973 n_kwredef
= new_child
.as(nullable TKwredef)
976 if _n_visibility
== old_child
then
977 n_visibility
= new_child
.as(AVisibility)
980 if _n_kwtype
== old_child
then
981 n_kwtype
= new_child
.as(TKwtype)
984 if _n_id
== old_child
then
985 n_id
= new_child
.as(TClassid)
988 if _n_type
== old_child
then
989 n_type
= new_child
.as(AType)
992 if _n_annotations
== old_child
then
993 n_annotations
= new_child
.as(nullable AAnnotations)
998 redef fun n_doc
=(node
)
1001 if node
!= null then node
.parent
= self
1003 redef fun n_kwredef
=(node
)
1006 if node
!= null then node
.parent
= self
1008 redef fun n_visibility
=(node
)
1010 _n_visibility
= node
1013 redef fun n_kwtype
=(node
)
1018 redef fun n_id
=(node
)
1023 redef fun n_type
=(node
)
1028 redef fun n_annotations
=(node
)
1030 _n_annotations
= node
1031 if node
!= null then node
.parent
= self
1035 redef fun visit_all
(v
: Visitor)
1037 v
.enter_visit
(_n_doc
)
1038 v
.enter_visit
(_n_kwredef
)
1039 v
.enter_visit
(_n_visibility
)
1040 v
.enter_visit
(_n_kwtype
)
1041 v
.enter_visit
(_n_id
)
1042 v
.enter_visit
(_n_type
)
1043 v
.enter_visit
(_n_annotations
)
1046 redef class AMethPropdef
1047 init init_amethpropdef
(
1048 n_doc
: nullable ADoc,
1049 n_kwredef
: nullable TKwredef,
1050 n_visibility
: nullable AVisibility,
1051 n_kwmeth
: nullable TKwmeth,
1052 n_kwinit
: nullable TKwinit,
1053 n_kwnew
: nullable TKwnew,
1054 n_methid
: nullable AMethid,
1055 n_signature
: nullable ASignature,
1056 n_annotations
: nullable AAnnotations,
1057 n_extern_calls
: nullable AExternCalls,
1058 n_extern_code_block
: nullable AExternCodeBlock,
1059 n_block
: nullable AExpr
1063 if n_doc
!= null then n_doc
.parent
= self
1064 _n_kwredef
= n_kwredef
1065 if n_kwredef
!= null then n_kwredef
.parent
= self
1066 _n_visibility
= n_visibility
.as(not null)
1067 n_visibility
.parent
= self
1068 _n_kwmeth
= n_kwmeth
1069 if n_kwmeth
!= null then n_kwmeth
.parent
= self
1070 _n_kwinit
= n_kwinit
1071 if n_kwinit
!= null then n_kwinit
.parent
= self
1073 if n_kwnew
!= null then n_kwnew
.parent
= self
1074 _n_methid
= n_methid
1075 if n_methid
!= null then n_methid
.parent
= self
1076 _n_signature
= n_signature
.as(not null)
1077 n_signature
.parent
= self
1078 _n_annotations
= n_annotations
1079 if n_annotations
!= null then n_annotations
.parent
= self
1080 _n_extern_calls
= n_extern_calls
1081 if n_extern_calls
!= null then n_extern_calls
.parent
= self
1082 _n_extern_code_block
= n_extern_code_block
1083 if n_extern_code_block
!= null then n_extern_code_block
.parent
= self
1085 if n_block
!= null then n_block
.parent
= self
1088 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1090 if _n_doc
== old_child
then
1091 n_doc
= new_child
.as(nullable ADoc)
1094 if _n_kwredef
== old_child
then
1095 n_kwredef
= new_child
.as(nullable TKwredef)
1098 if _n_visibility
== old_child
then
1099 n_visibility
= new_child
.as(AVisibility)
1102 if _n_kwmeth
== old_child
then
1103 n_kwmeth
= new_child
.as(nullable TKwmeth)
1106 if _n_kwinit
== old_child
then
1107 n_kwinit
= new_child
.as(nullable TKwinit)
1110 if _n_kwnew
== old_child
then
1111 n_kwnew
= new_child
.as(nullable TKwnew)
1114 if _n_methid
== old_child
then
1115 n_methid
= new_child
.as(nullable AMethid)
1118 if _n_signature
== old_child
then
1119 n_signature
= new_child
.as(ASignature)
1122 if _n_annotations
== old_child
then
1123 n_annotations
= new_child
.as(nullable AAnnotations)
1126 if _n_extern_calls
== old_child
then
1127 n_extern_calls
= new_child
.as(nullable AExternCalls)
1130 if _n_extern_code_block
== old_child
then
1131 n_extern_code_block
= new_child
.as(nullable AExternCodeBlock)
1134 if _n_block
== old_child
then
1135 n_block
= new_child
.as(nullable AExpr)
1140 redef fun n_doc
=(node
)
1143 if node
!= null then node
.parent
= self
1145 redef fun n_kwredef
=(node
)
1148 if node
!= null then node
.parent
= self
1150 redef fun n_visibility
=(node
)
1152 _n_visibility
= node
1155 redef fun n_kwmeth
=(node
)
1158 if node
!= null then node
.parent
= self
1160 redef fun n_kwinit
=(node
)
1163 if node
!= null then node
.parent
= self
1165 redef fun n_kwnew
=(node
)
1168 if node
!= null then node
.parent
= self
1170 redef fun n_methid
=(node
)
1173 if node
!= null then node
.parent
= self
1175 redef fun n_signature
=(node
)
1180 redef fun n_annotations
=(node
)
1182 _n_annotations
= node
1183 if node
!= null then node
.parent
= self
1185 redef fun n_extern_calls
=(node
)
1187 _n_extern_calls
= node
1188 if node
!= null then node
.parent
= self
1190 redef fun n_extern_code_block
=(node
)
1192 _n_extern_code_block
= node
1193 if node
!= null then node
.parent
= self
1195 redef fun n_block
=(node
)
1198 if node
!= null then node
.parent
= self
1202 redef fun visit_all
(v
: Visitor)
1204 v
.enter_visit
(_n_doc
)
1205 v
.enter_visit
(_n_kwredef
)
1206 v
.enter_visit
(_n_visibility
)
1207 v
.enter_visit
(_n_kwmeth
)
1208 v
.enter_visit
(_n_kwinit
)
1209 v
.enter_visit
(_n_kwnew
)
1210 v
.enter_visit
(_n_methid
)
1211 v
.enter_visit
(_n_signature
)
1212 v
.enter_visit
(_n_annotations
)
1213 v
.enter_visit
(_n_extern_calls
)
1214 v
.enter_visit
(_n_extern_code_block
)
1215 v
.enter_visit
(_n_block
)
1218 redef class ASuperPropdef
1219 init init_asuperpropdef
(
1220 n_doc
: nullable ADoc,
1221 n_kwredef
: nullable TKwredef,
1222 n_visibility
: nullable AVisibility,
1223 n_kwsuper
: nullable TKwsuper,
1224 n_type
: nullable AType,
1225 n_annotations
: nullable AAnnotations
1229 if n_doc
!= null then n_doc
.parent
= self
1230 _n_kwredef
= n_kwredef
1231 if n_kwredef
!= null then n_kwredef
.parent
= self
1232 _n_visibility
= n_visibility
.as(not null)
1233 n_visibility
.parent
= self
1234 _n_kwsuper
= n_kwsuper
.as(not null)
1235 n_kwsuper
.parent
= self
1236 _n_type
= n_type
.as(not null)
1237 n_type
.parent
= self
1238 _n_annotations
= n_annotations
1239 if n_annotations
!= null then n_annotations
.parent
= self
1242 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1244 if _n_doc
== old_child
then
1245 n_doc
= new_child
.as(nullable ADoc)
1248 if _n_kwredef
== old_child
then
1249 n_kwredef
= new_child
.as(nullable TKwredef)
1252 if _n_visibility
== old_child
then
1253 n_visibility
= new_child
.as(AVisibility)
1256 if _n_kwsuper
== old_child
then
1257 n_kwsuper
= new_child
.as(TKwsuper)
1260 if _n_type
== old_child
then
1261 n_type
= new_child
.as(AType)
1264 if _n_annotations
== old_child
then
1265 n_annotations
= new_child
.as(nullable AAnnotations)
1270 redef fun n_doc
=(node
)
1273 if node
!= null then node
.parent
= self
1275 redef fun n_kwredef
=(node
)
1278 if node
!= null then node
.parent
= self
1280 redef fun n_visibility
=(node
)
1282 _n_visibility
= node
1285 redef fun n_kwsuper
=(node
)
1290 redef fun n_type
=(node
)
1295 redef fun n_annotations
=(node
)
1297 _n_annotations
= node
1298 if node
!= null then node
.parent
= self
1302 redef fun visit_all
(v
: Visitor)
1304 v
.enter_visit
(_n_doc
)
1305 v
.enter_visit
(_n_kwredef
)
1306 v
.enter_visit
(_n_visibility
)
1307 v
.enter_visit
(_n_kwsuper
)
1308 v
.enter_visit
(_n_type
)
1309 v
.enter_visit
(_n_annotations
)
1312 redef class AAnnotPropdef
1313 init init_aannotpropdef
(
1314 n_doc
: nullable ADoc,
1315 n_kwredef
: nullable TKwredef,
1316 n_visibility
: nullable AVisibility,
1317 n_atid
: nullable AAtid,
1318 n_opar
: nullable TOpar,
1319 n_args
: Collection[Object], # Should be Collection[AExpr]
1320 n_cpar
: nullable TCpar,
1321 n_annotations
: nullable AAnnotations
1325 if n_doc
!= null then n_doc
.parent
= self
1326 _n_kwredef
= n_kwredef
1327 if n_kwredef
!= null then n_kwredef
.parent
= self
1328 _n_visibility
= n_visibility
1329 if n_visibility
!= null then n_visibility
.parent
= self
1330 _n_atid
= n_atid
.as(not null)
1331 n_atid
.parent
= self
1333 if n_opar
!= null then n_opar
.parent
= self
1334 self.n_args
.unsafe_add_all
(n_args
)
1336 if n_cpar
!= null then n_cpar
.parent
= self
1337 _n_annotations
= n_annotations
1338 if n_annotations
!= null then n_annotations
.parent
= self
1341 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1343 if _n_doc
== old_child
then
1344 n_doc
= new_child
.as(nullable ADoc)
1347 if _n_kwredef
== old_child
then
1348 n_kwredef
= new_child
.as(nullable TKwredef)
1351 if _n_visibility
== old_child
then
1352 n_visibility
= new_child
.as(nullable AVisibility)
1355 if _n_atid
== old_child
then
1356 n_atid
= new_child
.as(AAtid)
1359 if _n_opar
== old_child
then
1360 n_opar
= new_child
.as(nullable TOpar)
1363 if n_args
.replace_child
(old_child
, new_child
) then return
1364 if _n_cpar
== old_child
then
1365 n_cpar
= new_child
.as(nullable TCpar)
1368 if _n_annotations
== old_child
then
1369 n_annotations
= new_child
.as(nullable AAnnotations)
1374 redef fun n_doc
=(node
)
1377 if node
!= null then node
.parent
= self
1379 redef fun n_kwredef
=(node
)
1382 if node
!= null then node
.parent
= self
1384 redef fun n_visibility
=(node
)
1386 _n_visibility
= node
1387 if node
!= null then node
.parent
= self
1389 redef fun n_atid
=(node
)
1394 redef fun n_opar
=(node
)
1397 if node
!= null then node
.parent
= self
1399 redef fun n_cpar
=(node
)
1402 if node
!= null then node
.parent
= self
1404 redef fun n_annotations
=(node
)
1406 _n_annotations
= node
1407 if node
!= null then node
.parent
= self
1411 redef fun visit_all
(v
: Visitor)
1413 v
.enter_visit
(_n_doc
)
1414 v
.enter_visit
(_n_kwredef
)
1415 v
.enter_visit
(_n_visibility
)
1416 v
.enter_visit
(_n_atid
)
1417 v
.enter_visit
(_n_opar
)
1419 v
.enter_visit
(_n_cpar
)
1420 v
.enter_visit
(_n_annotations
)
1423 redef class AIdMethid
1424 init init_aidmethid
(
1428 _n_id
= n_id
.as(not null)
1432 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1434 if _n_id
== old_child
then
1435 n_id
= new_child
.as(TId)
1440 redef fun n_id
=(node
)
1447 redef fun visit_all
(v
: Visitor)
1449 v
.enter_visit
(_n_id
)
1452 redef class APlusMethid
1453 init init_aplusmethid
(
1454 n_plus
: nullable TPlus
1457 _n_plus
= n_plus
.as(not null)
1458 n_plus
.parent
= self
1461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1463 if _n_plus
== old_child
then
1464 n_plus
= new_child
.as(TPlus)
1469 redef fun n_plus
=(node
)
1476 redef fun visit_all
(v
: Visitor)
1478 v
.enter_visit
(_n_plus
)
1481 redef class AMinusMethid
1482 init init_aminusmethid
(
1483 n_minus
: nullable TMinus
1486 _n_minus
= n_minus
.as(not null)
1487 n_minus
.parent
= self
1490 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1492 if _n_minus
== old_child
then
1493 n_minus
= new_child
.as(TMinus)
1498 redef fun n_minus
=(node
)
1505 redef fun visit_all
(v
: Visitor)
1507 v
.enter_visit
(_n_minus
)
1510 redef class AStarMethid
1511 init init_astarmethid
(
1512 n_star
: nullable TStar
1515 _n_star
= n_star
.as(not null)
1516 n_star
.parent
= self
1519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1521 if _n_star
== old_child
then
1522 n_star
= new_child
.as(TStar)
1527 redef fun n_star
=(node
)
1534 redef fun visit_all
(v
: Visitor)
1536 v
.enter_visit
(_n_star
)
1539 redef class AStarstarMethid
1540 init init_astarstarmethid
(
1541 n_starstar
: nullable TStarstar
1544 _n_starstar
= n_starstar
.as(not null)
1545 n_starstar
.parent
= self
1548 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1550 if _n_starstar
== old_child
then
1551 n_starstar
= new_child
.as(TStarstar)
1556 redef fun n_starstar
=(node
)
1563 redef fun visit_all
(v
: Visitor)
1565 v
.enter_visit
(_n_starstar
)
1568 redef class ASlashMethid
1569 init init_aslashmethid
(
1570 n_slash
: nullable TSlash
1573 _n_slash
= n_slash
.as(not null)
1574 n_slash
.parent
= self
1577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1579 if _n_slash
== old_child
then
1580 n_slash
= new_child
.as(TSlash)
1585 redef fun n_slash
=(node
)
1592 redef fun visit_all
(v
: Visitor)
1594 v
.enter_visit
(_n_slash
)
1597 redef class APercentMethid
1598 init init_apercentmethid
(
1599 n_percent
: nullable TPercent
1602 _n_percent
= n_percent
.as(not null)
1603 n_percent
.parent
= self
1606 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1608 if _n_percent
== old_child
then
1609 n_percent
= new_child
.as(TPercent)
1614 redef fun n_percent
=(node
)
1621 redef fun visit_all
(v
: Visitor)
1623 v
.enter_visit
(_n_percent
)
1626 redef class AEqMethid
1627 init init_aeqmethid
(
1631 _n_eq
= n_eq
.as(not null)
1635 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1637 if _n_eq
== old_child
then
1638 n_eq
= new_child
.as(TEq)
1643 redef fun n_eq
=(node
)
1650 redef fun visit_all
(v
: Visitor)
1652 v
.enter_visit
(_n_eq
)
1655 redef class ANeMethid
1656 init init_anemethid
(
1660 _n_ne
= n_ne
.as(not null)
1664 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1666 if _n_ne
== old_child
then
1667 n_ne
= new_child
.as(TNe)
1672 redef fun n_ne
=(node
)
1679 redef fun visit_all
(v
: Visitor)
1681 v
.enter_visit
(_n_ne
)
1684 redef class ALeMethid
1685 init init_alemethid
(
1689 _n_le
= n_le
.as(not null)
1693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1695 if _n_le
== old_child
then
1696 n_le
= new_child
.as(TLe)
1701 redef fun n_le
=(node
)
1708 redef fun visit_all
(v
: Visitor)
1710 v
.enter_visit
(_n_le
)
1713 redef class AGeMethid
1714 init init_agemethid
(
1718 _n_ge
= n_ge
.as(not null)
1722 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1724 if _n_ge
== old_child
then
1725 n_ge
= new_child
.as(TGe)
1730 redef fun n_ge
=(node
)
1737 redef fun visit_all
(v
: Visitor)
1739 v
.enter_visit
(_n_ge
)
1742 redef class ALtMethid
1743 init init_altmethid
(
1747 _n_lt
= n_lt
.as(not null)
1751 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1753 if _n_lt
== old_child
then
1754 n_lt
= new_child
.as(TLt)
1759 redef fun n_lt
=(node
)
1766 redef fun visit_all
(v
: Visitor)
1768 v
.enter_visit
(_n_lt
)
1771 redef class AGtMethid
1772 init init_agtmethid
(
1776 _n_gt
= n_gt
.as(not null)
1780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1782 if _n_gt
== old_child
then
1783 n_gt
= new_child
.as(TGt)
1788 redef fun n_gt
=(node
)
1795 redef fun visit_all
(v
: Visitor)
1797 v
.enter_visit
(_n_gt
)
1800 redef class ALlMethid
1801 init init_allmethid
(
1805 _n_ll
= n_ll
.as(not null)
1809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1811 if _n_ll
== old_child
then
1812 n_ll
= new_child
.as(TLl)
1817 redef fun n_ll
=(node
)
1824 redef fun visit_all
(v
: Visitor)
1826 v
.enter_visit
(_n_ll
)
1829 redef class AGgMethid
1830 init init_aggmethid
(
1834 _n_gg
= n_gg
.as(not null)
1838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1840 if _n_gg
== old_child
then
1841 n_gg
= new_child
.as(TGg)
1846 redef fun n_gg
=(node
)
1853 redef fun visit_all
(v
: Visitor)
1855 v
.enter_visit
(_n_gg
)
1858 redef class ABraMethid
1859 init init_abramethid
(
1860 n_obra
: nullable TObra,
1861 n_cbra
: nullable TCbra
1864 _n_obra
= n_obra
.as(not null)
1865 n_obra
.parent
= self
1866 _n_cbra
= n_cbra
.as(not null)
1867 n_cbra
.parent
= self
1870 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1872 if _n_obra
== old_child
then
1873 n_obra
= new_child
.as(TObra)
1876 if _n_cbra
== old_child
then
1877 n_cbra
= new_child
.as(TCbra)
1882 redef fun n_obra
=(node
)
1887 redef fun n_cbra
=(node
)
1894 redef fun visit_all
(v
: Visitor)
1896 v
.enter_visit
(_n_obra
)
1897 v
.enter_visit
(_n_cbra
)
1900 redef class AStarshipMethid
1901 init init_astarshipmethid
(
1902 n_starship
: nullable TStarship
1905 _n_starship
= n_starship
.as(not null)
1906 n_starship
.parent
= self
1909 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1911 if _n_starship
== old_child
then
1912 n_starship
= new_child
.as(TStarship)
1917 redef fun n_starship
=(node
)
1924 redef fun visit_all
(v
: Visitor)
1926 v
.enter_visit
(_n_starship
)
1929 redef class AAssignMethid
1930 init init_aassignmethid
(
1932 n_assign
: nullable TAssign
1935 _n_id
= n_id
.as(not null)
1937 _n_assign
= n_assign
.as(not null)
1938 n_assign
.parent
= self
1941 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1943 if _n_id
== old_child
then
1944 n_id
= new_child
.as(TId)
1947 if _n_assign
== old_child
then
1948 n_assign
= new_child
.as(TAssign)
1953 redef fun n_id
=(node
)
1958 redef fun n_assign
=(node
)
1965 redef fun visit_all
(v
: Visitor)
1967 v
.enter_visit
(_n_id
)
1968 v
.enter_visit
(_n_assign
)
1971 redef class ABraassignMethid
1972 init init_abraassignmethid
(
1973 n_obra
: nullable TObra,
1974 n_cbra
: nullable TCbra,
1975 n_assign
: nullable TAssign
1978 _n_obra
= n_obra
.as(not null)
1979 n_obra
.parent
= self
1980 _n_cbra
= n_cbra
.as(not null)
1981 n_cbra
.parent
= self
1982 _n_assign
= n_assign
.as(not null)
1983 n_assign
.parent
= self
1986 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1988 if _n_obra
== old_child
then
1989 n_obra
= new_child
.as(TObra)
1992 if _n_cbra
== old_child
then
1993 n_cbra
= new_child
.as(TCbra)
1996 if _n_assign
== old_child
then
1997 n_assign
= new_child
.as(TAssign)
2002 redef fun n_obra
=(node
)
2007 redef fun n_cbra
=(node
)
2012 redef fun n_assign
=(node
)
2019 redef fun visit_all
(v
: Visitor)
2021 v
.enter_visit
(_n_obra
)
2022 v
.enter_visit
(_n_cbra
)
2023 v
.enter_visit
(_n_assign
)
2026 redef class ASignature
2027 init init_asignature
(
2028 n_opar
: nullable TOpar,
2029 n_params
: Collection[Object], # Should be Collection[AParam]
2030 n_cpar
: nullable TCpar,
2031 n_type
: nullable AType
2035 if n_opar
!= null then n_opar
.parent
= self
2036 self.n_params
.unsafe_add_all
(n_params
)
2038 if n_cpar
!= null then n_cpar
.parent
= self
2040 if n_type
!= null then n_type
.parent
= self
2043 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2045 if _n_opar
== old_child
then
2046 n_opar
= new_child
.as(nullable TOpar)
2049 if n_params
.replace_child
(old_child
, new_child
) then return
2050 if _n_cpar
== old_child
then
2051 n_cpar
= new_child
.as(nullable TCpar)
2054 if _n_type
== old_child
then
2055 n_type
= new_child
.as(nullable AType)
2060 redef fun n_opar
=(node
)
2063 if node
!= null then node
.parent
= self
2065 redef fun n_cpar
=(node
)
2068 if node
!= null then node
.parent
= self
2070 redef fun n_type
=(node
)
2073 if node
!= null then node
.parent
= self
2077 redef fun visit_all
(v
: Visitor)
2079 v
.enter_visit
(_n_opar
)
2080 n_params
.visit_all
(v
)
2081 v
.enter_visit
(_n_cpar
)
2082 v
.enter_visit
(_n_type
)
2088 n_type
: nullable AType,
2089 n_dotdotdot
: nullable TDotdotdot,
2090 n_annotations
: nullable AAnnotations
2093 _n_id
= n_id
.as(not null)
2096 if n_type
!= null then n_type
.parent
= self
2097 _n_dotdotdot
= n_dotdotdot
2098 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2099 _n_annotations
= n_annotations
2100 if n_annotations
!= null then n_annotations
.parent
= self
2103 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2105 if _n_id
== old_child
then
2106 n_id
= new_child
.as(TId)
2109 if _n_type
== old_child
then
2110 n_type
= new_child
.as(nullable AType)
2113 if _n_dotdotdot
== old_child
then
2114 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2117 if _n_annotations
== old_child
then
2118 n_annotations
= new_child
.as(nullable AAnnotations)
2123 redef fun n_id
=(node
)
2128 redef fun n_type
=(node
)
2131 if node
!= null then node
.parent
= self
2133 redef fun n_dotdotdot
=(node
)
2136 if node
!= null then node
.parent
= self
2138 redef fun n_annotations
=(node
)
2140 _n_annotations
= node
2141 if node
!= null then node
.parent
= self
2145 redef fun visit_all
(v
: Visitor)
2147 v
.enter_visit
(_n_id
)
2148 v
.enter_visit
(_n_type
)
2149 v
.enter_visit
(_n_dotdotdot
)
2150 v
.enter_visit
(_n_annotations
)
2155 n_kwnullable
: nullable TKwnullable,
2156 n_id
: nullable TClassid,
2157 n_types
: Collection[Object], # Should be Collection[AType]
2158 n_annotations
: nullable AAnnotations
2161 _n_kwnullable
= n_kwnullable
2162 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2163 _n_id
= n_id
.as(not null)
2165 self.n_types
.unsafe_add_all
(n_types
)
2166 _n_annotations
= n_annotations
2167 if n_annotations
!= null then n_annotations
.parent
= self
2170 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2172 if _n_kwnullable
== old_child
then
2173 n_kwnullable
= new_child
.as(nullable TKwnullable)
2176 if _n_id
== old_child
then
2177 n_id
= new_child
.as(TClassid)
2180 if n_types
.replace_child
(old_child
, new_child
) then return
2181 if _n_annotations
== old_child
then
2182 n_annotations
= new_child
.as(nullable AAnnotations)
2187 redef fun n_kwnullable
=(node
)
2189 _n_kwnullable
= node
2190 if node
!= null then node
.parent
= self
2192 redef fun n_id
=(node
)
2197 redef fun n_annotations
=(node
)
2199 _n_annotations
= node
2200 if node
!= null then node
.parent
= self
2204 redef fun visit_all
(v
: Visitor)
2206 v
.enter_visit
(_n_kwnullable
)
2207 v
.enter_visit
(_n_id
)
2208 n_types
.visit_all
(v
)
2209 v
.enter_visit
(_n_annotations
)
2214 n_kwlabel
: nullable TKwlabel,
2218 _n_kwlabel
= n_kwlabel
.as(not null)
2219 n_kwlabel
.parent
= self
2221 if n_id
!= null then n_id
.parent
= self
2224 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2226 if _n_kwlabel
== old_child
then
2227 n_kwlabel
= new_child
.as(TKwlabel)
2230 if _n_id
== old_child
then
2231 n_id
= new_child
.as(nullable TId)
2236 redef fun n_kwlabel
=(node
)
2241 redef fun n_id
=(node
)
2244 if node
!= null then node
.parent
= self
2248 redef fun visit_all
(v
: Visitor)
2250 v
.enter_visit
(_n_kwlabel
)
2251 v
.enter_visit
(_n_id
)
2254 redef class ABlockExpr
2255 init init_ablockexpr
(
2256 n_expr
: Collection[Object], # Should be Collection[AExpr]
2257 n_kwend
: nullable TKwend
2260 self.n_expr
.unsafe_add_all
(n_expr
)
2262 if n_kwend
!= null then n_kwend
.parent
= self
2265 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2267 if n_expr
.replace_child
(old_child
, new_child
) then return
2268 if _n_kwend
== old_child
then
2269 n_kwend
= new_child
.as(nullable TKwend)
2274 redef fun n_kwend
=(node
)
2277 if node
!= null then node
.parent
= self
2281 redef fun visit_all
(v
: Visitor)
2284 v
.enter_visit
(_n_kwend
)
2287 redef class AVardeclExpr
2288 init init_avardeclexpr
(
2289 n_kwvar
: nullable TKwvar,
2291 n_type
: nullable AType,
2292 n_assign
: nullable TAssign,
2293 n_expr
: nullable AExpr,
2294 n_annotations
: nullable AAnnotations
2298 if n_kwvar
!= null then n_kwvar
.parent
= self
2299 _n_id
= n_id
.as(not null)
2302 if n_type
!= null then n_type
.parent
= self
2303 _n_assign
= n_assign
2304 if n_assign
!= null then n_assign
.parent
= self
2306 if n_expr
!= null then n_expr
.parent
= self
2307 _n_annotations
= n_annotations
2308 if n_annotations
!= null then n_annotations
.parent
= self
2311 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2313 if _n_kwvar
== old_child
then
2314 n_kwvar
= new_child
.as(nullable TKwvar)
2317 if _n_id
== old_child
then
2318 n_id
= new_child
.as(TId)
2321 if _n_type
== old_child
then
2322 n_type
= new_child
.as(nullable AType)
2325 if _n_assign
== old_child
then
2326 n_assign
= new_child
.as(nullable TAssign)
2329 if _n_expr
== old_child
then
2330 n_expr
= new_child
.as(nullable AExpr)
2333 if _n_annotations
== old_child
then
2334 n_annotations
= new_child
.as(nullable AAnnotations)
2339 redef fun n_kwvar
=(node
)
2342 if node
!= null then node
.parent
= self
2344 redef fun n_id
=(node
)
2349 redef fun n_type
=(node
)
2352 if node
!= null then node
.parent
= self
2354 redef fun n_assign
=(node
)
2357 if node
!= null then node
.parent
= self
2359 redef fun n_expr
=(node
)
2362 if node
!= null then node
.parent
= self
2364 redef fun n_annotations
=(node
)
2366 _n_annotations
= node
2367 if node
!= null then node
.parent
= self
2371 redef fun visit_all
(v
: Visitor)
2373 v
.enter_visit
(_n_kwvar
)
2374 v
.enter_visit
(_n_id
)
2375 v
.enter_visit
(_n_type
)
2376 v
.enter_visit
(_n_assign
)
2377 v
.enter_visit
(_n_expr
)
2378 v
.enter_visit
(_n_annotations
)
2381 redef class AReturnExpr
2382 init init_areturnexpr
(
2383 n_kwreturn
: nullable TKwreturn,
2384 n_expr
: nullable AExpr
2387 _n_kwreturn
= n_kwreturn
2388 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2390 if n_expr
!= null then n_expr
.parent
= self
2393 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2395 if _n_kwreturn
== old_child
then
2396 n_kwreturn
= new_child
.as(nullable TKwreturn)
2399 if _n_expr
== old_child
then
2400 n_expr
= new_child
.as(nullable AExpr)
2405 redef fun n_kwreturn
=(node
)
2408 if node
!= null then node
.parent
= self
2410 redef fun n_expr
=(node
)
2413 if node
!= null then node
.parent
= self
2417 redef fun visit_all
(v
: Visitor)
2419 v
.enter_visit
(_n_kwreturn
)
2420 v
.enter_visit
(_n_expr
)
2423 redef class ABreakExpr
2424 init init_abreakexpr
(
2425 n_kwbreak
: nullable TKwbreak,
2426 n_label
: nullable ALabel
2429 _n_kwbreak
= n_kwbreak
.as(not null)
2430 n_kwbreak
.parent
= self
2432 if n_label
!= null then n_label
.parent
= self
2435 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2437 if _n_kwbreak
== old_child
then
2438 n_kwbreak
= new_child
.as(TKwbreak)
2441 if _n_label
== old_child
then
2442 n_label
= new_child
.as(nullable ALabel)
2447 redef fun n_kwbreak
=(node
)
2452 redef fun n_label
=(node
)
2455 if node
!= null then node
.parent
= self
2459 redef fun visit_all
(v
: Visitor)
2461 v
.enter_visit
(_n_kwbreak
)
2462 v
.enter_visit
(_n_label
)
2465 redef class AAbortExpr
2466 init init_aabortexpr
(
2467 n_kwabort
: nullable TKwabort
2470 _n_kwabort
= n_kwabort
.as(not null)
2471 n_kwabort
.parent
= self
2474 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2476 if _n_kwabort
== old_child
then
2477 n_kwabort
= new_child
.as(TKwabort)
2482 redef fun n_kwabort
=(node
)
2489 redef fun visit_all
(v
: Visitor)
2491 v
.enter_visit
(_n_kwabort
)
2494 redef class AContinueExpr
2495 init init_acontinueexpr
(
2496 n_kwcontinue
: nullable TKwcontinue,
2497 n_label
: nullable ALabel
2500 _n_kwcontinue
= n_kwcontinue
2501 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2503 if n_label
!= null then n_label
.parent
= self
2506 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2508 if _n_kwcontinue
== old_child
then
2509 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2512 if _n_label
== old_child
then
2513 n_label
= new_child
.as(nullable ALabel)
2518 redef fun n_kwcontinue
=(node
)
2520 _n_kwcontinue
= node
2521 if node
!= null then node
.parent
= self
2523 redef fun n_label
=(node
)
2526 if node
!= null then node
.parent
= self
2530 redef fun visit_all
(v
: Visitor)
2532 v
.enter_visit
(_n_kwcontinue
)
2533 v
.enter_visit
(_n_label
)
2538 n_kwdo
: nullable TKwdo,
2539 n_block
: nullable AExpr,
2540 n_label
: nullable ALabel
2543 _n_kwdo
= n_kwdo
.as(not null)
2544 n_kwdo
.parent
= self
2546 if n_block
!= null then n_block
.parent
= self
2548 if n_label
!= null then n_label
.parent
= self
2551 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2553 if _n_kwdo
== old_child
then
2554 n_kwdo
= new_child
.as(TKwdo)
2557 if _n_block
== old_child
then
2558 n_block
= new_child
.as(nullable AExpr)
2561 if _n_label
== old_child
then
2562 n_label
= new_child
.as(nullable ALabel)
2567 redef fun n_kwdo
=(node
)
2572 redef fun n_block
=(node
)
2575 if node
!= null then node
.parent
= self
2577 redef fun n_label
=(node
)
2580 if node
!= null then node
.parent
= self
2584 redef fun visit_all
(v
: Visitor)
2586 v
.enter_visit
(_n_kwdo
)
2587 v
.enter_visit
(_n_block
)
2588 v
.enter_visit
(_n_label
)
2593 n_kwif
: nullable TKwif,
2594 n_expr
: nullable AExpr,
2595 n_then
: nullable AExpr,
2596 n_else
: nullable AExpr
2599 _n_kwif
= n_kwif
.as(not null)
2600 n_kwif
.parent
= self
2601 _n_expr
= n_expr
.as(not null)
2602 n_expr
.parent
= self
2604 if n_then
!= null then n_then
.parent
= self
2606 if n_else
!= null then n_else
.parent
= self
2609 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2611 if _n_kwif
== old_child
then
2612 n_kwif
= new_child
.as(TKwif)
2615 if _n_expr
== old_child
then
2616 n_expr
= new_child
.as(AExpr)
2619 if _n_then
== old_child
then
2620 n_then
= new_child
.as(nullable AExpr)
2623 if _n_else
== old_child
then
2624 n_else
= new_child
.as(nullable AExpr)
2629 redef fun n_kwif
=(node
)
2634 redef fun n_expr
=(node
)
2639 redef fun n_then
=(node
)
2642 if node
!= null then node
.parent
= self
2644 redef fun n_else
=(node
)
2647 if node
!= null then node
.parent
= self
2651 redef fun visit_all
(v
: Visitor)
2653 v
.enter_visit
(_n_kwif
)
2654 v
.enter_visit
(_n_expr
)
2655 v
.enter_visit
(_n_then
)
2656 v
.enter_visit
(_n_else
)
2659 redef class AIfexprExpr
2660 init init_aifexprexpr
(
2661 n_kwif
: nullable TKwif,
2662 n_expr
: nullable AExpr,
2663 n_kwthen
: nullable TKwthen,
2664 n_then
: nullable AExpr,
2665 n_kwelse
: nullable TKwelse,
2666 n_else
: nullable AExpr
2669 _n_kwif
= n_kwif
.as(not null)
2670 n_kwif
.parent
= self
2671 _n_expr
= n_expr
.as(not null)
2672 n_expr
.parent
= self
2673 _n_kwthen
= n_kwthen
.as(not null)
2674 n_kwthen
.parent
= self
2675 _n_then
= n_then
.as(not null)
2676 n_then
.parent
= self
2677 _n_kwelse
= n_kwelse
.as(not null)
2678 n_kwelse
.parent
= self
2679 _n_else
= n_else
.as(not null)
2680 n_else
.parent
= self
2683 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2685 if _n_kwif
== old_child
then
2686 n_kwif
= new_child
.as(TKwif)
2689 if _n_expr
== old_child
then
2690 n_expr
= new_child
.as(AExpr)
2693 if _n_kwthen
== old_child
then
2694 n_kwthen
= new_child
.as(TKwthen)
2697 if _n_then
== old_child
then
2698 n_then
= new_child
.as(AExpr)
2701 if _n_kwelse
== old_child
then
2702 n_kwelse
= new_child
.as(TKwelse)
2705 if _n_else
== old_child
then
2706 n_else
= new_child
.as(AExpr)
2711 redef fun n_kwif
=(node
)
2716 redef fun n_expr
=(node
)
2721 redef fun n_kwthen
=(node
)
2726 redef fun n_then
=(node
)
2731 redef fun n_kwelse
=(node
)
2736 redef fun n_else
=(node
)
2743 redef fun visit_all
(v
: Visitor)
2745 v
.enter_visit
(_n_kwif
)
2746 v
.enter_visit
(_n_expr
)
2747 v
.enter_visit
(_n_kwthen
)
2748 v
.enter_visit
(_n_then
)
2749 v
.enter_visit
(_n_kwelse
)
2750 v
.enter_visit
(_n_else
)
2753 redef class AWhileExpr
2754 init init_awhileexpr
(
2755 n_kwwhile
: nullable TKwwhile,
2756 n_expr
: nullable AExpr,
2757 n_kwdo
: nullable TKwdo,
2758 n_block
: nullable AExpr,
2759 n_label
: nullable ALabel
2762 _n_kwwhile
= n_kwwhile
.as(not null)
2763 n_kwwhile
.parent
= self
2764 _n_expr
= n_expr
.as(not null)
2765 n_expr
.parent
= self
2766 _n_kwdo
= n_kwdo
.as(not null)
2767 n_kwdo
.parent
= self
2769 if n_block
!= null then n_block
.parent
= self
2771 if n_label
!= null then n_label
.parent
= self
2774 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2776 if _n_kwwhile
== old_child
then
2777 n_kwwhile
= new_child
.as(TKwwhile)
2780 if _n_expr
== old_child
then
2781 n_expr
= new_child
.as(AExpr)
2784 if _n_kwdo
== old_child
then
2785 n_kwdo
= new_child
.as(TKwdo)
2788 if _n_block
== old_child
then
2789 n_block
= new_child
.as(nullable AExpr)
2792 if _n_label
== old_child
then
2793 n_label
= new_child
.as(nullable ALabel)
2798 redef fun n_kwwhile
=(node
)
2803 redef fun n_expr
=(node
)
2808 redef fun n_kwdo
=(node
)
2813 redef fun n_block
=(node
)
2816 if node
!= null then node
.parent
= self
2818 redef fun n_label
=(node
)
2821 if node
!= null then node
.parent
= self
2825 redef fun visit_all
(v
: Visitor)
2827 v
.enter_visit
(_n_kwwhile
)
2828 v
.enter_visit
(_n_expr
)
2829 v
.enter_visit
(_n_kwdo
)
2830 v
.enter_visit
(_n_block
)
2831 v
.enter_visit
(_n_label
)
2834 redef class ALoopExpr
2835 init init_aloopexpr
(
2836 n_kwloop
: nullable TKwloop,
2837 n_block
: nullable AExpr,
2838 n_label
: nullable ALabel
2841 _n_kwloop
= n_kwloop
.as(not null)
2842 n_kwloop
.parent
= self
2844 if n_block
!= null then n_block
.parent
= self
2846 if n_label
!= null then n_label
.parent
= self
2849 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2851 if _n_kwloop
== old_child
then
2852 n_kwloop
= new_child
.as(TKwloop)
2855 if _n_block
== old_child
then
2856 n_block
= new_child
.as(nullable AExpr)
2859 if _n_label
== old_child
then
2860 n_label
= new_child
.as(nullable ALabel)
2865 redef fun n_kwloop
=(node
)
2870 redef fun n_block
=(node
)
2873 if node
!= null then node
.parent
= self
2875 redef fun n_label
=(node
)
2878 if node
!= null then node
.parent
= self
2882 redef fun visit_all
(v
: Visitor)
2884 v
.enter_visit
(_n_kwloop
)
2885 v
.enter_visit
(_n_block
)
2886 v
.enter_visit
(_n_label
)
2889 redef class AForExpr
2890 init init_aforexpr
(
2891 n_kwfor
: nullable TKwfor,
2892 n_ids
: Collection[Object], # Should be Collection[TId]
2893 n_expr
: nullable AExpr,
2894 n_kwdo
: nullable TKwdo,
2895 n_block
: nullable AExpr,
2896 n_label
: nullable ALabel
2899 _n_kwfor
= n_kwfor
.as(not null)
2900 n_kwfor
.parent
= self
2901 self.n_ids
.unsafe_add_all
(n_ids
)
2902 _n_expr
= n_expr
.as(not null)
2903 n_expr
.parent
= self
2904 _n_kwdo
= n_kwdo
.as(not null)
2905 n_kwdo
.parent
= self
2907 if n_block
!= null then n_block
.parent
= self
2909 if n_label
!= null then n_label
.parent
= self
2912 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2914 if _n_kwfor
== old_child
then
2915 n_kwfor
= new_child
.as(TKwfor)
2918 if n_ids
.replace_child
(old_child
, new_child
) then return
2919 if _n_expr
== old_child
then
2920 n_expr
= new_child
.as(AExpr)
2923 if _n_kwdo
== old_child
then
2924 n_kwdo
= new_child
.as(TKwdo)
2927 if _n_block
== old_child
then
2928 n_block
= new_child
.as(nullable AExpr)
2931 if _n_label
== old_child
then
2932 n_label
= new_child
.as(nullable ALabel)
2937 redef fun n_kwfor
=(node
)
2942 redef fun n_expr
=(node
)
2947 redef fun n_kwdo
=(node
)
2952 redef fun n_block
=(node
)
2955 if node
!= null then node
.parent
= self
2957 redef fun n_label
=(node
)
2960 if node
!= null then node
.parent
= self
2964 redef fun visit_all
(v
: Visitor)
2966 v
.enter_visit
(_n_kwfor
)
2968 v
.enter_visit
(_n_expr
)
2969 v
.enter_visit
(_n_kwdo
)
2970 v
.enter_visit
(_n_block
)
2971 v
.enter_visit
(_n_label
)
2974 redef class AWithExpr
2975 init init_awithexpr
(
2976 n_kwwith
: nullable TKwwith,
2977 n_expr
: nullable AExpr,
2978 n_kwdo
: nullable TKwdo,
2979 n_block
: nullable AExpr,
2980 n_label
: nullable ALabel
2983 _n_kwwith
= n_kwwith
.as(not null)
2984 n_kwwith
.parent
= self
2985 _n_expr
= n_expr
.as(not null)
2986 n_expr
.parent
= self
2987 _n_kwdo
= n_kwdo
.as(not null)
2988 n_kwdo
.parent
= self
2990 if n_block
!= null then n_block
.parent
= self
2992 if n_label
!= null then n_label
.parent
= self
2995 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2997 if _n_kwwith
== old_child
then
2998 n_kwwith
= new_child
.as(TKwwith)
3001 if _n_expr
== old_child
then
3002 n_expr
= new_child
.as(AExpr)
3005 if _n_kwdo
== old_child
then
3006 n_kwdo
= new_child
.as(TKwdo)
3009 if _n_block
== old_child
then
3010 n_block
= new_child
.as(nullable AExpr)
3013 if _n_label
== old_child
then
3014 n_label
= new_child
.as(nullable ALabel)
3019 redef fun n_kwwith
=(node
)
3024 redef fun n_expr
=(node
)
3029 redef fun n_kwdo
=(node
)
3034 redef fun n_block
=(node
)
3037 if node
!= null then node
.parent
= self
3039 redef fun n_label
=(node
)
3042 if node
!= null then node
.parent
= self
3046 redef fun visit_all
(v
: Visitor)
3048 v
.enter_visit
(_n_kwwith
)
3049 v
.enter_visit
(_n_expr
)
3050 v
.enter_visit
(_n_kwdo
)
3051 v
.enter_visit
(_n_block
)
3052 v
.enter_visit
(_n_label
)
3055 redef class AAssertExpr
3056 init init_aassertexpr
(
3057 n_kwassert
: nullable TKwassert,
3059 n_expr
: nullable AExpr,
3060 n_else
: nullable AExpr
3063 _n_kwassert
= n_kwassert
.as(not null)
3064 n_kwassert
.parent
= self
3066 if n_id
!= null then n_id
.parent
= self
3067 _n_expr
= n_expr
.as(not null)
3068 n_expr
.parent
= self
3070 if n_else
!= null then n_else
.parent
= self
3073 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3075 if _n_kwassert
== old_child
then
3076 n_kwassert
= new_child
.as(TKwassert)
3079 if _n_id
== old_child
then
3080 n_id
= new_child
.as(nullable TId)
3083 if _n_expr
== old_child
then
3084 n_expr
= new_child
.as(AExpr)
3087 if _n_else
== old_child
then
3088 n_else
= new_child
.as(nullable AExpr)
3093 redef fun n_kwassert
=(node
)
3098 redef fun n_id
=(node
)
3101 if node
!= null then node
.parent
= self
3103 redef fun n_expr
=(node
)
3108 redef fun n_else
=(node
)
3111 if node
!= null then node
.parent
= self
3115 redef fun visit_all
(v
: Visitor)
3117 v
.enter_visit
(_n_kwassert
)
3118 v
.enter_visit
(_n_id
)
3119 v
.enter_visit
(_n_expr
)
3120 v
.enter_visit
(_n_else
)
3123 redef class AOnceExpr
3124 init init_aonceexpr
(
3125 n_kwonce
: nullable TKwonce,
3126 n_expr
: nullable AExpr
3129 _n_kwonce
= n_kwonce
.as(not null)
3130 n_kwonce
.parent
= self
3131 _n_expr
= n_expr
.as(not null)
3132 n_expr
.parent
= self
3135 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3137 if _n_kwonce
== old_child
then
3138 n_kwonce
= new_child
.as(TKwonce)
3141 if _n_expr
== old_child
then
3142 n_expr
= new_child
.as(AExpr)
3147 redef fun n_kwonce
=(node
)
3152 redef fun n_expr
=(node
)
3159 redef fun visit_all
(v
: Visitor)
3161 v
.enter_visit
(_n_kwonce
)
3162 v
.enter_visit
(_n_expr
)
3165 redef class ASendExpr
3166 init init_asendexpr
(
3167 n_expr
: nullable AExpr
3170 _n_expr
= n_expr
.as(not null)
3171 n_expr
.parent
= self
3174 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3176 if _n_expr
== old_child
then
3177 n_expr
= new_child
.as(AExpr)
3182 redef fun n_expr
=(node
)
3189 redef fun visit_all
(v
: Visitor)
3191 v
.enter_visit
(_n_expr
)
3194 redef class ABinopExpr
3195 init init_abinopexpr
(
3196 n_expr
: nullable AExpr,
3197 n_expr2
: nullable AExpr
3200 _n_expr
= n_expr
.as(not null)
3201 n_expr
.parent
= self
3202 _n_expr2
= n_expr2
.as(not null)
3203 n_expr2
.parent
= self
3206 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3208 if _n_expr
== old_child
then
3209 n_expr
= new_child
.as(AExpr)
3212 if _n_expr2
== old_child
then
3213 n_expr2
= new_child
.as(AExpr)
3218 redef fun n_expr
=(node
)
3223 redef fun n_expr2
=(node
)
3230 redef fun visit_all
(v
: Visitor)
3232 v
.enter_visit
(_n_expr
)
3233 v
.enter_visit
(_n_expr2
)
3238 n_expr
: nullable AExpr,
3239 n_op
: nullable TKwor,
3240 n_expr2
: nullable AExpr
3243 _n_expr
= n_expr
.as(not null)
3244 n_expr
.parent
= self
3245 _n_op
= n_op
.as(not null)
3247 _n_expr2
= n_expr2
.as(not null)
3248 n_expr2
.parent
= self
3251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3253 if _n_expr
== old_child
then
3254 n_expr
= new_child
.as(AExpr)
3257 if _n_op
== old_child
then
3258 n_op
= new_child
.as(TKwor)
3261 if _n_expr2
== old_child
then
3262 n_expr2
= new_child
.as(AExpr)
3267 redef fun n_expr
=(node
)
3272 redef fun n_op
=(node
)
3277 redef fun n_expr2
=(node
)
3284 redef fun visit_all
(v
: Visitor)
3286 v
.enter_visit
(_n_expr
)
3287 v
.enter_visit
(_n_op
)
3288 v
.enter_visit
(_n_expr2
)
3291 redef class AAndExpr
3292 init init_aandexpr
(
3293 n_expr
: nullable AExpr,
3294 n_op
: nullable TKwand,
3295 n_expr2
: nullable AExpr
3298 _n_expr
= n_expr
.as(not null)
3299 n_expr
.parent
= self
3300 _n_op
= n_op
.as(not null)
3302 _n_expr2
= n_expr2
.as(not null)
3303 n_expr2
.parent
= self
3306 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3308 if _n_expr
== old_child
then
3309 n_expr
= new_child
.as(AExpr)
3312 if _n_op
== old_child
then
3313 n_op
= new_child
.as(TKwand)
3316 if _n_expr2
== old_child
then
3317 n_expr2
= new_child
.as(AExpr)
3322 redef fun n_expr
=(node
)
3327 redef fun n_op
=(node
)
3332 redef fun n_expr2
=(node
)
3339 redef fun visit_all
(v
: Visitor)
3341 v
.enter_visit
(_n_expr
)
3342 v
.enter_visit
(_n_op
)
3343 v
.enter_visit
(_n_expr2
)
3346 redef class AOrElseExpr
3347 init init_aorelseexpr
(
3348 n_expr
: nullable AExpr,
3349 n_op
: nullable TKwor,
3350 n_kwelse
: nullable TKwelse,
3351 n_expr2
: nullable AExpr
3354 _n_expr
= n_expr
.as(not null)
3355 n_expr
.parent
= self
3356 _n_op
= n_op
.as(not null)
3358 _n_kwelse
= n_kwelse
.as(not null)
3359 n_kwelse
.parent
= self
3360 _n_expr2
= n_expr2
.as(not null)
3361 n_expr2
.parent
= self
3364 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3366 if _n_expr
== old_child
then
3367 n_expr
= new_child
.as(AExpr)
3370 if _n_op
== old_child
then
3371 n_op
= new_child
.as(TKwor)
3374 if _n_kwelse
== old_child
then
3375 n_kwelse
= new_child
.as(TKwelse)
3378 if _n_expr2
== old_child
then
3379 n_expr2
= new_child
.as(AExpr)
3384 redef fun n_expr
=(node
)
3389 redef fun n_op
=(node
)
3394 redef fun n_kwelse
=(node
)
3399 redef fun n_expr2
=(node
)
3406 redef fun visit_all
(v
: Visitor)
3408 v
.enter_visit
(_n_expr
)
3409 v
.enter_visit
(_n_op
)
3410 v
.enter_visit
(_n_kwelse
)
3411 v
.enter_visit
(_n_expr2
)
3414 redef class AImpliesExpr
3415 init init_aimpliesexpr
(
3416 n_expr
: nullable AExpr,
3417 n_op
: nullable TKwimplies,
3418 n_expr2
: nullable AExpr
3421 _n_expr
= n_expr
.as(not null)
3422 n_expr
.parent
= self
3423 _n_op
= n_op
.as(not null)
3425 _n_expr2
= n_expr2
.as(not null)
3426 n_expr2
.parent
= self
3429 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3431 if _n_expr
== old_child
then
3432 n_expr
= new_child
.as(AExpr)
3435 if _n_op
== old_child
then
3436 n_op
= new_child
.as(TKwimplies)
3439 if _n_expr2
== old_child
then
3440 n_expr2
= new_child
.as(AExpr)
3445 redef fun n_expr
=(node
)
3450 redef fun n_op
=(node
)
3455 redef fun n_expr2
=(node
)
3462 redef fun visit_all
(v
: Visitor)
3464 v
.enter_visit
(_n_expr
)
3465 v
.enter_visit
(_n_op
)
3466 v
.enter_visit
(_n_expr2
)
3469 redef class ANotExpr
3470 init init_anotexpr
(
3471 n_kwnot
: nullable TKwnot,
3472 n_expr
: nullable AExpr
3475 _n_kwnot
= n_kwnot
.as(not null)
3476 n_kwnot
.parent
= self
3477 _n_expr
= n_expr
.as(not null)
3478 n_expr
.parent
= self
3481 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3483 if _n_kwnot
== old_child
then
3484 n_kwnot
= new_child
.as(TKwnot)
3487 if _n_expr
== old_child
then
3488 n_expr
= new_child
.as(AExpr)
3493 redef fun n_kwnot
=(node
)
3498 redef fun n_expr
=(node
)
3505 redef fun visit_all
(v
: Visitor)
3507 v
.enter_visit
(_n_kwnot
)
3508 v
.enter_visit
(_n_expr
)
3513 n_expr
: nullable AExpr,
3515 n_expr2
: nullable AExpr
3518 _n_expr
= n_expr
.as(not null)
3519 n_expr
.parent
= self
3520 _n_op
= n_op
.as(not null)
3522 _n_expr2
= n_expr2
.as(not null)
3523 n_expr2
.parent
= self
3526 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3528 if _n_expr
== old_child
then
3529 n_expr
= new_child
.as(AExpr)
3532 if _n_op
== old_child
then
3533 n_op
= new_child
.as(TEq)
3536 if _n_expr2
== old_child
then
3537 n_expr2
= new_child
.as(AExpr)
3542 redef fun n_expr
=(node
)
3547 redef fun n_op
=(node
)
3552 redef fun n_expr2
=(node
)
3559 redef fun visit_all
(v
: Visitor)
3561 v
.enter_visit
(_n_expr
)
3562 v
.enter_visit
(_n_op
)
3563 v
.enter_visit
(_n_expr2
)
3568 n_expr
: nullable AExpr,
3570 n_expr2
: nullable AExpr
3573 _n_expr
= n_expr
.as(not null)
3574 n_expr
.parent
= self
3575 _n_op
= n_op
.as(not null)
3577 _n_expr2
= n_expr2
.as(not null)
3578 n_expr2
.parent
= self
3581 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3583 if _n_expr
== old_child
then
3584 n_expr
= new_child
.as(AExpr)
3587 if _n_op
== old_child
then
3588 n_op
= new_child
.as(TNe)
3591 if _n_expr2
== old_child
then
3592 n_expr2
= new_child
.as(AExpr)
3597 redef fun n_expr
=(node
)
3602 redef fun n_op
=(node
)
3607 redef fun n_expr2
=(node
)
3614 redef fun visit_all
(v
: Visitor)
3616 v
.enter_visit
(_n_expr
)
3617 v
.enter_visit
(_n_op
)
3618 v
.enter_visit
(_n_expr2
)
3623 n_expr
: nullable AExpr,
3625 n_expr2
: nullable AExpr
3628 _n_expr
= n_expr
.as(not null)
3629 n_expr
.parent
= self
3630 _n_op
= n_op
.as(not null)
3632 _n_expr2
= n_expr2
.as(not null)
3633 n_expr2
.parent
= self
3636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3638 if _n_expr
== old_child
then
3639 n_expr
= new_child
.as(AExpr)
3642 if _n_op
== old_child
then
3643 n_op
= new_child
.as(TLt)
3646 if _n_expr2
== old_child
then
3647 n_expr2
= new_child
.as(AExpr)
3652 redef fun n_expr
=(node
)
3657 redef fun n_op
=(node
)
3662 redef fun n_expr2
=(node
)
3669 redef fun visit_all
(v
: Visitor)
3671 v
.enter_visit
(_n_expr
)
3672 v
.enter_visit
(_n_op
)
3673 v
.enter_visit
(_n_expr2
)
3678 n_expr
: nullable AExpr,
3680 n_expr2
: nullable AExpr
3683 _n_expr
= n_expr
.as(not null)
3684 n_expr
.parent
= self
3685 _n_op
= n_op
.as(not null)
3687 _n_expr2
= n_expr2
.as(not null)
3688 n_expr2
.parent
= self
3691 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3693 if _n_expr
== old_child
then
3694 n_expr
= new_child
.as(AExpr)
3697 if _n_op
== old_child
then
3698 n_op
= new_child
.as(TLe)
3701 if _n_expr2
== old_child
then
3702 n_expr2
= new_child
.as(AExpr)
3707 redef fun n_expr
=(node
)
3712 redef fun n_op
=(node
)
3717 redef fun n_expr2
=(node
)
3724 redef fun visit_all
(v
: Visitor)
3726 v
.enter_visit
(_n_expr
)
3727 v
.enter_visit
(_n_op
)
3728 v
.enter_visit
(_n_expr2
)
3733 n_expr
: nullable AExpr,
3735 n_expr2
: nullable AExpr
3738 _n_expr
= n_expr
.as(not null)
3739 n_expr
.parent
= self
3740 _n_op
= n_op
.as(not null)
3742 _n_expr2
= n_expr2
.as(not null)
3743 n_expr2
.parent
= self
3746 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3748 if _n_expr
== old_child
then
3749 n_expr
= new_child
.as(AExpr)
3752 if _n_op
== old_child
then
3753 n_op
= new_child
.as(TLl)
3756 if _n_expr2
== old_child
then
3757 n_expr2
= new_child
.as(AExpr)
3762 redef fun n_expr
=(node
)
3767 redef fun n_op
=(node
)
3772 redef fun n_expr2
=(node
)
3779 redef fun visit_all
(v
: Visitor)
3781 v
.enter_visit
(_n_expr
)
3782 v
.enter_visit
(_n_op
)
3783 v
.enter_visit
(_n_expr2
)
3788 n_expr
: nullable AExpr,
3790 n_expr2
: nullable AExpr
3793 _n_expr
= n_expr
.as(not null)
3794 n_expr
.parent
= self
3795 _n_op
= n_op
.as(not null)
3797 _n_expr2
= n_expr2
.as(not null)
3798 n_expr2
.parent
= self
3801 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3803 if _n_expr
== old_child
then
3804 n_expr
= new_child
.as(AExpr)
3807 if _n_op
== old_child
then
3808 n_op
= new_child
.as(TGt)
3811 if _n_expr2
== old_child
then
3812 n_expr2
= new_child
.as(AExpr)
3817 redef fun n_expr
=(node
)
3822 redef fun n_op
=(node
)
3827 redef fun n_expr2
=(node
)
3834 redef fun visit_all
(v
: Visitor)
3836 v
.enter_visit
(_n_expr
)
3837 v
.enter_visit
(_n_op
)
3838 v
.enter_visit
(_n_expr2
)
3843 n_expr
: nullable AExpr,
3845 n_expr2
: nullable AExpr
3848 _n_expr
= n_expr
.as(not null)
3849 n_expr
.parent
= self
3850 _n_op
= n_op
.as(not null)
3852 _n_expr2
= n_expr2
.as(not null)
3853 n_expr2
.parent
= self
3856 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3858 if _n_expr
== old_child
then
3859 n_expr
= new_child
.as(AExpr)
3862 if _n_op
== old_child
then
3863 n_op
= new_child
.as(TGe)
3866 if _n_expr2
== old_child
then
3867 n_expr2
= new_child
.as(AExpr)
3872 redef fun n_expr
=(node
)
3877 redef fun n_op
=(node
)
3882 redef fun n_expr2
=(node
)
3889 redef fun visit_all
(v
: Visitor)
3891 v
.enter_visit
(_n_expr
)
3892 v
.enter_visit
(_n_op
)
3893 v
.enter_visit
(_n_expr2
)
3898 n_expr
: nullable AExpr,
3900 n_expr2
: nullable AExpr
3903 _n_expr
= n_expr
.as(not null)
3904 n_expr
.parent
= self
3905 _n_op
= n_op
.as(not null)
3907 _n_expr2
= n_expr2
.as(not null)
3908 n_expr2
.parent
= self
3911 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3913 if _n_expr
== old_child
then
3914 n_expr
= new_child
.as(AExpr)
3917 if _n_op
== old_child
then
3918 n_op
= new_child
.as(TGg)
3921 if _n_expr2
== old_child
then
3922 n_expr2
= new_child
.as(AExpr)
3927 redef fun n_expr
=(node
)
3932 redef fun n_op
=(node
)
3937 redef fun n_expr2
=(node
)
3944 redef fun visit_all
(v
: Visitor)
3946 v
.enter_visit
(_n_expr
)
3947 v
.enter_visit
(_n_op
)
3948 v
.enter_visit
(_n_expr2
)
3951 redef class AIsaExpr
3952 init init_aisaexpr
(
3953 n_expr
: nullable AExpr,
3954 n_kwisa
: nullable TKwisa,
3955 n_type
: nullable AType
3958 _n_expr
= n_expr
.as(not null)
3959 n_expr
.parent
= self
3960 _n_kwisa
= n_kwisa
.as(not null)
3961 n_kwisa
.parent
= self
3962 _n_type
= n_type
.as(not null)
3963 n_type
.parent
= self
3966 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3968 if _n_expr
== old_child
then
3969 n_expr
= new_child
.as(AExpr)
3972 if _n_kwisa
== old_child
then
3973 n_kwisa
= new_child
.as(TKwisa)
3976 if _n_type
== old_child
then
3977 n_type
= new_child
.as(AType)
3982 redef fun n_expr
=(node
)
3987 redef fun n_kwisa
=(node
)
3992 redef fun n_type
=(node
)
3999 redef fun visit_all
(v
: Visitor)
4001 v
.enter_visit
(_n_expr
)
4002 v
.enter_visit
(_n_kwisa
)
4003 v
.enter_visit
(_n_type
)
4006 redef class APlusExpr
4007 init init_aplusexpr
(
4008 n_expr
: nullable AExpr,
4009 n_op
: nullable TPlus,
4010 n_expr2
: nullable AExpr
4013 _n_expr
= n_expr
.as(not null)
4014 n_expr
.parent
= self
4015 _n_op
= n_op
.as(not null)
4017 _n_expr2
= n_expr2
.as(not null)
4018 n_expr2
.parent
= self
4021 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4023 if _n_expr
== old_child
then
4024 n_expr
= new_child
.as(AExpr)
4027 if _n_op
== old_child
then
4028 n_op
= new_child
.as(TPlus)
4031 if _n_expr2
== old_child
then
4032 n_expr2
= new_child
.as(AExpr)
4037 redef fun n_expr
=(node
)
4042 redef fun n_op
=(node
)
4047 redef fun n_expr2
=(node
)
4054 redef fun visit_all
(v
: Visitor)
4056 v
.enter_visit
(_n_expr
)
4057 v
.enter_visit
(_n_op
)
4058 v
.enter_visit
(_n_expr2
)
4061 redef class AMinusExpr
4062 init init_aminusexpr
(
4063 n_expr
: nullable AExpr,
4064 n_op
: nullable TMinus,
4065 n_expr2
: nullable AExpr
4068 _n_expr
= n_expr
.as(not null)
4069 n_expr
.parent
= self
4070 _n_op
= n_op
.as(not null)
4072 _n_expr2
= n_expr2
.as(not null)
4073 n_expr2
.parent
= self
4076 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4078 if _n_expr
== old_child
then
4079 n_expr
= new_child
.as(AExpr)
4082 if _n_op
== old_child
then
4083 n_op
= new_child
.as(TMinus)
4086 if _n_expr2
== old_child
then
4087 n_expr2
= new_child
.as(AExpr)
4092 redef fun n_expr
=(node
)
4097 redef fun n_op
=(node
)
4102 redef fun n_expr2
=(node
)
4109 redef fun visit_all
(v
: Visitor)
4111 v
.enter_visit
(_n_expr
)
4112 v
.enter_visit
(_n_op
)
4113 v
.enter_visit
(_n_expr2
)
4116 redef class AStarshipExpr
4117 init init_astarshipexpr
(
4118 n_expr
: nullable AExpr,
4119 n_op
: nullable TStarship,
4120 n_expr2
: nullable AExpr
4123 _n_expr
= n_expr
.as(not null)
4124 n_expr
.parent
= self
4125 _n_op
= n_op
.as(not null)
4127 _n_expr2
= n_expr2
.as(not null)
4128 n_expr2
.parent
= self
4131 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4133 if _n_expr
== old_child
then
4134 n_expr
= new_child
.as(AExpr)
4137 if _n_op
== old_child
then
4138 n_op
= new_child
.as(TStarship)
4141 if _n_expr2
== old_child
then
4142 n_expr2
= new_child
.as(AExpr)
4147 redef fun n_expr
=(node
)
4152 redef fun n_op
=(node
)
4157 redef fun n_expr2
=(node
)
4164 redef fun visit_all
(v
: Visitor)
4166 v
.enter_visit
(_n_expr
)
4167 v
.enter_visit
(_n_op
)
4168 v
.enter_visit
(_n_expr2
)
4171 redef class AStarExpr
4172 init init_astarexpr
(
4173 n_expr
: nullable AExpr,
4174 n_op
: nullable TStar,
4175 n_expr2
: nullable AExpr
4178 _n_expr
= n_expr
.as(not null)
4179 n_expr
.parent
= self
4180 _n_op
= n_op
.as(not null)
4182 _n_expr2
= n_expr2
.as(not null)
4183 n_expr2
.parent
= self
4186 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4188 if _n_expr
== old_child
then
4189 n_expr
= new_child
.as(AExpr)
4192 if _n_op
== old_child
then
4193 n_op
= new_child
.as(TStar)
4196 if _n_expr2
== old_child
then
4197 n_expr2
= new_child
.as(AExpr)
4202 redef fun n_expr
=(node
)
4207 redef fun n_op
=(node
)
4212 redef fun n_expr2
=(node
)
4219 redef fun visit_all
(v
: Visitor)
4221 v
.enter_visit
(_n_expr
)
4222 v
.enter_visit
(_n_op
)
4223 v
.enter_visit
(_n_expr2
)
4226 redef class AStarstarExpr
4227 init init_astarstarexpr
(
4228 n_expr
: nullable AExpr,
4229 n_op
: nullable TStarstar,
4230 n_expr2
: nullable AExpr
4233 _n_expr
= n_expr
.as(not null)
4234 n_expr
.parent
= self
4235 _n_op
= n_op
.as(not null)
4237 _n_expr2
= n_expr2
.as(not null)
4238 n_expr2
.parent
= self
4241 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4243 if _n_expr
== old_child
then
4244 n_expr
= new_child
.as(AExpr)
4247 if _n_op
== old_child
then
4248 n_op
= new_child
.as(TStarstar)
4251 if _n_expr2
== old_child
then
4252 n_expr2
= new_child
.as(AExpr)
4257 redef fun n_expr
=(node
)
4262 redef fun n_op
=(node
)
4267 redef fun n_expr2
=(node
)
4274 redef fun visit_all
(v
: Visitor)
4276 v
.enter_visit
(_n_expr
)
4277 v
.enter_visit
(_n_op
)
4278 v
.enter_visit
(_n_expr2
)
4281 redef class ASlashExpr
4282 init init_aslashexpr
(
4283 n_expr
: nullable AExpr,
4284 n_op
: nullable TSlash,
4285 n_expr2
: nullable AExpr
4288 _n_expr
= n_expr
.as(not null)
4289 n_expr
.parent
= self
4290 _n_op
= n_op
.as(not null)
4292 _n_expr2
= n_expr2
.as(not null)
4293 n_expr2
.parent
= self
4296 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4298 if _n_expr
== old_child
then
4299 n_expr
= new_child
.as(AExpr)
4302 if _n_op
== old_child
then
4303 n_op
= new_child
.as(TSlash)
4306 if _n_expr2
== old_child
then
4307 n_expr2
= new_child
.as(AExpr)
4312 redef fun n_expr
=(node
)
4317 redef fun n_op
=(node
)
4322 redef fun n_expr2
=(node
)
4329 redef fun visit_all
(v
: Visitor)
4331 v
.enter_visit
(_n_expr
)
4332 v
.enter_visit
(_n_op
)
4333 v
.enter_visit
(_n_expr2
)
4336 redef class APercentExpr
4337 init init_apercentexpr
(
4338 n_expr
: nullable AExpr,
4339 n_op
: nullable TPercent,
4340 n_expr2
: nullable AExpr
4343 _n_expr
= n_expr
.as(not null)
4344 n_expr
.parent
= self
4345 _n_op
= n_op
.as(not null)
4347 _n_expr2
= n_expr2
.as(not null)
4348 n_expr2
.parent
= self
4351 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4353 if _n_expr
== old_child
then
4354 n_expr
= new_child
.as(AExpr)
4357 if _n_op
== old_child
then
4358 n_op
= new_child
.as(TPercent)
4361 if _n_expr2
== old_child
then
4362 n_expr2
= new_child
.as(AExpr)
4367 redef fun n_expr
=(node
)
4372 redef fun n_op
=(node
)
4377 redef fun n_expr2
=(node
)
4384 redef fun visit_all
(v
: Visitor)
4386 v
.enter_visit
(_n_expr
)
4387 v
.enter_visit
(_n_op
)
4388 v
.enter_visit
(_n_expr2
)
4391 redef class AUminusExpr
4392 init init_auminusexpr
(
4393 n_minus
: nullable TMinus,
4394 n_expr
: nullable AExpr
4397 _n_minus
= n_minus
.as(not null)
4398 n_minus
.parent
= self
4399 _n_expr
= n_expr
.as(not null)
4400 n_expr
.parent
= self
4403 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4405 if _n_minus
== old_child
then
4406 n_minus
= new_child
.as(TMinus)
4409 if _n_expr
== old_child
then
4410 n_expr
= new_child
.as(AExpr)
4415 redef fun n_minus
=(node
)
4420 redef fun n_expr
=(node
)
4427 redef fun visit_all
(v
: Visitor)
4429 v
.enter_visit
(_n_minus
)
4430 v
.enter_visit
(_n_expr
)
4433 redef class AUplusExpr
4434 init init_auplusexpr
(
4435 n_plus
: nullable TPlus,
4436 n_expr
: nullable AExpr
4439 _n_plus
= n_plus
.as(not null)
4440 n_plus
.parent
= self
4441 _n_expr
= n_expr
.as(not null)
4442 n_expr
.parent
= self
4445 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4447 if _n_plus
== old_child
then
4448 n_plus
= new_child
.as(TPlus)
4451 if _n_expr
== old_child
then
4452 n_expr
= new_child
.as(AExpr)
4457 redef fun n_plus
=(node
)
4462 redef fun n_expr
=(node
)
4469 redef fun visit_all
(v
: Visitor)
4471 v
.enter_visit
(_n_plus
)
4472 v
.enter_visit
(_n_expr
)
4475 redef class ANewExpr
4476 init init_anewexpr
(
4477 n_kwnew
: nullable TKwnew,
4478 n_type
: nullable AType,
4480 n_args
: nullable AExprs
4483 _n_kwnew
= n_kwnew
.as(not null)
4484 n_kwnew
.parent
= self
4485 _n_type
= n_type
.as(not null)
4486 n_type
.parent
= self
4488 if n_id
!= null then n_id
.parent
= self
4489 _n_args
= n_args
.as(not null)
4490 n_args
.parent
= self
4493 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4495 if _n_kwnew
== old_child
then
4496 n_kwnew
= new_child
.as(TKwnew)
4499 if _n_type
== old_child
then
4500 n_type
= new_child
.as(AType)
4503 if _n_id
== old_child
then
4504 n_id
= new_child
.as(nullable TId)
4507 if _n_args
== old_child
then
4508 n_args
= new_child
.as(AExprs)
4513 redef fun n_kwnew
=(node
)
4518 redef fun n_type
=(node
)
4523 redef fun n_id
=(node
)
4526 if node
!= null then node
.parent
= self
4528 redef fun n_args
=(node
)
4535 redef fun visit_all
(v
: Visitor)
4537 v
.enter_visit
(_n_kwnew
)
4538 v
.enter_visit
(_n_type
)
4539 v
.enter_visit
(_n_id
)
4540 v
.enter_visit
(_n_args
)
4543 redef class AAttrExpr
4544 init init_aattrexpr
(
4545 n_expr
: nullable AExpr,
4546 n_id
: nullable TAttrid
4549 _n_expr
= n_expr
.as(not null)
4550 n_expr
.parent
= self
4551 _n_id
= n_id
.as(not null)
4555 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4557 if _n_expr
== old_child
then
4558 n_expr
= new_child
.as(AExpr)
4561 if _n_id
== old_child
then
4562 n_id
= new_child
.as(TAttrid)
4567 redef fun n_expr
=(node
)
4572 redef fun n_id
=(node
)
4579 redef fun visit_all
(v
: Visitor)
4581 v
.enter_visit
(_n_expr
)
4582 v
.enter_visit
(_n_id
)
4585 redef class AAttrAssignExpr
4586 init init_aattrassignexpr
(
4587 n_expr
: nullable AExpr,
4588 n_id
: nullable TAttrid,
4589 n_assign
: nullable TAssign,
4590 n_value
: nullable AExpr
4593 _n_expr
= n_expr
.as(not null)
4594 n_expr
.parent
= self
4595 _n_id
= n_id
.as(not null)
4597 _n_assign
= n_assign
.as(not null)
4598 n_assign
.parent
= self
4599 _n_value
= n_value
.as(not null)
4600 n_value
.parent
= self
4603 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4605 if _n_expr
== old_child
then
4606 n_expr
= new_child
.as(AExpr)
4609 if _n_id
== old_child
then
4610 n_id
= new_child
.as(TAttrid)
4613 if _n_assign
== old_child
then
4614 n_assign
= new_child
.as(TAssign)
4617 if _n_value
== old_child
then
4618 n_value
= new_child
.as(AExpr)
4623 redef fun n_expr
=(node
)
4628 redef fun n_id
=(node
)
4633 redef fun n_assign
=(node
)
4638 redef fun n_value
=(node
)
4645 redef fun visit_all
(v
: Visitor)
4647 v
.enter_visit
(_n_expr
)
4648 v
.enter_visit
(_n_id
)
4649 v
.enter_visit
(_n_assign
)
4650 v
.enter_visit
(_n_value
)
4653 redef class AAttrReassignExpr
4654 init init_aattrreassignexpr
(
4655 n_expr
: nullable AExpr,
4656 n_id
: nullable TAttrid,
4657 n_assign_op
: nullable AAssignOp,
4658 n_value
: nullable AExpr
4661 _n_expr
= n_expr
.as(not null)
4662 n_expr
.parent
= self
4663 _n_id
= n_id
.as(not null)
4665 _n_assign_op
= n_assign_op
.as(not null)
4666 n_assign_op
.parent
= self
4667 _n_value
= n_value
.as(not null)
4668 n_value
.parent
= self
4671 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4673 if _n_expr
== old_child
then
4674 n_expr
= new_child
.as(AExpr)
4677 if _n_id
== old_child
then
4678 n_id
= new_child
.as(TAttrid)
4681 if _n_assign_op
== old_child
then
4682 n_assign_op
= new_child
.as(AAssignOp)
4685 if _n_value
== old_child
then
4686 n_value
= new_child
.as(AExpr)
4691 redef fun n_expr
=(node
)
4696 redef fun n_id
=(node
)
4701 redef fun n_assign_op
=(node
)
4706 redef fun n_value
=(node
)
4713 redef fun visit_all
(v
: Visitor)
4715 v
.enter_visit
(_n_expr
)
4716 v
.enter_visit
(_n_id
)
4717 v
.enter_visit
(_n_assign_op
)
4718 v
.enter_visit
(_n_value
)
4721 redef class ACallExpr
4722 init init_acallexpr
(
4723 n_expr
: nullable AExpr,
4725 n_args
: nullable AExprs
4728 _n_expr
= n_expr
.as(not null)
4729 n_expr
.parent
= self
4730 _n_id
= n_id
.as(not null)
4732 _n_args
= n_args
.as(not null)
4733 n_args
.parent
= self
4736 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4738 if _n_expr
== old_child
then
4739 n_expr
= new_child
.as(AExpr)
4742 if _n_id
== old_child
then
4743 n_id
= new_child
.as(TId)
4746 if _n_args
== old_child
then
4747 n_args
= new_child
.as(AExprs)
4752 redef fun n_expr
=(node
)
4757 redef fun n_id
=(node
)
4762 redef fun n_args
=(node
)
4769 redef fun visit_all
(v
: Visitor)
4771 v
.enter_visit
(_n_expr
)
4772 v
.enter_visit
(_n_id
)
4773 v
.enter_visit
(_n_args
)
4776 redef class ACallAssignExpr
4777 init init_acallassignexpr
(
4778 n_expr
: nullable AExpr,
4780 n_args
: nullable AExprs,
4781 n_assign
: nullable TAssign,
4782 n_value
: nullable AExpr
4785 _n_expr
= n_expr
.as(not null)
4786 n_expr
.parent
= self
4787 _n_id
= n_id
.as(not null)
4789 _n_args
= n_args
.as(not null)
4790 n_args
.parent
= self
4791 _n_assign
= n_assign
.as(not null)
4792 n_assign
.parent
= self
4793 _n_value
= n_value
.as(not null)
4794 n_value
.parent
= self
4797 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4799 if _n_expr
== old_child
then
4800 n_expr
= new_child
.as(AExpr)
4803 if _n_id
== old_child
then
4804 n_id
= new_child
.as(TId)
4807 if _n_args
== old_child
then
4808 n_args
= new_child
.as(AExprs)
4811 if _n_assign
== old_child
then
4812 n_assign
= new_child
.as(TAssign)
4815 if _n_value
== old_child
then
4816 n_value
= new_child
.as(AExpr)
4821 redef fun n_expr
=(node
)
4826 redef fun n_id
=(node
)
4831 redef fun n_args
=(node
)
4836 redef fun n_assign
=(node
)
4841 redef fun n_value
=(node
)
4848 redef fun visit_all
(v
: Visitor)
4850 v
.enter_visit
(_n_expr
)
4851 v
.enter_visit
(_n_id
)
4852 v
.enter_visit
(_n_args
)
4853 v
.enter_visit
(_n_assign
)
4854 v
.enter_visit
(_n_value
)
4857 redef class ACallReassignExpr
4858 init init_acallreassignexpr
(
4859 n_expr
: nullable AExpr,
4861 n_args
: nullable AExprs,
4862 n_assign_op
: nullable AAssignOp,
4863 n_value
: nullable AExpr
4866 _n_expr
= n_expr
.as(not null)
4867 n_expr
.parent
= self
4868 _n_id
= n_id
.as(not null)
4870 _n_args
= n_args
.as(not null)
4871 n_args
.parent
= self
4872 _n_assign_op
= n_assign_op
.as(not null)
4873 n_assign_op
.parent
= self
4874 _n_value
= n_value
.as(not null)
4875 n_value
.parent
= self
4878 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4880 if _n_expr
== old_child
then
4881 n_expr
= new_child
.as(AExpr)
4884 if _n_id
== old_child
then
4885 n_id
= new_child
.as(TId)
4888 if _n_args
== old_child
then
4889 n_args
= new_child
.as(AExprs)
4892 if _n_assign_op
== old_child
then
4893 n_assign_op
= new_child
.as(AAssignOp)
4896 if _n_value
== old_child
then
4897 n_value
= new_child
.as(AExpr)
4902 redef fun n_expr
=(node
)
4907 redef fun n_id
=(node
)
4912 redef fun n_args
=(node
)
4917 redef fun n_assign_op
=(node
)
4922 redef fun n_value
=(node
)
4929 redef fun visit_all
(v
: Visitor)
4931 v
.enter_visit
(_n_expr
)
4932 v
.enter_visit
(_n_id
)
4933 v
.enter_visit
(_n_args
)
4934 v
.enter_visit
(_n_assign_op
)
4935 v
.enter_visit
(_n_value
)
4938 redef class ASuperExpr
4939 init init_asuperexpr
(
4940 n_qualified
: nullable AQualified,
4941 n_kwsuper
: nullable TKwsuper,
4942 n_args
: nullable AExprs
4945 _n_qualified
= n_qualified
4946 if n_qualified
!= null then n_qualified
.parent
= self
4947 _n_kwsuper
= n_kwsuper
.as(not null)
4948 n_kwsuper
.parent
= self
4949 _n_args
= n_args
.as(not null)
4950 n_args
.parent
= self
4953 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4955 if _n_qualified
== old_child
then
4956 n_qualified
= new_child
.as(nullable AQualified)
4959 if _n_kwsuper
== old_child
then
4960 n_kwsuper
= new_child
.as(TKwsuper)
4963 if _n_args
== old_child
then
4964 n_args
= new_child
.as(AExprs)
4969 redef fun n_qualified
=(node
)
4972 if node
!= null then node
.parent
= self
4974 redef fun n_kwsuper
=(node
)
4979 redef fun n_args
=(node
)
4986 redef fun visit_all
(v
: Visitor)
4988 v
.enter_visit
(_n_qualified
)
4989 v
.enter_visit
(_n_kwsuper
)
4990 v
.enter_visit
(_n_args
)
4993 redef class AInitExpr
4994 init init_ainitexpr
(
4995 n_expr
: nullable AExpr,
4996 n_kwinit
: nullable TKwinit,
4997 n_args
: nullable AExprs
5000 _n_expr
= n_expr
.as(not null)
5001 n_expr
.parent
= self
5002 _n_kwinit
= n_kwinit
.as(not null)
5003 n_kwinit
.parent
= self
5004 _n_args
= n_args
.as(not null)
5005 n_args
.parent
= self
5008 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5010 if _n_expr
== old_child
then
5011 n_expr
= new_child
.as(AExpr)
5014 if _n_kwinit
== old_child
then
5015 n_kwinit
= new_child
.as(TKwinit)
5018 if _n_args
== old_child
then
5019 n_args
= new_child
.as(AExprs)
5024 redef fun n_expr
=(node
)
5029 redef fun n_kwinit
=(node
)
5034 redef fun n_args
=(node
)
5041 redef fun visit_all
(v
: Visitor)
5043 v
.enter_visit
(_n_expr
)
5044 v
.enter_visit
(_n_kwinit
)
5045 v
.enter_visit
(_n_args
)
5048 redef class ABraExpr
5049 init init_abraexpr
(
5050 n_expr
: nullable AExpr,
5051 n_args
: nullable AExprs
5054 _n_expr
= n_expr
.as(not null)
5055 n_expr
.parent
= self
5056 _n_args
= n_args
.as(not null)
5057 n_args
.parent
= self
5060 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5062 if _n_expr
== old_child
then
5063 n_expr
= new_child
.as(AExpr)
5066 if _n_args
== old_child
then
5067 n_args
= new_child
.as(AExprs)
5072 redef fun n_expr
=(node
)
5077 redef fun n_args
=(node
)
5084 redef fun visit_all
(v
: Visitor)
5086 v
.enter_visit
(_n_expr
)
5087 v
.enter_visit
(_n_args
)
5090 redef class ABraAssignExpr
5091 init init_abraassignexpr
(
5092 n_expr
: nullable AExpr,
5093 n_args
: nullable AExprs,
5094 n_assign
: nullable TAssign,
5095 n_value
: nullable AExpr
5098 _n_expr
= n_expr
.as(not null)
5099 n_expr
.parent
= self
5100 _n_args
= n_args
.as(not null)
5101 n_args
.parent
= self
5102 _n_assign
= n_assign
.as(not null)
5103 n_assign
.parent
= self
5104 _n_value
= n_value
.as(not null)
5105 n_value
.parent
= self
5108 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5110 if _n_expr
== old_child
then
5111 n_expr
= new_child
.as(AExpr)
5114 if _n_args
== old_child
then
5115 n_args
= new_child
.as(AExprs)
5118 if _n_assign
== old_child
then
5119 n_assign
= new_child
.as(TAssign)
5122 if _n_value
== old_child
then
5123 n_value
= new_child
.as(AExpr)
5128 redef fun n_expr
=(node
)
5133 redef fun n_args
=(node
)
5138 redef fun n_assign
=(node
)
5143 redef fun n_value
=(node
)
5150 redef fun visit_all
(v
: Visitor)
5152 v
.enter_visit
(_n_expr
)
5153 v
.enter_visit
(_n_args
)
5154 v
.enter_visit
(_n_assign
)
5155 v
.enter_visit
(_n_value
)
5158 redef class ABraReassignExpr
5159 init init_abrareassignexpr
(
5160 n_expr
: nullable AExpr,
5161 n_args
: nullable AExprs,
5162 n_assign_op
: nullable AAssignOp,
5163 n_value
: nullable AExpr
5166 _n_expr
= n_expr
.as(not null)
5167 n_expr
.parent
= self
5168 _n_args
= n_args
.as(not null)
5169 n_args
.parent
= self
5170 _n_assign_op
= n_assign_op
.as(not null)
5171 n_assign_op
.parent
= self
5172 _n_value
= n_value
.as(not null)
5173 n_value
.parent
= self
5176 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5178 if _n_expr
== old_child
then
5179 n_expr
= new_child
.as(AExpr)
5182 if _n_args
== old_child
then
5183 n_args
= new_child
.as(AExprs)
5186 if _n_assign_op
== old_child
then
5187 n_assign_op
= new_child
.as(AAssignOp)
5190 if _n_value
== old_child
then
5191 n_value
= new_child
.as(AExpr)
5196 redef fun n_expr
=(node
)
5201 redef fun n_args
=(node
)
5206 redef fun n_assign_op
=(node
)
5211 redef fun n_value
=(node
)
5218 redef fun visit_all
(v
: Visitor)
5220 v
.enter_visit
(_n_expr
)
5221 v
.enter_visit
(_n_args
)
5222 v
.enter_visit
(_n_assign_op
)
5223 v
.enter_visit
(_n_value
)
5226 redef class AVarExpr
5227 init init_avarexpr
(
5231 _n_id
= n_id
.as(not null)
5235 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5237 if _n_id
== old_child
then
5238 n_id
= new_child
.as(TId)
5243 redef fun n_id
=(node
)
5250 redef fun visit_all
(v
: Visitor)
5252 v
.enter_visit
(_n_id
)
5255 redef class AVarAssignExpr
5256 init init_avarassignexpr
(
5258 n_assign
: nullable TAssign,
5259 n_value
: nullable AExpr
5262 _n_id
= n_id
.as(not null)
5264 _n_assign
= n_assign
.as(not null)
5265 n_assign
.parent
= self
5266 _n_value
= n_value
.as(not null)
5267 n_value
.parent
= self
5270 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5272 if _n_id
== old_child
then
5273 n_id
= new_child
.as(TId)
5276 if _n_assign
== old_child
then
5277 n_assign
= new_child
.as(TAssign)
5280 if _n_value
== old_child
then
5281 n_value
= new_child
.as(AExpr)
5286 redef fun n_id
=(node
)
5291 redef fun n_assign
=(node
)
5296 redef fun n_value
=(node
)
5303 redef fun visit_all
(v
: Visitor)
5305 v
.enter_visit
(_n_id
)
5306 v
.enter_visit
(_n_assign
)
5307 v
.enter_visit
(_n_value
)
5310 redef class AVarReassignExpr
5311 init init_avarreassignexpr
(
5313 n_assign_op
: nullable AAssignOp,
5314 n_value
: nullable AExpr
5317 _n_id
= n_id
.as(not null)
5319 _n_assign_op
= n_assign_op
.as(not null)
5320 n_assign_op
.parent
= self
5321 _n_value
= n_value
.as(not null)
5322 n_value
.parent
= self
5325 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5327 if _n_id
== old_child
then
5328 n_id
= new_child
.as(TId)
5331 if _n_assign_op
== old_child
then
5332 n_assign_op
= new_child
.as(AAssignOp)
5335 if _n_value
== old_child
then
5336 n_value
= new_child
.as(AExpr)
5341 redef fun n_id
=(node
)
5346 redef fun n_assign_op
=(node
)
5351 redef fun n_value
=(node
)
5358 redef fun visit_all
(v
: Visitor)
5360 v
.enter_visit
(_n_id
)
5361 v
.enter_visit
(_n_assign_op
)
5362 v
.enter_visit
(_n_value
)
5365 redef class ARangeExpr
5366 init init_arangeexpr
(
5367 n_expr
: nullable AExpr,
5368 n_expr2
: nullable AExpr,
5369 n_annotations
: nullable AAnnotations
5372 _n_expr
= n_expr
.as(not null)
5373 n_expr
.parent
= self
5374 _n_expr2
= n_expr2
.as(not null)
5375 n_expr2
.parent
= self
5376 _n_annotations
= n_annotations
5377 if n_annotations
!= null then n_annotations
.parent
= self
5380 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5382 if _n_expr
== old_child
then
5383 n_expr
= new_child
.as(AExpr)
5386 if _n_expr2
== old_child
then
5387 n_expr2
= new_child
.as(AExpr)
5390 if _n_annotations
== old_child
then
5391 n_annotations
= new_child
.as(nullable AAnnotations)
5396 redef fun n_expr
=(node
)
5401 redef fun n_expr2
=(node
)
5406 redef fun n_annotations
=(node
)
5408 _n_annotations
= node
5409 if node
!= null then node
.parent
= self
5413 redef fun visit_all
(v
: Visitor)
5415 v
.enter_visit
(_n_expr
)
5416 v
.enter_visit
(_n_expr2
)
5417 v
.enter_visit
(_n_annotations
)
5420 redef class ACrangeExpr
5421 init init_acrangeexpr
(
5422 n_obra
: nullable TObra,
5423 n_expr
: nullable AExpr,
5424 n_expr2
: nullable AExpr,
5425 n_cbra
: nullable TCbra,
5426 n_annotations
: nullable AAnnotations
5429 _n_obra
= n_obra
.as(not null)
5430 n_obra
.parent
= self
5431 _n_expr
= n_expr
.as(not null)
5432 n_expr
.parent
= self
5433 _n_expr2
= n_expr2
.as(not null)
5434 n_expr2
.parent
= self
5435 _n_cbra
= n_cbra
.as(not null)
5436 n_cbra
.parent
= self
5437 _n_annotations
= n_annotations
5438 if n_annotations
!= null then n_annotations
.parent
= self
5441 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5443 if _n_obra
== old_child
then
5444 n_obra
= new_child
.as(TObra)
5447 if _n_expr
== old_child
then
5448 n_expr
= new_child
.as(AExpr)
5451 if _n_expr2
== old_child
then
5452 n_expr2
= new_child
.as(AExpr)
5455 if _n_cbra
== old_child
then
5456 n_cbra
= new_child
.as(TCbra)
5459 if _n_annotations
== old_child
then
5460 n_annotations
= new_child
.as(nullable AAnnotations)
5465 redef fun n_obra
=(node
)
5470 redef fun n_expr
=(node
)
5475 redef fun n_expr2
=(node
)
5480 redef fun n_cbra
=(node
)
5485 redef fun n_annotations
=(node
)
5487 _n_annotations
= node
5488 if node
!= null then node
.parent
= self
5492 redef fun visit_all
(v
: Visitor)
5494 v
.enter_visit
(_n_obra
)
5495 v
.enter_visit
(_n_expr
)
5496 v
.enter_visit
(_n_expr2
)
5497 v
.enter_visit
(_n_cbra
)
5498 v
.enter_visit
(_n_annotations
)
5501 redef class AOrangeExpr
5502 init init_aorangeexpr
(
5503 n_obra
: nullable TObra,
5504 n_expr
: nullable AExpr,
5505 n_expr2
: nullable AExpr,
5506 n_cbra
: nullable TObra,
5507 n_annotations
: nullable AAnnotations
5510 _n_obra
= n_obra
.as(not null)
5511 n_obra
.parent
= self
5512 _n_expr
= n_expr
.as(not null)
5513 n_expr
.parent
= self
5514 _n_expr2
= n_expr2
.as(not null)
5515 n_expr2
.parent
= self
5516 _n_cbra
= n_cbra
.as(not null)
5517 n_cbra
.parent
= self
5518 _n_annotations
= n_annotations
5519 if n_annotations
!= null then n_annotations
.parent
= self
5522 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5524 if _n_obra
== old_child
then
5525 n_obra
= new_child
.as(TObra)
5528 if _n_expr
== old_child
then
5529 n_expr
= new_child
.as(AExpr)
5532 if _n_expr2
== old_child
then
5533 n_expr2
= new_child
.as(AExpr)
5536 if _n_cbra
== old_child
then
5537 n_cbra
= new_child
.as(TObra)
5540 if _n_annotations
== old_child
then
5541 n_annotations
= new_child
.as(nullable AAnnotations)
5546 redef fun n_obra
=(node
)
5551 redef fun n_expr
=(node
)
5556 redef fun n_expr2
=(node
)
5561 redef fun n_cbra
=(node
)
5566 redef fun n_annotations
=(node
)
5568 _n_annotations
= node
5569 if node
!= null then node
.parent
= self
5573 redef fun visit_all
(v
: Visitor)
5575 v
.enter_visit
(_n_obra
)
5576 v
.enter_visit
(_n_expr
)
5577 v
.enter_visit
(_n_expr2
)
5578 v
.enter_visit
(_n_cbra
)
5579 v
.enter_visit
(_n_annotations
)
5582 redef class AArrayExpr
5583 init init_aarrayexpr
(
5584 n_obra
: nullable TObra,
5585 n_exprs
: Collection[Object], # Should be Collection[AExpr]
5586 n_type
: nullable AType,
5587 n_cbra
: nullable TCbra,
5588 n_annotations
: nullable AAnnotations
5591 _n_obra
= n_obra
.as(not null)
5592 n_obra
.parent
= self
5593 self.n_exprs
.unsafe_add_all
(n_exprs
)
5595 if n_type
!= null then n_type
.parent
= self
5596 _n_cbra
= n_cbra
.as(not null)
5597 n_cbra
.parent
= self
5598 _n_annotations
= n_annotations
5599 if n_annotations
!= null then n_annotations
.parent
= self
5602 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5604 if _n_obra
== old_child
then
5605 n_obra
= new_child
.as(TObra)
5608 if n_exprs
.replace_child
(old_child
, new_child
) then return
5609 if _n_type
== old_child
then
5610 n_type
= new_child
.as(nullable AType)
5613 if _n_cbra
== old_child
then
5614 n_cbra
= new_child
.as(TCbra)
5617 if _n_annotations
== old_child
then
5618 n_annotations
= new_child
.as(nullable AAnnotations)
5623 redef fun n_obra
=(node
)
5628 redef fun n_type
=(node
)
5631 if node
!= null then node
.parent
= self
5633 redef fun n_cbra
=(node
)
5638 redef fun n_annotations
=(node
)
5640 _n_annotations
= node
5641 if node
!= null then node
.parent
= self
5645 redef fun visit_all
(v
: Visitor)
5647 v
.enter_visit
(_n_obra
)
5648 n_exprs
.visit_all
(v
)
5649 v
.enter_visit
(_n_type
)
5650 v
.enter_visit
(_n_cbra
)
5651 v
.enter_visit
(_n_annotations
)
5654 redef class ASelfExpr
5655 init init_aselfexpr
(
5656 n_kwself
: nullable TKwself,
5657 n_annotations
: nullable AAnnotations
5660 _n_kwself
= n_kwself
.as(not null)
5661 n_kwself
.parent
= self
5662 _n_annotations
= n_annotations
5663 if n_annotations
!= null then n_annotations
.parent
= self
5666 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5668 if _n_kwself
== old_child
then
5669 n_kwself
= new_child
.as(TKwself)
5672 if _n_annotations
== old_child
then
5673 n_annotations
= new_child
.as(nullable AAnnotations)
5678 redef fun n_kwself
=(node
)
5683 redef fun n_annotations
=(node
)
5685 _n_annotations
= node
5686 if node
!= null then node
.parent
= self
5690 redef fun visit_all
(v
: Visitor)
5692 v
.enter_visit
(_n_kwself
)
5693 v
.enter_visit
(_n_annotations
)
5696 redef class AImplicitSelfExpr
5697 init init_aimplicitselfexpr
5701 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5707 redef fun visit_all
(v
: Visitor)
5711 redef class ATrueExpr
5712 init init_atrueexpr
(
5713 n_kwtrue
: nullable TKwtrue,
5714 n_annotations
: nullable AAnnotations
5717 _n_kwtrue
= n_kwtrue
.as(not null)
5718 n_kwtrue
.parent
= self
5719 _n_annotations
= n_annotations
5720 if n_annotations
!= null then n_annotations
.parent
= self
5723 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5725 if _n_kwtrue
== old_child
then
5726 n_kwtrue
= new_child
.as(TKwtrue)
5729 if _n_annotations
== old_child
then
5730 n_annotations
= new_child
.as(nullable AAnnotations)
5735 redef fun n_kwtrue
=(node
)
5740 redef fun n_annotations
=(node
)
5742 _n_annotations
= node
5743 if node
!= null then node
.parent
= self
5747 redef fun visit_all
(v
: Visitor)
5749 v
.enter_visit
(_n_kwtrue
)
5750 v
.enter_visit
(_n_annotations
)
5753 redef class AFalseExpr
5754 init init_afalseexpr
(
5755 n_kwfalse
: nullable TKwfalse,
5756 n_annotations
: nullable AAnnotations
5759 _n_kwfalse
= n_kwfalse
.as(not null)
5760 n_kwfalse
.parent
= self
5761 _n_annotations
= n_annotations
5762 if n_annotations
!= null then n_annotations
.parent
= self
5765 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5767 if _n_kwfalse
== old_child
then
5768 n_kwfalse
= new_child
.as(TKwfalse)
5771 if _n_annotations
== old_child
then
5772 n_annotations
= new_child
.as(nullable AAnnotations)
5777 redef fun n_kwfalse
=(node
)
5782 redef fun n_annotations
=(node
)
5784 _n_annotations
= node
5785 if node
!= null then node
.parent
= self
5789 redef fun visit_all
(v
: Visitor)
5791 v
.enter_visit
(_n_kwfalse
)
5792 v
.enter_visit
(_n_annotations
)
5795 redef class ANullExpr
5796 init init_anullexpr
(
5797 n_kwnull
: nullable TKwnull,
5798 n_annotations
: nullable AAnnotations
5801 _n_kwnull
= n_kwnull
.as(not null)
5802 n_kwnull
.parent
= self
5803 _n_annotations
= n_annotations
5804 if n_annotations
!= null then n_annotations
.parent
= self
5807 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5809 if _n_kwnull
== old_child
then
5810 n_kwnull
= new_child
.as(TKwnull)
5813 if _n_annotations
== old_child
then
5814 n_annotations
= new_child
.as(nullable AAnnotations)
5819 redef fun n_kwnull
=(node
)
5824 redef fun n_annotations
=(node
)
5826 _n_annotations
= node
5827 if node
!= null then node
.parent
= self
5831 redef fun visit_all
(v
: Visitor)
5833 v
.enter_visit
(_n_kwnull
)
5834 v
.enter_visit
(_n_annotations
)
5837 redef class ADecIntExpr
5838 init init_adecintexpr
(
5839 n_number
: nullable TNumber,
5840 n_annotations
: nullable AAnnotations
5843 _n_number
= n_number
.as(not null)
5844 n_number
.parent
= self
5845 _n_annotations
= n_annotations
5846 if n_annotations
!= null then n_annotations
.parent
= self
5849 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5851 if _n_number
== old_child
then
5852 n_number
= new_child
.as(TNumber)
5855 if _n_annotations
== old_child
then
5856 n_annotations
= new_child
.as(nullable AAnnotations)
5861 redef fun n_number
=(node
)
5866 redef fun n_annotations
=(node
)
5868 _n_annotations
= node
5869 if node
!= null then node
.parent
= self
5873 redef fun visit_all
(v
: Visitor)
5875 v
.enter_visit
(_n_number
)
5876 v
.enter_visit
(_n_annotations
)
5879 redef class AHexIntExpr
5880 init init_ahexintexpr
(
5881 n_hex_number
: nullable THexNumber,
5882 n_annotations
: nullable AAnnotations
5885 _n_hex_number
= n_hex_number
.as(not null)
5886 n_hex_number
.parent
= self
5887 _n_annotations
= n_annotations
5888 if n_annotations
!= null then n_annotations
.parent
= self
5891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5893 if _n_hex_number
== old_child
then
5894 n_hex_number
= new_child
.as(THexNumber)
5897 if _n_annotations
== old_child
then
5898 n_annotations
= new_child
.as(nullable AAnnotations)
5903 redef fun n_hex_number
=(node
)
5905 _n_hex_number
= node
5908 redef fun n_annotations
=(node
)
5910 _n_annotations
= node
5911 if node
!= null then node
.parent
= self
5915 redef fun visit_all
(v
: Visitor)
5917 v
.enter_visit
(_n_hex_number
)
5918 v
.enter_visit
(_n_annotations
)
5921 redef class AFloatExpr
5922 init init_afloatexpr
(
5923 n_float
: nullable TFloat,
5924 n_annotations
: nullable AAnnotations
5927 _n_float
= n_float
.as(not null)
5928 n_float
.parent
= self
5929 _n_annotations
= n_annotations
5930 if n_annotations
!= null then n_annotations
.parent
= self
5933 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5935 if _n_float
== old_child
then
5936 n_float
= new_child
.as(TFloat)
5939 if _n_annotations
== old_child
then
5940 n_annotations
= new_child
.as(nullable AAnnotations)
5945 redef fun n_float
=(node
)
5950 redef fun n_annotations
=(node
)
5952 _n_annotations
= node
5953 if node
!= null then node
.parent
= self
5957 redef fun visit_all
(v
: Visitor)
5959 v
.enter_visit
(_n_float
)
5960 v
.enter_visit
(_n_annotations
)
5963 redef class ACharExpr
5964 init init_acharexpr
(
5965 n_char
: nullable TChar,
5966 n_annotations
: nullable AAnnotations
5969 _n_char
= n_char
.as(not null)
5970 n_char
.parent
= self
5971 _n_annotations
= n_annotations
5972 if n_annotations
!= null then n_annotations
.parent
= self
5975 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5977 if _n_char
== old_child
then
5978 n_char
= new_child
.as(TChar)
5981 if _n_annotations
== old_child
then
5982 n_annotations
= new_child
.as(nullable AAnnotations)
5987 redef fun n_char
=(node
)
5992 redef fun n_annotations
=(node
)
5994 _n_annotations
= node
5995 if node
!= null then node
.parent
= self
5999 redef fun visit_all
(v
: Visitor)
6001 v
.enter_visit
(_n_char
)
6002 v
.enter_visit
(_n_annotations
)
6005 redef class AStringExpr
6006 init init_astringexpr
(
6007 n_string
: nullable TString,
6008 n_annotations
: nullable AAnnotations
6011 _n_string
= n_string
.as(not null)
6012 n_string
.parent
= self
6013 _n_annotations
= n_annotations
6014 if n_annotations
!= null then n_annotations
.parent
= self
6017 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6019 if _n_string
== old_child
then
6020 n_string
= new_child
.as(TString)
6023 if _n_annotations
== old_child
then
6024 n_annotations
= new_child
.as(nullable AAnnotations)
6029 redef fun n_string
=(node
)
6034 redef fun n_annotations
=(node
)
6036 _n_annotations
= node
6037 if node
!= null then node
.parent
= self
6041 redef fun visit_all
(v
: Visitor)
6043 v
.enter_visit
(_n_string
)
6044 v
.enter_visit
(_n_annotations
)
6047 redef class AStartStringExpr
6048 init init_astartstringexpr
(
6049 n_string
: nullable TStartString
6052 _n_string
= n_string
.as(not null)
6053 n_string
.parent
= self
6056 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6058 if _n_string
== old_child
then
6059 n_string
= new_child
.as(TStartString)
6064 redef fun n_string
=(node
)
6071 redef fun visit_all
(v
: Visitor)
6073 v
.enter_visit
(_n_string
)
6076 redef class AMidStringExpr
6077 init init_amidstringexpr
(
6078 n_string
: nullable TMidString
6081 _n_string
= n_string
.as(not null)
6082 n_string
.parent
= self
6085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6087 if _n_string
== old_child
then
6088 n_string
= new_child
.as(TMidString)
6093 redef fun n_string
=(node
)
6100 redef fun visit_all
(v
: Visitor)
6102 v
.enter_visit
(_n_string
)
6105 redef class AEndStringExpr
6106 init init_aendstringexpr
(
6107 n_string
: nullable TEndString
6110 _n_string
= n_string
.as(not null)
6111 n_string
.parent
= self
6114 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6116 if _n_string
== old_child
then
6117 n_string
= new_child
.as(TEndString)
6122 redef fun n_string
=(node
)
6129 redef fun visit_all
(v
: Visitor)
6131 v
.enter_visit
(_n_string
)
6134 redef class ASuperstringExpr
6135 init init_asuperstringexpr
(
6136 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6137 n_annotations
: nullable AAnnotations
6140 self.n_exprs
.unsafe_add_all
(n_exprs
)
6141 _n_annotations
= n_annotations
6142 if n_annotations
!= null then n_annotations
.parent
= self
6145 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6147 if n_exprs
.replace_child
(old_child
, new_child
) then return
6148 if _n_annotations
== old_child
then
6149 n_annotations
= new_child
.as(nullable AAnnotations)
6154 redef fun n_annotations
=(node
)
6156 _n_annotations
= node
6157 if node
!= null then node
.parent
= self
6161 redef fun visit_all
(v
: Visitor)
6163 n_exprs
.visit_all
(v
)
6164 v
.enter_visit
(_n_annotations
)
6167 redef class AParExpr
6168 init init_aparexpr
(
6169 n_opar
: nullable TOpar,
6170 n_expr
: nullable AExpr,
6171 n_cpar
: nullable TCpar,
6172 n_annotations
: nullable AAnnotations
6175 _n_opar
= n_opar
.as(not null)
6176 n_opar
.parent
= self
6177 _n_expr
= n_expr
.as(not null)
6178 n_expr
.parent
= self
6179 _n_cpar
= n_cpar
.as(not null)
6180 n_cpar
.parent
= self
6181 _n_annotations
= n_annotations
6182 if n_annotations
!= null then n_annotations
.parent
= self
6185 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6187 if _n_opar
== old_child
then
6188 n_opar
= new_child
.as(TOpar)
6191 if _n_expr
== old_child
then
6192 n_expr
= new_child
.as(AExpr)
6195 if _n_cpar
== old_child
then
6196 n_cpar
= new_child
.as(TCpar)
6199 if _n_annotations
== old_child
then
6200 n_annotations
= new_child
.as(nullable AAnnotations)
6205 redef fun n_opar
=(node
)
6210 redef fun n_expr
=(node
)
6215 redef fun n_cpar
=(node
)
6220 redef fun n_annotations
=(node
)
6222 _n_annotations
= node
6223 if node
!= null then node
.parent
= self
6227 redef fun visit_all
(v
: Visitor)
6229 v
.enter_visit
(_n_opar
)
6230 v
.enter_visit
(_n_expr
)
6231 v
.enter_visit
(_n_cpar
)
6232 v
.enter_visit
(_n_annotations
)
6235 redef class AAsCastExpr
6236 init init_aascastexpr
(
6237 n_expr
: nullable AExpr,
6238 n_kwas
: nullable TKwas,
6239 n_opar
: nullable TOpar,
6240 n_type
: nullable AType,
6241 n_cpar
: nullable TCpar
6244 _n_expr
= n_expr
.as(not null)
6245 n_expr
.parent
= self
6246 _n_kwas
= n_kwas
.as(not null)
6247 n_kwas
.parent
= self
6249 if n_opar
!= null then n_opar
.parent
= self
6250 _n_type
= n_type
.as(not null)
6251 n_type
.parent
= self
6253 if n_cpar
!= null then n_cpar
.parent
= self
6256 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6258 if _n_expr
== old_child
then
6259 n_expr
= new_child
.as(AExpr)
6262 if _n_kwas
== old_child
then
6263 n_kwas
= new_child
.as(TKwas)
6266 if _n_opar
== old_child
then
6267 n_opar
= new_child
.as(nullable TOpar)
6270 if _n_type
== old_child
then
6271 n_type
= new_child
.as(AType)
6274 if _n_cpar
== old_child
then
6275 n_cpar
= new_child
.as(nullable TCpar)
6280 redef fun n_expr
=(node
)
6285 redef fun n_kwas
=(node
)
6290 redef fun n_opar
=(node
)
6293 if node
!= null then node
.parent
= self
6295 redef fun n_type
=(node
)
6300 redef fun n_cpar
=(node
)
6303 if node
!= null then node
.parent
= self
6307 redef fun visit_all
(v
: Visitor)
6309 v
.enter_visit
(_n_expr
)
6310 v
.enter_visit
(_n_kwas
)
6311 v
.enter_visit
(_n_opar
)
6312 v
.enter_visit
(_n_type
)
6313 v
.enter_visit
(_n_cpar
)
6316 redef class AAsNotnullExpr
6317 init init_aasnotnullexpr
(
6318 n_expr
: nullable AExpr,
6319 n_kwas
: nullable TKwas,
6320 n_opar
: nullable TOpar,
6321 n_kwnot
: nullable TKwnot,
6322 n_kwnull
: nullable TKwnull,
6323 n_cpar
: nullable TCpar
6326 _n_expr
= n_expr
.as(not null)
6327 n_expr
.parent
= self
6328 _n_kwas
= n_kwas
.as(not null)
6329 n_kwas
.parent
= self
6331 if n_opar
!= null then n_opar
.parent
= self
6332 _n_kwnot
= n_kwnot
.as(not null)
6333 n_kwnot
.parent
= self
6334 _n_kwnull
= n_kwnull
.as(not null)
6335 n_kwnull
.parent
= self
6337 if n_cpar
!= null then n_cpar
.parent
= self
6340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6342 if _n_expr
== old_child
then
6343 n_expr
= new_child
.as(AExpr)
6346 if _n_kwas
== old_child
then
6347 n_kwas
= new_child
.as(TKwas)
6350 if _n_opar
== old_child
then
6351 n_opar
= new_child
.as(nullable TOpar)
6354 if _n_kwnot
== old_child
then
6355 n_kwnot
= new_child
.as(TKwnot)
6358 if _n_kwnull
== old_child
then
6359 n_kwnull
= new_child
.as(TKwnull)
6362 if _n_cpar
== old_child
then
6363 n_cpar
= new_child
.as(nullable TCpar)
6368 redef fun n_expr
=(node
)
6373 redef fun n_kwas
=(node
)
6378 redef fun n_opar
=(node
)
6381 if node
!= null then node
.parent
= self
6383 redef fun n_kwnot
=(node
)
6388 redef fun n_kwnull
=(node
)
6393 redef fun n_cpar
=(node
)
6396 if node
!= null then node
.parent
= self
6400 redef fun visit_all
(v
: Visitor)
6402 v
.enter_visit
(_n_expr
)
6403 v
.enter_visit
(_n_kwas
)
6404 v
.enter_visit
(_n_opar
)
6405 v
.enter_visit
(_n_kwnot
)
6406 v
.enter_visit
(_n_kwnull
)
6407 v
.enter_visit
(_n_cpar
)
6410 redef class AIssetAttrExpr
6411 init init_aissetattrexpr
(
6412 n_kwisset
: nullable TKwisset,
6413 n_expr
: nullable AExpr,
6414 n_id
: nullable TAttrid
6417 _n_kwisset
= n_kwisset
.as(not null)
6418 n_kwisset
.parent
= self
6419 _n_expr
= n_expr
.as(not null)
6420 n_expr
.parent
= self
6421 _n_id
= n_id
.as(not null)
6425 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6427 if _n_kwisset
== old_child
then
6428 n_kwisset
= new_child
.as(TKwisset)
6431 if _n_expr
== old_child
then
6432 n_expr
= new_child
.as(AExpr)
6435 if _n_id
== old_child
then
6436 n_id
= new_child
.as(TAttrid)
6441 redef fun n_kwisset
=(node
)
6446 redef fun n_expr
=(node
)
6451 redef fun n_id
=(node
)
6458 redef fun visit_all
(v
: Visitor)
6460 v
.enter_visit
(_n_kwisset
)
6461 v
.enter_visit
(_n_expr
)
6462 v
.enter_visit
(_n_id
)
6465 redef class ADebugTypeExpr
6466 init init_adebugtypeexpr
(
6467 n_kwdebug
: nullable TKwdebug,
6468 n_kwtype
: nullable TKwtype,
6469 n_expr
: nullable AExpr,
6470 n_type
: nullable AType
6473 _n_kwdebug
= n_kwdebug
.as(not null)
6474 n_kwdebug
.parent
= self
6475 _n_kwtype
= n_kwtype
.as(not null)
6476 n_kwtype
.parent
= self
6477 _n_expr
= n_expr
.as(not null)
6478 n_expr
.parent
= self
6479 _n_type
= n_type
.as(not null)
6480 n_type
.parent
= self
6483 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6485 if _n_kwdebug
== old_child
then
6486 n_kwdebug
= new_child
.as(TKwdebug)
6489 if _n_kwtype
== old_child
then
6490 n_kwtype
= new_child
.as(TKwtype)
6493 if _n_expr
== old_child
then
6494 n_expr
= new_child
.as(AExpr)
6497 if _n_type
== old_child
then
6498 n_type
= new_child
.as(AType)
6503 redef fun n_kwdebug
=(node
)
6508 redef fun n_kwtype
=(node
)
6513 redef fun n_expr
=(node
)
6518 redef fun n_type
=(node
)
6525 redef fun visit_all
(v
: Visitor)
6527 v
.enter_visit
(_n_kwdebug
)
6528 v
.enter_visit
(_n_kwtype
)
6529 v
.enter_visit
(_n_expr
)
6530 v
.enter_visit
(_n_type
)
6533 redef class AVarargExpr
6534 init init_avarargexpr
(
6535 n_expr
: nullable AExpr,
6536 n_dotdotdot
: nullable TDotdotdot
6539 _n_expr
= n_expr
.as(not null)
6540 n_expr
.parent
= self
6541 _n_dotdotdot
= n_dotdotdot
.as(not null)
6542 n_dotdotdot
.parent
= self
6545 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6547 if _n_expr
== old_child
then
6548 n_expr
= new_child
.as(AExpr)
6551 if _n_dotdotdot
== old_child
then
6552 n_dotdotdot
= new_child
.as(TDotdotdot)
6557 redef fun n_expr
=(node
)
6562 redef fun n_dotdotdot
=(node
)
6569 redef fun visit_all
(v
: Visitor)
6571 v
.enter_visit
(_n_expr
)
6572 v
.enter_visit
(_n_dotdotdot
)
6575 redef class ATypeExpr
6576 init init_atypeexpr
(
6577 n_type
: nullable AType
6580 _n_type
= n_type
.as(not null)
6581 n_type
.parent
= self
6584 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6586 if _n_type
== old_child
then
6587 n_type
= new_child
.as(AType)
6592 redef fun n_type
=(node
)
6599 redef fun visit_all
(v
: Visitor)
6601 v
.enter_visit
(_n_type
)
6604 redef class AMethidExpr
6605 init init_amethidexpr
(
6606 n_expr
: nullable AExpr,
6607 n_id
: nullable AMethid
6610 _n_expr
= n_expr
.as(not null)
6611 n_expr
.parent
= self
6612 _n_id
= n_id
.as(not null)
6616 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6618 if _n_expr
== old_child
then
6619 n_expr
= new_child
.as(AExpr)
6622 if _n_id
== old_child
then
6623 n_id
= new_child
.as(AMethid)
6628 redef fun n_expr
=(node
)
6633 redef fun n_id
=(node
)
6640 redef fun visit_all
(v
: Visitor)
6642 v
.enter_visit
(_n_expr
)
6643 v
.enter_visit
(_n_id
)
6648 n_annotations
: nullable AAnnotations
6651 _n_annotations
= n_annotations
.as(not null)
6652 n_annotations
.parent
= self
6655 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6657 if _n_annotations
== old_child
then
6658 n_annotations
= new_child
.as(AAnnotations)
6663 redef fun n_annotations
=(node
)
6665 _n_annotations
= node
6670 redef fun visit_all
(v
: Visitor)
6672 v
.enter_visit
(_n_annotations
)
6675 redef class AManyExpr
6676 init init_amanyexpr
(
6677 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6680 self.n_exprs
.unsafe_add_all
(n_exprs
)
6683 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6685 if n_exprs
.replace_child
(old_child
, new_child
) then return
6690 redef fun visit_all
(v
: Visitor)
6692 n_exprs
.visit_all
(v
)
6695 redef class AListExprs
6696 init init_alistexprs
(
6697 n_exprs
: Collection[Object] # Should be Collection[AExpr]
6700 self.n_exprs
.unsafe_add_all
(n_exprs
)
6703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6705 if n_exprs
.replace_child
(old_child
, new_child
) then return
6710 redef fun visit_all
(v
: Visitor)
6712 n_exprs
.visit_all
(v
)
6715 redef class AParExprs
6716 init init_aparexprs
(
6717 n_opar
: nullable TOpar,
6718 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6719 n_cpar
: nullable TCpar
6722 _n_opar
= n_opar
.as(not null)
6723 n_opar
.parent
= self
6724 self.n_exprs
.unsafe_add_all
(n_exprs
)
6725 _n_cpar
= n_cpar
.as(not null)
6726 n_cpar
.parent
= self
6729 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6731 if _n_opar
== old_child
then
6732 n_opar
= new_child
.as(TOpar)
6735 if n_exprs
.replace_child
(old_child
, new_child
) then return
6736 if _n_cpar
== old_child
then
6737 n_cpar
= new_child
.as(TCpar)
6742 redef fun n_opar
=(node
)
6747 redef fun n_cpar
=(node
)
6754 redef fun visit_all
(v
: Visitor)
6756 v
.enter_visit
(_n_opar
)
6757 n_exprs
.visit_all
(v
)
6758 v
.enter_visit
(_n_cpar
)
6761 redef class ABraExprs
6762 init init_abraexprs
(
6763 n_obra
: nullable TObra,
6764 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6765 n_cbra
: nullable TCbra
6768 _n_obra
= n_obra
.as(not null)
6769 n_obra
.parent
= self
6770 self.n_exprs
.unsafe_add_all
(n_exprs
)
6771 _n_cbra
= n_cbra
.as(not null)
6772 n_cbra
.parent
= self
6775 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6777 if _n_obra
== old_child
then
6778 n_obra
= new_child
.as(TObra)
6781 if n_exprs
.replace_child
(old_child
, new_child
) then return
6782 if _n_cbra
== old_child
then
6783 n_cbra
= new_child
.as(TCbra)
6788 redef fun n_obra
=(node
)
6793 redef fun n_cbra
=(node
)
6800 redef fun visit_all
(v
: Visitor)
6802 v
.enter_visit
(_n_obra
)
6803 n_exprs
.visit_all
(v
)
6804 v
.enter_visit
(_n_cbra
)
6807 redef class APlusAssignOp
6808 init init_aplusassignop
(
6809 n_op
: nullable TPluseq
6812 _n_op
= n_op
.as(not null)
6816 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6818 if _n_op
== old_child
then
6819 n_op
= new_child
.as(TPluseq)
6824 redef fun n_op
=(node
)
6831 redef fun visit_all
(v
: Visitor)
6833 v
.enter_visit
(_n_op
)
6836 redef class AMinusAssignOp
6837 init init_aminusassignop
(
6838 n_op
: nullable TMinuseq
6841 _n_op
= n_op
.as(not null)
6845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6847 if _n_op
== old_child
then
6848 n_op
= new_child
.as(TMinuseq)
6853 redef fun n_op
=(node
)
6860 redef fun visit_all
(v
: Visitor)
6862 v
.enter_visit
(_n_op
)
6865 redef class AStarAssignOp
6866 init init_astarassignop
(
6867 n_op
: nullable TStareq
6870 _n_op
= n_op
.as(not null)
6874 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6876 if _n_op
== old_child
then
6877 n_op
= new_child
.as(TStareq)
6882 redef fun n_op
=(node
)
6889 redef fun visit_all
(v
: Visitor)
6891 v
.enter_visit
(_n_op
)
6894 redef class ASlashAssignOp
6895 init init_aslashassignop
(
6896 n_op
: nullable TSlasheq
6899 _n_op
= n_op
.as(not null)
6903 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6905 if _n_op
== old_child
then
6906 n_op
= new_child
.as(TSlasheq)
6911 redef fun n_op
=(node
)
6918 redef fun visit_all
(v
: Visitor)
6920 v
.enter_visit
(_n_op
)
6923 redef class APercentAssignOp
6924 init init_apercentassignop
(
6925 n_op
: nullable TPercenteq
6928 _n_op
= n_op
.as(not null)
6932 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6934 if _n_op
== old_child
then
6935 n_op
= new_child
.as(TPercenteq)
6940 redef fun n_op
=(node
)
6947 redef fun visit_all
(v
: Visitor)
6949 v
.enter_visit
(_n_op
)
6952 redef class AStarstarAssignOp
6953 init init_astarstarassignop
(
6954 n_op
: nullable TStarstareq
6957 _n_op
= n_op
.as(not null)
6961 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6963 if _n_op
== old_child
then
6964 n_op
= new_child
.as(TStarstareq)
6969 redef fun n_op
=(node
)
6976 redef fun visit_all
(v
: Visitor)
6978 v
.enter_visit
(_n_op
)
6981 redef class ALlAssignOp
6982 init init_allassignop
(
6983 n_op
: nullable TLleq
6986 _n_op
= n_op
.as(not null)
6990 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6992 if _n_op
== old_child
then
6993 n_op
= new_child
.as(TLleq)
6998 redef fun n_op
=(node
)
7005 redef fun visit_all
(v
: Visitor)
7007 v
.enter_visit
(_n_op
)
7010 redef class AGgAssignOp
7011 init init_aggassignop
(
7012 n_op
: nullable TGgeq
7015 _n_op
= n_op
.as(not null)
7019 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7021 if _n_op
== old_child
then
7022 n_op
= new_child
.as(TGgeq)
7027 redef fun n_op
=(node
)
7034 redef fun visit_all
(v
: Visitor)
7036 v
.enter_visit
(_n_op
)
7039 redef class AModuleName
7040 init init_amodulename
(
7041 n_quad
: nullable TQuad,
7042 n_path
: Collection[Object], # Should be Collection[TId]
7047 if n_quad
!= null then n_quad
.parent
= self
7048 self.n_path
.unsafe_add_all
(n_path
)
7049 _n_id
= n_id
.as(not null)
7053 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7055 if _n_quad
== old_child
then
7056 n_quad
= new_child
.as(nullable TQuad)
7059 if n_path
.replace_child
(old_child
, new_child
) then return
7060 if _n_id
== old_child
then
7061 n_id
= new_child
.as(TId)
7066 redef fun n_quad
=(node
)
7069 if node
!= null then node
.parent
= self
7071 redef fun n_id
=(node
)
7078 redef fun visit_all
(v
: Visitor)
7080 v
.enter_visit
(_n_quad
)
7082 v
.enter_visit
(_n_id
)
7085 redef class AExternCalls
7086 init init_aexterncalls
(
7087 n_kwimport
: nullable TKwimport,
7088 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7091 _n_kwimport
= n_kwimport
.as(not null)
7092 n_kwimport
.parent
= self
7093 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7096 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7098 if _n_kwimport
== old_child
then
7099 n_kwimport
= new_child
.as(TKwimport)
7102 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7105 redef fun n_kwimport
=(node
)
7112 redef fun visit_all
(v
: Visitor)
7114 v
.enter_visit
(_n_kwimport
)
7115 n_extern_calls
.visit_all
(v
)
7118 redef class AExternCall
7119 init init_aexterncall
7123 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7129 redef fun visit_all
(v
: Visitor)
7133 redef class ASuperExternCall
7134 init init_asuperexterncall
(
7135 n_kwsuper
: nullable TKwsuper
7138 _n_kwsuper
= n_kwsuper
.as(not null)
7139 n_kwsuper
.parent
= self
7142 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7144 if _n_kwsuper
== old_child
then
7145 n_kwsuper
= new_child
.as(TKwsuper)
7150 redef fun n_kwsuper
=(node
)
7157 redef fun visit_all
(v
: Visitor)
7159 v
.enter_visit
(_n_kwsuper
)
7162 redef class ALocalPropExternCall
7163 init init_alocalpropexterncall
(
7164 n_methid
: nullable AMethid
7167 _n_methid
= n_methid
.as(not null)
7168 n_methid
.parent
= self
7171 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7173 if _n_methid
== old_child
then
7174 n_methid
= new_child
.as(AMethid)
7179 redef fun n_methid
=(node
)
7186 redef fun visit_all
(v
: Visitor)
7188 v
.enter_visit
(_n_methid
)
7191 redef class AFullPropExternCall
7192 init init_afullpropexterncall
(
7193 n_type
: nullable AType,
7194 n_dot
: nullable TDot,
7195 n_methid
: nullable AMethid
7198 _n_type
= n_type
.as(not null)
7199 n_type
.parent
= self
7201 if n_dot
!= null then n_dot
.parent
= self
7202 _n_methid
= n_methid
.as(not null)
7203 n_methid
.parent
= self
7206 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7208 if _n_type
== old_child
then
7209 n_type
= new_child
.as(AType)
7212 if _n_dot
== old_child
then
7213 n_dot
= new_child
.as(nullable TDot)
7216 if _n_methid
== old_child
then
7217 n_methid
= new_child
.as(AMethid)
7222 redef fun n_type
=(node
)
7227 redef fun n_dot
=(node
)
7230 if node
!= null then node
.parent
= self
7232 redef fun n_methid
=(node
)
7239 redef fun visit_all
(v
: Visitor)
7241 v
.enter_visit
(_n_type
)
7242 v
.enter_visit
(_n_dot
)
7243 v
.enter_visit
(_n_methid
)
7246 redef class AInitPropExternCall
7247 init init_ainitpropexterncall
(
7248 n_type
: nullable AType
7251 _n_type
= n_type
.as(not null)
7252 n_type
.parent
= self
7255 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7257 if _n_type
== old_child
then
7258 n_type
= new_child
.as(AType)
7263 redef fun n_type
=(node
)
7270 redef fun visit_all
(v
: Visitor)
7272 v
.enter_visit
(_n_type
)
7275 redef class ACastAsExternCall
7276 init init_acastasexterncall
(
7277 n_from_type
: nullable AType,
7278 n_dot
: nullable TDot,
7279 n_kwas
: nullable TKwas,
7280 n_to_type
: nullable AType
7283 _n_from_type
= n_from_type
.as(not null)
7284 n_from_type
.parent
= self
7286 if n_dot
!= null then n_dot
.parent
= self
7287 _n_kwas
= n_kwas
.as(not null)
7288 n_kwas
.parent
= self
7289 _n_to_type
= n_to_type
.as(not null)
7290 n_to_type
.parent
= self
7293 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7295 if _n_from_type
== old_child
then
7296 n_from_type
= new_child
.as(AType)
7299 if _n_dot
== old_child
then
7300 n_dot
= new_child
.as(nullable TDot)
7303 if _n_kwas
== old_child
then
7304 n_kwas
= new_child
.as(TKwas)
7307 if _n_to_type
== old_child
then
7308 n_to_type
= new_child
.as(AType)
7313 redef fun n_from_type
=(node
)
7318 redef fun n_dot
=(node
)
7321 if node
!= null then node
.parent
= self
7323 redef fun n_kwas
=(node
)
7328 redef fun n_to_type
=(node
)
7335 redef fun visit_all
(v
: Visitor)
7337 v
.enter_visit
(_n_from_type
)
7338 v
.enter_visit
(_n_dot
)
7339 v
.enter_visit
(_n_kwas
)
7340 v
.enter_visit
(_n_to_type
)
7343 redef class AAsNullableExternCall
7344 init init_aasnullableexterncall
(
7345 n_type
: nullable AType,
7346 n_kwas
: nullable TKwas,
7347 n_kwnullable
: nullable TKwnullable
7350 _n_type
= n_type
.as(not null)
7351 n_type
.parent
= self
7352 _n_kwas
= n_kwas
.as(not null)
7353 n_kwas
.parent
= self
7354 _n_kwnullable
= n_kwnullable
.as(not null)
7355 n_kwnullable
.parent
= self
7358 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7360 if _n_type
== old_child
then
7361 n_type
= new_child
.as(AType)
7364 if _n_kwas
== old_child
then
7365 n_kwas
= new_child
.as(TKwas)
7368 if _n_kwnullable
== old_child
then
7369 n_kwnullable
= new_child
.as(TKwnullable)
7374 redef fun n_type
=(node
)
7379 redef fun n_kwas
=(node
)
7384 redef fun n_kwnullable
=(node
)
7386 _n_kwnullable
= node
7391 redef fun visit_all
(v
: Visitor)
7393 v
.enter_visit
(_n_type
)
7394 v
.enter_visit
(_n_kwas
)
7395 v
.enter_visit
(_n_kwnullable
)
7398 redef class AAsNotNullableExternCall
7399 init init_aasnotnullableexterncall
(
7400 n_type
: nullable AType,
7401 n_kwas
: nullable TKwas,
7402 n_kwnot
: nullable TKwnot,
7403 n_kwnullable
: nullable TKwnullable
7406 _n_type
= n_type
.as(not null)
7407 n_type
.parent
= self
7408 _n_kwas
= n_kwas
.as(not null)
7409 n_kwas
.parent
= self
7410 _n_kwnot
= n_kwnot
.as(not null)
7411 n_kwnot
.parent
= self
7412 _n_kwnullable
= n_kwnullable
.as(not null)
7413 n_kwnullable
.parent
= self
7416 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7418 if _n_type
== old_child
then
7419 n_type
= new_child
.as(AType)
7422 if _n_kwas
== old_child
then
7423 n_kwas
= new_child
.as(TKwas)
7426 if _n_kwnot
== old_child
then
7427 n_kwnot
= new_child
.as(TKwnot)
7430 if _n_kwnullable
== old_child
then
7431 n_kwnullable
= new_child
.as(TKwnullable)
7436 redef fun n_type
=(node
)
7441 redef fun n_kwas
=(node
)
7446 redef fun n_kwnot
=(node
)
7451 redef fun n_kwnullable
=(node
)
7453 _n_kwnullable
= node
7458 redef fun visit_all
(v
: Visitor)
7460 v
.enter_visit
(_n_type
)
7461 v
.enter_visit
(_n_kwas
)
7462 v
.enter_visit
(_n_kwnot
)
7463 v
.enter_visit
(_n_kwnullable
)
7466 redef class AInLanguage
7467 init init_ainlanguage
(
7468 n_kwin
: nullable TKwin,
7469 n_string
: nullable TString
7472 _n_kwin
= n_kwin
.as(not null)
7473 n_kwin
.parent
= self
7474 _n_string
= n_string
.as(not null)
7475 n_string
.parent
= self
7478 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7480 if _n_kwin
== old_child
then
7481 n_kwin
= new_child
.as(TKwin)
7484 if _n_string
== old_child
then
7485 n_string
= new_child
.as(TString)
7490 redef fun n_kwin
=(node
)
7495 redef fun n_string
=(node
)
7502 redef fun visit_all
(v
: Visitor)
7504 v
.enter_visit
(_n_kwin
)
7505 v
.enter_visit
(_n_string
)
7508 redef class AExternCodeBlock
7509 init init_aexterncodeblock
(
7510 n_in_language
: nullable AInLanguage,
7511 n_extern_code_segment
: nullable TExternCodeSegment
7514 _n_in_language
= n_in_language
7515 if n_in_language
!= null then n_in_language
.parent
= self
7516 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
7517 n_extern_code_segment
.parent
= self
7520 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7522 if _n_in_language
== old_child
then
7523 n_in_language
= new_child
.as(nullable AInLanguage)
7526 if _n_extern_code_segment
== old_child
then
7527 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
7532 redef fun n_in_language
=(node
)
7534 _n_in_language
= node
7535 if node
!= null then node
.parent
= self
7537 redef fun n_extern_code_segment
=(node
)
7539 _n_extern_code_segment
= node
7544 redef fun visit_all
(v
: Visitor)
7546 v
.enter_visit
(_n_in_language
)
7547 v
.enter_visit
(_n_extern_code_segment
)
7550 redef class AQualified
7551 init init_aqualified
(
7552 n_id
: Collection[Object], # Should be Collection[TId]
7553 n_classid
: nullable TClassid
7556 self.n_id
.unsafe_add_all
(n_id
)
7557 _n_classid
= n_classid
7558 if n_classid
!= null then n_classid
.parent
= self
7561 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7563 if n_id
.replace_child
(old_child
, new_child
) then return
7564 if _n_classid
== old_child
then
7565 n_classid
= new_child
.as(nullable TClassid)
7570 redef fun n_classid
=(node
)
7573 if node
!= null then node
.parent
= self
7577 redef fun visit_all
(v
: Visitor)
7580 v
.enter_visit
(_n_classid
)
7585 n_comment
: Collection[Object] # Should be Collection[TComment]
7588 self.n_comment
.unsafe_add_all
(n_comment
)
7591 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7593 if n_comment
.replace_child
(old_child
, new_child
) then return
7598 redef fun visit_all
(v
: Visitor)
7600 n_comment
.visit_all
(v
)
7603 redef class AAnnotations
7604 init init_aannotations
(
7606 n_opar
: nullable TOpar,
7607 n_items
: Collection[Object], # Should be Collection[AAnnotation]
7608 n_cpar
: nullable TCpar
7612 if n_at
!= null then n_at
.parent
= self
7614 if n_opar
!= null then n_opar
.parent
= self
7615 self.n_items
.unsafe_add_all
(n_items
)
7617 if n_cpar
!= null then n_cpar
.parent
= self
7620 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7622 if _n_at
== old_child
then
7623 n_at
= new_child
.as(nullable TAt)
7626 if _n_opar
== old_child
then
7627 n_opar
= new_child
.as(nullable TOpar)
7630 if n_items
.replace_child
(old_child
, new_child
) then return
7631 if _n_cpar
== old_child
then
7632 n_cpar
= new_child
.as(nullable TCpar)
7637 redef fun n_at
=(node
)
7640 if node
!= null then node
.parent
= self
7642 redef fun n_opar
=(node
)
7645 if node
!= null then node
.parent
= self
7647 redef fun n_cpar
=(node
)
7650 if node
!= null then node
.parent
= self
7654 redef fun visit_all
(v
: Visitor)
7656 v
.enter_visit
(_n_at
)
7657 v
.enter_visit
(_n_opar
)
7658 n_items
.visit_all
(v
)
7659 v
.enter_visit
(_n_cpar
)
7662 redef class AAnnotation
7663 init init_aannotation
(
7664 n_doc
: nullable ADoc,
7665 n_kwredef
: nullable TKwredef,
7666 n_visibility
: nullable AVisibility,
7667 n_atid
: nullable AAtid,
7668 n_opar
: nullable TOpar,
7669 n_args
: Collection[Object], # Should be Collection[AExpr]
7670 n_cpar
: nullable TCpar,
7671 n_annotations
: nullable AAnnotations
7675 if n_doc
!= null then n_doc
.parent
= self
7676 _n_kwredef
= n_kwredef
7677 if n_kwredef
!= null then n_kwredef
.parent
= self
7678 _n_visibility
= n_visibility
7679 if n_visibility
!= null then n_visibility
.parent
= self
7680 _n_atid
= n_atid
.as(not null)
7681 n_atid
.parent
= self
7683 if n_opar
!= null then n_opar
.parent
= self
7684 self.n_args
.unsafe_add_all
(n_args
)
7686 if n_cpar
!= null then n_cpar
.parent
= self
7687 _n_annotations
= n_annotations
7688 if n_annotations
!= null then n_annotations
.parent
= self
7691 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7693 if _n_doc
== old_child
then
7694 n_doc
= new_child
.as(nullable ADoc)
7697 if _n_kwredef
== old_child
then
7698 n_kwredef
= new_child
.as(nullable TKwredef)
7701 if _n_visibility
== old_child
then
7702 n_visibility
= new_child
.as(nullable AVisibility)
7705 if _n_atid
== old_child
then
7706 n_atid
= new_child
.as(AAtid)
7709 if _n_opar
== old_child
then
7710 n_opar
= new_child
.as(nullable TOpar)
7713 if n_args
.replace_child
(old_child
, new_child
) then return
7714 if _n_cpar
== old_child
then
7715 n_cpar
= new_child
.as(nullable TCpar)
7718 if _n_annotations
== old_child
then
7719 n_annotations
= new_child
.as(nullable AAnnotations)
7724 redef fun n_doc
=(node
)
7727 if node
!= null then node
.parent
= self
7729 redef fun n_kwredef
=(node
)
7732 if node
!= null then node
.parent
= self
7734 redef fun n_visibility
=(node
)
7736 _n_visibility
= node
7737 if node
!= null then node
.parent
= self
7739 redef fun n_atid
=(node
)
7744 redef fun n_opar
=(node
)
7747 if node
!= null then node
.parent
= self
7749 redef fun n_cpar
=(node
)
7752 if node
!= null then node
.parent
= self
7754 redef fun n_annotations
=(node
)
7756 _n_annotations
= node
7757 if node
!= null then node
.parent
= self
7761 redef fun visit_all
(v
: Visitor)
7763 v
.enter_visit
(_n_doc
)
7764 v
.enter_visit
(_n_kwredef
)
7765 v
.enter_visit
(_n_visibility
)
7766 v
.enter_visit
(_n_atid
)
7767 v
.enter_visit
(_n_opar
)
7769 v
.enter_visit
(_n_cpar
)
7770 v
.enter_visit
(_n_annotations
)
7778 _n_id
= n_id
.as(not null)
7782 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7784 if _n_id
== old_child
then
7785 n_id
= new_child
.as(TId)
7790 redef fun n_id
=(node
)
7797 redef fun visit_all
(v
: Visitor)
7799 v
.enter_visit
(_n_id
)
7802 redef class AKwexternAtid
7803 init init_akwexternatid
(
7804 n_id
: nullable TKwextern
7807 _n_id
= n_id
.as(not null)
7811 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7813 if _n_id
== old_child
then
7814 n_id
= new_child
.as(TKwextern)
7819 redef fun n_id
=(node
)
7826 redef fun visit_all
(v
: Visitor)
7828 v
.enter_visit
(_n_id
)
7831 redef class AKwabstractAtid
7832 init init_akwabstractatid
(
7833 n_id
: nullable TKwabstract
7836 _n_id
= n_id
.as(not null)
7840 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7842 if _n_id
== old_child
then
7843 n_id
= new_child
.as(TKwabstract)
7848 redef fun n_id
=(node
)
7855 redef fun visit_all
(v
: Visitor)
7857 v
.enter_visit
(_n_id
)
7860 redef class AKwimportAtid
7861 init init_akwimportatid
(
7862 n_id
: nullable TKwimport
7865 _n_id
= n_id
.as(not null)
7869 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7871 if _n_id
== old_child
then
7872 n_id
= new_child
.as(TKwimport)
7877 redef fun n_id
=(node
)
7884 redef fun visit_all
(v
: Visitor)
7886 v
.enter_visit
(_n_id
)
7891 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7893 if _n_base
== old_child
then
7894 if new_child
== null then
7896 new_child
.parent
= self
7897 assert new_child
isa AModule
7900 old_child
.parent
= null
7905 redef fun visit_all
(v
: Visitor)
7907 if _n_base
!= null then
7908 v
.enter_visit
(_n_base
.as(not null))
7910 v
.enter_visit
(_n_eof
)