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_kwvar
=(n
: TKwvar)
1508 redef meth n_id
=(n
: TAttrid)
1515 redef meth n_type
=(n
: PType)
1522 redef meth n_expr
=(n
: PExpr)
1530 private init empty_init
do end
1532 init init_aattrpropdef
(
1536 n_kwredef
: TKwredef ,
1537 n_visibility
: PVisibility ,
1547 if n_doc
!= null then
1550 _n_readable
= n_readable
1551 if n_readable
!= null then
1552 n_readable
.parent
= self
1554 _n_writable
= n_writable
1555 if n_writable
!= null then
1556 n_writable
.parent
= self
1558 _n_kwredef
= n_kwredef
1559 if n_kwredef
!= null then
1560 n_kwredef
.parent
= self
1562 _n_visibility
= n_visibility
1563 if n_visibility
!= null then
1564 n_visibility
.parent
= self
1566 _n_kwattr
= n_kwattr
1567 if n_kwattr
!= null then
1568 n_kwattr
.parent
= self
1571 if n_kwvar
!= null then
1572 n_kwvar
.parent
= self
1575 if n_id
!= null then
1579 if n_type
!= null then
1580 n_type
.parent
= self
1583 if n_expr
!= null then
1584 n_expr
.parent
= self
1588 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1590 assert old_child
!= null
1591 if _n_doc
== old_child
then
1592 if new_child
!= null then
1593 new_child
.parent
= self
1594 assert new_child
isa PDoc
1601 if _n_readable
== old_child
then
1602 if new_child
!= null then
1603 new_child
.parent
= self
1604 assert new_child
isa PAble
1605 _n_readable
= new_child
1611 if _n_writable
== old_child
then
1612 if new_child
!= null then
1613 new_child
.parent
= self
1614 assert new_child
isa PAble
1615 _n_writable
= new_child
1621 if _n_kwredef
== old_child
then
1622 if new_child
!= null then
1623 new_child
.parent
= self
1624 assert new_child
isa TKwredef
1625 _n_kwredef
= new_child
1631 if _n_visibility
== old_child
then
1632 if new_child
!= null then
1633 new_child
.parent
= self
1634 assert new_child
isa PVisibility
1635 _n_visibility
= new_child
1637 _n_visibility
= null
1641 if _n_kwattr
== old_child
then
1642 if new_child
!= null then
1643 new_child
.parent
= self
1644 assert new_child
isa TKwattr
1645 _n_kwattr
= new_child
1651 if _n_kwvar
== old_child
then
1652 if new_child
!= null then
1653 new_child
.parent
= self
1654 assert new_child
isa TKwvar
1655 _n_kwvar
= new_child
1661 if _n_id
== old_child
then
1662 if new_child
!= null then
1663 new_child
.parent
= self
1664 assert new_child
isa TAttrid
1671 if _n_type
== old_child
then
1672 if new_child
!= null then
1673 new_child
.parent
= self
1674 assert new_child
isa PType
1681 if _n_expr
== old_child
then
1682 if new_child
!= null then
1683 new_child
.parent
= self
1684 assert new_child
isa PExpr
1693 redef meth visit_all
(v
: Visitor)
1695 if _n_doc
!= null then
1698 if _n_readable
!= null then
1699 v
.visit
(_n_readable
)
1701 if _n_writable
!= null then
1702 v
.visit
(_n_writable
)
1704 if _n_kwredef
!= null then
1707 if _n_visibility
!= null then
1708 v
.visit
(_n_visibility
)
1710 if _n_kwattr
!= null then
1713 if _n_kwvar
!= null then
1716 if _n_id
!= null then
1719 if _n_type
!= null then
1722 if _n_expr
!= null then
1727 redef meth visit_all_reverse
(v
: Visitor)
1729 if _n_doc
!= null then
1732 if _n_readable
!= null then
1733 v
.visit
(_n_readable
)
1735 if _n_writable
!= null then
1736 v
.visit
(_n_writable
)
1738 if _n_kwredef
!= null then
1741 if _n_visibility
!= null then
1742 v
.visit
(_n_visibility
)
1744 if _n_kwattr
!= null then
1747 if _n_kwvar
!= null then
1750 if _n_id
!= null then
1753 if _n_type
!= null then
1756 if _n_expr
!= null then
1761 redef class AMethPropdef
1762 redef meth n_doc
=(n
: PDoc)
1769 redef meth n_kwredef
=(n
: TKwredef)
1776 redef meth n_visibility
=(n
: PVisibility)
1783 redef meth n_methid
=(n
: PMethid)
1790 redef meth n_signature
=(n
: PSignature)
1798 private init empty_init
do end
1800 init init_amethpropdef
(
1802 n_kwredef
: TKwredef ,
1803 n_visibility
: PVisibility ,
1805 n_signature
: PSignature
1810 if n_doc
!= null then
1813 _n_kwredef
= n_kwredef
1814 if n_kwredef
!= null then
1815 n_kwredef
.parent
= self
1817 _n_visibility
= n_visibility
1818 if n_visibility
!= null then
1819 n_visibility
.parent
= self
1821 _n_methid
= n_methid
1822 if n_methid
!= null then
1823 n_methid
.parent
= self
1825 _n_signature
= n_signature
1826 if n_signature
!= null then
1827 n_signature
.parent
= self
1831 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1833 assert old_child
!= null
1834 if _n_doc
== old_child
then
1835 if new_child
!= null then
1836 new_child
.parent
= self
1837 assert new_child
isa PDoc
1844 if _n_kwredef
== old_child
then
1845 if new_child
!= null then
1846 new_child
.parent
= self
1847 assert new_child
isa TKwredef
1848 _n_kwredef
= new_child
1854 if _n_visibility
== old_child
then
1855 if new_child
!= null then
1856 new_child
.parent
= self
1857 assert new_child
isa PVisibility
1858 _n_visibility
= new_child
1860 _n_visibility
= null
1864 if _n_methid
== old_child
then
1865 if new_child
!= null then
1866 new_child
.parent
= self
1867 assert new_child
isa PMethid
1868 _n_methid
= new_child
1874 if _n_signature
== old_child
then
1875 if new_child
!= null then
1876 new_child
.parent
= self
1877 assert new_child
isa PSignature
1878 _n_signature
= new_child
1886 redef meth visit_all
(v
: Visitor)
1888 if _n_doc
!= null then
1891 if _n_kwredef
!= null then
1894 if _n_visibility
!= null then
1895 v
.visit
(_n_visibility
)
1897 if _n_methid
!= null then
1900 if _n_signature
!= null then
1901 v
.visit
(_n_signature
)
1905 redef meth visit_all_reverse
(v
: Visitor)
1907 if _n_doc
!= null then
1910 if _n_kwredef
!= null then
1913 if _n_visibility
!= null then
1914 v
.visit
(_n_visibility
)
1916 if _n_methid
!= null then
1919 if _n_signature
!= null then
1920 v
.visit
(_n_signature
)
1924 redef class ADeferredMethPropdef
1925 redef meth n_doc
=(n
: PDoc)
1932 redef meth n_kwredef
=(n
: TKwredef)
1939 redef meth n_visibility
=(n
: PVisibility)
1946 redef meth n_kwmeth
=(n
: TKwmeth)
1953 redef meth n_methid
=(n
: PMethid)
1960 redef meth n_signature
=(n
: PSignature)
1968 private init empty_init
do end
1970 init init_adeferredmethpropdef
(
1972 n_kwredef
: TKwredef ,
1973 n_visibility
: PVisibility ,
1976 n_signature
: PSignature
1981 if n_doc
!= null then
1984 _n_kwredef
= n_kwredef
1985 if n_kwredef
!= null then
1986 n_kwredef
.parent
= self
1988 _n_visibility
= n_visibility
1989 if n_visibility
!= null then
1990 n_visibility
.parent
= self
1992 _n_kwmeth
= n_kwmeth
1993 if n_kwmeth
!= null then
1994 n_kwmeth
.parent
= self
1996 _n_methid
= n_methid
1997 if n_methid
!= null then
1998 n_methid
.parent
= self
2000 _n_signature
= n_signature
2001 if n_signature
!= null then
2002 n_signature
.parent
= self
2006 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2008 assert old_child
!= null
2009 if _n_doc
== old_child
then
2010 if new_child
!= null then
2011 new_child
.parent
= self
2012 assert new_child
isa PDoc
2019 if _n_kwredef
== old_child
then
2020 if new_child
!= null then
2021 new_child
.parent
= self
2022 assert new_child
isa TKwredef
2023 _n_kwredef
= new_child
2029 if _n_visibility
== old_child
then
2030 if new_child
!= null then
2031 new_child
.parent
= self
2032 assert new_child
isa PVisibility
2033 _n_visibility
= new_child
2035 _n_visibility
= null
2039 if _n_kwmeth
== old_child
then
2040 if new_child
!= null then
2041 new_child
.parent
= self
2042 assert new_child
isa TKwmeth
2043 _n_kwmeth
= new_child
2049 if _n_methid
== old_child
then
2050 if new_child
!= null then
2051 new_child
.parent
= self
2052 assert new_child
isa PMethid
2053 _n_methid
= new_child
2059 if _n_signature
== old_child
then
2060 if new_child
!= null then
2061 new_child
.parent
= self
2062 assert new_child
isa PSignature
2063 _n_signature
= new_child
2071 redef meth visit_all
(v
: Visitor)
2073 if _n_doc
!= null then
2076 if _n_kwredef
!= null then
2079 if _n_visibility
!= null then
2080 v
.visit
(_n_visibility
)
2082 if _n_kwmeth
!= null then
2085 if _n_methid
!= null then
2088 if _n_signature
!= null then
2089 v
.visit
(_n_signature
)
2093 redef meth visit_all_reverse
(v
: Visitor)
2095 if _n_doc
!= null then
2098 if _n_kwredef
!= null then
2101 if _n_visibility
!= null then
2102 v
.visit
(_n_visibility
)
2104 if _n_kwmeth
!= null then
2107 if _n_methid
!= null then
2110 if _n_signature
!= null then
2111 v
.visit
(_n_signature
)
2115 redef class AInternMethPropdef
2116 redef meth n_doc
=(n
: PDoc)
2123 redef meth n_kwredef
=(n
: TKwredef)
2130 redef meth n_visibility
=(n
: PVisibility)
2137 redef meth n_kwmeth
=(n
: TKwmeth)
2144 redef meth n_methid
=(n
: PMethid)
2151 redef meth n_signature
=(n
: PSignature)
2159 private init empty_init
do end
2161 init init_ainternmethpropdef
(
2163 n_kwredef
: TKwredef ,
2164 n_visibility
: PVisibility ,
2167 n_signature
: PSignature
2172 if n_doc
!= null then
2175 _n_kwredef
= n_kwredef
2176 if n_kwredef
!= null then
2177 n_kwredef
.parent
= self
2179 _n_visibility
= n_visibility
2180 if n_visibility
!= null then
2181 n_visibility
.parent
= self
2183 _n_kwmeth
= n_kwmeth
2184 if n_kwmeth
!= null then
2185 n_kwmeth
.parent
= self
2187 _n_methid
= n_methid
2188 if n_methid
!= null then
2189 n_methid
.parent
= self
2191 _n_signature
= n_signature
2192 if n_signature
!= null then
2193 n_signature
.parent
= self
2197 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2199 assert old_child
!= null
2200 if _n_doc
== old_child
then
2201 if new_child
!= null then
2202 new_child
.parent
= self
2203 assert new_child
isa PDoc
2210 if _n_kwredef
== old_child
then
2211 if new_child
!= null then
2212 new_child
.parent
= self
2213 assert new_child
isa TKwredef
2214 _n_kwredef
= new_child
2220 if _n_visibility
== old_child
then
2221 if new_child
!= null then
2222 new_child
.parent
= self
2223 assert new_child
isa PVisibility
2224 _n_visibility
= new_child
2226 _n_visibility
= null
2230 if _n_kwmeth
== old_child
then
2231 if new_child
!= null then
2232 new_child
.parent
= self
2233 assert new_child
isa TKwmeth
2234 _n_kwmeth
= new_child
2240 if _n_methid
== old_child
then
2241 if new_child
!= null then
2242 new_child
.parent
= self
2243 assert new_child
isa PMethid
2244 _n_methid
= new_child
2250 if _n_signature
== old_child
then
2251 if new_child
!= null then
2252 new_child
.parent
= self
2253 assert new_child
isa PSignature
2254 _n_signature
= new_child
2262 redef meth visit_all
(v
: Visitor)
2264 if _n_doc
!= null then
2267 if _n_kwredef
!= null then
2270 if _n_visibility
!= null then
2271 v
.visit
(_n_visibility
)
2273 if _n_kwmeth
!= null then
2276 if _n_methid
!= null then
2279 if _n_signature
!= null then
2280 v
.visit
(_n_signature
)
2284 redef meth visit_all_reverse
(v
: Visitor)
2286 if _n_doc
!= null then
2289 if _n_kwredef
!= null then
2292 if _n_visibility
!= null then
2293 v
.visit
(_n_visibility
)
2295 if _n_kwmeth
!= null then
2298 if _n_methid
!= null then
2301 if _n_signature
!= null then
2302 v
.visit
(_n_signature
)
2306 redef class AExternMethPropdef
2307 redef meth n_doc
=(n
: PDoc)
2314 redef meth n_kwredef
=(n
: TKwredef)
2321 redef meth n_visibility
=(n
: PVisibility)
2328 redef meth n_kwmeth
=(n
: TKwmeth)
2335 redef meth n_methid
=(n
: PMethid)
2342 redef meth n_signature
=(n
: PSignature)
2349 redef meth n_extern
=(n
: TString)
2357 private init empty_init
do end
2359 init init_aexternmethpropdef
(
2361 n_kwredef
: TKwredef ,
2362 n_visibility
: PVisibility ,
2365 n_signature
: PSignature ,
2371 if n_doc
!= null then
2374 _n_kwredef
= n_kwredef
2375 if n_kwredef
!= null then
2376 n_kwredef
.parent
= self
2378 _n_visibility
= n_visibility
2379 if n_visibility
!= null then
2380 n_visibility
.parent
= self
2382 _n_kwmeth
= n_kwmeth
2383 if n_kwmeth
!= null then
2384 n_kwmeth
.parent
= self
2386 _n_methid
= n_methid
2387 if n_methid
!= null then
2388 n_methid
.parent
= self
2390 _n_signature
= n_signature
2391 if n_signature
!= null then
2392 n_signature
.parent
= self
2394 _n_extern
= n_extern
2395 if n_extern
!= null then
2396 n_extern
.parent
= self
2400 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2402 assert old_child
!= null
2403 if _n_doc
== old_child
then
2404 if new_child
!= null then
2405 new_child
.parent
= self
2406 assert new_child
isa PDoc
2413 if _n_kwredef
== old_child
then
2414 if new_child
!= null then
2415 new_child
.parent
= self
2416 assert new_child
isa TKwredef
2417 _n_kwredef
= new_child
2423 if _n_visibility
== old_child
then
2424 if new_child
!= null then
2425 new_child
.parent
= self
2426 assert new_child
isa PVisibility
2427 _n_visibility
= new_child
2429 _n_visibility
= null
2433 if _n_kwmeth
== old_child
then
2434 if new_child
!= null then
2435 new_child
.parent
= self
2436 assert new_child
isa TKwmeth
2437 _n_kwmeth
= new_child
2443 if _n_methid
== old_child
then
2444 if new_child
!= null then
2445 new_child
.parent
= self
2446 assert new_child
isa PMethid
2447 _n_methid
= new_child
2453 if _n_signature
== old_child
then
2454 if new_child
!= null then
2455 new_child
.parent
= self
2456 assert new_child
isa PSignature
2457 _n_signature
= new_child
2463 if _n_extern
== old_child
then
2464 if new_child
!= null then
2465 new_child
.parent
= self
2466 assert new_child
isa TString
2467 _n_extern
= new_child
2475 redef meth visit_all
(v
: Visitor)
2477 if _n_doc
!= null then
2480 if _n_kwredef
!= null then
2483 if _n_visibility
!= null then
2484 v
.visit
(_n_visibility
)
2486 if _n_kwmeth
!= null then
2489 if _n_methid
!= null then
2492 if _n_signature
!= null then
2493 v
.visit
(_n_signature
)
2495 if _n_extern
!= null then
2500 redef meth visit_all_reverse
(v
: Visitor)
2502 if _n_doc
!= null then
2505 if _n_kwredef
!= null then
2508 if _n_visibility
!= null then
2509 v
.visit
(_n_visibility
)
2511 if _n_kwmeth
!= null then
2514 if _n_methid
!= null then
2517 if _n_signature
!= null then
2518 v
.visit
(_n_signature
)
2520 if _n_extern
!= null then
2525 redef class AConcreteMethPropdef
2526 redef meth n_doc
=(n
: PDoc)
2533 redef meth n_kwredef
=(n
: TKwredef)
2540 redef meth n_visibility
=(n
: PVisibility)
2547 redef meth n_kwmeth
=(n
: TKwmeth)
2554 redef meth n_methid
=(n
: PMethid)
2561 redef meth n_signature
=(n
: PSignature)
2568 redef meth n_block
=(n
: PExpr)
2576 private init empty_init
do end
2578 init init_aconcretemethpropdef
(
2580 n_kwredef
: TKwredef ,
2581 n_visibility
: PVisibility ,
2584 n_signature
: PSignature ,
2590 if n_doc
!= null then
2593 _n_kwredef
= n_kwredef
2594 if n_kwredef
!= null then
2595 n_kwredef
.parent
= self
2597 _n_visibility
= n_visibility
2598 if n_visibility
!= null then
2599 n_visibility
.parent
= self
2601 _n_kwmeth
= n_kwmeth
2602 if n_kwmeth
!= null then
2603 n_kwmeth
.parent
= self
2605 _n_methid
= n_methid
2606 if n_methid
!= null then
2607 n_methid
.parent
= self
2609 _n_signature
= n_signature
2610 if n_signature
!= null then
2611 n_signature
.parent
= self
2614 if n_block
!= null then
2615 n_block
.parent
= self
2619 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2621 assert old_child
!= null
2622 if _n_doc
== old_child
then
2623 if new_child
!= null then
2624 new_child
.parent
= self
2625 assert new_child
isa PDoc
2632 if _n_kwredef
== old_child
then
2633 if new_child
!= null then
2634 new_child
.parent
= self
2635 assert new_child
isa TKwredef
2636 _n_kwredef
= new_child
2642 if _n_visibility
== old_child
then
2643 if new_child
!= null then
2644 new_child
.parent
= self
2645 assert new_child
isa PVisibility
2646 _n_visibility
= new_child
2648 _n_visibility
= null
2652 if _n_kwmeth
== old_child
then
2653 if new_child
!= null then
2654 new_child
.parent
= self
2655 assert new_child
isa TKwmeth
2656 _n_kwmeth
= new_child
2662 if _n_methid
== old_child
then
2663 if new_child
!= null then
2664 new_child
.parent
= self
2665 assert new_child
isa PMethid
2666 _n_methid
= new_child
2672 if _n_signature
== old_child
then
2673 if new_child
!= null then
2674 new_child
.parent
= self
2675 assert new_child
isa PSignature
2676 _n_signature
= new_child
2682 if _n_block
== old_child
then
2683 if new_child
!= null then
2684 new_child
.parent
= self
2685 assert new_child
isa PExpr
2686 _n_block
= new_child
2694 redef meth visit_all
(v
: Visitor)
2696 if _n_doc
!= null then
2699 if _n_kwredef
!= null then
2702 if _n_visibility
!= null then
2703 v
.visit
(_n_visibility
)
2705 if _n_kwmeth
!= null then
2708 if _n_methid
!= null then
2711 if _n_signature
!= null then
2712 v
.visit
(_n_signature
)
2714 if _n_block
!= null then
2719 redef meth visit_all_reverse
(v
: Visitor)
2721 if _n_doc
!= null then
2724 if _n_kwredef
!= null then
2727 if _n_visibility
!= null then
2728 v
.visit
(_n_visibility
)
2730 if _n_kwmeth
!= null then
2733 if _n_methid
!= null then
2736 if _n_signature
!= null then
2737 v
.visit
(_n_signature
)
2739 if _n_block
!= null then
2744 redef class AConcreteInitPropdef
2745 redef meth n_doc
=(n
: PDoc)
2752 redef meth n_kwredef
=(n
: TKwredef)
2759 redef meth n_visibility
=(n
: PVisibility)
2766 redef meth n_kwinit
=(n
: TKwinit)
2773 redef meth n_methid
=(n
: PMethid)
2780 redef meth n_signature
=(n
: PSignature)
2787 redef meth n_block
=(n
: PExpr)
2795 private init empty_init
do end
2797 init init_aconcreteinitpropdef
(
2799 n_kwredef
: TKwredef ,
2800 n_visibility
: PVisibility ,
2803 n_signature
: PSignature ,
2809 if n_doc
!= null then
2812 _n_kwredef
= n_kwredef
2813 if n_kwredef
!= null then
2814 n_kwredef
.parent
= self
2816 _n_visibility
= n_visibility
2817 if n_visibility
!= null then
2818 n_visibility
.parent
= self
2820 _n_kwinit
= n_kwinit
2821 if n_kwinit
!= null then
2822 n_kwinit
.parent
= self
2824 _n_methid
= n_methid
2825 if n_methid
!= null then
2826 n_methid
.parent
= self
2828 _n_signature
= n_signature
2829 if n_signature
!= null then
2830 n_signature
.parent
= self
2833 if n_block
!= null then
2834 n_block
.parent
= self
2838 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2840 assert old_child
!= null
2841 if _n_doc
== old_child
then
2842 if new_child
!= null then
2843 new_child
.parent
= self
2844 assert new_child
isa PDoc
2851 if _n_kwredef
== old_child
then
2852 if new_child
!= null then
2853 new_child
.parent
= self
2854 assert new_child
isa TKwredef
2855 _n_kwredef
= new_child
2861 if _n_visibility
== old_child
then
2862 if new_child
!= null then
2863 new_child
.parent
= self
2864 assert new_child
isa PVisibility
2865 _n_visibility
= new_child
2867 _n_visibility
= null
2871 if _n_kwinit
== old_child
then
2872 if new_child
!= null then
2873 new_child
.parent
= self
2874 assert new_child
isa TKwinit
2875 _n_kwinit
= new_child
2881 if _n_methid
== old_child
then
2882 if new_child
!= null then
2883 new_child
.parent
= self
2884 assert new_child
isa PMethid
2885 _n_methid
= new_child
2891 if _n_signature
== old_child
then
2892 if new_child
!= null then
2893 new_child
.parent
= self
2894 assert new_child
isa PSignature
2895 _n_signature
= new_child
2901 if _n_block
== old_child
then
2902 if new_child
!= null then
2903 new_child
.parent
= self
2904 assert new_child
isa PExpr
2905 _n_block
= new_child
2913 redef meth visit_all
(v
: Visitor)
2915 if _n_doc
!= null then
2918 if _n_kwredef
!= null then
2921 if _n_visibility
!= null then
2922 v
.visit
(_n_visibility
)
2924 if _n_kwinit
!= null then
2927 if _n_methid
!= null then
2930 if _n_signature
!= null then
2931 v
.visit
(_n_signature
)
2933 if _n_block
!= null then
2938 redef meth visit_all_reverse
(v
: Visitor)
2940 if _n_doc
!= null then
2943 if _n_kwredef
!= null then
2946 if _n_visibility
!= null then
2947 v
.visit
(_n_visibility
)
2949 if _n_kwinit
!= null then
2952 if _n_methid
!= null then
2955 if _n_signature
!= null then
2956 v
.visit
(_n_signature
)
2958 if _n_block
!= null then
2963 redef class AMainMethPropdef
2964 redef meth n_kwredef
=(n
: TKwredef)
2971 redef meth n_block
=(n
: PExpr)
2979 private init empty_init
do end
2981 init init_amainmethpropdef
(
2982 n_kwredef
: TKwredef ,
2987 _n_kwredef
= n_kwredef
2988 if n_kwredef
!= null then
2989 n_kwredef
.parent
= self
2992 if n_block
!= null then
2993 n_block
.parent
= self
2997 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2999 assert old_child
!= null
3000 if _n_kwredef
== old_child
then
3001 if new_child
!= null then
3002 new_child
.parent
= self
3003 assert new_child
isa TKwredef
3004 _n_kwredef
= new_child
3010 if _n_block
== old_child
then
3011 if new_child
!= null then
3012 new_child
.parent
= self
3013 assert new_child
isa PExpr
3014 _n_block
= new_child
3022 redef meth visit_all
(v
: Visitor)
3024 if _n_kwredef
!= null then
3027 if _n_block
!= null then
3032 redef meth visit_all_reverse
(v
: Visitor)
3034 if _n_kwredef
!= null then
3037 if _n_block
!= null then
3042 redef class ATypePropdef
3043 redef meth n_doc
=(n
: PDoc)
3050 redef meth n_kwredef
=(n
: TKwredef)
3057 redef meth n_visibility
=(n
: PVisibility)
3064 redef meth n_kwtype
=(n
: TKwtype)
3071 redef meth n_id
=(n
: TClassid)
3078 redef meth n_type
=(n
: PType)
3086 private init empty_init
do end
3088 init init_atypepropdef
(
3090 n_kwredef
: TKwredef ,
3091 n_visibility
: PVisibility ,
3099 if n_doc
!= null then
3102 _n_kwredef
= n_kwredef
3103 if n_kwredef
!= null then
3104 n_kwredef
.parent
= self
3106 _n_visibility
= n_visibility
3107 if n_visibility
!= null then
3108 n_visibility
.parent
= self
3110 _n_kwtype
= n_kwtype
3111 if n_kwtype
!= null then
3112 n_kwtype
.parent
= self
3115 if n_id
!= null then
3119 if n_type
!= null then
3120 n_type
.parent
= self
3124 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3126 assert old_child
!= null
3127 if _n_doc
== old_child
then
3128 if new_child
!= null then
3129 new_child
.parent
= self
3130 assert new_child
isa PDoc
3137 if _n_kwredef
== old_child
then
3138 if new_child
!= null then
3139 new_child
.parent
= self
3140 assert new_child
isa TKwredef
3141 _n_kwredef
= new_child
3147 if _n_visibility
== old_child
then
3148 if new_child
!= null then
3149 new_child
.parent
= self
3150 assert new_child
isa PVisibility
3151 _n_visibility
= new_child
3153 _n_visibility
= null
3157 if _n_kwtype
== old_child
then
3158 if new_child
!= null then
3159 new_child
.parent
= self
3160 assert new_child
isa TKwtype
3161 _n_kwtype
= new_child
3167 if _n_id
== old_child
then
3168 if new_child
!= null then
3169 new_child
.parent
= self
3170 assert new_child
isa TClassid
3177 if _n_type
== old_child
then
3178 if new_child
!= null then
3179 new_child
.parent
= self
3180 assert new_child
isa PType
3189 redef meth visit_all
(v
: Visitor)
3191 if _n_doc
!= null then
3194 if _n_kwredef
!= null then
3197 if _n_visibility
!= null then
3198 v
.visit
(_n_visibility
)
3200 if _n_kwtype
!= null then
3203 if _n_id
!= null then
3206 if _n_type
!= null then
3211 redef meth visit_all_reverse
(v
: Visitor)
3213 if _n_doc
!= null then
3216 if _n_kwredef
!= null then
3219 if _n_visibility
!= null then
3220 v
.visit
(_n_visibility
)
3222 if _n_kwtype
!= null then
3225 if _n_id
!= null then
3228 if _n_type
!= null then
3233 redef class AReadAble
3234 redef meth n_kwredef
=(n
: TKwredef)
3241 redef meth n_kwreadable
=(n
: TKwreadable)
3249 private init empty_init
do end
3251 init init_areadable
(
3252 n_kwredef
: TKwredef ,
3253 n_kwreadable
: TKwreadable
3257 _n_kwredef
= n_kwredef
3258 if n_kwredef
!= null then
3259 n_kwredef
.parent
= self
3261 _n_kwreadable
= n_kwreadable
3262 if n_kwreadable
!= null then
3263 n_kwreadable
.parent
= self
3267 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3269 assert old_child
!= null
3270 if _n_kwredef
== old_child
then
3271 if new_child
!= null then
3272 new_child
.parent
= self
3273 assert new_child
isa TKwredef
3274 _n_kwredef
= new_child
3280 if _n_kwreadable
== old_child
then
3281 if new_child
!= null then
3282 new_child
.parent
= self
3283 assert new_child
isa TKwreadable
3284 _n_kwreadable
= new_child
3286 _n_kwreadable
= null
3292 redef meth visit_all
(v
: Visitor)
3294 if _n_kwredef
!= null then
3297 if _n_kwreadable
!= null then
3298 v
.visit
(_n_kwreadable
)
3302 redef meth visit_all_reverse
(v
: Visitor)
3304 if _n_kwredef
!= null then
3307 if _n_kwreadable
!= null then
3308 v
.visit
(_n_kwreadable
)
3312 redef class AWriteAble
3313 redef meth n_kwredef
=(n
: TKwredef)
3320 redef meth n_kwwritable
=(n
: TKwwritable)
3328 private init empty_init
do end
3330 init init_awriteable
(
3331 n_kwredef
: TKwredef ,
3332 n_kwwritable
: TKwwritable
3336 _n_kwredef
= n_kwredef
3337 if n_kwredef
!= null then
3338 n_kwredef
.parent
= self
3340 _n_kwwritable
= n_kwwritable
3341 if n_kwwritable
!= null then
3342 n_kwwritable
.parent
= self
3346 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3348 assert old_child
!= null
3349 if _n_kwredef
== old_child
then
3350 if new_child
!= null then
3351 new_child
.parent
= self
3352 assert new_child
isa TKwredef
3353 _n_kwredef
= new_child
3359 if _n_kwwritable
== old_child
then
3360 if new_child
!= null then
3361 new_child
.parent
= self
3362 assert new_child
isa TKwwritable
3363 _n_kwwritable
= new_child
3365 _n_kwwritable
= null
3371 redef meth visit_all
(v
: Visitor)
3373 if _n_kwredef
!= null then
3376 if _n_kwwritable
!= null then
3377 v
.visit
(_n_kwwritable
)
3381 redef meth visit_all_reverse
(v
: Visitor)
3383 if _n_kwredef
!= null then
3386 if _n_kwwritable
!= null then
3387 v
.visit
(_n_kwwritable
)
3391 redef class AIdMethid
3392 redef meth n_id
=(n
: TId)
3400 private init empty_init
do end
3402 init init_aidmethid
(
3408 if n_id
!= null then
3413 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3415 assert old_child
!= null
3416 if _n_id
== old_child
then
3417 if new_child
!= null then
3418 new_child
.parent
= self
3419 assert new_child
isa TId
3428 redef meth visit_all
(v
: Visitor)
3430 if _n_id
!= null then
3435 redef meth visit_all_reverse
(v
: Visitor)
3437 if _n_id
!= null then
3442 redef class APlusMethid
3443 redef meth n_plus
=(n
: TPlus)
3451 private init empty_init
do end
3453 init init_aplusmethid
(
3459 if n_plus
!= null then
3460 n_plus
.parent
= self
3464 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3466 assert old_child
!= null
3467 if _n_plus
== old_child
then
3468 if new_child
!= null then
3469 new_child
.parent
= self
3470 assert new_child
isa TPlus
3479 redef meth visit_all
(v
: Visitor)
3481 if _n_plus
!= null then
3486 redef meth visit_all_reverse
(v
: Visitor)
3488 if _n_plus
!= null then
3493 redef class AMinusMethid
3494 redef meth n_minus
=(n
: TMinus)
3502 private init empty_init
do end
3504 init init_aminusmethid
(
3510 if n_minus
!= null then
3511 n_minus
.parent
= self
3515 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3517 assert old_child
!= null
3518 if _n_minus
== old_child
then
3519 if new_child
!= null then
3520 new_child
.parent
= self
3521 assert new_child
isa TMinus
3522 _n_minus
= new_child
3530 redef meth visit_all
(v
: Visitor)
3532 if _n_minus
!= null then
3537 redef meth visit_all_reverse
(v
: Visitor)
3539 if _n_minus
!= null then
3544 redef class AStarMethid
3545 redef meth n_star
=(n
: TStar)
3553 private init empty_init
do end
3555 init init_astarmethid
(
3561 if n_star
!= null then
3562 n_star
.parent
= self
3566 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3568 assert old_child
!= null
3569 if _n_star
== old_child
then
3570 if new_child
!= null then
3571 new_child
.parent
= self
3572 assert new_child
isa TStar
3581 redef meth visit_all
(v
: Visitor)
3583 if _n_star
!= null then
3588 redef meth visit_all_reverse
(v
: Visitor)
3590 if _n_star
!= null then
3595 redef class ASlashMethid
3596 redef meth n_slash
=(n
: TSlash)
3604 private init empty_init
do end
3606 init init_aslashmethid
(
3612 if n_slash
!= null then
3613 n_slash
.parent
= self
3617 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3619 assert old_child
!= null
3620 if _n_slash
== old_child
then
3621 if new_child
!= null then
3622 new_child
.parent
= self
3623 assert new_child
isa TSlash
3624 _n_slash
= new_child
3632 redef meth visit_all
(v
: Visitor)
3634 if _n_slash
!= null then
3639 redef meth visit_all_reverse
(v
: Visitor)
3641 if _n_slash
!= null then
3646 redef class APercentMethid
3647 redef meth n_percent
=(n
: TPercent)
3655 private init empty_init
do end
3657 init init_apercentmethid
(
3662 _n_percent
= n_percent
3663 if n_percent
!= null then
3664 n_percent
.parent
= self
3668 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3670 assert old_child
!= null
3671 if _n_percent
== old_child
then
3672 if new_child
!= null then
3673 new_child
.parent
= self
3674 assert new_child
isa TPercent
3675 _n_percent
= new_child
3683 redef meth visit_all
(v
: Visitor)
3685 if _n_percent
!= null then
3690 redef meth visit_all_reverse
(v
: Visitor)
3692 if _n_percent
!= null then
3697 redef class AEqMethid
3698 redef meth n_eq
=(n
: TEq)
3706 private init empty_init
do end
3708 init init_aeqmethid
(
3714 if n_eq
!= null then
3719 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3721 assert old_child
!= null
3722 if _n_eq
== old_child
then
3723 if new_child
!= null then
3724 new_child
.parent
= self
3725 assert new_child
isa TEq
3734 redef meth visit_all
(v
: Visitor)
3736 if _n_eq
!= null then
3741 redef meth visit_all_reverse
(v
: Visitor)
3743 if _n_eq
!= null then
3748 redef class ANeMethid
3749 redef meth n_ne
=(n
: TNe)
3757 private init empty_init
do end
3759 init init_anemethid
(
3765 if n_ne
!= null then
3770 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3772 assert old_child
!= null
3773 if _n_ne
== old_child
then
3774 if new_child
!= null then
3775 new_child
.parent
= self
3776 assert new_child
isa TNe
3785 redef meth visit_all
(v
: Visitor)
3787 if _n_ne
!= null then
3792 redef meth visit_all_reverse
(v
: Visitor)
3794 if _n_ne
!= null then
3799 redef class ALeMethid
3800 redef meth n_le
=(n
: TLe)
3808 private init empty_init
do end
3810 init init_alemethid
(
3816 if n_le
!= null then
3821 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3823 assert old_child
!= null
3824 if _n_le
== old_child
then
3825 if new_child
!= null then
3826 new_child
.parent
= self
3827 assert new_child
isa TLe
3836 redef meth visit_all
(v
: Visitor)
3838 if _n_le
!= null then
3843 redef meth visit_all_reverse
(v
: Visitor)
3845 if _n_le
!= null then
3850 redef class AGeMethid
3851 redef meth n_ge
=(n
: TGe)
3859 private init empty_init
do end
3861 init init_agemethid
(
3867 if n_ge
!= null then
3872 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3874 assert old_child
!= null
3875 if _n_ge
== old_child
then
3876 if new_child
!= null then
3877 new_child
.parent
= self
3878 assert new_child
isa TGe
3887 redef meth visit_all
(v
: Visitor)
3889 if _n_ge
!= null then
3894 redef meth visit_all_reverse
(v
: Visitor)
3896 if _n_ge
!= null then
3901 redef class ALtMethid
3902 redef meth n_lt
=(n
: TLt)
3910 private init empty_init
do end
3912 init init_altmethid
(
3918 if n_lt
!= null then
3923 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3925 assert old_child
!= null
3926 if _n_lt
== old_child
then
3927 if new_child
!= null then
3928 new_child
.parent
= self
3929 assert new_child
isa TLt
3938 redef meth visit_all
(v
: Visitor)
3940 if _n_lt
!= null then
3945 redef meth visit_all_reverse
(v
: Visitor)
3947 if _n_lt
!= null then
3952 redef class AGtMethid
3953 redef meth n_gt
=(n
: TGt)
3961 private init empty_init
do end
3963 init init_agtmethid
(
3969 if n_gt
!= null then
3974 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3976 assert old_child
!= null
3977 if _n_gt
== old_child
then
3978 if new_child
!= null then
3979 new_child
.parent
= self
3980 assert new_child
isa TGt
3989 redef meth visit_all
(v
: Visitor)
3991 if _n_gt
!= null then
3996 redef meth visit_all_reverse
(v
: Visitor)
3998 if _n_gt
!= null then
4003 redef class ABraMethid
4004 redef meth n_obra
=(n
: TObra)
4011 redef meth n_cbra
=(n
: TCbra)
4019 private init empty_init
do end
4021 init init_abramethid
(
4028 if n_obra
!= null then
4029 n_obra
.parent
= self
4032 if n_cbra
!= null then
4033 n_cbra
.parent
= self
4037 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4039 assert old_child
!= null
4040 if _n_obra
== old_child
then
4041 if new_child
!= null then
4042 new_child
.parent
= self
4043 assert new_child
isa TObra
4050 if _n_cbra
== old_child
then
4051 if new_child
!= null then
4052 new_child
.parent
= self
4053 assert new_child
isa TCbra
4062 redef meth visit_all
(v
: Visitor)
4064 if _n_obra
!= null then
4067 if _n_cbra
!= null then
4072 redef meth visit_all_reverse
(v
: Visitor)
4074 if _n_obra
!= null then
4077 if _n_cbra
!= null then
4082 redef class AStarshipMethid
4083 redef meth n_starship
=(n
: TStarship)
4091 private init empty_init
do end
4093 init init_astarshipmethid
(
4094 n_starship
: TStarship
4098 _n_starship
= n_starship
4099 if n_starship
!= null then
4100 n_starship
.parent
= self
4104 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4106 assert old_child
!= null
4107 if _n_starship
== old_child
then
4108 if new_child
!= null then
4109 new_child
.parent
= self
4110 assert new_child
isa TStarship
4111 _n_starship
= new_child
4119 redef meth visit_all
(v
: Visitor)
4121 if _n_starship
!= null then
4122 v
.visit
(_n_starship
)
4126 redef meth visit_all_reverse
(v
: Visitor)
4128 if _n_starship
!= null then
4129 v
.visit
(_n_starship
)
4133 redef class AAssignMethid
4134 redef meth n_id
=(n
: TId)
4141 redef meth n_assign
=(n
: TAssign)
4149 private init empty_init
do end
4151 init init_aassignmethid
(
4158 if n_id
!= null then
4161 _n_assign
= n_assign
4162 if n_assign
!= null then
4163 n_assign
.parent
= self
4167 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4169 assert old_child
!= null
4170 if _n_id
== old_child
then
4171 if new_child
!= null then
4172 new_child
.parent
= self
4173 assert new_child
isa TId
4180 if _n_assign
== old_child
then
4181 if new_child
!= null then
4182 new_child
.parent
= self
4183 assert new_child
isa TAssign
4184 _n_assign
= new_child
4192 redef meth visit_all
(v
: Visitor)
4194 if _n_id
!= null then
4197 if _n_assign
!= null then
4202 redef meth visit_all_reverse
(v
: Visitor)
4204 if _n_id
!= null then
4207 if _n_assign
!= null then
4212 redef class ABraassignMethid
4213 redef meth n_obra
=(n
: TObra)
4220 redef meth n_cbra
=(n
: TCbra)
4227 redef meth n_assign
=(n
: TAssign)
4235 private init empty_init
do end
4237 init init_abraassignmethid
(
4245 if n_obra
!= null then
4246 n_obra
.parent
= self
4249 if n_cbra
!= null then
4250 n_cbra
.parent
= self
4252 _n_assign
= n_assign
4253 if n_assign
!= null then
4254 n_assign
.parent
= self
4258 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4260 assert old_child
!= null
4261 if _n_obra
== old_child
then
4262 if new_child
!= null then
4263 new_child
.parent
= self
4264 assert new_child
isa TObra
4271 if _n_cbra
== old_child
then
4272 if new_child
!= null then
4273 new_child
.parent
= self
4274 assert new_child
isa TCbra
4281 if _n_assign
== old_child
then
4282 if new_child
!= null then
4283 new_child
.parent
= self
4284 assert new_child
isa TAssign
4285 _n_assign
= new_child
4293 redef meth visit_all
(v
: Visitor)
4295 if _n_obra
!= null then
4298 if _n_cbra
!= null then
4301 if _n_assign
!= null then
4306 redef meth visit_all_reverse
(v
: Visitor)
4308 if _n_obra
!= null then
4311 if _n_cbra
!= null then
4314 if _n_assign
!= null then
4319 redef class ASignature
4320 redef meth n_type
=(n
: PType)
4328 private init empty_init
do end
4330 init init_asignature
(
4331 n_params
: Array[Object] , # Should be Array[PParam]
4333 n_closure_decls
: Array[Object] # Should be Array[PClosureDecl]
4337 _n_params
= new List[PParam]
4338 for n
in n_params
do
4344 if n_type
!= null then
4345 n_type
.parent
= self
4347 _n_closure_decls
= new List[PClosureDecl]
4348 for n
in n_closure_decls
do
4349 assert n
isa PClosureDecl
4350 _n_closure_decls
.add
(n
)
4355 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4357 assert old_child
!= null
4358 for i
in [0.._n_params
.length
[ do
4359 if _n_params
[i
] == old_child
then
4360 if new_child
!= null then
4361 assert new_child
isa PParam
4362 _n_params
[i
] = new_child
4363 new_child
.parent
= self
4365 _n_params
.remove_at
(i
)
4370 if _n_type
== old_child
then
4371 if new_child
!= null then
4372 new_child
.parent
= self
4373 assert new_child
isa PType
4380 for i
in [0.._n_closure_decls
.length
[ do
4381 if _n_closure_decls
[i
] == old_child
then
4382 if new_child
!= null then
4383 assert new_child
isa PClosureDecl
4384 _n_closure_decls
[i
] = new_child
4385 new_child
.parent
= self
4387 _n_closure_decls
.remove_at
(i
)
4394 redef meth visit_all
(v
: Visitor)
4396 for n
in _n_params
do
4399 if _n_type
!= null then
4402 for n
in _n_closure_decls
do
4407 redef meth visit_all_reverse
(v
: Visitor)
4410 var i
= _n_params
.length
4412 v
.visit
(_n_params
[i
])
4416 if _n_type
!= null then
4420 var i
= _n_closure_decls
.length
4422 v
.visit
(_n_closure_decls
[i
])
4429 redef meth n_id
=(n
: TId)
4436 redef meth n_type
=(n
: PType)
4443 redef meth n_dotdotdot
=(n
: TDotdotdot)
4451 private init empty_init
do end
4456 n_dotdotdot
: TDotdotdot
4461 if n_id
!= null then
4465 if n_type
!= null then
4466 n_type
.parent
= self
4468 _n_dotdotdot
= n_dotdotdot
4469 if n_dotdotdot
!= null then
4470 n_dotdotdot
.parent
= self
4474 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4476 assert old_child
!= null
4477 if _n_id
== old_child
then
4478 if new_child
!= null then
4479 new_child
.parent
= self
4480 assert new_child
isa TId
4487 if _n_type
== old_child
then
4488 if new_child
!= null then
4489 new_child
.parent
= self
4490 assert new_child
isa PType
4497 if _n_dotdotdot
== old_child
then
4498 if new_child
!= null then
4499 new_child
.parent
= self
4500 assert new_child
isa TDotdotdot
4501 _n_dotdotdot
= new_child
4509 redef meth visit_all
(v
: Visitor)
4511 if _n_id
!= null then
4514 if _n_type
!= null then
4517 if _n_dotdotdot
!= null then
4518 v
.visit
(_n_dotdotdot
)
4522 redef meth visit_all_reverse
(v
: Visitor)
4524 if _n_id
!= null then
4527 if _n_type
!= null then
4530 if _n_dotdotdot
!= null then
4531 v
.visit
(_n_dotdotdot
)
4535 redef class AClosureDecl
4536 redef meth n_kwwith
=(n
: TKwwith)
4543 redef meth n_kwbreak
=(n
: TKwbreak)
4550 redef meth n_id
=(n
: TId)
4557 redef meth n_signature
=(n
: PSignature)
4564 redef meth n_expr
=(n
: PExpr)
4572 private init empty_init
do end
4574 init init_aclosuredecl
(
4576 n_kwbreak
: TKwbreak ,
4578 n_signature
: PSignature ,
4583 _n_kwwith
= n_kwwith
4584 if n_kwwith
!= null then
4585 n_kwwith
.parent
= self
4587 _n_kwbreak
= n_kwbreak
4588 if n_kwbreak
!= null then
4589 n_kwbreak
.parent
= self
4592 if n_id
!= null then
4595 _n_signature
= n_signature
4596 if n_signature
!= null then
4597 n_signature
.parent
= self
4600 if n_expr
!= null then
4601 n_expr
.parent
= self
4605 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4607 assert old_child
!= null
4608 if _n_kwwith
== old_child
then
4609 if new_child
!= null then
4610 new_child
.parent
= self
4611 assert new_child
isa TKwwith
4612 _n_kwwith
= new_child
4618 if _n_kwbreak
== old_child
then
4619 if new_child
!= null then
4620 new_child
.parent
= self
4621 assert new_child
isa TKwbreak
4622 _n_kwbreak
= new_child
4628 if _n_id
== old_child
then
4629 if new_child
!= null then
4630 new_child
.parent
= self
4631 assert new_child
isa TId
4638 if _n_signature
== old_child
then
4639 if new_child
!= null then
4640 new_child
.parent
= self
4641 assert new_child
isa PSignature
4642 _n_signature
= new_child
4648 if _n_expr
== old_child
then
4649 if new_child
!= null then
4650 new_child
.parent
= self
4651 assert new_child
isa PExpr
4660 redef meth visit_all
(v
: Visitor)
4662 if _n_kwwith
!= null then
4665 if _n_kwbreak
!= null then
4668 if _n_id
!= null then
4671 if _n_signature
!= null then
4672 v
.visit
(_n_signature
)
4674 if _n_expr
!= null then
4679 redef meth visit_all_reverse
(v
: Visitor)
4681 if _n_kwwith
!= null then
4684 if _n_kwbreak
!= null then
4687 if _n_id
!= null then
4690 if _n_signature
!= null then
4691 v
.visit
(_n_signature
)
4693 if _n_expr
!= null then
4699 redef meth n_id
=(n
: TClassid)
4707 private init empty_init
do end
4711 n_types
: Array[Object] # Should be Array[PType]
4716 if n_id
!= null then
4719 _n_types
= new List[PType]
4727 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4729 assert old_child
!= null
4730 if _n_id
== old_child
then
4731 if new_child
!= null then
4732 new_child
.parent
= self
4733 assert new_child
isa TClassid
4740 for i
in [0.._n_types
.length
[ do
4741 if _n_types
[i
] == old_child
then
4742 if new_child
!= null then
4743 assert new_child
isa PType
4744 _n_types
[i
] = new_child
4745 new_child
.parent
= self
4747 _n_types
.remove_at
(i
)
4754 redef meth visit_all
(v
: Visitor)
4756 if _n_id
!= null then
4759 for n
in _n_types
do
4764 redef meth visit_all_reverse
(v
: Visitor)
4766 if _n_id
!= null then
4770 var i
= _n_types
.length
4772 v
.visit
(_n_types
[i
])
4778 redef class ABlockExpr
4780 private init empty_init
do end
4782 init init_ablockexpr
(
4783 n_expr
: Array[Object] # Should be Array[PExpr]
4787 _n_expr
= new List[PExpr]
4795 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4797 assert old_child
!= null
4798 for i
in [0.._n_expr
.length
[ do
4799 if _n_expr
[i
] == old_child
then
4800 if new_child
!= null then
4801 assert new_child
isa PExpr
4802 _n_expr
[i
] = new_child
4803 new_child
.parent
= self
4805 _n_expr
.remove_at
(i
)
4812 redef meth visit_all
(v
: Visitor)
4819 redef meth visit_all_reverse
(v
: Visitor)
4822 var i
= _n_expr
.length
4830 redef class AVardeclExpr
4831 redef meth n_kwvar
=(n
: TKwvar)
4838 redef meth n_id
=(n
: TId)
4845 redef meth n_type
=(n
: PType)
4852 redef meth n_assign
=(n
: TAssign)
4859 redef meth n_expr
=(n
: PExpr)
4867 private init empty_init
do end
4869 init init_avardeclexpr
(
4879 if n_kwvar
!= null then
4880 n_kwvar
.parent
= self
4883 if n_id
!= null then
4887 if n_type
!= null then
4888 n_type
.parent
= self
4890 _n_assign
= n_assign
4891 if n_assign
!= null then
4892 n_assign
.parent
= self
4895 if n_expr
!= null then
4896 n_expr
.parent
= self
4900 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4902 assert old_child
!= null
4903 if _n_kwvar
== old_child
then
4904 if new_child
!= null then
4905 new_child
.parent
= self
4906 assert new_child
isa TKwvar
4907 _n_kwvar
= new_child
4913 if _n_id
== old_child
then
4914 if new_child
!= null then
4915 new_child
.parent
= self
4916 assert new_child
isa TId
4923 if _n_type
== old_child
then
4924 if new_child
!= null then
4925 new_child
.parent
= self
4926 assert new_child
isa PType
4933 if _n_assign
== old_child
then
4934 if new_child
!= null then
4935 new_child
.parent
= self
4936 assert new_child
isa TAssign
4937 _n_assign
= new_child
4943 if _n_expr
== old_child
then
4944 if new_child
!= null then
4945 new_child
.parent
= self
4946 assert new_child
isa PExpr
4955 redef meth visit_all
(v
: Visitor)
4957 if _n_kwvar
!= null then
4960 if _n_id
!= null then
4963 if _n_type
!= null then
4966 if _n_assign
!= null then
4969 if _n_expr
!= null then
4974 redef meth visit_all_reverse
(v
: Visitor)
4976 if _n_kwvar
!= null then
4979 if _n_id
!= null then
4982 if _n_type
!= null then
4985 if _n_assign
!= null then
4988 if _n_expr
!= null then
4993 redef class AReturnExpr
4994 redef meth n_kwreturn
=(n
: TKwreturn)
5001 redef meth n_expr
=(n
: PExpr)
5009 private init empty_init
do end
5011 init init_areturnexpr
(
5012 n_kwreturn
: TKwreturn ,
5017 _n_kwreturn
= n_kwreturn
5018 if n_kwreturn
!= null then
5019 n_kwreturn
.parent
= self
5022 if n_expr
!= null then
5023 n_expr
.parent
= self
5027 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5029 assert old_child
!= null
5030 if _n_kwreturn
== old_child
then
5031 if new_child
!= null then
5032 new_child
.parent
= self
5033 assert new_child
isa TKwreturn
5034 _n_kwreturn
= new_child
5040 if _n_expr
== old_child
then
5041 if new_child
!= null then
5042 new_child
.parent
= self
5043 assert new_child
isa PExpr
5052 redef meth visit_all
(v
: Visitor)
5054 if _n_kwreturn
!= null then
5055 v
.visit
(_n_kwreturn
)
5057 if _n_expr
!= null then
5062 redef meth visit_all_reverse
(v
: Visitor)
5064 if _n_kwreturn
!= null then
5065 v
.visit
(_n_kwreturn
)
5067 if _n_expr
!= null then
5072 redef class ABreakExpr
5073 redef meth n_kwbreak
=(n
: TKwbreak)
5080 redef meth n_expr
=(n
: PExpr)
5088 private init empty_init
do end
5090 init init_abreakexpr
(
5091 n_kwbreak
: TKwbreak ,
5096 _n_kwbreak
= n_kwbreak
5097 if n_kwbreak
!= null then
5098 n_kwbreak
.parent
= self
5101 if n_expr
!= null then
5102 n_expr
.parent
= self
5106 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5108 assert old_child
!= null
5109 if _n_kwbreak
== old_child
then
5110 if new_child
!= null then
5111 new_child
.parent
= self
5112 assert new_child
isa TKwbreak
5113 _n_kwbreak
= new_child
5119 if _n_expr
== old_child
then
5120 if new_child
!= null then
5121 new_child
.parent
= self
5122 assert new_child
isa PExpr
5131 redef meth visit_all
(v
: Visitor)
5133 if _n_kwbreak
!= null then
5136 if _n_expr
!= null then
5141 redef meth visit_all_reverse
(v
: Visitor)
5143 if _n_kwbreak
!= null then
5146 if _n_expr
!= null then
5151 redef class AAbortExpr
5152 redef meth n_kwabort
=(n
: TKwabort)
5160 private init empty_init
do end
5162 init init_aabortexpr
(
5167 _n_kwabort
= n_kwabort
5168 if n_kwabort
!= null then
5169 n_kwabort
.parent
= self
5173 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5175 assert old_child
!= null
5176 if _n_kwabort
== old_child
then
5177 if new_child
!= null then
5178 new_child
.parent
= self
5179 assert new_child
isa TKwabort
5180 _n_kwabort
= new_child
5188 redef meth visit_all
(v
: Visitor)
5190 if _n_kwabort
!= null then
5195 redef meth visit_all_reverse
(v
: Visitor)
5197 if _n_kwabort
!= null then
5202 redef class AContinueExpr
5203 redef meth n_kwcontinue
=(n
: TKwcontinue)
5210 redef meth n_expr
=(n
: PExpr)
5218 private init empty_init
do end
5220 init init_acontinueexpr
(
5221 n_kwcontinue
: TKwcontinue ,
5226 _n_kwcontinue
= n_kwcontinue
5227 if n_kwcontinue
!= null then
5228 n_kwcontinue
.parent
= self
5231 if n_expr
!= null then
5232 n_expr
.parent
= self
5236 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5238 assert old_child
!= null
5239 if _n_kwcontinue
== old_child
then
5240 if new_child
!= null then
5241 new_child
.parent
= self
5242 assert new_child
isa TKwcontinue
5243 _n_kwcontinue
= new_child
5245 _n_kwcontinue
= null
5249 if _n_expr
== old_child
then
5250 if new_child
!= null then
5251 new_child
.parent
= self
5252 assert new_child
isa PExpr
5261 redef meth visit_all
(v
: Visitor)
5263 if _n_kwcontinue
!= null then
5264 v
.visit
(_n_kwcontinue
)
5266 if _n_expr
!= null then
5271 redef meth visit_all_reverse
(v
: Visitor)
5273 if _n_kwcontinue
!= null then
5274 v
.visit
(_n_kwcontinue
)
5276 if _n_expr
!= null then
5282 redef meth n_kwdo
=(n
: TKwdo)
5289 redef meth n_block
=(n
: PExpr)
5297 private init empty_init
do end
5306 if n_kwdo
!= null then
5307 n_kwdo
.parent
= self
5310 if n_block
!= null then
5311 n_block
.parent
= self
5315 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5317 assert old_child
!= null
5318 if _n_kwdo
== old_child
then
5319 if new_child
!= null then
5320 new_child
.parent
= self
5321 assert new_child
isa TKwdo
5328 if _n_block
== old_child
then
5329 if new_child
!= null then
5330 new_child
.parent
= self
5331 assert new_child
isa PExpr
5332 _n_block
= new_child
5340 redef meth visit_all
(v
: Visitor)
5342 if _n_kwdo
!= null then
5345 if _n_block
!= null then
5350 redef meth visit_all_reverse
(v
: Visitor)
5352 if _n_kwdo
!= null then
5355 if _n_block
!= null then
5361 redef meth n_kwif
=(n
: TKwif)
5368 redef meth n_expr
=(n
: PExpr)
5375 redef meth n_then
=(n
: PExpr)
5382 redef meth n_else
=(n
: PExpr)
5390 private init empty_init
do end
5401 if n_kwif
!= null then
5402 n_kwif
.parent
= self
5405 if n_expr
!= null then
5406 n_expr
.parent
= self
5409 if n_then
!= null then
5410 n_then
.parent
= self
5413 if n_else
!= null then
5414 n_else
.parent
= self
5418 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5420 assert old_child
!= null
5421 if _n_kwif
== old_child
then
5422 if new_child
!= null then
5423 new_child
.parent
= self
5424 assert new_child
isa TKwif
5431 if _n_expr
== old_child
then
5432 if new_child
!= null then
5433 new_child
.parent
= self
5434 assert new_child
isa PExpr
5441 if _n_then
== old_child
then
5442 if new_child
!= null then
5443 new_child
.parent
= self
5444 assert new_child
isa PExpr
5451 if _n_else
== old_child
then
5452 if new_child
!= null then
5453 new_child
.parent
= self
5454 assert new_child
isa PExpr
5463 redef meth visit_all
(v
: Visitor)
5465 if _n_kwif
!= null then
5468 if _n_expr
!= null then
5471 if _n_then
!= null then
5474 if _n_else
!= null then
5479 redef meth visit_all_reverse
(v
: Visitor)
5481 if _n_kwif
!= null then
5484 if _n_expr
!= null then
5487 if _n_then
!= null then
5490 if _n_else
!= null then
5495 redef class AIfexprExpr
5496 redef meth n_kwif
=(n
: TKwif)
5503 redef meth n_expr
=(n
: PExpr)
5510 redef meth n_kwthen
=(n
: TKwthen)
5517 redef meth n_then
=(n
: PExpr)
5524 redef meth n_kwelse
=(n
: TKwelse)
5531 redef meth n_else
=(n
: PExpr)
5539 private init empty_init
do end
5541 init init_aifexprexpr
(
5552 if n_kwif
!= null then
5553 n_kwif
.parent
= self
5556 if n_expr
!= null then
5557 n_expr
.parent
= self
5559 _n_kwthen
= n_kwthen
5560 if n_kwthen
!= null then
5561 n_kwthen
.parent
= self
5564 if n_then
!= null then
5565 n_then
.parent
= self
5567 _n_kwelse
= n_kwelse
5568 if n_kwelse
!= null then
5569 n_kwelse
.parent
= self
5572 if n_else
!= null then
5573 n_else
.parent
= self
5577 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5579 assert old_child
!= null
5580 if _n_kwif
== old_child
then
5581 if new_child
!= null then
5582 new_child
.parent
= self
5583 assert new_child
isa TKwif
5590 if _n_expr
== old_child
then
5591 if new_child
!= null then
5592 new_child
.parent
= self
5593 assert new_child
isa PExpr
5600 if _n_kwthen
== old_child
then
5601 if new_child
!= null then
5602 new_child
.parent
= self
5603 assert new_child
isa TKwthen
5604 _n_kwthen
= new_child
5610 if _n_then
== old_child
then
5611 if new_child
!= null then
5612 new_child
.parent
= self
5613 assert new_child
isa PExpr
5620 if _n_kwelse
== old_child
then
5621 if new_child
!= null then
5622 new_child
.parent
= self
5623 assert new_child
isa TKwelse
5624 _n_kwelse
= new_child
5630 if _n_else
== old_child
then
5631 if new_child
!= null then
5632 new_child
.parent
= self
5633 assert new_child
isa PExpr
5642 redef meth visit_all
(v
: Visitor)
5644 if _n_kwif
!= null then
5647 if _n_expr
!= null then
5650 if _n_kwthen
!= null then
5653 if _n_then
!= null then
5656 if _n_kwelse
!= null then
5659 if _n_else
!= null then
5664 redef meth visit_all_reverse
(v
: Visitor)
5666 if _n_kwif
!= null then
5669 if _n_expr
!= null then
5672 if _n_kwthen
!= null then
5675 if _n_then
!= null then
5678 if _n_kwelse
!= null then
5681 if _n_else
!= null then
5686 redef class AWhileExpr
5687 redef meth n_kwwhile
=(n
: TKwwhile)
5694 redef meth n_expr
=(n
: PExpr)
5701 redef meth n_kwdo
=(n
: TKwdo)
5708 redef meth n_block
=(n
: PExpr)
5716 private init empty_init
do end
5718 init init_awhileexpr
(
5719 n_kwwhile
: TKwwhile ,
5726 _n_kwwhile
= n_kwwhile
5727 if n_kwwhile
!= null then
5728 n_kwwhile
.parent
= self
5731 if n_expr
!= null then
5732 n_expr
.parent
= self
5735 if n_kwdo
!= null then
5736 n_kwdo
.parent
= self
5739 if n_block
!= null then
5740 n_block
.parent
= self
5744 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5746 assert old_child
!= null
5747 if _n_kwwhile
== old_child
then
5748 if new_child
!= null then
5749 new_child
.parent
= self
5750 assert new_child
isa TKwwhile
5751 _n_kwwhile
= new_child
5757 if _n_expr
== old_child
then
5758 if new_child
!= null then
5759 new_child
.parent
= self
5760 assert new_child
isa PExpr
5767 if _n_kwdo
== old_child
then
5768 if new_child
!= null then
5769 new_child
.parent
= self
5770 assert new_child
isa TKwdo
5777 if _n_block
== old_child
then
5778 if new_child
!= null then
5779 new_child
.parent
= self
5780 assert new_child
isa PExpr
5781 _n_block
= new_child
5789 redef meth visit_all
(v
: Visitor)
5791 if _n_kwwhile
!= null then
5794 if _n_expr
!= null then
5797 if _n_kwdo
!= null then
5800 if _n_block
!= null then
5805 redef meth visit_all_reverse
(v
: Visitor)
5807 if _n_kwwhile
!= null then
5810 if _n_expr
!= null then
5813 if _n_kwdo
!= null then
5816 if _n_block
!= null then
5821 redef class AForExpr
5822 redef meth n_kwfor
=(n
: TKwfor)
5829 redef meth n_id
=(n
: TId)
5836 redef meth n_expr
=(n
: PExpr)
5843 redef meth n_kwdo
=(n
: TKwdo)
5850 redef meth n_block
=(n
: PExpr)
5858 private init empty_init
do end
5860 init init_aforexpr
(
5870 if n_kwfor
!= null then
5871 n_kwfor
.parent
= self
5874 if n_id
!= null then
5878 if n_expr
!= null then
5879 n_expr
.parent
= self
5882 if n_kwdo
!= null then
5883 n_kwdo
.parent
= self
5886 if n_block
!= null then
5887 n_block
.parent
= self
5891 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5893 assert old_child
!= null
5894 if _n_kwfor
== old_child
then
5895 if new_child
!= null then
5896 new_child
.parent
= self
5897 assert new_child
isa TKwfor
5898 _n_kwfor
= new_child
5904 if _n_id
== old_child
then
5905 if new_child
!= null then
5906 new_child
.parent
= self
5907 assert new_child
isa TId
5914 if _n_expr
== old_child
then
5915 if new_child
!= null then
5916 new_child
.parent
= self
5917 assert new_child
isa PExpr
5924 if _n_kwdo
== old_child
then
5925 if new_child
!= null then
5926 new_child
.parent
= self
5927 assert new_child
isa TKwdo
5934 if _n_block
== old_child
then
5935 if new_child
!= null then
5936 new_child
.parent
= self
5937 assert new_child
isa PExpr
5938 _n_block
= new_child
5946 redef meth visit_all
(v
: Visitor)
5948 if _n_kwfor
!= null then
5951 if _n_id
!= null then
5954 if _n_expr
!= null then
5957 if _n_kwdo
!= null then
5960 if _n_block
!= null then
5965 redef meth visit_all_reverse
(v
: Visitor)
5967 if _n_kwfor
!= null then
5970 if _n_id
!= null then
5973 if _n_expr
!= null then
5976 if _n_kwdo
!= null then
5979 if _n_block
!= null then
5984 redef class AAssertExpr
5985 redef meth n_kwassert
=(n
: TKwassert)
5992 redef meth n_id
=(n
: TId)
5999 redef meth n_expr
=(n
: PExpr)
6007 private init empty_init
do end
6009 init init_aassertexpr
(
6010 n_kwassert
: TKwassert ,
6016 _n_kwassert
= n_kwassert
6017 if n_kwassert
!= null then
6018 n_kwassert
.parent
= self
6021 if n_id
!= null then
6025 if n_expr
!= null then
6026 n_expr
.parent
= self
6030 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6032 assert old_child
!= null
6033 if _n_kwassert
== old_child
then
6034 if new_child
!= null then
6035 new_child
.parent
= self
6036 assert new_child
isa TKwassert
6037 _n_kwassert
= new_child
6043 if _n_id
== old_child
then
6044 if new_child
!= null then
6045 new_child
.parent
= self
6046 assert new_child
isa TId
6053 if _n_expr
== old_child
then
6054 if new_child
!= null then
6055 new_child
.parent
= self
6056 assert new_child
isa PExpr
6065 redef meth visit_all
(v
: Visitor)
6067 if _n_kwassert
!= null then
6068 v
.visit
(_n_kwassert
)
6070 if _n_id
!= null then
6073 if _n_expr
!= null then
6078 redef meth visit_all_reverse
(v
: Visitor)
6080 if _n_kwassert
!= null then
6081 v
.visit
(_n_kwassert
)
6083 if _n_id
!= null then
6086 if _n_expr
!= null then
6091 redef class AOnceExpr
6092 redef meth n_kwonce
=(n
: TKwonce)
6099 redef meth n_expr
=(n
: PExpr)
6107 private init empty_init
do end
6109 init init_aonceexpr
(
6115 _n_kwonce
= n_kwonce
6116 if n_kwonce
!= null then
6117 n_kwonce
.parent
= self
6120 if n_expr
!= null then
6121 n_expr
.parent
= self
6125 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6127 assert old_child
!= null
6128 if _n_kwonce
== old_child
then
6129 if new_child
!= null then
6130 new_child
.parent
= self
6131 assert new_child
isa TKwonce
6132 _n_kwonce
= new_child
6138 if _n_expr
== old_child
then
6139 if new_child
!= null then
6140 new_child
.parent
= self
6141 assert new_child
isa PExpr
6150 redef meth visit_all
(v
: Visitor)
6152 if _n_kwonce
!= null then
6155 if _n_expr
!= null then
6160 redef meth visit_all_reverse
(v
: Visitor)
6162 if _n_kwonce
!= null then
6165 if _n_expr
!= null then
6170 redef class ASendExpr
6171 redef meth n_expr
=(n
: PExpr)
6179 private init empty_init
do end
6181 init init_asendexpr
(
6187 if n_expr
!= null then
6188 n_expr
.parent
= self
6192 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6194 assert old_child
!= null
6195 if _n_expr
== old_child
then
6196 if new_child
!= null then
6197 new_child
.parent
= self
6198 assert new_child
isa PExpr
6207 redef meth visit_all
(v
: Visitor)
6209 if _n_expr
!= null then
6214 redef meth visit_all_reverse
(v
: Visitor)
6216 if _n_expr
!= null then
6221 redef class ABinopExpr
6222 redef meth n_expr
=(n
: PExpr)
6229 redef meth n_expr2
=(n
: PExpr)
6237 private init empty_init
do end
6239 init init_abinopexpr
(
6246 if n_expr
!= null then
6247 n_expr
.parent
= self
6250 if n_expr2
!= null then
6251 n_expr2
.parent
= self
6255 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6257 assert old_child
!= null
6258 if _n_expr
== old_child
then
6259 if new_child
!= null then
6260 new_child
.parent
= self
6261 assert new_child
isa PExpr
6268 if _n_expr2
== old_child
then
6269 if new_child
!= null then
6270 new_child
.parent
= self
6271 assert new_child
isa PExpr
6272 _n_expr2
= new_child
6280 redef meth visit_all
(v
: Visitor)
6282 if _n_expr
!= null then
6285 if _n_expr2
!= null then
6290 redef meth visit_all_reverse
(v
: Visitor)
6292 if _n_expr
!= null then
6295 if _n_expr2
!= null then
6301 redef meth n_expr
=(n
: PExpr)
6308 redef meth n_expr2
=(n
: PExpr)
6316 private init empty_init
do end
6325 if n_expr
!= null then
6326 n_expr
.parent
= self
6329 if n_expr2
!= null then
6330 n_expr2
.parent
= self
6334 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6336 assert old_child
!= null
6337 if _n_expr
== old_child
then
6338 if new_child
!= null then
6339 new_child
.parent
= self
6340 assert new_child
isa PExpr
6347 if _n_expr2
== old_child
then
6348 if new_child
!= null then
6349 new_child
.parent
= self
6350 assert new_child
isa PExpr
6351 _n_expr2
= new_child
6359 redef meth visit_all
(v
: Visitor)
6361 if _n_expr
!= null then
6364 if _n_expr2
!= null then
6369 redef meth visit_all_reverse
(v
: Visitor)
6371 if _n_expr
!= null then
6374 if _n_expr2
!= null then
6379 redef class AAndExpr
6380 redef meth n_expr
=(n
: PExpr)
6387 redef meth n_expr2
=(n
: PExpr)
6395 private init empty_init
do end
6397 init init_aandexpr
(
6404 if n_expr
!= null then
6405 n_expr
.parent
= self
6408 if n_expr2
!= null then
6409 n_expr2
.parent
= self
6413 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6415 assert old_child
!= null
6416 if _n_expr
== old_child
then
6417 if new_child
!= null then
6418 new_child
.parent
= self
6419 assert new_child
isa PExpr
6426 if _n_expr2
== old_child
then
6427 if new_child
!= null then
6428 new_child
.parent
= self
6429 assert new_child
isa PExpr
6430 _n_expr2
= new_child
6438 redef meth visit_all
(v
: Visitor)
6440 if _n_expr
!= null then
6443 if _n_expr2
!= null then
6448 redef meth visit_all_reverse
(v
: Visitor)
6450 if _n_expr
!= null then
6453 if _n_expr2
!= null then
6458 redef class ANotExpr
6459 redef meth n_kwnot
=(n
: TKwnot)
6466 redef meth n_expr
=(n
: PExpr)
6474 private init empty_init
do end
6476 init init_anotexpr
(
6483 if n_kwnot
!= null then
6484 n_kwnot
.parent
= self
6487 if n_expr
!= null then
6488 n_expr
.parent
= self
6492 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6494 assert old_child
!= null
6495 if _n_kwnot
== old_child
then
6496 if new_child
!= null then
6497 new_child
.parent
= self
6498 assert new_child
isa TKwnot
6499 _n_kwnot
= new_child
6505 if _n_expr
== old_child
then
6506 if new_child
!= null then
6507 new_child
.parent
= self
6508 assert new_child
isa PExpr
6517 redef meth visit_all
(v
: Visitor)
6519 if _n_kwnot
!= null then
6522 if _n_expr
!= null then
6527 redef meth visit_all_reverse
(v
: Visitor)
6529 if _n_kwnot
!= null then
6532 if _n_expr
!= null then
6538 redef meth n_expr
=(n
: PExpr)
6545 redef meth n_expr2
=(n
: PExpr)
6553 private init empty_init
do end
6562 if n_expr
!= null then
6563 n_expr
.parent
= self
6566 if n_expr2
!= null then
6567 n_expr2
.parent
= self
6571 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6573 assert old_child
!= null
6574 if _n_expr
== old_child
then
6575 if new_child
!= null then
6576 new_child
.parent
= self
6577 assert new_child
isa PExpr
6584 if _n_expr2
== old_child
then
6585 if new_child
!= null then
6586 new_child
.parent
= self
6587 assert new_child
isa PExpr
6588 _n_expr2
= new_child
6596 redef meth visit_all
(v
: Visitor)
6598 if _n_expr
!= null then
6601 if _n_expr2
!= null then
6606 redef meth visit_all_reverse
(v
: Visitor)
6608 if _n_expr
!= null then
6611 if _n_expr2
!= null then
6617 redef meth n_expr
=(n
: PExpr)
6624 redef meth n_expr2
=(n
: PExpr)
6632 private init empty_init
do end
6641 if n_expr
!= null then
6642 n_expr
.parent
= self
6645 if n_expr2
!= null then
6646 n_expr2
.parent
= self
6650 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6652 assert old_child
!= null
6653 if _n_expr
== old_child
then
6654 if new_child
!= null then
6655 new_child
.parent
= self
6656 assert new_child
isa PExpr
6663 if _n_expr2
== old_child
then
6664 if new_child
!= null then
6665 new_child
.parent
= self
6666 assert new_child
isa PExpr
6667 _n_expr2
= new_child
6675 redef meth visit_all
(v
: Visitor)
6677 if _n_expr
!= null then
6680 if _n_expr2
!= null then
6685 redef meth visit_all_reverse
(v
: Visitor)
6687 if _n_expr
!= null then
6690 if _n_expr2
!= null then
6696 redef meth n_expr
=(n
: PExpr)
6703 redef meth n_expr2
=(n
: PExpr)
6711 private init empty_init
do end
6720 if n_expr
!= null then
6721 n_expr
.parent
= self
6724 if n_expr2
!= null then
6725 n_expr2
.parent
= self
6729 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6731 assert old_child
!= null
6732 if _n_expr
== old_child
then
6733 if new_child
!= null then
6734 new_child
.parent
= self
6735 assert new_child
isa PExpr
6742 if _n_expr2
== old_child
then
6743 if new_child
!= null then
6744 new_child
.parent
= self
6745 assert new_child
isa PExpr
6746 _n_expr2
= new_child
6754 redef meth visit_all
(v
: Visitor)
6756 if _n_expr
!= null then
6759 if _n_expr2
!= null then
6764 redef meth visit_all_reverse
(v
: Visitor)
6766 if _n_expr
!= null then
6769 if _n_expr2
!= null then
6775 redef meth n_expr
=(n
: PExpr)
6782 redef meth n_expr2
=(n
: PExpr)
6790 private init empty_init
do end
6799 if n_expr
!= null then
6800 n_expr
.parent
= self
6803 if n_expr2
!= null then
6804 n_expr2
.parent
= self
6808 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6810 assert old_child
!= null
6811 if _n_expr
== old_child
then
6812 if new_child
!= null then
6813 new_child
.parent
= self
6814 assert new_child
isa PExpr
6821 if _n_expr2
== old_child
then
6822 if new_child
!= null then
6823 new_child
.parent
= self
6824 assert new_child
isa PExpr
6825 _n_expr2
= new_child
6833 redef meth visit_all
(v
: Visitor)
6835 if _n_expr
!= null then
6838 if _n_expr2
!= null then
6843 redef meth visit_all_reverse
(v
: Visitor)
6845 if _n_expr
!= null then
6848 if _n_expr2
!= null then
6854 redef meth n_expr
=(n
: PExpr)
6861 redef meth n_expr2
=(n
: PExpr)
6869 private init empty_init
do end
6878 if n_expr
!= null then
6879 n_expr
.parent
= self
6882 if n_expr2
!= null then
6883 n_expr2
.parent
= self
6887 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6889 assert old_child
!= null
6890 if _n_expr
== old_child
then
6891 if new_child
!= null then
6892 new_child
.parent
= self
6893 assert new_child
isa PExpr
6900 if _n_expr2
== old_child
then
6901 if new_child
!= null then
6902 new_child
.parent
= self
6903 assert new_child
isa PExpr
6904 _n_expr2
= new_child
6912 redef meth visit_all
(v
: Visitor)
6914 if _n_expr
!= null then
6917 if _n_expr2
!= null then
6922 redef meth visit_all_reverse
(v
: Visitor)
6924 if _n_expr
!= null then
6927 if _n_expr2
!= null then
6933 redef meth n_expr
=(n
: PExpr)
6940 redef meth n_expr2
=(n
: PExpr)
6948 private init empty_init
do end
6957 if n_expr
!= null then
6958 n_expr
.parent
= self
6961 if n_expr2
!= null then
6962 n_expr2
.parent
= self
6966 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6968 assert old_child
!= null
6969 if _n_expr
== old_child
then
6970 if new_child
!= null then
6971 new_child
.parent
= self
6972 assert new_child
isa PExpr
6979 if _n_expr2
== old_child
then
6980 if new_child
!= null then
6981 new_child
.parent
= self
6982 assert new_child
isa PExpr
6983 _n_expr2
= new_child
6991 redef meth visit_all
(v
: Visitor)
6993 if _n_expr
!= null then
6996 if _n_expr2
!= null then
7001 redef meth visit_all_reverse
(v
: Visitor)
7003 if _n_expr
!= null then
7006 if _n_expr2
!= null then
7012 redef meth n_expr
=(n
: PExpr)
7019 redef meth n_expr2
=(n
: PExpr)
7027 private init empty_init
do end
7036 if n_expr
!= null then
7037 n_expr
.parent
= self
7040 if n_expr2
!= null then
7041 n_expr2
.parent
= self
7045 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7047 assert old_child
!= null
7048 if _n_expr
== old_child
then
7049 if new_child
!= null then
7050 new_child
.parent
= self
7051 assert new_child
isa PExpr
7058 if _n_expr2
== old_child
then
7059 if new_child
!= null then
7060 new_child
.parent
= self
7061 assert new_child
isa PExpr
7062 _n_expr2
= new_child
7070 redef meth visit_all
(v
: Visitor)
7072 if _n_expr
!= null then
7075 if _n_expr2
!= null then
7080 redef meth visit_all_reverse
(v
: Visitor)
7082 if _n_expr
!= null then
7085 if _n_expr2
!= null then
7090 redef class AIsaExpr
7091 redef meth n_expr
=(n
: PExpr)
7098 redef meth n_type
=(n
: PType)
7106 private init empty_init
do end
7108 init init_aisaexpr
(
7115 if n_expr
!= null then
7116 n_expr
.parent
= self
7119 if n_type
!= null then
7120 n_type
.parent
= self
7124 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7126 assert old_child
!= null
7127 if _n_expr
== old_child
then
7128 if new_child
!= null then
7129 new_child
.parent
= self
7130 assert new_child
isa PExpr
7137 if _n_type
== old_child
then
7138 if new_child
!= null then
7139 new_child
.parent
= self
7140 assert new_child
isa PType
7149 redef meth visit_all
(v
: Visitor)
7151 if _n_expr
!= null then
7154 if _n_type
!= null then
7159 redef meth visit_all_reverse
(v
: Visitor)
7161 if _n_expr
!= null then
7164 if _n_type
!= null then
7169 redef class APlusExpr
7170 redef meth n_expr
=(n
: PExpr)
7177 redef meth n_expr2
=(n
: PExpr)
7185 private init empty_init
do end
7187 init init_aplusexpr
(
7194 if n_expr
!= null then
7195 n_expr
.parent
= self
7198 if n_expr2
!= null then
7199 n_expr2
.parent
= self
7203 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7205 assert old_child
!= null
7206 if _n_expr
== old_child
then
7207 if new_child
!= null then
7208 new_child
.parent
= self
7209 assert new_child
isa PExpr
7216 if _n_expr2
== old_child
then
7217 if new_child
!= null then
7218 new_child
.parent
= self
7219 assert new_child
isa PExpr
7220 _n_expr2
= new_child
7228 redef meth visit_all
(v
: Visitor)
7230 if _n_expr
!= null then
7233 if _n_expr2
!= null then
7238 redef meth visit_all_reverse
(v
: Visitor)
7240 if _n_expr
!= null then
7243 if _n_expr2
!= null then
7248 redef class AMinusExpr
7249 redef meth n_expr
=(n
: PExpr)
7256 redef meth n_expr2
=(n
: PExpr)
7264 private init empty_init
do end
7266 init init_aminusexpr
(
7273 if n_expr
!= null then
7274 n_expr
.parent
= self
7277 if n_expr2
!= null then
7278 n_expr2
.parent
= self
7282 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7284 assert old_child
!= null
7285 if _n_expr
== old_child
then
7286 if new_child
!= null then
7287 new_child
.parent
= self
7288 assert new_child
isa PExpr
7295 if _n_expr2
== old_child
then
7296 if new_child
!= null then
7297 new_child
.parent
= self
7298 assert new_child
isa PExpr
7299 _n_expr2
= new_child
7307 redef meth visit_all
(v
: Visitor)
7309 if _n_expr
!= null then
7312 if _n_expr2
!= null then
7317 redef meth visit_all_reverse
(v
: Visitor)
7319 if _n_expr
!= null then
7322 if _n_expr2
!= null then
7327 redef class AStarshipExpr
7328 redef meth n_expr
=(n
: PExpr)
7335 redef meth n_expr2
=(n
: PExpr)
7343 private init empty_init
do end
7345 init init_astarshipexpr
(
7352 if n_expr
!= null then
7353 n_expr
.parent
= self
7356 if n_expr2
!= null then
7357 n_expr2
.parent
= self
7361 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7363 assert old_child
!= null
7364 if _n_expr
== old_child
then
7365 if new_child
!= null then
7366 new_child
.parent
= self
7367 assert new_child
isa PExpr
7374 if _n_expr2
== old_child
then
7375 if new_child
!= null then
7376 new_child
.parent
= self
7377 assert new_child
isa PExpr
7378 _n_expr2
= new_child
7386 redef meth visit_all
(v
: Visitor)
7388 if _n_expr
!= null then
7391 if _n_expr2
!= null then
7396 redef meth visit_all_reverse
(v
: Visitor)
7398 if _n_expr
!= null then
7401 if _n_expr2
!= null then
7406 redef class AStarExpr
7407 redef meth n_expr
=(n
: PExpr)
7414 redef meth n_expr2
=(n
: PExpr)
7422 private init empty_init
do end
7424 init init_astarexpr
(
7431 if n_expr
!= null then
7432 n_expr
.parent
= self
7435 if n_expr2
!= null then
7436 n_expr2
.parent
= self
7440 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7442 assert old_child
!= null
7443 if _n_expr
== old_child
then
7444 if new_child
!= null then
7445 new_child
.parent
= self
7446 assert new_child
isa PExpr
7453 if _n_expr2
== old_child
then
7454 if new_child
!= null then
7455 new_child
.parent
= self
7456 assert new_child
isa PExpr
7457 _n_expr2
= new_child
7465 redef meth visit_all
(v
: Visitor)
7467 if _n_expr
!= null then
7470 if _n_expr2
!= null then
7475 redef meth visit_all_reverse
(v
: Visitor)
7477 if _n_expr
!= null then
7480 if _n_expr2
!= null then
7485 redef class ASlashExpr
7486 redef meth n_expr
=(n
: PExpr)
7493 redef meth n_expr2
=(n
: PExpr)
7501 private init empty_init
do end
7503 init init_aslashexpr
(
7510 if n_expr
!= null then
7511 n_expr
.parent
= self
7514 if n_expr2
!= null then
7515 n_expr2
.parent
= self
7519 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7521 assert old_child
!= null
7522 if _n_expr
== old_child
then
7523 if new_child
!= null then
7524 new_child
.parent
= self
7525 assert new_child
isa PExpr
7532 if _n_expr2
== old_child
then
7533 if new_child
!= null then
7534 new_child
.parent
= self
7535 assert new_child
isa PExpr
7536 _n_expr2
= new_child
7544 redef meth visit_all
(v
: Visitor)
7546 if _n_expr
!= null then
7549 if _n_expr2
!= null then
7554 redef meth visit_all_reverse
(v
: Visitor)
7556 if _n_expr
!= null then
7559 if _n_expr2
!= null then
7564 redef class APercentExpr
7565 redef meth n_expr
=(n
: PExpr)
7572 redef meth n_expr2
=(n
: PExpr)
7580 private init empty_init
do end
7582 init init_apercentexpr
(
7589 if n_expr
!= null then
7590 n_expr
.parent
= self
7593 if n_expr2
!= null then
7594 n_expr2
.parent
= self
7598 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7600 assert old_child
!= null
7601 if _n_expr
== old_child
then
7602 if new_child
!= null then
7603 new_child
.parent
= self
7604 assert new_child
isa PExpr
7611 if _n_expr2
== old_child
then
7612 if new_child
!= null then
7613 new_child
.parent
= self
7614 assert new_child
isa PExpr
7615 _n_expr2
= new_child
7623 redef meth visit_all
(v
: Visitor)
7625 if _n_expr
!= null then
7628 if _n_expr2
!= null then
7633 redef meth visit_all_reverse
(v
: Visitor)
7635 if _n_expr
!= null then
7638 if _n_expr2
!= null then
7643 redef class AUminusExpr
7644 redef meth n_minus
=(n
: TMinus)
7651 redef meth n_expr
=(n
: PExpr)
7659 private init empty_init
do end
7661 init init_auminusexpr
(
7668 if n_minus
!= null then
7669 n_minus
.parent
= self
7672 if n_expr
!= null then
7673 n_expr
.parent
= self
7677 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7679 assert old_child
!= null
7680 if _n_minus
== old_child
then
7681 if new_child
!= null then
7682 new_child
.parent
= self
7683 assert new_child
isa TMinus
7684 _n_minus
= new_child
7690 if _n_expr
== old_child
then
7691 if new_child
!= null then
7692 new_child
.parent
= self
7693 assert new_child
isa PExpr
7702 redef meth visit_all
(v
: Visitor)
7704 if _n_minus
!= null then
7707 if _n_expr
!= null then
7712 redef meth visit_all_reverse
(v
: Visitor)
7714 if _n_minus
!= null then
7717 if _n_expr
!= null then
7722 redef class ANewExpr
7723 redef meth n_kwnew
=(n
: TKwnew)
7730 redef meth n_type
=(n
: PType)
7737 redef meth n_id
=(n
: TId)
7745 private init empty_init
do end
7747 init init_anewexpr
(
7751 n_args
: Array[Object] # Should be Array[PExpr]
7756 if n_kwnew
!= null then
7757 n_kwnew
.parent
= self
7760 if n_type
!= null then
7761 n_type
.parent
= self
7764 if n_id
!= null then
7767 _n_args
= new List[PExpr]
7775 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7777 assert old_child
!= null
7778 if _n_kwnew
== old_child
then
7779 if new_child
!= null then
7780 new_child
.parent
= self
7781 assert new_child
isa TKwnew
7782 _n_kwnew
= new_child
7788 if _n_type
== old_child
then
7789 if new_child
!= null then
7790 new_child
.parent
= self
7791 assert new_child
isa PType
7798 if _n_id
== old_child
then
7799 if new_child
!= null then
7800 new_child
.parent
= self
7801 assert new_child
isa TId
7808 for i
in [0.._n_args
.length
[ do
7809 if _n_args
[i
] == old_child
then
7810 if new_child
!= null then
7811 assert new_child
isa PExpr
7812 _n_args
[i
] = new_child
7813 new_child
.parent
= self
7815 _n_args
.remove_at
(i
)
7822 redef meth visit_all
(v
: Visitor)
7824 if _n_kwnew
!= null then
7827 if _n_type
!= null then
7830 if _n_id
!= null then
7838 redef meth visit_all_reverse
(v
: Visitor)
7840 if _n_kwnew
!= null then
7843 if _n_type
!= null then
7846 if _n_id
!= null then
7850 var i
= _n_args
.length
7858 redef class AAttrExpr
7859 redef meth n_expr
=(n
: PExpr)
7866 redef meth n_id
=(n
: TAttrid)
7874 private init empty_init
do end
7876 init init_aattrexpr
(
7883 if n_expr
!= null then
7884 n_expr
.parent
= self
7887 if n_id
!= null then
7892 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7894 assert old_child
!= null
7895 if _n_expr
== old_child
then
7896 if new_child
!= null then
7897 new_child
.parent
= self
7898 assert new_child
isa PExpr
7905 if _n_id
== old_child
then
7906 if new_child
!= null then
7907 new_child
.parent
= self
7908 assert new_child
isa TAttrid
7917 redef meth visit_all
(v
: Visitor)
7919 if _n_expr
!= null then
7922 if _n_id
!= null then
7927 redef meth visit_all_reverse
(v
: Visitor)
7929 if _n_expr
!= null then
7932 if _n_id
!= null then
7937 redef class AAttrAssignExpr
7938 redef meth n_expr
=(n
: PExpr)
7945 redef meth n_id
=(n
: TAttrid)
7952 redef meth n_assign
=(n
: TAssign)
7959 redef meth n_value
=(n
: PExpr)
7967 private init empty_init
do end
7969 init init_aattrassignexpr
(
7978 if n_expr
!= null then
7979 n_expr
.parent
= self
7982 if n_id
!= null then
7985 _n_assign
= n_assign
7986 if n_assign
!= null then
7987 n_assign
.parent
= self
7990 if n_value
!= null then
7991 n_value
.parent
= self
7995 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7997 assert old_child
!= null
7998 if _n_expr
== old_child
then
7999 if new_child
!= null then
8000 new_child
.parent
= self
8001 assert new_child
isa PExpr
8008 if _n_id
== old_child
then
8009 if new_child
!= null then
8010 new_child
.parent
= self
8011 assert new_child
isa TAttrid
8018 if _n_assign
== old_child
then
8019 if new_child
!= null then
8020 new_child
.parent
= self
8021 assert new_child
isa TAssign
8022 _n_assign
= new_child
8028 if _n_value
== old_child
then
8029 if new_child
!= null then
8030 new_child
.parent
= self
8031 assert new_child
isa PExpr
8032 _n_value
= new_child
8040 redef meth visit_all
(v
: Visitor)
8042 if _n_expr
!= null then
8045 if _n_id
!= null then
8048 if _n_assign
!= null then
8051 if _n_value
!= null then
8056 redef meth visit_all_reverse
(v
: Visitor)
8058 if _n_expr
!= null then
8061 if _n_id
!= null then
8064 if _n_assign
!= null then
8067 if _n_value
!= null then
8072 redef class AAttrReassignExpr
8073 redef meth n_expr
=(n
: PExpr)
8080 redef meth n_id
=(n
: TAttrid)
8087 redef meth n_assign_op
=(n
: PAssignOp)
8094 redef meth n_value
=(n
: PExpr)
8102 private init empty_init
do end
8104 init init_aattrreassignexpr
(
8107 n_assign_op
: PAssignOp ,
8113 if n_expr
!= null then
8114 n_expr
.parent
= self
8117 if n_id
!= null then
8120 _n_assign_op
= n_assign_op
8121 if n_assign_op
!= null then
8122 n_assign_op
.parent
= self
8125 if n_value
!= null then
8126 n_value
.parent
= self
8130 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8132 assert old_child
!= null
8133 if _n_expr
== old_child
then
8134 if new_child
!= null then
8135 new_child
.parent
= self
8136 assert new_child
isa PExpr
8143 if _n_id
== old_child
then
8144 if new_child
!= null then
8145 new_child
.parent
= self
8146 assert new_child
isa TAttrid
8153 if _n_assign_op
== old_child
then
8154 if new_child
!= null then
8155 new_child
.parent
= self
8156 assert new_child
isa PAssignOp
8157 _n_assign_op
= new_child
8163 if _n_value
== old_child
then
8164 if new_child
!= null then
8165 new_child
.parent
= self
8166 assert new_child
isa PExpr
8167 _n_value
= new_child
8175 redef meth visit_all
(v
: Visitor)
8177 if _n_expr
!= null then
8180 if _n_id
!= null then
8183 if _n_assign_op
!= null then
8184 v
.visit
(_n_assign_op
)
8186 if _n_value
!= null then
8191 redef meth visit_all_reverse
(v
: Visitor)
8193 if _n_expr
!= null then
8196 if _n_id
!= null then
8199 if _n_assign_op
!= null then
8200 v
.visit
(_n_assign_op
)
8202 if _n_value
!= null then
8207 redef class ACallExpr
8208 redef meth n_expr
=(n
: PExpr)
8215 redef meth n_id
=(n
: TId)
8223 private init empty_init
do end
8225 init init_acallexpr
(
8228 n_args
: Array[Object] , # Should be Array[PExpr]
8229 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8234 if n_expr
!= null then
8235 n_expr
.parent
= self
8238 if n_id
!= null then
8241 _n_args
= new List[PExpr]
8247 _n_closure_defs
= new List[PClosureDef]
8248 for n
in n_closure_defs
do
8249 assert n
isa PClosureDef
8250 _n_closure_defs
.add
(n
)
8255 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8257 assert old_child
!= null
8258 if _n_expr
== old_child
then
8259 if new_child
!= null then
8260 new_child
.parent
= self
8261 assert new_child
isa PExpr
8268 if _n_id
== old_child
then
8269 if new_child
!= null then
8270 new_child
.parent
= self
8271 assert new_child
isa TId
8278 for i
in [0.._n_args
.length
[ do
8279 if _n_args
[i
] == old_child
then
8280 if new_child
!= null then
8281 assert new_child
isa PExpr
8282 _n_args
[i
] = new_child
8283 new_child
.parent
= self
8285 _n_args
.remove_at
(i
)
8290 for i
in [0.._n_closure_defs
.length
[ do
8291 if _n_closure_defs
[i
] == old_child
then
8292 if new_child
!= null then
8293 assert new_child
isa PClosureDef
8294 _n_closure_defs
[i
] = new_child
8295 new_child
.parent
= self
8297 _n_closure_defs
.remove_at
(i
)
8304 redef meth visit_all
(v
: Visitor)
8306 if _n_expr
!= null then
8309 if _n_id
!= null then
8315 for n
in _n_closure_defs
do
8320 redef meth visit_all_reverse
(v
: Visitor)
8322 if _n_expr
!= null then
8325 if _n_id
!= null then
8329 var i
= _n_args
.length
8336 var i
= _n_closure_defs
.length
8338 v
.visit
(_n_closure_defs
[i
])
8344 redef class ACallAssignExpr
8345 redef meth n_expr
=(n
: PExpr)
8352 redef meth n_id
=(n
: TId)
8359 redef meth n_assign
=(n
: TAssign)
8366 redef meth n_value
=(n
: PExpr)
8374 private init empty_init
do end
8376 init init_acallassignexpr
(
8379 n_args
: Array[Object] , # Should be Array[PExpr]
8386 if n_expr
!= null then
8387 n_expr
.parent
= self
8390 if n_id
!= null then
8393 _n_args
= new List[PExpr]
8399 _n_assign
= n_assign
8400 if n_assign
!= null then
8401 n_assign
.parent
= self
8404 if n_value
!= null then
8405 n_value
.parent
= self
8409 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8411 assert old_child
!= null
8412 if _n_expr
== old_child
then
8413 if new_child
!= null then
8414 new_child
.parent
= self
8415 assert new_child
isa PExpr
8422 if _n_id
== old_child
then
8423 if new_child
!= null then
8424 new_child
.parent
= self
8425 assert new_child
isa TId
8432 for i
in [0.._n_args
.length
[ do
8433 if _n_args
[i
] == old_child
then
8434 if new_child
!= null then
8435 assert new_child
isa PExpr
8436 _n_args
[i
] = new_child
8437 new_child
.parent
= self
8439 _n_args
.remove_at
(i
)
8444 if _n_assign
== old_child
then
8445 if new_child
!= null then
8446 new_child
.parent
= self
8447 assert new_child
isa TAssign
8448 _n_assign
= new_child
8454 if _n_value
== old_child
then
8455 if new_child
!= null then
8456 new_child
.parent
= self
8457 assert new_child
isa PExpr
8458 _n_value
= new_child
8466 redef meth visit_all
(v
: Visitor)
8468 if _n_expr
!= null then
8471 if _n_id
!= null then
8477 if _n_assign
!= null then
8480 if _n_value
!= null then
8485 redef meth visit_all_reverse
(v
: Visitor)
8487 if _n_expr
!= null then
8490 if _n_id
!= null then
8494 var i
= _n_args
.length
8500 if _n_assign
!= null then
8503 if _n_value
!= null then
8508 redef class ACallReassignExpr
8509 redef meth n_expr
=(n
: PExpr)
8516 redef meth n_id
=(n
: TId)
8523 redef meth n_assign_op
=(n
: PAssignOp)
8530 redef meth n_value
=(n
: PExpr)
8538 private init empty_init
do end
8540 init init_acallreassignexpr
(
8543 n_args
: Array[Object] , # Should be Array[PExpr]
8544 n_assign_op
: PAssignOp ,
8550 if n_expr
!= null then
8551 n_expr
.parent
= self
8554 if n_id
!= null then
8557 _n_args
= new List[PExpr]
8563 _n_assign_op
= n_assign_op
8564 if n_assign_op
!= null then
8565 n_assign_op
.parent
= self
8568 if n_value
!= null then
8569 n_value
.parent
= self
8573 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8575 assert old_child
!= null
8576 if _n_expr
== old_child
then
8577 if new_child
!= null then
8578 new_child
.parent
= self
8579 assert new_child
isa PExpr
8586 if _n_id
== old_child
then
8587 if new_child
!= null then
8588 new_child
.parent
= self
8589 assert new_child
isa TId
8596 for i
in [0.._n_args
.length
[ do
8597 if _n_args
[i
] == old_child
then
8598 if new_child
!= null then
8599 assert new_child
isa PExpr
8600 _n_args
[i
] = new_child
8601 new_child
.parent
= self
8603 _n_args
.remove_at
(i
)
8608 if _n_assign_op
== old_child
then
8609 if new_child
!= null then
8610 new_child
.parent
= self
8611 assert new_child
isa PAssignOp
8612 _n_assign_op
= new_child
8618 if _n_value
== old_child
then
8619 if new_child
!= null then
8620 new_child
.parent
= self
8621 assert new_child
isa PExpr
8622 _n_value
= new_child
8630 redef meth visit_all
(v
: Visitor)
8632 if _n_expr
!= null then
8635 if _n_id
!= null then
8641 if _n_assign_op
!= null then
8642 v
.visit
(_n_assign_op
)
8644 if _n_value
!= null then
8649 redef meth visit_all_reverse
(v
: Visitor)
8651 if _n_expr
!= null then
8654 if _n_id
!= null then
8658 var i
= _n_args
.length
8664 if _n_assign_op
!= null then
8665 v
.visit
(_n_assign_op
)
8667 if _n_value
!= null then
8672 redef class ASuperExpr
8673 redef meth n_qualified
=(n
: PQualified)
8680 redef meth n_kwsuper
=(n
: TKwsuper)
8688 private init empty_init
do end
8690 init init_asuperexpr
(
8691 n_qualified
: PQualified ,
8692 n_kwsuper
: TKwsuper ,
8693 n_args
: Array[Object] # Should be Array[PExpr]
8697 _n_qualified
= n_qualified
8698 if n_qualified
!= null then
8699 n_qualified
.parent
= self
8701 _n_kwsuper
= n_kwsuper
8702 if n_kwsuper
!= null then
8703 n_kwsuper
.parent
= self
8705 _n_args
= new List[PExpr]
8713 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8715 assert old_child
!= null
8716 if _n_qualified
== old_child
then
8717 if new_child
!= null then
8718 new_child
.parent
= self
8719 assert new_child
isa PQualified
8720 _n_qualified
= new_child
8726 if _n_kwsuper
== old_child
then
8727 if new_child
!= null then
8728 new_child
.parent
= self
8729 assert new_child
isa TKwsuper
8730 _n_kwsuper
= new_child
8736 for i
in [0.._n_args
.length
[ do
8737 if _n_args
[i
] == old_child
then
8738 if new_child
!= null then
8739 assert new_child
isa PExpr
8740 _n_args
[i
] = new_child
8741 new_child
.parent
= self
8743 _n_args
.remove_at
(i
)
8750 redef meth visit_all
(v
: Visitor)
8752 if _n_qualified
!= null then
8753 v
.visit
(_n_qualified
)
8755 if _n_kwsuper
!= null then
8763 redef meth visit_all_reverse
(v
: Visitor)
8765 if _n_qualified
!= null then
8766 v
.visit
(_n_qualified
)
8768 if _n_kwsuper
!= null then
8772 var i
= _n_args
.length
8780 redef class AInitExpr
8781 redef meth n_expr
=(n
: PExpr)
8788 redef meth n_kwinit
=(n
: TKwinit)
8796 private init empty_init
do end
8798 init init_ainitexpr
(
8801 n_args
: Array[Object] # Should be Array[PExpr]
8806 if n_expr
!= null then
8807 n_expr
.parent
= self
8809 _n_kwinit
= n_kwinit
8810 if n_kwinit
!= null then
8811 n_kwinit
.parent
= self
8813 _n_args
= new List[PExpr]
8821 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8823 assert old_child
!= null
8824 if _n_expr
== old_child
then
8825 if new_child
!= null then
8826 new_child
.parent
= self
8827 assert new_child
isa PExpr
8834 if _n_kwinit
== old_child
then
8835 if new_child
!= null then
8836 new_child
.parent
= self
8837 assert new_child
isa TKwinit
8838 _n_kwinit
= new_child
8844 for i
in [0.._n_args
.length
[ do
8845 if _n_args
[i
] == old_child
then
8846 if new_child
!= null then
8847 assert new_child
isa PExpr
8848 _n_args
[i
] = new_child
8849 new_child
.parent
= self
8851 _n_args
.remove_at
(i
)
8858 redef meth visit_all
(v
: Visitor)
8860 if _n_expr
!= null then
8863 if _n_kwinit
!= null then
8871 redef meth visit_all_reverse
(v
: Visitor)
8873 if _n_expr
!= null then
8876 if _n_kwinit
!= null then
8880 var i
= _n_args
.length
8888 redef class ABraExpr
8889 redef meth n_expr
=(n
: PExpr)
8897 private init empty_init
do end
8899 init init_abraexpr
(
8901 n_args
: Array[Object] , # Should be Array[PExpr]
8902 n_closure_defs
: Array[Object] # Should be Array[PClosureDef]
8907 if n_expr
!= null then
8908 n_expr
.parent
= self
8910 _n_args
= new List[PExpr]
8916 _n_closure_defs
= new List[PClosureDef]
8917 for n
in n_closure_defs
do
8918 assert n
isa PClosureDef
8919 _n_closure_defs
.add
(n
)
8924 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8926 assert old_child
!= null
8927 if _n_expr
== old_child
then
8928 if new_child
!= null then
8929 new_child
.parent
= self
8930 assert new_child
isa PExpr
8937 for i
in [0.._n_args
.length
[ do
8938 if _n_args
[i
] == old_child
then
8939 if new_child
!= null then
8940 assert new_child
isa PExpr
8941 _n_args
[i
] = new_child
8942 new_child
.parent
= self
8944 _n_args
.remove_at
(i
)
8949 for i
in [0.._n_closure_defs
.length
[ do
8950 if _n_closure_defs
[i
] == old_child
then
8951 if new_child
!= null then
8952 assert new_child
isa PClosureDef
8953 _n_closure_defs
[i
] = new_child
8954 new_child
.parent
= self
8956 _n_closure_defs
.remove_at
(i
)
8963 redef meth visit_all
(v
: Visitor)
8965 if _n_expr
!= null then
8971 for n
in _n_closure_defs
do
8976 redef meth visit_all_reverse
(v
: Visitor)
8978 if _n_expr
!= null then
8982 var i
= _n_args
.length
8989 var i
= _n_closure_defs
.length
8991 v
.visit
(_n_closure_defs
[i
])
8997 redef class ABraAssignExpr
8998 redef meth n_expr
=(n
: PExpr)
9005 redef meth n_assign
=(n
: TAssign)
9012 redef meth n_value
=(n
: PExpr)
9020 private init empty_init
do end
9022 init init_abraassignexpr
(
9024 n_args
: Array[Object] , # Should be Array[PExpr]
9031 if n_expr
!= null then
9032 n_expr
.parent
= self
9034 _n_args
= new List[PExpr]
9040 _n_assign
= n_assign
9041 if n_assign
!= null then
9042 n_assign
.parent
= self
9045 if n_value
!= null then
9046 n_value
.parent
= self
9050 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9052 assert old_child
!= null
9053 if _n_expr
== old_child
then
9054 if new_child
!= null then
9055 new_child
.parent
= self
9056 assert new_child
isa PExpr
9063 for i
in [0.._n_args
.length
[ do
9064 if _n_args
[i
] == old_child
then
9065 if new_child
!= null then
9066 assert new_child
isa PExpr
9067 _n_args
[i
] = new_child
9068 new_child
.parent
= self
9070 _n_args
.remove_at
(i
)
9075 if _n_assign
== old_child
then
9076 if new_child
!= null then
9077 new_child
.parent
= self
9078 assert new_child
isa TAssign
9079 _n_assign
= new_child
9085 if _n_value
== old_child
then
9086 if new_child
!= null then
9087 new_child
.parent
= self
9088 assert new_child
isa PExpr
9089 _n_value
= new_child
9097 redef meth visit_all
(v
: Visitor)
9099 if _n_expr
!= null then
9105 if _n_assign
!= null then
9108 if _n_value
!= null then
9113 redef meth visit_all_reverse
(v
: Visitor)
9115 if _n_expr
!= null then
9119 var i
= _n_args
.length
9125 if _n_assign
!= null then
9128 if _n_value
!= null then
9133 redef class ABraReassignExpr
9134 redef meth n_expr
=(n
: PExpr)
9141 redef meth n_assign_op
=(n
: PAssignOp)
9148 redef meth n_value
=(n
: PExpr)
9156 private init empty_init
do end
9158 init init_abrareassignexpr
(
9160 n_args
: Array[Object] , # Should be Array[PExpr]
9161 n_assign_op
: PAssignOp ,
9167 if n_expr
!= null then
9168 n_expr
.parent
= self
9170 _n_args
= new List[PExpr]
9176 _n_assign_op
= n_assign_op
9177 if n_assign_op
!= null then
9178 n_assign_op
.parent
= self
9181 if n_value
!= null then
9182 n_value
.parent
= self
9186 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9188 assert old_child
!= null
9189 if _n_expr
== old_child
then
9190 if new_child
!= null then
9191 new_child
.parent
= self
9192 assert new_child
isa PExpr
9199 for i
in [0.._n_args
.length
[ do
9200 if _n_args
[i
] == old_child
then
9201 if new_child
!= null then
9202 assert new_child
isa PExpr
9203 _n_args
[i
] = new_child
9204 new_child
.parent
= self
9206 _n_args
.remove_at
(i
)
9211 if _n_assign_op
== old_child
then
9212 if new_child
!= null then
9213 new_child
.parent
= self
9214 assert new_child
isa PAssignOp
9215 _n_assign_op
= new_child
9221 if _n_value
== old_child
then
9222 if new_child
!= null then
9223 new_child
.parent
= self
9224 assert new_child
isa PExpr
9225 _n_value
= new_child
9233 redef meth visit_all
(v
: Visitor)
9235 if _n_expr
!= null then
9241 if _n_assign_op
!= null then
9242 v
.visit
(_n_assign_op
)
9244 if _n_value
!= null then
9249 redef meth visit_all_reverse
(v
: Visitor)
9251 if _n_expr
!= null then
9255 var i
= _n_args
.length
9261 if _n_assign_op
!= null then
9262 v
.visit
(_n_assign_op
)
9264 if _n_value
!= null then
9269 redef class AVarExpr
9270 redef meth n_id
=(n
: TId)
9278 private init empty_init
do end
9280 init init_avarexpr
(
9286 if n_id
!= null then
9291 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9293 assert old_child
!= null
9294 if _n_id
== old_child
then
9295 if new_child
!= null then
9296 new_child
.parent
= self
9297 assert new_child
isa TId
9306 redef meth visit_all
(v
: Visitor)
9308 if _n_id
!= null then
9313 redef meth visit_all_reverse
(v
: Visitor)
9315 if _n_id
!= null then
9320 redef class AVarAssignExpr
9321 redef meth n_id
=(n
: TId)
9328 redef meth n_assign
=(n
: TAssign)
9335 redef meth n_value
=(n
: PExpr)
9343 private init empty_init
do end
9345 init init_avarassignexpr
(
9353 if n_id
!= null then
9356 _n_assign
= n_assign
9357 if n_assign
!= null then
9358 n_assign
.parent
= self
9361 if n_value
!= null then
9362 n_value
.parent
= self
9366 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9368 assert old_child
!= null
9369 if _n_id
== old_child
then
9370 if new_child
!= null then
9371 new_child
.parent
= self
9372 assert new_child
isa TId
9379 if _n_assign
== old_child
then
9380 if new_child
!= null then
9381 new_child
.parent
= self
9382 assert new_child
isa TAssign
9383 _n_assign
= new_child
9389 if _n_value
== old_child
then
9390 if new_child
!= null then
9391 new_child
.parent
= self
9392 assert new_child
isa PExpr
9393 _n_value
= new_child
9401 redef meth visit_all
(v
: Visitor)
9403 if _n_id
!= null then
9406 if _n_assign
!= null then
9409 if _n_value
!= null then
9414 redef meth visit_all_reverse
(v
: Visitor)
9416 if _n_id
!= null then
9419 if _n_assign
!= null then
9422 if _n_value
!= null then
9427 redef class AVarReassignExpr
9428 redef meth n_id
=(n
: TId)
9435 redef meth n_assign_op
=(n
: PAssignOp)
9442 redef meth n_value
=(n
: PExpr)
9450 private init empty_init
do end
9452 init init_avarreassignexpr
(
9454 n_assign_op
: PAssignOp ,
9460 if n_id
!= null then
9463 _n_assign_op
= n_assign_op
9464 if n_assign_op
!= null then
9465 n_assign_op
.parent
= self
9468 if n_value
!= null then
9469 n_value
.parent
= self
9473 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9475 assert old_child
!= null
9476 if _n_id
== old_child
then
9477 if new_child
!= null then
9478 new_child
.parent
= self
9479 assert new_child
isa TId
9486 if _n_assign_op
== old_child
then
9487 if new_child
!= null then
9488 new_child
.parent
= self
9489 assert new_child
isa PAssignOp
9490 _n_assign_op
= new_child
9496 if _n_value
== old_child
then
9497 if new_child
!= null then
9498 new_child
.parent
= self
9499 assert new_child
isa PExpr
9500 _n_value
= new_child
9508 redef meth visit_all
(v
: Visitor)
9510 if _n_id
!= null then
9513 if _n_assign_op
!= null then
9514 v
.visit
(_n_assign_op
)
9516 if _n_value
!= null then
9521 redef meth visit_all_reverse
(v
: Visitor)
9523 if _n_id
!= null then
9526 if _n_assign_op
!= null then
9527 v
.visit
(_n_assign_op
)
9529 if _n_value
!= null then
9534 redef class ARangeExpr
9535 redef meth n_expr
=(n
: PExpr)
9542 redef meth n_expr2
=(n
: PExpr)
9550 private init empty_init
do end
9552 init init_arangeexpr
(
9559 if n_expr
!= null then
9560 n_expr
.parent
= self
9563 if n_expr2
!= null then
9564 n_expr2
.parent
= self
9568 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9570 assert old_child
!= null
9571 if _n_expr
== old_child
then
9572 if new_child
!= null then
9573 new_child
.parent
= self
9574 assert new_child
isa PExpr
9581 if _n_expr2
== old_child
then
9582 if new_child
!= null then
9583 new_child
.parent
= self
9584 assert new_child
isa PExpr
9585 _n_expr2
= new_child
9593 redef meth visit_all
(v
: Visitor)
9595 if _n_expr
!= null then
9598 if _n_expr2
!= null then
9603 redef meth visit_all_reverse
(v
: Visitor)
9605 if _n_expr
!= null then
9608 if _n_expr2
!= null then
9613 redef class ACrangeExpr
9614 redef meth n_expr
=(n
: PExpr)
9621 redef meth n_expr2
=(n
: PExpr)
9629 private init empty_init
do end
9631 init init_acrangeexpr
(
9638 if n_expr
!= null then
9639 n_expr
.parent
= self
9642 if n_expr2
!= null then
9643 n_expr2
.parent
= self
9647 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9649 assert old_child
!= null
9650 if _n_expr
== old_child
then
9651 if new_child
!= null then
9652 new_child
.parent
= self
9653 assert new_child
isa PExpr
9660 if _n_expr2
== old_child
then
9661 if new_child
!= null then
9662 new_child
.parent
= self
9663 assert new_child
isa PExpr
9664 _n_expr2
= new_child
9672 redef meth visit_all
(v
: Visitor)
9674 if _n_expr
!= null then
9677 if _n_expr2
!= null then
9682 redef meth visit_all_reverse
(v
: Visitor)
9684 if _n_expr
!= null then
9687 if _n_expr2
!= null then
9692 redef class AOrangeExpr
9693 redef meth n_expr
=(n
: PExpr)
9700 redef meth n_expr2
=(n
: PExpr)
9708 private init empty_init
do end
9710 init init_aorangeexpr
(
9717 if n_expr
!= null then
9718 n_expr
.parent
= self
9721 if n_expr2
!= null then
9722 n_expr2
.parent
= self
9726 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9728 assert old_child
!= null
9729 if _n_expr
== old_child
then
9730 if new_child
!= null then
9731 new_child
.parent
= self
9732 assert new_child
isa PExpr
9739 if _n_expr2
== old_child
then
9740 if new_child
!= null then
9741 new_child
.parent
= self
9742 assert new_child
isa PExpr
9743 _n_expr2
= new_child
9751 redef meth visit_all
(v
: Visitor)
9753 if _n_expr
!= null then
9756 if _n_expr2
!= null then
9761 redef meth visit_all_reverse
(v
: Visitor)
9763 if _n_expr
!= null then
9766 if _n_expr2
!= null then
9771 redef class AArrayExpr
9773 private init empty_init
do end
9775 init init_aarrayexpr
(
9776 n_exprs
: Array[Object] # Should be Array[PExpr]
9780 _n_exprs
= new List[PExpr]
9788 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9790 assert old_child
!= null
9791 for i
in [0.._n_exprs
.length
[ do
9792 if _n_exprs
[i
] == old_child
then
9793 if new_child
!= null then
9794 assert new_child
isa PExpr
9795 _n_exprs
[i
] = new_child
9796 new_child
.parent
= self
9798 _n_exprs
.remove_at
(i
)
9805 redef meth visit_all
(v
: Visitor)
9807 for n
in _n_exprs
do
9812 redef meth visit_all_reverse
(v
: Visitor)
9815 var i
= _n_exprs
.length
9817 v
.visit
(_n_exprs
[i
])
9823 redef class ASelfExpr
9824 redef meth n_kwself
=(n
: TKwself)
9832 private init empty_init
do end
9834 init init_aselfexpr
(
9839 _n_kwself
= n_kwself
9840 if n_kwself
!= null then
9841 n_kwself
.parent
= self
9845 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9847 assert old_child
!= null
9848 if _n_kwself
== old_child
then
9849 if new_child
!= null then
9850 new_child
.parent
= self
9851 assert new_child
isa TKwself
9852 _n_kwself
= new_child
9860 redef meth visit_all
(v
: Visitor)
9862 if _n_kwself
!= null then
9867 redef meth visit_all_reverse
(v
: Visitor)
9869 if _n_kwself
!= null then
9874 redef class AImplicitSelfExpr
9876 private init empty_init
do end
9878 init init_aimplicitselfexpr
9883 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9885 assert old_child
!= null
9888 redef meth visit_all
(v
: Visitor)
9892 redef meth visit_all_reverse
(v
: Visitor)
9896 redef class ATrueExpr
9897 redef meth n_kwtrue
=(n
: TKwtrue)
9905 private init empty_init
do end
9907 init init_atrueexpr
(
9912 _n_kwtrue
= n_kwtrue
9913 if n_kwtrue
!= null then
9914 n_kwtrue
.parent
= self
9918 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9920 assert old_child
!= null
9921 if _n_kwtrue
== old_child
then
9922 if new_child
!= null then
9923 new_child
.parent
= self
9924 assert new_child
isa TKwtrue
9925 _n_kwtrue
= new_child
9933 redef meth visit_all
(v
: Visitor)
9935 if _n_kwtrue
!= null then
9940 redef meth visit_all_reverse
(v
: Visitor)
9942 if _n_kwtrue
!= null then
9947 redef class AFalseExpr
9948 redef meth n_kwfalse
=(n
: TKwfalse)
9956 private init empty_init
do end
9958 init init_afalseexpr
(
9963 _n_kwfalse
= n_kwfalse
9964 if n_kwfalse
!= null then
9965 n_kwfalse
.parent
= self
9969 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9971 assert old_child
!= null
9972 if _n_kwfalse
== old_child
then
9973 if new_child
!= null then
9974 new_child
.parent
= self
9975 assert new_child
isa TKwfalse
9976 _n_kwfalse
= new_child
9984 redef meth visit_all
(v
: Visitor)
9986 if _n_kwfalse
!= null then
9991 redef meth visit_all_reverse
(v
: Visitor)
9993 if _n_kwfalse
!= null then
9998 redef class ANullExpr
9999 redef meth n_kwnull
=(n
: TKwnull)
10007 private init empty_init
do end
10009 init init_anullexpr
(
10014 _n_kwnull
= n_kwnull
10015 if n_kwnull
!= null then
10016 n_kwnull
.parent
= self
10020 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10022 assert old_child
!= null
10023 if _n_kwnull
== old_child
then
10024 if new_child
!= null then
10025 new_child
.parent
= self
10026 assert new_child
isa TKwnull
10027 _n_kwnull
= new_child
10035 redef meth visit_all
(v
: Visitor)
10037 if _n_kwnull
!= null then
10042 redef meth visit_all_reverse
(v
: Visitor)
10044 if _n_kwnull
!= null then
10049 redef class AIntExpr
10050 redef meth n_number
=(n
: TNumber)
10058 private init empty_init
do end
10060 init init_aintexpr
(
10065 _n_number
= n_number
10066 if n_number
!= null then
10067 n_number
.parent
= self
10071 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10073 assert old_child
!= null
10074 if _n_number
== old_child
then
10075 if new_child
!= null then
10076 new_child
.parent
= self
10077 assert new_child
isa TNumber
10078 _n_number
= new_child
10086 redef meth visit_all
(v
: Visitor)
10088 if _n_number
!= null then
10093 redef meth visit_all_reverse
(v
: Visitor)
10095 if _n_number
!= null then
10100 redef class AFloatExpr
10101 redef meth n_float
=(n
: TFloat)
10109 private init empty_init
do end
10111 init init_afloatexpr
(
10117 if n_float
!= null then
10118 n_float
.parent
= self
10122 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10124 assert old_child
!= null
10125 if _n_float
== old_child
then
10126 if new_child
!= null then
10127 new_child
.parent
= self
10128 assert new_child
isa TFloat
10129 _n_float
= new_child
10137 redef meth visit_all
(v
: Visitor)
10139 if _n_float
!= null then
10144 redef meth visit_all_reverse
(v
: Visitor)
10146 if _n_float
!= null then
10151 redef class ACharExpr
10152 redef meth n_char
=(n
: TChar)
10160 private init empty_init
do end
10162 init init_acharexpr
(
10168 if n_char
!= null then
10169 n_char
.parent
= self
10173 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10175 assert old_child
!= null
10176 if _n_char
== old_child
then
10177 if new_child
!= null then
10178 new_child
.parent
= self
10179 assert new_child
isa TChar
10180 _n_char
= new_child
10188 redef meth visit_all
(v
: Visitor)
10190 if _n_char
!= null then
10195 redef meth visit_all_reverse
(v
: Visitor)
10197 if _n_char
!= null then
10202 redef class AStringExpr
10203 redef meth n_string
=(n
: TString)
10211 private init empty_init
do end
10213 init init_astringexpr
(
10218 _n_string
= n_string
10219 if n_string
!= null then
10220 n_string
.parent
= self
10224 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10226 assert old_child
!= null
10227 if _n_string
== old_child
then
10228 if new_child
!= null then
10229 new_child
.parent
= self
10230 assert new_child
isa TString
10231 _n_string
= new_child
10239 redef meth visit_all
(v
: Visitor)
10241 if _n_string
!= null then
10246 redef meth visit_all_reverse
(v
: Visitor)
10248 if _n_string
!= null then
10253 redef class AStartStringExpr
10254 redef meth n_string
=(n
: TStartString)
10262 private init empty_init
do end
10264 init init_astartstringexpr
(
10265 n_string
: TStartString
10269 _n_string
= n_string
10270 if n_string
!= null then
10271 n_string
.parent
= self
10275 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10277 assert old_child
!= null
10278 if _n_string
== old_child
then
10279 if new_child
!= null then
10280 new_child
.parent
= self
10281 assert new_child
isa TStartString
10282 _n_string
= new_child
10290 redef meth visit_all
(v
: Visitor)
10292 if _n_string
!= null then
10297 redef meth visit_all_reverse
(v
: Visitor)
10299 if _n_string
!= null then
10304 redef class AMidStringExpr
10305 redef meth n_string
=(n
: TMidString)
10313 private init empty_init
do end
10315 init init_amidstringexpr
(
10316 n_string
: TMidString
10320 _n_string
= n_string
10321 if n_string
!= null then
10322 n_string
.parent
= self
10326 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10328 assert old_child
!= null
10329 if _n_string
== old_child
then
10330 if new_child
!= null then
10331 new_child
.parent
= self
10332 assert new_child
isa TMidString
10333 _n_string
= new_child
10341 redef meth visit_all
(v
: Visitor)
10343 if _n_string
!= null then
10348 redef meth visit_all_reverse
(v
: Visitor)
10350 if _n_string
!= null then
10355 redef class AEndStringExpr
10356 redef meth n_string
=(n
: TEndString)
10364 private init empty_init
do end
10366 init init_aendstringexpr
(
10367 n_string
: TEndString
10371 _n_string
= n_string
10372 if n_string
!= null then
10373 n_string
.parent
= self
10377 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10379 assert old_child
!= null
10380 if _n_string
== old_child
then
10381 if new_child
!= null then
10382 new_child
.parent
= self
10383 assert new_child
isa TEndString
10384 _n_string
= new_child
10392 redef meth visit_all
(v
: Visitor)
10394 if _n_string
!= null then
10399 redef meth visit_all_reverse
(v
: Visitor)
10401 if _n_string
!= null then
10406 redef class ASuperstringExpr
10408 private init empty_init
do end
10410 init init_asuperstringexpr
(
10411 n_exprs
: Array[Object] # Should be Array[PExpr]
10415 _n_exprs
= new List[PExpr]
10416 for n
in n_exprs
do
10423 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10425 assert old_child
!= null
10426 for i
in [0.._n_exprs
.length
[ do
10427 if _n_exprs
[i
] == old_child
then
10428 if new_child
!= null then
10429 assert new_child
isa PExpr
10430 _n_exprs
[i
] = new_child
10431 new_child
.parent
= self
10433 _n_exprs
.remove_at
(i
)
10440 redef meth visit_all
(v
: Visitor)
10442 for n
in _n_exprs
do
10447 redef meth visit_all_reverse
(v
: Visitor)
10450 var i
= _n_exprs
.length
10452 v
.visit
(_n_exprs
[i
])
10458 redef class AParExpr
10459 redef meth n_expr
=(n
: PExpr)
10467 private init empty_init
do end
10469 init init_aparexpr
(
10475 if n_expr
!= null then
10476 n_expr
.parent
= self
10480 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10482 assert old_child
!= null
10483 if _n_expr
== old_child
then
10484 if new_child
!= null then
10485 new_child
.parent
= self
10486 assert new_child
isa PExpr
10487 _n_expr
= new_child
10495 redef meth visit_all
(v
: Visitor)
10497 if _n_expr
!= null then
10502 redef meth visit_all_reverse
(v
: Visitor)
10504 if _n_expr
!= null then
10509 redef class AAsCastExpr
10510 redef meth n_expr
=(n
: PExpr)
10517 redef meth n_kwas
=(n
: TKwas)
10524 redef meth n_type
=(n
: PType)
10532 private init empty_init
do end
10534 init init_aascastexpr
(
10542 if n_expr
!= null then
10543 n_expr
.parent
= self
10546 if n_kwas
!= null then
10547 n_kwas
.parent
= self
10550 if n_type
!= null then
10551 n_type
.parent
= self
10555 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10557 assert old_child
!= null
10558 if _n_expr
== old_child
then
10559 if new_child
!= null then
10560 new_child
.parent
= self
10561 assert new_child
isa PExpr
10562 _n_expr
= new_child
10568 if _n_kwas
== old_child
then
10569 if new_child
!= null then
10570 new_child
.parent
= self
10571 assert new_child
isa TKwas
10572 _n_kwas
= new_child
10578 if _n_type
== old_child
then
10579 if new_child
!= null then
10580 new_child
.parent
= self
10581 assert new_child
isa PType
10582 _n_type
= new_child
10590 redef meth visit_all
(v
: Visitor)
10592 if _n_expr
!= null then
10595 if _n_kwas
!= null then
10598 if _n_type
!= null then
10603 redef meth visit_all_reverse
(v
: Visitor)
10605 if _n_expr
!= null then
10608 if _n_kwas
!= null then
10611 if _n_type
!= null then
10616 redef class APlusAssignOp
10617 redef meth n_pluseq
=(n
: TPluseq)
10625 private init empty_init
do end
10627 init init_aplusassignop
(
10632 _n_pluseq
= n_pluseq
10633 if n_pluseq
!= null then
10634 n_pluseq
.parent
= self
10638 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10640 assert old_child
!= null
10641 if _n_pluseq
== old_child
then
10642 if new_child
!= null then
10643 new_child
.parent
= self
10644 assert new_child
isa TPluseq
10645 _n_pluseq
= new_child
10653 redef meth visit_all
(v
: Visitor)
10655 if _n_pluseq
!= null then
10660 redef meth visit_all_reverse
(v
: Visitor)
10662 if _n_pluseq
!= null then
10667 redef class AMinusAssignOp
10668 redef meth n_minuseq
=(n
: TMinuseq)
10676 private init empty_init
do end
10678 init init_aminusassignop
(
10679 n_minuseq
: TMinuseq
10683 _n_minuseq
= n_minuseq
10684 if n_minuseq
!= null then
10685 n_minuseq
.parent
= self
10689 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10691 assert old_child
!= null
10692 if _n_minuseq
== old_child
then
10693 if new_child
!= null then
10694 new_child
.parent
= self
10695 assert new_child
isa TMinuseq
10696 _n_minuseq
= new_child
10704 redef meth visit_all
(v
: Visitor)
10706 if _n_minuseq
!= null then
10707 v
.visit
(_n_minuseq
)
10711 redef meth visit_all_reverse
(v
: Visitor)
10713 if _n_minuseq
!= null then
10714 v
.visit
(_n_minuseq
)
10718 redef class AClosureDef
10719 redef meth n_kwwith
=(n
: TKwwith)
10726 redef meth n_kwdo
=(n
: TKwdo)
10733 redef meth n_expr
=(n
: PExpr)
10741 private init empty_init
do end
10743 init init_aclosuredef
(
10744 n_kwwith
: TKwwith ,
10745 n_id
: Array[Object] , # Should be Array[TId]
10751 _n_kwwith
= n_kwwith
10752 if n_kwwith
!= null then
10753 n_kwwith
.parent
= self
10755 _n_id
= new List[TId]
10762 if n_kwdo
!= null then
10763 n_kwdo
.parent
= self
10766 if n_expr
!= null then
10767 n_expr
.parent
= self
10771 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10773 assert old_child
!= null
10774 if _n_kwwith
== old_child
then
10775 if new_child
!= null then
10776 new_child
.parent
= self
10777 assert new_child
isa TKwwith
10778 _n_kwwith
= new_child
10784 for i
in [0.._n_id
.length
[ do
10785 if _n_id
[i
] == old_child
then
10786 if new_child
!= null then
10787 assert new_child
isa TId
10788 _n_id
[i
] = new_child
10789 new_child
.parent
= self
10796 if _n_kwdo
== old_child
then
10797 if new_child
!= null then
10798 new_child
.parent
= self
10799 assert new_child
isa TKwdo
10800 _n_kwdo
= new_child
10806 if _n_expr
== old_child
then
10807 if new_child
!= null then
10808 new_child
.parent
= self
10809 assert new_child
isa PExpr
10810 _n_expr
= new_child
10818 redef meth visit_all
(v
: Visitor)
10820 if _n_kwwith
!= null then
10826 if _n_kwdo
!= null then
10829 if _n_expr
!= null then
10834 redef meth visit_all_reverse
(v
: Visitor)
10836 if _n_kwwith
!= null then
10840 var i
= _n_id
.length
10846 if _n_kwdo
!= null then
10849 if _n_expr
!= null then
10854 redef class AQualified
10855 redef meth n_classid
=(n
: TClassid)
10863 private init empty_init
do end
10865 init init_aqualified
(
10866 n_id
: Array[Object] , # Should be Array[TId]
10867 n_classid
: TClassid
10871 _n_id
= new List[TId]
10877 _n_classid
= n_classid
10878 if n_classid
!= null then
10879 n_classid
.parent
= self
10883 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10885 assert old_child
!= null
10886 for i
in [0.._n_id
.length
[ do
10887 if _n_id
[i
] == old_child
then
10888 if new_child
!= null then
10889 assert new_child
isa TId
10890 _n_id
[i
] = new_child
10891 new_child
.parent
= self
10898 if _n_classid
== old_child
then
10899 if new_child
!= null then
10900 new_child
.parent
= self
10901 assert new_child
isa TClassid
10902 _n_classid
= new_child
10910 redef meth visit_all
(v
: Visitor)
10915 if _n_classid
!= null then
10916 v
.visit
(_n_classid
)
10920 redef meth visit_all_reverse
(v
: Visitor)
10923 var i
= _n_id
.length
10929 if _n_classid
!= null then
10930 v
.visit
(_n_classid
)
10936 private init empty_init
do end
10939 n_comment
: Array[Object] # Should be Array[TComment]
10943 _n_comment
= new List[TComment]
10944 for n
in n_comment
do
10945 assert n
isa TComment
10951 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10953 assert old_child
!= null
10954 for i
in [0.._n_comment
.length
[ do
10955 if _n_comment
[i
] == old_child
then
10956 if new_child
!= null then
10957 assert new_child
isa TComment
10958 _n_comment
[i
] = new_child
10959 new_child
.parent
= self
10961 _n_comment
.remove_at
(i
)
10968 redef meth visit_all
(v
: Visitor)
10970 for n
in _n_comment
do
10975 redef meth visit_all_reverse
(v
: Visitor)
10978 var i
= _n_comment
.length
10980 v
.visit
(_n_comment
[i
])
10996 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10998 assert old_child
!= null
10999 if _n_base
== old_child
then
11000 if new_child
== null then
11002 new_child
.parent
= self
11003 assert new_child
isa PModule
11004 _n_base
= new_child
11006 old_child
.parent
= null
11011 redef meth visit_all
(v
: Visitor)
11013 if _n_base
!= null then
11018 redef meth visit_all_reverse
(v
: Visitor)
11020 if _n_base
!= null then