ffi: adds the FFI syntax to the grammar
[nit.git] / src / parser / parser_prod.nit
1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 package parser_prod
4
5 import lexer
6 intrude import parser_nodes
7 private import tables
8
9 redef class ANode
10 # Parent of the node in the AST
11 readable writable var _parent: nullable ANode
12
13 # Remove a child from the AST
14 fun remove_child(child: ANode)
15 do
16 replace_child(child, null)
17 end
18
19 # Replace a child with an other node in the AST
20 fun replace_child(old_child: ANode, new_child: nullable ANode) is abstract
21
22 # Replace itself with an other node in the AST
23 fun replace_with(node: ANode)
24 do
25 if _parent != null then
26 _parent.replace_child(self, node)
27 end
28 end
29
30 # Visit all nodes in order.
31 # Thus, call "v.visit(e)" for each node e
32 fun visit_all(v: Visitor) is abstract
33 end
34
35 redef class Token
36 redef fun visit_all(v: Visitor) do end
37 redef fun replace_child(old_child: ANode, new_child: nullable ANode) do end
38 end
39
40 redef class Prod
41 redef fun replace_with(n: ANode)
42 do
43 super
44 assert n isa Prod
45 n.location = location
46 end
47 end
48
49 # Abstract standard visitor
50 abstract class Visitor
51 # What the visitor do when a node is visited
52 # Concrete visitors should redefine this method.
53 protected fun visit(e: nullable ANode) is abstract
54
55 # Ask the visitor to visit a given node.
56 # Usually automatically called by visit_all* methods.
57 # This methos should not be redefined
58 fun enter_visit(e: nullable ANode)
59 do
60 var old = _current_node
61 _current_node = e
62 visit(e)
63 _current_node = old
64 end
65
66 # The current visited node
67 readable var _current_node: nullable ANode = null
68 end
69
70 redef class AModule
71 private init empty_init do end
72
73 init init_amodule (
74 n_moduledecl: nullable AModuledecl,
75 n_imports: Collection[Object], # Should be Collection[AImport]
76 n_extern_code_blocks: Collection[Object], # Should be Collection[AExternCodeBlock]
77 n_classdefs: Collection[Object] # Should be Collection[AClassdef]
78 )
79 do
80 empty_init
81 _n_moduledecl = n_moduledecl
82 if n_moduledecl != null then
83 n_moduledecl.parent = self
84 end
85 for n in n_imports do
86 assert n isa AImport
87 _n_imports.add(n)
88 n.parent = self
89 end
90 for n in n_extern_code_blocks do
91 assert n isa AExternCodeBlock
92 _n_extern_code_blocks.add(n)
93 n.parent = self
94 end
95 for n in n_classdefs do
96 assert n isa AClassdef
97 _n_classdefs.add(n)
98 n.parent = self
99 end
100 end
101
102 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
103 do
104 if _n_moduledecl == old_child then
105 if new_child != null then
106 new_child.parent = self
107 assert new_child isa AModuledecl
108 _n_moduledecl = new_child
109 else
110 _n_moduledecl = null
111 end
112 return
113 end
114 for i in [0.._n_imports.length[ do
115 if _n_imports[i] == old_child then
116 if new_child != null then
117 assert new_child isa AImport
118 _n_imports[i] = new_child
119 new_child.parent = self
120 else
121 _n_imports.remove_at(i)
122 end
123 return
124 end
125 end
126 for i in [0.._n_extern_code_blocks.length[ do
127 if _n_extern_code_blocks[i] == old_child then
128 if new_child != null then
129 assert new_child isa AExternCodeBlock
130 _n_extern_code_blocks[i] = new_child
131 new_child.parent = self
132 else
133 _n_extern_code_blocks.remove_at(i)
134 end
135 return
136 end
137 end
138 for i in [0.._n_classdefs.length[ do
139 if _n_classdefs[i] == old_child then
140 if new_child != null then
141 assert new_child isa AClassdef
142 _n_classdefs[i] = new_child
143 new_child.parent = self
144 else
145 _n_classdefs.remove_at(i)
146 end
147 return
148 end
149 end
150 end
151
152 redef fun visit_all(v: Visitor)
153 do
154 if _n_moduledecl != null then
155 v.enter_visit(_n_moduledecl.as(not null))
156 end
157 for n in _n_imports do
158 v.enter_visit(n)
159 end
160 for n in _n_extern_code_blocks do
161 v.enter_visit(n)
162 end
163 for n in _n_classdefs do
164 v.enter_visit(n)
165 end
166 end
167 end
168 redef class AModuledecl
169 private init empty_init do end
170
171 init init_amoduledecl (
172 n_doc: nullable ADoc,
173 n_kwmodule: nullable TKwmodule,
174 n_name: nullable AModuleName
175 )
176 do
177 empty_init
178 _n_doc = n_doc
179 if n_doc != null then
180 n_doc.parent = self
181 end
182 _n_kwmodule = n_kwmodule.as(not null)
183 n_kwmodule.parent = self
184 _n_name = n_name.as(not null)
185 n_name.parent = self
186 end
187
188 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
189 do
190 if _n_doc == old_child then
191 if new_child != null then
192 new_child.parent = self
193 assert new_child isa ADoc
194 _n_doc = new_child
195 else
196 _n_doc = null
197 end
198 return
199 end
200 if _n_kwmodule == old_child then
201 if new_child != null then
202 new_child.parent = self
203 assert new_child isa TKwmodule
204 _n_kwmodule = new_child
205 else
206 abort
207 end
208 return
209 end
210 if _n_name == old_child then
211 if new_child != null then
212 new_child.parent = self
213 assert new_child isa AModuleName
214 _n_name = new_child
215 else
216 abort
217 end
218 return
219 end
220 end
221
222 redef fun visit_all(v: Visitor)
223 do
224 if _n_doc != null then
225 v.enter_visit(_n_doc.as(not null))
226 end
227 v.enter_visit(_n_kwmodule)
228 v.enter_visit(_n_name)
229 end
230 end
231 redef class AStdImport
232 private init empty_init do end
233
234 init init_astdimport (
235 n_visibility: nullable AVisibility,
236 n_kwimport: nullable TKwimport,
237 n_name: nullable AModuleName
238 )
239 do
240 empty_init
241 _n_visibility = n_visibility.as(not null)
242 n_visibility.parent = self
243 _n_kwimport = n_kwimport.as(not null)
244 n_kwimport.parent = self
245 _n_name = n_name.as(not null)
246 n_name.parent = self
247 end
248
249 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
250 do
251 if _n_visibility == old_child then
252 if new_child != null then
253 new_child.parent = self
254 assert new_child isa AVisibility
255 _n_visibility = new_child
256 else
257 abort
258 end
259 return
260 end
261 if _n_kwimport == old_child then
262 if new_child != null then
263 new_child.parent = self
264 assert new_child isa TKwimport
265 _n_kwimport = new_child
266 else
267 abort
268 end
269 return
270 end
271 if _n_name == old_child then
272 if new_child != null then
273 new_child.parent = self
274 assert new_child isa AModuleName
275 _n_name = new_child
276 else
277 abort
278 end
279 return
280 end
281 end
282
283 redef fun visit_all(v: Visitor)
284 do
285 v.enter_visit(_n_visibility)
286 v.enter_visit(_n_kwimport)
287 v.enter_visit(_n_name)
288 end
289 end
290 redef class ANoImport
291 private init empty_init do end
292
293 init init_anoimport (
294 n_visibility: nullable AVisibility,
295 n_kwimport: nullable TKwimport,
296 n_kwend: nullable TKwend
297 )
298 do
299 empty_init
300 _n_visibility = n_visibility.as(not null)
301 n_visibility.parent = self
302 _n_kwimport = n_kwimport.as(not null)
303 n_kwimport.parent = self
304 _n_kwend = n_kwend.as(not null)
305 n_kwend.parent = self
306 end
307
308 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
309 do
310 if _n_visibility == old_child then
311 if new_child != null then
312 new_child.parent = self
313 assert new_child isa AVisibility
314 _n_visibility = new_child
315 else
316 abort
317 end
318 return
319 end
320 if _n_kwimport == old_child then
321 if new_child != null then
322 new_child.parent = self
323 assert new_child isa TKwimport
324 _n_kwimport = new_child
325 else
326 abort
327 end
328 return
329 end
330 if _n_kwend == old_child then
331 if new_child != null then
332 new_child.parent = self
333 assert new_child isa TKwend
334 _n_kwend = new_child
335 else
336 abort
337 end
338 return
339 end
340 end
341
342 redef fun visit_all(v: Visitor)
343 do
344 v.enter_visit(_n_visibility)
345 v.enter_visit(_n_kwimport)
346 v.enter_visit(_n_kwend)
347 end
348 end
349 redef class APublicVisibility
350 private init empty_init do end
351
352 init init_apublicvisibility
353 do
354 empty_init
355 end
356
357 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
358 do
359 end
360
361 redef fun visit_all(v: Visitor)
362 do
363 end
364 end
365 redef class APrivateVisibility
366 private init empty_init do end
367
368 init init_aprivatevisibility (
369 n_kwprivate: nullable TKwprivate
370 )
371 do
372 empty_init
373 _n_kwprivate = n_kwprivate.as(not null)
374 n_kwprivate.parent = self
375 end
376
377 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
378 do
379 if _n_kwprivate == old_child then
380 if new_child != null then
381 new_child.parent = self
382 assert new_child isa TKwprivate
383 _n_kwprivate = new_child
384 else
385 abort
386 end
387 return
388 end
389 end
390
391 redef fun visit_all(v: Visitor)
392 do
393 v.enter_visit(_n_kwprivate)
394 end
395 end
396 redef class AProtectedVisibility
397 private init empty_init do end
398
399 init init_aprotectedvisibility (
400 n_kwprotected: nullable TKwprotected
401 )
402 do
403 empty_init
404 _n_kwprotected = n_kwprotected.as(not null)
405 n_kwprotected.parent = self
406 end
407
408 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
409 do
410 if _n_kwprotected == old_child then
411 if new_child != null then
412 new_child.parent = self
413 assert new_child isa TKwprotected
414 _n_kwprotected = new_child
415 else
416 abort
417 end
418 return
419 end
420 end
421
422 redef fun visit_all(v: Visitor)
423 do
424 v.enter_visit(_n_kwprotected)
425 end
426 end
427 redef class AIntrudeVisibility
428 private init empty_init do end
429
430 init init_aintrudevisibility (
431 n_kwintrude: nullable TKwintrude
432 )
433 do
434 empty_init
435 _n_kwintrude = n_kwintrude.as(not null)
436 n_kwintrude.parent = self
437 end
438
439 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
440 do
441 if _n_kwintrude == old_child then
442 if new_child != null then
443 new_child.parent = self
444 assert new_child isa TKwintrude
445 _n_kwintrude = new_child
446 else
447 abort
448 end
449 return
450 end
451 end
452
453 redef fun visit_all(v: Visitor)
454 do
455 v.enter_visit(_n_kwintrude)
456 end
457 end
458 redef class AStdClassdef
459 private init empty_init do end
460
461 init init_astdclassdef (
462 n_doc: nullable ADoc,
463 n_kwredef: nullable TKwredef,
464 n_visibility: nullable AVisibility,
465 n_classkind: nullable AClasskind,
466 n_id: nullable TClassid,
467 n_formaldefs: Collection[Object], # Should be Collection[AFormaldef]
468 n_extern_code_block: nullable AExternCodeBlock,
469 n_superclasses: Collection[Object], # Should be Collection[ASuperclass]
470 n_propdefs: Collection[Object], # Should be Collection[APropdef]
471 n_kwend: nullable TKwend
472 )
473 do
474 empty_init
475 _n_doc = n_doc
476 if n_doc != null then
477 n_doc.parent = self
478 end
479 _n_kwredef = n_kwredef
480 if n_kwredef != null then
481 n_kwredef.parent = self
482 end
483 _n_visibility = n_visibility.as(not null)
484 n_visibility.parent = self
485 _n_classkind = n_classkind.as(not null)
486 n_classkind.parent = self
487 _n_id = n_id
488 if n_id != null then
489 n_id.parent = self
490 end
491 for n in n_formaldefs do
492 assert n isa AFormaldef
493 _n_formaldefs.add(n)
494 n.parent = self
495 end
496 _n_extern_code_block = n_extern_code_block
497 if n_extern_code_block != null then
498 n_extern_code_block.parent = self
499 end
500 for n in n_superclasses do
501 assert n isa ASuperclass
502 _n_superclasses.add(n)
503 n.parent = self
504 end
505 for n in n_propdefs do
506 assert n isa APropdef
507 _n_propdefs.add(n)
508 n.parent = self
509 end
510 _n_kwend = n_kwend.as(not null)
511 n_kwend.parent = self
512 end
513
514 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
515 do
516 if _n_doc == old_child then
517 if new_child != null then
518 new_child.parent = self
519 assert new_child isa ADoc
520 _n_doc = new_child
521 else
522 _n_doc = null
523 end
524 return
525 end
526 if _n_kwredef == old_child then
527 if new_child != null then
528 new_child.parent = self
529 assert new_child isa TKwredef
530 _n_kwredef = new_child
531 else
532 _n_kwredef = null
533 end
534 return
535 end
536 if _n_visibility == old_child then
537 if new_child != null then
538 new_child.parent = self
539 assert new_child isa AVisibility
540 _n_visibility = new_child
541 else
542 abort
543 end
544 return
545 end
546 if _n_classkind == old_child then
547 if new_child != null then
548 new_child.parent = self
549 assert new_child isa AClasskind
550 _n_classkind = new_child
551 else
552 abort
553 end
554 return
555 end
556 if _n_id == old_child then
557 if new_child != null then
558 new_child.parent = self
559 assert new_child isa TClassid
560 _n_id = new_child
561 else
562 _n_id = null
563 end
564 return
565 end
566 for i in [0.._n_formaldefs.length[ do
567 if _n_formaldefs[i] == old_child then
568 if new_child != null then
569 assert new_child isa AFormaldef
570 _n_formaldefs[i] = new_child
571 new_child.parent = self
572 else
573 _n_formaldefs.remove_at(i)
574 end
575 return
576 end
577 end
578 if _n_extern_code_block == old_child then
579 if new_child != null then
580 new_child.parent = self
581 assert new_child isa AExternCodeBlock
582 _n_extern_code_block = new_child
583 else
584 _n_extern_code_block = null
585 end
586 return
587 end
588 for i in [0.._n_superclasses.length[ do
589 if _n_superclasses[i] == old_child then
590 if new_child != null then
591 assert new_child isa ASuperclass
592 _n_superclasses[i] = new_child
593 new_child.parent = self
594 else
595 _n_superclasses.remove_at(i)
596 end
597 return
598 end
599 end
600 for i in [0.._n_propdefs.length[ do
601 if _n_propdefs[i] == old_child then
602 if new_child != null then
603 assert new_child isa APropdef
604 _n_propdefs[i] = new_child
605 new_child.parent = self
606 else
607 _n_propdefs.remove_at(i)
608 end
609 return
610 end
611 end
612 if _n_kwend == old_child then
613 if new_child != null then
614 new_child.parent = self
615 assert new_child isa TKwend
616 _n_kwend = new_child
617 else
618 abort
619 end
620 return
621 end
622 end
623
624 redef fun visit_all(v: Visitor)
625 do
626 if _n_doc != null then
627 v.enter_visit(_n_doc.as(not null))
628 end
629 if _n_kwredef != null then
630 v.enter_visit(_n_kwredef.as(not null))
631 end
632 v.enter_visit(_n_visibility)
633 v.enter_visit(_n_classkind)
634 if _n_id != null then
635 v.enter_visit(_n_id.as(not null))
636 end
637 for n in _n_formaldefs do
638 v.enter_visit(n)
639 end
640 if _n_extern_code_block != null then
641 v.enter_visit(_n_extern_code_block.as(not null))
642 end
643 for n in _n_superclasses do
644 v.enter_visit(n)
645 end
646 for n in _n_propdefs do
647 v.enter_visit(n)
648 end
649 v.enter_visit(_n_kwend)
650 end
651 end
652 redef class ATopClassdef
653 private init empty_init do end
654
655 init init_atopclassdef (
656 n_propdefs: Collection[Object] # Should be Collection[APropdef]
657 )
658 do
659 empty_init
660 for n in n_propdefs do
661 assert n isa APropdef
662 _n_propdefs.add(n)
663 n.parent = self
664 end
665 end
666
667 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
668 do
669 for i in [0.._n_propdefs.length[ do
670 if _n_propdefs[i] == old_child then
671 if new_child != null then
672 assert new_child isa APropdef
673 _n_propdefs[i] = new_child
674 new_child.parent = self
675 else
676 _n_propdefs.remove_at(i)
677 end
678 return
679 end
680 end
681 end
682
683 redef fun visit_all(v: Visitor)
684 do
685 for n in _n_propdefs do
686 v.enter_visit(n)
687 end
688 end
689 end
690 redef class AMainClassdef
691 private init empty_init do end
692
693 init init_amainclassdef (
694 n_propdefs: Collection[Object] # Should be Collection[APropdef]
695 )
696 do
697 empty_init
698 for n in n_propdefs do
699 assert n isa APropdef
700 _n_propdefs.add(n)
701 n.parent = self
702 end
703 end
704
705 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
706 do
707 for i in [0.._n_propdefs.length[ do
708 if _n_propdefs[i] == old_child then
709 if new_child != null then
710 assert new_child isa APropdef
711 _n_propdefs[i] = new_child
712 new_child.parent = self
713 else
714 _n_propdefs.remove_at(i)
715 end
716 return
717 end
718 end
719 end
720
721 redef fun visit_all(v: Visitor)
722 do
723 for n in _n_propdefs do
724 v.enter_visit(n)
725 end
726 end
727 end
728 redef class AConcreteClasskind
729 private init empty_init do end
730
731 init init_aconcreteclasskind (
732 n_kwclass: nullable TKwclass
733 )
734 do
735 empty_init
736 _n_kwclass = n_kwclass.as(not null)
737 n_kwclass.parent = self
738 end
739
740 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
741 do
742 if _n_kwclass == old_child then
743 if new_child != null then
744 new_child.parent = self
745 assert new_child isa TKwclass
746 _n_kwclass = new_child
747 else
748 abort
749 end
750 return
751 end
752 end
753
754 redef fun visit_all(v: Visitor)
755 do
756 v.enter_visit(_n_kwclass)
757 end
758 end
759 redef class AAbstractClasskind
760 private init empty_init do end
761
762 init init_aabstractclasskind (
763 n_kwabstract: nullable TKwabstract,
764 n_kwclass: nullable TKwclass
765 )
766 do
767 empty_init
768 _n_kwabstract = n_kwabstract.as(not null)
769 n_kwabstract.parent = self
770 _n_kwclass = n_kwclass.as(not null)
771 n_kwclass.parent = self
772 end
773
774 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
775 do
776 if _n_kwabstract == old_child then
777 if new_child != null then
778 new_child.parent = self
779 assert new_child isa TKwabstract
780 _n_kwabstract = new_child
781 else
782 abort
783 end
784 return
785 end
786 if _n_kwclass == old_child then
787 if new_child != null then
788 new_child.parent = self
789 assert new_child isa TKwclass
790 _n_kwclass = new_child
791 else
792 abort
793 end
794 return
795 end
796 end
797
798 redef fun visit_all(v: Visitor)
799 do
800 v.enter_visit(_n_kwabstract)
801 v.enter_visit(_n_kwclass)
802 end
803 end
804 redef class AInterfaceClasskind
805 private init empty_init do end
806
807 init init_ainterfaceclasskind (
808 n_kwinterface: nullable TKwinterface
809 )
810 do
811 empty_init
812 _n_kwinterface = n_kwinterface.as(not null)
813 n_kwinterface.parent = self
814 end
815
816 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
817 do
818 if _n_kwinterface == old_child then
819 if new_child != null then
820 new_child.parent = self
821 assert new_child isa TKwinterface
822 _n_kwinterface = new_child
823 else
824 abort
825 end
826 return
827 end
828 end
829
830 redef fun visit_all(v: Visitor)
831 do
832 v.enter_visit(_n_kwinterface)
833 end
834 end
835 redef class AEnumClasskind
836 private init empty_init do end
837
838 init init_aenumclasskind (
839 n_kwenum: nullable TKwenum
840 )
841 do
842 empty_init
843 _n_kwenum = n_kwenum.as(not null)
844 n_kwenum.parent = self
845 end
846
847 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
848 do
849 if _n_kwenum == old_child then
850 if new_child != null then
851 new_child.parent = self
852 assert new_child isa TKwenum
853 _n_kwenum = new_child
854 else
855 abort
856 end
857 return
858 end
859 end
860
861 redef fun visit_all(v: Visitor)
862 do
863 v.enter_visit(_n_kwenum)
864 end
865 end
866 redef class AExternClasskind
867 private init empty_init do end
868
869 init init_aexternclasskind (
870 n_kwextern: nullable TKwextern
871 )
872 do
873 empty_init
874 _n_kwextern = n_kwextern.as(not null)
875 n_kwextern.parent = self
876 end
877
878 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
879 do
880 if _n_kwextern == old_child then
881 if new_child != null then
882 new_child.parent = self
883 assert new_child isa TKwextern
884 _n_kwextern = new_child
885 else
886 abort
887 end
888 return
889 end
890 end
891
892 redef fun visit_all(v: Visitor)
893 do
894 v.enter_visit(_n_kwextern)
895 end
896 end
897 redef class AFormaldef
898 private init empty_init do end
899
900 init init_aformaldef (
901 n_id: nullable TClassid,
902 n_type: nullable AType
903 )
904 do
905 empty_init
906 _n_id = n_id.as(not null)
907 n_id.parent = self
908 _n_type = n_type
909 if n_type != null then
910 n_type.parent = self
911 end
912 end
913
914 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
915 do
916 if _n_id == old_child then
917 if new_child != null then
918 new_child.parent = self
919 assert new_child isa TClassid
920 _n_id = new_child
921 else
922 abort
923 end
924 return
925 end
926 if _n_type == old_child then
927 if new_child != null then
928 new_child.parent = self
929 assert new_child isa AType
930 _n_type = new_child
931 else
932 _n_type = null
933 end
934 return
935 end
936 end
937
938 redef fun visit_all(v: Visitor)
939 do
940 v.enter_visit(_n_id)
941 if _n_type != null then
942 v.enter_visit(_n_type.as(not null))
943 end
944 end
945 end
946 redef class ASuperclass
947 private init empty_init do end
948
949 init init_asuperclass (
950 n_kwspecial: nullable TKwspecial,
951 n_kwsuper: nullable TKwsuper,
952 n_type: nullable AType
953 )
954 do
955 empty_init
956 _n_kwspecial = n_kwspecial
957 if n_kwspecial != null then
958 n_kwspecial.parent = self
959 end
960 _n_kwsuper = n_kwsuper
961 if n_kwsuper != null then
962 n_kwsuper.parent = self
963 end
964 _n_type = n_type.as(not null)
965 n_type.parent = self
966 end
967
968 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
969 do
970 if _n_kwspecial == old_child then
971 if new_child != null then
972 new_child.parent = self
973 assert new_child isa TKwspecial
974 _n_kwspecial = new_child
975 else
976 _n_kwspecial = null
977 end
978 return
979 end
980 if _n_kwsuper == old_child then
981 if new_child != null then
982 new_child.parent = self
983 assert new_child isa TKwsuper
984 _n_kwsuper = new_child
985 else
986 _n_kwsuper = null
987 end
988 return
989 end
990 if _n_type == old_child then
991 if new_child != null then
992 new_child.parent = self
993 assert new_child isa AType
994 _n_type = new_child
995 else
996 abort
997 end
998 return
999 end
1000 end
1001
1002 redef fun visit_all(v: Visitor)
1003 do
1004 if _n_kwspecial != null then
1005 v.enter_visit(_n_kwspecial.as(not null))
1006 end
1007 if _n_kwsuper != null then
1008 v.enter_visit(_n_kwsuper.as(not null))
1009 end
1010 v.enter_visit(_n_type)
1011 end
1012 end
1013 redef class AAttrPropdef
1014 private init empty_init do end
1015
1016 init init_aattrpropdef (
1017 n_doc: nullable ADoc,
1018 n_readable: nullable AAble,
1019 n_writable: nullable AAble,
1020 n_kwredef: nullable TKwredef,
1021 n_visibility: nullable AVisibility,
1022 n_kwvar: nullable TKwvar,
1023 n_id: nullable TAttrid,
1024 n_id2: nullable TId,
1025 n_type: nullable AType,
1026 n_expr: nullable AExpr
1027 )
1028 do
1029 empty_init
1030 _n_doc = n_doc
1031 if n_doc != null then
1032 n_doc.parent = self
1033 end
1034 _n_readable = n_readable
1035 if n_readable != null then
1036 n_readable.parent = self
1037 end
1038 _n_writable = n_writable
1039 if n_writable != null then
1040 n_writable.parent = self
1041 end
1042 _n_kwredef = n_kwredef
1043 if n_kwredef != null then
1044 n_kwredef.parent = self
1045 end
1046 _n_visibility = n_visibility.as(not null)
1047 n_visibility.parent = self
1048 _n_kwvar = n_kwvar.as(not null)
1049 n_kwvar.parent = self
1050 _n_id = n_id
1051 if n_id != null then
1052 n_id.parent = self
1053 end
1054 _n_id2 = n_id2
1055 if n_id2 != null then
1056 n_id2.parent = self
1057 end
1058 _n_type = n_type
1059 if n_type != null then
1060 n_type.parent = self
1061 end
1062 _n_expr = n_expr
1063 if n_expr != null then
1064 n_expr.parent = self
1065 end
1066 end
1067
1068 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1069 do
1070 if _n_doc == old_child then
1071 if new_child != null then
1072 new_child.parent = self
1073 assert new_child isa ADoc
1074 _n_doc = new_child
1075 else
1076 _n_doc = null
1077 end
1078 return
1079 end
1080 if _n_readable == old_child then
1081 if new_child != null then
1082 new_child.parent = self
1083 assert new_child isa AAble
1084 _n_readable = new_child
1085 else
1086 _n_readable = null
1087 end
1088 return
1089 end
1090 if _n_writable == old_child then
1091 if new_child != null then
1092 new_child.parent = self
1093 assert new_child isa AAble
1094 _n_writable = new_child
1095 else
1096 _n_writable = null
1097 end
1098 return
1099 end
1100 if _n_kwredef == old_child then
1101 if new_child != null then
1102 new_child.parent = self
1103 assert new_child isa TKwredef
1104 _n_kwredef = new_child
1105 else
1106 _n_kwredef = null
1107 end
1108 return
1109 end
1110 if _n_visibility == old_child then
1111 if new_child != null then
1112 new_child.parent = self
1113 assert new_child isa AVisibility
1114 _n_visibility = new_child
1115 else
1116 abort
1117 end
1118 return
1119 end
1120 if _n_kwvar == old_child then
1121 if new_child != null then
1122 new_child.parent = self
1123 assert new_child isa TKwvar
1124 _n_kwvar = new_child
1125 else
1126 abort
1127 end
1128 return
1129 end
1130 if _n_id == old_child then
1131 if new_child != null then
1132 new_child.parent = self
1133 assert new_child isa TAttrid
1134 _n_id = new_child
1135 else
1136 _n_id = null
1137 end
1138 return
1139 end
1140 if _n_id2 == old_child then
1141 if new_child != null then
1142 new_child.parent = self
1143 assert new_child isa TId
1144 _n_id2 = new_child
1145 else
1146 _n_id2 = null
1147 end
1148 return
1149 end
1150 if _n_type == old_child then
1151 if new_child != null then
1152 new_child.parent = self
1153 assert new_child isa AType
1154 _n_type = new_child
1155 else
1156 _n_type = null
1157 end
1158 return
1159 end
1160 if _n_expr == old_child then
1161 if new_child != null then
1162 new_child.parent = self
1163 assert new_child isa AExpr
1164 _n_expr = new_child
1165 else
1166 _n_expr = null
1167 end
1168 return
1169 end
1170 end
1171
1172 redef fun visit_all(v: Visitor)
1173 do
1174 if _n_doc != null then
1175 v.enter_visit(_n_doc.as(not null))
1176 end
1177 if _n_readable != null then
1178 v.enter_visit(_n_readable.as(not null))
1179 end
1180 if _n_writable != null then
1181 v.enter_visit(_n_writable.as(not null))
1182 end
1183 if _n_kwredef != null then
1184 v.enter_visit(_n_kwredef.as(not null))
1185 end
1186 v.enter_visit(_n_visibility)
1187 v.enter_visit(_n_kwvar)
1188 if _n_id != null then
1189 v.enter_visit(_n_id.as(not null))
1190 end
1191 if _n_id2 != null then
1192 v.enter_visit(_n_id2.as(not null))
1193 end
1194 if _n_type != null then
1195 v.enter_visit(_n_type.as(not null))
1196 end
1197 if _n_expr != null then
1198 v.enter_visit(_n_expr.as(not null))
1199 end
1200 end
1201 end
1202 redef class AMethPropdef
1203 private init empty_init do end
1204
1205 init init_amethpropdef (
1206 n_doc: nullable ADoc,
1207 n_kwredef: nullable TKwredef,
1208 n_visibility: nullable AVisibility,
1209 n_methid: nullable AMethid,
1210 n_signature: nullable ASignature
1211 )
1212 do
1213 empty_init
1214 _n_doc = n_doc
1215 if n_doc != null then
1216 n_doc.parent = self
1217 end
1218 _n_kwredef = n_kwredef
1219 if n_kwredef != null then
1220 n_kwredef.parent = self
1221 end
1222 _n_visibility = n_visibility.as(not null)
1223 n_visibility.parent = self
1224 _n_methid = n_methid.as(not null)
1225 n_methid.parent = self
1226 _n_signature = n_signature.as(not null)
1227 n_signature.parent = self
1228 end
1229
1230 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1231 do
1232 if _n_doc == old_child then
1233 if new_child != null then
1234 new_child.parent = self
1235 assert new_child isa ADoc
1236 _n_doc = new_child
1237 else
1238 _n_doc = null
1239 end
1240 return
1241 end
1242 if _n_kwredef == old_child then
1243 if new_child != null then
1244 new_child.parent = self
1245 assert new_child isa TKwredef
1246 _n_kwredef = new_child
1247 else
1248 _n_kwredef = null
1249 end
1250 return
1251 end
1252 if _n_visibility == old_child then
1253 if new_child != null then
1254 new_child.parent = self
1255 assert new_child isa AVisibility
1256 _n_visibility = new_child
1257 else
1258 abort
1259 end
1260 return
1261 end
1262 if _n_methid == old_child then
1263 if new_child != null then
1264 new_child.parent = self
1265 assert new_child isa AMethid
1266 _n_methid = new_child
1267 else
1268 abort
1269 end
1270 return
1271 end
1272 if _n_signature == old_child then
1273 if new_child != null then
1274 new_child.parent = self
1275 assert new_child isa ASignature
1276 _n_signature = new_child
1277 else
1278 abort
1279 end
1280 return
1281 end
1282 end
1283
1284 redef fun visit_all(v: Visitor)
1285 do
1286 if _n_doc != null then
1287 v.enter_visit(_n_doc.as(not null))
1288 end
1289 if _n_kwredef != null then
1290 v.enter_visit(_n_kwredef.as(not null))
1291 end
1292 v.enter_visit(_n_visibility)
1293 v.enter_visit(_n_methid)
1294 v.enter_visit(_n_signature)
1295 end
1296 end
1297 redef class ADeferredMethPropdef
1298 private init empty_init do end
1299
1300 init init_adeferredmethpropdef (
1301 n_doc: nullable ADoc,
1302 n_kwredef: nullable TKwredef,
1303 n_visibility: nullable AVisibility,
1304 n_kwmeth: nullable TKwmeth,
1305 n_methid: nullable AMethid,
1306 n_signature: nullable ASignature
1307 )
1308 do
1309 empty_init
1310 _n_doc = n_doc
1311 if n_doc != null then
1312 n_doc.parent = self
1313 end
1314 _n_kwredef = n_kwredef
1315 if n_kwredef != null then
1316 n_kwredef.parent = self
1317 end
1318 _n_visibility = n_visibility.as(not null)
1319 n_visibility.parent = self
1320 _n_kwmeth = n_kwmeth.as(not null)
1321 n_kwmeth.parent = self
1322 _n_methid = n_methid.as(not null)
1323 n_methid.parent = self
1324 _n_signature = n_signature.as(not null)
1325 n_signature.parent = self
1326 end
1327
1328 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1329 do
1330 if _n_doc == old_child then
1331 if new_child != null then
1332 new_child.parent = self
1333 assert new_child isa ADoc
1334 _n_doc = new_child
1335 else
1336 _n_doc = null
1337 end
1338 return
1339 end
1340 if _n_kwredef == old_child then
1341 if new_child != null then
1342 new_child.parent = self
1343 assert new_child isa TKwredef
1344 _n_kwredef = new_child
1345 else
1346 _n_kwredef = null
1347 end
1348 return
1349 end
1350 if _n_visibility == old_child then
1351 if new_child != null then
1352 new_child.parent = self
1353 assert new_child isa AVisibility
1354 _n_visibility = new_child
1355 else
1356 abort
1357 end
1358 return
1359 end
1360 if _n_kwmeth == old_child then
1361 if new_child != null then
1362 new_child.parent = self
1363 assert new_child isa TKwmeth
1364 _n_kwmeth = new_child
1365 else
1366 abort
1367 end
1368 return
1369 end
1370 if _n_methid == old_child then
1371 if new_child != null then
1372 new_child.parent = self
1373 assert new_child isa AMethid
1374 _n_methid = new_child
1375 else
1376 abort
1377 end
1378 return
1379 end
1380 if _n_signature == old_child then
1381 if new_child != null then
1382 new_child.parent = self
1383 assert new_child isa ASignature
1384 _n_signature = new_child
1385 else
1386 abort
1387 end
1388 return
1389 end
1390 end
1391
1392 redef fun visit_all(v: Visitor)
1393 do
1394 if _n_doc != null then
1395 v.enter_visit(_n_doc.as(not null))
1396 end
1397 if _n_kwredef != null then
1398 v.enter_visit(_n_kwredef.as(not null))
1399 end
1400 v.enter_visit(_n_visibility)
1401 v.enter_visit(_n_kwmeth)
1402 v.enter_visit(_n_methid)
1403 v.enter_visit(_n_signature)
1404 end
1405 end
1406 redef class AInternMethPropdef
1407 private init empty_init do end
1408
1409 init init_ainternmethpropdef (
1410 n_doc: nullable ADoc,
1411 n_kwredef: nullable TKwredef,
1412 n_visibility: nullable AVisibility,
1413 n_kwmeth: nullable TKwmeth,
1414 n_methid: nullable AMethid,
1415 n_signature: nullable ASignature
1416 )
1417 do
1418 empty_init
1419 _n_doc = n_doc
1420 if n_doc != null then
1421 n_doc.parent = self
1422 end
1423 _n_kwredef = n_kwredef
1424 if n_kwredef != null then
1425 n_kwredef.parent = self
1426 end
1427 _n_visibility = n_visibility.as(not null)
1428 n_visibility.parent = self
1429 _n_kwmeth = n_kwmeth.as(not null)
1430 n_kwmeth.parent = self
1431 _n_methid = n_methid.as(not null)
1432 n_methid.parent = self
1433 _n_signature = n_signature.as(not null)
1434 n_signature.parent = self
1435 end
1436
1437 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1438 do
1439 if _n_doc == old_child then
1440 if new_child != null then
1441 new_child.parent = self
1442 assert new_child isa ADoc
1443 _n_doc = new_child
1444 else
1445 _n_doc = null
1446 end
1447 return
1448 end
1449 if _n_kwredef == old_child then
1450 if new_child != null then
1451 new_child.parent = self
1452 assert new_child isa TKwredef
1453 _n_kwredef = new_child
1454 else
1455 _n_kwredef = null
1456 end
1457 return
1458 end
1459 if _n_visibility == old_child then
1460 if new_child != null then
1461 new_child.parent = self
1462 assert new_child isa AVisibility
1463 _n_visibility = new_child
1464 else
1465 abort
1466 end
1467 return
1468 end
1469 if _n_kwmeth == old_child then
1470 if new_child != null then
1471 new_child.parent = self
1472 assert new_child isa TKwmeth
1473 _n_kwmeth = new_child
1474 else
1475 abort
1476 end
1477 return
1478 end
1479 if _n_methid == old_child then
1480 if new_child != null then
1481 new_child.parent = self
1482 assert new_child isa AMethid
1483 _n_methid = new_child
1484 else
1485 abort
1486 end
1487 return
1488 end
1489 if _n_signature == old_child then
1490 if new_child != null then
1491 new_child.parent = self
1492 assert new_child isa ASignature
1493 _n_signature = new_child
1494 else
1495 abort
1496 end
1497 return
1498 end
1499 end
1500
1501 redef fun visit_all(v: Visitor)
1502 do
1503 if _n_doc != null then
1504 v.enter_visit(_n_doc.as(not null))
1505 end
1506 if _n_kwredef != null then
1507 v.enter_visit(_n_kwredef.as(not null))
1508 end
1509 v.enter_visit(_n_visibility)
1510 v.enter_visit(_n_kwmeth)
1511 v.enter_visit(_n_methid)
1512 v.enter_visit(_n_signature)
1513 end
1514 end
1515 redef class AExternMethPropdef
1516 private init empty_init do end
1517
1518 init init_aexternmethpropdef (
1519 n_doc: nullable ADoc,
1520 n_kwredef: nullable TKwredef,
1521 n_visibility: nullable AVisibility,
1522 n_kwmeth: nullable TKwmeth,
1523 n_methid: nullable AMethid,
1524 n_signature: nullable ASignature,
1525 n_extern: nullable TString,
1526 n_extern_calls: nullable AExternCalls,
1527 n_extern_code_block: nullable AExternCodeBlock
1528 )
1529 do
1530 empty_init
1531 _n_doc = n_doc
1532 if n_doc != null then
1533 n_doc.parent = self
1534 end
1535 _n_kwredef = n_kwredef
1536 if n_kwredef != null then
1537 n_kwredef.parent = self
1538 end
1539 _n_visibility = n_visibility.as(not null)
1540 n_visibility.parent = self
1541 _n_kwmeth = n_kwmeth.as(not null)
1542 n_kwmeth.parent = self
1543 _n_methid = n_methid.as(not null)
1544 n_methid.parent = self
1545 _n_signature = n_signature.as(not null)
1546 n_signature.parent = self
1547 _n_extern = n_extern
1548 if n_extern != null then
1549 n_extern.parent = self
1550 end
1551 _n_extern_calls = n_extern_calls
1552 if n_extern_calls != null then
1553 n_extern_calls.parent = self
1554 end
1555 _n_extern_code_block = n_extern_code_block
1556 if n_extern_code_block != null then
1557 n_extern_code_block.parent = self
1558 end
1559 end
1560
1561 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1562 do
1563 if _n_doc == old_child then
1564 if new_child != null then
1565 new_child.parent = self
1566 assert new_child isa ADoc
1567 _n_doc = new_child
1568 else
1569 _n_doc = null
1570 end
1571 return
1572 end
1573 if _n_kwredef == old_child then
1574 if new_child != null then
1575 new_child.parent = self
1576 assert new_child isa TKwredef
1577 _n_kwredef = new_child
1578 else
1579 _n_kwredef = null
1580 end
1581 return
1582 end
1583 if _n_visibility == old_child then
1584 if new_child != null then
1585 new_child.parent = self
1586 assert new_child isa AVisibility
1587 _n_visibility = new_child
1588 else
1589 abort
1590 end
1591 return
1592 end
1593 if _n_kwmeth == old_child then
1594 if new_child != null then
1595 new_child.parent = self
1596 assert new_child isa TKwmeth
1597 _n_kwmeth = new_child
1598 else
1599 abort
1600 end
1601 return
1602 end
1603 if _n_methid == old_child then
1604 if new_child != null then
1605 new_child.parent = self
1606 assert new_child isa AMethid
1607 _n_methid = new_child
1608 else
1609 abort
1610 end
1611 return
1612 end
1613 if _n_signature == old_child then
1614 if new_child != null then
1615 new_child.parent = self
1616 assert new_child isa ASignature
1617 _n_signature = new_child
1618 else
1619 abort
1620 end
1621 return
1622 end
1623 if _n_extern == old_child then
1624 if new_child != null then
1625 new_child.parent = self
1626 assert new_child isa TString
1627 _n_extern = new_child
1628 else
1629 _n_extern = null
1630 end
1631 return
1632 end
1633 if _n_extern_calls == old_child then
1634 if new_child != null then
1635 new_child.parent = self
1636 assert new_child isa AExternCalls
1637 _n_extern_calls = new_child
1638 else
1639 _n_extern_calls = null
1640 end
1641 return
1642 end
1643 if _n_extern_code_block == old_child then
1644 if new_child != null then
1645 new_child.parent = self
1646 assert new_child isa AExternCodeBlock
1647 _n_extern_code_block = new_child
1648 else
1649 _n_extern_code_block = null
1650 end
1651 return
1652 end
1653 end
1654
1655 redef fun visit_all(v: Visitor)
1656 do
1657 if _n_doc != null then
1658 v.enter_visit(_n_doc.as(not null))
1659 end
1660 if _n_kwredef != null then
1661 v.enter_visit(_n_kwredef.as(not null))
1662 end
1663 v.enter_visit(_n_visibility)
1664 v.enter_visit(_n_kwmeth)
1665 v.enter_visit(_n_methid)
1666 v.enter_visit(_n_signature)
1667 if _n_extern != null then
1668 v.enter_visit(_n_extern.as(not null))
1669 end
1670 if _n_extern_calls != null then
1671 v.enter_visit(_n_extern_calls.as(not null))
1672 end
1673 if _n_extern_code_block != null then
1674 v.enter_visit(_n_extern_code_block.as(not null))
1675 end
1676 end
1677 end
1678 redef class AConcreteMethPropdef
1679 private init empty_init do end
1680
1681 init init_aconcretemethpropdef (
1682 n_doc: nullable ADoc,
1683 n_kwredef: nullable TKwredef,
1684 n_visibility: nullable AVisibility,
1685 n_kwmeth: nullable TKwmeth,
1686 n_methid: nullable AMethid,
1687 n_signature: nullable ASignature,
1688 n_block: nullable AExpr
1689 )
1690 do
1691 empty_init
1692 _n_doc = n_doc
1693 if n_doc != null then
1694 n_doc.parent = self
1695 end
1696 _n_kwredef = n_kwredef
1697 if n_kwredef != null then
1698 n_kwredef.parent = self
1699 end
1700 _n_visibility = n_visibility.as(not null)
1701 n_visibility.parent = self
1702 _n_kwmeth = n_kwmeth.as(not null)
1703 n_kwmeth.parent = self
1704 _n_methid = n_methid.as(not null)
1705 n_methid.parent = self
1706 _n_signature = n_signature.as(not null)
1707 n_signature.parent = self
1708 _n_block = n_block
1709 if n_block != null then
1710 n_block.parent = self
1711 end
1712 end
1713
1714 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1715 do
1716 if _n_doc == old_child then
1717 if new_child != null then
1718 new_child.parent = self
1719 assert new_child isa ADoc
1720 _n_doc = new_child
1721 else
1722 _n_doc = null
1723 end
1724 return
1725 end
1726 if _n_kwredef == old_child then
1727 if new_child != null then
1728 new_child.parent = self
1729 assert new_child isa TKwredef
1730 _n_kwredef = new_child
1731 else
1732 _n_kwredef = null
1733 end
1734 return
1735 end
1736 if _n_visibility == old_child then
1737 if new_child != null then
1738 new_child.parent = self
1739 assert new_child isa AVisibility
1740 _n_visibility = new_child
1741 else
1742 abort
1743 end
1744 return
1745 end
1746 if _n_kwmeth == old_child then
1747 if new_child != null then
1748 new_child.parent = self
1749 assert new_child isa TKwmeth
1750 _n_kwmeth = new_child
1751 else
1752 abort
1753 end
1754 return
1755 end
1756 if _n_methid == old_child then
1757 if new_child != null then
1758 new_child.parent = self
1759 assert new_child isa AMethid
1760 _n_methid = new_child
1761 else
1762 abort
1763 end
1764 return
1765 end
1766 if _n_signature == old_child then
1767 if new_child != null then
1768 new_child.parent = self
1769 assert new_child isa ASignature
1770 _n_signature = new_child
1771 else
1772 abort
1773 end
1774 return
1775 end
1776 if _n_block == old_child then
1777 if new_child != null then
1778 new_child.parent = self
1779 assert new_child isa AExpr
1780 _n_block = new_child
1781 else
1782 _n_block = null
1783 end
1784 return
1785 end
1786 end
1787
1788 redef fun visit_all(v: Visitor)
1789 do
1790 if _n_doc != null then
1791 v.enter_visit(_n_doc.as(not null))
1792 end
1793 if _n_kwredef != null then
1794 v.enter_visit(_n_kwredef.as(not null))
1795 end
1796 v.enter_visit(_n_visibility)
1797 v.enter_visit(_n_kwmeth)
1798 v.enter_visit(_n_methid)
1799 v.enter_visit(_n_signature)
1800 if _n_block != null then
1801 v.enter_visit(_n_block.as(not null))
1802 end
1803 end
1804 end
1805 redef class AConcreteInitPropdef
1806 private init empty_init do end
1807
1808 init init_aconcreteinitpropdef (
1809 n_doc: nullable ADoc,
1810 n_kwredef: nullable TKwredef,
1811 n_visibility: nullable AVisibility,
1812 n_kwinit: nullable TKwinit,
1813 n_methid: nullable AMethid,
1814 n_signature: nullable ASignature,
1815 n_block: nullable AExpr
1816 )
1817 do
1818 empty_init
1819 _n_doc = n_doc
1820 if n_doc != null then
1821 n_doc.parent = self
1822 end
1823 _n_kwredef = n_kwredef
1824 if n_kwredef != null then
1825 n_kwredef.parent = self
1826 end
1827 _n_visibility = n_visibility.as(not null)
1828 n_visibility.parent = self
1829 _n_kwinit = n_kwinit.as(not null)
1830 n_kwinit.parent = self
1831 _n_methid = n_methid
1832 if n_methid != null then
1833 n_methid.parent = self
1834 end
1835 _n_signature = n_signature.as(not null)
1836 n_signature.parent = self
1837 _n_block = n_block
1838 if n_block != null then
1839 n_block.parent = self
1840 end
1841 end
1842
1843 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1844 do
1845 if _n_doc == old_child then
1846 if new_child != null then
1847 new_child.parent = self
1848 assert new_child isa ADoc
1849 _n_doc = new_child
1850 else
1851 _n_doc = null
1852 end
1853 return
1854 end
1855 if _n_kwredef == old_child then
1856 if new_child != null then
1857 new_child.parent = self
1858 assert new_child isa TKwredef
1859 _n_kwredef = new_child
1860 else
1861 _n_kwredef = null
1862 end
1863 return
1864 end
1865 if _n_visibility == old_child then
1866 if new_child != null then
1867 new_child.parent = self
1868 assert new_child isa AVisibility
1869 _n_visibility = new_child
1870 else
1871 abort
1872 end
1873 return
1874 end
1875 if _n_kwinit == old_child then
1876 if new_child != null then
1877 new_child.parent = self
1878 assert new_child isa TKwinit
1879 _n_kwinit = new_child
1880 else
1881 abort
1882 end
1883 return
1884 end
1885 if _n_methid == old_child then
1886 if new_child != null then
1887 new_child.parent = self
1888 assert new_child isa AMethid
1889 _n_methid = new_child
1890 else
1891 _n_methid = null
1892 end
1893 return
1894 end
1895 if _n_signature == old_child then
1896 if new_child != null then
1897 new_child.parent = self
1898 assert new_child isa ASignature
1899 _n_signature = new_child
1900 else
1901 abort
1902 end
1903 return
1904 end
1905 if _n_block == old_child then
1906 if new_child != null then
1907 new_child.parent = self
1908 assert new_child isa AExpr
1909 _n_block = new_child
1910 else
1911 _n_block = null
1912 end
1913 return
1914 end
1915 end
1916
1917 redef fun visit_all(v: Visitor)
1918 do
1919 if _n_doc != null then
1920 v.enter_visit(_n_doc.as(not null))
1921 end
1922 if _n_kwredef != null then
1923 v.enter_visit(_n_kwredef.as(not null))
1924 end
1925 v.enter_visit(_n_visibility)
1926 v.enter_visit(_n_kwinit)
1927 if _n_methid != null then
1928 v.enter_visit(_n_methid.as(not null))
1929 end
1930 v.enter_visit(_n_signature)
1931 if _n_block != null then
1932 v.enter_visit(_n_block.as(not null))
1933 end
1934 end
1935 end
1936 redef class AExternInitPropdef
1937 private init empty_init do end
1938
1939 init init_aexterninitpropdef (
1940 n_doc: nullable ADoc,
1941 n_kwredef: nullable TKwredef,
1942 n_visibility: nullable AVisibility,
1943 n_kwnew: nullable TKwnew,
1944 n_methid: nullable AMethid,
1945 n_signature: nullable ASignature,
1946 n_extern: nullable TString,
1947 n_extern_calls: nullable AExternCalls,
1948 n_extern_code_block: nullable AExternCodeBlock
1949 )
1950 do
1951 empty_init
1952 _n_doc = n_doc
1953 if n_doc != null then
1954 n_doc.parent = self
1955 end
1956 _n_kwredef = n_kwredef
1957 if n_kwredef != null then
1958 n_kwredef.parent = self
1959 end
1960 _n_visibility = n_visibility.as(not null)
1961 n_visibility.parent = self
1962 _n_kwnew = n_kwnew.as(not null)
1963 n_kwnew.parent = self
1964 _n_methid = n_methid
1965 if n_methid != null then
1966 n_methid.parent = self
1967 end
1968 _n_signature = n_signature.as(not null)
1969 n_signature.parent = self
1970 _n_extern = n_extern
1971 if n_extern != null then
1972 n_extern.parent = self
1973 end
1974 _n_extern_calls = n_extern_calls
1975 if n_extern_calls != null then
1976 n_extern_calls.parent = self
1977 end
1978 _n_extern_code_block = n_extern_code_block
1979 if n_extern_code_block != null then
1980 n_extern_code_block.parent = self
1981 end
1982 end
1983
1984 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1985 do
1986 if _n_doc == old_child then
1987 if new_child != null then
1988 new_child.parent = self
1989 assert new_child isa ADoc
1990 _n_doc = new_child
1991 else
1992 _n_doc = null
1993 end
1994 return
1995 end
1996 if _n_kwredef == old_child then
1997 if new_child != null then
1998 new_child.parent = self
1999 assert new_child isa TKwredef
2000 _n_kwredef = new_child
2001 else
2002 _n_kwredef = null
2003 end
2004 return
2005 end
2006 if _n_visibility == old_child then
2007 if new_child != null then
2008 new_child.parent = self
2009 assert new_child isa AVisibility
2010 _n_visibility = new_child
2011 else
2012 abort
2013 end
2014 return
2015 end
2016 if _n_kwnew == old_child then
2017 if new_child != null then
2018 new_child.parent = self
2019 assert new_child isa TKwnew
2020 _n_kwnew = new_child
2021 else
2022 abort
2023 end
2024 return
2025 end
2026 if _n_methid == old_child then
2027 if new_child != null then
2028 new_child.parent = self
2029 assert new_child isa AMethid
2030 _n_methid = new_child
2031 else
2032 _n_methid = null
2033 end
2034 return
2035 end
2036 if _n_signature == old_child then
2037 if new_child != null then
2038 new_child.parent = self
2039 assert new_child isa ASignature
2040 _n_signature = new_child
2041 else
2042 abort
2043 end
2044 return
2045 end
2046 if _n_extern == old_child then
2047 if new_child != null then
2048 new_child.parent = self
2049 assert new_child isa TString
2050 _n_extern = new_child
2051 else
2052 _n_extern = null
2053 end
2054 return
2055 end
2056 if _n_extern_calls == old_child then
2057 if new_child != null then
2058 new_child.parent = self
2059 assert new_child isa AExternCalls
2060 _n_extern_calls = new_child
2061 else
2062 _n_extern_calls = null
2063 end
2064 return
2065 end
2066 if _n_extern_code_block == old_child then
2067 if new_child != null then
2068 new_child.parent = self
2069 assert new_child isa AExternCodeBlock
2070 _n_extern_code_block = new_child
2071 else
2072 _n_extern_code_block = null
2073 end
2074 return
2075 end
2076 end
2077
2078 redef fun visit_all(v: Visitor)
2079 do
2080 if _n_doc != null then
2081 v.enter_visit(_n_doc.as(not null))
2082 end
2083 if _n_kwredef != null then
2084 v.enter_visit(_n_kwredef.as(not null))
2085 end
2086 v.enter_visit(_n_visibility)
2087 v.enter_visit(_n_kwnew)
2088 if _n_methid != null then
2089 v.enter_visit(_n_methid.as(not null))
2090 end
2091 v.enter_visit(_n_signature)
2092 if _n_extern != null then
2093 v.enter_visit(_n_extern.as(not null))
2094 end
2095 if _n_extern_calls != null then
2096 v.enter_visit(_n_extern_calls.as(not null))
2097 end
2098 if _n_extern_code_block != null then
2099 v.enter_visit(_n_extern_code_block.as(not null))
2100 end
2101 end
2102 end
2103 redef class AMainMethPropdef
2104 private init empty_init do end
2105
2106 init init_amainmethpropdef (
2107 n_kwredef: nullable TKwredef,
2108 n_block: nullable AExpr
2109 )
2110 do
2111 empty_init
2112 _n_kwredef = n_kwredef
2113 if n_kwredef != null then
2114 n_kwredef.parent = self
2115 end
2116 _n_block = n_block
2117 if n_block != null then
2118 n_block.parent = self
2119 end
2120 end
2121
2122 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2123 do
2124 if _n_kwredef == old_child then
2125 if new_child != null then
2126 new_child.parent = self
2127 assert new_child isa TKwredef
2128 _n_kwredef = new_child
2129 else
2130 _n_kwredef = null
2131 end
2132 return
2133 end
2134 if _n_block == old_child then
2135 if new_child != null then
2136 new_child.parent = self
2137 assert new_child isa AExpr
2138 _n_block = new_child
2139 else
2140 _n_block = null
2141 end
2142 return
2143 end
2144 end
2145
2146 redef fun visit_all(v: Visitor)
2147 do
2148 if _n_kwredef != null then
2149 v.enter_visit(_n_kwredef.as(not null))
2150 end
2151 if _n_block != null then
2152 v.enter_visit(_n_block.as(not null))
2153 end
2154 end
2155 end
2156 redef class ATypePropdef
2157 private init empty_init do end
2158
2159 init init_atypepropdef (
2160 n_doc: nullable ADoc,
2161 n_kwredef: nullable TKwredef,
2162 n_visibility: nullable AVisibility,
2163 n_kwtype: nullable TKwtype,
2164 n_id: nullable TClassid,
2165 n_type: nullable AType
2166 )
2167 do
2168 empty_init
2169 _n_doc = n_doc
2170 if n_doc != null then
2171 n_doc.parent = self
2172 end
2173 _n_kwredef = n_kwredef
2174 if n_kwredef != null then
2175 n_kwredef.parent = self
2176 end
2177 _n_visibility = n_visibility.as(not null)
2178 n_visibility.parent = self
2179 _n_kwtype = n_kwtype.as(not null)
2180 n_kwtype.parent = self
2181 _n_id = n_id.as(not null)
2182 n_id.parent = self
2183 _n_type = n_type.as(not null)
2184 n_type.parent = self
2185 end
2186
2187 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2188 do
2189 if _n_doc == old_child then
2190 if new_child != null then
2191 new_child.parent = self
2192 assert new_child isa ADoc
2193 _n_doc = new_child
2194 else
2195 _n_doc = null
2196 end
2197 return
2198 end
2199 if _n_kwredef == old_child then
2200 if new_child != null then
2201 new_child.parent = self
2202 assert new_child isa TKwredef
2203 _n_kwredef = new_child
2204 else
2205 _n_kwredef = null
2206 end
2207 return
2208 end
2209 if _n_visibility == old_child then
2210 if new_child != null then
2211 new_child.parent = self
2212 assert new_child isa AVisibility
2213 _n_visibility = new_child
2214 else
2215 abort
2216 end
2217 return
2218 end
2219 if _n_kwtype == old_child then
2220 if new_child != null then
2221 new_child.parent = self
2222 assert new_child isa TKwtype
2223 _n_kwtype = new_child
2224 else
2225 abort
2226 end
2227 return
2228 end
2229 if _n_id == old_child then
2230 if new_child != null then
2231 new_child.parent = self
2232 assert new_child isa TClassid
2233 _n_id = new_child
2234 else
2235 abort
2236 end
2237 return
2238 end
2239 if _n_type == old_child then
2240 if new_child != null then
2241 new_child.parent = self
2242 assert new_child isa AType
2243 _n_type = new_child
2244 else
2245 abort
2246 end
2247 return
2248 end
2249 end
2250
2251 redef fun visit_all(v: Visitor)
2252 do
2253 if _n_doc != null then
2254 v.enter_visit(_n_doc.as(not null))
2255 end
2256 if _n_kwredef != null then
2257 v.enter_visit(_n_kwredef.as(not null))
2258 end
2259 v.enter_visit(_n_visibility)
2260 v.enter_visit(_n_kwtype)
2261 v.enter_visit(_n_id)
2262 v.enter_visit(_n_type)
2263 end
2264 end
2265 redef class AReadAble
2266 private init empty_init do end
2267
2268 init init_areadable (
2269 n_kwredef: nullable TKwredef,
2270 n_kwreadable: nullable TKwreadable
2271 )
2272 do
2273 empty_init
2274 _n_kwredef = n_kwredef
2275 if n_kwredef != null then
2276 n_kwredef.parent = self
2277 end
2278 _n_kwreadable = n_kwreadable.as(not null)
2279 n_kwreadable.parent = self
2280 end
2281
2282 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2283 do
2284 if _n_kwredef == old_child then
2285 if new_child != null then
2286 new_child.parent = self
2287 assert new_child isa TKwredef
2288 _n_kwredef = new_child
2289 else
2290 _n_kwredef = null
2291 end
2292 return
2293 end
2294 if _n_kwreadable == old_child then
2295 if new_child != null then
2296 new_child.parent = self
2297 assert new_child isa TKwreadable
2298 _n_kwreadable = new_child
2299 else
2300 abort
2301 end
2302 return
2303 end
2304 end
2305
2306 redef fun visit_all(v: Visitor)
2307 do
2308 if _n_kwredef != null then
2309 v.enter_visit(_n_kwredef.as(not null))
2310 end
2311 v.enter_visit(_n_kwreadable)
2312 end
2313 end
2314 redef class AWriteAble
2315 private init empty_init do end
2316
2317 init init_awriteable (
2318 n_kwredef: nullable TKwredef,
2319 n_visibility: nullable AVisibility,
2320 n_kwwritable: nullable TKwwritable
2321 )
2322 do
2323 empty_init
2324 _n_kwredef = n_kwredef
2325 if n_kwredef != null then
2326 n_kwredef.parent = self
2327 end
2328 _n_visibility = n_visibility
2329 if n_visibility != null then
2330 n_visibility.parent = self
2331 end
2332 _n_kwwritable = n_kwwritable.as(not null)
2333 n_kwwritable.parent = self
2334 end
2335
2336 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2337 do
2338 if _n_kwredef == old_child then
2339 if new_child != null then
2340 new_child.parent = self
2341 assert new_child isa TKwredef
2342 _n_kwredef = new_child
2343 else
2344 _n_kwredef = null
2345 end
2346 return
2347 end
2348 if _n_visibility == old_child then
2349 if new_child != null then
2350 new_child.parent = self
2351 assert new_child isa AVisibility
2352 _n_visibility = new_child
2353 else
2354 _n_visibility = null
2355 end
2356 return
2357 end
2358 if _n_kwwritable == old_child then
2359 if new_child != null then
2360 new_child.parent = self
2361 assert new_child isa TKwwritable
2362 _n_kwwritable = new_child
2363 else
2364 abort
2365 end
2366 return
2367 end
2368 end
2369
2370 redef fun visit_all(v: Visitor)
2371 do
2372 if _n_kwredef != null then
2373 v.enter_visit(_n_kwredef.as(not null))
2374 end
2375 if _n_visibility != null then
2376 v.enter_visit(_n_visibility.as(not null))
2377 end
2378 v.enter_visit(_n_kwwritable)
2379 end
2380 end
2381 redef class AIdMethid
2382 private init empty_init do end
2383
2384 init init_aidmethid (
2385 n_id: nullable TId
2386 )
2387 do
2388 empty_init
2389 _n_id = n_id.as(not null)
2390 n_id.parent = self
2391 end
2392
2393 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2394 do
2395 if _n_id == old_child then
2396 if new_child != null then
2397 new_child.parent = self
2398 assert new_child isa TId
2399 _n_id = new_child
2400 else
2401 abort
2402 end
2403 return
2404 end
2405 end
2406
2407 redef fun visit_all(v: Visitor)
2408 do
2409 v.enter_visit(_n_id)
2410 end
2411 end
2412 redef class APlusMethid
2413 private init empty_init do end
2414
2415 init init_aplusmethid (
2416 n_plus: nullable TPlus
2417 )
2418 do
2419 empty_init
2420 _n_plus = n_plus.as(not null)
2421 n_plus.parent = self
2422 end
2423
2424 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2425 do
2426 if _n_plus == old_child then
2427 if new_child != null then
2428 new_child.parent = self
2429 assert new_child isa TPlus
2430 _n_plus = new_child
2431 else
2432 abort
2433 end
2434 return
2435 end
2436 end
2437
2438 redef fun visit_all(v: Visitor)
2439 do
2440 v.enter_visit(_n_plus)
2441 end
2442 end
2443 redef class AMinusMethid
2444 private init empty_init do end
2445
2446 init init_aminusmethid (
2447 n_minus: nullable TMinus
2448 )
2449 do
2450 empty_init
2451 _n_minus = n_minus.as(not null)
2452 n_minus.parent = self
2453 end
2454
2455 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2456 do
2457 if _n_minus == old_child then
2458 if new_child != null then
2459 new_child.parent = self
2460 assert new_child isa TMinus
2461 _n_minus = new_child
2462 else
2463 abort
2464 end
2465 return
2466 end
2467 end
2468
2469 redef fun visit_all(v: Visitor)
2470 do
2471 v.enter_visit(_n_minus)
2472 end
2473 end
2474 redef class AStarMethid
2475 private init empty_init do end
2476
2477 init init_astarmethid (
2478 n_star: nullable TStar
2479 )
2480 do
2481 empty_init
2482 _n_star = n_star.as(not null)
2483 n_star.parent = self
2484 end
2485
2486 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2487 do
2488 if _n_star == old_child then
2489 if new_child != null then
2490 new_child.parent = self
2491 assert new_child isa TStar
2492 _n_star = new_child
2493 else
2494 abort
2495 end
2496 return
2497 end
2498 end
2499
2500 redef fun visit_all(v: Visitor)
2501 do
2502 v.enter_visit(_n_star)
2503 end
2504 end
2505 redef class ASlashMethid
2506 private init empty_init do end
2507
2508 init init_aslashmethid (
2509 n_slash: nullable TSlash
2510 )
2511 do
2512 empty_init
2513 _n_slash = n_slash.as(not null)
2514 n_slash.parent = self
2515 end
2516
2517 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2518 do
2519 if _n_slash == old_child then
2520 if new_child != null then
2521 new_child.parent = self
2522 assert new_child isa TSlash
2523 _n_slash = new_child
2524 else
2525 abort
2526 end
2527 return
2528 end
2529 end
2530
2531 redef fun visit_all(v: Visitor)
2532 do
2533 v.enter_visit(_n_slash)
2534 end
2535 end
2536 redef class APercentMethid
2537 private init empty_init do end
2538
2539 init init_apercentmethid (
2540 n_percent: nullable TPercent
2541 )
2542 do
2543 empty_init
2544 _n_percent = n_percent.as(not null)
2545 n_percent.parent = self
2546 end
2547
2548 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2549 do
2550 if _n_percent == old_child then
2551 if new_child != null then
2552 new_child.parent = self
2553 assert new_child isa TPercent
2554 _n_percent = new_child
2555 else
2556 abort
2557 end
2558 return
2559 end
2560 end
2561
2562 redef fun visit_all(v: Visitor)
2563 do
2564 v.enter_visit(_n_percent)
2565 end
2566 end
2567 redef class AEqMethid
2568 private init empty_init do end
2569
2570 init init_aeqmethid (
2571 n_eq: nullable TEq
2572 )
2573 do
2574 empty_init
2575 _n_eq = n_eq.as(not null)
2576 n_eq.parent = self
2577 end
2578
2579 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2580 do
2581 if _n_eq == old_child then
2582 if new_child != null then
2583 new_child.parent = self
2584 assert new_child isa TEq
2585 _n_eq = new_child
2586 else
2587 abort
2588 end
2589 return
2590 end
2591 end
2592
2593 redef fun visit_all(v: Visitor)
2594 do
2595 v.enter_visit(_n_eq)
2596 end
2597 end
2598 redef class ANeMethid
2599 private init empty_init do end
2600
2601 init init_anemethid (
2602 n_ne: nullable TNe
2603 )
2604 do
2605 empty_init
2606 _n_ne = n_ne.as(not null)
2607 n_ne.parent = self
2608 end
2609
2610 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2611 do
2612 if _n_ne == old_child then
2613 if new_child != null then
2614 new_child.parent = self
2615 assert new_child isa TNe
2616 _n_ne = new_child
2617 else
2618 abort
2619 end
2620 return
2621 end
2622 end
2623
2624 redef fun visit_all(v: Visitor)
2625 do
2626 v.enter_visit(_n_ne)
2627 end
2628 end
2629 redef class ALeMethid
2630 private init empty_init do end
2631
2632 init init_alemethid (
2633 n_le: nullable TLe
2634 )
2635 do
2636 empty_init
2637 _n_le = n_le.as(not null)
2638 n_le.parent = self
2639 end
2640
2641 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2642 do
2643 if _n_le == old_child then
2644 if new_child != null then
2645 new_child.parent = self
2646 assert new_child isa TLe
2647 _n_le = new_child
2648 else
2649 abort
2650 end
2651 return
2652 end
2653 end
2654
2655 redef fun visit_all(v: Visitor)
2656 do
2657 v.enter_visit(_n_le)
2658 end
2659 end
2660 redef class AGeMethid
2661 private init empty_init do end
2662
2663 init init_agemethid (
2664 n_ge: nullable TGe
2665 )
2666 do
2667 empty_init
2668 _n_ge = n_ge.as(not null)
2669 n_ge.parent = self
2670 end
2671
2672 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2673 do
2674 if _n_ge == old_child then
2675 if new_child != null then
2676 new_child.parent = self
2677 assert new_child isa TGe
2678 _n_ge = new_child
2679 else
2680 abort
2681 end
2682 return
2683 end
2684 end
2685
2686 redef fun visit_all(v: Visitor)
2687 do
2688 v.enter_visit(_n_ge)
2689 end
2690 end
2691 redef class ALtMethid
2692 private init empty_init do end
2693
2694 init init_altmethid (
2695 n_lt: nullable TLt
2696 )
2697 do
2698 empty_init
2699 _n_lt = n_lt.as(not null)
2700 n_lt.parent = self
2701 end
2702
2703 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2704 do
2705 if _n_lt == old_child then
2706 if new_child != null then
2707 new_child.parent = self
2708 assert new_child isa TLt
2709 _n_lt = new_child
2710 else
2711 abort
2712 end
2713 return
2714 end
2715 end
2716
2717 redef fun visit_all(v: Visitor)
2718 do
2719 v.enter_visit(_n_lt)
2720 end
2721 end
2722 redef class AGtMethid
2723 private init empty_init do end
2724
2725 init init_agtmethid (
2726 n_gt: nullable TGt
2727 )
2728 do
2729 empty_init
2730 _n_gt = n_gt.as(not null)
2731 n_gt.parent = self
2732 end
2733
2734 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2735 do
2736 if _n_gt == old_child then
2737 if new_child != null then
2738 new_child.parent = self
2739 assert new_child isa TGt
2740 _n_gt = new_child
2741 else
2742 abort
2743 end
2744 return
2745 end
2746 end
2747
2748 redef fun visit_all(v: Visitor)
2749 do
2750 v.enter_visit(_n_gt)
2751 end
2752 end
2753 redef class ALlMethid
2754 private init empty_init do end
2755
2756 init init_allmethid (
2757 n_ll: nullable TLl
2758 )
2759 do
2760 empty_init
2761 _n_ll = n_ll.as(not null)
2762 n_ll.parent = self
2763 end
2764
2765 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2766 do
2767 if _n_ll == old_child then
2768 if new_child != null then
2769 new_child.parent = self
2770 assert new_child isa TLl
2771 _n_ll = new_child
2772 else
2773 abort
2774 end
2775 return
2776 end
2777 end
2778
2779 redef fun visit_all(v: Visitor)
2780 do
2781 v.enter_visit(_n_ll)
2782 end
2783 end
2784 redef class AGgMethid
2785 private init empty_init do end
2786
2787 init init_aggmethid (
2788 n_gg: nullable TGg
2789 )
2790 do
2791 empty_init
2792 _n_gg = n_gg.as(not null)
2793 n_gg.parent = self
2794 end
2795
2796 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2797 do
2798 if _n_gg == old_child then
2799 if new_child != null then
2800 new_child.parent = self
2801 assert new_child isa TGg
2802 _n_gg = new_child
2803 else
2804 abort
2805 end
2806 return
2807 end
2808 end
2809
2810 redef fun visit_all(v: Visitor)
2811 do
2812 v.enter_visit(_n_gg)
2813 end
2814 end
2815 redef class ABraMethid
2816 private init empty_init do end
2817
2818 init init_abramethid (
2819 n_obra: nullable TObra,
2820 n_cbra: nullable TCbra
2821 )
2822 do
2823 empty_init
2824 _n_obra = n_obra.as(not null)
2825 n_obra.parent = self
2826 _n_cbra = n_cbra.as(not null)
2827 n_cbra.parent = self
2828 end
2829
2830 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2831 do
2832 if _n_obra == old_child then
2833 if new_child != null then
2834 new_child.parent = self
2835 assert new_child isa TObra
2836 _n_obra = new_child
2837 else
2838 abort
2839 end
2840 return
2841 end
2842 if _n_cbra == old_child then
2843 if new_child != null then
2844 new_child.parent = self
2845 assert new_child isa TCbra
2846 _n_cbra = new_child
2847 else
2848 abort
2849 end
2850 return
2851 end
2852 end
2853
2854 redef fun visit_all(v: Visitor)
2855 do
2856 v.enter_visit(_n_obra)
2857 v.enter_visit(_n_cbra)
2858 end
2859 end
2860 redef class AStarshipMethid
2861 private init empty_init do end
2862
2863 init init_astarshipmethid (
2864 n_starship: nullable TStarship
2865 )
2866 do
2867 empty_init
2868 _n_starship = n_starship.as(not null)
2869 n_starship.parent = self
2870 end
2871
2872 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2873 do
2874 if _n_starship == old_child then
2875 if new_child != null then
2876 new_child.parent = self
2877 assert new_child isa TStarship
2878 _n_starship = new_child
2879 else
2880 abort
2881 end
2882 return
2883 end
2884 end
2885
2886 redef fun visit_all(v: Visitor)
2887 do
2888 v.enter_visit(_n_starship)
2889 end
2890 end
2891 redef class AAssignMethid
2892 private init empty_init do end
2893
2894 init init_aassignmethid (
2895 n_id: nullable TId,
2896 n_assign: nullable TAssign
2897 )
2898 do
2899 empty_init
2900 _n_id = n_id.as(not null)
2901 n_id.parent = self
2902 _n_assign = n_assign.as(not null)
2903 n_assign.parent = self
2904 end
2905
2906 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2907 do
2908 if _n_id == old_child then
2909 if new_child != null then
2910 new_child.parent = self
2911 assert new_child isa TId
2912 _n_id = new_child
2913 else
2914 abort
2915 end
2916 return
2917 end
2918 if _n_assign == old_child then
2919 if new_child != null then
2920 new_child.parent = self
2921 assert new_child isa TAssign
2922 _n_assign = new_child
2923 else
2924 abort
2925 end
2926 return
2927 end
2928 end
2929
2930 redef fun visit_all(v: Visitor)
2931 do
2932 v.enter_visit(_n_id)
2933 v.enter_visit(_n_assign)
2934 end
2935 end
2936 redef class ABraassignMethid
2937 private init empty_init do end
2938
2939 init init_abraassignmethid (
2940 n_obra: nullable TObra,
2941 n_cbra: nullable TCbra,
2942 n_assign: nullable TAssign
2943 )
2944 do
2945 empty_init
2946 _n_obra = n_obra.as(not null)
2947 n_obra.parent = self
2948 _n_cbra = n_cbra.as(not null)
2949 n_cbra.parent = self
2950 _n_assign = n_assign.as(not null)
2951 n_assign.parent = self
2952 end
2953
2954 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
2955 do
2956 if _n_obra == old_child then
2957 if new_child != null then
2958 new_child.parent = self
2959 assert new_child isa TObra
2960 _n_obra = new_child
2961 else
2962 abort
2963 end
2964 return
2965 end
2966 if _n_cbra == old_child then
2967 if new_child != null then
2968 new_child.parent = self
2969 assert new_child isa TCbra
2970 _n_cbra = new_child
2971 else
2972 abort
2973 end
2974 return
2975 end
2976 if _n_assign == old_child then
2977 if new_child != null then
2978 new_child.parent = self
2979 assert new_child isa TAssign
2980 _n_assign = new_child
2981 else
2982 abort
2983 end
2984 return
2985 end
2986 end
2987
2988 redef fun visit_all(v: Visitor)
2989 do
2990 v.enter_visit(_n_obra)
2991 v.enter_visit(_n_cbra)
2992 v.enter_visit(_n_assign)
2993 end
2994 end
2995 redef class ASignature
2996 private init empty_init do end
2997
2998 init init_asignature (
2999 n_opar: nullable TOpar,
3000 n_params: Collection[Object], # Should be Collection[AParam]
3001 n_cpar: nullable TCpar,
3002 n_type: nullable AType,
3003 n_closure_decls: Collection[Object] # Should be Collection[AClosureDecl]
3004 )
3005 do
3006 empty_init
3007 _n_opar = n_opar
3008 if n_opar != null then
3009 n_opar.parent = self
3010 end
3011 for n in n_params do
3012 assert n isa AParam
3013 _n_params.add(n)
3014 n.parent = self
3015 end
3016 _n_cpar = n_cpar
3017 if n_cpar != null then
3018 n_cpar.parent = self
3019 end
3020 _n_type = n_type
3021 if n_type != null then
3022 n_type.parent = self
3023 end
3024 for n in n_closure_decls do
3025 assert n isa AClosureDecl
3026 _n_closure_decls.add(n)
3027 n.parent = self
3028 end
3029 end
3030
3031 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3032 do
3033 if _n_opar == old_child then
3034 if new_child != null then
3035 new_child.parent = self
3036 assert new_child isa TOpar
3037 _n_opar = new_child
3038 else
3039 _n_opar = null
3040 end
3041 return
3042 end
3043 for i in [0.._n_params.length[ do
3044 if _n_params[i] == old_child then
3045 if new_child != null then
3046 assert new_child isa AParam
3047 _n_params[i] = new_child
3048 new_child.parent = self
3049 else
3050 _n_params.remove_at(i)
3051 end
3052 return
3053 end
3054 end
3055 if _n_cpar == old_child then
3056 if new_child != null then
3057 new_child.parent = self
3058 assert new_child isa TCpar
3059 _n_cpar = new_child
3060 else
3061 _n_cpar = null
3062 end
3063 return
3064 end
3065 if _n_type == old_child then
3066 if new_child != null then
3067 new_child.parent = self
3068 assert new_child isa AType
3069 _n_type = new_child
3070 else
3071 _n_type = null
3072 end
3073 return
3074 end
3075 for i in [0.._n_closure_decls.length[ do
3076 if _n_closure_decls[i] == old_child then
3077 if new_child != null then
3078 assert new_child isa AClosureDecl
3079 _n_closure_decls[i] = new_child
3080 new_child.parent = self
3081 else
3082 _n_closure_decls.remove_at(i)
3083 end
3084 return
3085 end
3086 end
3087 end
3088
3089 redef fun visit_all(v: Visitor)
3090 do
3091 if _n_opar != null then
3092 v.enter_visit(_n_opar.as(not null))
3093 end
3094 for n in _n_params do
3095 v.enter_visit(n)
3096 end
3097 if _n_cpar != null then
3098 v.enter_visit(_n_cpar.as(not null))
3099 end
3100 if _n_type != null then
3101 v.enter_visit(_n_type.as(not null))
3102 end
3103 for n in _n_closure_decls do
3104 v.enter_visit(n)
3105 end
3106 end
3107 end
3108 redef class AParam
3109 private init empty_init do end
3110
3111 init init_aparam (
3112 n_id: nullable TId,
3113 n_type: nullable AType,
3114 n_dotdotdot: nullable TDotdotdot
3115 )
3116 do
3117 empty_init
3118 _n_id = n_id.as(not null)
3119 n_id.parent = self
3120 _n_type = n_type
3121 if n_type != null then
3122 n_type.parent = self
3123 end
3124 _n_dotdotdot = n_dotdotdot
3125 if n_dotdotdot != null then
3126 n_dotdotdot.parent = self
3127 end
3128 end
3129
3130 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3131 do
3132 if _n_id == old_child then
3133 if new_child != null then
3134 new_child.parent = self
3135 assert new_child isa TId
3136 _n_id = new_child
3137 else
3138 abort
3139 end
3140 return
3141 end
3142 if _n_type == old_child then
3143 if new_child != null then
3144 new_child.parent = self
3145 assert new_child isa AType
3146 _n_type = new_child
3147 else
3148 _n_type = null
3149 end
3150 return
3151 end
3152 if _n_dotdotdot == old_child then
3153 if new_child != null then
3154 new_child.parent = self
3155 assert new_child isa TDotdotdot
3156 _n_dotdotdot = new_child
3157 else
3158 _n_dotdotdot = null
3159 end
3160 return
3161 end
3162 end
3163
3164 redef fun visit_all(v: Visitor)
3165 do
3166 v.enter_visit(_n_id)
3167 if _n_type != null then
3168 v.enter_visit(_n_type.as(not null))
3169 end
3170 if _n_dotdotdot != null then
3171 v.enter_visit(_n_dotdotdot.as(not null))
3172 end
3173 end
3174 end
3175 redef class AClosureDecl
3176 private init empty_init do end
3177
3178 init init_aclosuredecl (
3179 n_kwbreak: nullable TKwbreak,
3180 n_bang: nullable TBang,
3181 n_id: nullable TId,
3182 n_signature: nullable ASignature,
3183 n_expr: nullable AExpr
3184 )
3185 do
3186 empty_init
3187 _n_kwbreak = n_kwbreak
3188 if n_kwbreak != null then
3189 n_kwbreak.parent = self
3190 end
3191 _n_bang = n_bang.as(not null)
3192 n_bang.parent = self
3193 _n_id = n_id.as(not null)
3194 n_id.parent = self
3195 _n_signature = n_signature.as(not null)
3196 n_signature.parent = self
3197 _n_expr = n_expr
3198 if n_expr != null then
3199 n_expr.parent = self
3200 end
3201 end
3202
3203 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3204 do
3205 if _n_kwbreak == old_child then
3206 if new_child != null then
3207 new_child.parent = self
3208 assert new_child isa TKwbreak
3209 _n_kwbreak = new_child
3210 else
3211 _n_kwbreak = null
3212 end
3213 return
3214 end
3215 if _n_bang == old_child then
3216 if new_child != null then
3217 new_child.parent = self
3218 assert new_child isa TBang
3219 _n_bang = new_child
3220 else
3221 abort
3222 end
3223 return
3224 end
3225 if _n_id == old_child then
3226 if new_child != null then
3227 new_child.parent = self
3228 assert new_child isa TId
3229 _n_id = new_child
3230 else
3231 abort
3232 end
3233 return
3234 end
3235 if _n_signature == old_child then
3236 if new_child != null then
3237 new_child.parent = self
3238 assert new_child isa ASignature
3239 _n_signature = new_child
3240 else
3241 abort
3242 end
3243 return
3244 end
3245 if _n_expr == old_child then
3246 if new_child != null then
3247 new_child.parent = self
3248 assert new_child isa AExpr
3249 _n_expr = new_child
3250 else
3251 _n_expr = null
3252 end
3253 return
3254 end
3255 end
3256
3257 redef fun visit_all(v: Visitor)
3258 do
3259 if _n_kwbreak != null then
3260 v.enter_visit(_n_kwbreak.as(not null))
3261 end
3262 v.enter_visit(_n_bang)
3263 v.enter_visit(_n_id)
3264 v.enter_visit(_n_signature)
3265 if _n_expr != null then
3266 v.enter_visit(_n_expr.as(not null))
3267 end
3268 end
3269 end
3270 redef class AType
3271 private init empty_init do end
3272
3273 init init_atype (
3274 n_kwnullable: nullable TKwnullable,
3275 n_id: nullable TClassid,
3276 n_types: Collection[Object] # Should be Collection[AType]
3277 )
3278 do
3279 empty_init
3280 _n_kwnullable = n_kwnullable
3281 if n_kwnullable != null then
3282 n_kwnullable.parent = self
3283 end
3284 _n_id = n_id.as(not null)
3285 n_id.parent = self
3286 for n in n_types do
3287 assert n isa AType
3288 _n_types.add(n)
3289 n.parent = self
3290 end
3291 end
3292
3293 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3294 do
3295 if _n_kwnullable == old_child then
3296 if new_child != null then
3297 new_child.parent = self
3298 assert new_child isa TKwnullable
3299 _n_kwnullable = new_child
3300 else
3301 _n_kwnullable = null
3302 end
3303 return
3304 end
3305 if _n_id == old_child then
3306 if new_child != null then
3307 new_child.parent = self
3308 assert new_child isa TClassid
3309 _n_id = new_child
3310 else
3311 abort
3312 end
3313 return
3314 end
3315 for i in [0.._n_types.length[ do
3316 if _n_types[i] == old_child then
3317 if new_child != null then
3318 assert new_child isa AType
3319 _n_types[i] = new_child
3320 new_child.parent = self
3321 else
3322 _n_types.remove_at(i)
3323 end
3324 return
3325 end
3326 end
3327 end
3328
3329 redef fun visit_all(v: Visitor)
3330 do
3331 if _n_kwnullable != null then
3332 v.enter_visit(_n_kwnullable.as(not null))
3333 end
3334 v.enter_visit(_n_id)
3335 for n in _n_types do
3336 v.enter_visit(n)
3337 end
3338 end
3339 end
3340 redef class ALabel
3341 private init empty_init do end
3342
3343 init init_alabel (
3344 n_kwlabel: nullable TKwlabel,
3345 n_id: nullable TId
3346 )
3347 do
3348 empty_init
3349 _n_kwlabel = n_kwlabel.as(not null)
3350 n_kwlabel.parent = self
3351 _n_id = n_id.as(not null)
3352 n_id.parent = self
3353 end
3354
3355 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3356 do
3357 if _n_kwlabel == old_child then
3358 if new_child != null then
3359 new_child.parent = self
3360 assert new_child isa TKwlabel
3361 _n_kwlabel = new_child
3362 else
3363 abort
3364 end
3365 return
3366 end
3367 if _n_id == old_child then
3368 if new_child != null then
3369 new_child.parent = self
3370 assert new_child isa TId
3371 _n_id = new_child
3372 else
3373 abort
3374 end
3375 return
3376 end
3377 end
3378
3379 redef fun visit_all(v: Visitor)
3380 do
3381 v.enter_visit(_n_kwlabel)
3382 v.enter_visit(_n_id)
3383 end
3384 end
3385 redef class ABlockExpr
3386 private init empty_init do end
3387
3388 init init_ablockexpr (
3389 n_expr: Collection[Object], # Should be Collection[AExpr]
3390 n_kwend: nullable TKwend
3391 )
3392 do
3393 empty_init
3394 for n in n_expr do
3395 assert n isa AExpr
3396 _n_expr.add(n)
3397 n.parent = self
3398 end
3399 _n_kwend = n_kwend
3400 if n_kwend != null then
3401 n_kwend.parent = self
3402 end
3403 end
3404
3405 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3406 do
3407 for i in [0.._n_expr.length[ do
3408 if _n_expr[i] == old_child then
3409 if new_child != null then
3410 assert new_child isa AExpr
3411 _n_expr[i] = new_child
3412 new_child.parent = self
3413 else
3414 _n_expr.remove_at(i)
3415 end
3416 return
3417 end
3418 end
3419 if _n_kwend == old_child then
3420 if new_child != null then
3421 new_child.parent = self
3422 assert new_child isa TKwend
3423 _n_kwend = new_child
3424 else
3425 _n_kwend = null
3426 end
3427 return
3428 end
3429 end
3430
3431 redef fun visit_all(v: Visitor)
3432 do
3433 for n in _n_expr do
3434 v.enter_visit(n)
3435 end
3436 if _n_kwend != null then
3437 v.enter_visit(_n_kwend.as(not null))
3438 end
3439 end
3440 end
3441 redef class AVardeclExpr
3442 private init empty_init do end
3443
3444 init init_avardeclexpr (
3445 n_kwvar: nullable TKwvar,
3446 n_id: nullable TId,
3447 n_type: nullable AType,
3448 n_assign: nullable TAssign,
3449 n_expr: nullable AExpr
3450 )
3451 do
3452 empty_init
3453 _n_kwvar = n_kwvar.as(not null)
3454 n_kwvar.parent = self
3455 _n_id = n_id.as(not null)
3456 n_id.parent = self
3457 _n_type = n_type
3458 if n_type != null then
3459 n_type.parent = self
3460 end
3461 _n_assign = n_assign
3462 if n_assign != null then
3463 n_assign.parent = self
3464 end
3465 _n_expr = n_expr
3466 if n_expr != null then
3467 n_expr.parent = self
3468 end
3469 end
3470
3471 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3472 do
3473 if _n_kwvar == old_child then
3474 if new_child != null then
3475 new_child.parent = self
3476 assert new_child isa TKwvar
3477 _n_kwvar = new_child
3478 else
3479 abort
3480 end
3481 return
3482 end
3483 if _n_id == old_child then
3484 if new_child != null then
3485 new_child.parent = self
3486 assert new_child isa TId
3487 _n_id = new_child
3488 else
3489 abort
3490 end
3491 return
3492 end
3493 if _n_type == old_child then
3494 if new_child != null then
3495 new_child.parent = self
3496 assert new_child isa AType
3497 _n_type = new_child
3498 else
3499 _n_type = null
3500 end
3501 return
3502 end
3503 if _n_assign == old_child then
3504 if new_child != null then
3505 new_child.parent = self
3506 assert new_child isa TAssign
3507 _n_assign = new_child
3508 else
3509 _n_assign = null
3510 end
3511 return
3512 end
3513 if _n_expr == old_child then
3514 if new_child != null then
3515 new_child.parent = self
3516 assert new_child isa AExpr
3517 _n_expr = new_child
3518 else
3519 _n_expr = null
3520 end
3521 return
3522 end
3523 end
3524
3525 redef fun visit_all(v: Visitor)
3526 do
3527 v.enter_visit(_n_kwvar)
3528 v.enter_visit(_n_id)
3529 if _n_type != null then
3530 v.enter_visit(_n_type.as(not null))
3531 end
3532 if _n_assign != null then
3533 v.enter_visit(_n_assign.as(not null))
3534 end
3535 if _n_expr != null then
3536 v.enter_visit(_n_expr.as(not null))
3537 end
3538 end
3539 end
3540 redef class AReturnExpr
3541 private init empty_init do end
3542
3543 init init_areturnexpr (
3544 n_kwreturn: nullable TKwreturn,
3545 n_expr: nullable AExpr
3546 )
3547 do
3548 empty_init
3549 _n_kwreturn = n_kwreturn
3550 if n_kwreturn != null then
3551 n_kwreturn.parent = self
3552 end
3553 _n_expr = n_expr
3554 if n_expr != null then
3555 n_expr.parent = self
3556 end
3557 end
3558
3559 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3560 do
3561 if _n_kwreturn == old_child then
3562 if new_child != null then
3563 new_child.parent = self
3564 assert new_child isa TKwreturn
3565 _n_kwreturn = new_child
3566 else
3567 _n_kwreturn = null
3568 end
3569 return
3570 end
3571 if _n_expr == old_child then
3572 if new_child != null then
3573 new_child.parent = self
3574 assert new_child isa AExpr
3575 _n_expr = new_child
3576 else
3577 _n_expr = null
3578 end
3579 return
3580 end
3581 end
3582
3583 redef fun visit_all(v: Visitor)
3584 do
3585 if _n_kwreturn != null then
3586 v.enter_visit(_n_kwreturn.as(not null))
3587 end
3588 if _n_expr != null then
3589 v.enter_visit(_n_expr.as(not null))
3590 end
3591 end
3592 end
3593 redef class ABreakExpr
3594 private init empty_init do end
3595
3596 init init_abreakexpr (
3597 n_kwbreak: nullable TKwbreak,
3598 n_label: nullable ALabel,
3599 n_expr: nullable AExpr
3600 )
3601 do
3602 empty_init
3603 _n_kwbreak = n_kwbreak.as(not null)
3604 n_kwbreak.parent = self
3605 _n_label = n_label
3606 if n_label != null then
3607 n_label.parent = self
3608 end
3609 _n_expr = n_expr
3610 if n_expr != null then
3611 n_expr.parent = self
3612 end
3613 end
3614
3615 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3616 do
3617 if _n_kwbreak == old_child then
3618 if new_child != null then
3619 new_child.parent = self
3620 assert new_child isa TKwbreak
3621 _n_kwbreak = new_child
3622 else
3623 abort
3624 end
3625 return
3626 end
3627 if _n_label == old_child then
3628 if new_child != null then
3629 new_child.parent = self
3630 assert new_child isa ALabel
3631 _n_label = new_child
3632 else
3633 _n_label = null
3634 end
3635 return
3636 end
3637 if _n_expr == old_child then
3638 if new_child != null then
3639 new_child.parent = self
3640 assert new_child isa AExpr
3641 _n_expr = new_child
3642 else
3643 _n_expr = null
3644 end
3645 return
3646 end
3647 end
3648
3649 redef fun visit_all(v: Visitor)
3650 do
3651 v.enter_visit(_n_kwbreak)
3652 if _n_label != null then
3653 v.enter_visit(_n_label.as(not null))
3654 end
3655 if _n_expr != null then
3656 v.enter_visit(_n_expr.as(not null))
3657 end
3658 end
3659 end
3660 redef class AAbortExpr
3661 private init empty_init do end
3662
3663 init init_aabortexpr (
3664 n_kwabort: nullable TKwabort
3665 )
3666 do
3667 empty_init
3668 _n_kwabort = n_kwabort.as(not null)
3669 n_kwabort.parent = self
3670 end
3671
3672 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3673 do
3674 if _n_kwabort == old_child then
3675 if new_child != null then
3676 new_child.parent = self
3677 assert new_child isa TKwabort
3678 _n_kwabort = new_child
3679 else
3680 abort
3681 end
3682 return
3683 end
3684 end
3685
3686 redef fun visit_all(v: Visitor)
3687 do
3688 v.enter_visit(_n_kwabort)
3689 end
3690 end
3691 redef class AContinueExpr
3692 private init empty_init do end
3693
3694 init init_acontinueexpr (
3695 n_kwcontinue: nullable TKwcontinue,
3696 n_label: nullable ALabel,
3697 n_expr: nullable AExpr
3698 )
3699 do
3700 empty_init
3701 _n_kwcontinue = n_kwcontinue
3702 if n_kwcontinue != null then
3703 n_kwcontinue.parent = self
3704 end
3705 _n_label = n_label
3706 if n_label != null then
3707 n_label.parent = self
3708 end
3709 _n_expr = n_expr
3710 if n_expr != null then
3711 n_expr.parent = self
3712 end
3713 end
3714
3715 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3716 do
3717 if _n_kwcontinue == old_child then
3718 if new_child != null then
3719 new_child.parent = self
3720 assert new_child isa TKwcontinue
3721 _n_kwcontinue = new_child
3722 else
3723 _n_kwcontinue = null
3724 end
3725 return
3726 end
3727 if _n_label == old_child then
3728 if new_child != null then
3729 new_child.parent = self
3730 assert new_child isa ALabel
3731 _n_label = new_child
3732 else
3733 _n_label = null
3734 end
3735 return
3736 end
3737 if _n_expr == old_child then
3738 if new_child != null then
3739 new_child.parent = self
3740 assert new_child isa AExpr
3741 _n_expr = new_child
3742 else
3743 _n_expr = null
3744 end
3745 return
3746 end
3747 end
3748
3749 redef fun visit_all(v: Visitor)
3750 do
3751 if _n_kwcontinue != null then
3752 v.enter_visit(_n_kwcontinue.as(not null))
3753 end
3754 if _n_label != null then
3755 v.enter_visit(_n_label.as(not null))
3756 end
3757 if _n_expr != null then
3758 v.enter_visit(_n_expr.as(not null))
3759 end
3760 end
3761 end
3762 redef class ADoExpr
3763 private init empty_init do end
3764
3765 init init_adoexpr (
3766 n_kwdo: nullable TKwdo,
3767 n_block: nullable AExpr,
3768 n_label: nullable ALabel
3769 )
3770 do
3771 empty_init
3772 _n_kwdo = n_kwdo.as(not null)
3773 n_kwdo.parent = self
3774 _n_block = n_block
3775 if n_block != null then
3776 n_block.parent = self
3777 end
3778 _n_label = n_label
3779 if n_label != null then
3780 n_label.parent = self
3781 end
3782 end
3783
3784 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3785 do
3786 if _n_kwdo == old_child then
3787 if new_child != null then
3788 new_child.parent = self
3789 assert new_child isa TKwdo
3790 _n_kwdo = new_child
3791 else
3792 abort
3793 end
3794 return
3795 end
3796 if _n_block == old_child then
3797 if new_child != null then
3798 new_child.parent = self
3799 assert new_child isa AExpr
3800 _n_block = new_child
3801 else
3802 _n_block = null
3803 end
3804 return
3805 end
3806 if _n_label == old_child then
3807 if new_child != null then
3808 new_child.parent = self
3809 assert new_child isa ALabel
3810 _n_label = new_child
3811 else
3812 _n_label = null
3813 end
3814 return
3815 end
3816 end
3817
3818 redef fun visit_all(v: Visitor)
3819 do
3820 v.enter_visit(_n_kwdo)
3821 if _n_block != null then
3822 v.enter_visit(_n_block.as(not null))
3823 end
3824 if _n_label != null then
3825 v.enter_visit(_n_label.as(not null))
3826 end
3827 end
3828 end
3829 redef class AIfExpr
3830 private init empty_init do end
3831
3832 init init_aifexpr (
3833 n_kwif: nullable TKwif,
3834 n_expr: nullable AExpr,
3835 n_then: nullable AExpr,
3836 n_else: nullable AExpr
3837 )
3838 do
3839 empty_init
3840 _n_kwif = n_kwif.as(not null)
3841 n_kwif.parent = self
3842 _n_expr = n_expr.as(not null)
3843 n_expr.parent = self
3844 _n_then = n_then
3845 if n_then != null then
3846 n_then.parent = self
3847 end
3848 _n_else = n_else
3849 if n_else != null then
3850 n_else.parent = self
3851 end
3852 end
3853
3854 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3855 do
3856 if _n_kwif == old_child then
3857 if new_child != null then
3858 new_child.parent = self
3859 assert new_child isa TKwif
3860 _n_kwif = new_child
3861 else
3862 abort
3863 end
3864 return
3865 end
3866 if _n_expr == old_child then
3867 if new_child != null then
3868 new_child.parent = self
3869 assert new_child isa AExpr
3870 _n_expr = new_child
3871 else
3872 abort
3873 end
3874 return
3875 end
3876 if _n_then == old_child then
3877 if new_child != null then
3878 new_child.parent = self
3879 assert new_child isa AExpr
3880 _n_then = new_child
3881 else
3882 _n_then = null
3883 end
3884 return
3885 end
3886 if _n_else == old_child then
3887 if new_child != null then
3888 new_child.parent = self
3889 assert new_child isa AExpr
3890 _n_else = new_child
3891 else
3892 _n_else = null
3893 end
3894 return
3895 end
3896 end
3897
3898 redef fun visit_all(v: Visitor)
3899 do
3900 v.enter_visit(_n_kwif)
3901 v.enter_visit(_n_expr)
3902 if _n_then != null then
3903 v.enter_visit(_n_then.as(not null))
3904 end
3905 if _n_else != null then
3906 v.enter_visit(_n_else.as(not null))
3907 end
3908 end
3909 end
3910 redef class AIfexprExpr
3911 private init empty_init do end
3912
3913 init init_aifexprexpr (
3914 n_kwif: nullable TKwif,
3915 n_expr: nullable AExpr,
3916 n_kwthen: nullable TKwthen,
3917 n_then: nullable AExpr,
3918 n_kwelse: nullable TKwelse,
3919 n_else: nullable AExpr
3920 )
3921 do
3922 empty_init
3923 _n_kwif = n_kwif.as(not null)
3924 n_kwif.parent = self
3925 _n_expr = n_expr.as(not null)
3926 n_expr.parent = self
3927 _n_kwthen = n_kwthen.as(not null)
3928 n_kwthen.parent = self
3929 _n_then = n_then.as(not null)
3930 n_then.parent = self
3931 _n_kwelse = n_kwelse.as(not null)
3932 n_kwelse.parent = self
3933 _n_else = n_else.as(not null)
3934 n_else.parent = self
3935 end
3936
3937 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
3938 do
3939 if _n_kwif == old_child then
3940 if new_child != null then
3941 new_child.parent = self
3942 assert new_child isa TKwif
3943 _n_kwif = new_child
3944 else
3945 abort
3946 end
3947 return
3948 end
3949 if _n_expr == old_child then
3950 if new_child != null then
3951 new_child.parent = self
3952 assert new_child isa AExpr
3953 _n_expr = new_child
3954 else
3955 abort
3956 end
3957 return
3958 end
3959 if _n_kwthen == old_child then
3960 if new_child != null then
3961 new_child.parent = self
3962 assert new_child isa TKwthen
3963 _n_kwthen = new_child
3964 else
3965 abort
3966 end
3967 return
3968 end
3969 if _n_then == old_child then
3970 if new_child != null then
3971 new_child.parent = self
3972 assert new_child isa AExpr
3973 _n_then = new_child
3974 else
3975 abort
3976 end
3977 return
3978 end
3979 if _n_kwelse == old_child then
3980 if new_child != null then
3981 new_child.parent = self
3982 assert new_child isa TKwelse
3983 _n_kwelse = new_child
3984 else
3985 abort
3986 end
3987 return
3988 end
3989 if _n_else == old_child then
3990 if new_child != null then
3991 new_child.parent = self
3992 assert new_child isa AExpr
3993 _n_else = new_child
3994 else
3995 abort
3996 end
3997 return
3998 end
3999 end
4000
4001 redef fun visit_all(v: Visitor)
4002 do
4003 v.enter_visit(_n_kwif)
4004 v.enter_visit(_n_expr)
4005 v.enter_visit(_n_kwthen)
4006 v.enter_visit(_n_then)
4007 v.enter_visit(_n_kwelse)
4008 v.enter_visit(_n_else)
4009 end
4010 end
4011 redef class AWhileExpr
4012 private init empty_init do end
4013
4014 init init_awhileexpr (
4015 n_kwwhile: nullable TKwwhile,
4016 n_expr: nullable AExpr,
4017 n_kwdo: nullable TKwdo,
4018 n_block: nullable AExpr,
4019 n_label: nullable ALabel
4020 )
4021 do
4022 empty_init
4023 _n_kwwhile = n_kwwhile.as(not null)
4024 n_kwwhile.parent = self
4025 _n_expr = n_expr.as(not null)
4026 n_expr.parent = self
4027 _n_kwdo = n_kwdo.as(not null)
4028 n_kwdo.parent = self
4029 _n_block = n_block
4030 if n_block != null then
4031 n_block.parent = self
4032 end
4033 _n_label = n_label
4034 if n_label != null then
4035 n_label.parent = self
4036 end
4037 end
4038
4039 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4040 do
4041 if _n_kwwhile == old_child then
4042 if new_child != null then
4043 new_child.parent = self
4044 assert new_child isa TKwwhile
4045 _n_kwwhile = new_child
4046 else
4047 abort
4048 end
4049 return
4050 end
4051 if _n_expr == old_child then
4052 if new_child != null then
4053 new_child.parent = self
4054 assert new_child isa AExpr
4055 _n_expr = new_child
4056 else
4057 abort
4058 end
4059 return
4060 end
4061 if _n_kwdo == old_child then
4062 if new_child != null then
4063 new_child.parent = self
4064 assert new_child isa TKwdo
4065 _n_kwdo = new_child
4066 else
4067 abort
4068 end
4069 return
4070 end
4071 if _n_block == old_child then
4072 if new_child != null then
4073 new_child.parent = self
4074 assert new_child isa AExpr
4075 _n_block = new_child
4076 else
4077 _n_block = null
4078 end
4079 return
4080 end
4081 if _n_label == old_child then
4082 if new_child != null then
4083 new_child.parent = self
4084 assert new_child isa ALabel
4085 _n_label = new_child
4086 else
4087 _n_label = null
4088 end
4089 return
4090 end
4091 end
4092
4093 redef fun visit_all(v: Visitor)
4094 do
4095 v.enter_visit(_n_kwwhile)
4096 v.enter_visit(_n_expr)
4097 v.enter_visit(_n_kwdo)
4098 if _n_block != null then
4099 v.enter_visit(_n_block.as(not null))
4100 end
4101 if _n_label != null then
4102 v.enter_visit(_n_label.as(not null))
4103 end
4104 end
4105 end
4106 redef class ALoopExpr
4107 private init empty_init do end
4108
4109 init init_aloopexpr (
4110 n_kwloop: nullable TKwloop,
4111 n_block: nullable AExpr,
4112 n_label: nullable ALabel
4113 )
4114 do
4115 empty_init
4116 _n_kwloop = n_kwloop.as(not null)
4117 n_kwloop.parent = self
4118 _n_block = n_block
4119 if n_block != null then
4120 n_block.parent = self
4121 end
4122 _n_label = n_label
4123 if n_label != null then
4124 n_label.parent = self
4125 end
4126 end
4127
4128 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4129 do
4130 if _n_kwloop == old_child then
4131 if new_child != null then
4132 new_child.parent = self
4133 assert new_child isa TKwloop
4134 _n_kwloop = new_child
4135 else
4136 abort
4137 end
4138 return
4139 end
4140 if _n_block == old_child then
4141 if new_child != null then
4142 new_child.parent = self
4143 assert new_child isa AExpr
4144 _n_block = new_child
4145 else
4146 _n_block = null
4147 end
4148 return
4149 end
4150 if _n_label == old_child then
4151 if new_child != null then
4152 new_child.parent = self
4153 assert new_child isa ALabel
4154 _n_label = new_child
4155 else
4156 _n_label = null
4157 end
4158 return
4159 end
4160 end
4161
4162 redef fun visit_all(v: Visitor)
4163 do
4164 v.enter_visit(_n_kwloop)
4165 if _n_block != null then
4166 v.enter_visit(_n_block.as(not null))
4167 end
4168 if _n_label != null then
4169 v.enter_visit(_n_label.as(not null))
4170 end
4171 end
4172 end
4173 redef class AForExpr
4174 private init empty_init do end
4175
4176 init init_aforexpr (
4177 n_kwfor: nullable TKwfor,
4178 n_ids: Collection[Object], # Should be Collection[TId]
4179 n_expr: nullable AExpr,
4180 n_kwdo: nullable TKwdo,
4181 n_block: nullable AExpr,
4182 n_label: nullable ALabel
4183 )
4184 do
4185 empty_init
4186 _n_kwfor = n_kwfor.as(not null)
4187 n_kwfor.parent = self
4188 for n in n_ids do
4189 assert n isa TId
4190 _n_ids.add(n)
4191 n.parent = self
4192 end
4193 _n_expr = n_expr.as(not null)
4194 n_expr.parent = self
4195 _n_kwdo = n_kwdo.as(not null)
4196 n_kwdo.parent = self
4197 _n_block = n_block
4198 if n_block != null then
4199 n_block.parent = self
4200 end
4201 _n_label = n_label
4202 if n_label != null then
4203 n_label.parent = self
4204 end
4205 end
4206
4207 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4208 do
4209 if _n_kwfor == old_child then
4210 if new_child != null then
4211 new_child.parent = self
4212 assert new_child isa TKwfor
4213 _n_kwfor = new_child
4214 else
4215 abort
4216 end
4217 return
4218 end
4219 for i in [0.._n_ids.length[ do
4220 if _n_ids[i] == old_child then
4221 if new_child != null then
4222 assert new_child isa TId
4223 _n_ids[i] = new_child
4224 new_child.parent = self
4225 else
4226 _n_ids.remove_at(i)
4227 end
4228 return
4229 end
4230 end
4231 if _n_expr == old_child then
4232 if new_child != null then
4233 new_child.parent = self
4234 assert new_child isa AExpr
4235 _n_expr = new_child
4236 else
4237 abort
4238 end
4239 return
4240 end
4241 if _n_kwdo == old_child then
4242 if new_child != null then
4243 new_child.parent = self
4244 assert new_child isa TKwdo
4245 _n_kwdo = new_child
4246 else
4247 abort
4248 end
4249 return
4250 end
4251 if _n_block == old_child then
4252 if new_child != null then
4253 new_child.parent = self
4254 assert new_child isa AExpr
4255 _n_block = new_child
4256 else
4257 _n_block = null
4258 end
4259 return
4260 end
4261 if _n_label == old_child then
4262 if new_child != null then
4263 new_child.parent = self
4264 assert new_child isa ALabel
4265 _n_label = new_child
4266 else
4267 _n_label = null
4268 end
4269 return
4270 end
4271 end
4272
4273 redef fun visit_all(v: Visitor)
4274 do
4275 v.enter_visit(_n_kwfor)
4276 for n in _n_ids do
4277 v.enter_visit(n)
4278 end
4279 v.enter_visit(_n_expr)
4280 v.enter_visit(_n_kwdo)
4281 if _n_block != null then
4282 v.enter_visit(_n_block.as(not null))
4283 end
4284 if _n_label != null then
4285 v.enter_visit(_n_label.as(not null))
4286 end
4287 end
4288 end
4289 redef class AAssertExpr
4290 private init empty_init do end
4291
4292 init init_aassertexpr (
4293 n_kwassert: nullable TKwassert,
4294 n_id: nullable TId,
4295 n_expr: nullable AExpr,
4296 n_else: nullable AExpr
4297 )
4298 do
4299 empty_init
4300 _n_kwassert = n_kwassert.as(not null)
4301 n_kwassert.parent = self
4302 _n_id = n_id
4303 if n_id != null then
4304 n_id.parent = self
4305 end
4306 _n_expr = n_expr.as(not null)
4307 n_expr.parent = self
4308 _n_else = n_else
4309 if n_else != null then
4310 n_else.parent = self
4311 end
4312 end
4313
4314 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4315 do
4316 if _n_kwassert == old_child then
4317 if new_child != null then
4318 new_child.parent = self
4319 assert new_child isa TKwassert
4320 _n_kwassert = new_child
4321 else
4322 abort
4323 end
4324 return
4325 end
4326 if _n_id == old_child then
4327 if new_child != null then
4328 new_child.parent = self
4329 assert new_child isa TId
4330 _n_id = new_child
4331 else
4332 _n_id = null
4333 end
4334 return
4335 end
4336 if _n_expr == old_child then
4337 if new_child != null then
4338 new_child.parent = self
4339 assert new_child isa AExpr
4340 _n_expr = new_child
4341 else
4342 abort
4343 end
4344 return
4345 end
4346 if _n_else == old_child then
4347 if new_child != null then
4348 new_child.parent = self
4349 assert new_child isa AExpr
4350 _n_else = new_child
4351 else
4352 _n_else = null
4353 end
4354 return
4355 end
4356 end
4357
4358 redef fun visit_all(v: Visitor)
4359 do
4360 v.enter_visit(_n_kwassert)
4361 if _n_id != null then
4362 v.enter_visit(_n_id.as(not null))
4363 end
4364 v.enter_visit(_n_expr)
4365 if _n_else != null then
4366 v.enter_visit(_n_else.as(not null))
4367 end
4368 end
4369 end
4370 redef class AOnceExpr
4371 private init empty_init do end
4372
4373 init init_aonceexpr (
4374 n_kwonce: nullable TKwonce,
4375 n_expr: nullable AExpr
4376 )
4377 do
4378 empty_init
4379 _n_kwonce = n_kwonce.as(not null)
4380 n_kwonce.parent = self
4381 _n_expr = n_expr.as(not null)
4382 n_expr.parent = self
4383 end
4384
4385 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4386 do
4387 if _n_kwonce == old_child then
4388 if new_child != null then
4389 new_child.parent = self
4390 assert new_child isa TKwonce
4391 _n_kwonce = new_child
4392 else
4393 abort
4394 end
4395 return
4396 end
4397 if _n_expr == old_child then
4398 if new_child != null then
4399 new_child.parent = self
4400 assert new_child isa AExpr
4401 _n_expr = new_child
4402 else
4403 abort
4404 end
4405 return
4406 end
4407 end
4408
4409 redef fun visit_all(v: Visitor)
4410 do
4411 v.enter_visit(_n_kwonce)
4412 v.enter_visit(_n_expr)
4413 end
4414 end
4415 redef class ASendExpr
4416 private init empty_init do end
4417
4418 init init_asendexpr (
4419 n_expr: nullable AExpr
4420 )
4421 do
4422 empty_init
4423 _n_expr = n_expr.as(not null)
4424 n_expr.parent = self
4425 end
4426
4427 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4428 do
4429 if _n_expr == old_child then
4430 if new_child != null then
4431 new_child.parent = self
4432 assert new_child isa AExpr
4433 _n_expr = new_child
4434 else
4435 abort
4436 end
4437 return
4438 end
4439 end
4440
4441 redef fun visit_all(v: Visitor)
4442 do
4443 v.enter_visit(_n_expr)
4444 end
4445 end
4446 redef class ABinopExpr
4447 private init empty_init do end
4448
4449 init init_abinopexpr (
4450 n_expr: nullable AExpr,
4451 n_expr2: nullable AExpr
4452 )
4453 do
4454 empty_init
4455 _n_expr = n_expr.as(not null)
4456 n_expr.parent = self
4457 _n_expr2 = n_expr2.as(not null)
4458 n_expr2.parent = self
4459 end
4460
4461 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4462 do
4463 if _n_expr == old_child then
4464 if new_child != null then
4465 new_child.parent = self
4466 assert new_child isa AExpr
4467 _n_expr = new_child
4468 else
4469 abort
4470 end
4471 return
4472 end
4473 if _n_expr2 == old_child then
4474 if new_child != null then
4475 new_child.parent = self
4476 assert new_child isa AExpr
4477 _n_expr2 = new_child
4478 else
4479 abort
4480 end
4481 return
4482 end
4483 end
4484
4485 redef fun visit_all(v: Visitor)
4486 do
4487 v.enter_visit(_n_expr)
4488 v.enter_visit(_n_expr2)
4489 end
4490 end
4491 redef class AOrExpr
4492 private init empty_init do end
4493
4494 init init_aorexpr (
4495 n_expr: nullable AExpr,
4496 n_expr2: nullable AExpr
4497 )
4498 do
4499 empty_init
4500 _n_expr = n_expr.as(not null)
4501 n_expr.parent = self
4502 _n_expr2 = n_expr2.as(not null)
4503 n_expr2.parent = self
4504 end
4505
4506 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4507 do
4508 if _n_expr == old_child then
4509 if new_child != null then
4510 new_child.parent = self
4511 assert new_child isa AExpr
4512 _n_expr = new_child
4513 else
4514 abort
4515 end
4516 return
4517 end
4518 if _n_expr2 == old_child then
4519 if new_child != null then
4520 new_child.parent = self
4521 assert new_child isa AExpr
4522 _n_expr2 = new_child
4523 else
4524 abort
4525 end
4526 return
4527 end
4528 end
4529
4530 redef fun visit_all(v: Visitor)
4531 do
4532 v.enter_visit(_n_expr)
4533 v.enter_visit(_n_expr2)
4534 end
4535 end
4536 redef class AAndExpr
4537 private init empty_init do end
4538
4539 init init_aandexpr (
4540 n_expr: nullable AExpr,
4541 n_expr2: nullable AExpr
4542 )
4543 do
4544 empty_init
4545 _n_expr = n_expr.as(not null)
4546 n_expr.parent = self
4547 _n_expr2 = n_expr2.as(not null)
4548 n_expr2.parent = self
4549 end
4550
4551 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4552 do
4553 if _n_expr == old_child then
4554 if new_child != null then
4555 new_child.parent = self
4556 assert new_child isa AExpr
4557 _n_expr = new_child
4558 else
4559 abort
4560 end
4561 return
4562 end
4563 if _n_expr2 == old_child then
4564 if new_child != null then
4565 new_child.parent = self
4566 assert new_child isa AExpr
4567 _n_expr2 = new_child
4568 else
4569 abort
4570 end
4571 return
4572 end
4573 end
4574
4575 redef fun visit_all(v: Visitor)
4576 do
4577 v.enter_visit(_n_expr)
4578 v.enter_visit(_n_expr2)
4579 end
4580 end
4581 redef class AOrElseExpr
4582 private init empty_init do end
4583
4584 init init_aorelseexpr (
4585 n_expr: nullable AExpr,
4586 n_expr2: nullable AExpr
4587 )
4588 do
4589 empty_init
4590 _n_expr = n_expr.as(not null)
4591 n_expr.parent = self
4592 _n_expr2 = n_expr2.as(not null)
4593 n_expr2.parent = self
4594 end
4595
4596 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4597 do
4598 if _n_expr == old_child then
4599 if new_child != null then
4600 new_child.parent = self
4601 assert new_child isa AExpr
4602 _n_expr = new_child
4603 else
4604 abort
4605 end
4606 return
4607 end
4608 if _n_expr2 == old_child then
4609 if new_child != null then
4610 new_child.parent = self
4611 assert new_child isa AExpr
4612 _n_expr2 = new_child
4613 else
4614 abort
4615 end
4616 return
4617 end
4618 end
4619
4620 redef fun visit_all(v: Visitor)
4621 do
4622 v.enter_visit(_n_expr)
4623 v.enter_visit(_n_expr2)
4624 end
4625 end
4626 redef class ANotExpr
4627 private init empty_init do end
4628
4629 init init_anotexpr (
4630 n_kwnot: nullable TKwnot,
4631 n_expr: nullable AExpr
4632 )
4633 do
4634 empty_init
4635 _n_kwnot = n_kwnot.as(not null)
4636 n_kwnot.parent = self
4637 _n_expr = n_expr.as(not null)
4638 n_expr.parent = self
4639 end
4640
4641 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4642 do
4643 if _n_kwnot == old_child then
4644 if new_child != null then
4645 new_child.parent = self
4646 assert new_child isa TKwnot
4647 _n_kwnot = new_child
4648 else
4649 abort
4650 end
4651 return
4652 end
4653 if _n_expr == old_child then
4654 if new_child != null then
4655 new_child.parent = self
4656 assert new_child isa AExpr
4657 _n_expr = new_child
4658 else
4659 abort
4660 end
4661 return
4662 end
4663 end
4664
4665 redef fun visit_all(v: Visitor)
4666 do
4667 v.enter_visit(_n_kwnot)
4668 v.enter_visit(_n_expr)
4669 end
4670 end
4671 redef class AEqExpr
4672 private init empty_init do end
4673
4674 init init_aeqexpr (
4675 n_expr: nullable AExpr,
4676 n_expr2: nullable AExpr
4677 )
4678 do
4679 empty_init
4680 _n_expr = n_expr.as(not null)
4681 n_expr.parent = self
4682 _n_expr2 = n_expr2.as(not null)
4683 n_expr2.parent = self
4684 end
4685
4686 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4687 do
4688 if _n_expr == old_child then
4689 if new_child != null then
4690 new_child.parent = self
4691 assert new_child isa AExpr
4692 _n_expr = new_child
4693 else
4694 abort
4695 end
4696 return
4697 end
4698 if _n_expr2 == old_child then
4699 if new_child != null then
4700 new_child.parent = self
4701 assert new_child isa AExpr
4702 _n_expr2 = new_child
4703 else
4704 abort
4705 end
4706 return
4707 end
4708 end
4709
4710 redef fun visit_all(v: Visitor)
4711 do
4712 v.enter_visit(_n_expr)
4713 v.enter_visit(_n_expr2)
4714 end
4715 end
4716 redef class AEeExpr
4717 private init empty_init do end
4718
4719 init init_aeeexpr (
4720 n_expr: nullable AExpr,
4721 n_expr2: nullable AExpr
4722 )
4723 do
4724 empty_init
4725 _n_expr = n_expr.as(not null)
4726 n_expr.parent = self
4727 _n_expr2 = n_expr2.as(not null)
4728 n_expr2.parent = self
4729 end
4730
4731 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4732 do
4733 if _n_expr == old_child then
4734 if new_child != null then
4735 new_child.parent = self
4736 assert new_child isa AExpr
4737 _n_expr = new_child
4738 else
4739 abort
4740 end
4741 return
4742 end
4743 if _n_expr2 == old_child then
4744 if new_child != null then
4745 new_child.parent = self
4746 assert new_child isa AExpr
4747 _n_expr2 = new_child
4748 else
4749 abort
4750 end
4751 return
4752 end
4753 end
4754
4755 redef fun visit_all(v: Visitor)
4756 do
4757 v.enter_visit(_n_expr)
4758 v.enter_visit(_n_expr2)
4759 end
4760 end
4761 redef class ANeExpr
4762 private init empty_init do end
4763
4764 init init_aneexpr (
4765 n_expr: nullable AExpr,
4766 n_expr2: nullable AExpr
4767 )
4768 do
4769 empty_init
4770 _n_expr = n_expr.as(not null)
4771 n_expr.parent = self
4772 _n_expr2 = n_expr2.as(not null)
4773 n_expr2.parent = self
4774 end
4775
4776 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4777 do
4778 if _n_expr == old_child then
4779 if new_child != null then
4780 new_child.parent = self
4781 assert new_child isa AExpr
4782 _n_expr = new_child
4783 else
4784 abort
4785 end
4786 return
4787 end
4788 if _n_expr2 == old_child then
4789 if new_child != null then
4790 new_child.parent = self
4791 assert new_child isa AExpr
4792 _n_expr2 = new_child
4793 else
4794 abort
4795 end
4796 return
4797 end
4798 end
4799
4800 redef fun visit_all(v: Visitor)
4801 do
4802 v.enter_visit(_n_expr)
4803 v.enter_visit(_n_expr2)
4804 end
4805 end
4806 redef class ALtExpr
4807 private init empty_init do end
4808
4809 init init_altexpr (
4810 n_expr: nullable AExpr,
4811 n_expr2: nullable AExpr
4812 )
4813 do
4814 empty_init
4815 _n_expr = n_expr.as(not null)
4816 n_expr.parent = self
4817 _n_expr2 = n_expr2.as(not null)
4818 n_expr2.parent = self
4819 end
4820
4821 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4822 do
4823 if _n_expr == old_child then
4824 if new_child != null then
4825 new_child.parent = self
4826 assert new_child isa AExpr
4827 _n_expr = new_child
4828 else
4829 abort
4830 end
4831 return
4832 end
4833 if _n_expr2 == old_child then
4834 if new_child != null then
4835 new_child.parent = self
4836 assert new_child isa AExpr
4837 _n_expr2 = new_child
4838 else
4839 abort
4840 end
4841 return
4842 end
4843 end
4844
4845 redef fun visit_all(v: Visitor)
4846 do
4847 v.enter_visit(_n_expr)
4848 v.enter_visit(_n_expr2)
4849 end
4850 end
4851 redef class ALeExpr
4852 private init empty_init do end
4853
4854 init init_aleexpr (
4855 n_expr: nullable AExpr,
4856 n_expr2: nullable AExpr
4857 )
4858 do
4859 empty_init
4860 _n_expr = n_expr.as(not null)
4861 n_expr.parent = self
4862 _n_expr2 = n_expr2.as(not null)
4863 n_expr2.parent = self
4864 end
4865
4866 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4867 do
4868 if _n_expr == old_child then
4869 if new_child != null then
4870 new_child.parent = self
4871 assert new_child isa AExpr
4872 _n_expr = new_child
4873 else
4874 abort
4875 end
4876 return
4877 end
4878 if _n_expr2 == old_child then
4879 if new_child != null then
4880 new_child.parent = self
4881 assert new_child isa AExpr
4882 _n_expr2 = new_child
4883 else
4884 abort
4885 end
4886 return
4887 end
4888 end
4889
4890 redef fun visit_all(v: Visitor)
4891 do
4892 v.enter_visit(_n_expr)
4893 v.enter_visit(_n_expr2)
4894 end
4895 end
4896 redef class ALlExpr
4897 private init empty_init do end
4898
4899 init init_allexpr (
4900 n_expr: nullable AExpr,
4901 n_expr2: nullable AExpr
4902 )
4903 do
4904 empty_init
4905 _n_expr = n_expr.as(not null)
4906 n_expr.parent = self
4907 _n_expr2 = n_expr2.as(not null)
4908 n_expr2.parent = self
4909 end
4910
4911 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4912 do
4913 if _n_expr == old_child then
4914 if new_child != null then
4915 new_child.parent = self
4916 assert new_child isa AExpr
4917 _n_expr = new_child
4918 else
4919 abort
4920 end
4921 return
4922 end
4923 if _n_expr2 == old_child then
4924 if new_child != null then
4925 new_child.parent = self
4926 assert new_child isa AExpr
4927 _n_expr2 = new_child
4928 else
4929 abort
4930 end
4931 return
4932 end
4933 end
4934
4935 redef fun visit_all(v: Visitor)
4936 do
4937 v.enter_visit(_n_expr)
4938 v.enter_visit(_n_expr2)
4939 end
4940 end
4941 redef class AGtExpr
4942 private init empty_init do end
4943
4944 init init_agtexpr (
4945 n_expr: nullable AExpr,
4946 n_expr2: nullable AExpr
4947 )
4948 do
4949 empty_init
4950 _n_expr = n_expr.as(not null)
4951 n_expr.parent = self
4952 _n_expr2 = n_expr2.as(not null)
4953 n_expr2.parent = self
4954 end
4955
4956 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
4957 do
4958 if _n_expr == old_child then
4959 if new_child != null then
4960 new_child.parent = self
4961 assert new_child isa AExpr
4962 _n_expr = new_child
4963 else
4964 abort
4965 end
4966 return
4967 end
4968 if _n_expr2 == old_child then
4969 if new_child != null then
4970 new_child.parent = self
4971 assert new_child isa AExpr
4972 _n_expr2 = new_child
4973 else
4974 abort
4975 end
4976 return
4977 end
4978 end
4979
4980 redef fun visit_all(v: Visitor)
4981 do
4982 v.enter_visit(_n_expr)
4983 v.enter_visit(_n_expr2)
4984 end
4985 end
4986 redef class AGeExpr
4987 private init empty_init do end
4988
4989 init init_ageexpr (
4990 n_expr: nullable AExpr,
4991 n_expr2: nullable AExpr
4992 )
4993 do
4994 empty_init
4995 _n_expr = n_expr.as(not null)
4996 n_expr.parent = self
4997 _n_expr2 = n_expr2.as(not null)
4998 n_expr2.parent = self
4999 end
5000
5001 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5002 do
5003 if _n_expr == old_child then
5004 if new_child != null then
5005 new_child.parent = self
5006 assert new_child isa AExpr
5007 _n_expr = new_child
5008 else
5009 abort
5010 end
5011 return
5012 end
5013 if _n_expr2 == old_child then
5014 if new_child != null then
5015 new_child.parent = self
5016 assert new_child isa AExpr
5017 _n_expr2 = new_child
5018 else
5019 abort
5020 end
5021 return
5022 end
5023 end
5024
5025 redef fun visit_all(v: Visitor)
5026 do
5027 v.enter_visit(_n_expr)
5028 v.enter_visit(_n_expr2)
5029 end
5030 end
5031 redef class AGgExpr
5032 private init empty_init do end
5033
5034 init init_aggexpr (
5035 n_expr: nullable AExpr,
5036 n_expr2: nullable AExpr
5037 )
5038 do
5039 empty_init
5040 _n_expr = n_expr.as(not null)
5041 n_expr.parent = self
5042 _n_expr2 = n_expr2.as(not null)
5043 n_expr2.parent = self
5044 end
5045
5046 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5047 do
5048 if _n_expr == old_child then
5049 if new_child != null then
5050 new_child.parent = self
5051 assert new_child isa AExpr
5052 _n_expr = new_child
5053 else
5054 abort
5055 end
5056 return
5057 end
5058 if _n_expr2 == old_child then
5059 if new_child != null then
5060 new_child.parent = self
5061 assert new_child isa AExpr
5062 _n_expr2 = new_child
5063 else
5064 abort
5065 end
5066 return
5067 end
5068 end
5069
5070 redef fun visit_all(v: Visitor)
5071 do
5072 v.enter_visit(_n_expr)
5073 v.enter_visit(_n_expr2)
5074 end
5075 end
5076 redef class AIsaExpr
5077 private init empty_init do end
5078
5079 init init_aisaexpr (
5080 n_expr: nullable AExpr,
5081 n_type: nullable AType
5082 )
5083 do
5084 empty_init
5085 _n_expr = n_expr.as(not null)
5086 n_expr.parent = self
5087 _n_type = n_type.as(not null)
5088 n_type.parent = self
5089 end
5090
5091 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5092 do
5093 if _n_expr == old_child then
5094 if new_child != null then
5095 new_child.parent = self
5096 assert new_child isa AExpr
5097 _n_expr = new_child
5098 else
5099 abort
5100 end
5101 return
5102 end
5103 if _n_type == old_child then
5104 if new_child != null then
5105 new_child.parent = self
5106 assert new_child isa AType
5107 _n_type = new_child
5108 else
5109 abort
5110 end
5111 return
5112 end
5113 end
5114
5115 redef fun visit_all(v: Visitor)
5116 do
5117 v.enter_visit(_n_expr)
5118 v.enter_visit(_n_type)
5119 end
5120 end
5121 redef class APlusExpr
5122 private init empty_init do end
5123
5124 init init_aplusexpr (
5125 n_expr: nullable AExpr,
5126 n_expr2: nullable AExpr
5127 )
5128 do
5129 empty_init
5130 _n_expr = n_expr.as(not null)
5131 n_expr.parent = self
5132 _n_expr2 = n_expr2.as(not null)
5133 n_expr2.parent = self
5134 end
5135
5136 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5137 do
5138 if _n_expr == old_child then
5139 if new_child != null then
5140 new_child.parent = self
5141 assert new_child isa AExpr
5142 _n_expr = new_child
5143 else
5144 abort
5145 end
5146 return
5147 end
5148 if _n_expr2 == old_child then
5149 if new_child != null then
5150 new_child.parent = self
5151 assert new_child isa AExpr
5152 _n_expr2 = new_child
5153 else
5154 abort
5155 end
5156 return
5157 end
5158 end
5159
5160 redef fun visit_all(v: Visitor)
5161 do
5162 v.enter_visit(_n_expr)
5163 v.enter_visit(_n_expr2)
5164 end
5165 end
5166 redef class AMinusExpr
5167 private init empty_init do end
5168
5169 init init_aminusexpr (
5170 n_expr: nullable AExpr,
5171 n_expr2: nullable AExpr
5172 )
5173 do
5174 empty_init
5175 _n_expr = n_expr.as(not null)
5176 n_expr.parent = self
5177 _n_expr2 = n_expr2.as(not null)
5178 n_expr2.parent = self
5179 end
5180
5181 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5182 do
5183 if _n_expr == old_child then
5184 if new_child != null then
5185 new_child.parent = self
5186 assert new_child isa AExpr
5187 _n_expr = new_child
5188 else
5189 abort
5190 end
5191 return
5192 end
5193 if _n_expr2 == old_child then
5194 if new_child != null then
5195 new_child.parent = self
5196 assert new_child isa AExpr
5197 _n_expr2 = new_child
5198 else
5199 abort
5200 end
5201 return
5202 end
5203 end
5204
5205 redef fun visit_all(v: Visitor)
5206 do
5207 v.enter_visit(_n_expr)
5208 v.enter_visit(_n_expr2)
5209 end
5210 end
5211 redef class AStarshipExpr
5212 private init empty_init do end
5213
5214 init init_astarshipexpr (
5215 n_expr: nullable AExpr,
5216 n_expr2: nullable AExpr
5217 )
5218 do
5219 empty_init
5220 _n_expr = n_expr.as(not null)
5221 n_expr.parent = self
5222 _n_expr2 = n_expr2.as(not null)
5223 n_expr2.parent = self
5224 end
5225
5226 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5227 do
5228 if _n_expr == old_child then
5229 if new_child != null then
5230 new_child.parent = self
5231 assert new_child isa AExpr
5232 _n_expr = new_child
5233 else
5234 abort
5235 end
5236 return
5237 end
5238 if _n_expr2 == old_child then
5239 if new_child != null then
5240 new_child.parent = self
5241 assert new_child isa AExpr
5242 _n_expr2 = new_child
5243 else
5244 abort
5245 end
5246 return
5247 end
5248 end
5249
5250 redef fun visit_all(v: Visitor)
5251 do
5252 v.enter_visit(_n_expr)
5253 v.enter_visit(_n_expr2)
5254 end
5255 end
5256 redef class AStarExpr
5257 private init empty_init do end
5258
5259 init init_astarexpr (
5260 n_expr: nullable AExpr,
5261 n_expr2: nullable AExpr
5262 )
5263 do
5264 empty_init
5265 _n_expr = n_expr.as(not null)
5266 n_expr.parent = self
5267 _n_expr2 = n_expr2.as(not null)
5268 n_expr2.parent = self
5269 end
5270
5271 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5272 do
5273 if _n_expr == old_child then
5274 if new_child != null then
5275 new_child.parent = self
5276 assert new_child isa AExpr
5277 _n_expr = new_child
5278 else
5279 abort
5280 end
5281 return
5282 end
5283 if _n_expr2 == old_child then
5284 if new_child != null then
5285 new_child.parent = self
5286 assert new_child isa AExpr
5287 _n_expr2 = new_child
5288 else
5289 abort
5290 end
5291 return
5292 end
5293 end
5294
5295 redef fun visit_all(v: Visitor)
5296 do
5297 v.enter_visit(_n_expr)
5298 v.enter_visit(_n_expr2)
5299 end
5300 end
5301 redef class ASlashExpr
5302 private init empty_init do end
5303
5304 init init_aslashexpr (
5305 n_expr: nullable AExpr,
5306 n_expr2: nullable AExpr
5307 )
5308 do
5309 empty_init
5310 _n_expr = n_expr.as(not null)
5311 n_expr.parent = self
5312 _n_expr2 = n_expr2.as(not null)
5313 n_expr2.parent = self
5314 end
5315
5316 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5317 do
5318 if _n_expr == old_child then
5319 if new_child != null then
5320 new_child.parent = self
5321 assert new_child isa AExpr
5322 _n_expr = new_child
5323 else
5324 abort
5325 end
5326 return
5327 end
5328 if _n_expr2 == old_child then
5329 if new_child != null then
5330 new_child.parent = self
5331 assert new_child isa AExpr
5332 _n_expr2 = new_child
5333 else
5334 abort
5335 end
5336 return
5337 end
5338 end
5339
5340 redef fun visit_all(v: Visitor)
5341 do
5342 v.enter_visit(_n_expr)
5343 v.enter_visit(_n_expr2)
5344 end
5345 end
5346 redef class APercentExpr
5347 private init empty_init do end
5348
5349 init init_apercentexpr (
5350 n_expr: nullable AExpr,
5351 n_expr2: nullable AExpr
5352 )
5353 do
5354 empty_init
5355 _n_expr = n_expr.as(not null)
5356 n_expr.parent = self
5357 _n_expr2 = n_expr2.as(not null)
5358 n_expr2.parent = self
5359 end
5360
5361 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5362 do
5363 if _n_expr == old_child then
5364 if new_child != null then
5365 new_child.parent = self
5366 assert new_child isa AExpr
5367 _n_expr = new_child
5368 else
5369 abort
5370 end
5371 return
5372 end
5373 if _n_expr2 == old_child then
5374 if new_child != null then
5375 new_child.parent = self
5376 assert new_child isa AExpr
5377 _n_expr2 = new_child
5378 else
5379 abort
5380 end
5381 return
5382 end
5383 end
5384
5385 redef fun visit_all(v: Visitor)
5386 do
5387 v.enter_visit(_n_expr)
5388 v.enter_visit(_n_expr2)
5389 end
5390 end
5391 redef class AUminusExpr
5392 private init empty_init do end
5393
5394 init init_auminusexpr (
5395 n_minus: nullable TMinus,
5396 n_expr: nullable AExpr
5397 )
5398 do
5399 empty_init
5400 _n_minus = n_minus.as(not null)
5401 n_minus.parent = self
5402 _n_expr = n_expr.as(not null)
5403 n_expr.parent = self
5404 end
5405
5406 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5407 do
5408 if _n_minus == old_child then
5409 if new_child != null then
5410 new_child.parent = self
5411 assert new_child isa TMinus
5412 _n_minus = new_child
5413 else
5414 abort
5415 end
5416 return
5417 end
5418 if _n_expr == old_child then
5419 if new_child != null then
5420 new_child.parent = self
5421 assert new_child isa AExpr
5422 _n_expr = new_child
5423 else
5424 abort
5425 end
5426 return
5427 end
5428 end
5429
5430 redef fun visit_all(v: Visitor)
5431 do
5432 v.enter_visit(_n_minus)
5433 v.enter_visit(_n_expr)
5434 end
5435 end
5436 redef class ANewExpr
5437 private init empty_init do end
5438
5439 init init_anewexpr (
5440 n_kwnew: nullable TKwnew,
5441 n_type: nullable AType,
5442 n_id: nullable TId,
5443 n_args: nullable AExprs
5444 )
5445 do
5446 empty_init
5447 _n_kwnew = n_kwnew.as(not null)
5448 n_kwnew.parent = self
5449 _n_type = n_type.as(not null)
5450 n_type.parent = self
5451 _n_id = n_id
5452 if n_id != null then
5453 n_id.parent = self
5454 end
5455 _n_args = n_args.as(not null)
5456 n_args.parent = self
5457 end
5458
5459 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5460 do
5461 if _n_kwnew == old_child then
5462 if new_child != null then
5463 new_child.parent = self
5464 assert new_child isa TKwnew
5465 _n_kwnew = new_child
5466 else
5467 abort
5468 end
5469 return
5470 end
5471 if _n_type == old_child then
5472 if new_child != null then
5473 new_child.parent = self
5474 assert new_child isa AType
5475 _n_type = new_child
5476 else
5477 abort
5478 end
5479 return
5480 end
5481 if _n_id == old_child then
5482 if new_child != null then
5483 new_child.parent = self
5484 assert new_child isa TId
5485 _n_id = new_child
5486 else
5487 _n_id = null
5488 end
5489 return
5490 end
5491 if _n_args == old_child then
5492 if new_child != null then
5493 new_child.parent = self
5494 assert new_child isa AExprs
5495 _n_args = new_child
5496 else
5497 abort
5498 end
5499 return
5500 end
5501 end
5502
5503 redef fun visit_all(v: Visitor)
5504 do
5505 v.enter_visit(_n_kwnew)
5506 v.enter_visit(_n_type)
5507 if _n_id != null then
5508 v.enter_visit(_n_id.as(not null))
5509 end
5510 v.enter_visit(_n_args)
5511 end
5512 end
5513 redef class AAttrExpr
5514 private init empty_init do end
5515
5516 init init_aattrexpr (
5517 n_expr: nullable AExpr,
5518 n_id: nullable TAttrid
5519 )
5520 do
5521 empty_init
5522 _n_expr = n_expr.as(not null)
5523 n_expr.parent = self
5524 _n_id = n_id.as(not null)
5525 n_id.parent = self
5526 end
5527
5528 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5529 do
5530 if _n_expr == old_child then
5531 if new_child != null then
5532 new_child.parent = self
5533 assert new_child isa AExpr
5534 _n_expr = new_child
5535 else
5536 abort
5537 end
5538 return
5539 end
5540 if _n_id == old_child then
5541 if new_child != null then
5542 new_child.parent = self
5543 assert new_child isa TAttrid
5544 _n_id = new_child
5545 else
5546 abort
5547 end
5548 return
5549 end
5550 end
5551
5552 redef fun visit_all(v: Visitor)
5553 do
5554 v.enter_visit(_n_expr)
5555 v.enter_visit(_n_id)
5556 end
5557 end
5558 redef class AAttrAssignExpr
5559 private init empty_init do end
5560
5561 init init_aattrassignexpr (
5562 n_expr: nullable AExpr,
5563 n_id: nullable TAttrid,
5564 n_assign: nullable TAssign,
5565 n_value: nullable AExpr
5566 )
5567 do
5568 empty_init
5569 _n_expr = n_expr.as(not null)
5570 n_expr.parent = self
5571 _n_id = n_id.as(not null)
5572 n_id.parent = self
5573 _n_assign = n_assign.as(not null)
5574 n_assign.parent = self
5575 _n_value = n_value.as(not null)
5576 n_value.parent = self
5577 end
5578
5579 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5580 do
5581 if _n_expr == old_child then
5582 if new_child != null then
5583 new_child.parent = self
5584 assert new_child isa AExpr
5585 _n_expr = new_child
5586 else
5587 abort
5588 end
5589 return
5590 end
5591 if _n_id == old_child then
5592 if new_child != null then
5593 new_child.parent = self
5594 assert new_child isa TAttrid
5595 _n_id = new_child
5596 else
5597 abort
5598 end
5599 return
5600 end
5601 if _n_assign == old_child then
5602 if new_child != null then
5603 new_child.parent = self
5604 assert new_child isa TAssign
5605 _n_assign = new_child
5606 else
5607 abort
5608 end
5609 return
5610 end
5611 if _n_value == old_child then
5612 if new_child != null then
5613 new_child.parent = self
5614 assert new_child isa AExpr
5615 _n_value = new_child
5616 else
5617 abort
5618 end
5619 return
5620 end
5621 end
5622
5623 redef fun visit_all(v: Visitor)
5624 do
5625 v.enter_visit(_n_expr)
5626 v.enter_visit(_n_id)
5627 v.enter_visit(_n_assign)
5628 v.enter_visit(_n_value)
5629 end
5630 end
5631 redef class AAttrReassignExpr
5632 private init empty_init do end
5633
5634 init init_aattrreassignexpr (
5635 n_expr: nullable AExpr,
5636 n_id: nullable TAttrid,
5637 n_assign_op: nullable AAssignOp,
5638 n_value: nullable AExpr
5639 )
5640 do
5641 empty_init
5642 _n_expr = n_expr.as(not null)
5643 n_expr.parent = self
5644 _n_id = n_id.as(not null)
5645 n_id.parent = self
5646 _n_assign_op = n_assign_op.as(not null)
5647 n_assign_op.parent = self
5648 _n_value = n_value.as(not null)
5649 n_value.parent = self
5650 end
5651
5652 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5653 do
5654 if _n_expr == old_child then
5655 if new_child != null then
5656 new_child.parent = self
5657 assert new_child isa AExpr
5658 _n_expr = new_child
5659 else
5660 abort
5661 end
5662 return
5663 end
5664 if _n_id == old_child then
5665 if new_child != null then
5666 new_child.parent = self
5667 assert new_child isa TAttrid
5668 _n_id = new_child
5669 else
5670 abort
5671 end
5672 return
5673 end
5674 if _n_assign_op == old_child then
5675 if new_child != null then
5676 new_child.parent = self
5677 assert new_child isa AAssignOp
5678 _n_assign_op = new_child
5679 else
5680 abort
5681 end
5682 return
5683 end
5684 if _n_value == old_child then
5685 if new_child != null then
5686 new_child.parent = self
5687 assert new_child isa AExpr
5688 _n_value = new_child
5689 else
5690 abort
5691 end
5692 return
5693 end
5694 end
5695
5696 redef fun visit_all(v: Visitor)
5697 do
5698 v.enter_visit(_n_expr)
5699 v.enter_visit(_n_id)
5700 v.enter_visit(_n_assign_op)
5701 v.enter_visit(_n_value)
5702 end
5703 end
5704 redef class ACallExpr
5705 private init empty_init do end
5706
5707 init init_acallexpr (
5708 n_expr: nullable AExpr,
5709 n_id: nullable TId,
5710 n_args: nullable AExprs,
5711 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
5712 )
5713 do
5714 empty_init
5715 _n_expr = n_expr.as(not null)
5716 n_expr.parent = self
5717 _n_id = n_id.as(not null)
5718 n_id.parent = self
5719 _n_args = n_args.as(not null)
5720 n_args.parent = self
5721 for n in n_closure_defs do
5722 assert n isa AClosureDef
5723 _n_closure_defs.add(n)
5724 n.parent = self
5725 end
5726 end
5727
5728 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5729 do
5730 if _n_expr == old_child then
5731 if new_child != null then
5732 new_child.parent = self
5733 assert new_child isa AExpr
5734 _n_expr = new_child
5735 else
5736 abort
5737 end
5738 return
5739 end
5740 if _n_id == old_child then
5741 if new_child != null then
5742 new_child.parent = self
5743 assert new_child isa TId
5744 _n_id = new_child
5745 else
5746 abort
5747 end
5748 return
5749 end
5750 if _n_args == old_child then
5751 if new_child != null then
5752 new_child.parent = self
5753 assert new_child isa AExprs
5754 _n_args = new_child
5755 else
5756 abort
5757 end
5758 return
5759 end
5760 for i in [0.._n_closure_defs.length[ do
5761 if _n_closure_defs[i] == old_child then
5762 if new_child != null then
5763 assert new_child isa AClosureDef
5764 _n_closure_defs[i] = new_child
5765 new_child.parent = self
5766 else
5767 _n_closure_defs.remove_at(i)
5768 end
5769 return
5770 end
5771 end
5772 end
5773
5774 redef fun visit_all(v: Visitor)
5775 do
5776 v.enter_visit(_n_expr)
5777 v.enter_visit(_n_id)
5778 v.enter_visit(_n_args)
5779 for n in _n_closure_defs do
5780 v.enter_visit(n)
5781 end
5782 end
5783 end
5784 redef class ACallAssignExpr
5785 private init empty_init do end
5786
5787 init init_acallassignexpr (
5788 n_expr: nullable AExpr,
5789 n_id: nullable TId,
5790 n_args: nullable AExprs,
5791 n_assign: nullable TAssign,
5792 n_value: nullable AExpr
5793 )
5794 do
5795 empty_init
5796 _n_expr = n_expr.as(not null)
5797 n_expr.parent = self
5798 _n_id = n_id.as(not null)
5799 n_id.parent = self
5800 _n_args = n_args.as(not null)
5801 n_args.parent = self
5802 _n_assign = n_assign.as(not null)
5803 n_assign.parent = self
5804 _n_value = n_value.as(not null)
5805 n_value.parent = self
5806 end
5807
5808 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5809 do
5810 if _n_expr == old_child then
5811 if new_child != null then
5812 new_child.parent = self
5813 assert new_child isa AExpr
5814 _n_expr = new_child
5815 else
5816 abort
5817 end
5818 return
5819 end
5820 if _n_id == old_child then
5821 if new_child != null then
5822 new_child.parent = self
5823 assert new_child isa TId
5824 _n_id = new_child
5825 else
5826 abort
5827 end
5828 return
5829 end
5830 if _n_args == old_child then
5831 if new_child != null then
5832 new_child.parent = self
5833 assert new_child isa AExprs
5834 _n_args = new_child
5835 else
5836 abort
5837 end
5838 return
5839 end
5840 if _n_assign == old_child then
5841 if new_child != null then
5842 new_child.parent = self
5843 assert new_child isa TAssign
5844 _n_assign = new_child
5845 else
5846 abort
5847 end
5848 return
5849 end
5850 if _n_value == old_child then
5851 if new_child != null then
5852 new_child.parent = self
5853 assert new_child isa AExpr
5854 _n_value = new_child
5855 else
5856 abort
5857 end
5858 return
5859 end
5860 end
5861
5862 redef fun visit_all(v: Visitor)
5863 do
5864 v.enter_visit(_n_expr)
5865 v.enter_visit(_n_id)
5866 v.enter_visit(_n_args)
5867 v.enter_visit(_n_assign)
5868 v.enter_visit(_n_value)
5869 end
5870 end
5871 redef class ACallReassignExpr
5872 private init empty_init do end
5873
5874 init init_acallreassignexpr (
5875 n_expr: nullable AExpr,
5876 n_id: nullable TId,
5877 n_args: nullable AExprs,
5878 n_assign_op: nullable AAssignOp,
5879 n_value: nullable AExpr
5880 )
5881 do
5882 empty_init
5883 _n_expr = n_expr.as(not null)
5884 n_expr.parent = self
5885 _n_id = n_id.as(not null)
5886 n_id.parent = self
5887 _n_args = n_args.as(not null)
5888 n_args.parent = self
5889 _n_assign_op = n_assign_op.as(not null)
5890 n_assign_op.parent = self
5891 _n_value = n_value.as(not null)
5892 n_value.parent = self
5893 end
5894
5895 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5896 do
5897 if _n_expr == old_child then
5898 if new_child != null then
5899 new_child.parent = self
5900 assert new_child isa AExpr
5901 _n_expr = new_child
5902 else
5903 abort
5904 end
5905 return
5906 end
5907 if _n_id == old_child then
5908 if new_child != null then
5909 new_child.parent = self
5910 assert new_child isa TId
5911 _n_id = new_child
5912 else
5913 abort
5914 end
5915 return
5916 end
5917 if _n_args == old_child then
5918 if new_child != null then
5919 new_child.parent = self
5920 assert new_child isa AExprs
5921 _n_args = new_child
5922 else
5923 abort
5924 end
5925 return
5926 end
5927 if _n_assign_op == old_child then
5928 if new_child != null then
5929 new_child.parent = self
5930 assert new_child isa AAssignOp
5931 _n_assign_op = new_child
5932 else
5933 abort
5934 end
5935 return
5936 end
5937 if _n_value == old_child then
5938 if new_child != null then
5939 new_child.parent = self
5940 assert new_child isa AExpr
5941 _n_value = new_child
5942 else
5943 abort
5944 end
5945 return
5946 end
5947 end
5948
5949 redef fun visit_all(v: Visitor)
5950 do
5951 v.enter_visit(_n_expr)
5952 v.enter_visit(_n_id)
5953 v.enter_visit(_n_args)
5954 v.enter_visit(_n_assign_op)
5955 v.enter_visit(_n_value)
5956 end
5957 end
5958 redef class ASuperExpr
5959 private init empty_init do end
5960
5961 init init_asuperexpr (
5962 n_qualified: nullable AQualified,
5963 n_kwsuper: nullable TKwsuper,
5964 n_args: nullable AExprs
5965 )
5966 do
5967 empty_init
5968 _n_qualified = n_qualified
5969 if n_qualified != null then
5970 n_qualified.parent = self
5971 end
5972 _n_kwsuper = n_kwsuper.as(not null)
5973 n_kwsuper.parent = self
5974 _n_args = n_args.as(not null)
5975 n_args.parent = self
5976 end
5977
5978 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
5979 do
5980 if _n_qualified == old_child then
5981 if new_child != null then
5982 new_child.parent = self
5983 assert new_child isa AQualified
5984 _n_qualified = new_child
5985 else
5986 _n_qualified = null
5987 end
5988 return
5989 end
5990 if _n_kwsuper == old_child then
5991 if new_child != null then
5992 new_child.parent = self
5993 assert new_child isa TKwsuper
5994 _n_kwsuper = new_child
5995 else
5996 abort
5997 end
5998 return
5999 end
6000 if _n_args == old_child then
6001 if new_child != null then
6002 new_child.parent = self
6003 assert new_child isa AExprs
6004 _n_args = new_child
6005 else
6006 abort
6007 end
6008 return
6009 end
6010 end
6011
6012 redef fun visit_all(v: Visitor)
6013 do
6014 if _n_qualified != null then
6015 v.enter_visit(_n_qualified.as(not null))
6016 end
6017 v.enter_visit(_n_kwsuper)
6018 v.enter_visit(_n_args)
6019 end
6020 end
6021 redef class AInitExpr
6022 private init empty_init do end
6023
6024 init init_ainitexpr (
6025 n_expr: nullable AExpr,
6026 n_kwinit: nullable TKwinit,
6027 n_args: nullable AExprs
6028 )
6029 do
6030 empty_init
6031 _n_expr = n_expr.as(not null)
6032 n_expr.parent = self
6033 _n_kwinit = n_kwinit.as(not null)
6034 n_kwinit.parent = self
6035 _n_args = n_args.as(not null)
6036 n_args.parent = self
6037 end
6038
6039 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6040 do
6041 if _n_expr == old_child then
6042 if new_child != null then
6043 new_child.parent = self
6044 assert new_child isa AExpr
6045 _n_expr = new_child
6046 else
6047 abort
6048 end
6049 return
6050 end
6051 if _n_kwinit == old_child then
6052 if new_child != null then
6053 new_child.parent = self
6054 assert new_child isa TKwinit
6055 _n_kwinit = new_child
6056 else
6057 abort
6058 end
6059 return
6060 end
6061 if _n_args == old_child then
6062 if new_child != null then
6063 new_child.parent = self
6064 assert new_child isa AExprs
6065 _n_args = new_child
6066 else
6067 abort
6068 end
6069 return
6070 end
6071 end
6072
6073 redef fun visit_all(v: Visitor)
6074 do
6075 v.enter_visit(_n_expr)
6076 v.enter_visit(_n_kwinit)
6077 v.enter_visit(_n_args)
6078 end
6079 end
6080 redef class ABraExpr
6081 private init empty_init do end
6082
6083 init init_abraexpr (
6084 n_expr: nullable AExpr,
6085 n_args: nullable AExprs,
6086 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
6087 )
6088 do
6089 empty_init
6090 _n_expr = n_expr.as(not null)
6091 n_expr.parent = self
6092 _n_args = n_args.as(not null)
6093 n_args.parent = self
6094 for n in n_closure_defs do
6095 assert n isa AClosureDef
6096 _n_closure_defs.add(n)
6097 n.parent = self
6098 end
6099 end
6100
6101 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6102 do
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 if _n_args == old_child then
6114 if new_child != null then
6115 new_child.parent = self
6116 assert new_child isa AExprs
6117 _n_args = new_child
6118 else
6119 abort
6120 end
6121 return
6122 end
6123 for i in [0.._n_closure_defs.length[ do
6124 if _n_closure_defs[i] == old_child then
6125 if new_child != null then
6126 assert new_child isa AClosureDef
6127 _n_closure_defs[i] = new_child
6128 new_child.parent = self
6129 else
6130 _n_closure_defs.remove_at(i)
6131 end
6132 return
6133 end
6134 end
6135 end
6136
6137 redef fun visit_all(v: Visitor)
6138 do
6139 v.enter_visit(_n_expr)
6140 v.enter_visit(_n_args)
6141 for n in _n_closure_defs do
6142 v.enter_visit(n)
6143 end
6144 end
6145 end
6146 redef class ABraAssignExpr
6147 private init empty_init do end
6148
6149 init init_abraassignexpr (
6150 n_expr: nullable AExpr,
6151 n_args: nullable AExprs,
6152 n_assign: nullable TAssign,
6153 n_value: nullable AExpr
6154 )
6155 do
6156 empty_init
6157 _n_expr = n_expr.as(not null)
6158 n_expr.parent = self
6159 _n_args = n_args.as(not null)
6160 n_args.parent = self
6161 _n_assign = n_assign.as(not null)
6162 n_assign.parent = self
6163 _n_value = n_value.as(not null)
6164 n_value.parent = self
6165 end
6166
6167 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6168 do
6169 if _n_expr == old_child then
6170 if new_child != null then
6171 new_child.parent = self
6172 assert new_child isa AExpr
6173 _n_expr = new_child
6174 else
6175 abort
6176 end
6177 return
6178 end
6179 if _n_args == old_child then
6180 if new_child != null then
6181 new_child.parent = self
6182 assert new_child isa AExprs
6183 _n_args = new_child
6184 else
6185 abort
6186 end
6187 return
6188 end
6189 if _n_assign == old_child then
6190 if new_child != null then
6191 new_child.parent = self
6192 assert new_child isa TAssign
6193 _n_assign = new_child
6194 else
6195 abort
6196 end
6197 return
6198 end
6199 if _n_value == old_child then
6200 if new_child != null then
6201 new_child.parent = self
6202 assert new_child isa AExpr
6203 _n_value = new_child
6204 else
6205 abort
6206 end
6207 return
6208 end
6209 end
6210
6211 redef fun visit_all(v: Visitor)
6212 do
6213 v.enter_visit(_n_expr)
6214 v.enter_visit(_n_args)
6215 v.enter_visit(_n_assign)
6216 v.enter_visit(_n_value)
6217 end
6218 end
6219 redef class ABraReassignExpr
6220 private init empty_init do end
6221
6222 init init_abrareassignexpr (
6223 n_expr: nullable AExpr,
6224 n_args: nullable AExprs,
6225 n_assign_op: nullable AAssignOp,
6226 n_value: nullable AExpr
6227 )
6228 do
6229 empty_init
6230 _n_expr = n_expr.as(not null)
6231 n_expr.parent = self
6232 _n_args = n_args.as(not null)
6233 n_args.parent = self
6234 _n_assign_op = n_assign_op.as(not null)
6235 n_assign_op.parent = self
6236 _n_value = n_value.as(not null)
6237 n_value.parent = self
6238 end
6239
6240 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6241 do
6242 if _n_expr == old_child then
6243 if new_child != null then
6244 new_child.parent = self
6245 assert new_child isa AExpr
6246 _n_expr = new_child
6247 else
6248 abort
6249 end
6250 return
6251 end
6252 if _n_args == old_child then
6253 if new_child != null then
6254 new_child.parent = self
6255 assert new_child isa AExprs
6256 _n_args = new_child
6257 else
6258 abort
6259 end
6260 return
6261 end
6262 if _n_assign_op == old_child then
6263 if new_child != null then
6264 new_child.parent = self
6265 assert new_child isa AAssignOp
6266 _n_assign_op = new_child
6267 else
6268 abort
6269 end
6270 return
6271 end
6272 if _n_value == old_child then
6273 if new_child != null then
6274 new_child.parent = self
6275 assert new_child isa AExpr
6276 _n_value = new_child
6277 else
6278 abort
6279 end
6280 return
6281 end
6282 end
6283
6284 redef fun visit_all(v: Visitor)
6285 do
6286 v.enter_visit(_n_expr)
6287 v.enter_visit(_n_args)
6288 v.enter_visit(_n_assign_op)
6289 v.enter_visit(_n_value)
6290 end
6291 end
6292 redef class AClosureCallExpr
6293 private init empty_init do end
6294
6295 init init_aclosurecallexpr (
6296 n_id: nullable TId,
6297 n_args: nullable AExprs,
6298 n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
6299 )
6300 do
6301 empty_init
6302 _n_id = n_id.as(not null)
6303 n_id.parent = self
6304 _n_args = n_args.as(not null)
6305 n_args.parent = self
6306 for n in n_closure_defs do
6307 assert n isa AClosureDef
6308 _n_closure_defs.add(n)
6309 n.parent = self
6310 end
6311 end
6312
6313 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6314 do
6315 if _n_id == old_child then
6316 if new_child != null then
6317 new_child.parent = self
6318 assert new_child isa TId
6319 _n_id = new_child
6320 else
6321 abort
6322 end
6323 return
6324 end
6325 if _n_args == old_child then
6326 if new_child != null then
6327 new_child.parent = self
6328 assert new_child isa AExprs
6329 _n_args = new_child
6330 else
6331 abort
6332 end
6333 return
6334 end
6335 for i in [0.._n_closure_defs.length[ do
6336 if _n_closure_defs[i] == old_child then
6337 if new_child != null then
6338 assert new_child isa AClosureDef
6339 _n_closure_defs[i] = new_child
6340 new_child.parent = self
6341 else
6342 _n_closure_defs.remove_at(i)
6343 end
6344 return
6345 end
6346 end
6347 end
6348
6349 redef fun visit_all(v: Visitor)
6350 do
6351 v.enter_visit(_n_id)
6352 v.enter_visit(_n_args)
6353 for n in _n_closure_defs do
6354 v.enter_visit(n)
6355 end
6356 end
6357 end
6358 redef class AVarExpr
6359 private init empty_init do end
6360
6361 init init_avarexpr (
6362 n_id: nullable TId
6363 )
6364 do
6365 empty_init
6366 _n_id = n_id.as(not null)
6367 n_id.parent = self
6368 end
6369
6370 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6371 do
6372 if _n_id == old_child then
6373 if new_child != null then
6374 new_child.parent = self
6375 assert new_child isa TId
6376 _n_id = new_child
6377 else
6378 abort
6379 end
6380 return
6381 end
6382 end
6383
6384 redef fun visit_all(v: Visitor)
6385 do
6386 v.enter_visit(_n_id)
6387 end
6388 end
6389 redef class AVarAssignExpr
6390 private init empty_init do end
6391
6392 init init_avarassignexpr (
6393 n_id: nullable TId,
6394 n_assign: nullable TAssign,
6395 n_value: nullable AExpr
6396 )
6397 do
6398 empty_init
6399 _n_id = n_id.as(not null)
6400 n_id.parent = self
6401 _n_assign = n_assign.as(not null)
6402 n_assign.parent = self
6403 _n_value = n_value.as(not null)
6404 n_value.parent = self
6405 end
6406
6407 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6408 do
6409 if _n_id == old_child then
6410 if new_child != null then
6411 new_child.parent = self
6412 assert new_child isa TId
6413 _n_id = new_child
6414 else
6415 abort
6416 end
6417 return
6418 end
6419 if _n_assign == old_child then
6420 if new_child != null then
6421 new_child.parent = self
6422 assert new_child isa TAssign
6423 _n_assign = new_child
6424 else
6425 abort
6426 end
6427 return
6428 end
6429 if _n_value == old_child then
6430 if new_child != null then
6431 new_child.parent = self
6432 assert new_child isa AExpr
6433 _n_value = new_child
6434 else
6435 abort
6436 end
6437 return
6438 end
6439 end
6440
6441 redef fun visit_all(v: Visitor)
6442 do
6443 v.enter_visit(_n_id)
6444 v.enter_visit(_n_assign)
6445 v.enter_visit(_n_value)
6446 end
6447 end
6448 redef class AVarReassignExpr
6449 private init empty_init do end
6450
6451 init init_avarreassignexpr (
6452 n_id: nullable TId,
6453 n_assign_op: nullable AAssignOp,
6454 n_value: nullable AExpr
6455 )
6456 do
6457 empty_init
6458 _n_id = n_id.as(not null)
6459 n_id.parent = self
6460 _n_assign_op = n_assign_op.as(not null)
6461 n_assign_op.parent = self
6462 _n_value = n_value.as(not null)
6463 n_value.parent = self
6464 end
6465
6466 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6467 do
6468 if _n_id == old_child then
6469 if new_child != null then
6470 new_child.parent = self
6471 assert new_child isa TId
6472 _n_id = new_child
6473 else
6474 abort
6475 end
6476 return
6477 end
6478 if _n_assign_op == old_child then
6479 if new_child != null then
6480 new_child.parent = self
6481 assert new_child isa AAssignOp
6482 _n_assign_op = new_child
6483 else
6484 abort
6485 end
6486 return
6487 end
6488 if _n_value == old_child then
6489 if new_child != null then
6490 new_child.parent = self
6491 assert new_child isa AExpr
6492 _n_value = new_child
6493 else
6494 abort
6495 end
6496 return
6497 end
6498 end
6499
6500 redef fun visit_all(v: Visitor)
6501 do
6502 v.enter_visit(_n_id)
6503 v.enter_visit(_n_assign_op)
6504 v.enter_visit(_n_value)
6505 end
6506 end
6507 redef class ARangeExpr
6508 private init empty_init do end
6509
6510 init init_arangeexpr (
6511 n_expr: nullable AExpr,
6512 n_expr2: nullable AExpr
6513 )
6514 do
6515 empty_init
6516 _n_expr = n_expr.as(not null)
6517 n_expr.parent = self
6518 _n_expr2 = n_expr2.as(not null)
6519 n_expr2.parent = self
6520 end
6521
6522 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6523 do
6524 if _n_expr == old_child then
6525 if new_child != null then
6526 new_child.parent = self
6527 assert new_child isa AExpr
6528 _n_expr = new_child
6529 else
6530 abort
6531 end
6532 return
6533 end
6534 if _n_expr2 == old_child then
6535 if new_child != null then
6536 new_child.parent = self
6537 assert new_child isa AExpr
6538 _n_expr2 = new_child
6539 else
6540 abort
6541 end
6542 return
6543 end
6544 end
6545
6546 redef fun visit_all(v: Visitor)
6547 do
6548 v.enter_visit(_n_expr)
6549 v.enter_visit(_n_expr2)
6550 end
6551 end
6552 redef class ACrangeExpr
6553 private init empty_init do end
6554
6555 init init_acrangeexpr (
6556 n_obra: nullable TObra,
6557 n_expr: nullable AExpr,
6558 n_expr2: nullable AExpr,
6559 n_cbra: nullable TCbra
6560 )
6561 do
6562 empty_init
6563 _n_obra = n_obra.as(not null)
6564 n_obra.parent = self
6565 _n_expr = n_expr.as(not null)
6566 n_expr.parent = self
6567 _n_expr2 = n_expr2.as(not null)
6568 n_expr2.parent = self
6569 _n_cbra = n_cbra.as(not null)
6570 n_cbra.parent = self
6571 end
6572
6573 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6574 do
6575 if _n_obra == old_child then
6576 if new_child != null then
6577 new_child.parent = self
6578 assert new_child isa TObra
6579 _n_obra = new_child
6580 else
6581 abort
6582 end
6583 return
6584 end
6585 if _n_expr == old_child then
6586 if new_child != null then
6587 new_child.parent = self
6588 assert new_child isa AExpr
6589 _n_expr = new_child
6590 else
6591 abort
6592 end
6593 return
6594 end
6595 if _n_expr2 == old_child then
6596 if new_child != null then
6597 new_child.parent = self
6598 assert new_child isa AExpr
6599 _n_expr2 = new_child
6600 else
6601 abort
6602 end
6603 return
6604 end
6605 if _n_cbra == old_child then
6606 if new_child != null then
6607 new_child.parent = self
6608 assert new_child isa TCbra
6609 _n_cbra = new_child
6610 else
6611 abort
6612 end
6613 return
6614 end
6615 end
6616
6617 redef fun visit_all(v: Visitor)
6618 do
6619 v.enter_visit(_n_obra)
6620 v.enter_visit(_n_expr)
6621 v.enter_visit(_n_expr2)
6622 v.enter_visit(_n_cbra)
6623 end
6624 end
6625 redef class AOrangeExpr
6626 private init empty_init do end
6627
6628 init init_aorangeexpr (
6629 n_obra: nullable TObra,
6630 n_expr: nullable AExpr,
6631 n_expr2: nullable AExpr,
6632 n_cbra: nullable TObra
6633 )
6634 do
6635 empty_init
6636 _n_obra = n_obra.as(not null)
6637 n_obra.parent = self
6638 _n_expr = n_expr.as(not null)
6639 n_expr.parent = self
6640 _n_expr2 = n_expr2.as(not null)
6641 n_expr2.parent = self
6642 _n_cbra = n_cbra.as(not null)
6643 n_cbra.parent = self
6644 end
6645
6646 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6647 do
6648 if _n_obra == old_child then
6649 if new_child != null then
6650 new_child.parent = self
6651 assert new_child isa TObra
6652 _n_obra = new_child
6653 else
6654 abort
6655 end
6656 return
6657 end
6658 if _n_expr == old_child then
6659 if new_child != null then
6660 new_child.parent = self
6661 assert new_child isa AExpr
6662 _n_expr = new_child
6663 else
6664 abort
6665 end
6666 return
6667 end
6668 if _n_expr2 == old_child then
6669 if new_child != null then
6670 new_child.parent = self
6671 assert new_child isa AExpr
6672 _n_expr2 = new_child
6673 else
6674 abort
6675 end
6676 return
6677 end
6678 if _n_cbra == old_child then
6679 if new_child != null then
6680 new_child.parent = self
6681 assert new_child isa TObra
6682 _n_cbra = new_child
6683 else
6684 abort
6685 end
6686 return
6687 end
6688 end
6689
6690 redef fun visit_all(v: Visitor)
6691 do
6692 v.enter_visit(_n_obra)
6693 v.enter_visit(_n_expr)
6694 v.enter_visit(_n_expr2)
6695 v.enter_visit(_n_cbra)
6696 end
6697 end
6698 redef class AArrayExpr
6699 private init empty_init do end
6700
6701 init init_aarrayexpr (
6702 n_exprs: nullable AExprs
6703 )
6704 do
6705 empty_init
6706 _n_exprs = n_exprs.as(not null)
6707 n_exprs.parent = self
6708 end
6709
6710 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6711 do
6712 if _n_exprs == old_child then
6713 if new_child != null then
6714 new_child.parent = self
6715 assert new_child isa AExprs
6716 _n_exprs = new_child
6717 else
6718 abort
6719 end
6720 return
6721 end
6722 end
6723
6724 redef fun visit_all(v: Visitor)
6725 do
6726 v.enter_visit(_n_exprs)
6727 end
6728 end
6729 redef class ASelfExpr
6730 private init empty_init do end
6731
6732 init init_aselfexpr (
6733 n_kwself: nullable TKwself
6734 )
6735 do
6736 empty_init
6737 _n_kwself = n_kwself.as(not null)
6738 n_kwself.parent = self
6739 end
6740
6741 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6742 do
6743 if _n_kwself == old_child then
6744 if new_child != null then
6745 new_child.parent = self
6746 assert new_child isa TKwself
6747 _n_kwself = new_child
6748 else
6749 abort
6750 end
6751 return
6752 end
6753 end
6754
6755 redef fun visit_all(v: Visitor)
6756 do
6757 v.enter_visit(_n_kwself)
6758 end
6759 end
6760 redef class AImplicitSelfExpr
6761 private init empty_init do end
6762
6763 init init_aimplicitselfexpr
6764 do
6765 empty_init
6766 end
6767
6768 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6769 do
6770 end
6771
6772 redef fun visit_all(v: Visitor)
6773 do
6774 end
6775 end
6776 redef class ATrueExpr
6777 private init empty_init do end
6778
6779 init init_atrueexpr (
6780 n_kwtrue: nullable TKwtrue
6781 )
6782 do
6783 empty_init
6784 _n_kwtrue = n_kwtrue.as(not null)
6785 n_kwtrue.parent = self
6786 end
6787
6788 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6789 do
6790 if _n_kwtrue == old_child then
6791 if new_child != null then
6792 new_child.parent = self
6793 assert new_child isa TKwtrue
6794 _n_kwtrue = new_child
6795 else
6796 abort
6797 end
6798 return
6799 end
6800 end
6801
6802 redef fun visit_all(v: Visitor)
6803 do
6804 v.enter_visit(_n_kwtrue)
6805 end
6806 end
6807 redef class AFalseExpr
6808 private init empty_init do end
6809
6810 init init_afalseexpr (
6811 n_kwfalse: nullable TKwfalse
6812 )
6813 do
6814 empty_init
6815 _n_kwfalse = n_kwfalse.as(not null)
6816 n_kwfalse.parent = self
6817 end
6818
6819 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6820 do
6821 if _n_kwfalse == old_child then
6822 if new_child != null then
6823 new_child.parent = self
6824 assert new_child isa TKwfalse
6825 _n_kwfalse = new_child
6826 else
6827 abort
6828 end
6829 return
6830 end
6831 end
6832
6833 redef fun visit_all(v: Visitor)
6834 do
6835 v.enter_visit(_n_kwfalse)
6836 end
6837 end
6838 redef class ANullExpr
6839 private init empty_init do end
6840
6841 init init_anullexpr (
6842 n_kwnull: nullable TKwnull
6843 )
6844 do
6845 empty_init
6846 _n_kwnull = n_kwnull.as(not null)
6847 n_kwnull.parent = self
6848 end
6849
6850 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6851 do
6852 if _n_kwnull == old_child then
6853 if new_child != null then
6854 new_child.parent = self
6855 assert new_child isa TKwnull
6856 _n_kwnull = new_child
6857 else
6858 abort
6859 end
6860 return
6861 end
6862 end
6863
6864 redef fun visit_all(v: Visitor)
6865 do
6866 v.enter_visit(_n_kwnull)
6867 end
6868 end
6869 redef class AIntExpr
6870 private init empty_init do end
6871
6872 init init_aintexpr (
6873 n_number: nullable TNumber
6874 )
6875 do
6876 empty_init
6877 _n_number = n_number.as(not null)
6878 n_number.parent = self
6879 end
6880
6881 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6882 do
6883 if _n_number == old_child then
6884 if new_child != null then
6885 new_child.parent = self
6886 assert new_child isa TNumber
6887 _n_number = new_child
6888 else
6889 abort
6890 end
6891 return
6892 end
6893 end
6894
6895 redef fun visit_all(v: Visitor)
6896 do
6897 v.enter_visit(_n_number)
6898 end
6899 end
6900 redef class AFloatExpr
6901 private init empty_init do end
6902
6903 init init_afloatexpr (
6904 n_float: nullable TFloat
6905 )
6906 do
6907 empty_init
6908 _n_float = n_float.as(not null)
6909 n_float.parent = self
6910 end
6911
6912 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6913 do
6914 if _n_float == old_child then
6915 if new_child != null then
6916 new_child.parent = self
6917 assert new_child isa TFloat
6918 _n_float = new_child
6919 else
6920 abort
6921 end
6922 return
6923 end
6924 end
6925
6926 redef fun visit_all(v: Visitor)
6927 do
6928 v.enter_visit(_n_float)
6929 end
6930 end
6931 redef class ACharExpr
6932 private init empty_init do end
6933
6934 init init_acharexpr (
6935 n_char: nullable TChar
6936 )
6937 do
6938 empty_init
6939 _n_char = n_char.as(not null)
6940 n_char.parent = self
6941 end
6942
6943 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6944 do
6945 if _n_char == old_child then
6946 if new_child != null then
6947 new_child.parent = self
6948 assert new_child isa TChar
6949 _n_char = new_child
6950 else
6951 abort
6952 end
6953 return
6954 end
6955 end
6956
6957 redef fun visit_all(v: Visitor)
6958 do
6959 v.enter_visit(_n_char)
6960 end
6961 end
6962 redef class AStringExpr
6963 private init empty_init do end
6964
6965 init init_astringexpr (
6966 n_string: nullable TString
6967 )
6968 do
6969 empty_init
6970 _n_string = n_string.as(not null)
6971 n_string.parent = self
6972 end
6973
6974 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
6975 do
6976 if _n_string == old_child then
6977 if new_child != null then
6978 new_child.parent = self
6979 assert new_child isa TString
6980 _n_string = new_child
6981 else
6982 abort
6983 end
6984 return
6985 end
6986 end
6987
6988 redef fun visit_all(v: Visitor)
6989 do
6990 v.enter_visit(_n_string)
6991 end
6992 end
6993 redef class AStartStringExpr
6994 private init empty_init do end
6995
6996 init init_astartstringexpr (
6997 n_string: nullable TStartString
6998 )
6999 do
7000 empty_init
7001 _n_string = n_string.as(not null)
7002 n_string.parent = self
7003 end
7004
7005 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7006 do
7007 if _n_string == old_child then
7008 if new_child != null then
7009 new_child.parent = self
7010 assert new_child isa TStartString
7011 _n_string = new_child
7012 else
7013 abort
7014 end
7015 return
7016 end
7017 end
7018
7019 redef fun visit_all(v: Visitor)
7020 do
7021 v.enter_visit(_n_string)
7022 end
7023 end
7024 redef class AMidStringExpr
7025 private init empty_init do end
7026
7027 init init_amidstringexpr (
7028 n_string: nullable TMidString
7029 )
7030 do
7031 empty_init
7032 _n_string = n_string.as(not null)
7033 n_string.parent = self
7034 end
7035
7036 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7037 do
7038 if _n_string == old_child then
7039 if new_child != null then
7040 new_child.parent = self
7041 assert new_child isa TMidString
7042 _n_string = new_child
7043 else
7044 abort
7045 end
7046 return
7047 end
7048 end
7049
7050 redef fun visit_all(v: Visitor)
7051 do
7052 v.enter_visit(_n_string)
7053 end
7054 end
7055 redef class AEndStringExpr
7056 private init empty_init do end
7057
7058 init init_aendstringexpr (
7059 n_string: nullable TEndString
7060 )
7061 do
7062 empty_init
7063 _n_string = n_string.as(not null)
7064 n_string.parent = self
7065 end
7066
7067 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7068 do
7069 if _n_string == old_child then
7070 if new_child != null then
7071 new_child.parent = self
7072 assert new_child isa TEndString
7073 _n_string = new_child
7074 else
7075 abort
7076 end
7077 return
7078 end
7079 end
7080
7081 redef fun visit_all(v: Visitor)
7082 do
7083 v.enter_visit(_n_string)
7084 end
7085 end
7086 redef class ASuperstringExpr
7087 private init empty_init do end
7088
7089 init init_asuperstringexpr (
7090 n_exprs: Collection[Object] # Should be Collection[AExpr]
7091 )
7092 do
7093 empty_init
7094 for n in n_exprs do
7095 assert n isa AExpr
7096 _n_exprs.add(n)
7097 n.parent = self
7098 end
7099 end
7100
7101 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7102 do
7103 for i in [0.._n_exprs.length[ do
7104 if _n_exprs[i] == old_child then
7105 if new_child != null then
7106 assert new_child isa AExpr
7107 _n_exprs[i] = new_child
7108 new_child.parent = self
7109 else
7110 _n_exprs.remove_at(i)
7111 end
7112 return
7113 end
7114 end
7115 end
7116
7117 redef fun visit_all(v: Visitor)
7118 do
7119 for n in _n_exprs do
7120 v.enter_visit(n)
7121 end
7122 end
7123 end
7124 redef class AParExpr
7125 private init empty_init do end
7126
7127 init init_aparexpr (
7128 n_opar: nullable TOpar,
7129 n_expr: nullable AExpr,
7130 n_cpar: nullable TCpar
7131 )
7132 do
7133 empty_init
7134 _n_opar = n_opar.as(not null)
7135 n_opar.parent = self
7136 _n_expr = n_expr.as(not null)
7137 n_expr.parent = self
7138 _n_cpar = n_cpar.as(not null)
7139 n_cpar.parent = self
7140 end
7141
7142 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7143 do
7144 if _n_opar == old_child then
7145 if new_child != null then
7146 new_child.parent = self
7147 assert new_child isa TOpar
7148 _n_opar = new_child
7149 else
7150 abort
7151 end
7152 return
7153 end
7154 if _n_expr == old_child then
7155 if new_child != null then
7156 new_child.parent = self
7157 assert new_child isa AExpr
7158 _n_expr = new_child
7159 else
7160 abort
7161 end
7162 return
7163 end
7164 if _n_cpar == old_child then
7165 if new_child != null then
7166 new_child.parent = self
7167 assert new_child isa TCpar
7168 _n_cpar = new_child
7169 else
7170 abort
7171 end
7172 return
7173 end
7174 end
7175
7176 redef fun visit_all(v: Visitor)
7177 do
7178 v.enter_visit(_n_opar)
7179 v.enter_visit(_n_expr)
7180 v.enter_visit(_n_cpar)
7181 end
7182 end
7183 redef class AAsCastExpr
7184 private init empty_init do end
7185
7186 init init_aascastexpr (
7187 n_expr: nullable AExpr,
7188 n_kwas: nullable TKwas,
7189 n_opar: nullable TOpar,
7190 n_type: nullable AType,
7191 n_cpar: nullable TCpar
7192 )
7193 do
7194 empty_init
7195 _n_expr = n_expr.as(not null)
7196 n_expr.parent = self
7197 _n_kwas = n_kwas.as(not null)
7198 n_kwas.parent = self
7199 _n_opar = n_opar.as(not null)
7200 n_opar.parent = self
7201 _n_type = n_type.as(not null)
7202 n_type.parent = self
7203 _n_cpar = n_cpar.as(not null)
7204 n_cpar.parent = self
7205 end
7206
7207 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7208 do
7209 if _n_expr == old_child then
7210 if new_child != null then
7211 new_child.parent = self
7212 assert new_child isa AExpr
7213 _n_expr = new_child
7214 else
7215 abort
7216 end
7217 return
7218 end
7219 if _n_kwas == old_child then
7220 if new_child != null then
7221 new_child.parent = self
7222 assert new_child isa TKwas
7223 _n_kwas = new_child
7224 else
7225 abort
7226 end
7227 return
7228 end
7229 if _n_opar == old_child then
7230 if new_child != null then
7231 new_child.parent = self
7232 assert new_child isa TOpar
7233 _n_opar = new_child
7234 else
7235 abort
7236 end
7237 return
7238 end
7239 if _n_type == old_child then
7240 if new_child != null then
7241 new_child.parent = self
7242 assert new_child isa AType
7243 _n_type = new_child
7244 else
7245 abort
7246 end
7247 return
7248 end
7249 if _n_cpar == old_child then
7250 if new_child != null then
7251 new_child.parent = self
7252 assert new_child isa TCpar
7253 _n_cpar = new_child
7254 else
7255 abort
7256 end
7257 return
7258 end
7259 end
7260
7261 redef fun visit_all(v: Visitor)
7262 do
7263 v.enter_visit(_n_expr)
7264 v.enter_visit(_n_kwas)
7265 v.enter_visit(_n_opar)
7266 v.enter_visit(_n_type)
7267 v.enter_visit(_n_cpar)
7268 end
7269 end
7270 redef class AAsNotnullExpr
7271 private init empty_init do end
7272
7273 init init_aasnotnullexpr (
7274 n_expr: nullable AExpr,
7275 n_kwas: nullable TKwas,
7276 n_opar: nullable TOpar,
7277 n_kwnot: nullable TKwnot,
7278 n_kwnull: nullable TKwnull,
7279 n_cpar: nullable TCpar
7280 )
7281 do
7282 empty_init
7283 _n_expr = n_expr.as(not null)
7284 n_expr.parent = self
7285 _n_kwas = n_kwas.as(not null)
7286 n_kwas.parent = self
7287 _n_opar = n_opar.as(not null)
7288 n_opar.parent = self
7289 _n_kwnot = n_kwnot.as(not null)
7290 n_kwnot.parent = self
7291 _n_kwnull = n_kwnull.as(not null)
7292 n_kwnull.parent = self
7293 _n_cpar = n_cpar.as(not null)
7294 n_cpar.parent = self
7295 end
7296
7297 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7298 do
7299 if _n_expr == old_child then
7300 if new_child != null then
7301 new_child.parent = self
7302 assert new_child isa AExpr
7303 _n_expr = new_child
7304 else
7305 abort
7306 end
7307 return
7308 end
7309 if _n_kwas == old_child then
7310 if new_child != null then
7311 new_child.parent = self
7312 assert new_child isa TKwas
7313 _n_kwas = new_child
7314 else
7315 abort
7316 end
7317 return
7318 end
7319 if _n_opar == old_child then
7320 if new_child != null then
7321 new_child.parent = self
7322 assert new_child isa TOpar
7323 _n_opar = new_child
7324 else
7325 abort
7326 end
7327 return
7328 end
7329 if _n_kwnot == old_child then
7330 if new_child != null then
7331 new_child.parent = self
7332 assert new_child isa TKwnot
7333 _n_kwnot = new_child
7334 else
7335 abort
7336 end
7337 return
7338 end
7339 if _n_kwnull == old_child then
7340 if new_child != null then
7341 new_child.parent = self
7342 assert new_child isa TKwnull
7343 _n_kwnull = new_child
7344 else
7345 abort
7346 end
7347 return
7348 end
7349 if _n_cpar == old_child then
7350 if new_child != null then
7351 new_child.parent = self
7352 assert new_child isa TCpar
7353 _n_cpar = new_child
7354 else
7355 abort
7356 end
7357 return
7358 end
7359 end
7360
7361 redef fun visit_all(v: Visitor)
7362 do
7363 v.enter_visit(_n_expr)
7364 v.enter_visit(_n_kwas)
7365 v.enter_visit(_n_opar)
7366 v.enter_visit(_n_kwnot)
7367 v.enter_visit(_n_kwnull)
7368 v.enter_visit(_n_cpar)
7369 end
7370 end
7371 redef class AIssetAttrExpr
7372 private init empty_init do end
7373
7374 init init_aissetattrexpr (
7375 n_kwisset: nullable TKwisset,
7376 n_expr: nullable AExpr,
7377 n_id: nullable TAttrid
7378 )
7379 do
7380 empty_init
7381 _n_kwisset = n_kwisset.as(not null)
7382 n_kwisset.parent = self
7383 _n_expr = n_expr.as(not null)
7384 n_expr.parent = self
7385 _n_id = n_id.as(not null)
7386 n_id.parent = self
7387 end
7388
7389 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7390 do
7391 if _n_kwisset == old_child then
7392 if new_child != null then
7393 new_child.parent = self
7394 assert new_child isa TKwisset
7395 _n_kwisset = new_child
7396 else
7397 abort
7398 end
7399 return
7400 end
7401 if _n_expr == old_child then
7402 if new_child != null then
7403 new_child.parent = self
7404 assert new_child isa AExpr
7405 _n_expr = new_child
7406 else
7407 abort
7408 end
7409 return
7410 end
7411 if _n_id == old_child then
7412 if new_child != null then
7413 new_child.parent = self
7414 assert new_child isa TAttrid
7415 _n_id = new_child
7416 else
7417 abort
7418 end
7419 return
7420 end
7421 end
7422
7423 redef fun visit_all(v: Visitor)
7424 do
7425 v.enter_visit(_n_kwisset)
7426 v.enter_visit(_n_expr)
7427 v.enter_visit(_n_id)
7428 end
7429 end
7430 redef class ADebugTypeExpr
7431 private init empty_init do end
7432
7433 init init_adebugtypeexpr (
7434 n_kwdebug: nullable TKwdebug,
7435 n_kwtype: nullable TKwtype,
7436 n_expr: nullable AExpr,
7437 n_type: nullable AType
7438 )
7439 do
7440 empty_init
7441 _n_kwdebug = n_kwdebug.as(not null)
7442 n_kwdebug.parent = self
7443 _n_kwtype = n_kwtype.as(not null)
7444 n_kwtype.parent = self
7445 _n_expr = n_expr.as(not null)
7446 n_expr.parent = self
7447 _n_type = n_type.as(not null)
7448 n_type.parent = self
7449 end
7450
7451 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7452 do
7453 if _n_kwdebug == old_child then
7454 if new_child != null then
7455 new_child.parent = self
7456 assert new_child isa TKwdebug
7457 _n_kwdebug = new_child
7458 else
7459 abort
7460 end
7461 return
7462 end
7463 if _n_kwtype == old_child then
7464 if new_child != null then
7465 new_child.parent = self
7466 assert new_child isa TKwtype
7467 _n_kwtype = new_child
7468 else
7469 abort
7470 end
7471 return
7472 end
7473 if _n_expr == old_child then
7474 if new_child != null then
7475 new_child.parent = self
7476 assert new_child isa AExpr
7477 _n_expr = new_child
7478 else
7479 abort
7480 end
7481 return
7482 end
7483 if _n_type == old_child then
7484 if new_child != null then
7485 new_child.parent = self
7486 assert new_child isa AType
7487 _n_type = new_child
7488 else
7489 abort
7490 end
7491 return
7492 end
7493 end
7494
7495 redef fun visit_all(v: Visitor)
7496 do
7497 v.enter_visit(_n_kwdebug)
7498 v.enter_visit(_n_kwtype)
7499 v.enter_visit(_n_expr)
7500 v.enter_visit(_n_type)
7501 end
7502 end
7503 redef class AListExprs
7504 private init empty_init do end
7505
7506 init init_alistexprs (
7507 n_exprs: Collection[Object] # Should be Collection[AExpr]
7508 )
7509 do
7510 empty_init
7511 for n in n_exprs do
7512 assert n isa AExpr
7513 _n_exprs.add(n)
7514 n.parent = self
7515 end
7516 end
7517
7518 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7519 do
7520 for i in [0.._n_exprs.length[ do
7521 if _n_exprs[i] == old_child then
7522 if new_child != null then
7523 assert new_child isa AExpr
7524 _n_exprs[i] = new_child
7525 new_child.parent = self
7526 else
7527 _n_exprs.remove_at(i)
7528 end
7529 return
7530 end
7531 end
7532 end
7533
7534 redef fun visit_all(v: Visitor)
7535 do
7536 for n in _n_exprs do
7537 v.enter_visit(n)
7538 end
7539 end
7540 end
7541 redef class AParExprs
7542 private init empty_init do end
7543
7544 init init_aparexprs (
7545 n_opar: nullable TOpar,
7546 n_exprs: Collection[Object], # Should be Collection[AExpr]
7547 n_cpar: nullable TCpar
7548 )
7549 do
7550 empty_init
7551 _n_opar = n_opar.as(not null)
7552 n_opar.parent = self
7553 for n in n_exprs do
7554 assert n isa AExpr
7555 _n_exprs.add(n)
7556 n.parent = self
7557 end
7558 _n_cpar = n_cpar.as(not null)
7559 n_cpar.parent = self
7560 end
7561
7562 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7563 do
7564 if _n_opar == old_child then
7565 if new_child != null then
7566 new_child.parent = self
7567 assert new_child isa TOpar
7568 _n_opar = new_child
7569 else
7570 abort
7571 end
7572 return
7573 end
7574 for i in [0.._n_exprs.length[ do
7575 if _n_exprs[i] == old_child then
7576 if new_child != null then
7577 assert new_child isa AExpr
7578 _n_exprs[i] = new_child
7579 new_child.parent = self
7580 else
7581 _n_exprs.remove_at(i)
7582 end
7583 return
7584 end
7585 end
7586 if _n_cpar == old_child then
7587 if new_child != null then
7588 new_child.parent = self
7589 assert new_child isa TCpar
7590 _n_cpar = new_child
7591 else
7592 abort
7593 end
7594 return
7595 end
7596 end
7597
7598 redef fun visit_all(v: Visitor)
7599 do
7600 v.enter_visit(_n_opar)
7601 for n in _n_exprs do
7602 v.enter_visit(n)
7603 end
7604 v.enter_visit(_n_cpar)
7605 end
7606 end
7607 redef class ABraExprs
7608 private init empty_init do end
7609
7610 init init_abraexprs (
7611 n_obra: nullable TObra,
7612 n_exprs: Collection[Object], # Should be Collection[AExpr]
7613 n_cbra: nullable TCbra
7614 )
7615 do
7616 empty_init
7617 _n_obra = n_obra.as(not null)
7618 n_obra.parent = self
7619 for n in n_exprs do
7620 assert n isa AExpr
7621 _n_exprs.add(n)
7622 n.parent = self
7623 end
7624 _n_cbra = n_cbra.as(not null)
7625 n_cbra.parent = self
7626 end
7627
7628 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7629 do
7630 if _n_obra == old_child then
7631 if new_child != null then
7632 new_child.parent = self
7633 assert new_child isa TObra
7634 _n_obra = new_child
7635 else
7636 abort
7637 end
7638 return
7639 end
7640 for i in [0.._n_exprs.length[ do
7641 if _n_exprs[i] == old_child then
7642 if new_child != null then
7643 assert new_child isa AExpr
7644 _n_exprs[i] = new_child
7645 new_child.parent = self
7646 else
7647 _n_exprs.remove_at(i)
7648 end
7649 return
7650 end
7651 end
7652 if _n_cbra == old_child then
7653 if new_child != null then
7654 new_child.parent = self
7655 assert new_child isa TCbra
7656 _n_cbra = new_child
7657 else
7658 abort
7659 end
7660 return
7661 end
7662 end
7663
7664 redef fun visit_all(v: Visitor)
7665 do
7666 v.enter_visit(_n_obra)
7667 for n in _n_exprs do
7668 v.enter_visit(n)
7669 end
7670 v.enter_visit(_n_cbra)
7671 end
7672 end
7673 redef class APlusAssignOp
7674 private init empty_init do end
7675
7676 init init_aplusassignop (
7677 n_pluseq: nullable TPluseq
7678 )
7679 do
7680 empty_init
7681 _n_pluseq = n_pluseq.as(not null)
7682 n_pluseq.parent = self
7683 end
7684
7685 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7686 do
7687 if _n_pluseq == old_child then
7688 if new_child != null then
7689 new_child.parent = self
7690 assert new_child isa TPluseq
7691 _n_pluseq = new_child
7692 else
7693 abort
7694 end
7695 return
7696 end
7697 end
7698
7699 redef fun visit_all(v: Visitor)
7700 do
7701 v.enter_visit(_n_pluseq)
7702 end
7703 end
7704 redef class AMinusAssignOp
7705 private init empty_init do end
7706
7707 init init_aminusassignop (
7708 n_minuseq: nullable TMinuseq
7709 )
7710 do
7711 empty_init
7712 _n_minuseq = n_minuseq.as(not null)
7713 n_minuseq.parent = self
7714 end
7715
7716 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7717 do
7718 if _n_minuseq == old_child then
7719 if new_child != null then
7720 new_child.parent = self
7721 assert new_child isa TMinuseq
7722 _n_minuseq = new_child
7723 else
7724 abort
7725 end
7726 return
7727 end
7728 end
7729
7730 redef fun visit_all(v: Visitor)
7731 do
7732 v.enter_visit(_n_minuseq)
7733 end
7734 end
7735 redef class AClosureDef
7736 private init empty_init do end
7737
7738 init init_aclosuredef (
7739 n_bang: nullable TBang,
7740 n_id: nullable AClosureId,
7741 n_ids: Collection[Object], # Should be Collection[TId]
7742 n_kwdo: nullable TKwdo,
7743 n_expr: nullable AExpr,
7744 n_label: nullable ALabel
7745 )
7746 do
7747 empty_init
7748 _n_bang = n_bang.as(not null)
7749 n_bang.parent = self
7750 _n_id = n_id.as(not null)
7751 n_id.parent = self
7752 for n in n_ids do
7753 assert n isa TId
7754 _n_ids.add(n)
7755 n.parent = self
7756 end
7757 _n_kwdo = n_kwdo
7758 if n_kwdo != null then
7759 n_kwdo.parent = self
7760 end
7761 _n_expr = n_expr
7762 if n_expr != null then
7763 n_expr.parent = self
7764 end
7765 _n_label = n_label
7766 if n_label != null then
7767 n_label.parent = self
7768 end
7769 end
7770
7771 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7772 do
7773 if _n_bang == old_child then
7774 if new_child != null then
7775 new_child.parent = self
7776 assert new_child isa TBang
7777 _n_bang = new_child
7778 else
7779 abort
7780 end
7781 return
7782 end
7783 if _n_id == old_child then
7784 if new_child != null then
7785 new_child.parent = self
7786 assert new_child isa AClosureId
7787 _n_id = new_child
7788 else
7789 abort
7790 end
7791 return
7792 end
7793 for i in [0.._n_ids.length[ do
7794 if _n_ids[i] == old_child then
7795 if new_child != null then
7796 assert new_child isa TId
7797 _n_ids[i] = new_child
7798 new_child.parent = self
7799 else
7800 _n_ids.remove_at(i)
7801 end
7802 return
7803 end
7804 end
7805 if _n_kwdo == old_child then
7806 if new_child != null then
7807 new_child.parent = self
7808 assert new_child isa TKwdo
7809 _n_kwdo = new_child
7810 else
7811 _n_kwdo = null
7812 end
7813 return
7814 end
7815 if _n_expr == old_child then
7816 if new_child != null then
7817 new_child.parent = self
7818 assert new_child isa AExpr
7819 _n_expr = new_child
7820 else
7821 _n_expr = null
7822 end
7823 return
7824 end
7825 if _n_label == old_child then
7826 if new_child != null then
7827 new_child.parent = self
7828 assert new_child isa ALabel
7829 _n_label = new_child
7830 else
7831 _n_label = null
7832 end
7833 return
7834 end
7835 end
7836
7837 redef fun visit_all(v: Visitor)
7838 do
7839 v.enter_visit(_n_bang)
7840 v.enter_visit(_n_id)
7841 for n in _n_ids do
7842 v.enter_visit(n)
7843 end
7844 if _n_kwdo != null then
7845 v.enter_visit(_n_kwdo.as(not null))
7846 end
7847 if _n_expr != null then
7848 v.enter_visit(_n_expr.as(not null))
7849 end
7850 if _n_label != null then
7851 v.enter_visit(_n_label.as(not null))
7852 end
7853 end
7854 end
7855 redef class ASimpleClosureId
7856 private init empty_init do end
7857
7858 init init_asimpleclosureid (
7859 n_id: nullable TId
7860 )
7861 do
7862 empty_init
7863 _n_id = n_id.as(not null)
7864 n_id.parent = self
7865 end
7866
7867 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7868 do
7869 if _n_id == old_child then
7870 if new_child != null then
7871 new_child.parent = self
7872 assert new_child isa TId
7873 _n_id = new_child
7874 else
7875 abort
7876 end
7877 return
7878 end
7879 end
7880
7881 redef fun visit_all(v: Visitor)
7882 do
7883 v.enter_visit(_n_id)
7884 end
7885 end
7886 redef class ABreakClosureId
7887 private init empty_init do end
7888
7889 init init_abreakclosureid (
7890 n_kwbreak: nullable TKwbreak
7891 )
7892 do
7893 empty_init
7894 _n_kwbreak = n_kwbreak.as(not null)
7895 n_kwbreak.parent = self
7896 end
7897
7898 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7899 do
7900 if _n_kwbreak == old_child then
7901 if new_child != null then
7902 new_child.parent = self
7903 assert new_child isa TKwbreak
7904 _n_kwbreak = new_child
7905 else
7906 abort
7907 end
7908 return
7909 end
7910 end
7911
7912 redef fun visit_all(v: Visitor)
7913 do
7914 v.enter_visit(_n_kwbreak)
7915 end
7916 end
7917 redef class AModuleName
7918 private init empty_init do end
7919
7920 init init_amodulename (
7921 n_quad: nullable TQuad,
7922 n_path: Collection[Object], # Should be Collection[TId]
7923 n_id: nullable TId
7924 )
7925 do
7926 empty_init
7927 _n_quad = n_quad
7928 if n_quad != null then
7929 n_quad.parent = self
7930 end
7931 for n in n_path do
7932 assert n isa TId
7933 _n_path.add(n)
7934 n.parent = self
7935 end
7936 _n_id = n_id.as(not null)
7937 n_id.parent = self
7938 end
7939
7940 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
7941 do
7942 if _n_quad == old_child then
7943 if new_child != null then
7944 new_child.parent = self
7945 assert new_child isa TQuad
7946 _n_quad = new_child
7947 else
7948 _n_quad = null
7949 end
7950 return
7951 end
7952 for i in [0.._n_path.length[ do
7953 if _n_path[i] == old_child then
7954 if new_child != null then
7955 assert new_child isa TId
7956 _n_path[i] = new_child
7957 new_child.parent = self
7958 else
7959 _n_path.remove_at(i)
7960 end
7961 return
7962 end
7963 end
7964 if _n_id == old_child then
7965 if new_child != null then
7966 new_child.parent = self
7967 assert new_child isa TId
7968 _n_id = new_child
7969 else
7970 abort
7971 end
7972 return
7973 end
7974 end
7975
7976 redef fun visit_all(v: Visitor)
7977 do
7978 if _n_quad != null then
7979 v.enter_visit(_n_quad.as(not null))
7980 end
7981 for n in _n_path do
7982 v.enter_visit(n)
7983 end
7984 v.enter_visit(_n_id)
7985 end
7986 end
7987 redef class AExternCalls
7988 private init empty_init do end
7989
7990 init init_aexterncalls (
7991 n_kwimport: nullable TKwimport,
7992 n_extern_calls: Collection[Object] # Should be Collection[AExternCall]
7993 )
7994 do
7995 empty_init
7996 _n_kwimport = n_kwimport.as(not null)
7997 n_kwimport.parent = self
7998 for n in n_extern_calls do
7999 assert n isa AExternCall
8000 _n_extern_calls.add(n)
8001 n.parent = self
8002 end
8003 end
8004
8005 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8006 do
8007 if _n_kwimport == old_child then
8008 if new_child != null then
8009 new_child.parent = self
8010 assert new_child isa TKwimport
8011 _n_kwimport = new_child
8012 else
8013 abort
8014 end
8015 return
8016 end
8017 for i in [0.._n_extern_calls.length[ do
8018 if _n_extern_calls[i] == old_child then
8019 if new_child != null then
8020 assert new_child isa AExternCall
8021 _n_extern_calls[i] = new_child
8022 new_child.parent = self
8023 else
8024 _n_extern_calls.remove_at(i)
8025 end
8026 return
8027 end
8028 end
8029 end
8030
8031 redef fun visit_all(v: Visitor)
8032 do
8033 v.enter_visit(_n_kwimport)
8034 for n in _n_extern_calls do
8035 v.enter_visit(n)
8036 end
8037 end
8038 end
8039 redef class AExternCall
8040 private init empty_init do end
8041
8042 init init_aexterncall
8043 do
8044 empty_init
8045 end
8046
8047 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8048 do
8049 end
8050
8051 redef fun visit_all(v: Visitor)
8052 do
8053 end
8054 end
8055 redef class ASuperExternCall
8056 private init empty_init do end
8057
8058 init init_asuperexterncall (
8059 n_kwsuper: nullable TKwsuper
8060 )
8061 do
8062 empty_init
8063 _n_kwsuper = n_kwsuper.as(not null)
8064 n_kwsuper.parent = self
8065 end
8066
8067 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8068 do
8069 if _n_kwsuper == old_child then
8070 if new_child != null then
8071 new_child.parent = self
8072 assert new_child isa TKwsuper
8073 _n_kwsuper = new_child
8074 else
8075 abort
8076 end
8077 return
8078 end
8079 end
8080
8081 redef fun visit_all(v: Visitor)
8082 do
8083 v.enter_visit(_n_kwsuper)
8084 end
8085 end
8086 redef class ALocalPropExternCall
8087 private init empty_init do end
8088
8089 init init_alocalpropexterncall (
8090 n_methid: nullable AMethid
8091 )
8092 do
8093 empty_init
8094 _n_methid = n_methid.as(not null)
8095 n_methid.parent = self
8096 end
8097
8098 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8099 do
8100 if _n_methid == old_child then
8101 if new_child != null then
8102 new_child.parent = self
8103 assert new_child isa AMethid
8104 _n_methid = new_child
8105 else
8106 abort
8107 end
8108 return
8109 end
8110 end
8111
8112 redef fun visit_all(v: Visitor)
8113 do
8114 v.enter_visit(_n_methid)
8115 end
8116 end
8117 redef class AFullPropExternCall
8118 private init empty_init do end
8119
8120 init init_afullpropexterncall (
8121 n_classid: nullable TClassid,
8122 n_quad: nullable TQuad,
8123 n_methid: nullable AMethid
8124 )
8125 do
8126 empty_init
8127 _n_classid = n_classid.as(not null)
8128 n_classid.parent = self
8129 _n_quad = n_quad
8130 if n_quad != null then
8131 n_quad.parent = self
8132 end
8133 _n_methid = n_methid.as(not null)
8134 n_methid.parent = self
8135 end
8136
8137 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8138 do
8139 if _n_classid == old_child then
8140 if new_child != null then
8141 new_child.parent = self
8142 assert new_child isa TClassid
8143 _n_classid = new_child
8144 else
8145 abort
8146 end
8147 return
8148 end
8149 if _n_quad == old_child then
8150 if new_child != null then
8151 new_child.parent = self
8152 assert new_child isa TQuad
8153 _n_quad = new_child
8154 else
8155 _n_quad = null
8156 end
8157 return
8158 end
8159 if _n_methid == old_child then
8160 if new_child != null then
8161 new_child.parent = self
8162 assert new_child isa AMethid
8163 _n_methid = new_child
8164 else
8165 abort
8166 end
8167 return
8168 end
8169 end
8170
8171 redef fun visit_all(v: Visitor)
8172 do
8173 v.enter_visit(_n_classid)
8174 if _n_quad != null then
8175 v.enter_visit(_n_quad.as(not null))
8176 end
8177 v.enter_visit(_n_methid)
8178 end
8179 end
8180 redef class AInitPropExternCall
8181 private init empty_init do end
8182
8183 init init_ainitpropexterncall (
8184 n_classid: nullable TClassid
8185 )
8186 do
8187 empty_init
8188 _n_classid = n_classid.as(not null)
8189 n_classid.parent = self
8190 end
8191
8192 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8193 do
8194 if _n_classid == old_child then
8195 if new_child != null then
8196 new_child.parent = self
8197 assert new_child isa TClassid
8198 _n_classid = new_child
8199 else
8200 abort
8201 end
8202 return
8203 end
8204 end
8205
8206 redef fun visit_all(v: Visitor)
8207 do
8208 v.enter_visit(_n_classid)
8209 end
8210 end
8211 redef class ACastAsExternCall
8212 private init empty_init do end
8213
8214 init init_acastasexterncall (
8215 n_from_type: nullable AType,
8216 n_kwas: nullable TKwas,
8217 n_to_type: nullable AType
8218 )
8219 do
8220 empty_init
8221 _n_from_type = n_from_type.as(not null)
8222 n_from_type.parent = self
8223 _n_kwas = n_kwas.as(not null)
8224 n_kwas.parent = self
8225 _n_to_type = n_to_type.as(not null)
8226 n_to_type.parent = self
8227 end
8228
8229 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8230 do
8231 if _n_from_type == old_child then
8232 if new_child != null then
8233 new_child.parent = self
8234 assert new_child isa AType
8235 _n_from_type = new_child
8236 else
8237 abort
8238 end
8239 return
8240 end
8241 if _n_kwas == old_child then
8242 if new_child != null then
8243 new_child.parent = self
8244 assert new_child isa TKwas
8245 _n_kwas = new_child
8246 else
8247 abort
8248 end
8249 return
8250 end
8251 if _n_to_type == old_child then
8252 if new_child != null then
8253 new_child.parent = self
8254 assert new_child isa AType
8255 _n_to_type = new_child
8256 else
8257 abort
8258 end
8259 return
8260 end
8261 end
8262
8263 redef fun visit_all(v: Visitor)
8264 do
8265 v.enter_visit(_n_from_type)
8266 v.enter_visit(_n_kwas)
8267 v.enter_visit(_n_to_type)
8268 end
8269 end
8270 redef class AAsNullableExternCall
8271 private init empty_init do end
8272
8273 init init_aasnullableexterncall (
8274 n_type: nullable AType,
8275 n_kwas: nullable TKwas,
8276 n_kwnullable: nullable TKwnullable
8277 )
8278 do
8279 empty_init
8280 _n_type = n_type.as(not null)
8281 n_type.parent = self
8282 _n_kwas = n_kwas.as(not null)
8283 n_kwas.parent = self
8284 _n_kwnullable = n_kwnullable.as(not null)
8285 n_kwnullable.parent = self
8286 end
8287
8288 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8289 do
8290 if _n_type == old_child then
8291 if new_child != null then
8292 new_child.parent = self
8293 assert new_child isa AType
8294 _n_type = new_child
8295 else
8296 abort
8297 end
8298 return
8299 end
8300 if _n_kwas == old_child then
8301 if new_child != null then
8302 new_child.parent = self
8303 assert new_child isa TKwas
8304 _n_kwas = new_child
8305 else
8306 abort
8307 end
8308 return
8309 end
8310 if _n_kwnullable == old_child then
8311 if new_child != null then
8312 new_child.parent = self
8313 assert new_child isa TKwnullable
8314 _n_kwnullable = new_child
8315 else
8316 abort
8317 end
8318 return
8319 end
8320 end
8321
8322 redef fun visit_all(v: Visitor)
8323 do
8324 v.enter_visit(_n_type)
8325 v.enter_visit(_n_kwas)
8326 v.enter_visit(_n_kwnullable)
8327 end
8328 end
8329 redef class AAsNotNullableExternCall
8330 private init empty_init do end
8331
8332 init init_aasnotnullableexterncall (
8333 n_type: nullable AType,
8334 n_kwas: nullable TKwas,
8335 n_kwnot: nullable TKwnot,
8336 n_kwnullable: nullable TKwnullable
8337 )
8338 do
8339 empty_init
8340 _n_type = n_type.as(not null)
8341 n_type.parent = self
8342 _n_kwas = n_kwas.as(not null)
8343 n_kwas.parent = self
8344 _n_kwnot = n_kwnot.as(not null)
8345 n_kwnot.parent = self
8346 _n_kwnullable = n_kwnullable.as(not null)
8347 n_kwnullable.parent = self
8348 end
8349
8350 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8351 do
8352 if _n_type == old_child then
8353 if new_child != null then
8354 new_child.parent = self
8355 assert new_child isa AType
8356 _n_type = new_child
8357 else
8358 abort
8359 end
8360 return
8361 end
8362 if _n_kwas == old_child then
8363 if new_child != null then
8364 new_child.parent = self
8365 assert new_child isa TKwas
8366 _n_kwas = new_child
8367 else
8368 abort
8369 end
8370 return
8371 end
8372 if _n_kwnot == old_child then
8373 if new_child != null then
8374 new_child.parent = self
8375 assert new_child isa TKwnot
8376 _n_kwnot = new_child
8377 else
8378 abort
8379 end
8380 return
8381 end
8382 if _n_kwnullable == old_child then
8383 if new_child != null then
8384 new_child.parent = self
8385 assert new_child isa TKwnullable
8386 _n_kwnullable = new_child
8387 else
8388 abort
8389 end
8390 return
8391 end
8392 end
8393
8394 redef fun visit_all(v: Visitor)
8395 do
8396 v.enter_visit(_n_type)
8397 v.enter_visit(_n_kwas)
8398 v.enter_visit(_n_kwnot)
8399 v.enter_visit(_n_kwnullable)
8400 end
8401 end
8402 redef class AInLanguage
8403 private init empty_init do end
8404
8405 init init_ainlanguage (
8406 n_kwin: nullable TKwin,
8407 n_string: nullable TString
8408 )
8409 do
8410 empty_init
8411 _n_kwin = n_kwin.as(not null)
8412 n_kwin.parent = self
8413 _n_string = n_string.as(not null)
8414 n_string.parent = self
8415 end
8416
8417 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8418 do
8419 if _n_kwin == old_child then
8420 if new_child != null then
8421 new_child.parent = self
8422 assert new_child isa TKwin
8423 _n_kwin = new_child
8424 else
8425 abort
8426 end
8427 return
8428 end
8429 if _n_string == old_child then
8430 if new_child != null then
8431 new_child.parent = self
8432 assert new_child isa TString
8433 _n_string = new_child
8434 else
8435 abort
8436 end
8437 return
8438 end
8439 end
8440
8441 redef fun visit_all(v: Visitor)
8442 do
8443 v.enter_visit(_n_kwin)
8444 v.enter_visit(_n_string)
8445 end
8446 end
8447 redef class AExternCodeBlock
8448 private init empty_init do end
8449
8450 init init_aexterncodeblock (
8451 n_in_language: nullable AInLanguage,
8452 n_extern_code_segment: nullable TExternCodeSegment
8453 )
8454 do
8455 empty_init
8456 _n_in_language = n_in_language
8457 if n_in_language != null then
8458 n_in_language.parent = self
8459 end
8460 _n_extern_code_segment = n_extern_code_segment.as(not null)
8461 n_extern_code_segment.parent = self
8462 end
8463
8464 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8465 do
8466 if _n_in_language == old_child then
8467 if new_child != null then
8468 new_child.parent = self
8469 assert new_child isa AInLanguage
8470 _n_in_language = new_child
8471 else
8472 _n_in_language = null
8473 end
8474 return
8475 end
8476 if _n_extern_code_segment == old_child then
8477 if new_child != null then
8478 new_child.parent = self
8479 assert new_child isa TExternCodeSegment
8480 _n_extern_code_segment = new_child
8481 else
8482 abort
8483 end
8484 return
8485 end
8486 end
8487
8488 redef fun visit_all(v: Visitor)
8489 do
8490 if _n_in_language != null then
8491 v.enter_visit(_n_in_language.as(not null))
8492 end
8493 v.enter_visit(_n_extern_code_segment)
8494 end
8495 end
8496 redef class AQualified
8497 private init empty_init do end
8498
8499 init init_aqualified (
8500 n_id: Collection[Object], # Should be Collection[TId]
8501 n_classid: nullable TClassid
8502 )
8503 do
8504 empty_init
8505 for n in n_id do
8506 assert n isa TId
8507 _n_id.add(n)
8508 n.parent = self
8509 end
8510 _n_classid = n_classid
8511 if n_classid != null then
8512 n_classid.parent = self
8513 end
8514 end
8515
8516 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8517 do
8518 for i in [0.._n_id.length[ do
8519 if _n_id[i] == old_child then
8520 if new_child != null then
8521 assert new_child isa TId
8522 _n_id[i] = new_child
8523 new_child.parent = self
8524 else
8525 _n_id.remove_at(i)
8526 end
8527 return
8528 end
8529 end
8530 if _n_classid == old_child then
8531 if new_child != null then
8532 new_child.parent = self
8533 assert new_child isa TClassid
8534 _n_classid = new_child
8535 else
8536 _n_classid = null
8537 end
8538 return
8539 end
8540 end
8541
8542 redef fun visit_all(v: Visitor)
8543 do
8544 for n in _n_id do
8545 v.enter_visit(n)
8546 end
8547 if _n_classid != null then
8548 v.enter_visit(_n_classid.as(not null))
8549 end
8550 end
8551 end
8552 redef class ADoc
8553 private init empty_init do end
8554
8555 init init_adoc (
8556 n_comment: Collection[Object] # Should be Collection[TComment]
8557 )
8558 do
8559 empty_init
8560 for n in n_comment do
8561 assert n isa TComment
8562 _n_comment.add(n)
8563 n.parent = self
8564 end
8565 end
8566
8567 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8568 do
8569 for i in [0.._n_comment.length[ do
8570 if _n_comment[i] == old_child then
8571 if new_child != null then
8572 assert new_child isa TComment
8573 _n_comment[i] = new_child
8574 new_child.parent = self
8575 else
8576 _n_comment.remove_at(i)
8577 end
8578 return
8579 end
8580 end
8581 end
8582
8583 redef fun visit_all(v: Visitor)
8584 do
8585 for n in _n_comment do
8586 v.enter_visit(n)
8587 end
8588 end
8589 end
8590
8591 redef class Start
8592 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
8593 do
8594 if _n_base == old_child then
8595 if new_child == null then
8596 else
8597 new_child.parent = self
8598 assert new_child isa AModule
8599 _n_base = new_child
8600 end
8601 old_child.parent = null
8602 return
8603 end
8604 end
8605
8606 redef fun visit_all(v: Visitor)
8607 do
8608 if _n_base != null then
8609 v.enter_visit(_n_base.as(not null))
8610 end
8611 v.enter_visit(_n_eof)
8612 end
8613 end