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