05bb5b21c6b3386a2259986779b1eae23fa1718f
[nit.git] / contrib / pep8analysis / src / parser / parser_prod.nit
1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
3 module parser_prod
4
5 import lexer
6 intrude import parser_nodes
7 private import tables
8
9 redef class 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 AListing
71 private init empty_init do end
72
73 init init_alisting (
74 n_lines: Collection[Object], # Should be Collection[ALine]
75 n_label_decl: nullable ALabelDecl,
76 n_end_block: nullable TEndBlock
77 )
78 do
79 empty_init
80 for n in n_lines do
81 assert n isa ALine
82 _n_lines.add(n)
83 n.parent = self
84 end
85 _n_label_decl = n_label_decl
86 if n_label_decl != null then
87 n_label_decl.parent = self
88 end
89 _n_end_block = n_end_block.as(not null)
90 n_end_block.parent = self
91 end
92
93 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
94 do
95 for i in [0.._n_lines.length[ do
96 if _n_lines[i] == old_child then
97 if new_child != null then
98 assert new_child isa ALine
99 _n_lines[i] = new_child
100 new_child.parent = self
101 else
102 _n_lines.remove_at(i)
103 end
104 return
105 end
106 end
107 if _n_label_decl == old_child then
108 if new_child != null then
109 new_child.parent = self
110 assert new_child isa ALabelDecl
111 _n_label_decl = new_child
112 else
113 _n_label_decl = null
114 end
115 return
116 end
117 if _n_end_block == old_child then
118 if new_child != null then
119 new_child.parent = self
120 assert new_child isa TEndBlock
121 _n_end_block = new_child
122 else
123 abort
124 end
125 return
126 end
127 end
128
129 redef fun visit_all(v: Visitor)
130 do
131 for n in _n_lines do
132 v.enter_visit(n)
133 end
134 if _n_label_decl != null then
135 v.enter_visit(_n_label_decl.as(not null))
136 end
137 v.enter_visit(_n_end_block)
138 end
139 end
140 redef class AEmptyLine
141 private init empty_init do end
142
143 init init_aemptyline (
144 n_label_decl: nullable ALabelDecl,
145 n_comment: nullable TComment,
146 n_eol: nullable TEol
147 )
148 do
149 empty_init
150 _n_label_decl = n_label_decl
151 if n_label_decl != null then
152 n_label_decl.parent = self
153 end
154 _n_comment = n_comment
155 if n_comment != null then
156 n_comment.parent = self
157 end
158 _n_eol = n_eol.as(not null)
159 n_eol.parent = self
160 end
161
162 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
163 do
164 if _n_label_decl == old_child then
165 if new_child != null then
166 new_child.parent = self
167 assert new_child isa ALabelDecl
168 _n_label_decl = new_child
169 else
170 _n_label_decl = null
171 end
172 return
173 end
174 if _n_comment == old_child then
175 if new_child != null then
176 new_child.parent = self
177 assert new_child isa TComment
178 _n_comment = new_child
179 else
180 _n_comment = null
181 end
182 return
183 end
184 if _n_eol == old_child then
185 if new_child != null then
186 new_child.parent = self
187 assert new_child isa TEol
188 _n_eol = new_child
189 else
190 abort
191 end
192 return
193 end
194 end
195
196 redef fun visit_all(v: Visitor)
197 do
198 if _n_label_decl != null then
199 v.enter_visit(_n_label_decl.as(not null))
200 end
201 if _n_comment != null then
202 v.enter_visit(_n_comment.as(not null))
203 end
204 v.enter_visit(_n_eol)
205 end
206 end
207 redef class AInstructionLine
208 private init empty_init do end
209
210 init init_ainstructionline (
211 n_label_decl: nullable ALabelDecl,
212 n_instruction: nullable AInstruction,
213 n_comment: nullable TComment,
214 n_eol: nullable TEol
215 )
216 do
217 empty_init
218 _n_label_decl = n_label_decl
219 if n_label_decl != null then
220 n_label_decl.parent = self
221 end
222 _n_instruction = n_instruction.as(not null)
223 n_instruction.parent = self
224 _n_comment = n_comment
225 if n_comment != null then
226 n_comment.parent = self
227 end
228 _n_eol = n_eol.as(not null)
229 n_eol.parent = self
230 end
231
232 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
233 do
234 if _n_label_decl == old_child then
235 if new_child != null then
236 new_child.parent = self
237 assert new_child isa ALabelDecl
238 _n_label_decl = new_child
239 else
240 _n_label_decl = null
241 end
242 return
243 end
244 if _n_instruction == old_child then
245 if new_child != null then
246 new_child.parent = self
247 assert new_child isa AInstruction
248 _n_instruction = new_child
249 else
250 abort
251 end
252 return
253 end
254 if _n_comment == old_child then
255 if new_child != null then
256 new_child.parent = self
257 assert new_child isa TComment
258 _n_comment = new_child
259 else
260 _n_comment = null
261 end
262 return
263 end
264 if _n_eol == old_child then
265 if new_child != null then
266 new_child.parent = self
267 assert new_child isa TEol
268 _n_eol = new_child
269 else
270 abort
271 end
272 return
273 end
274 end
275
276 redef fun visit_all(v: Visitor)
277 do
278 if _n_label_decl != null then
279 v.enter_visit(_n_label_decl.as(not null))
280 end
281 v.enter_visit(_n_instruction)
282 if _n_comment != null then
283 v.enter_visit(_n_comment.as(not null))
284 end
285 v.enter_visit(_n_eol)
286 end
287 end
288 redef class ADirectiveLine
289 private init empty_init do end
290
291 init init_adirectiveline (
292 n_label_decl: nullable ALabelDecl,
293 n_directive: nullable ADirective,
294 n_comment: nullable TComment,
295 n_eol: nullable TEol
296 )
297 do
298 empty_init
299 _n_label_decl = n_label_decl
300 if n_label_decl != null then
301 n_label_decl.parent = self
302 end
303 _n_directive = n_directive.as(not null)
304 n_directive.parent = self
305 _n_comment = n_comment
306 if n_comment != null then
307 n_comment.parent = self
308 end
309 _n_eol = n_eol.as(not null)
310 n_eol.parent = self
311 end
312
313 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
314 do
315 if _n_label_decl == old_child then
316 if new_child != null then
317 new_child.parent = self
318 assert new_child isa ALabelDecl
319 _n_label_decl = new_child
320 else
321 _n_label_decl = null
322 end
323 return
324 end
325 if _n_directive == old_child then
326 if new_child != null then
327 new_child.parent = self
328 assert new_child isa ADirective
329 _n_directive = new_child
330 else
331 abort
332 end
333 return
334 end
335 if _n_comment == old_child then
336 if new_child != null then
337 new_child.parent = self
338 assert new_child isa TComment
339 _n_comment = new_child
340 else
341 _n_comment = null
342 end
343 return
344 end
345 if _n_eol == old_child then
346 if new_child != null then
347 new_child.parent = self
348 assert new_child isa TEol
349 _n_eol = new_child
350 else
351 abort
352 end
353 return
354 end
355 end
356
357 redef fun visit_all(v: Visitor)
358 do
359 if _n_label_decl != null then
360 v.enter_visit(_n_label_decl.as(not null))
361 end
362 v.enter_visit(_n_directive)
363 if _n_comment != null then
364 v.enter_visit(_n_comment.as(not null))
365 end
366 v.enter_visit(_n_eol)
367 end
368 end
369 redef class ALabelDecl
370 private init empty_init do end
371
372 init init_alabeldecl (
373 n_id: nullable TId,
374 n_colon: nullable TColon
375 )
376 do
377 empty_init
378 _n_id = n_id.as(not null)
379 n_id.parent = self
380 _n_colon = n_colon.as(not null)
381 n_colon.parent = self
382 end
383
384 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
385 do
386 if _n_id == old_child then
387 if new_child != null then
388 new_child.parent = self
389 assert new_child isa TId
390 _n_id = new_child
391 else
392 abort
393 end
394 return
395 end
396 if _n_colon == old_child then
397 if new_child != null then
398 new_child.parent = self
399 assert new_child isa TColon
400 _n_colon = new_child
401 else
402 abort
403 end
404 return
405 end
406 end
407
408 redef fun visit_all(v: Visitor)
409 do
410 v.enter_visit(_n_id)
411 v.enter_visit(_n_colon)
412 end
413 end
414 redef class AUnaryInstruction
415 private init empty_init do end
416
417 init init_aunaryinstruction (
418 n_id: nullable TId
419 )
420 do
421 empty_init
422 _n_id = n_id.as(not null)
423 n_id.parent = self
424 end
425
426 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
427 do
428 if _n_id == old_child then
429 if new_child != null then
430 new_child.parent = self
431 assert new_child isa TId
432 _n_id = new_child
433 else
434 abort
435 end
436 return
437 end
438 end
439
440 redef fun visit_all(v: Visitor)
441 do
442 v.enter_visit(_n_id)
443 end
444 end
445 redef class ABinaryInstruction
446 private init empty_init do end
447
448 init init_abinaryinstruction (
449 n_id: nullable TId,
450 n_operand: nullable AOperand
451 )
452 do
453 empty_init
454 _n_id = n_id.as(not null)
455 n_id.parent = self
456 _n_operand = n_operand.as(not null)
457 n_operand.parent = self
458 end
459
460 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
461 do
462 if _n_id == old_child then
463 if new_child != null then
464 new_child.parent = self
465 assert new_child isa TId
466 _n_id = new_child
467 else
468 abort
469 end
470 return
471 end
472 if _n_operand == old_child then
473 if new_child != null then
474 new_child.parent = self
475 assert new_child isa AOperand
476 _n_operand = new_child
477 else
478 abort
479 end
480 return
481 end
482 end
483
484 redef fun visit_all(v: Visitor)
485 do
486 v.enter_visit(_n_id)
487 v.enter_visit(_n_operand)
488 end
489 end
490 redef class AImmediateOperand
491 private init empty_init do end
492
493 init init_aimmediateoperand (
494 n_value: nullable AValue
495 )
496 do
497 empty_init
498 _n_value = n_value.as(not null)
499 n_value.parent = self
500 end
501
502 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
503 do
504 if _n_value == old_child then
505 if new_child != null then
506 new_child.parent = self
507 assert new_child isa AValue
508 _n_value = new_child
509 else
510 abort
511 end
512 return
513 end
514 end
515
516 redef fun visit_all(v: Visitor)
517 do
518 v.enter_visit(_n_value)
519 end
520 end
521 redef class AAnyOperand
522 private init empty_init do end
523
524 init init_aanyoperand (
525 n_value: nullable AValue,
526 n_comma: nullable TComma,
527 n_id: nullable TId
528 )
529 do
530 empty_init
531 _n_value = n_value.as(not null)
532 n_value.parent = self
533 _n_comma = n_comma.as(not null)
534 n_comma.parent = self
535 _n_id = n_id.as(not null)
536 n_id.parent = self
537 end
538
539 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
540 do
541 if _n_value == old_child then
542 if new_child != null then
543 new_child.parent = self
544 assert new_child isa AValue
545 _n_value = new_child
546 else
547 abort
548 end
549 return
550 end
551 if _n_comma == old_child then
552 if new_child != null then
553 new_child.parent = self
554 assert new_child isa TComma
555 _n_comma = new_child
556 else
557 abort
558 end
559 return
560 end
561 if _n_id == old_child then
562 if new_child != null then
563 new_child.parent = self
564 assert new_child isa TId
565 _n_id = new_child
566 else
567 abort
568 end
569 return
570 end
571 end
572
573 redef fun visit_all(v: Visitor)
574 do
575 v.enter_visit(_n_value)
576 v.enter_visit(_n_comma)
577 v.enter_visit(_n_id)
578 end
579 end
580 redef class ALabelValue
581 private init empty_init do end
582
583 init init_alabelvalue (
584 n_id: nullable TId
585 )
586 do
587 empty_init
588 _n_id = n_id.as(not null)
589 n_id.parent = self
590 end
591
592 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
593 do
594 if _n_id == old_child then
595 if new_child != null then
596 new_child.parent = self
597 assert new_child isa TId
598 _n_id = new_child
599 else
600 abort
601 end
602 return
603 end
604 end
605
606 redef fun visit_all(v: Visitor)
607 do
608 v.enter_visit(_n_id)
609 end
610 end
611 redef class ANumberValue
612 private init empty_init do end
613
614 init init_anumbervalue (
615 n_number: nullable TNumber
616 )
617 do
618 empty_init
619 _n_number = n_number.as(not null)
620 n_number.parent = self
621 end
622
623 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
624 do
625 if _n_number == old_child then
626 if new_child != null then
627 new_child.parent = self
628 assert new_child isa TNumber
629 _n_number = new_child
630 else
631 abort
632 end
633 return
634 end
635 end
636
637 redef fun visit_all(v: Visitor)
638 do
639 v.enter_visit(_n_number)
640 end
641 end
642 redef class ACharValue
643 private init empty_init do end
644
645 init init_acharvalue (
646 n_char: nullable TChar
647 )
648 do
649 empty_init
650 _n_char = n_char.as(not null)
651 n_char.parent = self
652 end
653
654 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
655 do
656 if _n_char == old_child then
657 if new_child != null then
658 new_child.parent = self
659 assert new_child isa TChar
660 _n_char = new_child
661 else
662 abort
663 end
664 return
665 end
666 end
667
668 redef fun visit_all(v: Visitor)
669 do
670 v.enter_visit(_n_char)
671 end
672 end
673 redef class AStringValue
674 private init empty_init do end
675
676 init init_astringvalue (
677 n_string: nullable TString
678 )
679 do
680 empty_init
681 _n_string = n_string.as(not null)
682 n_string.parent = self
683 end
684
685 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
686 do
687 if _n_string == old_child then
688 if new_child != null then
689 new_child.parent = self
690 assert new_child isa TString
691 _n_string = new_child
692 else
693 abort
694 end
695 return
696 end
697 end
698
699 redef fun visit_all(v: Visitor)
700 do
701 v.enter_visit(_n_string)
702 end
703 end
704 redef class AHexValue
705 private init empty_init do end
706
707 init init_ahexvalue (
708 n_hex: nullable THex
709 )
710 do
711 empty_init
712 _n_hex = n_hex.as(not null)
713 n_hex.parent = self
714 end
715
716 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
717 do
718 if _n_hex == old_child then
719 if new_child != null then
720 new_child.parent = self
721 assert new_child isa THex
722 _n_hex = new_child
723 else
724 abort
725 end
726 return
727 end
728 end
729
730 redef fun visit_all(v: Visitor)
731 do
732 v.enter_visit(_n_hex)
733 end
734 end
735 redef class AByteDirective
736 private init empty_init do end
737
738 init init_abytedirective (
739 n_tk_byte: nullable TTkByte,
740 n_value: nullable AValue
741 )
742 do
743 empty_init
744 _n_tk_byte = n_tk_byte.as(not null)
745 n_tk_byte.parent = self
746 _n_value = n_value.as(not null)
747 n_value.parent = self
748 end
749
750 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
751 do
752 if _n_tk_byte == old_child then
753 if new_child != null then
754 new_child.parent = self
755 assert new_child isa TTkByte
756 _n_tk_byte = new_child
757 else
758 abort
759 end
760 return
761 end
762 if _n_value == old_child then
763 if new_child != null then
764 new_child.parent = self
765 assert new_child isa AValue
766 _n_value = new_child
767 else
768 abort
769 end
770 return
771 end
772 end
773
774 redef fun visit_all(v: Visitor)
775 do
776 v.enter_visit(_n_tk_byte)
777 v.enter_visit(_n_value)
778 end
779 end
780 redef class AWordDirective
781 private init empty_init do end
782
783 init init_aworddirective (
784 n_tk_word: nullable TTkWord,
785 n_value: nullable AValue
786 )
787 do
788 empty_init
789 _n_tk_word = n_tk_word.as(not null)
790 n_tk_word.parent = self
791 _n_value = n_value.as(not null)
792 n_value.parent = self
793 end
794
795 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
796 do
797 if _n_tk_word == old_child then
798 if new_child != null then
799 new_child.parent = self
800 assert new_child isa TTkWord
801 _n_tk_word = new_child
802 else
803 abort
804 end
805 return
806 end
807 if _n_value == old_child then
808 if new_child != null then
809 new_child.parent = self
810 assert new_child isa AValue
811 _n_value = new_child
812 else
813 abort
814 end
815 return
816 end
817 end
818
819 redef fun visit_all(v: Visitor)
820 do
821 v.enter_visit(_n_tk_word)
822 v.enter_visit(_n_value)
823 end
824 end
825 redef class ABlockDirective
826 private init empty_init do end
827
828 init init_ablockdirective (
829 n_tk_block: nullable TTkBlock,
830 n_value: nullable AValue
831 )
832 do
833 empty_init
834 _n_tk_block = n_tk_block.as(not null)
835 n_tk_block.parent = self
836 _n_value = n_value.as(not null)
837 n_value.parent = self
838 end
839
840 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
841 do
842 if _n_tk_block == old_child then
843 if new_child != null then
844 new_child.parent = self
845 assert new_child isa TTkBlock
846 _n_tk_block = new_child
847 else
848 abort
849 end
850 return
851 end
852 if _n_value == old_child then
853 if new_child != null then
854 new_child.parent = self
855 assert new_child isa AValue
856 _n_value = new_child
857 else
858 abort
859 end
860 return
861 end
862 end
863
864 redef fun visit_all(v: Visitor)
865 do
866 v.enter_visit(_n_tk_block)
867 v.enter_visit(_n_value)
868 end
869 end
870 redef class AAsciiDirective
871 private init empty_init do end
872
873 init init_aasciidirective (
874 n_tk_ascii: nullable TTkAscii,
875 n_value: nullable AValue
876 )
877 do
878 empty_init
879 _n_tk_ascii = n_tk_ascii.as(not null)
880 n_tk_ascii.parent = self
881 _n_value = n_value.as(not null)
882 n_value.parent = self
883 end
884
885 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
886 do
887 if _n_tk_ascii == old_child then
888 if new_child != null then
889 new_child.parent = self
890 assert new_child isa TTkAscii
891 _n_tk_ascii = new_child
892 else
893 abort
894 end
895 return
896 end
897 if _n_value == old_child then
898 if new_child != null then
899 new_child.parent = self
900 assert new_child isa AValue
901 _n_value = new_child
902 else
903 abort
904 end
905 return
906 end
907 end
908
909 redef fun visit_all(v: Visitor)
910 do
911 v.enter_visit(_n_tk_ascii)
912 v.enter_visit(_n_value)
913 end
914 end
915 redef class AAddrssDirective
916 private init empty_init do end
917
918 init init_aaddrssdirective (
919 n_tk_addrss: nullable TTkAddrss,
920 n_value: nullable AValue
921 )
922 do
923 empty_init
924 _n_tk_addrss = n_tk_addrss.as(not null)
925 n_tk_addrss.parent = self
926 _n_value = n_value.as(not null)
927 n_value.parent = self
928 end
929
930 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
931 do
932 if _n_tk_addrss == old_child then
933 if new_child != null then
934 new_child.parent = self
935 assert new_child isa TTkAddrss
936 _n_tk_addrss = new_child
937 else
938 abort
939 end
940 return
941 end
942 if _n_value == old_child then
943 if new_child != null then
944 new_child.parent = self
945 assert new_child isa AValue
946 _n_value = new_child
947 else
948 abort
949 end
950 return
951 end
952 end
953
954 redef fun visit_all(v: Visitor)
955 do
956 v.enter_visit(_n_tk_addrss)
957 v.enter_visit(_n_value)
958 end
959 end
960 redef class AEquateDirective
961 private init empty_init do end
962
963 init init_aequatedirective (
964 n_tk_equate: nullable TTkEquate,
965 n_value: nullable AValue
966 )
967 do
968 empty_init
969 _n_tk_equate = n_tk_equate.as(not null)
970 n_tk_equate.parent = self
971 _n_value = n_value.as(not null)
972 n_value.parent = self
973 end
974
975 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
976 do
977 if _n_tk_equate == old_child then
978 if new_child != null then
979 new_child.parent = self
980 assert new_child isa TTkEquate
981 _n_tk_equate = new_child
982 else
983 abort
984 end
985 return
986 end
987 if _n_value == old_child then
988 if new_child != null then
989 new_child.parent = self
990 assert new_child isa AValue
991 _n_value = new_child
992 else
993 abort
994 end
995 return
996 end
997 end
998
999 redef fun visit_all(v: Visitor)
1000 do
1001 v.enter_visit(_n_tk_equate)
1002 v.enter_visit(_n_value)
1003 end
1004 end
1005 redef class ABurnDirective
1006 private init empty_init do end
1007
1008 init init_aburndirective (
1009 n_tk_burn: nullable TTkBurn,
1010 n_value: nullable AValue
1011 )
1012 do
1013 empty_init
1014 _n_tk_burn = n_tk_burn.as(not null)
1015 n_tk_burn.parent = self
1016 _n_value = n_value.as(not null)
1017 n_value.parent = self
1018 end
1019
1020 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1021 do
1022 if _n_tk_burn == old_child then
1023 if new_child != null then
1024 new_child.parent = self
1025 assert new_child isa TTkBurn
1026 _n_tk_burn = new_child
1027 else
1028 abort
1029 end
1030 return
1031 end
1032 if _n_value == old_child then
1033 if new_child != null then
1034 new_child.parent = self
1035 assert new_child isa AValue
1036 _n_value = new_child
1037 else
1038 abort
1039 end
1040 return
1041 end
1042 end
1043
1044 redef fun visit_all(v: Visitor)
1045 do
1046 v.enter_visit(_n_tk_burn)
1047 v.enter_visit(_n_value)
1048 end
1049 end
1050
1051 redef class Start
1052 redef fun replace_child(old_child: ANode, new_child: nullable ANode)
1053 do
1054 if _n_base == old_child then
1055 if new_child == null then
1056 else
1057 new_child.parent = self
1058 assert new_child isa AListing
1059 _n_base = new_child
1060 end
1061 old_child.parent = null
1062 return
1063 end
1064 end
1065
1066 redef fun visit_all(v: Visitor)
1067 do
1068 if _n_base != null then
1069 v.enter_visit(_n_base.as(not null))
1070 end
1071 v.enter_visit(_n_eof)
1072 end
1073 end