1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
9 # Parent of the node in the AST
10 readable writable attr _parent
: PNode
12 # Remove a child from the AST
13 meth remove_child
(child
: PNode)
15 replace_child
(child
, null)
18 # Replace a child with an other node in the AST
19 meth replace_child
(old_child
: PNode, new_child
: PNode) is abstract
21 # Replace itself with an other node in the AST
22 meth replace_with
(node
: PNode)
24 if (_parent
!= null) then
25 _parent
.replace_child
(self, node
)
29 # Visit all nodes in order.
30 # Thus, call "v.visit(e)" for each node e
31 meth visit_all
(v
: Visitor) is abstract
33 # Visit all nodes in reverse order.
34 # Thus, call "v.visit(e)" for each node e starting from the last child
35 meth visit_all_reverse
(v
: Visitor) is abstract
37 # Give a human readable location of the node.
38 meth locate
: String is abstract
40 # Return only the line number of the node
41 meth line_number
: Int is abstract
43 # Debug method: output a message prefixed with the location.
44 meth printl
(str
: String)
46 print
("{locate}: {str}\n")
51 redef meth visit_all
(v
: Visitor) do end
52 redef meth visit_all_reverse
(v
: Visitor) do end
53 redef meth replace_child
(old_child
: PNode, new_child
: PNode) do end
55 redef meth locate
: String
57 return "{filename}:{line},{pos}"
60 redef meth line_number
do return line
64 # The first token of the production node
65 readable writable attr _first_token
: Token
67 # The last token of the production node
68 readable writable attr _last_token
: Token
70 redef meth locate
: String
72 if first_token
== null then
75 var lastpos
= last_token
.pos
+ last_token
.text
.length
- 1
76 if first_token
.line
== last_token
.line
then
77 return "{first_token.locate}--{lastpos}"
79 return "{first_token.locate}--{last_token.line}:{lastpos}"
83 redef meth replace_with
(n
: PNode)
87 n
.first_token
= first_token
88 n
.last_token
= last_token
91 redef meth line_number
93 if first_token
!= null then
94 return first_token
.line
101 # Abstract standard visitor
103 # Ask the visitor to visit a given node.
104 # Usually automatically called by visit_all* methods.
105 # Concrete visitors should redefine this method.
106 meth visit
(e
: PNode) is abstract
110 redef meth n_packagedecl
=(n
: PPackagedecl)
118 private init empty_init
do end
121 n_packagedecl
: PPackagedecl ,
122 n_imports
: Array[Object] , # Should be Array[PImport]
123 n_classdefs
: Array[Object] # Should be Array[PClassdef]
127 _n_packagedecl
= n_packagedecl
128 if n_packagedecl
!= null then
129 n_packagedecl
.parent
= self
131 _n_imports
= new List[PImport]
132 for n
in n_imports
do
137 _n_classdefs
= new List[PClassdef]
138 for n
in n_classdefs
do
139 assert n
isa PClassdef
145 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
147 assert old_child
!= null
148 if _n_packagedecl
== old_child
then
149 if new_child
!= null then
150 new_child
.parent
= self
151 assert new_child
isa PPackagedecl
152 _n_packagedecl
= new_child
154 _n_packagedecl
= null
158 for i
in [0.._n_imports
.length
[ do
159 if _n_imports
[i
] == old_child
then
160 if new_child
!= null then
161 assert new_child
isa PImport
162 _n_imports
[i
] = new_child
163 new_child
.parent
= self
165 _n_imports
.remove_at
(i
)
170 for i
in [0.._n_classdefs
.length
[ do
171 if _n_classdefs
[i
] == old_child
then
172 if new_child
!= null then
173 assert new_child
isa PClassdef
174 _n_classdefs
[i
] = new_child
175 new_child
.parent
= self
177 _n_classdefs
.remove_at
(i
)
184 redef meth visit_all
(v
: Visitor)
186 if _n_packagedecl
!= null then
187 v
.visit
(_n_packagedecl
)
189 for n
in _n_imports
do
192 for n
in _n_classdefs
do
197 redef meth visit_all_reverse
(v
: Visitor)
199 if _n_packagedecl
!= null then
200 v
.visit
(_n_packagedecl
)
203 var i
= _n_imports
.length
205 v
.visit
(_n_imports
[i
])
210 var i
= _n_classdefs
.length
212 v
.visit
(_n_classdefs
[i
])
218 redef class APackagedecl
219 redef meth n_doc
=(n
: PDoc)
226 redef meth n_kwpackage
=(n
: TKwpackage)
233 redef meth n_id
=(n
: TId)
241 private init empty_init
do end
243 init init_apackagedecl
(
245 n_kwpackage
: TKwpackage ,
251 if n_doc
!= null then
254 _n_kwpackage
= n_kwpackage
255 if n_kwpackage
!= null then
256 n_kwpackage
.parent
= self
264 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
266 assert old_child
!= null
267 if _n_doc
== old_child
then
268 if new_child
!= null then
269 new_child
.parent
= self
270 assert new_child
isa PDoc
277 if _n_kwpackage
== old_child
then
278 if new_child
!= null then
279 new_child
.parent
= self
280 assert new_child
isa TKwpackage
281 _n_kwpackage
= new_child
287 if _n_id
== old_child
then
288 if new_child
!= null then
289 new_child
.parent
= self
290 assert new_child
isa TId
299 redef meth visit_all
(v
: Visitor)
301 if _n_doc
!= null then
304 if _n_kwpackage
!= null then
305 v
.visit
(_n_kwpackage
)
307 if _n_id
!= null then
312 redef meth visit_all_reverse
(v
: Visitor)
314 if _n_doc
!= null then
317 if _n_kwpackage
!= null then
318 v
.visit
(_n_kwpackage
)
320 if _n_id
!= null then
326 redef meth n_visibility
=(n
: PVisibility)
333 redef meth n_kwimport
=(n
: TKwimport)
340 redef meth n_id
=(n
: TId)
348 private init empty_init
do end
351 n_visibility
: PVisibility ,
352 n_kwimport
: TKwimport ,
357 _n_visibility
= n_visibility
358 if n_visibility
!= null then
359 n_visibility
.parent
= self
361 _n_kwimport
= n_kwimport
362 if n_kwimport
!= null then
363 n_kwimport
.parent
= self
371 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
373 assert old_child
!= null
374 if _n_visibility
== old_child
then
375 if new_child
!= null then
376 new_child
.parent
= self
377 assert new_child
isa PVisibility
378 _n_visibility
= new_child
384 if _n_kwimport
== old_child
then
385 if new_child
!= null then
386 new_child
.parent
= self
387 assert new_child
isa TKwimport
388 _n_kwimport
= new_child
394 if _n_id
== old_child
then
395 if new_child
!= null then
396 new_child
.parent
= self
397 assert new_child
isa TId
406 redef meth visit_all
(v
: Visitor)
408 if _n_visibility
!= null then
409 v
.visit
(_n_visibility
)
411 if _n_kwimport
!= null then
414 if _n_id
!= null then
419 redef meth visit_all_reverse
(v
: Visitor)
421 if _n_visibility
!= null then
422 v
.visit
(_n_visibility
)
424 if _n_kwimport
!= null then
427 if _n_id
!= null then
432 redef class ANoImport
433 redef meth n_visibility
=(n
: PVisibility)
440 redef meth n_kwimport
=(n
: TKwimport)
447 redef meth n_kwend
=(n
: TKwend)
455 private init empty_init
do end
457 init init_anoimport
(
458 n_visibility
: PVisibility ,
459 n_kwimport
: TKwimport ,
464 _n_visibility
= n_visibility
465 if n_visibility
!= null then
466 n_visibility
.parent
= self
468 _n_kwimport
= n_kwimport
469 if n_kwimport
!= null then
470 n_kwimport
.parent
= self
473 if n_kwend
!= null then
474 n_kwend
.parent
= self
478 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
480 assert old_child
!= null
481 if _n_visibility
== old_child
then
482 if new_child
!= null then
483 new_child
.parent
= self
484 assert new_child
isa PVisibility
485 _n_visibility
= new_child
491 if _n_kwimport
== old_child
then
492 if new_child
!= null then
493 new_child
.parent
= self
494 assert new_child
isa TKwimport
495 _n_kwimport
= new_child
501 if _n_kwend
== old_child
then
502 if new_child
!= null then
503 new_child
.parent
= self
504 assert new_child
isa TKwend
513 redef meth visit_all
(v
: Visitor)
515 if _n_visibility
!= null then
516 v
.visit
(_n_visibility
)
518 if _n_kwimport
!= null then
521 if _n_kwend
!= null then
526 redef meth visit_all_reverse
(v
: Visitor)
528 if _n_visibility
!= null then
529 v
.visit
(_n_visibility
)
531 if _n_kwimport
!= null then
534 if _n_kwend
!= null then
539 redef class APublicVisibility
541 private init empty_init
do end
543 init init_apublicvisibility
548 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
550 assert old_child
!= null
553 redef meth visit_all
(v
: Visitor)
557 redef meth visit_all_reverse
(v
: Visitor)
561 redef class APrivateVisibility
562 redef meth n_kwprivate
=(n
: TKwprivate)
570 private init empty_init
do end
572 init init_aprivatevisibility
(
573 n_kwprivate
: TKwprivate
577 _n_kwprivate
= n_kwprivate
578 if n_kwprivate
!= null then
579 n_kwprivate
.parent
= self
583 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
585 assert old_child
!= null
586 if _n_kwprivate
== old_child
then
587 if new_child
!= null then
588 new_child
.parent
= self
589 assert new_child
isa TKwprivate
590 _n_kwprivate
= new_child
598 redef meth visit_all
(v
: Visitor)
600 if _n_kwprivate
!= null then
601 v
.visit
(_n_kwprivate
)
605 redef meth visit_all_reverse
(v
: Visitor)
607 if _n_kwprivate
!= null then
608 v
.visit
(_n_kwprivate
)
612 redef class AProtectedVisibility
613 redef meth n_kwprotected
=(n
: TKwprotected)
621 private init empty_init
do end
623 init init_aprotectedvisibility
(
624 n_kwprotected
: TKwprotected
628 _n_kwprotected
= n_kwprotected
629 if n_kwprotected
!= null then
630 n_kwprotected
.parent
= self
634 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
636 assert old_child
!= null
637 if _n_kwprotected
== old_child
then
638 if new_child
!= null then
639 new_child
.parent
= self
640 assert new_child
isa TKwprotected
641 _n_kwprotected
= new_child
643 _n_kwprotected
= null
649 redef meth visit_all
(v
: Visitor)
651 if _n_kwprotected
!= null then
652 v
.visit
(_n_kwprotected
)
656 redef meth visit_all_reverse
(v
: Visitor)
658 if _n_kwprotected
!= null then
659 v
.visit
(_n_kwprotected
)
663 redef class AIntrudeVisibility
664 redef meth n_kwintrude
=(n
: TKwintrude)
672 private init empty_init
do end
674 init init_aintrudevisibility
(
675 n_kwintrude
: TKwintrude
679 _n_kwintrude
= n_kwintrude
680 if n_kwintrude
!= null then
681 n_kwintrude
.parent
= self
685 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
687 assert old_child
!= null
688 if _n_kwintrude
== old_child
then
689 if new_child
!= null then
690 new_child
.parent
= self
691 assert new_child
isa TKwintrude
692 _n_kwintrude
= new_child
700 redef meth visit_all
(v
: Visitor)
702 if _n_kwintrude
!= null then
703 v
.visit
(_n_kwintrude
)
707 redef meth visit_all_reverse
(v
: Visitor)
709 if _n_kwintrude
!= null then
710 v
.visit
(_n_kwintrude
)
714 redef class AClassdef
715 redef meth n_doc
=(n
: PDoc)
722 redef meth n_kwredef
=(n
: TKwredef)
729 redef meth n_visibility
=(n
: PVisibility)
736 redef meth n_classkind
=(n
: PClasskind)
743 redef meth n_id
=(n
: TClassid)
751 private init empty_init
do end
753 init init_aclassdef
(
755 n_kwredef
: TKwredef ,
756 n_visibility
: PVisibility ,
757 n_classkind
: PClasskind ,
759 n_formaldefs
: Array[Object] , # Should be Array[PFormaldef]
760 n_superclasses
: Array[Object] , # Should be Array[PSuperclass]
761 n_propdefs
: Array[Object] # Should be Array[PPropdef]
766 if n_doc
!= null then
769 _n_kwredef
= n_kwredef
770 if n_kwredef
!= null then
771 n_kwredef
.parent
= self
773 _n_visibility
= n_visibility
774 if n_visibility
!= null then
775 n_visibility
.parent
= self
777 _n_classkind
= n_classkind
778 if n_classkind
!= null then
779 n_classkind
.parent
= self
785 _n_formaldefs
= new List[PFormaldef]
786 for n
in n_formaldefs
do
787 assert n
isa PFormaldef
791 _n_superclasses
= new List[PSuperclass]
792 for n
in n_superclasses
do
793 assert n
isa PSuperclass
794 _n_superclasses
.add
(n
)
797 _n_propdefs
= new List[PPropdef]
798 for n
in n_propdefs
do
799 assert n
isa PPropdef
805 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
807 assert old_child
!= null
808 if _n_doc
== old_child
then
809 if new_child
!= null then
810 new_child
.parent
= self
811 assert new_child
isa PDoc
818 if _n_kwredef
== old_child
then
819 if new_child
!= null then
820 new_child
.parent
= self
821 assert new_child
isa TKwredef
822 _n_kwredef
= new_child
828 if _n_visibility
== old_child
then
829 if new_child
!= null then
830 new_child
.parent
= self
831 assert new_child
isa PVisibility
832 _n_visibility
= new_child
838 if _n_classkind
== old_child
then
839 if new_child
!= null then
840 new_child
.parent
= self
841 assert new_child
isa PClasskind
842 _n_classkind
= new_child
848 if _n_id
== old_child
then
849 if new_child
!= null then
850 new_child
.parent
= self
851 assert new_child
isa TClassid
858 for i
in [0.._n_formaldefs
.length
[ do
859 if _n_formaldefs
[i
] == old_child
then
860 if new_child
!= null then
861 assert new_child
isa PFormaldef
862 _n_formaldefs
[i
] = new_child
863 new_child
.parent
= self
865 _n_formaldefs
.remove_at
(i
)
870 for i
in [0.._n_superclasses
.length
[ do
871 if _n_superclasses
[i
] == old_child
then
872 if new_child
!= null then
873 assert new_child
isa PSuperclass
874 _n_superclasses
[i
] = new_child
875 new_child
.parent
= self
877 _n_superclasses
.remove_at
(i
)
882 for i
in [0.._n_propdefs
.length
[ do
883 if _n_propdefs
[i
] == old_child
then
884 if new_child
!= null then
885 assert new_child
isa PPropdef
886 _n_propdefs
[i
] = new_child
887 new_child
.parent
= self
889 _n_propdefs
.remove_at
(i
)
896 redef meth visit_all
(v
: Visitor)
898 if _n_doc
!= null then
901 if _n_kwredef
!= null then
904 if _n_visibility
!= null then
905 v
.visit
(_n_visibility
)
907 if _n_classkind
!= null then
908 v
.visit
(_n_classkind
)
910 if _n_id
!= null then
913 for n
in _n_formaldefs
do
916 for n
in _n_superclasses
do
919 for n
in _n_propdefs
do
924 redef meth visit_all_reverse
(v
: Visitor)
926 if _n_doc
!= null then
929 if _n_kwredef
!= null then
932 if _n_visibility
!= null then
933 v
.visit
(_n_visibility
)
935 if _n_classkind
!= null then
936 v
.visit
(_n_classkind
)
938 if _n_id
!= null then
942 var i
= _n_formaldefs
.length
944 v
.visit
(_n_formaldefs
[i
])
949 var i
= _n_superclasses
.length
951 v
.visit
(_n_superclasses
[i
])
956 var i
= _n_propdefs
.length
958 v
.visit
(_n_propdefs
[i
])
964 redef class ATopClassdef
966 private init empty_init
do end
968 init init_atopclassdef
(
969 n_propdefs
: Array[Object] # Should be Array[PPropdef]
973 _n_propdefs
= new List[PPropdef]
974 for n
in n_propdefs
do
975 assert n
isa PPropdef
981 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
983 assert old_child
!= null
984 for i
in [0.._n_propdefs
.length
[ do
985 if _n_propdefs
[i
] == old_child
then
986 if new_child
!= null then
987 assert new_child
isa PPropdef
988 _n_propdefs
[i
] = new_child
989 new_child
.parent
= self
991 _n_propdefs
.remove_at
(i
)
998 redef meth visit_all
(v
: Visitor)
1000 for n
in _n_propdefs
do
1005 redef meth visit_all_reverse
(v
: Visitor)
1008 var i
= _n_propdefs
.length
1010 v
.visit
(_n_propdefs
[i
])
1016 redef class AMainClassdef
1018 private init empty_init
do end
1020 init init_amainclassdef
(
1021 n_propdefs
: Array[Object] # Should be Array[PPropdef]
1025 _n_propdefs
= new List[PPropdef]
1026 for n
in n_propdefs
do
1027 assert n
isa PPropdef
1033 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1035 assert old_child
!= null
1036 for i
in [0.._n_propdefs
.length
[ do
1037 if _n_propdefs
[i
] == old_child
then
1038 if new_child
!= null then
1039 assert new_child
isa PPropdef
1040 _n_propdefs
[i
] = new_child
1041 new_child
.parent
= self
1043 _n_propdefs
.remove_at
(i
)
1050 redef meth visit_all
(v
: Visitor)
1052 for n
in _n_propdefs
do
1057 redef meth visit_all_reverse
(v
: Visitor)
1060 var i
= _n_propdefs
.length
1062 v
.visit
(_n_propdefs
[i
])
1068 redef class AConcreteClasskind
1069 redef meth n_kwclass
=(n
: TKwclass)
1077 private init empty_init
do end
1079 init init_aconcreteclasskind
(
1084 _n_kwclass
= n_kwclass
1085 if n_kwclass
!= null then
1086 n_kwclass
.parent
= self
1090 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1092 assert old_child
!= null
1093 if _n_kwclass
== old_child
then
1094 if new_child
!= null then
1095 new_child
.parent
= self
1096 assert new_child
isa TKwclass
1097 _n_kwclass
= new_child
1105 redef meth visit_all
(v
: Visitor)
1107 if _n_kwclass
!= null then
1112 redef meth visit_all_reverse
(v
: Visitor)
1114 if _n_kwclass
!= null then
1119 redef class AAbstractClasskind
1120 redef meth n_kwabstract
=(n
: TKwabstract)
1127 redef meth n_kwclass
=(n
: TKwclass)
1135 private init empty_init
do end
1137 init init_aabstractclasskind
(
1138 n_kwabstract
: TKwabstract ,
1143 _n_kwabstract
= n_kwabstract
1144 if n_kwabstract
!= null then
1145 n_kwabstract
.parent
= self
1147 _n_kwclass
= n_kwclass
1148 if n_kwclass
!= null then
1149 n_kwclass
.parent
= self
1153 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1155 assert old_child
!= null
1156 if _n_kwabstract
== old_child
then
1157 if new_child
!= null then
1158 new_child
.parent
= self
1159 assert new_child
isa TKwabstract
1160 _n_kwabstract
= new_child
1162 _n_kwabstract
= null
1166 if _n_kwclass
== old_child
then
1167 if new_child
!= null then
1168 new_child
.parent
= self
1169 assert new_child
isa TKwclass
1170 _n_kwclass
= new_child
1178 redef meth visit_all
(v
: Visitor)
1180 if _n_kwabstract
!= null then
1181 v
.visit
(_n_kwabstract
)
1183 if _n_kwclass
!= null then
1188 redef meth visit_all_reverse
(v
: Visitor)
1190 if _n_kwabstract
!= null then
1191 v
.visit
(_n_kwabstract
)
1193 if _n_kwclass
!= null then
1198 redef class AInterfaceClasskind
1199 redef meth n_kwinterface
=(n
: TKwinterface)
1207 private init empty_init
do end
1209 init init_ainterfaceclasskind
(
1210 n_kwinterface
: TKwinterface
1214 _n_kwinterface
= n_kwinterface
1215 if n_kwinterface
!= null then
1216 n_kwinterface
.parent
= self
1220 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1222 assert old_child
!= null
1223 if _n_kwinterface
== old_child
then
1224 if new_child
!= null then
1225 new_child
.parent
= self
1226 assert new_child
isa TKwinterface
1227 _n_kwinterface
= new_child
1229 _n_kwinterface
= null
1235 redef meth visit_all
(v
: Visitor)
1237 if _n_kwinterface
!= null then
1238 v
.visit
(_n_kwinterface
)
1242 redef meth visit_all_reverse
(v
: Visitor)
1244 if _n_kwinterface
!= null then
1245 v
.visit
(_n_kwinterface
)
1249 redef class AUniversalClasskind
1250 redef meth n_kwuniversal
=(n
: TKwuniversal)
1258 private init empty_init
do end
1260 init init_auniversalclasskind
(
1261 n_kwuniversal
: TKwuniversal
1265 _n_kwuniversal
= n_kwuniversal
1266 if n_kwuniversal
!= null then
1267 n_kwuniversal
.parent
= self
1271 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1273 assert old_child
!= null
1274 if _n_kwuniversal
== old_child
then
1275 if new_child
!= null then
1276 new_child
.parent
= self
1277 assert new_child
isa TKwuniversal
1278 _n_kwuniversal
= new_child
1280 _n_kwuniversal
= null
1286 redef meth visit_all
(v
: Visitor)
1288 if _n_kwuniversal
!= null then
1289 v
.visit
(_n_kwuniversal
)
1293 redef meth visit_all_reverse
(v
: Visitor)
1295 if _n_kwuniversal
!= null then
1296 v
.visit
(_n_kwuniversal
)
1300 redef class AFormaldef
1301 redef meth n_id
=(n
: TClassid)
1308 redef meth n_type
=(n
: PType)
1316 private init empty_init
do end
1318 init init_aformaldef
(
1325 if n_id
!= null then
1329 if n_type
!= null then
1330 n_type
.parent
= self
1334 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1336 assert old_child
!= null
1337 if _n_id
== old_child
then
1338 if new_child
!= null then
1339 new_child
.parent
= self
1340 assert new_child
isa TClassid
1347 if _n_type
== old_child
then
1348 if new_child
!= null then
1349 new_child
.parent
= self
1350 assert new_child
isa PType
1359 redef meth visit_all
(v
: Visitor)
1361 if _n_id
!= null then
1364 if _n_type
!= null then
1369 redef meth visit_all_reverse
(v
: Visitor)
1371 if _n_id
!= null then
1374 if _n_type
!= null then
1379 redef class ASuperclass
1380 redef meth n_kwspecial
=(n
: TKwspecial)
1387 redef meth n_type
=(n
: PType)
1395 private init empty_init
do end
1397 init init_asuperclass
(
1398 n_kwspecial
: TKwspecial ,
1403 _n_kwspecial
= n_kwspecial
1404 if n_kwspecial
!= null then
1405 n_kwspecial
.parent
= self
1408 if n_type
!= null then
1409 n_type
.parent
= self
1413 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1415 assert old_child
!= null
1416 if _n_kwspecial
== old_child
then
1417 if new_child
!= null then
1418 new_child
.parent
= self
1419 assert new_child
isa TKwspecial
1420 _n_kwspecial
= new_child
1426 if _n_type
== old_child
then
1427 if new_child
!= null then
1428 new_child
.parent
= self
1429 assert new_child
isa PType
1438 redef meth visit_all
(v
: Visitor)
1440 if _n_kwspecial
!= null then
1441 v
.visit
(_n_kwspecial
)
1443 if _n_type
!= null then
1448 redef meth visit_all_reverse
(v
: Visitor)
1450 if _n_kwspecial
!= null then
1451 v
.visit
(_n_kwspecial
)
1453 if _n_type
!= null then
1458 redef class AAttrPropdef
1459 redef meth n_doc
=(n
: PDoc)
1466 redef meth n_readable
=(n
: PAble)
1473 redef meth n_writable
=(n
: PAble)
1480 redef meth n_kwredef
=(n
: TKwredef)
1487 redef meth n_visibility
=(n
: PVisibility)
1494 redef meth n_kwattr
=(n
: TKwattr)
1501 redef meth n_id
=(n
: TAttrid)
1508 redef meth n_type
=(n
: PType)
1515 redef meth n_expr
=(n
: PExpr)
1523 private init empty_init
do end
1525 init init_aattrpropdef
(
1529 n_kwredef
: TKwredef ,
1530 n_visibility
: PVisibility ,
1539 if n_doc
!= null then
1542 _n_readable
= n_readable
1543 if n_readable
!= null then
1544 n_readable
.parent
= self
1546 _n_writable
= n_writable
1547 if n_writable
!= null then
1548 n_writable
.parent
= self
1550 _n_kwredef
= n_kwredef
1551 if n_kwredef
!= null then
1552 n_kwredef
.parent
= self
1554 _n_visibility
= n_visibility
1555 if n_visibility
!= null then
1556 n_visibility
.parent
= self
1558 _n_kwattr
= n_kwattr
1559 if n_kwattr
!= null then
1560 n_kwattr
.parent
= self
1563 if n_id
!= null then
1567 if n_type
!= null then
1568 n_type
.parent
= self
1571 if n_expr
!= null then
1572 n_expr
.parent
= self
1576 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1578 assert old_child
!= null
1579 if _n_doc
== old_child
then
1580 if new_child
!= null then
1581 new_child
.parent
= self
1582 assert new_child
isa PDoc
1589 if _n_readable
== old_child
then
1590 if new_child
!= null then
1591 new_child
.parent
= self
1592 assert new_child
isa PAble
1593 _n_readable
= new_child
1599 if _n_writable
== old_child
then
1600 if new_child
!= null then
1601 new_child
.parent
= self
1602 assert new_child
isa PAble
1603 _n_writable
= new_child
1609 if _n_kwredef
== old_child
then
1610 if new_child
!= null then
1611 new_child
.parent
= self
1612 assert new_child
isa TKwredef
1613 _n_kwredef
= new_child
1619 if _n_visibility
== old_child
then
1620 if new_child
!= null then
1621 new_child
.parent
= self
1622 assert new_child
isa PVisibility
1623 _n_visibility
= new_child
1625 _n_visibility
= null
1629 if _n_kwattr
== old_child
then
1630 if new_child
!= null then
1631 new_child
.parent
= self
1632 assert new_child
isa TKwattr
1633 _n_kwattr
= new_child
1639 if _n_id
== old_child
then
1640 if new_child
!= null then
1641 new_child
.parent
= self
1642 assert new_child
isa TAttrid
1649 if _n_type
== old_child
then
1650 if new_child
!= null then
1651 new_child
.parent
= self
1652 assert new_child
isa PType
1659 if _n_expr
== old_child
then
1660 if new_child
!= null then
1661 new_child
.parent
= self
1662 assert new_child
isa PExpr
1671 redef meth visit_all
(v
: Visitor)
1673 if _n_doc
!= null then
1676 if _n_readable
!= null then
1677 v
.visit
(_n_readable
)
1679 if _n_writable
!= null then
1680 v
.visit
(_n_writable
)
1682 if _n_kwredef
!= null then
1685 if _n_visibility
!= null then
1686 v
.visit
(_n_visibility
)
1688 if _n_kwattr
!= null then
1691 if _n_id
!= null then
1694 if _n_type
!= null then
1697 if _n_expr
!= null then
1702 redef meth visit_all_reverse
(v
: Visitor)
1704 if _n_doc
!= null then
1707 if _n_readable
!= null then
1708 v
.visit
(_n_readable
)
1710 if _n_writable
!= null then
1711 v
.visit
(_n_writable
)
1713 if _n_kwredef
!= null then
1716 if _n_visibility
!= null then
1717 v
.visit
(_n_visibility
)
1719 if _n_kwattr
!= null then
1722 if _n_id
!= null then
1725 if _n_type
!= null then
1728 if _n_expr
!= null then
1733 redef class AMethPropdef
1734 redef meth n_doc
=(n
: PDoc)
1741 redef meth n_kwredef
=(n
: TKwredef)
1748 redef meth n_visibility
=(n
: PVisibility)
1755 redef meth n_methid
=(n
: PMethid)
1762 redef meth n_signature
=(n
: PSignature)
1770 private init empty_init
do end
1772 init init_amethpropdef
(
1774 n_kwredef
: TKwredef ,
1775 n_visibility
: PVisibility ,
1777 n_signature
: PSignature
1782 if n_doc
!= null then
1785 _n_kwredef
= n_kwredef
1786 if n_kwredef
!= null then
1787 n_kwredef
.parent
= self
1789 _n_visibility
= n_visibility
1790 if n_visibility
!= null then
1791 n_visibility
.parent
= self
1793 _n_methid
= n_methid
1794 if n_methid
!= null then
1795 n_methid
.parent
= self
1797 _n_signature
= n_signature
1798 if n_signature
!= null then
1799 n_signature
.parent
= self
1803 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1805 assert old_child
!= null
1806 if _n_doc
== old_child
then
1807 if new_child
!= null then
1808 new_child
.parent
= self
1809 assert new_child
isa PDoc
1816 if _n_kwredef
== old_child
then
1817 if new_child
!= null then
1818 new_child
.parent
= self
1819 assert new_child
isa TKwredef
1820 _n_kwredef
= new_child
1826 if _n_visibility
== old_child
then
1827 if new_child
!= null then
1828 new_child
.parent
= self
1829 assert new_child
isa PVisibility
1830 _n_visibility
= new_child
1832 _n_visibility
= null
1836 if _n_methid
== old_child
then
1837 if new_child
!= null then
1838 new_child
.parent
= self
1839 assert new_child
isa PMethid
1840 _n_methid
= new_child
1846 if _n_signature
== old_child
then
1847 if new_child
!= null then
1848 new_child
.parent
= self
1849 assert new_child
isa PSignature
1850 _n_signature
= new_child
1858 redef meth visit_all
(v
: Visitor)
1860 if _n_doc
!= null then
1863 if _n_kwredef
!= null then
1866 if _n_visibility
!= null then
1867 v
.visit
(_n_visibility
)
1869 if _n_methid
!= null then
1872 if _n_signature
!= null then
1873 v
.visit
(_n_signature
)
1877 redef meth visit_all_reverse
(v
: Visitor)
1879 if _n_doc
!= null then
1882 if _n_kwredef
!= null then
1885 if _n_visibility
!= null then
1886 v
.visit
(_n_visibility
)
1888 if _n_methid
!= null then
1891 if _n_signature
!= null then
1892 v
.visit
(_n_signature
)
1896 redef class ADeferredMethPropdef
1897 redef meth n_doc
=(n
: PDoc)
1904 redef meth n_kwredef
=(n
: TKwredef)
1911 redef meth n_visibility
=(n
: PVisibility)
1918 redef meth n_kwmeth
=(n
: TKwmeth)
1925 redef meth n_methid
=(n
: PMethid)
1932 redef meth n_signature
=(n
: PSignature)
1940 private init empty_init
do end
1942 init init_adeferredmethpropdef
(
1944 n_kwredef
: TKwredef ,
1945 n_visibility
: PVisibility ,
1948 n_signature
: PSignature
1953 if n_doc
!= null then
1956 _n_kwredef
= n_kwredef
1957 if n_kwredef
!= null then
1958 n_kwredef
.parent
= self
1960 _n_visibility
= n_visibility
1961 if n_visibility
!= null then
1962 n_visibility
.parent
= self
1964 _n_kwmeth
= n_kwmeth
1965 if n_kwmeth
!= null then
1966 n_kwmeth
.parent
= self
1968 _n_methid
= n_methid
1969 if n_methid
!= null then
1970 n_methid
.parent
= self
1972 _n_signature
= n_signature
1973 if n_signature
!= null then
1974 n_signature
.parent
= self
1978 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1980 assert old_child
!= null
1981 if _n_doc
== old_child
then
1982 if new_child
!= null then
1983 new_child
.parent
= self
1984 assert new_child
isa PDoc
1991 if _n_kwredef
== old_child
then
1992 if new_child
!= null then
1993 new_child
.parent
= self
1994 assert new_child
isa TKwredef
1995 _n_kwredef
= new_child
2001 if _n_visibility
== old_child
then
2002 if new_child
!= null then
2003 new_child
.parent
= self
2004 assert new_child
isa PVisibility
2005 _n_visibility
= new_child
2007 _n_visibility
= null
2011 if _n_kwmeth
== old_child
then
2012 if new_child
!= null then
2013 new_child
.parent
= self
2014 assert new_child
isa TKwmeth
2015 _n_kwmeth
= new_child
2021 if _n_methid
== old_child
then
2022 if new_child
!= null then
2023 new_child
.parent
= self
2024 assert new_child
isa PMethid
2025 _n_methid
= new_child
2031 if _n_signature
== old_child
then
2032 if new_child
!= null then
2033 new_child
.parent
= self
2034 assert new_child
isa PSignature
2035 _n_signature
= new_child
2043 redef meth visit_all
(v
: Visitor)
2045 if _n_doc
!= null then
2048 if _n_kwredef
!= null then
2051 if _n_visibility
!= null then
2052 v
.visit
(_n_visibility
)
2054 if _n_kwmeth
!= null then
2057 if _n_methid
!= null then
2060 if _n_signature
!= null then
2061 v
.visit
(_n_signature
)
2065 redef meth visit_all_reverse
(v
: Visitor)
2067 if _n_doc
!= null then
2070 if _n_kwredef
!= null then
2073 if _n_visibility
!= null then
2074 v
.visit
(_n_visibility
)
2076 if _n_kwmeth
!= null then
2079 if _n_methid
!= null then
2082 if _n_signature
!= null then
2083 v
.visit
(_n_signature
)
2087 redef class AInternMethPropdef
2088 redef meth n_doc
=(n
: PDoc)
2095 redef meth n_kwredef
=(n
: TKwredef)
2102 redef meth n_visibility
=(n
: PVisibility)
2109 redef meth n_kwmeth
=(n
: TKwmeth)
2116 redef meth n_methid
=(n
: PMethid)
2123 redef meth n_signature
=(n
: PSignature)
2131 private init empty_init
do end
2133 init init_ainternmethpropdef
(
2135 n_kwredef
: TKwredef ,
2136 n_visibility
: PVisibility ,
2139 n_signature
: PSignature
2144 if n_doc
!= null then
2147 _n_kwredef
= n_kwredef
2148 if n_kwredef
!= null then
2149 n_kwredef
.parent
= self
2151 _n_visibility
= n_visibility
2152 if n_visibility
!= null then
2153 n_visibility
.parent
= self
2155 _n_kwmeth
= n_kwmeth
2156 if n_kwmeth
!= null then
2157 n_kwmeth
.parent
= self
2159 _n_methid
= n_methid
2160 if n_methid
!= null then
2161 n_methid
.parent
= self
2163 _n_signature
= n_signature
2164 if n_signature
!= null then
2165 n_signature
.parent
= self
2169 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2171 assert old_child
!= null
2172 if _n_doc
== old_child
then
2173 if new_child
!= null then
2174 new_child
.parent
= self
2175 assert new_child
isa PDoc
2182 if _n_kwredef
== old_child
then
2183 if new_child
!= null then
2184 new_child
.parent
= self
2185 assert new_child
isa TKwredef
2186 _n_kwredef
= new_child
2192 if _n_visibility
== old_child
then
2193 if new_child
!= null then
2194 new_child
.parent
= self
2195 assert new_child
isa PVisibility
2196 _n_visibility
= new_child
2198 _n_visibility
= null
2202 if _n_kwmeth
== old_child
then
2203 if new_child
!= null then
2204 new_child
.parent
= self
2205 assert new_child
isa TKwmeth
2206 _n_kwmeth
= new_child
2212 if _n_methid
== old_child
then
2213 if new_child
!= null then
2214 new_child
.parent
= self
2215 assert new_child
isa PMethid
2216 _n_methid
= new_child
2222 if _n_signature
== old_child
then
2223 if new_child
!= null then
2224 new_child
.parent
= self
2225 assert new_child
isa PSignature
2226 _n_signature
= new_child
2234 redef meth visit_all
(v
: Visitor)
2236 if _n_doc
!= null then
2239 if _n_kwredef
!= null then
2242 if _n_visibility
!= null then
2243 v
.visit
(_n_visibility
)
2245 if _n_kwmeth
!= null then
2248 if _n_methid
!= null then
2251 if _n_signature
!= null then
2252 v
.visit
(_n_signature
)
2256 redef meth visit_all_reverse
(v
: Visitor)
2258 if _n_doc
!= null then
2261 if _n_kwredef
!= null then
2264 if _n_visibility
!= null then
2265 v
.visit
(_n_visibility
)
2267 if _n_kwmeth
!= null then
2270 if _n_methid
!= null then
2273 if _n_signature
!= null then
2274 v
.visit
(_n_signature
)
2278 redef class AExternMethPropdef
2279 redef meth n_doc
=(n
: PDoc)
2286 redef meth n_kwredef
=(n
: TKwredef)
2293 redef meth n_visibility
=(n
: PVisibility)
2300 redef meth n_kwmeth
=(n
: TKwmeth)
2307 redef meth n_methid
=(n
: PMethid)
2314 redef meth n_signature
=(n
: PSignature)
2321 redef meth n_extern
=(n
: TString)
2329 private init empty_init
do end
2331 init init_aexternmethpropdef
(
2333 n_kwredef
: TKwredef ,
2334 n_visibility
: PVisibility ,
2337 n_signature
: PSignature ,
2343 if n_doc
!= null then
2346 _n_kwredef
= n_kwredef
2347 if n_kwredef
!= null then
2348 n_kwredef
.parent
= self
2350 _n_visibility
= n_visibility
2351 if n_visibility
!= null then
2352 n_visibility
.parent
= self
2354 _n_kwmeth
= n_kwmeth
2355 if n_kwmeth
!= null then
2356 n_kwmeth
.parent
= self
2358 _n_methid
= n_methid
2359 if n_methid
!= null then
2360 n_methid
.parent
= self
2362 _n_signature
= n_signature
2363 if n_signature
!= null then
2364 n_signature
.parent
= self
2366 _n_extern
= n_extern
2367 if n_extern
!= null then
2368 n_extern
.parent
= self
2372 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2374 assert old_child
!= null
2375 if _n_doc
== old_child
then
2376 if new_child
!= null then
2377 new_child
.parent
= self
2378 assert new_child
isa PDoc
2385 if _n_kwredef
== old_child
then
2386 if new_child
!= null then
2387 new_child
.parent
= self
2388 assert new_child
isa TKwredef
2389 _n_kwredef
= new_child
2395 if _n_visibility
== old_child
then
2396 if new_child
!= null then
2397 new_child
.parent
= self
2398 assert new_child
isa PVisibility
2399 _n_visibility
= new_child
2401 _n_visibility
= null
2405 if _n_kwmeth
== old_child
then
2406 if new_child
!= null then
2407 new_child
.parent
= self
2408 assert new_child
isa TKwmeth
2409 _n_kwmeth
= new_child
2415 if _n_methid
== old_child
then
2416 if new_child
!= null then
2417 new_child
.parent
= self
2418 assert new_child
isa PMethid
2419 _n_methid
= new_child
2425 if _n_signature
== old_child
then
2426 if new_child
!= null then
2427 new_child
.parent
= self
2428 assert new_child
isa PSignature
2429 _n_signature
= new_child
2435 if _n_extern
== old_child
then
2436 if new_child
!= null then
2437 new_child
.parent
= self
2438 assert new_child
isa TString
2439 _n_extern
= new_child
2447 redef meth visit_all
(v
: Visitor)
2449 if _n_doc
!= null then
2452 if _n_kwredef
!= null then
2455 if _n_visibility
!= null then
2456 v
.visit
(_n_visibility
)
2458 if _n_kwmeth
!= null then
2461 if _n_methid
!= null then
2464 if _n_signature
!= null then
2465 v
.visit
(_n_signature
)
2467 if _n_extern
!= null then
2472 redef meth visit_all_reverse
(v
: Visitor)
2474 if _n_doc
!= null then
2477 if _n_kwredef
!= null then
2480 if _n_visibility
!= null then
2481 v
.visit
(_n_visibility
)
2483 if _n_kwmeth
!= null then
2486 if _n_methid
!= null then
2489 if _n_signature
!= null then
2490 v
.visit
(_n_signature
)
2492 if _n_extern
!= null then
2497 redef class AConcreteMethPropdef
2498 redef meth n_doc
=(n
: PDoc)
2505 redef meth n_kwredef
=(n
: TKwredef)
2512 redef meth n_visibility
=(n
: PVisibility)
2519 redef meth n_kwmeth
=(n
: TKwmeth)
2526 redef meth n_methid
=(n
: PMethid)
2533 redef meth n_signature
=(n
: PSignature)
2540 redef meth n_block
=(n
: PExpr)
2548 private init empty_init
do end
2550 init init_aconcretemethpropdef
(
2552 n_kwredef
: TKwredef ,
2553 n_visibility
: PVisibility ,
2556 n_signature
: PSignature ,
2562 if n_doc
!= null then
2565 _n_kwredef
= n_kwredef
2566 if n_kwredef
!= null then
2567 n_kwredef
.parent
= self
2569 _n_visibility
= n_visibility
2570 if n_visibility
!= null then
2571 n_visibility
.parent
= self
2573 _n_kwmeth
= n_kwmeth
2574 if n_kwmeth
!= null then
2575 n_kwmeth
.parent
= self
2577 _n_methid
= n_methid
2578 if n_methid
!= null then
2579 n_methid
.parent
= self
2581 _n_signature
= n_signature
2582 if n_signature
!= null then
2583 n_signature
.parent
= self
2586 if n_block
!= null then
2587 n_block
.parent
= self
2591 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2593 assert old_child
!= null
2594 if _n_doc
== old_child
then
2595 if new_child
!= null then
2596 new_child
.parent
= self
2597 assert new_child
isa PDoc
2604 if _n_kwredef
== old_child
then
2605 if new_child
!= null then
2606 new_child
.parent
= self
2607 assert new_child
isa TKwredef
2608 _n_kwredef
= new_child
2614 if _n_visibility
== old_child
then
2615 if new_child
!= null then
2616 new_child
.parent
= self
2617 assert new_child
isa PVisibility
2618 _n_visibility
= new_child
2620 _n_visibility
= null
2624 if _n_kwmeth
== old_child
then
2625 if new_child
!= null then
2626 new_child
.parent
= self
2627 assert new_child
isa TKwmeth
2628 _n_kwmeth
= new_child
2634 if _n_methid
== old_child
then
2635 if new_child
!= null then
2636 new_child
.parent
= self
2637 assert new_child
isa PMethid
2638 _n_methid
= new_child
2644 if _n_signature
== old_child
then
2645 if new_child
!= null then
2646 new_child
.parent
= self
2647 assert new_child
isa PSignature
2648 _n_signature
= new_child
2654 if _n_block
== old_child
then
2655 if new_child
!= null then
2656 new_child
.parent
= self
2657 assert new_child
isa PExpr
2658 _n_block
= new_child
2666 redef meth visit_all
(v
: Visitor)
2668 if _n_doc
!= null then
2671 if _n_kwredef
!= null then
2674 if _n_visibility
!= null then
2675 v
.visit
(_n_visibility
)
2677 if _n_kwmeth
!= null then
2680 if _n_methid
!= null then
2683 if _n_signature
!= null then
2684 v
.visit
(_n_signature
)
2686 if _n_block
!= null then
2691 redef meth visit_all_reverse
(v
: Visitor)
2693 if _n_doc
!= null then
2696 if _n_kwredef
!= null then
2699 if _n_visibility
!= null then
2700 v
.visit
(_n_visibility
)
2702 if _n_kwmeth
!= null then
2705 if _n_methid
!= null then
2708 if _n_signature
!= null then
2709 v
.visit
(_n_signature
)
2711 if _n_block
!= null then
2716 redef class AConcreteInitPropdef
2717 redef meth n_doc
=(n
: PDoc)
2724 redef meth n_kwredef
=(n
: TKwredef)
2731 redef meth n_visibility
=(n
: PVisibility)
2738 redef meth n_kwinit
=(n
: TKwinit)
2745 redef meth n_methid
=(n
: PMethid)
2752 redef meth n_signature
=(n
: PSignature)
2759 redef meth n_block
=(n
: PExpr)
2767 private init empty_init
do end
2769 init init_aconcreteinitpropdef
(
2771 n_kwredef
: TKwredef ,
2772 n_visibility
: PVisibility ,
2775 n_signature
: PSignature ,
2781 if n_doc
!= null then
2784 _n_kwredef
= n_kwredef
2785 if n_kwredef
!= null then
2786 n_kwredef
.parent
= self
2788 _n_visibility
= n_visibility
2789 if n_visibility
!= null then
2790 n_visibility
.parent
= self
2792 _n_kwinit
= n_kwinit
2793 if n_kwinit
!= null then
2794 n_kwinit
.parent
= self
2796 _n_methid
= n_methid
2797 if n_methid
!= null then
2798 n_methid
.parent
= self
2800 _n_signature
= n_signature
2801 if n_signature
!= null then
2802 n_signature
.parent
= self
2805 if n_block
!= null then
2806 n_block
.parent
= self
2810 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2812 assert old_child
!= null
2813 if _n_doc
== old_child
then
2814 if new_child
!= null then
2815 new_child
.parent
= self
2816 assert new_child
isa PDoc
2823 if _n_kwredef
== old_child
then
2824 if new_child
!= null then
2825 new_child
.parent
= self
2826 assert new_child
isa TKwredef
2827 _n_kwredef
= new_child
2833 if _n_visibility
== old_child
then
2834 if new_child
!= null then
2835 new_child
.parent
= self
2836 assert new_child
isa PVisibility
2837 _n_visibility
= new_child
2839 _n_visibility
= null
2843 if _n_kwinit
== old_child
then
2844 if new_child
!= null then
2845 new_child
.parent
= self
2846 assert new_child
isa TKwinit
2847 _n_kwinit
= new_child
2853 if _n_methid
== old_child
then
2854 if new_child
!= null then
2855 new_child
.parent
= self
2856 assert new_child
isa PMethid
2857 _n_methid
= new_child
2863 if _n_signature
== old_child
then
2864 if new_child
!= null then
2865 new_child
.parent
= self
2866 assert new_child
isa PSignature
2867 _n_signature
= new_child
2873 if _n_block
== old_child
then
2874 if new_child
!= null then
2875 new_child
.parent
= self
2876 assert new_child
isa PExpr
2877 _n_block
= new_child
2885 redef meth visit_all
(v
: Visitor)
2887 if _n_doc
!= null then
2890 if _n_kwredef
!= null then
2893 if _n_visibility
!= null then
2894 v
.visit
(_n_visibility
)
2896 if _n_kwinit
!= null then
2899 if _n_methid
!= null then
2902 if _n_signature
!= null then
2903 v
.visit
(_n_signature
)
2905 if _n_block
!= null then
2910 redef meth visit_all_reverse
(v
: Visitor)
2912 if _n_doc
!= null then
2915 if _n_kwredef
!= null then
2918 if _n_visibility
!= null then
2919 v
.visit
(_n_visibility
)
2921 if _n_kwinit
!= null then
2924 if _n_methid
!= null then
2927 if _n_signature
!= null then
2928 v
.visit
(_n_signature
)
2930 if _n_block
!= null then
2935 redef class AMainMethPropdef
2936 redef meth n_kwredef
=(n
: TKwredef)
2943 redef meth n_block
=(n
: PExpr)
2951 private init empty_init
do end
2953 init init_amainmethpropdef
(
2954 n_kwredef
: TKwredef ,
2959 _n_kwredef
= n_kwredef
2960 if n_kwredef
!= null then
2961 n_kwredef
.parent
= self
2964 if n_block
!= null then
2965 n_block
.parent
= self
2969 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2971 assert old_child
!= null
2972 if _n_kwredef
== old_child
then
2973 if new_child
!= null then
2974 new_child
.parent
= self
2975 assert new_child
isa TKwredef
2976 _n_kwredef
= new_child
2982 if _n_block
== old_child
then
2983 if new_child
!= null then
2984 new_child
.parent
= self
2985 assert new_child
isa PExpr
2986 _n_block
= new_child
2994 redef meth visit_all
(v
: Visitor)
2996 if _n_kwredef
!= null then
2999 if _n_block
!= null then
3004 redef meth visit_all_reverse
(v
: Visitor)
3006 if _n_kwredef
!= null then
3009 if _n_block
!= null then
3014 redef class ATypePropdef
3015 redef meth n_doc
=(n
: PDoc)
3022 redef meth n_kwredef
=(n
: TKwredef)
3029 redef meth n_visibility
=(n
: PVisibility)
3036 redef meth n_kwtype
=(n
: TKwtype)
3043 redef meth n_id
=(n
: TClassid)
3050 redef meth n_type
=(n
: PType)
3058 private init empty_init
do end
3060 init init_atypepropdef
(
3062 n_kwredef
: TKwredef ,
3063 n_visibility
: PVisibility ,
3071 if n_doc
!= null then
3074 _n_kwredef
= n_kwredef
3075 if n_kwredef
!= null then
3076 n_kwredef
.parent
= self
3078 _n_visibility
= n_visibility
3079 if n_visibility
!= null then
3080 n_visibility
.parent
= self
3082 _n_kwtype
= n_kwtype
3083 if n_kwtype
!= null then
3084 n_kwtype
.parent
= self
3087 if n_id
!= null then
3091 if n_type
!= null then
3092 n_type
.parent
= self
3096 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3098 assert old_child
!= null
3099 if _n_doc
== old_child
then
3100 if new_child
!= null then
3101 new_child
.parent
= self
3102 assert new_child
isa PDoc
3109 if _n_kwredef
== old_child
then
3110 if new_child
!= null then
3111 new_child
.parent
= self
3112 assert new_child
isa TKwredef
3113 _n_kwredef
= new_child
3119 if _n_visibility
== old_child
then
3120 if new_child
!= null then
3121 new_child
.parent
= self
3122 assert new_child
isa PVisibility
3123 _n_visibility
= new_child
3125 _n_visibility
= null
3129 if _n_kwtype
== old_child
then
3130 if new_child
!= null then
3131 new_child
.parent
= self
3132 assert new_child
isa TKwtype
3133 _n_kwtype
= new_child
3139 if _n_id
== old_child
then
3140 if new_child
!= null then
3141 new_child
.parent
= self
3142 assert new_child
isa TClassid
3149 if _n_type
== old_child
then
3150 if new_child
!= null then
3151 new_child
.parent
= self
3152 assert new_child
isa PType
3161 redef meth visit_all
(v
: Visitor)
3163 if _n_doc
!= null then
3166 if _n_kwredef
!= null then
3169 if _n_visibility
!= null then
3170 v
.visit
(_n_visibility
)
3172 if _n_kwtype
!= null then
3175 if _n_id
!= null then
3178 if _n_type
!= null then
3183 redef meth visit_all_reverse
(v
: Visitor)
3185 if _n_doc
!= null then
3188 if _n_kwredef
!= null then
3191 if _n_visibility
!= null then
3192 v
.visit
(_n_visibility
)
3194 if _n_kwtype
!= null then
3197 if _n_id
!= null then
3200 if _n_type
!= null then
3205 redef class AReadAble
3206 redef meth n_kwredef
=(n
: TKwredef)
3213 redef meth n_kwreadable
=(n
: TKwreadable)
3221 private init empty_init
do end
3223 init init_areadable
(
3224 n_kwredef
: TKwredef ,
3225 n_kwreadable
: TKwreadable
3229 _n_kwredef
= n_kwredef
3230 if n_kwredef
!= null then
3231 n_kwredef
.parent
= self
3233 _n_kwreadable
= n_kwreadable
3234 if n_kwreadable
!= null then
3235 n_kwreadable
.parent
= self
3239 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3241 assert old_child
!= null
3242 if _n_kwredef
== old_child
then
3243 if new_child
!= null then
3244 new_child
.parent
= self
3245 assert new_child
isa TKwredef
3246 _n_kwredef
= new_child
3252 if _n_kwreadable
== old_child
then
3253 if new_child
!= null then
3254 new_child
.parent
= self
3255 assert new_child
isa TKwreadable
3256 _n_kwreadable
= new_child
3258 _n_kwreadable
= null
3264 redef meth visit_all
(v
: Visitor)
3266 if _n_kwredef
!= null then
3269 if _n_kwreadable
!= null then
3270 v
.visit
(_n_kwreadable
)
3274 redef meth visit_all_reverse
(v
: Visitor)
3276 if _n_kwredef
!= null then
3279 if _n_kwreadable
!= null then
3280 v
.visit
(_n_kwreadable
)
3284 redef class AWriteAble
3285 redef meth n_kwredef
=(n
: TKwredef)
3292 redef meth n_kwwritable
=(n
: TKwwritable)
3300 private init empty_init
do end
3302 init init_awriteable
(
3303 n_kwredef
: TKwredef ,
3304 n_kwwritable
: TKwwritable
3308 _n_kwredef
= n_kwredef
3309 if n_kwredef
!= null then
3310 n_kwredef
.parent
= self
3312 _n_kwwritable
= n_kwwritable
3313 if n_kwwritable
!= null then
3314 n_kwwritable
.parent
= self
3318 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3320 assert old_child
!= null
3321 if _n_kwredef
== old_child
then
3322 if new_child
!= null then
3323 new_child
.parent
= self
3324 assert new_child
isa TKwredef
3325 _n_kwredef
= new_child
3331 if _n_kwwritable
== old_child
then
3332 if new_child
!= null then
3333 new_child
.parent
= self
3334 assert new_child
isa TKwwritable
3335 _n_kwwritable
= new_child
3337 _n_kwwritable
= null
3343 redef meth visit_all
(v
: Visitor)
3345 if _n_kwredef
!= null then
3348 if _n_kwwritable
!= null then
3349 v
.visit
(_n_kwwritable
)
3353 redef meth visit_all_reverse
(v
: Visitor)
3355 if _n_kwredef
!= null then
3358 if _n_kwwritable
!= null then
3359 v
.visit
(_n_kwwritable
)
3363 redef class AIdMethid
3364 redef meth n_id
=(n
: TId)
3372 private init empty_init
do end
3374 init init_aidmethid
(
3380 if n_id
!= null then
3385 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3387 assert old_child
!= null
3388 if _n_id
== old_child
then
3389 if new_child
!= null then
3390 new_child
.parent
= self
3391 assert new_child
isa TId
3400 redef meth visit_all
(v
: Visitor)
3402 if _n_id
!= null then
3407 redef meth visit_all_reverse
(v
: Visitor)
3409 if _n_id
!= null then
3414 redef class APlusMethid
3415 redef meth n_plus
=(n
: TPlus)
3423 private init empty_init
do end
3425 init init_aplusmethid
(
3431 if n_plus
!= null then
3432 n_plus
.parent
= self
3436 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3438 assert old_child
!= null
3439 if _n_plus
== old_child
then
3440 if new_child
!= null then
3441 new_child
.parent
= self
3442 assert new_child
isa TPlus
3451 redef meth visit_all
(v
: Visitor)
3453 if _n_plus
!= null then
3458 redef meth visit_all_reverse
(v
: Visitor)
3460 if _n_plus
!= null then
3465 redef class AMinusMethid
3466 redef meth n_minus
=(n
: TMinus)
3474 private init empty_init
do end
3476 init init_aminusmethid
(
3482 if n_minus
!= null then
3483 n_minus
.parent
= self
3487 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3489 assert old_child
!= null
3490 if _n_minus
== old_child
then
3491 if new_child
!= null then
3492 new_child
.parent
= self
3493 assert new_child
isa TMinus
3494 _n_minus
= new_child
3502 redef meth visit_all
(v
: Visitor)
3504 if _n_minus
!= null then
3509 redef meth visit_all_reverse
(v
: Visitor)
3511 if _n_minus
!= null then
3516 redef class AStarMethid
3517 redef meth n_star
=(n
: TStar)
3525 private init empty_init
do end
3527 init init_astarmethid
(
3533 if n_star
!= null then
3534 n_star
.parent
= self
3538 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3540 assert old_child
!= null
3541 if _n_star
== old_child
then
3542 if new_child
!= null then
3543 new_child
.parent
= self
3544 assert new_child
isa TStar
3553 redef meth visit_all
(v
: Visitor)
3555 if _n_star
!= null then
3560 redef meth visit_all_reverse
(v
: Visitor)
3562 if _n_star
!= null then
3567 redef class ASlashMethid
3568 redef meth n_slash
=(n
: TSlash)
3576 private init empty_init
do end
3578 init init_aslashmethid
(
3584 if n_slash
!= null then
3585 n_slash
.parent
= self
3589 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3591 assert old_child
!= null
3592 if _n_slash
== old_child
then
3593 if new_child
!= null then
3594 new_child
.parent
= self
3595 assert new_child
isa TSlash
3596 _n_slash
= new_child
3604 redef meth visit_all
(v
: Visitor)
3606 if _n_slash
!= null then
3611 redef meth visit_all_reverse
(v
: Visitor)
3613 if _n_slash
!= null then
3618 redef class APercentMethid
3619 redef meth n_percent
=(n
: TPercent)
3627 private init empty_init
do end
3629 init init_apercentmethid
(
3634 _n_percent
= n_percent
3635 if n_percent
!= null then
3636 n_percent
.parent
= self
3640 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3642 assert old_child
!= null
3643 if _n_percent
== old_child
then
3644 if new_child
!= null then
3645 new_child
.parent
= self
3646 assert new_child
isa TPercent
3647 _n_percent
= new_child
3655 redef meth visit_all
(v
: Visitor)
3657 if _n_percent
!= null then
3662 redef meth visit_all_reverse
(v
: Visitor)
3664 if _n_percent
!= null then
3669 redef class AEqMethid
3670 redef meth n_eq
=(n
: TEq)
3678 private init empty_init
do end
3680 init init_aeqmethid
(
3686 if n_eq
!= null then
3691 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3693 assert old_child
!= null
3694 if _n_eq
== old_child
then
3695 if new_child
!= null then
3696 new_child
.parent
= self
3697 assert new_child
isa TEq
3706 redef meth visit_all
(v
: Visitor)
3708 if _n_eq
!= null then
3713 redef meth visit_all_reverse
(v
: Visitor)
3715 if _n_eq
!= null then
3720 redef class ANeMethid
3721 redef meth n_ne
=(n
: TNe)
3729 private init empty_init
do end
3731 init init_anemethid
(
3737 if n_ne
!= null then
3742 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3744 assert old_child
!= null
3745 if _n_ne
== old_child
then
3746 if new_child
!= null then
3747 new_child
.parent
= self
3748 assert new_child
isa TNe
3757 redef meth visit_all
(v
: Visitor)
3759 if _n_ne
!= null then
3764 redef meth visit_all_reverse
(v
: Visitor)
3766 if _n_ne
!= null then
3771 redef class ALeMethid
3772 redef meth n_le
=(n
: TLe)
3780 private init empty_init
do end
3782 init init_alemethid
(
3788 if n_le
!= null then
3793 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3795 assert old_child
!= null
3796 if _n_le
== old_child
then
3797 if new_child
!= null then
3798 new_child
.parent
= self
3799 assert new_child
isa TLe
3808 redef meth visit_all
(v
: Visitor)
3810 if _n_le
!= null then
3815 redef meth visit_all_reverse
(v
: Visitor)
3817 if _n_le
!= null then
3822 redef class AGeMethid
3823 redef meth n_ge
=(n
: TGe)
3831 private init empty_init
do end
3833 init init_agemethid
(
3839 if n_ge
!= null then
3844 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3846 assert old_child
!= null
3847 if _n_ge
== old_child
then
3848 if new_child
!= null then
3849 new_child
.parent
= self
3850 assert new_child
isa TGe
3859 redef meth visit_all
(v
: Visitor)
3861 if _n_ge
!= null then
3866 redef meth visit_all_reverse
(v
: Visitor)
3868 if _n_ge
!= null then
3873 redef class ALtMethid
3874 redef meth n_lt
=(n
: TLt)
3882 private init empty_init
do end
3884 init init_altmethid
(
3890 if n_lt
!= null then
3895 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3897 assert old_child
!= null
3898 if _n_lt
== old_child
then
3899 if new_child
!= null then
3900 new_child
.parent
= self
3901 assert new_child
isa TLt
3910 redef meth visit_all
(v
: Visitor)
3912 if _n_lt
!= null then
3917 redef meth visit_all_reverse
(v
: Visitor)
3919 if _n_lt
!= null then
3924 redef class AGtMethid
3925 redef meth n_gt
=(n
: TGt)
3933 private init empty_init
do end
3935 init init_agtmethid
(
3941 if n_gt
!= null then
3946 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3948 assert old_child
!= null
3949 if _n_gt
== old_child
then
3950 if new_child
!= null then
3951 new_child
.parent
= self
3952 assert new_child
isa TGt
3961 redef meth visit_all
(v
: Visitor)
3963 if _n_gt
!= null then
3968 redef meth visit_all_reverse
(v
: Visitor)
3970 if _n_gt
!= null then
3975 redef class ABraMethid
3976 redef meth n_obra
=(n
: TObra)
3983 redef meth n_cbra
=(n
: TCbra)
3991 private init empty_init
do end
3993 init init_abramethid
(
4000 if n_obra
!= null then
4001 n_obra
.parent
= self
4004 if n_cbra
!= null then
4005 n_cbra
.parent
= self
4009 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4011 assert old_child
!= null
4012 if _n_obra
== old_child
then
4013 if new_child
!= null then
4014 new_child
.parent
= self
4015 assert new_child
isa TObra
4022 if _n_cbra
== old_child
then
4023 if new_child
!= null then
4024 new_child
.parent
= self
4025 assert new_child
isa TCbra
4034 redef meth visit_all
(v
: Visitor)
4036 if _n_obra
!= null then
4039 if _n_cbra
!= null then
4044 redef meth visit_all_reverse
(v
: Visitor)
4046 if _n_obra
!= null then
4049 if _n_cbra
!= null then
4054 redef class AStarshipMethid
4055 redef meth n_starship
=(n
: TStarship)
4063 private init empty_init
do end
4065 init init_astarshipmethid
(
4066 n_starship
: TStarship
4070 _n_starship
= n_starship
4071 if n_starship
!= null then
4072 n_starship
.parent
= self
4076 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4078 assert old_child
!= null
4079 if _n_starship
== old_child
then
4080 if new_child
!= null then
4081 new_child
.parent
= self
4082 assert new_child
isa TStarship
4083 _n_starship
= new_child
4091 redef meth visit_all
(v
: Visitor)
4093 if _n_starship
!= null then
4094 v
.visit
(_n_starship
)
4098 redef meth visit_all_reverse
(v
: Visitor)
4100 if _n_starship
!= null then
4101 v
.visit
(_n_starship
)
4105 redef class AAssignMethid
4106 redef meth n_id
=(n
: TId)
4113 redef meth n_assign
=(n
: TAssign)
4121 private init empty_init
do end
4123 init init_aassignmethid
(
4130 if n_id
!= null then
4133 _n_assign
= n_assign
4134 if n_assign
!= null then
4135 n_assign
.parent
= self
4139 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4141 assert old_child
!= null
4142 if _n_id
== old_child
then
4143 if new_child
!= null then
4144 new_child
.parent
= self
4145 assert new_child
isa TId
4152 if _n_assign
== old_child
then
4153 if new_child
!= null then
4154 new_child
.parent
= self
4155 assert new_child
isa TAssign
4156 _n_assign
= new_child
4164 redef meth visit_all
(v
: Visitor)
4166 if _n_id
!= null then
4169 if _n_assign
!= null then
4174 redef meth visit_all_reverse
(v
: Visitor)
4176 if _n_id
!= null then
4179 if _n_assign
!= null then
4184 redef class ABraassignMethid
4185 redef meth n_obra
=(n
: TObra)
4192 redef meth n_cbra
=(n
: TCbra)
4199 redef meth n_assign
=(n
: TAssign)
4207 private init empty_init
do end
4209 init init_abraassignmethid
(
4217 if n_obra
!= null then
4218 n_obra
.parent
= self
4221 if n_cbra
!= null then
4222 n_cbra
.parent
= self
4224 _n_assign
= n_assign
4225 if n_assign
!= null then
4226 n_assign
.parent
= self
4230 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4232 assert old_child
!= null
4233 if _n_obra
== old_child
then
4234 if new_child
!= null then
4235 new_child
.parent
= self
4236 assert new_child
isa TObra
4243 if _n_cbra
== old_child
then
4244 if new_child
!= null then
4245 new_child
.parent
= self
4246 assert new_child
isa TCbra
4253 if _n_assign
== old_child
then
4254 if new_child
!= null then
4255 new_child
.parent
= self
4256 assert new_child
isa TAssign
4257 _n_assign
= new_child
4265 redef meth visit_all
(v
: Visitor)
4267 if _n_obra
!= null then
4270 if _n_cbra
!= null then
4273 if _n_assign
!= null then
4278 redef meth visit_all_reverse
(v
: Visitor)
4280 if _n_obra
!= null then
4283 if _n_cbra
!= null then
4286 if _n_assign
!= null then
4291 redef class ASignature
4292 redef meth n_type
=(n
: PType)
4300 private init empty_init
do end
4302 init init_asignature
(
4303 n_params
: Array[Object] , # Should be Array[PParam]
4305 n_closure_decls
: Array[Object] # Should be Array[PClosureDecl]
4309 _n_params
= new List[PParam]
4310 for n
in n_params
do
4316 if n_type
!= null then
4317 n_type
.parent
= self
4319 _n_closure_decls
= new List[PClosureDecl]
4320 for n
in n_closure_decls
do
4321 assert n
isa PClosureDecl
4322 _n_closure_decls
.add
(n
)
4327 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4329 assert old_child
!= null
4330 for i
in [0.._n_params
.length
[ do
4331 if _n_params
[i
] == old_child
then
4332 if new_child
!= null then
4333 assert new_child
isa PParam
4334 _n_params
[i
] = new_child
4335 new_child
.parent
= self
4337 _n_params
.remove_at
(i
)
4342 if _n_type
== old_child
then
4343 if new_child
!= null then
4344 new_child
.parent
= self
4345 assert new_child
isa PType
4352 for i
in [0.._n_closure_decls
.length
[ do
4353 if _n_closure_decls
[i
] == old_child
then
4354 if new_child
!= null then
4355 assert new_child
isa PClosureDecl
4356 _n_closure_decls
[i
] = new_child
4357 new_child
.parent
= self
4359 _n_closure_decls
.remove_at
(i
)
4366 redef meth visit_all
(v
: Visitor)
4368 for n
in _n_params
do
4371 if _n_type
!= null then
4374 for n
in _n_closure_decls
do
4379 redef meth visit_all_reverse
(v
: Visitor)
4382 var i
= _n_params
.length
4384 v
.visit
(_n_params
[i
])
4388 if _n_type
!= null then
4392 var i
= _n_closure_decls
.length
4394 v
.visit
(_n_closure_decls
[i
])
4401 redef meth n_id
=(n
: TId)
4408 redef meth n_type
=(n
: PType)
4415 redef meth n_dotdotdot
=(n
: TDotdotdot)
4423 private init empty_init
do end
4428 n_dotdotdot
: TDotdotdot
4433 if n_id
!= null then
4437 if n_type
!= null then
4438 n_type
.parent
= self
4440 _n_dotdotdot
= n_dotdotdot
4441 if n_dotdotdot
!= null then
4442 n_dotdotdot
.parent
= self
4446 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4448 assert old_child
!= null
4449 if _n_id
== old_child
then
4450 if new_child
!= null then
4451 new_child
.parent
= self
4452 assert new_child
isa TId
4459 if _n_type
== old_child
then
4460 if new_child
!= null then
4461 new_child
.parent
= self
4462 assert new_child
isa PType
4469 if _n_dotdotdot
== old_child
then
4470 if new_child
!= null then
4471 new_child
.parent
= self
4472 assert new_child
isa TDotdotdot
4473 _n_dotdotdot
= new_child
4481 redef meth visit_all
(v
: Visitor)
4483 if _n_id
!= null then
4486 if _n_type
!= null then
4489 if _n_dotdotdot
!= null then
4490 v
.visit
(_n_dotdotdot
)
4494 redef meth visit_all_reverse
(v
: Visitor)
4496 if _n_id
!= null then
4499 if _n_type
!= null then
4502 if _n_dotdotdot
!= null then
4503 v
.visit
(_n_dotdotdot
)
4507 redef class AClosureDecl
4508 redef meth n_kwwith
=(n
: TKwwith)
4515 redef meth n_kwbreak
=(n
: TKwbreak)
4522 redef meth n_id
=(n
: TId)
4529 redef meth n_signature
=(n
: PSignature)
4537 private init empty_init
do end
4539 init init_aclosuredecl
(
4541 n_kwbreak
: TKwbreak ,
4543 n_signature
: PSignature
4547 _n_kwwith
= n_kwwith
4548 if n_kwwith
!= null then
4549 n_kwwith
.parent
= self
4551 _n_kwbreak
= n_kwbreak
4552 if n_kwbreak
!= null then
4553 n_kwbreak
.parent
= self
4556 if n_id
!= null then
4559 _n_signature
= n_signature
4560 if n_signature
!= null then
4561 n_signature
.parent
= self
4565 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4567 assert old_child
!= null
4568 if _n_kwwith
== old_child
then
4569 if new_child
!= null then
4570 new_child
.parent
= self
4571 assert new_child
isa TKwwith
4572 _n_kwwith
= new_child
4578 if _n_kwbreak
== old_child
then
4579 if new_child
!= null then
4580 new_child
.parent
= self
4581 assert new_child
isa TKwbreak
4582 _n_kwbreak
= new_child
4588 if _n_id
== old_child
then
4589 if new_child
!= null then
4590 new_child
.parent
= self
4591 assert new_child
isa TId
4598 if _n_signature
== old_child
then
4599 if new_child
!= null then
4600 new_child
.parent
= self
4601 assert new_child
isa PSignature
4602 _n_signature
= new_child
4610 redef meth visit_all
(v
: Visitor)
4612 if _n_kwwith
!= null then
4615 if _n_kwbreak
!= null then
4618 if _n_id
!= null then
4621 if _n_signature
!= null then
4622 v
.visit
(_n_signature
)
4626 redef meth visit_all_reverse
(v
: Visitor)
4628 if _n_kwwith
!= null then
4631 if _n_kwbreak
!= null then
4634 if _n_id
!= null then
4637 if _n_signature
!= null then
4638 v
.visit
(_n_signature
)
4643 redef meth n_id
=(n
: TClassid)
4651 private init empty_init
do end
4655 n_types
: Array[Object] # Should be Array[PType]
4660 if n_id
!= null then
4663 _n_types
= new List[PType]
4671 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4673 assert old_child
!= null
4674 if _n_id
== old_child
then
4675 if new_child
!= null then
4676 new_child
.parent
= self
4677 assert new_child
isa TClassid
4684 for i
in [0.._n_types
.length
[ do
4685 if _n_types
[i
] == old_child
then
4686 if new_child
!= null then
4687 assert new_child
isa PType
4688 _n_types
[i
] = new_child
4689 new_child
.parent
= self
4691 _n_types
.remove_at
(i
)
4698 redef meth visit_all
(v
: Visitor)
4700 if _n_id
!= null then
4703 for n
in _n_types
do
4708 redef meth visit_all_reverse
(v
: Visitor)
4710 if _n_id
!= null then
4714 var i
= _n_types
.length
4716 v
.visit
(_n_types
[i
])
4722 redef class ABlockExpr
4724 private init empty_init
do end
4726 init init_ablockexpr
(
4727 n_expr
: Array[Object] # Should be Array[PExpr]
4731 _n_expr
= new List[PExpr]
4739 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4741 assert old_child
!= null
4742 for i
in [0.._n_expr
.length
[ do
4743 if _n_expr
[i
] == old_child
then
4744 if new_child
!= null then
4745 assert new_child
isa PExpr
4746 _n_expr
[i
] = new_child
4747 new_child
.parent
= self
4749 _n_expr
.remove_at
(i
)
4756 redef meth visit_all
(v
: Visitor)
4763 redef meth visit_all_reverse
(v
: Visitor)
4766 var i
= _n_expr
.length
4774 redef class AVardeclExpr
4775 redef meth n_kwvar
=(n
: TKwvar)
4782 redef meth n_id
=(n
: TId)
4789 redef meth n_type
=(n
: PType)
4796 redef meth n_assign
=(n
: TAssign)
4803 redef meth n_expr
=(n
: PExpr)
4811 private init empty_init
do end
4813 init init_avardeclexpr
(
4823 if n_kwvar
!= null then
4824 n_kwvar
.parent
= self
4827 if n_id
!= null then
4831 if n_type
!= null then
4832 n_type
.parent
= self
4834 _n_assign
= n_assign
4835 if n_assign
!= null then
4836 n_assign
.parent
= self
4839 if n_expr
!= null then
4840 n_expr
.parent
= self
4844 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4846 assert old_child
!= null
4847 if _n_kwvar
== old_child
then
4848 if new_child
!= null then
4849 new_child
.parent
= self
4850 assert new_child
isa TKwvar
4851 _n_kwvar
= new_child
4857 if _n_id
== old_child
then
4858 if new_child
!= null then
4859 new_child
.parent
= self
4860 assert new_child
isa TId
4867 if _n_type
== old_child
then
4868 if new_child
!= null then
4869 new_child
.parent
= self
4870 assert new_child
isa PType
4877 if _n_assign
== old_child
then
4878 if new_child
!= null then
4879 new_child
.parent
= self
4880 assert new_child
isa TAssign
4881 _n_assign
= new_child
4887 if _n_expr
== old_child
then
4888 if new_child
!= null then
4889 new_child
.parent
= self
4890 assert new_child
isa PExpr
4899 redef meth visit_all
(v
: Visitor)
4901 if _n_kwvar
!= null then
4904 if _n_id
!= null then
4907 if _n_type
!= null then
4910 if _n_assign
!= null then
4913 if _n_expr
!= null then
4918 redef meth visit_all_reverse
(v
: Visitor)
4920 if _n_kwvar
!= null then
4923 if _n_id
!= null then
4926 if _n_type
!= null then
4929 if _n_assign
!= null then
4932 if _n_expr
!= null then
4937 redef class AReturnExpr
4938 redef meth n_kwreturn
=(n
: TKwreturn)
4945 redef meth n_expr
=(n
: PExpr)
4953 private init empty_init
do end
4955 init init_areturnexpr
(
4956 n_kwreturn
: TKwreturn ,
4961 _n_kwreturn
= n_kwreturn
4962 if n_kwreturn
!= null then
4963 n_kwreturn
.parent
= self
4966 if n_expr
!= null then
4967 n_expr
.parent
= self
4971 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4973 assert old_child
!= null
4974 if _n_kwreturn
== old_child
then
4975 if new_child
!= null then
4976 new_child
.parent
= self
4977 assert new_child
isa TKwreturn
4978 _n_kwreturn
= new_child
4984 if _n_expr
== old_child
then
4985 if new_child
!= null then
4986 new_child
.parent
= self
4987 assert new_child
isa PExpr
4996 redef meth visit_all
(v
: Visitor)
4998 if _n_kwreturn
!= null then
4999 v
.visit
(_n_kwreturn
)
5001 if _n_expr
!= null then
5006 redef meth visit_all_reverse
(v
: Visitor)
5008 if _n_kwreturn
!= null then
5009 v
.visit
(_n_kwreturn
)
5011 if _n_expr
!= null then
5016 redef class ABreakExpr
5017 redef meth n_kwbreak
=(n
: TKwbreak)
5024 redef meth n_expr
=(n
: PExpr)
5032 private init empty_init
do end
5034 init init_abreakexpr
(
5035 n_kwbreak
: TKwbreak ,
5040 _n_kwbreak
= n_kwbreak
5041 if n_kwbreak
!= null then
5042 n_kwbreak
.parent
= self
5045 if n_expr
!= null then
5046 n_expr
.parent
= self
5050 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5052 assert old_child
!= null
5053 if _n_kwbreak
== old_child
then
5054 if new_child
!= null then
5055 new_child
.parent
= self
5056 assert new_child
isa TKwbreak
5057 _n_kwbreak
= new_child
5063 if _n_expr
== old_child
then
5064 if new_child
!= null then
5065 new_child
.parent
= self
5066 assert new_child
isa PExpr
5075 redef meth visit_all
(v
: Visitor)
5077 if _n_kwbreak
!= null then
5080 if _n_expr
!= null then
5085 redef meth visit_all_reverse
(v
: Visitor)
5087 if _n_kwbreak
!= null then
5090 if _n_expr
!= null then
5095 redef class AAbortExpr
5096 redef meth n_kwabort
=(n
: TKwabort)
5104 private init empty_init
do end
5106 init init_aabortexpr
(
5111 _n_kwabort
= n_kwabort
5112 if n_kwabort
!= null then
5113 n_kwabort
.parent
= self
5117 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5119 assert old_child
!= null
5120 if _n_kwabort
== old_child
then
5121 if new_child
!= null then
5122 new_child
.parent
= self
5123 assert new_child
isa TKwabort
5124 _n_kwabort
= new_child
5132 redef meth visit_all
(v
: Visitor)
5134 if _n_kwabort
!= null then
5139 redef meth visit_all_reverse
(v
: Visitor)
5141 if _n_kwabort
!= null then
5146 redef class AContinueExpr
5147 redef meth n_kwcontinue
=(n
: TKwcontinue)
5154 redef meth n_expr
=(n
: PExpr)
5162 private init empty_init
do end
5164 init init_acontinueexpr
(
5165 n_kwcontinue
: TKwcontinue ,
5170 _n_kwcontinue
= n_kwcontinue
5171 if n_kwcontinue
!= null then
5172 n_kwcontinue
.parent
= self
5175 if n_expr
!= null then
5176 n_expr
.parent
= self
5180 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5182 assert old_child
!= null
5183 if _n_kwcontinue
== old_child
then
5184 if new_child
!= null then
5185 new_child
.parent
= self
5186 assert new_child
isa TKwcontinue
5187 _n_kwcontinue
= new_child
5189 _n_kwcontinue
= null
5193 if _n_expr
== old_child
then
5194 if new_child
!= null then
5195 new_child
.parent
= self
5196 assert new_child
isa PExpr
5205 redef meth visit_all
(v
: Visitor)
5207 if _n_kwcontinue
!= null then
5208 v
.visit
(_n_kwcontinue
)
5210 if _n_expr
!= null then
5215 redef meth visit_all_reverse
(v
: Visitor)
5217 if _n_kwcontinue
!= null then
5218 v
.visit
(_n_kwcontinue
)
5220 if _n_expr
!= null then
5226 redef meth n_kwdo
=(n
: TKwdo)
5233 redef meth n_block
=(n
: PExpr)
5241 private init empty_init
do end
5250 if n_kwdo
!= null then
5251 n_kwdo
.parent
= self
5254 if n_block
!= null then
5255 n_block
.parent
= self
5259 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5261 assert old_child
!= null
5262 if _n_kwdo
== old_child
then
5263 if new_child
!= null then
5264 new_child
.parent
= self
5265 assert new_child
isa TKwdo
5272 if _n_block
== old_child
then
5273 if new_child
!= null then
5274 new_child
.parent
= self
5275 assert new_child
isa PExpr
5276 _n_block
= new_child
5284 redef meth visit_all
(v
: Visitor)
5286 if _n_kwdo
!= null then
5289 if _n_block
!= null then
5294 redef meth visit_all_reverse
(v
: Visitor)
5296 if _n_kwdo
!= null then
5299 if _n_block
!= null then
5305 redef meth n_kwif
=(n
: TKwif)
5312 redef meth n_expr
=(n
: PExpr)
5319 redef meth n_then
=(n
: PExpr)
5326 redef meth n_else
=(n
: PExpr)
5334 private init empty_init
do end
5345 if n_kwif
!= null then
5346 n_kwif
.parent
= self
5349 if n_expr
!= null then
5350 n_expr
.parent
= self
5353 if n_then
!= null then
5354 n_then
.parent
= self
5357 if n_else
!= null then
5358 n_else
.parent
= self
5362 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5364 assert old_child
!= null
5365 if _n_kwif
== old_child
then
5366 if new_child
!= null then
5367 new_child
.parent
= self
5368 assert new_child
isa TKwif
5375 if _n_expr
== old_child
then
5376 if new_child
!= null then
5377 new_child
.parent
= self
5378 assert new_child
isa PExpr
5385 if _n_then
== old_child
then
5386 if new_child
!= null then
5387 new_child
.parent
= self
5388 assert new_child
isa PExpr
5395 if _n_else
== old_child
then
5396 if new_child
!= null then
5397 new_child
.parent
= self
5398 assert new_child
isa PExpr
5407 redef meth visit_all
(v
: Visitor)
5409 if _n_kwif
!= null then
5412 if _n_expr
!= null then
5415 if _n_then
!= null then
5418 if _n_else
!= null then
5423 redef meth visit_all_reverse
(v
: Visitor)
5425 if _n_kwif
!= null then
5428 if _n_expr
!= null then
5431 if _n_then
!= null then
5434 if _n_else
!= null then
5439 redef class AIfexprExpr
5440 redef meth n_kwif
=(n
: TKwif)
5447 redef meth n_expr
=(n
: PExpr)
5454 redef meth n_kwthen
=(n
: TKwthen)
5461 redef meth n_then
=(n
: PExpr)
5468 redef meth n_kwelse
=(n
: TKwelse)
5475 redef meth n_else
=(n
: PExpr)
5483 private init empty_init
do end
5485 init init_aifexprexpr
(
5496 if n_kwif
!= null then
5497 n_kwif
.parent
= self
5500 if n_expr
!= null then
5501 n_expr
.parent
= self
5503 _n_kwthen
= n_kwthen
5504 if n_kwthen
!= null then
5505 n_kwthen
.parent
= self
5508 if n_then
!= null then
5509 n_then
.parent
= self
5511 _n_kwelse
= n_kwelse
5512 if n_kwelse
!= null then
5513 n_kwelse
.parent
= self
5516 if n_else
!= null then
5517 n_else
.parent
= self
5521 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5523 assert old_child
!= null
5524 if _n_kwif
== old_child
then
5525 if new_child
!= null then
5526 new_child
.parent
= self
5527 assert new_child
isa TKwif
5534 if _n_expr
== old_child
then
5535 if new_child
!= null then
5536 new_child
.parent
= self
5537 assert new_child
isa PExpr
5544 if _n_kwthen
== old_child
then
5545 if new_child
!= null then
5546 new_child
.parent
= self
5547 assert new_child
isa TKwthen
5548 _n_kwthen
= new_child
5554 if _n_then
== old_child
then
5555 if new_child
!= null then
5556 new_child
.parent
= self
5557 assert new_child
isa PExpr
5564 if _n_kwelse
== old_child
then
5565 if new_child
!= null then
5566 new_child
.parent
= self
5567 assert new_child
isa TKwelse
5568 _n_kwelse
= new_child
5574 if _n_else
== old_child
then
5575 if new_child
!= null then
5576 new_child
.parent
= self
5577 assert new_child
isa PExpr
5586 redef meth visit_all
(v
: Visitor)
5588 if _n_kwif
!= null then
5591 if _n_expr
!= null then
5594 if _n_kwthen
!= null then
5597 if _n_then
!= null then
5600 if _n_kwelse
!= null then
5603 if _n_else
!= null then
5608 redef meth visit_all_reverse
(v
: Visitor)
5610 if _n_kwif
!= null then
5613 if _n_expr
!= null then
5616 if _n_kwthen
!= null then
5619 if _n_then
!= null then
5622 if _n_kwelse
!= null then
5625 if _n_else
!= null then
5630 redef class AWhileExpr
5631 redef meth n_kwwhile
=(n
: TKwwhile)
5638 redef meth n_expr
=(n
: PExpr)
5645 redef meth n_kwdo
=(n
: TKwdo)
5652 redef meth n_block
=(n
: PExpr)
5660 private init empty_init
do end
5662 init init_awhileexpr
(
5663 n_kwwhile
: TKwwhile ,
5670 _n_kwwhile
= n_kwwhile
5671 if n_kwwhile
!= null then
5672 n_kwwhile
.parent
= self
5675 if n_expr
!= null then
5676 n_expr
.parent
= self
5679 if n_kwdo
!= null then
5680 n_kwdo
.parent
= self
5683 if n_block
!= null then
5684 n_block
.parent
= self
5688 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5690 assert old_child
!= null
5691 if _n_kwwhile
== old_child
then
5692 if new_child
!= null then
5693 new_child
.parent
= self
5694 assert new_child
isa TKwwhile
5695 _n_kwwhile
= new_child
5701 if _n_expr
== old_child
then
5702 if new_child
!= null then
5703 new_child
.parent
= self
5704 assert new_child
isa PExpr
5711 if _n_kwdo
== old_child
then
5712 if new_child
!= null then
5713 new_child
.parent
= self
5714 assert new_child
isa TKwdo
5721 if _n_block
== old_child
then
5722 if new_child
!= null then
5723 new_child
.parent
= self
5724 assert new_child
isa PExpr
5725 _n_block
= new_child
5733 redef meth visit_all
(v
: Visitor)
5735 if _n_kwwhile
!= null then
5738 if _n_expr
!= null then
5741 if _n_kwdo
!= null then
5744 if _n_block
!= null then
5749 redef meth visit_all_reverse
(v
: Visitor)
5751 if _n_kwwhile
!= null then
5754 if _n_expr
!= null then
5757 if _n_kwdo
!= null then
5760 if _n_block
!= null then
5765 redef class AForExpr
5766 redef meth n_vardecl
=(n
: PExpr)
5773 redef meth n_kwdo
=(n
: TKwdo)
5780 redef meth n_block
=(n
: PExpr)
5788 private init empty_init
do end
5790 init init_aforexpr
(
5797 _n_vardecl
= n_vardecl
5798 if n_vardecl
!= null then
5799 n_vardecl
.parent
= self
5802 if n_kwdo
!= null then
5803 n_kwdo
.parent
= self
5806 if n_block
!= null then
5807 n_block
.parent
= self
5811 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5813 assert old_child
!= null
5814 if _n_vardecl
== old_child
then
5815 if new_child
!= null then
5816 new_child
.parent
= self
5817 assert new_child
isa PExpr
5818 _n_vardecl
= new_child
5824 if _n_kwdo
== old_child
then
5825 if new_child
!= null then
5826 new_child
.parent
= self
5827 assert new_child
isa TKwdo
5834 if _n_block
== old_child
then
5835 if new_child
!= null then
5836 new_child
.parent
= self
5837 assert new_child
isa PExpr
5838 _n_block
= new_child
5846 redef meth visit_all
(v
: Visitor)
5848 if _n_vardecl
!= null then
5851 if _n_kwdo
!= null then
5854 if _n_block
!= null then
5859 redef meth visit_all_reverse
(v
: Visitor)
5861 if _n_vardecl
!= null then
5864 if _n_kwdo
!= null then
5867 if _n_block
!= null then
5872 redef class AForVardeclExpr
5873 redef meth n_kwfor
=(n
: TKwfor)
5880 redef meth n_id
=(n
: TId)
5887 redef meth n_expr
=(n
: PExpr)
5895 private init empty_init
do end
5897 init init_aforvardeclexpr
(
5905 if n_kwfor
!= null then
5906 n_kwfor
.parent
= self
5909 if n_id
!= null then
5913 if n_expr
!= null then
5914 n_expr
.parent
= self
5918 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5920 assert old_child
!= null
5921 if _n_kwfor
== old_child
then
5922 if new_child
!= null then
5923 new_child
.parent
= self
5924 assert new_child
isa TKwfor
5925 _n_kwfor
= new_child
5931 if _n_id
== old_child
then
5932 if new_child
!= null then
5933 new_child
.parent
= self
5934 assert new_child
isa TId
5941 if _n_expr
== old_child
then
5942 if new_child
!= null then
5943 new_child
.parent
= self
5944 assert new_child
isa PExpr
5953 redef meth visit_all
(v
: Visitor)
5955 if _n_kwfor
!= null then
5958 if _n_id
!= null then
5961 if _n_expr
!= null then
5966 redef meth visit_all_reverse
(v
: Visitor)
5968 if _n_kwfor
!= null then
5971 if _n_id
!= null then
5974 if _n_expr
!= null then
5979 redef class AAssertExpr
5980 redef meth n_kwassert
=(n
: TKwassert)
5987 redef meth n_id
=(n
: TId)
5994 redef meth n_expr
=(n
: PExpr)
6002 private init empty_init
do end
6004 init init_aassertexpr
(
6005 n_kwassert
: TKwassert ,
6011 _n_kwassert
= n_kwassert
6012 if n_kwassert
!= null then
6013 n_kwassert
.parent
= self
6016 if n_id
!= null then
6020 if n_expr
!= null then
6021 n_expr
.parent
= self
6025 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6027 assert old_child
!= null
6028 if _n_kwassert
== old_child
then
6029 if new_child
!= null then
6030 new_child
.parent
= self
6031 assert new_child
isa TKwassert
6032 _n_kwassert
= new_child
6038 if _n_id
== old_child
then
6039 if new_child
!= null then
6040 new_child
.parent
= self
6041 assert new_child
isa TId
6048 if _n_expr
== old_child
then
6049 if new_child
!= null then
6050 new_child
.parent
= self
6051 assert new_child
isa PExpr
6060 redef meth visit_all
(v
: Visitor)
6062 if _n_kwassert
!= null then
6063 v
.visit
(_n_kwassert
)
6065 if _n_id
!= null then
6068 if _n_expr
!= null then
6073 redef meth visit_all_reverse
(v
: Visitor)
6075 if _n_kwassert
!= null then
6076 v
.visit
(_n_kwassert
)
6078 if _n_id
!= null then
6081 if _n_expr
!= null then
6086 redef class AOnceExpr
6087 redef meth n_kwonce
=(n
: TKwonce)
6094 redef meth n_expr
=(n
: PExpr)
6102 private init empty_init
do end
6104 init init_aonceexpr
(
6110 _n_kwonce
= n_kwonce
6111 if n_kwonce
!= null then
6112 n_kwonce
.parent
= self
6115 if n_expr
!= null then
6116 n_expr
.parent
= self
6120 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6122 assert old_child
!= null
6123 if _n_kwonce
== old_child
then
6124 if new_child
!= null then
6125 new_child
.parent
= self
6126 assert new_child
isa TKwonce
6127 _n_kwonce
= new_child
6133 if _n_expr
== old_child
then
6134 if new_child
!= null then
6135 new_child
.parent
= self
6136 assert new_child
isa PExpr
6145 redef meth visit_all
(v
: Visitor)
6147 if _n_kwonce
!= null then
6150 if _n_expr
!= null then
6155 redef meth visit_all_reverse
(v
: Visitor)
6157 if _n_kwonce
!= null then
6160 if _n_expr
!= null then
6165 redef class ASendExpr
6166 redef meth n_expr
=(n
: PExpr)
6174 private init empty_init
do end
6176 init init_asendexpr
(
6182 if n_expr
!= null then
6183 n_expr
.parent
= self
6187 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6189 assert old_child
!= null
6190 if _n_expr
== old_child
then
6191 if new_child
!= null then
6192 new_child
.parent
= self
6193 assert new_child
isa PExpr
6202 redef meth visit_all
(v
: Visitor)
6204 if _n_expr
!= null then
6209 redef meth visit_all_reverse
(v
: Visitor)
6211 if _n_expr
!= null then
6216 redef class ABinopExpr
6217 redef meth n_expr
=(n
: PExpr)
6224 redef meth n_expr2
=(n
: PExpr)
6232 private init empty_init
do end
6234 init init_abinopexpr
(
6241 if n_expr
!= null then
6242 n_expr
.parent
= self
6245 if n_expr2
!= null then
6246 n_expr2
.parent
= self
6250 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6252 assert old_child
!= null
6253 if _n_expr
== old_child
then
6254 if new_child
!= null then
6255 new_child
.parent
= self
6256 assert new_child
isa PExpr
6263 if _n_expr2
== old_child
then
6264 if new_child
!= null then
6265 new_child
.parent
= self
6266 assert new_child
isa PExpr
6267 _n_expr2
= new_child
6275 redef meth visit_all
(v
: Visitor)
6277 if _n_expr
!= null then
6280 if _n_expr2
!= null then
6285 redef meth visit_all_reverse
(v
: Visitor)
6287 if _n_expr
!= null then
6290 if _n_expr2
!= null then
6296 redef meth n_expr
=(n
: PExpr)
6303 redef meth n_expr2
=(n
: PExpr)
6311 private init empty_init
do end
6320 if n_expr
!= null then
6321 n_expr
.parent
= self
6324 if n_expr2
!= null then
6325 n_expr2
.parent
= self
6329 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6331 assert old_child
!= null
6332 if _n_expr
== old_child
then
6333 if new_child
!= null then
6334 new_child
.parent
= self
6335 assert new_child
isa PExpr
6342 if _n_expr2
== old_child
then
6343 if new_child
!= null then
6344 new_child
.parent
= self
6345 assert new_child
isa PExpr
6346 _n_expr2
= new_child
6354 redef meth visit_all
(v
: Visitor)
6356 if _n_expr
!= null then
6359 if _n_expr2
!= null then
6364 redef meth visit_all_reverse
(v
: Visitor)
6366 if _n_expr
!= null then
6369 if _n_expr2
!= null then
6374 redef class AAndExpr
6375 redef meth n_expr
=(n
: PExpr)
6382 redef meth n_expr2
=(n
: PExpr)
6390 private init empty_init
do end
6392 init init_aandexpr
(
6399 if n_expr
!= null then
6400 n_expr
.parent
= self
6403 if n_expr2
!= null then
6404 n_expr2
.parent
= self
6408 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6410 assert old_child
!= null
6411 if _n_expr
== old_child
then
6412 if new_child
!= null then
6413 new_child
.parent
= self
6414 assert new_child
isa PExpr
6421 if _n_expr2
== old_child
then
6422 if new_child
!= null then
6423 new_child
.parent
= self
6424 assert new_child
isa PExpr
6425 _n_expr2
= new_child
6433 redef meth visit_all
(v
: Visitor)
6435 if _n_expr
!= null then
6438 if _n_expr2
!= null then
6443 redef meth visit_all_reverse
(v
: Visitor)
6445 if _n_expr
!= null then
6448 if _n_expr2
!= null then
6453 redef class ANotExpr
6454 redef meth n_kwnot
=(n
: TKwnot)
6461 redef meth n_expr
=(n
: PExpr)
6469 private init empty_init
do end
6471 init init_anotexpr
(
6478 if n_kwnot
!= null then
6479 n_kwnot
.parent
= self
6482 if n_expr
!= null then
6483 n_expr
.parent
= self
6487 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6489 assert old_child
!= null
6490 if _n_kwnot
== old_child
then
6491 if new_child
!= null then
6492 new_child
.parent
= self
6493 assert new_child
isa TKwnot
6494 _n_kwnot
= new_child
6500 if _n_expr
== old_child
then
6501 if new_child
!= null then
6502 new_child
.parent
= self
6503 assert new_child
isa PExpr
6512 redef meth visit_all
(v
: Visitor)
6514 if _n_kwnot
!= null then
6517 if _n_expr
!= null then
6522 redef meth visit_all_reverse
(v
: Visitor)
6524 if _n_kwnot
!= null then
6527 if _n_expr
!= null then
6533 redef meth n_expr
=(n
: PExpr)
6540 redef meth n_expr2
=(n
: PExpr)
6548 private init empty_init
do end
6557 if n_expr
!= null then
6558 n_expr
.parent
= self
6561 if n_expr2
!= null then
6562 n_expr2
.parent
= self
6566 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6568 assert old_child
!= null
6569 if _n_expr
== old_child
then
6570 if new_child
!= null then
6571 new_child
.parent
= self
6572 assert new_child
isa PExpr
6579 if _n_expr2
== old_child
then
6580 if new_child
!= null then
6581 new_child
.parent
= self
6582 assert new_child
isa PExpr
6583 _n_expr2
= new_child
6591 redef meth visit_all
(v
: Visitor)
6593 if _n_expr
!= null then
6596 if _n_expr2
!= null then
6601 redef meth visit_all_reverse
(v
: Visitor)
6603 if _n_expr
!= null then
6606 if _n_expr2
!= null then
6612 redef meth n_expr
=(n
: PExpr)
6619 redef meth n_expr2
=(n
: PExpr)
6627 private init empty_init
do end
6636 if n_expr
!= null then
6637 n_expr
.parent
= self
6640 if n_expr2
!= null then
6641 n_expr2
.parent
= self
6645 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6647 assert old_child
!= null
6648 if _n_expr
== old_child
then
6649 if new_child
!= null then
6650 new_child
.parent
= self
6651 assert new_child
isa PExpr
6658 if _n_expr2
== old_child
then
6659 if new_child
!= null then
6660 new_child
.parent
= self
6661 assert new_child
isa PExpr
6662 _n_expr2
= new_child
6670 redef meth visit_all
(v
: Visitor)
6672 if _n_expr
!= null then
6675 if _n_expr2
!= null then
6680 redef meth visit_all_reverse
(v
: Visitor)
6682 if _n_expr
!= null then
6685 if _n_expr2
!= null then
6691 redef meth n_expr
=(n
: PExpr)
6698 redef meth n_expr2
=(n
: PExpr)
6706 private init empty_init
do end
6715 if n_expr
!= null then
6716 n_expr
.parent
= self
6719 if n_expr2
!= null then
6720 n_expr2
.parent
= self
6724 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6726 assert old_child
!= null
6727 if _n_expr
== old_child
then
6728 if new_child
!= null then
6729 new_child
.parent
= self
6730 assert new_child
isa PExpr
6737 if _n_expr2
== old_child
then
6738 if new_child
!= null then
6739 new_child
.parent
= self
6740 assert new_child
isa PExpr
6741 _n_expr2
= new_child
6749 redef meth visit_all
(v
: Visitor)
6751 if _n_expr
!= null then
6754 if _n_expr2
!= null then
6759 redef meth visit_all_reverse
(v
: Visitor)
6761 if _n_expr
!= null then
6764 if _n_expr2
!= null then
6770 redef meth n_expr
=(n
: PExpr)
6777 redef meth n_expr2
=(n
: PExpr)
6785 private init empty_init
do end
6794 if n_expr
!= null then
6795 n_expr
.parent
= self
6798 if n_expr2
!= null then
6799 n_expr2
.parent
= self
6803 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6805 assert old_child
!= null
6806 if _n_expr
== old_child
then
6807 if new_child
!= null then
6808 new_child
.parent
= self
6809 assert new_child
isa PExpr
6816 if _n_expr2
== old_child
then
6817 if new_child
!= null then
6818 new_child
.parent
= self
6819 assert new_child
isa PExpr
6820 _n_expr2
= new_child
6828 redef meth visit_all
(v
: Visitor)
6830 if _n_expr
!= null then
6833 if _n_expr2
!= null then
6838 redef meth visit_all_reverse
(v
: Visitor)
6840 if _n_expr
!= null then
6843 if _n_expr2
!= null then
6849 redef meth n_expr
=(n
: PExpr)
6856 redef meth n_expr2
=(n
: PExpr)
6864 private init empty_init
do end
6873 if n_expr
!= null then
6874 n_expr
.parent
= self
6877 if n_expr2
!= null then
6878 n_expr2
.parent
= self
6882 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6884 assert old_child
!= null
6885 if _n_expr
== old_child
then
6886 if new_child
!= null then
6887 new_child
.parent
= self
6888 assert new_child
isa PExpr
6895 if _n_expr2
== old_child
then
6896 if new_child
!= null then
6897 new_child
.parent
= self
6898 assert new_child
isa PExpr
6899 _n_expr2
= new_child
6907 redef meth visit_all
(v
: Visitor)
6909 if _n_expr
!= null then
6912 if _n_expr2
!= null then
6917 redef meth visit_all_reverse
(v
: Visitor)
6919 if _n_expr
!= null then
6922 if _n_expr2
!= null then
6928 redef meth n_expr
=(n
: PExpr)
6935 redef meth n_expr2
=(n
: PExpr)
6943 private init empty_init
do end
6952 if n_expr
!= null then
6953 n_expr
.parent
= self
6956 if n_expr2
!= null then
6957 n_expr2
.parent
= self
6961 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6963 assert old_child
!= null
6964 if _n_expr
== old_child
then
6965 if new_child
!= null then
6966 new_child
.parent
= self
6967 assert new_child
isa PExpr
6974 if _n_expr2
== old_child
then
6975 if new_child
!= null then
6976 new_child
.parent
= self
6977 assert new_child
isa PExpr
6978 _n_expr2
= new_child
6986 redef meth visit_all
(v
: Visitor)
6988 if _n_expr
!= null then
6991 if _n_expr2
!= null then
6996 redef meth visit_all_reverse
(v
: Visitor)
6998 if _n_expr
!= null then
7001 if _n_expr2
!= null then
7007 redef meth n_expr
=(n
: PExpr)
7014 redef meth n_expr2
=(n
: PExpr)
7022 private init empty_init
do end
7031 if n_expr
!= null then
7032 n_expr
.parent
= self
7035 if n_expr2
!= null then
7036 n_expr2
.parent
= self
7040 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7042 assert old_child
!= null
7043 if _n_expr
== old_child
then
7044 if new_child
!= null then
7045 new_child
.parent
= self
7046 assert new_child
isa PExpr
7053 if _n_expr2
== old_child
then
7054 if new_child
!= null then
7055 new_child
.parent
= self
7056 assert new_child
isa PExpr
7057 _n_expr2
= new_child
7065 redef meth visit_all
(v
: Visitor)
7067 if _n_expr
!= null then
7070 if _n_expr2
!= null then
7075 redef meth visit_all_reverse
(v
: Visitor)
7077 if _n_expr
!= null then
7080 if _n_expr2
!= null then
7085 redef class AIsaExpr
7086 redef meth n_expr
=(n
: PExpr)
7093 redef meth n_type
=(n
: PType)
7101 private init empty_init
do end
7103 init init_aisaexpr
(
7110 if n_expr
!= null then
7111 n_expr
.parent
= self
7114 if n_type
!= null then
7115 n_type
.parent
= self
7119 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7121 assert old_child
!= null
7122 if _n_expr
== old_child
then
7123 if new_child
!= null then
7124 new_child
.parent
= self
7125 assert new_child
isa PExpr
7132 if _n_type
== old_child
then
7133 if new_child
!= null then
7134 new_child
.parent
= self
7135 assert new_child
isa PType
7144 redef meth visit_all
(v
: Visitor)
7146 if _n_expr
!= null then
7149 if _n_type
!= null then
7154 redef meth visit_all_reverse
(v
: Visitor)
7156 if _n_expr
!= null then
7159 if _n_type
!= null then
7164 redef class APlusExpr
7165 redef meth n_expr
=(n
: PExpr)
7172 redef meth n_expr2
=(n
: PExpr)
7180 private init empty_init
do end
7182 init init_aplusexpr
(
7189 if n_expr
!= null then
7190 n_expr
.parent
= self
7193 if n_expr2
!= null then
7194 n_expr2
.parent
= self
7198 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7200 assert old_child
!= null
7201 if _n_expr
== old_child
then
7202 if new_child
!= null then
7203 new_child
.parent
= self
7204 assert new_child
isa PExpr
7211 if _n_expr2
== old_child
then
7212 if new_child
!= null then
7213 new_child
.parent
= self
7214 assert new_child
isa PExpr
7215 _n_expr2
= new_child
7223 redef meth visit_all
(v
: Visitor)
7225 if _n_expr
!= null then
7228 if _n_expr2
!= null then
7233 redef meth visit_all_reverse
(v
: Visitor)
7235 if _n_expr
!= null then
7238 if _n_expr2
!= null then
7243 redef class AMinusExpr
7244 redef meth n_expr
=(n
: PExpr)
7251 redef meth n_expr2
=(n
: PExpr)
7259 private init empty_init
do end
7261 init init_aminusexpr
(
7268 if n_expr
!= null then
7269 n_expr
.parent
= self
7272 if n_expr2
!= null then
7273 n_expr2
.parent
= self
7277 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7279 assert old_child
!= null
7280 if _n_expr
== old_child
then
7281 if new_child
!= null then
7282 new_child
.parent
= self
7283 assert new_child
isa PExpr
7290 if _n_expr2
== old_child
then
7291 if new_child
!= null then
7292 new_child
.parent
= self
7293 assert new_child
isa PExpr
7294 _n_expr2
= new_child
7302 redef meth visit_all
(v
: Visitor)
7304 if _n_expr
!= null then
7307 if _n_expr2
!= null then
7312 redef meth visit_all_reverse
(v
: Visitor)
7314 if _n_expr
!= null then
7317 if _n_expr2
!= null then
7322 redef class AStarshipExpr
7323 redef meth n_expr
=(n
: PExpr)
7330 redef meth n_expr2
=(n
: PExpr)
7338 private init empty_init
do end
7340 init init_astarshipexpr
(
7347 if n_expr
!= null then
7348 n_expr
.parent
= self
7351 if n_expr2
!= null then
7352 n_expr2
.parent
= self
7356 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7358 assert old_child
!= null
7359 if _n_expr
== old_child
then
7360 if new_child
!= null then
7361 new_child
.parent
= self
7362 assert new_child
isa PExpr
7369 if _n_expr2
== old_child
then
7370 if new_child
!= null then
7371 new_child
.parent
= self
7372 assert new_child
isa PExpr
7373 _n_expr2
= new_child
7381 redef meth visit_all
(v
: Visitor)
7383 if _n_expr
!= null then
7386 if _n_expr2
!= null then
7391 redef meth visit_all_reverse
(v
: Visitor)
7393 if _n_expr
!= null then
7396 if _n_expr2
!= null then
7401 redef class AStarExpr
7402 redef meth n_expr
=(n
: PExpr)
7409 redef meth n_expr2
=(n
: PExpr)
7417 private init empty_init
do end
7419 init init_astarexpr
(
7426 if n_expr
!= null then
7427 n_expr
.parent
= self
7430 if n_expr2
!= null then
7431 n_expr2
.parent
= self
7435 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7437 assert old_child
!= null
7438 if _n_expr
== old_child
then
7439 if new_child
!= null then
7440 new_child
.parent
= self
7441 assert new_child
isa PExpr
7448 if _n_expr2
== old_child
then
7449 if new_child
!= null then
7450 new_child
.parent
= self
7451 assert new_child
isa PExpr
7452 _n_expr2
= new_child
7460 redef meth visit_all
(v
: Visitor)
7462 if _n_expr
!= null then
7465 if _n_expr2
!= null then
7470 redef meth visit_all_reverse
(v
: Visitor)
7472 if _n_expr
!= null then
7475 if _n_expr2
!= null then
7480 redef class ASlashExpr
7481 redef meth n_expr
=(n
: PExpr)
7488 redef meth n_expr2
=(n
: PExpr)
7496 private init empty_init
do end
7498 init init_aslashexpr
(
7505 if n_expr
!= null then
7506 n_expr
.parent
= self
7509 if n_expr2
!= null then
7510 n_expr2
.parent
= self
7514 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7516 assert old_child
!= null
7517 if _n_expr
== old_child
then
7518 if new_child
!= null then
7519 new_child
.parent
= self
7520 assert new_child
isa PExpr
7527 if _n_expr2
== old_child
then
7528 if new_child
!= null then
7529 new_child
.parent
= self
7530 assert new_child
isa PExpr
7531 _n_expr2
= new_child
7539 redef meth visit_all
(v
: Visitor)
7541 if _n_expr
!= null then
7544 if _n_expr2
!= null then
7549 redef meth visit_all_reverse
(v
: Visitor)
7551 if _n_expr
!= null then
7554 if _n_expr2
!= null then
7559 redef class APercentExpr
7560 redef meth n_expr
=(n
: PExpr)
7567 redef meth n_expr2
=(n
: PExpr)
7575 private init empty_init
do end
7577 init init_apercentexpr
(
7584 if n_expr
!= null then
7585 n_expr
.parent
= self
7588 if n_expr2
!= null then
7589 n_expr2
.parent
= self
7593 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7595 assert old_child
!= null
7596 if _n_expr
== old_child
then
7597 if new_child
!= null then
7598 new_child
.parent
= self
7599 assert new_child
isa PExpr
7606 if _n_expr2
== old_child
then
7607 if new_child
!= null then
7608 new_child
.parent
= self
7609 assert new_child
isa PExpr
7610 _n_expr2
= new_child
7618 redef meth visit_all
(v
: Visitor)
7620 if _n_expr
!= null then
7623 if _n_expr2
!= null then
7628 redef meth visit_all_reverse
(v
: Visitor)
7630 if _n_expr
!= null then
7633 if _n_expr2
!= null then
7638 redef class AUminusExpr
7639 redef meth n_minus
=(n
: TMinus)
7646 redef meth n_expr
=(n
: PExpr)
7654 private init empty_init
do end
7656 init init_auminusexpr
(
7663 if n_minus
!= null then
7664 n_minus
.parent
= self
7667 if n_expr
!= null then
7668 n_expr
.parent
= self
7672 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7674 assert old_child
!= null
7675 if _n_minus
== old_child
then
7676 if new_child
!= null then
7677 new_child
.parent
= self
7678 assert new_child
isa TMinus
7679 _n_minus
= new_child
7685 if _n_expr
== old_child
then
7686 if new_child
!= null then
7687 new_child
.parent
= self
7688 assert new_child
isa PExpr
7697 redef meth visit_all
(v
: Visitor)
7699 if _n_minus
!= null then
7702 if _n_expr
!= null then
7707 redef meth visit_all_reverse
(v
: Visitor)
7709 if _n_minus
!= null then
7712 if _n_expr
!= null then
7717 redef class ANewExpr
7718 redef meth n_kwnew
=(n
: TKwnew)
7725 redef meth n_type
=(n
: PType)
7732 redef meth n_id
=(n
: TId)
7740 private init empty_init
do end
7742 init init_anewexpr
(
7746 n_args
: Array[Object] # Should be Array[PExpr]
7751 if n_kwnew
!= null then
7752 n_kwnew
.parent
= self
7755 if n_type
!= null then
7756 n_type
.parent
= self
7759 if n_id
!= null then
7762 _n_args
= new List[PExpr]
7770 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7772 assert old_child
!= null
7773 if _n_kwnew
== old_child
then
7774 if new_child
!= null then
7775 new_child
.parent
= self
7776 assert new_child
isa TKwnew
7777 _n_kwnew
= new_child
7783 if _n_type
== old_child
then
7784 if new_child
!= null then
7785 new_child
.parent
= self
7786 assert new_child
isa PType
7793 if _n_id
== old_child
then
7794 if new_child
!= null then
7795 new_child
.parent
= self
7796 assert new_child
isa TId
7803 for i
in [0.._n_args
.length
[ do
7804 if _n_args
[i
] == old_child
then
7805 if new_child
!= null then
7806 assert new_child
isa PExpr
7807 _n_args
[i
] = new_child
7808 new_child
.parent
= self
7810 _n_args
.remove_at
(i
)
7817 redef meth visit_all
(v
: Visitor)
7819 if _n_kwnew
!= null then
7822 if _n_type
!= null then
7825 if _n_id
!= null then
7833 redef meth visit_all_reverse
(v
: Visitor)
7835 if _n_kwnew
!= null then
7838 if _n_type
!= null then
7841 if _n_id
!= null then
7845 var i
= _n_args
.length
7853 redef class AAttrExpr
7854 redef meth n_expr
=(n
: PExpr)
7861 redef meth n_id
=(n
: TAttrid)
7869 private init empty_init
do end
7871 init init_aattrexpr
(
7878 if n_expr
!= null then
7879 n_expr
.parent
= self
7882 if n_id
!= null then
7887 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7889 assert old_child
!= null
7890 if _n_expr
== old_child
then
7891 if new_child
!= null then
7892 new_child
.parent
= self
7893 assert new_child
isa PExpr
7900 if _n_id
== old_child
then
7901 if new_child
!= null then
7902 new_child
.parent
= self
7903 assert new_child
isa TAttrid
7912 redef meth visit_all
(v
: Visitor)
7914 if _n_expr
!= null then
7917 if _n_id
!= null then
7922 redef meth visit_all_reverse
(v
: Visitor)
7924 if _n_expr
!= null then
7927 if _n_id
!= null then
7932 redef class AAttrAssignExpr
7933 redef meth n_expr
=(n
: PExpr)
7940 redef meth n_id
=(n
: TAttrid)
7947 redef meth n_assign
=(n
: TAssign)
7954 redef meth n_value
=(n
: PExpr)
7962 private init empty_init
do end
7964 init init_aattrassignexpr
(
7973 if n_expr
!= null then
7974 n_expr
.parent
= self
7977 if n_id
!= null then
7980 _n_assign
= n_assign
7981 if n_assign
!= null then
7982 n_assign
.parent
= self
7985 if n_value
!= null then
7986 n_value
.parent
= self
7990 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7992 assert old_child
!= null
7993 if _n_expr
== old_child
then
7994 if new_child
!= null then
7995 new_child
.parent
= self
7996 assert new_child
isa PExpr
8003 if _n_id
== old_child
then
8004 if new_child
!= null then
8005 new_child
.parent
= self
8006 assert new_child
isa TAttrid
8013 if _n_assign
== old_child
then
8014 if new_child
!= null then
8015 new_child
.parent
= self
8016 assert new_child
isa TAssign
8017 _n_assign
= new_child
8023 if _n_value
== old_child
then
8024 if new_child
!= null then
8025 new_child
.parent
= self
8026 assert new_child
isa PExpr
8027 _n_value
= new_child
8035 redef meth visit_all
(v
: Visitor)
8037 if _n_expr
!= null then
8040 if _n_id
!= null then
8043 if _n_assign
!= null then
8046 if _n_value
!= null then
8051 redef meth visit_all_reverse
(v
: Visitor)
8053 if _n_expr
!= null then
8056 if _n_id
!= null then
8059 if _n_assign
!= null then
8062 if _n_value
!= null then
8067 redef class AAttrReassignExpr
8068 redef meth n_expr
=(n
: PExpr)
8075 redef meth n_id
=(n
: TAttrid)
8082 redef meth n_assign_op
=(n
: PAssignOp)
8089 redef meth n_value
=(n
: PExpr)
8097 private init empty_init
do end
8099 init init_aattrreassignexpr
(
8102 n_assign_op
: PAssignOp ,
8108 if n_expr
!= null then
8109 n_expr
.parent
= self
8112 if n_id
!= null then
8115 _n_assign_op
= n_assign_op
8116 if n_assign_op
!= null then
8117 n_assign_op
.parent
= self
8120 if n_value
!= null then
8121 n_value
.parent
= self
8125 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8127 assert old_child
!= null
8128 if _n_expr
== old_child
then
8129 if new_child
!= null then
8130 new_child
.parent
= self
8131 assert new_child
isa PExpr
8138 if _n_id
== old_child
then
8139 if new_child
!= null then
8140 new_child
.parent
= self
8141 assert new_child
isa TAttrid
8148 if _n_assign_op
== old_child
then
8149 if new_child
!= null then
8150 new_child
.parent
= self
8151 assert new_child
isa PAssignOp
8152 _n_assign_op
= new_child
8158 if _n_value
== old_child
then
8159 if new_child
!= null then
8160 new_child
.parent
= self
8161 assert new_child
isa PExpr
8162 _n_value
= new_child
8170 redef meth visit_all
(v
: Visitor)
8172 if _n_expr
!= null then
8175 if _n_id
!= null then
8178 if _n_assign_op
!= null then
8179 v
.visit
(_n_assign_op
)
8181 if _n_value
!= null then
8186 redef meth visit_all_reverse
(v
: Visitor)
8188 if _n_expr
!= null then
8191 if _n_id
!= null then
8194 if _n_assign_op
!= null then
8195 v
.visit
(_n_assign_op
)
8197 if _n_value
!= null then
8202 redef class ACallExpr
8203 redef meth n_expr
=(n
: PExpr)
8210 redef meth n_id
=(n
: TId)
8218 private init empty_init
do end
8220 init init_acallexpr
(
8223 n_args
: Array[Object] , # Should be Array[PExpr]
8224 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8229 if n_expr
!= null then
8230 n_expr
.parent
= self
8233 if n_id
!= null then
8236 _n_args
= new List[PExpr]
8242 _n_closure_defs
= new List[PClosureDef]
8243 for n
in n_closure_defs
do
8244 assert n
isa PClosureDef
8245 _n_closure_defs
.add
(n
)
8250 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8252 assert old_child
!= null
8253 if _n_expr
== old_child
then
8254 if new_child
!= null then
8255 new_child
.parent
= self
8256 assert new_child
isa PExpr
8263 if _n_id
== old_child
then
8264 if new_child
!= null then
8265 new_child
.parent
= self
8266 assert new_child
isa TId
8273 for i
in [0.._n_args
.length
[ do
8274 if _n_args
[i
] == old_child
then
8275 if new_child
!= null then
8276 assert new_child
isa PExpr
8277 _n_args
[i
] = new_child
8278 new_child
.parent
= self
8280 _n_args
.remove_at
(i
)
8285 for i
in [0.._n_closure_defs
.length
[ do
8286 if _n_closure_defs
[i
] == old_child
then
8287 if new_child
!= null then
8288 assert new_child
isa PClosureDef
8289 _n_closure_defs
[i
] = new_child
8290 new_child
.parent
= self
8292 _n_closure_defs
.remove_at
(i
)
8299 redef meth visit_all
(v
: Visitor)
8301 if _n_expr
!= null then
8304 if _n_id
!= null then
8310 for n
in _n_closure_defs
do
8315 redef meth visit_all_reverse
(v
: Visitor)
8317 if _n_expr
!= null then
8320 if _n_id
!= null then
8324 var i
= _n_args
.length
8331 var i
= _n_closure_defs
.length
8333 v
.visit
(_n_closure_defs
[i
])
8339 redef class ACallAssignExpr
8340 redef meth n_expr
=(n
: PExpr)
8347 redef meth n_id
=(n
: TId)
8354 redef meth n_assign
=(n
: TAssign)
8361 redef meth n_value
=(n
: PExpr)
8369 private init empty_init
do end
8371 init init_acallassignexpr
(
8374 n_args
: Array[Object] , # Should be Array[PExpr]
8381 if n_expr
!= null then
8382 n_expr
.parent
= self
8385 if n_id
!= null then
8388 _n_args
= new List[PExpr]
8394 _n_assign
= n_assign
8395 if n_assign
!= null then
8396 n_assign
.parent
= self
8399 if n_value
!= null then
8400 n_value
.parent
= self
8404 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8406 assert old_child
!= null
8407 if _n_expr
== old_child
then
8408 if new_child
!= null then
8409 new_child
.parent
= self
8410 assert new_child
isa PExpr
8417 if _n_id
== old_child
then
8418 if new_child
!= null then
8419 new_child
.parent
= self
8420 assert new_child
isa TId
8427 for i
in [0.._n_args
.length
[ do
8428 if _n_args
[i
] == old_child
then
8429 if new_child
!= null then
8430 assert new_child
isa PExpr
8431 _n_args
[i
] = new_child
8432 new_child
.parent
= self
8434 _n_args
.remove_at
(i
)
8439 if _n_assign
== old_child
then
8440 if new_child
!= null then
8441 new_child
.parent
= self
8442 assert new_child
isa TAssign
8443 _n_assign
= new_child
8449 if _n_value
== old_child
then
8450 if new_child
!= null then
8451 new_child
.parent
= self
8452 assert new_child
isa PExpr
8453 _n_value
= new_child
8461 redef meth visit_all
(v
: Visitor)
8463 if _n_expr
!= null then
8466 if _n_id
!= null then
8472 if _n_assign
!= null then
8475 if _n_value
!= null then
8480 redef meth visit_all_reverse
(v
: Visitor)
8482 if _n_expr
!= null then
8485 if _n_id
!= null then
8489 var i
= _n_args
.length
8495 if _n_assign
!= null then
8498 if _n_value
!= null then
8503 redef class ACallReassignExpr
8504 redef meth n_expr
=(n
: PExpr)
8511 redef meth n_id
=(n
: TId)
8518 redef meth n_assign_op
=(n
: PAssignOp)
8525 redef meth n_value
=(n
: PExpr)
8533 private init empty_init
do end
8535 init init_acallreassignexpr
(
8538 n_args
: Array[Object] , # Should be Array[PExpr]
8539 n_assign_op
: PAssignOp ,
8545 if n_expr
!= null then
8546 n_expr
.parent
= self
8549 if n_id
!= null then
8552 _n_args
= new List[PExpr]
8558 _n_assign_op
= n_assign_op
8559 if n_assign_op
!= null then
8560 n_assign_op
.parent
= self
8563 if n_value
!= null then
8564 n_value
.parent
= self
8568 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8570 assert old_child
!= null
8571 if _n_expr
== old_child
then
8572 if new_child
!= null then
8573 new_child
.parent
= self
8574 assert new_child
isa PExpr
8581 if _n_id
== old_child
then
8582 if new_child
!= null then
8583 new_child
.parent
= self
8584 assert new_child
isa TId
8591 for i
in [0.._n_args
.length
[ do
8592 if _n_args
[i
] == old_child
then
8593 if new_child
!= null then
8594 assert new_child
isa PExpr
8595 _n_args
[i
] = new_child
8596 new_child
.parent
= self
8598 _n_args
.remove_at
(i
)
8603 if _n_assign_op
== old_child
then
8604 if new_child
!= null then
8605 new_child
.parent
= self
8606 assert new_child
isa PAssignOp
8607 _n_assign_op
= new_child
8613 if _n_value
== old_child
then
8614 if new_child
!= null then
8615 new_child
.parent
= self
8616 assert new_child
isa PExpr
8617 _n_value
= new_child
8625 redef meth visit_all
(v
: Visitor)
8627 if _n_expr
!= null then
8630 if _n_id
!= null then
8636 if _n_assign_op
!= null then
8637 v
.visit
(_n_assign_op
)
8639 if _n_value
!= null then
8644 redef meth visit_all_reverse
(v
: Visitor)
8646 if _n_expr
!= null then
8649 if _n_id
!= null then
8653 var i
= _n_args
.length
8659 if _n_assign_op
!= null then
8660 v
.visit
(_n_assign_op
)
8662 if _n_value
!= null then
8667 redef class ASuperExpr
8668 redef meth n_qualified
=(n
: PQualified)
8675 redef meth n_kwsuper
=(n
: TKwsuper)
8683 private init empty_init
do end
8685 init init_asuperexpr
(
8686 n_qualified
: PQualified ,
8687 n_kwsuper
: TKwsuper ,
8688 n_args
: Array[Object] # Should be Array[PExpr]
8692 _n_qualified
= n_qualified
8693 if n_qualified
!= null then
8694 n_qualified
.parent
= self
8696 _n_kwsuper
= n_kwsuper
8697 if n_kwsuper
!= null then
8698 n_kwsuper
.parent
= self
8700 _n_args
= new List[PExpr]
8708 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8710 assert old_child
!= null
8711 if _n_qualified
== old_child
then
8712 if new_child
!= null then
8713 new_child
.parent
= self
8714 assert new_child
isa PQualified
8715 _n_qualified
= new_child
8721 if _n_kwsuper
== old_child
then
8722 if new_child
!= null then
8723 new_child
.parent
= self
8724 assert new_child
isa TKwsuper
8725 _n_kwsuper
= new_child
8731 for i
in [0.._n_args
.length
[ do
8732 if _n_args
[i
] == old_child
then
8733 if new_child
!= null then
8734 assert new_child
isa PExpr
8735 _n_args
[i
] = new_child
8736 new_child
.parent
= self
8738 _n_args
.remove_at
(i
)
8745 redef meth visit_all
(v
: Visitor)
8747 if _n_qualified
!= null then
8748 v
.visit
(_n_qualified
)
8750 if _n_kwsuper
!= null then
8758 redef meth visit_all_reverse
(v
: Visitor)
8760 if _n_qualified
!= null then
8761 v
.visit
(_n_qualified
)
8763 if _n_kwsuper
!= null then
8767 var i
= _n_args
.length
8775 redef class AInitExpr
8776 redef meth n_expr
=(n
: PExpr)
8783 redef meth n_kwinit
=(n
: TKwinit)
8791 private init empty_init
do end
8793 init init_ainitexpr
(
8796 n_args
: Array[Object] # Should be Array[PExpr]
8801 if n_expr
!= null then
8802 n_expr
.parent
= self
8804 _n_kwinit
= n_kwinit
8805 if n_kwinit
!= null then
8806 n_kwinit
.parent
= self
8808 _n_args
= new List[PExpr]
8816 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8818 assert old_child
!= null
8819 if _n_expr
== old_child
then
8820 if new_child
!= null then
8821 new_child
.parent
= self
8822 assert new_child
isa PExpr
8829 if _n_kwinit
== old_child
then
8830 if new_child
!= null then
8831 new_child
.parent
= self
8832 assert new_child
isa TKwinit
8833 _n_kwinit
= new_child
8839 for i
in [0.._n_args
.length
[ do
8840 if _n_args
[i
] == old_child
then
8841 if new_child
!= null then
8842 assert new_child
isa PExpr
8843 _n_args
[i
] = new_child
8844 new_child
.parent
= self
8846 _n_args
.remove_at
(i
)
8853 redef meth visit_all
(v
: Visitor)
8855 if _n_expr
!= null then
8858 if _n_kwinit
!= null then
8866 redef meth visit_all_reverse
(v
: Visitor)
8868 if _n_expr
!= null then
8871 if _n_kwinit
!= null then
8875 var i
= _n_args
.length
8883 redef class ABraExpr
8884 redef meth n_expr
=(n
: PExpr)
8892 private init empty_init
do end
8894 init init_abraexpr
(
8896 n_args
: Array[Object] , # Should be Array[PExpr]
8897 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8902 if n_expr
!= null then
8903 n_expr
.parent
= self
8905 _n_args
= new List[PExpr]
8911 _n_closure_defs
= new List[PClosureDef]
8912 for n
in n_closure_defs
do
8913 assert n
isa PClosureDef
8914 _n_closure_defs
.add
(n
)
8919 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8921 assert old_child
!= null
8922 if _n_expr
== old_child
then
8923 if new_child
!= null then
8924 new_child
.parent
= self
8925 assert new_child
isa PExpr
8932 for i
in [0.._n_args
.length
[ do
8933 if _n_args
[i
] == old_child
then
8934 if new_child
!= null then
8935 assert new_child
isa PExpr
8936 _n_args
[i
] = new_child
8937 new_child
.parent
= self
8939 _n_args
.remove_at
(i
)
8944 for i
in [0.._n_closure_defs
.length
[ do
8945 if _n_closure_defs
[i
] == old_child
then
8946 if new_child
!= null then
8947 assert new_child
isa PClosureDef
8948 _n_closure_defs
[i
] = new_child
8949 new_child
.parent
= self
8951 _n_closure_defs
.remove_at
(i
)
8958 redef meth visit_all
(v
: Visitor)
8960 if _n_expr
!= null then
8966 for n
in _n_closure_defs
do
8971 redef meth visit_all_reverse
(v
: Visitor)
8973 if _n_expr
!= null then
8977 var i
= _n_args
.length
8984 var i
= _n_closure_defs
.length
8986 v
.visit
(_n_closure_defs
[i
])
8992 redef class ABraAssignExpr
8993 redef meth n_expr
=(n
: PExpr)
9000 redef meth n_assign
=(n
: TAssign)
9007 redef meth n_value
=(n
: PExpr)
9015 private init empty_init
do end
9017 init init_abraassignexpr
(
9019 n_args
: Array[Object] , # Should be Array[PExpr]
9026 if n_expr
!= null then
9027 n_expr
.parent
= self
9029 _n_args
= new List[PExpr]
9035 _n_assign
= n_assign
9036 if n_assign
!= null then
9037 n_assign
.parent
= self
9040 if n_value
!= null then
9041 n_value
.parent
= self
9045 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9047 assert old_child
!= null
9048 if _n_expr
== old_child
then
9049 if new_child
!= null then
9050 new_child
.parent
= self
9051 assert new_child
isa PExpr
9058 for i
in [0.._n_args
.length
[ do
9059 if _n_args
[i
] == old_child
then
9060 if new_child
!= null then
9061 assert new_child
isa PExpr
9062 _n_args
[i
] = new_child
9063 new_child
.parent
= self
9065 _n_args
.remove_at
(i
)
9070 if _n_assign
== old_child
then
9071 if new_child
!= null then
9072 new_child
.parent
= self
9073 assert new_child
isa TAssign
9074 _n_assign
= new_child
9080 if _n_value
== old_child
then
9081 if new_child
!= null then
9082 new_child
.parent
= self
9083 assert new_child
isa PExpr
9084 _n_value
= new_child
9092 redef meth visit_all
(v
: Visitor)
9094 if _n_expr
!= null then
9100 if _n_assign
!= null then
9103 if _n_value
!= null then
9108 redef meth visit_all_reverse
(v
: Visitor)
9110 if _n_expr
!= null then
9114 var i
= _n_args
.length
9120 if _n_assign
!= null then
9123 if _n_value
!= null then
9128 redef class ABraReassignExpr
9129 redef meth n_expr
=(n
: PExpr)
9136 redef meth n_assign_op
=(n
: PAssignOp)
9143 redef meth n_value
=(n
: PExpr)
9151 private init empty_init
do end
9153 init init_abrareassignexpr
(
9155 n_args
: Array[Object] , # Should be Array[PExpr]
9156 n_assign_op
: PAssignOp ,
9162 if n_expr
!= null then
9163 n_expr
.parent
= self
9165 _n_args
= new List[PExpr]
9171 _n_assign_op
= n_assign_op
9172 if n_assign_op
!= null then
9173 n_assign_op
.parent
= self
9176 if n_value
!= null then
9177 n_value
.parent
= self
9181 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9183 assert old_child
!= null
9184 if _n_expr
== old_child
then
9185 if new_child
!= null then
9186 new_child
.parent
= self
9187 assert new_child
isa PExpr
9194 for i
in [0.._n_args
.length
[ do
9195 if _n_args
[i
] == old_child
then
9196 if new_child
!= null then
9197 assert new_child
isa PExpr
9198 _n_args
[i
] = new_child
9199 new_child
.parent
= self
9201 _n_args
.remove_at
(i
)
9206 if _n_assign_op
== old_child
then
9207 if new_child
!= null then
9208 new_child
.parent
= self
9209 assert new_child
isa PAssignOp
9210 _n_assign_op
= new_child
9216 if _n_value
== old_child
then
9217 if new_child
!= null then
9218 new_child
.parent
= self
9219 assert new_child
isa PExpr
9220 _n_value
= new_child
9228 redef meth visit_all
(v
: Visitor)
9230 if _n_expr
!= null then
9236 if _n_assign_op
!= null then
9237 v
.visit
(_n_assign_op
)
9239 if _n_value
!= null then
9244 redef meth visit_all_reverse
(v
: Visitor)
9246 if _n_expr
!= null then
9250 var i
= _n_args
.length
9256 if _n_assign_op
!= null then
9257 v
.visit
(_n_assign_op
)
9259 if _n_value
!= null then
9264 redef class AVarExpr
9265 redef meth n_id
=(n
: TId)
9273 private init empty_init
do end
9275 init init_avarexpr
(
9281 if n_id
!= null then
9286 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9288 assert old_child
!= null
9289 if _n_id
== old_child
then
9290 if new_child
!= null then
9291 new_child
.parent
= self
9292 assert new_child
isa TId
9301 redef meth visit_all
(v
: Visitor)
9303 if _n_id
!= null then
9308 redef meth visit_all_reverse
(v
: Visitor)
9310 if _n_id
!= null then
9315 redef class AVarAssignExpr
9316 redef meth n_id
=(n
: TId)
9323 redef meth n_assign
=(n
: TAssign)
9330 redef meth n_value
=(n
: PExpr)
9338 private init empty_init
do end
9340 init init_avarassignexpr
(
9348 if n_id
!= null then
9351 _n_assign
= n_assign
9352 if n_assign
!= null then
9353 n_assign
.parent
= self
9356 if n_value
!= null then
9357 n_value
.parent
= self
9361 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9363 assert old_child
!= null
9364 if _n_id
== old_child
then
9365 if new_child
!= null then
9366 new_child
.parent
= self
9367 assert new_child
isa TId
9374 if _n_assign
== old_child
then
9375 if new_child
!= null then
9376 new_child
.parent
= self
9377 assert new_child
isa TAssign
9378 _n_assign
= new_child
9384 if _n_value
== old_child
then
9385 if new_child
!= null then
9386 new_child
.parent
= self
9387 assert new_child
isa PExpr
9388 _n_value
= new_child
9396 redef meth visit_all
(v
: Visitor)
9398 if _n_id
!= null then
9401 if _n_assign
!= null then
9404 if _n_value
!= null then
9409 redef meth visit_all_reverse
(v
: Visitor)
9411 if _n_id
!= null then
9414 if _n_assign
!= null then
9417 if _n_value
!= null then
9422 redef class AVarReassignExpr
9423 redef meth n_id
=(n
: TId)
9430 redef meth n_assign_op
=(n
: PAssignOp)
9437 redef meth n_value
=(n
: PExpr)
9445 private init empty_init
do end
9447 init init_avarreassignexpr
(
9449 n_assign_op
: PAssignOp ,
9455 if n_id
!= null then
9458 _n_assign_op
= n_assign_op
9459 if n_assign_op
!= null then
9460 n_assign_op
.parent
= self
9463 if n_value
!= null then
9464 n_value
.parent
= self
9468 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9470 assert old_child
!= null
9471 if _n_id
== old_child
then
9472 if new_child
!= null then
9473 new_child
.parent
= self
9474 assert new_child
isa TId
9481 if _n_assign_op
== old_child
then
9482 if new_child
!= null then
9483 new_child
.parent
= self
9484 assert new_child
isa PAssignOp
9485 _n_assign_op
= new_child
9491 if _n_value
== old_child
then
9492 if new_child
!= null then
9493 new_child
.parent
= self
9494 assert new_child
isa PExpr
9495 _n_value
= new_child
9503 redef meth visit_all
(v
: Visitor)
9505 if _n_id
!= null then
9508 if _n_assign_op
!= null then
9509 v
.visit
(_n_assign_op
)
9511 if _n_value
!= null then
9516 redef meth visit_all_reverse
(v
: Visitor)
9518 if _n_id
!= null then
9521 if _n_assign_op
!= null then
9522 v
.visit
(_n_assign_op
)
9524 if _n_value
!= null then
9529 redef class ARangeExpr
9530 redef meth n_expr
=(n
: PExpr)
9537 redef meth n_expr2
=(n
: PExpr)
9545 private init empty_init
do end
9547 init init_arangeexpr
(
9554 if n_expr
!= null then
9555 n_expr
.parent
= self
9558 if n_expr2
!= null then
9559 n_expr2
.parent
= self
9563 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9565 assert old_child
!= null
9566 if _n_expr
== old_child
then
9567 if new_child
!= null then
9568 new_child
.parent
= self
9569 assert new_child
isa PExpr
9576 if _n_expr2
== old_child
then
9577 if new_child
!= null then
9578 new_child
.parent
= self
9579 assert new_child
isa PExpr
9580 _n_expr2
= new_child
9588 redef meth visit_all
(v
: Visitor)
9590 if _n_expr
!= null then
9593 if _n_expr2
!= null then
9598 redef meth visit_all_reverse
(v
: Visitor)
9600 if _n_expr
!= null then
9603 if _n_expr2
!= null then
9608 redef class ACrangeExpr
9609 redef meth n_expr
=(n
: PExpr)
9616 redef meth n_expr2
=(n
: PExpr)
9624 private init empty_init
do end
9626 init init_acrangeexpr
(
9633 if n_expr
!= null then
9634 n_expr
.parent
= self
9637 if n_expr2
!= null then
9638 n_expr2
.parent
= self
9642 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9644 assert old_child
!= null
9645 if _n_expr
== old_child
then
9646 if new_child
!= null then
9647 new_child
.parent
= self
9648 assert new_child
isa PExpr
9655 if _n_expr2
== old_child
then
9656 if new_child
!= null then
9657 new_child
.parent
= self
9658 assert new_child
isa PExpr
9659 _n_expr2
= new_child
9667 redef meth visit_all
(v
: Visitor)
9669 if _n_expr
!= null then
9672 if _n_expr2
!= null then
9677 redef meth visit_all_reverse
(v
: Visitor)
9679 if _n_expr
!= null then
9682 if _n_expr2
!= null then
9687 redef class AOrangeExpr
9688 redef meth n_expr
=(n
: PExpr)
9695 redef meth n_expr2
=(n
: PExpr)
9703 private init empty_init
do end
9705 init init_aorangeexpr
(
9712 if n_expr
!= null then
9713 n_expr
.parent
= self
9716 if n_expr2
!= null then
9717 n_expr2
.parent
= self
9721 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9723 assert old_child
!= null
9724 if _n_expr
== old_child
then
9725 if new_child
!= null then
9726 new_child
.parent
= self
9727 assert new_child
isa PExpr
9734 if _n_expr2
== old_child
then
9735 if new_child
!= null then
9736 new_child
.parent
= self
9737 assert new_child
isa PExpr
9738 _n_expr2
= new_child
9746 redef meth visit_all
(v
: Visitor)
9748 if _n_expr
!= null then
9751 if _n_expr2
!= null then
9756 redef meth visit_all_reverse
(v
: Visitor)
9758 if _n_expr
!= null then
9761 if _n_expr2
!= null then
9766 redef class AArrayExpr
9768 private init empty_init
do end
9770 init init_aarrayexpr
(
9771 n_exprs
: Array[Object] # Should be Array[PExpr]
9775 _n_exprs
= new List[PExpr]
9783 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9785 assert old_child
!= null
9786 for i
in [0.._n_exprs
.length
[ do
9787 if _n_exprs
[i
] == old_child
then
9788 if new_child
!= null then
9789 assert new_child
isa PExpr
9790 _n_exprs
[i
] = new_child
9791 new_child
.parent
= self
9793 _n_exprs
.remove_at
(i
)
9800 redef meth visit_all
(v
: Visitor)
9802 for n
in _n_exprs
do
9807 redef meth visit_all_reverse
(v
: Visitor)
9810 var i
= _n_exprs
.length
9812 v
.visit
(_n_exprs
[i
])
9818 redef class ASelfExpr
9819 redef meth n_kwself
=(n
: TKwself)
9827 private init empty_init
do end
9829 init init_aselfexpr
(
9834 _n_kwself
= n_kwself
9835 if n_kwself
!= null then
9836 n_kwself
.parent
= self
9840 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9842 assert old_child
!= null
9843 if _n_kwself
== old_child
then
9844 if new_child
!= null then
9845 new_child
.parent
= self
9846 assert new_child
isa TKwself
9847 _n_kwself
= new_child
9855 redef meth visit_all
(v
: Visitor)
9857 if _n_kwself
!= null then
9862 redef meth visit_all_reverse
(v
: Visitor)
9864 if _n_kwself
!= null then
9869 redef class AImplicitSelfExpr
9871 private init empty_init
do end
9873 init init_aimplicitselfexpr
9878 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9880 assert old_child
!= null
9883 redef meth visit_all
(v
: Visitor)
9887 redef meth visit_all_reverse
(v
: Visitor)
9891 redef class ATrueExpr
9892 redef meth n_kwtrue
=(n
: TKwtrue)
9900 private init empty_init
do end
9902 init init_atrueexpr
(
9907 _n_kwtrue
= n_kwtrue
9908 if n_kwtrue
!= null then
9909 n_kwtrue
.parent
= self
9913 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9915 assert old_child
!= null
9916 if _n_kwtrue
== old_child
then
9917 if new_child
!= null then
9918 new_child
.parent
= self
9919 assert new_child
isa TKwtrue
9920 _n_kwtrue
= new_child
9928 redef meth visit_all
(v
: Visitor)
9930 if _n_kwtrue
!= null then
9935 redef meth visit_all_reverse
(v
: Visitor)
9937 if _n_kwtrue
!= null then
9942 redef class AFalseExpr
9943 redef meth n_kwfalse
=(n
: TKwfalse)
9951 private init empty_init
do end
9953 init init_afalseexpr
(
9958 _n_kwfalse
= n_kwfalse
9959 if n_kwfalse
!= null then
9960 n_kwfalse
.parent
= self
9964 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9966 assert old_child
!= null
9967 if _n_kwfalse
== old_child
then
9968 if new_child
!= null then
9969 new_child
.parent
= self
9970 assert new_child
isa TKwfalse
9971 _n_kwfalse
= new_child
9979 redef meth visit_all
(v
: Visitor)
9981 if _n_kwfalse
!= null then
9986 redef meth visit_all_reverse
(v
: Visitor)
9988 if _n_kwfalse
!= null then
9993 redef class ANullExpr
9994 redef meth n_kwnull
=(n
: TKwnull)
10002 private init empty_init
do end
10004 init init_anullexpr
(
10009 _n_kwnull
= n_kwnull
10010 if n_kwnull
!= null then
10011 n_kwnull
.parent
= self
10015 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10017 assert old_child
!= null
10018 if _n_kwnull
== old_child
then
10019 if new_child
!= null then
10020 new_child
.parent
= self
10021 assert new_child
isa TKwnull
10022 _n_kwnull
= new_child
10030 redef meth visit_all
(v
: Visitor)
10032 if _n_kwnull
!= null then
10037 redef meth visit_all_reverse
(v
: Visitor)
10039 if _n_kwnull
!= null then
10044 redef class AIntExpr
10045 redef meth n_number
=(n
: TNumber)
10053 private init empty_init
do end
10055 init init_aintexpr
(
10060 _n_number
= n_number
10061 if n_number
!= null then
10062 n_number
.parent
= self
10066 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10068 assert old_child
!= null
10069 if _n_number
== old_child
then
10070 if new_child
!= null then
10071 new_child
.parent
= self
10072 assert new_child
isa TNumber
10073 _n_number
= new_child
10081 redef meth visit_all
(v
: Visitor)
10083 if _n_number
!= null then
10088 redef meth visit_all_reverse
(v
: Visitor)
10090 if _n_number
!= null then
10095 redef class AFloatExpr
10096 redef meth n_float
=(n
: TFloat)
10104 private init empty_init
do end
10106 init init_afloatexpr
(
10112 if n_float
!= null then
10113 n_float
.parent
= self
10117 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10119 assert old_child
!= null
10120 if _n_float
== old_child
then
10121 if new_child
!= null then
10122 new_child
.parent
= self
10123 assert new_child
isa TFloat
10124 _n_float
= new_child
10132 redef meth visit_all
(v
: Visitor)
10134 if _n_float
!= null then
10139 redef meth visit_all_reverse
(v
: Visitor)
10141 if _n_float
!= null then
10146 redef class ACharExpr
10147 redef meth n_char
=(n
: TChar)
10155 private init empty_init
do end
10157 init init_acharexpr
(
10163 if n_char
!= null then
10164 n_char
.parent
= self
10168 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10170 assert old_child
!= null
10171 if _n_char
== old_child
then
10172 if new_child
!= null then
10173 new_child
.parent
= self
10174 assert new_child
isa TChar
10175 _n_char
= new_child
10183 redef meth visit_all
(v
: Visitor)
10185 if _n_char
!= null then
10190 redef meth visit_all_reverse
(v
: Visitor)
10192 if _n_char
!= null then
10197 redef class AStringExpr
10198 redef meth n_string
=(n
: TString)
10206 private init empty_init
do end
10208 init init_astringexpr
(
10213 _n_string
= n_string
10214 if n_string
!= null then
10215 n_string
.parent
= self
10219 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10221 assert old_child
!= null
10222 if _n_string
== old_child
then
10223 if new_child
!= null then
10224 new_child
.parent
= self
10225 assert new_child
isa TString
10226 _n_string
= new_child
10234 redef meth visit_all
(v
: Visitor)
10236 if _n_string
!= null then
10241 redef meth visit_all_reverse
(v
: Visitor)
10243 if _n_string
!= null then
10248 redef class AStartStringExpr
10249 redef meth n_string
=(n
: TStartString)
10257 private init empty_init
do end
10259 init init_astartstringexpr
(
10260 n_string
: TStartString
10264 _n_string
= n_string
10265 if n_string
!= null then
10266 n_string
.parent
= self
10270 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10272 assert old_child
!= null
10273 if _n_string
== old_child
then
10274 if new_child
!= null then
10275 new_child
.parent
= self
10276 assert new_child
isa TStartString
10277 _n_string
= new_child
10285 redef meth visit_all
(v
: Visitor)
10287 if _n_string
!= null then
10292 redef meth visit_all_reverse
(v
: Visitor)
10294 if _n_string
!= null then
10299 redef class AMidStringExpr
10300 redef meth n_string
=(n
: TMidString)
10308 private init empty_init
do end
10310 init init_amidstringexpr
(
10311 n_string
: TMidString
10315 _n_string
= n_string
10316 if n_string
!= null then
10317 n_string
.parent
= self
10321 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10323 assert old_child
!= null
10324 if _n_string
== old_child
then
10325 if new_child
!= null then
10326 new_child
.parent
= self
10327 assert new_child
isa TMidString
10328 _n_string
= new_child
10336 redef meth visit_all
(v
: Visitor)
10338 if _n_string
!= null then
10343 redef meth visit_all_reverse
(v
: Visitor)
10345 if _n_string
!= null then
10350 redef class AEndStringExpr
10351 redef meth n_string
=(n
: TEndString)
10359 private init empty_init
do end
10361 init init_aendstringexpr
(
10362 n_string
: TEndString
10366 _n_string
= n_string
10367 if n_string
!= null then
10368 n_string
.parent
= self
10372 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10374 assert old_child
!= null
10375 if _n_string
== old_child
then
10376 if new_child
!= null then
10377 new_child
.parent
= self
10378 assert new_child
isa TEndString
10379 _n_string
= new_child
10387 redef meth visit_all
(v
: Visitor)
10389 if _n_string
!= null then
10394 redef meth visit_all_reverse
(v
: Visitor)
10396 if _n_string
!= null then
10401 redef class ASuperstringExpr
10403 private init empty_init
do end
10405 init init_asuperstringexpr
(
10406 n_exprs
: Array[Object] # Should be Array[PExpr]
10410 _n_exprs
= new List[PExpr]
10411 for n
in n_exprs
do
10418 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10420 assert old_child
!= null
10421 for i
in [0.._n_exprs
.length
[ do
10422 if _n_exprs
[i
] == old_child
then
10423 if new_child
!= null then
10424 assert new_child
isa PExpr
10425 _n_exprs
[i
] = new_child
10426 new_child
.parent
= self
10428 _n_exprs
.remove_at
(i
)
10435 redef meth visit_all
(v
: Visitor)
10437 for n
in _n_exprs
do
10442 redef meth visit_all_reverse
(v
: Visitor)
10445 var i
= _n_exprs
.length
10447 v
.visit
(_n_exprs
[i
])
10453 redef class AParExpr
10454 redef meth n_expr
=(n
: PExpr)
10462 private init empty_init
do end
10464 init init_aparexpr
(
10470 if n_expr
!= null then
10471 n_expr
.parent
= self
10475 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10477 assert old_child
!= null
10478 if _n_expr
== old_child
then
10479 if new_child
!= null then
10480 new_child
.parent
= self
10481 assert new_child
isa PExpr
10482 _n_expr
= new_child
10490 redef meth visit_all
(v
: Visitor)
10492 if _n_expr
!= null then
10497 redef meth visit_all_reverse
(v
: Visitor)
10499 if _n_expr
!= null then
10504 redef class AAsCastExpr
10505 redef meth n_expr
=(n
: PExpr)
10512 redef meth n_kwas
=(n
: TKwas)
10519 redef meth n_type
=(n
: PType)
10527 private init empty_init
do end
10529 init init_aascastexpr
(
10537 if n_expr
!= null then
10538 n_expr
.parent
= self
10541 if n_kwas
!= null then
10542 n_kwas
.parent
= self
10545 if n_type
!= null then
10546 n_type
.parent
= self
10550 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10552 assert old_child
!= null
10553 if _n_expr
== old_child
then
10554 if new_child
!= null then
10555 new_child
.parent
= self
10556 assert new_child
isa PExpr
10557 _n_expr
= new_child
10563 if _n_kwas
== old_child
then
10564 if new_child
!= null then
10565 new_child
.parent
= self
10566 assert new_child
isa TKwas
10567 _n_kwas
= new_child
10573 if _n_type
== old_child
then
10574 if new_child
!= null then
10575 new_child
.parent
= self
10576 assert new_child
isa PType
10577 _n_type
= new_child
10585 redef meth visit_all
(v
: Visitor)
10587 if _n_expr
!= null then
10590 if _n_kwas
!= null then
10593 if _n_type
!= null then
10598 redef meth visit_all_reverse
(v
: Visitor)
10600 if _n_expr
!= null then
10603 if _n_kwas
!= null then
10606 if _n_type
!= null then
10611 redef class APlusAssignOp
10612 redef meth n_pluseq
=(n
: TPluseq)
10620 private init empty_init
do end
10622 init init_aplusassignop
(
10627 _n_pluseq
= n_pluseq
10628 if n_pluseq
!= null then
10629 n_pluseq
.parent
= self
10633 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10635 assert old_child
!= null
10636 if _n_pluseq
== old_child
then
10637 if new_child
!= null then
10638 new_child
.parent
= self
10639 assert new_child
isa TPluseq
10640 _n_pluseq
= new_child
10648 redef meth visit_all
(v
: Visitor)
10650 if _n_pluseq
!= null then
10655 redef meth visit_all_reverse
(v
: Visitor)
10657 if _n_pluseq
!= null then
10662 redef class AMinusAssignOp
10663 redef meth n_minuseq
=(n
: TMinuseq)
10671 private init empty_init
do end
10673 init init_aminusassignop
(
10674 n_minuseq
: TMinuseq
10678 _n_minuseq
= n_minuseq
10679 if n_minuseq
!= null then
10680 n_minuseq
.parent
= self
10684 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10686 assert old_child
!= null
10687 if _n_minuseq
== old_child
then
10688 if new_child
!= null then
10689 new_child
.parent
= self
10690 assert new_child
isa TMinuseq
10691 _n_minuseq
= new_child
10699 redef meth visit_all
(v
: Visitor)
10701 if _n_minuseq
!= null then
10702 v
.visit
(_n_minuseq
)
10706 redef meth visit_all_reverse
(v
: Visitor)
10708 if _n_minuseq
!= null then
10709 v
.visit
(_n_minuseq
)
10713 redef class AClosureDef
10714 redef meth n_kwwith
=(n
: TKwwith)
10721 redef meth n_kwdo
=(n
: TKwdo)
10728 redef meth n_expr
=(n
: PExpr)
10736 private init empty_init
do end
10738 init init_aclosuredef
(
10739 n_kwwith
: TKwwith ,
10740 n_id
: Array[Object] , # Should be Array[TId]
10746 _n_kwwith
= n_kwwith
10747 if n_kwwith
!= null then
10748 n_kwwith
.parent
= self
10750 _n_id
= new List[TId]
10757 if n_kwdo
!= null then
10758 n_kwdo
.parent
= self
10761 if n_expr
!= null then
10762 n_expr
.parent
= self
10766 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10768 assert old_child
!= null
10769 if _n_kwwith
== old_child
then
10770 if new_child
!= null then
10771 new_child
.parent
= self
10772 assert new_child
isa TKwwith
10773 _n_kwwith
= new_child
10779 for i
in [0.._n_id
.length
[ do
10780 if _n_id
[i
] == old_child
then
10781 if new_child
!= null then
10782 assert new_child
isa TId
10783 _n_id
[i
] = new_child
10784 new_child
.parent
= self
10791 if _n_kwdo
== old_child
then
10792 if new_child
!= null then
10793 new_child
.parent
= self
10794 assert new_child
isa TKwdo
10795 _n_kwdo
= new_child
10801 if _n_expr
== old_child
then
10802 if new_child
!= null then
10803 new_child
.parent
= self
10804 assert new_child
isa PExpr
10805 _n_expr
= new_child
10813 redef meth visit_all
(v
: Visitor)
10815 if _n_kwwith
!= null then
10821 if _n_kwdo
!= null then
10824 if _n_expr
!= null then
10829 redef meth visit_all_reverse
(v
: Visitor)
10831 if _n_kwwith
!= null then
10835 var i
= _n_id
.length
10841 if _n_kwdo
!= null then
10844 if _n_expr
!= null then
10849 redef class AQualified
10850 redef meth n_classid
=(n
: TClassid)
10858 private init empty_init
do end
10860 init init_aqualified
(
10861 n_id
: Array[Object] , # Should be Array[TId]
10862 n_classid
: TClassid
10866 _n_id
= new List[TId]
10872 _n_classid
= n_classid
10873 if n_classid
!= null then
10874 n_classid
.parent
= self
10878 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10880 assert old_child
!= null
10881 for i
in [0.._n_id
.length
[ do
10882 if _n_id
[i
] == old_child
then
10883 if new_child
!= null then
10884 assert new_child
isa TId
10885 _n_id
[i
] = new_child
10886 new_child
.parent
= self
10893 if _n_classid
== old_child
then
10894 if new_child
!= null then
10895 new_child
.parent
= self
10896 assert new_child
isa TClassid
10897 _n_classid
= new_child
10905 redef meth visit_all
(v
: Visitor)
10910 if _n_classid
!= null then
10911 v
.visit
(_n_classid
)
10915 redef meth visit_all_reverse
(v
: Visitor)
10918 var i
= _n_id
.length
10924 if _n_classid
!= null then
10925 v
.visit
(_n_classid
)
10931 private init empty_init
do end
10934 n_comment
: Array[Object] # Should be Array[TComment]
10938 _n_comment
= new List[TComment]
10939 for n
in n_comment
do
10940 assert n
isa TComment
10946 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10948 assert old_child
!= null
10949 for i
in [0.._n_comment
.length
[ do
10950 if _n_comment
[i
] == old_child
then
10951 if new_child
!= null then
10952 assert new_child
isa TComment
10953 _n_comment
[i
] = new_child
10954 new_child
.parent
= self
10956 _n_comment
.remove_at
(i
)
10963 redef meth visit_all
(v
: Visitor)
10965 for n
in _n_comment
do
10970 redef meth visit_all_reverse
(v
: Visitor)
10973 var i
= _n_comment
.length
10975 v
.visit
(_n_comment
[i
])
10991 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10993 assert old_child
!= null
10994 if _n_base
== old_child
then
10995 if new_child
== null then
10997 new_child
.parent
= self
10998 assert new_child
isa PModule
10999 _n_base
= new_child
11001 old_child
.parent
= null
11006 redef meth visit_all
(v
: Visitor)
11008 if _n_base
!= null then
11013 redef meth visit_all_reverse
(v
: Visitor)
11015 if _n_base
!= null then