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)
4536 redef meth n_expr
=(n
: PExpr)
4544 private init empty_init
do end
4546 init init_aclosuredecl
(
4548 n_kwbreak
: TKwbreak ,
4550 n_signature
: PSignature ,
4555 _n_kwwith
= n_kwwith
4556 if n_kwwith
!= null then
4557 n_kwwith
.parent
= self
4559 _n_kwbreak
= n_kwbreak
4560 if n_kwbreak
!= null then
4561 n_kwbreak
.parent
= self
4564 if n_id
!= null then
4567 _n_signature
= n_signature
4568 if n_signature
!= null then
4569 n_signature
.parent
= self
4572 if n_expr
!= null then
4573 n_expr
.parent
= self
4577 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4579 assert old_child
!= null
4580 if _n_kwwith
== old_child
then
4581 if new_child
!= null then
4582 new_child
.parent
= self
4583 assert new_child
isa TKwwith
4584 _n_kwwith
= new_child
4590 if _n_kwbreak
== old_child
then
4591 if new_child
!= null then
4592 new_child
.parent
= self
4593 assert new_child
isa TKwbreak
4594 _n_kwbreak
= new_child
4600 if _n_id
== old_child
then
4601 if new_child
!= null then
4602 new_child
.parent
= self
4603 assert new_child
isa TId
4610 if _n_signature
== old_child
then
4611 if new_child
!= null then
4612 new_child
.parent
= self
4613 assert new_child
isa PSignature
4614 _n_signature
= new_child
4620 if _n_expr
== old_child
then
4621 if new_child
!= null then
4622 new_child
.parent
= self
4623 assert new_child
isa PExpr
4632 redef meth visit_all
(v
: Visitor)
4634 if _n_kwwith
!= null then
4637 if _n_kwbreak
!= null then
4640 if _n_id
!= null then
4643 if _n_signature
!= null then
4644 v
.visit
(_n_signature
)
4646 if _n_expr
!= null then
4651 redef meth visit_all_reverse
(v
: Visitor)
4653 if _n_kwwith
!= null then
4656 if _n_kwbreak
!= null then
4659 if _n_id
!= null then
4662 if _n_signature
!= null then
4663 v
.visit
(_n_signature
)
4665 if _n_expr
!= null then
4671 redef meth n_id
=(n
: TClassid)
4679 private init empty_init
do end
4683 n_types
: Array[Object] # Should be Array[PType]
4688 if n_id
!= null then
4691 _n_types
= new List[PType]
4699 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4701 assert old_child
!= null
4702 if _n_id
== old_child
then
4703 if new_child
!= null then
4704 new_child
.parent
= self
4705 assert new_child
isa TClassid
4712 for i
in [0.._n_types
.length
[ do
4713 if _n_types
[i
] == old_child
then
4714 if new_child
!= null then
4715 assert new_child
isa PType
4716 _n_types
[i
] = new_child
4717 new_child
.parent
= self
4719 _n_types
.remove_at
(i
)
4726 redef meth visit_all
(v
: Visitor)
4728 if _n_id
!= null then
4731 for n
in _n_types
do
4736 redef meth visit_all_reverse
(v
: Visitor)
4738 if _n_id
!= null then
4742 var i
= _n_types
.length
4744 v
.visit
(_n_types
[i
])
4750 redef class ABlockExpr
4752 private init empty_init
do end
4754 init init_ablockexpr
(
4755 n_expr
: Array[Object] # Should be Array[PExpr]
4759 _n_expr
= new List[PExpr]
4767 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4769 assert old_child
!= null
4770 for i
in [0.._n_expr
.length
[ do
4771 if _n_expr
[i
] == old_child
then
4772 if new_child
!= null then
4773 assert new_child
isa PExpr
4774 _n_expr
[i
] = new_child
4775 new_child
.parent
= self
4777 _n_expr
.remove_at
(i
)
4784 redef meth visit_all
(v
: Visitor)
4791 redef meth visit_all_reverse
(v
: Visitor)
4794 var i
= _n_expr
.length
4802 redef class AVardeclExpr
4803 redef meth n_kwvar
=(n
: TKwvar)
4810 redef meth n_id
=(n
: TId)
4817 redef meth n_type
=(n
: PType)
4824 redef meth n_assign
=(n
: TAssign)
4831 redef meth n_expr
=(n
: PExpr)
4839 private init empty_init
do end
4841 init init_avardeclexpr
(
4851 if n_kwvar
!= null then
4852 n_kwvar
.parent
= self
4855 if n_id
!= null then
4859 if n_type
!= null then
4860 n_type
.parent
= self
4862 _n_assign
= n_assign
4863 if n_assign
!= null then
4864 n_assign
.parent
= self
4867 if n_expr
!= null then
4868 n_expr
.parent
= self
4872 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4874 assert old_child
!= null
4875 if _n_kwvar
== old_child
then
4876 if new_child
!= null then
4877 new_child
.parent
= self
4878 assert new_child
isa TKwvar
4879 _n_kwvar
= new_child
4885 if _n_id
== old_child
then
4886 if new_child
!= null then
4887 new_child
.parent
= self
4888 assert new_child
isa TId
4895 if _n_type
== old_child
then
4896 if new_child
!= null then
4897 new_child
.parent
= self
4898 assert new_child
isa PType
4905 if _n_assign
== old_child
then
4906 if new_child
!= null then
4907 new_child
.parent
= self
4908 assert new_child
isa TAssign
4909 _n_assign
= new_child
4915 if _n_expr
== old_child
then
4916 if new_child
!= null then
4917 new_child
.parent
= self
4918 assert new_child
isa PExpr
4927 redef meth visit_all
(v
: Visitor)
4929 if _n_kwvar
!= null then
4932 if _n_id
!= null then
4935 if _n_type
!= null then
4938 if _n_assign
!= null then
4941 if _n_expr
!= null then
4946 redef meth visit_all_reverse
(v
: Visitor)
4948 if _n_kwvar
!= null then
4951 if _n_id
!= null then
4954 if _n_type
!= null then
4957 if _n_assign
!= null then
4960 if _n_expr
!= null then
4965 redef class AReturnExpr
4966 redef meth n_kwreturn
=(n
: TKwreturn)
4973 redef meth n_expr
=(n
: PExpr)
4981 private init empty_init
do end
4983 init init_areturnexpr
(
4984 n_kwreturn
: TKwreturn ,
4989 _n_kwreturn
= n_kwreturn
4990 if n_kwreturn
!= null then
4991 n_kwreturn
.parent
= self
4994 if n_expr
!= null then
4995 n_expr
.parent
= self
4999 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5001 assert old_child
!= null
5002 if _n_kwreturn
== old_child
then
5003 if new_child
!= null then
5004 new_child
.parent
= self
5005 assert new_child
isa TKwreturn
5006 _n_kwreturn
= new_child
5012 if _n_expr
== old_child
then
5013 if new_child
!= null then
5014 new_child
.parent
= self
5015 assert new_child
isa PExpr
5024 redef meth visit_all
(v
: Visitor)
5026 if _n_kwreturn
!= null then
5027 v
.visit
(_n_kwreturn
)
5029 if _n_expr
!= null then
5034 redef meth visit_all_reverse
(v
: Visitor)
5036 if _n_kwreturn
!= null then
5037 v
.visit
(_n_kwreturn
)
5039 if _n_expr
!= null then
5044 redef class ABreakExpr
5045 redef meth n_kwbreak
=(n
: TKwbreak)
5052 redef meth n_expr
=(n
: PExpr)
5060 private init empty_init
do end
5062 init init_abreakexpr
(
5063 n_kwbreak
: TKwbreak ,
5068 _n_kwbreak
= n_kwbreak
5069 if n_kwbreak
!= null then
5070 n_kwbreak
.parent
= self
5073 if n_expr
!= null then
5074 n_expr
.parent
= self
5078 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5080 assert old_child
!= null
5081 if _n_kwbreak
== old_child
then
5082 if new_child
!= null then
5083 new_child
.parent
= self
5084 assert new_child
isa TKwbreak
5085 _n_kwbreak
= new_child
5091 if _n_expr
== old_child
then
5092 if new_child
!= null then
5093 new_child
.parent
= self
5094 assert new_child
isa PExpr
5103 redef meth visit_all
(v
: Visitor)
5105 if _n_kwbreak
!= null then
5108 if _n_expr
!= null then
5113 redef meth visit_all_reverse
(v
: Visitor)
5115 if _n_kwbreak
!= null then
5118 if _n_expr
!= null then
5123 redef class AAbortExpr
5124 redef meth n_kwabort
=(n
: TKwabort)
5132 private init empty_init
do end
5134 init init_aabortexpr
(
5139 _n_kwabort
= n_kwabort
5140 if n_kwabort
!= null then
5141 n_kwabort
.parent
= self
5145 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5147 assert old_child
!= null
5148 if _n_kwabort
== old_child
then
5149 if new_child
!= null then
5150 new_child
.parent
= self
5151 assert new_child
isa TKwabort
5152 _n_kwabort
= new_child
5160 redef meth visit_all
(v
: Visitor)
5162 if _n_kwabort
!= null then
5167 redef meth visit_all_reverse
(v
: Visitor)
5169 if _n_kwabort
!= null then
5174 redef class AContinueExpr
5175 redef meth n_kwcontinue
=(n
: TKwcontinue)
5182 redef meth n_expr
=(n
: PExpr)
5190 private init empty_init
do end
5192 init init_acontinueexpr
(
5193 n_kwcontinue
: TKwcontinue ,
5198 _n_kwcontinue
= n_kwcontinue
5199 if n_kwcontinue
!= null then
5200 n_kwcontinue
.parent
= self
5203 if n_expr
!= null then
5204 n_expr
.parent
= self
5208 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5210 assert old_child
!= null
5211 if _n_kwcontinue
== old_child
then
5212 if new_child
!= null then
5213 new_child
.parent
= self
5214 assert new_child
isa TKwcontinue
5215 _n_kwcontinue
= new_child
5217 _n_kwcontinue
= null
5221 if _n_expr
== old_child
then
5222 if new_child
!= null then
5223 new_child
.parent
= self
5224 assert new_child
isa PExpr
5233 redef meth visit_all
(v
: Visitor)
5235 if _n_kwcontinue
!= null then
5236 v
.visit
(_n_kwcontinue
)
5238 if _n_expr
!= null then
5243 redef meth visit_all_reverse
(v
: Visitor)
5245 if _n_kwcontinue
!= null then
5246 v
.visit
(_n_kwcontinue
)
5248 if _n_expr
!= null then
5254 redef meth n_kwdo
=(n
: TKwdo)
5261 redef meth n_block
=(n
: PExpr)
5269 private init empty_init
do end
5278 if n_kwdo
!= null then
5279 n_kwdo
.parent
= self
5282 if n_block
!= null then
5283 n_block
.parent
= self
5287 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5289 assert old_child
!= null
5290 if _n_kwdo
== old_child
then
5291 if new_child
!= null then
5292 new_child
.parent
= self
5293 assert new_child
isa TKwdo
5300 if _n_block
== old_child
then
5301 if new_child
!= null then
5302 new_child
.parent
= self
5303 assert new_child
isa PExpr
5304 _n_block
= new_child
5312 redef meth visit_all
(v
: Visitor)
5314 if _n_kwdo
!= null then
5317 if _n_block
!= null then
5322 redef meth visit_all_reverse
(v
: Visitor)
5324 if _n_kwdo
!= null then
5327 if _n_block
!= null then
5333 redef meth n_kwif
=(n
: TKwif)
5340 redef meth n_expr
=(n
: PExpr)
5347 redef meth n_then
=(n
: PExpr)
5354 redef meth n_else
=(n
: PExpr)
5362 private init empty_init
do end
5373 if n_kwif
!= null then
5374 n_kwif
.parent
= self
5377 if n_expr
!= null then
5378 n_expr
.parent
= self
5381 if n_then
!= null then
5382 n_then
.parent
= self
5385 if n_else
!= null then
5386 n_else
.parent
= self
5390 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5392 assert old_child
!= null
5393 if _n_kwif
== old_child
then
5394 if new_child
!= null then
5395 new_child
.parent
= self
5396 assert new_child
isa TKwif
5403 if _n_expr
== old_child
then
5404 if new_child
!= null then
5405 new_child
.parent
= self
5406 assert new_child
isa PExpr
5413 if _n_then
== old_child
then
5414 if new_child
!= null then
5415 new_child
.parent
= self
5416 assert new_child
isa PExpr
5423 if _n_else
== old_child
then
5424 if new_child
!= null then
5425 new_child
.parent
= self
5426 assert new_child
isa PExpr
5435 redef meth visit_all
(v
: Visitor)
5437 if _n_kwif
!= null then
5440 if _n_expr
!= null then
5443 if _n_then
!= null then
5446 if _n_else
!= null then
5451 redef meth visit_all_reverse
(v
: Visitor)
5453 if _n_kwif
!= null then
5456 if _n_expr
!= null then
5459 if _n_then
!= null then
5462 if _n_else
!= null then
5467 redef class AIfexprExpr
5468 redef meth n_kwif
=(n
: TKwif)
5475 redef meth n_expr
=(n
: PExpr)
5482 redef meth n_kwthen
=(n
: TKwthen)
5489 redef meth n_then
=(n
: PExpr)
5496 redef meth n_kwelse
=(n
: TKwelse)
5503 redef meth n_else
=(n
: PExpr)
5511 private init empty_init
do end
5513 init init_aifexprexpr
(
5524 if n_kwif
!= null then
5525 n_kwif
.parent
= self
5528 if n_expr
!= null then
5529 n_expr
.parent
= self
5531 _n_kwthen
= n_kwthen
5532 if n_kwthen
!= null then
5533 n_kwthen
.parent
= self
5536 if n_then
!= null then
5537 n_then
.parent
= self
5539 _n_kwelse
= n_kwelse
5540 if n_kwelse
!= null then
5541 n_kwelse
.parent
= self
5544 if n_else
!= null then
5545 n_else
.parent
= self
5549 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5551 assert old_child
!= null
5552 if _n_kwif
== old_child
then
5553 if new_child
!= null then
5554 new_child
.parent
= self
5555 assert new_child
isa TKwif
5562 if _n_expr
== old_child
then
5563 if new_child
!= null then
5564 new_child
.parent
= self
5565 assert new_child
isa PExpr
5572 if _n_kwthen
== old_child
then
5573 if new_child
!= null then
5574 new_child
.parent
= self
5575 assert new_child
isa TKwthen
5576 _n_kwthen
= new_child
5582 if _n_then
== old_child
then
5583 if new_child
!= null then
5584 new_child
.parent
= self
5585 assert new_child
isa PExpr
5592 if _n_kwelse
== old_child
then
5593 if new_child
!= null then
5594 new_child
.parent
= self
5595 assert new_child
isa TKwelse
5596 _n_kwelse
= new_child
5602 if _n_else
== old_child
then
5603 if new_child
!= null then
5604 new_child
.parent
= self
5605 assert new_child
isa PExpr
5614 redef meth visit_all
(v
: Visitor)
5616 if _n_kwif
!= null then
5619 if _n_expr
!= null then
5622 if _n_kwthen
!= null then
5625 if _n_then
!= null then
5628 if _n_kwelse
!= null then
5631 if _n_else
!= null then
5636 redef meth visit_all_reverse
(v
: Visitor)
5638 if _n_kwif
!= null then
5641 if _n_expr
!= null then
5644 if _n_kwthen
!= null then
5647 if _n_then
!= null then
5650 if _n_kwelse
!= null then
5653 if _n_else
!= null then
5658 redef class AWhileExpr
5659 redef meth n_kwwhile
=(n
: TKwwhile)
5666 redef meth n_expr
=(n
: PExpr)
5673 redef meth n_kwdo
=(n
: TKwdo)
5680 redef meth n_block
=(n
: PExpr)
5688 private init empty_init
do end
5690 init init_awhileexpr
(
5691 n_kwwhile
: TKwwhile ,
5698 _n_kwwhile
= n_kwwhile
5699 if n_kwwhile
!= null then
5700 n_kwwhile
.parent
= self
5703 if n_expr
!= null then
5704 n_expr
.parent
= self
5707 if n_kwdo
!= null then
5708 n_kwdo
.parent
= self
5711 if n_block
!= null then
5712 n_block
.parent
= self
5716 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5718 assert old_child
!= null
5719 if _n_kwwhile
== old_child
then
5720 if new_child
!= null then
5721 new_child
.parent
= self
5722 assert new_child
isa TKwwhile
5723 _n_kwwhile
= new_child
5729 if _n_expr
== old_child
then
5730 if new_child
!= null then
5731 new_child
.parent
= self
5732 assert new_child
isa PExpr
5739 if _n_kwdo
== old_child
then
5740 if new_child
!= null then
5741 new_child
.parent
= self
5742 assert new_child
isa TKwdo
5749 if _n_block
== old_child
then
5750 if new_child
!= null then
5751 new_child
.parent
= self
5752 assert new_child
isa PExpr
5753 _n_block
= new_child
5761 redef meth visit_all
(v
: Visitor)
5763 if _n_kwwhile
!= null then
5766 if _n_expr
!= null then
5769 if _n_kwdo
!= null then
5772 if _n_block
!= null then
5777 redef meth visit_all_reverse
(v
: Visitor)
5779 if _n_kwwhile
!= null then
5782 if _n_expr
!= null then
5785 if _n_kwdo
!= null then
5788 if _n_block
!= null then
5793 redef class AForExpr
5794 redef meth n_kwfor
=(n
: TKwfor)
5801 redef meth n_id
=(n
: TId)
5808 redef meth n_expr
=(n
: PExpr)
5815 redef meth n_kwdo
=(n
: TKwdo)
5822 redef meth n_block
=(n
: PExpr)
5830 private init empty_init
do end
5832 init init_aforexpr
(
5842 if n_kwfor
!= null then
5843 n_kwfor
.parent
= self
5846 if n_id
!= null then
5850 if n_expr
!= null then
5851 n_expr
.parent
= self
5854 if n_kwdo
!= null then
5855 n_kwdo
.parent
= self
5858 if n_block
!= null then
5859 n_block
.parent
= self
5863 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5865 assert old_child
!= null
5866 if _n_kwfor
== old_child
then
5867 if new_child
!= null then
5868 new_child
.parent
= self
5869 assert new_child
isa TKwfor
5870 _n_kwfor
= new_child
5876 if _n_id
== old_child
then
5877 if new_child
!= null then
5878 new_child
.parent
= self
5879 assert new_child
isa TId
5886 if _n_expr
== old_child
then
5887 if new_child
!= null then
5888 new_child
.parent
= self
5889 assert new_child
isa PExpr
5896 if _n_kwdo
== old_child
then
5897 if new_child
!= null then
5898 new_child
.parent
= self
5899 assert new_child
isa TKwdo
5906 if _n_block
== old_child
then
5907 if new_child
!= null then
5908 new_child
.parent
= self
5909 assert new_child
isa PExpr
5910 _n_block
= new_child
5918 redef meth visit_all
(v
: Visitor)
5920 if _n_kwfor
!= null then
5923 if _n_id
!= null then
5926 if _n_expr
!= null then
5929 if _n_kwdo
!= null then
5932 if _n_block
!= null then
5937 redef meth visit_all_reverse
(v
: Visitor)
5939 if _n_kwfor
!= null then
5942 if _n_id
!= null then
5945 if _n_expr
!= null then
5948 if _n_kwdo
!= null then
5951 if _n_block
!= null then
5956 redef class AAssertExpr
5957 redef meth n_kwassert
=(n
: TKwassert)
5964 redef meth n_id
=(n
: TId)
5971 redef meth n_expr
=(n
: PExpr)
5979 private init empty_init
do end
5981 init init_aassertexpr
(
5982 n_kwassert
: TKwassert ,
5988 _n_kwassert
= n_kwassert
5989 if n_kwassert
!= null then
5990 n_kwassert
.parent
= self
5993 if n_id
!= null then
5997 if n_expr
!= null then
5998 n_expr
.parent
= self
6002 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6004 assert old_child
!= null
6005 if _n_kwassert
== old_child
then
6006 if new_child
!= null then
6007 new_child
.parent
= self
6008 assert new_child
isa TKwassert
6009 _n_kwassert
= new_child
6015 if _n_id
== old_child
then
6016 if new_child
!= null then
6017 new_child
.parent
= self
6018 assert new_child
isa TId
6025 if _n_expr
== old_child
then
6026 if new_child
!= null then
6027 new_child
.parent
= self
6028 assert new_child
isa PExpr
6037 redef meth visit_all
(v
: Visitor)
6039 if _n_kwassert
!= null then
6040 v
.visit
(_n_kwassert
)
6042 if _n_id
!= null then
6045 if _n_expr
!= null then
6050 redef meth visit_all_reverse
(v
: Visitor)
6052 if _n_kwassert
!= null then
6053 v
.visit
(_n_kwassert
)
6055 if _n_id
!= null then
6058 if _n_expr
!= null then
6063 redef class AOnceExpr
6064 redef meth n_kwonce
=(n
: TKwonce)
6071 redef meth n_expr
=(n
: PExpr)
6079 private init empty_init
do end
6081 init init_aonceexpr
(
6087 _n_kwonce
= n_kwonce
6088 if n_kwonce
!= null then
6089 n_kwonce
.parent
= self
6092 if n_expr
!= null then
6093 n_expr
.parent
= self
6097 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6099 assert old_child
!= null
6100 if _n_kwonce
== old_child
then
6101 if new_child
!= null then
6102 new_child
.parent
= self
6103 assert new_child
isa TKwonce
6104 _n_kwonce
= new_child
6110 if _n_expr
== old_child
then
6111 if new_child
!= null then
6112 new_child
.parent
= self
6113 assert new_child
isa PExpr
6122 redef meth visit_all
(v
: Visitor)
6124 if _n_kwonce
!= null then
6127 if _n_expr
!= null then
6132 redef meth visit_all_reverse
(v
: Visitor)
6134 if _n_kwonce
!= null then
6137 if _n_expr
!= null then
6142 redef class ASendExpr
6143 redef meth n_expr
=(n
: PExpr)
6151 private init empty_init
do end
6153 init init_asendexpr
(
6159 if n_expr
!= null then
6160 n_expr
.parent
= self
6164 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6166 assert old_child
!= null
6167 if _n_expr
== old_child
then
6168 if new_child
!= null then
6169 new_child
.parent
= self
6170 assert new_child
isa PExpr
6179 redef meth visit_all
(v
: Visitor)
6181 if _n_expr
!= null then
6186 redef meth visit_all_reverse
(v
: Visitor)
6188 if _n_expr
!= null then
6193 redef class ABinopExpr
6194 redef meth n_expr
=(n
: PExpr)
6201 redef meth n_expr2
=(n
: PExpr)
6209 private init empty_init
do end
6211 init init_abinopexpr
(
6218 if n_expr
!= null then
6219 n_expr
.parent
= self
6222 if n_expr2
!= null then
6223 n_expr2
.parent
= self
6227 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6229 assert old_child
!= null
6230 if _n_expr
== old_child
then
6231 if new_child
!= null then
6232 new_child
.parent
= self
6233 assert new_child
isa PExpr
6240 if _n_expr2
== old_child
then
6241 if new_child
!= null then
6242 new_child
.parent
= self
6243 assert new_child
isa PExpr
6244 _n_expr2
= new_child
6252 redef meth visit_all
(v
: Visitor)
6254 if _n_expr
!= null then
6257 if _n_expr2
!= null then
6262 redef meth visit_all_reverse
(v
: Visitor)
6264 if _n_expr
!= null then
6267 if _n_expr2
!= null then
6273 redef meth n_expr
=(n
: PExpr)
6280 redef meth n_expr2
=(n
: PExpr)
6288 private init empty_init
do end
6297 if n_expr
!= null then
6298 n_expr
.parent
= self
6301 if n_expr2
!= null then
6302 n_expr2
.parent
= self
6306 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6308 assert old_child
!= null
6309 if _n_expr
== old_child
then
6310 if new_child
!= null then
6311 new_child
.parent
= self
6312 assert new_child
isa PExpr
6319 if _n_expr2
== old_child
then
6320 if new_child
!= null then
6321 new_child
.parent
= self
6322 assert new_child
isa PExpr
6323 _n_expr2
= new_child
6331 redef meth visit_all
(v
: Visitor)
6333 if _n_expr
!= null then
6336 if _n_expr2
!= null then
6341 redef meth visit_all_reverse
(v
: Visitor)
6343 if _n_expr
!= null then
6346 if _n_expr2
!= null then
6351 redef class AAndExpr
6352 redef meth n_expr
=(n
: PExpr)
6359 redef meth n_expr2
=(n
: PExpr)
6367 private init empty_init
do end
6369 init init_aandexpr
(
6376 if n_expr
!= null then
6377 n_expr
.parent
= self
6380 if n_expr2
!= null then
6381 n_expr2
.parent
= self
6385 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6387 assert old_child
!= null
6388 if _n_expr
== old_child
then
6389 if new_child
!= null then
6390 new_child
.parent
= self
6391 assert new_child
isa PExpr
6398 if _n_expr2
== old_child
then
6399 if new_child
!= null then
6400 new_child
.parent
= self
6401 assert new_child
isa PExpr
6402 _n_expr2
= new_child
6410 redef meth visit_all
(v
: Visitor)
6412 if _n_expr
!= null then
6415 if _n_expr2
!= null then
6420 redef meth visit_all_reverse
(v
: Visitor)
6422 if _n_expr
!= null then
6425 if _n_expr2
!= null then
6430 redef class ANotExpr
6431 redef meth n_kwnot
=(n
: TKwnot)
6438 redef meth n_expr
=(n
: PExpr)
6446 private init empty_init
do end
6448 init init_anotexpr
(
6455 if n_kwnot
!= null then
6456 n_kwnot
.parent
= self
6459 if n_expr
!= null then
6460 n_expr
.parent
= self
6464 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6466 assert old_child
!= null
6467 if _n_kwnot
== old_child
then
6468 if new_child
!= null then
6469 new_child
.parent
= self
6470 assert new_child
isa TKwnot
6471 _n_kwnot
= new_child
6477 if _n_expr
== old_child
then
6478 if new_child
!= null then
6479 new_child
.parent
= self
6480 assert new_child
isa PExpr
6489 redef meth visit_all
(v
: Visitor)
6491 if _n_kwnot
!= null then
6494 if _n_expr
!= null then
6499 redef meth visit_all_reverse
(v
: Visitor)
6501 if _n_kwnot
!= null then
6504 if _n_expr
!= null then
6510 redef meth n_expr
=(n
: PExpr)
6517 redef meth n_expr2
=(n
: PExpr)
6525 private init empty_init
do end
6534 if n_expr
!= null then
6535 n_expr
.parent
= self
6538 if n_expr2
!= null then
6539 n_expr2
.parent
= self
6543 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6545 assert old_child
!= null
6546 if _n_expr
== old_child
then
6547 if new_child
!= null then
6548 new_child
.parent
= self
6549 assert new_child
isa PExpr
6556 if _n_expr2
== old_child
then
6557 if new_child
!= null then
6558 new_child
.parent
= self
6559 assert new_child
isa PExpr
6560 _n_expr2
= new_child
6568 redef meth visit_all
(v
: Visitor)
6570 if _n_expr
!= null then
6573 if _n_expr2
!= null then
6578 redef meth visit_all_reverse
(v
: Visitor)
6580 if _n_expr
!= null then
6583 if _n_expr2
!= null then
6589 redef meth n_expr
=(n
: PExpr)
6596 redef meth n_expr2
=(n
: PExpr)
6604 private init empty_init
do end
6613 if n_expr
!= null then
6614 n_expr
.parent
= self
6617 if n_expr2
!= null then
6618 n_expr2
.parent
= self
6622 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6624 assert old_child
!= null
6625 if _n_expr
== old_child
then
6626 if new_child
!= null then
6627 new_child
.parent
= self
6628 assert new_child
isa PExpr
6635 if _n_expr2
== old_child
then
6636 if new_child
!= null then
6637 new_child
.parent
= self
6638 assert new_child
isa PExpr
6639 _n_expr2
= new_child
6647 redef meth visit_all
(v
: Visitor)
6649 if _n_expr
!= null then
6652 if _n_expr2
!= null then
6657 redef meth visit_all_reverse
(v
: Visitor)
6659 if _n_expr
!= null then
6662 if _n_expr2
!= null then
6668 redef meth n_expr
=(n
: PExpr)
6675 redef meth n_expr2
=(n
: PExpr)
6683 private init empty_init
do end
6692 if n_expr
!= null then
6693 n_expr
.parent
= self
6696 if n_expr2
!= null then
6697 n_expr2
.parent
= self
6701 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6703 assert old_child
!= null
6704 if _n_expr
== old_child
then
6705 if new_child
!= null then
6706 new_child
.parent
= self
6707 assert new_child
isa PExpr
6714 if _n_expr2
== old_child
then
6715 if new_child
!= null then
6716 new_child
.parent
= self
6717 assert new_child
isa PExpr
6718 _n_expr2
= new_child
6726 redef meth visit_all
(v
: Visitor)
6728 if _n_expr
!= null then
6731 if _n_expr2
!= null then
6736 redef meth visit_all_reverse
(v
: Visitor)
6738 if _n_expr
!= null then
6741 if _n_expr2
!= null then
6747 redef meth n_expr
=(n
: PExpr)
6754 redef meth n_expr2
=(n
: PExpr)
6762 private init empty_init
do end
6771 if n_expr
!= null then
6772 n_expr
.parent
= self
6775 if n_expr2
!= null then
6776 n_expr2
.parent
= self
6780 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6782 assert old_child
!= null
6783 if _n_expr
== old_child
then
6784 if new_child
!= null then
6785 new_child
.parent
= self
6786 assert new_child
isa PExpr
6793 if _n_expr2
== old_child
then
6794 if new_child
!= null then
6795 new_child
.parent
= self
6796 assert new_child
isa PExpr
6797 _n_expr2
= new_child
6805 redef meth visit_all
(v
: Visitor)
6807 if _n_expr
!= null then
6810 if _n_expr2
!= null then
6815 redef meth visit_all_reverse
(v
: Visitor)
6817 if _n_expr
!= null then
6820 if _n_expr2
!= null then
6826 redef meth n_expr
=(n
: PExpr)
6833 redef meth n_expr2
=(n
: PExpr)
6841 private init empty_init
do end
6850 if n_expr
!= null then
6851 n_expr
.parent
= self
6854 if n_expr2
!= null then
6855 n_expr2
.parent
= self
6859 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6861 assert old_child
!= null
6862 if _n_expr
== old_child
then
6863 if new_child
!= null then
6864 new_child
.parent
= self
6865 assert new_child
isa PExpr
6872 if _n_expr2
== old_child
then
6873 if new_child
!= null then
6874 new_child
.parent
= self
6875 assert new_child
isa PExpr
6876 _n_expr2
= new_child
6884 redef meth visit_all
(v
: Visitor)
6886 if _n_expr
!= null then
6889 if _n_expr2
!= null then
6894 redef meth visit_all_reverse
(v
: Visitor)
6896 if _n_expr
!= null then
6899 if _n_expr2
!= null then
6905 redef meth n_expr
=(n
: PExpr)
6912 redef meth n_expr2
=(n
: PExpr)
6920 private init empty_init
do end
6929 if n_expr
!= null then
6930 n_expr
.parent
= self
6933 if n_expr2
!= null then
6934 n_expr2
.parent
= self
6938 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6940 assert old_child
!= null
6941 if _n_expr
== old_child
then
6942 if new_child
!= null then
6943 new_child
.parent
= self
6944 assert new_child
isa PExpr
6951 if _n_expr2
== old_child
then
6952 if new_child
!= null then
6953 new_child
.parent
= self
6954 assert new_child
isa PExpr
6955 _n_expr2
= new_child
6963 redef meth visit_all
(v
: Visitor)
6965 if _n_expr
!= null then
6968 if _n_expr2
!= null then
6973 redef meth visit_all_reverse
(v
: Visitor)
6975 if _n_expr
!= null then
6978 if _n_expr2
!= null then
6984 redef meth n_expr
=(n
: PExpr)
6991 redef meth n_expr2
=(n
: PExpr)
6999 private init empty_init
do end
7008 if n_expr
!= null then
7009 n_expr
.parent
= self
7012 if n_expr2
!= null then
7013 n_expr2
.parent
= self
7017 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7019 assert old_child
!= null
7020 if _n_expr
== old_child
then
7021 if new_child
!= null then
7022 new_child
.parent
= self
7023 assert new_child
isa PExpr
7030 if _n_expr2
== old_child
then
7031 if new_child
!= null then
7032 new_child
.parent
= self
7033 assert new_child
isa PExpr
7034 _n_expr2
= new_child
7042 redef meth visit_all
(v
: Visitor)
7044 if _n_expr
!= null then
7047 if _n_expr2
!= null then
7052 redef meth visit_all_reverse
(v
: Visitor)
7054 if _n_expr
!= null then
7057 if _n_expr2
!= null then
7062 redef class AIsaExpr
7063 redef meth n_expr
=(n
: PExpr)
7070 redef meth n_type
=(n
: PType)
7078 private init empty_init
do end
7080 init init_aisaexpr
(
7087 if n_expr
!= null then
7088 n_expr
.parent
= self
7091 if n_type
!= null then
7092 n_type
.parent
= self
7096 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7098 assert old_child
!= null
7099 if _n_expr
== old_child
then
7100 if new_child
!= null then
7101 new_child
.parent
= self
7102 assert new_child
isa PExpr
7109 if _n_type
== old_child
then
7110 if new_child
!= null then
7111 new_child
.parent
= self
7112 assert new_child
isa PType
7121 redef meth visit_all
(v
: Visitor)
7123 if _n_expr
!= null then
7126 if _n_type
!= null then
7131 redef meth visit_all_reverse
(v
: Visitor)
7133 if _n_expr
!= null then
7136 if _n_type
!= null then
7141 redef class APlusExpr
7142 redef meth n_expr
=(n
: PExpr)
7149 redef meth n_expr2
=(n
: PExpr)
7157 private init empty_init
do end
7159 init init_aplusexpr
(
7166 if n_expr
!= null then
7167 n_expr
.parent
= self
7170 if n_expr2
!= null then
7171 n_expr2
.parent
= self
7175 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7177 assert old_child
!= null
7178 if _n_expr
== old_child
then
7179 if new_child
!= null then
7180 new_child
.parent
= self
7181 assert new_child
isa PExpr
7188 if _n_expr2
== old_child
then
7189 if new_child
!= null then
7190 new_child
.parent
= self
7191 assert new_child
isa PExpr
7192 _n_expr2
= new_child
7200 redef meth visit_all
(v
: Visitor)
7202 if _n_expr
!= null then
7205 if _n_expr2
!= null then
7210 redef meth visit_all_reverse
(v
: Visitor)
7212 if _n_expr
!= null then
7215 if _n_expr2
!= null then
7220 redef class AMinusExpr
7221 redef meth n_expr
=(n
: PExpr)
7228 redef meth n_expr2
=(n
: PExpr)
7236 private init empty_init
do end
7238 init init_aminusexpr
(
7245 if n_expr
!= null then
7246 n_expr
.parent
= self
7249 if n_expr2
!= null then
7250 n_expr2
.parent
= self
7254 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7256 assert old_child
!= null
7257 if _n_expr
== old_child
then
7258 if new_child
!= null then
7259 new_child
.parent
= self
7260 assert new_child
isa PExpr
7267 if _n_expr2
== old_child
then
7268 if new_child
!= null then
7269 new_child
.parent
= self
7270 assert new_child
isa PExpr
7271 _n_expr2
= new_child
7279 redef meth visit_all
(v
: Visitor)
7281 if _n_expr
!= null then
7284 if _n_expr2
!= null then
7289 redef meth visit_all_reverse
(v
: Visitor)
7291 if _n_expr
!= null then
7294 if _n_expr2
!= null then
7299 redef class AStarshipExpr
7300 redef meth n_expr
=(n
: PExpr)
7307 redef meth n_expr2
=(n
: PExpr)
7315 private init empty_init
do end
7317 init init_astarshipexpr
(
7324 if n_expr
!= null then
7325 n_expr
.parent
= self
7328 if n_expr2
!= null then
7329 n_expr2
.parent
= self
7333 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7335 assert old_child
!= null
7336 if _n_expr
== old_child
then
7337 if new_child
!= null then
7338 new_child
.parent
= self
7339 assert new_child
isa PExpr
7346 if _n_expr2
== old_child
then
7347 if new_child
!= null then
7348 new_child
.parent
= self
7349 assert new_child
isa PExpr
7350 _n_expr2
= new_child
7358 redef meth visit_all
(v
: Visitor)
7360 if _n_expr
!= null then
7363 if _n_expr2
!= null then
7368 redef meth visit_all_reverse
(v
: Visitor)
7370 if _n_expr
!= null then
7373 if _n_expr2
!= null then
7378 redef class AStarExpr
7379 redef meth n_expr
=(n
: PExpr)
7386 redef meth n_expr2
=(n
: PExpr)
7394 private init empty_init
do end
7396 init init_astarexpr
(
7403 if n_expr
!= null then
7404 n_expr
.parent
= self
7407 if n_expr2
!= null then
7408 n_expr2
.parent
= self
7412 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7414 assert old_child
!= null
7415 if _n_expr
== old_child
then
7416 if new_child
!= null then
7417 new_child
.parent
= self
7418 assert new_child
isa PExpr
7425 if _n_expr2
== old_child
then
7426 if new_child
!= null then
7427 new_child
.parent
= self
7428 assert new_child
isa PExpr
7429 _n_expr2
= new_child
7437 redef meth visit_all
(v
: Visitor)
7439 if _n_expr
!= null then
7442 if _n_expr2
!= null then
7447 redef meth visit_all_reverse
(v
: Visitor)
7449 if _n_expr
!= null then
7452 if _n_expr2
!= null then
7457 redef class ASlashExpr
7458 redef meth n_expr
=(n
: PExpr)
7465 redef meth n_expr2
=(n
: PExpr)
7473 private init empty_init
do end
7475 init init_aslashexpr
(
7482 if n_expr
!= null then
7483 n_expr
.parent
= self
7486 if n_expr2
!= null then
7487 n_expr2
.parent
= self
7491 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7493 assert old_child
!= null
7494 if _n_expr
== old_child
then
7495 if new_child
!= null then
7496 new_child
.parent
= self
7497 assert new_child
isa PExpr
7504 if _n_expr2
== old_child
then
7505 if new_child
!= null then
7506 new_child
.parent
= self
7507 assert new_child
isa PExpr
7508 _n_expr2
= new_child
7516 redef meth visit_all
(v
: Visitor)
7518 if _n_expr
!= null then
7521 if _n_expr2
!= null then
7526 redef meth visit_all_reverse
(v
: Visitor)
7528 if _n_expr
!= null then
7531 if _n_expr2
!= null then
7536 redef class APercentExpr
7537 redef meth n_expr
=(n
: PExpr)
7544 redef meth n_expr2
=(n
: PExpr)
7552 private init empty_init
do end
7554 init init_apercentexpr
(
7561 if n_expr
!= null then
7562 n_expr
.parent
= self
7565 if n_expr2
!= null then
7566 n_expr2
.parent
= self
7570 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7572 assert old_child
!= null
7573 if _n_expr
== old_child
then
7574 if new_child
!= null then
7575 new_child
.parent
= self
7576 assert new_child
isa PExpr
7583 if _n_expr2
== old_child
then
7584 if new_child
!= null then
7585 new_child
.parent
= self
7586 assert new_child
isa PExpr
7587 _n_expr2
= new_child
7595 redef meth visit_all
(v
: Visitor)
7597 if _n_expr
!= null then
7600 if _n_expr2
!= null then
7605 redef meth visit_all_reverse
(v
: Visitor)
7607 if _n_expr
!= null then
7610 if _n_expr2
!= null then
7615 redef class AUminusExpr
7616 redef meth n_minus
=(n
: TMinus)
7623 redef meth n_expr
=(n
: PExpr)
7631 private init empty_init
do end
7633 init init_auminusexpr
(
7640 if n_minus
!= null then
7641 n_minus
.parent
= self
7644 if n_expr
!= null then
7645 n_expr
.parent
= self
7649 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7651 assert old_child
!= null
7652 if _n_minus
== old_child
then
7653 if new_child
!= null then
7654 new_child
.parent
= self
7655 assert new_child
isa TMinus
7656 _n_minus
= new_child
7662 if _n_expr
== old_child
then
7663 if new_child
!= null then
7664 new_child
.parent
= self
7665 assert new_child
isa PExpr
7674 redef meth visit_all
(v
: Visitor)
7676 if _n_minus
!= null then
7679 if _n_expr
!= null then
7684 redef meth visit_all_reverse
(v
: Visitor)
7686 if _n_minus
!= null then
7689 if _n_expr
!= null then
7694 redef class ANewExpr
7695 redef meth n_kwnew
=(n
: TKwnew)
7702 redef meth n_type
=(n
: PType)
7709 redef meth n_id
=(n
: TId)
7717 private init empty_init
do end
7719 init init_anewexpr
(
7723 n_args
: Array[Object] # Should be Array[PExpr]
7728 if n_kwnew
!= null then
7729 n_kwnew
.parent
= self
7732 if n_type
!= null then
7733 n_type
.parent
= self
7736 if n_id
!= null then
7739 _n_args
= new List[PExpr]
7747 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7749 assert old_child
!= null
7750 if _n_kwnew
== old_child
then
7751 if new_child
!= null then
7752 new_child
.parent
= self
7753 assert new_child
isa TKwnew
7754 _n_kwnew
= new_child
7760 if _n_type
== old_child
then
7761 if new_child
!= null then
7762 new_child
.parent
= self
7763 assert new_child
isa PType
7770 if _n_id
== old_child
then
7771 if new_child
!= null then
7772 new_child
.parent
= self
7773 assert new_child
isa TId
7780 for i
in [0.._n_args
.length
[ do
7781 if _n_args
[i
] == old_child
then
7782 if new_child
!= null then
7783 assert new_child
isa PExpr
7784 _n_args
[i
] = new_child
7785 new_child
.parent
= self
7787 _n_args
.remove_at
(i
)
7794 redef meth visit_all
(v
: Visitor)
7796 if _n_kwnew
!= null then
7799 if _n_type
!= null then
7802 if _n_id
!= null then
7810 redef meth visit_all_reverse
(v
: Visitor)
7812 if _n_kwnew
!= null then
7815 if _n_type
!= null then
7818 if _n_id
!= null then
7822 var i
= _n_args
.length
7830 redef class AAttrExpr
7831 redef meth n_expr
=(n
: PExpr)
7838 redef meth n_id
=(n
: TAttrid)
7846 private init empty_init
do end
7848 init init_aattrexpr
(
7855 if n_expr
!= null then
7856 n_expr
.parent
= self
7859 if n_id
!= null then
7864 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7866 assert old_child
!= null
7867 if _n_expr
== old_child
then
7868 if new_child
!= null then
7869 new_child
.parent
= self
7870 assert new_child
isa PExpr
7877 if _n_id
== old_child
then
7878 if new_child
!= null then
7879 new_child
.parent
= self
7880 assert new_child
isa TAttrid
7889 redef meth visit_all
(v
: Visitor)
7891 if _n_expr
!= null then
7894 if _n_id
!= null then
7899 redef meth visit_all_reverse
(v
: Visitor)
7901 if _n_expr
!= null then
7904 if _n_id
!= null then
7909 redef class AAttrAssignExpr
7910 redef meth n_expr
=(n
: PExpr)
7917 redef meth n_id
=(n
: TAttrid)
7924 redef meth n_assign
=(n
: TAssign)
7931 redef meth n_value
=(n
: PExpr)
7939 private init empty_init
do end
7941 init init_aattrassignexpr
(
7950 if n_expr
!= null then
7951 n_expr
.parent
= self
7954 if n_id
!= null then
7957 _n_assign
= n_assign
7958 if n_assign
!= null then
7959 n_assign
.parent
= self
7962 if n_value
!= null then
7963 n_value
.parent
= self
7967 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7969 assert old_child
!= null
7970 if _n_expr
== old_child
then
7971 if new_child
!= null then
7972 new_child
.parent
= self
7973 assert new_child
isa PExpr
7980 if _n_id
== old_child
then
7981 if new_child
!= null then
7982 new_child
.parent
= self
7983 assert new_child
isa TAttrid
7990 if _n_assign
== old_child
then
7991 if new_child
!= null then
7992 new_child
.parent
= self
7993 assert new_child
isa TAssign
7994 _n_assign
= new_child
8000 if _n_value
== old_child
then
8001 if new_child
!= null then
8002 new_child
.parent
= self
8003 assert new_child
isa PExpr
8004 _n_value
= new_child
8012 redef meth visit_all
(v
: Visitor)
8014 if _n_expr
!= null then
8017 if _n_id
!= null then
8020 if _n_assign
!= null then
8023 if _n_value
!= null then
8028 redef meth visit_all_reverse
(v
: Visitor)
8030 if _n_expr
!= null then
8033 if _n_id
!= null then
8036 if _n_assign
!= null then
8039 if _n_value
!= null then
8044 redef class AAttrReassignExpr
8045 redef meth n_expr
=(n
: PExpr)
8052 redef meth n_id
=(n
: TAttrid)
8059 redef meth n_assign_op
=(n
: PAssignOp)
8066 redef meth n_value
=(n
: PExpr)
8074 private init empty_init
do end
8076 init init_aattrreassignexpr
(
8079 n_assign_op
: PAssignOp ,
8085 if n_expr
!= null then
8086 n_expr
.parent
= self
8089 if n_id
!= null then
8092 _n_assign_op
= n_assign_op
8093 if n_assign_op
!= null then
8094 n_assign_op
.parent
= self
8097 if n_value
!= null then
8098 n_value
.parent
= self
8102 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8104 assert old_child
!= null
8105 if _n_expr
== old_child
then
8106 if new_child
!= null then
8107 new_child
.parent
= self
8108 assert new_child
isa PExpr
8115 if _n_id
== old_child
then
8116 if new_child
!= null then
8117 new_child
.parent
= self
8118 assert new_child
isa TAttrid
8125 if _n_assign_op
== old_child
then
8126 if new_child
!= null then
8127 new_child
.parent
= self
8128 assert new_child
isa PAssignOp
8129 _n_assign_op
= new_child
8135 if _n_value
== old_child
then
8136 if new_child
!= null then
8137 new_child
.parent
= self
8138 assert new_child
isa PExpr
8139 _n_value
= new_child
8147 redef meth visit_all
(v
: Visitor)
8149 if _n_expr
!= null then
8152 if _n_id
!= null then
8155 if _n_assign_op
!= null then
8156 v
.visit
(_n_assign_op
)
8158 if _n_value
!= null then
8163 redef meth visit_all_reverse
(v
: Visitor)
8165 if _n_expr
!= null then
8168 if _n_id
!= null then
8171 if _n_assign_op
!= null then
8172 v
.visit
(_n_assign_op
)
8174 if _n_value
!= null then
8179 redef class ACallExpr
8180 redef meth n_expr
=(n
: PExpr)
8187 redef meth n_id
=(n
: TId)
8195 private init empty_init
do end
8197 init init_acallexpr
(
8200 n_args
: Array[Object] , # Should be Array[PExpr]
8201 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8206 if n_expr
!= null then
8207 n_expr
.parent
= self
8210 if n_id
!= null then
8213 _n_args
= new List[PExpr]
8219 _n_closure_defs
= new List[PClosureDef]
8220 for n
in n_closure_defs
do
8221 assert n
isa PClosureDef
8222 _n_closure_defs
.add
(n
)
8227 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8229 assert old_child
!= null
8230 if _n_expr
== old_child
then
8231 if new_child
!= null then
8232 new_child
.parent
= self
8233 assert new_child
isa PExpr
8240 if _n_id
== old_child
then
8241 if new_child
!= null then
8242 new_child
.parent
= self
8243 assert new_child
isa TId
8250 for i
in [0.._n_args
.length
[ do
8251 if _n_args
[i
] == old_child
then
8252 if new_child
!= null then
8253 assert new_child
isa PExpr
8254 _n_args
[i
] = new_child
8255 new_child
.parent
= self
8257 _n_args
.remove_at
(i
)
8262 for i
in [0.._n_closure_defs
.length
[ do
8263 if _n_closure_defs
[i
] == old_child
then
8264 if new_child
!= null then
8265 assert new_child
isa PClosureDef
8266 _n_closure_defs
[i
] = new_child
8267 new_child
.parent
= self
8269 _n_closure_defs
.remove_at
(i
)
8276 redef meth visit_all
(v
: Visitor)
8278 if _n_expr
!= null then
8281 if _n_id
!= null then
8287 for n
in _n_closure_defs
do
8292 redef meth visit_all_reverse
(v
: Visitor)
8294 if _n_expr
!= null then
8297 if _n_id
!= null then
8301 var i
= _n_args
.length
8308 var i
= _n_closure_defs
.length
8310 v
.visit
(_n_closure_defs
[i
])
8316 redef class ACallAssignExpr
8317 redef meth n_expr
=(n
: PExpr)
8324 redef meth n_id
=(n
: TId)
8331 redef meth n_assign
=(n
: TAssign)
8338 redef meth n_value
=(n
: PExpr)
8346 private init empty_init
do end
8348 init init_acallassignexpr
(
8351 n_args
: Array[Object] , # Should be Array[PExpr]
8358 if n_expr
!= null then
8359 n_expr
.parent
= self
8362 if n_id
!= null then
8365 _n_args
= new List[PExpr]
8371 _n_assign
= n_assign
8372 if n_assign
!= null then
8373 n_assign
.parent
= self
8376 if n_value
!= null then
8377 n_value
.parent
= self
8381 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8383 assert old_child
!= null
8384 if _n_expr
== old_child
then
8385 if new_child
!= null then
8386 new_child
.parent
= self
8387 assert new_child
isa PExpr
8394 if _n_id
== old_child
then
8395 if new_child
!= null then
8396 new_child
.parent
= self
8397 assert new_child
isa TId
8404 for i
in [0.._n_args
.length
[ do
8405 if _n_args
[i
] == old_child
then
8406 if new_child
!= null then
8407 assert new_child
isa PExpr
8408 _n_args
[i
] = new_child
8409 new_child
.parent
= self
8411 _n_args
.remove_at
(i
)
8416 if _n_assign
== old_child
then
8417 if new_child
!= null then
8418 new_child
.parent
= self
8419 assert new_child
isa TAssign
8420 _n_assign
= new_child
8426 if _n_value
== old_child
then
8427 if new_child
!= null then
8428 new_child
.parent
= self
8429 assert new_child
isa PExpr
8430 _n_value
= new_child
8438 redef meth visit_all
(v
: Visitor)
8440 if _n_expr
!= null then
8443 if _n_id
!= null then
8449 if _n_assign
!= null then
8452 if _n_value
!= null then
8457 redef meth visit_all_reverse
(v
: Visitor)
8459 if _n_expr
!= null then
8462 if _n_id
!= null then
8466 var i
= _n_args
.length
8472 if _n_assign
!= null then
8475 if _n_value
!= null then
8480 redef class ACallReassignExpr
8481 redef meth n_expr
=(n
: PExpr)
8488 redef meth n_id
=(n
: TId)
8495 redef meth n_assign_op
=(n
: PAssignOp)
8502 redef meth n_value
=(n
: PExpr)
8510 private init empty_init
do end
8512 init init_acallreassignexpr
(
8515 n_args
: Array[Object] , # Should be Array[PExpr]
8516 n_assign_op
: PAssignOp ,
8522 if n_expr
!= null then
8523 n_expr
.parent
= self
8526 if n_id
!= null then
8529 _n_args
= new List[PExpr]
8535 _n_assign_op
= n_assign_op
8536 if n_assign_op
!= null then
8537 n_assign_op
.parent
= self
8540 if n_value
!= null then
8541 n_value
.parent
= self
8545 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8547 assert old_child
!= null
8548 if _n_expr
== old_child
then
8549 if new_child
!= null then
8550 new_child
.parent
= self
8551 assert new_child
isa PExpr
8558 if _n_id
== old_child
then
8559 if new_child
!= null then
8560 new_child
.parent
= self
8561 assert new_child
isa TId
8568 for i
in [0.._n_args
.length
[ do
8569 if _n_args
[i
] == old_child
then
8570 if new_child
!= null then
8571 assert new_child
isa PExpr
8572 _n_args
[i
] = new_child
8573 new_child
.parent
= self
8575 _n_args
.remove_at
(i
)
8580 if _n_assign_op
== old_child
then
8581 if new_child
!= null then
8582 new_child
.parent
= self
8583 assert new_child
isa PAssignOp
8584 _n_assign_op
= new_child
8590 if _n_value
== old_child
then
8591 if new_child
!= null then
8592 new_child
.parent
= self
8593 assert new_child
isa PExpr
8594 _n_value
= new_child
8602 redef meth visit_all
(v
: Visitor)
8604 if _n_expr
!= null then
8607 if _n_id
!= null then
8613 if _n_assign_op
!= null then
8614 v
.visit
(_n_assign_op
)
8616 if _n_value
!= null then
8621 redef meth visit_all_reverse
(v
: Visitor)
8623 if _n_expr
!= null then
8626 if _n_id
!= null then
8630 var i
= _n_args
.length
8636 if _n_assign_op
!= null then
8637 v
.visit
(_n_assign_op
)
8639 if _n_value
!= null then
8644 redef class ASuperExpr
8645 redef meth n_qualified
=(n
: PQualified)
8652 redef meth n_kwsuper
=(n
: TKwsuper)
8660 private init empty_init
do end
8662 init init_asuperexpr
(
8663 n_qualified
: PQualified ,
8664 n_kwsuper
: TKwsuper ,
8665 n_args
: Array[Object] # Should be Array[PExpr]
8669 _n_qualified
= n_qualified
8670 if n_qualified
!= null then
8671 n_qualified
.parent
= self
8673 _n_kwsuper
= n_kwsuper
8674 if n_kwsuper
!= null then
8675 n_kwsuper
.parent
= self
8677 _n_args
= new List[PExpr]
8685 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8687 assert old_child
!= null
8688 if _n_qualified
== old_child
then
8689 if new_child
!= null then
8690 new_child
.parent
= self
8691 assert new_child
isa PQualified
8692 _n_qualified
= new_child
8698 if _n_kwsuper
== old_child
then
8699 if new_child
!= null then
8700 new_child
.parent
= self
8701 assert new_child
isa TKwsuper
8702 _n_kwsuper
= new_child
8708 for i
in [0.._n_args
.length
[ do
8709 if _n_args
[i
] == old_child
then
8710 if new_child
!= null then
8711 assert new_child
isa PExpr
8712 _n_args
[i
] = new_child
8713 new_child
.parent
= self
8715 _n_args
.remove_at
(i
)
8722 redef meth visit_all
(v
: Visitor)
8724 if _n_qualified
!= null then
8725 v
.visit
(_n_qualified
)
8727 if _n_kwsuper
!= null then
8735 redef meth visit_all_reverse
(v
: Visitor)
8737 if _n_qualified
!= null then
8738 v
.visit
(_n_qualified
)
8740 if _n_kwsuper
!= null then
8744 var i
= _n_args
.length
8752 redef class AInitExpr
8753 redef meth n_expr
=(n
: PExpr)
8760 redef meth n_kwinit
=(n
: TKwinit)
8768 private init empty_init
do end
8770 init init_ainitexpr
(
8773 n_args
: Array[Object] # Should be Array[PExpr]
8778 if n_expr
!= null then
8779 n_expr
.parent
= self
8781 _n_kwinit
= n_kwinit
8782 if n_kwinit
!= null then
8783 n_kwinit
.parent
= self
8785 _n_args
= new List[PExpr]
8793 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8795 assert old_child
!= null
8796 if _n_expr
== old_child
then
8797 if new_child
!= null then
8798 new_child
.parent
= self
8799 assert new_child
isa PExpr
8806 if _n_kwinit
== old_child
then
8807 if new_child
!= null then
8808 new_child
.parent
= self
8809 assert new_child
isa TKwinit
8810 _n_kwinit
= new_child
8816 for i
in [0.._n_args
.length
[ do
8817 if _n_args
[i
] == old_child
then
8818 if new_child
!= null then
8819 assert new_child
isa PExpr
8820 _n_args
[i
] = new_child
8821 new_child
.parent
= self
8823 _n_args
.remove_at
(i
)
8830 redef meth visit_all
(v
: Visitor)
8832 if _n_expr
!= null then
8835 if _n_kwinit
!= null then
8843 redef meth visit_all_reverse
(v
: Visitor)
8845 if _n_expr
!= null then
8848 if _n_kwinit
!= null then
8852 var i
= _n_args
.length
8860 redef class ABraExpr
8861 redef meth n_expr
=(n
: PExpr)
8869 private init empty_init
do end
8871 init init_abraexpr
(
8873 n_args
: Array[Object] , # Should be Array[PExpr]
8874 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8879 if n_expr
!= null then
8880 n_expr
.parent
= self
8882 _n_args
= new List[PExpr]
8888 _n_closure_defs
= new List[PClosureDef]
8889 for n
in n_closure_defs
do
8890 assert n
isa PClosureDef
8891 _n_closure_defs
.add
(n
)
8896 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8898 assert old_child
!= null
8899 if _n_expr
== old_child
then
8900 if new_child
!= null then
8901 new_child
.parent
= self
8902 assert new_child
isa PExpr
8909 for i
in [0.._n_args
.length
[ do
8910 if _n_args
[i
] == old_child
then
8911 if new_child
!= null then
8912 assert new_child
isa PExpr
8913 _n_args
[i
] = new_child
8914 new_child
.parent
= self
8916 _n_args
.remove_at
(i
)
8921 for i
in [0.._n_closure_defs
.length
[ do
8922 if _n_closure_defs
[i
] == old_child
then
8923 if new_child
!= null then
8924 assert new_child
isa PClosureDef
8925 _n_closure_defs
[i
] = new_child
8926 new_child
.parent
= self
8928 _n_closure_defs
.remove_at
(i
)
8935 redef meth visit_all
(v
: Visitor)
8937 if _n_expr
!= null then
8943 for n
in _n_closure_defs
do
8948 redef meth visit_all_reverse
(v
: Visitor)
8950 if _n_expr
!= null then
8954 var i
= _n_args
.length
8961 var i
= _n_closure_defs
.length
8963 v
.visit
(_n_closure_defs
[i
])
8969 redef class ABraAssignExpr
8970 redef meth n_expr
=(n
: PExpr)
8977 redef meth n_assign
=(n
: TAssign)
8984 redef meth n_value
=(n
: PExpr)
8992 private init empty_init
do end
8994 init init_abraassignexpr
(
8996 n_args
: Array[Object] , # Should be Array[PExpr]
9003 if n_expr
!= null then
9004 n_expr
.parent
= self
9006 _n_args
= new List[PExpr]
9012 _n_assign
= n_assign
9013 if n_assign
!= null then
9014 n_assign
.parent
= self
9017 if n_value
!= null then
9018 n_value
.parent
= self
9022 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9024 assert old_child
!= null
9025 if _n_expr
== old_child
then
9026 if new_child
!= null then
9027 new_child
.parent
= self
9028 assert new_child
isa PExpr
9035 for i
in [0.._n_args
.length
[ do
9036 if _n_args
[i
] == old_child
then
9037 if new_child
!= null then
9038 assert new_child
isa PExpr
9039 _n_args
[i
] = new_child
9040 new_child
.parent
= self
9042 _n_args
.remove_at
(i
)
9047 if _n_assign
== old_child
then
9048 if new_child
!= null then
9049 new_child
.parent
= self
9050 assert new_child
isa TAssign
9051 _n_assign
= new_child
9057 if _n_value
== old_child
then
9058 if new_child
!= null then
9059 new_child
.parent
= self
9060 assert new_child
isa PExpr
9061 _n_value
= new_child
9069 redef meth visit_all
(v
: Visitor)
9071 if _n_expr
!= null then
9077 if _n_assign
!= null then
9080 if _n_value
!= null then
9085 redef meth visit_all_reverse
(v
: Visitor)
9087 if _n_expr
!= null then
9091 var i
= _n_args
.length
9097 if _n_assign
!= null then
9100 if _n_value
!= null then
9105 redef class ABraReassignExpr
9106 redef meth n_expr
=(n
: PExpr)
9113 redef meth n_assign_op
=(n
: PAssignOp)
9120 redef meth n_value
=(n
: PExpr)
9128 private init empty_init
do end
9130 init init_abrareassignexpr
(
9132 n_args
: Array[Object] , # Should be Array[PExpr]
9133 n_assign_op
: PAssignOp ,
9139 if n_expr
!= null then
9140 n_expr
.parent
= self
9142 _n_args
= new List[PExpr]
9148 _n_assign_op
= n_assign_op
9149 if n_assign_op
!= null then
9150 n_assign_op
.parent
= self
9153 if n_value
!= null then
9154 n_value
.parent
= self
9158 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9160 assert old_child
!= null
9161 if _n_expr
== old_child
then
9162 if new_child
!= null then
9163 new_child
.parent
= self
9164 assert new_child
isa PExpr
9171 for i
in [0.._n_args
.length
[ do
9172 if _n_args
[i
] == old_child
then
9173 if new_child
!= null then
9174 assert new_child
isa PExpr
9175 _n_args
[i
] = new_child
9176 new_child
.parent
= self
9178 _n_args
.remove_at
(i
)
9183 if _n_assign_op
== old_child
then
9184 if new_child
!= null then
9185 new_child
.parent
= self
9186 assert new_child
isa PAssignOp
9187 _n_assign_op
= new_child
9193 if _n_value
== old_child
then
9194 if new_child
!= null then
9195 new_child
.parent
= self
9196 assert new_child
isa PExpr
9197 _n_value
= new_child
9205 redef meth visit_all
(v
: Visitor)
9207 if _n_expr
!= null then
9213 if _n_assign_op
!= null then
9214 v
.visit
(_n_assign_op
)
9216 if _n_value
!= null then
9221 redef meth visit_all_reverse
(v
: Visitor)
9223 if _n_expr
!= null then
9227 var i
= _n_args
.length
9233 if _n_assign_op
!= null then
9234 v
.visit
(_n_assign_op
)
9236 if _n_value
!= null then
9241 redef class AVarExpr
9242 redef meth n_id
=(n
: TId)
9250 private init empty_init
do end
9252 init init_avarexpr
(
9258 if n_id
!= null then
9263 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9265 assert old_child
!= null
9266 if _n_id
== old_child
then
9267 if new_child
!= null then
9268 new_child
.parent
= self
9269 assert new_child
isa TId
9278 redef meth visit_all
(v
: Visitor)
9280 if _n_id
!= null then
9285 redef meth visit_all_reverse
(v
: Visitor)
9287 if _n_id
!= null then
9292 redef class AVarAssignExpr
9293 redef meth n_id
=(n
: TId)
9300 redef meth n_assign
=(n
: TAssign)
9307 redef meth n_value
=(n
: PExpr)
9315 private init empty_init
do end
9317 init init_avarassignexpr
(
9325 if n_id
!= null then
9328 _n_assign
= n_assign
9329 if n_assign
!= null then
9330 n_assign
.parent
= self
9333 if n_value
!= null then
9334 n_value
.parent
= self
9338 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9340 assert old_child
!= null
9341 if _n_id
== old_child
then
9342 if new_child
!= null then
9343 new_child
.parent
= self
9344 assert new_child
isa TId
9351 if _n_assign
== old_child
then
9352 if new_child
!= null then
9353 new_child
.parent
= self
9354 assert new_child
isa TAssign
9355 _n_assign
= new_child
9361 if _n_value
== old_child
then
9362 if new_child
!= null then
9363 new_child
.parent
= self
9364 assert new_child
isa PExpr
9365 _n_value
= new_child
9373 redef meth visit_all
(v
: Visitor)
9375 if _n_id
!= null then
9378 if _n_assign
!= null then
9381 if _n_value
!= null then
9386 redef meth visit_all_reverse
(v
: Visitor)
9388 if _n_id
!= null then
9391 if _n_assign
!= null then
9394 if _n_value
!= null then
9399 redef class AVarReassignExpr
9400 redef meth n_id
=(n
: TId)
9407 redef meth n_assign_op
=(n
: PAssignOp)
9414 redef meth n_value
=(n
: PExpr)
9422 private init empty_init
do end
9424 init init_avarreassignexpr
(
9426 n_assign_op
: PAssignOp ,
9432 if n_id
!= null then
9435 _n_assign_op
= n_assign_op
9436 if n_assign_op
!= null then
9437 n_assign_op
.parent
= self
9440 if n_value
!= null then
9441 n_value
.parent
= self
9445 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9447 assert old_child
!= null
9448 if _n_id
== old_child
then
9449 if new_child
!= null then
9450 new_child
.parent
= self
9451 assert new_child
isa TId
9458 if _n_assign_op
== old_child
then
9459 if new_child
!= null then
9460 new_child
.parent
= self
9461 assert new_child
isa PAssignOp
9462 _n_assign_op
= new_child
9468 if _n_value
== old_child
then
9469 if new_child
!= null then
9470 new_child
.parent
= self
9471 assert new_child
isa PExpr
9472 _n_value
= new_child
9480 redef meth visit_all
(v
: Visitor)
9482 if _n_id
!= null then
9485 if _n_assign_op
!= null then
9486 v
.visit
(_n_assign_op
)
9488 if _n_value
!= null then
9493 redef meth visit_all_reverse
(v
: Visitor)
9495 if _n_id
!= null then
9498 if _n_assign_op
!= null then
9499 v
.visit
(_n_assign_op
)
9501 if _n_value
!= null then
9506 redef class ARangeExpr
9507 redef meth n_expr
=(n
: PExpr)
9514 redef meth n_expr2
=(n
: PExpr)
9522 private init empty_init
do end
9524 init init_arangeexpr
(
9531 if n_expr
!= null then
9532 n_expr
.parent
= self
9535 if n_expr2
!= null then
9536 n_expr2
.parent
= self
9540 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9542 assert old_child
!= null
9543 if _n_expr
== old_child
then
9544 if new_child
!= null then
9545 new_child
.parent
= self
9546 assert new_child
isa PExpr
9553 if _n_expr2
== old_child
then
9554 if new_child
!= null then
9555 new_child
.parent
= self
9556 assert new_child
isa PExpr
9557 _n_expr2
= new_child
9565 redef meth visit_all
(v
: Visitor)
9567 if _n_expr
!= null then
9570 if _n_expr2
!= null then
9575 redef meth visit_all_reverse
(v
: Visitor)
9577 if _n_expr
!= null then
9580 if _n_expr2
!= null then
9585 redef class ACrangeExpr
9586 redef meth n_expr
=(n
: PExpr)
9593 redef meth n_expr2
=(n
: PExpr)
9601 private init empty_init
do end
9603 init init_acrangeexpr
(
9610 if n_expr
!= null then
9611 n_expr
.parent
= self
9614 if n_expr2
!= null then
9615 n_expr2
.parent
= self
9619 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9621 assert old_child
!= null
9622 if _n_expr
== old_child
then
9623 if new_child
!= null then
9624 new_child
.parent
= self
9625 assert new_child
isa PExpr
9632 if _n_expr2
== old_child
then
9633 if new_child
!= null then
9634 new_child
.parent
= self
9635 assert new_child
isa PExpr
9636 _n_expr2
= new_child
9644 redef meth visit_all
(v
: Visitor)
9646 if _n_expr
!= null then
9649 if _n_expr2
!= null then
9654 redef meth visit_all_reverse
(v
: Visitor)
9656 if _n_expr
!= null then
9659 if _n_expr2
!= null then
9664 redef class AOrangeExpr
9665 redef meth n_expr
=(n
: PExpr)
9672 redef meth n_expr2
=(n
: PExpr)
9680 private init empty_init
do end
9682 init init_aorangeexpr
(
9689 if n_expr
!= null then
9690 n_expr
.parent
= self
9693 if n_expr2
!= null then
9694 n_expr2
.parent
= self
9698 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9700 assert old_child
!= null
9701 if _n_expr
== old_child
then
9702 if new_child
!= null then
9703 new_child
.parent
= self
9704 assert new_child
isa PExpr
9711 if _n_expr2
== old_child
then
9712 if new_child
!= null then
9713 new_child
.parent
= self
9714 assert new_child
isa PExpr
9715 _n_expr2
= new_child
9723 redef meth visit_all
(v
: Visitor)
9725 if _n_expr
!= null then
9728 if _n_expr2
!= null then
9733 redef meth visit_all_reverse
(v
: Visitor)
9735 if _n_expr
!= null then
9738 if _n_expr2
!= null then
9743 redef class AArrayExpr
9745 private init empty_init
do end
9747 init init_aarrayexpr
(
9748 n_exprs
: Array[Object] # Should be Array[PExpr]
9752 _n_exprs
= new List[PExpr]
9760 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9762 assert old_child
!= null
9763 for i
in [0.._n_exprs
.length
[ do
9764 if _n_exprs
[i
] == old_child
then
9765 if new_child
!= null then
9766 assert new_child
isa PExpr
9767 _n_exprs
[i
] = new_child
9768 new_child
.parent
= self
9770 _n_exprs
.remove_at
(i
)
9777 redef meth visit_all
(v
: Visitor)
9779 for n
in _n_exprs
do
9784 redef meth visit_all_reverse
(v
: Visitor)
9787 var i
= _n_exprs
.length
9789 v
.visit
(_n_exprs
[i
])
9795 redef class ASelfExpr
9796 redef meth n_kwself
=(n
: TKwself)
9804 private init empty_init
do end
9806 init init_aselfexpr
(
9811 _n_kwself
= n_kwself
9812 if n_kwself
!= null then
9813 n_kwself
.parent
= self
9817 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9819 assert old_child
!= null
9820 if _n_kwself
== old_child
then
9821 if new_child
!= null then
9822 new_child
.parent
= self
9823 assert new_child
isa TKwself
9824 _n_kwself
= new_child
9832 redef meth visit_all
(v
: Visitor)
9834 if _n_kwself
!= null then
9839 redef meth visit_all_reverse
(v
: Visitor)
9841 if _n_kwself
!= null then
9846 redef class AImplicitSelfExpr
9848 private init empty_init
do end
9850 init init_aimplicitselfexpr
9855 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9857 assert old_child
!= null
9860 redef meth visit_all
(v
: Visitor)
9864 redef meth visit_all_reverse
(v
: Visitor)
9868 redef class ATrueExpr
9869 redef meth n_kwtrue
=(n
: TKwtrue)
9877 private init empty_init
do end
9879 init init_atrueexpr
(
9884 _n_kwtrue
= n_kwtrue
9885 if n_kwtrue
!= null then
9886 n_kwtrue
.parent
= self
9890 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9892 assert old_child
!= null
9893 if _n_kwtrue
== old_child
then
9894 if new_child
!= null then
9895 new_child
.parent
= self
9896 assert new_child
isa TKwtrue
9897 _n_kwtrue
= new_child
9905 redef meth visit_all
(v
: Visitor)
9907 if _n_kwtrue
!= null then
9912 redef meth visit_all_reverse
(v
: Visitor)
9914 if _n_kwtrue
!= null then
9919 redef class AFalseExpr
9920 redef meth n_kwfalse
=(n
: TKwfalse)
9928 private init empty_init
do end
9930 init init_afalseexpr
(
9935 _n_kwfalse
= n_kwfalse
9936 if n_kwfalse
!= null then
9937 n_kwfalse
.parent
= self
9941 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9943 assert old_child
!= null
9944 if _n_kwfalse
== old_child
then
9945 if new_child
!= null then
9946 new_child
.parent
= self
9947 assert new_child
isa TKwfalse
9948 _n_kwfalse
= new_child
9956 redef meth visit_all
(v
: Visitor)
9958 if _n_kwfalse
!= null then
9963 redef meth visit_all_reverse
(v
: Visitor)
9965 if _n_kwfalse
!= null then
9970 redef class ANullExpr
9971 redef meth n_kwnull
=(n
: TKwnull)
9979 private init empty_init
do end
9981 init init_anullexpr
(
9986 _n_kwnull
= n_kwnull
9987 if n_kwnull
!= null then
9988 n_kwnull
.parent
= self
9992 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9994 assert old_child
!= null
9995 if _n_kwnull
== old_child
then
9996 if new_child
!= null then
9997 new_child
.parent
= self
9998 assert new_child
isa TKwnull
9999 _n_kwnull
= new_child
10007 redef meth visit_all
(v
: Visitor)
10009 if _n_kwnull
!= null then
10014 redef meth visit_all_reverse
(v
: Visitor)
10016 if _n_kwnull
!= null then
10021 redef class AIntExpr
10022 redef meth n_number
=(n
: TNumber)
10030 private init empty_init
do end
10032 init init_aintexpr
(
10037 _n_number
= n_number
10038 if n_number
!= null then
10039 n_number
.parent
= self
10043 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10045 assert old_child
!= null
10046 if _n_number
== old_child
then
10047 if new_child
!= null then
10048 new_child
.parent
= self
10049 assert new_child
isa TNumber
10050 _n_number
= new_child
10058 redef meth visit_all
(v
: Visitor)
10060 if _n_number
!= null then
10065 redef meth visit_all_reverse
(v
: Visitor)
10067 if _n_number
!= null then
10072 redef class AFloatExpr
10073 redef meth n_float
=(n
: TFloat)
10081 private init empty_init
do end
10083 init init_afloatexpr
(
10089 if n_float
!= null then
10090 n_float
.parent
= self
10094 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10096 assert old_child
!= null
10097 if _n_float
== old_child
then
10098 if new_child
!= null then
10099 new_child
.parent
= self
10100 assert new_child
isa TFloat
10101 _n_float
= new_child
10109 redef meth visit_all
(v
: Visitor)
10111 if _n_float
!= null then
10116 redef meth visit_all_reverse
(v
: Visitor)
10118 if _n_float
!= null then
10123 redef class ACharExpr
10124 redef meth n_char
=(n
: TChar)
10132 private init empty_init
do end
10134 init init_acharexpr
(
10140 if n_char
!= null then
10141 n_char
.parent
= self
10145 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10147 assert old_child
!= null
10148 if _n_char
== old_child
then
10149 if new_child
!= null then
10150 new_child
.parent
= self
10151 assert new_child
isa TChar
10152 _n_char
= new_child
10160 redef meth visit_all
(v
: Visitor)
10162 if _n_char
!= null then
10167 redef meth visit_all_reverse
(v
: Visitor)
10169 if _n_char
!= null then
10174 redef class AStringExpr
10175 redef meth n_string
=(n
: TString)
10183 private init empty_init
do end
10185 init init_astringexpr
(
10190 _n_string
= n_string
10191 if n_string
!= null then
10192 n_string
.parent
= self
10196 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10198 assert old_child
!= null
10199 if _n_string
== old_child
then
10200 if new_child
!= null then
10201 new_child
.parent
= self
10202 assert new_child
isa TString
10203 _n_string
= new_child
10211 redef meth visit_all
(v
: Visitor)
10213 if _n_string
!= null then
10218 redef meth visit_all_reverse
(v
: Visitor)
10220 if _n_string
!= null then
10225 redef class AStartStringExpr
10226 redef meth n_string
=(n
: TStartString)
10234 private init empty_init
do end
10236 init init_astartstringexpr
(
10237 n_string
: TStartString
10241 _n_string
= n_string
10242 if n_string
!= null then
10243 n_string
.parent
= self
10247 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10249 assert old_child
!= null
10250 if _n_string
== old_child
then
10251 if new_child
!= null then
10252 new_child
.parent
= self
10253 assert new_child
isa TStartString
10254 _n_string
= new_child
10262 redef meth visit_all
(v
: Visitor)
10264 if _n_string
!= null then
10269 redef meth visit_all_reverse
(v
: Visitor)
10271 if _n_string
!= null then
10276 redef class AMidStringExpr
10277 redef meth n_string
=(n
: TMidString)
10285 private init empty_init
do end
10287 init init_amidstringexpr
(
10288 n_string
: TMidString
10292 _n_string
= n_string
10293 if n_string
!= null then
10294 n_string
.parent
= self
10298 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10300 assert old_child
!= null
10301 if _n_string
== old_child
then
10302 if new_child
!= null then
10303 new_child
.parent
= self
10304 assert new_child
isa TMidString
10305 _n_string
= new_child
10313 redef meth visit_all
(v
: Visitor)
10315 if _n_string
!= null then
10320 redef meth visit_all_reverse
(v
: Visitor)
10322 if _n_string
!= null then
10327 redef class AEndStringExpr
10328 redef meth n_string
=(n
: TEndString)
10336 private init empty_init
do end
10338 init init_aendstringexpr
(
10339 n_string
: TEndString
10343 _n_string
= n_string
10344 if n_string
!= null then
10345 n_string
.parent
= self
10349 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10351 assert old_child
!= null
10352 if _n_string
== old_child
then
10353 if new_child
!= null then
10354 new_child
.parent
= self
10355 assert new_child
isa TEndString
10356 _n_string
= new_child
10364 redef meth visit_all
(v
: Visitor)
10366 if _n_string
!= null then
10371 redef meth visit_all_reverse
(v
: Visitor)
10373 if _n_string
!= null then
10378 redef class ASuperstringExpr
10380 private init empty_init
do end
10382 init init_asuperstringexpr
(
10383 n_exprs
: Array[Object] # Should be Array[PExpr]
10387 _n_exprs
= new List[PExpr]
10388 for n
in n_exprs
do
10395 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10397 assert old_child
!= null
10398 for i
in [0.._n_exprs
.length
[ do
10399 if _n_exprs
[i
] == old_child
then
10400 if new_child
!= null then
10401 assert new_child
isa PExpr
10402 _n_exprs
[i
] = new_child
10403 new_child
.parent
= self
10405 _n_exprs
.remove_at
(i
)
10412 redef meth visit_all
(v
: Visitor)
10414 for n
in _n_exprs
do
10419 redef meth visit_all_reverse
(v
: Visitor)
10422 var i
= _n_exprs
.length
10424 v
.visit
(_n_exprs
[i
])
10430 redef class AParExpr
10431 redef meth n_expr
=(n
: PExpr)
10439 private init empty_init
do end
10441 init init_aparexpr
(
10447 if n_expr
!= null then
10448 n_expr
.parent
= self
10452 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10454 assert old_child
!= null
10455 if _n_expr
== old_child
then
10456 if new_child
!= null then
10457 new_child
.parent
= self
10458 assert new_child
isa PExpr
10459 _n_expr
= new_child
10467 redef meth visit_all
(v
: Visitor)
10469 if _n_expr
!= null then
10474 redef meth visit_all_reverse
(v
: Visitor)
10476 if _n_expr
!= null then
10481 redef class AAsCastExpr
10482 redef meth n_expr
=(n
: PExpr)
10489 redef meth n_kwas
=(n
: TKwas)
10496 redef meth n_type
=(n
: PType)
10504 private init empty_init
do end
10506 init init_aascastexpr
(
10514 if n_expr
!= null then
10515 n_expr
.parent
= self
10518 if n_kwas
!= null then
10519 n_kwas
.parent
= self
10522 if n_type
!= null then
10523 n_type
.parent
= self
10527 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10529 assert old_child
!= null
10530 if _n_expr
== old_child
then
10531 if new_child
!= null then
10532 new_child
.parent
= self
10533 assert new_child
isa PExpr
10534 _n_expr
= new_child
10540 if _n_kwas
== old_child
then
10541 if new_child
!= null then
10542 new_child
.parent
= self
10543 assert new_child
isa TKwas
10544 _n_kwas
= new_child
10550 if _n_type
== old_child
then
10551 if new_child
!= null then
10552 new_child
.parent
= self
10553 assert new_child
isa PType
10554 _n_type
= new_child
10562 redef meth visit_all
(v
: Visitor)
10564 if _n_expr
!= null then
10567 if _n_kwas
!= null then
10570 if _n_type
!= null then
10575 redef meth visit_all_reverse
(v
: Visitor)
10577 if _n_expr
!= null then
10580 if _n_kwas
!= null then
10583 if _n_type
!= null then
10588 redef class APlusAssignOp
10589 redef meth n_pluseq
=(n
: TPluseq)
10597 private init empty_init
do end
10599 init init_aplusassignop
(
10604 _n_pluseq
= n_pluseq
10605 if n_pluseq
!= null then
10606 n_pluseq
.parent
= self
10610 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10612 assert old_child
!= null
10613 if _n_pluseq
== old_child
then
10614 if new_child
!= null then
10615 new_child
.parent
= self
10616 assert new_child
isa TPluseq
10617 _n_pluseq
= new_child
10625 redef meth visit_all
(v
: Visitor)
10627 if _n_pluseq
!= null then
10632 redef meth visit_all_reverse
(v
: Visitor)
10634 if _n_pluseq
!= null then
10639 redef class AMinusAssignOp
10640 redef meth n_minuseq
=(n
: TMinuseq)
10648 private init empty_init
do end
10650 init init_aminusassignop
(
10651 n_minuseq
: TMinuseq
10655 _n_minuseq
= n_minuseq
10656 if n_minuseq
!= null then
10657 n_minuseq
.parent
= self
10661 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10663 assert old_child
!= null
10664 if _n_minuseq
== old_child
then
10665 if new_child
!= null then
10666 new_child
.parent
= self
10667 assert new_child
isa TMinuseq
10668 _n_minuseq
= new_child
10676 redef meth visit_all
(v
: Visitor)
10678 if _n_minuseq
!= null then
10679 v
.visit
(_n_minuseq
)
10683 redef meth visit_all_reverse
(v
: Visitor)
10685 if _n_minuseq
!= null then
10686 v
.visit
(_n_minuseq
)
10690 redef class AClosureDef
10691 redef meth n_kwwith
=(n
: TKwwith)
10698 redef meth n_kwdo
=(n
: TKwdo)
10705 redef meth n_expr
=(n
: PExpr)
10713 private init empty_init
do end
10715 init init_aclosuredef
(
10716 n_kwwith
: TKwwith ,
10717 n_id
: Array[Object] , # Should be Array[TId]
10723 _n_kwwith
= n_kwwith
10724 if n_kwwith
!= null then
10725 n_kwwith
.parent
= self
10727 _n_id
= new List[TId]
10734 if n_kwdo
!= null then
10735 n_kwdo
.parent
= self
10738 if n_expr
!= null then
10739 n_expr
.parent
= self
10743 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10745 assert old_child
!= null
10746 if _n_kwwith
== old_child
then
10747 if new_child
!= null then
10748 new_child
.parent
= self
10749 assert new_child
isa TKwwith
10750 _n_kwwith
= new_child
10756 for i
in [0.._n_id
.length
[ do
10757 if _n_id
[i
] == old_child
then
10758 if new_child
!= null then
10759 assert new_child
isa TId
10760 _n_id
[i
] = new_child
10761 new_child
.parent
= self
10768 if _n_kwdo
== old_child
then
10769 if new_child
!= null then
10770 new_child
.parent
= self
10771 assert new_child
isa TKwdo
10772 _n_kwdo
= new_child
10778 if _n_expr
== old_child
then
10779 if new_child
!= null then
10780 new_child
.parent
= self
10781 assert new_child
isa PExpr
10782 _n_expr
= new_child
10790 redef meth visit_all
(v
: Visitor)
10792 if _n_kwwith
!= null then
10798 if _n_kwdo
!= null then
10801 if _n_expr
!= null then
10806 redef meth visit_all_reverse
(v
: Visitor)
10808 if _n_kwwith
!= null then
10812 var i
= _n_id
.length
10818 if _n_kwdo
!= null then
10821 if _n_expr
!= null then
10826 redef class AQualified
10827 redef meth n_classid
=(n
: TClassid)
10835 private init empty_init
do end
10837 init init_aqualified
(
10838 n_id
: Array[Object] , # Should be Array[TId]
10839 n_classid
: TClassid
10843 _n_id
= new List[TId]
10849 _n_classid
= n_classid
10850 if n_classid
!= null then
10851 n_classid
.parent
= self
10855 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10857 assert old_child
!= null
10858 for i
in [0.._n_id
.length
[ do
10859 if _n_id
[i
] == old_child
then
10860 if new_child
!= null then
10861 assert new_child
isa TId
10862 _n_id
[i
] = new_child
10863 new_child
.parent
= self
10870 if _n_classid
== old_child
then
10871 if new_child
!= null then
10872 new_child
.parent
= self
10873 assert new_child
isa TClassid
10874 _n_classid
= new_child
10882 redef meth visit_all
(v
: Visitor)
10887 if _n_classid
!= null then
10888 v
.visit
(_n_classid
)
10892 redef meth visit_all_reverse
(v
: Visitor)
10895 var i
= _n_id
.length
10901 if _n_classid
!= null then
10902 v
.visit
(_n_classid
)
10908 private init empty_init
do end
10911 n_comment
: Array[Object] # Should be Array[TComment]
10915 _n_comment
= new List[TComment]
10916 for n
in n_comment
do
10917 assert n
isa TComment
10923 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10925 assert old_child
!= null
10926 for i
in [0.._n_comment
.length
[ do
10927 if _n_comment
[i
] == old_child
then
10928 if new_child
!= null then
10929 assert new_child
isa TComment
10930 _n_comment
[i
] = new_child
10931 new_child
.parent
= self
10933 _n_comment
.remove_at
(i
)
10940 redef meth visit_all
(v
: Visitor)
10942 for n
in _n_comment
do
10947 redef meth visit_all_reverse
(v
: Visitor)
10950 var i
= _n_comment
.length
10952 v
.visit
(_n_comment
[i
])
10968 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10970 assert old_child
!= null
10971 if _n_base
== old_child
then
10972 if new_child
== null then
10974 new_child
.parent
= self
10975 assert new_child
isa PModule
10976 _n_base
= new_child
10978 old_child
.parent
= null
10983 redef meth visit_all
(v
: Visitor)
10985 if _n_base
!= null then
10990 redef meth visit_all_reverse
(v
: Visitor)
10992 if _n_base
!= null then