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