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_vardecl
=(n
: PExpr)
5801 redef meth n_kwdo
=(n
: TKwdo)
5808 redef meth n_block
=(n
: PExpr)
5816 private init empty_init
do end
5818 init init_aforexpr
(
5825 _n_vardecl
= n_vardecl
5826 if n_vardecl
!= null then
5827 n_vardecl
.parent
= self
5830 if n_kwdo
!= null then
5831 n_kwdo
.parent
= self
5834 if n_block
!= null then
5835 n_block
.parent
= self
5839 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5841 assert old_child
!= null
5842 if _n_vardecl
== old_child
then
5843 if new_child
!= null then
5844 new_child
.parent
= self
5845 assert new_child
isa PExpr
5846 _n_vardecl
= new_child
5852 if _n_kwdo
== old_child
then
5853 if new_child
!= null then
5854 new_child
.parent
= self
5855 assert new_child
isa TKwdo
5862 if _n_block
== old_child
then
5863 if new_child
!= null then
5864 new_child
.parent
= self
5865 assert new_child
isa PExpr
5866 _n_block
= new_child
5874 redef meth visit_all
(v
: Visitor)
5876 if _n_vardecl
!= null then
5879 if _n_kwdo
!= null then
5882 if _n_block
!= null then
5887 redef meth visit_all_reverse
(v
: Visitor)
5889 if _n_vardecl
!= null then
5892 if _n_kwdo
!= null then
5895 if _n_block
!= null then
5900 redef class AForVardeclExpr
5901 redef meth n_kwfor
=(n
: TKwfor)
5908 redef meth n_id
=(n
: TId)
5915 redef meth n_expr
=(n
: PExpr)
5923 private init empty_init
do end
5925 init init_aforvardeclexpr
(
5933 if n_kwfor
!= null then
5934 n_kwfor
.parent
= self
5937 if n_id
!= null then
5941 if n_expr
!= null then
5942 n_expr
.parent
= self
5946 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5948 assert old_child
!= null
5949 if _n_kwfor
== old_child
then
5950 if new_child
!= null then
5951 new_child
.parent
= self
5952 assert new_child
isa TKwfor
5953 _n_kwfor
= new_child
5959 if _n_id
== old_child
then
5960 if new_child
!= null then
5961 new_child
.parent
= self
5962 assert new_child
isa TId
5969 if _n_expr
== old_child
then
5970 if new_child
!= null then
5971 new_child
.parent
= self
5972 assert new_child
isa PExpr
5981 redef meth visit_all
(v
: Visitor)
5983 if _n_kwfor
!= null then
5986 if _n_id
!= null then
5989 if _n_expr
!= null then
5994 redef meth visit_all_reverse
(v
: Visitor)
5996 if _n_kwfor
!= null then
5999 if _n_id
!= null then
6002 if _n_expr
!= null then
6007 redef class AAssertExpr
6008 redef meth n_kwassert
=(n
: TKwassert)
6015 redef meth n_id
=(n
: TId)
6022 redef meth n_expr
=(n
: PExpr)
6030 private init empty_init
do end
6032 init init_aassertexpr
(
6033 n_kwassert
: TKwassert ,
6039 _n_kwassert
= n_kwassert
6040 if n_kwassert
!= null then
6041 n_kwassert
.parent
= self
6044 if n_id
!= null then
6048 if n_expr
!= null then
6049 n_expr
.parent
= self
6053 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6055 assert old_child
!= null
6056 if _n_kwassert
== old_child
then
6057 if new_child
!= null then
6058 new_child
.parent
= self
6059 assert new_child
isa TKwassert
6060 _n_kwassert
= new_child
6066 if _n_id
== old_child
then
6067 if new_child
!= null then
6068 new_child
.parent
= self
6069 assert new_child
isa TId
6076 if _n_expr
== old_child
then
6077 if new_child
!= null then
6078 new_child
.parent
= self
6079 assert new_child
isa PExpr
6088 redef meth visit_all
(v
: Visitor)
6090 if _n_kwassert
!= null then
6091 v
.visit
(_n_kwassert
)
6093 if _n_id
!= null then
6096 if _n_expr
!= null then
6101 redef meth visit_all_reverse
(v
: Visitor)
6103 if _n_kwassert
!= null then
6104 v
.visit
(_n_kwassert
)
6106 if _n_id
!= null then
6109 if _n_expr
!= null then
6114 redef class AOnceExpr
6115 redef meth n_kwonce
=(n
: TKwonce)
6122 redef meth n_expr
=(n
: PExpr)
6130 private init empty_init
do end
6132 init init_aonceexpr
(
6138 _n_kwonce
= n_kwonce
6139 if n_kwonce
!= null then
6140 n_kwonce
.parent
= self
6143 if n_expr
!= null then
6144 n_expr
.parent
= self
6148 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6150 assert old_child
!= null
6151 if _n_kwonce
== old_child
then
6152 if new_child
!= null then
6153 new_child
.parent
= self
6154 assert new_child
isa TKwonce
6155 _n_kwonce
= new_child
6161 if _n_expr
== old_child
then
6162 if new_child
!= null then
6163 new_child
.parent
= self
6164 assert new_child
isa PExpr
6173 redef meth visit_all
(v
: Visitor)
6175 if _n_kwonce
!= null then
6178 if _n_expr
!= null then
6183 redef meth visit_all_reverse
(v
: Visitor)
6185 if _n_kwonce
!= null then
6188 if _n_expr
!= null then
6193 redef class ASendExpr
6194 redef meth n_expr
=(n
: PExpr)
6202 private init empty_init
do end
6204 init init_asendexpr
(
6210 if n_expr
!= null then
6211 n_expr
.parent
= self
6215 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6217 assert old_child
!= null
6218 if _n_expr
== old_child
then
6219 if new_child
!= null then
6220 new_child
.parent
= self
6221 assert new_child
isa PExpr
6230 redef meth visit_all
(v
: Visitor)
6232 if _n_expr
!= null then
6237 redef meth visit_all_reverse
(v
: Visitor)
6239 if _n_expr
!= null then
6244 redef class ABinopExpr
6245 redef meth n_expr
=(n
: PExpr)
6252 redef meth n_expr2
=(n
: PExpr)
6260 private init empty_init
do end
6262 init init_abinopexpr
(
6269 if n_expr
!= null then
6270 n_expr
.parent
= self
6273 if n_expr2
!= null then
6274 n_expr2
.parent
= self
6278 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6280 assert old_child
!= null
6281 if _n_expr
== old_child
then
6282 if new_child
!= null then
6283 new_child
.parent
= self
6284 assert new_child
isa PExpr
6291 if _n_expr2
== old_child
then
6292 if new_child
!= null then
6293 new_child
.parent
= self
6294 assert new_child
isa PExpr
6295 _n_expr2
= new_child
6303 redef meth visit_all
(v
: Visitor)
6305 if _n_expr
!= null then
6308 if _n_expr2
!= null then
6313 redef meth visit_all_reverse
(v
: Visitor)
6315 if _n_expr
!= null then
6318 if _n_expr2
!= null then
6324 redef meth n_expr
=(n
: PExpr)
6331 redef meth n_expr2
=(n
: PExpr)
6339 private init empty_init
do end
6348 if n_expr
!= null then
6349 n_expr
.parent
= self
6352 if n_expr2
!= null then
6353 n_expr2
.parent
= self
6357 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6359 assert old_child
!= null
6360 if _n_expr
== old_child
then
6361 if new_child
!= null then
6362 new_child
.parent
= self
6363 assert new_child
isa PExpr
6370 if _n_expr2
== old_child
then
6371 if new_child
!= null then
6372 new_child
.parent
= self
6373 assert new_child
isa PExpr
6374 _n_expr2
= new_child
6382 redef meth visit_all
(v
: Visitor)
6384 if _n_expr
!= null then
6387 if _n_expr2
!= null then
6392 redef meth visit_all_reverse
(v
: Visitor)
6394 if _n_expr
!= null then
6397 if _n_expr2
!= null then
6402 redef class AAndExpr
6403 redef meth n_expr
=(n
: PExpr)
6410 redef meth n_expr2
=(n
: PExpr)
6418 private init empty_init
do end
6420 init init_aandexpr
(
6427 if n_expr
!= null then
6428 n_expr
.parent
= self
6431 if n_expr2
!= null then
6432 n_expr2
.parent
= self
6436 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6438 assert old_child
!= null
6439 if _n_expr
== old_child
then
6440 if new_child
!= null then
6441 new_child
.parent
= self
6442 assert new_child
isa PExpr
6449 if _n_expr2
== old_child
then
6450 if new_child
!= null then
6451 new_child
.parent
= self
6452 assert new_child
isa PExpr
6453 _n_expr2
= new_child
6461 redef meth visit_all
(v
: Visitor)
6463 if _n_expr
!= null then
6466 if _n_expr2
!= null then
6471 redef meth visit_all_reverse
(v
: Visitor)
6473 if _n_expr
!= null then
6476 if _n_expr2
!= null then
6481 redef class ANotExpr
6482 redef meth n_kwnot
=(n
: TKwnot)
6489 redef meth n_expr
=(n
: PExpr)
6497 private init empty_init
do end
6499 init init_anotexpr
(
6506 if n_kwnot
!= null then
6507 n_kwnot
.parent
= self
6510 if n_expr
!= null then
6511 n_expr
.parent
= self
6515 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6517 assert old_child
!= null
6518 if _n_kwnot
== old_child
then
6519 if new_child
!= null then
6520 new_child
.parent
= self
6521 assert new_child
isa TKwnot
6522 _n_kwnot
= new_child
6528 if _n_expr
== old_child
then
6529 if new_child
!= null then
6530 new_child
.parent
= self
6531 assert new_child
isa PExpr
6540 redef meth visit_all
(v
: Visitor)
6542 if _n_kwnot
!= null then
6545 if _n_expr
!= null then
6550 redef meth visit_all_reverse
(v
: Visitor)
6552 if _n_kwnot
!= null then
6555 if _n_expr
!= null then
6561 redef meth n_expr
=(n
: PExpr)
6568 redef meth n_expr2
=(n
: PExpr)
6576 private init empty_init
do end
6585 if n_expr
!= null then
6586 n_expr
.parent
= self
6589 if n_expr2
!= null then
6590 n_expr2
.parent
= self
6594 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6596 assert old_child
!= null
6597 if _n_expr
== old_child
then
6598 if new_child
!= null then
6599 new_child
.parent
= self
6600 assert new_child
isa PExpr
6607 if _n_expr2
== old_child
then
6608 if new_child
!= null then
6609 new_child
.parent
= self
6610 assert new_child
isa PExpr
6611 _n_expr2
= new_child
6619 redef meth visit_all
(v
: Visitor)
6621 if _n_expr
!= null then
6624 if _n_expr2
!= null then
6629 redef meth visit_all_reverse
(v
: Visitor)
6631 if _n_expr
!= null then
6634 if _n_expr2
!= null then
6640 redef meth n_expr
=(n
: PExpr)
6647 redef meth n_expr2
=(n
: PExpr)
6655 private init empty_init
do end
6664 if n_expr
!= null then
6665 n_expr
.parent
= self
6668 if n_expr2
!= null then
6669 n_expr2
.parent
= self
6673 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6675 assert old_child
!= null
6676 if _n_expr
== old_child
then
6677 if new_child
!= null then
6678 new_child
.parent
= self
6679 assert new_child
isa PExpr
6686 if _n_expr2
== old_child
then
6687 if new_child
!= null then
6688 new_child
.parent
= self
6689 assert new_child
isa PExpr
6690 _n_expr2
= new_child
6698 redef meth visit_all
(v
: Visitor)
6700 if _n_expr
!= null then
6703 if _n_expr2
!= null then
6708 redef meth visit_all_reverse
(v
: Visitor)
6710 if _n_expr
!= null then
6713 if _n_expr2
!= null then
6719 redef meth n_expr
=(n
: PExpr)
6726 redef meth n_expr2
=(n
: PExpr)
6734 private init empty_init
do end
6743 if n_expr
!= null then
6744 n_expr
.parent
= self
6747 if n_expr2
!= null then
6748 n_expr2
.parent
= self
6752 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6754 assert old_child
!= null
6755 if _n_expr
== old_child
then
6756 if new_child
!= null then
6757 new_child
.parent
= self
6758 assert new_child
isa PExpr
6765 if _n_expr2
== old_child
then
6766 if new_child
!= null then
6767 new_child
.parent
= self
6768 assert new_child
isa PExpr
6769 _n_expr2
= new_child
6777 redef meth visit_all
(v
: Visitor)
6779 if _n_expr
!= null then
6782 if _n_expr2
!= null then
6787 redef meth visit_all_reverse
(v
: Visitor)
6789 if _n_expr
!= null then
6792 if _n_expr2
!= null then
6798 redef meth n_expr
=(n
: PExpr)
6805 redef meth n_expr2
=(n
: PExpr)
6813 private init empty_init
do end
6822 if n_expr
!= null then
6823 n_expr
.parent
= self
6826 if n_expr2
!= null then
6827 n_expr2
.parent
= self
6831 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6833 assert old_child
!= null
6834 if _n_expr
== old_child
then
6835 if new_child
!= null then
6836 new_child
.parent
= self
6837 assert new_child
isa PExpr
6844 if _n_expr2
== old_child
then
6845 if new_child
!= null then
6846 new_child
.parent
= self
6847 assert new_child
isa PExpr
6848 _n_expr2
= new_child
6856 redef meth visit_all
(v
: Visitor)
6858 if _n_expr
!= null then
6861 if _n_expr2
!= null then
6866 redef meth visit_all_reverse
(v
: Visitor)
6868 if _n_expr
!= null then
6871 if _n_expr2
!= null then
6877 redef meth n_expr
=(n
: PExpr)
6884 redef meth n_expr2
=(n
: PExpr)
6892 private init empty_init
do end
6901 if n_expr
!= null then
6902 n_expr
.parent
= self
6905 if n_expr2
!= null then
6906 n_expr2
.parent
= self
6910 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6912 assert old_child
!= null
6913 if _n_expr
== old_child
then
6914 if new_child
!= null then
6915 new_child
.parent
= self
6916 assert new_child
isa PExpr
6923 if _n_expr2
== old_child
then
6924 if new_child
!= null then
6925 new_child
.parent
= self
6926 assert new_child
isa PExpr
6927 _n_expr2
= new_child
6935 redef meth visit_all
(v
: Visitor)
6937 if _n_expr
!= null then
6940 if _n_expr2
!= null then
6945 redef meth visit_all_reverse
(v
: Visitor)
6947 if _n_expr
!= null then
6950 if _n_expr2
!= null then
6956 redef meth n_expr
=(n
: PExpr)
6963 redef meth n_expr2
=(n
: PExpr)
6971 private init empty_init
do end
6980 if n_expr
!= null then
6981 n_expr
.parent
= self
6984 if n_expr2
!= null then
6985 n_expr2
.parent
= self
6989 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6991 assert old_child
!= null
6992 if _n_expr
== old_child
then
6993 if new_child
!= null then
6994 new_child
.parent
= self
6995 assert new_child
isa PExpr
7002 if _n_expr2
== old_child
then
7003 if new_child
!= null then
7004 new_child
.parent
= self
7005 assert new_child
isa PExpr
7006 _n_expr2
= new_child
7014 redef meth visit_all
(v
: Visitor)
7016 if _n_expr
!= null then
7019 if _n_expr2
!= null then
7024 redef meth visit_all_reverse
(v
: Visitor)
7026 if _n_expr
!= null then
7029 if _n_expr2
!= null then
7035 redef meth n_expr
=(n
: PExpr)
7042 redef meth n_expr2
=(n
: PExpr)
7050 private init empty_init
do end
7059 if n_expr
!= null then
7060 n_expr
.parent
= self
7063 if n_expr2
!= null then
7064 n_expr2
.parent
= self
7068 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7070 assert old_child
!= null
7071 if _n_expr
== old_child
then
7072 if new_child
!= null then
7073 new_child
.parent
= self
7074 assert new_child
isa PExpr
7081 if _n_expr2
== old_child
then
7082 if new_child
!= null then
7083 new_child
.parent
= self
7084 assert new_child
isa PExpr
7085 _n_expr2
= new_child
7093 redef meth visit_all
(v
: Visitor)
7095 if _n_expr
!= null then
7098 if _n_expr2
!= null then
7103 redef meth visit_all_reverse
(v
: Visitor)
7105 if _n_expr
!= null then
7108 if _n_expr2
!= null then
7113 redef class AIsaExpr
7114 redef meth n_expr
=(n
: PExpr)
7121 redef meth n_type
=(n
: PType)
7129 private init empty_init
do end
7131 init init_aisaexpr
(
7138 if n_expr
!= null then
7139 n_expr
.parent
= self
7142 if n_type
!= null then
7143 n_type
.parent
= self
7147 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7149 assert old_child
!= null
7150 if _n_expr
== old_child
then
7151 if new_child
!= null then
7152 new_child
.parent
= self
7153 assert new_child
isa PExpr
7160 if _n_type
== old_child
then
7161 if new_child
!= null then
7162 new_child
.parent
= self
7163 assert new_child
isa PType
7172 redef meth visit_all
(v
: Visitor)
7174 if _n_expr
!= null then
7177 if _n_type
!= null then
7182 redef meth visit_all_reverse
(v
: Visitor)
7184 if _n_expr
!= null then
7187 if _n_type
!= null then
7192 redef class APlusExpr
7193 redef meth n_expr
=(n
: PExpr)
7200 redef meth n_expr2
=(n
: PExpr)
7208 private init empty_init
do end
7210 init init_aplusexpr
(
7217 if n_expr
!= null then
7218 n_expr
.parent
= self
7221 if n_expr2
!= null then
7222 n_expr2
.parent
= self
7226 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7228 assert old_child
!= null
7229 if _n_expr
== old_child
then
7230 if new_child
!= null then
7231 new_child
.parent
= self
7232 assert new_child
isa PExpr
7239 if _n_expr2
== old_child
then
7240 if new_child
!= null then
7241 new_child
.parent
= self
7242 assert new_child
isa PExpr
7243 _n_expr2
= new_child
7251 redef meth visit_all
(v
: Visitor)
7253 if _n_expr
!= null then
7256 if _n_expr2
!= null then
7261 redef meth visit_all_reverse
(v
: Visitor)
7263 if _n_expr
!= null then
7266 if _n_expr2
!= null then
7271 redef class AMinusExpr
7272 redef meth n_expr
=(n
: PExpr)
7279 redef meth n_expr2
=(n
: PExpr)
7287 private init empty_init
do end
7289 init init_aminusexpr
(
7296 if n_expr
!= null then
7297 n_expr
.parent
= self
7300 if n_expr2
!= null then
7301 n_expr2
.parent
= self
7305 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7307 assert old_child
!= null
7308 if _n_expr
== old_child
then
7309 if new_child
!= null then
7310 new_child
.parent
= self
7311 assert new_child
isa PExpr
7318 if _n_expr2
== old_child
then
7319 if new_child
!= null then
7320 new_child
.parent
= self
7321 assert new_child
isa PExpr
7322 _n_expr2
= new_child
7330 redef meth visit_all
(v
: Visitor)
7332 if _n_expr
!= null then
7335 if _n_expr2
!= null then
7340 redef meth visit_all_reverse
(v
: Visitor)
7342 if _n_expr
!= null then
7345 if _n_expr2
!= null then
7350 redef class AStarshipExpr
7351 redef meth n_expr
=(n
: PExpr)
7358 redef meth n_expr2
=(n
: PExpr)
7366 private init empty_init
do end
7368 init init_astarshipexpr
(
7375 if n_expr
!= null then
7376 n_expr
.parent
= self
7379 if n_expr2
!= null then
7380 n_expr2
.parent
= self
7384 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7386 assert old_child
!= null
7387 if _n_expr
== old_child
then
7388 if new_child
!= null then
7389 new_child
.parent
= self
7390 assert new_child
isa PExpr
7397 if _n_expr2
== old_child
then
7398 if new_child
!= null then
7399 new_child
.parent
= self
7400 assert new_child
isa PExpr
7401 _n_expr2
= new_child
7409 redef meth visit_all
(v
: Visitor)
7411 if _n_expr
!= null then
7414 if _n_expr2
!= null then
7419 redef meth visit_all_reverse
(v
: Visitor)
7421 if _n_expr
!= null then
7424 if _n_expr2
!= null then
7429 redef class AStarExpr
7430 redef meth n_expr
=(n
: PExpr)
7437 redef meth n_expr2
=(n
: PExpr)
7445 private init empty_init
do end
7447 init init_astarexpr
(
7454 if n_expr
!= null then
7455 n_expr
.parent
= self
7458 if n_expr2
!= null then
7459 n_expr2
.parent
= self
7463 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7465 assert old_child
!= null
7466 if _n_expr
== old_child
then
7467 if new_child
!= null then
7468 new_child
.parent
= self
7469 assert new_child
isa PExpr
7476 if _n_expr2
== old_child
then
7477 if new_child
!= null then
7478 new_child
.parent
= self
7479 assert new_child
isa PExpr
7480 _n_expr2
= new_child
7488 redef meth visit_all
(v
: Visitor)
7490 if _n_expr
!= null then
7493 if _n_expr2
!= null then
7498 redef meth visit_all_reverse
(v
: Visitor)
7500 if _n_expr
!= null then
7503 if _n_expr2
!= null then
7508 redef class ASlashExpr
7509 redef meth n_expr
=(n
: PExpr)
7516 redef meth n_expr2
=(n
: PExpr)
7524 private init empty_init
do end
7526 init init_aslashexpr
(
7533 if n_expr
!= null then
7534 n_expr
.parent
= self
7537 if n_expr2
!= null then
7538 n_expr2
.parent
= self
7542 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7544 assert old_child
!= null
7545 if _n_expr
== old_child
then
7546 if new_child
!= null then
7547 new_child
.parent
= self
7548 assert new_child
isa PExpr
7555 if _n_expr2
== old_child
then
7556 if new_child
!= null then
7557 new_child
.parent
= self
7558 assert new_child
isa PExpr
7559 _n_expr2
= new_child
7567 redef meth visit_all
(v
: Visitor)
7569 if _n_expr
!= null then
7572 if _n_expr2
!= null then
7577 redef meth visit_all_reverse
(v
: Visitor)
7579 if _n_expr
!= null then
7582 if _n_expr2
!= null then
7587 redef class APercentExpr
7588 redef meth n_expr
=(n
: PExpr)
7595 redef meth n_expr2
=(n
: PExpr)
7603 private init empty_init
do end
7605 init init_apercentexpr
(
7612 if n_expr
!= null then
7613 n_expr
.parent
= self
7616 if n_expr2
!= null then
7617 n_expr2
.parent
= self
7621 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7623 assert old_child
!= null
7624 if _n_expr
== old_child
then
7625 if new_child
!= null then
7626 new_child
.parent
= self
7627 assert new_child
isa PExpr
7634 if _n_expr2
== old_child
then
7635 if new_child
!= null then
7636 new_child
.parent
= self
7637 assert new_child
isa PExpr
7638 _n_expr2
= new_child
7646 redef meth visit_all
(v
: Visitor)
7648 if _n_expr
!= null then
7651 if _n_expr2
!= null then
7656 redef meth visit_all_reverse
(v
: Visitor)
7658 if _n_expr
!= null then
7661 if _n_expr2
!= null then
7666 redef class AUminusExpr
7667 redef meth n_minus
=(n
: TMinus)
7674 redef meth n_expr
=(n
: PExpr)
7682 private init empty_init
do end
7684 init init_auminusexpr
(
7691 if n_minus
!= null then
7692 n_minus
.parent
= self
7695 if n_expr
!= null then
7696 n_expr
.parent
= self
7700 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7702 assert old_child
!= null
7703 if _n_minus
== old_child
then
7704 if new_child
!= null then
7705 new_child
.parent
= self
7706 assert new_child
isa TMinus
7707 _n_minus
= new_child
7713 if _n_expr
== old_child
then
7714 if new_child
!= null then
7715 new_child
.parent
= self
7716 assert new_child
isa PExpr
7725 redef meth visit_all
(v
: Visitor)
7727 if _n_minus
!= null then
7730 if _n_expr
!= null then
7735 redef meth visit_all_reverse
(v
: Visitor)
7737 if _n_minus
!= null then
7740 if _n_expr
!= null then
7745 redef class ANewExpr
7746 redef meth n_kwnew
=(n
: TKwnew)
7753 redef meth n_type
=(n
: PType)
7760 redef meth n_id
=(n
: TId)
7768 private init empty_init
do end
7770 init init_anewexpr
(
7774 n_args
: Array[Object] # Should be Array[PExpr]
7779 if n_kwnew
!= null then
7780 n_kwnew
.parent
= self
7783 if n_type
!= null then
7784 n_type
.parent
= self
7787 if n_id
!= null then
7790 _n_args
= new List[PExpr]
7798 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7800 assert old_child
!= null
7801 if _n_kwnew
== old_child
then
7802 if new_child
!= null then
7803 new_child
.parent
= self
7804 assert new_child
isa TKwnew
7805 _n_kwnew
= new_child
7811 if _n_type
== old_child
then
7812 if new_child
!= null then
7813 new_child
.parent
= self
7814 assert new_child
isa PType
7821 if _n_id
== old_child
then
7822 if new_child
!= null then
7823 new_child
.parent
= self
7824 assert new_child
isa TId
7831 for i
in [0.._n_args
.length
[ do
7832 if _n_args
[i
] == old_child
then
7833 if new_child
!= null then
7834 assert new_child
isa PExpr
7835 _n_args
[i
] = new_child
7836 new_child
.parent
= self
7838 _n_args
.remove_at
(i
)
7845 redef meth visit_all
(v
: Visitor)
7847 if _n_kwnew
!= null then
7850 if _n_type
!= null then
7853 if _n_id
!= null then
7861 redef meth visit_all_reverse
(v
: Visitor)
7863 if _n_kwnew
!= null then
7866 if _n_type
!= null then
7869 if _n_id
!= null then
7873 var i
= _n_args
.length
7881 redef class AAttrExpr
7882 redef meth n_expr
=(n
: PExpr)
7889 redef meth n_id
=(n
: TAttrid)
7897 private init empty_init
do end
7899 init init_aattrexpr
(
7906 if n_expr
!= null then
7907 n_expr
.parent
= self
7910 if n_id
!= null then
7915 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7917 assert old_child
!= null
7918 if _n_expr
== old_child
then
7919 if new_child
!= null then
7920 new_child
.parent
= self
7921 assert new_child
isa PExpr
7928 if _n_id
== old_child
then
7929 if new_child
!= null then
7930 new_child
.parent
= self
7931 assert new_child
isa TAttrid
7940 redef meth visit_all
(v
: Visitor)
7942 if _n_expr
!= null then
7945 if _n_id
!= null then
7950 redef meth visit_all_reverse
(v
: Visitor)
7952 if _n_expr
!= null then
7955 if _n_id
!= null then
7960 redef class AAttrAssignExpr
7961 redef meth n_expr
=(n
: PExpr)
7968 redef meth n_id
=(n
: TAttrid)
7975 redef meth n_assign
=(n
: TAssign)
7982 redef meth n_value
=(n
: PExpr)
7990 private init empty_init
do end
7992 init init_aattrassignexpr
(
8001 if n_expr
!= null then
8002 n_expr
.parent
= self
8005 if n_id
!= null then
8008 _n_assign
= n_assign
8009 if n_assign
!= null then
8010 n_assign
.parent
= self
8013 if n_value
!= null then
8014 n_value
.parent
= self
8018 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8020 assert old_child
!= null
8021 if _n_expr
== old_child
then
8022 if new_child
!= null then
8023 new_child
.parent
= self
8024 assert new_child
isa PExpr
8031 if _n_id
== old_child
then
8032 if new_child
!= null then
8033 new_child
.parent
= self
8034 assert new_child
isa TAttrid
8041 if _n_assign
== old_child
then
8042 if new_child
!= null then
8043 new_child
.parent
= self
8044 assert new_child
isa TAssign
8045 _n_assign
= new_child
8051 if _n_value
== old_child
then
8052 if new_child
!= null then
8053 new_child
.parent
= self
8054 assert new_child
isa PExpr
8055 _n_value
= new_child
8063 redef meth visit_all
(v
: Visitor)
8065 if _n_expr
!= null then
8068 if _n_id
!= null then
8071 if _n_assign
!= null then
8074 if _n_value
!= null then
8079 redef meth visit_all_reverse
(v
: Visitor)
8081 if _n_expr
!= null then
8084 if _n_id
!= null then
8087 if _n_assign
!= null then
8090 if _n_value
!= null then
8095 redef class AAttrReassignExpr
8096 redef meth n_expr
=(n
: PExpr)
8103 redef meth n_id
=(n
: TAttrid)
8110 redef meth n_assign_op
=(n
: PAssignOp)
8117 redef meth n_value
=(n
: PExpr)
8125 private init empty_init
do end
8127 init init_aattrreassignexpr
(
8130 n_assign_op
: PAssignOp ,
8136 if n_expr
!= null then
8137 n_expr
.parent
= self
8140 if n_id
!= null then
8143 _n_assign_op
= n_assign_op
8144 if n_assign_op
!= null then
8145 n_assign_op
.parent
= self
8148 if n_value
!= null then
8149 n_value
.parent
= self
8153 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8155 assert old_child
!= null
8156 if _n_expr
== old_child
then
8157 if new_child
!= null then
8158 new_child
.parent
= self
8159 assert new_child
isa PExpr
8166 if _n_id
== old_child
then
8167 if new_child
!= null then
8168 new_child
.parent
= self
8169 assert new_child
isa TAttrid
8176 if _n_assign_op
== old_child
then
8177 if new_child
!= null then
8178 new_child
.parent
= self
8179 assert new_child
isa PAssignOp
8180 _n_assign_op
= new_child
8186 if _n_value
== old_child
then
8187 if new_child
!= null then
8188 new_child
.parent
= self
8189 assert new_child
isa PExpr
8190 _n_value
= new_child
8198 redef meth visit_all
(v
: Visitor)
8200 if _n_expr
!= null then
8203 if _n_id
!= null then
8206 if _n_assign_op
!= null then
8207 v
.visit
(_n_assign_op
)
8209 if _n_value
!= null then
8214 redef meth visit_all_reverse
(v
: Visitor)
8216 if _n_expr
!= null then
8219 if _n_id
!= null then
8222 if _n_assign_op
!= null then
8223 v
.visit
(_n_assign_op
)
8225 if _n_value
!= null then
8230 redef class ACallExpr
8231 redef meth n_expr
=(n
: PExpr)
8238 redef meth n_id
=(n
: TId)
8246 private init empty_init
do end
8248 init init_acallexpr
(
8251 n_args
: Array[Object] , # Should be Array[PExpr]
8252 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8257 if n_expr
!= null then
8258 n_expr
.parent
= self
8261 if n_id
!= null then
8264 _n_args
= new List[PExpr]
8270 _n_closure_defs
= new List[PClosureDef]
8271 for n
in n_closure_defs
do
8272 assert n
isa PClosureDef
8273 _n_closure_defs
.add
(n
)
8278 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8280 assert old_child
!= null
8281 if _n_expr
== old_child
then
8282 if new_child
!= null then
8283 new_child
.parent
= self
8284 assert new_child
isa PExpr
8291 if _n_id
== old_child
then
8292 if new_child
!= null then
8293 new_child
.parent
= self
8294 assert new_child
isa TId
8301 for i
in [0.._n_args
.length
[ do
8302 if _n_args
[i
] == old_child
then
8303 if new_child
!= null then
8304 assert new_child
isa PExpr
8305 _n_args
[i
] = new_child
8306 new_child
.parent
= self
8308 _n_args
.remove_at
(i
)
8313 for i
in [0.._n_closure_defs
.length
[ do
8314 if _n_closure_defs
[i
] == old_child
then
8315 if new_child
!= null then
8316 assert new_child
isa PClosureDef
8317 _n_closure_defs
[i
] = new_child
8318 new_child
.parent
= self
8320 _n_closure_defs
.remove_at
(i
)
8327 redef meth visit_all
(v
: Visitor)
8329 if _n_expr
!= null then
8332 if _n_id
!= null then
8338 for n
in _n_closure_defs
do
8343 redef meth visit_all_reverse
(v
: Visitor)
8345 if _n_expr
!= null then
8348 if _n_id
!= null then
8352 var i
= _n_args
.length
8359 var i
= _n_closure_defs
.length
8361 v
.visit
(_n_closure_defs
[i
])
8367 redef class ACallAssignExpr
8368 redef meth n_expr
=(n
: PExpr)
8375 redef meth n_id
=(n
: TId)
8382 redef meth n_assign
=(n
: TAssign)
8389 redef meth n_value
=(n
: PExpr)
8397 private init empty_init
do end
8399 init init_acallassignexpr
(
8402 n_args
: Array[Object] , # Should be Array[PExpr]
8409 if n_expr
!= null then
8410 n_expr
.parent
= self
8413 if n_id
!= null then
8416 _n_args
= new List[PExpr]
8422 _n_assign
= n_assign
8423 if n_assign
!= null then
8424 n_assign
.parent
= self
8427 if n_value
!= null then
8428 n_value
.parent
= self
8432 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8434 assert old_child
!= null
8435 if _n_expr
== old_child
then
8436 if new_child
!= null then
8437 new_child
.parent
= self
8438 assert new_child
isa PExpr
8445 if _n_id
== old_child
then
8446 if new_child
!= null then
8447 new_child
.parent
= self
8448 assert new_child
isa TId
8455 for i
in [0.._n_args
.length
[ do
8456 if _n_args
[i
] == old_child
then
8457 if new_child
!= null then
8458 assert new_child
isa PExpr
8459 _n_args
[i
] = new_child
8460 new_child
.parent
= self
8462 _n_args
.remove_at
(i
)
8467 if _n_assign
== old_child
then
8468 if new_child
!= null then
8469 new_child
.parent
= self
8470 assert new_child
isa TAssign
8471 _n_assign
= new_child
8477 if _n_value
== old_child
then
8478 if new_child
!= null then
8479 new_child
.parent
= self
8480 assert new_child
isa PExpr
8481 _n_value
= new_child
8489 redef meth visit_all
(v
: Visitor)
8491 if _n_expr
!= null then
8494 if _n_id
!= null then
8500 if _n_assign
!= null then
8503 if _n_value
!= null then
8508 redef meth visit_all_reverse
(v
: Visitor)
8510 if _n_expr
!= null then
8513 if _n_id
!= null then
8517 var i
= _n_args
.length
8523 if _n_assign
!= null then
8526 if _n_value
!= null then
8531 redef class ACallReassignExpr
8532 redef meth n_expr
=(n
: PExpr)
8539 redef meth n_id
=(n
: TId)
8546 redef meth n_assign_op
=(n
: PAssignOp)
8553 redef meth n_value
=(n
: PExpr)
8561 private init empty_init
do end
8563 init init_acallreassignexpr
(
8566 n_args
: Array[Object] , # Should be Array[PExpr]
8567 n_assign_op
: PAssignOp ,
8573 if n_expr
!= null then
8574 n_expr
.parent
= self
8577 if n_id
!= null then
8580 _n_args
= new List[PExpr]
8586 _n_assign_op
= n_assign_op
8587 if n_assign_op
!= null then
8588 n_assign_op
.parent
= self
8591 if n_value
!= null then
8592 n_value
.parent
= self
8596 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8598 assert old_child
!= null
8599 if _n_expr
== old_child
then
8600 if new_child
!= null then
8601 new_child
.parent
= self
8602 assert new_child
isa PExpr
8609 if _n_id
== old_child
then
8610 if new_child
!= null then
8611 new_child
.parent
= self
8612 assert new_child
isa TId
8619 for i
in [0.._n_args
.length
[ do
8620 if _n_args
[i
] == old_child
then
8621 if new_child
!= null then
8622 assert new_child
isa PExpr
8623 _n_args
[i
] = new_child
8624 new_child
.parent
= self
8626 _n_args
.remove_at
(i
)
8631 if _n_assign_op
== old_child
then
8632 if new_child
!= null then
8633 new_child
.parent
= self
8634 assert new_child
isa PAssignOp
8635 _n_assign_op
= new_child
8641 if _n_value
== old_child
then
8642 if new_child
!= null then
8643 new_child
.parent
= self
8644 assert new_child
isa PExpr
8645 _n_value
= new_child
8653 redef meth visit_all
(v
: Visitor)
8655 if _n_expr
!= null then
8658 if _n_id
!= null then
8664 if _n_assign_op
!= null then
8665 v
.visit
(_n_assign_op
)
8667 if _n_value
!= null then
8672 redef meth visit_all_reverse
(v
: Visitor)
8674 if _n_expr
!= null then
8677 if _n_id
!= null then
8681 var i
= _n_args
.length
8687 if _n_assign_op
!= null then
8688 v
.visit
(_n_assign_op
)
8690 if _n_value
!= null then
8695 redef class ASuperExpr
8696 redef meth n_qualified
=(n
: PQualified)
8703 redef meth n_kwsuper
=(n
: TKwsuper)
8711 private init empty_init
do end
8713 init init_asuperexpr
(
8714 n_qualified
: PQualified ,
8715 n_kwsuper
: TKwsuper ,
8716 n_args
: Array[Object] # Should be Array[PExpr]
8720 _n_qualified
= n_qualified
8721 if n_qualified
!= null then
8722 n_qualified
.parent
= self
8724 _n_kwsuper
= n_kwsuper
8725 if n_kwsuper
!= null then
8726 n_kwsuper
.parent
= self
8728 _n_args
= new List[PExpr]
8736 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8738 assert old_child
!= null
8739 if _n_qualified
== old_child
then
8740 if new_child
!= null then
8741 new_child
.parent
= self
8742 assert new_child
isa PQualified
8743 _n_qualified
= new_child
8749 if _n_kwsuper
== old_child
then
8750 if new_child
!= null then
8751 new_child
.parent
= self
8752 assert new_child
isa TKwsuper
8753 _n_kwsuper
= new_child
8759 for i
in [0.._n_args
.length
[ do
8760 if _n_args
[i
] == old_child
then
8761 if new_child
!= null then
8762 assert new_child
isa PExpr
8763 _n_args
[i
] = new_child
8764 new_child
.parent
= self
8766 _n_args
.remove_at
(i
)
8773 redef meth visit_all
(v
: Visitor)
8775 if _n_qualified
!= null then
8776 v
.visit
(_n_qualified
)
8778 if _n_kwsuper
!= null then
8786 redef meth visit_all_reverse
(v
: Visitor)
8788 if _n_qualified
!= null then
8789 v
.visit
(_n_qualified
)
8791 if _n_kwsuper
!= null then
8795 var i
= _n_args
.length
8803 redef class AInitExpr
8804 redef meth n_expr
=(n
: PExpr)
8811 redef meth n_kwinit
=(n
: TKwinit)
8819 private init empty_init
do end
8821 init init_ainitexpr
(
8824 n_args
: Array[Object] # Should be Array[PExpr]
8829 if n_expr
!= null then
8830 n_expr
.parent
= self
8832 _n_kwinit
= n_kwinit
8833 if n_kwinit
!= null then
8834 n_kwinit
.parent
= self
8836 _n_args
= new List[PExpr]
8844 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8846 assert old_child
!= null
8847 if _n_expr
== old_child
then
8848 if new_child
!= null then
8849 new_child
.parent
= self
8850 assert new_child
isa PExpr
8857 if _n_kwinit
== old_child
then
8858 if new_child
!= null then
8859 new_child
.parent
= self
8860 assert new_child
isa TKwinit
8861 _n_kwinit
= new_child
8867 for i
in [0.._n_args
.length
[ do
8868 if _n_args
[i
] == old_child
then
8869 if new_child
!= null then
8870 assert new_child
isa PExpr
8871 _n_args
[i
] = new_child
8872 new_child
.parent
= self
8874 _n_args
.remove_at
(i
)
8881 redef meth visit_all
(v
: Visitor)
8883 if _n_expr
!= null then
8886 if _n_kwinit
!= null then
8894 redef meth visit_all_reverse
(v
: Visitor)
8896 if _n_expr
!= null then
8899 if _n_kwinit
!= null then
8903 var i
= _n_args
.length
8911 redef class ABraExpr
8912 redef meth n_expr
=(n
: PExpr)
8920 private init empty_init
do end
8922 init init_abraexpr
(
8924 n_args
: Array[Object] , # Should be Array[PExpr]
8925 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8930 if n_expr
!= null then
8931 n_expr
.parent
= self
8933 _n_args
= new List[PExpr]
8939 _n_closure_defs
= new List[PClosureDef]
8940 for n
in n_closure_defs
do
8941 assert n
isa PClosureDef
8942 _n_closure_defs
.add
(n
)
8947 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8949 assert old_child
!= null
8950 if _n_expr
== old_child
then
8951 if new_child
!= null then
8952 new_child
.parent
= self
8953 assert new_child
isa PExpr
8960 for i
in [0.._n_args
.length
[ do
8961 if _n_args
[i
] == old_child
then
8962 if new_child
!= null then
8963 assert new_child
isa PExpr
8964 _n_args
[i
] = new_child
8965 new_child
.parent
= self
8967 _n_args
.remove_at
(i
)
8972 for i
in [0.._n_closure_defs
.length
[ do
8973 if _n_closure_defs
[i
] == old_child
then
8974 if new_child
!= null then
8975 assert new_child
isa PClosureDef
8976 _n_closure_defs
[i
] = new_child
8977 new_child
.parent
= self
8979 _n_closure_defs
.remove_at
(i
)
8986 redef meth visit_all
(v
: Visitor)
8988 if _n_expr
!= null then
8994 for n
in _n_closure_defs
do
8999 redef meth visit_all_reverse
(v
: Visitor)
9001 if _n_expr
!= null then
9005 var i
= _n_args
.length
9012 var i
= _n_closure_defs
.length
9014 v
.visit
(_n_closure_defs
[i
])
9020 redef class ABraAssignExpr
9021 redef meth n_expr
=(n
: PExpr)
9028 redef meth n_assign
=(n
: TAssign)
9035 redef meth n_value
=(n
: PExpr)
9043 private init empty_init
do end
9045 init init_abraassignexpr
(
9047 n_args
: Array[Object] , # Should be Array[PExpr]
9054 if n_expr
!= null then
9055 n_expr
.parent
= self
9057 _n_args
= new List[PExpr]
9063 _n_assign
= n_assign
9064 if n_assign
!= null then
9065 n_assign
.parent
= self
9068 if n_value
!= null then
9069 n_value
.parent
= self
9073 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9075 assert old_child
!= null
9076 if _n_expr
== old_child
then
9077 if new_child
!= null then
9078 new_child
.parent
= self
9079 assert new_child
isa PExpr
9086 for i
in [0.._n_args
.length
[ do
9087 if _n_args
[i
] == old_child
then
9088 if new_child
!= null then
9089 assert new_child
isa PExpr
9090 _n_args
[i
] = new_child
9091 new_child
.parent
= self
9093 _n_args
.remove_at
(i
)
9098 if _n_assign
== old_child
then
9099 if new_child
!= null then
9100 new_child
.parent
= self
9101 assert new_child
isa TAssign
9102 _n_assign
= new_child
9108 if _n_value
== old_child
then
9109 if new_child
!= null then
9110 new_child
.parent
= self
9111 assert new_child
isa PExpr
9112 _n_value
= new_child
9120 redef meth visit_all
(v
: Visitor)
9122 if _n_expr
!= null then
9128 if _n_assign
!= null then
9131 if _n_value
!= null then
9136 redef meth visit_all_reverse
(v
: Visitor)
9138 if _n_expr
!= null then
9142 var i
= _n_args
.length
9148 if _n_assign
!= null then
9151 if _n_value
!= null then
9156 redef class ABraReassignExpr
9157 redef meth n_expr
=(n
: PExpr)
9164 redef meth n_assign_op
=(n
: PAssignOp)
9171 redef meth n_value
=(n
: PExpr)
9179 private init empty_init
do end
9181 init init_abrareassignexpr
(
9183 n_args
: Array[Object] , # Should be Array[PExpr]
9184 n_assign_op
: PAssignOp ,
9190 if n_expr
!= null then
9191 n_expr
.parent
= self
9193 _n_args
= new List[PExpr]
9199 _n_assign_op
= n_assign_op
9200 if n_assign_op
!= null then
9201 n_assign_op
.parent
= self
9204 if n_value
!= null then
9205 n_value
.parent
= self
9209 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9211 assert old_child
!= null
9212 if _n_expr
== old_child
then
9213 if new_child
!= null then
9214 new_child
.parent
= self
9215 assert new_child
isa PExpr
9222 for i
in [0.._n_args
.length
[ do
9223 if _n_args
[i
] == old_child
then
9224 if new_child
!= null then
9225 assert new_child
isa PExpr
9226 _n_args
[i
] = new_child
9227 new_child
.parent
= self
9229 _n_args
.remove_at
(i
)
9234 if _n_assign_op
== old_child
then
9235 if new_child
!= null then
9236 new_child
.parent
= self
9237 assert new_child
isa PAssignOp
9238 _n_assign_op
= new_child
9244 if _n_value
== old_child
then
9245 if new_child
!= null then
9246 new_child
.parent
= self
9247 assert new_child
isa PExpr
9248 _n_value
= new_child
9256 redef meth visit_all
(v
: Visitor)
9258 if _n_expr
!= null then
9264 if _n_assign_op
!= null then
9265 v
.visit
(_n_assign_op
)
9267 if _n_value
!= null then
9272 redef meth visit_all_reverse
(v
: Visitor)
9274 if _n_expr
!= null then
9278 var i
= _n_args
.length
9284 if _n_assign_op
!= null then
9285 v
.visit
(_n_assign_op
)
9287 if _n_value
!= null then
9292 redef class AVarExpr
9293 redef meth n_id
=(n
: TId)
9301 private init empty_init
do end
9303 init init_avarexpr
(
9309 if n_id
!= null then
9314 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9316 assert old_child
!= null
9317 if _n_id
== old_child
then
9318 if new_child
!= null then
9319 new_child
.parent
= self
9320 assert new_child
isa TId
9329 redef meth visit_all
(v
: Visitor)
9331 if _n_id
!= null then
9336 redef meth visit_all_reverse
(v
: Visitor)
9338 if _n_id
!= null then
9343 redef class AVarAssignExpr
9344 redef meth n_id
=(n
: TId)
9351 redef meth n_assign
=(n
: TAssign)
9358 redef meth n_value
=(n
: PExpr)
9366 private init empty_init
do end
9368 init init_avarassignexpr
(
9376 if n_id
!= null then
9379 _n_assign
= n_assign
9380 if n_assign
!= null then
9381 n_assign
.parent
= self
9384 if n_value
!= null then
9385 n_value
.parent
= self
9389 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9391 assert old_child
!= null
9392 if _n_id
== old_child
then
9393 if new_child
!= null then
9394 new_child
.parent
= self
9395 assert new_child
isa TId
9402 if _n_assign
== old_child
then
9403 if new_child
!= null then
9404 new_child
.parent
= self
9405 assert new_child
isa TAssign
9406 _n_assign
= new_child
9412 if _n_value
== old_child
then
9413 if new_child
!= null then
9414 new_child
.parent
= self
9415 assert new_child
isa PExpr
9416 _n_value
= new_child
9424 redef meth visit_all
(v
: Visitor)
9426 if _n_id
!= null then
9429 if _n_assign
!= null then
9432 if _n_value
!= null then
9437 redef meth visit_all_reverse
(v
: Visitor)
9439 if _n_id
!= null then
9442 if _n_assign
!= null then
9445 if _n_value
!= null then
9450 redef class AVarReassignExpr
9451 redef meth n_id
=(n
: TId)
9458 redef meth n_assign_op
=(n
: PAssignOp)
9465 redef meth n_value
=(n
: PExpr)
9473 private init empty_init
do end
9475 init init_avarreassignexpr
(
9477 n_assign_op
: PAssignOp ,
9483 if n_id
!= null then
9486 _n_assign_op
= n_assign_op
9487 if n_assign_op
!= null then
9488 n_assign_op
.parent
= self
9491 if n_value
!= null then
9492 n_value
.parent
= self
9496 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9498 assert old_child
!= null
9499 if _n_id
== old_child
then
9500 if new_child
!= null then
9501 new_child
.parent
= self
9502 assert new_child
isa TId
9509 if _n_assign_op
== old_child
then
9510 if new_child
!= null then
9511 new_child
.parent
= self
9512 assert new_child
isa PAssignOp
9513 _n_assign_op
= new_child
9519 if _n_value
== old_child
then
9520 if new_child
!= null then
9521 new_child
.parent
= self
9522 assert new_child
isa PExpr
9523 _n_value
= new_child
9531 redef meth visit_all
(v
: Visitor)
9533 if _n_id
!= null then
9536 if _n_assign_op
!= null then
9537 v
.visit
(_n_assign_op
)
9539 if _n_value
!= null then
9544 redef meth visit_all_reverse
(v
: Visitor)
9546 if _n_id
!= null then
9549 if _n_assign_op
!= null then
9550 v
.visit
(_n_assign_op
)
9552 if _n_value
!= null then
9557 redef class ARangeExpr
9558 redef meth n_expr
=(n
: PExpr)
9565 redef meth n_expr2
=(n
: PExpr)
9573 private init empty_init
do end
9575 init init_arangeexpr
(
9582 if n_expr
!= null then
9583 n_expr
.parent
= self
9586 if n_expr2
!= null then
9587 n_expr2
.parent
= self
9591 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9593 assert old_child
!= null
9594 if _n_expr
== old_child
then
9595 if new_child
!= null then
9596 new_child
.parent
= self
9597 assert new_child
isa PExpr
9604 if _n_expr2
== old_child
then
9605 if new_child
!= null then
9606 new_child
.parent
= self
9607 assert new_child
isa PExpr
9608 _n_expr2
= new_child
9616 redef meth visit_all
(v
: Visitor)
9618 if _n_expr
!= null then
9621 if _n_expr2
!= null then
9626 redef meth visit_all_reverse
(v
: Visitor)
9628 if _n_expr
!= null then
9631 if _n_expr2
!= null then
9636 redef class ACrangeExpr
9637 redef meth n_expr
=(n
: PExpr)
9644 redef meth n_expr2
=(n
: PExpr)
9652 private init empty_init
do end
9654 init init_acrangeexpr
(
9661 if n_expr
!= null then
9662 n_expr
.parent
= self
9665 if n_expr2
!= null then
9666 n_expr2
.parent
= self
9670 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9672 assert old_child
!= null
9673 if _n_expr
== old_child
then
9674 if new_child
!= null then
9675 new_child
.parent
= self
9676 assert new_child
isa PExpr
9683 if _n_expr2
== old_child
then
9684 if new_child
!= null then
9685 new_child
.parent
= self
9686 assert new_child
isa PExpr
9687 _n_expr2
= new_child
9695 redef meth visit_all
(v
: Visitor)
9697 if _n_expr
!= null then
9700 if _n_expr2
!= null then
9705 redef meth visit_all_reverse
(v
: Visitor)
9707 if _n_expr
!= null then
9710 if _n_expr2
!= null then
9715 redef class AOrangeExpr
9716 redef meth n_expr
=(n
: PExpr)
9723 redef meth n_expr2
=(n
: PExpr)
9731 private init empty_init
do end
9733 init init_aorangeexpr
(
9740 if n_expr
!= null then
9741 n_expr
.parent
= self
9744 if n_expr2
!= null then
9745 n_expr2
.parent
= self
9749 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9751 assert old_child
!= null
9752 if _n_expr
== old_child
then
9753 if new_child
!= null then
9754 new_child
.parent
= self
9755 assert new_child
isa PExpr
9762 if _n_expr2
== old_child
then
9763 if new_child
!= null then
9764 new_child
.parent
= self
9765 assert new_child
isa PExpr
9766 _n_expr2
= new_child
9774 redef meth visit_all
(v
: Visitor)
9776 if _n_expr
!= null then
9779 if _n_expr2
!= null then
9784 redef meth visit_all_reverse
(v
: Visitor)
9786 if _n_expr
!= null then
9789 if _n_expr2
!= null then
9794 redef class AArrayExpr
9796 private init empty_init
do end
9798 init init_aarrayexpr
(
9799 n_exprs
: Array[Object] # Should be Array[PExpr]
9803 _n_exprs
= new List[PExpr]
9811 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9813 assert old_child
!= null
9814 for i
in [0.._n_exprs
.length
[ do
9815 if _n_exprs
[i
] == old_child
then
9816 if new_child
!= null then
9817 assert new_child
isa PExpr
9818 _n_exprs
[i
] = new_child
9819 new_child
.parent
= self
9821 _n_exprs
.remove_at
(i
)
9828 redef meth visit_all
(v
: Visitor)
9830 for n
in _n_exprs
do
9835 redef meth visit_all_reverse
(v
: Visitor)
9838 var i
= _n_exprs
.length
9840 v
.visit
(_n_exprs
[i
])
9846 redef class ASelfExpr
9847 redef meth n_kwself
=(n
: TKwself)
9855 private init empty_init
do end
9857 init init_aselfexpr
(
9862 _n_kwself
= n_kwself
9863 if n_kwself
!= null then
9864 n_kwself
.parent
= self
9868 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9870 assert old_child
!= null
9871 if _n_kwself
== old_child
then
9872 if new_child
!= null then
9873 new_child
.parent
= self
9874 assert new_child
isa TKwself
9875 _n_kwself
= new_child
9883 redef meth visit_all
(v
: Visitor)
9885 if _n_kwself
!= null then
9890 redef meth visit_all_reverse
(v
: Visitor)
9892 if _n_kwself
!= null then
9897 redef class AImplicitSelfExpr
9899 private init empty_init
do end
9901 init init_aimplicitselfexpr
9906 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9908 assert old_child
!= null
9911 redef meth visit_all
(v
: Visitor)
9915 redef meth visit_all_reverse
(v
: Visitor)
9919 redef class ATrueExpr
9920 redef meth n_kwtrue
=(n
: TKwtrue)
9928 private init empty_init
do end
9930 init init_atrueexpr
(
9935 _n_kwtrue
= n_kwtrue
9936 if n_kwtrue
!= null then
9937 n_kwtrue
.parent
= self
9941 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9943 assert old_child
!= null
9944 if _n_kwtrue
== old_child
then
9945 if new_child
!= null then
9946 new_child
.parent
= self
9947 assert new_child
isa TKwtrue
9948 _n_kwtrue
= new_child
9956 redef meth visit_all
(v
: Visitor)
9958 if _n_kwtrue
!= null then
9963 redef meth visit_all_reverse
(v
: Visitor)
9965 if _n_kwtrue
!= null then
9970 redef class AFalseExpr
9971 redef meth n_kwfalse
=(n
: TKwfalse)
9979 private init empty_init
do end
9981 init init_afalseexpr
(
9986 _n_kwfalse
= n_kwfalse
9987 if n_kwfalse
!= null then
9988 n_kwfalse
.parent
= self
9992 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9994 assert old_child
!= null
9995 if _n_kwfalse
== old_child
then
9996 if new_child
!= null then
9997 new_child
.parent
= self
9998 assert new_child
isa TKwfalse
9999 _n_kwfalse
= new_child
10007 redef meth visit_all
(v
: Visitor)
10009 if _n_kwfalse
!= null then
10010 v
.visit
(_n_kwfalse
)
10014 redef meth visit_all_reverse
(v
: Visitor)
10016 if _n_kwfalse
!= null then
10017 v
.visit
(_n_kwfalse
)
10021 redef class ANullExpr
10022 redef meth n_kwnull
=(n
: TKwnull)
10030 private init empty_init
do end
10032 init init_anullexpr
(
10037 _n_kwnull
= n_kwnull
10038 if n_kwnull
!= null then
10039 n_kwnull
.parent
= self
10043 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10045 assert old_child
!= null
10046 if _n_kwnull
== old_child
then
10047 if new_child
!= null then
10048 new_child
.parent
= self
10049 assert new_child
isa TKwnull
10050 _n_kwnull
= new_child
10058 redef meth visit_all
(v
: Visitor)
10060 if _n_kwnull
!= null then
10065 redef meth visit_all_reverse
(v
: Visitor)
10067 if _n_kwnull
!= null then
10072 redef class AIntExpr
10073 redef meth n_number
=(n
: TNumber)
10081 private init empty_init
do end
10083 init init_aintexpr
(
10088 _n_number
= n_number
10089 if n_number
!= null then
10090 n_number
.parent
= self
10094 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10096 assert old_child
!= null
10097 if _n_number
== old_child
then
10098 if new_child
!= null then
10099 new_child
.parent
= self
10100 assert new_child
isa TNumber
10101 _n_number
= new_child
10109 redef meth visit_all
(v
: Visitor)
10111 if _n_number
!= null then
10116 redef meth visit_all_reverse
(v
: Visitor)
10118 if _n_number
!= null then
10123 redef class AFloatExpr
10124 redef meth n_float
=(n
: TFloat)
10132 private init empty_init
do end
10134 init init_afloatexpr
(
10140 if n_float
!= null then
10141 n_float
.parent
= self
10145 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10147 assert old_child
!= null
10148 if _n_float
== old_child
then
10149 if new_child
!= null then
10150 new_child
.parent
= self
10151 assert new_child
isa TFloat
10152 _n_float
= new_child
10160 redef meth visit_all
(v
: Visitor)
10162 if _n_float
!= null then
10167 redef meth visit_all_reverse
(v
: Visitor)
10169 if _n_float
!= null then
10174 redef class ACharExpr
10175 redef meth n_char
=(n
: TChar)
10183 private init empty_init
do end
10185 init init_acharexpr
(
10191 if n_char
!= null then
10192 n_char
.parent
= self
10196 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10198 assert old_child
!= null
10199 if _n_char
== old_child
then
10200 if new_child
!= null then
10201 new_child
.parent
= self
10202 assert new_child
isa TChar
10203 _n_char
= new_child
10211 redef meth visit_all
(v
: Visitor)
10213 if _n_char
!= null then
10218 redef meth visit_all_reverse
(v
: Visitor)
10220 if _n_char
!= null then
10225 redef class AStringExpr
10226 redef meth n_string
=(n
: TString)
10234 private init empty_init
do end
10236 init init_astringexpr
(
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 TString
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 AStartStringExpr
10277 redef meth n_string
=(n
: TStartString)
10285 private init empty_init
do end
10287 init init_astartstringexpr
(
10288 n_string
: TStartString
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 TStartString
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 AMidStringExpr
10328 redef meth n_string
=(n
: TMidString)
10336 private init empty_init
do end
10338 init init_amidstringexpr
(
10339 n_string
: TMidString
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 TMidString
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 AEndStringExpr
10379 redef meth n_string
=(n
: TEndString)
10387 private init empty_init
do end
10389 init init_aendstringexpr
(
10390 n_string
: TEndString
10394 _n_string
= n_string
10395 if n_string
!= null then
10396 n_string
.parent
= self
10400 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10402 assert old_child
!= null
10403 if _n_string
== old_child
then
10404 if new_child
!= null then
10405 new_child
.parent
= self
10406 assert new_child
isa TEndString
10407 _n_string
= new_child
10415 redef meth visit_all
(v
: Visitor)
10417 if _n_string
!= null then
10422 redef meth visit_all_reverse
(v
: Visitor)
10424 if _n_string
!= null then
10429 redef class ASuperstringExpr
10431 private init empty_init
do end
10433 init init_asuperstringexpr
(
10434 n_exprs
: Array[Object] # Should be Array[PExpr]
10438 _n_exprs
= new List[PExpr]
10439 for n
in n_exprs
do
10446 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10448 assert old_child
!= null
10449 for i
in [0.._n_exprs
.length
[ do
10450 if _n_exprs
[i
] == old_child
then
10451 if new_child
!= null then
10452 assert new_child
isa PExpr
10453 _n_exprs
[i
] = new_child
10454 new_child
.parent
= self
10456 _n_exprs
.remove_at
(i
)
10463 redef meth visit_all
(v
: Visitor)
10465 for n
in _n_exprs
do
10470 redef meth visit_all_reverse
(v
: Visitor)
10473 var i
= _n_exprs
.length
10475 v
.visit
(_n_exprs
[i
])
10481 redef class AParExpr
10482 redef meth n_expr
=(n
: PExpr)
10490 private init empty_init
do end
10492 init init_aparexpr
(
10498 if n_expr
!= null then
10499 n_expr
.parent
= self
10503 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10505 assert old_child
!= null
10506 if _n_expr
== old_child
then
10507 if new_child
!= null then
10508 new_child
.parent
= self
10509 assert new_child
isa PExpr
10510 _n_expr
= new_child
10518 redef meth visit_all
(v
: Visitor)
10520 if _n_expr
!= null then
10525 redef meth visit_all_reverse
(v
: Visitor)
10527 if _n_expr
!= null then
10532 redef class AAsCastExpr
10533 redef meth n_expr
=(n
: PExpr)
10540 redef meth n_kwas
=(n
: TKwas)
10547 redef meth n_type
=(n
: PType)
10555 private init empty_init
do end
10557 init init_aascastexpr
(
10565 if n_expr
!= null then
10566 n_expr
.parent
= self
10569 if n_kwas
!= null then
10570 n_kwas
.parent
= self
10573 if n_type
!= null then
10574 n_type
.parent
= self
10578 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10580 assert old_child
!= null
10581 if _n_expr
== old_child
then
10582 if new_child
!= null then
10583 new_child
.parent
= self
10584 assert new_child
isa PExpr
10585 _n_expr
= new_child
10591 if _n_kwas
== old_child
then
10592 if new_child
!= null then
10593 new_child
.parent
= self
10594 assert new_child
isa TKwas
10595 _n_kwas
= new_child
10601 if _n_type
== old_child
then
10602 if new_child
!= null then
10603 new_child
.parent
= self
10604 assert new_child
isa PType
10605 _n_type
= new_child
10613 redef meth visit_all
(v
: Visitor)
10615 if _n_expr
!= null then
10618 if _n_kwas
!= null then
10621 if _n_type
!= null then
10626 redef meth visit_all_reverse
(v
: Visitor)
10628 if _n_expr
!= null then
10631 if _n_kwas
!= null then
10634 if _n_type
!= null then
10639 redef class APlusAssignOp
10640 redef meth n_pluseq
=(n
: TPluseq)
10648 private init empty_init
do end
10650 init init_aplusassignop
(
10655 _n_pluseq
= n_pluseq
10656 if n_pluseq
!= null then
10657 n_pluseq
.parent
= self
10661 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10663 assert old_child
!= null
10664 if _n_pluseq
== old_child
then
10665 if new_child
!= null then
10666 new_child
.parent
= self
10667 assert new_child
isa TPluseq
10668 _n_pluseq
= new_child
10676 redef meth visit_all
(v
: Visitor)
10678 if _n_pluseq
!= null then
10683 redef meth visit_all_reverse
(v
: Visitor)
10685 if _n_pluseq
!= null then
10690 redef class AMinusAssignOp
10691 redef meth n_minuseq
=(n
: TMinuseq)
10699 private init empty_init
do end
10701 init init_aminusassignop
(
10702 n_minuseq
: TMinuseq
10706 _n_minuseq
= n_minuseq
10707 if n_minuseq
!= null then
10708 n_minuseq
.parent
= self
10712 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10714 assert old_child
!= null
10715 if _n_minuseq
== old_child
then
10716 if new_child
!= null then
10717 new_child
.parent
= self
10718 assert new_child
isa TMinuseq
10719 _n_minuseq
= new_child
10727 redef meth visit_all
(v
: Visitor)
10729 if _n_minuseq
!= null then
10730 v
.visit
(_n_minuseq
)
10734 redef meth visit_all_reverse
(v
: Visitor)
10736 if _n_minuseq
!= null then
10737 v
.visit
(_n_minuseq
)
10741 redef class AClosureDef
10742 redef meth n_kwwith
=(n
: TKwwith)
10749 redef meth n_kwdo
=(n
: TKwdo)
10756 redef meth n_expr
=(n
: PExpr)
10764 private init empty_init
do end
10766 init init_aclosuredef
(
10767 n_kwwith
: TKwwith ,
10768 n_id
: Array[Object] , # Should be Array[TId]
10774 _n_kwwith
= n_kwwith
10775 if n_kwwith
!= null then
10776 n_kwwith
.parent
= self
10778 _n_id
= new List[TId]
10785 if n_kwdo
!= null then
10786 n_kwdo
.parent
= self
10789 if n_expr
!= null then
10790 n_expr
.parent
= self
10794 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10796 assert old_child
!= null
10797 if _n_kwwith
== old_child
then
10798 if new_child
!= null then
10799 new_child
.parent
= self
10800 assert new_child
isa TKwwith
10801 _n_kwwith
= new_child
10807 for i
in [0.._n_id
.length
[ do
10808 if _n_id
[i
] == old_child
then
10809 if new_child
!= null then
10810 assert new_child
isa TId
10811 _n_id
[i
] = new_child
10812 new_child
.parent
= self
10819 if _n_kwdo
== old_child
then
10820 if new_child
!= null then
10821 new_child
.parent
= self
10822 assert new_child
isa TKwdo
10823 _n_kwdo
= new_child
10829 if _n_expr
== old_child
then
10830 if new_child
!= null then
10831 new_child
.parent
= self
10832 assert new_child
isa PExpr
10833 _n_expr
= new_child
10841 redef meth visit_all
(v
: Visitor)
10843 if _n_kwwith
!= null then
10849 if _n_kwdo
!= null then
10852 if _n_expr
!= null then
10857 redef meth visit_all_reverse
(v
: Visitor)
10859 if _n_kwwith
!= null then
10863 var i
= _n_id
.length
10869 if _n_kwdo
!= null then
10872 if _n_expr
!= null then
10877 redef class AQualified
10878 redef meth n_classid
=(n
: TClassid)
10886 private init empty_init
do end
10888 init init_aqualified
(
10889 n_id
: Array[Object] , # Should be Array[TId]
10890 n_classid
: TClassid
10894 _n_id
= new List[TId]
10900 _n_classid
= n_classid
10901 if n_classid
!= null then
10902 n_classid
.parent
= self
10906 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10908 assert old_child
!= null
10909 for i
in [0.._n_id
.length
[ do
10910 if _n_id
[i
] == old_child
then
10911 if new_child
!= null then
10912 assert new_child
isa TId
10913 _n_id
[i
] = new_child
10914 new_child
.parent
= self
10921 if _n_classid
== old_child
then
10922 if new_child
!= null then
10923 new_child
.parent
= self
10924 assert new_child
isa TClassid
10925 _n_classid
= new_child
10933 redef meth visit_all
(v
: Visitor)
10938 if _n_classid
!= null then
10939 v
.visit
(_n_classid
)
10943 redef meth visit_all_reverse
(v
: Visitor)
10946 var i
= _n_id
.length
10952 if _n_classid
!= null then
10953 v
.visit
(_n_classid
)
10959 private init empty_init
do end
10962 n_comment
: Array[Object] # Should be Array[TComment]
10966 _n_comment
= new List[TComment]
10967 for n
in n_comment
do
10968 assert n
isa TComment
10974 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10976 assert old_child
!= null
10977 for i
in [0.._n_comment
.length
[ do
10978 if _n_comment
[i
] == old_child
then
10979 if new_child
!= null then
10980 assert new_child
isa TComment
10981 _n_comment
[i
] = new_child
10982 new_child
.parent
= self
10984 _n_comment
.remove_at
(i
)
10991 redef meth visit_all
(v
: Visitor)
10993 for n
in _n_comment
do
10998 redef meth visit_all_reverse
(v
: Visitor)
11001 var i
= _n_comment
.length
11003 v
.visit
(_n_comment
[i
])
11019 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11021 assert old_child
!= null
11022 if _n_base
== old_child
then
11023 if new_child
== null then
11025 new_child
.parent
= self
11026 assert new_child
isa PModule
11027 _n_base
= new_child
11029 old_child
.parent
= null
11034 redef meth visit_all
(v
: Visitor)
11036 if _n_base
!= null then
11041 redef meth visit_all_reverse
(v
: Visitor)
11043 if _n_base
!= null then