rename 'package' to 'module'
[nit.git] / src / parser / parser_prod.nit
1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
4
5 import lexer
6 intrude import parser_nodes
7 private import tables
8
9 redef class AModule
10 private init empty_init do end
11
12 init init_amodule (
13 n_moduledecl: nullable AModuledecl,
14 n_imports: Collection[Object], # Should be Collection[AImport]
15 n_extern_code_blocks: Collection[Object], # Should be Collection[AExternCodeBlock]
16 n_classdefs: Collection[Object] # Should be Collection[AClassdef]
17 )
18 do
19 empty_init
20 _n_moduledecl = n_moduledecl
21 if n_moduledecl != null then
22 n_moduledecl.parent = self
23 end
24 for n in n_imports do
25 assert n isa AImport
26 _n_imports.add(n)
27 n.parent = self
28 end
29 for n in n_extern_code_blocks do
30 assert n isa AExternCodeBlock
31 _n_extern_code_blocks.add(n)
32 n.parent = self
33 end
34 for n in n_classdefs do
35 assert n isa AClassdef
36 _n_classdefs.add(n)
37 n.parent = self
38 end
39 end
40
41 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
42 do
43 if _n_moduledecl == old_child then
44 if new_child != null then
45 new_child.parent = self
46 assert new_child isa AModuledecl
47 _n_moduledecl = new_child
48 else
49 _n_moduledecl = null
50 end
51 return
52 end
53 for i in [0.._n_imports.length[ do
54 if _n_imports[i] == old_child then
55 if new_child != null then
56 assert new_child isa AImport
57 _n_imports[i] = new_child
58 new_child.parent = self
59 else
60 _n_imports.remove_at(i)
61 end
62 return
63 end
64 end
65 for i in [0.._n_extern_code_blocks.length[ do
66 if _n_extern_code_blocks[i] == old_child then
67 if new_child != null then
68 assert new_child isa AExternCodeBlock
69 _n_extern_code_blocks[i] = new_child
70 new_child.parent = self
71 else
72 _n_extern_code_blocks.remove_at(i)
73 end
74 return
75 end
76 end
77 for i in [0.._n_classdefs.length[ do
78 if _n_classdefs[i] == old_child then
79 if new_child != null then
80 assert new_child isa AClassdef
81 _n_classdefs[i] = new_child
82 new_child.parent = self
83 else
84 _n_classdefs.remove_at(i)
85 end
86 return
87 end
88 end
89 end
90
91 redef fun n_moduledecl=(node)
92 do
93 _n_moduledecl = node
94 if node != null then
95 node.parent = self
96 end
97 end
98
99
100 redef fun visit_all(v: Visitor)
101 do
102 if _n_moduledecl != null then
103 v.enter_visit(_n_moduledecl.as(not null))
104 end
105 for n in _n_imports do
106 v.enter_visit(n)
107 end
108 for n in _n_extern_code_blocks do
109 v.enter_visit(n)
110 end
111 for n in _n_classdefs do
112 v.enter_visit(n)
113 end
114 end
115 end
116 redef class AModuledecl
117 private init empty_init do end
118
119 init init_amoduledecl (
120 n_doc: nullable ADoc,
121 n_kwmodule: nullable TKwmodule,
122 n_name: nullable AModuleName,
123 n_annotations: nullable AAnnotations
124 )
125 do
126 empty_init
127 _n_doc = n_doc
128 if n_doc != null then
129 n_doc.parent = self
130 end
131 _n_kwmodule = n_kwmodule.as(not null)
132 n_kwmodule.parent = self
133 _n_name = n_name.as(not null)
134 n_name.parent = self
135 _n_annotations = n_annotations
136 if n_annotations != null then
137 n_annotations.parent = self
138 end
139 end
140
141 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
142 do
143 if _n_doc == old_child then
144 if new_child != null then
145 new_child.parent = self
146 assert new_child isa ADoc
147 _n_doc = new_child
148 else
149 _n_doc = null
150 end
151 return
152 end
153 if _n_kwmodule == old_child then
154 if new_child != null then
155 new_child.parent = self
156 assert new_child isa TKwmodule
157 _n_kwmodule = new_child
158 else
159 abort
160 end
161 return
162 end
163 if _n_name == old_child then
164 if new_child != null then
165 new_child.parent = self
166 assert new_child isa AModuleName
167 _n_name = new_child
168 else
169 abort
170 end
171 return
172 end
173 if _n_annotations == old_child then
174 if new_child != null then
175 new_child.parent = self
176 assert new_child isa AAnnotations
177 _n_annotations = new_child
178 else
179 _n_annotations = null
180 end
181 return
182 end
183 end
184
185 redef fun n_doc=(node)
186 do
187 _n_doc = node
188 if node != null then
189 node.parent = self
190 end
191 end
192 redef fun n_kwmodule=(node)
193 do
194 _n_kwmodule = node
195 node.parent = self
196 end
197 redef fun n_name=(node)
198 do
199 _n_name = node
200 node.parent = self
201 end
202 redef fun n_annotations=(node)
203 do
204 _n_annotations = node
205 if node != null then
206 node.parent = self
207 end
208 end
209
210
211 redef fun visit_all(v: Visitor)
212 do
213 if _n_doc != null then
214 v.enter_visit(_n_doc.as(not null))
215 end
216 v.enter_visit(_n_kwmodule)
217 v.enter_visit(_n_name)
218 if _n_annotations != null then
219 v.enter_visit(_n_annotations.as(not null))
220 end
221 end
222 end
223 redef class AStdImport
224 private init empty_init do end
225
226 init init_astdimport (
227 n_visibility: nullable AVisibility,
228 n_kwimport: nullable TKwimport,
229 n_name: nullable AModuleName,
230 n_annotations: nullable AAnnotations
231 )
232 do
233 empty_init
234 _n_visibility = n_visibility.as(not null)
235 n_visibility.parent = self
236 _n_kwimport = n_kwimport.as(not null)
237 n_kwimport.parent = self
238 _n_name = n_name.as(not null)
239 n_name.parent = self
240 _n_annotations = n_annotations
241 if n_annotations != null then
242 n_annotations.parent = self
243 end
244 end
245
246 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
247 do
248 if _n_visibility == old_child then
249 if new_child != null then
250 new_child.parent = self
251 assert new_child isa AVisibility
252 _n_visibility = new_child
253 else
254 abort
255 end
256 return
257 end
258 if _n_kwimport == old_child then
259 if new_child != null then
260 new_child.parent = self
261 assert new_child isa TKwimport
262 _n_kwimport = new_child
263 else
264 abort
265 end
266 return
267 end
268 if _n_name == old_child then
269 if new_child != null then
270 new_child.parent = self
271 assert new_child isa AModuleName
272 _n_name = new_child
273 else
274 abort
275 end
276 return
277 end
278 if _n_annotations == old_child then
279 if new_child != null then
280 new_child.parent = self
281 assert new_child isa AAnnotations
282 _n_annotations = new_child
283 else
284 _n_annotations = null
285 end
286 return
287 end
288 end
289
290 redef fun n_visibility=(node)
291 do
292 _n_visibility = node
293 node.parent = self
294 end
295 redef fun n_kwimport=(node)
296 do
297 _n_kwimport = node
298 node.parent = self
299 end
300 redef fun n_name=(node)
301 do
302 _n_name = node
303 node.parent = self
304 end
305 redef fun n_annotations=(node)
306 do
307 _n_annotations = node
308 if node != null then
309 node.parent = self
310 end
311 end
312
313
314 redef fun visit_all(v: Visitor)
315 do
316 v.enter_visit(_n_visibility)
317 v.enter_visit(_n_kwimport)
318 v.enter_visit(_n_name)
319 if _n_annotations != null then
320 v.enter_visit(_n_annotations.as(not null))
321 end
322 end
323 end
324 redef class ANoImport
325 private init empty_init do end
326
327 init init_anoimport (
328 n_visibility: nullable AVisibility,
329 n_kwimport: nullable TKwimport,
330 n_kwend: nullable TKwend
331 )
332 do
333 empty_init
334 _n_visibility = n_visibility.as(not null)
335 n_visibility.parent = self
336 _n_kwimport = n_kwimport.as(not null)
337 n_kwimport.parent = self
338 _n_kwend = n_kwend.as(not null)
339 n_kwend.parent = self
340 end
341
342 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
343 do
344 if _n_visibility == old_child then
345 if new_child != null then
346 new_child.parent = self
347 assert new_child isa AVisibility
348 _n_visibility = new_child
349 else
350 abort
351 end
352 return
353 end
354 if _n_kwimport == old_child then
355 if new_child != null then
356 new_child.parent = self
357 assert new_child isa TKwimport
358 _n_kwimport = new_child
359 else
360 abort
361 end
362 return
363 end
364 if _n_kwend == old_child then
365 if new_child != null then
366 new_child.parent = self
367 assert new_child isa TKwend
368 _n_kwend = new_child
369 else
370 abort
371 end
372 return
373 end
374 end
375
376 redef fun n_visibility=(node)
377 do
378 _n_visibility = node
379 node.parent = self
380 end
381 redef fun n_kwimport=(node)
382 do
383 _n_kwimport = node
384 node.parent = self
385 end
386 redef fun n_kwend=(node)
387 do
388 _n_kwend = node
389 node.parent = self
390 end
391
392
393 redef fun visit_all(v: Visitor)
394 do
395 v.enter_visit(_n_visibility)
396 v.enter_visit(_n_kwimport)
397 v.enter_visit(_n_kwend)
398 end
399 end
400 redef class APublicVisibility
401 private init empty_init do end
402
403 init init_apublicvisibility
404 do
405 empty_init
406 end
407
408 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
409 do
410 end
411
412
413
414 redef fun visit_all(v: Visitor)
415 do
416 end
417 end
418 redef class APrivateVisibility
419 private init empty_init do end
420
421 init init_aprivatevisibility (
422 n_kwprivate: nullable TKwprivate
423 )
424 do
425 empty_init
426 _n_kwprivate = n_kwprivate.as(not null)
427 n_kwprivate.parent = self
428 end
429
430 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
431 do
432 if _n_kwprivate == old_child then
433 if new_child != null then
434 new_child.parent = self
435 assert new_child isa TKwprivate
436 _n_kwprivate = new_child
437 else
438 abort
439 end
440 return
441 end
442 end
443
444 redef fun n_kwprivate=(node)
445 do
446 _n_kwprivate = node
447 node.parent = self
448 end
449
450
451 redef fun visit_all(v: Visitor)
452 do
453 v.enter_visit(_n_kwprivate)
454 end
455 end
456 redef class AProtectedVisibility
457 private init empty_init do end
458
459 init init_aprotectedvisibility (
460 n_kwprotected: nullable TKwprotected
461 )
462 do
463 empty_init
464 _n_kwprotected = n_kwprotected.as(not null)
465 n_kwprotected.parent = self
466 end
467
468 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
469 do
470 if _n_kwprotected == old_child then
471 if new_child != null then
472 new_child.parent = self
473 assert new_child isa TKwprotected
474 _n_kwprotected = new_child
475 else
476 abort
477 end
478 return
479 end
480 end
481
482 redef fun n_kwprotected=(node)
483 do
484 _n_kwprotected = node
485 node.parent = self
486 end
487
488
489 redef fun visit_all(v: Visitor)
490 do
491 v.enter_visit(_n_kwprotected)
492 end
493 end
494 redef class AIntrudeVisibility
495 private init empty_init do end
496
497 init init_aintrudevisibility (
498 n_kwintrude: nullable TKwintrude
499 )
500 do
501 empty_init
502 _n_kwintrude = n_kwintrude.as(not null)
503 n_kwintrude.parent = self
504 end
505
506 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
507 do
508 if _n_kwintrude == old_child then
509 if new_child != null then
510 new_child.parent = self
511 assert new_child isa TKwintrude
512 _n_kwintrude = new_child
513 else
514 abort
515 end
516 return
517 end
518 end
519
520 redef fun n_kwintrude=(node)
521 do
522 _n_kwintrude = node
523 node.parent = self
524 end
525
526
527 redef fun visit_all(v: Visitor)
528 do
529 v.enter_visit(_n_kwintrude)
530 end
531 end
532 redef class AStdClassdef
533 private init empty_init do end
534
535 init init_astdclassdef (
536 n_doc: nullable ADoc,
537 n_kwredef: nullable TKwredef,
538 n_visibility: nullable AVisibility,
539 n_classkind: nullable AClasskind,
540 n_id: nullable TClassid,
541 n_formaldefs: Collection[Object], # Should be Collection[AFormaldef]
542 n_annotations: nullable AAnnotations,
543 n_extern_code_block: nullable AExternCodeBlock,
544 n_superclasses: Collection[Object], # Should be Collection[ASuperclass]
545 n_propdefs: Collection[Object], # Should be Collection[APropdef]
546 n_kwend: nullable TKwend
547 )
548 do
549 empty_init
550 _n_doc = n_doc
551 if n_doc != null then
552 n_doc.parent = self
553 end
554 _n_kwredef = n_kwredef
555 if n_kwredef != null then
556 n_kwredef.parent = self
557 end
558 _n_visibility = n_visibility.as(not null)
559 n_visibility.parent = self
560 _n_classkind = n_classkind.as(not null)
561 n_classkind.parent = self
562 _n_id = n_id
563 if n_id != null then
564 n_id.parent = self
565 end
566 for n in n_formaldefs do
567 assert n isa AFormaldef
568 _n_formaldefs.add(n)
569 n.parent = self
570 end
571 _n_annotations = n_annotations
572 if n_annotations != null then
573 n_annotations.parent = self
574 end
575 _n_extern_code_block = n_extern_code_block
576 if n_extern_code_block != null then
577 n_extern_code_block.parent = self
578 end
579 for n in n_superclasses do
580 assert n isa ASuperclass
581 _n_superclasses.add(n)
582 n.parent = self
583 end
584 for n in n_propdefs do
585 assert n isa APropdef
586 _n_propdefs.add(n)
587 n.parent = self
588 end
589 _n_kwend = n_kwend.as(not null)
590 n_kwend.parent = self
591 end
592
593 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
594 do
595 if _n_doc == old_child then
596 if new_child != null then
597 new_child.parent = self
598 assert new_child isa ADoc
599 _n_doc = new_child
600 else
601 _n_doc = null
602 end
603 return
604 end
605 if _n_kwredef == old_child then
606 if new_child != null then
607 new_child.parent = self
608 assert new_child isa TKwredef
609 _n_kwredef = new_child
610 else
611 _n_kwredef = null
612 end
613 return
614 end
615 if _n_visibility == old_child then
616 if new_child != null then
617 new_child.parent = self
618 assert new_child isa AVisibility
619 _n_visibility = new_child
620 else
621 abort
622 end
623 return
624 end
625 if _n_classkind == old_child then
626 if new_child != null then
627 new_child.parent = self
628 assert new_child isa AClasskind
629 _n_classkind = new_child
630 else
631 abort
632 end
633 return
634 end
635 if _n_id == old_child then
636 if new_child != null then
637 new_child.parent = self
638 assert new_child isa TClassid
639 _n_id = new_child
640 else
641 _n_id = null
642 end
643 return
644 end
645 for i in [0.._n_formaldefs.length[ do
646 if _n_formaldefs[i] == old_child then
647 if new_child != null then
648 assert new_child isa AFormaldef
649 _n_formaldefs[i] = new_child
650 new_child.parent = self
651 else
652 _n_formaldefs.remove_at(i)
653 end
654 return
655 end
656 end
657 if _n_annotations == old_child then
658 if new_child != null then
659 new_child.parent = self
660 assert new_child isa AAnnotations
661 _n_annotations = new_child
662 else
663 _n_annotations = null
664 end
665 return
666 end
667 if _n_extern_code_block == old_child then
668 if new_child != null then
669 new_child.parent = self
670 assert new_child isa AExternCodeBlock
671 _n_extern_code_block = new_child
672 else
673 _n_extern_code_block = null
674 end
675 return
676 end
677 for i in [0.._n_superclasses.length[ do
678 if _n_superclasses[i] == old_child then
679 if new_child != null then
680 assert new_child isa ASuperclass
681 _n_superclasses[i] = new_child
682 new_child.parent = self
683 else
684 _n_superclasses.remove_at(i)
685 end
686 return
687 end
688 end
689 for i in [0.._n_propdefs.length[ do
690 if _n_propdefs[i] == old_child then
691 if new_child != null then
692 assert new_child isa APropdef
693 _n_propdefs[i] = new_child
694 new_child.parent = self
695 else
696 _n_propdefs.remove_at(i)
697 end
698 return
699 end
700 end
701 if _n_kwend == old_child then
702 if new_child != null then
703 new_child.parent = self
704 assert new_child isa TKwend
705 _n_kwend = new_child
706 else
707 abort
708 end
709 return
710 end
711 end
712
713 redef fun n_doc=(node)
714 do
715 _n_doc = node
716 if node != null then
717 node.parent = self
718 end
719 end
720 redef fun n_kwredef=(node)
721 do
722 _n_kwredef = node
723 if node != null then
724 node.parent = self
725 end
726 end
727 redef fun n_visibility=(node)
728 do
729 _n_visibility = node
730 node.parent = self
731 end
732 redef fun n_classkind=(node)
733 do
734 _n_classkind = node
735 node.parent = self
736 end
737 redef fun n_id=(node)
738 do
739 _n_id = node
740 if node != null then
741 node.parent = self
742 end
743 end
744 redef fun n_annotations=(node)
745 do
746 _n_annotations = node
747 if node != null then
748 node.parent = self
749 end
750 end
751 redef fun n_extern_code_block=(node)
752 do
753 _n_extern_code_block = node
754 if node != null then
755 node.parent = self
756 end
757 end
758 redef fun n_kwend=(node)
759 do
760 _n_kwend = node
761 node.parent = self
762 end
763
764
765 redef fun visit_all(v: Visitor)
766 do
767 if _n_doc != null then
768 v.enter_visit(_n_doc.as(not null))
769 end
770 if _n_kwredef != null then
771 v.enter_visit(_n_kwredef.as(not null))
772 end
773 v.enter_visit(_n_visibility)
774 v.enter_visit(_n_classkind)
775 if _n_id != null then
776 v.enter_visit(_n_id.as(not null))
777 end
778 for n in _n_formaldefs do
779 v.enter_visit(n)
780 end
781 if _n_annotations != null then
782 v.enter_visit(_n_annotations.as(not null))
783 end
784 if _n_extern_code_block != null then
785 v.enter_visit(_n_extern_code_block.as(not null))
786 end
787 for n in _n_superclasses do
788 v.enter_visit(n)
789 end
790 for n in _n_propdefs do
791 v.enter_visit(n)
792 end
793 v.enter_visit(_n_kwend)
794 end
795 end
796 redef class ATopClassdef
797 private init empty_init do end
798
799 init init_atopclassdef (
800 n_propdefs: Collection[Object] # Should be Collection[APropdef]
801 )
802 do
803 empty_init
804 for n in n_propdefs do
805 assert n isa APropdef
806 _n_propdefs.add(n)
807 n.parent = self
808 end
809 end
810
811 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
812 do
813 for i in [0.._n_propdefs.length[ do
814 if _n_propdefs[i] == old_child then
815 if new_child != null then
816 assert new_child isa APropdef
817 _n_propdefs[i] = new_child
818 new_child.parent = self
819 else
820 _n_propdefs.remove_at(i)
821 end
822 return
823 end
824 end
825 end
826
827
828
829 redef fun visit_all(v: Visitor)
830 do
831 for n in _n_propdefs do
832 v.enter_visit(n)
833 end
834 end
835 end
836 redef class AMainClassdef
837 private init empty_init do end
838
839 init init_amainclassdef (
840 n_propdefs: Collection[Object] # Should be Collection[APropdef]
841 )
842 do
843 empty_init
844 for n in n_propdefs do
845 assert n isa APropdef
846 _n_propdefs.add(n)
847 n.parent = self
848 end
849 end
850
851 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
852 do
853 for i in [0.._n_propdefs.length[ do
854 if _n_propdefs[i] == old_child then
855 if new_child != null then
856 assert new_child isa APropdef
857 _n_propdefs[i] = new_child
858 new_child.parent = self
859 else
860 _n_propdefs.remove_at(i)
861 end
862 return
863 end
864 end
865 end
866
867
868
869 redef fun visit_all(v: Visitor)
870 do
871 for n in _n_propdefs do
872 v.enter_visit(n)
873 end
874 end
875 end
876 redef class AConcreteClasskind
877 private init empty_init do end
878
879 init init_aconcreteclasskind (
880 n_kwclass: nullable TKwclass
881 )
882 do
883 empty_init
884 _n_kwclass = n_kwclass.as(not null)
885 n_kwclass.parent = self
886 end
887
888 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
889 do
890 if _n_kwclass == old_child then
891 if new_child != null then
892 new_child.parent = self
893 assert new_child isa TKwclass
894 _n_kwclass = new_child
895 else
896 abort
897 end
898 return
899 end
900 end
901
902 redef fun n_kwclass=(node)
903 do
904 _n_kwclass = node
905 node.parent = self
906 end
907
908
909 redef fun visit_all(v: Visitor)
910 do
911 v.enter_visit(_n_kwclass)
912 end
913 end
914 redef class AAbstractClasskind
915 private init empty_init do end
916
917 init init_aabstractclasskind (
918 n_kwabstract: nullable TKwabstract,
919 n_kwclass: nullable TKwclass
920 )
921 do
922 empty_init
923 _n_kwabstract = n_kwabstract.as(not null)
924 n_kwabstract.parent = self
925 _n_kwclass = n_kwclass.as(not null)
926 n_kwclass.parent = self
927 end
928
929 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
930 do
931 if _n_kwabstract == old_child then
932 if new_child != null then
933 new_child.parent = self
934 assert new_child isa TKwabstract
935 _n_kwabstract = new_child
936 else
937 abort
938 end
939 return
940 end
941 if _n_kwclass == old_child then
942 if new_child != null then
943 new_child.parent = self
944 assert new_child isa TKwclass
945 _n_kwclass = new_child
946 else
947 abort
948 end
949 return
950 end
951 end
952
953 redef fun n_kwabstract=(node)
954 do
955 _n_kwabstract = node
956 node.parent = self
957 end
958 redef fun n_kwclass=(node)
959 do
960 _n_kwclass = node
961 node.parent = self
962 end
963
964
965 redef fun visit_all(v: Visitor)
966 do
967 v.enter_visit(_n_kwabstract)
968 v.enter_visit(_n_kwclass)
969 end
970 end
971 redef class AInterfaceClasskind
972 private init empty_init do end
973
974 init init_ainterfaceclasskind (
975 n_kwinterface: nullable TKwinterface
976 )
977 do
978 empty_init
979 _n_kwinterface = n_kwinterface.as(not null)
980 n_kwinterface.parent = self
981 end
982
983 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
984 do
985 if _n_kwinterface == old_child then
986 if new_child != null then
987 new_child.parent = self
988 assert new_child isa TKwinterface
989 _n_kwinterface = new_child
990 else
991 abort
992 end
993 return
994 end
995 end
996
997 redef fun n_kwinterface=(node)
998 do
999 _n_kwinterface = node
1000 node.parent = self
1001 end
1002
1003
1004 redef fun visit_all(v: Visitor)
1005 do
1006 v.enter_visit(_n_kwinterface)
1007 end
1008 end
1009 redef class AEnumClasskind
1010 private init empty_init do end
1011
1012 init init_aenumclasskind (
1013 n_kwenum: nullable TKwenum
1014 )
1015 do
1016 empty_init
1017 _n_kwenum = n_kwenum.as(not null)
1018 n_kwenum.parent = self
1019 end
1020
1021 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1022 do
1023 if _n_kwenum == old_child then
1024 if new_child != null then
1025 new_child.parent = self
1026 assert new_child isa TKwenum
1027 _n_kwenum = new_child
1028 else
1029 abort
1030 end
1031 return
1032 end
1033 end
1034
1035 redef fun n_kwenum=(node)
1036 do
1037 _n_kwenum = node
1038 node.parent = self
1039 end
1040
1041
1042 redef fun visit_all(v: Visitor)
1043 do
1044 v.enter_visit(_n_kwenum)
1045 end
1046 end
1047 redef class AExternClasskind
1048 private init empty_init do end
1049
1050 init init_aexternclasskind (
1051 n_kwextern: nullable TKwextern,
1052 n_kwclass: nullable TKwclass
1053 )
1054 do
1055 empty_init
1056 _n_kwextern = n_kwextern.as(not null)
1057 n_kwextern.parent = self
1058 _n_kwclass = n_kwclass
1059 if n_kwclass != null then
1060 n_kwclass.parent = self
1061 end
1062 end
1063
1064 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1065 do
1066 if _n_kwextern == old_child then
1067 if new_child != null then
1068 new_child.parent = self
1069 assert new_child isa TKwextern
1070 _n_kwextern = new_child
1071 else
1072 abort
1073 end
1074 return
1075 end
1076 if _n_kwclass == old_child then
1077 if new_child != null then
1078 new_child.parent = self
1079 assert new_child isa TKwclass
1080 _n_kwclass = new_child
1081 else
1082 _n_kwclass = null
1083 end
1084 return
1085 end
1086 end
1087
1088 redef fun n_kwextern=(node)
1089 do
1090 _n_kwextern = node
1091 node.parent = self
1092 end
1093 redef fun n_kwclass=(node)
1094 do
1095 _n_kwclass = node
1096 if node != null then
1097 node.parent = self
1098 end
1099 end
1100
1101
1102 redef fun visit_all(v: Visitor)
1103 do
1104 v.enter_visit(_n_kwextern)
1105 if _n_kwclass != null then
1106 v.enter_visit(_n_kwclass.as(not null))
1107 end
1108 end
1109 end
1110 redef class AFormaldef
1111 private init empty_init do end
1112
1113 init init_aformaldef (
1114 n_id: nullable TClassid,
1115 n_type: nullable AType,
1116 n_annotations: nullable AAnnotations
1117 )
1118 do
1119 empty_init
1120 _n_id = n_id.as(not null)
1121 n_id.parent = self
1122 _n_type = n_type
1123 if n_type != null then
1124 n_type.parent = self
1125 end
1126 _n_annotations = n_annotations
1127 if n_annotations != null then
1128 n_annotations.parent = self
1129 end
1130 end
1131
1132 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1133 do
1134 if _n_id == old_child then
1135 if new_child != null then
1136 new_child.parent = self
1137 assert new_child isa TClassid
1138 _n_id = new_child
1139 else
1140 abort
1141 end
1142 return
1143 end
1144 if _n_type == old_child then
1145 if new_child != null then
1146 new_child.parent = self
1147 assert new_child isa AType
1148 _n_type = new_child
1149 else
1150 _n_type = null
1151 end
1152 return
1153 end
1154 if _n_annotations == old_child then
1155 if new_child != null then
1156 new_child.parent = self
1157 assert new_child isa AAnnotations
1158 _n_annotations = new_child
1159 else
1160 _n_annotations = null
1161 end
1162 return
1163 end
1164 end
1165
1166 redef fun n_id=(node)
1167 do
1168 _n_id = node
1169 node.parent = self
1170 end
1171 redef fun n_type=(node)
1172 do
1173 _n_type = node
1174 if node != null then
1175 node.parent = self
1176 end
1177 end
1178 redef fun n_annotations=(node)
1179 do
1180 _n_annotations = node
1181 if node != null then
1182 node.parent = self
1183 end
1184 end
1185
1186
1187 redef fun visit_all(v: Visitor)
1188 do
1189 v.enter_visit(_n_id)
1190 if _n_type != null then
1191 v.enter_visit(_n_type.as(not null))
1192 end
1193 if _n_annotations != null then
1194 v.enter_visit(_n_annotations.as(not null))
1195 end
1196 end
1197 end
1198 redef class ASuperclass
1199 private init empty_init do end
1200
1201 init init_asuperclass (
1202 n_kwsuper: nullable TKwsuper,
1203 n_type: nullable AType,
1204 n_annotations: nullable AAnnotations
1205 )
1206 do
1207 empty_init
1208 _n_kwsuper = n_kwsuper.as(not null)
1209 n_kwsuper.parent = self
1210 _n_type = n_type.as(not null)
1211 n_type.parent = self
1212 _n_annotations = n_annotations
1213 if n_annotations != null then
1214 n_annotations.parent = self
1215 end
1216 end
1217
1218 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1219 do
1220 if _n_kwsuper == old_child then
1221 if new_child != null then
1222 new_child.parent = self
1223 assert new_child isa TKwsuper
1224 _n_kwsuper = new_child
1225 else
1226 abort
1227 end
1228 return
1229 end
1230 if _n_type == old_child then
1231 if new_child != null then
1232 new_child.parent = self
1233 assert new_child isa AType
1234 _n_type = new_child
1235 else
1236 abort
1237 end
1238 return
1239 end
1240 if _n_annotations == old_child then
1241 if new_child != null then
1242 new_child.parent = self
1243 assert new_child isa AAnnotations
1244 _n_annotations = new_child
1245 else
1246 _n_annotations = null
1247 end
1248 return
1249 end
1250 end
1251
1252 redef fun n_kwsuper=(node)
1253 do
1254 _n_kwsuper = node
1255 node.parent = self
1256 end
1257 redef fun n_type=(node)
1258 do
1259 _n_type = node
1260 node.parent = self
1261 end
1262 redef fun n_annotations=(node)
1263 do
1264 _n_annotations = node
1265 if node != null then
1266 node.parent = self
1267 end
1268 end
1269
1270
1271 redef fun visit_all(v: Visitor)
1272 do
1273 v.enter_visit(_n_kwsuper)
1274 v.enter_visit(_n_type)
1275 if _n_annotations != null then
1276 v.enter_visit(_n_annotations.as(not null))
1277 end
1278 end
1279 end
1280 redef class AAttrPropdef
1281 private init empty_init do end
1282
1283 init init_aattrpropdef (
1284 n_doc: nullable ADoc,
1285 n_readable: nullable AAble,
1286 n_writable: nullable AAble,
1287 n_kwredef: nullable TKwredef,
1288 n_visibility: nullable AVisibility,
1289 n_kwvar: nullable TKwvar,
1290 n_id: nullable TAttrid,
1291 n_id2: nullable TId,
1292 n_type: nullable AType,
1293 n_annotations: nullable AAnnotations,
1294 n_expr: nullable AExpr
1295 )
1296 do
1297 empty_init
1298 _n_doc = n_doc
1299 if n_doc != null then
1300 n_doc.parent = self
1301 end
1302 _n_readable = n_readable
1303 if n_readable != null then
1304 n_readable.parent = self
1305 end
1306 _n_writable = n_writable
1307 if n_writable != null then
1308 n_writable.parent = self
1309 end
1310 _n_kwredef = n_kwredef
1311 if n_kwredef != null then
1312 n_kwredef.parent = self
1313 end
1314 _n_visibility = n_visibility.as(not null)
1315 n_visibility.parent = self
1316 _n_kwvar = n_kwvar.as(not null)
1317 n_kwvar.parent = self
1318 _n_id = n_id
1319 if n_id != null then
1320 n_id.parent = self
1321 end
1322 _n_id2 = n_id2
1323 if n_id2 != null then
1324 n_id2.parent = self
1325 end
1326 _n_type = n_type
1327 if n_type != null then
1328 n_type.parent = self
1329 end
1330 _n_annotations = n_annotations
1331 if n_annotations != null then
1332 n_annotations.parent = self
1333 end
1334 _n_expr = n_expr
1335 if n_expr != null then
1336 n_expr.parent = self
1337 end
1338 end
1339
1340 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1341 do
1342 if _n_doc == old_child then
1343 if new_child != null then
1344 new_child.parent = self
1345 assert new_child isa ADoc
1346 _n_doc = new_child
1347 else
1348 _n_doc = null
1349 end
1350 return
1351 end
1352 if _n_readable == old_child then
1353 if new_child != null then
1354 new_child.parent = self
1355 assert new_child isa AAble
1356 _n_readable = new_child
1357 else
1358 _n_readable = null
1359 end
1360 return
1361 end
1362 if _n_writable == old_child then
1363 if new_child != null then
1364 new_child.parent = self
1365 assert new_child isa AAble
1366 _n_writable = new_child
1367 else
1368 _n_writable = null
1369 end
1370 return
1371 end
1372 if _n_kwredef == old_child then
1373 if new_child != null then
1374 new_child.parent = self
1375 assert new_child isa TKwredef
1376 _n_kwredef = new_child
1377 else
1378 _n_kwredef = null
1379 end
1380 return
1381 end
1382 if _n_visibility == old_child then
1383 if new_child != null then
1384 new_child.parent = self
1385 assert new_child isa AVisibility
1386 _n_visibility = new_child
1387 else
1388 abort
1389 end
1390 return
1391 end
1392 if _n_kwvar == old_child then
1393 if new_child != null then
1394 new_child.parent = self
1395 assert new_child isa TKwvar
1396 _n_kwvar = new_child
1397 else
1398 abort
1399 end
1400 return
1401 end
1402 if _n_id == old_child then
1403 if new_child != null then
1404 new_child.parent = self
1405 assert new_child isa TAttrid
1406 _n_id = new_child
1407 else
1408 _n_id = null
1409 end
1410 return
1411 end
1412 if _n_id2 == old_child then
1413 if new_child != null then
1414 new_child.parent = self
1415 assert new_child isa TId
1416 _n_id2 = new_child
1417 else
1418 _n_id2 = null
1419 end
1420 return
1421 end
1422 if _n_type == old_child then
1423 if new_child != null then
1424 new_child.parent = self
1425 assert new_child isa AType
1426 _n_type = new_child
1427 else
1428 _n_type = null
1429 end
1430 return
1431 end
1432 if _n_annotations == old_child then
1433 if new_child != null then
1434 new_child.parent = self
1435 assert new_child isa AAnnotations
1436 _n_annotations = new_child
1437 else
1438 _n_annotations = null
1439 end
1440 return
1441 end
1442 if _n_expr == old_child then
1443 if new_child != null then
1444 new_child.parent = self
1445 assert new_child isa AExpr
1446 _n_expr = new_child
1447 else
1448 _n_expr = null
1449 end
1450 return
1451 end
1452 end
1453
1454 redef fun n_doc=(node)
1455 do
1456 _n_doc = node
1457 if node != null then
1458 node.parent = self
1459 end
1460 end
1461 redef fun n_readable=(node)
1462 do
1463 _n_readable = node
1464 if node != null then
1465 node.parent = self
1466 end
1467 end
1468 redef fun n_writable=(node)
1469 do
1470 _n_writable = node
1471 if node != null then
1472 node.parent = self
1473 end
1474 end
1475 redef fun n_kwredef=(node)
1476 do
1477 _n_kwredef = node
1478 if node != null then
1479 node.parent = self
1480 end
1481 end
1482 redef fun n_visibility=(node)
1483 do
1484 _n_visibility = node
1485 node.parent = self
1486 end
1487 redef fun n_kwvar=(node)
1488 do
1489 _n_kwvar = node
1490 node.parent = self
1491 end
1492 redef fun n_id=(node)
1493 do
1494 _n_id = node
1495 if node != null then
1496 node.parent = self
1497 end
1498 end
1499 redef fun n_id2=(node)
1500 do
1501 _n_id2 = node
1502 if node != null then
1503 node.parent = self
1504 end
1505 end
1506 redef fun n_type=(node)
1507 do
1508 _n_type = node
1509 if node != null then
1510 node.parent = self
1511 end
1512 end
1513 redef fun n_annotations=(node)
1514 do
1515 _n_annotations = node
1516 if node != null then
1517 node.parent = self
1518 end
1519 end
1520 redef fun n_expr=(node)
1521 do
1522 _n_expr = node
1523 if node != null then
1524 node.parent = self
1525 end
1526 end
1527
1528
1529 redef fun visit_all(v: Visitor)
1530 do
1531 if _n_doc != null then
1532 v.enter_visit(_n_doc.as(not null))
1533 end
1534 if _n_readable != null then
1535 v.enter_visit(_n_readable.as(not null))
1536 end
1537 if _n_writable != null then
1538 v.enter_visit(_n_writable.as(not null))
1539 end
1540 if _n_kwredef != null then
1541 v.enter_visit(_n_kwredef.as(not null))
1542 end
1543 v.enter_visit(_n_visibility)
1544 v.enter_visit(_n_kwvar)
1545 if _n_id != null then
1546 v.enter_visit(_n_id.as(not null))
1547 end
1548 if _n_id2 != null then
1549 v.enter_visit(_n_id2.as(not null))
1550 end
1551 if _n_type != null then
1552 v.enter_visit(_n_type.as(not null))
1553 end
1554 if _n_annotations != null then
1555 v.enter_visit(_n_annotations.as(not null))
1556 end
1557 if _n_expr != null then
1558 v.enter_visit(_n_expr.as(not null))
1559 end
1560 end
1561 end
1562 redef class AMethPropdef
1563 private init empty_init do end
1564
1565 init init_amethpropdef (
1566 n_doc: nullable ADoc,
1567 n_kwredef: nullable TKwredef,
1568 n_visibility: nullable AVisibility,
1569 n_methid: nullable AMethid,
1570 n_signature: nullable ASignature
1571 )
1572 do
1573 empty_init
1574 _n_doc = n_doc
1575 if n_doc != null then
1576 n_doc.parent = self
1577 end
1578 _n_kwredef = n_kwredef
1579 if n_kwredef != null then
1580 n_kwredef.parent = self
1581 end
1582 _n_visibility = n_visibility.as(not null)
1583 n_visibility.parent = self
1584 _n_methid = n_methid.as(not null)
1585 n_methid.parent = self
1586 _n_signature = n_signature.as(not null)
1587 n_signature.parent = self
1588 end
1589
1590 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1591 do
1592 if _n_doc == old_child then
1593 if new_child != null then
1594 new_child.parent = self
1595 assert new_child isa ADoc
1596 _n_doc = new_child
1597 else
1598 _n_doc = null
1599 end
1600 return
1601 end
1602 if _n_kwredef == old_child then
1603 if new_child != null then
1604 new_child.parent = self
1605 assert new_child isa TKwredef
1606 _n_kwredef = new_child
1607 else
1608 _n_kwredef = null
1609 end
1610 return
1611 end
1612 if _n_visibility == old_child then
1613 if new_child != null then
1614 new_child.parent = self
1615 assert new_child isa AVisibility
1616 _n_visibility = new_child
1617 else
1618 abort
1619 end
1620 return
1621 end
1622 if _n_methid == old_child then
1623 if new_child != null then
1624 new_child.parent = self
1625 assert new_child isa AMethid
1626 _n_methid = new_child
1627 else
1628 abort
1629 end
1630 return
1631 end
1632 if _n_signature == old_child then
1633 if new_child != null then
1634 new_child.parent = self
1635 assert new_child isa ASignature
1636 _n_signature = new_child
1637 else
1638 abort
1639 end
1640 return
1641 end
1642 end
1643
1644 redef fun n_doc=(node)
1645 do
1646 _n_doc = node
1647 if node != null then
1648 node.parent = self
1649 end
1650 end
1651 redef fun n_kwredef=(node)
1652 do
1653 _n_kwredef = node
1654 if node != null then
1655 node.parent = self
1656 end
1657 end
1658 redef fun n_visibility=(node)
1659 do
1660 _n_visibility = node
1661 node.parent = self
1662 end
1663 redef fun n_methid=(node)
1664 do
1665 _n_methid = node
1666 node.parent = self
1667 end
1668 redef fun n_signature=(node)
1669 do
1670 _n_signature = node
1671 node.parent = self
1672 end
1673
1674
1675 redef fun visit_all(v: Visitor)
1676 do
1677 if _n_doc != null then
1678 v.enter_visit(_n_doc.as(not null))
1679 end
1680 if _n_kwredef != null then
1681 v.enter_visit(_n_kwredef.as(not null))
1682 end
1683 v.enter_visit(_n_visibility)
1684 v.enter_visit(_n_methid)
1685 v.enter_visit(_n_signature)
1686 end
1687 end
1688 redef class ADeferredMethPropdef
1689 private init empty_init do end
1690
1691 init init_adeferredmethpropdef (
1692 n_doc: nullable ADoc,
1693 n_kwredef: nullable TKwredef,
1694 n_visibility: nullable AVisibility,
1695 n_kwmeth: nullable TKwmeth,
1696 n_methid: nullable AMethid,
1697 n_signature: nullable ASignature,
1698 n_annotations: nullable AAnnotations
1699 )
1700 do
1701 empty_init
1702 _n_doc = n_doc
1703 if n_doc != null then
1704 n_doc.parent = self
1705 end
1706 _n_kwredef = n_kwredef
1707 if n_kwredef != null then
1708 n_kwredef.parent = self
1709 end
1710 _n_visibility = n_visibility.as(not null)
1711 n_visibility.parent = self
1712 _n_kwmeth = n_kwmeth.as(not null)
1713 n_kwmeth.parent = self
1714 _n_methid = n_methid.as(not null)
1715 n_methid.parent = self
1716 _n_signature = n_signature.as(not null)
1717 n_signature.parent = self
1718 _n_annotations = n_annotations
1719 if n_annotations != null then
1720 n_annotations.parent = self
1721 end
1722 end
1723
1724 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1725 do
1726 if _n_doc == old_child then
1727 if new_child != null then
1728 new_child.parent = self
1729 assert new_child isa ADoc
1730 _n_doc = new_child
1731 else
1732 _n_doc = null
1733 end
1734 return
1735 end
1736 if _n_kwredef == old_child then
1737 if new_child != null then
1738 new_child.parent = self
1739 assert new_child isa TKwredef
1740 _n_kwredef = new_child
1741 else
1742 _n_kwredef = null
1743 end
1744 return
1745 end
1746 if _n_visibility == old_child then
1747 if new_child != null then
1748 new_child.parent = self
1749 assert new_child isa AVisibility
1750 _n_visibility = new_child
1751 else
1752 abort
1753 end
1754 return
1755 end
1756 if _n_kwmeth == old_child then
1757 if new_child != null then
1758 new_child.parent = self
1759 assert new_child isa TKwmeth
1760 _n_kwmeth = new_child
1761 else
1762 abort
1763 end
1764 return
1765 end
1766 if _n_methid == old_child then
1767 if new_child != null then
1768 new_child.parent = self
1769 assert new_child isa AMethid
1770 _n_methid = new_child
1771 else
1772 abort
1773 end
1774 return
1775 end
1776 if _n_signature == old_child then
1777 if new_child != null then
1778 new_child.parent = self
1779 assert new_child isa ASignature
1780 _n_signature = new_child
1781 else
1782 abort
1783 end
1784 return
1785 end
1786 if _n_annotations == old_child then
1787 if new_child != null then
1788 new_child.parent = self
1789 assert new_child isa AAnnotations
1790 _n_annotations = new_child
1791 else
1792 _n_annotations = null
1793 end
1794 return
1795 end
1796 end
1797
1798 redef fun n_doc=(node)
1799 do
1800 _n_doc = node
1801 if node != null then
1802 node.parent = self
1803 end
1804 end
1805 redef fun n_kwredef=(node)
1806 do
1807 _n_kwredef = node
1808 if node != null then
1809 node.parent = self
1810 end
1811 end
1812 redef fun n_visibility=(node)
1813 do
1814 _n_visibility = node
1815 node.parent = self
1816 end
1817 redef fun n_kwmeth=(node)
1818 do
1819 _n_kwmeth = node
1820 node.parent = self
1821 end
1822 redef fun n_methid=(node)
1823 do
1824 _n_methid = node
1825 node.parent = self
1826 end
1827 redef fun n_signature=(node)
1828 do
1829 _n_signature = node
1830 node.parent = self
1831 end
1832 redef fun n_annotations=(node)
1833 do
1834 _n_annotations = node
1835 if node != null then
1836 node.parent = self
1837 end
1838 end
1839
1840
1841 redef fun visit_all(v: Visitor)
1842 do
1843 if _n_doc != null then
1844 v.enter_visit(_n_doc.as(not null))
1845 end
1846 if _n_kwredef != null then
1847 v.enter_visit(_n_kwredef.as(not null))
1848 end
1849 v.enter_visit(_n_visibility)
1850 v.enter_visit(_n_kwmeth)
1851 v.enter_visit(_n_methid)
1852 v.enter_visit(_n_signature)
1853 if _n_annotations != null then
1854 v.enter_visit(_n_annotations.as(not null))
1855 end
1856 end
1857 end
1858 redef class AInternMethPropdef
1859 private init empty_init do end
1860
1861 init init_ainternmethpropdef (
1862 n_doc: nullable ADoc,
1863 n_kwredef: nullable TKwredef,
1864 n_visibility: nullable AVisibility,
1865 n_kwmeth: nullable TKwmeth,
1866 n_methid: nullable AMethid,
1867 n_signature: nullable ASignature
1868 )
1869 do
1870 empty_init
1871 _n_doc = n_doc
1872 if n_doc != null then
1873 n_doc.parent = self
1874 end
1875 _n_kwredef = n_kwredef
1876 if n_kwredef != null then
1877 n_kwredef.parent = self
1878 end
1879 _n_visibility = n_visibility.as(not null)
1880 n_visibility.parent = self
1881 _n_kwmeth = n_kwmeth.as(not null)
1882 n_kwmeth.parent = self
1883 _n_methid = n_methid.as(not null)
1884 n_methid.parent = self
1885 _n_signature = n_signature.as(not null)
1886 n_signature.parent = self
1887 end
1888
1889 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1890 do
1891 if _n_doc == old_child then
1892 if new_child != null then
1893 new_child.parent = self
1894 assert new_child isa ADoc
1895 _n_doc = new_child
1896 else
1897 _n_doc = null
1898 end
1899 return
1900 end
1901 if _n_kwredef == old_child then
1902 if new_child != null then
1903 new_child.parent = self
1904 assert new_child isa TKwredef
1905 _n_kwredef = new_child
1906 else
1907 _n_kwredef = null
1908 end
1909 return
1910 end
1911 if _n_visibility == old_child then
1912 if new_child != null then
1913 new_child.parent = self
1914 assert new_child isa AVisibility
1915 _n_visibility = new_child
1916 else
1917 abort
1918 end
1919 return
1920 end
1921 if _n_kwmeth == old_child then
1922 if new_child != null then
1923 new_child.parent = self
1924 assert new_child isa TKwmeth
1925 _n_kwmeth = new_child
1926 else
1927 abort
1928 end
1929 return
1930 end
1931 if _n_methid == old_child then
1932 if new_child != null then
1933 new_child.parent = self
1934 assert new_child isa AMethid
1935 _n_methid = new_child
1936 else
1937 abort
1938 end
1939 return
1940 end
1941 if _n_signature == old_child then
1942 if new_child != null then
1943 new_child.parent = self
1944 assert new_child isa ASignature
1945 _n_signature = new_child
1946 else
1947 abort
1948 end
1949 return
1950 end
1951 end
1952
1953 redef fun n_doc=(node)
1954 do
1955 _n_doc = node
1956 if node != null then
1957 node.parent = self
1958 end
1959 end
1960 redef fun n_kwredef=(node)
1961 do
1962 _n_kwredef = node
1963 if node != null then
1964 node.parent = self
1965 end
1966 end
1967 redef fun n_visibility=(node)
1968 do
1969 _n_visibility = node
1970 node.parent = self
1971 end
1972 redef fun n_kwmeth=(node)
1973 do
1974 _n_kwmeth = node
1975 node.parent = self
1976 end
1977 redef fun n_methid=(node)
1978 do
1979 _n_methid = node
1980 node.parent = self
1981 end
1982 redef fun n_signature=(node)
1983 do
1984 _n_signature = node
1985 node.parent = self
1986 end
1987
1988
1989 redef fun visit_all(v: Visitor)
1990 do
1991 if _n_doc != null then
1992 v.enter_visit(_n_doc.as(not null))
1993 end
1994 if _n_kwredef != null then
1995 v.enter_visit(_n_kwredef.as(not null))
1996 end
1997 v.enter_visit(_n_visibility)
1998 v.enter_visit(_n_kwmeth)
1999 v.enter_visit(_n_methid)
2000 v.enter_visit(_n_signature)
2001 end
2002 end
2003 redef class AExternMethPropdef
2004 private init empty_init do end
2005
2006 init init_aexternmethpropdef (
2007 n_doc: nullable ADoc,
2008 n_kwredef: nullable TKwredef,
2009 n_visibility: nullable AVisibility,
2010 n_kwmeth: nullable TKwmeth,
2011 n_methid: nullable AMethid,
2012 n_signature: nullable ASignature,
2013 n_extern: nullable TString,
2014 n_extern_calls: nullable AExternCalls,
2015 n_extern_code_block: nullable AExternCodeBlock
2016 )
2017 do
2018 empty_init
2019 _n_doc = n_doc
2020 if n_doc != null then
2021 n_doc.parent = self
2022 end
2023 _n_kwredef = n_kwredef
2024 if n_kwredef != null then
2025 n_kwredef.parent = self
2026 end
2027 _n_visibility = n_visibility.as(not null)
2028 n_visibility.parent = self
2029 _n_kwmeth = n_kwmeth.as(not null)
2030 n_kwmeth.parent = self
2031 _n_methid = n_methid.as(not null)
2032 n_methid.parent = self
2033 _n_signature = n_signature.as(not null)
2034 n_signature.parent = self
2035 _n_extern = n_extern
2036 if n_extern != null then
2037 n_extern.parent = self
2038 end
2039 _n_extern_calls = n_extern_calls
2040 if n_extern_calls != null then
2041 n_extern_calls.parent = self
2042 end
2043 _n_extern_code_block = n_extern_code_block
2044 if n_extern_code_block != null then
2045 n_extern_code_block.parent = self
2046 end
2047 end
2048
2049 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2050 do
2051 if _n_doc == old_child then
2052 if new_child != null then
2053 new_child.parent = self
2054 assert new_child isa ADoc
2055 _n_doc = new_child
2056 else
2057 _n_doc = null
2058 end
2059 return
2060 end
2061 if _n_kwredef == old_child then
2062 if new_child != null then
2063 new_child.parent = self
2064 assert new_child isa TKwredef
2065 _n_kwredef = new_child
2066 else
2067 _n_kwredef = null
2068 end
2069 return
2070 end
2071 if _n_visibility == old_child then
2072 if new_child != null then
2073 new_child.parent = self
2074 assert new_child isa AVisibility
2075 _n_visibility = new_child
2076 else
2077 abort
2078 end
2079 return
2080 end
2081 if _n_kwmeth == old_child then
2082 if new_child != null then
2083 new_child.parent = self
2084 assert new_child isa TKwmeth
2085 _n_kwmeth = new_child
2086 else
2087 abort
2088 end
2089 return
2090 end
2091 if _n_methid == old_child then
2092 if new_child != null then
2093 new_child.parent = self
2094 assert new_child isa AMethid
2095 _n_methid = new_child
2096 else
2097 abort
2098 end
2099 return
2100 end
2101 if _n_signature == old_child then
2102 if new_child != null then
2103 new_child.parent = self
2104 assert new_child isa ASignature
2105 _n_signature = new_child
2106 else
2107 abort
2108 end
2109 return
2110 end
2111 if _n_extern == old_child then
2112 if new_child != null then
2113 new_child.parent = self
2114 assert new_child isa TString
2115 _n_extern = new_child
2116 else
2117 _n_extern = null
2118 end
2119 return
2120 end
2121 if _n_extern_calls == old_child then
2122 if new_child != null then
2123 new_child.parent = self
2124 assert new_child isa AExternCalls
2125 _n_extern_calls = new_child
2126 else
2127 _n_extern_calls = null
2128 end
2129 return
2130 end
2131 if _n_extern_code_block == old_child then
2132 if new_child != null then
2133 new_child.parent = self
2134 assert new_child isa AExternCodeBlock
2135 _n_extern_code_block = new_child
2136 else
2137 _n_extern_code_block = null
2138 end
2139 return
2140 end
2141 end
2142
2143 redef fun n_doc=(node)
2144 do
2145 _n_doc = node
2146 if node != null then
2147 node.parent = self
2148 end
2149 end
2150 redef fun n_kwredef=(node)
2151 do
2152 _n_kwredef = node
2153 if node != null then
2154 node.parent = self
2155 end
2156 end
2157 redef fun n_visibility=(node)
2158 do
2159 _n_visibility = node
2160 node.parent = self
2161 end
2162 redef fun n_kwmeth=(node)
2163 do
2164 _n_kwmeth = node
2165 node.parent = self
2166 end
2167 redef fun n_methid=(node)
2168 do
2169 _n_methid = node
2170 node.parent = self
2171 end
2172 redef fun n_signature=(node)
2173 do
2174 _n_signature = node
2175 node.parent = self
2176 end
2177 redef fun n_extern=(node)
2178 do
2179 _n_extern = node
2180 if node != null then
2181 node.parent = self
2182 end
2183 end
2184 redef fun n_extern_calls=(node)
2185 do
2186 _n_extern_calls = node
2187 if node != null then
2188 node.parent = self
2189 end
2190 end
2191 redef fun n_extern_code_block=(node)
2192 do
2193 _n_extern_code_block = node
2194 if node != null then
2195 node.parent = self
2196 end
2197 end
2198
2199
2200 redef fun visit_all(v: Visitor)
2201 do
2202 if _n_doc != null then
2203 v.enter_visit(_n_doc.as(not null))
2204 end
2205 if _n_kwredef != null then
2206 v.enter_visit(_n_kwredef.as(not null))
2207 end
2208 v.enter_visit(_n_visibility)
2209 v.enter_visit(_n_kwmeth)
2210 v.enter_visit(_n_methid)
2211 v.enter_visit(_n_signature)
2212 if _n_extern != null then
2213 v.enter_visit(_n_extern.as(not null))
2214 end
2215 if _n_extern_calls != null then
2216 v.enter_visit(_n_extern_calls.as(not null))
2217 end
2218 if _n_extern_code_block != null then
2219 v.enter_visit(_n_extern_code_block.as(not null))
2220 end
2221 end
2222 end
2223 redef class AConcreteMethPropdef
2224 private init empty_init do end
2225
2226 init init_aconcretemethpropdef (
2227 n_doc: nullable ADoc,
2228 n_kwredef: nullable TKwredef,
2229 n_visibility: nullable AVisibility,
2230 n_kwmeth: nullable TKwmeth,
2231 n_methid: nullable AMethid,
2232 n_signature: nullable ASignature,
2233 n_annotations: nullable AAnnotations,
2234 n_block: nullable AExpr
2235 )
2236 do
2237 empty_init
2238 _n_doc = n_doc
2239 if n_doc != null then
2240 n_doc.parent = self
2241 end
2242 _n_kwredef = n_kwredef
2243 if n_kwredef != null then
2244 n_kwredef.parent = self
2245 end
2246 _n_visibility = n_visibility.as(not null)
2247 n_visibility.parent = self
2248 _n_kwmeth = n_kwmeth.as(not null)
2249 n_kwmeth.parent = self
2250 _n_methid = n_methid.as(not null)
2251 n_methid.parent = self
2252 _n_signature = n_signature.as(not null)
2253 n_signature.parent = self
2254 _n_annotations = n_annotations
2255 if n_annotations != null then
2256 n_annotations.parent = self
2257 end
2258 _n_block = n_block
2259 if n_block != null then
2260 n_block.parent = self
2261 end
2262 end
2263
2264 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2265 do
2266 if _n_doc == old_child then
2267 if new_child != null then
2268 new_child.parent = self
2269 assert new_child isa ADoc
2270 _n_doc = new_child
2271 else
2272 _n_doc = null
2273 end
2274 return
2275 end
2276 if _n_kwredef == old_child then
2277 if new_child != null then
2278 new_child.parent = self
2279 assert new_child isa TKwredef
2280 _n_kwredef = new_child
2281 else
2282 _n_kwredef = null
2283 end
2284 return
2285 end
2286 if _n_visibility == old_child then
2287 if new_child != null then
2288 new_child.parent = self
2289 assert new_child isa AVisibility
2290 _n_visibility = new_child
2291 else
2292 abort
2293 end
2294 return
2295 end
2296 if _n_kwmeth == old_child then
2297 if new_child != null then
2298 new_child.parent = self
2299 assert new_child isa TKwmeth
2300 _n_kwmeth = new_child
2301 else
2302 abort
2303 end
2304 return
2305 end
2306 if _n_methid == old_child then
2307 if new_child != null then
2308 new_child.parent = self
2309 assert new_child isa AMethid
2310 _n_methid = new_child
2311 else
2312 abort
2313 end
2314 return
2315 end
2316 if _n_signature == old_child then
2317 if new_child != null then
2318 new_child.parent = self
2319 assert new_child isa ASignature
2320 _n_signature = new_child
2321 else
2322 abort
2323 end
2324 return
2325 end
2326 if _n_annotations == old_child then
2327 if new_child != null then
2328 new_child.parent = self
2329 assert new_child isa AAnnotations
2330 _n_annotations = new_child
2331 else
2332 _n_annotations = null
2333 end
2334 return
2335 end
2336 if _n_block == old_child then
2337 if new_child != null then
2338 new_child.parent = self
2339 assert new_child isa AExpr
2340 _n_block = new_child
2341 else
2342 _n_block = null
2343 end
2344 return
2345 end
2346 end
2347
2348 redef fun n_doc=(node)
2349 do
2350 _n_doc = node
2351 if node != null then
2352 node.parent = self
2353 end
2354 end
2355 redef fun n_kwredef=(node)
2356 do
2357 _n_kwredef = node
2358 if node != null then
2359 node.parent = self
2360 end
2361 end
2362 redef fun n_visibility=(node)
2363 do
2364 _n_visibility = node
2365 node.parent = self
2366 end
2367 redef fun n_kwmeth=(node)
2368 do
2369 _n_kwmeth = node
2370 node.parent = self
2371 end
2372 redef fun n_methid=(node)
2373 do
2374 _n_methid = node
2375 node.parent = self
2376 end
2377 redef fun n_signature=(node)
2378 do
2379 _n_signature = node
2380 node.parent = self
2381 end
2382 redef fun n_annotations=(node)
2383 do
2384 _n_annotations = node
2385 if node != null then
2386 node.parent = self
2387 end
2388 end
2389 redef fun n_block=(node)
2390 do
2391 _n_block = node
2392 if node != null then
2393 node.parent = self
2394 end
2395 end
2396
2397
2398 redef fun visit_all(v: Visitor)
2399 do
2400 if _n_doc != null then
2401 v.enter_visit(_n_doc.as(not null))
2402 end
2403 if _n_kwredef != null then
2404 v.enter_visit(_n_kwredef.as(not null))
2405 end
2406 v.enter_visit(_n_visibility)
2407 v.enter_visit(_n_kwmeth)
2408 v.enter_visit(_n_methid)
2409 v.enter_visit(_n_signature)
2410 if _n_annotations != null then
2411 v.enter_visit(_n_annotations.as(not null))
2412 end
2413 if _n_block != null then
2414 v.enter_visit(_n_block.as(not null))
2415 end
2416 end
2417 end
2418 redef class AConcreteInitPropdef
2419 private init empty_init do end
2420
2421 init init_aconcreteinitpropdef (
2422 n_doc: nullable ADoc,
2423 n_kwredef: nullable TKwredef,
2424 n_visibility: nullable AVisibility,
2425 n_kwinit: nullable TKwinit,
2426 n_methid: nullable AMethid,
2427 n_signature: nullable ASignature,
2428 n_annotations: nullable AAnnotations,
2429 n_block: nullable AExpr
2430 )
2431 do
2432 empty_init
2433 _n_doc = n_doc
2434 if n_doc != null then
2435 n_doc.parent = self
2436 end
2437 _n_kwredef = n_kwredef
2438 if n_kwredef != null then
2439 n_kwredef.parent = self
2440 end
2441 _n_visibility = n_visibility.as(not null)
2442 n_visibility.parent = self
2443 _n_kwinit = n_kwinit.as(not null)
2444 n_kwinit.parent = self
2445 _n_methid = n_methid
2446 if n_methid != null then
2447 n_methid.parent = self
2448 end
2449 _n_signature = n_signature.as(not null)
2450 n_signature.parent = self
2451 _n_annotations = n_annotations
2452 if n_annotations != null then
2453 n_annotations.parent = self
2454 end
2455 _n_block = n_block
2456 if n_block != null then
2457 n_block.parent = self
2458 end
2459 end
2460
2461 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2462 do
2463 if _n_doc == old_child then
2464 if new_child != null then
2465 new_child.parent = self
2466 assert new_child isa ADoc
2467 _n_doc = new_child
2468 else
2469 _n_doc = null
2470 end
2471 return
2472 end
2473 if _n_kwredef == old_child then
2474 if new_child != null then
2475 new_child.parent = self
2476 assert new_child isa TKwredef
2477 _n_kwredef = new_child
2478 else
2479 _n_kwredef = null
2480 end
2481 return
2482 end
2483 if _n_visibility == old_child then
2484 if new_child != null then
2485 new_child.parent = self
2486 assert new_child isa AVisibility
2487 _n_visibility = new_child
2488 else
2489 abort
2490 end
2491 return
2492 end
2493 if _n_kwinit == old_child then
2494 if new_child != null then
2495 new_child.parent = self
2496 assert new_child isa TKwinit
2497 _n_kwinit = new_child
2498 else
2499 abort
2500 end
2501 return
2502 end
2503 if _n_methid == old_child then
2504 if new_child != null then
2505 new_child.parent = self
2506 assert new_child isa AMethid
2507 _n_methid = new_child
2508 else
2509 _n_methid = null
2510 end
2511 return
2512 end
2513 if _n_signature == old_child then
2514 if new_child != null then
2515 new_child.parent = self
2516 assert new_child isa ASignature
2517 _n_signature = new_child
2518 else
2519 abort
2520 end
2521 return
2522 end
2523 if _n_annotations == old_child then
2524 if new_child != null then
2525 new_child.parent = self
2526 assert new_child isa AAnnotations
2527 _n_annotations = new_child
2528 else
2529 _n_annotations = null
2530 end
2531 return
2532 end
2533 if _n_block == old_child then
2534 if new_child != null then
2535 new_child.parent = self
2536 assert new_child isa AExpr
2537 _n_block = new_child
2538 else
2539 _n_block = null
2540 end
2541 return
2542 end
2543 end
2544
2545 redef fun n_doc=(node)
2546 do
2547 _n_doc = node
2548 if node != null then
2549 node.parent = self
2550 end
2551 end
2552 redef fun n_kwredef=(node)
2553 do
2554 _n_kwredef = node
2555 if node != null then
2556 node.parent = self
2557 end
2558 end
2559 redef fun n_visibility=(node)
2560 do
2561 _n_visibility = node
2562 node.parent = self
2563 end
2564 redef fun n_kwinit=(node)
2565 do
2566 _n_kwinit = node
2567 node.parent = self
2568 end
2569 redef fun n_methid=(node)
2570 do
2571 _n_methid = node
2572 if node != null then
2573 node.parent = self
2574 end
2575 end
2576 redef fun n_signature=(node)
2577 do
2578 _n_signature = node
2579 node.parent = self
2580 end
2581 redef fun n_annotations=(node)
2582 do
2583 _n_annotations = node
2584 if node != null then
2585 node.parent = self
2586 end
2587 end
2588 redef fun n_block=(node)
2589 do
2590 _n_block = node
2591 if node != null then
2592 node.parent = self
2593 end
2594 end
2595
2596
2597 redef fun visit_all(v: Visitor)
2598 do
2599 if _n_doc != null then
2600 v.enter_visit(_n_doc.as(not null))
2601 end
2602 if _n_kwredef != null then
2603 v.enter_visit(_n_kwredef.as(not null))
2604 end
2605 v.enter_visit(_n_visibility)
2606 v.enter_visit(_n_kwinit)
2607 if _n_methid != null then
2608 v.enter_visit(_n_methid.as(not null))
2609 end
2610 v.enter_visit(_n_signature)
2611 if _n_annotations != null then
2612 v.enter_visit(_n_annotations.as(not null))
2613 end
2614 if _n_block != null then
2615 v.enter_visit(_n_block.as(not null))
2616 end
2617 end
2618 end
2619 redef class AExternInitPropdef
2620 private init empty_init do end
2621
2622 init init_aexterninitpropdef (
2623 n_doc: nullable ADoc,
2624 n_kwredef: nullable TKwredef,
2625 n_visibility: nullable AVisibility,
2626 n_kwnew: nullable TKwnew,
2627 n_methid: nullable AMethid,
2628 n_signature: nullable ASignature,
2629 n_extern: nullable TString,
2630 n_extern_calls: nullable AExternCalls,
2631 n_extern_code_block: nullable AExternCodeBlock
2632 )
2633 do
2634 empty_init
2635 _n_doc = n_doc
2636 if n_doc != null then
2637 n_doc.parent = self
2638 end
2639 _n_kwredef = n_kwredef
2640 if n_kwredef != null then
2641 n_kwredef.parent = self
2642 end
2643 _n_visibility = n_visibility.as(not null)
2644 n_visibility.parent = self
2645 _n_kwnew = n_kwnew.as(not null)
2646 n_kwnew.parent = self
2647 _n_methid = n_methid
2648 if n_methid != null then
2649 n_methid.parent = self
2650 end
2651 _n_signature = n_signature.as(not null)
2652 n_signature.parent = self
2653 _n_extern = n_extern
2654 if n_extern != null then
2655 n_extern.parent = self
2656 end
2657 _n_extern_calls = n_extern_calls
2658 if n_extern_calls != null then
2659 n_extern_calls.parent = self
2660 end
2661 _n_extern_code_block = n_extern_code_block
2662 if n_extern_code_block != null then
2663 n_extern_code_block.parent = self
2664 end
2665 end
2666
2667 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2668 do
2669 if _n_doc == old_child then
2670 if new_child != null then
2671 new_child.parent = self
2672 assert new_child isa ADoc
2673 _n_doc = new_child
2674 else
2675 _n_doc = null
2676 end
2677 return
2678 end
2679 if _n_kwredef == old_child then
2680 if new_child != null then
2681 new_child.parent = self
2682 assert new_child isa TKwredef
2683 _n_kwredef = new_child
2684 else
2685 _n_kwredef = null
2686 end
2687 return
2688 end
2689 if _n_visibility == old_child then
2690 if new_child != null then
2691 new_child.parent = self
2692 assert new_child isa AVisibility
2693 _n_visibility = new_child
2694 else
2695 abort
2696 end
2697 return
2698 end
2699 if _n_kwnew == old_child then
2700 if new_child != null then
2701 new_child.parent = self
2702 assert new_child isa TKwnew
2703 _n_kwnew = new_child
2704 else
2705 abort
2706 end
2707 return
2708 end
2709 if _n_methid == old_child then
2710 if new_child != null then
2711 new_child.parent = self
2712 assert new_child isa AMethid
2713 _n_methid = new_child
2714 else
2715 _n_methid = null
2716 end
2717 return
2718 end
2719 if _n_signature == old_child then
2720 if new_child != null then
2721 new_child.parent = self
2722 assert new_child isa ASignature
2723 _n_signature = new_child
2724 else
2725 abort
2726 end
2727 return
2728 end
2729 if _n_extern == old_child then
2730 if new_child != null then
2731 new_child.parent = self
2732 assert new_child isa TString
2733 _n_extern = new_child
2734 else
2735 _n_extern = null
2736 end
2737 return
2738 end
2739 if _n_extern_calls == old_child then
2740 if new_child != null then
2741 new_child.parent = self
2742 assert new_child isa AExternCalls
2743 _n_extern_calls = new_child
2744 else
2745 _n_extern_calls = null
2746 end
2747 return
2748 end
2749 if _n_extern_code_block == old_child then
2750 if new_child != null then
2751 new_child.parent = self
2752 assert new_child isa AExternCodeBlock
2753 _n_extern_code_block = new_child
2754 else
2755 _n_extern_code_block = null
2756 end
2757 return
2758 end
2759 end
2760
2761 redef fun n_doc=(node)
2762 do
2763 _n_doc = node
2764 if node != null then
2765 node.parent = self
2766 end
2767 end
2768 redef fun n_kwredef=(node)
2769 do
2770 _n_kwredef = node
2771 if node != null then
2772 node.parent = self
2773 end
2774 end
2775 redef fun n_visibility=(node)
2776 do
2777 _n_visibility = node
2778 node.parent = self
2779 end
2780 redef fun n_kwnew=(node)
2781 do
2782 _n_kwnew = node
2783 node.parent = self
2784 end
2785 redef fun n_methid=(node)
2786 do
2787 _n_methid = node
2788 if node != null then
2789 node.parent = self
2790 end
2791 end
2792 redef fun n_signature=(node)
2793 do
2794 _n_signature = node
2795 node.parent = self
2796 end
2797 redef fun n_extern=(node)
2798 do
2799 _n_extern = node
2800 if node != null then
2801 node.parent = self
2802 end
2803 end
2804 redef fun n_extern_calls=(node)
2805 do
2806 _n_extern_calls = node
2807 if node != null then
2808 node.parent = self
2809 end
2810 end
2811 redef fun n_extern_code_block=(node)
2812 do
2813 _n_extern_code_block = node
2814 if node != null then
2815 node.parent = self
2816 end
2817 end
2818
2819
2820 redef fun visit_all(v: Visitor)
2821 do
2822 if _n_doc != null then
2823 v.enter_visit(_n_doc.as(not null))
2824 end
2825 if _n_kwredef != null then
2826 v.enter_visit(_n_kwredef.as(not null))
2827 end
2828 v.enter_visit(_n_visibility)
2829 v.enter_visit(_n_kwnew)
2830 if _n_methid != null then
2831 v.enter_visit(_n_methid.as(not null))
2832 end
2833 v.enter_visit(_n_signature)
2834 if _n_extern != null then
2835 v.enter_visit(_n_extern.as(not null))
2836 end
2837 if _n_extern_calls != null then
2838 v.enter_visit(_n_extern_calls.as(not null))
2839 end
2840 if _n_extern_code_block != null then
2841 v.enter_visit(_n_extern_code_block.as(not null))
2842 end
2843 end
2844 end
2845 redef class AMainMethPropdef
2846 private init empty_init do end
2847
2848 init init_amainmethpropdef (
2849 n_kwredef: nullable TKwredef,
2850 n_block: nullable AExpr
2851 )
2852 do
2853 empty_init
2854 _n_kwredef = n_kwredef
2855 if n_kwredef != null then
2856 n_kwredef.parent = self
2857 end
2858 _n_block = n_block
2859 if n_block != null then
2860 n_block.parent = self
2861 end
2862 end
2863
2864 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2865 do
2866 if _n_kwredef == old_child then
2867 if new_child != null then
2868 new_child.parent = self
2869 assert new_child isa TKwredef
2870 _n_kwredef = new_child
2871 else
2872 _n_kwredef = null
2873 end
2874 return
2875 end
2876 if _n_block == old_child then
2877 if new_child != null then
2878 new_child.parent = self
2879 assert new_child isa AExpr
2880 _n_block = new_child
2881 else
2882 _n_block = null
2883 end
2884 return
2885 end
2886 end
2887
2888 redef fun n_kwredef=(node)
2889 do
2890 _n_kwredef = node
2891 if node != null then
2892 node.parent = self
2893 end
2894 end
2895 redef fun n_block=(node)
2896 do
2897 _n_block = node
2898 if node != null then
2899 node.parent = self
2900 end
2901 end
2902
2903
2904 redef fun visit_all(v: Visitor)
2905 do
2906 if _n_kwredef != null then
2907 v.enter_visit(_n_kwredef.as(not null))
2908 end
2909 if _n_block != null then
2910 v.enter_visit(_n_block.as(not null))
2911 end
2912 end
2913 end
2914 redef class ATypePropdef
2915 private init empty_init do end
2916
2917 init init_atypepropdef (
2918 n_doc: nullable ADoc,
2919 n_kwredef: nullable TKwredef,
2920 n_visibility: nullable AVisibility,
2921 n_kwtype: nullable TKwtype,
2922 n_id: nullable TClassid,
2923 n_type: nullable AType,
2924 n_annotations: nullable AAnnotations
2925 )
2926 do
2927 empty_init
2928 _n_doc = n_doc
2929 if n_doc != null then
2930 n_doc.parent = self
2931 end
2932 _n_kwredef = n_kwredef
2933 if n_kwredef != null then
2934 n_kwredef.parent = self
2935 end
2936 _n_visibility = n_visibility.as(not null)
2937 n_visibility.parent = self
2938 _n_kwtype = n_kwtype.as(not null)
2939 n_kwtype.parent = self
2940 _n_id = n_id.as(not null)
2941 n_id.parent = self
2942 _n_type = n_type.as(not null)
2943 n_type.parent = self
2944 _n_annotations = n_annotations
2945 if n_annotations != null then
2946 n_annotations.parent = self
2947 end
2948 end
2949
2950 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2951 do
2952 if _n_doc == old_child then
2953 if new_child != null then
2954 new_child.parent = self
2955 assert new_child isa ADoc
2956 _n_doc = new_child
2957 else
2958 _n_doc = null
2959 end
2960 return
2961 end
2962 if _n_kwredef == old_child then
2963 if new_child != null then
2964 new_child.parent = self
2965 assert new_child isa TKwredef
2966 _n_kwredef = new_child
2967 else
2968 _n_kwredef = null
2969 end
2970 return
2971 end
2972 if _n_visibility == old_child then
2973 if new_child != null then
2974 new_child.parent = self
2975 assert new_child isa AVisibility
2976 _n_visibility = new_child
2977 else
2978 abort
2979 end
2980 return
2981 end
2982 if _n_kwtype == old_child then
2983 if new_child != null then
2984 new_child.parent = self
2985 assert new_child isa TKwtype
2986 _n_kwtype = new_child
2987 else
2988 abort
2989 end
2990 return
2991 end
2992 if _n_id == old_child then
2993 if new_child != null then
2994 new_child.parent = self
2995 assert new_child isa TClassid
2996 _n_id = new_child
2997 else
2998 abort
2999 end
3000 return
3001 end
3002 if _n_type == old_child then
3003 if new_child != null then
3004 new_child.parent = self
3005 assert new_child isa AType
3006 _n_type = new_child
3007 else
3008 abort
3009 end
3010 return
3011 end
3012 if _n_annotations == old_child then
3013 if new_child != null then
3014 new_child.parent = self
3015 assert new_child isa AAnnotations
3016 _n_annotations = new_child
3017 else
3018 _n_annotations = null
3019 end
3020 return
3021 end
3022 end
3023
3024 redef fun n_doc=(node)
3025 do
3026 _n_doc = node
3027 if node != null then
3028 node.parent = self
3029 end
3030 end
3031 redef fun n_kwredef=(node)
3032 do
3033 _n_kwredef = node
3034 if node != null then
3035 node.parent = self
3036 end
3037 end
3038 redef fun n_visibility=(node)
3039 do
3040 _n_visibility = node
3041 node.parent = self
3042 end
3043 redef fun n_kwtype=(node)
3044 do
3045 _n_kwtype = node
3046 node.parent = self
3047 end
3048 redef fun n_id=(node)
3049 do
3050 _n_id = node
3051 node.parent = self
3052 end
3053 redef fun n_type=(node)
3054 do
3055 _n_type = node
3056 node.parent = self
3057 end
3058 redef fun n_annotations=(node)
3059 do
3060 _n_annotations = node
3061 if node != null then
3062 node.parent = self
3063 end
3064 end
3065
3066
3067 redef fun visit_all(v: Visitor)
3068 do
3069 if _n_doc != null then
3070 v.enter_visit(_n_doc.as(not null))
3071 end
3072 if _n_kwredef != null then
3073 v.enter_visit(_n_kwredef.as(not null))
3074 end
3075 v.enter_visit(_n_visibility)
3076 v.enter_visit(_n_kwtype)
3077 v.enter_visit(_n_id)
3078 v.enter_visit(_n_type)
3079 if _n_annotations != null then
3080 v.enter_visit(_n_annotations.as(not null))
3081 end
3082 end
3083 end
3084 redef class AReadAble
3085 private init empty_init do end
3086
3087 init init_areadable (
3088 n_kwredef: nullable TKwredef,
3089 n_kwreadable: nullable TKwreadable
3090 )
3091 do
3092 empty_init
3093 _n_kwredef = n_kwredef
3094 if n_kwredef != null then
3095 n_kwredef.parent = self
3096 end
3097 _n_kwreadable = n_kwreadable.as(not null)
3098 n_kwreadable.parent = self
3099 end
3100
3101 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3102 do
3103 if _n_kwredef == old_child then
3104 if new_child != null then
3105 new_child.parent = self
3106 assert new_child isa TKwredef
3107 _n_kwredef = new_child
3108 else
3109 _n_kwredef = null
3110 end
3111 return
3112 end
3113 if _n_kwreadable == old_child then
3114 if new_child != null then
3115 new_child.parent = self
3116 assert new_child isa TKwreadable
3117 _n_kwreadable = new_child
3118 else
3119 abort
3120 end
3121 return
3122 end
3123 end
3124
3125 redef fun n_kwredef=(node)
3126 do
3127 _n_kwredef = node
3128 if node != null then
3129 node.parent = self
3130 end
3131 end
3132 redef fun n_kwreadable=(node)
3133 do
3134 _n_kwreadable = node
3135 node.parent = self
3136 end
3137
3138
3139 redef fun visit_all(v: Visitor)
3140 do
3141 if _n_kwredef != null then
3142 v.enter_visit(_n_kwredef.as(not null))
3143 end
3144 v.enter_visit(_n_kwreadable)
3145 end
3146 end
3147 redef class AWriteAble
3148 private init empty_init do end
3149
3150 init init_awriteable (
3151 n_kwredef: nullable TKwredef,
3152 n_visibility: nullable AVisibility,
3153 n_kwwritable: nullable TKwwritable
3154 )
3155 do
3156 empty_init
3157 _n_kwredef = n_kwredef
3158 if n_kwredef != null then
3159 n_kwredef.parent = self
3160 end
3161 _n_visibility = n_visibility
3162 if n_visibility != null then
3163 n_visibility.parent = self
3164 end
3165 _n_kwwritable = n_kwwritable.as(not null)
3166 n_kwwritable.parent = self
3167 end
3168
3169 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3170 do
3171 if _n_kwredef == old_child then
3172 if new_child != null then
3173 new_child.parent = self
3174 assert new_child isa TKwredef
3175 _n_kwredef = new_child
3176 else
3177 _n_kwredef = null
3178 end
3179 return
3180 end
3181 if _n_visibility == old_child then
3182 if new_child != null then
3183 new_child.parent = self
3184 assert new_child isa AVisibility
3185 _n_visibility = new_child
3186 else
3187 _n_visibility = null
3188 end
3189 return
3190 end
3191 if _n_kwwritable == old_child then
3192 if new_child != null then
3193 new_child.parent = self
3194 assert new_child isa TKwwritable
3195 _n_kwwritable = new_child
3196 else
3197 abort
3198 end
3199 return
3200 end
3201 end
3202
3203 redef fun n_kwredef=(node)
3204 do
3205 _n_kwredef = node
3206 if node != null then
3207 node.parent = self
3208 end
3209 end
3210 redef fun n_visibility=(node)
3211 do
3212 _n_visibility = node
3213 if node != null then
3214 node.parent = self
3215 end
3216 end
3217 redef fun n_kwwritable=(node)
3218 do
3219 _n_kwwritable = node
3220 node.parent = self
3221 end
3222
3223
3224 redef fun visit_all(v: Visitor)
3225 do
3226 if _n_kwredef != null then
3227 v.enter_visit(_n_kwredef.as(not null))
3228 end
3229 if _n_visibility != null then
3230 v.enter_visit(_n_visibility.as(not null))
3231 end
3232 v.enter_visit(_n_kwwritable)
3233 end
3234 end
3235 redef class AIdMethid
3236 private init empty_init do end
3237
3238 init init_aidmethid (
3239 n_id: nullable TId
3240 )
3241 do
3242 empty_init
3243 _n_id = n_id.as(not null)
3244 n_id.parent = self
3245 end
3246
3247 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3248 do
3249 if _n_id == old_child then
3250 if new_child != null then
3251 new_child.parent = self
3252 assert new_child isa TId
3253 _n_id = new_child
3254 else
3255 abort
3256 end
3257 return
3258 end
3259 end
3260
3261 redef fun n_id=(node)
3262 do
3263 _n_id = node
3264 node.parent = self
3265 end
3266
3267
3268 redef fun visit_all(v: Visitor)
3269 do
3270 v.enter_visit(_n_id)
3271 end
3272 end
3273 redef class APlusMethid
3274 private init empty_init do end
3275
3276 init init_aplusmethid (
3277 n_plus: nullable TPlus
3278 )
3279 do
3280 empty_init
3281 _n_plus = n_plus.as(not null)
3282 n_plus.parent = self
3283 end
3284
3285 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3286 do
3287 if _n_plus == old_child then
3288 if new_child != null then
3289 new_child.parent = self
3290 assert new_child isa TPlus
3291 _n_plus = new_child
3292 else
3293 abort
3294 end
3295 return
3296 end
3297 end
3298
3299 redef fun n_plus=(node)
3300 do
3301 _n_plus = node
3302 node.parent = self
3303 end
3304
3305
3306 redef fun visit_all(v: Visitor)
3307 do
3308 v.enter_visit(_n_plus)
3309 end
3310 end
3311 redef class AMinusMethid
3312 private init empty_init do end
3313
3314 init init_aminusmethid (
3315 n_minus: nullable TMinus
3316 )
3317 do
3318 empty_init
3319 _n_minus = n_minus.as(not null)
3320 n_minus.parent = self
3321 end
3322
3323 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3324 do
3325 if _n_minus == old_child then
3326 if new_child != null then
3327 new_child.parent = self
3328 assert new_child isa TMinus
3329 _n_minus = new_child
3330 else
3331 abort
3332 end
3333 return
3334 end
3335 end
3336
3337 redef fun n_minus=(node)
3338 do
3339 _n_minus = node
3340 node.parent = self
3341 end
3342
3343
3344 redef fun visit_all(v: Visitor)
3345 do
3346 v.enter_visit(_n_minus)
3347 end
3348 end
3349 redef class AStarMethid
3350 private init empty_init do end
3351
3352 init init_astarmethid (
3353 n_star: nullable TStar
3354 )
3355 do
3356 empty_init
3357 _n_star = n_star.as(not null)
3358 n_star.parent = self
3359 end
3360
3361 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3362 do
3363 if _n_star == old_child then
3364 if new_child != null then
3365 new_child.parent = self
3366 assert new_child isa TStar
3367 _n_star = new_child
3368 else
3369 abort
3370 end
3371 return
3372 end
3373 end
3374
3375 redef fun n_star=(node)
3376 do
3377 _n_star = node
3378 node.parent = self
3379 end
3380
3381
3382 redef fun visit_all(v: Visitor)
3383 do
3384 v.enter_visit(_n_star)
3385 end
3386 end
3387 redef class ASlashMethid
3388 private init empty_init do end
3389
3390 init init_aslashmethid (
3391 n_slash: nullable TSlash
3392 )
3393 do
3394 empty_init
3395 _n_slash = n_slash.as(not null)
3396 n_slash.parent = self
3397 end
3398
3399 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3400 do
3401 if _n_slash == old_child then
3402 if new_child != null then
3403 new_child.parent = self
3404 assert new_child isa TSlash
3405 _n_slash = new_child
3406 else
3407 abort
3408 end
3409 return
3410 end
3411 end
3412
3413 redef fun n_slash=(node)
3414 do
3415 _n_slash = node
3416 node.parent = self
3417 end
3418
3419
3420 redef fun visit_all(v: Visitor)
3421 do
3422 v.enter_visit(_n_slash)
3423 end
3424 end
3425 redef class APercentMethid
3426 private init empty_init do end
3427
3428 init init_apercentmethid (
3429 n_percent: nullable TPercent
3430 )
3431 do
3432 empty_init
3433 _n_percent = n_percent.as(not null)
3434 n_percent.parent = self
3435 end
3436
3437 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3438 do
3439 if _n_percent == old_child then
3440 if new_child != null then
3441 new_child.parent = self
3442 assert new_child isa TPercent
3443 _n_percent = new_child
3444 else
3445 abort
3446 end
3447 return
3448 end
3449 end
3450
3451 redef fun n_percent=(node)
3452 do
3453 _n_percent = node
3454 node.parent = self
3455 end
3456
3457
3458 redef fun visit_all(v: Visitor)
3459 do
3460 v.enter_visit(_n_percent)
3461 end
3462 end
3463 redef class AEqMethid
3464 private init empty_init do end
3465
3466 init init_aeqmethid (
3467 n_eq: nullable TEq
3468 )
3469 do
3470 empty_init
3471 _n_eq = n_eq.as(not null)
3472 n_eq.parent = self
3473 end
3474
3475 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3476 do
3477 if _n_eq == old_child then
3478 if new_child != null then
3479 new_child.parent = self
3480 assert new_child isa TEq
3481 _n_eq = new_child
3482 else
3483 abort
3484 end
3485 return
3486 end
3487 end
3488
3489 redef fun n_eq=(node)
3490 do
3491 _n_eq = node
3492 node.parent = self
3493 end
3494
3495
3496 redef fun visit_all(v: Visitor)
3497 do
3498 v.enter_visit(_n_eq)
3499 end
3500 end
3501 redef class ANeMethid
3502 private init empty_init do end
3503
3504 init init_anemethid (
3505 n_ne: nullable TNe
3506 )
3507 do
3508 empty_init
3509 _n_ne = n_ne.as(not null)
3510 n_ne.parent = self
3511 end
3512
3513 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3514 do
3515 if _n_ne == old_child then
3516 if new_child != null then
3517 new_child.parent = self
3518 assert new_child isa TNe
3519 _n_ne = new_child
3520 else
3521 abort
3522 end
3523 return
3524 end
3525 end
3526
3527 redef fun n_ne=(node)
3528 do
3529 _n_ne = node
3530 node.parent = self
3531 end
3532
3533
3534 redef fun visit_all(v: Visitor)
3535 do
3536 v.enter_visit(_n_ne)
3537 end
3538 end
3539 redef class ALeMethid
3540 private init empty_init do end
3541
3542 init init_alemethid (
3543 n_le: nullable TLe
3544 )
3545 do
3546 empty_init
3547 _n_le = n_le.as(not null)
3548 n_le.parent = self
3549 end
3550
3551 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3552 do
3553 if _n_le == old_child then
3554 if new_child != null then
3555 new_child.parent = self
3556 assert new_child isa TLe
3557 _n_le = new_child
3558 else
3559 abort
3560 end
3561 return
3562 end
3563 end
3564
3565 redef fun n_le=(node)
3566 do
3567 _n_le = node
3568 node.parent = self
3569 end
3570
3571
3572 redef fun visit_all(v: Visitor)
3573 do
3574 v.enter_visit(_n_le)
3575 end
3576 end
3577 redef class AGeMethid
3578 private init empty_init do end
3579
3580 init init_agemethid (
3581 n_ge: nullable TGe
3582 )
3583 do
3584 empty_init
3585 _n_ge = n_ge.as(not null)
3586 n_ge.parent = self
3587 end
3588
3589 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3590 do
3591 if _n_ge == old_child then
3592 if new_child != null then
3593 new_child.parent = self
3594 assert new_child isa TGe
3595 _n_ge = new_child
3596 else
3597 abort
3598 end
3599 return
3600 end
3601 end
3602
3603 redef fun n_ge=(node)
3604 do
3605 _n_ge = node
3606 node.parent = self
3607 end
3608
3609
3610 redef fun visit_all(v: Visitor)
3611 do
3612 v.enter_visit(_n_ge)
3613 end
3614 end
3615 redef class ALtMethid
3616 private init empty_init do end
3617
3618 init init_altmethid (
3619 n_lt: nullable TLt
3620 )
3621 do
3622 empty_init
3623 _n_lt = n_lt.as(not null)
3624 n_lt.parent = self
3625 end
3626
3627 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3628 do
3629 if _n_lt == old_child then
3630 if new_child != null then
3631 new_child.parent = self
3632 assert new_child isa TLt
3633 _n_lt = new_child
3634 else
3635 abort
3636 end
3637 return
3638 end
3639 end
3640
3641 redef fun n_lt=(node)
3642 do
3643 _n_lt = node
3644 node.parent = self
3645 end
3646
3647
3648 redef fun visit_all(v: Visitor)
3649 do
3650 v.enter_visit(_n_lt)
3651 end
3652 end
3653 redef class AGtMethid
3654 private init empty_init do end
3655
3656 init init_agtmethid (
3657 n_gt: nullable TGt
3658 )
3659 do
3660 empty_init
3661 _n_gt = n_gt.as(not null)
3662 n_gt.parent = self
3663 end
3664
3665 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3666 do
3667 if _n_gt == old_child then
3668 if new_child != null then
3669 new_child.parent = self
3670 assert new_child isa TGt
3671 _n_gt = new_child
3672 else
3673 abort
3674 end
3675 return
3676 end
3677 end
3678
3679 redef fun n_gt=(node)
3680 do
3681 _n_gt = node
3682 node.parent = self
3683 end
3684
3685
3686 redef fun visit_all(v: Visitor)
3687 do
3688 v.enter_visit(_n_gt)
3689 end
3690 end
3691 redef class ALlMethid
3692 private init empty_init do end
3693
3694 init init_allmethid (
3695 n_ll: nullable TLl
3696 )
3697 do
3698 empty_init
3699 _n_ll = n_ll.as(not null)
3700 n_ll.parent = self
3701 end
3702
3703 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3704 do
3705 if _n_ll == old_child then
3706 if new_child != null then
3707 new_child.parent = self
3708 assert new_child isa TLl
3709 _n_ll = new_child
3710 else
3711 abort
3712 end
3713 return
3714 end
3715 end
3716
3717 redef fun n_ll=(node)
3718 do
3719 _n_ll = node
3720 node.parent = self
3721 end
3722
3723
3724 redef fun visit_all(v: Visitor)
3725 do
3726 v.enter_visit(_n_ll)
3727 end
3728 end
3729 redef class AGgMethid
3730 private init empty_init do end
3731
3732 init init_aggmethid (
3733 n_gg: nullable TGg
3734 )
3735 do
3736 empty_init
3737 _n_gg = n_gg.as(not null)
3738 n_gg.parent = self
3739 end
3740
3741 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3742 do
3743 if _n_gg == old_child then
3744 if new_child != null then
3745 new_child.parent = self
3746 assert new_child isa TGg
3747 _n_gg = new_child
3748 else
3749 abort
3750 end
3751 return
3752 end
3753 end
3754
3755 redef fun n_gg=(node)
3756 do
3757 _n_gg = node
3758 node.parent = self
3759 end
3760
3761
3762 redef fun visit_all(v: Visitor)
3763 do
3764 v.enter_visit(_n_gg)
3765 end
3766 end
3767 redef class ABraMethid
3768 private init empty_init do end
3769
3770 init init_abramethid (
3771 n_obra: nullable TObra,
3772 n_cbra: nullable TCbra
3773 )
3774 do
3775 empty_init
3776 _n_obra = n_obra.as(not null)
3777 n_obra.parent = self
3778 _n_cbra = n_cbra.as(not null)
3779 n_cbra.parent = self
3780 end
3781
3782 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3783 do
3784 if _n_obra == old_child then
3785 if new_child != null then
3786 new_child.parent = self
3787 assert new_child isa TObra
3788 _n_obra = new_child
3789 else
3790 abort
3791 end
3792 return
3793 end
3794 if _n_cbra == old_child then
3795 if new_child != null then
3796 new_child.parent = self
3797 assert new_child isa TCbra
3798 _n_cbra = new_child
3799 else
3800 abort
3801 end
3802 return
3803 end
3804 end
3805
3806 redef fun n_obra=(node)
3807 do
3808 _n_obra = node
3809 node.parent = self
3810 end
3811 redef fun n_cbra=(node)
3812 do
3813 _n_cbra = node
3814 node.parent = self
3815 end
3816
3817
3818 redef fun visit_all(v: Visitor)
3819 do
3820 v.enter_visit(_n_obra)
3821 v.enter_visit(_n_cbra)
3822 end
3823 end
3824 redef class AStarshipMethid
3825 private init empty_init do end
3826
3827 init init_astarshipmethid (
3828 n_starship: nullable TStarship
3829 )
3830 do
3831 empty_init
3832 _n_starship = n_starship.as(not null)
3833 n_starship.parent = self
3834 end
3835
3836 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3837 do
3838 if _n_starship == old_child then
3839 if new_child != null then
3840 new_child.parent = self
3841 assert new_child isa TStarship
3842 _n_starship = new_child
3843 else
3844 abort
3845 end
3846 return
3847 end
3848 end
3849
3850 redef fun n_starship=(node)
3851 do
3852 _n_starship = node
3853 node.parent = self
3854 end
3855
3856
3857 redef fun visit_all(v: Visitor)
3858 do
3859 v.enter_visit(_n_starship)
3860 end
3861 end
3862 redef class AAssignMethid
3863 private init empty_init do end
3864
3865 init init_aassignmethid (
3866 n_id: nullable TId,
3867 n_assign: nullable TAssign
3868 )
3869 do
3870 empty_init
3871 _n_id = n_id.as(not null)
3872 n_id.parent = self
3873 _n_assign = n_assign.as(not null)
3874 n_assign.parent = self
3875 end
3876
3877 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3878 do
3879 if _n_id == old_child then
3880 if new_child != null then
3881 new_child.parent = self
3882 assert new_child isa TId
3883 _n_id = new_child
3884 else
3885 abort
3886 end
3887 return
3888 end
3889 if _n_assign == old_child then
3890 if new_child != null then
3891 new_child.parent = self
3892 assert new_child isa TAssign
3893 _n_assign = new_child
3894 else
3895 abort
3896 end
3897 return
3898 end
3899 end
3900
3901 redef fun n_id=(node)
3902 do
3903 _n_id = node
3904 node.parent = self
3905 end
3906 redef fun n_assign=(node)
3907 do
3908 _n_assign = node
3909 node.parent = self
3910 end
3911
3912
3913 redef fun visit_all(v: Visitor)
3914 do
3915 v.enter_visit(_n_id)
3916 v.enter_visit(_n_assign)
3917 end
3918 end
3919 redef class ABraassignMethid
3920 private init empty_init do end
3921
3922 init init_abraassignmethid (
3923 n_obra: nullable TObra,
3924 n_cbra: nullable TCbra,
3925 n_assign: nullable TAssign
3926 )
3927 do
3928 empty_init
3929 _n_obra = n_obra.as(not null)
3930 n_obra.parent = self
3931 _n_cbra = n_cbra.as(not null)
3932 n_cbra.parent = self
3933 _n_assign = n_assign.as(not null)
3934 n_assign.parent = self
3935 end
3936
3937 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3938 do
3939 if _n_obra == old_child then
3940 if new_child != null then
3941 new_child.parent = self
3942 assert new_child isa TObra
3943 _n_obra = new_child
3944 else
3945 abort
3946 end
3947 return
3948 end
3949 if _n_cbra == old_child then
3950 if new_child != null then
3951 new_child.parent = self
3952 assert new_child isa TCbra
3953 _n_cbra = new_child
3954 else
3955 abort
3956 end
3957 return
3958 end
3959 if _n_assign == old_child then
3960 if new_child != null then
3961 new_child.parent = self
3962 assert new_child isa TAssign
3963 _n_assign = new_child
3964 else
3965 abort
3966 end
3967 return
3968 end
3969 end
3970
3971 redef fun n_obra=(node)
3972 do
3973 _n_obra = node
3974 node.parent = self
3975 end
3976 redef fun n_cbra=(node)
3977 do
3978 _n_cbra = node
3979 node.parent = self
3980 end
3981 redef fun n_assign=(node)
3982 do
3983 _n_assign = node
3984 node.parent = self
3985 end
3986
3987
3988 redef fun visit_all(v: Visitor)
3989 do
3990 v.enter_visit(_n_obra)
3991 v.enter_visit(_n_cbra)
3992 v.enter_visit(_n_assign)
3993 end
3994 end
3995 redef class ASignature
3996 private init empty_init do end
3997
3998 init init_asignature (
3999 n_opar: nullable TOpar,
4000 n_params: Collection[Object], # Should be Collection[AParam]
4001 n_cpar: nullable TCpar,
4002 n_type: nullable AType,
4003 n_closure_decls: Collection[Object] # Should be Collection[AClosureDecl]
4004 )
4005 do
4006 empty_init
4007 _n_opar = n_opar
4008 if n_opar != null then
4009 n_opar.parent = self
4010 end
4011 for n in n_params do
4012 assert n isa AParam
4013 _n_params.add(n)
4014 n.parent = self
4015 end
4016 _n_cpar = n_cpar
4017 if n_cpar != null then
4018 n_cpar.parent = self
4019 end
4020 _n_type = n_type
4021 if n_type != null then
4022 n_type.parent = self
4023 end
4024 for n in n_closure_decls do
4025 assert n isa AClosureDecl
4026 _n_closure_decls.add(n)
4027 n.parent = self
4028 end
4029 end
4030
4031 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4032 do
4033 if _n_opar == old_child then
4034 if new_child != null then
4035 new_child.parent = self
4036 assert new_child isa TOpar
4037 _n_opar = new_child
4038 else
4039 _n_opar = null
4040 end
4041 return
4042 end
4043 for i in [0.._n_params.length[ do
4044 if _n_params[i] == old_child then
4045 if new_child != null then
4046 assert new_child isa AParam
4047 _n_params[i] = new_child
4048 new_child.parent = self
4049 else
4050 _n_params.remove_at(i)
4051 end
4052 return
4053 end
4054 end
4055 if _n_cpar == old_child then
4056 if new_child != null then
4057 new_child.parent = self
4058 assert new_child isa TCpar
4059 _n_cpar = new_child
4060 else
4061 _n_cpar = null
4062 end
4063 return
4064 end
4065 if _n_type == old_child then
4066 if new_child != null then
4067 new_child.parent = self
4068 assert new_child isa AType
4069 _n_type = new_child
4070 else
4071 _n_type = null
4072 end
4073 return
4074 end
4075 for i in [0.._n_closure_decls.length[ do
4076 if _n_closure_decls[i] == old_child then
4077 if new_child != null then
4078 assert new_child isa AClosureDecl
4079 _n_closure_decls[i] = new_child
4080 new_child.parent = self
4081 else
4082 _n_closure_decls.remove_at(i)
4083 end
4084 return
4085 end
4086 end
4087 end
4088
4089 redef fun n_opar=(node)
4090 do
4091 _n_opar = node
4092 if node != null then
4093 node.parent = self
4094 end
4095 end
4096 redef fun n_cpar=(node)
4097 do
4098 _n_cpar = node
4099 if node != null then
4100 node.parent = self
4101 end
4102 end
4103 redef fun n_type=(node)
4104 do
4105 _n_type = node
4106 if node != null then
4107 node.parent = self
4108 end
4109 end
4110
4111
4112 redef fun visit_all(v: Visitor)
4113 do
4114 if _n_opar != null then
4115 v.enter_visit(_n_opar.as(not null))
4116 end
4117 for n in _n_params do
4118 v.enter_visit(n)
4119 end
4120 if _n_cpar != null then
4121 v.enter_visit(_n_cpar.as(not null))
4122 end
4123 if _n_type != null then
4124 v.enter_visit(_n_type.as(not null))
4125 end
4126 for n in _n_closure_decls do
4127 v.enter_visit(n)
4128 end
4129 end
4130 end
4131 redef class AParam
4132 private init empty_init do end
4133
4134 init init_aparam (
4135 n_id: nullable TId,
4136 n_type: nullable AType,
4137 n_dotdotdot: nullable TDotdotdot,
4138 n_annotations: nullable AAnnotations
4139 )
4140 do
4141 empty_init
4142 _n_id = n_id.as(not null)
4143 n_id.parent = self
4144 _n_type = n_type
4145 if n_type != null then
4146 n_type.parent = self
4147 end
4148 _n_dotdotdot = n_dotdotdot
4149 if n_dotdotdot != null then
4150 n_dotdotdot.parent = self
4151 end
4152 _n_annotations = n_annotations
4153 if n_annotations != null then
4154 n_annotations.parent = self
4155 end
4156 end
4157
4158 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4159 do
4160 if _n_id == old_child then
4161 if new_child != null then
4162 new_child.parent = self
4163 assert new_child isa TId
4164 _n_id = new_child
4165 else
4166 abort
4167 end
4168 return
4169 end
4170 if _n_type == old_child then
4171 if new_child != null then
4172 new_child.parent = self
4173 assert new_child isa AType
4174 _n_type = new_child
4175 else
4176 _n_type = null
4177 end
4178 return
4179 end
4180 if _n_dotdotdot == old_child then
4181 if new_child != null then
4182 new_child.parent = self
4183 assert new_child isa TDotdotdot
4184 _n_dotdotdot = new_child
4185 else
4186 _n_dotdotdot = null
4187 end
4188 return
4189 end
4190 if _n_annotations == old_child then
4191 if new_child != null then
4192 new_child.parent = self
4193 assert new_child isa AAnnotations
4194 _n_annotations = new_child
4195 else
4196 _n_annotations = null
4197 end
4198 return
4199 end
4200 end
4201
4202 redef fun n_id=(node)
4203 do
4204 _n_id = node
4205 node.parent = self
4206 end
4207 redef fun n_type=(node)
4208 do
4209 _n_type = node
4210 if node != null then
4211 node.parent = self
4212 end
4213 end
4214 redef fun n_dotdotdot=(node)
4215 do
4216 _n_dotdotdot = node
4217 if node != null then
4218 node.parent = self
4219 end
4220 end
4221 redef fun n_annotations=(node)
4222 do
4223 _n_annotations = node
4224 if node != null then
4225 node.parent = self
4226 end
4227 end
4228
4229
4230 redef fun visit_all(v: Visitor)
4231 do
4232 v.enter_visit(_n_id)
4233 if _n_type != null then
4234 v.enter_visit(_n_type.as(not null))
4235 end
4236 if _n_dotdotdot != null then
4237 v.enter_visit(_n_dotdotdot.as(not null))
4238 end
4239 if _n_annotations != null then
4240 v.enter_visit(_n_annotations.as(not null))
4241 end
4242 end
4243 end
4244 redef class AClosureDecl
4245 private init empty_init do end
4246
4247 init init_aclosuredecl (
4248 n_kwbreak: nullable TKwbreak,
4249 n_bang: nullable TBang,
4250 n_id: nullable TId,
4251 n_signature: nullable ASignature,
4252 n_expr: nullable AExpr
4253 )
4254 do
4255 empty_init
4256 _n_kwbreak = n_kwbreak
4257 if n_kwbreak != null then
4258 n_kwbreak.parent = self
4259 end
4260 _n_bang = n_bang.as(not null)
4261 n_bang.parent = self
4262 _n_id = n_id.as(not null)
4263 n_id.parent = self
4264 _n_signature = n_signature.as(not null)
4265 n_signature.parent = self
4266 _n_expr = n_expr
4267 if n_expr != null then
4268 n_expr.parent = self
4269 end
4270 end
4271
4272 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4273 do
4274 if _n_kwbreak == old_child then
4275 if new_child != null then
4276 new_child.parent = self
4277 assert new_child isa TKwbreak
4278 _n_kwbreak = new_child
4279 else
4280 _n_kwbreak = null
4281 end
4282 return
4283 end
4284 if _n_bang == old_child then
4285 if new_child != null then
4286 new_child.parent = self
4287 assert new_child isa TBang
4288 _n_bang = new_child
4289 else
4290 abort
4291 end
4292 return
4293 end
4294 if _n_id == old_child then
4295 if new_child != null then
4296 new_child.parent = self
4297 assert new_child isa TId
4298 _n_id = new_child
4299 else
4300 abort
4301 end
4302 return
4303 end
4304 if _n_signature == old_child then
4305 if new_child != null then
4306 new_child.parent = self
4307 assert new_child isa ASignature
4308 _n_signature = new_child
4309 else
4310 abort
4311 end
4312 return
4313 end
4314 if _n_expr == old_child then
4315 if new_child != null then
4316 new_child.parent = self
4317 assert new_child isa AExpr
4318 _n_expr = new_child
4319 else
4320 _n_expr = null
4321 end
4322 return
4323 end
4324 end
4325
4326 redef fun n_kwbreak=(node)
4327 do
4328 _n_kwbreak = node
4329 if node != null then
4330 node.parent = self
4331 end
4332 end
4333 redef fun n_bang=(node)
4334 do
4335 _n_bang = node
4336 node.parent = self
4337 end
4338 redef fun n_id=(node)
4339 do
4340 _n_id = node
4341 node.parent = self
4342 end
4343 redef fun n_signature=(node)
4344 do
4345 _n_signature = node
4346 node.parent = self
4347 end
4348 redef fun n_expr=(node)
4349 do
4350 _n_expr = node
4351 if node != null then
4352 node.parent = self
4353 end
4354 end
4355
4356
4357 redef fun visit_all(v: Visitor)
4358 do
4359 if _n_kwbreak != null then
4360 v.enter_visit(_n_kwbreak.as(not null))
4361 end
4362 v.enter_visit(_n_bang)
4363 v.enter_visit(_n_id)
4364 v.enter_visit(_n_signature)
4365 if _n_expr != null then
4366 v.enter_visit(_n_expr.as(not null))
4367 end
4368 end
4369 end
4370 redef class AType
4371 private init empty_init do end
4372
4373 init init_atype (
4374 n_kwnullable: nullable TKwnullable,
4375 n_id: nullable TClassid,
4376 n_types: Collection[Object], # Should be Collection[AType]
4377 n_annotations: nullable AAnnotations
4378 )
4379 do
4380 empty_init
4381 _n_kwnullable = n_kwnullable
4382 if n_kwnullable != null then
4383 n_kwnullable.parent = self
4384 end
4385 _n_id = n_id.as(not null)
4386 n_id.parent = self
4387 for n in n_types do
4388 assert n isa AType
4389 _n_types.add(n)
4390 n.parent = self
4391 end
4392 _n_annotations = n_annotations
4393 if n_annotations != null then
4394 n_annotations.parent = self
4395 end
4396 end
4397
4398 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4399 do
4400 if _n_kwnullable == old_child then
4401 if new_child != null then
4402 new_child.parent = self
4403 assert new_child isa TKwnullable
4404 _n_kwnullable = new_child
4405 else
4406 _n_kwnullable = null
4407 end
4408 return
4409 end
4410 if _n_id == old_child then
4411 if new_child != null then
4412 new_child.parent = self
4413 assert new_child isa TClassid
4414 _n_id = new_child
4415 else
4416 abort
4417 end
4418 return
4419 end
4420 for i in [0.._n_types.length[ do
4421 if _n_types[i] == old_child then
4422 if new_child != null then
4423 assert new_child isa AType
4424 _n_types[i] = new_child
4425 new_child.parent = self
4426 else
4427 _n_types.remove_at(i)
4428 end
4429 return
4430 end
4431 end
4432 if _n_annotations == old_child then
4433 if new_child != null then
4434 new_child.parent = self
4435 assert new_child isa AAnnotations
4436 _n_annotations = new_child
4437 else
4438 _n_annotations = null
4439 end
4440 return
4441 end
4442 end
4443
4444 redef fun n_kwnullable=(node)
4445 do
4446 _n_kwnullable = node
4447 if node != null then
4448 node.parent = self
4449 end
4450 end
4451 redef fun n_id=(node)
4452 do
4453 _n_id = node
4454 node.parent = self
4455 end
4456 redef fun n_annotations=(node)
4457 do
4458 _n_annotations = node
4459 if node != null then
4460 node.parent = self
4461 end
4462 end
4463
4464
4465 redef fun visit_all(v: Visitor)
4466 do
4467 if _n_kwnullable != null then
4468 v.enter_visit(_n_kwnullable.as(not null))
4469 end
4470 v.enter_visit(_n_id)
4471 for n in _n_types do
4472 v.enter_visit(n)
4473 end
4474 if _n_annotations != null then
4475 v.enter_visit(_n_annotations.as(not null))
4476 end
4477 end
4478 end
4479 redef class ALabel
4480 private init empty_init do end
4481
4482 init init_alabel (
4483 n_kwlabel: nullable TKwlabel,
4484 n_id: nullable TId
4485 )
4486 do
4487 empty_init
4488 _n_kwlabel = n_kwlabel.as(not null)
4489 n_kwlabel.parent = self
4490 _n_id = n_id.as(not null)
4491 n_id.parent = self
4492 end
4493
4494 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4495 do
4496 if _n_kwlabel == old_child then
4497 if new_child != null then
4498 new_child.parent = self
4499 assert new_child isa TKwlabel
4500 _n_kwlabel = new_child
4501 else
4502 abort
4503 end
4504 return
4505 end
4506 if _n_id == old_child then
4507 if new_child != null then
4508 new_child.parent = self
4509 assert new_child isa TId
4510 _n_id = new_child
4511 else
4512 abort
4513 end
4514 return
4515 end
4516 end
4517
4518 redef fun n_kwlabel=(node)
4519 do
4520 _n_kwlabel = node
4521 node.parent = self
4522 end
4523 redef fun n_id=(node)
4524 do
4525 _n_id = node
4526 node.parent = self
4527 end
4528
4529
4530 redef fun visit_all(v: Visitor)
4531 do
4532 v.enter_visit(_n_kwlabel)
4533 v.enter_visit(_n_id)
4534 end
4535 end
4536 redef class ABlockExpr
4537 private init empty_init do end
4538
4539 init init_ablockexpr (
4540 n_expr: Collection[Object], # Should be Collection[AExpr]
4541 n_kwend: nullable TKwend
4542 )
4543 do
4544 empty_init
4545 for n in n_expr do
4546 assert n isa AExpr
4547 _n_expr.add(n)
4548 n.parent = self
4549 end
4550 _n_kwend = n_kwend
4551 if n_kwend != null then
4552 n_kwend.parent = self
4553 end
4554 end
4555
4556 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4557 do
4558 for i in [0.._n_expr.length[ do
4559 if _n_expr[i] == old_child then
4560 if new_child != null then
4561 assert new_child isa AExpr
4562 _n_expr[i] = new_child
4563 new_child.parent = self
4564 else
4565 _n_expr.remove_at(i)
4566 end
4567 return
4568 end
4569 end
4570 if _n_kwend == old_child then
4571 if new_child != null then
4572 new_child.parent = self
4573 assert new_child isa TKwend
4574 _n_kwend = new_child
4575 else
4576 _n_kwend = null
4577 end
4578 return
4579 end
4580 end
4581
4582 redef fun n_kwend=(node)
4583 do
4584 _n_kwend = node
4585 if node != null then
4586 node.parent = self
4587 end
4588 end
4589
4590
4591 redef fun visit_all(v: Visitor)
4592 do
4593 for n in _n_expr do
4594 v.enter_visit(n)
4595 end
4596 if _n_kwend != null then
4597 v.enter_visit(_n_kwend.as(not null))
4598 end
4599 end
4600 end
4601 redef class AVardeclExpr
4602 private init empty_init do end
4603
4604 init init_avardeclexpr (
4605 n_kwvar: nullable TKwvar,
4606 n_id: nullable TId,
4607 n_type: nullable AType,
4608 n_assign: nullable TAssign,
4609 n_expr: nullable AExpr,
4610 n_annotations: nullable AAnnotations
4611 )
4612 do
4613 empty_init
4614 _n_kwvar = n_kwvar.as(not null)
4615 n_kwvar.parent = self
4616 _n_id = n_id.as(not null)
4617 n_id.parent = self
4618 _n_type = n_type
4619 if n_type != null then
4620 n_type.parent = self
4621 end
4622 _n_assign = n_assign
4623 if n_assign != null then
4624 n_assign.parent = self
4625 end
4626 _n_expr = n_expr
4627 if n_expr != null then
4628 n_expr.parent = self
4629 end
4630 _n_annotations = n_annotations
4631 if n_annotations != null then
4632 n_annotations.parent = self
4633 end
4634 end
4635
4636 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4637 do
4638 if _n_kwvar == old_child then
4639 if new_child != null then
4640 new_child.parent = self
4641 assert new_child isa TKwvar
4642 _n_kwvar = new_child
4643 else
4644 abort
4645 end
4646 return
4647 end
4648 if _n_id == old_child then
4649 if new_child != null then
4650 new_child.parent = self
4651 assert new_child isa TId
4652 _n_id = new_child
4653 else
4654 abort
4655 end
4656 return
4657 end
4658 if _n_type == old_child then
4659 if new_child != null then
4660 new_child.parent = self
4661 assert new_child isa AType
4662 _n_type = new_child
4663 else
4664 _n_type = null
4665 end
4666 return
4667 end
4668 if _n_assign == old_child then
4669 if new_child != null then
4670 new_child.parent = self
4671 assert new_child isa TAssign
4672 _n_assign = new_child
4673 else
4674 _n_assign = null
4675 end
4676 return
4677 end
4678 if _n_expr == old_child then
4679 if new_child != null then
4680 new_child.parent = self
4681 assert new_child isa AExpr
4682 _n_expr = new_child
4683 else
4684 _n_expr = null
4685 end
4686 return
4687 end
4688 if _n_annotations == old_child then
4689 if new_child != null then
4690 new_child.parent = self
4691 assert new_child isa AAnnotations
4692 _n_annotations = new_child
4693 else
4694 _n_annotations = null
4695 end
4696 return
4697 end
4698 end
4699
4700 redef fun n_kwvar=(node)
4701 do
4702 _n_kwvar = node
4703 node.parent = self
4704 end
4705 redef fun n_id=(node)
4706 do
4707 _n_id = node
4708 node.parent = self
4709 end
4710 redef fun n_type=(node)
4711 do
4712 _n_type = node
4713 if node != null then
4714 node.parent = self
4715 end
4716 end
4717 redef fun n_assign=(node)
4718 do
4719 _n_assign = node
4720 if node != null then
4721 node.parent = self
4722 end
4723 end
4724 redef fun n_expr=(node)
4725 do
4726 _n_expr = node
4727 if node != null then
4728 node.parent = self
4729 end
4730 end
4731 redef fun n_annotations=(node)
4732 do
4733 _n_annotations = node
4734 if node != null then
4735 node.parent = self
4736 end
4737 end
4738
4739
4740 redef fun visit_all(v: Visitor)
4741 do
4742 v.enter_visit(_n_kwvar)
4743 v.enter_visit(_n_id)
4744 if _n_type != null then
4745 v.enter_visit(_n_type.as(not null))
4746 end
4747 if _n_assign != null then
4748 v.enter_visit(_n_assign.as(not null))
4749 end
4750 if _n_expr != null then
4751 v.enter_visit(_n_expr.as(not null))
4752 end
4753 if _n_annotations != null then
4754 v.enter_visit(_n_annotations.as(not null))
4755 end
4756 end
4757 end
4758 redef class AReturnExpr
4759 private init empty_init do end
4760
4761 init init_areturnexpr (
4762 n_kwreturn: nullable TKwreturn,
4763 n_expr: nullable AExpr
4764 )
4765 do
4766 empty_init
4767 _n_kwreturn = n_kwreturn
4768 if n_kwreturn != null then
4769 n_kwreturn.parent = self
4770 end
4771 _n_expr = n_expr
4772 if n_expr != null then
4773 n_expr.parent = self
4774 end
4775 end
4776
4777 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4778 do
4779 if _n_kwreturn == old_child then
4780 if new_child != null then
4781 new_child.parent = self
4782 assert new_child isa TKwreturn
4783 _n_kwreturn = new_child
4784 else
4785 _n_kwreturn = null
4786 end
4787 return
4788 end
4789 if _n_expr == old_child then
4790 if new_child != null then
4791 new_child.parent = self
4792 assert new_child isa AExpr
4793 _n_expr = new_child
4794 else
4795 _n_expr = null
4796 end
4797 return
4798 end
4799 end
4800
4801 redef fun n_kwreturn=(node)
4802 do
4803 _n_kwreturn = node
4804 if node != null then
4805 node.parent = self
4806 end
4807 end
4808 redef fun n_expr=(node)
4809 do
4810 _n_expr = node
4811 if node != null then
4812 node.parent = self
4813 end
4814 end
4815
4816
4817 redef fun visit_all(v: Visitor)
4818 do
4819 if _n_kwreturn != null then
4820 v.enter_visit(_n_kwreturn.as(not null))
4821 end
4822 if _n_expr != null then
4823 v.enter_visit(_n_expr.as(not null))
4824 end
4825 end
4826 end
4827 redef class ABreakExpr
4828 private init empty_init do end
4829
4830 init init_abreakexpr (
4831 n_kwbreak: nullable TKwbreak,
4832 n_label: nullable ALabel,
4833 n_expr: nullable AExpr
4834 )
4835 do
4836 empty_init
4837 _n_kwbreak = n_kwbreak.as(not null)
4838 n_kwbreak.parent = self
4839 _n_label = n_label
4840 if n_label != null then
4841 n_label.parent = self
4842 end
4843 _n_expr = n_expr
4844 if n_expr != null then
4845 n_expr.parent = self
4846 end
4847 end
4848
4849 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4850 do
4851 if _n_kwbreak == old_child then
4852 if new_child != null then
4853 new_child.parent = self
4854 assert new_child isa TKwbreak
4855 _n_kwbreak = new_child
4856 else
4857 abort
4858 end
4859 return
4860 end
4861 if _n_label == old_child then
4862 if new_child != null then
4863 new_child.parent = self
4864 assert new_child isa ALabel
4865 _n_label = new_child
4866 else
4867 _n_label = null
4868 end
4869 return
4870 end
4871 if _n_expr == old_child then
4872 if new_child != null then
4873 new_child.parent = self
4874 assert new_child isa AExpr
4875 _n_expr = new_child
4876 else
4877 _n_expr = null
4878 end
4879 return
4880 end
4881 end
4882
4883 redef fun n_kwbreak=(node)
4884 do
4885 _n_kwbreak = node
4886 node.parent = self
4887 end
4888 redef fun n_label=(node)
4889 do
4890 _n_label = node
4891 if node != null then
4892 node.parent = self
4893 end
4894 end
4895 redef fun n_expr=(node)
4896 do
4897 _n_expr = node
4898 if node != null then
4899 node.parent = self
4900 end
4901 end
4902
4903
4904 redef fun visit_all(v: Visitor)
4905 do
4906 v.enter_visit(_n_kwbreak)
4907 if _n_label != null then
4908 v.enter_visit(_n_label.as(not null))
4909 end
4910 if _n_expr != null then
4911 v.enter_visit(_n_expr.as(not null))
4912 end
4913 end
4914 end
4915 redef class AAbortExpr
4916 private init empty_init do end
4917
4918 init init_aabortexpr (
4919 n_kwabort: nullable TKwabort
4920 )
4921 do
4922 empty_init
4923 _n_kwabort = n_kwabort.as(not null)
4924 n_kwabort.parent = self
4925 end
4926
4927 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4928 do
4929 if _n_kwabort == old_child then
4930 if new_child != null then
4931 new_child.parent = self
4932 assert new_child isa TKwabort
4933 _n_kwabort = new_child
4934 else
4935 abort
4936 end
4937 return
4938 end
4939 end
4940
4941 redef fun n_kwabort=(node)
4942 do
4943 _n_kwabort = node
4944 node.parent = self
4945 end
4946
4947
4948 redef fun visit_all(v: Visitor)
4949 do
4950 v.enter_visit(_n_kwabort)
4951 end
4952 end
4953 redef class AContinueExpr
4954 private init empty_init do end
4955
4956 init init_acontinueexpr (
4957 n_kwcontinue: nullable TKwcontinue,
4958 n_label: nullable ALabel,
4959 n_expr: nullable AExpr
4960 )
4961 do
4962 empty_init
4963 _n_kwcontinue = n_kwcontinue
4964 if n_kwcontinue != null then
4965 n_kwcontinue.parent = self
4966 end
4967 _n_label = n_label
4968 if n_label != null then
4969 n_label.parent = self
4970 end
4971 _n_expr = n_expr
4972 if n_expr != null then
4973 n_expr.parent = self
4974 end
4975 end
4976
4977 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4978 do
4979 if _n_kwcontinue == old_child then
4980 if new_child != null then
4981 new_child.parent = self
4982 assert new_child isa TKwcontinue
4983 _n_kwcontinue = new_child
4984 else
4985 _n_kwcontinue = null
4986 end
4987 return
4988 end
4989 if _n_label == old_child then
4990 if new_child != null then
4991 new_child.parent = self
4992 assert new_child isa ALabel
4993 _n_label = new_child
4994 else
4995 _n_label = null
4996 end
4997 return
4998 end
4999 if _n_expr == old_child then
5000 if new_child != null then
5001 new_child.parent = self
5002 assert new_child isa AExpr
5003 _n_expr = new_child
5004 else
5005 _n_expr = null
5006 end
5007 return
5008 end
5009 end
5010
5011 redef fun n_kwcontinue=(node)
5012 do
5013 _n_kwcontinue = node
5014 if node != null then
5015 node.parent = self
5016 end
5017 end
5018 redef fun n_label=(node)
5019 do
5020 _n_label = node
5021 if node != null then
5022 node.parent = self
5023 end
5024 end
5025 redef fun n_expr=(node)
5026 do
5027 _n_expr = node
5028 if node != null then
5029 node.parent = self
5030 end
5031 end
5032
5033
5034 redef fun visit_all(v: Visitor)
5035 do
5036 if _n_kwcontinue != null then
5037 v.enter_visit(_n_kwcontinue.as(not null))
5038 end
5039 if _n_label != null then
5040 v.enter_visit(_n_label.as(not null))
5041 end
5042 if _n_expr != null then
5043 v.enter_visit(_n_expr.as(not null))
5044 end
5045 end
5046 end
5047 redef class ADoExpr
5048 private init empty_init do end
5049
5050 init init_adoexpr (
5051 n_kwdo: nullable TKwdo,
5052 n_block: nullable AExpr,
5053 n_label: nullable ALabel
5054 )
5055 do
5056 empty_init
5057 _n_kwdo = n_kwdo.as(not null)
5058 n_kwdo.parent = self
5059 _n_block = n_block
5060 if n_block != null then
5061 n_block.parent = self
5062 end
5063 _n_label = n_label
5064 if n_label != null then
5065 n_label.parent = self
5066 end
5067 end
5068
5069 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5070 do
5071 if _n_kwdo == old_child then
5072 if new_child != null then
5073 new_child.parent = self
5074 assert new_child isa TKwdo
5075 _n_kwdo = new_child
5076 else
5077 abort
5078 end
5079 return
5080 end
5081 if _n_block == old_child then
5082 if new_child != null then
5083 new_child.parent = self
5084 assert new_child isa AExpr
5085 _n_block = new_child
5086 else
5087 _n_block = null
5088 end
5089 return
5090 end
5091 if _n_label == old_child then
5092 if new_child != null then
5093 new_child.parent = self
5094 assert new_child isa ALabel
5095 _n_label = new_child
5096 else
5097 _n_label = null
5098 end
5099 return
5100 end
5101 end
5102
5103 redef fun n_kwdo=(node)
5104 do
5105 _n_kwdo = node
5106 node.parent = self
5107 end
5108 redef fun n_block=(node)
5109 do
5110 _n_block = node
5111 if node != null then
5112 node.parent = self
5113 end
5114 end
5115 redef fun n_label=(node)
5116 do
5117 _n_label = node
5118 if node != null then
5119 node.parent = self
5120 end
5121 end
5122
5123
5124 redef fun visit_all(v: Visitor)
5125 do
5126 v.enter_visit(_n_kwdo)
5127 if _n_block != null then
5128 v.enter_visit(_n_block.as(not null))
5129 end
5130 if _n_label != null then
5131 v.enter_visit(_n_label.as(not null))
5132 end
5133 end
5134 end
5135 redef class AIfExpr
5136 private init empty_init do end
5137
5138 init init_aifexpr (
5139 n_kwif: nullable TKwif,
5140 n_expr: nullable AExpr,
5141 n_then: nullable AExpr,
5142 n_else: nullable AExpr
5143 )
5144 do
5145 empty_init
5146 _n_kwif = n_kwif.as(not null)
5147 n_kwif.parent = self
5148 _n_expr = n_expr.as(not null)
5149 n_expr.parent = self
5150 _n_then = n_then
5151 if n_then != null then
5152 n_then.parent = self
5153 end
5154 _n_else = n_else
5155 if n_else != null then
5156 n_else.parent = self
5157 end
5158 end
5159
5160 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5161 do
5162 if _n_kwif == old_child then
5163 if new_child != null then
5164 new_child.parent = self
5165 assert new_child isa TKwif
5166 _n_kwif = new_child
5167 else
5168 abort
5169 end
5170 return
5171 end
5172 if _n_expr == old_child then
5173 if new_child != null then
5174 new_child.parent = self
5175 assert new_child isa AExpr
5176 _n_expr = new_child
5177 else
5178 abort
5179 end
5180 return
5181 end
5182 if _n_then == old_child then
5183 if new_child != null then
5184 new_child.parent = self
5185 assert new_child isa AExpr
5186 _n_then = new_child
5187 else
5188 _n_then = null
5189 end
5190 return
5191 end
5192 if _n_else == old_child then
5193 if new_child != null then
5194 new_child.parent = self
5195 assert new_child isa AExpr
5196 _n_else = new_child
5197 else
5198 _n_else = null
5199 end
5200 return
5201 end
5202 end
5203
5204 redef fun n_kwif=(node)
5205 do
5206 _n_kwif = node
5207 node.parent = self
5208 end
5209 redef fun n_expr=(node)
5210 do
5211 _n_expr = node
5212 node.parent = self
5213 end
5214 redef fun n_then=(node)
5215 do
5216 _n_then = node
5217 if node != null then
5218 node.parent = self
5219 end
5220 end
5221 redef fun n_else=(node)
5222 do
5223 _n_else = node
5224 if node != null then
5225 node.parent = self
5226 end
5227 end
5228
5229
5230 redef fun visit_all(v: Visitor)
5231 do
5232 v.enter_visit(_n_kwif)
5233 v.enter_visit(_n_expr)
5234 if _n_then != null then
5235 v.enter_visit(_n_then.as(not null))
5236 end
5237 if _n_else != null then
5238 v.enter_visit(_n_else.as(not null))
5239 end
5240 end
5241 end
5242 redef class AIfexprExpr
5243 private init empty_init do end
5244
5245 init init_aifexprexpr (
5246 n_kwif: nullable TKwif,
5247 n_expr: nullable AExpr,
5248 n_kwthen: nullable TKwthen,
5249 n_then: nullable AExpr,
5250 n_kwelse: nullable TKwelse,
5251 n_else: nullable AExpr
5252 )
5253 do
5254 empty_init
5255 _n_kwif = n_kwif.as(not null)
5256 n_kwif.parent = self
5257 _n_expr = n_expr.as(not null)
5258 n_expr.parent = self
5259 _n_kwthen = n_kwthen.as(not null)
5260 n_kwthen.parent = self
5261 _n_then = n_then.as(not null)
5262 n_then.parent = self
5263 _n_kwelse = n_kwelse.as(not null)
5264 n_kwelse.parent = self
5265 _n_else = n_else.as(not null)
5266 n_else.parent = self
5267 end
5268
5269 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5270 do
5271 if _n_kwif == old_child then
5272 if new_child != null then
5273 new_child.parent = self
5274 assert new_child isa TKwif
5275 _n_kwif = new_child
5276 else
5277 abort
5278 end
5279 return
5280 end
5281 if _n_expr == old_child then
5282 if new_child != null then
5283 new_child.parent = self
5284 assert new_child isa AExpr
5285 _n_expr = new_child
5286 else
5287 abort
5288 end
5289 return
5290 end
5291 if _n_kwthen == old_child then
5292 if new_child != null then
5293 new_child.parent = self
5294 assert new_child isa TKwthen
5295 _n_kwthen = new_child
5296 else
5297 abort
5298 end
5299 return
5300 end
5301 if _n_then == old_child then
5302 if new_child != null then
5303 new_child.parent = self
5304 assert new_child isa AExpr
5305 _n_then = new_child
5306 else
5307 abort
5308 end
5309 return
5310 end
5311 if _n_kwelse == old_child then
5312 if new_child != null then
5313 new_child.parent = self
5314 assert new_child isa TKwelse
5315 _n_kwelse = new_child
5316 else
5317 abort
5318 end
5319 return
5320 end
5321 if _n_else == old_child then
5322 if new_child != null then
5323 new_child.parent = self
5324 assert new_child isa AExpr
5325 _n_else = new_child
5326 else
5327 abort
5328 end
5329 return
5330 end
5331 end
5332
5333 redef fun n_kwif=(node)
5334 do
5335 _n_kwif = node
5336 node.parent = self
5337 end
5338 redef fun n_expr=(node)
5339 do
5340 _n_expr = node
5341 node.parent = self
5342 end
5343 redef fun n_kwthen=(node)
5344 do
5345 _n_kwthen = node
5346 node.parent = self
5347 end
5348 redef fun n_then=(node)
5349 do
5350 _n_then = node
5351 node.parent = self
5352 end
5353 redef fun n_kwelse=(node)
5354 do
5355 _n_kwelse = node
5356 node.parent = self
5357 end
5358 redef fun n_else=(node)
5359 do
5360 _n_else = node
5361 node.parent = self
5362 end
5363
5364
5365 redef fun visit_all(v: Visitor)
5366 do
5367 v.enter_visit(_n_kwif)
5368 v.enter_visit(_n_expr)
5369 v.enter_visit(_n_kwthen)
5370 v.enter_visit(_n_then)
5371 v.enter_visit(_n_kwelse)
5372 v.enter_visit(_n_else)
5373 end
5374 end
5375 redef class AWhileExpr
5376 private init empty_init do end
5377
5378 init init_awhileexpr (
5379 n_kwwhile: nullable TKwwhile,
5380 n_expr: nullable AExpr,
5381 n_kwdo: nullable TKwdo,
5382 n_block: nullable AExpr,
5383 n_label: nullable ALabel
5384 )
5385 do
5386 empty_init
5387 _n_kwwhile = n_kwwhile.as(not null)
5388 n_kwwhile.parent = self
5389 _n_expr = n_expr.as(not null)
5390 n_expr.parent = self
5391 _n_kwdo = n_kwdo.as(not null)
5392 n_kwdo.parent = self
5393 _n_block = n_block
5394 if n_block != null then
5395 n_block.parent = self
5396 end
5397 _n_label = n_label
5398 if n_label != null then
5399 n_label.parent = self
5400 end
5401 end
5402
5403 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5404 do
5405 if _n_kwwhile == old_child then
5406 if new_child != null then
5407 new_child.parent = self
5408 assert new_child isa TKwwhile
5409 _n_kwwhile = new_child
5410 else
5411 abort
5412 end
5413 return
5414 end
5415 if _n_expr == old_child then
5416 if new_child != null then
5417 new_child.parent = self
5418 assert new_child isa AExpr
5419 _n_expr = new_child
5420 else
5421 abort
5422 end
5423 return
5424 end
5425 if _n_kwdo == old_child then
5426 if new_child != null then
5427 new_child.parent = self
5428 assert new_child isa TKwdo
5429 _n_kwdo = new_child
5430 else
5431 abort
5432 end
5433 return
5434 end
5435 if _n_block == old_child then
5436 if new_child != null then
5437 new_child.parent = self
5438 assert new_child isa AExpr
5439 _n_block = new_child
5440 else
5441 _n_block = null
5442 end
5443 return
5444 end
5445 if _n_label == old_child then
5446 if new_child != null then
5447 new_child.parent = self
5448 assert new_child isa ALabel
5449 _n_label = new_child
5450 else
5451 _n_label = null
5452 end
5453 return
5454 end
5455 end
5456
5457 redef fun n_kwwhile=(node)
5458 do
5459 _n_kwwhile = node
5460 node.parent = self
5461 end
5462 redef fun n_expr=(node)
5463 do
5464 _n_expr = node
5465 node.parent = self
5466 end
5467 redef fun n_kwdo=(node)
5468 do
5469 _n_kwdo = node
5470 node.parent = self
5471 end
5472 redef fun n_block=(node)
5473 do
5474 _n_block = node
5475 if node != null then
5476 node.parent = self
5477 end
5478 end
5479 redef fun n_label=(node)
5480 do
5481 _n_label = node
5482 if node != null then
5483 node.parent = self
5484 end
5485 end
5486
5487
5488 redef fun visit_all(v: Visitor)
5489 do
5490 v.enter_visit(_n_kwwhile)
5491 v.enter_visit(_n_expr)
5492 v.enter_visit(_n_kwdo)
5493 if _n_block != null then
5494 v.enter_visit(_n_block.as(not null))
5495 end
5496 if _n_label != null then
5497 v.enter_visit(_n_label.as(not null))
5498 end
5499 end
5500 end
5501 redef class ALoopExpr
5502 private init empty_init do end
5503
5504 init init_aloopexpr (
5505 n_kwloop: nullable TKwloop,
5506 n_block: nullable AExpr,
5507 n_label: nullable ALabel
5508 )
5509 do
5510 empty_init
5511 _n_kwloop = n_kwloop.as(not null)
5512 n_kwloop.parent = self
5513 _n_block = n_block
5514 if n_block != null then
5515 n_block.parent = self
5516 end
5517 _n_label = n_label
5518 if n_label != null then
5519 n_label.parent = self
5520 end
5521 end
5522
5523 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5524 do
5525 if _n_kwloop == old_child then
5526 if new_child != null then
5527 new_child.parent = self
5528 assert new_child isa TKwloop
5529 _n_kwloop = new_child
5530 else
5531 abort
5532 end
5533 return
5534 end
5535 if _n_block == old_child then
5536 if new_child != null then
5537 new_child.parent = self
5538 assert new_child isa AExpr
5539 _n_block = new_child
5540 else
5541 _n_block = null
5542 end
5543 return
5544 end
5545 if _n_label == old_child then
5546 if new_child != null then
5547 new_child.parent = self
5548 assert new_child isa ALabel
5549 _n_label = new_child
5550 else
5551 _n_label = null
5552 end
5553 return
5554 end
5555 end
5556
5557 redef fun n_kwloop=(node)
5558 do
5559 _n_kwloop = node
5560 node.parent = self
5561 end
5562 redef fun n_block=(node)
5563 do
5564 _n_block = node
5565 if node != null then
5566 node.parent = self
5567 end
5568 end
5569 redef fun n_label=(node)
5570 do
5571 _n_label = node
5572 if node != null then
5573 node.parent = self
5574 end
5575 end
5576
5577
5578 redef fun visit_all(v: Visitor)
5579 do
5580 v.enter_visit(_n_kwloop)
5581 if _n_block != null then
5582 v.enter_visit(_n_block.as(not null))
5583 end
5584 if _n_label != null then
5585 v.enter_visit(_n_label.as(not null))
5586 end
5587 end
5588 end
5589 redef class AForExpr
5590 private init empty_init do end
5591
5592 init init_aforexpr (
5593 n_kwfor: nullable TKwfor,
5594 n_ids: Collection[Object], # Should be Collection[TId]
5595 n_expr: nullable AExpr,
5596 n_kwdo: nullable TKwdo,
5597 n_block: nullable AExpr,
5598 n_label: nullable ALabel
5599 )
5600 do
5601 empty_init
5602 _n_kwfor = n_kwfor.as(not null)
5603 n_kwfor.parent = self
5604 for n in n_ids do
5605 assert n isa TId
5606 _n_ids.add(n)
5607 n.parent = self
5608 end
5609 _n_expr = n_expr.as(not null)
5610 n_expr.parent = self
5611 _n_kwdo = n_kwdo.as(not null)
5612 n_kwdo.parent = self
5613 _n_block = n_block
5614 if n_block != null then
5615 n_block.parent = self
5616 end
5617 _n_label = n_label
5618 if n_label != null then
5619 n_label.parent = self
5620 end
5621 end
5622
5623 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5624 do
5625 if _n_kwfor == old_child then
5626 if new_child != null then
5627 new_child.parent = self
5628 assert new_child isa TKwfor
5629 _n_kwfor = new_child
5630 else
5631 abort
5632 end
5633 return
5634 end
5635 for i in [0.._n_ids.length[ do
5636 if _n_ids[i] == old_child then
5637 if new_child != null then
5638 assert new_child isa TId
5639 _n_ids[i] = new_child
5640 new_child.parent = self
5641 else
5642 _n_ids.remove_at(i)
5643 end
5644 return
5645 end
5646 end
5647 if _n_expr == old_child then
5648 if new_child != null then
5649 new_child.parent = self
5650 assert new_child isa AExpr
5651 _n_expr = new_child
5652 else
5653 abort
5654 end
5655 return
5656 end
5657 if _n_kwdo == old_child then
5658 if new_child != null then
5659 new_child.parent = self
5660 assert new_child isa TKwdo
5661 _n_kwdo = new_child
5662 else
5663 abort
5664 end
5665 return
5666 end
5667 if _n_block == old_child then
5668 if new_child != null then
5669 new_child.parent = self
5670 assert new_child isa AExpr
5671 _n_block = new_child
5672 else
5673 _n_block = null
5674 end
5675 return
5676 end
5677 if _n_label == old_child then
5678 if new_child != null then
5679 new_child.parent = self
5680 assert new_child isa ALabel
5681 _n_label = new_child
5682 else
5683 _n_label = null
5684 end
5685 return
5686 end
5687 end
5688
5689 redef fun n_kwfor=(node)
5690 do
5691 _n_kwfor = node
5692 node.parent = self
5693 end
5694 redef fun n_expr=(node)
5695 do
5696 _n_expr = node
5697 node.parent = self
5698 end
5699 redef fun n_kwdo=(node)
5700 do
5701 _n_kwdo = node
5702 node.parent = self
5703 end
5704 redef fun n_block=(node)
5705 do
5706 _n_block = node
5707 if node != null then
5708 node.parent = self
5709 end
5710 end
5711 redef fun n_label=(node)
5712 do
5713 _n_label = node
5714 if node != null then
5715 node.parent = self
5716 end
5717 end
5718
5719
5720 redef fun visit_all(v: Visitor)
5721 do
5722 v.enter_visit(_n_kwfor)
5723 for n in _n_ids do
5724 v.enter_visit(n)
5725 end
5726 v.enter_visit(_n_expr)
5727 v.enter_visit(_n_kwdo)
5728 if _n_block != null then
5729 v.enter_visit(_n_block.as(not null))
5730 end
5731 if _n_label != null then
5732 v.enter_visit(_n_label.as(not null))
5733 end
5734 end
5735 end
5736 redef class AAssertExpr
5737 private init empty_init do end
5738
5739 init init_aassertexpr (
5740 n_kwassert: nullable TKwassert,
5741 n_id: nullable TId,
5742 n_expr: nullable AExpr,
5743 n_else: nullable AExpr
5744 )
5745 do
5746 empty_init
5747 _n_kwassert = n_kwassert.as(not null)
5748 n_kwassert.parent = self
5749 _n_id = n_id
5750 if n_id != null then
5751 n_id.parent = self
5752 end
5753 _n_expr = n_expr.as(not null)
5754 n_expr.parent = self
5755 _n_else = n_else
5756 if n_else != null then
5757 n_else.parent = self
5758 end
5759 end
5760
5761 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5762 do
5763 if _n_kwassert == old_child then
5764 if new_child != null then
5765 new_child.parent = self
5766 assert new_child isa TKwassert
5767 _n_kwassert = new_child
5768 else
5769 abort
5770 end
5771 return
5772 end
5773 if _n_id == old_child then
5774 if new_child != null then
5775 new_child.parent = self
5776 assert new_child isa TId
5777 _n_id = new_child
5778 else
5779 _n_id = null
5780 end
5781 return
5782 end
5783 if _n_expr == old_child then
5784 if new_child != null then
5785 new_child.parent = self
5786 assert new_child isa AExpr
5787 _n_expr = new_child
5788 else
5789 abort
5790 end
5791 return
5792 end
5793 if _n_else == old_child then
5794 if new_child != null then
5795 new_child.parent = self
5796 assert new_child isa AExpr
5797 _n_else = new_child
5798 else
5799 _n_else = null
5800 end
5801 return
5802 end
5803 end
5804
5805 redef fun n_kwassert=(node)
5806 do
5807 _n_kwassert = node
5808 node.parent = self
5809 end
5810 redef fun n_id=(node)
5811 do
5812 _n_id = node
5813 if node != null then
5814 node.parent = self
5815 end
5816 end
5817 redef fun n_expr=(node)
5818 do
5819 _n_expr = node
5820 node.parent = self
5821 end
5822 redef fun n_else=(node)
5823 do
5824 _n_else = node
5825 if node != null then
5826 node.parent = self
5827 end
5828 end
5829
5830
5831 redef fun visit_all(v: Visitor)
5832 do
5833 v.enter_visit(_n_kwassert)
5834 if _n_id != null then
5835 v.enter_visit(_n_id.as(not null))
5836 end
5837 v.enter_visit(_n_expr)
5838 if _n_else != null then
5839 v.enter_visit(_n_else.as(not null))
5840 end
5841 end
5842 end
5843 redef class AOnceExpr
5844 private init empty_init do end
5845
5846 init init_aonceexpr (
5847 n_kwonce: nullable TKwonce,
5848 n_expr: nullable AExpr
5849 )
5850 do
5851 empty_init
5852 _n_kwonce = n_kwonce.as(not null)
5853 n_kwonce.parent = self
5854 _n_expr = n_expr.as(not null)
5855 n_expr.parent = self
5856 end
5857
5858 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5859 do
5860 if _n_kwonce == old_child then
5861 if new_child != null then
5862 new_child.parent = self
5863 assert new_child isa TKwonce
5864 _n_kwonce = new_child
5865 else
5866 abort
5867 end
5868 return
5869 end
5870 if _n_expr == old_child then
5871 if new_child != null then
5872 new_child.parent = self
5873 assert new_child isa AExpr
5874 _n_expr = new_child
5875 else
5876 abort
5877 end
5878 return
5879 end
5880 end
5881
5882 redef fun n_kwonce=(node)
5883 do
5884 _n_kwonce = node
5885 node.parent = self
5886 end
5887 redef fun n_expr=(node)
5888 do
5889 _n_expr = node
5890 node.parent = self
5891 end
5892
5893
5894 redef fun visit_all(v: Visitor)
5895 do
5896 v.enter_visit(_n_kwonce)
5897 v.enter_visit(_n_expr)
5898 end
5899 end
5900 redef class ASendExpr
5901 private init empty_init do end
5902
5903 init init_asendexpr (
5904 n_expr: nullable AExpr
5905 )
5906 do
5907 empty_init
5908 _n_expr = n_expr.as(not null)
5909 n_expr.parent = self
5910 end
5911
5912 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5913 do
5914 if _n_expr == old_child then
5915 if new_child != null then
5916 new_child.parent = self
5917 assert new_child isa AExpr
5918 _n_expr = new_child
5919 else
5920 abort
5921 end
5922 return
5923 end
5924 end
5925
5926 redef fun n_expr=(node)
5927 do
5928 _n_expr = node
5929 node.parent = self
5930 end
5931
5932
5933 redef fun visit_all(v: Visitor)
5934 do
5935 v.enter_visit(_n_expr)
5936 end
5937 end
5938 redef class ABinopExpr
5939 private init empty_init do end
5940
5941 init init_abinopexpr (
5942 n_expr: nullable AExpr,
5943 n_expr2: nullable AExpr
5944 )
5945 do
5946 empty_init
5947 _n_expr = n_expr.as(not null)
5948 n_expr.parent = self
5949 _n_expr2 = n_expr2.as(not null)
5950 n_expr2.parent = self
5951 end
5952
5953 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5954 do
5955 if _n_expr == old_child then
5956 if new_child != null then
5957 new_child.parent = self
5958 assert new_child isa AExpr
5959 _n_expr = new_child
5960 else
5961 abort
5962 end
5963 return
5964 end
5965 if _n_expr2 == old_child then
5966 if new_child != null then
5967 new_child.parent = self
5968 assert new_child isa AExpr
5969 _n_expr2 = new_child
5970 else
5971 abort
5972 end
5973 return
5974 end
5975 end
5976
5977 redef fun n_expr=(node)
5978 do
5979 _n_expr = node
5980 node.parent = self
5981 end
5982 redef fun n_expr2=(node)
5983 do
5984 _n_expr2 = node
5985 node.parent = self
5986 end
5987
5988
5989 redef fun visit_all(v: Visitor)
5990 do
5991 v.enter_visit(_n_expr)
5992 v.enter_visit(_n_expr2)
5993 end
5994 end
5995 redef class AOrExpr
5996 private init empty_init do end
5997
5998 init init_aorexpr (
5999 n_expr: nullable AExpr,
6000 n_expr2: nullable AExpr
6001 )
6002 do
6003 empty_init
6004 _n_expr = n_expr.as(not null)
6005 n_expr.parent = self
6006 _n_expr2 = n_expr2.as(not null)
6007 n_expr2.parent = self
6008 end
6009
6010 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6011 do
6012 if _n_expr == old_child then
6013 if new_child != null then
6014 new_child.parent = self
6015 assert new_child isa AExpr
6016 _n_expr = new_child
6017 else
6018 abort
6019 end
6020 return
6021 end
6022 if _n_expr2 == old_child then
6023 if new_child != null then
6024 new_child.parent = self
6025 assert new_child isa AExpr
6026 _n_expr2 = new_child
6027 else
6028 abort
6029 end
6030 return
6031 end
6032 end
6033
6034 redef fun n_expr=(node)
6035 do
6036 _n_expr = node
6037 node.parent = self
6038 end
6039 redef fun n_expr2=(node)
6040 do
6041 _n_expr2 = node
6042 node.parent = self
6043 end
6044
6045
6046 redef fun visit_all(v: Visitor)
6047 do
6048 v.enter_visit(_n_expr)
6049 v.enter_visit(_n_expr2)
6050 end
6051 end
6052 redef class AAndExpr
6053 private init empty_init do end
6054
6055 init init_aandexpr (
6056 n_expr: nullable AExpr,
6057 n_expr2: nullable AExpr
6058 )
6059 do
6060 empty_init
6061 _n_expr = n_expr.as(not null)
6062 n_expr.parent = self
6063 _n_expr2 = n_expr2.as(not null)
6064 n_expr2.parent = self
6065 end
6066
6067 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6068 do
6069 if _n_expr == old_child then
6070 if new_child != null then
6071 new_child.parent = self
6072 assert new_child isa AExpr
6073 _n_expr = new_child
6074 else
6075 abort
6076 end
6077 return
6078 end
6079 if _n_expr2 == old_child then
6080 if new_child != null then
6081 new_child.parent = self
6082 assert new_child isa AExpr
6083 _n_expr2 = new_child
6084 else
6085 abort
6086 end
6087 return
6088 end
6089 end
6090
6091 redef fun n_expr=(node)
6092 do
6093 _n_expr = node
6094 node.parent = self
6095 end
6096 redef fun n_expr2=(node)
6097 do
6098 _n_expr2 = node
6099 node.parent = self
6100 end
6101
6102
6103 redef fun visit_all(v: Visitor)
6104 do
6105 v.enter_visit(_n_expr)
6106 v.enter_visit(_n_expr2)
6107 end
6108 end
6109 redef class AOrElseExpr
6110 private init empty_init do end
6111
6112 init init_aorelseexpr (
6113 n_expr: nullable AExpr,
6114 n_expr2: nullable AExpr
6115 )
6116 do
6117 empty_init
6118 _n_expr = n_expr.as(not null)
6119 n_expr.parent = self
6120 _n_expr2 = n_expr2.as(not null)
6121 n_expr2.parent = self
6122 end
6123
6124 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6125 do
6126 if _n_expr == old_child then
6127 if new_child != null then
6128 new_child.parent = self
6129 assert new_child isa AExpr
6130 _n_expr = new_child
6131 else
6132 abort
6133 end
6134 return
6135 end
6136 if _n_expr2 == old_child then
6137 if new_child != null then
6138 new_child.parent = self
6139 assert new_child isa AExpr
6140 _n_expr2 = new_child
6141 else
6142 abort
6143 end
6144 return
6145 end
6146 end
6147
6148 redef fun n_expr=(node)
6149 do
6150 _n_expr = node
6151 node.parent = self
6152 end
6153 redef fun n_expr2=(node)
6154 do
6155 _n_expr2 = node
6156 node.parent = self
6157 end
6158
6159
6160 redef fun visit_all(v: Visitor)
6161 do
6162 v.enter_visit(_n_expr)
6163 v.enter_visit(_n_expr2)
6164 end
6165 end
6166 redef class AImpliesExpr
6167 private init empty_init do end
6168
6169 init init_aimpliesexpr (
6170 n_expr: nullable AExpr,
6171 n_expr2: nullable AExpr
6172 )
6173 do
6174 empty_init
6175 _n_expr = n_expr.as(not null)
6176 n_expr.parent = self
6177 _n_expr2 = n_expr2.as(not null)
6178 n_expr2.parent = self
6179 end
6180
6181 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6182 do
6183 if _n_expr == old_child then
6184 if new_child != null then
6185 new_child.parent = self
6186 assert new_child isa AExpr
6187 _n_expr = new_child
6188 else
6189 abort
6190 end
6191 return
6192 end
6193 if _n_expr2 == old_child then
6194 if new_child != null then
6195 new_child.parent = self
6196 assert new_child isa AExpr
6197 _n_expr2 = new_child
6198 else
6199 abort
6200 end
6201 return
6202 end
6203 end
6204
6205 redef fun n_expr=(node)
6206 do
6207 _n_expr = node
6208 node.parent = self
6209 end
6210 redef fun n_expr2=(node)
6211 do
6212 _n_expr2 = node
6213 node.parent = self
6214 end
6215
6216
6217 redef fun visit_all(v: Visitor)
6218 do
6219 v.enter_visit(_n_expr)
6220 v.enter_visit(_n_expr2)
6221 end
6222 end
6223 redef class ANotExpr
6224 private init empty_init do end
6225
6226 init init_anotexpr (
6227 n_kwnot: nullable TKwnot,
6228 n_expr: nullable AExpr
6229 )
6230 do
6231 empty_init
6232 _n_kwnot = n_kwnot.as(not null)
6233 n_kwnot.parent = self
6234 _n_expr = n_expr.as(not null)
6235 n_expr.parent = self
6236 end
6237
6238 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6239 do
6240 if _n_kwnot == old_child then
6241 if new_child != null then
6242 new_child.parent = self
6243 assert new_child isa TKwnot
6244 _n_kwnot = new_child
6245 else
6246 abort
6247 end
6248 return
6249 end
6250 if _n_expr == old_child then
6251 if new_child != null then
6252 new_child.parent = self
6253 assert new_child isa AExpr
6254 _n_expr = new_child
6255 else
6256 abort
6257 end
6258 return
6259 end
6260 end
6261
6262 redef fun n_kwnot=(node)
6263 do
6264 _n_kwnot = node
6265 node.parent = self
6266 end
6267 redef fun n_expr=(node)
6268 do
6269 _n_expr = node
6270 node.parent = self
6271 end
6272
6273
6274 redef fun visit_all(v: Visitor)
6275 do
6276 v.enter_visit(_n_kwnot)
6277 v.enter_visit(_n_expr)
6278 end
6279 end
6280 redef class AEqExpr
6281 private init empty_init do end
6282
6283 init init_aeqexpr (
6284 n_expr: nullable AExpr,
6285 n_expr2: nullable AExpr
6286 )
6287 do
6288 empty_init
6289 _n_expr = n_expr.as(not null)
6290 n_expr.parent = self
6291 _n_expr2 = n_expr2.as(not null)
6292 n_expr2.parent = self
6293 end
6294
6295 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6296 do
6297 if _n_expr == old_child then
6298 if new_child != null then
6299 new_child.parent = self
6300 assert new_child isa AExpr
6301 _n_expr = new_child
6302 else
6303 abort
6304 end
6305 return
6306 end
6307 if _n_expr2 == old_child then
6308 if new_child != null then
6309 new_child.parent = self
6310 assert new_child isa AExpr
6311 _n_expr2 = new_child
6312 else
6313 abort
6314 end
6315 return
6316 end
6317 end
6318
6319 redef fun n_expr=(node)
6320 do
6321 _n_expr = node
6322 node.parent = self
6323 end
6324 redef fun n_expr2=(node)
6325 do
6326 _n_expr2 = node
6327 node.parent = self
6328 end
6329
6330
6331 redef fun visit_all(v: Visitor)
6332 do
6333 v.enter_visit(_n_expr)
6334 v.enter_visit(_n_expr2)
6335 end
6336 end
6337 redef class AEeExpr
6338 private init empty_init do end
6339
6340 init init_aeeexpr (
6341 n_expr: nullable AExpr,
6342 n_expr2: nullable AExpr
6343 )
6344 do
6345 empty_init
6346 _n_expr = n_expr.as(not null)
6347 n_expr.parent = self
6348 _n_expr2 = n_expr2.as(not null)
6349 n_expr2.parent = self
6350 end
6351
6352 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6353 do
6354 if _n_expr == old_child then
6355 if new_child != null then
6356 new_child.parent = self
6357 assert new_child isa AExpr
6358 _n_expr = new_child
6359 else
6360 abort
6361 end
6362 return
6363 end
6364 if _n_expr2 == old_child then
6365 if new_child != null then
6366 new_child.parent = self
6367 assert new_child isa AExpr
6368 _n_expr2 = new_child
6369 else
6370 abort
6371 end
6372 return
6373 end
6374 end
6375
6376 redef fun n_expr=(node)
6377 do
6378 _n_expr = node
6379 node.parent = self
6380 end
6381 redef fun n_expr2=(node)
6382 do
6383 _n_expr2 = node
6384 node.parent = self
6385 end
6386
6387
6388 redef fun visit_all(v: Visitor)
6389 do
6390 v.enter_visit(_n_expr)
6391 v.enter_visit(_n_expr2)
6392 end
6393 end
6394 redef class ANeExpr
6395 private init empty_init do end
6396
6397 init init_aneexpr (
6398 n_expr: nullable AExpr,
6399 n_expr2: nullable AExpr
6400 )
6401 do
6402 empty_init
6403 _n_expr = n_expr.as(not null)
6404 n_expr.parent = self
6405 _n_expr2 = n_expr2.as(not null)
6406 n_expr2.parent = self
6407 end
6408
6409 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6410 do
6411 if _n_expr == old_child then
6412 if new_child != null then
6413 new_child.parent = self
6414 assert new_child isa AExpr
6415 _n_expr = new_child
6416 else
6417 abort
6418 end
6419 return
6420 end
6421 if _n_expr2 == old_child then
6422 if new_child != null then
6423 new_child.parent = self
6424 assert new_child isa AExpr
6425 _n_expr2 = new_child
6426 else
6427 abort
6428 end
6429 return
6430 end
6431 end
6432
6433 redef fun n_expr=(node)
6434 do
6435 _n_expr = node
6436 node.parent = self
6437 end
6438 redef fun n_expr2=(node)
6439 do
6440 _n_expr2 = node
6441 node.parent = self
6442 end
6443
6444
6445 redef fun visit_all(v: Visitor)
6446 do
6447 v.enter_visit(_n_expr)
6448 v.enter_visit(_n_expr2)
6449 end
6450 end
6451 redef class ALtExpr
6452 private init empty_init do end
6453
6454 init init_altexpr (
6455 n_expr: nullable AExpr,
6456 n_expr2: nullable AExpr
6457 )
6458 do
6459 empty_init
6460 _n_expr = n_expr.as(not null)
6461 n_expr.parent = self
6462 _n_expr2 = n_expr2.as(not null)
6463 n_expr2.parent = self
6464 end
6465
6466 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6467 do
6468 if _n_expr == old_child then
6469 if new_child != null then
6470 new_child.parent = self
6471 assert new_child isa AExpr
6472 _n_expr = new_child
6473 else
6474 abort
6475 end
6476 return
6477 end
6478 if _n_expr2 == old_child then
6479 if new_child != null then
6480 new_child.parent = self
6481 assert new_child isa AExpr
6482 _n_expr2 = new_child
6483 else
6484 abort
6485 end
6486 return
6487 end
6488 end
6489
6490 redef fun n_expr=(node)
6491 do
6492 _n_expr = node
6493 node.parent = self
6494 end
6495 redef fun n_expr2=(node)
6496 do
6497 _n_expr2 = node
6498 node.parent = self
6499 end
6500
6501
6502 redef fun visit_all(v: Visitor)
6503 do
6504 v.enter_visit(_n_expr)
6505 v.enter_visit(_n_expr2)
6506 end
6507 end
6508 redef class ALeExpr
6509 private init empty_init do end
6510
6511 init init_aleexpr (
6512 n_expr: nullable AExpr,
6513 n_expr2: nullable AExpr
6514 )
6515 do
6516 empty_init
6517 _n_expr = n_expr.as(not null)
6518 n_expr.parent = self
6519 _n_expr2 = n_expr2.as(not null)
6520 n_expr2.parent = self
6521 end
6522
6523 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6524 do
6525 if _n_expr == old_child then
6526 if new_child != null then
6527 new_child.parent = self
6528 assert new_child isa AExpr
6529 _n_expr = new_child
6530 else
6531 abort
6532 end
6533 return
6534 end
6535 if _n_expr2 == old_child then
6536 if new_child != null then
6537 new_child.parent = self
6538 assert new_child isa AExpr
6539 _n_expr2 = new_child
6540 else
6541 abort
6542 end
6543 return
6544 end
6545 end
6546
6547 redef fun n_expr=(node)
6548 do
6549 _n_expr = node
6550 node.parent = self
6551 end
6552 redef fun n_expr2=(node)
6553 do
6554 _n_expr2 = node
6555 node.parent = self
6556 end
6557
6558
6559 redef fun visit_all(v: Visitor)
6560 do
6561 v.enter_visit(_n_expr)
6562 v.enter_visit(_n_expr2)
6563 end
6564 end
6565 redef class ALlExpr
6566 private init empty_init do end
6567
6568 init init_allexpr (
6569 n_expr: nullable AExpr,
6570 n_expr2: nullable AExpr
6571 )
6572 do
6573 empty_init
6574 _n_expr = n_expr.as(not null)
6575 n_expr.parent = self
6576 _n_expr2 = n_expr2.as(not null)
6577 n_expr2.parent = self
6578 end
6579
6580 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6581 do
6582 if _n_expr == old_child then
6583 if new_child != null then
6584 new_child.parent = self
6585 assert new_child isa AExpr
6586 _n_expr = new_child
6587 else
6588 abort
6589 end
6590 return
6591 end
6592 if _n_expr2 == old_child then
6593 if new_child != null then
6594 new_child.parent = self
6595 assert new_child isa AExpr
6596 _n_expr2 = new_child
6597 else
6598 abort
6599 end
6600 return
6601 end
6602 end
6603
6604 redef fun n_expr=(node)
6605 do
6606 _n_expr = node
6607 node.parent = self
6608 end
6609 redef fun n_expr2=(node)
6610 do
6611 _n_expr2 = node
6612 node.parent = self
6613 end
6614
6615
6616 redef fun visit_all(v: Visitor)
6617 do
6618 v.enter_visit(_n_expr)
6619 v.enter_visit(_n_expr2)
6620 end
6621 end
6622 redef class AGtExpr
6623 private init empty_init do end
6624
6625 init init_agtexpr (
6626 n_expr: nullable AExpr,
6627 n_expr2: nullable AExpr
6628 )
6629 do
6630 empty_init
6631 _n_expr = n_expr.as(not null)
6632 n_expr.parent = self
6633 _n_expr2 = n_expr2.as(not null)
6634 n_expr2.parent = self
6635 end
6636
6637 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6638 do
6639 if _n_expr == old_child then
6640 if new_child != null then
6641 new_child.parent = self
6642 assert new_child isa AExpr
6643 _n_expr = new_child
6644 else
6645 abort
6646 end
6647 return
6648 end
6649 if _n_expr2 == old_child then
6650 if new_child != null then
6651 new_child.parent = self
6652 assert new_child isa AExpr
6653 _n_expr2 = new_child
6654 else
6655 abort
6656 end
6657 return
6658 end
6659 end
6660
6661 redef fun n_expr=(node)
6662 do
6663 _n_expr = node
6664 node.parent = self
6665 end
6666 redef fun n_expr2=(node)
6667 do
6668 _n_expr2 = node
6669 node.parent = self
6670 end
6671
6672
6673 redef fun visit_all(v: Visitor)
6674 do
6675 v.enter_visit(_n_expr)
6676 v.enter_visit(_n_expr2)
6677 end
6678 end
6679 redef class AGeExpr
6680 private init empty_init do end
6681
6682 init init_ageexpr (
6683 n_expr: nullable AExpr,
6684 n_expr2: nullable AExpr
6685 )
6686 do
6687 empty_init
6688 _n_expr = n_expr.as(not null)
6689 n_expr.parent = self
6690 _n_expr2 = n_expr2.as(not null)
6691 n_expr2.parent = self
6692 end
6693
6694 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6695 do
6696 if _n_expr == old_child then
6697 if new_child != null then
6698 new_child.parent = self
6699 assert new_child isa AExpr
6700 _n_expr = new_child
6701 else
6702 abort
6703 end
6704 return
6705 end
6706 if _n_expr2 == old_child then
6707 if new_child != null then
6708 new_child.parent = self
6709 assert new_child isa AExpr
6710 _n_expr2 = new_child
6711 else
6712 abort
6713 end
6714 return
6715 end
6716 end
6717
6718 redef fun n_expr=(node)
6719 do
6720 _n_expr = node
6721 node.parent = self
6722 end
6723 redef fun n_expr2=(node)
6724 do
6725 _n_expr2 = node
6726 node.parent = self
6727 end
6728
6729
6730 redef fun visit_all(v: Visitor)
6731 do
6732 v.enter_visit(_n_expr)
6733 v.enter_visit(_n_expr2)
6734 end
6735 end
6736 redef class AGgExpr
6737 private init empty_init do end
6738
6739 init init_aggexpr (
6740 n_expr: nullable AExpr,
6741 n_expr2: nullable AExpr
6742 )
6743 do
6744 empty_init
6745 _n_expr = n_expr.as(not null)
6746 n_expr.parent = self
6747 _n_expr2 = n_expr2.as(not null)
6748 n_expr2.parent = self
6749 end
6750
6751 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6752 do
6753 if _n_expr == old_child then
6754 if new_child != null then
6755 new_child.parent = self
6756 assert new_child isa AExpr
6757 _n_expr = new_child
6758 else
6759 abort
6760 end
6761 return
6762 end
6763 if _n_expr2 == old_child then
6764 if new_child != null then
6765 new_child.parent = self
6766 assert new_child isa AExpr
6767 _n_expr2 = new_child
6768 else
6769 abort
6770 end
6771 return
6772 end
6773 end
6774
6775 redef fun n_expr=(node)
6776 do
6777 _n_expr = node
6778 node.parent = self
6779 end
6780 redef fun n_expr2=(node)
6781 do
6782 _n_expr2 = node
6783 node.parent = self
6784 end
6785
6786
6787 redef fun visit_all(v: Visitor)
6788 do
6789 v.enter_visit(_n_expr)
6790 v.enter_visit(_n_expr2)
6791 end
6792 end
6793 redef class AIsaExpr
6794 private init empty_init do end
6795
6796 init init_aisaexpr (
6797 n_expr: nullable AExpr,
6798 n_type: nullable AType
6799 )
6800 do
6801 empty_init
6802 _n_expr = n_expr.as(not null)
6803 n_expr.parent = self
6804 _n_type = n_type.as(not null)
6805 n_type.parent = self
6806 end
6807
6808 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6809 do
6810 if _n_expr == old_child then
6811 if new_child != null then
6812 new_child.parent = self
6813 assert new_child isa AExpr
6814 _n_expr = new_child
6815 else
6816 abort
6817 end
6818 return
6819 end
6820 if _n_type == old_child then
6821 if new_child != null then
6822 new_child.parent = self
6823 assert new_child isa AType
6824 _n_type = new_child
6825 else
6826 abort
6827 end
6828 return
6829 end
6830 end
6831
6832 redef fun n_expr=(node)
6833 do
6834 _n_expr = node
6835 node.parent = self
6836 end
6837 redef fun n_type=(node)
6838 do
6839 _n_type = node
6840 node.parent = self
6841 end
6842
6843
6844 redef fun visit_all(v: Visitor)
6845 do
6846 v.enter_visit(_n_expr)
6847 v.enter_visit(_n_type)
6848 end
6849 end
6850 redef class APlusExpr
6851 private init empty_init do end
6852
6853 init init_aplusexpr (
6854 n_expr: nullable AExpr,
6855 n_expr2: nullable AExpr
6856 )
6857 do
6858 empty_init
6859 _n_expr = n_expr.as(not null)
6860 n_expr.parent = self
6861 _n_expr2 = n_expr2.as(not null)
6862 n_expr2.parent = self
6863 end
6864
6865 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6866 do
6867 if _n_expr == old_child then
6868 if new_child != null then
6869 new_child.parent = self
6870 assert new_child isa AExpr
6871 _n_expr = new_child
6872 else
6873 abort
6874 end
6875 return
6876 end
6877 if _n_expr2 == old_child then
6878 if new_child != null then
6879 new_child.parent = self
6880 assert new_child isa AExpr
6881 _n_expr2 = new_child
6882 else
6883 abort
6884 end
6885 return
6886 end
6887 end
6888
6889 redef fun n_expr=(node)
6890 do
6891 _n_expr = node
6892 node.parent = self
6893 end
6894 redef fun n_expr2=(node)
6895 do
6896 _n_expr2 = node
6897 node.parent = self
6898 end
6899
6900
6901 redef fun visit_all(v: Visitor)
6902 do
6903 v.enter_visit(_n_expr)
6904 v.enter_visit(_n_expr2)
6905 end
6906 end
6907 redef class AMinusExpr
6908 private init empty_init do end
6909
6910 init init_aminusexpr (
6911 n_expr: nullable AExpr,
6912 n_expr2: nullable AExpr
6913 )
6914 do
6915 empty_init
6916 _n_expr = n_expr.as(not null)
6917 n_expr.parent = self
6918 _n_expr2 = n_expr2.as(not null)
6919 n_expr2.parent = self
6920 end
6921
6922 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6923 do
6924 if _n_expr == old_child then
6925 if new_child != null then
6926 new_child.parent = self
6927 assert new_child isa AExpr
6928 _n_expr = new_child
6929 else
6930 abort
6931 end
6932 return
6933 end
6934 if _n_expr2 == old_child then
6935 if new_child != null then
6936 new_child.parent = self
6937 assert new_child isa AExpr
6938 _n_expr2 = new_child
6939 else
6940 abort
6941 end
6942 return
6943 end
6944 end
6945
6946 redef fun n_expr=(node)
6947 do
6948 _n_expr = node
6949 node.parent = self
6950 end
6951 redef fun n_expr2=(node)
6952 do
6953 _n_expr2 = node
6954 node.parent = self
6955 end
6956
6957
6958 redef fun visit_all(v: Visitor)
6959 do
6960 v.enter_visit(_n_expr)
6961 v.enter_visit(_n_expr2)
6962 end
6963 end
6964 redef class AStarshipExpr
6965 private init empty_init do end
6966
6967 init init_astarshipexpr (
6968 n_expr: nullable AExpr,
6969 n_expr2: nullable AExpr
6970 )
6971 do
6972 empty_init
6973 _n_expr = n_expr.as(not null)
6974 n_expr.parent = self
6975 _n_expr2 = n_expr2.as(not null)
6976 n_expr2.parent = self
6977 end
6978
6979 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6980 do
6981 if _n_expr == old_child then
6982 if new_child != null then
6983 new_child.parent = self
6984 assert new_child isa AExpr
6985 _n_expr = new_child
6986 else
6987 abort
6988 end
6989 return
6990 end
6991 if _n_expr2 == old_child then
6992 if new_child != null then
6993 new_child.parent = self
6994 assert new_child isa AExpr
6995 _n_expr2 = new_child
6996 else
6997 abort
6998 end
6999 return
7000 end
7001 end
7002
7003 redef fun n_expr=(node)
7004 do
7005 _n_expr = node
7006 node.parent = self
7007 end
7008 redef fun n_expr2=(node)
7009 do
7010 _n_expr2 = node
7011 node.parent = self
7012 end
7013
7014
7015 redef fun visit_all(v: Visitor)
7016 do
7017 v.enter_visit(_n_expr)
7018 v.enter_visit(_n_expr2)
7019 end
7020 end
7021 redef class AStarExpr
7022 private init empty_init do end
7023
7024 init init_astarexpr (
7025 n_expr: nullable AExpr,
7026 n_expr2: nullable AExpr
7027 )
7028 do
7029 empty_init
7030 _n_expr = n_expr.as(not null)
7031 n_expr.parent = self
7032 _n_expr2 = n_expr2.as(not null)
7033 n_expr2.parent = self
7034 end
7035
7036 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7037 do
7038 if _n_expr == old_child then
7039 if new_child != null then
7040 new_child.parent = self
7041 assert new_child isa AExpr
7042 _n_expr = new_child
7043 else
7044 abort
7045 end
7046 return
7047 end
7048 if _n_expr2 == old_child then
7049 if new_child != null then
7050 new_child.parent = self
7051 assert new_child isa AExpr
7052 _n_expr2 = new_child
7053 else
7054 abort
7055 end
7056 return
7057 end
7058 end
7059
7060 redef fun n_expr=(node)
7061 do
7062 _n_expr = node
7063 node.parent = self
7064 end
7065 redef fun n_expr2=(node)
7066 do
7067 _n_expr2 = node
7068 node.parent = self
7069 end
7070
7071
7072 redef fun visit_all(v: Visitor)
7073 do
7074 v.enter_visit(_n_expr)
7075 v.enter_visit(_n_expr2)
7076 end
7077 end
7078 redef class ASlashExpr
7079 private init empty_init do end
7080
7081 init init_aslashexpr (
7082 n_expr: nullable AExpr,
7083 n_expr2: nullable AExpr
7084 )
7085 do
7086 empty_init
7087 _n_expr = n_expr.as(not null)
7088 n_expr.parent = self
7089 _n_expr2 = n_expr2.as(not null)
7090 n_expr2.parent = self
7091 end
7092
7093 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7094 do
7095 if _n_expr == old_child then
7096 if new_child != null then
7097 new_child.parent = self
7098 assert new_child isa AExpr
7099 _n_expr = new_child
7100 else
7101 abort
7102 end
7103 return
7104 end
7105 if _n_expr2 == old_child then
7106 if new_child != null then
7107 new_child.parent = self
7108 assert new_child isa AExpr
7109 _n_expr2 = new_child
7110 else
7111 abort
7112 end
7113 return
7114 end
7115 end
7116
7117 redef fun n_expr=(node)
7118 do
7119 _n_expr = node
7120 node.parent = self
7121 end
7122 redef fun n_expr2=(node)
7123 do
7124 _n_expr2 = node
7125 node.parent = self
7126 end
7127
7128
7129 redef fun visit_all(v: Visitor)
7130 do
7131 v.enter_visit(_n_expr)
7132 v.enter_visit(_n_expr2)
7133 end
7134 end
7135 redef class APercentExpr
7136 private init empty_init do end
7137
7138 init init_apercentexpr (
7139 n_expr: nullable AExpr,
7140 n_expr2: nullable AExpr
7141 )
7142 do
7143 empty_init
7144 _n_expr = n_expr.as(not null)
7145 n_expr.parent = self
7146 _n_expr2 = n_expr2.as(not null)
7147 n_expr2.parent = self
7148 end
7149
7150 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7151 do
7152 if _n_expr == old_child then
7153 if new_child != null then
7154 new_child.parent = self
7155 assert new_child isa AExpr
7156 _n_expr = new_child
7157 else
7158 abort
7159 end
7160 return
7161 end
7162 if _n_expr2 == old_child then
7163 if new_child != null then
7164 new_child.parent = self
7165 assert new_child isa AExpr
7166 _n_expr2 = new_child
7167 else
7168 abort
7169 end
7170 return
7171 end
7172 end
7173
7174 redef fun n_expr=(node)
7175 do
7176 _n_expr = node
7177 node.parent = self
7178 end
7179 redef fun n_expr2=(node)
7180 do
7181 _n_expr2 = node
7182 node.parent = self
7183 end
7184
7185
7186 redef fun visit_all(v: Visitor)
7187 do
7188 v.enter_visit(_n_expr)
7189 v.enter_visit(_n_expr2)
7190 end
7191 end
7192 redef class AUminusExpr
7193 private init empty_init do end
7194
7195 init init_auminusexpr (
7196 n_minus: nullable TMinus,
7197 n_expr: nullable AExpr
7198 )
7199 do
7200 empty_init
7201 _n_minus = n_minus.as(not null)
7202 n_minus.parent = self
7203 _n_expr = n_expr.as(not null)
7204 n_expr.parent = self
7205 end
7206
7207 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7208 do
7209 if _n_minus == old_child then
7210 if new_child != null then
7211 new_child.parent = self
7212 assert new_child isa TMinus
7213 _n_minus = new_child
7214 else
7215 abort
7216 end
7217 return
7218 end
7219 if _n_expr == old_child then
7220 if new_child != null then
7221 new_child.parent = self
7222 assert new_child isa AExpr
7223 _n_expr = new_child
7224 else
7225 abort
7226 end
7227 return
7228 end
7229 end
7230
7231 redef fun n_minus=(node)
7232 do
7233 _n_minus = node
7234 node.parent = self
7235 end
7236 redef fun n_expr=(node)
7237 do
7238 _n_expr = node
7239 node.parent = self
7240 end
7241
7242
7243 redef fun visit_all(v: Visitor)
7244 do
7245 v.enter_visit(_n_minus)
7246 v.enter_visit(_n_expr)
7247 end
7248 end
7249 redef class ANewExpr
7250 private init empty_init do end
7251
7252 init init_anewexpr (
7253 n_kwnew: nullable TKwnew,
7254 n_type: nullable AType,
7255 n_id: nullable TId,
7256 n_args: nullable AExprs
7257 )
7258 do
7259 empty_init
7260 _n_kwnew = n_kwnew.as(not null)
7261 n_kwnew.parent = self
7262 _n_type = n_type.as(not null)
7263 n_type.parent = self
7264 _n_id = n_id
7265 if n_id != null then
7266 n_id.parent = self
7267 end
7268 _n_args = n_args.as(not null)
7269 n_args.parent = self
7270 end
7271
7272 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7273 do
7274 if _n_kwnew == old_child then
7275 if new_child != null then
7276 new_child.parent = self
7277 assert new_child isa TKwnew
7278 _n_kwnew = new_child
7279 else
7280 abort
7281 end
7282 return
7283 end
7284 if _n_type == old_child then
7285 if new_child != null then
7286 new_child.parent = self
7287 assert new_child isa AType
7288 _n_type = new_child
7289 else
7290 abort
7291 end
7292 return
7293 end
7294 if _n_id == old_child then
7295 if new_child != null then
7296 new_child.parent = self
7297 assert new_child isa TId
7298 _n_id = new_child
7299 else
7300 _n_id = null
7301 end
7302 return
7303 end
7304 if _n_args == old_child then
7305 if new_child != null then
7306 new_child.parent = self
7307 assert new_child isa AExprs
7308 _n_args = new_child
7309 else
7310 abort
7311 end
7312 return
7313 end
7314 end
7315
7316 redef fun n_kwnew=(node)
7317 do
7318 _n_kwnew = node
7319 node.parent = self
7320 end
7321 redef fun n_type=(node)
7322 do
7323 _n_type = node
7324 node.parent = self
7325 end
7326 redef fun n_id=(node)
7327 do
7328 _n_id = node
7329 if node != null then
7330 node.parent = self
7331 end
7332 end
7333 redef fun n_args=(node)
7334 do
7335 _n_args = node
7336 node.parent = self
7337 end
7338
7339
7340 redef fun visit_all(v: Visitor)
7341 do
7342 v.enter_visit(_n_kwnew)
7343 v.enter_visit(_n_type)
7344 if _n_id != null then
7345 v.enter_visit(_n_id.as(not null))
7346 end
7347 v.enter_visit(_n_args)
7348 end
7349 end
7350 redef class AAttrExpr
7351 private init empty_init do end
7352
7353 init init_aattrexpr (
7354 n_expr: nullable AExpr,
7355 n_id: nullable TAttrid
7356 )
7357 do
7358 empty_init
7359 _n_expr = n_expr.as(not null)
7360 n_expr.parent = self
7361 _n_id = n_id.as(not null)
7362 n_id.parent = self
7363 end
7364
7365 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7366 do
7367 if _n_expr == old_child then
7368 if new_child != null then
7369 new_child.parent = self
7370 assert new_child isa AExpr
7371 _n_expr = new_child
7372 else
7373 abort
7374 end
7375 return
7376 end
7377 if _n_id == old_child then
7378 if new_child != null then
7379 new_child.parent = self
7380 assert new_child isa TAttrid
7381 _n_id = new_child
7382 else
7383 abort
7384 end
7385 return
7386 end
7387 end
7388
7389 redef fun n_expr=(node)
7390 do
7391 _n_expr = node
7392 node.parent = self
7393 end
7394 redef fun n_id=(node)
7395 do
7396 _n_id = node
7397 node.parent = self
7398 end
7399
7400
7401 redef fun visit_all(v: Visitor)
7402 do
7403 v.enter_visit(_n_expr)
7404 v.enter_visit(_n_id)
7405 end
7406 end
7407 redef class AAttrAssignExpr
7408 private init empty_init do end
7409
7410 init init_aattrassignexpr (
7411 n_expr: nullable AExpr,
7412 n_id: nullable TAttrid,
7413 n_assign: nullable TAssign,
7414 n_value: nullable AExpr
7415 )
7416 do
7417 empty_init
7418 _n_expr = n_expr.as(not null)
7419 n_expr.parent = self
7420 _n_id = n_id.as(not null)
7421 n_id.parent = self
7422 _n_assign = n_assign.as(not null)
7423 n_assign.parent = self
7424 _n_value = n_value.as(not null)
7425 n_value.parent = self
7426 end
7427
7428 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7429 do
7430 if _n_expr == old_child then
7431 if new_child != null then
7432 new_child.parent = self
7433 assert new_child isa AExpr
7434 _n_expr = new_child
7435 else
7436 abort
7437 end
7438 return
7439 end
7440 if _n_id == old_child then
7441 if new_child != null then
7442 new_child.parent = self
7443 assert new_child isa TAttrid
7444 _n_id = new_child
7445 else
7446 abort
7447 end
7448 return
7449 end
7450 if _n_assign == old_child then
7451 if new_child != null then
7452 new_child.parent = self
7453 assert new_child isa TAssign
7454 _n_assign = new_child
7455 else
7456 abort
7457 end
7458 return
7459 end
7460 if _n_value == old_child then
7461 if new_child != null then
7462 new_child.parent = self
7463 assert new_child isa AExpr
7464 _n_value = new_child
7465 else
7466 abort
7467 end
7468 return
7469 end
7470 end
7471
7472 redef fun n_expr=(node)
7473 do
7474 _n_expr = node
7475 node.parent = self
7476 end
7477 redef fun n_id=(node)
7478 do
7479 _n_id = node
7480 node.parent = self
7481 end
7482 redef fun n_assign=(node)
7483 do
7484 _n_assign = node
7485 node.parent = self
7486 end
7487 redef fun n_value=(node)
7488 do
7489 _n_value = node
7490 node.parent = self
7491 end
7492
7493
7494 redef fun visit_all(v: Visitor)
7495 do
7496 v.enter_visit(_n_expr)
7497 v.enter_visit(_n_id)
7498 v.enter_visit(_n_assign)
7499 v.enter_visit(_n_value)
7500 end
7501 end
7502 redef class AAttrReassignExpr
7503 private init empty_init do end
7504
7505 init init_aattrreassignexpr (
7506 n_expr: nullable AExpr,
7507 n_id: nullable TAttrid,
7508 n_assign_op: nullable AAssignOp,
7509 n_value: nullable AExpr
7510 )
7511 do
7512 empty_init
7513 _n_expr = n_expr.as(not null)
7514 n_expr.parent = self
7515 _n_id = n_id.as(not null)
7516 n_id.parent = self
7517 _n_assign_op = n_assign_op.as(not null)
7518 n_assign_op.parent = self
7519 _n_value = n_value.as(not null)
7520 n_value.parent = self
7521 end
7522
7523 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7524 do
7525 if _n_expr == old_child then
7526 if new_child != null then
7527 new_child.parent = self
7528 assert new_child isa AExpr
7529 _n_expr = new_child
7530 else
7531 abort
7532 end
7533 return
7534 end
7535 if _n_id == old_child then
7536 if new_child != null then
7537 new_child.parent = self
7538 assert new_child isa TAttrid
7539 _n_id = new_child
7540 else
7541 abort
7542 end
7543 return
7544 end
7545 if _n_assign_op == old_child then
7546 if new_child != null then
7547 new_child.parent = self
7548 assert new_child isa AAssignOp
7549 _n_assign_op = new_child
7550 else
7551 abort
7552 end
7553 return
7554 end
7555 if _n_value == old_child then
7556 if new_child != null then
7557 new_child.parent = self
7558 assert new_child isa AExpr
7559 _n_value = new_child
7560 else
7561 abort
7562 end
7563 return
7564 end
7565 end
7566
7567 redef fun n_expr=(node)
7568 do
7569 _n_expr = node
7570 node.parent = self
7571 end
7572 redef fun n_id=(node)
7573 do
7574 _n_id = node
7575 node.parent = self
7576 end
7577 redef fun n_assign_op=(node)
7578 do
7579 _n_assign_op = node
7580 node.parent = self
7581 end
7582 redef fun n_value=(node)
7583 do
7584 _n_value = node
7585 node.parent = self
7586 end
7587
7588
7589 redef fun visit_all(v: Visitor)
7590 do
7591 v.enter_visit(_n_expr)
7592 v.enter_visit(_n_id)
7593 v.enter_visit(_n_assign_op)
7594 v.enter_visit(_n_value)
7595 end
7596 end
7597 redef class ACallExpr
7598 private init empty_init do end
7599
7600 init init_acallexpr (
7601 n_expr: nullable AExpr,
7602 n_id: nullable TId,
7603 n_args: nullable AExprs,
7604 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
7605 )
7606 do
7607 empty_init
7608 _n_expr = n_expr.as(not null)
7609 n_expr.parent = self
7610 _n_id = n_id.as(not null)
7611 n_id.parent = self
7612 _n_args = n_args.as(not null)
7613 n_args.parent = self
7614 for n in n_closure_defs do
7615 assert n isa AClosureDef
7616 _n_closure_defs.add(n)
7617 n.parent = self
7618 end
7619 end
7620
7621 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7622 do
7623 if _n_expr == old_child then
7624 if new_child != null then
7625 new_child.parent = self
7626 assert new_child isa AExpr
7627 _n_expr = new_child
7628 else
7629 abort
7630 end
7631 return
7632 end
7633 if _n_id == old_child then
7634 if new_child != null then
7635 new_child.parent = self
7636 assert new_child isa TId
7637 _n_id = new_child
7638 else
7639 abort
7640 end
7641 return
7642 end
7643 if _n_args == old_child then
7644 if new_child != null then
7645 new_child.parent = self
7646 assert new_child isa AExprs
7647 _n_args = new_child
7648 else
7649 abort
7650 end
7651 return
7652 end
7653 for i in [0.._n_closure_defs.length[ do
7654 if _n_closure_defs[i] == old_child then
7655 if new_child != null then
7656 assert new_child isa AClosureDef
7657 _n_closure_defs[i] = new_child
7658 new_child.parent = self
7659 else
7660 _n_closure_defs.remove_at(i)
7661 end
7662 return
7663 end
7664 end
7665 end
7666
7667 redef fun n_expr=(node)
7668 do
7669 _n_expr = node
7670 node.parent = self
7671 end
7672 redef fun n_id=(node)
7673 do
7674 _n_id = node
7675 node.parent = self
7676 end
7677 redef fun n_args=(node)
7678 do
7679 _n_args = node
7680 node.parent = self
7681 end
7682
7683
7684 redef fun visit_all(v: Visitor)
7685 do
7686 v.enter_visit(_n_expr)
7687 v.enter_visit(_n_id)
7688 v.enter_visit(_n_args)
7689 for n in _n_closure_defs do
7690 v.enter_visit(n)
7691 end
7692 end
7693 end
7694 redef class ACallAssignExpr
7695 private init empty_init do end
7696
7697 init init_acallassignexpr (
7698 n_expr: nullable AExpr,
7699 n_id: nullable TId,
7700 n_args: nullable AExprs,
7701 n_assign: nullable TAssign,
7702 n_value: nullable AExpr
7703 )
7704 do
7705 empty_init
7706 _n_expr = n_expr.as(not null)
7707 n_expr.parent = self
7708 _n_id = n_id.as(not null)
7709 n_id.parent = self
7710 _n_args = n_args.as(not null)
7711 n_args.parent = self
7712 _n_assign = n_assign.as(not null)
7713 n_assign.parent = self
7714 _n_value = n_value.as(not null)
7715 n_value.parent = self
7716 end
7717
7718 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7719 do
7720 if _n_expr == old_child then
7721 if new_child != null then
7722 new_child.parent = self
7723 assert new_child isa AExpr
7724 _n_expr = new_child
7725 else
7726 abort
7727 end
7728 return
7729 end
7730 if _n_id == old_child then
7731 if new_child != null then
7732 new_child.parent = self
7733 assert new_child isa TId
7734 _n_id = new_child
7735 else
7736 abort
7737 end
7738 return
7739 end
7740 if _n_args == old_child then
7741 if new_child != null then
7742 new_child.parent = self
7743 assert new_child isa AExprs
7744 _n_args = new_child
7745 else
7746 abort
7747 end
7748 return
7749 end
7750 if _n_assign == old_child then
7751 if new_child != null then
7752 new_child.parent = self
7753 assert new_child isa TAssign
7754 _n_assign = new_child
7755 else
7756 abort
7757 end
7758 return
7759 end
7760 if _n_value == old_child then
7761 if new_child != null then
7762 new_child.parent = self
7763 assert new_child isa AExpr
7764 _n_value = new_child
7765 else
7766 abort
7767 end
7768 return
7769 end
7770 end
7771
7772 redef fun n_expr=(node)
7773 do
7774 _n_expr = node
7775 node.parent = self
7776 end
7777 redef fun n_id=(node)
7778 do
7779 _n_id = node
7780 node.parent = self
7781 end
7782 redef fun n_args=(node)
7783 do
7784 _n_args = node
7785 node.parent = self
7786 end
7787 redef fun n_assign=(node)
7788 do
7789 _n_assign = node
7790 node.parent = self
7791 end
7792 redef fun n_value=(node)
7793 do
7794 _n_value = node
7795 node.parent = self
7796 end
7797
7798
7799 redef fun visit_all(v: Visitor)
7800 do
7801 v.enter_visit(_n_expr)
7802 v.enter_visit(_n_id)
7803 v.enter_visit(_n_args)
7804 v.enter_visit(_n_assign)
7805 v.enter_visit(_n_value)
7806 end
7807 end
7808 redef class ACallReassignExpr
7809 private init empty_init do end
7810
7811 init init_acallreassignexpr (
7812 n_expr: nullable AExpr,
7813 n_id: nullable TId,
7814 n_args: nullable AExprs,
7815 n_assign_op: nullable AAssignOp,
7816 n_value: nullable AExpr
7817 )
7818 do
7819 empty_init
7820 _n_expr = n_expr.as(not null)
7821 n_expr.parent = self
7822 _n_id = n_id.as(not null)
7823 n_id.parent = self
7824 _n_args = n_args.as(not null)
7825 n_args.parent = self
7826 _n_assign_op = n_assign_op.as(not null)
7827 n_assign_op.parent = self
7828 _n_value = n_value.as(not null)
7829 n_value.parent = self
7830 end
7831
7832 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7833 do
7834 if _n_expr == old_child then
7835 if new_child != null then
7836 new_child.parent = self
7837 assert new_child isa AExpr
7838 _n_expr = new_child
7839 else
7840 abort
7841 end
7842 return
7843 end
7844 if _n_id == old_child then
7845 if new_child != null then
7846 new_child.parent = self
7847 assert new_child isa TId
7848 _n_id = new_child
7849 else
7850 abort
7851 end
7852 return
7853 end
7854 if _n_args == old_child then
7855 if new_child != null then
7856 new_child.parent = self
7857 assert new_child isa AExprs
7858 _n_args = new_child
7859 else
7860 abort
7861 end
7862 return
7863 end
7864 if _n_assign_op == old_child then
7865 if new_child != null then
7866 new_child.parent = self
7867 assert new_child isa AAssignOp
7868 _n_assign_op = new_child
7869 else
7870 abort
7871 end
7872 return
7873 end
7874 if _n_value == old_child then
7875 if new_child != null then
7876 new_child.parent = self
7877 assert new_child isa AExpr
7878 _n_value = new_child
7879 else
7880 abort
7881 end
7882 return
7883 end
7884 end
7885
7886 redef fun n_expr=(node)
7887 do
7888 _n_expr = node
7889 node.parent = self
7890 end
7891 redef fun n_id=(node)
7892 do
7893 _n_id = node
7894 node.parent = self
7895 end
7896 redef fun n_args=(node)
7897 do
7898 _n_args = node
7899 node.parent = self
7900 end
7901 redef fun n_assign_op=(node)
7902 do
7903 _n_assign_op = node
7904 node.parent = self
7905 end
7906 redef fun n_value=(node)
7907 do
7908 _n_value = node
7909 node.parent = self
7910 end
7911
7912
7913 redef fun visit_all(v: Visitor)
7914 do
7915 v.enter_visit(_n_expr)
7916 v.enter_visit(_n_id)
7917 v.enter_visit(_n_args)
7918 v.enter_visit(_n_assign_op)
7919 v.enter_visit(_n_value)
7920 end
7921 end
7922 redef class ASuperExpr
7923 private init empty_init do end
7924
7925 init init_asuperexpr (
7926 n_qualified: nullable AQualified,
7927 n_kwsuper: nullable TKwsuper,
7928 n_args: nullable AExprs
7929 )
7930 do
7931 empty_init
7932 _n_qualified = n_qualified
7933 if n_qualified != null then
7934 n_qualified.parent = self
7935 end
7936 _n_kwsuper = n_kwsuper.as(not null)
7937 n_kwsuper.parent = self
7938 _n_args = n_args.as(not null)
7939 n_args.parent = self
7940 end
7941
7942 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7943 do
7944 if _n_qualified == old_child then
7945 if new_child != null then
7946 new_child.parent = self
7947 assert new_child isa AQualified
7948 _n_qualified = new_child
7949 else
7950 _n_qualified = null
7951 end
7952 return
7953 end
7954 if _n_kwsuper == old_child then
7955 if new_child != null then
7956 new_child.parent = self
7957 assert new_child isa TKwsuper
7958 _n_kwsuper = new_child
7959 else
7960 abort
7961 end
7962 return
7963 end
7964 if _n_args == old_child then
7965 if new_child != null then
7966 new_child.parent = self
7967 assert new_child isa AExprs
7968 _n_args = new_child
7969 else
7970 abort
7971 end
7972 return
7973 end
7974 end
7975
7976 redef fun n_qualified=(node)
7977 do
7978 _n_qualified = node
7979 if node != null then
7980 node.parent = self
7981 end
7982 end
7983 redef fun n_kwsuper=(node)
7984 do
7985 _n_kwsuper = node
7986 node.parent = self
7987 end
7988 redef fun n_args=(node)
7989 do
7990 _n_args = node
7991 node.parent = self
7992 end
7993
7994
7995 redef fun visit_all(v: Visitor)
7996 do
7997 if _n_qualified != null then
7998 v.enter_visit(_n_qualified.as(not null))
7999 end
8000 v.enter_visit(_n_kwsuper)
8001 v.enter_visit(_n_args)
8002 end
8003 end
8004 redef class AInitExpr
8005 private init empty_init do end
8006
8007 init init_ainitexpr (
8008 n_expr: nullable AExpr,
8009 n_kwinit: nullable TKwinit,
8010 n_args: nullable AExprs
8011 )
8012 do
8013 empty_init
8014 _n_expr = n_expr.as(not null)
8015 n_expr.parent = self
8016 _n_kwinit = n_kwinit.as(not null)
8017 n_kwinit.parent = self
8018 _n_args = n_args.as(not null)
8019 n_args.parent = self
8020 end
8021
8022 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8023 do
8024 if _n_expr == old_child then
8025 if new_child != null then
8026 new_child.parent = self
8027 assert new_child isa AExpr
8028 _n_expr = new_child
8029 else
8030 abort
8031 end
8032 return
8033 end
8034 if _n_kwinit == old_child then
8035 if new_child != null then
8036 new_child.parent = self
8037 assert new_child isa TKwinit
8038 _n_kwinit = new_child
8039 else
8040 abort
8041 end
8042 return
8043 end
8044 if _n_args == old_child then
8045 if new_child != null then
8046 new_child.parent = self
8047 assert new_child isa AExprs
8048 _n_args = new_child
8049 else
8050 abort
8051 end
8052 return
8053 end
8054 end
8055
8056 redef fun n_expr=(node)
8057 do
8058 _n_expr = node
8059 node.parent = self
8060 end
8061 redef fun n_kwinit=(node)
8062 do
8063 _n_kwinit = node
8064 node.parent = self
8065 end
8066 redef fun n_args=(node)
8067 do
8068 _n_args = node
8069 node.parent = self
8070 end
8071
8072
8073 redef fun visit_all(v: Visitor)
8074 do
8075 v.enter_visit(_n_expr)
8076 v.enter_visit(_n_kwinit)
8077 v.enter_visit(_n_args)
8078 end
8079 end
8080 redef class ABraExpr
8081 private init empty_init do end
8082
8083 init init_abraexpr (
8084 n_expr: nullable AExpr,
8085 n_args: nullable AExprs,
8086 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
8087 )
8088 do
8089 empty_init
8090 _n_expr = n_expr.as(not null)
8091 n_expr.parent = self
8092 _n_args = n_args.as(not null)
8093 n_args.parent = self
8094 for n in n_closure_defs do
8095 assert n isa AClosureDef
8096 _n_closure_defs.add(n)
8097 n.parent = self
8098 end
8099 end
8100
8101 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8102 do
8103 if _n_expr == old_child then
8104 if new_child != null then
8105 new_child.parent = self
8106 assert new_child isa AExpr
8107 _n_expr = new_child
8108 else
8109 abort
8110 end
8111 return
8112 end
8113 if _n_args == old_child then
8114 if new_child != null then
8115 new_child.parent = self
8116 assert new_child isa AExprs
8117 _n_args = new_child
8118 else
8119 abort
8120 end
8121 return
8122 end
8123 for i in [0.._n_closure_defs.length[ do
8124 if _n_closure_defs[i] == old_child then
8125 if new_child != null then
8126 assert new_child isa AClosureDef
8127 _n_closure_defs[i] = new_child
8128 new_child.parent = self
8129 else
8130 _n_closure_defs.remove_at(i)
8131 end
8132 return
8133 end
8134 end
8135 end
8136
8137 redef fun n_expr=(node)
8138 do
8139 _n_expr = node
8140 node.parent = self
8141 end
8142 redef fun n_args=(node)
8143 do
8144 _n_args = node
8145 node.parent = self
8146 end
8147
8148
8149 redef fun visit_all(v: Visitor)
8150 do
8151 v.enter_visit(_n_expr)
8152 v.enter_visit(_n_args)
8153 for n in _n_closure_defs do
8154 v.enter_visit(n)
8155 end
8156 end
8157 end
8158 redef class ABraAssignExpr
8159 private init empty_init do end
8160
8161 init init_abraassignexpr (
8162 n_expr: nullable AExpr,
8163 n_args: nullable AExprs,
8164 n_assign: nullable TAssign,
8165 n_value: nullable AExpr
8166 )
8167 do
8168 empty_init
8169 _n_expr = n_expr.as(not null)
8170 n_expr.parent = self
8171 _n_args = n_args.as(not null)
8172 n_args.parent = self
8173 _n_assign = n_assign.as(not null)
8174 n_assign.parent = self
8175 _n_value = n_value.as(not null)
8176 n_value.parent = self
8177 end
8178
8179 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8180 do
8181 if _n_expr == old_child then
8182 if new_child != null then
8183 new_child.parent = self
8184 assert new_child isa AExpr
8185 _n_expr = new_child
8186 else
8187 abort
8188 end
8189 return
8190 end
8191 if _n_args == old_child then
8192 if new_child != null then
8193 new_child.parent = self
8194 assert new_child isa AExprs
8195 _n_args = new_child
8196 else
8197 abort
8198 end
8199 return
8200 end
8201 if _n_assign == old_child then
8202 if new_child != null then
8203 new_child.parent = self
8204 assert new_child isa TAssign
8205 _n_assign = new_child
8206 else
8207 abort
8208 end
8209 return
8210 end
8211 if _n_value == old_child then
8212 if new_child != null then
8213 new_child.parent = self
8214 assert new_child isa AExpr
8215 _n_value = new_child
8216 else
8217 abort
8218 end
8219 return
8220 end
8221 end
8222
8223 redef fun n_expr=(node)
8224 do
8225 _n_expr = node
8226 node.parent = self
8227 end
8228 redef fun n_args=(node)
8229 do
8230 _n_args = node
8231 node.parent = self
8232 end
8233 redef fun n_assign=(node)
8234 do
8235 _n_assign = node
8236 node.parent = self
8237 end
8238 redef fun n_value=(node)
8239 do
8240 _n_value = node
8241 node.parent = self
8242 end
8243
8244
8245 redef fun visit_all(v: Visitor)
8246 do
8247 v.enter_visit(_n_expr)
8248 v.enter_visit(_n_args)
8249 v.enter_visit(_n_assign)
8250 v.enter_visit(_n_value)
8251 end
8252 end
8253 redef class ABraReassignExpr
8254 private init empty_init do end
8255
8256 init init_abrareassignexpr (
8257 n_expr: nullable AExpr,
8258 n_args: nullable AExprs,
8259 n_assign_op: nullable AAssignOp,
8260 n_value: nullable AExpr
8261 )
8262 do
8263 empty_init
8264 _n_expr = n_expr.as(not null)
8265 n_expr.parent = self
8266 _n_args = n_args.as(not null)
8267 n_args.parent = self
8268 _n_assign_op = n_assign_op.as(not null)
8269 n_assign_op.parent = self
8270 _n_value = n_value.as(not null)
8271 n_value.parent = self
8272 end
8273
8274 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8275 do
8276 if _n_expr == old_child then
8277 if new_child != null then
8278 new_child.parent = self
8279 assert new_child isa AExpr
8280 _n_expr = new_child
8281 else
8282 abort
8283 end
8284 return
8285 end
8286 if _n_args == old_child then
8287 if new_child != null then
8288 new_child.parent = self
8289 assert new_child isa AExprs
8290 _n_args = new_child
8291 else
8292 abort
8293 end
8294 return
8295 end
8296 if _n_assign_op == old_child then
8297 if new_child != null then
8298 new_child.parent = self
8299 assert new_child isa AAssignOp
8300 _n_assign_op = new_child
8301 else
8302 abort
8303 end
8304 return
8305 end
8306 if _n_value == old_child then
8307 if new_child != null then
8308 new_child.parent = self
8309 assert new_child isa AExpr
8310 _n_value = new_child
8311 else
8312 abort
8313 end
8314 return
8315 end
8316 end
8317
8318 redef fun n_expr=(node)
8319 do
8320 _n_expr = node
8321 node.parent = self
8322 end
8323 redef fun n_args=(node)
8324 do
8325 _n_args = node
8326 node.parent = self
8327 end
8328 redef fun n_assign_op=(node)
8329 do
8330 _n_assign_op = node
8331 node.parent = self
8332 end
8333 redef fun n_value=(node)
8334 do
8335 _n_value = node
8336 node.parent = self
8337 end
8338
8339
8340 redef fun visit_all(v: Visitor)
8341 do
8342 v.enter_visit(_n_expr)
8343 v.enter_visit(_n_args)
8344 v.enter_visit(_n_assign_op)
8345 v.enter_visit(_n_value)
8346 end
8347 end
8348 redef class AClosureCallExpr
8349 private init empty_init do end
8350
8351 init init_aclosurecallexpr (
8352 n_id: nullable TId,
8353 n_args: nullable AExprs,
8354 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
8355 )
8356 do
8357 empty_init
8358 _n_id = n_id.as(not null)
8359 n_id.parent = self
8360 _n_args = n_args.as(not null)
8361 n_args.parent = self
8362 for n in n_closure_defs do
8363 assert n isa AClosureDef
8364 _n_closure_defs.add(n)
8365 n.parent = self
8366 end
8367 end
8368
8369 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8370 do
8371 if _n_id == old_child then
8372 if new_child != null then
8373 new_child.parent = self
8374 assert new_child isa TId
8375 _n_id = new_child
8376 else
8377 abort
8378 end
8379 return
8380 end
8381 if _n_args == old_child then
8382 if new_child != null then
8383 new_child.parent = self
8384 assert new_child isa AExprs
8385 _n_args = new_child
8386 else
8387 abort
8388 end
8389 return
8390 end
8391 for i in [0.._n_closure_defs.length[ do
8392 if _n_closure_defs[i] == old_child then
8393 if new_child != null then
8394 assert new_child isa AClosureDef
8395 _n_closure_defs[i] = new_child
8396 new_child.parent = self
8397 else
8398 _n_closure_defs.remove_at(i)
8399 end
8400 return
8401 end
8402 end
8403 end
8404
8405 redef fun n_id=(node)
8406 do
8407 _n_id = node
8408 node.parent = self
8409 end
8410 redef fun n_args=(node)
8411 do
8412 _n_args = node
8413 node.parent = self
8414 end
8415
8416
8417 redef fun visit_all(v: Visitor)
8418 do
8419 v.enter_visit(_n_id)
8420 v.enter_visit(_n_args)
8421 for n in _n_closure_defs do
8422 v.enter_visit(n)
8423 end
8424 end
8425 end
8426 redef class AVarExpr
8427 private init empty_init do end
8428
8429 init init_avarexpr (
8430 n_id: nullable TId
8431 )
8432 do
8433 empty_init
8434 _n_id = n_id.as(not null)
8435 n_id.parent = self
8436 end
8437
8438 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8439 do
8440 if _n_id == old_child then
8441 if new_child != null then
8442 new_child.parent = self
8443 assert new_child isa TId
8444 _n_id = new_child
8445 else
8446 abort
8447 end
8448 return
8449 end
8450 end
8451
8452 redef fun n_id=(node)
8453 do
8454 _n_id = node
8455 node.parent = self
8456 end
8457
8458
8459 redef fun visit_all(v: Visitor)
8460 do
8461 v.enter_visit(_n_id)
8462 end
8463 end
8464 redef class AVarAssignExpr
8465 private init empty_init do end
8466
8467 init init_avarassignexpr (
8468 n_id: nullable TId,
8469 n_assign: nullable TAssign,
8470 n_value: nullable AExpr
8471 )
8472 do
8473 empty_init
8474 _n_id = n_id.as(not null)
8475 n_id.parent = self
8476 _n_assign = n_assign.as(not null)
8477 n_assign.parent = self
8478 _n_value = n_value.as(not null)
8479 n_value.parent = self
8480 end
8481
8482 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8483 do
8484 if _n_id == old_child then
8485 if new_child != null then
8486 new_child.parent = self
8487 assert new_child isa TId
8488 _n_id = new_child
8489 else
8490 abort
8491 end
8492 return
8493 end
8494 if _n_assign == old_child then
8495 if new_child != null then
8496 new_child.parent = self
8497 assert new_child isa TAssign
8498 _n_assign = new_child
8499 else
8500 abort
8501 end
8502 return
8503 end
8504 if _n_value == old_child then
8505 if new_child != null then
8506 new_child.parent = self
8507 assert new_child isa AExpr
8508 _n_value = new_child
8509 else
8510 abort
8511 end
8512 return
8513 end
8514 end
8515
8516 redef fun n_id=(node)
8517 do
8518 _n_id = node
8519 node.parent = self
8520 end
8521 redef fun n_assign=(node)
8522 do
8523 _n_assign = node
8524 node.parent = self
8525 end
8526 redef fun n_value=(node)
8527 do
8528 _n_value = node
8529 node.parent = self
8530 end
8531
8532
8533 redef fun visit_all(v: Visitor)
8534 do
8535 v.enter_visit(_n_id)
8536 v.enter_visit(_n_assign)
8537 v.enter_visit(_n_value)
8538 end
8539 end
8540 redef class AVarReassignExpr
8541 private init empty_init do end
8542
8543 init init_avarreassignexpr (
8544 n_id: nullable TId,
8545 n_assign_op: nullable AAssignOp,
8546 n_value: nullable AExpr
8547 )
8548 do
8549 empty_init
8550 _n_id = n_id.as(not null)
8551 n_id.parent = self
8552 _n_assign_op = n_assign_op.as(not null)
8553 n_assign_op.parent = self
8554 _n_value = n_value.as(not null)
8555 n_value.parent = self
8556 end
8557
8558 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8559 do
8560 if _n_id == old_child then
8561 if new_child != null then
8562 new_child.parent = self
8563 assert new_child isa TId
8564 _n_id = new_child
8565 else
8566 abort
8567 end
8568 return
8569 end
8570 if _n_assign_op == old_child then
8571 if new_child != null then
8572 new_child.parent = self
8573 assert new_child isa AAssignOp
8574 _n_assign_op = new_child
8575 else
8576 abort
8577 end
8578 return
8579 end
8580 if _n_value == old_child then
8581 if new_child != null then
8582 new_child.parent = self
8583 assert new_child isa AExpr
8584 _n_value = new_child
8585 else
8586 abort
8587 end
8588 return
8589 end
8590 end
8591
8592 redef fun n_id=(node)
8593 do
8594 _n_id = node
8595 node.parent = self
8596 end
8597 redef fun n_assign_op=(node)
8598 do
8599 _n_assign_op = node
8600 node.parent = self
8601 end
8602 redef fun n_value=(node)
8603 do
8604 _n_value = node
8605 node.parent = self
8606 end
8607
8608
8609 redef fun visit_all(v: Visitor)
8610 do
8611 v.enter_visit(_n_id)
8612 v.enter_visit(_n_assign_op)
8613 v.enter_visit(_n_value)
8614 end
8615 end
8616 redef class ARangeExpr
8617 private init empty_init do end
8618
8619 init init_arangeexpr (
8620 n_expr: nullable AExpr,
8621 n_expr2: nullable AExpr,
8622 n_annotations: nullable AAnnotations
8623 )
8624 do
8625 empty_init
8626 _n_expr = n_expr.as(not null)
8627 n_expr.parent = self
8628 _n_expr2 = n_expr2.as(not null)
8629 n_expr2.parent = self
8630 _n_annotations = n_annotations
8631 if n_annotations != null then
8632 n_annotations.parent = self
8633 end
8634 end
8635
8636 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8637 do
8638 if _n_expr == old_child then
8639 if new_child != null then
8640 new_child.parent = self
8641 assert new_child isa AExpr
8642 _n_expr = new_child
8643 else
8644 abort
8645 end
8646 return
8647 end
8648 if _n_expr2 == old_child then
8649 if new_child != null then
8650 new_child.parent = self
8651 assert new_child isa AExpr
8652 _n_expr2 = new_child
8653 else
8654 abort
8655 end
8656 return
8657 end
8658 if _n_annotations == old_child then
8659 if new_child != null then
8660 new_child.parent = self
8661 assert new_child isa AAnnotations
8662 _n_annotations = new_child
8663 else
8664 _n_annotations = null
8665 end
8666 return
8667 end
8668 end
8669
8670 redef fun n_expr=(node)
8671 do
8672 _n_expr = node
8673 node.parent = self
8674 end
8675 redef fun n_expr2=(node)
8676 do
8677 _n_expr2 = node
8678 node.parent = self
8679 end
8680 redef fun n_annotations=(node)
8681 do
8682 _n_annotations = node
8683 if node != null then
8684 node.parent = self
8685 end
8686 end
8687
8688
8689 redef fun visit_all(v: Visitor)
8690 do
8691 v.enter_visit(_n_expr)
8692 v.enter_visit(_n_expr2)
8693 if _n_annotations != null then
8694 v.enter_visit(_n_annotations.as(not null))
8695 end
8696 end
8697 end
8698 redef class ACrangeExpr
8699 private init empty_init do end
8700
8701 init init_acrangeexpr (
8702 n_obra: nullable TObra,
8703 n_expr: nullable AExpr,
8704 n_expr2: nullable AExpr,
8705 n_cbra: nullable TCbra,
8706 n_annotations: nullable AAnnotations
8707 )
8708 do
8709 empty_init
8710 _n_obra = n_obra.as(not null)
8711 n_obra.parent = self
8712 _n_expr = n_expr.as(not null)
8713 n_expr.parent = self
8714 _n_expr2 = n_expr2.as(not null)
8715 n_expr2.parent = self
8716 _n_cbra = n_cbra.as(not null)
8717 n_cbra.parent = self
8718 _n_annotations = n_annotations
8719 if n_annotations != null then
8720 n_annotations.parent = self
8721 end
8722 end
8723
8724 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8725 do
8726 if _n_obra == old_child then
8727 if new_child != null then
8728 new_child.parent = self
8729 assert new_child isa TObra
8730 _n_obra = new_child
8731 else
8732 abort
8733 end
8734 return
8735 end
8736 if _n_expr == old_child then
8737 if new_child != null then
8738 new_child.parent = self
8739 assert new_child isa AExpr
8740 _n_expr = new_child
8741 else
8742 abort
8743 end
8744 return
8745 end
8746 if _n_expr2 == old_child then
8747 if new_child != null then
8748 new_child.parent = self
8749 assert new_child isa AExpr
8750 _n_expr2 = new_child
8751 else
8752 abort
8753 end
8754 return
8755 end
8756 if _n_cbra == old_child then
8757 if new_child != null then
8758 new_child.parent = self
8759 assert new_child isa TCbra
8760 _n_cbra = new_child
8761 else
8762 abort
8763 end
8764 return
8765 end
8766 if _n_annotations == old_child then
8767 if new_child != null then
8768 new_child.parent = self
8769 assert new_child isa AAnnotations
8770 _n_annotations = new_child
8771 else
8772 _n_annotations = null
8773 end
8774 return
8775 end
8776 end
8777
8778 redef fun n_obra=(node)
8779 do
8780 _n_obra = node
8781 node.parent = self
8782 end
8783 redef fun n_expr=(node)
8784 do
8785 _n_expr = node
8786 node.parent = self
8787 end
8788 redef fun n_expr2=(node)
8789 do
8790 _n_expr2 = node
8791 node.parent = self
8792 end
8793 redef fun n_cbra=(node)
8794 do
8795 _n_cbra = node
8796 node.parent = self
8797 end
8798 redef fun n_annotations=(node)
8799 do
8800 _n_annotations = node
8801 if node != null then
8802 node.parent = self
8803 end
8804 end
8805
8806
8807 redef fun visit_all(v: Visitor)
8808 do
8809 v.enter_visit(_n_obra)
8810 v.enter_visit(_n_expr)
8811 v.enter_visit(_n_expr2)
8812 v.enter_visit(_n_cbra)
8813 if _n_annotations != null then
8814 v.enter_visit(_n_annotations.as(not null))
8815 end
8816 end
8817 end
8818 redef class AOrangeExpr
8819 private init empty_init do end
8820
8821 init init_aorangeexpr (
8822 n_obra: nullable TObra,
8823 n_expr: nullable AExpr,
8824 n_expr2: nullable AExpr,
8825 n_cbra: nullable TObra,
8826 n_annotations: nullable AAnnotations
8827 )
8828 do
8829 empty_init
8830 _n_obra = n_obra.as(not null)
8831 n_obra.parent = self
8832 _n_expr = n_expr.as(not null)
8833 n_expr.parent = self
8834 _n_expr2 = n_expr2.as(not null)
8835 n_expr2.parent = self
8836 _n_cbra = n_cbra.as(not null)
8837 n_cbra.parent = self
8838 _n_annotations = n_annotations
8839 if n_annotations != null then
8840 n_annotations.parent = self
8841 end
8842 end
8843
8844 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8845 do
8846 if _n_obra == old_child then
8847 if new_child != null then
8848 new_child.parent = self
8849 assert new_child isa TObra
8850 _n_obra = new_child
8851 else
8852 abort
8853 end
8854 return
8855 end
8856 if _n_expr == old_child then
8857 if new_child != null then
8858 new_child.parent = self
8859 assert new_child isa AExpr
8860 _n_expr = new_child
8861 else
8862 abort
8863 end
8864 return
8865 end
8866 if _n_expr2 == old_child then
8867 if new_child != null then
8868 new_child.parent = self
8869 assert new_child isa AExpr
8870 _n_expr2 = new_child
8871 else
8872 abort
8873 end
8874 return
8875 end
8876 if _n_cbra == old_child then
8877 if new_child != null then
8878 new_child.parent = self
8879 assert new_child isa TObra
8880 _n_cbra = new_child
8881 else
8882 abort
8883 end
8884 return
8885 end
8886 if _n_annotations == old_child then
8887 if new_child != null then
8888 new_child.parent = self
8889 assert new_child isa AAnnotations
8890 _n_annotations = new_child
8891 else
8892 _n_annotations = null
8893 end
8894 return
8895 end
8896 end
8897
8898 redef fun n_obra=(node)
8899 do
8900 _n_obra = node
8901 node.parent = self
8902 end
8903 redef fun n_expr=(node)
8904 do
8905 _n_expr = node
8906 node.parent = self
8907 end
8908 redef fun n_expr2=(node)
8909 do
8910 _n_expr2 = node
8911 node.parent = self
8912 end
8913 redef fun n_cbra=(node)
8914 do
8915 _n_cbra = node
8916 node.parent = self
8917 end
8918 redef fun n_annotations=(node)
8919 do
8920 _n_annotations = node
8921 if node != null then
8922 node.parent = self
8923 end
8924 end
8925
8926
8927 redef fun visit_all(v: Visitor)
8928 do
8929 v.enter_visit(_n_obra)
8930 v.enter_visit(_n_expr)
8931 v.enter_visit(_n_expr2)
8932 v.enter_visit(_n_cbra)
8933 if _n_annotations != null then
8934 v.enter_visit(_n_annotations.as(not null))
8935 end
8936 end
8937 end
8938 redef class AArrayExpr
8939 private init empty_init do end
8940
8941 init init_aarrayexpr (
8942 n_exprs: nullable AExprs,
8943 n_annotations: nullable AAnnotations
8944 )
8945 do
8946 empty_init
8947 _n_exprs = n_exprs.as(not null)
8948 n_exprs.parent = self
8949 _n_annotations = n_annotations
8950 if n_annotations != null then
8951 n_annotations.parent = self
8952 end
8953 end
8954
8955 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8956 do
8957 if _n_exprs == old_child then
8958 if new_child != null then
8959 new_child.parent = self
8960 assert new_child isa AExprs
8961 _n_exprs = new_child
8962 else
8963 abort
8964 end
8965 return
8966 end
8967 if _n_annotations == old_child then
8968 if new_child != null then
8969 new_child.parent = self
8970 assert new_child isa AAnnotations
8971 _n_annotations = new_child
8972 else
8973 _n_annotations = null
8974 end
8975 return
8976 end
8977 end
8978
8979 redef fun n_exprs=(node)
8980 do
8981 _n_exprs = node
8982 node.parent = self
8983 end
8984 redef fun n_annotations=(node)
8985 do
8986 _n_annotations = node
8987 if node != null then
8988 node.parent = self
8989 end
8990 end
8991
8992
8993 redef fun visit_all(v: Visitor)
8994 do
8995 v.enter_visit(_n_exprs)
8996 if _n_annotations != null then
8997 v.enter_visit(_n_annotations.as(not null))
8998 end
8999 end
9000 end
9001 redef class ASelfExpr
9002 private init empty_init do end
9003
9004 init init_aselfexpr (
9005 n_kwself: nullable TKwself,
9006 n_annotations: nullable AAnnotations
9007 )
9008 do
9009 empty_init
9010 _n_kwself = n_kwself.as(not null)
9011 n_kwself.parent = self
9012 _n_annotations = n_annotations
9013 if n_annotations != null then
9014 n_annotations.parent = self
9015 end
9016 end
9017
9018 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9019 do
9020 if _n_kwself == old_child then
9021 if new_child != null then
9022 new_child.parent = self
9023 assert new_child isa TKwself
9024 _n_kwself = new_child
9025 else
9026 abort
9027 end
9028 return
9029 end
9030 if _n_annotations == old_child then
9031 if new_child != null then
9032 new_child.parent = self
9033 assert new_child isa AAnnotations
9034 _n_annotations = new_child
9035 else
9036 _n_annotations = null
9037 end
9038 return
9039 end
9040 end
9041
9042 redef fun n_kwself=(node)
9043 do
9044 _n_kwself = node
9045 node.parent = self
9046 end
9047 redef fun n_annotations=(node)
9048 do
9049 _n_annotations = node
9050 if node != null then
9051 node.parent = self
9052 end
9053 end
9054
9055
9056 redef fun visit_all(v: Visitor)
9057 do
9058 v.enter_visit(_n_kwself)
9059 if _n_annotations != null then
9060 v.enter_visit(_n_annotations.as(not null))
9061 end
9062 end
9063 end
9064 redef class AImplicitSelfExpr
9065 private init empty_init do end
9066
9067 init init_aimplicitselfexpr
9068 do
9069 empty_init
9070 end
9071
9072 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9073 do
9074 end
9075
9076
9077
9078 redef fun visit_all(v: Visitor)
9079 do
9080 end
9081 end
9082 redef class ATrueExpr
9083 private init empty_init do end
9084
9085 init init_atrueexpr (
9086 n_kwtrue: nullable TKwtrue,
9087 n_annotations: nullable AAnnotations
9088 )
9089 do
9090 empty_init
9091 _n_kwtrue = n_kwtrue.as(not null)
9092 n_kwtrue.parent = self
9093 _n_annotations = n_annotations
9094 if n_annotations != null then
9095 n_annotations.parent = self
9096 end
9097 end
9098
9099 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9100 do
9101 if _n_kwtrue == old_child then
9102 if new_child != null then
9103 new_child.parent = self
9104 assert new_child isa TKwtrue
9105 _n_kwtrue = new_child
9106 else
9107 abort
9108 end
9109 return
9110 end
9111 if _n_annotations == old_child then
9112 if new_child != null then
9113 new_child.parent = self
9114 assert new_child isa AAnnotations
9115 _n_annotations = new_child
9116 else
9117 _n_annotations = null
9118 end
9119 return
9120 end
9121 end
9122
9123 redef fun n_kwtrue=(node)
9124 do
9125 _n_kwtrue = node
9126 node.parent = self
9127 end
9128 redef fun n_annotations=(node)
9129 do
9130 _n_annotations = node
9131 if node != null then
9132 node.parent = self
9133 end
9134 end
9135
9136
9137 redef fun visit_all(v: Visitor)
9138 do
9139 v.enter_visit(_n_kwtrue)
9140 if _n_annotations != null then
9141 v.enter_visit(_n_annotations.as(not null))
9142 end
9143 end
9144 end
9145 redef class AFalseExpr
9146 private init empty_init do end
9147
9148 init init_afalseexpr (
9149 n_kwfalse: nullable TKwfalse,
9150 n_annotations: nullable AAnnotations
9151 )
9152 do
9153 empty_init
9154 _n_kwfalse = n_kwfalse.as(not null)
9155 n_kwfalse.parent = self
9156 _n_annotations = n_annotations
9157 if n_annotations != null then
9158 n_annotations.parent = self
9159 end
9160 end
9161
9162 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9163 do
9164 if _n_kwfalse == old_child then
9165 if new_child != null then
9166 new_child.parent = self
9167 assert new_child isa TKwfalse
9168 _n_kwfalse = new_child
9169 else
9170 abort
9171 end
9172 return
9173 end
9174 if _n_annotations == old_child then
9175 if new_child != null then
9176 new_child.parent = self
9177 assert new_child isa AAnnotations
9178 _n_annotations = new_child
9179 else
9180 _n_annotations = null
9181 end
9182 return
9183 end
9184 end
9185
9186 redef fun n_kwfalse=(node)
9187 do
9188 _n_kwfalse = node
9189 node.parent = self
9190 end
9191 redef fun n_annotations=(node)
9192 do
9193 _n_annotations = node
9194 if node != null then
9195 node.parent = self
9196 end
9197 end
9198
9199
9200 redef fun visit_all(v: Visitor)
9201 do
9202 v.enter_visit(_n_kwfalse)
9203 if _n_annotations != null then
9204 v.enter_visit(_n_annotations.as(not null))
9205 end
9206 end
9207 end
9208 redef class ANullExpr
9209 private init empty_init do end
9210
9211 init init_anullexpr (
9212 n_kwnull: nullable TKwnull,
9213 n_annotations: nullable AAnnotations
9214 )
9215 do
9216 empty_init
9217 _n_kwnull = n_kwnull.as(not null)
9218 n_kwnull.parent = self
9219 _n_annotations = n_annotations
9220 if n_annotations != null then
9221 n_annotations.parent = self
9222 end
9223 end
9224
9225 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9226 do
9227 if _n_kwnull == old_child then
9228 if new_child != null then
9229 new_child.parent = self
9230 assert new_child isa TKwnull
9231 _n_kwnull = new_child
9232 else
9233 abort
9234 end
9235 return
9236 end
9237 if _n_annotations == old_child then
9238 if new_child != null then
9239 new_child.parent = self
9240 assert new_child isa AAnnotations
9241 _n_annotations = new_child
9242 else
9243 _n_annotations = null
9244 end
9245 return
9246 end
9247 end
9248
9249 redef fun n_kwnull=(node)
9250 do
9251 _n_kwnull = node
9252 node.parent = self
9253 end
9254 redef fun n_annotations=(node)
9255 do
9256 _n_annotations = node
9257 if node != null then
9258 node.parent = self
9259 end
9260 end
9261
9262
9263 redef fun visit_all(v: Visitor)
9264 do
9265 v.enter_visit(_n_kwnull)
9266 if _n_annotations != null then
9267 v.enter_visit(_n_annotations.as(not null))
9268 end
9269 end
9270 end
9271 redef class AIntExpr
9272 private init empty_init do end
9273
9274 init init_aintexpr (
9275 n_number: nullable TNumber,
9276 n_annotations: nullable AAnnotations
9277 )
9278 do
9279 empty_init
9280 _n_number = n_number.as(not null)
9281 n_number.parent = self
9282 _n_annotations = n_annotations
9283 if n_annotations != null then
9284 n_annotations.parent = self
9285 end
9286 end
9287
9288 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9289 do
9290 if _n_number == old_child then
9291 if new_child != null then
9292 new_child.parent = self
9293 assert new_child isa TNumber
9294 _n_number = new_child
9295 else
9296 abort
9297 end
9298 return
9299 end
9300 if _n_annotations == old_child then
9301 if new_child != null then
9302 new_child.parent = self
9303 assert new_child isa AAnnotations
9304 _n_annotations = new_child
9305 else
9306 _n_annotations = null
9307 end
9308 return
9309 end
9310 end
9311
9312 redef fun n_number=(node)
9313 do
9314 _n_number = node
9315 node.parent = self
9316 end
9317 redef fun n_annotations=(node)
9318 do
9319 _n_annotations = node
9320 if node != null then
9321 node.parent = self
9322 end
9323 end
9324
9325
9326 redef fun visit_all(v: Visitor)
9327 do
9328 v.enter_visit(_n_number)
9329 if _n_annotations != null then
9330 v.enter_visit(_n_annotations.as(not null))
9331 end
9332 end
9333 end
9334 redef class AFloatExpr
9335 private init empty_init do end
9336
9337 init init_afloatexpr (
9338 n_float: nullable TFloat,
9339 n_annotations: nullable AAnnotations
9340 )
9341 do
9342 empty_init
9343 _n_float = n_float.as(not null)
9344 n_float.parent = self
9345 _n_annotations = n_annotations
9346 if n_annotations != null then
9347 n_annotations.parent = self
9348 end
9349 end
9350
9351 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9352 do
9353 if _n_float == old_child then
9354 if new_child != null then
9355 new_child.parent = self
9356 assert new_child isa TFloat
9357 _n_float = new_child
9358 else
9359 abort
9360 end
9361 return
9362 end
9363 if _n_annotations == old_child then
9364 if new_child != null then
9365 new_child.parent = self
9366 assert new_child isa AAnnotations
9367 _n_annotations = new_child
9368 else
9369 _n_annotations = null
9370 end
9371 return
9372 end
9373 end
9374
9375 redef fun n_float=(node)
9376 do
9377 _n_float = node
9378 node.parent = self
9379 end
9380 redef fun n_annotations=(node)
9381 do
9382 _n_annotations = node
9383 if node != null then
9384 node.parent = self
9385 end
9386 end
9387
9388
9389 redef fun visit_all(v: Visitor)
9390 do
9391 v.enter_visit(_n_float)
9392 if _n_annotations != null then
9393 v.enter_visit(_n_annotations.as(not null))
9394 end
9395 end
9396 end
9397 redef class ACharExpr
9398 private init empty_init do end
9399
9400 init init_acharexpr (
9401 n_char: nullable TChar,
9402 n_annotations: nullable AAnnotations
9403 )
9404 do
9405 empty_init
9406 _n_char = n_char.as(not null)
9407 n_char.parent = self
9408 _n_annotations = n_annotations
9409 if n_annotations != null then
9410 n_annotations.parent = self
9411 end
9412 end
9413
9414 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9415 do
9416 if _n_char == old_child then
9417 if new_child != null then
9418 new_child.parent = self
9419 assert new_child isa TChar
9420 _n_char = new_child
9421 else
9422 abort
9423 end
9424 return
9425 end
9426 if _n_annotations == old_child then
9427 if new_child != null then
9428 new_child.parent = self
9429 assert new_child isa AAnnotations
9430 _n_annotations = new_child
9431 else
9432 _n_annotations = null
9433 end
9434 return
9435 end
9436 end
9437
9438 redef fun n_char=(node)
9439 do
9440 _n_char = node
9441 node.parent = self
9442 end
9443 redef fun n_annotations=(node)
9444 do
9445 _n_annotations = node
9446 if node != null then
9447 node.parent = self
9448 end
9449 end
9450
9451
9452 redef fun visit_all(v: Visitor)
9453 do
9454 v.enter_visit(_n_char)
9455 if _n_annotations != null then
9456 v.enter_visit(_n_annotations.as(not null))
9457 end
9458 end
9459 end
9460 redef class AStringExpr
9461 private init empty_init do end
9462
9463 init init_astringexpr (
9464 n_string: nullable TString,
9465 n_annotations: nullable AAnnotations
9466 )
9467 do
9468 empty_init
9469 _n_string = n_string.as(not null)
9470 n_string.parent = self
9471 _n_annotations = n_annotations
9472 if n_annotations != null then
9473 n_annotations.parent = self
9474 end
9475 end
9476
9477 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9478 do
9479 if _n_string == old_child then
9480 if new_child != null then
9481 new_child.parent = self
9482 assert new_child isa TString
9483 _n_string = new_child
9484 else
9485 abort
9486 end
9487 return
9488 end
9489 if _n_annotations == old_child then
9490 if new_child != null then
9491 new_child.parent = self
9492 assert new_child isa AAnnotations
9493 _n_annotations = new_child
9494 else
9495 _n_annotations = null
9496 end
9497 return
9498 end
9499 end
9500
9501 redef fun n_string=(node)
9502 do
9503 _n_string = node
9504 node.parent = self
9505 end
9506 redef fun n_annotations=(node)
9507 do
9508 _n_annotations = node
9509 if node != null then
9510 node.parent = self
9511 end
9512 end
9513
9514
9515 redef fun visit_all(v: Visitor)
9516 do
9517 v.enter_visit(_n_string)
9518 if _n_annotations != null then
9519 v.enter_visit(_n_annotations.as(not null))
9520 end
9521 end
9522 end
9523 redef class AStartStringExpr
9524 private init empty_init do end
9525
9526 init init_astartstringexpr (
9527 n_string: nullable TStartString
9528 )
9529 do
9530 empty_init
9531 _n_string = n_string.as(not null)
9532 n_string.parent = self
9533 end
9534
9535 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9536 do
9537 if _n_string == old_child then
9538 if new_child != null then
9539 new_child.parent = self
9540 assert new_child isa TStartString
9541 _n_string = new_child
9542 else
9543 abort
9544 end
9545 return
9546 end
9547 end
9548
9549 redef fun n_string=(node)
9550 do
9551 _n_string = node
9552 node.parent = self
9553 end
9554
9555
9556 redef fun visit_all(v: Visitor)
9557 do
9558 v.enter_visit(_n_string)
9559 end
9560 end
9561 redef class AMidStringExpr
9562 private init empty_init do end
9563
9564 init init_amidstringexpr (
9565 n_string: nullable TMidString
9566 )
9567 do
9568 empty_init
9569 _n_string = n_string.as(not null)
9570 n_string.parent = self
9571 end
9572
9573 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9574 do
9575 if _n_string == old_child then
9576 if new_child != null then
9577 new_child.parent = self
9578 assert new_child isa TMidString
9579 _n_string = new_child
9580 else
9581 abort
9582 end
9583 return
9584 end
9585 end
9586
9587 redef fun n_string=(node)
9588 do
9589 _n_string = node
9590 node.parent = self
9591 end
9592
9593
9594 redef fun visit_all(v: Visitor)
9595 do
9596 v.enter_visit(_n_string)
9597 end
9598 end
9599 redef class AEndStringExpr
9600 private init empty_init do end
9601
9602 init init_aendstringexpr (
9603 n_string: nullable TEndString
9604 )
9605 do
9606 empty_init
9607 _n_string = n_string.as(not null)
9608 n_string.parent = self
9609 end
9610
9611 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9612 do
9613 if _n_string == old_child then
9614 if new_child != null then
9615 new_child.parent = self
9616 assert new_child isa TEndString
9617 _n_string = new_child
9618 else
9619 abort
9620 end
9621 return
9622 end
9623 end
9624
9625 redef fun n_string=(node)
9626 do
9627 _n_string = node
9628 node.parent = self
9629 end
9630
9631
9632 redef fun visit_all(v: Visitor)
9633 do
9634 v.enter_visit(_n_string)
9635 end
9636 end
9637 redef class ASuperstringExpr
9638 private init empty_init do end
9639
9640 init init_asuperstringexpr (
9641 n_exprs: Collection[Object], # Should be Collection[AExpr]
9642 n_annotations: nullable AAnnotations
9643 )
9644 do
9645 empty_init
9646 for n in n_exprs do
9647 assert n isa AExpr
9648 _n_exprs.add(n)
9649 n.parent = self
9650 end
9651 _n_annotations = n_annotations
9652 if n_annotations != null then
9653 n_annotations.parent = self
9654 end
9655 end
9656
9657 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9658 do
9659 for i in [0.._n_exprs.length[ do
9660 if _n_exprs[i] == old_child then
9661 if new_child != null then
9662 assert new_child isa AExpr
9663 _n_exprs[i] = new_child
9664 new_child.parent = self
9665 else
9666 _n_exprs.remove_at(i)
9667 end
9668 return
9669 end
9670 end
9671 if _n_annotations == old_child then
9672 if new_child != null then
9673 new_child.parent = self
9674 assert new_child isa AAnnotations
9675 _n_annotations = new_child
9676 else
9677 _n_annotations = null
9678 end
9679 return
9680 end
9681 end
9682
9683 redef fun n_annotations=(node)
9684 do
9685 _n_annotations = node
9686 if node != null then
9687 node.parent = self
9688 end
9689 end
9690
9691
9692 redef fun visit_all(v: Visitor)
9693 do
9694 for n in _n_exprs do
9695 v.enter_visit(n)
9696 end
9697 if _n_annotations != null then
9698 v.enter_visit(_n_annotations.as(not null))
9699 end
9700 end
9701 end
9702 redef class AParExpr
9703 private init empty_init do end
9704
9705 init init_aparexpr (
9706 n_opar: nullable TOpar,
9707 n_expr: nullable AExpr,
9708 n_cpar: nullable TCpar,
9709 n_annotations: nullable AAnnotations
9710 )
9711 do
9712 empty_init
9713 _n_opar = n_opar.as(not null)
9714 n_opar.parent = self
9715 _n_expr = n_expr.as(not null)
9716 n_expr.parent = self
9717 _n_cpar = n_cpar.as(not null)
9718 n_cpar.parent = self
9719 _n_annotations = n_annotations
9720 if n_annotations != null then
9721 n_annotations.parent = self
9722 end
9723 end
9724
9725 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9726 do
9727 if _n_opar == old_child then
9728 if new_child != null then
9729 new_child.parent = self
9730 assert new_child isa TOpar
9731 _n_opar = new_child
9732 else
9733 abort
9734 end
9735 return
9736 end
9737 if _n_expr == old_child then
9738 if new_child != null then
9739 new_child.parent = self
9740 assert new_child isa AExpr
9741 _n_expr = new_child
9742 else
9743 abort
9744 end
9745 return
9746 end
9747 if _n_cpar == old_child then
9748 if new_child != null then
9749 new_child.parent = self
9750 assert new_child isa TCpar
9751 _n_cpar = new_child
9752 else
9753 abort
9754 end
9755 return
9756 end
9757 if _n_annotations == old_child then
9758 if new_child != null then
9759 new_child.parent = self
9760 assert new_child isa AAnnotations
9761 _n_annotations = new_child
9762 else
9763 _n_annotations = null
9764 end
9765 return
9766 end
9767 end
9768
9769 redef fun n_opar=(node)
9770 do
9771 _n_opar = node
9772 node.parent = self
9773 end
9774 redef fun n_expr=(node)
9775 do
9776 _n_expr = node
9777 node.parent = self
9778 end
9779 redef fun n_cpar=(node)
9780 do
9781 _n_cpar = node
9782 node.parent = self
9783 end
9784 redef fun n_annotations=(node)
9785 do
9786 _n_annotations = node
9787 if node != null then
9788 node.parent = self
9789 end
9790 end
9791
9792
9793 redef fun visit_all(v: Visitor)
9794 do
9795 v.enter_visit(_n_opar)
9796 v.enter_visit(_n_expr)
9797 v.enter_visit(_n_cpar)
9798 if _n_annotations != null then
9799 v.enter_visit(_n_annotations.as(not null))
9800 end
9801 end
9802 end
9803 redef class AAsCastExpr
9804 private init empty_init do end
9805
9806 init init_aascastexpr (
9807 n_expr: nullable AExpr,
9808 n_kwas: nullable TKwas,
9809 n_opar: nullable TOpar,
9810 n_type: nullable AType,
9811 n_cpar: nullable TCpar
9812 )
9813 do
9814 empty_init
9815 _n_expr = n_expr.as(not null)
9816 n_expr.parent = self
9817 _n_kwas = n_kwas.as(not null)
9818 n_kwas.parent = self
9819 _n_opar = n_opar.as(not null)
9820 n_opar.parent = self
9821 _n_type = n_type.as(not null)
9822 n_type.parent = self
9823 _n_cpar = n_cpar.as(not null)
9824 n_cpar.parent = self
9825 end
9826
9827 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9828 do
9829 if _n_expr == old_child then
9830 if new_child != null then
9831 new_child.parent = self
9832 assert new_child isa AExpr
9833 _n_expr = new_child
9834 else
9835 abort
9836 end
9837 return
9838 end
9839 if _n_kwas == old_child then
9840 if new_child != null then
9841 new_child.parent = self
9842 assert new_child isa TKwas
9843 _n_kwas = new_child
9844 else
9845 abort
9846 end
9847 return
9848 end
9849 if _n_opar == old_child then
9850 if new_child != null then
9851 new_child.parent = self
9852 assert new_child isa TOpar
9853 _n_opar = new_child
9854 else
9855 abort
9856 end
9857 return
9858 end
9859 if _n_type == old_child then
9860 if new_child != null then
9861 new_child.parent = self
9862 assert new_child isa AType
9863 _n_type = new_child
9864 else
9865 abort
9866 end
9867 return
9868 end
9869 if _n_cpar == old_child then
9870 if new_child != null then
9871 new_child.parent = self
9872 assert new_child isa TCpar
9873 _n_cpar = new_child
9874 else
9875 abort
9876 end
9877 return
9878 end
9879 end
9880
9881 redef fun n_expr=(node)
9882 do
9883 _n_expr = node
9884 node.parent = self
9885 end
9886 redef fun n_kwas=(node)
9887 do
9888 _n_kwas = node
9889 node.parent = self
9890 end
9891 redef fun n_opar=(node)
9892 do
9893 _n_opar = node
9894 node.parent = self
9895 end
9896 redef fun n_type=(node)
9897 do
9898 _n_type = node
9899 node.parent = self
9900 end
9901 redef fun n_cpar=(node)
9902 do
9903 _n_cpar = node
9904 node.parent = self
9905 end
9906
9907
9908 redef fun visit_all(v: Visitor)
9909 do
9910 v.enter_visit(_n_expr)
9911 v.enter_visit(_n_kwas)
9912 v.enter_visit(_n_opar)
9913 v.enter_visit(_n_type)
9914 v.enter_visit(_n_cpar)
9915 end
9916 end
9917 redef class AAsNotnullExpr
9918 private init empty_init do end
9919
9920 init init_aasnotnullexpr (
9921 n_expr: nullable AExpr,
9922 n_kwas: nullable TKwas,
9923 n_opar: nullable TOpar,
9924 n_kwnot: nullable TKwnot,
9925 n_kwnull: nullable TKwnull,
9926 n_cpar: nullable TCpar
9927 )
9928 do
9929 empty_init
9930 _n_expr = n_expr.as(not null)
9931 n_expr.parent = self
9932 _n_kwas = n_kwas.as(not null)
9933 n_kwas.parent = self
9934 _n_opar = n_opar.as(not null)
9935 n_opar.parent = self
9936 _n_kwnot = n_kwnot.as(not null)
9937 n_kwnot.parent = self
9938 _n_kwnull = n_kwnull.as(not null)
9939 n_kwnull.parent = self
9940 _n_cpar = n_cpar.as(not null)
9941 n_cpar.parent = self
9942 end
9943
9944 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9945 do
9946 if _n_expr == old_child then
9947 if new_child != null then
9948 new_child.parent = self
9949 assert new_child isa AExpr
9950 _n_expr = new_child
9951 else
9952 abort
9953 end
9954 return
9955 end
9956 if _n_kwas == old_child then
9957 if new_child != null then
9958 new_child.parent = self
9959 assert new_child isa TKwas
9960 _n_kwas = new_child
9961 else
9962 abort
9963 end
9964 return
9965 end
9966 if _n_opar == old_child then
9967 if new_child != null then
9968 new_child.parent = self
9969 assert new_child isa TOpar
9970 _n_opar = new_child
9971 else
9972 abort
9973 end
9974 return
9975 end
9976 if _n_kwnot == old_child then
9977 if new_child != null then
9978 new_child.parent = self
9979 assert new_child isa TKwnot
9980 _n_kwnot = new_child
9981 else
9982 abort
9983 end
9984 return
9985 end
9986 if _n_kwnull == old_child then
9987 if new_child != null then
9988 new_child.parent = self
9989 assert new_child isa TKwnull
9990 _n_kwnull = new_child
9991 else
9992 abort
9993 end
9994 return
9995 end
9996 if _n_cpar == old_child then
9997 if new_child != null then
9998 new_child.parent = self
9999 assert new_child isa TCpar
10000 _n_cpar = new_child
10001 else
10002 abort
10003 end
10004 return
10005 end
10006 end
10007
10008 redef fun n_expr=(node)
10009 do
10010 _n_expr = node
10011 node.parent = self
10012 end
10013 redef fun n_kwas=(node)
10014 do
10015 _n_kwas = node
10016 node.parent = self
10017 end
10018 redef fun n_opar=(node)
10019 do
10020 _n_opar = node
10021 node.parent = self
10022 end
10023 redef fun n_kwnot=(node)
10024 do
10025 _n_kwnot = node
10026 node.parent = self
10027 end
10028 redef fun n_kwnull=(node)
10029 do
10030 _n_kwnull = node
10031 node.parent = self
10032 end
10033 redef fun n_cpar=(node)
10034 do
10035 _n_cpar = node
10036 node.parent = self
10037 end
10038
10039
10040 redef fun visit_all(v: Visitor)
10041 do
10042 v.enter_visit(_n_expr)
10043 v.enter_visit(_n_kwas)
10044 v.enter_visit(_n_opar)
10045 v.enter_visit(_n_kwnot)
10046 v.enter_visit(_n_kwnull)
10047 v.enter_visit(_n_cpar)
10048 end
10049 end
10050 redef class AIssetAttrExpr
10051 private init empty_init do end
10052
10053 init init_aissetattrexpr (
10054 n_kwisset: nullable TKwisset,
10055 n_expr: nullable AExpr,
10056 n_id: nullable TAttrid
10057 )
10058 do
10059 empty_init
10060 _n_kwisset = n_kwisset.as(not null)
10061 n_kwisset.parent = self
10062 _n_expr = n_expr.as(not null)
10063 n_expr.parent = self
10064 _n_id = n_id.as(not null)
10065 n_id.parent = self
10066 end
10067
10068 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10069 do
10070 if _n_kwisset == old_child then
10071 if new_child != null then
10072 new_child.parent = self
10073 assert new_child isa TKwisset
10074 _n_kwisset = new_child
10075 else
10076 abort
10077 end
10078 return
10079 end
10080 if _n_expr == old_child then
10081 if new_child != null then
10082 new_child.parent = self
10083 assert new_child isa AExpr
10084 _n_expr = new_child
10085 else
10086 abort
10087 end
10088 return
10089 end
10090 if _n_id == old_child then
10091 if new_child != null then
10092 new_child.parent = self
10093 assert new_child isa TAttrid
10094 _n_id = new_child
10095 else
10096 abort
10097 end
10098 return
10099 end
10100 end
10101
10102 redef fun n_kwisset=(node)
10103 do
10104 _n_kwisset = node
10105 node.parent = self
10106 end
10107 redef fun n_expr=(node)
10108 do
10109 _n_expr = node
10110 node.parent = self
10111 end
10112 redef fun n_id=(node)
10113 do
10114 _n_id = node
10115 node.parent = self
10116 end
10117
10118
10119 redef fun visit_all(v: Visitor)
10120 do
10121 v.enter_visit(_n_kwisset)
10122 v.enter_visit(_n_expr)
10123 v.enter_visit(_n_id)
10124 end
10125 end
10126 redef class ADebugTypeExpr
10127 private init empty_init do end
10128
10129 init init_adebugtypeexpr (
10130 n_kwdebug: nullable TKwdebug,
10131 n_kwtype: nullable TKwtype,
10132 n_expr: nullable AExpr,
10133 n_type: nullable AType
10134 )
10135 do
10136 empty_init
10137 _n_kwdebug = n_kwdebug.as(not null)
10138 n_kwdebug.parent = self
10139 _n_kwtype = n_kwtype.as(not null)
10140 n_kwtype.parent = self
10141 _n_expr = n_expr.as(not null)
10142 n_expr.parent = self
10143 _n_type = n_type.as(not null)
10144 n_type.parent = self
10145 end
10146
10147 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10148 do
10149 if _n_kwdebug == old_child then
10150 if new_child != null then
10151 new_child.parent = self
10152 assert new_child isa TKwdebug
10153 _n_kwdebug = new_child
10154 else
10155 abort
10156 end
10157 return
10158 end
10159 if _n_kwtype == old_child then
10160 if new_child != null then
10161 new_child.parent = self
10162 assert new_child isa TKwtype
10163 _n_kwtype = new_child
10164 else
10165 abort
10166 end
10167 return
10168 end
10169 if _n_expr == old_child then
10170 if new_child != null then
10171 new_child.parent = self
10172 assert new_child isa AExpr
10173 _n_expr = new_child
10174 else
10175 abort
10176 end
10177 return
10178 end
10179 if _n_type == old_child then
10180 if new_child != null then
10181 new_child.parent = self
10182 assert new_child isa AType
10183 _n_type = new_child
10184 else
10185 abort
10186 end
10187 return
10188 end
10189 end
10190
10191 redef fun n_kwdebug=(node)
10192 do
10193 _n_kwdebug = node
10194 node.parent = self
10195 end
10196 redef fun n_kwtype=(node)
10197 do
10198 _n_kwtype = node
10199 node.parent = self
10200 end
10201 redef fun n_expr=(node)
10202 do
10203 _n_expr = node
10204 node.parent = self
10205 end
10206 redef fun n_type=(node)
10207 do
10208 _n_type = node
10209 node.parent = self
10210 end
10211
10212
10213 redef fun visit_all(v: Visitor)
10214 do
10215 v.enter_visit(_n_kwdebug)
10216 v.enter_visit(_n_kwtype)
10217 v.enter_visit(_n_expr)
10218 v.enter_visit(_n_type)
10219 end
10220 end
10221 redef class AListExprs
10222 private init empty_init do end
10223
10224 init init_alistexprs (
10225 n_exprs: Collection[Object] # Should be Collection[AExpr]
10226 )
10227 do
10228 empty_init
10229 for n in n_exprs do
10230 assert n isa AExpr
10231 _n_exprs.add(n)
10232 n.parent = self
10233 end
10234 end
10235
10236 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10237 do
10238 for i in [0.._n_exprs.length[ do
10239 if _n_exprs[i] == old_child then
10240 if new_child != null then
10241 assert new_child isa AExpr
10242 _n_exprs[i] = new_child
10243 new_child.parent = self
10244 else
10245 _n_exprs.remove_at(i)
10246 end
10247 return
10248 end
10249 end
10250 end
10251
10252
10253
10254 redef fun visit_all(v: Visitor)
10255 do
10256 for n in _n_exprs do
10257 v.enter_visit(n)
10258 end
10259 end
10260 end
10261 redef class AParExprs
10262 private init empty_init do end
10263
10264 init init_aparexprs (
10265 n_opar: nullable TOpar,
10266 n_exprs: Collection[Object], # Should be Collection[AExpr]
10267 n_cpar: nullable TCpar
10268 )
10269 do
10270 empty_init
10271 _n_opar = n_opar.as(not null)
10272 n_opar.parent = self
10273 for n in n_exprs do
10274 assert n isa AExpr
10275 _n_exprs.add(n)
10276 n.parent = self
10277 end
10278 _n_cpar = n_cpar.as(not null)
10279 n_cpar.parent = self
10280 end
10281
10282 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10283 do
10284 if _n_opar == old_child then
10285 if new_child != null then
10286 new_child.parent = self
10287 assert new_child isa TOpar
10288 _n_opar = new_child
10289 else
10290 abort
10291 end
10292 return
10293 end
10294 for i in [0.._n_exprs.length[ do
10295 if _n_exprs[i] == old_child then
10296 if new_child != null then
10297 assert new_child isa AExpr
10298 _n_exprs[i] = new_child
10299 new_child.parent = self
10300 else
10301 _n_exprs.remove_at(i)
10302 end
10303 return
10304 end
10305 end
10306 if _n_cpar == old_child then
10307 if new_child != null then
10308 new_child.parent = self
10309 assert new_child isa TCpar
10310 _n_cpar = new_child
10311 else
10312 abort
10313 end
10314 return
10315 end
10316 end
10317
10318 redef fun n_opar=(node)
10319 do
10320 _n_opar = node
10321 node.parent = self
10322 end
10323 redef fun n_cpar=(node)
10324 do
10325 _n_cpar = node
10326 node.parent = self
10327 end
10328
10329
10330 redef fun visit_all(v: Visitor)
10331 do
10332 v.enter_visit(_n_opar)
10333 for n in _n_exprs do
10334 v.enter_visit(n)
10335 end
10336 v.enter_visit(_n_cpar)
10337 end
10338 end
10339 redef class ABraExprs
10340 private init empty_init do end
10341
10342 init init_abraexprs (
10343 n_obra: nullable TObra,
10344 n_exprs: Collection[Object], # Should be Collection[AExpr]
10345 n_cbra: nullable TCbra
10346 )
10347 do
10348 empty_init
10349 _n_obra = n_obra.as(not null)
10350 n_obra.parent = self
10351 for n in n_exprs do
10352 assert n isa AExpr
10353 _n_exprs.add(n)
10354 n.parent = self
10355 end
10356 _n_cbra = n_cbra.as(not null)
10357 n_cbra.parent = self
10358 end
10359
10360 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10361 do
10362 if _n_obra == old_child then
10363 if new_child != null then
10364 new_child.parent = self
10365 assert new_child isa TObra
10366 _n_obra = new_child
10367 else
10368 abort
10369 end
10370 return
10371 end
10372 for i in [0.._n_exprs.length[ do
10373 if _n_exprs[i] == old_child then
10374 if new_child != null then
10375 assert new_child isa AExpr
10376 _n_exprs[i] = new_child
10377 new_child.parent = self
10378 else
10379 _n_exprs.remove_at(i)
10380 end
10381 return
10382 end
10383 end
10384 if _n_cbra == old_child then
10385 if new_child != null then
10386 new_child.parent = self
10387 assert new_child isa TCbra
10388 _n_cbra = new_child
10389 else
10390 abort
10391 end
10392 return
10393 end
10394 end
10395
10396 redef fun n_obra=(node)
10397 do
10398 _n_obra = node
10399 node.parent = self
10400 end
10401 redef fun n_cbra=(node)
10402 do
10403 _n_cbra = node
10404 node.parent = self
10405 end
10406
10407
10408 redef fun visit_all(v: Visitor)
10409 do
10410 v.enter_visit(_n_obra)
10411 for n in _n_exprs do
10412 v.enter_visit(n)
10413 end
10414 v.enter_visit(_n_cbra)
10415 end
10416 end
10417 redef class APlusAssignOp
10418 private init empty_init do end
10419
10420 init init_aplusassignop (
10421 n_pluseq: nullable TPluseq
10422 )
10423 do
10424 empty_init
10425 _n_pluseq = n_pluseq.as(not null)
10426 n_pluseq.parent = self
10427 end
10428
10429 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10430 do
10431 if _n_pluseq == old_child then
10432 if new_child != null then
10433 new_child.parent = self
10434 assert new_child isa TPluseq
10435 _n_pluseq = new_child
10436 else
10437 abort
10438 end
10439 return
10440 end
10441 end
10442
10443 redef fun n_pluseq=(node)
10444 do
10445 _n_pluseq = node
10446 node.parent = self
10447 end
10448
10449
10450 redef fun visit_all(v: Visitor)
10451 do
10452 v.enter_visit(_n_pluseq)
10453 end
10454 end
10455 redef class AMinusAssignOp
10456 private init empty_init do end
10457
10458 init init_aminusassignop (
10459 n_minuseq: nullable TMinuseq
10460 )
10461 do
10462 empty_init
10463 _n_minuseq = n_minuseq.as(not null)
10464 n_minuseq.parent = self
10465 end
10466
10467 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10468 do
10469 if _n_minuseq == old_child then
10470 if new_child != null then
10471 new_child.parent = self
10472 assert new_child isa TMinuseq
10473 _n_minuseq = new_child
10474 else
10475 abort
10476 end
10477 return
10478 end
10479 end
10480
10481 redef fun n_minuseq=(node)
10482 do
10483 _n_minuseq = node
10484 node.parent = self
10485 end
10486
10487
10488 redef fun visit_all(v: Visitor)
10489 do
10490 v.enter_visit(_n_minuseq)
10491 end
10492 end
10493 redef class AClosureDef
10494 private init empty_init do end
10495
10496 init init_aclosuredef (
10497 n_bang: nullable TBang,
10498 n_id: nullable AClosureId,
10499 n_ids: Collection[Object], # Should be Collection[TId]
10500 n_kwdo: nullable TKwdo,
10501 n_expr: nullable AExpr,
10502 n_label: nullable ALabel
10503 )
10504 do
10505 empty_init
10506 _n_bang = n_bang.as(not null)
10507 n_bang.parent = self
10508 _n_id = n_id.as(not null)
10509 n_id.parent = self
10510 for n in n_ids do
10511 assert n isa TId
10512 _n_ids.add(n)
10513 n.parent = self
10514 end
10515 _n_kwdo = n_kwdo
10516 if n_kwdo != null then
10517 n_kwdo.parent = self
10518 end
10519 _n_expr = n_expr
10520 if n_expr != null then
10521 n_expr.parent = self
10522 end
10523 _n_label = n_label
10524 if n_label != null then
10525 n_label.parent = self
10526 end
10527 end
10528
10529 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10530 do
10531 if _n_bang == old_child then
10532 if new_child != null then
10533 new_child.parent = self
10534 assert new_child isa TBang
10535 _n_bang = new_child
10536 else
10537 abort
10538 end
10539 return
10540 end
10541 if _n_id == old_child then
10542 if new_child != null then
10543 new_child.parent = self
10544 assert new_child isa AClosureId
10545 _n_id = new_child
10546 else
10547 abort
10548 end
10549 return
10550 end
10551 for i in [0.._n_ids.length[ do
10552 if _n_ids[i] == old_child then
10553 if new_child != null then
10554 assert new_child isa TId
10555 _n_ids[i] = new_child
10556 new_child.parent = self
10557 else
10558 _n_ids.remove_at(i)
10559 end
10560 return
10561 end
10562 end
10563 if _n_kwdo == old_child then
10564 if new_child != null then
10565 new_child.parent = self
10566 assert new_child isa TKwdo
10567 _n_kwdo = new_child
10568 else
10569 _n_kwdo = null
10570 end
10571 return
10572 end
10573 if _n_expr == old_child then
10574 if new_child != null then
10575 new_child.parent = self
10576 assert new_child isa AExpr
10577 _n_expr = new_child
10578 else
10579 _n_expr = null
10580 end
10581 return
10582 end
10583 if _n_label == old_child then
10584 if new_child != null then
10585 new_child.parent = self
10586 assert new_child isa ALabel
10587 _n_label = new_child
10588 else
10589 _n_label = null
10590 end
10591 return
10592 end
10593 end
10594
10595 redef fun n_bang=(node)
10596 do
10597 _n_bang = node
10598 node.parent = self
10599 end
10600 redef fun n_id=(node)
10601 do
10602 _n_id = node
10603 node.parent = self
10604 end
10605 redef fun n_kwdo=(node)
10606 do
10607 _n_kwdo = node
10608 if node != null then
10609 node.parent = self
10610 end
10611 end
10612 redef fun n_expr=(node)
10613 do
10614 _n_expr = node
10615 if node != null then
10616 node.parent = self
10617 end
10618 end
10619 redef fun n_label=(node)
10620 do
10621 _n_label = node
10622 if node != null then
10623 node.parent = self
10624 end
10625 end
10626
10627
10628 redef fun visit_all(v: Visitor)
10629 do
10630 v.enter_visit(_n_bang)
10631 v.enter_visit(_n_id)
10632 for n in _n_ids do
10633 v.enter_visit(n)
10634 end
10635 if _n_kwdo != null then
10636 v.enter_visit(_n_kwdo.as(not null))
10637 end
10638 if _n_expr != null then
10639 v.enter_visit(_n_expr.as(not null))
10640 end
10641 if _n_label != null then
10642 v.enter_visit(_n_label.as(not null))
10643 end
10644 end
10645 end
10646 redef class ASimpleClosureId
10647 private init empty_init do end
10648
10649 init init_asimpleclosureid (
10650 n_id: nullable TId
10651 )
10652 do
10653 empty_init
10654 _n_id = n_id.as(not null)
10655 n_id.parent = self
10656 end
10657
10658 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10659 do
10660 if _n_id == old_child then
10661 if new_child != null then
10662 new_child.parent = self
10663 assert new_child isa TId
10664 _n_id = new_child
10665 else
10666 abort
10667 end
10668 return
10669 end
10670 end
10671
10672 redef fun n_id=(node)
10673 do
10674 _n_id = node
10675 node.parent = self
10676 end
10677
10678
10679 redef fun visit_all(v: Visitor)
10680 do
10681 v.enter_visit(_n_id)
10682 end
10683 end
10684 redef class ABreakClosureId
10685 private init empty_init do end
10686
10687 init init_abreakclosureid (
10688 n_kwbreak: nullable TKwbreak
10689 )
10690 do
10691 empty_init
10692 _n_kwbreak = n_kwbreak.as(not null)
10693 n_kwbreak.parent = self
10694 end
10695
10696 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10697 do
10698 if _n_kwbreak == old_child then
10699 if new_child != null then
10700 new_child.parent = self
10701 assert new_child isa TKwbreak
10702 _n_kwbreak = new_child
10703 else
10704 abort
10705 end
10706 return
10707 end
10708 end
10709
10710 redef fun n_kwbreak=(node)
10711 do
10712 _n_kwbreak = node
10713 node.parent = self
10714 end
10715
10716
10717 redef fun visit_all(v: Visitor)
10718 do
10719 v.enter_visit(_n_kwbreak)
10720 end
10721 end
10722 redef class AModuleName
10723 private init empty_init do end
10724
10725 init init_amodulename (
10726 n_quad: nullable TQuad,
10727 n_path: Collection[Object], # Should be Collection[TId]
10728 n_id: nullable TId
10729 )
10730 do
10731 empty_init
10732 _n_quad = n_quad
10733 if n_quad != null then
10734 n_quad.parent = self
10735 end
10736 for n in n_path do
10737 assert n isa TId
10738 _n_path.add(n)
10739 n.parent = self
10740 end
10741 _n_id = n_id.as(not null)
10742 n_id.parent = self
10743 end
10744
10745 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10746 do
10747 if _n_quad == old_child then
10748 if new_child != null then
10749 new_child.parent = self
10750 assert new_child isa TQuad
10751 _n_quad = new_child
10752 else
10753 _n_quad = null
10754 end
10755 return
10756 end
10757 for i in [0.._n_path.length[ do
10758 if _n_path[i] == old_child then
10759 if new_child != null then
10760 assert new_child isa TId
10761 _n_path[i] = new_child
10762 new_child.parent = self
10763 else
10764 _n_path.remove_at(i)
10765 end
10766 return
10767 end
10768 end
10769 if _n_id == old_child then
10770 if new_child != null then
10771 new_child.parent = self
10772 assert new_child isa TId
10773 _n_id = new_child
10774 else
10775 abort
10776 end
10777 return
10778 end
10779 end
10780
10781 redef fun n_quad=(node)
10782 do
10783 _n_quad = node
10784 if node != null then
10785 node.parent = self
10786 end
10787 end
10788 redef fun n_id=(node)
10789 do
10790 _n_id = node
10791 node.parent = self
10792 end
10793
10794
10795 redef fun visit_all(v: Visitor)
10796 do
10797 if _n_quad != null then
10798 v.enter_visit(_n_quad.as(not null))
10799 end
10800 for n in _n_path do
10801 v.enter_visit(n)
10802 end
10803 v.enter_visit(_n_id)
10804 end
10805 end
10806 redef class AExternCalls
10807 private init empty_init do end
10808
10809 init init_aexterncalls (
10810 n_kwimport: nullable TKwimport,
10811 n_extern_calls: Collection[Object] # Should be Collection[AExternCall]
10812 )
10813 do
10814 empty_init
10815 _n_kwimport = n_kwimport.as(not null)
10816 n_kwimport.parent = self
10817 for n in n_extern_calls do
10818 assert n isa AExternCall
10819 _n_extern_calls.add(n)
10820 n.parent = self
10821 end
10822 end
10823
10824 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10825 do
10826 if _n_kwimport == old_child then
10827 if new_child != null then
10828 new_child.parent = self
10829 assert new_child isa TKwimport
10830 _n_kwimport = new_child
10831 else
10832 abort
10833 end
10834 return
10835 end
10836 for i in [0.._n_extern_calls.length[ do
10837 if _n_extern_calls[i] == old_child then
10838 if new_child != null then
10839 assert new_child isa AExternCall
10840 _n_extern_calls[i] = new_child
10841 new_child.parent = self
10842 else
10843 _n_extern_calls.remove_at(i)
10844 end
10845 return
10846 end
10847 end
10848 end
10849
10850 redef fun n_kwimport=(node)
10851 do
10852 _n_kwimport = node
10853 node.parent = self
10854 end
10855
10856
10857 redef fun visit_all(v: Visitor)
10858 do
10859 v.enter_visit(_n_kwimport)
10860 for n in _n_extern_calls do
10861 v.enter_visit(n)
10862 end
10863 end
10864 end
10865 redef class AExternCall
10866 private init empty_init do end
10867
10868 init init_aexterncall
10869 do
10870 empty_init
10871 end
10872
10873 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10874 do
10875 end
10876
10877
10878
10879 redef fun visit_all(v: Visitor)
10880 do
10881 end
10882 end
10883 redef class ASuperExternCall
10884 private init empty_init do end
10885
10886 init init_asuperexterncall (
10887 n_kwsuper: nullable TKwsuper
10888 )
10889 do
10890 empty_init
10891 _n_kwsuper = n_kwsuper.as(not null)
10892 n_kwsuper.parent = self
10893 end
10894
10895 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10896 do
10897 if _n_kwsuper == old_child then
10898 if new_child != null then
10899 new_child.parent = self
10900 assert new_child isa TKwsuper
10901 _n_kwsuper = new_child
10902 else
10903 abort
10904 end
10905 return
10906 end
10907 end
10908
10909 redef fun n_kwsuper=(node)
10910 do
10911 _n_kwsuper = node
10912 node.parent = self
10913 end
10914
10915
10916 redef fun visit_all(v: Visitor)
10917 do
10918 v.enter_visit(_n_kwsuper)
10919 end
10920 end
10921 redef class ALocalPropExternCall
10922 private init empty_init do end
10923
10924 init init_alocalpropexterncall (
10925 n_methid: nullable AMethid
10926 )
10927 do
10928 empty_init
10929 _n_methid = n_methid.as(not null)
10930 n_methid.parent = self
10931 end
10932
10933 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10934 do
10935 if _n_methid == old_child then
10936 if new_child != null then
10937 new_child.parent = self
10938 assert new_child isa AMethid
10939 _n_methid = new_child
10940 else
10941 abort
10942 end
10943 return
10944 end
10945 end
10946
10947 redef fun n_methid=(node)
10948 do
10949 _n_methid = node
10950 node.parent = self
10951 end
10952
10953
10954 redef fun visit_all(v: Visitor)
10955 do
10956 v.enter_visit(_n_methid)
10957 end
10958 end
10959 redef class AFullPropExternCall
10960 private init empty_init do end
10961
10962 init init_afullpropexterncall (
10963 n_classid: nullable TClassid,
10964 n_quad: nullable TQuad,
10965 n_methid: nullable AMethid
10966 )
10967 do
10968 empty_init
10969 _n_classid = n_classid.as(not null)
10970 n_classid.parent = self
10971 _n_quad = n_quad
10972 if n_quad != null then
10973 n_quad.parent = self
10974 end
10975 _n_methid = n_methid.as(not null)
10976 n_methid.parent = self
10977 end
10978
10979 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10980 do
10981 if _n_classid == old_child then
10982 if new_child != null then
10983 new_child.parent = self
10984 assert new_child isa TClassid
10985 _n_classid = new_child
10986 else
10987 abort
10988 end
10989 return
10990 end
10991 if _n_quad == old_child then
10992 if new_child != null then
10993 new_child.parent = self
10994 assert new_child isa TQuad
10995 _n_quad = new_child
10996 else
10997 _n_quad = null
10998 end
10999 return
11000 end
11001 if _n_methid == old_child then
11002 if new_child != null then
11003 new_child.parent = self
11004 assert new_child isa AMethid
11005 _n_methid = new_child
11006 else
11007 abort
11008 end
11009 return
11010 end
11011 end
11012
11013 redef fun n_classid=(node)
11014 do
11015 _n_classid = node
11016 node.parent = self
11017 end
11018 redef fun n_quad=(node)
11019 do
11020 _n_quad = node
11021 if node != null then
11022 node.parent = self
11023 end
11024 end
11025 redef fun n_methid=(node)
11026 do
11027 _n_methid = node
11028 node.parent = self
11029 end
11030
11031
11032 redef fun visit_all(v: Visitor)
11033 do
11034 v.enter_visit(_n_classid)
11035 if _n_quad != null then
11036 v.enter_visit(_n_quad.as(not null))
11037 end
11038 v.enter_visit(_n_methid)
11039 end
11040 end
11041 redef class AInitPropExternCall
11042 private init empty_init do end
11043
11044 init init_ainitpropexterncall (
11045 n_classid: nullable TClassid
11046 )
11047 do
11048 empty_init
11049 _n_classid = n_classid.as(not null)
11050 n_classid.parent = self
11051 end
11052
11053 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11054 do
11055 if _n_classid == old_child then
11056 if new_child != null then
11057 new_child.parent = self
11058 assert new_child isa TClassid
11059 _n_classid = new_child
11060 else
11061 abort
11062 end
11063 return
11064 end
11065 end
11066
11067 redef fun n_classid=(node)
11068 do
11069 _n_classid = node
11070 node.parent = self
11071 end
11072
11073
11074 redef fun visit_all(v: Visitor)
11075 do
11076 v.enter_visit(_n_classid)
11077 end
11078 end
11079 redef class ACastAsExternCall
11080 private init empty_init do end
11081
11082 init init_acastasexterncall (
11083 n_from_type: nullable AType,
11084 n_kwas: nullable TKwas,
11085 n_to_type: nullable AType
11086 )
11087 do
11088 empty_init
11089 _n_from_type = n_from_type.as(not null)
11090 n_from_type.parent = self
11091 _n_kwas = n_kwas.as(not null)
11092 n_kwas.parent = self
11093 _n_to_type = n_to_type.as(not null)
11094 n_to_type.parent = self
11095 end
11096
11097 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11098 do
11099 if _n_from_type == old_child then
11100 if new_child != null then
11101 new_child.parent = self
11102 assert new_child isa AType
11103 _n_from_type = new_child
11104 else
11105 abort
11106 end
11107 return
11108 end
11109 if _n_kwas == old_child then
11110 if new_child != null then
11111 new_child.parent = self
11112 assert new_child isa TKwas
11113 _n_kwas = new_child
11114 else
11115 abort
11116 end
11117 return
11118 end
11119 if _n_to_type == old_child then
11120 if new_child != null then
11121 new_child.parent = self
11122 assert new_child isa AType
11123 _n_to_type = new_child
11124 else
11125 abort
11126 end
11127 return
11128 end
11129 end
11130
11131 redef fun n_from_type=(node)
11132 do
11133 _n_from_type = node
11134 node.parent = self
11135 end
11136 redef fun n_kwas=(node)
11137 do
11138 _n_kwas = node
11139 node.parent = self
11140 end
11141 redef fun n_to_type=(node)
11142 do
11143 _n_to_type = node
11144 node.parent = self
11145 end
11146
11147
11148 redef fun visit_all(v: Visitor)
11149 do
11150 v.enter_visit(_n_from_type)
11151 v.enter_visit(_n_kwas)
11152 v.enter_visit(_n_to_type)
11153 end
11154 end
11155 redef class AAsNullableExternCall
11156 private init empty_init do end
11157
11158 init init_aasnullableexterncall (
11159 n_type: nullable AType,
11160 n_kwas: nullable TKwas,
11161 n_kwnullable: nullable TKwnullable
11162 )
11163 do
11164 empty_init
11165 _n_type = n_type.as(not null)
11166 n_type.parent = self
11167 _n_kwas = n_kwas.as(not null)
11168 n_kwas.parent = self
11169 _n_kwnullable = n_kwnullable.as(not null)
11170 n_kwnullable.parent = self
11171 end
11172
11173 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11174 do
11175 if _n_type == old_child then
11176 if new_child != null then
11177 new_child.parent = self
11178 assert new_child isa AType
11179 _n_type = new_child
11180 else
11181 abort
11182 end
11183 return
11184 end
11185 if _n_kwas == old_child then
11186 if new_child != null then
11187 new_child.parent = self
11188 assert new_child isa TKwas
11189 _n_kwas = new_child
11190 else
11191 abort
11192 end
11193 return
11194 end
11195 if _n_kwnullable == old_child then
11196 if new_child != null then
11197 new_child.parent = self
11198 assert new_child isa TKwnullable
11199 _n_kwnullable = new_child
11200 else
11201 abort
11202 end
11203 return
11204 end
11205 end
11206
11207 redef fun n_type=(node)
11208 do
11209 _n_type = node
11210 node.parent = self
11211 end
11212 redef fun n_kwas=(node)
11213 do
11214 _n_kwas = node
11215 node.parent = self
11216 end
11217 redef fun n_kwnullable=(node)
11218 do
11219 _n_kwnullable = node
11220 node.parent = self
11221 end
11222
11223
11224 redef fun visit_all(v: Visitor)
11225 do
11226 v.enter_visit(_n_type)
11227 v.enter_visit(_n_kwas)
11228 v.enter_visit(_n_kwnullable)
11229 end
11230 end
11231 redef class AAsNotNullableExternCall
11232 private init empty_init do end
11233
11234 init init_aasnotnullableexterncall (
11235 n_type: nullable AType,
11236 n_kwas: nullable TKwas,
11237 n_kwnot: nullable TKwnot,
11238 n_kwnullable: nullable TKwnullable
11239 )
11240 do
11241 empty_init
11242 _n_type = n_type.as(not null)
11243 n_type.parent = self
11244 _n_kwas = n_kwas.as(not null)
11245 n_kwas.parent = self
11246 _n_kwnot = n_kwnot.as(not null)
11247 n_kwnot.parent = self
11248 _n_kwnullable = n_kwnullable.as(not null)
11249 n_kwnullable.parent = self
11250 end
11251
11252 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11253 do
11254 if _n_type == old_child then
11255 if new_child != null then
11256 new_child.parent = self
11257 assert new_child isa AType
11258 _n_type = new_child
11259 else
11260 abort
11261 end
11262 return
11263 end
11264 if _n_kwas == old_child then
11265 if new_child != null then
11266 new_child.parent = self
11267 assert new_child isa TKwas
11268 _n_kwas = new_child
11269 else
11270 abort
11271 end
11272 return
11273 end
11274 if _n_kwnot == old_child then
11275 if new_child != null then
11276 new_child.parent = self
11277 assert new_child isa TKwnot
11278 _n_kwnot = new_child
11279 else
11280 abort
11281 end
11282 return
11283 end
11284 if _n_kwnullable == old_child then
11285 if new_child != null then
11286 new_child.parent = self
11287 assert new_child isa TKwnullable
11288 _n_kwnullable = new_child
11289 else
11290 abort
11291 end
11292 return
11293 end
11294 end
11295
11296 redef fun n_type=(node)
11297 do
11298 _n_type = node
11299 node.parent = self
11300 end
11301 redef fun n_kwas=(node)
11302 do
11303 _n_kwas = node
11304 node.parent = self
11305 end
11306 redef fun n_kwnot=(node)
11307 do
11308 _n_kwnot = node
11309 node.parent = self
11310 end
11311 redef fun n_kwnullable=(node)
11312 do
11313 _n_kwnullable = node
11314 node.parent = self
11315 end
11316
11317
11318 redef fun visit_all(v: Visitor)
11319 do
11320 v.enter_visit(_n_type)
11321 v.enter_visit(_n_kwas)
11322 v.enter_visit(_n_kwnot)
11323 v.enter_visit(_n_kwnullable)
11324 end
11325 end
11326 redef class AInLanguage
11327 private init empty_init do end
11328
11329 init init_ainlanguage (
11330 n_kwin: nullable TKwin,
11331 n_string: nullable TString
11332 )
11333 do
11334 empty_init
11335 _n_kwin = n_kwin.as(not null)
11336 n_kwin.parent = self
11337 _n_string = n_string.as(not null)
11338 n_string.parent = self
11339 end
11340
11341 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11342 do
11343 if _n_kwin == old_child then
11344 if new_child != null then
11345 new_child.parent = self
11346 assert new_child isa TKwin
11347 _n_kwin = new_child
11348 else
11349 abort
11350 end
11351 return
11352 end
11353 if _n_string == old_child then
11354 if new_child != null then
11355 new_child.parent = self
11356 assert new_child isa TString
11357 _n_string = new_child
11358 else
11359 abort
11360 end
11361 return
11362 end
11363 end
11364
11365 redef fun n_kwin=(node)
11366 do
11367 _n_kwin = node
11368 node.parent = self
11369 end
11370 redef fun n_string=(node)
11371 do
11372 _n_string = node
11373 node.parent = self
11374 end
11375
11376
11377 redef fun visit_all(v: Visitor)
11378 do
11379 v.enter_visit(_n_kwin)
11380 v.enter_visit(_n_string)
11381 end
11382 end
11383 redef class AExternCodeBlock
11384 private init empty_init do end
11385
11386 init init_aexterncodeblock (
11387 n_in_language: nullable AInLanguage,
11388 n_extern_code_segment: nullable TExternCodeSegment
11389 )
11390 do
11391 empty_init
11392 _n_in_language = n_in_language
11393 if n_in_language != null then
11394 n_in_language.parent = self
11395 end
11396 _n_extern_code_segment = n_extern_code_segment.as(not null)
11397 n_extern_code_segment.parent = self
11398 end
11399
11400 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11401 do
11402 if _n_in_language == old_child then
11403 if new_child != null then
11404 new_child.parent = self
11405 assert new_child isa AInLanguage
11406 _n_in_language = new_child
11407 else
11408 _n_in_language = null
11409 end
11410 return
11411 end
11412 if _n_extern_code_segment == old_child then
11413 if new_child != null then
11414 new_child.parent = self
11415 assert new_child isa TExternCodeSegment
11416 _n_extern_code_segment = new_child
11417 else
11418 abort
11419 end
11420 return
11421 end
11422 end
11423
11424 redef fun n_in_language=(node)
11425 do
11426 _n_in_language = node
11427 if node != null then
11428 node.parent = self
11429 end
11430 end
11431 redef fun n_extern_code_segment=(node)
11432 do
11433 _n_extern_code_segment = node
11434 node.parent = self
11435 end
11436
11437
11438 redef fun visit_all(v: Visitor)
11439 do
11440 if _n_in_language != null then
11441 v.enter_visit(_n_in_language.as(not null))
11442 end
11443 v.enter_visit(_n_extern_code_segment)
11444 end
11445 end
11446 redef class AQualified
11447 private init empty_init do end
11448
11449 init init_aqualified (
11450 n_id: Collection[Object], # Should be Collection[TId]
11451 n_classid: nullable TClassid
11452 )
11453 do
11454 empty_init
11455 for n in n_id do
11456 assert n isa TId
11457 _n_id.add(n)
11458 n.parent = self
11459 end
11460 _n_classid = n_classid
11461 if n_classid != null then
11462 n_classid.parent = self
11463 end
11464 end
11465
11466 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11467 do
11468 for i in [0.._n_id.length[ do
11469 if _n_id[i] == old_child then
11470 if new_child != null then
11471 assert new_child isa TId
11472 _n_id[i] = new_child
11473 new_child.parent = self
11474 else
11475 _n_id.remove_at(i)
11476 end
11477 return
11478 end
11479 end
11480 if _n_classid == old_child then
11481 if new_child != null then
11482 new_child.parent = self
11483 assert new_child isa TClassid
11484 _n_classid = new_child
11485 else
11486 _n_classid = null
11487 end
11488 return
11489 end
11490 end
11491
11492 redef fun n_classid=(node)
11493 do
11494 _n_classid = node
11495 if node != null then
11496 node.parent = self
11497 end
11498 end
11499
11500
11501 redef fun visit_all(v: Visitor)
11502 do
11503 for n in _n_id do
11504 v.enter_visit(n)
11505 end
11506 if _n_classid != null then
11507 v.enter_visit(_n_classid.as(not null))
11508 end
11509 end
11510 end
11511 redef class ADoc
11512 private init empty_init do end
11513
11514 init init_adoc (
11515 n_comment: Collection[Object] # Should be Collection[TComment]
11516 )
11517 do
11518 empty_init
11519 for n in n_comment do
11520 assert n isa TComment
11521 _n_comment.add(n)
11522 n.parent = self
11523 end
11524 end
11525
11526 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11527 do
11528 for i in [0.._n_comment.length[ do
11529 if _n_comment[i] == old_child then
11530 if new_child != null then
11531 assert new_child isa TComment
11532 _n_comment[i] = new_child
11533 new_child.parent = self
11534 else
11535 _n_comment.remove_at(i)
11536 end
11537 return
11538 end
11539 end
11540 end
11541
11542
11543
11544 redef fun visit_all(v: Visitor)
11545 do
11546 for n in _n_comment do
11547 v.enter_visit(n)
11548 end
11549 end
11550 end
11551 redef class AAnnotations
11552 private init empty_init do end
11553
11554 init init_aannotations (
11555 n_at: nullable TAt,
11556 n_opar: nullable TOpar,
11557 n_items: Collection[Object], # Should be Collection[AAnnotation]
11558 n_cpar: nullable TCpar
11559 )
11560 do
11561 empty_init
11562 _n_at = n_at
11563 if n_at != null then
11564 n_at.parent = self
11565 end
11566 _n_opar = n_opar
11567 if n_opar != null then
11568 n_opar.parent = self
11569 end
11570 for n in n_items do
11571 assert n isa AAnnotation
11572 _n_items.add(n)
11573 n.parent = self
11574 end
11575 _n_cpar = n_cpar
11576 if n_cpar != null then
11577 n_cpar.parent = self
11578 end
11579 end
11580
11581 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11582 do
11583 if _n_at == old_child then
11584 if new_child != null then
11585 new_child.parent = self
11586 assert new_child isa TAt
11587 _n_at = new_child
11588 else
11589 _n_at = null
11590 end
11591 return
11592 end
11593 if _n_opar == old_child then
11594 if new_child != null then
11595 new_child.parent = self
11596 assert new_child isa TOpar
11597 _n_opar = new_child
11598 else
11599 _n_opar = null
11600 end
11601 return
11602 end
11603 for i in [0.._n_items.length[ do
11604 if _n_items[i] == old_child then
11605 if new_child != null then
11606 assert new_child isa AAnnotation
11607 _n_items[i] = new_child
11608 new_child.parent = self
11609 else
11610 _n_items.remove_at(i)
11611 end
11612 return
11613 end
11614 end
11615 if _n_cpar == old_child then
11616 if new_child != null then
11617 new_child.parent = self
11618 assert new_child isa TCpar
11619 _n_cpar = new_child
11620 else
11621 _n_cpar = null
11622 end
11623 return
11624 end
11625 end
11626
11627 redef fun n_at=(node)
11628 do
11629 _n_at = node
11630 if node != null then
11631 node.parent = self
11632 end
11633 end
11634 redef fun n_opar=(node)
11635 do
11636 _n_opar = node
11637 if node != null then
11638 node.parent = self
11639 end
11640 end
11641 redef fun n_cpar=(node)
11642 do
11643 _n_cpar = node
11644 if node != null then
11645 node.parent = self
11646 end
11647 end
11648
11649
11650 redef fun visit_all(v: Visitor)
11651 do
11652 if _n_at != null then
11653 v.enter_visit(_n_at.as(not null))
11654 end
11655 if _n_opar != null then
11656 v.enter_visit(_n_opar.as(not null))
11657 end
11658 for n in _n_items do
11659 v.enter_visit(n)
11660 end
11661 if _n_cpar != null then
11662 v.enter_visit(_n_cpar.as(not null))
11663 end
11664 end
11665 end
11666 redef class AAnnotation
11667 private init empty_init do end
11668
11669 init init_aannotation (
11670 n_atid: nullable AAtid,
11671 n_opar: nullable TOpar,
11672 n_args: Collection[Object], # Should be Collection[AAtArg]
11673 n_cpar: nullable TCpar,
11674 n_annotations: nullable AAnnotations
11675 )
11676 do
11677 empty_init
11678 _n_atid = n_atid.as(not null)
11679 n_atid.parent = self
11680 _n_opar = n_opar
11681 if n_opar != null then
11682 n_opar.parent = self
11683 end
11684 for n in n_args do
11685 assert n isa AAtArg
11686 _n_args.add(n)
11687 n.parent = self
11688 end
11689 _n_cpar = n_cpar
11690 if n_cpar != null then
11691 n_cpar.parent = self
11692 end
11693 _n_annotations = n_annotations
11694 if n_annotations != null then
11695 n_annotations.parent = self
11696 end
11697 end
11698
11699 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11700 do
11701 if _n_atid == old_child then
11702 if new_child != null then
11703 new_child.parent = self
11704 assert new_child isa AAtid
11705 _n_atid = new_child
11706 else
11707 abort
11708 end
11709 return
11710 end
11711 if _n_opar == old_child then
11712 if new_child != null then
11713 new_child.parent = self
11714 assert new_child isa TOpar
11715 _n_opar = new_child
11716 else
11717 _n_opar = null
11718 end
11719 return
11720 end
11721 for i in [0.._n_args.length[ do
11722 if _n_args[i] == old_child then
11723 if new_child != null then
11724 assert new_child isa AAtArg
11725 _n_args[i] = new_child
11726 new_child.parent = self
11727 else
11728 _n_args.remove_at(i)
11729 end
11730 return
11731 end
11732 end
11733 if _n_cpar == old_child then
11734 if new_child != null then
11735 new_child.parent = self
11736 assert new_child isa TCpar
11737 _n_cpar = new_child
11738 else
11739 _n_cpar = null
11740 end
11741 return
11742 end
11743 if _n_annotations == old_child then
11744 if new_child != null then
11745 new_child.parent = self
11746 assert new_child isa AAnnotations
11747 _n_annotations = new_child
11748 else
11749 _n_annotations = null
11750 end
11751 return
11752 end
11753 end
11754
11755 redef fun n_atid=(node)
11756 do
11757 _n_atid = node
11758 node.parent = self
11759 end
11760 redef fun n_opar=(node)
11761 do
11762 _n_opar = node
11763 if node != null then
11764 node.parent = self
11765 end
11766 end
11767 redef fun n_cpar=(node)
11768 do
11769 _n_cpar = node
11770 if node != null then
11771 node.parent = self
11772 end
11773 end
11774 redef fun n_annotations=(node)
11775 do
11776 _n_annotations = node
11777 if node != null then
11778 node.parent = self
11779 end
11780 end
11781
11782
11783 redef fun visit_all(v: Visitor)
11784 do
11785 v.enter_visit(_n_atid)
11786 if _n_opar != null then
11787 v.enter_visit(_n_opar.as(not null))
11788 end
11789 for n in _n_args do
11790 v.enter_visit(n)
11791 end
11792 if _n_cpar != null then
11793 v.enter_visit(_n_cpar.as(not null))
11794 end
11795 if _n_annotations != null then
11796 v.enter_visit(_n_annotations.as(not null))
11797 end
11798 end
11799 end
11800 redef class ATypeAtArg
11801 private init empty_init do end
11802
11803 init init_atypeatarg (
11804 n_type: nullable AType
11805 )
11806 do
11807 empty_init
11808 _n_type = n_type.as(not null)
11809 n_type.parent = self
11810 end
11811
11812 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11813 do
11814 if _n_type == old_child then
11815 if new_child != null then
11816 new_child.parent = self
11817 assert new_child isa AType
11818 _n_type = new_child
11819 else
11820 abort
11821 end
11822 return
11823 end
11824 end
11825
11826 redef fun n_type=(node)
11827 do
11828 _n_type = node
11829 node.parent = self
11830 end
11831
11832
11833 redef fun visit_all(v: Visitor)
11834 do
11835 v.enter_visit(_n_type)
11836 end
11837 end
11838 redef class AExprAtArg
11839 private init empty_init do end
11840
11841 init init_aexpratarg (
11842 n_expr: nullable AExpr
11843 )
11844 do
11845 empty_init
11846 _n_expr = n_expr.as(not null)
11847 n_expr.parent = self
11848 end
11849
11850 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11851 do
11852 if _n_expr == old_child then
11853 if new_child != null then
11854 new_child.parent = self
11855 assert new_child isa AExpr
11856 _n_expr = new_child
11857 else
11858 abort
11859 end
11860 return
11861 end
11862 end
11863
11864 redef fun n_expr=(node)
11865 do
11866 _n_expr = node
11867 node.parent = self
11868 end
11869
11870
11871 redef fun visit_all(v: Visitor)
11872 do
11873 v.enter_visit(_n_expr)
11874 end
11875 end
11876 redef class AAtAtArg
11877 private init empty_init do end
11878
11879 init init_aatatarg (
11880 n_annotations: nullable AAnnotations
11881 )
11882 do
11883 empty_init
11884 _n_annotations = n_annotations.as(not null)
11885 n_annotations.parent = self
11886 end
11887
11888 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11889 do
11890 if _n_annotations == old_child then
11891 if new_child != null then
11892 new_child.parent = self
11893 assert new_child isa AAnnotations
11894 _n_annotations = new_child
11895 else
11896 abort
11897 end
11898 return
11899 end
11900 end
11901
11902 redef fun n_annotations=(node)
11903 do
11904 _n_annotations = node
11905 node.parent = self
11906 end
11907
11908
11909 redef fun visit_all(v: Visitor)
11910 do
11911 v.enter_visit(_n_annotations)
11912 end
11913 end
11914 redef class AIdAtid
11915 private init empty_init do end
11916
11917 init init_aidatid (
11918 n_id: nullable TId
11919 )
11920 do
11921 empty_init
11922 _n_id = n_id.as(not null)
11923 n_id.parent = self
11924 end
11925
11926 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11927 do
11928 if _n_id == old_child then
11929 if new_child != null then
11930 new_child.parent = self
11931 assert new_child isa TId
11932 _n_id = new_child
11933 else
11934 abort
11935 end
11936 return
11937 end
11938 end
11939
11940 redef fun n_id=(node)
11941 do
11942 _n_id = node
11943 node.parent = self
11944 end
11945
11946
11947 redef fun visit_all(v: Visitor)
11948 do
11949 v.enter_visit(_n_id)
11950 end
11951 end
11952 redef class AKwexternAtid
11953 private init empty_init do end
11954
11955 init init_akwexternatid (
11956 n_id: nullable TKwextern
11957 )
11958 do
11959 empty_init
11960 _n_id = n_id.as(not null)
11961 n_id.parent = self
11962 end
11963
11964 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11965 do
11966 if _n_id == old_child then
11967 if new_child != null then
11968 new_child.parent = self
11969 assert new_child isa TKwextern
11970 _n_id = new_child
11971 else
11972 abort
11973 end
11974 return
11975 end
11976 end
11977
11978 redef fun n_id=(node)
11979 do
11980 _n_id = node
11981 node.parent = self
11982 end
11983
11984
11985 redef fun visit_all(v: Visitor)
11986 do
11987 v.enter_visit(_n_id)
11988 end
11989 end
11990 redef class AKwinternAtid
11991 private init empty_init do end
11992
11993 init init_akwinternatid (
11994 n_id: nullable TKwintern
11995 )
11996 do
11997 empty_init
11998 _n_id = n_id.as(not null)
11999 n_id.parent = self
12000 end
12001
12002 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12003 do
12004 if _n_id == old_child then
12005 if new_child != null then
12006 new_child.parent = self
12007 assert new_child isa TKwintern
12008 _n_id = new_child
12009 else
12010 abort
12011 end
12012 return
12013 end
12014 end
12015
12016 redef fun n_id=(node)
12017 do
12018 _n_id = node
12019 node.parent = self
12020 end
12021
12022
12023 redef fun visit_all(v: Visitor)
12024 do
12025 v.enter_visit(_n_id)
12026 end
12027 end
12028 redef class AKwreadableAtid
12029 private init empty_init do end
12030
12031 init init_akwreadableatid (
12032 n_id: nullable TKwreadable
12033 )
12034 do
12035 empty_init
12036 _n_id = n_id.as(not null)
12037 n_id.parent = self
12038 end
12039
12040 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12041 do
12042 if _n_id == old_child then
12043 if new_child != null then
12044 new_child.parent = self
12045 assert new_child isa TKwreadable
12046 _n_id = new_child
12047 else
12048 abort
12049 end
12050 return
12051 end
12052 end
12053
12054 redef fun n_id=(node)
12055 do
12056 _n_id = node
12057 node.parent = self
12058 end
12059
12060
12061 redef fun visit_all(v: Visitor)
12062 do
12063 v.enter_visit(_n_id)
12064 end
12065 end
12066 redef class AKwwritableAtid
12067 private init empty_init do end
12068
12069 init init_akwwritableatid (
12070 n_id: nullable TKwwritable
12071 )
12072 do
12073 empty_init
12074 _n_id = n_id.as(not null)
12075 n_id.parent = self
12076 end
12077
12078 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12079 do
12080 if _n_id == old_child then
12081 if new_child != null then
12082 new_child.parent = self
12083 assert new_child isa TKwwritable
12084 _n_id = new_child
12085 else
12086 abort
12087 end
12088 return
12089 end
12090 end
12091
12092 redef fun n_id=(node)
12093 do
12094 _n_id = node
12095 node.parent = self
12096 end
12097
12098
12099 redef fun visit_all(v: Visitor)
12100 do
12101 v.enter_visit(_n_id)
12102 end
12103 end
12104 redef class AKwimportAtid
12105 private init empty_init do end
12106
12107 init init_akwimportatid (
12108 n_id: nullable TKwimport
12109 )
12110 do
12111 empty_init
12112 _n_id = n_id.as(not null)
12113 n_id.parent = self
12114 end
12115
12116 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12117 do
12118 if _n_id == old_child then
12119 if new_child != null then
12120 new_child.parent = self
12121 assert new_child isa TKwimport
12122 _n_id = new_child
12123 else
12124 abort
12125 end
12126 return
12127 end
12128 end
12129
12130 redef fun n_id=(node)
12131 do
12132 _n_id = node
12133 node.parent = self
12134 end
12135
12136
12137 redef fun visit_all(v: Visitor)
12138 do
12139 v.enter_visit(_n_id)
12140 end
12141 end
12142
12143 redef class Start
12144 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12145 do
12146 if _n_base == old_child then
12147 if new_child == null then
12148 else
12149 new_child.parent = self
12150 assert new_child isa AModule
12151 _n_base = new_child
12152 end
12153 old_child.parent = null
12154 return
12155 end
12156 end
12157
12158 redef fun visit_all(v: Visitor)
12159 do
12160 if _n_base != null then
12161 v.enter_visit(_n_base.as(not null))
12162 end
12163 v.enter_visit(_n_eof)
12164 end
12165 end