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