parser: add setters for non-list attributes
[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 package 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 ANotExpr
6167 private init empty_init do end
6168
6169 init init_anotexpr (
6170 n_kwnot: nullable TKwnot,
6171 n_expr: nullable AExpr
6172 )
6173 do
6174 empty_init
6175 _n_kwnot = n_kwnot.as(not null)
6176 n_kwnot.parent = self
6177 _n_expr = n_expr.as(not null)
6178 n_expr.parent = self
6179 end
6180
6181 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6182 do
6183 if _n_kwnot == old_child then
6184 if new_child != null then
6185 new_child.parent = self
6186 assert new_child isa TKwnot
6187 _n_kwnot = new_child
6188 else
6189 abort
6190 end
6191 return
6192 end
6193 if _n_expr == old_child then
6194 if new_child != null then
6195 new_child.parent = self
6196 assert new_child isa AExpr
6197 _n_expr = new_child
6198 else
6199 abort
6200 end
6201 return
6202 end
6203 end
6204
6205 redef fun n_kwnot=(node)
6206 do
6207 _n_kwnot = node
6208 node.parent = self
6209 end
6210 redef fun n_expr=(node)
6211 do
6212 _n_expr = node
6213 node.parent = self
6214 end
6215
6216
6217 redef fun visit_all(v: Visitor)
6218 do
6219 v.enter_visit(_n_kwnot)
6220 v.enter_visit(_n_expr)
6221 end
6222 end
6223 redef class AEqExpr
6224 private init empty_init do end
6225
6226 init init_aeqexpr (
6227 n_expr: nullable AExpr,
6228 n_expr2: nullable AExpr
6229 )
6230 do
6231 empty_init
6232 _n_expr = n_expr.as(not null)
6233 n_expr.parent = self
6234 _n_expr2 = n_expr2.as(not null)
6235 n_expr2.parent = self
6236 end
6237
6238 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6239 do
6240 if _n_expr == old_child then
6241 if new_child != null then
6242 new_child.parent = self
6243 assert new_child isa AExpr
6244 _n_expr = new_child
6245 else
6246 abort
6247 end
6248 return
6249 end
6250 if _n_expr2 == old_child then
6251 if new_child != null then
6252 new_child.parent = self
6253 assert new_child isa AExpr
6254 _n_expr2 = new_child
6255 else
6256 abort
6257 end
6258 return
6259 end
6260 end
6261
6262 redef fun n_expr=(node)
6263 do
6264 _n_expr = node
6265 node.parent = self
6266 end
6267 redef fun n_expr2=(node)
6268 do
6269 _n_expr2 = node
6270 node.parent = self
6271 end
6272
6273
6274 redef fun visit_all(v: Visitor)
6275 do
6276 v.enter_visit(_n_expr)
6277 v.enter_visit(_n_expr2)
6278 end
6279 end
6280 redef class AEeExpr
6281 private init empty_init do end
6282
6283 init init_aeeexpr (
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 ANeExpr
6338 private init empty_init do end
6339
6340 init init_aneexpr (
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 ALtExpr
6395 private init empty_init do end
6396
6397 init init_altexpr (
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 ALeExpr
6452 private init empty_init do end
6453
6454 init init_aleexpr (
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 ALlExpr
6509 private init empty_init do end
6510
6511 init init_allexpr (
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 AGtExpr
6566 private init empty_init do end
6567
6568 init init_agtexpr (
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 AGeExpr
6623 private init empty_init do end
6624
6625 init init_ageexpr (
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 AGgExpr
6680 private init empty_init do end
6681
6682 init init_aggexpr (
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 AIsaExpr
6737 private init empty_init do end
6738
6739 init init_aisaexpr (
6740 n_expr: nullable AExpr,
6741 n_type: nullable AType
6742 )
6743 do
6744 empty_init
6745 _n_expr = n_expr.as(not null)
6746 n_expr.parent = self
6747 _n_type = n_type.as(not null)
6748 n_type.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_type == old_child then
6764 if new_child != null then
6765 new_child.parent = self
6766 assert new_child isa AType
6767 _n_type = 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_type=(node)
6781 do
6782 _n_type = 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_type)
6791 end
6792 end
6793 redef class APlusExpr
6794 private init empty_init do end
6795
6796 init init_aplusexpr (
6797 n_expr: nullable AExpr,
6798 n_expr2: nullable AExpr
6799 )
6800 do
6801 empty_init
6802 _n_expr = n_expr.as(not null)
6803 n_expr.parent = self
6804 _n_expr2 = n_expr2.as(not null)
6805 n_expr2.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_expr2 == old_child then
6821 if new_child != null then
6822 new_child.parent = self
6823 assert new_child isa AExpr
6824 _n_expr2 = 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_expr2=(node)
6838 do
6839 _n_expr2 = 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_expr2)
6848 end
6849 end
6850 redef class AMinusExpr
6851 private init empty_init do end
6852
6853 init init_aminusexpr (
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 AStarshipExpr
6908 private init empty_init do end
6909
6910 init init_astarshipexpr (
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 AStarExpr
6965 private init empty_init do end
6966
6967 init init_astarexpr (
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 ASlashExpr
7022 private init empty_init do end
7023
7024 init init_aslashexpr (
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 APercentExpr
7079 private init empty_init do end
7080
7081 init init_apercentexpr (
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 AUminusExpr
7136 private init empty_init do end
7137
7138 init init_auminusexpr (
7139 n_minus: nullable TMinus,
7140 n_expr: nullable AExpr
7141 )
7142 do
7143 empty_init
7144 _n_minus = n_minus.as(not null)
7145 n_minus.parent = self
7146 _n_expr = n_expr.as(not null)
7147 n_expr.parent = self
7148 end
7149
7150 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7151 do
7152 if _n_minus == old_child then
7153 if new_child != null then
7154 new_child.parent = self
7155 assert new_child isa TMinus
7156 _n_minus = new_child
7157 else
7158 abort
7159 end
7160 return
7161 end
7162 if _n_expr == old_child then
7163 if new_child != null then
7164 new_child.parent = self
7165 assert new_child isa AExpr
7166 _n_expr = new_child
7167 else
7168 abort
7169 end
7170 return
7171 end
7172 end
7173
7174 redef fun n_minus=(node)
7175 do
7176 _n_minus = node
7177 node.parent = self
7178 end
7179 redef fun n_expr=(node)
7180 do
7181 _n_expr = node
7182 node.parent = self
7183 end
7184
7185
7186 redef fun visit_all(v: Visitor)
7187 do
7188 v.enter_visit(_n_minus)
7189 v.enter_visit(_n_expr)
7190 end
7191 end
7192 redef class ANewExpr
7193 private init empty_init do end
7194
7195 init init_anewexpr (
7196 n_kwnew: nullable TKwnew,
7197 n_type: nullable AType,
7198 n_id: nullable TId,
7199 n_args: nullable AExprs
7200 )
7201 do
7202 empty_init
7203 _n_kwnew = n_kwnew.as(not null)
7204 n_kwnew.parent = self
7205 _n_type = n_type.as(not null)
7206 n_type.parent = self
7207 _n_id = n_id
7208 if n_id != null then
7209 n_id.parent = self
7210 end
7211 _n_args = n_args.as(not null)
7212 n_args.parent = self
7213 end
7214
7215 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7216 do
7217 if _n_kwnew == old_child then
7218 if new_child != null then
7219 new_child.parent = self
7220 assert new_child isa TKwnew
7221 _n_kwnew = new_child
7222 else
7223 abort
7224 end
7225 return
7226 end
7227 if _n_type == old_child then
7228 if new_child != null then
7229 new_child.parent = self
7230 assert new_child isa AType
7231 _n_type = new_child
7232 else
7233 abort
7234 end
7235 return
7236 end
7237 if _n_id == old_child then
7238 if new_child != null then
7239 new_child.parent = self
7240 assert new_child isa TId
7241 _n_id = new_child
7242 else
7243 _n_id = null
7244 end
7245 return
7246 end
7247 if _n_args == old_child then
7248 if new_child != null then
7249 new_child.parent = self
7250 assert new_child isa AExprs
7251 _n_args = new_child
7252 else
7253 abort
7254 end
7255 return
7256 end
7257 end
7258
7259 redef fun n_kwnew=(node)
7260 do
7261 _n_kwnew = node
7262 node.parent = self
7263 end
7264 redef fun n_type=(node)
7265 do
7266 _n_type = node
7267 node.parent = self
7268 end
7269 redef fun n_id=(node)
7270 do
7271 _n_id = node
7272 if node != null then
7273 node.parent = self
7274 end
7275 end
7276 redef fun n_args=(node)
7277 do
7278 _n_args = node
7279 node.parent = self
7280 end
7281
7282
7283 redef fun visit_all(v: Visitor)
7284 do
7285 v.enter_visit(_n_kwnew)
7286 v.enter_visit(_n_type)
7287 if _n_id != null then
7288 v.enter_visit(_n_id.as(not null))
7289 end
7290 v.enter_visit(_n_args)
7291 end
7292 end
7293 redef class AAttrExpr
7294 private init empty_init do end
7295
7296 init init_aattrexpr (
7297 n_expr: nullable AExpr,
7298 n_id: nullable TAttrid
7299 )
7300 do
7301 empty_init
7302 _n_expr = n_expr.as(not null)
7303 n_expr.parent = self
7304 _n_id = n_id.as(not null)
7305 n_id.parent = self
7306 end
7307
7308 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7309 do
7310 if _n_expr == old_child then
7311 if new_child != null then
7312 new_child.parent = self
7313 assert new_child isa AExpr
7314 _n_expr = new_child
7315 else
7316 abort
7317 end
7318 return
7319 end
7320 if _n_id == old_child then
7321 if new_child != null then
7322 new_child.parent = self
7323 assert new_child isa TAttrid
7324 _n_id = new_child
7325 else
7326 abort
7327 end
7328 return
7329 end
7330 end
7331
7332 redef fun n_expr=(node)
7333 do
7334 _n_expr = node
7335 node.parent = self
7336 end
7337 redef fun n_id=(node)
7338 do
7339 _n_id = node
7340 node.parent = self
7341 end
7342
7343
7344 redef fun visit_all(v: Visitor)
7345 do
7346 v.enter_visit(_n_expr)
7347 v.enter_visit(_n_id)
7348 end
7349 end
7350 redef class AAttrAssignExpr
7351 private init empty_init do end
7352
7353 init init_aattrassignexpr (
7354 n_expr: nullable AExpr,
7355 n_id: nullable TAttrid,
7356 n_assign: nullable TAssign,
7357 n_value: nullable AExpr
7358 )
7359 do
7360 empty_init
7361 _n_expr = n_expr.as(not null)
7362 n_expr.parent = self
7363 _n_id = n_id.as(not null)
7364 n_id.parent = self
7365 _n_assign = n_assign.as(not null)
7366 n_assign.parent = self
7367 _n_value = n_value.as(not null)
7368 n_value.parent = self
7369 end
7370
7371 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7372 do
7373 if _n_expr == old_child then
7374 if new_child != null then
7375 new_child.parent = self
7376 assert new_child isa AExpr
7377 _n_expr = new_child
7378 else
7379 abort
7380 end
7381 return
7382 end
7383 if _n_id == old_child then
7384 if new_child != null then
7385 new_child.parent = self
7386 assert new_child isa TAttrid
7387 _n_id = new_child
7388 else
7389 abort
7390 end
7391 return
7392 end
7393 if _n_assign == old_child then
7394 if new_child != null then
7395 new_child.parent = self
7396 assert new_child isa TAssign
7397 _n_assign = new_child
7398 else
7399 abort
7400 end
7401 return
7402 end
7403 if _n_value == old_child then
7404 if new_child != null then
7405 new_child.parent = self
7406 assert new_child isa AExpr
7407 _n_value = new_child
7408 else
7409 abort
7410 end
7411 return
7412 end
7413 end
7414
7415 redef fun n_expr=(node)
7416 do
7417 _n_expr = node
7418 node.parent = self
7419 end
7420 redef fun n_id=(node)
7421 do
7422 _n_id = node
7423 node.parent = self
7424 end
7425 redef fun n_assign=(node)
7426 do
7427 _n_assign = node
7428 node.parent = self
7429 end
7430 redef fun n_value=(node)
7431 do
7432 _n_value = node
7433 node.parent = self
7434 end
7435
7436
7437 redef fun visit_all(v: Visitor)
7438 do
7439 v.enter_visit(_n_expr)
7440 v.enter_visit(_n_id)
7441 v.enter_visit(_n_assign)
7442 v.enter_visit(_n_value)
7443 end
7444 end
7445 redef class AAttrReassignExpr
7446 private init empty_init do end
7447
7448 init init_aattrreassignexpr (
7449 n_expr: nullable AExpr,
7450 n_id: nullable TAttrid,
7451 n_assign_op: nullable AAssignOp,
7452 n_value: nullable AExpr
7453 )
7454 do
7455 empty_init
7456 _n_expr = n_expr.as(not null)
7457 n_expr.parent = self
7458 _n_id = n_id.as(not null)
7459 n_id.parent = self
7460 _n_assign_op = n_assign_op.as(not null)
7461 n_assign_op.parent = self
7462 _n_value = n_value.as(not null)
7463 n_value.parent = self
7464 end
7465
7466 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7467 do
7468 if _n_expr == old_child then
7469 if new_child != null then
7470 new_child.parent = self
7471 assert new_child isa AExpr
7472 _n_expr = new_child
7473 else
7474 abort
7475 end
7476 return
7477 end
7478 if _n_id == old_child then
7479 if new_child != null then
7480 new_child.parent = self
7481 assert new_child isa TAttrid
7482 _n_id = new_child
7483 else
7484 abort
7485 end
7486 return
7487 end
7488 if _n_assign_op == old_child then
7489 if new_child != null then
7490 new_child.parent = self
7491 assert new_child isa AAssignOp
7492 _n_assign_op = new_child
7493 else
7494 abort
7495 end
7496 return
7497 end
7498 if _n_value == old_child then
7499 if new_child != null then
7500 new_child.parent = self
7501 assert new_child isa AExpr
7502 _n_value = new_child
7503 else
7504 abort
7505 end
7506 return
7507 end
7508 end
7509
7510 redef fun n_expr=(node)
7511 do
7512 _n_expr = node
7513 node.parent = self
7514 end
7515 redef fun n_id=(node)
7516 do
7517 _n_id = node
7518 node.parent = self
7519 end
7520 redef fun n_assign_op=(node)
7521 do
7522 _n_assign_op = node
7523 node.parent = self
7524 end
7525 redef fun n_value=(node)
7526 do
7527 _n_value = node
7528 node.parent = self
7529 end
7530
7531
7532 redef fun visit_all(v: Visitor)
7533 do
7534 v.enter_visit(_n_expr)
7535 v.enter_visit(_n_id)
7536 v.enter_visit(_n_assign_op)
7537 v.enter_visit(_n_value)
7538 end
7539 end
7540 redef class ACallExpr
7541 private init empty_init do end
7542
7543 init init_acallexpr (
7544 n_expr: nullable AExpr,
7545 n_id: nullable TId,
7546 n_args: nullable AExprs,
7547 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
7548 )
7549 do
7550 empty_init
7551 _n_expr = n_expr.as(not null)
7552 n_expr.parent = self
7553 _n_id = n_id.as(not null)
7554 n_id.parent = self
7555 _n_args = n_args.as(not null)
7556 n_args.parent = self
7557 for n in n_closure_defs do
7558 assert n isa AClosureDef
7559 _n_closure_defs.add(n)
7560 n.parent = self
7561 end
7562 end
7563
7564 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7565 do
7566 if _n_expr == old_child then
7567 if new_child != null then
7568 new_child.parent = self
7569 assert new_child isa AExpr
7570 _n_expr = new_child
7571 else
7572 abort
7573 end
7574 return
7575 end
7576 if _n_id == old_child then
7577 if new_child != null then
7578 new_child.parent = self
7579 assert new_child isa TId
7580 _n_id = new_child
7581 else
7582 abort
7583 end
7584 return
7585 end
7586 if _n_args == old_child then
7587 if new_child != null then
7588 new_child.parent = self
7589 assert new_child isa AExprs
7590 _n_args = new_child
7591 else
7592 abort
7593 end
7594 return
7595 end
7596 for i in [0.._n_closure_defs.length[ do
7597 if _n_closure_defs[i] == old_child then
7598 if new_child != null then
7599 assert new_child isa AClosureDef
7600 _n_closure_defs[i] = new_child
7601 new_child.parent = self
7602 else
7603 _n_closure_defs.remove_at(i)
7604 end
7605 return
7606 end
7607 end
7608 end
7609
7610 redef fun n_expr=(node)
7611 do
7612 _n_expr = node
7613 node.parent = self
7614 end
7615 redef fun n_id=(node)
7616 do
7617 _n_id = node
7618 node.parent = self
7619 end
7620 redef fun n_args=(node)
7621 do
7622 _n_args = node
7623 node.parent = self
7624 end
7625
7626
7627 redef fun visit_all(v: Visitor)
7628 do
7629 v.enter_visit(_n_expr)
7630 v.enter_visit(_n_id)
7631 v.enter_visit(_n_args)
7632 for n in _n_closure_defs do
7633 v.enter_visit(n)
7634 end
7635 end
7636 end
7637 redef class ACallAssignExpr
7638 private init empty_init do end
7639
7640 init init_acallassignexpr (
7641 n_expr: nullable AExpr,
7642 n_id: nullable TId,
7643 n_args: nullable AExprs,
7644 n_assign: nullable TAssign,
7645 n_value: nullable AExpr
7646 )
7647 do
7648 empty_init
7649 _n_expr = n_expr.as(not null)
7650 n_expr.parent = self
7651 _n_id = n_id.as(not null)
7652 n_id.parent = self
7653 _n_args = n_args.as(not null)
7654 n_args.parent = self
7655 _n_assign = n_assign.as(not null)
7656 n_assign.parent = self
7657 _n_value = n_value.as(not null)
7658 n_value.parent = self
7659 end
7660
7661 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7662 do
7663 if _n_expr == old_child then
7664 if new_child != null then
7665 new_child.parent = self
7666 assert new_child isa AExpr
7667 _n_expr = new_child
7668 else
7669 abort
7670 end
7671 return
7672 end
7673 if _n_id == old_child then
7674 if new_child != null then
7675 new_child.parent = self
7676 assert new_child isa TId
7677 _n_id = new_child
7678 else
7679 abort
7680 end
7681 return
7682 end
7683 if _n_args == old_child then
7684 if new_child != null then
7685 new_child.parent = self
7686 assert new_child isa AExprs
7687 _n_args = new_child
7688 else
7689 abort
7690 end
7691 return
7692 end
7693 if _n_assign == old_child then
7694 if new_child != null then
7695 new_child.parent = self
7696 assert new_child isa TAssign
7697 _n_assign = new_child
7698 else
7699 abort
7700 end
7701 return
7702 end
7703 if _n_value == old_child then
7704 if new_child != null then
7705 new_child.parent = self
7706 assert new_child isa AExpr
7707 _n_value = new_child
7708 else
7709 abort
7710 end
7711 return
7712 end
7713 end
7714
7715 redef fun n_expr=(node)
7716 do
7717 _n_expr = node
7718 node.parent = self
7719 end
7720 redef fun n_id=(node)
7721 do
7722 _n_id = node
7723 node.parent = self
7724 end
7725 redef fun n_args=(node)
7726 do
7727 _n_args = node
7728 node.parent = self
7729 end
7730 redef fun n_assign=(node)
7731 do
7732 _n_assign = node
7733 node.parent = self
7734 end
7735 redef fun n_value=(node)
7736 do
7737 _n_value = node
7738 node.parent = self
7739 end
7740
7741
7742 redef fun visit_all(v: Visitor)
7743 do
7744 v.enter_visit(_n_expr)
7745 v.enter_visit(_n_id)
7746 v.enter_visit(_n_args)
7747 v.enter_visit(_n_assign)
7748 v.enter_visit(_n_value)
7749 end
7750 end
7751 redef class ACallReassignExpr
7752 private init empty_init do end
7753
7754 init init_acallreassignexpr (
7755 n_expr: nullable AExpr,
7756 n_id: nullable TId,
7757 n_args: nullable AExprs,
7758 n_assign_op: nullable AAssignOp,
7759 n_value: nullable AExpr
7760 )
7761 do
7762 empty_init
7763 _n_expr = n_expr.as(not null)
7764 n_expr.parent = self
7765 _n_id = n_id.as(not null)
7766 n_id.parent = self
7767 _n_args = n_args.as(not null)
7768 n_args.parent = self
7769 _n_assign_op = n_assign_op.as(not null)
7770 n_assign_op.parent = self
7771 _n_value = n_value.as(not null)
7772 n_value.parent = self
7773 end
7774
7775 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7776 do
7777 if _n_expr == old_child then
7778 if new_child != null then
7779 new_child.parent = self
7780 assert new_child isa AExpr
7781 _n_expr = new_child
7782 else
7783 abort
7784 end
7785 return
7786 end
7787 if _n_id == old_child then
7788 if new_child != null then
7789 new_child.parent = self
7790 assert new_child isa TId
7791 _n_id = new_child
7792 else
7793 abort
7794 end
7795 return
7796 end
7797 if _n_args == old_child then
7798 if new_child != null then
7799 new_child.parent = self
7800 assert new_child isa AExprs
7801 _n_args = new_child
7802 else
7803 abort
7804 end
7805 return
7806 end
7807 if _n_assign_op == old_child then
7808 if new_child != null then
7809 new_child.parent = self
7810 assert new_child isa AAssignOp
7811 _n_assign_op = new_child
7812 else
7813 abort
7814 end
7815 return
7816 end
7817 if _n_value == old_child then
7818 if new_child != null then
7819 new_child.parent = self
7820 assert new_child isa AExpr
7821 _n_value = new_child
7822 else
7823 abort
7824 end
7825 return
7826 end
7827 end
7828
7829 redef fun n_expr=(node)
7830 do
7831 _n_expr = node
7832 node.parent = self
7833 end
7834 redef fun n_id=(node)
7835 do
7836 _n_id = node
7837 node.parent = self
7838 end
7839 redef fun n_args=(node)
7840 do
7841 _n_args = node
7842 node.parent = self
7843 end
7844 redef fun n_assign_op=(node)
7845 do
7846 _n_assign_op = node
7847 node.parent = self
7848 end
7849 redef fun n_value=(node)
7850 do
7851 _n_value = node
7852 node.parent = self
7853 end
7854
7855
7856 redef fun visit_all(v: Visitor)
7857 do
7858 v.enter_visit(_n_expr)
7859 v.enter_visit(_n_id)
7860 v.enter_visit(_n_args)
7861 v.enter_visit(_n_assign_op)
7862 v.enter_visit(_n_value)
7863 end
7864 end
7865 redef class ASuperExpr
7866 private init empty_init do end
7867
7868 init init_asuperexpr (
7869 n_qualified: nullable AQualified,
7870 n_kwsuper: nullable TKwsuper,
7871 n_args: nullable AExprs
7872 )
7873 do
7874 empty_init
7875 _n_qualified = n_qualified
7876 if n_qualified != null then
7877 n_qualified.parent = self
7878 end
7879 _n_kwsuper = n_kwsuper.as(not null)
7880 n_kwsuper.parent = self
7881 _n_args = n_args.as(not null)
7882 n_args.parent = self
7883 end
7884
7885 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7886 do
7887 if _n_qualified == old_child then
7888 if new_child != null then
7889 new_child.parent = self
7890 assert new_child isa AQualified
7891 _n_qualified = new_child
7892 else
7893 _n_qualified = null
7894 end
7895 return
7896 end
7897 if _n_kwsuper == old_child then
7898 if new_child != null then
7899 new_child.parent = self
7900 assert new_child isa TKwsuper
7901 _n_kwsuper = new_child
7902 else
7903 abort
7904 end
7905 return
7906 end
7907 if _n_args == old_child then
7908 if new_child != null then
7909 new_child.parent = self
7910 assert new_child isa AExprs
7911 _n_args = new_child
7912 else
7913 abort
7914 end
7915 return
7916 end
7917 end
7918
7919 redef fun n_qualified=(node)
7920 do
7921 _n_qualified = node
7922 if node != null then
7923 node.parent = self
7924 end
7925 end
7926 redef fun n_kwsuper=(node)
7927 do
7928 _n_kwsuper = node
7929 node.parent = self
7930 end
7931 redef fun n_args=(node)
7932 do
7933 _n_args = node
7934 node.parent = self
7935 end
7936
7937
7938 redef fun visit_all(v: Visitor)
7939 do
7940 if _n_qualified != null then
7941 v.enter_visit(_n_qualified.as(not null))
7942 end
7943 v.enter_visit(_n_kwsuper)
7944 v.enter_visit(_n_args)
7945 end
7946 end
7947 redef class AInitExpr
7948 private init empty_init do end
7949
7950 init init_ainitexpr (
7951 n_expr: nullable AExpr,
7952 n_kwinit: nullable TKwinit,
7953 n_args: nullable AExprs
7954 )
7955 do
7956 empty_init
7957 _n_expr = n_expr.as(not null)
7958 n_expr.parent = self
7959 _n_kwinit = n_kwinit.as(not null)
7960 n_kwinit.parent = self
7961 _n_args = n_args.as(not null)
7962 n_args.parent = self
7963 end
7964
7965 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7966 do
7967 if _n_expr == old_child then
7968 if new_child != null then
7969 new_child.parent = self
7970 assert new_child isa AExpr
7971 _n_expr = new_child
7972 else
7973 abort
7974 end
7975 return
7976 end
7977 if _n_kwinit == old_child then
7978 if new_child != null then
7979 new_child.parent = self
7980 assert new_child isa TKwinit
7981 _n_kwinit = new_child
7982 else
7983 abort
7984 end
7985 return
7986 end
7987 if _n_args == old_child then
7988 if new_child != null then
7989 new_child.parent = self
7990 assert new_child isa AExprs
7991 _n_args = new_child
7992 else
7993 abort
7994 end
7995 return
7996 end
7997 end
7998
7999 redef fun n_expr=(node)
8000 do
8001 _n_expr = node
8002 node.parent = self
8003 end
8004 redef fun n_kwinit=(node)
8005 do
8006 _n_kwinit = node
8007 node.parent = self
8008 end
8009 redef fun n_args=(node)
8010 do
8011 _n_args = node
8012 node.parent = self
8013 end
8014
8015
8016 redef fun visit_all(v: Visitor)
8017 do
8018 v.enter_visit(_n_expr)
8019 v.enter_visit(_n_kwinit)
8020 v.enter_visit(_n_args)
8021 end
8022 end
8023 redef class ABraExpr
8024 private init empty_init do end
8025
8026 init init_abraexpr (
8027 n_expr: nullable AExpr,
8028 n_args: nullable AExprs,
8029 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
8030 )
8031 do
8032 empty_init
8033 _n_expr = n_expr.as(not null)
8034 n_expr.parent = self
8035 _n_args = n_args.as(not null)
8036 n_args.parent = self
8037 for n in n_closure_defs do
8038 assert n isa AClosureDef
8039 _n_closure_defs.add(n)
8040 n.parent = self
8041 end
8042 end
8043
8044 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8045 do
8046 if _n_expr == old_child then
8047 if new_child != null then
8048 new_child.parent = self
8049 assert new_child isa AExpr
8050 _n_expr = new_child
8051 else
8052 abort
8053 end
8054 return
8055 end
8056 if _n_args == old_child then
8057 if new_child != null then
8058 new_child.parent = self
8059 assert new_child isa AExprs
8060 _n_args = new_child
8061 else
8062 abort
8063 end
8064 return
8065 end
8066 for i in [0.._n_closure_defs.length[ do
8067 if _n_closure_defs[i] == old_child then
8068 if new_child != null then
8069 assert new_child isa AClosureDef
8070 _n_closure_defs[i] = new_child
8071 new_child.parent = self
8072 else
8073 _n_closure_defs.remove_at(i)
8074 end
8075 return
8076 end
8077 end
8078 end
8079
8080 redef fun n_expr=(node)
8081 do
8082 _n_expr = node
8083 node.parent = self
8084 end
8085 redef fun n_args=(node)
8086 do
8087 _n_args = node
8088 node.parent = self
8089 end
8090
8091
8092 redef fun visit_all(v: Visitor)
8093 do
8094 v.enter_visit(_n_expr)
8095 v.enter_visit(_n_args)
8096 for n in _n_closure_defs do
8097 v.enter_visit(n)
8098 end
8099 end
8100 end
8101 redef class ABraAssignExpr
8102 private init empty_init do end
8103
8104 init init_abraassignexpr (
8105 n_expr: nullable AExpr,
8106 n_args: nullable AExprs,
8107 n_assign: nullable TAssign,
8108 n_value: nullable AExpr
8109 )
8110 do
8111 empty_init
8112 _n_expr = n_expr.as(not null)
8113 n_expr.parent = self
8114 _n_args = n_args.as(not null)
8115 n_args.parent = self
8116 _n_assign = n_assign.as(not null)
8117 n_assign.parent = self
8118 _n_value = n_value.as(not null)
8119 n_value.parent = self
8120 end
8121
8122 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8123 do
8124 if _n_expr == old_child then
8125 if new_child != null then
8126 new_child.parent = self
8127 assert new_child isa AExpr
8128 _n_expr = new_child
8129 else
8130 abort
8131 end
8132 return
8133 end
8134 if _n_args == old_child then
8135 if new_child != null then
8136 new_child.parent = self
8137 assert new_child isa AExprs
8138 _n_args = new_child
8139 else
8140 abort
8141 end
8142 return
8143 end
8144 if _n_assign == old_child then
8145 if new_child != null then
8146 new_child.parent = self
8147 assert new_child isa TAssign
8148 _n_assign = new_child
8149 else
8150 abort
8151 end
8152 return
8153 end
8154 if _n_value == old_child then
8155 if new_child != null then
8156 new_child.parent = self
8157 assert new_child isa AExpr
8158 _n_value = new_child
8159 else
8160 abort
8161 end
8162 return
8163 end
8164 end
8165
8166 redef fun n_expr=(node)
8167 do
8168 _n_expr = node
8169 node.parent = self
8170 end
8171 redef fun n_args=(node)
8172 do
8173 _n_args = node
8174 node.parent = self
8175 end
8176 redef fun n_assign=(node)
8177 do
8178 _n_assign = node
8179 node.parent = self
8180 end
8181 redef fun n_value=(node)
8182 do
8183 _n_value = node
8184 node.parent = self
8185 end
8186
8187
8188 redef fun visit_all(v: Visitor)
8189 do
8190 v.enter_visit(_n_expr)
8191 v.enter_visit(_n_args)
8192 v.enter_visit(_n_assign)
8193 v.enter_visit(_n_value)
8194 end
8195 end
8196 redef class ABraReassignExpr
8197 private init empty_init do end
8198
8199 init init_abrareassignexpr (
8200 n_expr: nullable AExpr,
8201 n_args: nullable AExprs,
8202 n_assign_op: nullable AAssignOp,
8203 n_value: nullable AExpr
8204 )
8205 do
8206 empty_init
8207 _n_expr = n_expr.as(not null)
8208 n_expr.parent = self
8209 _n_args = n_args.as(not null)
8210 n_args.parent = self
8211 _n_assign_op = n_assign_op.as(not null)
8212 n_assign_op.parent = self
8213 _n_value = n_value.as(not null)
8214 n_value.parent = self
8215 end
8216
8217 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8218 do
8219 if _n_expr == old_child then
8220 if new_child != null then
8221 new_child.parent = self
8222 assert new_child isa AExpr
8223 _n_expr = new_child
8224 else
8225 abort
8226 end
8227 return
8228 end
8229 if _n_args == old_child then
8230 if new_child != null then
8231 new_child.parent = self
8232 assert new_child isa AExprs
8233 _n_args = new_child
8234 else
8235 abort
8236 end
8237 return
8238 end
8239 if _n_assign_op == old_child then
8240 if new_child != null then
8241 new_child.parent = self
8242 assert new_child isa AAssignOp
8243 _n_assign_op = new_child
8244 else
8245 abort
8246 end
8247 return
8248 end
8249 if _n_value == old_child then
8250 if new_child != null then
8251 new_child.parent = self
8252 assert new_child isa AExpr
8253 _n_value = new_child
8254 else
8255 abort
8256 end
8257 return
8258 end
8259 end
8260
8261 redef fun n_expr=(node)
8262 do
8263 _n_expr = node
8264 node.parent = self
8265 end
8266 redef fun n_args=(node)
8267 do
8268 _n_args = node
8269 node.parent = self
8270 end
8271 redef fun n_assign_op=(node)
8272 do
8273 _n_assign_op = node
8274 node.parent = self
8275 end
8276 redef fun n_value=(node)
8277 do
8278 _n_value = node
8279 node.parent = self
8280 end
8281
8282
8283 redef fun visit_all(v: Visitor)
8284 do
8285 v.enter_visit(_n_expr)
8286 v.enter_visit(_n_args)
8287 v.enter_visit(_n_assign_op)
8288 v.enter_visit(_n_value)
8289 end
8290 end
8291 redef class AClosureCallExpr
8292 private init empty_init do end
8293
8294 init init_aclosurecallexpr (
8295 n_id: nullable TId,
8296 n_args: nullable AExprs,
8297 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
8298 )
8299 do
8300 empty_init
8301 _n_id = n_id.as(not null)
8302 n_id.parent = self
8303 _n_args = n_args.as(not null)
8304 n_args.parent = self
8305 for n in n_closure_defs do
8306 assert n isa AClosureDef
8307 _n_closure_defs.add(n)
8308 n.parent = self
8309 end
8310 end
8311
8312 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8313 do
8314 if _n_id == old_child then
8315 if new_child != null then
8316 new_child.parent = self
8317 assert new_child isa TId
8318 _n_id = new_child
8319 else
8320 abort
8321 end
8322 return
8323 end
8324 if _n_args == old_child then
8325 if new_child != null then
8326 new_child.parent = self
8327 assert new_child isa AExprs
8328 _n_args = new_child
8329 else
8330 abort
8331 end
8332 return
8333 end
8334 for i in [0.._n_closure_defs.length[ do
8335 if _n_closure_defs[i] == old_child then
8336 if new_child != null then
8337 assert new_child isa AClosureDef
8338 _n_closure_defs[i] = new_child
8339 new_child.parent = self
8340 else
8341 _n_closure_defs.remove_at(i)
8342 end
8343 return
8344 end
8345 end
8346 end
8347
8348 redef fun n_id=(node)
8349 do
8350 _n_id = node
8351 node.parent = self
8352 end
8353 redef fun n_args=(node)
8354 do
8355 _n_args = node
8356 node.parent = self
8357 end
8358
8359
8360 redef fun visit_all(v: Visitor)
8361 do
8362 v.enter_visit(_n_id)
8363 v.enter_visit(_n_args)
8364 for n in _n_closure_defs do
8365 v.enter_visit(n)
8366 end
8367 end
8368 end
8369 redef class AVarExpr
8370 private init empty_init do end
8371
8372 init init_avarexpr (
8373 n_id: nullable TId
8374 )
8375 do
8376 empty_init
8377 _n_id = n_id.as(not null)
8378 n_id.parent = self
8379 end
8380
8381 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8382 do
8383 if _n_id == old_child then
8384 if new_child != null then
8385 new_child.parent = self
8386 assert new_child isa TId
8387 _n_id = new_child
8388 else
8389 abort
8390 end
8391 return
8392 end
8393 end
8394
8395 redef fun n_id=(node)
8396 do
8397 _n_id = node
8398 node.parent = self
8399 end
8400
8401
8402 redef fun visit_all(v: Visitor)
8403 do
8404 v.enter_visit(_n_id)
8405 end
8406 end
8407 redef class AVarAssignExpr
8408 private init empty_init do end
8409
8410 init init_avarassignexpr (
8411 n_id: nullable TId,
8412 n_assign: nullable TAssign,
8413 n_value: nullable AExpr
8414 )
8415 do
8416 empty_init
8417 _n_id = n_id.as(not null)
8418 n_id.parent = self
8419 _n_assign = n_assign.as(not null)
8420 n_assign.parent = self
8421 _n_value = n_value.as(not null)
8422 n_value.parent = self
8423 end
8424
8425 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8426 do
8427 if _n_id == old_child then
8428 if new_child != null then
8429 new_child.parent = self
8430 assert new_child isa TId
8431 _n_id = new_child
8432 else
8433 abort
8434 end
8435 return
8436 end
8437 if _n_assign == old_child then
8438 if new_child != null then
8439 new_child.parent = self
8440 assert new_child isa TAssign
8441 _n_assign = new_child
8442 else
8443 abort
8444 end
8445 return
8446 end
8447 if _n_value == old_child then
8448 if new_child != null then
8449 new_child.parent = self
8450 assert new_child isa AExpr
8451 _n_value = new_child
8452 else
8453 abort
8454 end
8455 return
8456 end
8457 end
8458
8459 redef fun n_id=(node)
8460 do
8461 _n_id = node
8462 node.parent = self
8463 end
8464 redef fun n_assign=(node)
8465 do
8466 _n_assign = node
8467 node.parent = self
8468 end
8469 redef fun n_value=(node)
8470 do
8471 _n_value = node
8472 node.parent = self
8473 end
8474
8475
8476 redef fun visit_all(v: Visitor)
8477 do
8478 v.enter_visit(_n_id)
8479 v.enter_visit(_n_assign)
8480 v.enter_visit(_n_value)
8481 end
8482 end
8483 redef class AVarReassignExpr
8484 private init empty_init do end
8485
8486 init init_avarreassignexpr (
8487 n_id: nullable TId,
8488 n_assign_op: nullable AAssignOp,
8489 n_value: nullable AExpr
8490 )
8491 do
8492 empty_init
8493 _n_id = n_id.as(not null)
8494 n_id.parent = self
8495 _n_assign_op = n_assign_op.as(not null)
8496 n_assign_op.parent = self
8497 _n_value = n_value.as(not null)
8498 n_value.parent = self
8499 end
8500
8501 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8502 do
8503 if _n_id == old_child then
8504 if new_child != null then
8505 new_child.parent = self
8506 assert new_child isa TId
8507 _n_id = new_child
8508 else
8509 abort
8510 end
8511 return
8512 end
8513 if _n_assign_op == old_child then
8514 if new_child != null then
8515 new_child.parent = self
8516 assert new_child isa AAssignOp
8517 _n_assign_op = new_child
8518 else
8519 abort
8520 end
8521 return
8522 end
8523 if _n_value == old_child then
8524 if new_child != null then
8525 new_child.parent = self
8526 assert new_child isa AExpr
8527 _n_value = new_child
8528 else
8529 abort
8530 end
8531 return
8532 end
8533 end
8534
8535 redef fun n_id=(node)
8536 do
8537 _n_id = node
8538 node.parent = self
8539 end
8540 redef fun n_assign_op=(node)
8541 do
8542 _n_assign_op = node
8543 node.parent = self
8544 end
8545 redef fun n_value=(node)
8546 do
8547 _n_value = node
8548 node.parent = self
8549 end
8550
8551
8552 redef fun visit_all(v: Visitor)
8553 do
8554 v.enter_visit(_n_id)
8555 v.enter_visit(_n_assign_op)
8556 v.enter_visit(_n_value)
8557 end
8558 end
8559 redef class ARangeExpr
8560 private init empty_init do end
8561
8562 init init_arangeexpr (
8563 n_expr: nullable AExpr,
8564 n_expr2: nullable AExpr,
8565 n_annotations: nullable AAnnotations
8566 )
8567 do
8568 empty_init
8569 _n_expr = n_expr.as(not null)
8570 n_expr.parent = self
8571 _n_expr2 = n_expr2.as(not null)
8572 n_expr2.parent = self
8573 _n_annotations = n_annotations
8574 if n_annotations != null then
8575 n_annotations.parent = self
8576 end
8577 end
8578
8579 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8580 do
8581 if _n_expr == old_child then
8582 if new_child != null then
8583 new_child.parent = self
8584 assert new_child isa AExpr
8585 _n_expr = new_child
8586 else
8587 abort
8588 end
8589 return
8590 end
8591 if _n_expr2 == old_child then
8592 if new_child != null then
8593 new_child.parent = self
8594 assert new_child isa AExpr
8595 _n_expr2 = new_child
8596 else
8597 abort
8598 end
8599 return
8600 end
8601 if _n_annotations == old_child then
8602 if new_child != null then
8603 new_child.parent = self
8604 assert new_child isa AAnnotations
8605 _n_annotations = new_child
8606 else
8607 _n_annotations = null
8608 end
8609 return
8610 end
8611 end
8612
8613 redef fun n_expr=(node)
8614 do
8615 _n_expr = node
8616 node.parent = self
8617 end
8618 redef fun n_expr2=(node)
8619 do
8620 _n_expr2 = node
8621 node.parent = self
8622 end
8623 redef fun n_annotations=(node)
8624 do
8625 _n_annotations = node
8626 if node != null then
8627 node.parent = self
8628 end
8629 end
8630
8631
8632 redef fun visit_all(v: Visitor)
8633 do
8634 v.enter_visit(_n_expr)
8635 v.enter_visit(_n_expr2)
8636 if _n_annotations != null then
8637 v.enter_visit(_n_annotations.as(not null))
8638 end
8639 end
8640 end
8641 redef class ACrangeExpr
8642 private init empty_init do end
8643
8644 init init_acrangeexpr (
8645 n_obra: nullable TObra,
8646 n_expr: nullable AExpr,
8647 n_expr2: nullable AExpr,
8648 n_cbra: nullable TCbra,
8649 n_annotations: nullable AAnnotations
8650 )
8651 do
8652 empty_init
8653 _n_obra = n_obra.as(not null)
8654 n_obra.parent = self
8655 _n_expr = n_expr.as(not null)
8656 n_expr.parent = self
8657 _n_expr2 = n_expr2.as(not null)
8658 n_expr2.parent = self
8659 _n_cbra = n_cbra.as(not null)
8660 n_cbra.parent = self
8661 _n_annotations = n_annotations
8662 if n_annotations != null then
8663 n_annotations.parent = self
8664 end
8665 end
8666
8667 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8668 do
8669 if _n_obra == old_child then
8670 if new_child != null then
8671 new_child.parent = self
8672 assert new_child isa TObra
8673 _n_obra = new_child
8674 else
8675 abort
8676 end
8677 return
8678 end
8679 if _n_expr == old_child then
8680 if new_child != null then
8681 new_child.parent = self
8682 assert new_child isa AExpr
8683 _n_expr = new_child
8684 else
8685 abort
8686 end
8687 return
8688 end
8689 if _n_expr2 == old_child then
8690 if new_child != null then
8691 new_child.parent = self
8692 assert new_child isa AExpr
8693 _n_expr2 = new_child
8694 else
8695 abort
8696 end
8697 return
8698 end
8699 if _n_cbra == old_child then
8700 if new_child != null then
8701 new_child.parent = self
8702 assert new_child isa TCbra
8703 _n_cbra = new_child
8704 else
8705 abort
8706 end
8707 return
8708 end
8709 if _n_annotations == old_child then
8710 if new_child != null then
8711 new_child.parent = self
8712 assert new_child isa AAnnotations
8713 _n_annotations = new_child
8714 else
8715 _n_annotations = null
8716 end
8717 return
8718 end
8719 end
8720
8721 redef fun n_obra=(node)
8722 do
8723 _n_obra = node
8724 node.parent = self
8725 end
8726 redef fun n_expr=(node)
8727 do
8728 _n_expr = node
8729 node.parent = self
8730 end
8731 redef fun n_expr2=(node)
8732 do
8733 _n_expr2 = node
8734 node.parent = self
8735 end
8736 redef fun n_cbra=(node)
8737 do
8738 _n_cbra = node
8739 node.parent = self
8740 end
8741 redef fun n_annotations=(node)
8742 do
8743 _n_annotations = node
8744 if node != null then
8745 node.parent = self
8746 end
8747 end
8748
8749
8750 redef fun visit_all(v: Visitor)
8751 do
8752 v.enter_visit(_n_obra)
8753 v.enter_visit(_n_expr)
8754 v.enter_visit(_n_expr2)
8755 v.enter_visit(_n_cbra)
8756 if _n_annotations != null then
8757 v.enter_visit(_n_annotations.as(not null))
8758 end
8759 end
8760 end
8761 redef class AOrangeExpr
8762 private init empty_init do end
8763
8764 init init_aorangeexpr (
8765 n_obra: nullable TObra,
8766 n_expr: nullable AExpr,
8767 n_expr2: nullable AExpr,
8768 n_cbra: nullable TObra,
8769 n_annotations: nullable AAnnotations
8770 )
8771 do
8772 empty_init
8773 _n_obra = n_obra.as(not null)
8774 n_obra.parent = self
8775 _n_expr = n_expr.as(not null)
8776 n_expr.parent = self
8777 _n_expr2 = n_expr2.as(not null)
8778 n_expr2.parent = self
8779 _n_cbra = n_cbra.as(not null)
8780 n_cbra.parent = self
8781 _n_annotations = n_annotations
8782 if n_annotations != null then
8783 n_annotations.parent = self
8784 end
8785 end
8786
8787 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8788 do
8789 if _n_obra == old_child then
8790 if new_child != null then
8791 new_child.parent = self
8792 assert new_child isa TObra
8793 _n_obra = new_child
8794 else
8795 abort
8796 end
8797 return
8798 end
8799 if _n_expr == old_child then
8800 if new_child != null then
8801 new_child.parent = self
8802 assert new_child isa AExpr
8803 _n_expr = new_child
8804 else
8805 abort
8806 end
8807 return
8808 end
8809 if _n_expr2 == old_child then
8810 if new_child != null then
8811 new_child.parent = self
8812 assert new_child isa AExpr
8813 _n_expr2 = new_child
8814 else
8815 abort
8816 end
8817 return
8818 end
8819 if _n_cbra == old_child then
8820 if new_child != null then
8821 new_child.parent = self
8822 assert new_child isa TObra
8823 _n_cbra = new_child
8824 else
8825 abort
8826 end
8827 return
8828 end
8829 if _n_annotations == old_child then
8830 if new_child != null then
8831 new_child.parent = self
8832 assert new_child isa AAnnotations
8833 _n_annotations = new_child
8834 else
8835 _n_annotations = null
8836 end
8837 return
8838 end
8839 end
8840
8841 redef fun n_obra=(node)
8842 do
8843 _n_obra = node
8844 node.parent = self
8845 end
8846 redef fun n_expr=(node)
8847 do
8848 _n_expr = node
8849 node.parent = self
8850 end
8851 redef fun n_expr2=(node)
8852 do
8853 _n_expr2 = node
8854 node.parent = self
8855 end
8856 redef fun n_cbra=(node)
8857 do
8858 _n_cbra = node
8859 node.parent = self
8860 end
8861 redef fun n_annotations=(node)
8862 do
8863 _n_annotations = node
8864 if node != null then
8865 node.parent = self
8866 end
8867 end
8868
8869
8870 redef fun visit_all(v: Visitor)
8871 do
8872 v.enter_visit(_n_obra)
8873 v.enter_visit(_n_expr)
8874 v.enter_visit(_n_expr2)
8875 v.enter_visit(_n_cbra)
8876 if _n_annotations != null then
8877 v.enter_visit(_n_annotations.as(not null))
8878 end
8879 end
8880 end
8881 redef class AArrayExpr
8882 private init empty_init do end
8883
8884 init init_aarrayexpr (
8885 n_exprs: nullable AExprs,
8886 n_annotations: nullable AAnnotations
8887 )
8888 do
8889 empty_init
8890 _n_exprs = n_exprs.as(not null)
8891 n_exprs.parent = self
8892 _n_annotations = n_annotations
8893 if n_annotations != null then
8894 n_annotations.parent = self
8895 end
8896 end
8897
8898 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8899 do
8900 if _n_exprs == old_child then
8901 if new_child != null then
8902 new_child.parent = self
8903 assert new_child isa AExprs
8904 _n_exprs = new_child
8905 else
8906 abort
8907 end
8908 return
8909 end
8910 if _n_annotations == old_child then
8911 if new_child != null then
8912 new_child.parent = self
8913 assert new_child isa AAnnotations
8914 _n_annotations = new_child
8915 else
8916 _n_annotations = null
8917 end
8918 return
8919 end
8920 end
8921
8922 redef fun n_exprs=(node)
8923 do
8924 _n_exprs = node
8925 node.parent = self
8926 end
8927 redef fun n_annotations=(node)
8928 do
8929 _n_annotations = node
8930 if node != null then
8931 node.parent = self
8932 end
8933 end
8934
8935
8936 redef fun visit_all(v: Visitor)
8937 do
8938 v.enter_visit(_n_exprs)
8939 if _n_annotations != null then
8940 v.enter_visit(_n_annotations.as(not null))
8941 end
8942 end
8943 end
8944 redef class ASelfExpr
8945 private init empty_init do end
8946
8947 init init_aselfexpr (
8948 n_kwself: nullable TKwself,
8949 n_annotations: nullable AAnnotations
8950 )
8951 do
8952 empty_init
8953 _n_kwself = n_kwself.as(not null)
8954 n_kwself.parent = self
8955 _n_annotations = n_annotations
8956 if n_annotations != null then
8957 n_annotations.parent = self
8958 end
8959 end
8960
8961 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8962 do
8963 if _n_kwself == old_child then
8964 if new_child != null then
8965 new_child.parent = self
8966 assert new_child isa TKwself
8967 _n_kwself = new_child
8968 else
8969 abort
8970 end
8971 return
8972 end
8973 if _n_annotations == old_child then
8974 if new_child != null then
8975 new_child.parent = self
8976 assert new_child isa AAnnotations
8977 _n_annotations = new_child
8978 else
8979 _n_annotations = null
8980 end
8981 return
8982 end
8983 end
8984
8985 redef fun n_kwself=(node)
8986 do
8987 _n_kwself = node
8988 node.parent = self
8989 end
8990 redef fun n_annotations=(node)
8991 do
8992 _n_annotations = node
8993 if node != null then
8994 node.parent = self
8995 end
8996 end
8997
8998
8999 redef fun visit_all(v: Visitor)
9000 do
9001 v.enter_visit(_n_kwself)
9002 if _n_annotations != null then
9003 v.enter_visit(_n_annotations.as(not null))
9004 end
9005 end
9006 end
9007 redef class AImplicitSelfExpr
9008 private init empty_init do end
9009
9010 init init_aimplicitselfexpr
9011 do
9012 empty_init
9013 end
9014
9015 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9016 do
9017 end
9018
9019
9020
9021 redef fun visit_all(v: Visitor)
9022 do
9023 end
9024 end
9025 redef class ATrueExpr
9026 private init empty_init do end
9027
9028 init init_atrueexpr (
9029 n_kwtrue: nullable TKwtrue,
9030 n_annotations: nullable AAnnotations
9031 )
9032 do
9033 empty_init
9034 _n_kwtrue = n_kwtrue.as(not null)
9035 n_kwtrue.parent = self
9036 _n_annotations = n_annotations
9037 if n_annotations != null then
9038 n_annotations.parent = self
9039 end
9040 end
9041
9042 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9043 do
9044 if _n_kwtrue == old_child then
9045 if new_child != null then
9046 new_child.parent = self
9047 assert new_child isa TKwtrue
9048 _n_kwtrue = new_child
9049 else
9050 abort
9051 end
9052 return
9053 end
9054 if _n_annotations == old_child then
9055 if new_child != null then
9056 new_child.parent = self
9057 assert new_child isa AAnnotations
9058 _n_annotations = new_child
9059 else
9060 _n_annotations = null
9061 end
9062 return
9063 end
9064 end
9065
9066 redef fun n_kwtrue=(node)
9067 do
9068 _n_kwtrue = node
9069 node.parent = self
9070 end
9071 redef fun n_annotations=(node)
9072 do
9073 _n_annotations = node
9074 if node != null then
9075 node.parent = self
9076 end
9077 end
9078
9079
9080 redef fun visit_all(v: Visitor)
9081 do
9082 v.enter_visit(_n_kwtrue)
9083 if _n_annotations != null then
9084 v.enter_visit(_n_annotations.as(not null))
9085 end
9086 end
9087 end
9088 redef class AFalseExpr
9089 private init empty_init do end
9090
9091 init init_afalseexpr (
9092 n_kwfalse: nullable TKwfalse,
9093 n_annotations: nullable AAnnotations
9094 )
9095 do
9096 empty_init
9097 _n_kwfalse = n_kwfalse.as(not null)
9098 n_kwfalse.parent = self
9099 _n_annotations = n_annotations
9100 if n_annotations != null then
9101 n_annotations.parent = self
9102 end
9103 end
9104
9105 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9106 do
9107 if _n_kwfalse == old_child then
9108 if new_child != null then
9109 new_child.parent = self
9110 assert new_child isa TKwfalse
9111 _n_kwfalse = new_child
9112 else
9113 abort
9114 end
9115 return
9116 end
9117 if _n_annotations == old_child then
9118 if new_child != null then
9119 new_child.parent = self
9120 assert new_child isa AAnnotations
9121 _n_annotations = new_child
9122 else
9123 _n_annotations = null
9124 end
9125 return
9126 end
9127 end
9128
9129 redef fun n_kwfalse=(node)
9130 do
9131 _n_kwfalse = node
9132 node.parent = self
9133 end
9134 redef fun n_annotations=(node)
9135 do
9136 _n_annotations = node
9137 if node != null then
9138 node.parent = self
9139 end
9140 end
9141
9142
9143 redef fun visit_all(v: Visitor)
9144 do
9145 v.enter_visit(_n_kwfalse)
9146 if _n_annotations != null then
9147 v.enter_visit(_n_annotations.as(not null))
9148 end
9149 end
9150 end
9151 redef class ANullExpr
9152 private init empty_init do end
9153
9154 init init_anullexpr (
9155 n_kwnull: nullable TKwnull,
9156 n_annotations: nullable AAnnotations
9157 )
9158 do
9159 empty_init
9160 _n_kwnull = n_kwnull.as(not null)
9161 n_kwnull.parent = self
9162 _n_annotations = n_annotations
9163 if n_annotations != null then
9164 n_annotations.parent = self
9165 end
9166 end
9167
9168 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9169 do
9170 if _n_kwnull == old_child then
9171 if new_child != null then
9172 new_child.parent = self
9173 assert new_child isa TKwnull
9174 _n_kwnull = new_child
9175 else
9176 abort
9177 end
9178 return
9179 end
9180 if _n_annotations == old_child then
9181 if new_child != null then
9182 new_child.parent = self
9183 assert new_child isa AAnnotations
9184 _n_annotations = new_child
9185 else
9186 _n_annotations = null
9187 end
9188 return
9189 end
9190 end
9191
9192 redef fun n_kwnull=(node)
9193 do
9194 _n_kwnull = node
9195 node.parent = self
9196 end
9197 redef fun n_annotations=(node)
9198 do
9199 _n_annotations = node
9200 if node != null then
9201 node.parent = self
9202 end
9203 end
9204
9205
9206 redef fun visit_all(v: Visitor)
9207 do
9208 v.enter_visit(_n_kwnull)
9209 if _n_annotations != null then
9210 v.enter_visit(_n_annotations.as(not null))
9211 end
9212 end
9213 end
9214 redef class AIntExpr
9215 private init empty_init do end
9216
9217 init init_aintexpr (
9218 n_number: nullable TNumber,
9219 n_annotations: nullable AAnnotations
9220 )
9221 do
9222 empty_init
9223 _n_number = n_number.as(not null)
9224 n_number.parent = self
9225 _n_annotations = n_annotations
9226 if n_annotations != null then
9227 n_annotations.parent = self
9228 end
9229 end
9230
9231 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9232 do
9233 if _n_number == old_child then
9234 if new_child != null then
9235 new_child.parent = self
9236 assert new_child isa TNumber
9237 _n_number = new_child
9238 else
9239 abort
9240 end
9241 return
9242 end
9243 if _n_annotations == old_child then
9244 if new_child != null then
9245 new_child.parent = self
9246 assert new_child isa AAnnotations
9247 _n_annotations = new_child
9248 else
9249 _n_annotations = null
9250 end
9251 return
9252 end
9253 end
9254
9255 redef fun n_number=(node)
9256 do
9257 _n_number = node
9258 node.parent = self
9259 end
9260 redef fun n_annotations=(node)
9261 do
9262 _n_annotations = node
9263 if node != null then
9264 node.parent = self
9265 end
9266 end
9267
9268
9269 redef fun visit_all(v: Visitor)
9270 do
9271 v.enter_visit(_n_number)
9272 if _n_annotations != null then
9273 v.enter_visit(_n_annotations.as(not null))
9274 end
9275 end
9276 end
9277 redef class AFloatExpr
9278 private init empty_init do end
9279
9280 init init_afloatexpr (
9281 n_float: nullable TFloat,
9282 n_annotations: nullable AAnnotations
9283 )
9284 do
9285 empty_init
9286 _n_float = n_float.as(not null)
9287 n_float.parent = self
9288 _n_annotations = n_annotations
9289 if n_annotations != null then
9290 n_annotations.parent = self
9291 end
9292 end
9293
9294 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9295 do
9296 if _n_float == old_child then
9297 if new_child != null then
9298 new_child.parent = self
9299 assert new_child isa TFloat
9300 _n_float = new_child
9301 else
9302 abort
9303 end
9304 return
9305 end
9306 if _n_annotations == old_child then
9307 if new_child != null then
9308 new_child.parent = self
9309 assert new_child isa AAnnotations
9310 _n_annotations = new_child
9311 else
9312 _n_annotations = null
9313 end
9314 return
9315 end
9316 end
9317
9318 redef fun n_float=(node)
9319 do
9320 _n_float = node
9321 node.parent = self
9322 end
9323 redef fun n_annotations=(node)
9324 do
9325 _n_annotations = node
9326 if node != null then
9327 node.parent = self
9328 end
9329 end
9330
9331
9332 redef fun visit_all(v: Visitor)
9333 do
9334 v.enter_visit(_n_float)
9335 if _n_annotations != null then
9336 v.enter_visit(_n_annotations.as(not null))
9337 end
9338 end
9339 end
9340 redef class ACharExpr
9341 private init empty_init do end
9342
9343 init init_acharexpr (
9344 n_char: nullable TChar,
9345 n_annotations: nullable AAnnotations
9346 )
9347 do
9348 empty_init
9349 _n_char = n_char.as(not null)
9350 n_char.parent = self
9351 _n_annotations = n_annotations
9352 if n_annotations != null then
9353 n_annotations.parent = self
9354 end
9355 end
9356
9357 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9358 do
9359 if _n_char == old_child then
9360 if new_child != null then
9361 new_child.parent = self
9362 assert new_child isa TChar
9363 _n_char = new_child
9364 else
9365 abort
9366 end
9367 return
9368 end
9369 if _n_annotations == old_child then
9370 if new_child != null then
9371 new_child.parent = self
9372 assert new_child isa AAnnotations
9373 _n_annotations = new_child
9374 else
9375 _n_annotations = null
9376 end
9377 return
9378 end
9379 end
9380
9381 redef fun n_char=(node)
9382 do
9383 _n_char = node
9384 node.parent = self
9385 end
9386 redef fun n_annotations=(node)
9387 do
9388 _n_annotations = node
9389 if node != null then
9390 node.parent = self
9391 end
9392 end
9393
9394
9395 redef fun visit_all(v: Visitor)
9396 do
9397 v.enter_visit(_n_char)
9398 if _n_annotations != null then
9399 v.enter_visit(_n_annotations.as(not null))
9400 end
9401 end
9402 end
9403 redef class AStringExpr
9404 private init empty_init do end
9405
9406 init init_astringexpr (
9407 n_string: nullable TString,
9408 n_annotations: nullable AAnnotations
9409 )
9410 do
9411 empty_init
9412 _n_string = n_string.as(not null)
9413 n_string.parent = self
9414 _n_annotations = n_annotations
9415 if n_annotations != null then
9416 n_annotations.parent = self
9417 end
9418 end
9419
9420 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9421 do
9422 if _n_string == old_child then
9423 if new_child != null then
9424 new_child.parent = self
9425 assert new_child isa TString
9426 _n_string = new_child
9427 else
9428 abort
9429 end
9430 return
9431 end
9432 if _n_annotations == old_child then
9433 if new_child != null then
9434 new_child.parent = self
9435 assert new_child isa AAnnotations
9436 _n_annotations = new_child
9437 else
9438 _n_annotations = null
9439 end
9440 return
9441 end
9442 end
9443
9444 redef fun n_string=(node)
9445 do
9446 _n_string = node
9447 node.parent = self
9448 end
9449 redef fun n_annotations=(node)
9450 do
9451 _n_annotations = node
9452 if node != null then
9453 node.parent = self
9454 end
9455 end
9456
9457
9458 redef fun visit_all(v: Visitor)
9459 do
9460 v.enter_visit(_n_string)
9461 if _n_annotations != null then
9462 v.enter_visit(_n_annotations.as(not null))
9463 end
9464 end
9465 end
9466 redef class AStartStringExpr
9467 private init empty_init do end
9468
9469 init init_astartstringexpr (
9470 n_string: nullable TStartString
9471 )
9472 do
9473 empty_init
9474 _n_string = n_string.as(not null)
9475 n_string.parent = self
9476 end
9477
9478 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9479 do
9480 if _n_string == old_child then
9481 if new_child != null then
9482 new_child.parent = self
9483 assert new_child isa TStartString
9484 _n_string = new_child
9485 else
9486 abort
9487 end
9488 return
9489 end
9490 end
9491
9492 redef fun n_string=(node)
9493 do
9494 _n_string = node
9495 node.parent = self
9496 end
9497
9498
9499 redef fun visit_all(v: Visitor)
9500 do
9501 v.enter_visit(_n_string)
9502 end
9503 end
9504 redef class AMidStringExpr
9505 private init empty_init do end
9506
9507 init init_amidstringexpr (
9508 n_string: nullable TMidString
9509 )
9510 do
9511 empty_init
9512 _n_string = n_string.as(not null)
9513 n_string.parent = self
9514 end
9515
9516 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9517 do
9518 if _n_string == old_child then
9519 if new_child != null then
9520 new_child.parent = self
9521 assert new_child isa TMidString
9522 _n_string = new_child
9523 else
9524 abort
9525 end
9526 return
9527 end
9528 end
9529
9530 redef fun n_string=(node)
9531 do
9532 _n_string = node
9533 node.parent = self
9534 end
9535
9536
9537 redef fun visit_all(v: Visitor)
9538 do
9539 v.enter_visit(_n_string)
9540 end
9541 end
9542 redef class AEndStringExpr
9543 private init empty_init do end
9544
9545 init init_aendstringexpr (
9546 n_string: nullable TEndString
9547 )
9548 do
9549 empty_init
9550 _n_string = n_string.as(not null)
9551 n_string.parent = self
9552 end
9553
9554 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9555 do
9556 if _n_string == old_child then
9557 if new_child != null then
9558 new_child.parent = self
9559 assert new_child isa TEndString
9560 _n_string = new_child
9561 else
9562 abort
9563 end
9564 return
9565 end
9566 end
9567
9568 redef fun n_string=(node)
9569 do
9570 _n_string = node
9571 node.parent = self
9572 end
9573
9574
9575 redef fun visit_all(v: Visitor)
9576 do
9577 v.enter_visit(_n_string)
9578 end
9579 end
9580 redef class ASuperstringExpr
9581 private init empty_init do end
9582
9583 init init_asuperstringexpr (
9584 n_exprs: Collection[Object], # Should be Collection[AExpr]
9585 n_annotations: nullable AAnnotations
9586 )
9587 do
9588 empty_init
9589 for n in n_exprs do
9590 assert n isa AExpr
9591 _n_exprs.add(n)
9592 n.parent = self
9593 end
9594 _n_annotations = n_annotations
9595 if n_annotations != null then
9596 n_annotations.parent = self
9597 end
9598 end
9599
9600 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9601 do
9602 for i in [0.._n_exprs.length[ do
9603 if _n_exprs[i] == old_child then
9604 if new_child != null then
9605 assert new_child isa AExpr
9606 _n_exprs[i] = new_child
9607 new_child.parent = self
9608 else
9609 _n_exprs.remove_at(i)
9610 end
9611 return
9612 end
9613 end
9614 if _n_annotations == old_child then
9615 if new_child != null then
9616 new_child.parent = self
9617 assert new_child isa AAnnotations
9618 _n_annotations = new_child
9619 else
9620 _n_annotations = null
9621 end
9622 return
9623 end
9624 end
9625
9626 redef fun n_annotations=(node)
9627 do
9628 _n_annotations = node
9629 if node != null then
9630 node.parent = self
9631 end
9632 end
9633
9634
9635 redef fun visit_all(v: Visitor)
9636 do
9637 for n in _n_exprs do
9638 v.enter_visit(n)
9639 end
9640 if _n_annotations != null then
9641 v.enter_visit(_n_annotations.as(not null))
9642 end
9643 end
9644 end
9645 redef class AParExpr
9646 private init empty_init do end
9647
9648 init init_aparexpr (
9649 n_opar: nullable TOpar,
9650 n_expr: nullable AExpr,
9651 n_cpar: nullable TCpar,
9652 n_annotations: nullable AAnnotations
9653 )
9654 do
9655 empty_init
9656 _n_opar = n_opar.as(not null)
9657 n_opar.parent = self
9658 _n_expr = n_expr.as(not null)
9659 n_expr.parent = self
9660 _n_cpar = n_cpar.as(not null)
9661 n_cpar.parent = self
9662 _n_annotations = n_annotations
9663 if n_annotations != null then
9664 n_annotations.parent = self
9665 end
9666 end
9667
9668 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9669 do
9670 if _n_opar == old_child then
9671 if new_child != null then
9672 new_child.parent = self
9673 assert new_child isa TOpar
9674 _n_opar = new_child
9675 else
9676 abort
9677 end
9678 return
9679 end
9680 if _n_expr == old_child then
9681 if new_child != null then
9682 new_child.parent = self
9683 assert new_child isa AExpr
9684 _n_expr = new_child
9685 else
9686 abort
9687 end
9688 return
9689 end
9690 if _n_cpar == old_child then
9691 if new_child != null then
9692 new_child.parent = self
9693 assert new_child isa TCpar
9694 _n_cpar = new_child
9695 else
9696 abort
9697 end
9698 return
9699 end
9700 if _n_annotations == old_child then
9701 if new_child != null then
9702 new_child.parent = self
9703 assert new_child isa AAnnotations
9704 _n_annotations = new_child
9705 else
9706 _n_annotations = null
9707 end
9708 return
9709 end
9710 end
9711
9712 redef fun n_opar=(node)
9713 do
9714 _n_opar = node
9715 node.parent = self
9716 end
9717 redef fun n_expr=(node)
9718 do
9719 _n_expr = node
9720 node.parent = self
9721 end
9722 redef fun n_cpar=(node)
9723 do
9724 _n_cpar = node
9725 node.parent = self
9726 end
9727 redef fun n_annotations=(node)
9728 do
9729 _n_annotations = node
9730 if node != null then
9731 node.parent = self
9732 end
9733 end
9734
9735
9736 redef fun visit_all(v: Visitor)
9737 do
9738 v.enter_visit(_n_opar)
9739 v.enter_visit(_n_expr)
9740 v.enter_visit(_n_cpar)
9741 if _n_annotations != null then
9742 v.enter_visit(_n_annotations.as(not null))
9743 end
9744 end
9745 end
9746 redef class AAsCastExpr
9747 private init empty_init do end
9748
9749 init init_aascastexpr (
9750 n_expr: nullable AExpr,
9751 n_kwas: nullable TKwas,
9752 n_opar: nullable TOpar,
9753 n_type: nullable AType,
9754 n_cpar: nullable TCpar
9755 )
9756 do
9757 empty_init
9758 _n_expr = n_expr.as(not null)
9759 n_expr.parent = self
9760 _n_kwas = n_kwas.as(not null)
9761 n_kwas.parent = self
9762 _n_opar = n_opar.as(not null)
9763 n_opar.parent = self
9764 _n_type = n_type.as(not null)
9765 n_type.parent = self
9766 _n_cpar = n_cpar.as(not null)
9767 n_cpar.parent = self
9768 end
9769
9770 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9771 do
9772 if _n_expr == old_child then
9773 if new_child != null then
9774 new_child.parent = self
9775 assert new_child isa AExpr
9776 _n_expr = new_child
9777 else
9778 abort
9779 end
9780 return
9781 end
9782 if _n_kwas == old_child then
9783 if new_child != null then
9784 new_child.parent = self
9785 assert new_child isa TKwas
9786 _n_kwas = new_child
9787 else
9788 abort
9789 end
9790 return
9791 end
9792 if _n_opar == old_child then
9793 if new_child != null then
9794 new_child.parent = self
9795 assert new_child isa TOpar
9796 _n_opar = new_child
9797 else
9798 abort
9799 end
9800 return
9801 end
9802 if _n_type == old_child then
9803 if new_child != null then
9804 new_child.parent = self
9805 assert new_child isa AType
9806 _n_type = new_child
9807 else
9808 abort
9809 end
9810 return
9811 end
9812 if _n_cpar == old_child then
9813 if new_child != null then
9814 new_child.parent = self
9815 assert new_child isa TCpar
9816 _n_cpar = new_child
9817 else
9818 abort
9819 end
9820 return
9821 end
9822 end
9823
9824 redef fun n_expr=(node)
9825 do
9826 _n_expr = node
9827 node.parent = self
9828 end
9829 redef fun n_kwas=(node)
9830 do
9831 _n_kwas = node
9832 node.parent = self
9833 end
9834 redef fun n_opar=(node)
9835 do
9836 _n_opar = node
9837 node.parent = self
9838 end
9839 redef fun n_type=(node)
9840 do
9841 _n_type = node
9842 node.parent = self
9843 end
9844 redef fun n_cpar=(node)
9845 do
9846 _n_cpar = node
9847 node.parent = self
9848 end
9849
9850
9851 redef fun visit_all(v: Visitor)
9852 do
9853 v.enter_visit(_n_expr)
9854 v.enter_visit(_n_kwas)
9855 v.enter_visit(_n_opar)
9856 v.enter_visit(_n_type)
9857 v.enter_visit(_n_cpar)
9858 end
9859 end
9860 redef class AAsNotnullExpr
9861 private init empty_init do end
9862
9863 init init_aasnotnullexpr (
9864 n_expr: nullable AExpr,
9865 n_kwas: nullable TKwas,
9866 n_opar: nullable TOpar,
9867 n_kwnot: nullable TKwnot,
9868 n_kwnull: nullable TKwnull,
9869 n_cpar: nullable TCpar
9870 )
9871 do
9872 empty_init
9873 _n_expr = n_expr.as(not null)
9874 n_expr.parent = self
9875 _n_kwas = n_kwas.as(not null)
9876 n_kwas.parent = self
9877 _n_opar = n_opar.as(not null)
9878 n_opar.parent = self
9879 _n_kwnot = n_kwnot.as(not null)
9880 n_kwnot.parent = self
9881 _n_kwnull = n_kwnull.as(not null)
9882 n_kwnull.parent = self
9883 _n_cpar = n_cpar.as(not null)
9884 n_cpar.parent = self
9885 end
9886
9887 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
9888 do
9889 if _n_expr == old_child then
9890 if new_child != null then
9891 new_child.parent = self
9892 assert new_child isa AExpr
9893 _n_expr = new_child
9894 else
9895 abort
9896 end
9897 return
9898 end
9899 if _n_kwas == old_child then
9900 if new_child != null then
9901 new_child.parent = self
9902 assert new_child isa TKwas
9903 _n_kwas = new_child
9904 else
9905 abort
9906 end
9907 return
9908 end
9909 if _n_opar == old_child then
9910 if new_child != null then
9911 new_child.parent = self
9912 assert new_child isa TOpar
9913 _n_opar = new_child
9914 else
9915 abort
9916 end
9917 return
9918 end
9919 if _n_kwnot == old_child then
9920 if new_child != null then
9921 new_child.parent = self
9922 assert new_child isa TKwnot
9923 _n_kwnot = new_child
9924 else
9925 abort
9926 end
9927 return
9928 end
9929 if _n_kwnull == old_child then
9930 if new_child != null then
9931 new_child.parent = self
9932 assert new_child isa TKwnull
9933 _n_kwnull = new_child
9934 else
9935 abort
9936 end
9937 return
9938 end
9939 if _n_cpar == old_child then
9940 if new_child != null then
9941 new_child.parent = self
9942 assert new_child isa TCpar
9943 _n_cpar = new_child
9944 else
9945 abort
9946 end
9947 return
9948 end
9949 end
9950
9951 redef fun n_expr=(node)
9952 do
9953 _n_expr = node
9954 node.parent = self
9955 end
9956 redef fun n_kwas=(node)
9957 do
9958 _n_kwas = node
9959 node.parent = self
9960 end
9961 redef fun n_opar=(node)
9962 do
9963 _n_opar = node
9964 node.parent = self
9965 end
9966 redef fun n_kwnot=(node)
9967 do
9968 _n_kwnot = node
9969 node.parent = self
9970 end
9971 redef fun n_kwnull=(node)
9972 do
9973 _n_kwnull = node
9974 node.parent = self
9975 end
9976 redef fun n_cpar=(node)
9977 do
9978 _n_cpar = node
9979 node.parent = self
9980 end
9981
9982
9983 redef fun visit_all(v: Visitor)
9984 do
9985 v.enter_visit(_n_expr)
9986 v.enter_visit(_n_kwas)
9987 v.enter_visit(_n_opar)
9988 v.enter_visit(_n_kwnot)
9989 v.enter_visit(_n_kwnull)
9990 v.enter_visit(_n_cpar)
9991 end
9992 end
9993 redef class AIssetAttrExpr
9994 private init empty_init do end
9995
9996 init init_aissetattrexpr (
9997 n_kwisset: nullable TKwisset,
9998 n_expr: nullable AExpr,
9999 n_id: nullable TAttrid
10000 )
10001 do
10002 empty_init
10003 _n_kwisset = n_kwisset.as(not null)
10004 n_kwisset.parent = self
10005 _n_expr = n_expr.as(not null)
10006 n_expr.parent = self
10007 _n_id = n_id.as(not null)
10008 n_id.parent = self
10009 end
10010
10011 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10012 do
10013 if _n_kwisset == old_child then
10014 if new_child != null then
10015 new_child.parent = self
10016 assert new_child isa TKwisset
10017 _n_kwisset = new_child
10018 else
10019 abort
10020 end
10021 return
10022 end
10023 if _n_expr == old_child then
10024 if new_child != null then
10025 new_child.parent = self
10026 assert new_child isa AExpr
10027 _n_expr = new_child
10028 else
10029 abort
10030 end
10031 return
10032 end
10033 if _n_id == old_child then
10034 if new_child != null then
10035 new_child.parent = self
10036 assert new_child isa TAttrid
10037 _n_id = new_child
10038 else
10039 abort
10040 end
10041 return
10042 end
10043 end
10044
10045 redef fun n_kwisset=(node)
10046 do
10047 _n_kwisset = node
10048 node.parent = self
10049 end
10050 redef fun n_expr=(node)
10051 do
10052 _n_expr = node
10053 node.parent = self
10054 end
10055 redef fun n_id=(node)
10056 do
10057 _n_id = node
10058 node.parent = self
10059 end
10060
10061
10062 redef fun visit_all(v: Visitor)
10063 do
10064 v.enter_visit(_n_kwisset)
10065 v.enter_visit(_n_expr)
10066 v.enter_visit(_n_id)
10067 end
10068 end
10069 redef class ADebugTypeExpr
10070 private init empty_init do end
10071
10072 init init_adebugtypeexpr (
10073 n_kwdebug: nullable TKwdebug,
10074 n_kwtype: nullable TKwtype,
10075 n_expr: nullable AExpr,
10076 n_type: nullable AType
10077 )
10078 do
10079 empty_init
10080 _n_kwdebug = n_kwdebug.as(not null)
10081 n_kwdebug.parent = self
10082 _n_kwtype = n_kwtype.as(not null)
10083 n_kwtype.parent = self
10084 _n_expr = n_expr.as(not null)
10085 n_expr.parent = self
10086 _n_type = n_type.as(not null)
10087 n_type.parent = self
10088 end
10089
10090 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10091 do
10092 if _n_kwdebug == old_child then
10093 if new_child != null then
10094 new_child.parent = self
10095 assert new_child isa TKwdebug
10096 _n_kwdebug = new_child
10097 else
10098 abort
10099 end
10100 return
10101 end
10102 if _n_kwtype == old_child then
10103 if new_child != null then
10104 new_child.parent = self
10105 assert new_child isa TKwtype
10106 _n_kwtype = new_child
10107 else
10108 abort
10109 end
10110 return
10111 end
10112 if _n_expr == old_child then
10113 if new_child != null then
10114 new_child.parent = self
10115 assert new_child isa AExpr
10116 _n_expr = new_child
10117 else
10118 abort
10119 end
10120 return
10121 end
10122 if _n_type == old_child then
10123 if new_child != null then
10124 new_child.parent = self
10125 assert new_child isa AType
10126 _n_type = new_child
10127 else
10128 abort
10129 end
10130 return
10131 end
10132 end
10133
10134 redef fun n_kwdebug=(node)
10135 do
10136 _n_kwdebug = node
10137 node.parent = self
10138 end
10139 redef fun n_kwtype=(node)
10140 do
10141 _n_kwtype = node
10142 node.parent = self
10143 end
10144 redef fun n_expr=(node)
10145 do
10146 _n_expr = node
10147 node.parent = self
10148 end
10149 redef fun n_type=(node)
10150 do
10151 _n_type = node
10152 node.parent = self
10153 end
10154
10155
10156 redef fun visit_all(v: Visitor)
10157 do
10158 v.enter_visit(_n_kwdebug)
10159 v.enter_visit(_n_kwtype)
10160 v.enter_visit(_n_expr)
10161 v.enter_visit(_n_type)
10162 end
10163 end
10164 redef class AListExprs
10165 private init empty_init do end
10166
10167 init init_alistexprs (
10168 n_exprs: Collection[Object] # Should be Collection[AExpr]
10169 )
10170 do
10171 empty_init
10172 for n in n_exprs do
10173 assert n isa AExpr
10174 _n_exprs.add(n)
10175 n.parent = self
10176 end
10177 end
10178
10179 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10180 do
10181 for i in [0.._n_exprs.length[ do
10182 if _n_exprs[i] == old_child then
10183 if new_child != null then
10184 assert new_child isa AExpr
10185 _n_exprs[i] = new_child
10186 new_child.parent = self
10187 else
10188 _n_exprs.remove_at(i)
10189 end
10190 return
10191 end
10192 end
10193 end
10194
10195
10196
10197 redef fun visit_all(v: Visitor)
10198 do
10199 for n in _n_exprs do
10200 v.enter_visit(n)
10201 end
10202 end
10203 end
10204 redef class AParExprs
10205 private init empty_init do end
10206
10207 init init_aparexprs (
10208 n_opar: nullable TOpar,
10209 n_exprs: Collection[Object], # Should be Collection[AExpr]
10210 n_cpar: nullable TCpar
10211 )
10212 do
10213 empty_init
10214 _n_opar = n_opar.as(not null)
10215 n_opar.parent = self
10216 for n in n_exprs do
10217 assert n isa AExpr
10218 _n_exprs.add(n)
10219 n.parent = self
10220 end
10221 _n_cpar = n_cpar.as(not null)
10222 n_cpar.parent = self
10223 end
10224
10225 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10226 do
10227 if _n_opar == old_child then
10228 if new_child != null then
10229 new_child.parent = self
10230 assert new_child isa TOpar
10231 _n_opar = new_child
10232 else
10233 abort
10234 end
10235 return
10236 end
10237 for i in [0.._n_exprs.length[ do
10238 if _n_exprs[i] == old_child then
10239 if new_child != null then
10240 assert new_child isa AExpr
10241 _n_exprs[i] = new_child
10242 new_child.parent = self
10243 else
10244 _n_exprs.remove_at(i)
10245 end
10246 return
10247 end
10248 end
10249 if _n_cpar == old_child then
10250 if new_child != null then
10251 new_child.parent = self
10252 assert new_child isa TCpar
10253 _n_cpar = new_child
10254 else
10255 abort
10256 end
10257 return
10258 end
10259 end
10260
10261 redef fun n_opar=(node)
10262 do
10263 _n_opar = node
10264 node.parent = self
10265 end
10266 redef fun n_cpar=(node)
10267 do
10268 _n_cpar = node
10269 node.parent = self
10270 end
10271
10272
10273 redef fun visit_all(v: Visitor)
10274 do
10275 v.enter_visit(_n_opar)
10276 for n in _n_exprs do
10277 v.enter_visit(n)
10278 end
10279 v.enter_visit(_n_cpar)
10280 end
10281 end
10282 redef class ABraExprs
10283 private init empty_init do end
10284
10285 init init_abraexprs (
10286 n_obra: nullable TObra,
10287 n_exprs: Collection[Object], # Should be Collection[AExpr]
10288 n_cbra: nullable TCbra
10289 )
10290 do
10291 empty_init
10292 _n_obra = n_obra.as(not null)
10293 n_obra.parent = self
10294 for n in n_exprs do
10295 assert n isa AExpr
10296 _n_exprs.add(n)
10297 n.parent = self
10298 end
10299 _n_cbra = n_cbra.as(not null)
10300 n_cbra.parent = self
10301 end
10302
10303 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10304 do
10305 if _n_obra == old_child then
10306 if new_child != null then
10307 new_child.parent = self
10308 assert new_child isa TObra
10309 _n_obra = new_child
10310 else
10311 abort
10312 end
10313 return
10314 end
10315 for i in [0.._n_exprs.length[ do
10316 if _n_exprs[i] == old_child then
10317 if new_child != null then
10318 assert new_child isa AExpr
10319 _n_exprs[i] = new_child
10320 new_child.parent = self
10321 else
10322 _n_exprs.remove_at(i)
10323 end
10324 return
10325 end
10326 end
10327 if _n_cbra == old_child then
10328 if new_child != null then
10329 new_child.parent = self
10330 assert new_child isa TCbra
10331 _n_cbra = new_child
10332 else
10333 abort
10334 end
10335 return
10336 end
10337 end
10338
10339 redef fun n_obra=(node)
10340 do
10341 _n_obra = node
10342 node.parent = self
10343 end
10344 redef fun n_cbra=(node)
10345 do
10346 _n_cbra = node
10347 node.parent = self
10348 end
10349
10350
10351 redef fun visit_all(v: Visitor)
10352 do
10353 v.enter_visit(_n_obra)
10354 for n in _n_exprs do
10355 v.enter_visit(n)
10356 end
10357 v.enter_visit(_n_cbra)
10358 end
10359 end
10360 redef class APlusAssignOp
10361 private init empty_init do end
10362
10363 init init_aplusassignop (
10364 n_pluseq: nullable TPluseq
10365 )
10366 do
10367 empty_init
10368 _n_pluseq = n_pluseq.as(not null)
10369 n_pluseq.parent = self
10370 end
10371
10372 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10373 do
10374 if _n_pluseq == old_child then
10375 if new_child != null then
10376 new_child.parent = self
10377 assert new_child isa TPluseq
10378 _n_pluseq = new_child
10379 else
10380 abort
10381 end
10382 return
10383 end
10384 end
10385
10386 redef fun n_pluseq=(node)
10387 do
10388 _n_pluseq = node
10389 node.parent = self
10390 end
10391
10392
10393 redef fun visit_all(v: Visitor)
10394 do
10395 v.enter_visit(_n_pluseq)
10396 end
10397 end
10398 redef class AMinusAssignOp
10399 private init empty_init do end
10400
10401 init init_aminusassignop (
10402 n_minuseq: nullable TMinuseq
10403 )
10404 do
10405 empty_init
10406 _n_minuseq = n_minuseq.as(not null)
10407 n_minuseq.parent = self
10408 end
10409
10410 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10411 do
10412 if _n_minuseq == old_child then
10413 if new_child != null then
10414 new_child.parent = self
10415 assert new_child isa TMinuseq
10416 _n_minuseq = new_child
10417 else
10418 abort
10419 end
10420 return
10421 end
10422 end
10423
10424 redef fun n_minuseq=(node)
10425 do
10426 _n_minuseq = node
10427 node.parent = self
10428 end
10429
10430
10431 redef fun visit_all(v: Visitor)
10432 do
10433 v.enter_visit(_n_minuseq)
10434 end
10435 end
10436 redef class AClosureDef
10437 private init empty_init do end
10438
10439 init init_aclosuredef (
10440 n_bang: nullable TBang,
10441 n_id: nullable AClosureId,
10442 n_ids: Collection[Object], # Should be Collection[TId]
10443 n_kwdo: nullable TKwdo,
10444 n_expr: nullable AExpr,
10445 n_label: nullable ALabel
10446 )
10447 do
10448 empty_init
10449 _n_bang = n_bang.as(not null)
10450 n_bang.parent = self
10451 _n_id = n_id.as(not null)
10452 n_id.parent = self
10453 for n in n_ids do
10454 assert n isa TId
10455 _n_ids.add(n)
10456 n.parent = self
10457 end
10458 _n_kwdo = n_kwdo
10459 if n_kwdo != null then
10460 n_kwdo.parent = self
10461 end
10462 _n_expr = n_expr
10463 if n_expr != null then
10464 n_expr.parent = self
10465 end
10466 _n_label = n_label
10467 if n_label != null then
10468 n_label.parent = self
10469 end
10470 end
10471
10472 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10473 do
10474 if _n_bang == old_child then
10475 if new_child != null then
10476 new_child.parent = self
10477 assert new_child isa TBang
10478 _n_bang = new_child
10479 else
10480 abort
10481 end
10482 return
10483 end
10484 if _n_id == old_child then
10485 if new_child != null then
10486 new_child.parent = self
10487 assert new_child isa AClosureId
10488 _n_id = new_child
10489 else
10490 abort
10491 end
10492 return
10493 end
10494 for i in [0.._n_ids.length[ do
10495 if _n_ids[i] == old_child then
10496 if new_child != null then
10497 assert new_child isa TId
10498 _n_ids[i] = new_child
10499 new_child.parent = self
10500 else
10501 _n_ids.remove_at(i)
10502 end
10503 return
10504 end
10505 end
10506 if _n_kwdo == old_child then
10507 if new_child != null then
10508 new_child.parent = self
10509 assert new_child isa TKwdo
10510 _n_kwdo = new_child
10511 else
10512 _n_kwdo = null
10513 end
10514 return
10515 end
10516 if _n_expr == old_child then
10517 if new_child != null then
10518 new_child.parent = self
10519 assert new_child isa AExpr
10520 _n_expr = new_child
10521 else
10522 _n_expr = null
10523 end
10524 return
10525 end
10526 if _n_label == old_child then
10527 if new_child != null then
10528 new_child.parent = self
10529 assert new_child isa ALabel
10530 _n_label = new_child
10531 else
10532 _n_label = null
10533 end
10534 return
10535 end
10536 end
10537
10538 redef fun n_bang=(node)
10539 do
10540 _n_bang = node
10541 node.parent = self
10542 end
10543 redef fun n_id=(node)
10544 do
10545 _n_id = node
10546 node.parent = self
10547 end
10548 redef fun n_kwdo=(node)
10549 do
10550 _n_kwdo = node
10551 if node != null then
10552 node.parent = self
10553 end
10554 end
10555 redef fun n_expr=(node)
10556 do
10557 _n_expr = node
10558 if node != null then
10559 node.parent = self
10560 end
10561 end
10562 redef fun n_label=(node)
10563 do
10564 _n_label = node
10565 if node != null then
10566 node.parent = self
10567 end
10568 end
10569
10570
10571 redef fun visit_all(v: Visitor)
10572 do
10573 v.enter_visit(_n_bang)
10574 v.enter_visit(_n_id)
10575 for n in _n_ids do
10576 v.enter_visit(n)
10577 end
10578 if _n_kwdo != null then
10579 v.enter_visit(_n_kwdo.as(not null))
10580 end
10581 if _n_expr != null then
10582 v.enter_visit(_n_expr.as(not null))
10583 end
10584 if _n_label != null then
10585 v.enter_visit(_n_label.as(not null))
10586 end
10587 end
10588 end
10589 redef class ASimpleClosureId
10590 private init empty_init do end
10591
10592 init init_asimpleclosureid (
10593 n_id: nullable TId
10594 )
10595 do
10596 empty_init
10597 _n_id = n_id.as(not null)
10598 n_id.parent = self
10599 end
10600
10601 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10602 do
10603 if _n_id == old_child then
10604 if new_child != null then
10605 new_child.parent = self
10606 assert new_child isa TId
10607 _n_id = new_child
10608 else
10609 abort
10610 end
10611 return
10612 end
10613 end
10614
10615 redef fun n_id=(node)
10616 do
10617 _n_id = node
10618 node.parent = self
10619 end
10620
10621
10622 redef fun visit_all(v: Visitor)
10623 do
10624 v.enter_visit(_n_id)
10625 end
10626 end
10627 redef class ABreakClosureId
10628 private init empty_init do end
10629
10630 init init_abreakclosureid (
10631 n_kwbreak: nullable TKwbreak
10632 )
10633 do
10634 empty_init
10635 _n_kwbreak = n_kwbreak.as(not null)
10636 n_kwbreak.parent = self
10637 end
10638
10639 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10640 do
10641 if _n_kwbreak == old_child then
10642 if new_child != null then
10643 new_child.parent = self
10644 assert new_child isa TKwbreak
10645 _n_kwbreak = new_child
10646 else
10647 abort
10648 end
10649 return
10650 end
10651 end
10652
10653 redef fun n_kwbreak=(node)
10654 do
10655 _n_kwbreak = node
10656 node.parent = self
10657 end
10658
10659
10660 redef fun visit_all(v: Visitor)
10661 do
10662 v.enter_visit(_n_kwbreak)
10663 end
10664 end
10665 redef class AModuleName
10666 private init empty_init do end
10667
10668 init init_amodulename (
10669 n_quad: nullable TQuad,
10670 n_path: Collection[Object], # Should be Collection[TId]
10671 n_id: nullable TId
10672 )
10673 do
10674 empty_init
10675 _n_quad = n_quad
10676 if n_quad != null then
10677 n_quad.parent = self
10678 end
10679 for n in n_path do
10680 assert n isa TId
10681 _n_path.add(n)
10682 n.parent = self
10683 end
10684 _n_id = n_id.as(not null)
10685 n_id.parent = self
10686 end
10687
10688 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10689 do
10690 if _n_quad == old_child then
10691 if new_child != null then
10692 new_child.parent = self
10693 assert new_child isa TQuad
10694 _n_quad = new_child
10695 else
10696 _n_quad = null
10697 end
10698 return
10699 end
10700 for i in [0.._n_path.length[ do
10701 if _n_path[i] == old_child then
10702 if new_child != null then
10703 assert new_child isa TId
10704 _n_path[i] = new_child
10705 new_child.parent = self
10706 else
10707 _n_path.remove_at(i)
10708 end
10709 return
10710 end
10711 end
10712 if _n_id == old_child then
10713 if new_child != null then
10714 new_child.parent = self
10715 assert new_child isa TId
10716 _n_id = new_child
10717 else
10718 abort
10719 end
10720 return
10721 end
10722 end
10723
10724 redef fun n_quad=(node)
10725 do
10726 _n_quad = node
10727 if node != null then
10728 node.parent = self
10729 end
10730 end
10731 redef fun n_id=(node)
10732 do
10733 _n_id = node
10734 node.parent = self
10735 end
10736
10737
10738 redef fun visit_all(v: Visitor)
10739 do
10740 if _n_quad != null then
10741 v.enter_visit(_n_quad.as(not null))
10742 end
10743 for n in _n_path do
10744 v.enter_visit(n)
10745 end
10746 v.enter_visit(_n_id)
10747 end
10748 end
10749 redef class AExternCalls
10750 private init empty_init do end
10751
10752 init init_aexterncalls (
10753 n_kwimport: nullable TKwimport,
10754 n_extern_calls: Collection[Object] # Should be Collection[AExternCall]
10755 )
10756 do
10757 empty_init
10758 _n_kwimport = n_kwimport.as(not null)
10759 n_kwimport.parent = self
10760 for n in n_extern_calls do
10761 assert n isa AExternCall
10762 _n_extern_calls.add(n)
10763 n.parent = self
10764 end
10765 end
10766
10767 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10768 do
10769 if _n_kwimport == old_child then
10770 if new_child != null then
10771 new_child.parent = self
10772 assert new_child isa TKwimport
10773 _n_kwimport = new_child
10774 else
10775 abort
10776 end
10777 return
10778 end
10779 for i in [0.._n_extern_calls.length[ do
10780 if _n_extern_calls[i] == old_child then
10781 if new_child != null then
10782 assert new_child isa AExternCall
10783 _n_extern_calls[i] = new_child
10784 new_child.parent = self
10785 else
10786 _n_extern_calls.remove_at(i)
10787 end
10788 return
10789 end
10790 end
10791 end
10792
10793 redef fun n_kwimport=(node)
10794 do
10795 _n_kwimport = node
10796 node.parent = self
10797 end
10798
10799
10800 redef fun visit_all(v: Visitor)
10801 do
10802 v.enter_visit(_n_kwimport)
10803 for n in _n_extern_calls do
10804 v.enter_visit(n)
10805 end
10806 end
10807 end
10808 redef class AExternCall
10809 private init empty_init do end
10810
10811 init init_aexterncall
10812 do
10813 empty_init
10814 end
10815
10816 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10817 do
10818 end
10819
10820
10821
10822 redef fun visit_all(v: Visitor)
10823 do
10824 end
10825 end
10826 redef class ASuperExternCall
10827 private init empty_init do end
10828
10829 init init_asuperexterncall (
10830 n_kwsuper: nullable TKwsuper
10831 )
10832 do
10833 empty_init
10834 _n_kwsuper = n_kwsuper.as(not null)
10835 n_kwsuper.parent = self
10836 end
10837
10838 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10839 do
10840 if _n_kwsuper == old_child then
10841 if new_child != null then
10842 new_child.parent = self
10843 assert new_child isa TKwsuper
10844 _n_kwsuper = new_child
10845 else
10846 abort
10847 end
10848 return
10849 end
10850 end
10851
10852 redef fun n_kwsuper=(node)
10853 do
10854 _n_kwsuper = node
10855 node.parent = self
10856 end
10857
10858
10859 redef fun visit_all(v: Visitor)
10860 do
10861 v.enter_visit(_n_kwsuper)
10862 end
10863 end
10864 redef class ALocalPropExternCall
10865 private init empty_init do end
10866
10867 init init_alocalpropexterncall (
10868 n_methid: nullable AMethid
10869 )
10870 do
10871 empty_init
10872 _n_methid = n_methid.as(not null)
10873 n_methid.parent = self
10874 end
10875
10876 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10877 do
10878 if _n_methid == old_child then
10879 if new_child != null then
10880 new_child.parent = self
10881 assert new_child isa AMethid
10882 _n_methid = new_child
10883 else
10884 abort
10885 end
10886 return
10887 end
10888 end
10889
10890 redef fun n_methid=(node)
10891 do
10892 _n_methid = node
10893 node.parent = self
10894 end
10895
10896
10897 redef fun visit_all(v: Visitor)
10898 do
10899 v.enter_visit(_n_methid)
10900 end
10901 end
10902 redef class AFullPropExternCall
10903 private init empty_init do end
10904
10905 init init_afullpropexterncall (
10906 n_classid: nullable TClassid,
10907 n_quad: nullable TQuad,
10908 n_methid: nullable AMethid
10909 )
10910 do
10911 empty_init
10912 _n_classid = n_classid.as(not null)
10913 n_classid.parent = self
10914 _n_quad = n_quad
10915 if n_quad != null then
10916 n_quad.parent = self
10917 end
10918 _n_methid = n_methid.as(not null)
10919 n_methid.parent = self
10920 end
10921
10922 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10923 do
10924 if _n_classid == old_child then
10925 if new_child != null then
10926 new_child.parent = self
10927 assert new_child isa TClassid
10928 _n_classid = new_child
10929 else
10930 abort
10931 end
10932 return
10933 end
10934 if _n_quad == old_child then
10935 if new_child != null then
10936 new_child.parent = self
10937 assert new_child isa TQuad
10938 _n_quad = new_child
10939 else
10940 _n_quad = null
10941 end
10942 return
10943 end
10944 if _n_methid == old_child then
10945 if new_child != null then
10946 new_child.parent = self
10947 assert new_child isa AMethid
10948 _n_methid = new_child
10949 else
10950 abort
10951 end
10952 return
10953 end
10954 end
10955
10956 redef fun n_classid=(node)
10957 do
10958 _n_classid = node
10959 node.parent = self
10960 end
10961 redef fun n_quad=(node)
10962 do
10963 _n_quad = node
10964 if node != null then
10965 node.parent = self
10966 end
10967 end
10968 redef fun n_methid=(node)
10969 do
10970 _n_methid = node
10971 node.parent = self
10972 end
10973
10974
10975 redef fun visit_all(v: Visitor)
10976 do
10977 v.enter_visit(_n_classid)
10978 if _n_quad != null then
10979 v.enter_visit(_n_quad.as(not null))
10980 end
10981 v.enter_visit(_n_methid)
10982 end
10983 end
10984 redef class AInitPropExternCall
10985 private init empty_init do end
10986
10987 init init_ainitpropexterncall (
10988 n_classid: nullable TClassid
10989 )
10990 do
10991 empty_init
10992 _n_classid = n_classid.as(not null)
10993 n_classid.parent = self
10994 end
10995
10996 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
10997 do
10998 if _n_classid == old_child then
10999 if new_child != null then
11000 new_child.parent = self
11001 assert new_child isa TClassid
11002 _n_classid = new_child
11003 else
11004 abort
11005 end
11006 return
11007 end
11008 end
11009
11010 redef fun n_classid=(node)
11011 do
11012 _n_classid = node
11013 node.parent = self
11014 end
11015
11016
11017 redef fun visit_all(v: Visitor)
11018 do
11019 v.enter_visit(_n_classid)
11020 end
11021 end
11022 redef class ACastAsExternCall
11023 private init empty_init do end
11024
11025 init init_acastasexterncall (
11026 n_from_type: nullable AType,
11027 n_kwas: nullable TKwas,
11028 n_to_type: nullable AType
11029 )
11030 do
11031 empty_init
11032 _n_from_type = n_from_type.as(not null)
11033 n_from_type.parent = self
11034 _n_kwas = n_kwas.as(not null)
11035 n_kwas.parent = self
11036 _n_to_type = n_to_type.as(not null)
11037 n_to_type.parent = self
11038 end
11039
11040 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11041 do
11042 if _n_from_type == old_child then
11043 if new_child != null then
11044 new_child.parent = self
11045 assert new_child isa AType
11046 _n_from_type = new_child
11047 else
11048 abort
11049 end
11050 return
11051 end
11052 if _n_kwas == old_child then
11053 if new_child != null then
11054 new_child.parent = self
11055 assert new_child isa TKwas
11056 _n_kwas = new_child
11057 else
11058 abort
11059 end
11060 return
11061 end
11062 if _n_to_type == old_child then
11063 if new_child != null then
11064 new_child.parent = self
11065 assert new_child isa AType
11066 _n_to_type = new_child
11067 else
11068 abort
11069 end
11070 return
11071 end
11072 end
11073
11074 redef fun n_from_type=(node)
11075 do
11076 _n_from_type = node
11077 node.parent = self
11078 end
11079 redef fun n_kwas=(node)
11080 do
11081 _n_kwas = node
11082 node.parent = self
11083 end
11084 redef fun n_to_type=(node)
11085 do
11086 _n_to_type = node
11087 node.parent = self
11088 end
11089
11090
11091 redef fun visit_all(v: Visitor)
11092 do
11093 v.enter_visit(_n_from_type)
11094 v.enter_visit(_n_kwas)
11095 v.enter_visit(_n_to_type)
11096 end
11097 end
11098 redef class AAsNullableExternCall
11099 private init empty_init do end
11100
11101 init init_aasnullableexterncall (
11102 n_type: nullable AType,
11103 n_kwas: nullable TKwas,
11104 n_kwnullable: nullable TKwnullable
11105 )
11106 do
11107 empty_init
11108 _n_type = n_type.as(not null)
11109 n_type.parent = self
11110 _n_kwas = n_kwas.as(not null)
11111 n_kwas.parent = self
11112 _n_kwnullable = n_kwnullable.as(not null)
11113 n_kwnullable.parent = self
11114 end
11115
11116 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11117 do
11118 if _n_type == old_child then
11119 if new_child != null then
11120 new_child.parent = self
11121 assert new_child isa AType
11122 _n_type = new_child
11123 else
11124 abort
11125 end
11126 return
11127 end
11128 if _n_kwas == old_child then
11129 if new_child != null then
11130 new_child.parent = self
11131 assert new_child isa TKwas
11132 _n_kwas = new_child
11133 else
11134 abort
11135 end
11136 return
11137 end
11138 if _n_kwnullable == old_child then
11139 if new_child != null then
11140 new_child.parent = self
11141 assert new_child isa TKwnullable
11142 _n_kwnullable = new_child
11143 else
11144 abort
11145 end
11146 return
11147 end
11148 end
11149
11150 redef fun n_type=(node)
11151 do
11152 _n_type = node
11153 node.parent = self
11154 end
11155 redef fun n_kwas=(node)
11156 do
11157 _n_kwas = node
11158 node.parent = self
11159 end
11160 redef fun n_kwnullable=(node)
11161 do
11162 _n_kwnullable = node
11163 node.parent = self
11164 end
11165
11166
11167 redef fun visit_all(v: Visitor)
11168 do
11169 v.enter_visit(_n_type)
11170 v.enter_visit(_n_kwas)
11171 v.enter_visit(_n_kwnullable)
11172 end
11173 end
11174 redef class AAsNotNullableExternCall
11175 private init empty_init do end
11176
11177 init init_aasnotnullableexterncall (
11178 n_type: nullable AType,
11179 n_kwas: nullable TKwas,
11180 n_kwnot: nullable TKwnot,
11181 n_kwnullable: nullable TKwnullable
11182 )
11183 do
11184 empty_init
11185 _n_type = n_type.as(not null)
11186 n_type.parent = self
11187 _n_kwas = n_kwas.as(not null)
11188 n_kwas.parent = self
11189 _n_kwnot = n_kwnot.as(not null)
11190 n_kwnot.parent = self
11191 _n_kwnullable = n_kwnullable.as(not null)
11192 n_kwnullable.parent = self
11193 end
11194
11195 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11196 do
11197 if _n_type == old_child then
11198 if new_child != null then
11199 new_child.parent = self
11200 assert new_child isa AType
11201 _n_type = new_child
11202 else
11203 abort
11204 end
11205 return
11206 end
11207 if _n_kwas == old_child then
11208 if new_child != null then
11209 new_child.parent = self
11210 assert new_child isa TKwas
11211 _n_kwas = new_child
11212 else
11213 abort
11214 end
11215 return
11216 end
11217 if _n_kwnot == old_child then
11218 if new_child != null then
11219 new_child.parent = self
11220 assert new_child isa TKwnot
11221 _n_kwnot = new_child
11222 else
11223 abort
11224 end
11225 return
11226 end
11227 if _n_kwnullable == old_child then
11228 if new_child != null then
11229 new_child.parent = self
11230 assert new_child isa TKwnullable
11231 _n_kwnullable = new_child
11232 else
11233 abort
11234 end
11235 return
11236 end
11237 end
11238
11239 redef fun n_type=(node)
11240 do
11241 _n_type = node
11242 node.parent = self
11243 end
11244 redef fun n_kwas=(node)
11245 do
11246 _n_kwas = node
11247 node.parent = self
11248 end
11249 redef fun n_kwnot=(node)
11250 do
11251 _n_kwnot = node
11252 node.parent = self
11253 end
11254 redef fun n_kwnullable=(node)
11255 do
11256 _n_kwnullable = node
11257 node.parent = self
11258 end
11259
11260
11261 redef fun visit_all(v: Visitor)
11262 do
11263 v.enter_visit(_n_type)
11264 v.enter_visit(_n_kwas)
11265 v.enter_visit(_n_kwnot)
11266 v.enter_visit(_n_kwnullable)
11267 end
11268 end
11269 redef class AInLanguage
11270 private init empty_init do end
11271
11272 init init_ainlanguage (
11273 n_kwin: nullable TKwin,
11274 n_string: nullable TString
11275 )
11276 do
11277 empty_init
11278 _n_kwin = n_kwin.as(not null)
11279 n_kwin.parent = self
11280 _n_string = n_string.as(not null)
11281 n_string.parent = self
11282 end
11283
11284 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11285 do
11286 if _n_kwin == old_child then
11287 if new_child != null then
11288 new_child.parent = self
11289 assert new_child isa TKwin
11290 _n_kwin = new_child
11291 else
11292 abort
11293 end
11294 return
11295 end
11296 if _n_string == old_child then
11297 if new_child != null then
11298 new_child.parent = self
11299 assert new_child isa TString
11300 _n_string = new_child
11301 else
11302 abort
11303 end
11304 return
11305 end
11306 end
11307
11308 redef fun n_kwin=(node)
11309 do
11310 _n_kwin = node
11311 node.parent = self
11312 end
11313 redef fun n_string=(node)
11314 do
11315 _n_string = node
11316 node.parent = self
11317 end
11318
11319
11320 redef fun visit_all(v: Visitor)
11321 do
11322 v.enter_visit(_n_kwin)
11323 v.enter_visit(_n_string)
11324 end
11325 end
11326 redef class AExternCodeBlock
11327 private init empty_init do end
11328
11329 init init_aexterncodeblock (
11330 n_in_language: nullable AInLanguage,
11331 n_extern_code_segment: nullable TExternCodeSegment
11332 )
11333 do
11334 empty_init
11335 _n_in_language = n_in_language
11336 if n_in_language != null then
11337 n_in_language.parent = self
11338 end
11339 _n_extern_code_segment = n_extern_code_segment.as(not null)
11340 n_extern_code_segment.parent = self
11341 end
11342
11343 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11344 do
11345 if _n_in_language == old_child then
11346 if new_child != null then
11347 new_child.parent = self
11348 assert new_child isa AInLanguage
11349 _n_in_language = new_child
11350 else
11351 _n_in_language = null
11352 end
11353 return
11354 end
11355 if _n_extern_code_segment == old_child then
11356 if new_child != null then
11357 new_child.parent = self
11358 assert new_child isa TExternCodeSegment
11359 _n_extern_code_segment = new_child
11360 else
11361 abort
11362 end
11363 return
11364 end
11365 end
11366
11367 redef fun n_in_language=(node)
11368 do
11369 _n_in_language = node
11370 if node != null then
11371 node.parent = self
11372 end
11373 end
11374 redef fun n_extern_code_segment=(node)
11375 do
11376 _n_extern_code_segment = node
11377 node.parent = self
11378 end
11379
11380
11381 redef fun visit_all(v: Visitor)
11382 do
11383 if _n_in_language != null then
11384 v.enter_visit(_n_in_language.as(not null))
11385 end
11386 v.enter_visit(_n_extern_code_segment)
11387 end
11388 end
11389 redef class AQualified
11390 private init empty_init do end
11391
11392 init init_aqualified (
11393 n_id: Collection[Object], # Should be Collection[TId]
11394 n_classid: nullable TClassid
11395 )
11396 do
11397 empty_init
11398 for n in n_id do
11399 assert n isa TId
11400 _n_id.add(n)
11401 n.parent = self
11402 end
11403 _n_classid = n_classid
11404 if n_classid != null then
11405 n_classid.parent = self
11406 end
11407 end
11408
11409 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11410 do
11411 for i in [0.._n_id.length[ do
11412 if _n_id[i] == old_child then
11413 if new_child != null then
11414 assert new_child isa TId
11415 _n_id[i] = new_child
11416 new_child.parent = self
11417 else
11418 _n_id.remove_at(i)
11419 end
11420 return
11421 end
11422 end
11423 if _n_classid == old_child then
11424 if new_child != null then
11425 new_child.parent = self
11426 assert new_child isa TClassid
11427 _n_classid = new_child
11428 else
11429 _n_classid = null
11430 end
11431 return
11432 end
11433 end
11434
11435 redef fun n_classid=(node)
11436 do
11437 _n_classid = node
11438 if node != null then
11439 node.parent = self
11440 end
11441 end
11442
11443
11444 redef fun visit_all(v: Visitor)
11445 do
11446 for n in _n_id do
11447 v.enter_visit(n)
11448 end
11449 if _n_classid != null then
11450 v.enter_visit(_n_classid.as(not null))
11451 end
11452 end
11453 end
11454 redef class ADoc
11455 private init empty_init do end
11456
11457 init init_adoc (
11458 n_comment: Collection[Object] # Should be Collection[TComment]
11459 )
11460 do
11461 empty_init
11462 for n in n_comment do
11463 assert n isa TComment
11464 _n_comment.add(n)
11465 n.parent = self
11466 end
11467 end
11468
11469 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11470 do
11471 for i in [0.._n_comment.length[ do
11472 if _n_comment[i] == old_child then
11473 if new_child != null then
11474 assert new_child isa TComment
11475 _n_comment[i] = new_child
11476 new_child.parent = self
11477 else
11478 _n_comment.remove_at(i)
11479 end
11480 return
11481 end
11482 end
11483 end
11484
11485
11486
11487 redef fun visit_all(v: Visitor)
11488 do
11489 for n in _n_comment do
11490 v.enter_visit(n)
11491 end
11492 end
11493 end
11494 redef class AAnnotations
11495 private init empty_init do end
11496
11497 init init_aannotations (
11498 n_at: nullable TAt,
11499 n_opar: nullable TOpar,
11500 n_items: Collection[Object], # Should be Collection[AAnnotation]
11501 n_cpar: nullable TCpar
11502 )
11503 do
11504 empty_init
11505 _n_at = n_at
11506 if n_at != null then
11507 n_at.parent = self
11508 end
11509 _n_opar = n_opar
11510 if n_opar != null then
11511 n_opar.parent = self
11512 end
11513 for n in n_items do
11514 assert n isa AAnnotation
11515 _n_items.add(n)
11516 n.parent = self
11517 end
11518 _n_cpar = n_cpar
11519 if n_cpar != null then
11520 n_cpar.parent = self
11521 end
11522 end
11523
11524 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11525 do
11526 if _n_at == old_child then
11527 if new_child != null then
11528 new_child.parent = self
11529 assert new_child isa TAt
11530 _n_at = new_child
11531 else
11532 _n_at = null
11533 end
11534 return
11535 end
11536 if _n_opar == old_child then
11537 if new_child != null then
11538 new_child.parent = self
11539 assert new_child isa TOpar
11540 _n_opar = new_child
11541 else
11542 _n_opar = null
11543 end
11544 return
11545 end
11546 for i in [0.._n_items.length[ do
11547 if _n_items[i] == old_child then
11548 if new_child != null then
11549 assert new_child isa AAnnotation
11550 _n_items[i] = new_child
11551 new_child.parent = self
11552 else
11553 _n_items.remove_at(i)
11554 end
11555 return
11556 end
11557 end
11558 if _n_cpar == old_child then
11559 if new_child != null then
11560 new_child.parent = self
11561 assert new_child isa TCpar
11562 _n_cpar = new_child
11563 else
11564 _n_cpar = null
11565 end
11566 return
11567 end
11568 end
11569
11570 redef fun n_at=(node)
11571 do
11572 _n_at = node
11573 if node != null then
11574 node.parent = self
11575 end
11576 end
11577 redef fun n_opar=(node)
11578 do
11579 _n_opar = node
11580 if node != null then
11581 node.parent = self
11582 end
11583 end
11584 redef fun n_cpar=(node)
11585 do
11586 _n_cpar = node
11587 if node != null then
11588 node.parent = self
11589 end
11590 end
11591
11592
11593 redef fun visit_all(v: Visitor)
11594 do
11595 if _n_at != null then
11596 v.enter_visit(_n_at.as(not null))
11597 end
11598 if _n_opar != null then
11599 v.enter_visit(_n_opar.as(not null))
11600 end
11601 for n in _n_items do
11602 v.enter_visit(n)
11603 end
11604 if _n_cpar != null then
11605 v.enter_visit(_n_cpar.as(not null))
11606 end
11607 end
11608 end
11609 redef class AAnnotation
11610 private init empty_init do end
11611
11612 init init_aannotation (
11613 n_atid: nullable AAtid,
11614 n_opar: nullable TOpar,
11615 n_args: Collection[Object], # Should be Collection[AAtArg]
11616 n_cpar: nullable TCpar,
11617 n_annotations: nullable AAnnotations
11618 )
11619 do
11620 empty_init
11621 _n_atid = n_atid.as(not null)
11622 n_atid.parent = self
11623 _n_opar = n_opar
11624 if n_opar != null then
11625 n_opar.parent = self
11626 end
11627 for n in n_args do
11628 assert n isa AAtArg
11629 _n_args.add(n)
11630 n.parent = self
11631 end
11632 _n_cpar = n_cpar
11633 if n_cpar != null then
11634 n_cpar.parent = self
11635 end
11636 _n_annotations = n_annotations
11637 if n_annotations != null then
11638 n_annotations.parent = self
11639 end
11640 end
11641
11642 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11643 do
11644 if _n_atid == old_child then
11645 if new_child != null then
11646 new_child.parent = self
11647 assert new_child isa AAtid
11648 _n_atid = new_child
11649 else
11650 abort
11651 end
11652 return
11653 end
11654 if _n_opar == old_child then
11655 if new_child != null then
11656 new_child.parent = self
11657 assert new_child isa TOpar
11658 _n_opar = new_child
11659 else
11660 _n_opar = null
11661 end
11662 return
11663 end
11664 for i in [0.._n_args.length[ do
11665 if _n_args[i] == old_child then
11666 if new_child != null then
11667 assert new_child isa AAtArg
11668 _n_args[i] = new_child
11669 new_child.parent = self
11670 else
11671 _n_args.remove_at(i)
11672 end
11673 return
11674 end
11675 end
11676 if _n_cpar == old_child then
11677 if new_child != null then
11678 new_child.parent = self
11679 assert new_child isa TCpar
11680 _n_cpar = new_child
11681 else
11682 _n_cpar = null
11683 end
11684 return
11685 end
11686 if _n_annotations == old_child then
11687 if new_child != null then
11688 new_child.parent = self
11689 assert new_child isa AAnnotations
11690 _n_annotations = new_child
11691 else
11692 _n_annotations = null
11693 end
11694 return
11695 end
11696 end
11697
11698 redef fun n_atid=(node)
11699 do
11700 _n_atid = node
11701 node.parent = self
11702 end
11703 redef fun n_opar=(node)
11704 do
11705 _n_opar = node
11706 if node != null then
11707 node.parent = self
11708 end
11709 end
11710 redef fun n_cpar=(node)
11711 do
11712 _n_cpar = node
11713 if node != null then
11714 node.parent = self
11715 end
11716 end
11717 redef fun n_annotations=(node)
11718 do
11719 _n_annotations = node
11720 if node != null then
11721 node.parent = self
11722 end
11723 end
11724
11725
11726 redef fun visit_all(v: Visitor)
11727 do
11728 v.enter_visit(_n_atid)
11729 if _n_opar != null then
11730 v.enter_visit(_n_opar.as(not null))
11731 end
11732 for n in _n_args do
11733 v.enter_visit(n)
11734 end
11735 if _n_cpar != null then
11736 v.enter_visit(_n_cpar.as(not null))
11737 end
11738 if _n_annotations != null then
11739 v.enter_visit(_n_annotations.as(not null))
11740 end
11741 end
11742 end
11743 redef class ATypeAtArg
11744 private init empty_init do end
11745
11746 init init_atypeatarg (
11747 n_type: nullable AType
11748 )
11749 do
11750 empty_init
11751 _n_type = n_type.as(not null)
11752 n_type.parent = self
11753 end
11754
11755 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11756 do
11757 if _n_type == old_child then
11758 if new_child != null then
11759 new_child.parent = self
11760 assert new_child isa AType
11761 _n_type = new_child
11762 else
11763 abort
11764 end
11765 return
11766 end
11767 end
11768
11769 redef fun n_type=(node)
11770 do
11771 _n_type = node
11772 node.parent = self
11773 end
11774
11775
11776 redef fun visit_all(v: Visitor)
11777 do
11778 v.enter_visit(_n_type)
11779 end
11780 end
11781 redef class AExprAtArg
11782 private init empty_init do end
11783
11784 init init_aexpratarg (
11785 n_expr: nullable AExpr
11786 )
11787 do
11788 empty_init
11789 _n_expr = n_expr.as(not null)
11790 n_expr.parent = self
11791 end
11792
11793 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11794 do
11795 if _n_expr == old_child then
11796 if new_child != null then
11797 new_child.parent = self
11798 assert new_child isa AExpr
11799 _n_expr = new_child
11800 else
11801 abort
11802 end
11803 return
11804 end
11805 end
11806
11807 redef fun n_expr=(node)
11808 do
11809 _n_expr = node
11810 node.parent = self
11811 end
11812
11813
11814 redef fun visit_all(v: Visitor)
11815 do
11816 v.enter_visit(_n_expr)
11817 end
11818 end
11819 redef class AAtAtArg
11820 private init empty_init do end
11821
11822 init init_aatatarg (
11823 n_annotations: nullable AAnnotations
11824 )
11825 do
11826 empty_init
11827 _n_annotations = n_annotations.as(not null)
11828 n_annotations.parent = self
11829 end
11830
11831 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11832 do
11833 if _n_annotations == old_child then
11834 if new_child != null then
11835 new_child.parent = self
11836 assert new_child isa AAnnotations
11837 _n_annotations = new_child
11838 else
11839 abort
11840 end
11841 return
11842 end
11843 end
11844
11845 redef fun n_annotations=(node)
11846 do
11847 _n_annotations = node
11848 node.parent = self
11849 end
11850
11851
11852 redef fun visit_all(v: Visitor)
11853 do
11854 v.enter_visit(_n_annotations)
11855 end
11856 end
11857 redef class AIdAtid
11858 private init empty_init do end
11859
11860 init init_aidatid (
11861 n_id: nullable TId
11862 )
11863 do
11864 empty_init
11865 _n_id = n_id.as(not null)
11866 n_id.parent = self
11867 end
11868
11869 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11870 do
11871 if _n_id == old_child then
11872 if new_child != null then
11873 new_child.parent = self
11874 assert new_child isa TId
11875 _n_id = new_child
11876 else
11877 abort
11878 end
11879 return
11880 end
11881 end
11882
11883 redef fun n_id=(node)
11884 do
11885 _n_id = node
11886 node.parent = self
11887 end
11888
11889
11890 redef fun visit_all(v: Visitor)
11891 do
11892 v.enter_visit(_n_id)
11893 end
11894 end
11895 redef class AKwexternAtid
11896 private init empty_init do end
11897
11898 init init_akwexternatid (
11899 n_id: nullable TKwextern
11900 )
11901 do
11902 empty_init
11903 _n_id = n_id.as(not null)
11904 n_id.parent = self
11905 end
11906
11907 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11908 do
11909 if _n_id == old_child then
11910 if new_child != null then
11911 new_child.parent = self
11912 assert new_child isa TKwextern
11913 _n_id = new_child
11914 else
11915 abort
11916 end
11917 return
11918 end
11919 end
11920
11921 redef fun n_id=(node)
11922 do
11923 _n_id = node
11924 node.parent = self
11925 end
11926
11927
11928 redef fun visit_all(v: Visitor)
11929 do
11930 v.enter_visit(_n_id)
11931 end
11932 end
11933 redef class AKwinternAtid
11934 private init empty_init do end
11935
11936 init init_akwinternatid (
11937 n_id: nullable TKwintern
11938 )
11939 do
11940 empty_init
11941 _n_id = n_id.as(not null)
11942 n_id.parent = self
11943 end
11944
11945 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11946 do
11947 if _n_id == old_child then
11948 if new_child != null then
11949 new_child.parent = self
11950 assert new_child isa TKwintern
11951 _n_id = new_child
11952 else
11953 abort
11954 end
11955 return
11956 end
11957 end
11958
11959 redef fun n_id=(node)
11960 do
11961 _n_id = node
11962 node.parent = self
11963 end
11964
11965
11966 redef fun visit_all(v: Visitor)
11967 do
11968 v.enter_visit(_n_id)
11969 end
11970 end
11971 redef class AKwreadableAtid
11972 private init empty_init do end
11973
11974 init init_akwreadableatid (
11975 n_id: nullable TKwreadable
11976 )
11977 do
11978 empty_init
11979 _n_id = n_id.as(not null)
11980 n_id.parent = self
11981 end
11982
11983 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
11984 do
11985 if _n_id == old_child then
11986 if new_child != null then
11987 new_child.parent = self
11988 assert new_child isa TKwreadable
11989 _n_id = new_child
11990 else
11991 abort
11992 end
11993 return
11994 end
11995 end
11996
11997 redef fun n_id=(node)
11998 do
11999 _n_id = node
12000 node.parent = self
12001 end
12002
12003
12004 redef fun visit_all(v: Visitor)
12005 do
12006 v.enter_visit(_n_id)
12007 end
12008 end
12009 redef class AKwwritableAtid
12010 private init empty_init do end
12011
12012 init init_akwwritableatid (
12013 n_id: nullable TKwwritable
12014 )
12015 do
12016 empty_init
12017 _n_id = n_id.as(not null)
12018 n_id.parent = self
12019 end
12020
12021 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12022 do
12023 if _n_id == old_child then
12024 if new_child != null then
12025 new_child.parent = self
12026 assert new_child isa TKwwritable
12027 _n_id = new_child
12028 else
12029 abort
12030 end
12031 return
12032 end
12033 end
12034
12035 redef fun n_id=(node)
12036 do
12037 _n_id = node
12038 node.parent = self
12039 end
12040
12041
12042 redef fun visit_all(v: Visitor)
12043 do
12044 v.enter_visit(_n_id)
12045 end
12046 end
12047 redef class AKwimportAtid
12048 private init empty_init do end
12049
12050 init init_akwimportatid (
12051 n_id: nullable TKwimport
12052 )
12053 do
12054 empty_init
12055 _n_id = n_id.as(not null)
12056 n_id.parent = self
12057 end
12058
12059 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12060 do
12061 if _n_id == old_child then
12062 if new_child != null then
12063 new_child.parent = self
12064 assert new_child isa TKwimport
12065 _n_id = new_child
12066 else
12067 abort
12068 end
12069 return
12070 end
12071 end
12072
12073 redef fun n_id=(node)
12074 do
12075 _n_id = node
12076 node.parent = self
12077 end
12078
12079
12080 redef fun visit_all(v: Visitor)
12081 do
12082 v.enter_visit(_n_id)
12083 end
12084 end
12085
12086 redef class Start
12087 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
12088 do
12089 if _n_base == old_child then
12090 if new_child == null then
12091 else
12092 new_child.parent = self
12093 assert new_child isa AModule
12094 _n_base = new_child
12095 end
12096 old_child.parent = null
12097 return
12098 end
12099 end
12100
12101 redef fun visit_all(v: Visitor)
12102 do
12103 if _n_base != null then
12104 v.enter_visit(_n_base.as(not null))
12105 end
12106 v.enter_visit(_n_eof)
12107 end
12108 end