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_op
: nullable TPlus
1457 _n_op
= n_op
.as(not null)
1461 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1463 if _n_op
== old_child
then
1464 n_op
= new_child
.as(TPlus)
1469 redef fun n_op
=(node
)
1476 redef fun visit_all
(v
: Visitor)
1478 v
.enter_visit
(_n_op
)
1481 redef class AMinusMethid
1482 init init_aminusmethid
(
1483 n_op
: nullable TMinus
1486 _n_op
= n_op
.as(not null)
1490 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1492 if _n_op
== old_child
then
1493 n_op
= new_child
.as(TMinus)
1498 redef fun n_op
=(node
)
1505 redef fun visit_all
(v
: Visitor)
1507 v
.enter_visit
(_n_op
)
1510 redef class AStarMethid
1511 init init_astarmethid
(
1512 n_op
: nullable TStar
1515 _n_op
= n_op
.as(not null)
1519 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1521 if _n_op
== old_child
then
1522 n_op
= new_child
.as(TStar)
1527 redef fun n_op
=(node
)
1534 redef fun visit_all
(v
: Visitor)
1536 v
.enter_visit
(_n_op
)
1539 redef class AStarstarMethid
1540 init init_astarstarmethid
(
1541 n_op
: nullable TStarstar
1544 _n_op
= n_op
.as(not null)
1548 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1550 if _n_op
== old_child
then
1551 n_op
= new_child
.as(TStarstar)
1556 redef fun n_op
=(node
)
1563 redef fun visit_all
(v
: Visitor)
1565 v
.enter_visit
(_n_op
)
1568 redef class ASlashMethid
1569 init init_aslashmethid
(
1570 n_op
: nullable TSlash
1573 _n_op
= n_op
.as(not null)
1577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1579 if _n_op
== old_child
then
1580 n_op
= new_child
.as(TSlash)
1585 redef fun n_op
=(node
)
1592 redef fun visit_all
(v
: Visitor)
1594 v
.enter_visit
(_n_op
)
1597 redef class APercentMethid
1598 init init_apercentmethid
(
1599 n_op
: nullable TPercent
1602 _n_op
= n_op
.as(not null)
1606 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1608 if _n_op
== old_child
then
1609 n_op
= new_child
.as(TPercent)
1614 redef fun n_op
=(node
)
1621 redef fun visit_all
(v
: Visitor)
1623 v
.enter_visit
(_n_op
)
1626 redef class AEqMethid
1627 init init_aeqmethid
(
1631 _n_op
= n_op
.as(not null)
1635 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1637 if _n_op
== old_child
then
1638 n_op
= new_child
.as(TEq)
1643 redef fun n_op
=(node
)
1650 redef fun visit_all
(v
: Visitor)
1652 v
.enter_visit
(_n_op
)
1655 redef class ANeMethid
1656 init init_anemethid
(
1660 _n_op
= n_op
.as(not null)
1664 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1666 if _n_op
== old_child
then
1667 n_op
= new_child
.as(TNe)
1672 redef fun n_op
=(node
)
1679 redef fun visit_all
(v
: Visitor)
1681 v
.enter_visit
(_n_op
)
1684 redef class ALeMethid
1685 init init_alemethid
(
1689 _n_op
= n_op
.as(not null)
1693 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1695 if _n_op
== old_child
then
1696 n_op
= new_child
.as(TLe)
1701 redef fun n_op
=(node
)
1708 redef fun visit_all
(v
: Visitor)
1710 v
.enter_visit
(_n_op
)
1713 redef class AGeMethid
1714 init init_agemethid
(
1718 _n_op
= n_op
.as(not null)
1722 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1724 if _n_op
== old_child
then
1725 n_op
= new_child
.as(TGe)
1730 redef fun n_op
=(node
)
1737 redef fun visit_all
(v
: Visitor)
1739 v
.enter_visit
(_n_op
)
1742 redef class ALtMethid
1743 init init_altmethid
(
1747 _n_op
= n_op
.as(not null)
1751 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1753 if _n_op
== old_child
then
1754 n_op
= new_child
.as(TLt)
1759 redef fun n_op
=(node
)
1766 redef fun visit_all
(v
: Visitor)
1768 v
.enter_visit
(_n_op
)
1771 redef class AGtMethid
1772 init init_agtmethid
(
1776 _n_op
= n_op
.as(not null)
1780 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1782 if _n_op
== old_child
then
1783 n_op
= new_child
.as(TGt)
1788 redef fun n_op
=(node
)
1795 redef fun visit_all
(v
: Visitor)
1797 v
.enter_visit
(_n_op
)
1800 redef class ALlMethid
1801 init init_allmethid
(
1805 _n_op
= n_op
.as(not null)
1809 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1811 if _n_op
== old_child
then
1812 n_op
= new_child
.as(TLl)
1817 redef fun n_op
=(node
)
1824 redef fun visit_all
(v
: Visitor)
1826 v
.enter_visit
(_n_op
)
1829 redef class AGgMethid
1830 init init_aggmethid
(
1834 _n_op
= n_op
.as(not null)
1838 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1840 if _n_op
== old_child
then
1841 n_op
= new_child
.as(TGg)
1846 redef fun n_op
=(node
)
1853 redef fun visit_all
(v
: Visitor)
1855 v
.enter_visit
(_n_op
)
1858 redef class AStarshipMethid
1859 init init_astarshipmethid
(
1860 n_op
: nullable TStarship
1863 _n_op
= n_op
.as(not null)
1867 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1869 if _n_op
== old_child
then
1870 n_op
= new_child
.as(TStarship)
1875 redef fun n_op
=(node
)
1882 redef fun visit_all
(v
: Visitor)
1884 v
.enter_visit
(_n_op
)
1887 redef class APipeMethid
1888 init init_apipemethid
(
1889 n_op
: nullable TPipe
1892 _n_op
= n_op
.as(not null)
1896 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1898 if _n_op
== old_child
then
1899 n_op
= new_child
.as(TPipe)
1904 redef fun n_op
=(node
)
1911 redef fun visit_all
(v
: Visitor)
1913 v
.enter_visit
(_n_op
)
1916 redef class ACaretMethid
1917 init init_acaretmethid
(
1918 n_op
: nullable TCaret
1921 _n_op
= n_op
.as(not null)
1925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1927 if _n_op
== old_child
then
1928 n_op
= new_child
.as(TCaret)
1933 redef fun n_op
=(node
)
1940 redef fun visit_all
(v
: Visitor)
1942 v
.enter_visit
(_n_op
)
1945 redef class AAmpMethid
1946 init init_aampmethid
(
1950 _n_op
= n_op
.as(not null)
1954 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1956 if _n_op
== old_child
then
1957 n_op
= new_child
.as(TAmp)
1962 redef fun n_op
=(node
)
1969 redef fun visit_all
(v
: Visitor)
1971 v
.enter_visit
(_n_op
)
1974 redef class ATildeMethid
1975 init init_atildemethid
(
1976 n_op
: nullable TTilde
1979 _n_op
= n_op
.as(not null)
1983 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
1985 if _n_op
== old_child
then
1986 n_op
= new_child
.as(TTilde)
1991 redef fun n_op
=(node
)
1998 redef fun visit_all
(v
: Visitor)
2000 v
.enter_visit
(_n_op
)
2003 redef class ABraMethid
2004 init init_abramethid
(
2005 n_obra
: nullable TObra,
2006 n_cbra
: nullable TCbra
2009 _n_obra
= n_obra
.as(not null)
2010 n_obra
.parent
= self
2011 _n_cbra
= n_cbra
.as(not null)
2012 n_cbra
.parent
= self
2015 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2017 if _n_obra
== old_child
then
2018 n_obra
= new_child
.as(TObra)
2021 if _n_cbra
== old_child
then
2022 n_cbra
= new_child
.as(TCbra)
2027 redef fun n_obra
=(node
)
2032 redef fun n_cbra
=(node
)
2039 redef fun visit_all
(v
: Visitor)
2041 v
.enter_visit
(_n_obra
)
2042 v
.enter_visit
(_n_cbra
)
2045 redef class AAssignMethid
2046 init init_aassignmethid
(
2048 n_assign
: nullable TAssign
2051 _n_id
= n_id
.as(not null)
2053 _n_assign
= n_assign
.as(not null)
2054 n_assign
.parent
= self
2057 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2059 if _n_id
== old_child
then
2060 n_id
= new_child
.as(TId)
2063 if _n_assign
== old_child
then
2064 n_assign
= new_child
.as(TAssign)
2069 redef fun n_id
=(node
)
2074 redef fun n_assign
=(node
)
2081 redef fun visit_all
(v
: Visitor)
2083 v
.enter_visit
(_n_id
)
2084 v
.enter_visit
(_n_assign
)
2087 redef class ABraassignMethid
2088 init init_abraassignmethid
(
2089 n_obra
: nullable TObra,
2090 n_cbra
: nullable TCbra,
2091 n_assign
: nullable TAssign
2094 _n_obra
= n_obra
.as(not null)
2095 n_obra
.parent
= self
2096 _n_cbra
= n_cbra
.as(not null)
2097 n_cbra
.parent
= self
2098 _n_assign
= n_assign
.as(not null)
2099 n_assign
.parent
= self
2102 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2104 if _n_obra
== old_child
then
2105 n_obra
= new_child
.as(TObra)
2108 if _n_cbra
== old_child
then
2109 n_cbra
= new_child
.as(TCbra)
2112 if _n_assign
== old_child
then
2113 n_assign
= new_child
.as(TAssign)
2118 redef fun n_obra
=(node
)
2123 redef fun n_cbra
=(node
)
2128 redef fun n_assign
=(node
)
2135 redef fun visit_all
(v
: Visitor)
2137 v
.enter_visit
(_n_obra
)
2138 v
.enter_visit
(_n_cbra
)
2139 v
.enter_visit
(_n_assign
)
2142 redef class ASignature
2143 init init_asignature
(
2144 n_opar
: nullable TOpar,
2145 n_params
: Collection[Object], # Should be Collection[AParam]
2146 n_cpar
: nullable TCpar,
2147 n_type
: nullable AType
2151 if n_opar
!= null then n_opar
.parent
= self
2152 self.n_params
.unsafe_add_all
(n_params
)
2154 if n_cpar
!= null then n_cpar
.parent
= self
2156 if n_type
!= null then n_type
.parent
= self
2159 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2161 if _n_opar
== old_child
then
2162 n_opar
= new_child
.as(nullable TOpar)
2165 if n_params
.replace_child
(old_child
, new_child
) then return
2166 if _n_cpar
== old_child
then
2167 n_cpar
= new_child
.as(nullable TCpar)
2170 if _n_type
== old_child
then
2171 n_type
= new_child
.as(nullable AType)
2176 redef fun n_opar
=(node
)
2179 if node
!= null then node
.parent
= self
2181 redef fun n_cpar
=(node
)
2184 if node
!= null then node
.parent
= self
2186 redef fun n_type
=(node
)
2189 if node
!= null then node
.parent
= self
2193 redef fun visit_all
(v
: Visitor)
2195 v
.enter_visit
(_n_opar
)
2196 n_params
.visit_all
(v
)
2197 v
.enter_visit
(_n_cpar
)
2198 v
.enter_visit
(_n_type
)
2204 n_type
: nullable AType,
2205 n_dotdotdot
: nullable TDotdotdot,
2206 n_annotations
: nullable AAnnotations
2209 _n_id
= n_id
.as(not null)
2212 if n_type
!= null then n_type
.parent
= self
2213 _n_dotdotdot
= n_dotdotdot
2214 if n_dotdotdot
!= null then n_dotdotdot
.parent
= self
2215 _n_annotations
= n_annotations
2216 if n_annotations
!= null then n_annotations
.parent
= self
2219 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2221 if _n_id
== old_child
then
2222 n_id
= new_child
.as(TId)
2225 if _n_type
== old_child
then
2226 n_type
= new_child
.as(nullable AType)
2229 if _n_dotdotdot
== old_child
then
2230 n_dotdotdot
= new_child
.as(nullable TDotdotdot)
2233 if _n_annotations
== old_child
then
2234 n_annotations
= new_child
.as(nullable AAnnotations)
2239 redef fun n_id
=(node
)
2244 redef fun n_type
=(node
)
2247 if node
!= null then node
.parent
= self
2249 redef fun n_dotdotdot
=(node
)
2252 if node
!= null then node
.parent
= self
2254 redef fun n_annotations
=(node
)
2256 _n_annotations
= node
2257 if node
!= null then node
.parent
= self
2261 redef fun visit_all
(v
: Visitor)
2263 v
.enter_visit
(_n_id
)
2264 v
.enter_visit
(_n_type
)
2265 v
.enter_visit
(_n_dotdotdot
)
2266 v
.enter_visit
(_n_annotations
)
2271 n_kwnullable
: nullable TKwnullable,
2272 n_id
: nullable TClassid,
2273 n_types
: Collection[Object], # Should be Collection[AType]
2274 n_annotations
: nullable AAnnotations
2277 _n_kwnullable
= n_kwnullable
2278 if n_kwnullable
!= null then n_kwnullable
.parent
= self
2279 _n_id
= n_id
.as(not null)
2281 self.n_types
.unsafe_add_all
(n_types
)
2282 _n_annotations
= n_annotations
2283 if n_annotations
!= null then n_annotations
.parent
= self
2286 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2288 if _n_kwnullable
== old_child
then
2289 n_kwnullable
= new_child
.as(nullable TKwnullable)
2292 if _n_id
== old_child
then
2293 n_id
= new_child
.as(TClassid)
2296 if n_types
.replace_child
(old_child
, new_child
) then return
2297 if _n_annotations
== old_child
then
2298 n_annotations
= new_child
.as(nullable AAnnotations)
2303 redef fun n_kwnullable
=(node
)
2305 _n_kwnullable
= node
2306 if node
!= null then node
.parent
= self
2308 redef fun n_id
=(node
)
2313 redef fun n_annotations
=(node
)
2315 _n_annotations
= node
2316 if node
!= null then node
.parent
= self
2320 redef fun visit_all
(v
: Visitor)
2322 v
.enter_visit
(_n_kwnullable
)
2323 v
.enter_visit
(_n_id
)
2324 n_types
.visit_all
(v
)
2325 v
.enter_visit
(_n_annotations
)
2330 n_kwlabel
: nullable TKwlabel,
2334 _n_kwlabel
= n_kwlabel
.as(not null)
2335 n_kwlabel
.parent
= self
2337 if n_id
!= null then n_id
.parent
= self
2340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2342 if _n_kwlabel
== old_child
then
2343 n_kwlabel
= new_child
.as(TKwlabel)
2346 if _n_id
== old_child
then
2347 n_id
= new_child
.as(nullable TId)
2352 redef fun n_kwlabel
=(node
)
2357 redef fun n_id
=(node
)
2360 if node
!= null then node
.parent
= self
2364 redef fun visit_all
(v
: Visitor)
2366 v
.enter_visit
(_n_kwlabel
)
2367 v
.enter_visit
(_n_id
)
2370 redef class ABlockExpr
2371 init init_ablockexpr
(
2372 n_expr
: Collection[Object], # Should be Collection[AExpr]
2373 n_kwend
: nullable TKwend
2376 self.n_expr
.unsafe_add_all
(n_expr
)
2378 if n_kwend
!= null then n_kwend
.parent
= self
2381 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2383 if n_expr
.replace_child
(old_child
, new_child
) then return
2384 if _n_kwend
== old_child
then
2385 n_kwend
= new_child
.as(nullable TKwend)
2390 redef fun n_kwend
=(node
)
2393 if node
!= null then node
.parent
= self
2397 redef fun visit_all
(v
: Visitor)
2400 v
.enter_visit
(_n_kwend
)
2403 redef class AVardeclExpr
2404 init init_avardeclexpr
(
2405 n_kwvar
: nullable TKwvar,
2407 n_type
: nullable AType,
2408 n_assign
: nullable TAssign,
2409 n_expr
: nullable AExpr,
2410 n_annotations
: nullable AAnnotations
2414 if n_kwvar
!= null then n_kwvar
.parent
= self
2415 _n_id
= n_id
.as(not null)
2418 if n_type
!= null then n_type
.parent
= self
2419 _n_assign
= n_assign
2420 if n_assign
!= null then n_assign
.parent
= self
2422 if n_expr
!= null then n_expr
.parent
= self
2423 _n_annotations
= n_annotations
2424 if n_annotations
!= null then n_annotations
.parent
= self
2427 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2429 if _n_kwvar
== old_child
then
2430 n_kwvar
= new_child
.as(nullable TKwvar)
2433 if _n_id
== old_child
then
2434 n_id
= new_child
.as(TId)
2437 if _n_type
== old_child
then
2438 n_type
= new_child
.as(nullable AType)
2441 if _n_assign
== old_child
then
2442 n_assign
= new_child
.as(nullable TAssign)
2445 if _n_expr
== old_child
then
2446 n_expr
= new_child
.as(nullable AExpr)
2449 if _n_annotations
== old_child
then
2450 n_annotations
= new_child
.as(nullable AAnnotations)
2455 redef fun n_kwvar
=(node
)
2458 if node
!= null then node
.parent
= self
2460 redef fun n_id
=(node
)
2465 redef fun n_type
=(node
)
2468 if node
!= null then node
.parent
= self
2470 redef fun n_assign
=(node
)
2473 if node
!= null then node
.parent
= self
2475 redef fun n_expr
=(node
)
2478 if node
!= null then node
.parent
= self
2480 redef fun n_annotations
=(node
)
2482 _n_annotations
= node
2483 if node
!= null then node
.parent
= self
2487 redef fun visit_all
(v
: Visitor)
2489 v
.enter_visit
(_n_kwvar
)
2490 v
.enter_visit
(_n_id
)
2491 v
.enter_visit
(_n_type
)
2492 v
.enter_visit
(_n_assign
)
2493 v
.enter_visit
(_n_expr
)
2494 v
.enter_visit
(_n_annotations
)
2497 redef class AReturnExpr
2498 init init_areturnexpr
(
2499 n_kwreturn
: nullable TKwreturn,
2500 n_expr
: nullable AExpr
2503 _n_kwreturn
= n_kwreturn
2504 if n_kwreturn
!= null then n_kwreturn
.parent
= self
2506 if n_expr
!= null then n_expr
.parent
= self
2509 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2511 if _n_kwreturn
== old_child
then
2512 n_kwreturn
= new_child
.as(nullable TKwreturn)
2515 if _n_expr
== old_child
then
2516 n_expr
= new_child
.as(nullable AExpr)
2521 redef fun n_kwreturn
=(node
)
2524 if node
!= null then node
.parent
= self
2526 redef fun n_expr
=(node
)
2529 if node
!= null then node
.parent
= self
2533 redef fun visit_all
(v
: Visitor)
2535 v
.enter_visit
(_n_kwreturn
)
2536 v
.enter_visit
(_n_expr
)
2539 redef class ABreakExpr
2540 init init_abreakexpr
(
2541 n_kwbreak
: nullable TKwbreak,
2542 n_label
: nullable ALabel
2545 _n_kwbreak
= n_kwbreak
.as(not null)
2546 n_kwbreak
.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_kwbreak
== old_child
then
2554 n_kwbreak
= new_child
.as(TKwbreak)
2557 if _n_label
== old_child
then
2558 n_label
= new_child
.as(nullable ALabel)
2563 redef fun n_kwbreak
=(node
)
2568 redef fun n_label
=(node
)
2571 if node
!= null then node
.parent
= self
2575 redef fun visit_all
(v
: Visitor)
2577 v
.enter_visit
(_n_kwbreak
)
2578 v
.enter_visit
(_n_label
)
2581 redef class AAbortExpr
2582 init init_aabortexpr
(
2583 n_kwabort
: nullable TKwabort
2586 _n_kwabort
= n_kwabort
.as(not null)
2587 n_kwabort
.parent
= self
2590 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2592 if _n_kwabort
== old_child
then
2593 n_kwabort
= new_child
.as(TKwabort)
2598 redef fun n_kwabort
=(node
)
2605 redef fun visit_all
(v
: Visitor)
2607 v
.enter_visit
(_n_kwabort
)
2610 redef class AContinueExpr
2611 init init_acontinueexpr
(
2612 n_kwcontinue
: nullable TKwcontinue,
2613 n_label
: nullable ALabel
2616 _n_kwcontinue
= n_kwcontinue
2617 if n_kwcontinue
!= null then n_kwcontinue
.parent
= self
2619 if n_label
!= null then n_label
.parent
= self
2622 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2624 if _n_kwcontinue
== old_child
then
2625 n_kwcontinue
= new_child
.as(nullable TKwcontinue)
2628 if _n_label
== old_child
then
2629 n_label
= new_child
.as(nullable ALabel)
2634 redef fun n_kwcontinue
=(node
)
2636 _n_kwcontinue
= node
2637 if node
!= null then node
.parent
= self
2639 redef fun n_label
=(node
)
2642 if node
!= null then node
.parent
= self
2646 redef fun visit_all
(v
: Visitor)
2648 v
.enter_visit
(_n_kwcontinue
)
2649 v
.enter_visit
(_n_label
)
2654 n_kwdo
: nullable TKwdo,
2655 n_block
: nullable AExpr,
2656 n_label
: nullable ALabel
2659 _n_kwdo
= n_kwdo
.as(not null)
2660 n_kwdo
.parent
= self
2662 if n_block
!= null then n_block
.parent
= self
2664 if n_label
!= null then n_label
.parent
= self
2667 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2669 if _n_kwdo
== old_child
then
2670 n_kwdo
= new_child
.as(TKwdo)
2673 if _n_block
== old_child
then
2674 n_block
= new_child
.as(nullable AExpr)
2677 if _n_label
== old_child
then
2678 n_label
= new_child
.as(nullable ALabel)
2683 redef fun n_kwdo
=(node
)
2688 redef fun n_block
=(node
)
2691 if node
!= null then node
.parent
= self
2693 redef fun n_label
=(node
)
2696 if node
!= null then node
.parent
= self
2700 redef fun visit_all
(v
: Visitor)
2702 v
.enter_visit
(_n_kwdo
)
2703 v
.enter_visit
(_n_block
)
2704 v
.enter_visit
(_n_label
)
2709 n_kwif
: nullable TKwif,
2710 n_expr
: nullable AExpr,
2711 n_then
: nullable AExpr,
2712 n_else
: nullable AExpr
2715 _n_kwif
= n_kwif
.as(not null)
2716 n_kwif
.parent
= self
2717 _n_expr
= n_expr
.as(not null)
2718 n_expr
.parent
= self
2720 if n_then
!= null then n_then
.parent
= self
2722 if n_else
!= null then n_else
.parent
= self
2725 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2727 if _n_kwif
== old_child
then
2728 n_kwif
= new_child
.as(TKwif)
2731 if _n_expr
== old_child
then
2732 n_expr
= new_child
.as(AExpr)
2735 if _n_then
== old_child
then
2736 n_then
= new_child
.as(nullable AExpr)
2739 if _n_else
== old_child
then
2740 n_else
= new_child
.as(nullable AExpr)
2745 redef fun n_kwif
=(node
)
2750 redef fun n_expr
=(node
)
2755 redef fun n_then
=(node
)
2758 if node
!= null then node
.parent
= self
2760 redef fun n_else
=(node
)
2763 if node
!= null then node
.parent
= self
2767 redef fun visit_all
(v
: Visitor)
2769 v
.enter_visit
(_n_kwif
)
2770 v
.enter_visit
(_n_expr
)
2771 v
.enter_visit
(_n_then
)
2772 v
.enter_visit
(_n_else
)
2775 redef class AIfexprExpr
2776 init init_aifexprexpr
(
2777 n_kwif
: nullable TKwif,
2778 n_expr
: nullable AExpr,
2779 n_kwthen
: nullable TKwthen,
2780 n_then
: nullable AExpr,
2781 n_kwelse
: nullable TKwelse,
2782 n_else
: nullable AExpr
2785 _n_kwif
= n_kwif
.as(not null)
2786 n_kwif
.parent
= self
2787 _n_expr
= n_expr
.as(not null)
2788 n_expr
.parent
= self
2789 _n_kwthen
= n_kwthen
.as(not null)
2790 n_kwthen
.parent
= self
2791 _n_then
= n_then
.as(not null)
2792 n_then
.parent
= self
2793 _n_kwelse
= n_kwelse
.as(not null)
2794 n_kwelse
.parent
= self
2795 _n_else
= n_else
.as(not null)
2796 n_else
.parent
= self
2799 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2801 if _n_kwif
== old_child
then
2802 n_kwif
= new_child
.as(TKwif)
2805 if _n_expr
== old_child
then
2806 n_expr
= new_child
.as(AExpr)
2809 if _n_kwthen
== old_child
then
2810 n_kwthen
= new_child
.as(TKwthen)
2813 if _n_then
== old_child
then
2814 n_then
= new_child
.as(AExpr)
2817 if _n_kwelse
== old_child
then
2818 n_kwelse
= new_child
.as(TKwelse)
2821 if _n_else
== old_child
then
2822 n_else
= new_child
.as(AExpr)
2827 redef fun n_kwif
=(node
)
2832 redef fun n_expr
=(node
)
2837 redef fun n_kwthen
=(node
)
2842 redef fun n_then
=(node
)
2847 redef fun n_kwelse
=(node
)
2852 redef fun n_else
=(node
)
2859 redef fun visit_all
(v
: Visitor)
2861 v
.enter_visit
(_n_kwif
)
2862 v
.enter_visit
(_n_expr
)
2863 v
.enter_visit
(_n_kwthen
)
2864 v
.enter_visit
(_n_then
)
2865 v
.enter_visit
(_n_kwelse
)
2866 v
.enter_visit
(_n_else
)
2869 redef class AWhileExpr
2870 init init_awhileexpr
(
2871 n_kwwhile
: nullable TKwwhile,
2872 n_expr
: nullable AExpr,
2873 n_kwdo
: nullable TKwdo,
2874 n_block
: nullable AExpr,
2875 n_label
: nullable ALabel
2878 _n_kwwhile
= n_kwwhile
.as(not null)
2879 n_kwwhile
.parent
= self
2880 _n_expr
= n_expr
.as(not null)
2881 n_expr
.parent
= self
2882 _n_kwdo
= n_kwdo
.as(not null)
2883 n_kwdo
.parent
= self
2885 if n_block
!= null then n_block
.parent
= self
2887 if n_label
!= null then n_label
.parent
= self
2890 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2892 if _n_kwwhile
== old_child
then
2893 n_kwwhile
= new_child
.as(TKwwhile)
2896 if _n_expr
== old_child
then
2897 n_expr
= new_child
.as(AExpr)
2900 if _n_kwdo
== old_child
then
2901 n_kwdo
= new_child
.as(TKwdo)
2904 if _n_block
== old_child
then
2905 n_block
= new_child
.as(nullable AExpr)
2908 if _n_label
== old_child
then
2909 n_label
= new_child
.as(nullable ALabel)
2914 redef fun n_kwwhile
=(node
)
2919 redef fun n_expr
=(node
)
2924 redef fun n_kwdo
=(node
)
2929 redef fun n_block
=(node
)
2932 if node
!= null then node
.parent
= self
2934 redef fun n_label
=(node
)
2937 if node
!= null then node
.parent
= self
2941 redef fun visit_all
(v
: Visitor)
2943 v
.enter_visit
(_n_kwwhile
)
2944 v
.enter_visit
(_n_expr
)
2945 v
.enter_visit
(_n_kwdo
)
2946 v
.enter_visit
(_n_block
)
2947 v
.enter_visit
(_n_label
)
2950 redef class ALoopExpr
2951 init init_aloopexpr
(
2952 n_kwloop
: nullable TKwloop,
2953 n_block
: nullable AExpr,
2954 n_label
: nullable ALabel
2957 _n_kwloop
= n_kwloop
.as(not null)
2958 n_kwloop
.parent
= self
2960 if n_block
!= null then n_block
.parent
= self
2962 if n_label
!= null then n_label
.parent
= self
2965 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
2967 if _n_kwloop
== old_child
then
2968 n_kwloop
= new_child
.as(TKwloop)
2971 if _n_block
== old_child
then
2972 n_block
= new_child
.as(nullable AExpr)
2975 if _n_label
== old_child
then
2976 n_label
= new_child
.as(nullable ALabel)
2981 redef fun n_kwloop
=(node
)
2986 redef fun n_block
=(node
)
2989 if node
!= null then node
.parent
= self
2991 redef fun n_label
=(node
)
2994 if node
!= null then node
.parent
= self
2998 redef fun visit_all
(v
: Visitor)
3000 v
.enter_visit
(_n_kwloop
)
3001 v
.enter_visit
(_n_block
)
3002 v
.enter_visit
(_n_label
)
3005 redef class AForExpr
3006 init init_aforexpr
(
3007 n_kwfor
: nullable TKwfor,
3008 n_ids
: Collection[Object], # Should be Collection[TId]
3009 n_expr
: nullable AExpr,
3010 n_kwdo
: nullable TKwdo,
3011 n_block
: nullable AExpr,
3012 n_label
: nullable ALabel
3015 _n_kwfor
= n_kwfor
.as(not null)
3016 n_kwfor
.parent
= self
3017 self.n_ids
.unsafe_add_all
(n_ids
)
3018 _n_expr
= n_expr
.as(not null)
3019 n_expr
.parent
= self
3020 _n_kwdo
= n_kwdo
.as(not null)
3021 n_kwdo
.parent
= self
3023 if n_block
!= null then n_block
.parent
= self
3025 if n_label
!= null then n_label
.parent
= self
3028 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3030 if _n_kwfor
== old_child
then
3031 n_kwfor
= new_child
.as(TKwfor)
3034 if n_ids
.replace_child
(old_child
, new_child
) then return
3035 if _n_expr
== old_child
then
3036 n_expr
= new_child
.as(AExpr)
3039 if _n_kwdo
== old_child
then
3040 n_kwdo
= new_child
.as(TKwdo)
3043 if _n_block
== old_child
then
3044 n_block
= new_child
.as(nullable AExpr)
3047 if _n_label
== old_child
then
3048 n_label
= new_child
.as(nullable ALabel)
3053 redef fun n_kwfor
=(node
)
3058 redef fun n_expr
=(node
)
3063 redef fun n_kwdo
=(node
)
3068 redef fun n_block
=(node
)
3071 if node
!= null then node
.parent
= self
3073 redef fun n_label
=(node
)
3076 if node
!= null then node
.parent
= self
3080 redef fun visit_all
(v
: Visitor)
3082 v
.enter_visit
(_n_kwfor
)
3084 v
.enter_visit
(_n_expr
)
3085 v
.enter_visit
(_n_kwdo
)
3086 v
.enter_visit
(_n_block
)
3087 v
.enter_visit
(_n_label
)
3090 redef class AWithExpr
3091 init init_awithexpr
(
3092 n_kwwith
: nullable TKwwith,
3093 n_expr
: nullable AExpr,
3094 n_kwdo
: nullable TKwdo,
3095 n_block
: nullable AExpr,
3096 n_label
: nullable ALabel
3099 _n_kwwith
= n_kwwith
.as(not null)
3100 n_kwwith
.parent
= self
3101 _n_expr
= n_expr
.as(not null)
3102 n_expr
.parent
= self
3103 _n_kwdo
= n_kwdo
.as(not null)
3104 n_kwdo
.parent
= self
3106 if n_block
!= null then n_block
.parent
= self
3108 if n_label
!= null then n_label
.parent
= self
3111 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3113 if _n_kwwith
== old_child
then
3114 n_kwwith
= new_child
.as(TKwwith)
3117 if _n_expr
== old_child
then
3118 n_expr
= new_child
.as(AExpr)
3121 if _n_kwdo
== old_child
then
3122 n_kwdo
= new_child
.as(TKwdo)
3125 if _n_block
== old_child
then
3126 n_block
= new_child
.as(nullable AExpr)
3129 if _n_label
== old_child
then
3130 n_label
= new_child
.as(nullable ALabel)
3135 redef fun n_kwwith
=(node
)
3140 redef fun n_expr
=(node
)
3145 redef fun n_kwdo
=(node
)
3150 redef fun n_block
=(node
)
3153 if node
!= null then node
.parent
= self
3155 redef fun n_label
=(node
)
3158 if node
!= null then node
.parent
= self
3162 redef fun visit_all
(v
: Visitor)
3164 v
.enter_visit
(_n_kwwith
)
3165 v
.enter_visit
(_n_expr
)
3166 v
.enter_visit
(_n_kwdo
)
3167 v
.enter_visit
(_n_block
)
3168 v
.enter_visit
(_n_label
)
3171 redef class AAssertExpr
3172 init init_aassertexpr
(
3173 n_kwassert
: nullable TKwassert,
3175 n_expr
: nullable AExpr,
3176 n_else
: nullable AExpr
3179 _n_kwassert
= n_kwassert
.as(not null)
3180 n_kwassert
.parent
= self
3182 if n_id
!= null then n_id
.parent
= self
3183 _n_expr
= n_expr
.as(not null)
3184 n_expr
.parent
= self
3186 if n_else
!= null then n_else
.parent
= self
3189 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3191 if _n_kwassert
== old_child
then
3192 n_kwassert
= new_child
.as(TKwassert)
3195 if _n_id
== old_child
then
3196 n_id
= new_child
.as(nullable TId)
3199 if _n_expr
== old_child
then
3200 n_expr
= new_child
.as(AExpr)
3203 if _n_else
== old_child
then
3204 n_else
= new_child
.as(nullable AExpr)
3209 redef fun n_kwassert
=(node
)
3214 redef fun n_id
=(node
)
3217 if node
!= null then node
.parent
= self
3219 redef fun n_expr
=(node
)
3224 redef fun n_else
=(node
)
3227 if node
!= null then node
.parent
= self
3231 redef fun visit_all
(v
: Visitor)
3233 v
.enter_visit
(_n_kwassert
)
3234 v
.enter_visit
(_n_id
)
3235 v
.enter_visit
(_n_expr
)
3236 v
.enter_visit
(_n_else
)
3239 redef class AOnceExpr
3240 init init_aonceexpr
(
3241 n_kwonce
: nullable TKwonce,
3242 n_expr
: nullable AExpr
3245 _n_kwonce
= n_kwonce
.as(not null)
3246 n_kwonce
.parent
= self
3247 _n_expr
= n_expr
.as(not null)
3248 n_expr
.parent
= self
3251 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3253 if _n_kwonce
== old_child
then
3254 n_kwonce
= new_child
.as(TKwonce)
3257 if _n_expr
== old_child
then
3258 n_expr
= new_child
.as(AExpr)
3263 redef fun n_kwonce
=(node
)
3268 redef fun n_expr
=(node
)
3275 redef fun visit_all
(v
: Visitor)
3277 v
.enter_visit
(_n_kwonce
)
3278 v
.enter_visit
(_n_expr
)
3281 redef class ASendExpr
3282 init init_asendexpr
(
3283 n_expr
: nullable AExpr
3286 _n_expr
= n_expr
.as(not null)
3287 n_expr
.parent
= self
3290 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3292 if _n_expr
== old_child
then
3293 n_expr
= new_child
.as(AExpr)
3298 redef fun n_expr
=(node
)
3305 redef fun visit_all
(v
: Visitor)
3307 v
.enter_visit
(_n_expr
)
3310 redef class ABinopExpr
3311 init init_abinopexpr
(
3312 n_expr
: nullable AExpr,
3313 n_expr2
: nullable AExpr
3316 _n_expr
= n_expr
.as(not null)
3317 n_expr
.parent
= self
3318 _n_expr2
= n_expr2
.as(not null)
3319 n_expr2
.parent
= self
3322 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3324 if _n_expr
== old_child
then
3325 n_expr
= new_child
.as(AExpr)
3328 if _n_expr2
== old_child
then
3329 n_expr2
= new_child
.as(AExpr)
3334 redef fun n_expr
=(node
)
3339 redef fun n_expr2
=(node
)
3346 redef fun visit_all
(v
: Visitor)
3348 v
.enter_visit
(_n_expr
)
3349 v
.enter_visit
(_n_expr2
)
3354 n_expr
: nullable AExpr,
3355 n_op
: nullable TKwor,
3356 n_expr2
: nullable AExpr
3359 _n_expr
= n_expr
.as(not null)
3360 n_expr
.parent
= self
3361 _n_op
= n_op
.as(not null)
3363 _n_expr2
= n_expr2
.as(not null)
3364 n_expr2
.parent
= self
3367 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3369 if _n_expr
== old_child
then
3370 n_expr
= new_child
.as(AExpr)
3373 if _n_op
== old_child
then
3374 n_op
= new_child
.as(TKwor)
3377 if _n_expr2
== old_child
then
3378 n_expr2
= new_child
.as(AExpr)
3383 redef fun n_expr
=(node
)
3388 redef fun n_op
=(node
)
3393 redef fun n_expr2
=(node
)
3400 redef fun visit_all
(v
: Visitor)
3402 v
.enter_visit
(_n_expr
)
3403 v
.enter_visit
(_n_op
)
3404 v
.enter_visit
(_n_expr2
)
3407 redef class AAndExpr
3408 init init_aandexpr
(
3409 n_expr
: nullable AExpr,
3410 n_op
: nullable TKwand,
3411 n_expr2
: nullable AExpr
3414 _n_expr
= n_expr
.as(not null)
3415 n_expr
.parent
= self
3416 _n_op
= n_op
.as(not null)
3418 _n_expr2
= n_expr2
.as(not null)
3419 n_expr2
.parent
= self
3422 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3424 if _n_expr
== old_child
then
3425 n_expr
= new_child
.as(AExpr)
3428 if _n_op
== old_child
then
3429 n_op
= new_child
.as(TKwand)
3432 if _n_expr2
== old_child
then
3433 n_expr2
= new_child
.as(AExpr)
3438 redef fun n_expr
=(node
)
3443 redef fun n_op
=(node
)
3448 redef fun n_expr2
=(node
)
3455 redef fun visit_all
(v
: Visitor)
3457 v
.enter_visit
(_n_expr
)
3458 v
.enter_visit
(_n_op
)
3459 v
.enter_visit
(_n_expr2
)
3462 redef class AOrElseExpr
3463 init init_aorelseexpr
(
3464 n_expr
: nullable AExpr,
3465 n_op
: nullable TKwor,
3466 n_kwelse
: nullable TKwelse,
3467 n_expr2
: nullable AExpr
3470 _n_expr
= n_expr
.as(not null)
3471 n_expr
.parent
= self
3472 _n_op
= n_op
.as(not null)
3474 _n_kwelse
= n_kwelse
.as(not null)
3475 n_kwelse
.parent
= self
3476 _n_expr2
= n_expr2
.as(not null)
3477 n_expr2
.parent
= self
3480 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3482 if _n_expr
== old_child
then
3483 n_expr
= new_child
.as(AExpr)
3486 if _n_op
== old_child
then
3487 n_op
= new_child
.as(TKwor)
3490 if _n_kwelse
== old_child
then
3491 n_kwelse
= new_child
.as(TKwelse)
3494 if _n_expr2
== old_child
then
3495 n_expr2
= new_child
.as(AExpr)
3500 redef fun n_expr
=(node
)
3505 redef fun n_op
=(node
)
3510 redef fun n_kwelse
=(node
)
3515 redef fun n_expr2
=(node
)
3522 redef fun visit_all
(v
: Visitor)
3524 v
.enter_visit
(_n_expr
)
3525 v
.enter_visit
(_n_op
)
3526 v
.enter_visit
(_n_kwelse
)
3527 v
.enter_visit
(_n_expr2
)
3530 redef class AImpliesExpr
3531 init init_aimpliesexpr
(
3532 n_expr
: nullable AExpr,
3533 n_op
: nullable TKwimplies,
3534 n_expr2
: nullable AExpr
3537 _n_expr
= n_expr
.as(not null)
3538 n_expr
.parent
= self
3539 _n_op
= n_op
.as(not null)
3541 _n_expr2
= n_expr2
.as(not null)
3542 n_expr2
.parent
= self
3545 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3547 if _n_expr
== old_child
then
3548 n_expr
= new_child
.as(AExpr)
3551 if _n_op
== old_child
then
3552 n_op
= new_child
.as(TKwimplies)
3555 if _n_expr2
== old_child
then
3556 n_expr2
= new_child
.as(AExpr)
3561 redef fun n_expr
=(node
)
3566 redef fun n_op
=(node
)
3571 redef fun n_expr2
=(node
)
3578 redef fun visit_all
(v
: Visitor)
3580 v
.enter_visit
(_n_expr
)
3581 v
.enter_visit
(_n_op
)
3582 v
.enter_visit
(_n_expr2
)
3585 redef class ANotExpr
3586 init init_anotexpr
(
3587 n_kwnot
: nullable TKwnot,
3588 n_expr
: nullable AExpr
3591 _n_kwnot
= n_kwnot
.as(not null)
3592 n_kwnot
.parent
= self
3593 _n_expr
= n_expr
.as(not null)
3594 n_expr
.parent
= self
3597 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3599 if _n_kwnot
== old_child
then
3600 n_kwnot
= new_child
.as(TKwnot)
3603 if _n_expr
== old_child
then
3604 n_expr
= new_child
.as(AExpr)
3609 redef fun n_kwnot
=(node
)
3614 redef fun n_expr
=(node
)
3621 redef fun visit_all
(v
: Visitor)
3623 v
.enter_visit
(_n_kwnot
)
3624 v
.enter_visit
(_n_expr
)
3629 n_expr
: nullable AExpr,
3631 n_expr2
: nullable AExpr
3634 _n_expr
= n_expr
.as(not null)
3635 n_expr
.parent
= self
3636 _n_op
= n_op
.as(not null)
3638 _n_expr2
= n_expr2
.as(not null)
3639 n_expr2
.parent
= self
3642 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3644 if _n_expr
== old_child
then
3645 n_expr
= new_child
.as(AExpr)
3648 if _n_op
== old_child
then
3649 n_op
= new_child
.as(TEq)
3652 if _n_expr2
== old_child
then
3653 n_expr2
= new_child
.as(AExpr)
3658 redef fun n_expr
=(node
)
3663 redef fun n_op
=(node
)
3668 redef fun n_expr2
=(node
)
3675 redef fun visit_all
(v
: Visitor)
3677 v
.enter_visit
(_n_expr
)
3678 v
.enter_visit
(_n_op
)
3679 v
.enter_visit
(_n_expr2
)
3684 n_expr
: nullable AExpr,
3686 n_expr2
: nullable AExpr
3689 _n_expr
= n_expr
.as(not null)
3690 n_expr
.parent
= self
3691 _n_op
= n_op
.as(not null)
3693 _n_expr2
= n_expr2
.as(not null)
3694 n_expr2
.parent
= self
3697 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3699 if _n_expr
== old_child
then
3700 n_expr
= new_child
.as(AExpr)
3703 if _n_op
== old_child
then
3704 n_op
= new_child
.as(TNe)
3707 if _n_expr2
== old_child
then
3708 n_expr2
= new_child
.as(AExpr)
3713 redef fun n_expr
=(node
)
3718 redef fun n_op
=(node
)
3723 redef fun n_expr2
=(node
)
3730 redef fun visit_all
(v
: Visitor)
3732 v
.enter_visit
(_n_expr
)
3733 v
.enter_visit
(_n_op
)
3734 v
.enter_visit
(_n_expr2
)
3739 n_expr
: nullable AExpr,
3741 n_expr2
: nullable AExpr
3744 _n_expr
= n_expr
.as(not null)
3745 n_expr
.parent
= self
3746 _n_op
= n_op
.as(not null)
3748 _n_expr2
= n_expr2
.as(not null)
3749 n_expr2
.parent
= self
3752 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3754 if _n_expr
== old_child
then
3755 n_expr
= new_child
.as(AExpr)
3758 if _n_op
== old_child
then
3759 n_op
= new_child
.as(TLt)
3762 if _n_expr2
== old_child
then
3763 n_expr2
= new_child
.as(AExpr)
3768 redef fun n_expr
=(node
)
3773 redef fun n_op
=(node
)
3778 redef fun n_expr2
=(node
)
3785 redef fun visit_all
(v
: Visitor)
3787 v
.enter_visit
(_n_expr
)
3788 v
.enter_visit
(_n_op
)
3789 v
.enter_visit
(_n_expr2
)
3794 n_expr
: nullable AExpr,
3796 n_expr2
: nullable AExpr
3799 _n_expr
= n_expr
.as(not null)
3800 n_expr
.parent
= self
3801 _n_op
= n_op
.as(not null)
3803 _n_expr2
= n_expr2
.as(not null)
3804 n_expr2
.parent
= self
3807 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3809 if _n_expr
== old_child
then
3810 n_expr
= new_child
.as(AExpr)
3813 if _n_op
== old_child
then
3814 n_op
= new_child
.as(TLe)
3817 if _n_expr2
== old_child
then
3818 n_expr2
= new_child
.as(AExpr)
3823 redef fun n_expr
=(node
)
3828 redef fun n_op
=(node
)
3833 redef fun n_expr2
=(node
)
3840 redef fun visit_all
(v
: Visitor)
3842 v
.enter_visit
(_n_expr
)
3843 v
.enter_visit
(_n_op
)
3844 v
.enter_visit
(_n_expr2
)
3849 n_expr
: nullable AExpr,
3851 n_expr2
: nullable AExpr
3854 _n_expr
= n_expr
.as(not null)
3855 n_expr
.parent
= self
3856 _n_op
= n_op
.as(not null)
3858 _n_expr2
= n_expr2
.as(not null)
3859 n_expr2
.parent
= self
3862 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3864 if _n_expr
== old_child
then
3865 n_expr
= new_child
.as(AExpr)
3868 if _n_op
== old_child
then
3869 n_op
= new_child
.as(TLl)
3872 if _n_expr2
== old_child
then
3873 n_expr2
= new_child
.as(AExpr)
3878 redef fun n_expr
=(node
)
3883 redef fun n_op
=(node
)
3888 redef fun n_expr2
=(node
)
3895 redef fun visit_all
(v
: Visitor)
3897 v
.enter_visit
(_n_expr
)
3898 v
.enter_visit
(_n_op
)
3899 v
.enter_visit
(_n_expr2
)
3904 n_expr
: nullable AExpr,
3906 n_expr2
: nullable AExpr
3909 _n_expr
= n_expr
.as(not null)
3910 n_expr
.parent
= self
3911 _n_op
= n_op
.as(not null)
3913 _n_expr2
= n_expr2
.as(not null)
3914 n_expr2
.parent
= self
3917 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3919 if _n_expr
== old_child
then
3920 n_expr
= new_child
.as(AExpr)
3923 if _n_op
== old_child
then
3924 n_op
= new_child
.as(TGt)
3927 if _n_expr2
== old_child
then
3928 n_expr2
= new_child
.as(AExpr)
3933 redef fun n_expr
=(node
)
3938 redef fun n_op
=(node
)
3943 redef fun n_expr2
=(node
)
3950 redef fun visit_all
(v
: Visitor)
3952 v
.enter_visit
(_n_expr
)
3953 v
.enter_visit
(_n_op
)
3954 v
.enter_visit
(_n_expr2
)
3959 n_expr
: nullable AExpr,
3961 n_expr2
: nullable AExpr
3964 _n_expr
= n_expr
.as(not null)
3965 n_expr
.parent
= self
3966 _n_op
= n_op
.as(not null)
3968 _n_expr2
= n_expr2
.as(not null)
3969 n_expr2
.parent
= self
3972 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
3974 if _n_expr
== old_child
then
3975 n_expr
= new_child
.as(AExpr)
3978 if _n_op
== old_child
then
3979 n_op
= new_child
.as(TGe)
3982 if _n_expr2
== old_child
then
3983 n_expr2
= new_child
.as(AExpr)
3988 redef fun n_expr
=(node
)
3993 redef fun n_op
=(node
)
3998 redef fun n_expr2
=(node
)
4005 redef fun visit_all
(v
: Visitor)
4007 v
.enter_visit
(_n_expr
)
4008 v
.enter_visit
(_n_op
)
4009 v
.enter_visit
(_n_expr2
)
4014 n_expr
: nullable AExpr,
4016 n_expr2
: nullable AExpr
4019 _n_expr
= n_expr
.as(not null)
4020 n_expr
.parent
= self
4021 _n_op
= n_op
.as(not null)
4023 _n_expr2
= n_expr2
.as(not null)
4024 n_expr2
.parent
= self
4027 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4029 if _n_expr
== old_child
then
4030 n_expr
= new_child
.as(AExpr)
4033 if _n_op
== old_child
then
4034 n_op
= new_child
.as(TGg)
4037 if _n_expr2
== old_child
then
4038 n_expr2
= new_child
.as(AExpr)
4043 redef fun n_expr
=(node
)
4048 redef fun n_op
=(node
)
4053 redef fun n_expr2
=(node
)
4060 redef fun visit_all
(v
: Visitor)
4062 v
.enter_visit
(_n_expr
)
4063 v
.enter_visit
(_n_op
)
4064 v
.enter_visit
(_n_expr2
)
4067 redef class AIsaExpr
4068 init init_aisaexpr
(
4069 n_expr
: nullable AExpr,
4070 n_kwisa
: nullable TKwisa,
4071 n_type
: nullable AType
4074 _n_expr
= n_expr
.as(not null)
4075 n_expr
.parent
= self
4076 _n_kwisa
= n_kwisa
.as(not null)
4077 n_kwisa
.parent
= self
4078 _n_type
= n_type
.as(not null)
4079 n_type
.parent
= self
4082 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4084 if _n_expr
== old_child
then
4085 n_expr
= new_child
.as(AExpr)
4088 if _n_kwisa
== old_child
then
4089 n_kwisa
= new_child
.as(TKwisa)
4092 if _n_type
== old_child
then
4093 n_type
= new_child
.as(AType)
4098 redef fun n_expr
=(node
)
4103 redef fun n_kwisa
=(node
)
4108 redef fun n_type
=(node
)
4115 redef fun visit_all
(v
: Visitor)
4117 v
.enter_visit
(_n_expr
)
4118 v
.enter_visit
(_n_kwisa
)
4119 v
.enter_visit
(_n_type
)
4122 redef class APlusExpr
4123 init init_aplusexpr
(
4124 n_expr
: nullable AExpr,
4125 n_op
: nullable TPlus,
4126 n_expr2
: nullable AExpr
4129 _n_expr
= n_expr
.as(not null)
4130 n_expr
.parent
= self
4131 _n_op
= n_op
.as(not null)
4133 _n_expr2
= n_expr2
.as(not null)
4134 n_expr2
.parent
= self
4137 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4139 if _n_expr
== old_child
then
4140 n_expr
= new_child
.as(AExpr)
4143 if _n_op
== old_child
then
4144 n_op
= new_child
.as(TPlus)
4147 if _n_expr2
== old_child
then
4148 n_expr2
= new_child
.as(AExpr)
4153 redef fun n_expr
=(node
)
4158 redef fun n_op
=(node
)
4163 redef fun n_expr2
=(node
)
4170 redef fun visit_all
(v
: Visitor)
4172 v
.enter_visit
(_n_expr
)
4173 v
.enter_visit
(_n_op
)
4174 v
.enter_visit
(_n_expr2
)
4177 redef class AMinusExpr
4178 init init_aminusexpr
(
4179 n_expr
: nullable AExpr,
4180 n_op
: nullable TMinus,
4181 n_expr2
: nullable AExpr
4184 _n_expr
= n_expr
.as(not null)
4185 n_expr
.parent
= self
4186 _n_op
= n_op
.as(not null)
4188 _n_expr2
= n_expr2
.as(not null)
4189 n_expr2
.parent
= self
4192 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4194 if _n_expr
== old_child
then
4195 n_expr
= new_child
.as(AExpr)
4198 if _n_op
== old_child
then
4199 n_op
= new_child
.as(TMinus)
4202 if _n_expr2
== old_child
then
4203 n_expr2
= new_child
.as(AExpr)
4208 redef fun n_expr
=(node
)
4213 redef fun n_op
=(node
)
4218 redef fun n_expr2
=(node
)
4225 redef fun visit_all
(v
: Visitor)
4227 v
.enter_visit
(_n_expr
)
4228 v
.enter_visit
(_n_op
)
4229 v
.enter_visit
(_n_expr2
)
4232 redef class AStarshipExpr
4233 init init_astarshipexpr
(
4234 n_expr
: nullable AExpr,
4235 n_op
: nullable TStarship,
4236 n_expr2
: nullable AExpr
4239 _n_expr
= n_expr
.as(not null)
4240 n_expr
.parent
= self
4241 _n_op
= n_op
.as(not null)
4243 _n_expr2
= n_expr2
.as(not null)
4244 n_expr2
.parent
= self
4247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4249 if _n_expr
== old_child
then
4250 n_expr
= new_child
.as(AExpr)
4253 if _n_op
== old_child
then
4254 n_op
= new_child
.as(TStarship)
4257 if _n_expr2
== old_child
then
4258 n_expr2
= new_child
.as(AExpr)
4263 redef fun n_expr
=(node
)
4268 redef fun n_op
=(node
)
4273 redef fun n_expr2
=(node
)
4280 redef fun visit_all
(v
: Visitor)
4282 v
.enter_visit
(_n_expr
)
4283 v
.enter_visit
(_n_op
)
4284 v
.enter_visit
(_n_expr2
)
4287 redef class AStarExpr
4288 init init_astarexpr
(
4289 n_expr
: nullable AExpr,
4290 n_op
: nullable TStar,
4291 n_expr2
: nullable AExpr
4294 _n_expr
= n_expr
.as(not null)
4295 n_expr
.parent
= self
4296 _n_op
= n_op
.as(not null)
4298 _n_expr2
= n_expr2
.as(not null)
4299 n_expr2
.parent
= self
4302 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4304 if _n_expr
== old_child
then
4305 n_expr
= new_child
.as(AExpr)
4308 if _n_op
== old_child
then
4309 n_op
= new_child
.as(TStar)
4312 if _n_expr2
== old_child
then
4313 n_expr2
= new_child
.as(AExpr)
4318 redef fun n_expr
=(node
)
4323 redef fun n_op
=(node
)
4328 redef fun n_expr2
=(node
)
4335 redef fun visit_all
(v
: Visitor)
4337 v
.enter_visit
(_n_expr
)
4338 v
.enter_visit
(_n_op
)
4339 v
.enter_visit
(_n_expr2
)
4342 redef class AStarstarExpr
4343 init init_astarstarexpr
(
4344 n_expr
: nullable AExpr,
4345 n_op
: nullable TStarstar,
4346 n_expr2
: nullable AExpr
4349 _n_expr
= n_expr
.as(not null)
4350 n_expr
.parent
= self
4351 _n_op
= n_op
.as(not null)
4353 _n_expr2
= n_expr2
.as(not null)
4354 n_expr2
.parent
= self
4357 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4359 if _n_expr
== old_child
then
4360 n_expr
= new_child
.as(AExpr)
4363 if _n_op
== old_child
then
4364 n_op
= new_child
.as(TStarstar)
4367 if _n_expr2
== old_child
then
4368 n_expr2
= new_child
.as(AExpr)
4373 redef fun n_expr
=(node
)
4378 redef fun n_op
=(node
)
4383 redef fun n_expr2
=(node
)
4390 redef fun visit_all
(v
: Visitor)
4392 v
.enter_visit
(_n_expr
)
4393 v
.enter_visit
(_n_op
)
4394 v
.enter_visit
(_n_expr2
)
4397 redef class ASlashExpr
4398 init init_aslashexpr
(
4399 n_expr
: nullable AExpr,
4400 n_op
: nullable TSlash,
4401 n_expr2
: nullable AExpr
4404 _n_expr
= n_expr
.as(not null)
4405 n_expr
.parent
= self
4406 _n_op
= n_op
.as(not null)
4408 _n_expr2
= n_expr2
.as(not null)
4409 n_expr2
.parent
= self
4412 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4414 if _n_expr
== old_child
then
4415 n_expr
= new_child
.as(AExpr)
4418 if _n_op
== old_child
then
4419 n_op
= new_child
.as(TSlash)
4422 if _n_expr2
== old_child
then
4423 n_expr2
= new_child
.as(AExpr)
4428 redef fun n_expr
=(node
)
4433 redef fun n_op
=(node
)
4438 redef fun n_expr2
=(node
)
4445 redef fun visit_all
(v
: Visitor)
4447 v
.enter_visit
(_n_expr
)
4448 v
.enter_visit
(_n_op
)
4449 v
.enter_visit
(_n_expr2
)
4452 redef class APercentExpr
4453 init init_apercentexpr
(
4454 n_expr
: nullable AExpr,
4455 n_op
: nullable TPercent,
4456 n_expr2
: nullable AExpr
4459 _n_expr
= n_expr
.as(not null)
4460 n_expr
.parent
= self
4461 _n_op
= n_op
.as(not null)
4463 _n_expr2
= n_expr2
.as(not null)
4464 n_expr2
.parent
= self
4467 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4469 if _n_expr
== old_child
then
4470 n_expr
= new_child
.as(AExpr)
4473 if _n_op
== old_child
then
4474 n_op
= new_child
.as(TPercent)
4477 if _n_expr2
== old_child
then
4478 n_expr2
= new_child
.as(AExpr)
4483 redef fun n_expr
=(node
)
4488 redef fun n_op
=(node
)
4493 redef fun n_expr2
=(node
)
4500 redef fun visit_all
(v
: Visitor)
4502 v
.enter_visit
(_n_expr
)
4503 v
.enter_visit
(_n_op
)
4504 v
.enter_visit
(_n_expr2
)
4507 redef class APipeExpr
4508 init init_apipeexpr
(
4509 n_expr
: nullable AExpr,
4510 n_op
: nullable TPipe,
4511 n_expr2
: nullable AExpr
4514 _n_expr
= n_expr
.as(not null)
4515 n_expr
.parent
= self
4516 _n_op
= n_op
.as(not null)
4518 _n_expr2
= n_expr2
.as(not null)
4519 n_expr2
.parent
= self
4522 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4524 if _n_expr
== old_child
then
4525 n_expr
= new_child
.as(AExpr)
4528 if _n_op
== old_child
then
4529 n_op
= new_child
.as(TPipe)
4532 if _n_expr2
== old_child
then
4533 n_expr2
= new_child
.as(AExpr)
4538 redef fun n_expr
=(node
)
4543 redef fun n_op
=(node
)
4548 redef fun n_expr2
=(node
)
4555 redef fun visit_all
(v
: Visitor)
4557 v
.enter_visit
(_n_expr
)
4558 v
.enter_visit
(_n_op
)
4559 v
.enter_visit
(_n_expr2
)
4562 redef class ACaretExpr
4563 init init_acaretexpr
(
4564 n_expr
: nullable AExpr,
4565 n_op
: nullable TCaret,
4566 n_expr2
: nullable AExpr
4569 _n_expr
= n_expr
.as(not null)
4570 n_expr
.parent
= self
4571 _n_op
= n_op
.as(not null)
4573 _n_expr2
= n_expr2
.as(not null)
4574 n_expr2
.parent
= self
4577 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4579 if _n_expr
== old_child
then
4580 n_expr
= new_child
.as(AExpr)
4583 if _n_op
== old_child
then
4584 n_op
= new_child
.as(TCaret)
4587 if _n_expr2
== old_child
then
4588 n_expr2
= new_child
.as(AExpr)
4593 redef fun n_expr
=(node
)
4598 redef fun n_op
=(node
)
4603 redef fun n_expr2
=(node
)
4610 redef fun visit_all
(v
: Visitor)
4612 v
.enter_visit
(_n_expr
)
4613 v
.enter_visit
(_n_op
)
4614 v
.enter_visit
(_n_expr2
)
4617 redef class AAmpExpr
4618 init init_aampexpr
(
4619 n_expr
: nullable AExpr,
4620 n_op
: nullable TAmp,
4621 n_expr2
: nullable AExpr
4624 _n_expr
= n_expr
.as(not null)
4625 n_expr
.parent
= self
4626 _n_op
= n_op
.as(not null)
4628 _n_expr2
= n_expr2
.as(not null)
4629 n_expr2
.parent
= self
4632 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4634 if _n_expr
== old_child
then
4635 n_expr
= new_child
.as(AExpr)
4638 if _n_op
== old_child
then
4639 n_op
= new_child
.as(TAmp)
4642 if _n_expr2
== old_child
then
4643 n_expr2
= new_child
.as(AExpr)
4648 redef fun n_expr
=(node
)
4653 redef fun n_op
=(node
)
4658 redef fun n_expr2
=(node
)
4665 redef fun visit_all
(v
: Visitor)
4667 v
.enter_visit
(_n_expr
)
4668 v
.enter_visit
(_n_op
)
4669 v
.enter_visit
(_n_expr2
)
4672 redef class AUminusExpr
4673 init init_auminusexpr
(
4674 n_op
: nullable TMinus,
4675 n_expr
: nullable AExpr
4678 _n_op
= n_op
.as(not null)
4680 _n_expr
= n_expr
.as(not null)
4681 n_expr
.parent
= self
4684 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4686 if _n_op
== old_child
then
4687 n_op
= new_child
.as(TMinus)
4690 if _n_expr
== old_child
then
4691 n_expr
= new_child
.as(AExpr)
4696 redef fun n_op
=(node
)
4701 redef fun n_expr
=(node
)
4708 redef fun visit_all
(v
: Visitor)
4710 v
.enter_visit
(_n_op
)
4711 v
.enter_visit
(_n_expr
)
4714 redef class AUplusExpr
4715 init init_auplusexpr
(
4716 n_op
: nullable TPlus,
4717 n_expr
: nullable AExpr
4720 _n_op
= n_op
.as(not null)
4722 _n_expr
= n_expr
.as(not null)
4723 n_expr
.parent
= self
4726 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4728 if _n_op
== old_child
then
4729 n_op
= new_child
.as(TPlus)
4732 if _n_expr
== old_child
then
4733 n_expr
= new_child
.as(AExpr)
4738 redef fun n_op
=(node
)
4743 redef fun n_expr
=(node
)
4750 redef fun visit_all
(v
: Visitor)
4752 v
.enter_visit
(_n_op
)
4753 v
.enter_visit
(_n_expr
)
4756 redef class AUtildeExpr
4757 init init_autildeexpr
(
4758 n_op
: nullable TTilde,
4759 n_expr
: nullable AExpr
4762 _n_op
= n_op
.as(not null)
4764 _n_expr
= n_expr
.as(not null)
4765 n_expr
.parent
= self
4768 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4770 if _n_op
== old_child
then
4771 n_op
= new_child
.as(TTilde)
4774 if _n_expr
== old_child
then
4775 n_expr
= new_child
.as(AExpr)
4780 redef fun n_op
=(node
)
4785 redef fun n_expr
=(node
)
4792 redef fun visit_all
(v
: Visitor)
4794 v
.enter_visit
(_n_op
)
4795 v
.enter_visit
(_n_expr
)
4798 redef class ANewExpr
4799 init init_anewexpr
(
4800 n_kwnew
: nullable TKwnew,
4801 n_type
: nullable AType,
4803 n_args
: nullable AExprs
4806 _n_kwnew
= n_kwnew
.as(not null)
4807 n_kwnew
.parent
= self
4808 _n_type
= n_type
.as(not null)
4809 n_type
.parent
= self
4811 if n_id
!= null then n_id
.parent
= self
4812 _n_args
= n_args
.as(not null)
4813 n_args
.parent
= self
4816 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4818 if _n_kwnew
== old_child
then
4819 n_kwnew
= new_child
.as(TKwnew)
4822 if _n_type
== old_child
then
4823 n_type
= new_child
.as(AType)
4826 if _n_id
== old_child
then
4827 n_id
= new_child
.as(nullable TId)
4830 if _n_args
== old_child
then
4831 n_args
= new_child
.as(AExprs)
4836 redef fun n_kwnew
=(node
)
4841 redef fun n_type
=(node
)
4846 redef fun n_id
=(node
)
4849 if node
!= null then node
.parent
= self
4851 redef fun n_args
=(node
)
4858 redef fun visit_all
(v
: Visitor)
4860 v
.enter_visit
(_n_kwnew
)
4861 v
.enter_visit
(_n_type
)
4862 v
.enter_visit
(_n_id
)
4863 v
.enter_visit
(_n_args
)
4866 redef class AAttrExpr
4867 init init_aattrexpr
(
4868 n_expr
: nullable AExpr,
4869 n_id
: nullable TAttrid
4872 _n_expr
= n_expr
.as(not null)
4873 n_expr
.parent
= self
4874 _n_id
= n_id
.as(not null)
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(TAttrid)
4890 redef fun n_expr
=(node
)
4895 redef fun n_id
=(node
)
4902 redef fun visit_all
(v
: Visitor)
4904 v
.enter_visit
(_n_expr
)
4905 v
.enter_visit
(_n_id
)
4908 redef class AAttrAssignExpr
4909 init init_aattrassignexpr
(
4910 n_expr
: nullable AExpr,
4911 n_id
: nullable TAttrid,
4912 n_assign
: nullable TAssign,
4913 n_value
: nullable AExpr
4916 _n_expr
= n_expr
.as(not null)
4917 n_expr
.parent
= self
4918 _n_id
= n_id
.as(not null)
4920 _n_assign
= n_assign
.as(not null)
4921 n_assign
.parent
= self
4922 _n_value
= n_value
.as(not null)
4923 n_value
.parent
= self
4926 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4928 if _n_expr
== old_child
then
4929 n_expr
= new_child
.as(AExpr)
4932 if _n_id
== old_child
then
4933 n_id
= new_child
.as(TAttrid)
4936 if _n_assign
== old_child
then
4937 n_assign
= new_child
.as(TAssign)
4940 if _n_value
== old_child
then
4941 n_value
= new_child
.as(AExpr)
4946 redef fun n_expr
=(node
)
4951 redef fun n_id
=(node
)
4956 redef fun n_assign
=(node
)
4961 redef fun n_value
=(node
)
4968 redef fun visit_all
(v
: Visitor)
4970 v
.enter_visit
(_n_expr
)
4971 v
.enter_visit
(_n_id
)
4972 v
.enter_visit
(_n_assign
)
4973 v
.enter_visit
(_n_value
)
4976 redef class AAttrReassignExpr
4977 init init_aattrreassignexpr
(
4978 n_expr
: nullable AExpr,
4979 n_id
: nullable TAttrid,
4980 n_assign_op
: nullable AAssignOp,
4981 n_value
: nullable AExpr
4984 _n_expr
= n_expr
.as(not null)
4985 n_expr
.parent
= self
4986 _n_id
= n_id
.as(not null)
4988 _n_assign_op
= n_assign_op
.as(not null)
4989 n_assign_op
.parent
= self
4990 _n_value
= n_value
.as(not null)
4991 n_value
.parent
= self
4994 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
4996 if _n_expr
== old_child
then
4997 n_expr
= new_child
.as(AExpr)
5000 if _n_id
== old_child
then
5001 n_id
= new_child
.as(TAttrid)
5004 if _n_assign_op
== old_child
then
5005 n_assign_op
= new_child
.as(AAssignOp)
5008 if _n_value
== old_child
then
5009 n_value
= new_child
.as(AExpr)
5014 redef fun n_expr
=(node
)
5019 redef fun n_id
=(node
)
5024 redef fun n_assign_op
=(node
)
5029 redef fun n_value
=(node
)
5036 redef fun visit_all
(v
: Visitor)
5038 v
.enter_visit
(_n_expr
)
5039 v
.enter_visit
(_n_id
)
5040 v
.enter_visit
(_n_assign_op
)
5041 v
.enter_visit
(_n_value
)
5044 redef class ACallExpr
5045 init init_acallexpr
(
5046 n_expr
: nullable AExpr,
5048 n_args
: nullable AExprs
5051 _n_expr
= n_expr
.as(not null)
5052 n_expr
.parent
= self
5053 _n_id
= n_id
.as(not null)
5055 _n_args
= n_args
.as(not null)
5056 n_args
.parent
= self
5059 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5061 if _n_expr
== old_child
then
5062 n_expr
= new_child
.as(AExpr)
5065 if _n_id
== old_child
then
5066 n_id
= new_child
.as(TId)
5069 if _n_args
== old_child
then
5070 n_args
= new_child
.as(AExprs)
5075 redef fun n_expr
=(node
)
5080 redef fun n_id
=(node
)
5085 redef fun n_args
=(node
)
5092 redef fun visit_all
(v
: Visitor)
5094 v
.enter_visit
(_n_expr
)
5095 v
.enter_visit
(_n_id
)
5096 v
.enter_visit
(_n_args
)
5099 redef class ACallAssignExpr
5100 init init_acallassignexpr
(
5101 n_expr
: nullable AExpr,
5103 n_args
: nullable AExprs,
5104 n_assign
: nullable TAssign,
5105 n_value
: nullable AExpr
5108 _n_expr
= n_expr
.as(not null)
5109 n_expr
.parent
= self
5110 _n_id
= n_id
.as(not null)
5112 _n_args
= n_args
.as(not null)
5113 n_args
.parent
= self
5114 _n_assign
= n_assign
.as(not null)
5115 n_assign
.parent
= self
5116 _n_value
= n_value
.as(not null)
5117 n_value
.parent
= self
5120 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5122 if _n_expr
== old_child
then
5123 n_expr
= new_child
.as(AExpr)
5126 if _n_id
== old_child
then
5127 n_id
= new_child
.as(TId)
5130 if _n_args
== old_child
then
5131 n_args
= new_child
.as(AExprs)
5134 if _n_assign
== old_child
then
5135 n_assign
= new_child
.as(TAssign)
5138 if _n_value
== old_child
then
5139 n_value
= new_child
.as(AExpr)
5144 redef fun n_expr
=(node
)
5149 redef fun n_id
=(node
)
5154 redef fun n_args
=(node
)
5159 redef fun n_assign
=(node
)
5164 redef fun n_value
=(node
)
5171 redef fun visit_all
(v
: Visitor)
5173 v
.enter_visit
(_n_expr
)
5174 v
.enter_visit
(_n_id
)
5175 v
.enter_visit
(_n_args
)
5176 v
.enter_visit
(_n_assign
)
5177 v
.enter_visit
(_n_value
)
5180 redef class ACallReassignExpr
5181 init init_acallreassignexpr
(
5182 n_expr
: nullable AExpr,
5184 n_args
: nullable AExprs,
5185 n_assign_op
: nullable AAssignOp,
5186 n_value
: nullable AExpr
5189 _n_expr
= n_expr
.as(not null)
5190 n_expr
.parent
= self
5191 _n_id
= n_id
.as(not null)
5193 _n_args
= n_args
.as(not null)
5194 n_args
.parent
= self
5195 _n_assign_op
= n_assign_op
.as(not null)
5196 n_assign_op
.parent
= self
5197 _n_value
= n_value
.as(not null)
5198 n_value
.parent
= self
5201 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5203 if _n_expr
== old_child
then
5204 n_expr
= new_child
.as(AExpr)
5207 if _n_id
== old_child
then
5208 n_id
= new_child
.as(TId)
5211 if _n_args
== old_child
then
5212 n_args
= new_child
.as(AExprs)
5215 if _n_assign_op
== old_child
then
5216 n_assign_op
= new_child
.as(AAssignOp)
5219 if _n_value
== old_child
then
5220 n_value
= new_child
.as(AExpr)
5225 redef fun n_expr
=(node
)
5230 redef fun n_id
=(node
)
5235 redef fun n_args
=(node
)
5240 redef fun n_assign_op
=(node
)
5245 redef fun n_value
=(node
)
5252 redef fun visit_all
(v
: Visitor)
5254 v
.enter_visit
(_n_expr
)
5255 v
.enter_visit
(_n_id
)
5256 v
.enter_visit
(_n_args
)
5257 v
.enter_visit
(_n_assign_op
)
5258 v
.enter_visit
(_n_value
)
5261 redef class ASuperExpr
5262 init init_asuperexpr
(
5263 n_qualified
: nullable AQualified,
5264 n_kwsuper
: nullable TKwsuper,
5265 n_args
: nullable AExprs
5268 _n_qualified
= n_qualified
5269 if n_qualified
!= null then n_qualified
.parent
= self
5270 _n_kwsuper
= n_kwsuper
.as(not null)
5271 n_kwsuper
.parent
= self
5272 _n_args
= n_args
.as(not null)
5273 n_args
.parent
= self
5276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5278 if _n_qualified
== old_child
then
5279 n_qualified
= new_child
.as(nullable AQualified)
5282 if _n_kwsuper
== old_child
then
5283 n_kwsuper
= new_child
.as(TKwsuper)
5286 if _n_args
== old_child
then
5287 n_args
= new_child
.as(AExprs)
5292 redef fun n_qualified
=(node
)
5295 if node
!= null then node
.parent
= self
5297 redef fun n_kwsuper
=(node
)
5302 redef fun n_args
=(node
)
5309 redef fun visit_all
(v
: Visitor)
5311 v
.enter_visit
(_n_qualified
)
5312 v
.enter_visit
(_n_kwsuper
)
5313 v
.enter_visit
(_n_args
)
5316 redef class AInitExpr
5317 init init_ainitexpr
(
5318 n_expr
: nullable AExpr,
5319 n_kwinit
: nullable TKwinit,
5320 n_args
: nullable AExprs
5323 _n_expr
= n_expr
.as(not null)
5324 n_expr
.parent
= self
5325 _n_kwinit
= n_kwinit
.as(not null)
5326 n_kwinit
.parent
= self
5327 _n_args
= n_args
.as(not null)
5328 n_args
.parent
= self
5331 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5333 if _n_expr
== old_child
then
5334 n_expr
= new_child
.as(AExpr)
5337 if _n_kwinit
== old_child
then
5338 n_kwinit
= new_child
.as(TKwinit)
5341 if _n_args
== old_child
then
5342 n_args
= new_child
.as(AExprs)
5347 redef fun n_expr
=(node
)
5352 redef fun n_kwinit
=(node
)
5357 redef fun n_args
=(node
)
5364 redef fun visit_all
(v
: Visitor)
5366 v
.enter_visit
(_n_expr
)
5367 v
.enter_visit
(_n_kwinit
)
5368 v
.enter_visit
(_n_args
)
5371 redef class ABraExpr
5372 init init_abraexpr
(
5373 n_expr
: nullable AExpr,
5374 n_args
: nullable AExprs
5377 _n_expr
= n_expr
.as(not null)
5378 n_expr
.parent
= self
5379 _n_args
= n_args
.as(not null)
5380 n_args
.parent
= self
5383 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5385 if _n_expr
== old_child
then
5386 n_expr
= new_child
.as(AExpr)
5389 if _n_args
== old_child
then
5390 n_args
= new_child
.as(AExprs)
5395 redef fun n_expr
=(node
)
5400 redef fun n_args
=(node
)
5407 redef fun visit_all
(v
: Visitor)
5409 v
.enter_visit
(_n_expr
)
5410 v
.enter_visit
(_n_args
)
5413 redef class ABraAssignExpr
5414 init init_abraassignexpr
(
5415 n_expr
: nullable AExpr,
5416 n_args
: nullable AExprs,
5417 n_assign
: nullable TAssign,
5418 n_value
: nullable AExpr
5421 _n_expr
= n_expr
.as(not null)
5422 n_expr
.parent
= self
5423 _n_args
= n_args
.as(not null)
5424 n_args
.parent
= self
5425 _n_assign
= n_assign
.as(not null)
5426 n_assign
.parent
= self
5427 _n_value
= n_value
.as(not null)
5428 n_value
.parent
= self
5431 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5433 if _n_expr
== old_child
then
5434 n_expr
= new_child
.as(AExpr)
5437 if _n_args
== old_child
then
5438 n_args
= new_child
.as(AExprs)
5441 if _n_assign
== old_child
then
5442 n_assign
= new_child
.as(TAssign)
5445 if _n_value
== old_child
then
5446 n_value
= new_child
.as(AExpr)
5451 redef fun n_expr
=(node
)
5456 redef fun n_args
=(node
)
5461 redef fun n_assign
=(node
)
5466 redef fun n_value
=(node
)
5473 redef fun visit_all
(v
: Visitor)
5475 v
.enter_visit
(_n_expr
)
5476 v
.enter_visit
(_n_args
)
5477 v
.enter_visit
(_n_assign
)
5478 v
.enter_visit
(_n_value
)
5481 redef class ABraReassignExpr
5482 init init_abrareassignexpr
(
5483 n_expr
: nullable AExpr,
5484 n_args
: nullable AExprs,
5485 n_assign_op
: nullable AAssignOp,
5486 n_value
: nullable AExpr
5489 _n_expr
= n_expr
.as(not null)
5490 n_expr
.parent
= self
5491 _n_args
= n_args
.as(not null)
5492 n_args
.parent
= self
5493 _n_assign_op
= n_assign_op
.as(not null)
5494 n_assign_op
.parent
= self
5495 _n_value
= n_value
.as(not null)
5496 n_value
.parent
= self
5499 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5501 if _n_expr
== old_child
then
5502 n_expr
= new_child
.as(AExpr)
5505 if _n_args
== old_child
then
5506 n_args
= new_child
.as(AExprs)
5509 if _n_assign_op
== old_child
then
5510 n_assign_op
= new_child
.as(AAssignOp)
5513 if _n_value
== old_child
then
5514 n_value
= new_child
.as(AExpr)
5519 redef fun n_expr
=(node
)
5524 redef fun n_args
=(node
)
5529 redef fun n_assign_op
=(node
)
5534 redef fun n_value
=(node
)
5541 redef fun visit_all
(v
: Visitor)
5543 v
.enter_visit
(_n_expr
)
5544 v
.enter_visit
(_n_args
)
5545 v
.enter_visit
(_n_assign_op
)
5546 v
.enter_visit
(_n_value
)
5549 redef class AVarExpr
5550 init init_avarexpr
(
5554 _n_id
= n_id
.as(not null)
5558 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5560 if _n_id
== old_child
then
5561 n_id
= new_child
.as(TId)
5566 redef fun n_id
=(node
)
5573 redef fun visit_all
(v
: Visitor)
5575 v
.enter_visit
(_n_id
)
5578 redef class AVarAssignExpr
5579 init init_avarassignexpr
(
5581 n_assign
: nullable TAssign,
5582 n_value
: nullable AExpr
5585 _n_id
= n_id
.as(not null)
5587 _n_assign
= n_assign
.as(not null)
5588 n_assign
.parent
= self
5589 _n_value
= n_value
.as(not null)
5590 n_value
.parent
= self
5593 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5595 if _n_id
== old_child
then
5596 n_id
= new_child
.as(TId)
5599 if _n_assign
== old_child
then
5600 n_assign
= new_child
.as(TAssign)
5603 if _n_value
== old_child
then
5604 n_value
= new_child
.as(AExpr)
5609 redef fun n_id
=(node
)
5614 redef fun n_assign
=(node
)
5619 redef fun n_value
=(node
)
5626 redef fun visit_all
(v
: Visitor)
5628 v
.enter_visit
(_n_id
)
5629 v
.enter_visit
(_n_assign
)
5630 v
.enter_visit
(_n_value
)
5633 redef class AVarReassignExpr
5634 init init_avarreassignexpr
(
5636 n_assign_op
: nullable AAssignOp,
5637 n_value
: nullable AExpr
5640 _n_id
= n_id
.as(not null)
5642 _n_assign_op
= n_assign_op
.as(not null)
5643 n_assign_op
.parent
= self
5644 _n_value
= n_value
.as(not null)
5645 n_value
.parent
= self
5648 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5650 if _n_id
== old_child
then
5651 n_id
= new_child
.as(TId)
5654 if _n_assign_op
== old_child
then
5655 n_assign_op
= new_child
.as(AAssignOp)
5658 if _n_value
== old_child
then
5659 n_value
= new_child
.as(AExpr)
5664 redef fun n_id
=(node
)
5669 redef fun n_assign_op
=(node
)
5674 redef fun n_value
=(node
)
5681 redef fun visit_all
(v
: Visitor)
5683 v
.enter_visit
(_n_id
)
5684 v
.enter_visit
(_n_assign_op
)
5685 v
.enter_visit
(_n_value
)
5688 redef class ARangeExpr
5689 init init_arangeexpr
(
5690 n_expr
: nullable AExpr,
5691 n_expr2
: nullable AExpr,
5692 n_annotations
: nullable AAnnotations
5695 _n_expr
= n_expr
.as(not null)
5696 n_expr
.parent
= self
5697 _n_expr2
= n_expr2
.as(not null)
5698 n_expr2
.parent
= self
5699 _n_annotations
= n_annotations
5700 if n_annotations
!= null then n_annotations
.parent
= self
5703 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5705 if _n_expr
== old_child
then
5706 n_expr
= new_child
.as(AExpr)
5709 if _n_expr2
== old_child
then
5710 n_expr2
= new_child
.as(AExpr)
5713 if _n_annotations
== old_child
then
5714 n_annotations
= new_child
.as(nullable AAnnotations)
5719 redef fun n_expr
=(node
)
5724 redef fun n_expr2
=(node
)
5729 redef fun n_annotations
=(node
)
5731 _n_annotations
= node
5732 if node
!= null then node
.parent
= self
5736 redef fun visit_all
(v
: Visitor)
5738 v
.enter_visit
(_n_expr
)
5739 v
.enter_visit
(_n_expr2
)
5740 v
.enter_visit
(_n_annotations
)
5743 redef class ACrangeExpr
5744 init init_acrangeexpr
(
5745 n_obra
: nullable TObra,
5746 n_expr
: nullable AExpr,
5747 n_expr2
: nullable AExpr,
5748 n_cbra
: nullable TCbra,
5749 n_annotations
: nullable AAnnotations
5752 _n_obra
= n_obra
.as(not null)
5753 n_obra
.parent
= self
5754 _n_expr
= n_expr
.as(not null)
5755 n_expr
.parent
= self
5756 _n_expr2
= n_expr2
.as(not null)
5757 n_expr2
.parent
= self
5758 _n_cbra
= n_cbra
.as(not null)
5759 n_cbra
.parent
= self
5760 _n_annotations
= n_annotations
5761 if n_annotations
!= null then n_annotations
.parent
= self
5764 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5766 if _n_obra
== old_child
then
5767 n_obra
= new_child
.as(TObra)
5770 if _n_expr
== old_child
then
5771 n_expr
= new_child
.as(AExpr)
5774 if _n_expr2
== old_child
then
5775 n_expr2
= new_child
.as(AExpr)
5778 if _n_cbra
== old_child
then
5779 n_cbra
= new_child
.as(TCbra)
5782 if _n_annotations
== old_child
then
5783 n_annotations
= new_child
.as(nullable AAnnotations)
5788 redef fun n_obra
=(node
)
5793 redef fun n_expr
=(node
)
5798 redef fun n_expr2
=(node
)
5803 redef fun n_cbra
=(node
)
5808 redef fun n_annotations
=(node
)
5810 _n_annotations
= node
5811 if node
!= null then node
.parent
= self
5815 redef fun visit_all
(v
: Visitor)
5817 v
.enter_visit
(_n_obra
)
5818 v
.enter_visit
(_n_expr
)
5819 v
.enter_visit
(_n_expr2
)
5820 v
.enter_visit
(_n_cbra
)
5821 v
.enter_visit
(_n_annotations
)
5824 redef class AOrangeExpr
5825 init init_aorangeexpr
(
5826 n_obra
: nullable TObra,
5827 n_expr
: nullable AExpr,
5828 n_expr2
: nullable AExpr,
5829 n_cbra
: nullable TObra,
5830 n_annotations
: nullable AAnnotations
5833 _n_obra
= n_obra
.as(not null)
5834 n_obra
.parent
= self
5835 _n_expr
= n_expr
.as(not null)
5836 n_expr
.parent
= self
5837 _n_expr2
= n_expr2
.as(not null)
5838 n_expr2
.parent
= self
5839 _n_cbra
= n_cbra
.as(not null)
5840 n_cbra
.parent
= self
5841 _n_annotations
= n_annotations
5842 if n_annotations
!= null then n_annotations
.parent
= self
5845 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5847 if _n_obra
== old_child
then
5848 n_obra
= new_child
.as(TObra)
5851 if _n_expr
== old_child
then
5852 n_expr
= new_child
.as(AExpr)
5855 if _n_expr2
== old_child
then
5856 n_expr2
= new_child
.as(AExpr)
5859 if _n_cbra
== old_child
then
5860 n_cbra
= new_child
.as(TObra)
5863 if _n_annotations
== old_child
then
5864 n_annotations
= new_child
.as(nullable AAnnotations)
5869 redef fun n_obra
=(node
)
5874 redef fun n_expr
=(node
)
5879 redef fun n_expr2
=(node
)
5884 redef fun n_cbra
=(node
)
5889 redef fun n_annotations
=(node
)
5891 _n_annotations
= node
5892 if node
!= null then node
.parent
= self
5896 redef fun visit_all
(v
: Visitor)
5898 v
.enter_visit
(_n_obra
)
5899 v
.enter_visit
(_n_expr
)
5900 v
.enter_visit
(_n_expr2
)
5901 v
.enter_visit
(_n_cbra
)
5902 v
.enter_visit
(_n_annotations
)
5905 redef class AArrayExpr
5906 init init_aarrayexpr
(
5907 n_obra
: nullable TObra,
5908 n_exprs
: Collection[Object], # Should be Collection[AExpr]
5909 n_type
: nullable AType,
5910 n_cbra
: nullable TCbra,
5911 n_annotations
: nullable AAnnotations
5914 _n_obra
= n_obra
.as(not null)
5915 n_obra
.parent
= self
5916 self.n_exprs
.unsafe_add_all
(n_exprs
)
5918 if n_type
!= null then n_type
.parent
= self
5919 _n_cbra
= n_cbra
.as(not null)
5920 n_cbra
.parent
= self
5921 _n_annotations
= n_annotations
5922 if n_annotations
!= null then n_annotations
.parent
= self
5925 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5927 if _n_obra
== old_child
then
5928 n_obra
= new_child
.as(TObra)
5931 if n_exprs
.replace_child
(old_child
, new_child
) then return
5932 if _n_type
== old_child
then
5933 n_type
= new_child
.as(nullable AType)
5936 if _n_cbra
== old_child
then
5937 n_cbra
= new_child
.as(TCbra)
5940 if _n_annotations
== old_child
then
5941 n_annotations
= new_child
.as(nullable AAnnotations)
5946 redef fun n_obra
=(node
)
5951 redef fun n_type
=(node
)
5954 if node
!= null then node
.parent
= self
5956 redef fun n_cbra
=(node
)
5961 redef fun n_annotations
=(node
)
5963 _n_annotations
= node
5964 if node
!= null then node
.parent
= self
5968 redef fun visit_all
(v
: Visitor)
5970 v
.enter_visit
(_n_obra
)
5971 n_exprs
.visit_all
(v
)
5972 v
.enter_visit
(_n_type
)
5973 v
.enter_visit
(_n_cbra
)
5974 v
.enter_visit
(_n_annotations
)
5977 redef class ASelfExpr
5978 init init_aselfexpr
(
5979 n_kwself
: nullable TKwself,
5980 n_annotations
: nullable AAnnotations
5983 _n_kwself
= n_kwself
.as(not null)
5984 n_kwself
.parent
= self
5985 _n_annotations
= n_annotations
5986 if n_annotations
!= null then n_annotations
.parent
= self
5989 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
5991 if _n_kwself
== old_child
then
5992 n_kwself
= new_child
.as(TKwself)
5995 if _n_annotations
== old_child
then
5996 n_annotations
= new_child
.as(nullable AAnnotations)
6001 redef fun n_kwself
=(node
)
6006 redef fun n_annotations
=(node
)
6008 _n_annotations
= node
6009 if node
!= null then node
.parent
= self
6013 redef fun visit_all
(v
: Visitor)
6015 v
.enter_visit
(_n_kwself
)
6016 v
.enter_visit
(_n_annotations
)
6019 redef class AImplicitSelfExpr
6020 init init_aimplicitselfexpr
6024 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6030 redef fun visit_all
(v
: Visitor)
6034 redef class ATrueExpr
6035 init init_atrueexpr
(
6036 n_kwtrue
: nullable TKwtrue,
6037 n_annotations
: nullable AAnnotations
6040 _n_kwtrue
= n_kwtrue
.as(not null)
6041 n_kwtrue
.parent
= self
6042 _n_annotations
= n_annotations
6043 if n_annotations
!= null then n_annotations
.parent
= self
6046 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6048 if _n_kwtrue
== old_child
then
6049 n_kwtrue
= new_child
.as(TKwtrue)
6052 if _n_annotations
== old_child
then
6053 n_annotations
= new_child
.as(nullable AAnnotations)
6058 redef fun n_kwtrue
=(node
)
6063 redef fun n_annotations
=(node
)
6065 _n_annotations
= node
6066 if node
!= null then node
.parent
= self
6070 redef fun visit_all
(v
: Visitor)
6072 v
.enter_visit
(_n_kwtrue
)
6073 v
.enter_visit
(_n_annotations
)
6076 redef class AFalseExpr
6077 init init_afalseexpr
(
6078 n_kwfalse
: nullable TKwfalse,
6079 n_annotations
: nullable AAnnotations
6082 _n_kwfalse
= n_kwfalse
.as(not null)
6083 n_kwfalse
.parent
= self
6084 _n_annotations
= n_annotations
6085 if n_annotations
!= null then n_annotations
.parent
= self
6088 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6090 if _n_kwfalse
== old_child
then
6091 n_kwfalse
= new_child
.as(TKwfalse)
6094 if _n_annotations
== old_child
then
6095 n_annotations
= new_child
.as(nullable AAnnotations)
6100 redef fun n_kwfalse
=(node
)
6105 redef fun n_annotations
=(node
)
6107 _n_annotations
= node
6108 if node
!= null then node
.parent
= self
6112 redef fun visit_all
(v
: Visitor)
6114 v
.enter_visit
(_n_kwfalse
)
6115 v
.enter_visit
(_n_annotations
)
6118 redef class ANullExpr
6119 init init_anullexpr
(
6120 n_kwnull
: nullable TKwnull,
6121 n_annotations
: nullable AAnnotations
6124 _n_kwnull
= n_kwnull
.as(not null)
6125 n_kwnull
.parent
= self
6126 _n_annotations
= n_annotations
6127 if n_annotations
!= null then n_annotations
.parent
= self
6130 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6132 if _n_kwnull
== old_child
then
6133 n_kwnull
= new_child
.as(TKwnull)
6136 if _n_annotations
== old_child
then
6137 n_annotations
= new_child
.as(nullable AAnnotations)
6142 redef fun n_kwnull
=(node
)
6147 redef fun n_annotations
=(node
)
6149 _n_annotations
= node
6150 if node
!= null then node
.parent
= self
6154 redef fun visit_all
(v
: Visitor)
6156 v
.enter_visit
(_n_kwnull
)
6157 v
.enter_visit
(_n_annotations
)
6160 redef class ADecIntExpr
6161 init init_adecintexpr
(
6162 n_number
: nullable TNumber,
6163 n_annotations
: nullable AAnnotations
6166 _n_number
= n_number
.as(not null)
6167 n_number
.parent
= self
6168 _n_annotations
= n_annotations
6169 if n_annotations
!= null then n_annotations
.parent
= self
6172 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6174 if _n_number
== old_child
then
6175 n_number
= new_child
.as(TNumber)
6178 if _n_annotations
== old_child
then
6179 n_annotations
= new_child
.as(nullable AAnnotations)
6184 redef fun n_number
=(node
)
6189 redef fun n_annotations
=(node
)
6191 _n_annotations
= node
6192 if node
!= null then node
.parent
= self
6196 redef fun visit_all
(v
: Visitor)
6198 v
.enter_visit
(_n_number
)
6199 v
.enter_visit
(_n_annotations
)
6202 redef class AHexIntExpr
6203 init init_ahexintexpr
(
6204 n_hex_number
: nullable THexNumber,
6205 n_annotations
: nullable AAnnotations
6208 _n_hex_number
= n_hex_number
.as(not null)
6209 n_hex_number
.parent
= self
6210 _n_annotations
= n_annotations
6211 if n_annotations
!= null then n_annotations
.parent
= self
6214 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6216 if _n_hex_number
== old_child
then
6217 n_hex_number
= new_child
.as(THexNumber)
6220 if _n_annotations
== old_child
then
6221 n_annotations
= new_child
.as(nullable AAnnotations)
6226 redef fun n_hex_number
=(node
)
6228 _n_hex_number
= node
6231 redef fun n_annotations
=(node
)
6233 _n_annotations
= node
6234 if node
!= null then node
.parent
= self
6238 redef fun visit_all
(v
: Visitor)
6240 v
.enter_visit
(_n_hex_number
)
6241 v
.enter_visit
(_n_annotations
)
6244 redef class AFloatExpr
6245 init init_afloatexpr
(
6246 n_float
: nullable TFloat,
6247 n_annotations
: nullable AAnnotations
6250 _n_float
= n_float
.as(not null)
6251 n_float
.parent
= self
6252 _n_annotations
= n_annotations
6253 if n_annotations
!= null then n_annotations
.parent
= self
6256 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6258 if _n_float
== old_child
then
6259 n_float
= new_child
.as(TFloat)
6262 if _n_annotations
== old_child
then
6263 n_annotations
= new_child
.as(nullable AAnnotations)
6268 redef fun n_float
=(node
)
6273 redef fun n_annotations
=(node
)
6275 _n_annotations
= node
6276 if node
!= null then node
.parent
= self
6280 redef fun visit_all
(v
: Visitor)
6282 v
.enter_visit
(_n_float
)
6283 v
.enter_visit
(_n_annotations
)
6286 redef class ACharExpr
6287 init init_acharexpr
(
6288 n_char
: nullable TChar,
6289 n_annotations
: nullable AAnnotations
6292 _n_char
= n_char
.as(not null)
6293 n_char
.parent
= self
6294 _n_annotations
= n_annotations
6295 if n_annotations
!= null then n_annotations
.parent
= self
6298 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6300 if _n_char
== old_child
then
6301 n_char
= new_child
.as(TChar)
6304 if _n_annotations
== old_child
then
6305 n_annotations
= new_child
.as(nullable AAnnotations)
6310 redef fun n_char
=(node
)
6315 redef fun n_annotations
=(node
)
6317 _n_annotations
= node
6318 if node
!= null then node
.parent
= self
6322 redef fun visit_all
(v
: Visitor)
6324 v
.enter_visit
(_n_char
)
6325 v
.enter_visit
(_n_annotations
)
6328 redef class AStringExpr
6329 init init_astringexpr
(
6330 n_string
: nullable TString,
6331 n_annotations
: nullable AAnnotations
6334 _n_string
= n_string
.as(not null)
6335 n_string
.parent
= self
6336 _n_annotations
= n_annotations
6337 if n_annotations
!= null then n_annotations
.parent
= self
6340 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6342 if _n_string
== old_child
then
6343 n_string
= new_child
.as(TString)
6346 if _n_annotations
== old_child
then
6347 n_annotations
= new_child
.as(nullable AAnnotations)
6352 redef fun n_string
=(node
)
6357 redef fun n_annotations
=(node
)
6359 _n_annotations
= node
6360 if node
!= null then node
.parent
= self
6364 redef fun visit_all
(v
: Visitor)
6366 v
.enter_visit
(_n_string
)
6367 v
.enter_visit
(_n_annotations
)
6370 redef class AStartStringExpr
6371 init init_astartstringexpr
(
6372 n_string
: nullable TStartString
6375 _n_string
= n_string
.as(not null)
6376 n_string
.parent
= self
6379 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6381 if _n_string
== old_child
then
6382 n_string
= new_child
.as(TStartString)
6387 redef fun n_string
=(node
)
6394 redef fun visit_all
(v
: Visitor)
6396 v
.enter_visit
(_n_string
)
6399 redef class AMidStringExpr
6400 init init_amidstringexpr
(
6401 n_string
: nullable TMidString
6404 _n_string
= n_string
.as(not null)
6405 n_string
.parent
= self
6408 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6410 if _n_string
== old_child
then
6411 n_string
= new_child
.as(TMidString)
6416 redef fun n_string
=(node
)
6423 redef fun visit_all
(v
: Visitor)
6425 v
.enter_visit
(_n_string
)
6428 redef class AEndStringExpr
6429 init init_aendstringexpr
(
6430 n_string
: nullable TEndString
6433 _n_string
= n_string
.as(not null)
6434 n_string
.parent
= self
6437 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6439 if _n_string
== old_child
then
6440 n_string
= new_child
.as(TEndString)
6445 redef fun n_string
=(node
)
6452 redef fun visit_all
(v
: Visitor)
6454 v
.enter_visit
(_n_string
)
6457 redef class ASuperstringExpr
6458 init init_asuperstringexpr
(
6459 n_exprs
: Collection[Object], # Should be Collection[AExpr]
6460 n_annotations
: nullable AAnnotations
6463 self.n_exprs
.unsafe_add_all
(n_exprs
)
6464 _n_annotations
= n_annotations
6465 if n_annotations
!= null then n_annotations
.parent
= self
6468 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6470 if n_exprs
.replace_child
(old_child
, new_child
) then return
6471 if _n_annotations
== old_child
then
6472 n_annotations
= new_child
.as(nullable AAnnotations)
6477 redef fun n_annotations
=(node
)
6479 _n_annotations
= node
6480 if node
!= null then node
.parent
= self
6484 redef fun visit_all
(v
: Visitor)
6486 n_exprs
.visit_all
(v
)
6487 v
.enter_visit
(_n_annotations
)
6490 redef class AParExpr
6491 init init_aparexpr
(
6492 n_opar
: nullable TOpar,
6493 n_expr
: nullable AExpr,
6494 n_cpar
: nullable TCpar,
6495 n_annotations
: nullable AAnnotations
6498 _n_opar
= n_opar
.as(not null)
6499 n_opar
.parent
= self
6500 _n_expr
= n_expr
.as(not null)
6501 n_expr
.parent
= self
6502 _n_cpar
= n_cpar
.as(not null)
6503 n_cpar
.parent
= self
6504 _n_annotations
= n_annotations
6505 if n_annotations
!= null then n_annotations
.parent
= self
6508 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6510 if _n_opar
== old_child
then
6511 n_opar
= new_child
.as(TOpar)
6514 if _n_expr
== old_child
then
6515 n_expr
= new_child
.as(AExpr)
6518 if _n_cpar
== old_child
then
6519 n_cpar
= new_child
.as(TCpar)
6522 if _n_annotations
== old_child
then
6523 n_annotations
= new_child
.as(nullable AAnnotations)
6528 redef fun n_opar
=(node
)
6533 redef fun n_expr
=(node
)
6538 redef fun n_cpar
=(node
)
6543 redef fun n_annotations
=(node
)
6545 _n_annotations
= node
6546 if node
!= null then node
.parent
= self
6550 redef fun visit_all
(v
: Visitor)
6552 v
.enter_visit
(_n_opar
)
6553 v
.enter_visit
(_n_expr
)
6554 v
.enter_visit
(_n_cpar
)
6555 v
.enter_visit
(_n_annotations
)
6558 redef class AAsCastExpr
6559 init init_aascastexpr
(
6560 n_expr
: nullable AExpr,
6561 n_kwas
: nullable TKwas,
6562 n_opar
: nullable TOpar,
6563 n_type
: nullable AType,
6564 n_cpar
: nullable TCpar
6567 _n_expr
= n_expr
.as(not null)
6568 n_expr
.parent
= self
6569 _n_kwas
= n_kwas
.as(not null)
6570 n_kwas
.parent
= self
6572 if n_opar
!= null then n_opar
.parent
= self
6573 _n_type
= n_type
.as(not null)
6574 n_type
.parent
= self
6576 if n_cpar
!= null then n_cpar
.parent
= self
6579 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6581 if _n_expr
== old_child
then
6582 n_expr
= new_child
.as(AExpr)
6585 if _n_kwas
== old_child
then
6586 n_kwas
= new_child
.as(TKwas)
6589 if _n_opar
== old_child
then
6590 n_opar
= new_child
.as(nullable TOpar)
6593 if _n_type
== old_child
then
6594 n_type
= new_child
.as(AType)
6597 if _n_cpar
== old_child
then
6598 n_cpar
= new_child
.as(nullable TCpar)
6603 redef fun n_expr
=(node
)
6608 redef fun n_kwas
=(node
)
6613 redef fun n_opar
=(node
)
6616 if node
!= null then node
.parent
= self
6618 redef fun n_type
=(node
)
6623 redef fun n_cpar
=(node
)
6626 if node
!= null then node
.parent
= self
6630 redef fun visit_all
(v
: Visitor)
6632 v
.enter_visit
(_n_expr
)
6633 v
.enter_visit
(_n_kwas
)
6634 v
.enter_visit
(_n_opar
)
6635 v
.enter_visit
(_n_type
)
6636 v
.enter_visit
(_n_cpar
)
6639 redef class AAsNotnullExpr
6640 init init_aasnotnullexpr
(
6641 n_expr
: nullable AExpr,
6642 n_kwas
: nullable TKwas,
6643 n_opar
: nullable TOpar,
6644 n_kwnot
: nullable TKwnot,
6645 n_kwnull
: nullable TKwnull,
6646 n_cpar
: nullable TCpar
6649 _n_expr
= n_expr
.as(not null)
6650 n_expr
.parent
= self
6651 _n_kwas
= n_kwas
.as(not null)
6652 n_kwas
.parent
= self
6654 if n_opar
!= null then n_opar
.parent
= self
6655 _n_kwnot
= n_kwnot
.as(not null)
6656 n_kwnot
.parent
= self
6657 _n_kwnull
= n_kwnull
.as(not null)
6658 n_kwnull
.parent
= self
6660 if n_cpar
!= null then n_cpar
.parent
= self
6663 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6665 if _n_expr
== old_child
then
6666 n_expr
= new_child
.as(AExpr)
6669 if _n_kwas
== old_child
then
6670 n_kwas
= new_child
.as(TKwas)
6673 if _n_opar
== old_child
then
6674 n_opar
= new_child
.as(nullable TOpar)
6677 if _n_kwnot
== old_child
then
6678 n_kwnot
= new_child
.as(TKwnot)
6681 if _n_kwnull
== old_child
then
6682 n_kwnull
= new_child
.as(TKwnull)
6685 if _n_cpar
== old_child
then
6686 n_cpar
= new_child
.as(nullable TCpar)
6691 redef fun n_expr
=(node
)
6696 redef fun n_kwas
=(node
)
6701 redef fun n_opar
=(node
)
6704 if node
!= null then node
.parent
= self
6706 redef fun n_kwnot
=(node
)
6711 redef fun n_kwnull
=(node
)
6716 redef fun n_cpar
=(node
)
6719 if node
!= null then node
.parent
= self
6723 redef fun visit_all
(v
: Visitor)
6725 v
.enter_visit
(_n_expr
)
6726 v
.enter_visit
(_n_kwas
)
6727 v
.enter_visit
(_n_opar
)
6728 v
.enter_visit
(_n_kwnot
)
6729 v
.enter_visit
(_n_kwnull
)
6730 v
.enter_visit
(_n_cpar
)
6733 redef class AIssetAttrExpr
6734 init init_aissetattrexpr
(
6735 n_kwisset
: nullable TKwisset,
6736 n_expr
: nullable AExpr,
6737 n_id
: nullable TAttrid
6740 _n_kwisset
= n_kwisset
.as(not null)
6741 n_kwisset
.parent
= self
6742 _n_expr
= n_expr
.as(not null)
6743 n_expr
.parent
= self
6744 _n_id
= n_id
.as(not null)
6748 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6750 if _n_kwisset
== old_child
then
6751 n_kwisset
= new_child
.as(TKwisset)
6754 if _n_expr
== old_child
then
6755 n_expr
= new_child
.as(AExpr)
6758 if _n_id
== old_child
then
6759 n_id
= new_child
.as(TAttrid)
6764 redef fun n_kwisset
=(node
)
6769 redef fun n_expr
=(node
)
6774 redef fun n_id
=(node
)
6781 redef fun visit_all
(v
: Visitor)
6783 v
.enter_visit
(_n_kwisset
)
6784 v
.enter_visit
(_n_expr
)
6785 v
.enter_visit
(_n_id
)
6788 redef class ADebugTypeExpr
6789 init init_adebugtypeexpr
(
6790 n_kwdebug
: nullable TKwdebug,
6791 n_kwtype
: nullable TKwtype,
6792 n_expr
: nullable AExpr,
6793 n_type
: nullable AType
6796 _n_kwdebug
= n_kwdebug
.as(not null)
6797 n_kwdebug
.parent
= self
6798 _n_kwtype
= n_kwtype
.as(not null)
6799 n_kwtype
.parent
= self
6800 _n_expr
= n_expr
.as(not null)
6801 n_expr
.parent
= self
6802 _n_type
= n_type
.as(not null)
6803 n_type
.parent
= self
6806 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6808 if _n_kwdebug
== old_child
then
6809 n_kwdebug
= new_child
.as(TKwdebug)
6812 if _n_kwtype
== old_child
then
6813 n_kwtype
= new_child
.as(TKwtype)
6816 if _n_expr
== old_child
then
6817 n_expr
= new_child
.as(AExpr)
6820 if _n_type
== old_child
then
6821 n_type
= new_child
.as(AType)
6826 redef fun n_kwdebug
=(node
)
6831 redef fun n_kwtype
=(node
)
6836 redef fun n_expr
=(node
)
6841 redef fun n_type
=(node
)
6848 redef fun visit_all
(v
: Visitor)
6850 v
.enter_visit
(_n_kwdebug
)
6851 v
.enter_visit
(_n_kwtype
)
6852 v
.enter_visit
(_n_expr
)
6853 v
.enter_visit
(_n_type
)
6856 redef class AVarargExpr
6857 init init_avarargexpr
(
6858 n_expr
: nullable AExpr,
6859 n_dotdotdot
: nullable TDotdotdot
6862 _n_expr
= n_expr
.as(not null)
6863 n_expr
.parent
= self
6864 _n_dotdotdot
= n_dotdotdot
.as(not null)
6865 n_dotdotdot
.parent
= self
6868 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6870 if _n_expr
== old_child
then
6871 n_expr
= new_child
.as(AExpr)
6874 if _n_dotdotdot
== old_child
then
6875 n_dotdotdot
= new_child
.as(TDotdotdot)
6880 redef fun n_expr
=(node
)
6885 redef fun n_dotdotdot
=(node
)
6892 redef fun visit_all
(v
: Visitor)
6894 v
.enter_visit
(_n_expr
)
6895 v
.enter_visit
(_n_dotdotdot
)
6898 redef class ANamedargExpr
6899 init init_anamedargexpr
(
6901 n_assign
: nullable TAssign,
6902 n_expr
: nullable AExpr
6905 _n_id
= n_id
.as(not null)
6907 _n_assign
= n_assign
.as(not null)
6908 n_assign
.parent
= self
6909 _n_expr
= n_expr
.as(not null)
6910 n_expr
.parent
= self
6913 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6915 if _n_id
== old_child
then
6916 n_id
= new_child
.as(TId)
6919 if _n_assign
== old_child
then
6920 n_assign
= new_child
.as(TAssign)
6923 if _n_expr
== old_child
then
6924 n_expr
= new_child
.as(AExpr)
6929 redef fun n_id
=(node
)
6934 redef fun n_assign
=(node
)
6939 redef fun n_expr
=(node
)
6946 redef fun visit_all
(v
: Visitor)
6948 v
.enter_visit
(_n_id
)
6949 v
.enter_visit
(_n_assign
)
6950 v
.enter_visit
(_n_expr
)
6953 redef class ATypeExpr
6954 init init_atypeexpr
(
6955 n_type
: nullable AType
6958 _n_type
= n_type
.as(not null)
6959 n_type
.parent
= self
6962 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6964 if _n_type
== old_child
then
6965 n_type
= new_child
.as(AType)
6970 redef fun n_type
=(node
)
6977 redef fun visit_all
(v
: Visitor)
6979 v
.enter_visit
(_n_type
)
6982 redef class AMethidExpr
6983 init init_amethidexpr
(
6984 n_expr
: nullable AExpr,
6985 n_id
: nullable AMethid
6988 _n_expr
= n_expr
.as(not null)
6989 n_expr
.parent
= self
6990 _n_id
= n_id
.as(not null)
6994 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
6996 if _n_expr
== old_child
then
6997 n_expr
= new_child
.as(AExpr)
7000 if _n_id
== old_child
then
7001 n_id
= new_child
.as(AMethid)
7006 redef fun n_expr
=(node
)
7011 redef fun n_id
=(node
)
7018 redef fun visit_all
(v
: Visitor)
7020 v
.enter_visit
(_n_expr
)
7021 v
.enter_visit
(_n_id
)
7026 n_annotations
: nullable AAnnotations
7029 _n_annotations
= n_annotations
.as(not null)
7030 n_annotations
.parent
= self
7033 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7035 if _n_annotations
== old_child
then
7036 n_annotations
= new_child
.as(AAnnotations)
7041 redef fun n_annotations
=(node
)
7043 _n_annotations
= node
7048 redef fun visit_all
(v
: Visitor)
7050 v
.enter_visit
(_n_annotations
)
7053 redef class AManyExpr
7054 init init_amanyexpr
(
7055 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7058 self.n_exprs
.unsafe_add_all
(n_exprs
)
7061 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7063 if n_exprs
.replace_child
(old_child
, new_child
) then return
7068 redef fun visit_all
(v
: Visitor)
7070 n_exprs
.visit_all
(v
)
7073 redef class AListExprs
7074 init init_alistexprs
(
7075 n_exprs
: Collection[Object] # Should be Collection[AExpr]
7078 self.n_exprs
.unsafe_add_all
(n_exprs
)
7081 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7083 if n_exprs
.replace_child
(old_child
, new_child
) then return
7088 redef fun visit_all
(v
: Visitor)
7090 n_exprs
.visit_all
(v
)
7093 redef class AParExprs
7094 init init_aparexprs
(
7095 n_opar
: nullable TOpar,
7096 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7097 n_cpar
: nullable TCpar
7100 _n_opar
= n_opar
.as(not null)
7101 n_opar
.parent
= self
7102 self.n_exprs
.unsafe_add_all
(n_exprs
)
7103 _n_cpar
= n_cpar
.as(not null)
7104 n_cpar
.parent
= self
7107 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7109 if _n_opar
== old_child
then
7110 n_opar
= new_child
.as(TOpar)
7113 if n_exprs
.replace_child
(old_child
, new_child
) then return
7114 if _n_cpar
== old_child
then
7115 n_cpar
= new_child
.as(TCpar)
7120 redef fun n_opar
=(node
)
7125 redef fun n_cpar
=(node
)
7132 redef fun visit_all
(v
: Visitor)
7134 v
.enter_visit
(_n_opar
)
7135 n_exprs
.visit_all
(v
)
7136 v
.enter_visit
(_n_cpar
)
7139 redef class ABraExprs
7140 init init_abraexprs
(
7141 n_obra
: nullable TObra,
7142 n_exprs
: Collection[Object], # Should be Collection[AExpr]
7143 n_cbra
: nullable TCbra
7146 _n_obra
= n_obra
.as(not null)
7147 n_obra
.parent
= self
7148 self.n_exprs
.unsafe_add_all
(n_exprs
)
7149 _n_cbra
= n_cbra
.as(not null)
7150 n_cbra
.parent
= self
7153 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7155 if _n_obra
== old_child
then
7156 n_obra
= new_child
.as(TObra)
7159 if n_exprs
.replace_child
(old_child
, new_child
) then return
7160 if _n_cbra
== old_child
then
7161 n_cbra
= new_child
.as(TCbra)
7166 redef fun n_obra
=(node
)
7171 redef fun n_cbra
=(node
)
7178 redef fun visit_all
(v
: Visitor)
7180 v
.enter_visit
(_n_obra
)
7181 n_exprs
.visit_all
(v
)
7182 v
.enter_visit
(_n_cbra
)
7185 redef class APlusAssignOp
7186 init init_aplusassignop
(
7187 n_op
: nullable TPluseq
7190 _n_op
= n_op
.as(not null)
7194 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7196 if _n_op
== old_child
then
7197 n_op
= new_child
.as(TPluseq)
7202 redef fun n_op
=(node
)
7209 redef fun visit_all
(v
: Visitor)
7211 v
.enter_visit
(_n_op
)
7214 redef class AMinusAssignOp
7215 init init_aminusassignop
(
7216 n_op
: nullable TMinuseq
7219 _n_op
= n_op
.as(not null)
7223 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7225 if _n_op
== old_child
then
7226 n_op
= new_child
.as(TMinuseq)
7231 redef fun n_op
=(node
)
7238 redef fun visit_all
(v
: Visitor)
7240 v
.enter_visit
(_n_op
)
7243 redef class AStarAssignOp
7244 init init_astarassignop
(
7245 n_op
: nullable TStareq
7248 _n_op
= n_op
.as(not null)
7252 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7254 if _n_op
== old_child
then
7255 n_op
= new_child
.as(TStareq)
7260 redef fun n_op
=(node
)
7267 redef fun visit_all
(v
: Visitor)
7269 v
.enter_visit
(_n_op
)
7272 redef class ASlashAssignOp
7273 init init_aslashassignop
(
7274 n_op
: nullable TSlasheq
7277 _n_op
= n_op
.as(not null)
7281 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7283 if _n_op
== old_child
then
7284 n_op
= new_child
.as(TSlasheq)
7289 redef fun n_op
=(node
)
7296 redef fun visit_all
(v
: Visitor)
7298 v
.enter_visit
(_n_op
)
7301 redef class APercentAssignOp
7302 init init_apercentassignop
(
7303 n_op
: nullable TPercenteq
7306 _n_op
= n_op
.as(not null)
7310 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7312 if _n_op
== old_child
then
7313 n_op
= new_child
.as(TPercenteq)
7318 redef fun n_op
=(node
)
7325 redef fun visit_all
(v
: Visitor)
7327 v
.enter_visit
(_n_op
)
7330 redef class AStarstarAssignOp
7331 init init_astarstarassignop
(
7332 n_op
: nullable TStarstareq
7335 _n_op
= n_op
.as(not null)
7339 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7341 if _n_op
== old_child
then
7342 n_op
= new_child
.as(TStarstareq)
7347 redef fun n_op
=(node
)
7354 redef fun visit_all
(v
: Visitor)
7356 v
.enter_visit
(_n_op
)
7359 redef class APipeAssignOp
7360 init init_apipeassignop
(
7361 n_op
: nullable TPipeeq
7364 _n_op
= n_op
.as(not null)
7368 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7370 if _n_op
== old_child
then
7371 n_op
= new_child
.as(TPipeeq)
7376 redef fun n_op
=(node
)
7383 redef fun visit_all
(v
: Visitor)
7385 v
.enter_visit
(_n_op
)
7388 redef class ACaretAssignOp
7389 init init_acaretassignop
(
7390 n_op
: nullable TCareteq
7393 _n_op
= n_op
.as(not null)
7397 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7399 if _n_op
== old_child
then
7400 n_op
= new_child
.as(TCareteq)
7405 redef fun n_op
=(node
)
7412 redef fun visit_all
(v
: Visitor)
7414 v
.enter_visit
(_n_op
)
7417 redef class AAmpAssignOp
7418 init init_aampassignop
(
7419 n_op
: nullable TAmpeq
7422 _n_op
= n_op
.as(not null)
7426 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7428 if _n_op
== old_child
then
7429 n_op
= new_child
.as(TAmpeq)
7434 redef fun n_op
=(node
)
7441 redef fun visit_all
(v
: Visitor)
7443 v
.enter_visit
(_n_op
)
7446 redef class ALlAssignOp
7447 init init_allassignop
(
7448 n_op
: nullable TLleq
7451 _n_op
= n_op
.as(not null)
7455 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7457 if _n_op
== old_child
then
7458 n_op
= new_child
.as(TLleq)
7463 redef fun n_op
=(node
)
7470 redef fun visit_all
(v
: Visitor)
7472 v
.enter_visit
(_n_op
)
7475 redef class AGgAssignOp
7476 init init_aggassignop
(
7477 n_op
: nullable TGgeq
7480 _n_op
= n_op
.as(not null)
7484 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7486 if _n_op
== old_child
then
7487 n_op
= new_child
.as(TGgeq)
7492 redef fun n_op
=(node
)
7499 redef fun visit_all
(v
: Visitor)
7501 v
.enter_visit
(_n_op
)
7504 redef class AModuleName
7505 init init_amodulename
(
7506 n_quad
: nullable TQuad,
7507 n_path
: Collection[Object], # Should be Collection[TId]
7512 if n_quad
!= null then n_quad
.parent
= self
7513 self.n_path
.unsafe_add_all
(n_path
)
7514 _n_id
= n_id
.as(not null)
7518 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7520 if _n_quad
== old_child
then
7521 n_quad
= new_child
.as(nullable TQuad)
7524 if n_path
.replace_child
(old_child
, new_child
) then return
7525 if _n_id
== old_child
then
7526 n_id
= new_child
.as(TId)
7531 redef fun n_quad
=(node
)
7534 if node
!= null then node
.parent
= self
7536 redef fun n_id
=(node
)
7543 redef fun visit_all
(v
: Visitor)
7545 v
.enter_visit
(_n_quad
)
7547 v
.enter_visit
(_n_id
)
7550 redef class AExternCalls
7551 init init_aexterncalls
(
7552 n_kwimport
: nullable TKwimport,
7553 n_extern_calls
: Collection[Object] # Should be Collection[AExternCall]
7556 _n_kwimport
= n_kwimport
.as(not null)
7557 n_kwimport
.parent
= self
7558 self.n_extern_calls
.unsafe_add_all
(n_extern_calls
)
7561 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7563 if _n_kwimport
== old_child
then
7564 n_kwimport
= new_child
.as(TKwimport)
7567 if n_extern_calls
.replace_child
(old_child
, new_child
) then return
7570 redef fun n_kwimport
=(node
)
7577 redef fun visit_all
(v
: Visitor)
7579 v
.enter_visit
(_n_kwimport
)
7580 n_extern_calls
.visit_all
(v
)
7583 redef class AExternCall
7584 init init_aexterncall
7588 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7594 redef fun visit_all
(v
: Visitor)
7598 redef class ASuperExternCall
7599 init init_asuperexterncall
(
7600 n_kwsuper
: nullable TKwsuper
7603 _n_kwsuper
= n_kwsuper
.as(not null)
7604 n_kwsuper
.parent
= self
7607 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7609 if _n_kwsuper
== old_child
then
7610 n_kwsuper
= new_child
.as(TKwsuper)
7615 redef fun n_kwsuper
=(node
)
7622 redef fun visit_all
(v
: Visitor)
7624 v
.enter_visit
(_n_kwsuper
)
7627 redef class ALocalPropExternCall
7628 init init_alocalpropexterncall
(
7629 n_methid
: nullable AMethid
7632 _n_methid
= n_methid
.as(not null)
7633 n_methid
.parent
= self
7636 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7638 if _n_methid
== old_child
then
7639 n_methid
= new_child
.as(AMethid)
7644 redef fun n_methid
=(node
)
7651 redef fun visit_all
(v
: Visitor)
7653 v
.enter_visit
(_n_methid
)
7656 redef class AFullPropExternCall
7657 init init_afullpropexterncall
(
7658 n_type
: nullable AType,
7659 n_dot
: nullable TDot,
7660 n_methid
: nullable AMethid
7663 _n_type
= n_type
.as(not null)
7664 n_type
.parent
= self
7666 if n_dot
!= null then n_dot
.parent
= self
7667 _n_methid
= n_methid
.as(not null)
7668 n_methid
.parent
= self
7671 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7673 if _n_type
== old_child
then
7674 n_type
= new_child
.as(AType)
7677 if _n_dot
== old_child
then
7678 n_dot
= new_child
.as(nullable TDot)
7681 if _n_methid
== old_child
then
7682 n_methid
= new_child
.as(AMethid)
7687 redef fun n_type
=(node
)
7692 redef fun n_dot
=(node
)
7695 if node
!= null then node
.parent
= self
7697 redef fun n_methid
=(node
)
7704 redef fun visit_all
(v
: Visitor)
7706 v
.enter_visit
(_n_type
)
7707 v
.enter_visit
(_n_dot
)
7708 v
.enter_visit
(_n_methid
)
7711 redef class AInitPropExternCall
7712 init init_ainitpropexterncall
(
7713 n_type
: nullable AType
7716 _n_type
= n_type
.as(not null)
7717 n_type
.parent
= self
7720 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7722 if _n_type
== old_child
then
7723 n_type
= new_child
.as(AType)
7728 redef fun n_type
=(node
)
7735 redef fun visit_all
(v
: Visitor)
7737 v
.enter_visit
(_n_type
)
7740 redef class ACastAsExternCall
7741 init init_acastasexterncall
(
7742 n_from_type
: nullable AType,
7743 n_dot
: nullable TDot,
7744 n_kwas
: nullable TKwas,
7745 n_to_type
: nullable AType
7748 _n_from_type
= n_from_type
.as(not null)
7749 n_from_type
.parent
= self
7751 if n_dot
!= null then n_dot
.parent
= self
7752 _n_kwas
= n_kwas
.as(not null)
7753 n_kwas
.parent
= self
7754 _n_to_type
= n_to_type
.as(not null)
7755 n_to_type
.parent
= self
7758 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7760 if _n_from_type
== old_child
then
7761 n_from_type
= new_child
.as(AType)
7764 if _n_dot
== old_child
then
7765 n_dot
= new_child
.as(nullable TDot)
7768 if _n_kwas
== old_child
then
7769 n_kwas
= new_child
.as(TKwas)
7772 if _n_to_type
== old_child
then
7773 n_to_type
= new_child
.as(AType)
7778 redef fun n_from_type
=(node
)
7783 redef fun n_dot
=(node
)
7786 if node
!= null then node
.parent
= self
7788 redef fun n_kwas
=(node
)
7793 redef fun n_to_type
=(node
)
7800 redef fun visit_all
(v
: Visitor)
7802 v
.enter_visit
(_n_from_type
)
7803 v
.enter_visit
(_n_dot
)
7804 v
.enter_visit
(_n_kwas
)
7805 v
.enter_visit
(_n_to_type
)
7808 redef class AAsNullableExternCall
7809 init init_aasnullableexterncall
(
7810 n_type
: nullable AType,
7811 n_kwas
: nullable TKwas,
7812 n_kwnullable
: nullable TKwnullable
7815 _n_type
= n_type
.as(not null)
7816 n_type
.parent
= self
7817 _n_kwas
= n_kwas
.as(not null)
7818 n_kwas
.parent
= self
7819 _n_kwnullable
= n_kwnullable
.as(not null)
7820 n_kwnullable
.parent
= self
7823 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7825 if _n_type
== old_child
then
7826 n_type
= new_child
.as(AType)
7829 if _n_kwas
== old_child
then
7830 n_kwas
= new_child
.as(TKwas)
7833 if _n_kwnullable
== old_child
then
7834 n_kwnullable
= new_child
.as(TKwnullable)
7839 redef fun n_type
=(node
)
7844 redef fun n_kwas
=(node
)
7849 redef fun n_kwnullable
=(node
)
7851 _n_kwnullable
= node
7856 redef fun visit_all
(v
: Visitor)
7858 v
.enter_visit
(_n_type
)
7859 v
.enter_visit
(_n_kwas
)
7860 v
.enter_visit
(_n_kwnullable
)
7863 redef class AAsNotNullableExternCall
7864 init init_aasnotnullableexterncall
(
7865 n_type
: nullable AType,
7866 n_kwas
: nullable TKwas,
7867 n_kwnot
: nullable TKwnot,
7868 n_kwnullable
: nullable TKwnullable
7871 _n_type
= n_type
.as(not null)
7872 n_type
.parent
= self
7873 _n_kwas
= n_kwas
.as(not null)
7874 n_kwas
.parent
= self
7875 _n_kwnot
= n_kwnot
.as(not null)
7876 n_kwnot
.parent
= self
7877 _n_kwnullable
= n_kwnullable
.as(not null)
7878 n_kwnullable
.parent
= self
7881 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7883 if _n_type
== old_child
then
7884 n_type
= new_child
.as(AType)
7887 if _n_kwas
== old_child
then
7888 n_kwas
= new_child
.as(TKwas)
7891 if _n_kwnot
== old_child
then
7892 n_kwnot
= new_child
.as(TKwnot)
7895 if _n_kwnullable
== old_child
then
7896 n_kwnullable
= new_child
.as(TKwnullable)
7901 redef fun n_type
=(node
)
7906 redef fun n_kwas
=(node
)
7911 redef fun n_kwnot
=(node
)
7916 redef fun n_kwnullable
=(node
)
7918 _n_kwnullable
= node
7923 redef fun visit_all
(v
: Visitor)
7925 v
.enter_visit
(_n_type
)
7926 v
.enter_visit
(_n_kwas
)
7927 v
.enter_visit
(_n_kwnot
)
7928 v
.enter_visit
(_n_kwnullable
)
7931 redef class AInLanguage
7932 init init_ainlanguage
(
7933 n_kwin
: nullable TKwin,
7934 n_string
: nullable TString
7937 _n_kwin
= n_kwin
.as(not null)
7938 n_kwin
.parent
= self
7939 _n_string
= n_string
.as(not null)
7940 n_string
.parent
= self
7943 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7945 if _n_kwin
== old_child
then
7946 n_kwin
= new_child
.as(TKwin)
7949 if _n_string
== old_child
then
7950 n_string
= new_child
.as(TString)
7955 redef fun n_kwin
=(node
)
7960 redef fun n_string
=(node
)
7967 redef fun visit_all
(v
: Visitor)
7969 v
.enter_visit
(_n_kwin
)
7970 v
.enter_visit
(_n_string
)
7973 redef class AExternCodeBlock
7974 init init_aexterncodeblock
(
7975 n_in_language
: nullable AInLanguage,
7976 n_extern_code_segment
: nullable TExternCodeSegment
7979 _n_in_language
= n_in_language
7980 if n_in_language
!= null then n_in_language
.parent
= self
7981 _n_extern_code_segment
= n_extern_code_segment
.as(not null)
7982 n_extern_code_segment
.parent
= self
7985 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
7987 if _n_in_language
== old_child
then
7988 n_in_language
= new_child
.as(nullable AInLanguage)
7991 if _n_extern_code_segment
== old_child
then
7992 n_extern_code_segment
= new_child
.as(TExternCodeSegment)
7997 redef fun n_in_language
=(node
)
7999 _n_in_language
= node
8000 if node
!= null then node
.parent
= self
8002 redef fun n_extern_code_segment
=(node
)
8004 _n_extern_code_segment
= node
8009 redef fun visit_all
(v
: Visitor)
8011 v
.enter_visit
(_n_in_language
)
8012 v
.enter_visit
(_n_extern_code_segment
)
8015 redef class AQualified
8016 init init_aqualified
(
8017 n_id
: Collection[Object], # Should be Collection[TId]
8018 n_classid
: nullable TClassid
8021 self.n_id
.unsafe_add_all
(n_id
)
8022 _n_classid
= n_classid
8023 if n_classid
!= null then n_classid
.parent
= self
8026 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8028 if n_id
.replace_child
(old_child
, new_child
) then return
8029 if _n_classid
== old_child
then
8030 n_classid
= new_child
.as(nullable TClassid)
8035 redef fun n_classid
=(node
)
8038 if node
!= null then node
.parent
= self
8042 redef fun visit_all
(v
: Visitor)
8045 v
.enter_visit
(_n_classid
)
8050 n_comment
: Collection[Object] # Should be Collection[TComment]
8053 self.n_comment
.unsafe_add_all
(n_comment
)
8056 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8058 if n_comment
.replace_child
(old_child
, new_child
) then return
8063 redef fun visit_all
(v
: Visitor)
8065 n_comment
.visit_all
(v
)
8068 redef class AAnnotations
8069 init init_aannotations
(
8071 n_opar
: nullable TOpar,
8072 n_items
: Collection[Object], # Should be Collection[AAnnotation]
8073 n_cpar
: nullable TCpar
8077 if n_at
!= null then n_at
.parent
= self
8079 if n_opar
!= null then n_opar
.parent
= self
8080 self.n_items
.unsafe_add_all
(n_items
)
8082 if n_cpar
!= null then n_cpar
.parent
= self
8085 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8087 if _n_at
== old_child
then
8088 n_at
= new_child
.as(nullable TAt)
8091 if _n_opar
== old_child
then
8092 n_opar
= new_child
.as(nullable TOpar)
8095 if n_items
.replace_child
(old_child
, new_child
) then return
8096 if _n_cpar
== old_child
then
8097 n_cpar
= new_child
.as(nullable TCpar)
8102 redef fun n_at
=(node
)
8105 if node
!= null then node
.parent
= self
8107 redef fun n_opar
=(node
)
8110 if node
!= null then node
.parent
= self
8112 redef fun n_cpar
=(node
)
8115 if node
!= null then node
.parent
= self
8119 redef fun visit_all
(v
: Visitor)
8121 v
.enter_visit
(_n_at
)
8122 v
.enter_visit
(_n_opar
)
8123 n_items
.visit_all
(v
)
8124 v
.enter_visit
(_n_cpar
)
8127 redef class AAnnotation
8128 init init_aannotation
(
8129 n_doc
: nullable ADoc,
8130 n_kwredef
: nullable TKwredef,
8131 n_visibility
: nullable AVisibility,
8132 n_atid
: nullable AAtid,
8133 n_opar
: nullable TOpar,
8134 n_args
: Collection[Object], # Should be Collection[AExpr]
8135 n_cpar
: nullable TCpar,
8136 n_annotations
: nullable AAnnotations
8140 if n_doc
!= null then n_doc
.parent
= self
8141 _n_kwredef
= n_kwredef
8142 if n_kwredef
!= null then n_kwredef
.parent
= self
8143 _n_visibility
= n_visibility
8144 if n_visibility
!= null then n_visibility
.parent
= self
8145 _n_atid
= n_atid
.as(not null)
8146 n_atid
.parent
= self
8148 if n_opar
!= null then n_opar
.parent
= self
8149 self.n_args
.unsafe_add_all
(n_args
)
8151 if n_cpar
!= null then n_cpar
.parent
= self
8152 _n_annotations
= n_annotations
8153 if n_annotations
!= null then n_annotations
.parent
= self
8156 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8158 if _n_doc
== old_child
then
8159 n_doc
= new_child
.as(nullable ADoc)
8162 if _n_kwredef
== old_child
then
8163 n_kwredef
= new_child
.as(nullable TKwredef)
8166 if _n_visibility
== old_child
then
8167 n_visibility
= new_child
.as(nullable AVisibility)
8170 if _n_atid
== old_child
then
8171 n_atid
= new_child
.as(AAtid)
8174 if _n_opar
== old_child
then
8175 n_opar
= new_child
.as(nullable TOpar)
8178 if n_args
.replace_child
(old_child
, new_child
) then return
8179 if _n_cpar
== old_child
then
8180 n_cpar
= new_child
.as(nullable TCpar)
8183 if _n_annotations
== old_child
then
8184 n_annotations
= new_child
.as(nullable AAnnotations)
8189 redef fun n_doc
=(node
)
8192 if node
!= null then node
.parent
= self
8194 redef fun n_kwredef
=(node
)
8197 if node
!= null then node
.parent
= self
8199 redef fun n_visibility
=(node
)
8201 _n_visibility
= node
8202 if node
!= null then node
.parent
= self
8204 redef fun n_atid
=(node
)
8209 redef fun n_opar
=(node
)
8212 if node
!= null then node
.parent
= self
8214 redef fun n_cpar
=(node
)
8217 if node
!= null then node
.parent
= self
8219 redef fun n_annotations
=(node
)
8221 _n_annotations
= node
8222 if node
!= null then node
.parent
= self
8226 redef fun visit_all
(v
: Visitor)
8228 v
.enter_visit
(_n_doc
)
8229 v
.enter_visit
(_n_kwredef
)
8230 v
.enter_visit
(_n_visibility
)
8231 v
.enter_visit
(_n_atid
)
8232 v
.enter_visit
(_n_opar
)
8234 v
.enter_visit
(_n_cpar
)
8235 v
.enter_visit
(_n_annotations
)
8243 _n_id
= n_id
.as(not null)
8247 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8249 if _n_id
== old_child
then
8250 n_id
= new_child
.as(TId)
8255 redef fun n_id
=(node
)
8262 redef fun visit_all
(v
: Visitor)
8264 v
.enter_visit
(_n_id
)
8267 redef class AKwexternAtid
8268 init init_akwexternatid
(
8269 n_id
: nullable TKwextern
8272 _n_id
= n_id
.as(not null)
8276 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8278 if _n_id
== old_child
then
8279 n_id
= new_child
.as(TKwextern)
8284 redef fun n_id
=(node
)
8291 redef fun visit_all
(v
: Visitor)
8293 v
.enter_visit
(_n_id
)
8296 redef class AKwabstractAtid
8297 init init_akwabstractatid
(
8298 n_id
: nullable TKwabstract
8301 _n_id
= n_id
.as(not null)
8305 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8307 if _n_id
== old_child
then
8308 n_id
= new_child
.as(TKwabstract)
8313 redef fun n_id
=(node
)
8320 redef fun visit_all
(v
: Visitor)
8322 v
.enter_visit
(_n_id
)
8325 redef class AKwimportAtid
8326 init init_akwimportatid
(
8327 n_id
: nullable TKwimport
8330 _n_id
= n_id
.as(not null)
8334 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8336 if _n_id
== old_child
then
8337 n_id
= new_child
.as(TKwimport)
8342 redef fun n_id
=(node
)
8349 redef fun visit_all
(v
: Visitor)
8351 v
.enter_visit
(_n_id
)
8356 redef fun replace_child
(old_child
: ANode, new_child
: nullable ANode)
8358 if _n_base
== old_child
then
8359 if new_child
== null then
8361 new_child
.parent
= self
8362 assert new_child
isa AModule
8365 old_child
.parent
= null
8370 redef fun visit_all
(v
: Visitor)
8372 if _n_base
!= null then
8373 v
.enter_visit
(_n_base
.as(not null))
8375 v
.enter_visit
(_n_eof
)