1 # Production AST nodes full definition.
2 # This file was generated by SableCC (http://www.sablecc.org/).
6 intrude import parser_nodes
9 # Parent of the node in the AST
10 readable writable attr _parent
: PNode
12 # Remove a child from the AST
13 meth remove_child
(child
: PNode)
15 replace_child
(child
, null)
18 # Replace a child with an other node in the AST
19 meth replace_child
(old_child
: PNode, new_child
: PNode) is abstract
21 # Replace itself with an other node in the AST
22 meth replace_with
(node
: PNode)
24 if (_parent
!= null) then
25 _parent
.replace_child
(self, node
)
29 # Visit all nodes in order.
30 # Thus, call "v.visit(e)" for each node e
31 meth visit_all
(v
: Visitor) is abstract
33 # Visit all nodes in reverse order.
34 # Thus, call "v.visit(e)" for each node e starting from the last child
35 meth visit_all_reverse
(v
: Visitor) is abstract
37 # Give a human readable location of the node.
38 meth locate
: String is abstract
40 # Return only the line number of the node
41 meth line_number
: Int is abstract
43 # Debug method: output a message prefixed with the location.
44 meth printl
(str
: String)
46 print
("{locate}: {str}\n")
51 redef meth visit_all
(v
: Visitor) do end
52 redef meth visit_all_reverse
(v
: Visitor) do end
53 redef meth replace_child
(old_child
: PNode, new_child
: PNode) do end
55 redef meth locate
: String
57 return "{filename}:{line},{pos}"
60 redef meth line_number
do return line
64 # The first token of the production node
65 readable writable attr _first_token
: Token
67 # The last token of the production node
68 readable writable attr _last_token
: Token
70 redef meth locate
: String
72 if first_token
== null then
75 var lastpos
= last_token
.pos
+ last_token
.text
.length
- 1
76 if first_token
.line
== last_token
.line
then
77 return "{first_token.locate}--{lastpos}"
79 return "{first_token.locate}--{last_token.line}:{lastpos}"
83 redef meth replace_with
(n
: PNode)
87 n
.first_token
= first_token
88 n
.last_token
= last_token
91 redef meth line_number
93 if first_token
!= null then
94 return first_token
.line
101 # Abstract standard visitor
103 # Ask the visitor to visit a given node.
104 # Usually automatically called by visit_all* methods.
105 # Concrete visitors should redefine this method.
106 meth visit
(e
: PNode) is abstract
110 redef meth n_packagedecl
=(n
: PPackagedecl)
118 private init empty_init
do end
121 n_packagedecl
: PPackagedecl ,
122 n_imports
: Array[Object] , # Should be Array[PImport]
123 n_classdefs
: Array[Object] # Should be Array[PClassdef]
127 _n_packagedecl
= n_packagedecl
128 if n_packagedecl
!= null then
129 n_packagedecl
.parent
= self
131 _n_imports
= new List[PImport]
132 for n
in n_imports
do
137 _n_classdefs
= new List[PClassdef]
138 for n
in n_classdefs
do
139 assert n
isa PClassdef
145 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
147 assert old_child
!= null
148 if _n_packagedecl
== old_child
then
149 if new_child
!= null then
150 new_child
.parent
= self
151 assert new_child
isa PPackagedecl
152 _n_packagedecl
= new_child
154 _n_packagedecl
= null
158 for i
in [0.._n_imports
.length
[ do
159 if _n_imports
[i
] == old_child
then
160 if new_child
!= null then
161 assert new_child
isa PImport
162 _n_imports
[i
] = new_child
163 new_child
.parent
= self
165 _n_imports
.remove_at
(i
)
170 for i
in [0.._n_classdefs
.length
[ do
171 if _n_classdefs
[i
] == old_child
then
172 if new_child
!= null then
173 assert new_child
isa PClassdef
174 _n_classdefs
[i
] = new_child
175 new_child
.parent
= self
177 _n_classdefs
.remove_at
(i
)
184 redef meth visit_all
(v
: Visitor)
186 if _n_packagedecl
!= null then
187 v
.visit
(_n_packagedecl
)
189 for n
in _n_imports
do
192 for n
in _n_classdefs
do
197 redef meth visit_all_reverse
(v
: Visitor)
199 if _n_packagedecl
!= null then
200 v
.visit
(_n_packagedecl
)
203 var i
= _n_imports
.length
205 v
.visit
(_n_imports
[i
])
210 var i
= _n_classdefs
.length
212 v
.visit
(_n_classdefs
[i
])
218 redef class APackagedecl
219 redef meth n_doc
=(n
: PDoc)
226 redef meth n_kwpackage
=(n
: TKwpackage)
233 redef meth n_id
=(n
: TId)
241 private init empty_init
do end
243 init init_apackagedecl
(
245 n_kwpackage
: TKwpackage ,
251 if n_doc
!= null then
254 _n_kwpackage
= n_kwpackage
255 if n_kwpackage
!= null then
256 n_kwpackage
.parent
= self
264 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
266 assert old_child
!= null
267 if _n_doc
== old_child
then
268 if new_child
!= null then
269 new_child
.parent
= self
270 assert new_child
isa PDoc
277 if _n_kwpackage
== old_child
then
278 if new_child
!= null then
279 new_child
.parent
= self
280 assert new_child
isa TKwpackage
281 _n_kwpackage
= new_child
287 if _n_id
== old_child
then
288 if new_child
!= null then
289 new_child
.parent
= self
290 assert new_child
isa TId
299 redef meth visit_all
(v
: Visitor)
301 if _n_doc
!= null then
304 if _n_kwpackage
!= null then
305 v
.visit
(_n_kwpackage
)
307 if _n_id
!= null then
312 redef meth visit_all_reverse
(v
: Visitor)
314 if _n_doc
!= null then
317 if _n_kwpackage
!= null then
318 v
.visit
(_n_kwpackage
)
320 if _n_id
!= null then
326 redef meth n_visibility
=(n
: PVisibility)
333 redef meth n_kwimport
=(n
: TKwimport)
340 redef meth n_id
=(n
: TId)
348 private init empty_init
do end
351 n_visibility
: PVisibility ,
352 n_kwimport
: TKwimport ,
357 _n_visibility
= n_visibility
358 if n_visibility
!= null then
359 n_visibility
.parent
= self
361 _n_kwimport
= n_kwimport
362 if n_kwimport
!= null then
363 n_kwimport
.parent
= self
371 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
373 assert old_child
!= null
374 if _n_visibility
== old_child
then
375 if new_child
!= null then
376 new_child
.parent
= self
377 assert new_child
isa PVisibility
378 _n_visibility
= new_child
384 if _n_kwimport
== old_child
then
385 if new_child
!= null then
386 new_child
.parent
= self
387 assert new_child
isa TKwimport
388 _n_kwimport
= new_child
394 if _n_id
== old_child
then
395 if new_child
!= null then
396 new_child
.parent
= self
397 assert new_child
isa TId
406 redef meth visit_all
(v
: Visitor)
408 if _n_visibility
!= null then
409 v
.visit
(_n_visibility
)
411 if _n_kwimport
!= null then
414 if _n_id
!= null then
419 redef meth visit_all_reverse
(v
: Visitor)
421 if _n_visibility
!= null then
422 v
.visit
(_n_visibility
)
424 if _n_kwimport
!= null then
427 if _n_id
!= null then
432 redef class ANoImport
433 redef meth n_visibility
=(n
: PVisibility)
440 redef meth n_kwimport
=(n
: TKwimport)
447 redef meth n_kwend
=(n
: TKwend)
455 private init empty_init
do end
457 init init_anoimport
(
458 n_visibility
: PVisibility ,
459 n_kwimport
: TKwimport ,
464 _n_visibility
= n_visibility
465 if n_visibility
!= null then
466 n_visibility
.parent
= self
468 _n_kwimport
= n_kwimport
469 if n_kwimport
!= null then
470 n_kwimport
.parent
= self
473 if n_kwend
!= null then
474 n_kwend
.parent
= self
478 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
480 assert old_child
!= null
481 if _n_visibility
== old_child
then
482 if new_child
!= null then
483 new_child
.parent
= self
484 assert new_child
isa PVisibility
485 _n_visibility
= new_child
491 if _n_kwimport
== old_child
then
492 if new_child
!= null then
493 new_child
.parent
= self
494 assert new_child
isa TKwimport
495 _n_kwimport
= new_child
501 if _n_kwend
== old_child
then
502 if new_child
!= null then
503 new_child
.parent
= self
504 assert new_child
isa TKwend
513 redef meth visit_all
(v
: Visitor)
515 if _n_visibility
!= null then
516 v
.visit
(_n_visibility
)
518 if _n_kwimport
!= null then
521 if _n_kwend
!= null then
526 redef meth visit_all_reverse
(v
: Visitor)
528 if _n_visibility
!= null then
529 v
.visit
(_n_visibility
)
531 if _n_kwimport
!= null then
534 if _n_kwend
!= null then
539 redef class APublicVisibility
541 private init empty_init
do end
543 init init_apublicvisibility
548 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
550 assert old_child
!= null
553 redef meth visit_all
(v
: Visitor)
557 redef meth visit_all_reverse
(v
: Visitor)
561 redef class APrivateVisibility
562 redef meth n_kwprivate
=(n
: TKwprivate)
570 private init empty_init
do end
572 init init_aprivatevisibility
(
573 n_kwprivate
: TKwprivate
577 _n_kwprivate
= n_kwprivate
578 if n_kwprivate
!= null then
579 n_kwprivate
.parent
= self
583 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
585 assert old_child
!= null
586 if _n_kwprivate
== old_child
then
587 if new_child
!= null then
588 new_child
.parent
= self
589 assert new_child
isa TKwprivate
590 _n_kwprivate
= new_child
598 redef meth visit_all
(v
: Visitor)
600 if _n_kwprivate
!= null then
601 v
.visit
(_n_kwprivate
)
605 redef meth visit_all_reverse
(v
: Visitor)
607 if _n_kwprivate
!= null then
608 v
.visit
(_n_kwprivate
)
612 redef class AProtectedVisibility
613 redef meth n_kwprotected
=(n
: TKwprotected)
621 private init empty_init
do end
623 init init_aprotectedvisibility
(
624 n_kwprotected
: TKwprotected
628 _n_kwprotected
= n_kwprotected
629 if n_kwprotected
!= null then
630 n_kwprotected
.parent
= self
634 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
636 assert old_child
!= null
637 if _n_kwprotected
== old_child
then
638 if new_child
!= null then
639 new_child
.parent
= self
640 assert new_child
isa TKwprotected
641 _n_kwprotected
= new_child
643 _n_kwprotected
= null
649 redef meth visit_all
(v
: Visitor)
651 if _n_kwprotected
!= null then
652 v
.visit
(_n_kwprotected
)
656 redef meth visit_all_reverse
(v
: Visitor)
658 if _n_kwprotected
!= null then
659 v
.visit
(_n_kwprotected
)
663 redef class AIntrudeVisibility
664 redef meth n_kwintrude
=(n
: TKwintrude)
672 private init empty_init
do end
674 init init_aintrudevisibility
(
675 n_kwintrude
: TKwintrude
679 _n_kwintrude
= n_kwintrude
680 if n_kwintrude
!= null then
681 n_kwintrude
.parent
= self
685 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
687 assert old_child
!= null
688 if _n_kwintrude
== old_child
then
689 if new_child
!= null then
690 new_child
.parent
= self
691 assert new_child
isa TKwintrude
692 _n_kwintrude
= new_child
700 redef meth visit_all
(v
: Visitor)
702 if _n_kwintrude
!= null then
703 v
.visit
(_n_kwintrude
)
707 redef meth visit_all_reverse
(v
: Visitor)
709 if _n_kwintrude
!= null then
710 v
.visit
(_n_kwintrude
)
714 redef class AClassdef
715 redef meth n_doc
=(n
: PDoc)
722 redef meth n_kwredef
=(n
: TKwredef)
729 redef meth n_visibility
=(n
: PVisibility)
736 redef meth n_classkind
=(n
: PClasskind)
743 redef meth n_id
=(n
: TClassid)
751 private init empty_init
do end
753 init init_aclassdef
(
755 n_kwredef
: TKwredef ,
756 n_visibility
: PVisibility ,
757 n_classkind
: PClasskind ,
759 n_formaldefs
: Array[Object] , # Should be Array[PFormaldef]
760 n_superclasses
: Array[Object] , # Should be Array[PSuperclass]
761 n_propdefs
: Array[Object] # Should be Array[PPropdef]
766 if n_doc
!= null then
769 _n_kwredef
= n_kwredef
770 if n_kwredef
!= null then
771 n_kwredef
.parent
= self
773 _n_visibility
= n_visibility
774 if n_visibility
!= null then
775 n_visibility
.parent
= self
777 _n_classkind
= n_classkind
778 if n_classkind
!= null then
779 n_classkind
.parent
= self
785 _n_formaldefs
= new List[PFormaldef]
786 for n
in n_formaldefs
do
787 assert n
isa PFormaldef
791 _n_superclasses
= new List[PSuperclass]
792 for n
in n_superclasses
do
793 assert n
isa PSuperclass
794 _n_superclasses
.add
(n
)
797 _n_propdefs
= new List[PPropdef]
798 for n
in n_propdefs
do
799 assert n
isa PPropdef
805 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
807 assert old_child
!= null
808 if _n_doc
== old_child
then
809 if new_child
!= null then
810 new_child
.parent
= self
811 assert new_child
isa PDoc
818 if _n_kwredef
== old_child
then
819 if new_child
!= null then
820 new_child
.parent
= self
821 assert new_child
isa TKwredef
822 _n_kwredef
= new_child
828 if _n_visibility
== old_child
then
829 if new_child
!= null then
830 new_child
.parent
= self
831 assert new_child
isa PVisibility
832 _n_visibility
= new_child
838 if _n_classkind
== old_child
then
839 if new_child
!= null then
840 new_child
.parent
= self
841 assert new_child
isa PClasskind
842 _n_classkind
= new_child
848 if _n_id
== old_child
then
849 if new_child
!= null then
850 new_child
.parent
= self
851 assert new_child
isa TClassid
858 for i
in [0.._n_formaldefs
.length
[ do
859 if _n_formaldefs
[i
] == old_child
then
860 if new_child
!= null then
861 assert new_child
isa PFormaldef
862 _n_formaldefs
[i
] = new_child
863 new_child
.parent
= self
865 _n_formaldefs
.remove_at
(i
)
870 for i
in [0.._n_superclasses
.length
[ do
871 if _n_superclasses
[i
] == old_child
then
872 if new_child
!= null then
873 assert new_child
isa PSuperclass
874 _n_superclasses
[i
] = new_child
875 new_child
.parent
= self
877 _n_superclasses
.remove_at
(i
)
882 for i
in [0.._n_propdefs
.length
[ do
883 if _n_propdefs
[i
] == old_child
then
884 if new_child
!= null then
885 assert new_child
isa PPropdef
886 _n_propdefs
[i
] = new_child
887 new_child
.parent
= self
889 _n_propdefs
.remove_at
(i
)
896 redef meth visit_all
(v
: Visitor)
898 if _n_doc
!= null then
901 if _n_kwredef
!= null then
904 if _n_visibility
!= null then
905 v
.visit
(_n_visibility
)
907 if _n_classkind
!= null then
908 v
.visit
(_n_classkind
)
910 if _n_id
!= null then
913 for n
in _n_formaldefs
do
916 for n
in _n_superclasses
do
919 for n
in _n_propdefs
do
924 redef meth visit_all_reverse
(v
: Visitor)
926 if _n_doc
!= null then
929 if _n_kwredef
!= null then
932 if _n_visibility
!= null then
933 v
.visit
(_n_visibility
)
935 if _n_classkind
!= null then
936 v
.visit
(_n_classkind
)
938 if _n_id
!= null then
942 var i
= _n_formaldefs
.length
944 v
.visit
(_n_formaldefs
[i
])
949 var i
= _n_superclasses
.length
951 v
.visit
(_n_superclasses
[i
])
956 var i
= _n_propdefs
.length
958 v
.visit
(_n_propdefs
[i
])
964 redef class ATopClassdef
966 private init empty_init
do end
968 init init_atopclassdef
(
969 n_propdefs
: Array[Object] # Should be Array[PPropdef]
973 _n_propdefs
= new List[PPropdef]
974 for n
in n_propdefs
do
975 assert n
isa PPropdef
981 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
983 assert old_child
!= null
984 for i
in [0.._n_propdefs
.length
[ do
985 if _n_propdefs
[i
] == old_child
then
986 if new_child
!= null then
987 assert new_child
isa PPropdef
988 _n_propdefs
[i
] = new_child
989 new_child
.parent
= self
991 _n_propdefs
.remove_at
(i
)
998 redef meth visit_all
(v
: Visitor)
1000 for n
in _n_propdefs
do
1005 redef meth visit_all_reverse
(v
: Visitor)
1008 var i
= _n_propdefs
.length
1010 v
.visit
(_n_propdefs
[i
])
1016 redef class AMainClassdef
1018 private init empty_init
do end
1020 init init_amainclassdef
(
1021 n_propdefs
: Array[Object] # Should be Array[PPropdef]
1025 _n_propdefs
= new List[PPropdef]
1026 for n
in n_propdefs
do
1027 assert n
isa PPropdef
1033 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1035 assert old_child
!= null
1036 for i
in [0.._n_propdefs
.length
[ do
1037 if _n_propdefs
[i
] == old_child
then
1038 if new_child
!= null then
1039 assert new_child
isa PPropdef
1040 _n_propdefs
[i
] = new_child
1041 new_child
.parent
= self
1043 _n_propdefs
.remove_at
(i
)
1050 redef meth visit_all
(v
: Visitor)
1052 for n
in _n_propdefs
do
1057 redef meth visit_all_reverse
(v
: Visitor)
1060 var i
= _n_propdefs
.length
1062 v
.visit
(_n_propdefs
[i
])
1068 redef class AConcreteClasskind
1069 redef meth n_kwclass
=(n
: TKwclass)
1077 private init empty_init
do end
1079 init init_aconcreteclasskind
(
1084 _n_kwclass
= n_kwclass
1085 if n_kwclass
!= null then
1086 n_kwclass
.parent
= self
1090 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1092 assert old_child
!= null
1093 if _n_kwclass
== old_child
then
1094 if new_child
!= null then
1095 new_child
.parent
= self
1096 assert new_child
isa TKwclass
1097 _n_kwclass
= new_child
1105 redef meth visit_all
(v
: Visitor)
1107 if _n_kwclass
!= null then
1112 redef meth visit_all_reverse
(v
: Visitor)
1114 if _n_kwclass
!= null then
1119 redef class AAbstractClasskind
1120 redef meth n_kwabstract
=(n
: TKwabstract)
1127 redef meth n_kwclass
=(n
: TKwclass)
1135 private init empty_init
do end
1137 init init_aabstractclasskind
(
1138 n_kwabstract
: TKwabstract ,
1143 _n_kwabstract
= n_kwabstract
1144 if n_kwabstract
!= null then
1145 n_kwabstract
.parent
= self
1147 _n_kwclass
= n_kwclass
1148 if n_kwclass
!= null then
1149 n_kwclass
.parent
= self
1153 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1155 assert old_child
!= null
1156 if _n_kwabstract
== old_child
then
1157 if new_child
!= null then
1158 new_child
.parent
= self
1159 assert new_child
isa TKwabstract
1160 _n_kwabstract
= new_child
1162 _n_kwabstract
= null
1166 if _n_kwclass
== old_child
then
1167 if new_child
!= null then
1168 new_child
.parent
= self
1169 assert new_child
isa TKwclass
1170 _n_kwclass
= new_child
1178 redef meth visit_all
(v
: Visitor)
1180 if _n_kwabstract
!= null then
1181 v
.visit
(_n_kwabstract
)
1183 if _n_kwclass
!= null then
1188 redef meth visit_all_reverse
(v
: Visitor)
1190 if _n_kwabstract
!= null then
1191 v
.visit
(_n_kwabstract
)
1193 if _n_kwclass
!= null then
1198 redef class AInterfaceClasskind
1199 redef meth n_kwinterface
=(n
: TKwinterface)
1207 private init empty_init
do end
1209 init init_ainterfaceclasskind
(
1210 n_kwinterface
: TKwinterface
1214 _n_kwinterface
= n_kwinterface
1215 if n_kwinterface
!= null then
1216 n_kwinterface
.parent
= self
1220 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1222 assert old_child
!= null
1223 if _n_kwinterface
== old_child
then
1224 if new_child
!= null then
1225 new_child
.parent
= self
1226 assert new_child
isa TKwinterface
1227 _n_kwinterface
= new_child
1229 _n_kwinterface
= null
1235 redef meth visit_all
(v
: Visitor)
1237 if _n_kwinterface
!= null then
1238 v
.visit
(_n_kwinterface
)
1242 redef meth visit_all_reverse
(v
: Visitor)
1244 if _n_kwinterface
!= null then
1245 v
.visit
(_n_kwinterface
)
1249 redef class AUniversalClasskind
1250 redef meth n_kwuniversal
=(n
: TKwuniversal)
1258 private init empty_init
do end
1260 init init_auniversalclasskind
(
1261 n_kwuniversal
: TKwuniversal
1265 _n_kwuniversal
= n_kwuniversal
1266 if n_kwuniversal
!= null then
1267 n_kwuniversal
.parent
= self
1271 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1273 assert old_child
!= null
1274 if _n_kwuniversal
== old_child
then
1275 if new_child
!= null then
1276 new_child
.parent
= self
1277 assert new_child
isa TKwuniversal
1278 _n_kwuniversal
= new_child
1280 _n_kwuniversal
= null
1286 redef meth visit_all
(v
: Visitor)
1288 if _n_kwuniversal
!= null then
1289 v
.visit
(_n_kwuniversal
)
1293 redef meth visit_all_reverse
(v
: Visitor)
1295 if _n_kwuniversal
!= null then
1296 v
.visit
(_n_kwuniversal
)
1300 redef class AFormaldef
1301 redef meth n_id
=(n
: TClassid)
1308 redef meth n_type
=(n
: PType)
1316 private init empty_init
do end
1318 init init_aformaldef
(
1325 if n_id
!= null then
1329 if n_type
!= null then
1330 n_type
.parent
= self
1334 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1336 assert old_child
!= null
1337 if _n_id
== old_child
then
1338 if new_child
!= null then
1339 new_child
.parent
= self
1340 assert new_child
isa TClassid
1347 if _n_type
== old_child
then
1348 if new_child
!= null then
1349 new_child
.parent
= self
1350 assert new_child
isa PType
1359 redef meth visit_all
(v
: Visitor)
1361 if _n_id
!= null then
1364 if _n_type
!= null then
1369 redef meth visit_all_reverse
(v
: Visitor)
1371 if _n_id
!= null then
1374 if _n_type
!= null then
1379 redef class ASuperclass
1380 redef meth n_kwspecial
=(n
: TKwspecial)
1387 redef meth n_type
=(n
: PType)
1395 private init empty_init
do end
1397 init init_asuperclass
(
1398 n_kwspecial
: TKwspecial ,
1403 _n_kwspecial
= n_kwspecial
1404 if n_kwspecial
!= null then
1405 n_kwspecial
.parent
= self
1408 if n_type
!= null then
1409 n_type
.parent
= self
1413 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1415 assert old_child
!= null
1416 if _n_kwspecial
== old_child
then
1417 if new_child
!= null then
1418 new_child
.parent
= self
1419 assert new_child
isa TKwspecial
1420 _n_kwspecial
= new_child
1426 if _n_type
== old_child
then
1427 if new_child
!= null then
1428 new_child
.parent
= self
1429 assert new_child
isa PType
1438 redef meth visit_all
(v
: Visitor)
1440 if _n_kwspecial
!= null then
1441 v
.visit
(_n_kwspecial
)
1443 if _n_type
!= null then
1448 redef meth visit_all_reverse
(v
: Visitor)
1450 if _n_kwspecial
!= null then
1451 v
.visit
(_n_kwspecial
)
1453 if _n_type
!= null then
1458 redef class AAttrPropdef
1459 redef meth n_doc
=(n
: PDoc)
1466 redef meth n_readable
=(n
: PAble)
1473 redef meth n_writable
=(n
: PAble)
1480 redef meth n_kwredef
=(n
: TKwredef)
1487 redef meth n_visibility
=(n
: PVisibility)
1494 redef meth n_kwattr
=(n
: TKwattr)
1501 redef meth n_id
=(n
: TAttrid)
1508 redef meth n_type
=(n
: PType)
1515 redef meth n_expr
=(n
: PExpr)
1523 private init empty_init
do end
1525 init init_aattrpropdef
(
1529 n_kwredef
: TKwredef ,
1530 n_visibility
: PVisibility ,
1539 if n_doc
!= null then
1542 _n_readable
= n_readable
1543 if n_readable
!= null then
1544 n_readable
.parent
= self
1546 _n_writable
= n_writable
1547 if n_writable
!= null then
1548 n_writable
.parent
= self
1550 _n_kwredef
= n_kwredef
1551 if n_kwredef
!= null then
1552 n_kwredef
.parent
= self
1554 _n_visibility
= n_visibility
1555 if n_visibility
!= null then
1556 n_visibility
.parent
= self
1558 _n_kwattr
= n_kwattr
1559 if n_kwattr
!= null then
1560 n_kwattr
.parent
= self
1563 if n_id
!= null then
1567 if n_type
!= null then
1568 n_type
.parent
= self
1571 if n_expr
!= null then
1572 n_expr
.parent
= self
1576 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1578 assert old_child
!= null
1579 if _n_doc
== old_child
then
1580 if new_child
!= null then
1581 new_child
.parent
= self
1582 assert new_child
isa PDoc
1589 if _n_readable
== old_child
then
1590 if new_child
!= null then
1591 new_child
.parent
= self
1592 assert new_child
isa PAble
1593 _n_readable
= new_child
1599 if _n_writable
== old_child
then
1600 if new_child
!= null then
1601 new_child
.parent
= self
1602 assert new_child
isa PAble
1603 _n_writable
= new_child
1609 if _n_kwredef
== old_child
then
1610 if new_child
!= null then
1611 new_child
.parent
= self
1612 assert new_child
isa TKwredef
1613 _n_kwredef
= new_child
1619 if _n_visibility
== old_child
then
1620 if new_child
!= null then
1621 new_child
.parent
= self
1622 assert new_child
isa PVisibility
1623 _n_visibility
= new_child
1625 _n_visibility
= null
1629 if _n_kwattr
== old_child
then
1630 if new_child
!= null then
1631 new_child
.parent
= self
1632 assert new_child
isa TKwattr
1633 _n_kwattr
= new_child
1639 if _n_id
== old_child
then
1640 if new_child
!= null then
1641 new_child
.parent
= self
1642 assert new_child
isa TAttrid
1649 if _n_type
== old_child
then
1650 if new_child
!= null then
1651 new_child
.parent
= self
1652 assert new_child
isa PType
1659 if _n_expr
== old_child
then
1660 if new_child
!= null then
1661 new_child
.parent
= self
1662 assert new_child
isa PExpr
1671 redef meth visit_all
(v
: Visitor)
1673 if _n_doc
!= null then
1676 if _n_readable
!= null then
1677 v
.visit
(_n_readable
)
1679 if _n_writable
!= null then
1680 v
.visit
(_n_writable
)
1682 if _n_kwredef
!= null then
1685 if _n_visibility
!= null then
1686 v
.visit
(_n_visibility
)
1688 if _n_kwattr
!= null then
1691 if _n_id
!= null then
1694 if _n_type
!= null then
1697 if _n_expr
!= null then
1702 redef meth visit_all_reverse
(v
: Visitor)
1704 if _n_doc
!= null then
1707 if _n_readable
!= null then
1708 v
.visit
(_n_readable
)
1710 if _n_writable
!= null then
1711 v
.visit
(_n_writable
)
1713 if _n_kwredef
!= null then
1716 if _n_visibility
!= null then
1717 v
.visit
(_n_visibility
)
1719 if _n_kwattr
!= null then
1722 if _n_id
!= null then
1725 if _n_type
!= null then
1728 if _n_expr
!= null then
1733 redef class AMethPropdef
1734 redef meth n_doc
=(n
: PDoc)
1741 redef meth n_kwredef
=(n
: TKwredef)
1748 redef meth n_visibility
=(n
: PVisibility)
1755 redef meth n_methid
=(n
: PMethid)
1762 redef meth n_signature
=(n
: PSignature)
1770 private init empty_init
do end
1772 init init_amethpropdef
(
1774 n_kwredef
: TKwredef ,
1775 n_visibility
: PVisibility ,
1777 n_signature
: PSignature
1782 if n_doc
!= null then
1785 _n_kwredef
= n_kwredef
1786 if n_kwredef
!= null then
1787 n_kwredef
.parent
= self
1789 _n_visibility
= n_visibility
1790 if n_visibility
!= null then
1791 n_visibility
.parent
= self
1793 _n_methid
= n_methid
1794 if n_methid
!= null then
1795 n_methid
.parent
= self
1797 _n_signature
= n_signature
1798 if n_signature
!= null then
1799 n_signature
.parent
= self
1803 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1805 assert old_child
!= null
1806 if _n_doc
== old_child
then
1807 if new_child
!= null then
1808 new_child
.parent
= self
1809 assert new_child
isa PDoc
1816 if _n_kwredef
== old_child
then
1817 if new_child
!= null then
1818 new_child
.parent
= self
1819 assert new_child
isa TKwredef
1820 _n_kwredef
= new_child
1826 if _n_visibility
== old_child
then
1827 if new_child
!= null then
1828 new_child
.parent
= self
1829 assert new_child
isa PVisibility
1830 _n_visibility
= new_child
1832 _n_visibility
= null
1836 if _n_methid
== old_child
then
1837 if new_child
!= null then
1838 new_child
.parent
= self
1839 assert new_child
isa PMethid
1840 _n_methid
= new_child
1846 if _n_signature
== old_child
then
1847 if new_child
!= null then
1848 new_child
.parent
= self
1849 assert new_child
isa PSignature
1850 _n_signature
= new_child
1858 redef meth visit_all
(v
: Visitor)
1860 if _n_doc
!= null then
1863 if _n_kwredef
!= null then
1866 if _n_visibility
!= null then
1867 v
.visit
(_n_visibility
)
1869 if _n_methid
!= null then
1872 if _n_signature
!= null then
1873 v
.visit
(_n_signature
)
1877 redef meth visit_all_reverse
(v
: Visitor)
1879 if _n_doc
!= null then
1882 if _n_kwredef
!= null then
1885 if _n_visibility
!= null then
1886 v
.visit
(_n_visibility
)
1888 if _n_methid
!= null then
1891 if _n_signature
!= null then
1892 v
.visit
(_n_signature
)
1896 redef class ADeferredMethPropdef
1897 redef meth n_doc
=(n
: PDoc)
1904 redef meth n_kwredef
=(n
: TKwredef)
1911 redef meth n_visibility
=(n
: PVisibility)
1918 redef meth n_kwmeth
=(n
: TKwmeth)
1925 redef meth n_methid
=(n
: PMethid)
1932 redef meth n_signature
=(n
: PSignature)
1940 private init empty_init
do end
1942 init init_adeferredmethpropdef
(
1944 n_kwredef
: TKwredef ,
1945 n_visibility
: PVisibility ,
1948 n_signature
: PSignature
1953 if n_doc
!= null then
1956 _n_kwredef
= n_kwredef
1957 if n_kwredef
!= null then
1958 n_kwredef
.parent
= self
1960 _n_visibility
= n_visibility
1961 if n_visibility
!= null then
1962 n_visibility
.parent
= self
1964 _n_kwmeth
= n_kwmeth
1965 if n_kwmeth
!= null then
1966 n_kwmeth
.parent
= self
1968 _n_methid
= n_methid
1969 if n_methid
!= null then
1970 n_methid
.parent
= self
1972 _n_signature
= n_signature
1973 if n_signature
!= null then
1974 n_signature
.parent
= self
1978 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1980 assert old_child
!= null
1981 if _n_doc
== old_child
then
1982 if new_child
!= null then
1983 new_child
.parent
= self
1984 assert new_child
isa PDoc
1991 if _n_kwredef
== old_child
then
1992 if new_child
!= null then
1993 new_child
.parent
= self
1994 assert new_child
isa TKwredef
1995 _n_kwredef
= new_child
2001 if _n_visibility
== old_child
then
2002 if new_child
!= null then
2003 new_child
.parent
= self
2004 assert new_child
isa PVisibility
2005 _n_visibility
= new_child
2007 _n_visibility
= null
2011 if _n_kwmeth
== old_child
then
2012 if new_child
!= null then
2013 new_child
.parent
= self
2014 assert new_child
isa TKwmeth
2015 _n_kwmeth
= new_child
2021 if _n_methid
== old_child
then
2022 if new_child
!= null then
2023 new_child
.parent
= self
2024 assert new_child
isa PMethid
2025 _n_methid
= new_child
2031 if _n_signature
== old_child
then
2032 if new_child
!= null then
2033 new_child
.parent
= self
2034 assert new_child
isa PSignature
2035 _n_signature
= new_child
2043 redef meth visit_all
(v
: Visitor)
2045 if _n_doc
!= null then
2048 if _n_kwredef
!= null then
2051 if _n_visibility
!= null then
2052 v
.visit
(_n_visibility
)
2054 if _n_kwmeth
!= null then
2057 if _n_methid
!= null then
2060 if _n_signature
!= null then
2061 v
.visit
(_n_signature
)
2065 redef meth visit_all_reverse
(v
: Visitor)
2067 if _n_doc
!= null then
2070 if _n_kwredef
!= null then
2073 if _n_visibility
!= null then
2074 v
.visit
(_n_visibility
)
2076 if _n_kwmeth
!= null then
2079 if _n_methid
!= null then
2082 if _n_signature
!= null then
2083 v
.visit
(_n_signature
)
2087 redef class AInternMethPropdef
2088 redef meth n_doc
=(n
: PDoc)
2095 redef meth n_kwredef
=(n
: TKwredef)
2102 redef meth n_visibility
=(n
: PVisibility)
2109 redef meth n_kwmeth
=(n
: TKwmeth)
2116 redef meth n_methid
=(n
: PMethid)
2123 redef meth n_signature
=(n
: PSignature)
2131 private init empty_init
do end
2133 init init_ainternmethpropdef
(
2135 n_kwredef
: TKwredef ,
2136 n_visibility
: PVisibility ,
2139 n_signature
: PSignature
2144 if n_doc
!= null then
2147 _n_kwredef
= n_kwredef
2148 if n_kwredef
!= null then
2149 n_kwredef
.parent
= self
2151 _n_visibility
= n_visibility
2152 if n_visibility
!= null then
2153 n_visibility
.parent
= self
2155 _n_kwmeth
= n_kwmeth
2156 if n_kwmeth
!= null then
2157 n_kwmeth
.parent
= self
2159 _n_methid
= n_methid
2160 if n_methid
!= null then
2161 n_methid
.parent
= self
2163 _n_signature
= n_signature
2164 if n_signature
!= null then
2165 n_signature
.parent
= self
2169 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2171 assert old_child
!= null
2172 if _n_doc
== old_child
then
2173 if new_child
!= null then
2174 new_child
.parent
= self
2175 assert new_child
isa PDoc
2182 if _n_kwredef
== old_child
then
2183 if new_child
!= null then
2184 new_child
.parent
= self
2185 assert new_child
isa TKwredef
2186 _n_kwredef
= new_child
2192 if _n_visibility
== old_child
then
2193 if new_child
!= null then
2194 new_child
.parent
= self
2195 assert new_child
isa PVisibility
2196 _n_visibility
= new_child
2198 _n_visibility
= null
2202 if _n_kwmeth
== old_child
then
2203 if new_child
!= null then
2204 new_child
.parent
= self
2205 assert new_child
isa TKwmeth
2206 _n_kwmeth
= new_child
2212 if _n_methid
== old_child
then
2213 if new_child
!= null then
2214 new_child
.parent
= self
2215 assert new_child
isa PMethid
2216 _n_methid
= new_child
2222 if _n_signature
== old_child
then
2223 if new_child
!= null then
2224 new_child
.parent
= self
2225 assert new_child
isa PSignature
2226 _n_signature
= new_child
2234 redef meth visit_all
(v
: Visitor)
2236 if _n_doc
!= null then
2239 if _n_kwredef
!= null then
2242 if _n_visibility
!= null then
2243 v
.visit
(_n_visibility
)
2245 if _n_kwmeth
!= null then
2248 if _n_methid
!= null then
2251 if _n_signature
!= null then
2252 v
.visit
(_n_signature
)
2256 redef meth visit_all_reverse
(v
: Visitor)
2258 if _n_doc
!= null then
2261 if _n_kwredef
!= null then
2264 if _n_visibility
!= null then
2265 v
.visit
(_n_visibility
)
2267 if _n_kwmeth
!= null then
2270 if _n_methid
!= null then
2273 if _n_signature
!= null then
2274 v
.visit
(_n_signature
)
2278 redef class AExternMethPropdef
2279 redef meth n_doc
=(n
: PDoc)
2286 redef meth n_kwredef
=(n
: TKwredef)
2293 redef meth n_visibility
=(n
: PVisibility)
2300 redef meth n_kwmeth
=(n
: TKwmeth)
2307 redef meth n_methid
=(n
: PMethid)
2314 redef meth n_signature
=(n
: PSignature)
2321 redef meth n_extern
=(n
: TString)
2329 private init empty_init
do end
2331 init init_aexternmethpropdef
(
2333 n_kwredef
: TKwredef ,
2334 n_visibility
: PVisibility ,
2337 n_signature
: PSignature ,
2343 if n_doc
!= null then
2346 _n_kwredef
= n_kwredef
2347 if n_kwredef
!= null then
2348 n_kwredef
.parent
= self
2350 _n_visibility
= n_visibility
2351 if n_visibility
!= null then
2352 n_visibility
.parent
= self
2354 _n_kwmeth
= n_kwmeth
2355 if n_kwmeth
!= null then
2356 n_kwmeth
.parent
= self
2358 _n_methid
= n_methid
2359 if n_methid
!= null then
2360 n_methid
.parent
= self
2362 _n_signature
= n_signature
2363 if n_signature
!= null then
2364 n_signature
.parent
= self
2366 _n_extern
= n_extern
2367 if n_extern
!= null then
2368 n_extern
.parent
= self
2372 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2374 assert old_child
!= null
2375 if _n_doc
== old_child
then
2376 if new_child
!= null then
2377 new_child
.parent
= self
2378 assert new_child
isa PDoc
2385 if _n_kwredef
== old_child
then
2386 if new_child
!= null then
2387 new_child
.parent
= self
2388 assert new_child
isa TKwredef
2389 _n_kwredef
= new_child
2395 if _n_visibility
== old_child
then
2396 if new_child
!= null then
2397 new_child
.parent
= self
2398 assert new_child
isa PVisibility
2399 _n_visibility
= new_child
2401 _n_visibility
= null
2405 if _n_kwmeth
== old_child
then
2406 if new_child
!= null then
2407 new_child
.parent
= self
2408 assert new_child
isa TKwmeth
2409 _n_kwmeth
= new_child
2415 if _n_methid
== old_child
then
2416 if new_child
!= null then
2417 new_child
.parent
= self
2418 assert new_child
isa PMethid
2419 _n_methid
= new_child
2425 if _n_signature
== old_child
then
2426 if new_child
!= null then
2427 new_child
.parent
= self
2428 assert new_child
isa PSignature
2429 _n_signature
= new_child
2435 if _n_extern
== old_child
then
2436 if new_child
!= null then
2437 new_child
.parent
= self
2438 assert new_child
isa TString
2439 _n_extern
= new_child
2447 redef meth visit_all
(v
: Visitor)
2449 if _n_doc
!= null then
2452 if _n_kwredef
!= null then
2455 if _n_visibility
!= null then
2456 v
.visit
(_n_visibility
)
2458 if _n_kwmeth
!= null then
2461 if _n_methid
!= null then
2464 if _n_signature
!= null then
2465 v
.visit
(_n_signature
)
2467 if _n_extern
!= null then
2472 redef meth visit_all_reverse
(v
: Visitor)
2474 if _n_doc
!= null then
2477 if _n_kwredef
!= null then
2480 if _n_visibility
!= null then
2481 v
.visit
(_n_visibility
)
2483 if _n_kwmeth
!= null then
2486 if _n_methid
!= null then
2489 if _n_signature
!= null then
2490 v
.visit
(_n_signature
)
2492 if _n_extern
!= null then
2497 redef class AConcreteMethPropdef
2498 redef meth n_doc
=(n
: PDoc)
2505 redef meth n_kwredef
=(n
: TKwredef)
2512 redef meth n_visibility
=(n
: PVisibility)
2519 redef meth n_kwmeth
=(n
: TKwmeth)
2526 redef meth n_methid
=(n
: PMethid)
2533 redef meth n_signature
=(n
: PSignature)
2540 redef meth n_block
=(n
: PExpr)
2548 private init empty_init
do end
2550 init init_aconcretemethpropdef
(
2552 n_kwredef
: TKwredef ,
2553 n_visibility
: PVisibility ,
2556 n_signature
: PSignature ,
2562 if n_doc
!= null then
2565 _n_kwredef
= n_kwredef
2566 if n_kwredef
!= null then
2567 n_kwredef
.parent
= self
2569 _n_visibility
= n_visibility
2570 if n_visibility
!= null then
2571 n_visibility
.parent
= self
2573 _n_kwmeth
= n_kwmeth
2574 if n_kwmeth
!= null then
2575 n_kwmeth
.parent
= self
2577 _n_methid
= n_methid
2578 if n_methid
!= null then
2579 n_methid
.parent
= self
2581 _n_signature
= n_signature
2582 if n_signature
!= null then
2583 n_signature
.parent
= self
2586 if n_block
!= null then
2587 n_block
.parent
= self
2591 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2593 assert old_child
!= null
2594 if _n_doc
== old_child
then
2595 if new_child
!= null then
2596 new_child
.parent
= self
2597 assert new_child
isa PDoc
2604 if _n_kwredef
== old_child
then
2605 if new_child
!= null then
2606 new_child
.parent
= self
2607 assert new_child
isa TKwredef
2608 _n_kwredef
= new_child
2614 if _n_visibility
== old_child
then
2615 if new_child
!= null then
2616 new_child
.parent
= self
2617 assert new_child
isa PVisibility
2618 _n_visibility
= new_child
2620 _n_visibility
= null
2624 if _n_kwmeth
== old_child
then
2625 if new_child
!= null then
2626 new_child
.parent
= self
2627 assert new_child
isa TKwmeth
2628 _n_kwmeth
= new_child
2634 if _n_methid
== old_child
then
2635 if new_child
!= null then
2636 new_child
.parent
= self
2637 assert new_child
isa PMethid
2638 _n_methid
= new_child
2644 if _n_signature
== old_child
then
2645 if new_child
!= null then
2646 new_child
.parent
= self
2647 assert new_child
isa PSignature
2648 _n_signature
= new_child
2654 if _n_block
== old_child
then
2655 if new_child
!= null then
2656 new_child
.parent
= self
2657 assert new_child
isa PExpr
2658 _n_block
= new_child
2666 redef meth visit_all
(v
: Visitor)
2668 if _n_doc
!= null then
2671 if _n_kwredef
!= null then
2674 if _n_visibility
!= null then
2675 v
.visit
(_n_visibility
)
2677 if _n_kwmeth
!= null then
2680 if _n_methid
!= null then
2683 if _n_signature
!= null then
2684 v
.visit
(_n_signature
)
2686 if _n_block
!= null then
2691 redef meth visit_all_reverse
(v
: Visitor)
2693 if _n_doc
!= null then
2696 if _n_kwredef
!= null then
2699 if _n_visibility
!= null then
2700 v
.visit
(_n_visibility
)
2702 if _n_kwmeth
!= null then
2705 if _n_methid
!= null then
2708 if _n_signature
!= null then
2709 v
.visit
(_n_signature
)
2711 if _n_block
!= null then
2716 redef class AConcreteInitPropdef
2717 redef meth n_doc
=(n
: PDoc)
2724 redef meth n_kwredef
=(n
: TKwredef)
2731 redef meth n_visibility
=(n
: PVisibility)
2738 redef meth n_kwinit
=(n
: TKwinit)
2745 redef meth n_methid
=(n
: PMethid)
2752 redef meth n_signature
=(n
: PSignature)
2759 redef meth n_block
=(n
: PExpr)
2767 private init empty_init
do end
2769 init init_aconcreteinitpropdef
(
2771 n_kwredef
: TKwredef ,
2772 n_visibility
: PVisibility ,
2775 n_signature
: PSignature ,
2781 if n_doc
!= null then
2784 _n_kwredef
= n_kwredef
2785 if n_kwredef
!= null then
2786 n_kwredef
.parent
= self
2788 _n_visibility
= n_visibility
2789 if n_visibility
!= null then
2790 n_visibility
.parent
= self
2792 _n_kwinit
= n_kwinit
2793 if n_kwinit
!= null then
2794 n_kwinit
.parent
= self
2796 _n_methid
= n_methid
2797 if n_methid
!= null then
2798 n_methid
.parent
= self
2800 _n_signature
= n_signature
2801 if n_signature
!= null then
2802 n_signature
.parent
= self
2805 if n_block
!= null then
2806 n_block
.parent
= self
2810 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2812 assert old_child
!= null
2813 if _n_doc
== old_child
then
2814 if new_child
!= null then
2815 new_child
.parent
= self
2816 assert new_child
isa PDoc
2823 if _n_kwredef
== old_child
then
2824 if new_child
!= null then
2825 new_child
.parent
= self
2826 assert new_child
isa TKwredef
2827 _n_kwredef
= new_child
2833 if _n_visibility
== old_child
then
2834 if new_child
!= null then
2835 new_child
.parent
= self
2836 assert new_child
isa PVisibility
2837 _n_visibility
= new_child
2839 _n_visibility
= null
2843 if _n_kwinit
== old_child
then
2844 if new_child
!= null then
2845 new_child
.parent
= self
2846 assert new_child
isa TKwinit
2847 _n_kwinit
= new_child
2853 if _n_methid
== old_child
then
2854 if new_child
!= null then
2855 new_child
.parent
= self
2856 assert new_child
isa PMethid
2857 _n_methid
= new_child
2863 if _n_signature
== old_child
then
2864 if new_child
!= null then
2865 new_child
.parent
= self
2866 assert new_child
isa PSignature
2867 _n_signature
= new_child
2873 if _n_block
== old_child
then
2874 if new_child
!= null then
2875 new_child
.parent
= self
2876 assert new_child
isa PExpr
2877 _n_block
= new_child
2885 redef meth visit_all
(v
: Visitor)
2887 if _n_doc
!= null then
2890 if _n_kwredef
!= null then
2893 if _n_visibility
!= null then
2894 v
.visit
(_n_visibility
)
2896 if _n_kwinit
!= null then
2899 if _n_methid
!= null then
2902 if _n_signature
!= null then
2903 v
.visit
(_n_signature
)
2905 if _n_block
!= null then
2910 redef meth visit_all_reverse
(v
: Visitor)
2912 if _n_doc
!= null then
2915 if _n_kwredef
!= null then
2918 if _n_visibility
!= null then
2919 v
.visit
(_n_visibility
)
2921 if _n_kwinit
!= null then
2924 if _n_methid
!= null then
2927 if _n_signature
!= null then
2928 v
.visit
(_n_signature
)
2930 if _n_block
!= null then
2935 redef class AMainMethPropdef
2936 redef meth n_kwredef
=(n
: TKwredef)
2943 redef meth n_block
=(n
: PExpr)
2951 private init empty_init
do end
2953 init init_amainmethpropdef
(
2954 n_kwredef
: TKwredef ,
2959 _n_kwredef
= n_kwredef
2960 if n_kwredef
!= null then
2961 n_kwredef
.parent
= self
2964 if n_block
!= null then
2965 n_block
.parent
= self
2969 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2971 assert old_child
!= null
2972 if _n_kwredef
== old_child
then
2973 if new_child
!= null then
2974 new_child
.parent
= self
2975 assert new_child
isa TKwredef
2976 _n_kwredef
= new_child
2982 if _n_block
== old_child
then
2983 if new_child
!= null then
2984 new_child
.parent
= self
2985 assert new_child
isa PExpr
2986 _n_block
= new_child
2994 redef meth visit_all
(v
: Visitor)
2996 if _n_kwredef
!= null then
2999 if _n_block
!= null then
3004 redef meth visit_all_reverse
(v
: Visitor)
3006 if _n_kwredef
!= null then
3009 if _n_block
!= null then
3014 redef class ATypePropdef
3015 redef meth n_doc
=(n
: PDoc)
3022 redef meth n_kwredef
=(n
: TKwredef)
3029 redef meth n_visibility
=(n
: PVisibility)
3036 redef meth n_kwtype
=(n
: TKwtype)
3043 redef meth n_id
=(n
: TClassid)
3050 redef meth n_type
=(n
: PType)
3058 private init empty_init
do end
3060 init init_atypepropdef
(
3062 n_kwredef
: TKwredef ,
3063 n_visibility
: PVisibility ,
3071 if n_doc
!= null then
3074 _n_kwredef
= n_kwredef
3075 if n_kwredef
!= null then
3076 n_kwredef
.parent
= self
3078 _n_visibility
= n_visibility
3079 if n_visibility
!= null then
3080 n_visibility
.parent
= self
3082 _n_kwtype
= n_kwtype
3083 if n_kwtype
!= null then
3084 n_kwtype
.parent
= self
3087 if n_id
!= null then
3091 if n_type
!= null then
3092 n_type
.parent
= self
3096 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3098 assert old_child
!= null
3099 if _n_doc
== old_child
then
3100 if new_child
!= null then
3101 new_child
.parent
= self
3102 assert new_child
isa PDoc
3109 if _n_kwredef
== old_child
then
3110 if new_child
!= null then
3111 new_child
.parent
= self
3112 assert new_child
isa TKwredef
3113 _n_kwredef
= new_child
3119 if _n_visibility
== old_child
then
3120 if new_child
!= null then
3121 new_child
.parent
= self
3122 assert new_child
isa PVisibility
3123 _n_visibility
= new_child
3125 _n_visibility
= null
3129 if _n_kwtype
== old_child
then
3130 if new_child
!= null then
3131 new_child
.parent
= self
3132 assert new_child
isa TKwtype
3133 _n_kwtype
= new_child
3139 if _n_id
== old_child
then
3140 if new_child
!= null then
3141 new_child
.parent
= self
3142 assert new_child
isa TClassid
3149 if _n_type
== old_child
then
3150 if new_child
!= null then
3151 new_child
.parent
= self
3152 assert new_child
isa PType
3161 redef meth visit_all
(v
: Visitor)
3163 if _n_doc
!= null then
3166 if _n_kwredef
!= null then
3169 if _n_visibility
!= null then
3170 v
.visit
(_n_visibility
)
3172 if _n_kwtype
!= null then
3175 if _n_id
!= null then
3178 if _n_type
!= null then
3183 redef meth visit_all_reverse
(v
: Visitor)
3185 if _n_doc
!= null then
3188 if _n_kwredef
!= null then
3191 if _n_visibility
!= null then
3192 v
.visit
(_n_visibility
)
3194 if _n_kwtype
!= null then
3197 if _n_id
!= null then
3200 if _n_type
!= null then
3205 redef class AReadAble
3206 redef meth n_kwredef
=(n
: TKwredef)
3213 redef meth n_kwreadable
=(n
: TKwreadable)
3221 private init empty_init
do end
3223 init init_areadable
(
3224 n_kwredef
: TKwredef ,
3225 n_kwreadable
: TKwreadable
3229 _n_kwredef
= n_kwredef
3230 if n_kwredef
!= null then
3231 n_kwredef
.parent
= self
3233 _n_kwreadable
= n_kwreadable
3234 if n_kwreadable
!= null then
3235 n_kwreadable
.parent
= self
3239 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3241 assert old_child
!= null
3242 if _n_kwredef
== old_child
then
3243 if new_child
!= null then
3244 new_child
.parent
= self
3245 assert new_child
isa TKwredef
3246 _n_kwredef
= new_child
3252 if _n_kwreadable
== old_child
then
3253 if new_child
!= null then
3254 new_child
.parent
= self
3255 assert new_child
isa TKwreadable
3256 _n_kwreadable
= new_child
3258 _n_kwreadable
= null
3264 redef meth visit_all
(v
: Visitor)
3266 if _n_kwredef
!= null then
3269 if _n_kwreadable
!= null then
3270 v
.visit
(_n_kwreadable
)
3274 redef meth visit_all_reverse
(v
: Visitor)
3276 if _n_kwredef
!= null then
3279 if _n_kwreadable
!= null then
3280 v
.visit
(_n_kwreadable
)
3284 redef class AWriteAble
3285 redef meth n_kwredef
=(n
: TKwredef)
3292 redef meth n_kwwritable
=(n
: TKwwritable)
3300 private init empty_init
do end
3302 init init_awriteable
(
3303 n_kwredef
: TKwredef ,
3304 n_kwwritable
: TKwwritable
3308 _n_kwredef
= n_kwredef
3309 if n_kwredef
!= null then
3310 n_kwredef
.parent
= self
3312 _n_kwwritable
= n_kwwritable
3313 if n_kwwritable
!= null then
3314 n_kwwritable
.parent
= self
3318 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3320 assert old_child
!= null
3321 if _n_kwredef
== old_child
then
3322 if new_child
!= null then
3323 new_child
.parent
= self
3324 assert new_child
isa TKwredef
3325 _n_kwredef
= new_child
3331 if _n_kwwritable
== old_child
then
3332 if new_child
!= null then
3333 new_child
.parent
= self
3334 assert new_child
isa TKwwritable
3335 _n_kwwritable
= new_child
3337 _n_kwwritable
= null
3343 redef meth visit_all
(v
: Visitor)
3345 if _n_kwredef
!= null then
3348 if _n_kwwritable
!= null then
3349 v
.visit
(_n_kwwritable
)
3353 redef meth visit_all_reverse
(v
: Visitor)
3355 if _n_kwredef
!= null then
3358 if _n_kwwritable
!= null then
3359 v
.visit
(_n_kwwritable
)
3363 redef class AIdMethid
3364 redef meth n_id
=(n
: TId)
3372 private init empty_init
do end
3374 init init_aidmethid
(
3380 if n_id
!= null then
3385 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3387 assert old_child
!= null
3388 if _n_id
== old_child
then
3389 if new_child
!= null then
3390 new_child
.parent
= self
3391 assert new_child
isa TId
3400 redef meth visit_all
(v
: Visitor)
3402 if _n_id
!= null then
3407 redef meth visit_all_reverse
(v
: Visitor)
3409 if _n_id
!= null then
3414 redef class APlusMethid
3415 redef meth n_plus
=(n
: TPlus)
3423 private init empty_init
do end
3425 init init_aplusmethid
(
3431 if n_plus
!= null then
3432 n_plus
.parent
= self
3436 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3438 assert old_child
!= null
3439 if _n_plus
== old_child
then
3440 if new_child
!= null then
3441 new_child
.parent
= self
3442 assert new_child
isa TPlus
3451 redef meth visit_all
(v
: Visitor)
3453 if _n_plus
!= null then
3458 redef meth visit_all_reverse
(v
: Visitor)
3460 if _n_plus
!= null then
3465 redef class AMinusMethid
3466 redef meth n_minus
=(n
: TMinus)
3474 private init empty_init
do end
3476 init init_aminusmethid
(
3482 if n_minus
!= null then
3483 n_minus
.parent
= self
3487 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3489 assert old_child
!= null
3490 if _n_minus
== old_child
then
3491 if new_child
!= null then
3492 new_child
.parent
= self
3493 assert new_child
isa TMinus
3494 _n_minus
= new_child
3502 redef meth visit_all
(v
: Visitor)
3504 if _n_minus
!= null then
3509 redef meth visit_all_reverse
(v
: Visitor)
3511 if _n_minus
!= null then
3516 redef class AStarMethid
3517 redef meth n_star
=(n
: TStar)
3525 private init empty_init
do end
3527 init init_astarmethid
(
3533 if n_star
!= null then
3534 n_star
.parent
= self
3538 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3540 assert old_child
!= null
3541 if _n_star
== old_child
then
3542 if new_child
!= null then
3543 new_child
.parent
= self
3544 assert new_child
isa TStar
3553 redef meth visit_all
(v
: Visitor)
3555 if _n_star
!= null then
3560 redef meth visit_all_reverse
(v
: Visitor)
3562 if _n_star
!= null then
3567 redef class ASlashMethid
3568 redef meth n_slash
=(n
: TSlash)
3576 private init empty_init
do end
3578 init init_aslashmethid
(
3584 if n_slash
!= null then
3585 n_slash
.parent
= self
3589 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3591 assert old_child
!= null
3592 if _n_slash
== old_child
then
3593 if new_child
!= null then
3594 new_child
.parent
= self
3595 assert new_child
isa TSlash
3596 _n_slash
= new_child
3604 redef meth visit_all
(v
: Visitor)
3606 if _n_slash
!= null then
3611 redef meth visit_all_reverse
(v
: Visitor)
3613 if _n_slash
!= null then
3618 redef class APercentMethid
3619 redef meth n_percent
=(n
: TPercent)
3627 private init empty_init
do end
3629 init init_apercentmethid
(
3634 _n_percent
= n_percent
3635 if n_percent
!= null then
3636 n_percent
.parent
= self
3640 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3642 assert old_child
!= null
3643 if _n_percent
== old_child
then
3644 if new_child
!= null then
3645 new_child
.parent
= self
3646 assert new_child
isa TPercent
3647 _n_percent
= new_child
3655 redef meth visit_all
(v
: Visitor)
3657 if _n_percent
!= null then
3662 redef meth visit_all_reverse
(v
: Visitor)
3664 if _n_percent
!= null then
3669 redef class AEqMethid
3670 redef meth n_eq
=(n
: TEq)
3678 private init empty_init
do end
3680 init init_aeqmethid
(
3686 if n_eq
!= null then
3691 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3693 assert old_child
!= null
3694 if _n_eq
== old_child
then
3695 if new_child
!= null then
3696 new_child
.parent
= self
3697 assert new_child
isa TEq
3706 redef meth visit_all
(v
: Visitor)
3708 if _n_eq
!= null then
3713 redef meth visit_all_reverse
(v
: Visitor)
3715 if _n_eq
!= null then
3720 redef class ANeMethid
3721 redef meth n_ne
=(n
: TNe)
3729 private init empty_init
do end
3731 init init_anemethid
(
3737 if n_ne
!= null then
3742 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3744 assert old_child
!= null
3745 if _n_ne
== old_child
then
3746 if new_child
!= null then
3747 new_child
.parent
= self
3748 assert new_child
isa TNe
3757 redef meth visit_all
(v
: Visitor)
3759 if _n_ne
!= null then
3764 redef meth visit_all_reverse
(v
: Visitor)
3766 if _n_ne
!= null then
3771 redef class ALeMethid
3772 redef meth n_le
=(n
: TLe)
3780 private init empty_init
do end
3782 init init_alemethid
(
3788 if n_le
!= null then
3793 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3795 assert old_child
!= null
3796 if _n_le
== old_child
then
3797 if new_child
!= null then
3798 new_child
.parent
= self
3799 assert new_child
isa TLe
3808 redef meth visit_all
(v
: Visitor)
3810 if _n_le
!= null then
3815 redef meth visit_all_reverse
(v
: Visitor)
3817 if _n_le
!= null then
3822 redef class AGeMethid
3823 redef meth n_ge
=(n
: TGe)
3831 private init empty_init
do end
3833 init init_agemethid
(
3839 if n_ge
!= null then
3844 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3846 assert old_child
!= null
3847 if _n_ge
== old_child
then
3848 if new_child
!= null then
3849 new_child
.parent
= self
3850 assert new_child
isa TGe
3859 redef meth visit_all
(v
: Visitor)
3861 if _n_ge
!= null then
3866 redef meth visit_all_reverse
(v
: Visitor)
3868 if _n_ge
!= null then
3873 redef class ALtMethid
3874 redef meth n_lt
=(n
: TLt)
3882 private init empty_init
do end
3884 init init_altmethid
(
3890 if n_lt
!= null then
3895 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3897 assert old_child
!= null
3898 if _n_lt
== old_child
then
3899 if new_child
!= null then
3900 new_child
.parent
= self
3901 assert new_child
isa TLt
3910 redef meth visit_all
(v
: Visitor)
3912 if _n_lt
!= null then
3917 redef meth visit_all_reverse
(v
: Visitor)
3919 if _n_lt
!= null then
3924 redef class AGtMethid
3925 redef meth n_gt
=(n
: TGt)
3933 private init empty_init
do end
3935 init init_agtmethid
(
3941 if n_gt
!= null then
3946 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3948 assert old_child
!= null
3949 if _n_gt
== old_child
then
3950 if new_child
!= null then
3951 new_child
.parent
= self
3952 assert new_child
isa TGt
3961 redef meth visit_all
(v
: Visitor)
3963 if _n_gt
!= null then
3968 redef meth visit_all_reverse
(v
: Visitor)
3970 if _n_gt
!= null then
3975 redef class ABraMethid
3976 redef meth n_obra
=(n
: TObra)
3983 redef meth n_cbra
=(n
: TCbra)
3991 private init empty_init
do end
3993 init init_abramethid
(
4000 if n_obra
!= null then
4001 n_obra
.parent
= self
4004 if n_cbra
!= null then
4005 n_cbra
.parent
= self
4009 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4011 assert old_child
!= null
4012 if _n_obra
== old_child
then
4013 if new_child
!= null then
4014 new_child
.parent
= self
4015 assert new_child
isa TObra
4022 if _n_cbra
== old_child
then
4023 if new_child
!= null then
4024 new_child
.parent
= self
4025 assert new_child
isa TCbra
4034 redef meth visit_all
(v
: Visitor)
4036 if _n_obra
!= null then
4039 if _n_cbra
!= null then
4044 redef meth visit_all_reverse
(v
: Visitor)
4046 if _n_obra
!= null then
4049 if _n_cbra
!= null then
4054 redef class AStarshipMethid
4055 redef meth n_starship
=(n
: TStarship)
4063 private init empty_init
do end
4065 init init_astarshipmethid
(
4066 n_starship
: TStarship
4070 _n_starship
= n_starship
4071 if n_starship
!= null then
4072 n_starship
.parent
= self
4076 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4078 assert old_child
!= null
4079 if _n_starship
== old_child
then
4080 if new_child
!= null then
4081 new_child
.parent
= self
4082 assert new_child
isa TStarship
4083 _n_starship
= new_child
4091 redef meth visit_all
(v
: Visitor)
4093 if _n_starship
!= null then
4094 v
.visit
(_n_starship
)
4098 redef meth visit_all_reverse
(v
: Visitor)
4100 if _n_starship
!= null then
4101 v
.visit
(_n_starship
)
4105 redef class AAssignMethid
4106 redef meth n_id
=(n
: TId)
4113 redef meth n_assign
=(n
: TAssign)
4121 private init empty_init
do end
4123 init init_aassignmethid
(
4130 if n_id
!= null then
4133 _n_assign
= n_assign
4134 if n_assign
!= null then
4135 n_assign
.parent
= self
4139 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4141 assert old_child
!= null
4142 if _n_id
== old_child
then
4143 if new_child
!= null then
4144 new_child
.parent
= self
4145 assert new_child
isa TId
4152 if _n_assign
== old_child
then
4153 if new_child
!= null then
4154 new_child
.parent
= self
4155 assert new_child
isa TAssign
4156 _n_assign
= new_child
4164 redef meth visit_all
(v
: Visitor)
4166 if _n_id
!= null then
4169 if _n_assign
!= null then
4174 redef meth visit_all_reverse
(v
: Visitor)
4176 if _n_id
!= null then
4179 if _n_assign
!= null then
4184 redef class ABraassignMethid
4185 redef meth n_obra
=(n
: TObra)
4192 redef meth n_cbra
=(n
: TCbra)
4199 redef meth n_assign
=(n
: TAssign)
4207 private init empty_init
do end
4209 init init_abraassignmethid
(
4217 if n_obra
!= null then
4218 n_obra
.parent
= self
4221 if n_cbra
!= null then
4222 n_cbra
.parent
= self
4224 _n_assign
= n_assign
4225 if n_assign
!= null then
4226 n_assign
.parent
= self
4230 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4232 assert old_child
!= null
4233 if _n_obra
== old_child
then
4234 if new_child
!= null then
4235 new_child
.parent
= self
4236 assert new_child
isa TObra
4243 if _n_cbra
== old_child
then
4244 if new_child
!= null then
4245 new_child
.parent
= self
4246 assert new_child
isa TCbra
4253 if _n_assign
== old_child
then
4254 if new_child
!= null then
4255 new_child
.parent
= self
4256 assert new_child
isa TAssign
4257 _n_assign
= new_child
4265 redef meth visit_all
(v
: Visitor)
4267 if _n_obra
!= null then
4270 if _n_cbra
!= null then
4273 if _n_assign
!= null then
4278 redef meth visit_all_reverse
(v
: Visitor)
4280 if _n_obra
!= null then
4283 if _n_cbra
!= null then
4286 if _n_assign
!= null then
4291 redef class ASignature
4292 redef meth n_type
=(n
: PType)
4300 private init empty_init
do end
4302 init init_asignature
(
4303 n_params
: Array[Object] , # Should be Array[PParam]
4308 _n_params
= new List[PParam]
4309 for n
in n_params
do
4315 if n_type
!= null then
4316 n_type
.parent
= self
4320 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4322 assert old_child
!= null
4323 for i
in [0.._n_params
.length
[ do
4324 if _n_params
[i
] == old_child
then
4325 if new_child
!= null then
4326 assert new_child
isa PParam
4327 _n_params
[i
] = new_child
4328 new_child
.parent
= self
4330 _n_params
.remove_at
(i
)
4335 if _n_type
== old_child
then
4336 if new_child
!= null then
4337 new_child
.parent
= self
4338 assert new_child
isa PType
4347 redef meth visit_all
(v
: Visitor)
4349 for n
in _n_params
do
4352 if _n_type
!= null then
4357 redef meth visit_all_reverse
(v
: Visitor)
4360 var i
= _n_params
.length
4362 v
.visit
(_n_params
[i
])
4366 if _n_type
!= null then
4372 redef meth n_id
=(n
: TId)
4379 redef meth n_type
=(n
: PType)
4386 redef meth n_dotdotdot
=(n
: TDotdotdot)
4394 private init empty_init
do end
4399 n_dotdotdot
: TDotdotdot
4404 if n_id
!= null then
4408 if n_type
!= null then
4409 n_type
.parent
= self
4411 _n_dotdotdot
= n_dotdotdot
4412 if n_dotdotdot
!= null then
4413 n_dotdotdot
.parent
= self
4417 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4419 assert old_child
!= null
4420 if _n_id
== old_child
then
4421 if new_child
!= null then
4422 new_child
.parent
= self
4423 assert new_child
isa TId
4430 if _n_type
== old_child
then
4431 if new_child
!= null then
4432 new_child
.parent
= self
4433 assert new_child
isa PType
4440 if _n_dotdotdot
== old_child
then
4441 if new_child
!= null then
4442 new_child
.parent
= self
4443 assert new_child
isa TDotdotdot
4444 _n_dotdotdot
= new_child
4452 redef meth visit_all
(v
: Visitor)
4454 if _n_id
!= null then
4457 if _n_type
!= null then
4460 if _n_dotdotdot
!= null then
4461 v
.visit
(_n_dotdotdot
)
4465 redef meth visit_all_reverse
(v
: Visitor)
4467 if _n_id
!= null then
4470 if _n_type
!= null then
4473 if _n_dotdotdot
!= null then
4474 v
.visit
(_n_dotdotdot
)
4479 redef meth n_id
=(n
: TClassid)
4487 private init empty_init
do end
4491 n_types
: Array[Object] # Should be Array[PType]
4496 if n_id
!= null then
4499 _n_types
= new List[PType]
4507 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4509 assert old_child
!= null
4510 if _n_id
== old_child
then
4511 if new_child
!= null then
4512 new_child
.parent
= self
4513 assert new_child
isa TClassid
4520 for i
in [0.._n_types
.length
[ do
4521 if _n_types
[i
] == old_child
then
4522 if new_child
!= null then
4523 assert new_child
isa PType
4524 _n_types
[i
] = new_child
4525 new_child
.parent
= self
4527 _n_types
.remove_at
(i
)
4534 redef meth visit_all
(v
: Visitor)
4536 if _n_id
!= null then
4539 for n
in _n_types
do
4544 redef meth visit_all_reverse
(v
: Visitor)
4546 if _n_id
!= null then
4550 var i
= _n_types
.length
4552 v
.visit
(_n_types
[i
])
4558 redef class ABlockExpr
4560 private init empty_init
do end
4562 init init_ablockexpr
(
4563 n_expr
: Array[Object] # Should be Array[PExpr]
4567 _n_expr
= new List[PExpr]
4575 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4577 assert old_child
!= null
4578 for i
in [0.._n_expr
.length
[ do
4579 if _n_expr
[i
] == old_child
then
4580 if new_child
!= null then
4581 assert new_child
isa PExpr
4582 _n_expr
[i
] = new_child
4583 new_child
.parent
= self
4585 _n_expr
.remove_at
(i
)
4592 redef meth visit_all
(v
: Visitor)
4599 redef meth visit_all_reverse
(v
: Visitor)
4602 var i
= _n_expr
.length
4610 redef class AVardeclExpr
4611 redef meth n_kwvar
=(n
: TKwvar)
4618 redef meth n_id
=(n
: TId)
4625 redef meth n_type
=(n
: PType)
4632 redef meth n_assign
=(n
: TAssign)
4639 redef meth n_expr
=(n
: PExpr)
4647 private init empty_init
do end
4649 init init_avardeclexpr
(
4659 if n_kwvar
!= null then
4660 n_kwvar
.parent
= self
4663 if n_id
!= null then
4667 if n_type
!= null then
4668 n_type
.parent
= self
4670 _n_assign
= n_assign
4671 if n_assign
!= null then
4672 n_assign
.parent
= self
4675 if n_expr
!= null then
4676 n_expr
.parent
= self
4680 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4682 assert old_child
!= null
4683 if _n_kwvar
== old_child
then
4684 if new_child
!= null then
4685 new_child
.parent
= self
4686 assert new_child
isa TKwvar
4687 _n_kwvar
= new_child
4693 if _n_id
== old_child
then
4694 if new_child
!= null then
4695 new_child
.parent
= self
4696 assert new_child
isa TId
4703 if _n_type
== old_child
then
4704 if new_child
!= null then
4705 new_child
.parent
= self
4706 assert new_child
isa PType
4713 if _n_assign
== old_child
then
4714 if new_child
!= null then
4715 new_child
.parent
= self
4716 assert new_child
isa TAssign
4717 _n_assign
= new_child
4723 if _n_expr
== old_child
then
4724 if new_child
!= null then
4725 new_child
.parent
= self
4726 assert new_child
isa PExpr
4735 redef meth visit_all
(v
: Visitor)
4737 if _n_kwvar
!= null then
4740 if _n_id
!= null then
4743 if _n_type
!= null then
4746 if _n_assign
!= null then
4749 if _n_expr
!= null then
4754 redef meth visit_all_reverse
(v
: Visitor)
4756 if _n_kwvar
!= null then
4759 if _n_id
!= null then
4762 if _n_type
!= null then
4765 if _n_assign
!= null then
4768 if _n_expr
!= null then
4773 redef class AReturnExpr
4774 redef meth n_kwreturn
=(n
: TKwreturn)
4781 redef meth n_expr
=(n
: PExpr)
4789 private init empty_init
do end
4791 init init_areturnexpr
(
4792 n_kwreturn
: TKwreturn ,
4797 _n_kwreturn
= n_kwreturn
4798 if n_kwreturn
!= null then
4799 n_kwreturn
.parent
= self
4802 if n_expr
!= null then
4803 n_expr
.parent
= self
4807 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4809 assert old_child
!= null
4810 if _n_kwreturn
== old_child
then
4811 if new_child
!= null then
4812 new_child
.parent
= self
4813 assert new_child
isa TKwreturn
4814 _n_kwreturn
= new_child
4820 if _n_expr
== old_child
then
4821 if new_child
!= null then
4822 new_child
.parent
= self
4823 assert new_child
isa PExpr
4832 redef meth visit_all
(v
: Visitor)
4834 if _n_kwreturn
!= null then
4835 v
.visit
(_n_kwreturn
)
4837 if _n_expr
!= null then
4842 redef meth visit_all_reverse
(v
: Visitor)
4844 if _n_kwreturn
!= null then
4845 v
.visit
(_n_kwreturn
)
4847 if _n_expr
!= null then
4852 redef class ABreakExpr
4853 redef meth n_kwbreak
=(n
: TKwbreak)
4861 private init empty_init
do end
4863 init init_abreakexpr
(
4868 _n_kwbreak
= n_kwbreak
4869 if n_kwbreak
!= null then
4870 n_kwbreak
.parent
= self
4874 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4876 assert old_child
!= null
4877 if _n_kwbreak
== old_child
then
4878 if new_child
!= null then
4879 new_child
.parent
= self
4880 assert new_child
isa TKwbreak
4881 _n_kwbreak
= new_child
4889 redef meth visit_all
(v
: Visitor)
4891 if _n_kwbreak
!= null then
4896 redef meth visit_all_reverse
(v
: Visitor)
4898 if _n_kwbreak
!= null then
4903 redef class AAbortExpr
4904 redef meth n_kwabort
=(n
: TKwabort)
4912 private init empty_init
do end
4914 init init_aabortexpr
(
4919 _n_kwabort
= n_kwabort
4920 if n_kwabort
!= null then
4921 n_kwabort
.parent
= self
4925 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4927 assert old_child
!= null
4928 if _n_kwabort
== old_child
then
4929 if new_child
!= null then
4930 new_child
.parent
= self
4931 assert new_child
isa TKwabort
4932 _n_kwabort
= new_child
4940 redef meth visit_all
(v
: Visitor)
4942 if _n_kwabort
!= null then
4947 redef meth visit_all_reverse
(v
: Visitor)
4949 if _n_kwabort
!= null then
4954 redef class AContinueExpr
4955 redef meth n_kwcontinue
=(n
: TKwcontinue)
4963 private init empty_init
do end
4965 init init_acontinueexpr
(
4966 n_kwcontinue
: TKwcontinue
4970 _n_kwcontinue
= n_kwcontinue
4971 if n_kwcontinue
!= null then
4972 n_kwcontinue
.parent
= self
4976 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4978 assert old_child
!= null
4979 if _n_kwcontinue
== old_child
then
4980 if new_child
!= null then
4981 new_child
.parent
= self
4982 assert new_child
isa TKwcontinue
4983 _n_kwcontinue
= new_child
4985 _n_kwcontinue
= null
4991 redef meth visit_all
(v
: Visitor)
4993 if _n_kwcontinue
!= null then
4994 v
.visit
(_n_kwcontinue
)
4998 redef meth visit_all_reverse
(v
: Visitor)
5000 if _n_kwcontinue
!= null then
5001 v
.visit
(_n_kwcontinue
)
5006 redef meth n_kwdo
=(n
: TKwdo)
5013 redef meth n_block
=(n
: PExpr)
5021 private init empty_init
do end
5030 if n_kwdo
!= null then
5031 n_kwdo
.parent
= self
5034 if n_block
!= null then
5035 n_block
.parent
= self
5039 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5041 assert old_child
!= null
5042 if _n_kwdo
== old_child
then
5043 if new_child
!= null then
5044 new_child
.parent
= self
5045 assert new_child
isa TKwdo
5052 if _n_block
== old_child
then
5053 if new_child
!= null then
5054 new_child
.parent
= self
5055 assert new_child
isa PExpr
5056 _n_block
= new_child
5064 redef meth visit_all
(v
: Visitor)
5066 if _n_kwdo
!= null then
5069 if _n_block
!= null then
5074 redef meth visit_all_reverse
(v
: Visitor)
5076 if _n_kwdo
!= null then
5079 if _n_block
!= null then
5085 redef meth n_kwif
=(n
: TKwif)
5092 redef meth n_expr
=(n
: PExpr)
5099 redef meth n_then
=(n
: PExpr)
5106 redef meth n_else
=(n
: PExpr)
5114 private init empty_init
do end
5125 if n_kwif
!= null then
5126 n_kwif
.parent
= self
5129 if n_expr
!= null then
5130 n_expr
.parent
= self
5133 if n_then
!= null then
5134 n_then
.parent
= self
5137 if n_else
!= null then
5138 n_else
.parent
= self
5142 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5144 assert old_child
!= null
5145 if _n_kwif
== old_child
then
5146 if new_child
!= null then
5147 new_child
.parent
= self
5148 assert new_child
isa TKwif
5155 if _n_expr
== old_child
then
5156 if new_child
!= null then
5157 new_child
.parent
= self
5158 assert new_child
isa PExpr
5165 if _n_then
== old_child
then
5166 if new_child
!= null then
5167 new_child
.parent
= self
5168 assert new_child
isa PExpr
5175 if _n_else
== old_child
then
5176 if new_child
!= null then
5177 new_child
.parent
= self
5178 assert new_child
isa PExpr
5187 redef meth visit_all
(v
: Visitor)
5189 if _n_kwif
!= null then
5192 if _n_expr
!= null then
5195 if _n_then
!= null then
5198 if _n_else
!= null then
5203 redef meth visit_all_reverse
(v
: Visitor)
5205 if _n_kwif
!= null then
5208 if _n_expr
!= null then
5211 if _n_then
!= null then
5214 if _n_else
!= null then
5219 redef class AIfexprExpr
5220 redef meth n_kwif
=(n
: TKwif)
5227 redef meth n_expr
=(n
: PExpr)
5234 redef meth n_kwthen
=(n
: TKwthen)
5241 redef meth n_then
=(n
: PExpr)
5248 redef meth n_kwelse
=(n
: TKwelse)
5255 redef meth n_else
=(n
: PExpr)
5263 private init empty_init
do end
5265 init init_aifexprexpr
(
5276 if n_kwif
!= null then
5277 n_kwif
.parent
= self
5280 if n_expr
!= null then
5281 n_expr
.parent
= self
5283 _n_kwthen
= n_kwthen
5284 if n_kwthen
!= null then
5285 n_kwthen
.parent
= self
5288 if n_then
!= null then
5289 n_then
.parent
= self
5291 _n_kwelse
= n_kwelse
5292 if n_kwelse
!= null then
5293 n_kwelse
.parent
= self
5296 if n_else
!= null then
5297 n_else
.parent
= self
5301 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5303 assert old_child
!= null
5304 if _n_kwif
== old_child
then
5305 if new_child
!= null then
5306 new_child
.parent
= self
5307 assert new_child
isa TKwif
5314 if _n_expr
== old_child
then
5315 if new_child
!= null then
5316 new_child
.parent
= self
5317 assert new_child
isa PExpr
5324 if _n_kwthen
== old_child
then
5325 if new_child
!= null then
5326 new_child
.parent
= self
5327 assert new_child
isa TKwthen
5328 _n_kwthen
= new_child
5334 if _n_then
== old_child
then
5335 if new_child
!= null then
5336 new_child
.parent
= self
5337 assert new_child
isa PExpr
5344 if _n_kwelse
== old_child
then
5345 if new_child
!= null then
5346 new_child
.parent
= self
5347 assert new_child
isa TKwelse
5348 _n_kwelse
= new_child
5354 if _n_else
== old_child
then
5355 if new_child
!= null then
5356 new_child
.parent
= self
5357 assert new_child
isa PExpr
5366 redef meth visit_all
(v
: Visitor)
5368 if _n_kwif
!= null then
5371 if _n_expr
!= null then
5374 if _n_kwthen
!= null then
5377 if _n_then
!= null then
5380 if _n_kwelse
!= null then
5383 if _n_else
!= null then
5388 redef meth visit_all_reverse
(v
: Visitor)
5390 if _n_kwif
!= null then
5393 if _n_expr
!= null then
5396 if _n_kwthen
!= null then
5399 if _n_then
!= null then
5402 if _n_kwelse
!= null then
5405 if _n_else
!= null then
5410 redef class AWhileExpr
5411 redef meth n_kwwhile
=(n
: TKwwhile)
5418 redef meth n_expr
=(n
: PExpr)
5425 redef meth n_kwdo
=(n
: TKwdo)
5432 redef meth n_block
=(n
: PExpr)
5440 private init empty_init
do end
5442 init init_awhileexpr
(
5443 n_kwwhile
: TKwwhile ,
5450 _n_kwwhile
= n_kwwhile
5451 if n_kwwhile
!= null then
5452 n_kwwhile
.parent
= self
5455 if n_expr
!= null then
5456 n_expr
.parent
= self
5459 if n_kwdo
!= null then
5460 n_kwdo
.parent
= self
5463 if n_block
!= null then
5464 n_block
.parent
= self
5468 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5470 assert old_child
!= null
5471 if _n_kwwhile
== old_child
then
5472 if new_child
!= null then
5473 new_child
.parent
= self
5474 assert new_child
isa TKwwhile
5475 _n_kwwhile
= new_child
5481 if _n_expr
== old_child
then
5482 if new_child
!= null then
5483 new_child
.parent
= self
5484 assert new_child
isa PExpr
5491 if _n_kwdo
== old_child
then
5492 if new_child
!= null then
5493 new_child
.parent
= self
5494 assert new_child
isa TKwdo
5501 if _n_block
== old_child
then
5502 if new_child
!= null then
5503 new_child
.parent
= self
5504 assert new_child
isa PExpr
5505 _n_block
= new_child
5513 redef meth visit_all
(v
: Visitor)
5515 if _n_kwwhile
!= null then
5518 if _n_expr
!= null then
5521 if _n_kwdo
!= null then
5524 if _n_block
!= null then
5529 redef meth visit_all_reverse
(v
: Visitor)
5531 if _n_kwwhile
!= null then
5534 if _n_expr
!= null then
5537 if _n_kwdo
!= null then
5540 if _n_block
!= null then
5545 redef class AForExpr
5546 redef meth n_vardecl
=(n
: PExpr)
5553 redef meth n_kwdo
=(n
: TKwdo)
5560 redef meth n_block
=(n
: PExpr)
5568 private init empty_init
do end
5570 init init_aforexpr
(
5577 _n_vardecl
= n_vardecl
5578 if n_vardecl
!= null then
5579 n_vardecl
.parent
= self
5582 if n_kwdo
!= null then
5583 n_kwdo
.parent
= self
5586 if n_block
!= null then
5587 n_block
.parent
= self
5591 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5593 assert old_child
!= null
5594 if _n_vardecl
== old_child
then
5595 if new_child
!= null then
5596 new_child
.parent
= self
5597 assert new_child
isa PExpr
5598 _n_vardecl
= new_child
5604 if _n_kwdo
== old_child
then
5605 if new_child
!= null then
5606 new_child
.parent
= self
5607 assert new_child
isa TKwdo
5614 if _n_block
== old_child
then
5615 if new_child
!= null then
5616 new_child
.parent
= self
5617 assert new_child
isa PExpr
5618 _n_block
= new_child
5626 redef meth visit_all
(v
: Visitor)
5628 if _n_vardecl
!= null then
5631 if _n_kwdo
!= null then
5634 if _n_block
!= null then
5639 redef meth visit_all_reverse
(v
: Visitor)
5641 if _n_vardecl
!= null then
5644 if _n_kwdo
!= null then
5647 if _n_block
!= null then
5652 redef class AForVardeclExpr
5653 redef meth n_kwfor
=(n
: TKwfor)
5660 redef meth n_id
=(n
: TId)
5667 redef meth n_expr
=(n
: PExpr)
5675 private init empty_init
do end
5677 init init_aforvardeclexpr
(
5685 if n_kwfor
!= null then
5686 n_kwfor
.parent
= self
5689 if n_id
!= null then
5693 if n_expr
!= null then
5694 n_expr
.parent
= self
5698 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5700 assert old_child
!= null
5701 if _n_kwfor
== old_child
then
5702 if new_child
!= null then
5703 new_child
.parent
= self
5704 assert new_child
isa TKwfor
5705 _n_kwfor
= new_child
5711 if _n_id
== old_child
then
5712 if new_child
!= null then
5713 new_child
.parent
= self
5714 assert new_child
isa TId
5721 if _n_expr
== old_child
then
5722 if new_child
!= null then
5723 new_child
.parent
= self
5724 assert new_child
isa PExpr
5733 redef meth visit_all
(v
: Visitor)
5735 if _n_kwfor
!= null then
5738 if _n_id
!= null then
5741 if _n_expr
!= null then
5746 redef meth visit_all_reverse
(v
: Visitor)
5748 if _n_kwfor
!= null then
5751 if _n_id
!= null then
5754 if _n_expr
!= null then
5759 redef class AAssertExpr
5760 redef meth n_kwassert
=(n
: TKwassert)
5767 redef meth n_id
=(n
: TId)
5774 redef meth n_expr
=(n
: PExpr)
5782 private init empty_init
do end
5784 init init_aassertexpr
(
5785 n_kwassert
: TKwassert ,
5791 _n_kwassert
= n_kwassert
5792 if n_kwassert
!= null then
5793 n_kwassert
.parent
= self
5796 if n_id
!= null then
5800 if n_expr
!= null then
5801 n_expr
.parent
= self
5805 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5807 assert old_child
!= null
5808 if _n_kwassert
== old_child
then
5809 if new_child
!= null then
5810 new_child
.parent
= self
5811 assert new_child
isa TKwassert
5812 _n_kwassert
= new_child
5818 if _n_id
== old_child
then
5819 if new_child
!= null then
5820 new_child
.parent
= self
5821 assert new_child
isa TId
5828 if _n_expr
== old_child
then
5829 if new_child
!= null then
5830 new_child
.parent
= self
5831 assert new_child
isa PExpr
5840 redef meth visit_all
(v
: Visitor)
5842 if _n_kwassert
!= null then
5843 v
.visit
(_n_kwassert
)
5845 if _n_id
!= null then
5848 if _n_expr
!= null then
5853 redef meth visit_all_reverse
(v
: Visitor)
5855 if _n_kwassert
!= null then
5856 v
.visit
(_n_kwassert
)
5858 if _n_id
!= null then
5861 if _n_expr
!= null then
5866 redef class AOnceExpr
5867 redef meth n_kwonce
=(n
: TKwonce)
5874 redef meth n_expr
=(n
: PExpr)
5882 private init empty_init
do end
5884 init init_aonceexpr
(
5890 _n_kwonce
= n_kwonce
5891 if n_kwonce
!= null then
5892 n_kwonce
.parent
= self
5895 if n_expr
!= null then
5896 n_expr
.parent
= self
5900 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5902 assert old_child
!= null
5903 if _n_kwonce
== old_child
then
5904 if new_child
!= null then
5905 new_child
.parent
= self
5906 assert new_child
isa TKwonce
5907 _n_kwonce
= new_child
5913 if _n_expr
== old_child
then
5914 if new_child
!= null then
5915 new_child
.parent
= self
5916 assert new_child
isa PExpr
5925 redef meth visit_all
(v
: Visitor)
5927 if _n_kwonce
!= null then
5930 if _n_expr
!= null then
5935 redef meth visit_all_reverse
(v
: Visitor)
5937 if _n_kwonce
!= null then
5940 if _n_expr
!= null then
5945 redef class ASendExpr
5946 redef meth n_expr
=(n
: PExpr)
5954 private init empty_init
do end
5956 init init_asendexpr
(
5962 if n_expr
!= null then
5963 n_expr
.parent
= self
5967 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5969 assert old_child
!= null
5970 if _n_expr
== old_child
then
5971 if new_child
!= null then
5972 new_child
.parent
= self
5973 assert new_child
isa PExpr
5982 redef meth visit_all
(v
: Visitor)
5984 if _n_expr
!= null then
5989 redef meth visit_all_reverse
(v
: Visitor)
5991 if _n_expr
!= null then
5996 redef class ABinopExpr
5997 redef meth n_expr
=(n
: PExpr)
6004 redef meth n_expr2
=(n
: PExpr)
6012 private init empty_init
do end
6014 init init_abinopexpr
(
6021 if n_expr
!= null then
6022 n_expr
.parent
= self
6025 if n_expr2
!= null then
6026 n_expr2
.parent
= self
6030 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6032 assert old_child
!= null
6033 if _n_expr
== old_child
then
6034 if new_child
!= null then
6035 new_child
.parent
= self
6036 assert new_child
isa PExpr
6043 if _n_expr2
== old_child
then
6044 if new_child
!= null then
6045 new_child
.parent
= self
6046 assert new_child
isa PExpr
6047 _n_expr2
= new_child
6055 redef meth visit_all
(v
: Visitor)
6057 if _n_expr
!= null then
6060 if _n_expr2
!= null then
6065 redef meth visit_all_reverse
(v
: Visitor)
6067 if _n_expr
!= null then
6070 if _n_expr2
!= null then
6076 redef meth n_expr
=(n
: PExpr)
6083 redef meth n_expr2
=(n
: PExpr)
6091 private init empty_init
do end
6100 if n_expr
!= null then
6101 n_expr
.parent
= self
6104 if n_expr2
!= null then
6105 n_expr2
.parent
= self
6109 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6111 assert old_child
!= null
6112 if _n_expr
== old_child
then
6113 if new_child
!= null then
6114 new_child
.parent
= self
6115 assert new_child
isa PExpr
6122 if _n_expr2
== old_child
then
6123 if new_child
!= null then
6124 new_child
.parent
= self
6125 assert new_child
isa PExpr
6126 _n_expr2
= new_child
6134 redef meth visit_all
(v
: Visitor)
6136 if _n_expr
!= null then
6139 if _n_expr2
!= null then
6144 redef meth visit_all_reverse
(v
: Visitor)
6146 if _n_expr
!= null then
6149 if _n_expr2
!= null then
6154 redef class AAndExpr
6155 redef meth n_expr
=(n
: PExpr)
6162 redef meth n_expr2
=(n
: PExpr)
6170 private init empty_init
do end
6172 init init_aandexpr
(
6179 if n_expr
!= null then
6180 n_expr
.parent
= self
6183 if n_expr2
!= null then
6184 n_expr2
.parent
= self
6188 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6190 assert old_child
!= null
6191 if _n_expr
== old_child
then
6192 if new_child
!= null then
6193 new_child
.parent
= self
6194 assert new_child
isa PExpr
6201 if _n_expr2
== old_child
then
6202 if new_child
!= null then
6203 new_child
.parent
= self
6204 assert new_child
isa PExpr
6205 _n_expr2
= new_child
6213 redef meth visit_all
(v
: Visitor)
6215 if _n_expr
!= null then
6218 if _n_expr2
!= null then
6223 redef meth visit_all_reverse
(v
: Visitor)
6225 if _n_expr
!= null then
6228 if _n_expr2
!= null then
6233 redef class ANotExpr
6234 redef meth n_kwnot
=(n
: TKwnot)
6241 redef meth n_expr
=(n
: PExpr)
6249 private init empty_init
do end
6251 init init_anotexpr
(
6258 if n_kwnot
!= null then
6259 n_kwnot
.parent
= self
6262 if n_expr
!= null then
6263 n_expr
.parent
= self
6267 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6269 assert old_child
!= null
6270 if _n_kwnot
== old_child
then
6271 if new_child
!= null then
6272 new_child
.parent
= self
6273 assert new_child
isa TKwnot
6274 _n_kwnot
= new_child
6280 if _n_expr
== old_child
then
6281 if new_child
!= null then
6282 new_child
.parent
= self
6283 assert new_child
isa PExpr
6292 redef meth visit_all
(v
: Visitor)
6294 if _n_kwnot
!= null then
6297 if _n_expr
!= null then
6302 redef meth visit_all_reverse
(v
: Visitor)
6304 if _n_kwnot
!= null then
6307 if _n_expr
!= null then
6313 redef meth n_expr
=(n
: PExpr)
6320 redef meth n_expr2
=(n
: PExpr)
6328 private init empty_init
do end
6337 if n_expr
!= null then
6338 n_expr
.parent
= self
6341 if n_expr2
!= null then
6342 n_expr2
.parent
= self
6346 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6348 assert old_child
!= null
6349 if _n_expr
== old_child
then
6350 if new_child
!= null then
6351 new_child
.parent
= self
6352 assert new_child
isa PExpr
6359 if _n_expr2
== old_child
then
6360 if new_child
!= null then
6361 new_child
.parent
= self
6362 assert new_child
isa PExpr
6363 _n_expr2
= new_child
6371 redef meth visit_all
(v
: Visitor)
6373 if _n_expr
!= null then
6376 if _n_expr2
!= null then
6381 redef meth visit_all_reverse
(v
: Visitor)
6383 if _n_expr
!= null then
6386 if _n_expr2
!= null then
6392 redef meth n_expr
=(n
: PExpr)
6399 redef meth n_expr2
=(n
: PExpr)
6407 private init empty_init
do end
6416 if n_expr
!= null then
6417 n_expr
.parent
= self
6420 if n_expr2
!= null then
6421 n_expr2
.parent
= self
6425 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6427 assert old_child
!= null
6428 if _n_expr
== old_child
then
6429 if new_child
!= null then
6430 new_child
.parent
= self
6431 assert new_child
isa PExpr
6438 if _n_expr2
== old_child
then
6439 if new_child
!= null then
6440 new_child
.parent
= self
6441 assert new_child
isa PExpr
6442 _n_expr2
= new_child
6450 redef meth visit_all
(v
: Visitor)
6452 if _n_expr
!= null then
6455 if _n_expr2
!= null then
6460 redef meth visit_all_reverse
(v
: Visitor)
6462 if _n_expr
!= null then
6465 if _n_expr2
!= null then
6471 redef meth n_expr
=(n
: PExpr)
6478 redef meth n_expr2
=(n
: PExpr)
6486 private init empty_init
do end
6495 if n_expr
!= null then
6496 n_expr
.parent
= self
6499 if n_expr2
!= null then
6500 n_expr2
.parent
= self
6504 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6506 assert old_child
!= null
6507 if _n_expr
== old_child
then
6508 if new_child
!= null then
6509 new_child
.parent
= self
6510 assert new_child
isa PExpr
6517 if _n_expr2
== old_child
then
6518 if new_child
!= null then
6519 new_child
.parent
= self
6520 assert new_child
isa PExpr
6521 _n_expr2
= new_child
6529 redef meth visit_all
(v
: Visitor)
6531 if _n_expr
!= null then
6534 if _n_expr2
!= null then
6539 redef meth visit_all_reverse
(v
: Visitor)
6541 if _n_expr
!= null then
6544 if _n_expr2
!= null then
6550 redef meth n_expr
=(n
: PExpr)
6557 redef meth n_expr2
=(n
: PExpr)
6565 private init empty_init
do end
6574 if n_expr
!= null then
6575 n_expr
.parent
= self
6578 if n_expr2
!= null then
6579 n_expr2
.parent
= self
6583 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6585 assert old_child
!= null
6586 if _n_expr
== old_child
then
6587 if new_child
!= null then
6588 new_child
.parent
= self
6589 assert new_child
isa PExpr
6596 if _n_expr2
== old_child
then
6597 if new_child
!= null then
6598 new_child
.parent
= self
6599 assert new_child
isa PExpr
6600 _n_expr2
= new_child
6608 redef meth visit_all
(v
: Visitor)
6610 if _n_expr
!= null then
6613 if _n_expr2
!= null then
6618 redef meth visit_all_reverse
(v
: Visitor)
6620 if _n_expr
!= null then
6623 if _n_expr2
!= null then
6629 redef meth n_expr
=(n
: PExpr)
6636 redef meth n_expr2
=(n
: PExpr)
6644 private init empty_init
do end
6653 if n_expr
!= null then
6654 n_expr
.parent
= self
6657 if n_expr2
!= null then
6658 n_expr2
.parent
= self
6662 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6664 assert old_child
!= null
6665 if _n_expr
== old_child
then
6666 if new_child
!= null then
6667 new_child
.parent
= self
6668 assert new_child
isa PExpr
6675 if _n_expr2
== old_child
then
6676 if new_child
!= null then
6677 new_child
.parent
= self
6678 assert new_child
isa PExpr
6679 _n_expr2
= new_child
6687 redef meth visit_all
(v
: Visitor)
6689 if _n_expr
!= null then
6692 if _n_expr2
!= null then
6697 redef meth visit_all_reverse
(v
: Visitor)
6699 if _n_expr
!= null then
6702 if _n_expr2
!= null then
6708 redef meth n_expr
=(n
: PExpr)
6715 redef meth n_expr2
=(n
: PExpr)
6723 private init empty_init
do end
6732 if n_expr
!= null then
6733 n_expr
.parent
= self
6736 if n_expr2
!= null then
6737 n_expr2
.parent
= self
6741 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6743 assert old_child
!= null
6744 if _n_expr
== old_child
then
6745 if new_child
!= null then
6746 new_child
.parent
= self
6747 assert new_child
isa PExpr
6754 if _n_expr2
== old_child
then
6755 if new_child
!= null then
6756 new_child
.parent
= self
6757 assert new_child
isa PExpr
6758 _n_expr2
= new_child
6766 redef meth visit_all
(v
: Visitor)
6768 if _n_expr
!= null then
6771 if _n_expr2
!= null then
6776 redef meth visit_all_reverse
(v
: Visitor)
6778 if _n_expr
!= null then
6781 if _n_expr2
!= null then
6787 redef meth n_expr
=(n
: PExpr)
6794 redef meth n_expr2
=(n
: PExpr)
6802 private init empty_init
do end
6811 if n_expr
!= null then
6812 n_expr
.parent
= self
6815 if n_expr2
!= null then
6816 n_expr2
.parent
= self
6820 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6822 assert old_child
!= null
6823 if _n_expr
== old_child
then
6824 if new_child
!= null then
6825 new_child
.parent
= self
6826 assert new_child
isa PExpr
6833 if _n_expr2
== old_child
then
6834 if new_child
!= null then
6835 new_child
.parent
= self
6836 assert new_child
isa PExpr
6837 _n_expr2
= new_child
6845 redef meth visit_all
(v
: Visitor)
6847 if _n_expr
!= null then
6850 if _n_expr2
!= null then
6855 redef meth visit_all_reverse
(v
: Visitor)
6857 if _n_expr
!= null then
6860 if _n_expr2
!= null then
6865 redef class AIsaExpr
6866 redef meth n_expr
=(n
: PExpr)
6873 redef meth n_type
=(n
: PType)
6881 private init empty_init
do end
6883 init init_aisaexpr
(
6890 if n_expr
!= null then
6891 n_expr
.parent
= self
6894 if n_type
!= null then
6895 n_type
.parent
= self
6899 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6901 assert old_child
!= null
6902 if _n_expr
== old_child
then
6903 if new_child
!= null then
6904 new_child
.parent
= self
6905 assert new_child
isa PExpr
6912 if _n_type
== old_child
then
6913 if new_child
!= null then
6914 new_child
.parent
= self
6915 assert new_child
isa PType
6924 redef meth visit_all
(v
: Visitor)
6926 if _n_expr
!= null then
6929 if _n_type
!= null then
6934 redef meth visit_all_reverse
(v
: Visitor)
6936 if _n_expr
!= null then
6939 if _n_type
!= null then
6944 redef class APlusExpr
6945 redef meth n_expr
=(n
: PExpr)
6952 redef meth n_expr2
=(n
: PExpr)
6960 private init empty_init
do end
6962 init init_aplusexpr
(
6969 if n_expr
!= null then
6970 n_expr
.parent
= self
6973 if n_expr2
!= null then
6974 n_expr2
.parent
= self
6978 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6980 assert old_child
!= null
6981 if _n_expr
== old_child
then
6982 if new_child
!= null then
6983 new_child
.parent
= self
6984 assert new_child
isa PExpr
6991 if _n_expr2
== old_child
then
6992 if new_child
!= null then
6993 new_child
.parent
= self
6994 assert new_child
isa PExpr
6995 _n_expr2
= new_child
7003 redef meth visit_all
(v
: Visitor)
7005 if _n_expr
!= null then
7008 if _n_expr2
!= null then
7013 redef meth visit_all_reverse
(v
: Visitor)
7015 if _n_expr
!= null then
7018 if _n_expr2
!= null then
7023 redef class AMinusExpr
7024 redef meth n_expr
=(n
: PExpr)
7031 redef meth n_expr2
=(n
: PExpr)
7039 private init empty_init
do end
7041 init init_aminusexpr
(
7048 if n_expr
!= null then
7049 n_expr
.parent
= self
7052 if n_expr2
!= null then
7053 n_expr2
.parent
= self
7057 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7059 assert old_child
!= null
7060 if _n_expr
== old_child
then
7061 if new_child
!= null then
7062 new_child
.parent
= self
7063 assert new_child
isa PExpr
7070 if _n_expr2
== old_child
then
7071 if new_child
!= null then
7072 new_child
.parent
= self
7073 assert new_child
isa PExpr
7074 _n_expr2
= new_child
7082 redef meth visit_all
(v
: Visitor)
7084 if _n_expr
!= null then
7087 if _n_expr2
!= null then
7092 redef meth visit_all_reverse
(v
: Visitor)
7094 if _n_expr
!= null then
7097 if _n_expr2
!= null then
7102 redef class AStarshipExpr
7103 redef meth n_expr
=(n
: PExpr)
7110 redef meth n_expr2
=(n
: PExpr)
7118 private init empty_init
do end
7120 init init_astarshipexpr
(
7127 if n_expr
!= null then
7128 n_expr
.parent
= self
7131 if n_expr2
!= null then
7132 n_expr2
.parent
= self
7136 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7138 assert old_child
!= null
7139 if _n_expr
== old_child
then
7140 if new_child
!= null then
7141 new_child
.parent
= self
7142 assert new_child
isa PExpr
7149 if _n_expr2
== old_child
then
7150 if new_child
!= null then
7151 new_child
.parent
= self
7152 assert new_child
isa PExpr
7153 _n_expr2
= new_child
7161 redef meth visit_all
(v
: Visitor)
7163 if _n_expr
!= null then
7166 if _n_expr2
!= null then
7171 redef meth visit_all_reverse
(v
: Visitor)
7173 if _n_expr
!= null then
7176 if _n_expr2
!= null then
7181 redef class AStarExpr
7182 redef meth n_expr
=(n
: PExpr)
7189 redef meth n_expr2
=(n
: PExpr)
7197 private init empty_init
do end
7199 init init_astarexpr
(
7206 if n_expr
!= null then
7207 n_expr
.parent
= self
7210 if n_expr2
!= null then
7211 n_expr2
.parent
= self
7215 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7217 assert old_child
!= null
7218 if _n_expr
== old_child
then
7219 if new_child
!= null then
7220 new_child
.parent
= self
7221 assert new_child
isa PExpr
7228 if _n_expr2
== old_child
then
7229 if new_child
!= null then
7230 new_child
.parent
= self
7231 assert new_child
isa PExpr
7232 _n_expr2
= new_child
7240 redef meth visit_all
(v
: Visitor)
7242 if _n_expr
!= null then
7245 if _n_expr2
!= null then
7250 redef meth visit_all_reverse
(v
: Visitor)
7252 if _n_expr
!= null then
7255 if _n_expr2
!= null then
7260 redef class ASlashExpr
7261 redef meth n_expr
=(n
: PExpr)
7268 redef meth n_expr2
=(n
: PExpr)
7276 private init empty_init
do end
7278 init init_aslashexpr
(
7285 if n_expr
!= null then
7286 n_expr
.parent
= self
7289 if n_expr2
!= null then
7290 n_expr2
.parent
= self
7294 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7296 assert old_child
!= null
7297 if _n_expr
== old_child
then
7298 if new_child
!= null then
7299 new_child
.parent
= self
7300 assert new_child
isa PExpr
7307 if _n_expr2
== old_child
then
7308 if new_child
!= null then
7309 new_child
.parent
= self
7310 assert new_child
isa PExpr
7311 _n_expr2
= new_child
7319 redef meth visit_all
(v
: Visitor)
7321 if _n_expr
!= null then
7324 if _n_expr2
!= null then
7329 redef meth visit_all_reverse
(v
: Visitor)
7331 if _n_expr
!= null then
7334 if _n_expr2
!= null then
7339 redef class APercentExpr
7340 redef meth n_expr
=(n
: PExpr)
7347 redef meth n_expr2
=(n
: PExpr)
7355 private init empty_init
do end
7357 init init_apercentexpr
(
7364 if n_expr
!= null then
7365 n_expr
.parent
= self
7368 if n_expr2
!= null then
7369 n_expr2
.parent
= self
7373 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7375 assert old_child
!= null
7376 if _n_expr
== old_child
then
7377 if new_child
!= null then
7378 new_child
.parent
= self
7379 assert new_child
isa PExpr
7386 if _n_expr2
== old_child
then
7387 if new_child
!= null then
7388 new_child
.parent
= self
7389 assert new_child
isa PExpr
7390 _n_expr2
= new_child
7398 redef meth visit_all
(v
: Visitor)
7400 if _n_expr
!= null then
7403 if _n_expr2
!= null then
7408 redef meth visit_all_reverse
(v
: Visitor)
7410 if _n_expr
!= null then
7413 if _n_expr2
!= null then
7418 redef class AUminusExpr
7419 redef meth n_minus
=(n
: TMinus)
7426 redef meth n_expr
=(n
: PExpr)
7434 private init empty_init
do end
7436 init init_auminusexpr
(
7443 if n_minus
!= null then
7444 n_minus
.parent
= self
7447 if n_expr
!= null then
7448 n_expr
.parent
= self
7452 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7454 assert old_child
!= null
7455 if _n_minus
== old_child
then
7456 if new_child
!= null then
7457 new_child
.parent
= self
7458 assert new_child
isa TMinus
7459 _n_minus
= new_child
7465 if _n_expr
== old_child
then
7466 if new_child
!= null then
7467 new_child
.parent
= self
7468 assert new_child
isa PExpr
7477 redef meth visit_all
(v
: Visitor)
7479 if _n_minus
!= null then
7482 if _n_expr
!= null then
7487 redef meth visit_all_reverse
(v
: Visitor)
7489 if _n_minus
!= null then
7492 if _n_expr
!= null then
7497 redef class ANewExpr
7498 redef meth n_kwnew
=(n
: TKwnew)
7505 redef meth n_type
=(n
: PType)
7512 redef meth n_id
=(n
: TId)
7520 private init empty_init
do end
7522 init init_anewexpr
(
7526 n_args
: Array[Object] # Should be Array[PExpr]
7531 if n_kwnew
!= null then
7532 n_kwnew
.parent
= self
7535 if n_type
!= null then
7536 n_type
.parent
= self
7539 if n_id
!= null then
7542 _n_args
= new List[PExpr]
7550 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7552 assert old_child
!= null
7553 if _n_kwnew
== old_child
then
7554 if new_child
!= null then
7555 new_child
.parent
= self
7556 assert new_child
isa TKwnew
7557 _n_kwnew
= new_child
7563 if _n_type
== old_child
then
7564 if new_child
!= null then
7565 new_child
.parent
= self
7566 assert new_child
isa PType
7573 if _n_id
== old_child
then
7574 if new_child
!= null then
7575 new_child
.parent
= self
7576 assert new_child
isa TId
7583 for i
in [0.._n_args
.length
[ do
7584 if _n_args
[i
] == old_child
then
7585 if new_child
!= null then
7586 assert new_child
isa PExpr
7587 _n_args
[i
] = new_child
7588 new_child
.parent
= self
7590 _n_args
.remove_at
(i
)
7597 redef meth visit_all
(v
: Visitor)
7599 if _n_kwnew
!= null then
7602 if _n_type
!= null then
7605 if _n_id
!= null then
7613 redef meth visit_all_reverse
(v
: Visitor)
7615 if _n_kwnew
!= null then
7618 if _n_type
!= null then
7621 if _n_id
!= null then
7625 var i
= _n_args
.length
7633 redef class AAttrExpr
7634 redef meth n_expr
=(n
: PExpr)
7641 redef meth n_id
=(n
: TAttrid)
7649 private init empty_init
do end
7651 init init_aattrexpr
(
7658 if n_expr
!= null then
7659 n_expr
.parent
= self
7662 if n_id
!= null then
7667 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7669 assert old_child
!= null
7670 if _n_expr
== old_child
then
7671 if new_child
!= null then
7672 new_child
.parent
= self
7673 assert new_child
isa PExpr
7680 if _n_id
== old_child
then
7681 if new_child
!= null then
7682 new_child
.parent
= self
7683 assert new_child
isa TAttrid
7692 redef meth visit_all
(v
: Visitor)
7694 if _n_expr
!= null then
7697 if _n_id
!= null then
7702 redef meth visit_all_reverse
(v
: Visitor)
7704 if _n_expr
!= null then
7707 if _n_id
!= null then
7712 redef class AAttrAssignExpr
7713 redef meth n_expr
=(n
: PExpr)
7720 redef meth n_id
=(n
: TAttrid)
7727 redef meth n_assign
=(n
: TAssign)
7734 redef meth n_value
=(n
: PExpr)
7742 private init empty_init
do end
7744 init init_aattrassignexpr
(
7753 if n_expr
!= null then
7754 n_expr
.parent
= self
7757 if n_id
!= null then
7760 _n_assign
= n_assign
7761 if n_assign
!= null then
7762 n_assign
.parent
= self
7765 if n_value
!= null then
7766 n_value
.parent
= self
7770 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7772 assert old_child
!= null
7773 if _n_expr
== old_child
then
7774 if new_child
!= null then
7775 new_child
.parent
= self
7776 assert new_child
isa PExpr
7783 if _n_id
== old_child
then
7784 if new_child
!= null then
7785 new_child
.parent
= self
7786 assert new_child
isa TAttrid
7793 if _n_assign
== old_child
then
7794 if new_child
!= null then
7795 new_child
.parent
= self
7796 assert new_child
isa TAssign
7797 _n_assign
= new_child
7803 if _n_value
== old_child
then
7804 if new_child
!= null then
7805 new_child
.parent
= self
7806 assert new_child
isa PExpr
7807 _n_value
= new_child
7815 redef meth visit_all
(v
: Visitor)
7817 if _n_expr
!= null then
7820 if _n_id
!= null then
7823 if _n_assign
!= null then
7826 if _n_value
!= null then
7831 redef meth visit_all_reverse
(v
: Visitor)
7833 if _n_expr
!= null then
7836 if _n_id
!= null then
7839 if _n_assign
!= null then
7842 if _n_value
!= null then
7847 redef class AAttrReassignExpr
7848 redef meth n_expr
=(n
: PExpr)
7855 redef meth n_id
=(n
: TAttrid)
7862 redef meth n_assign_op
=(n
: PAssignOp)
7869 redef meth n_value
=(n
: PExpr)
7877 private init empty_init
do end
7879 init init_aattrreassignexpr
(
7882 n_assign_op
: PAssignOp ,
7888 if n_expr
!= null then
7889 n_expr
.parent
= self
7892 if n_id
!= null then
7895 _n_assign_op
= n_assign_op
7896 if n_assign_op
!= null then
7897 n_assign_op
.parent
= self
7900 if n_value
!= null then
7901 n_value
.parent
= self
7905 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7907 assert old_child
!= null
7908 if _n_expr
== old_child
then
7909 if new_child
!= null then
7910 new_child
.parent
= self
7911 assert new_child
isa PExpr
7918 if _n_id
== old_child
then
7919 if new_child
!= null then
7920 new_child
.parent
= self
7921 assert new_child
isa TAttrid
7928 if _n_assign_op
== old_child
then
7929 if new_child
!= null then
7930 new_child
.parent
= self
7931 assert new_child
isa PAssignOp
7932 _n_assign_op
= new_child
7938 if _n_value
== old_child
then
7939 if new_child
!= null then
7940 new_child
.parent
= self
7941 assert new_child
isa PExpr
7942 _n_value
= new_child
7950 redef meth visit_all
(v
: Visitor)
7952 if _n_expr
!= null then
7955 if _n_id
!= null then
7958 if _n_assign_op
!= null then
7959 v
.visit
(_n_assign_op
)
7961 if _n_value
!= null then
7966 redef meth visit_all_reverse
(v
: Visitor)
7968 if _n_expr
!= null then
7971 if _n_id
!= null then
7974 if _n_assign_op
!= null then
7975 v
.visit
(_n_assign_op
)
7977 if _n_value
!= null then
7982 redef class ACallExpr
7983 redef meth n_expr
=(n
: PExpr)
7990 redef meth n_id
=(n
: TId)
7998 private init empty_init
do end
8000 init init_acallexpr
(
8003 n_args
: Array[Object] # Should be Array[PExpr]
8008 if n_expr
!= null then
8009 n_expr
.parent
= self
8012 if n_id
!= null then
8015 _n_args
= new List[PExpr]
8023 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8025 assert old_child
!= null
8026 if _n_expr
== old_child
then
8027 if new_child
!= null then
8028 new_child
.parent
= self
8029 assert new_child
isa PExpr
8036 if _n_id
== old_child
then
8037 if new_child
!= null then
8038 new_child
.parent
= self
8039 assert new_child
isa TId
8046 for i
in [0.._n_args
.length
[ do
8047 if _n_args
[i
] == old_child
then
8048 if new_child
!= null then
8049 assert new_child
isa PExpr
8050 _n_args
[i
] = new_child
8051 new_child
.parent
= self
8053 _n_args
.remove_at
(i
)
8060 redef meth visit_all
(v
: Visitor)
8062 if _n_expr
!= null then
8065 if _n_id
!= null then
8073 redef meth visit_all_reverse
(v
: Visitor)
8075 if _n_expr
!= null then
8078 if _n_id
!= null then
8082 var i
= _n_args
.length
8090 redef class ACallAssignExpr
8091 redef meth n_expr
=(n
: PExpr)
8098 redef meth n_id
=(n
: TId)
8105 redef meth n_assign
=(n
: TAssign)
8112 redef meth n_value
=(n
: PExpr)
8120 private init empty_init
do end
8122 init init_acallassignexpr
(
8125 n_args
: Array[Object] , # Should be Array[PExpr]
8132 if n_expr
!= null then
8133 n_expr
.parent
= self
8136 if n_id
!= null then
8139 _n_args
= new List[PExpr]
8145 _n_assign
= n_assign
8146 if n_assign
!= null then
8147 n_assign
.parent
= self
8150 if n_value
!= null then
8151 n_value
.parent
= self
8155 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8157 assert old_child
!= null
8158 if _n_expr
== old_child
then
8159 if new_child
!= null then
8160 new_child
.parent
= self
8161 assert new_child
isa PExpr
8168 if _n_id
== old_child
then
8169 if new_child
!= null then
8170 new_child
.parent
= self
8171 assert new_child
isa TId
8178 for i
in [0.._n_args
.length
[ do
8179 if _n_args
[i
] == old_child
then
8180 if new_child
!= null then
8181 assert new_child
isa PExpr
8182 _n_args
[i
] = new_child
8183 new_child
.parent
= self
8185 _n_args
.remove_at
(i
)
8190 if _n_assign
== old_child
then
8191 if new_child
!= null then
8192 new_child
.parent
= self
8193 assert new_child
isa TAssign
8194 _n_assign
= new_child
8200 if _n_value
== old_child
then
8201 if new_child
!= null then
8202 new_child
.parent
= self
8203 assert new_child
isa PExpr
8204 _n_value
= new_child
8212 redef meth visit_all
(v
: Visitor)
8214 if _n_expr
!= null then
8217 if _n_id
!= null then
8223 if _n_assign
!= null then
8226 if _n_value
!= null then
8231 redef meth visit_all_reverse
(v
: Visitor)
8233 if _n_expr
!= null then
8236 if _n_id
!= null then
8240 var i
= _n_args
.length
8246 if _n_assign
!= null then
8249 if _n_value
!= null then
8254 redef class ACallReassignExpr
8255 redef meth n_expr
=(n
: PExpr)
8262 redef meth n_id
=(n
: TId)
8269 redef meth n_assign_op
=(n
: PAssignOp)
8276 redef meth n_value
=(n
: PExpr)
8284 private init empty_init
do end
8286 init init_acallreassignexpr
(
8289 n_args
: Array[Object] , # Should be Array[PExpr]
8290 n_assign_op
: PAssignOp ,
8296 if n_expr
!= null then
8297 n_expr
.parent
= self
8300 if n_id
!= null then
8303 _n_args
= new List[PExpr]
8309 _n_assign_op
= n_assign_op
8310 if n_assign_op
!= null then
8311 n_assign_op
.parent
= self
8314 if n_value
!= null then
8315 n_value
.parent
= self
8319 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8321 assert old_child
!= null
8322 if _n_expr
== old_child
then
8323 if new_child
!= null then
8324 new_child
.parent
= self
8325 assert new_child
isa PExpr
8332 if _n_id
== old_child
then
8333 if new_child
!= null then
8334 new_child
.parent
= self
8335 assert new_child
isa TId
8342 for i
in [0.._n_args
.length
[ do
8343 if _n_args
[i
] == old_child
then
8344 if new_child
!= null then
8345 assert new_child
isa PExpr
8346 _n_args
[i
] = new_child
8347 new_child
.parent
= self
8349 _n_args
.remove_at
(i
)
8354 if _n_assign_op
== old_child
then
8355 if new_child
!= null then
8356 new_child
.parent
= self
8357 assert new_child
isa PAssignOp
8358 _n_assign_op
= new_child
8364 if _n_value
== old_child
then
8365 if new_child
!= null then
8366 new_child
.parent
= self
8367 assert new_child
isa PExpr
8368 _n_value
= new_child
8376 redef meth visit_all
(v
: Visitor)
8378 if _n_expr
!= null then
8381 if _n_id
!= null then
8387 if _n_assign_op
!= null then
8388 v
.visit
(_n_assign_op
)
8390 if _n_value
!= null then
8395 redef meth visit_all_reverse
(v
: Visitor)
8397 if _n_expr
!= null then
8400 if _n_id
!= null then
8404 var i
= _n_args
.length
8410 if _n_assign_op
!= null then
8411 v
.visit
(_n_assign_op
)
8413 if _n_value
!= null then
8418 redef class ASuperExpr
8419 redef meth n_qualified
=(n
: PQualified)
8426 redef meth n_kwsuper
=(n
: TKwsuper)
8434 private init empty_init
do end
8436 init init_asuperexpr
(
8437 n_qualified
: PQualified ,
8438 n_kwsuper
: TKwsuper ,
8439 n_args
: Array[Object] # Should be Array[PExpr]
8443 _n_qualified
= n_qualified
8444 if n_qualified
!= null then
8445 n_qualified
.parent
= self
8447 _n_kwsuper
= n_kwsuper
8448 if n_kwsuper
!= null then
8449 n_kwsuper
.parent
= self
8451 _n_args
= new List[PExpr]
8459 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8461 assert old_child
!= null
8462 if _n_qualified
== old_child
then
8463 if new_child
!= null then
8464 new_child
.parent
= self
8465 assert new_child
isa PQualified
8466 _n_qualified
= new_child
8472 if _n_kwsuper
== old_child
then
8473 if new_child
!= null then
8474 new_child
.parent
= self
8475 assert new_child
isa TKwsuper
8476 _n_kwsuper
= new_child
8482 for i
in [0.._n_args
.length
[ do
8483 if _n_args
[i
] == old_child
then
8484 if new_child
!= null then
8485 assert new_child
isa PExpr
8486 _n_args
[i
] = new_child
8487 new_child
.parent
= self
8489 _n_args
.remove_at
(i
)
8496 redef meth visit_all
(v
: Visitor)
8498 if _n_qualified
!= null then
8499 v
.visit
(_n_qualified
)
8501 if _n_kwsuper
!= null then
8509 redef meth visit_all_reverse
(v
: Visitor)
8511 if _n_qualified
!= null then
8512 v
.visit
(_n_qualified
)
8514 if _n_kwsuper
!= null then
8518 var i
= _n_args
.length
8526 redef class AInitExpr
8527 redef meth n_expr
=(n
: PExpr)
8534 redef meth n_kwinit
=(n
: TKwinit)
8542 private init empty_init
do end
8544 init init_ainitexpr
(
8547 n_args
: Array[Object] # Should be Array[PExpr]
8552 if n_expr
!= null then
8553 n_expr
.parent
= self
8555 _n_kwinit
= n_kwinit
8556 if n_kwinit
!= null then
8557 n_kwinit
.parent
= self
8559 _n_args
= new List[PExpr]
8567 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8569 assert old_child
!= null
8570 if _n_expr
== old_child
then
8571 if new_child
!= null then
8572 new_child
.parent
= self
8573 assert new_child
isa PExpr
8580 if _n_kwinit
== old_child
then
8581 if new_child
!= null then
8582 new_child
.parent
= self
8583 assert new_child
isa TKwinit
8584 _n_kwinit
= new_child
8590 for i
in [0.._n_args
.length
[ do
8591 if _n_args
[i
] == old_child
then
8592 if new_child
!= null then
8593 assert new_child
isa PExpr
8594 _n_args
[i
] = new_child
8595 new_child
.parent
= self
8597 _n_args
.remove_at
(i
)
8604 redef meth visit_all
(v
: Visitor)
8606 if _n_expr
!= null then
8609 if _n_kwinit
!= null then
8617 redef meth visit_all_reverse
(v
: Visitor)
8619 if _n_expr
!= null then
8622 if _n_kwinit
!= null then
8626 var i
= _n_args
.length
8634 redef class ABraExpr
8635 redef meth n_expr
=(n
: PExpr)
8643 private init empty_init
do end
8645 init init_abraexpr
(
8647 n_args
: Array[Object] # Should be Array[PExpr]
8652 if n_expr
!= null then
8653 n_expr
.parent
= self
8655 _n_args
= new List[PExpr]
8663 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8665 assert old_child
!= null
8666 if _n_expr
== old_child
then
8667 if new_child
!= null then
8668 new_child
.parent
= self
8669 assert new_child
isa PExpr
8676 for i
in [0.._n_args
.length
[ do
8677 if _n_args
[i
] == old_child
then
8678 if new_child
!= null then
8679 assert new_child
isa PExpr
8680 _n_args
[i
] = new_child
8681 new_child
.parent
= self
8683 _n_args
.remove_at
(i
)
8690 redef meth visit_all
(v
: Visitor)
8692 if _n_expr
!= null then
8700 redef meth visit_all_reverse
(v
: Visitor)
8702 if _n_expr
!= null then
8706 var i
= _n_args
.length
8714 redef class ABraAssignExpr
8715 redef meth n_expr
=(n
: PExpr)
8722 redef meth n_assign
=(n
: TAssign)
8729 redef meth n_value
=(n
: PExpr)
8737 private init empty_init
do end
8739 init init_abraassignexpr
(
8741 n_args
: Array[Object] , # Should be Array[PExpr]
8748 if n_expr
!= null then
8749 n_expr
.parent
= self
8751 _n_args
= new List[PExpr]
8757 _n_assign
= n_assign
8758 if n_assign
!= null then
8759 n_assign
.parent
= self
8762 if n_value
!= null then
8763 n_value
.parent
= self
8767 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8769 assert old_child
!= null
8770 if _n_expr
== old_child
then
8771 if new_child
!= null then
8772 new_child
.parent
= self
8773 assert new_child
isa PExpr
8780 for i
in [0.._n_args
.length
[ do
8781 if _n_args
[i
] == old_child
then
8782 if new_child
!= null then
8783 assert new_child
isa PExpr
8784 _n_args
[i
] = new_child
8785 new_child
.parent
= self
8787 _n_args
.remove_at
(i
)
8792 if _n_assign
== old_child
then
8793 if new_child
!= null then
8794 new_child
.parent
= self
8795 assert new_child
isa TAssign
8796 _n_assign
= new_child
8802 if _n_value
== old_child
then
8803 if new_child
!= null then
8804 new_child
.parent
= self
8805 assert new_child
isa PExpr
8806 _n_value
= new_child
8814 redef meth visit_all
(v
: Visitor)
8816 if _n_expr
!= null then
8822 if _n_assign
!= null then
8825 if _n_value
!= null then
8830 redef meth visit_all_reverse
(v
: Visitor)
8832 if _n_expr
!= null then
8836 var i
= _n_args
.length
8842 if _n_assign
!= null then
8845 if _n_value
!= null then
8850 redef class ABraReassignExpr
8851 redef meth n_expr
=(n
: PExpr)
8858 redef meth n_assign_op
=(n
: PAssignOp)
8865 redef meth n_value
=(n
: PExpr)
8873 private init empty_init
do end
8875 init init_abrareassignexpr
(
8877 n_args
: Array[Object] , # Should be Array[PExpr]
8878 n_assign_op
: PAssignOp ,
8884 if n_expr
!= null then
8885 n_expr
.parent
= self
8887 _n_args
= new List[PExpr]
8893 _n_assign_op
= n_assign_op
8894 if n_assign_op
!= null then
8895 n_assign_op
.parent
= self
8898 if n_value
!= null then
8899 n_value
.parent
= self
8903 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8905 assert old_child
!= null
8906 if _n_expr
== old_child
then
8907 if new_child
!= null then
8908 new_child
.parent
= self
8909 assert new_child
isa PExpr
8916 for i
in [0.._n_args
.length
[ do
8917 if _n_args
[i
] == old_child
then
8918 if new_child
!= null then
8919 assert new_child
isa PExpr
8920 _n_args
[i
] = new_child
8921 new_child
.parent
= self
8923 _n_args
.remove_at
(i
)
8928 if _n_assign_op
== old_child
then
8929 if new_child
!= null then
8930 new_child
.parent
= self
8931 assert new_child
isa PAssignOp
8932 _n_assign_op
= new_child
8938 if _n_value
== old_child
then
8939 if new_child
!= null then
8940 new_child
.parent
= self
8941 assert new_child
isa PExpr
8942 _n_value
= new_child
8950 redef meth visit_all
(v
: Visitor)
8952 if _n_expr
!= null then
8958 if _n_assign_op
!= null then
8959 v
.visit
(_n_assign_op
)
8961 if _n_value
!= null then
8966 redef meth visit_all_reverse
(v
: Visitor)
8968 if _n_expr
!= null then
8972 var i
= _n_args
.length
8978 if _n_assign_op
!= null then
8979 v
.visit
(_n_assign_op
)
8981 if _n_value
!= null then
8986 redef class AVarExpr
8987 redef meth n_id
=(n
: TId)
8995 private init empty_init
do end
8997 init init_avarexpr
(
9003 if n_id
!= null then
9008 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9010 assert old_child
!= null
9011 if _n_id
== old_child
then
9012 if new_child
!= null then
9013 new_child
.parent
= self
9014 assert new_child
isa TId
9023 redef meth visit_all
(v
: Visitor)
9025 if _n_id
!= null then
9030 redef meth visit_all_reverse
(v
: Visitor)
9032 if _n_id
!= null then
9037 redef class AVarAssignExpr
9038 redef meth n_id
=(n
: TId)
9045 redef meth n_assign
=(n
: TAssign)
9052 redef meth n_value
=(n
: PExpr)
9060 private init empty_init
do end
9062 init init_avarassignexpr
(
9070 if n_id
!= null then
9073 _n_assign
= n_assign
9074 if n_assign
!= null then
9075 n_assign
.parent
= self
9078 if n_value
!= null then
9079 n_value
.parent
= self
9083 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9085 assert old_child
!= null
9086 if _n_id
== old_child
then
9087 if new_child
!= null then
9088 new_child
.parent
= self
9089 assert new_child
isa TId
9096 if _n_assign
== old_child
then
9097 if new_child
!= null then
9098 new_child
.parent
= self
9099 assert new_child
isa TAssign
9100 _n_assign
= new_child
9106 if _n_value
== old_child
then
9107 if new_child
!= null then
9108 new_child
.parent
= self
9109 assert new_child
isa PExpr
9110 _n_value
= new_child
9118 redef meth visit_all
(v
: Visitor)
9120 if _n_id
!= null then
9123 if _n_assign
!= null then
9126 if _n_value
!= null then
9131 redef meth visit_all_reverse
(v
: Visitor)
9133 if _n_id
!= null then
9136 if _n_assign
!= null then
9139 if _n_value
!= null then
9144 redef class AVarReassignExpr
9145 redef meth n_id
=(n
: TId)
9152 redef meth n_assign_op
=(n
: PAssignOp)
9159 redef meth n_value
=(n
: PExpr)
9167 private init empty_init
do end
9169 init init_avarreassignexpr
(
9171 n_assign_op
: PAssignOp ,
9177 if n_id
!= null then
9180 _n_assign_op
= n_assign_op
9181 if n_assign_op
!= null then
9182 n_assign_op
.parent
= self
9185 if n_value
!= null then
9186 n_value
.parent
= self
9190 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9192 assert old_child
!= null
9193 if _n_id
== old_child
then
9194 if new_child
!= null then
9195 new_child
.parent
= self
9196 assert new_child
isa TId
9203 if _n_assign_op
== old_child
then
9204 if new_child
!= null then
9205 new_child
.parent
= self
9206 assert new_child
isa PAssignOp
9207 _n_assign_op
= new_child
9213 if _n_value
== old_child
then
9214 if new_child
!= null then
9215 new_child
.parent
= self
9216 assert new_child
isa PExpr
9217 _n_value
= new_child
9225 redef meth visit_all
(v
: Visitor)
9227 if _n_id
!= null then
9230 if _n_assign_op
!= null then
9231 v
.visit
(_n_assign_op
)
9233 if _n_value
!= null then
9238 redef meth visit_all_reverse
(v
: Visitor)
9240 if _n_id
!= null then
9243 if _n_assign_op
!= null then
9244 v
.visit
(_n_assign_op
)
9246 if _n_value
!= null then
9251 redef class ARangeExpr
9252 redef meth n_expr
=(n
: PExpr)
9259 redef meth n_expr2
=(n
: PExpr)
9267 private init empty_init
do end
9269 init init_arangeexpr
(
9276 if n_expr
!= null then
9277 n_expr
.parent
= self
9280 if n_expr2
!= null then
9281 n_expr2
.parent
= self
9285 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9287 assert old_child
!= null
9288 if _n_expr
== old_child
then
9289 if new_child
!= null then
9290 new_child
.parent
= self
9291 assert new_child
isa PExpr
9298 if _n_expr2
== old_child
then
9299 if new_child
!= null then
9300 new_child
.parent
= self
9301 assert new_child
isa PExpr
9302 _n_expr2
= new_child
9310 redef meth visit_all
(v
: Visitor)
9312 if _n_expr
!= null then
9315 if _n_expr2
!= null then
9320 redef meth visit_all_reverse
(v
: Visitor)
9322 if _n_expr
!= null then
9325 if _n_expr2
!= null then
9330 redef class ACrangeExpr
9331 redef meth n_expr
=(n
: PExpr)
9338 redef meth n_expr2
=(n
: PExpr)
9346 private init empty_init
do end
9348 init init_acrangeexpr
(
9355 if n_expr
!= null then
9356 n_expr
.parent
= self
9359 if n_expr2
!= null then
9360 n_expr2
.parent
= self
9364 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9366 assert old_child
!= null
9367 if _n_expr
== old_child
then
9368 if new_child
!= null then
9369 new_child
.parent
= self
9370 assert new_child
isa PExpr
9377 if _n_expr2
== old_child
then
9378 if new_child
!= null then
9379 new_child
.parent
= self
9380 assert new_child
isa PExpr
9381 _n_expr2
= new_child
9389 redef meth visit_all
(v
: Visitor)
9391 if _n_expr
!= null then
9394 if _n_expr2
!= null then
9399 redef meth visit_all_reverse
(v
: Visitor)
9401 if _n_expr
!= null then
9404 if _n_expr2
!= null then
9409 redef class AOrangeExpr
9410 redef meth n_expr
=(n
: PExpr)
9417 redef meth n_expr2
=(n
: PExpr)
9425 private init empty_init
do end
9427 init init_aorangeexpr
(
9434 if n_expr
!= null then
9435 n_expr
.parent
= self
9438 if n_expr2
!= null then
9439 n_expr2
.parent
= self
9443 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9445 assert old_child
!= null
9446 if _n_expr
== old_child
then
9447 if new_child
!= null then
9448 new_child
.parent
= self
9449 assert new_child
isa PExpr
9456 if _n_expr2
== old_child
then
9457 if new_child
!= null then
9458 new_child
.parent
= self
9459 assert new_child
isa PExpr
9460 _n_expr2
= new_child
9468 redef meth visit_all
(v
: Visitor)
9470 if _n_expr
!= null then
9473 if _n_expr2
!= null then
9478 redef meth visit_all_reverse
(v
: Visitor)
9480 if _n_expr
!= null then
9483 if _n_expr2
!= null then
9488 redef class AArrayExpr
9490 private init empty_init
do end
9492 init init_aarrayexpr
(
9493 n_exprs
: Array[Object] # Should be Array[PExpr]
9497 _n_exprs
= new List[PExpr]
9505 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9507 assert old_child
!= null
9508 for i
in [0.._n_exprs
.length
[ do
9509 if _n_exprs
[i
] == old_child
then
9510 if new_child
!= null then
9511 assert new_child
isa PExpr
9512 _n_exprs
[i
] = new_child
9513 new_child
.parent
= self
9515 _n_exprs
.remove_at
(i
)
9522 redef meth visit_all
(v
: Visitor)
9524 for n
in _n_exprs
do
9529 redef meth visit_all_reverse
(v
: Visitor)
9532 var i
= _n_exprs
.length
9534 v
.visit
(_n_exprs
[i
])
9540 redef class ASelfExpr
9541 redef meth n_kwself
=(n
: TKwself)
9549 private init empty_init
do end
9551 init init_aselfexpr
(
9556 _n_kwself
= n_kwself
9557 if n_kwself
!= null then
9558 n_kwself
.parent
= self
9562 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9564 assert old_child
!= null
9565 if _n_kwself
== old_child
then
9566 if new_child
!= null then
9567 new_child
.parent
= self
9568 assert new_child
isa TKwself
9569 _n_kwself
= new_child
9577 redef meth visit_all
(v
: Visitor)
9579 if _n_kwself
!= null then
9584 redef meth visit_all_reverse
(v
: Visitor)
9586 if _n_kwself
!= null then
9591 redef class AImplicitSelfExpr
9593 private init empty_init
do end
9595 init init_aimplicitselfexpr
9600 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9602 assert old_child
!= null
9605 redef meth visit_all
(v
: Visitor)
9609 redef meth visit_all_reverse
(v
: Visitor)
9613 redef class ATrueExpr
9614 redef meth n_kwtrue
=(n
: TKwtrue)
9622 private init empty_init
do end
9624 init init_atrueexpr
(
9629 _n_kwtrue
= n_kwtrue
9630 if n_kwtrue
!= null then
9631 n_kwtrue
.parent
= self
9635 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9637 assert old_child
!= null
9638 if _n_kwtrue
== old_child
then
9639 if new_child
!= null then
9640 new_child
.parent
= self
9641 assert new_child
isa TKwtrue
9642 _n_kwtrue
= new_child
9650 redef meth visit_all
(v
: Visitor)
9652 if _n_kwtrue
!= null then
9657 redef meth visit_all_reverse
(v
: Visitor)
9659 if _n_kwtrue
!= null then
9664 redef class AFalseExpr
9665 redef meth n_kwfalse
=(n
: TKwfalse)
9673 private init empty_init
do end
9675 init init_afalseexpr
(
9680 _n_kwfalse
= n_kwfalse
9681 if n_kwfalse
!= null then
9682 n_kwfalse
.parent
= self
9686 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9688 assert old_child
!= null
9689 if _n_kwfalse
== old_child
then
9690 if new_child
!= null then
9691 new_child
.parent
= self
9692 assert new_child
isa TKwfalse
9693 _n_kwfalse
= new_child
9701 redef meth visit_all
(v
: Visitor)
9703 if _n_kwfalse
!= null then
9708 redef meth visit_all_reverse
(v
: Visitor)
9710 if _n_kwfalse
!= null then
9715 redef class ANullExpr
9716 redef meth n_kwnull
=(n
: TKwnull)
9724 private init empty_init
do end
9726 init init_anullexpr
(
9731 _n_kwnull
= n_kwnull
9732 if n_kwnull
!= null then
9733 n_kwnull
.parent
= self
9737 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9739 assert old_child
!= null
9740 if _n_kwnull
== old_child
then
9741 if new_child
!= null then
9742 new_child
.parent
= self
9743 assert new_child
isa TKwnull
9744 _n_kwnull
= new_child
9752 redef meth visit_all
(v
: Visitor)
9754 if _n_kwnull
!= null then
9759 redef meth visit_all_reverse
(v
: Visitor)
9761 if _n_kwnull
!= null then
9766 redef class AIntExpr
9767 redef meth n_number
=(n
: TNumber)
9775 private init empty_init
do end
9777 init init_aintexpr
(
9782 _n_number
= n_number
9783 if n_number
!= null then
9784 n_number
.parent
= self
9788 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9790 assert old_child
!= null
9791 if _n_number
== old_child
then
9792 if new_child
!= null then
9793 new_child
.parent
= self
9794 assert new_child
isa TNumber
9795 _n_number
= new_child
9803 redef meth visit_all
(v
: Visitor)
9805 if _n_number
!= null then
9810 redef meth visit_all_reverse
(v
: Visitor)
9812 if _n_number
!= null then
9817 redef class AFloatExpr
9818 redef meth n_float
=(n
: TFloat)
9826 private init empty_init
do end
9828 init init_afloatexpr
(
9834 if n_float
!= null then
9835 n_float
.parent
= self
9839 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9841 assert old_child
!= null
9842 if _n_float
== old_child
then
9843 if new_child
!= null then
9844 new_child
.parent
= self
9845 assert new_child
isa TFloat
9846 _n_float
= new_child
9854 redef meth visit_all
(v
: Visitor)
9856 if _n_float
!= null then
9861 redef meth visit_all_reverse
(v
: Visitor)
9863 if _n_float
!= null then
9868 redef class ACharExpr
9869 redef meth n_char
=(n
: TChar)
9877 private init empty_init
do end
9879 init init_acharexpr
(
9885 if n_char
!= null then
9886 n_char
.parent
= self
9890 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9892 assert old_child
!= null
9893 if _n_char
== old_child
then
9894 if new_child
!= null then
9895 new_child
.parent
= self
9896 assert new_child
isa TChar
9905 redef meth visit_all
(v
: Visitor)
9907 if _n_char
!= null then
9912 redef meth visit_all_reverse
(v
: Visitor)
9914 if _n_char
!= null then
9919 redef class AStringExpr
9920 redef meth n_string
=(n
: TString)
9928 private init empty_init
do end
9930 init init_astringexpr
(
9935 _n_string
= n_string
9936 if n_string
!= null then
9937 n_string
.parent
= self
9941 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9943 assert old_child
!= null
9944 if _n_string
== old_child
then
9945 if new_child
!= null then
9946 new_child
.parent
= self
9947 assert new_child
isa TString
9948 _n_string
= new_child
9956 redef meth visit_all
(v
: Visitor)
9958 if _n_string
!= null then
9963 redef meth visit_all_reverse
(v
: Visitor)
9965 if _n_string
!= null then
9970 redef class AStartStringExpr
9971 redef meth n_string
=(n
: TStartString)
9979 private init empty_init
do end
9981 init init_astartstringexpr
(
9982 n_string
: TStartString
9986 _n_string
= n_string
9987 if n_string
!= null then
9988 n_string
.parent
= self
9992 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9994 assert old_child
!= null
9995 if _n_string
== old_child
then
9996 if new_child
!= null then
9997 new_child
.parent
= self
9998 assert new_child
isa TStartString
9999 _n_string
= new_child
10007 redef meth visit_all
(v
: Visitor)
10009 if _n_string
!= null then
10014 redef meth visit_all_reverse
(v
: Visitor)
10016 if _n_string
!= null then
10021 redef class AMidStringExpr
10022 redef meth n_string
=(n
: TMidString)
10030 private init empty_init
do end
10032 init init_amidstringexpr
(
10033 n_string
: TMidString
10037 _n_string
= n_string
10038 if n_string
!= null then
10039 n_string
.parent
= self
10043 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10045 assert old_child
!= null
10046 if _n_string
== old_child
then
10047 if new_child
!= null then
10048 new_child
.parent
= self
10049 assert new_child
isa TMidString
10050 _n_string
= new_child
10058 redef meth visit_all
(v
: Visitor)
10060 if _n_string
!= null then
10065 redef meth visit_all_reverse
(v
: Visitor)
10067 if _n_string
!= null then
10072 redef class AEndStringExpr
10073 redef meth n_string
=(n
: TEndString)
10081 private init empty_init
do end
10083 init init_aendstringexpr
(
10084 n_string
: TEndString
10088 _n_string
= n_string
10089 if n_string
!= null then
10090 n_string
.parent
= self
10094 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10096 assert old_child
!= null
10097 if _n_string
== old_child
then
10098 if new_child
!= null then
10099 new_child
.parent
= self
10100 assert new_child
isa TEndString
10101 _n_string
= new_child
10109 redef meth visit_all
(v
: Visitor)
10111 if _n_string
!= null then
10116 redef meth visit_all_reverse
(v
: Visitor)
10118 if _n_string
!= null then
10123 redef class ASuperstringExpr
10125 private init empty_init
do end
10127 init init_asuperstringexpr
(
10128 n_exprs
: Array[Object] # Should be Array[PExpr]
10132 _n_exprs
= new List[PExpr]
10133 for n
in n_exprs
do
10140 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10142 assert old_child
!= null
10143 for i
in [0.._n_exprs
.length
[ do
10144 if _n_exprs
[i
] == old_child
then
10145 if new_child
!= null then
10146 assert new_child
isa PExpr
10147 _n_exprs
[i
] = new_child
10148 new_child
.parent
= self
10150 _n_exprs
.remove_at
(i
)
10157 redef meth visit_all
(v
: Visitor)
10159 for n
in _n_exprs
do
10164 redef meth visit_all_reverse
(v
: Visitor)
10167 var i
= _n_exprs
.length
10169 v
.visit
(_n_exprs
[i
])
10175 redef class AParExpr
10176 redef meth n_expr
=(n
: PExpr)
10184 private init empty_init
do end
10186 init init_aparexpr
(
10192 if n_expr
!= null then
10193 n_expr
.parent
= self
10197 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10199 assert old_child
!= null
10200 if _n_expr
== old_child
then
10201 if new_child
!= null then
10202 new_child
.parent
= self
10203 assert new_child
isa PExpr
10204 _n_expr
= new_child
10212 redef meth visit_all
(v
: Visitor)
10214 if _n_expr
!= null then
10219 redef meth visit_all_reverse
(v
: Visitor)
10221 if _n_expr
!= null then
10226 redef class AAsCastExpr
10227 redef meth n_expr
=(n
: PExpr)
10234 redef meth n_kwas
=(n
: TKwas)
10241 redef meth n_type
=(n
: PType)
10249 private init empty_init
do end
10251 init init_aascastexpr
(
10259 if n_expr
!= null then
10260 n_expr
.parent
= self
10263 if n_kwas
!= null then
10264 n_kwas
.parent
= self
10267 if n_type
!= null then
10268 n_type
.parent
= self
10272 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10274 assert old_child
!= null
10275 if _n_expr
== old_child
then
10276 if new_child
!= null then
10277 new_child
.parent
= self
10278 assert new_child
isa PExpr
10279 _n_expr
= new_child
10285 if _n_kwas
== old_child
then
10286 if new_child
!= null then
10287 new_child
.parent
= self
10288 assert new_child
isa TKwas
10289 _n_kwas
= new_child
10295 if _n_type
== old_child
then
10296 if new_child
!= null then
10297 new_child
.parent
= self
10298 assert new_child
isa PType
10299 _n_type
= new_child
10307 redef meth visit_all
(v
: Visitor)
10309 if _n_expr
!= null then
10312 if _n_kwas
!= null then
10315 if _n_type
!= null then
10320 redef meth visit_all_reverse
(v
: Visitor)
10322 if _n_expr
!= null then
10325 if _n_kwas
!= null then
10328 if _n_type
!= null then
10333 redef class APlusAssignOp
10334 redef meth n_pluseq
=(n
: TPluseq)
10342 private init empty_init
do end
10344 init init_aplusassignop
(
10349 _n_pluseq
= n_pluseq
10350 if n_pluseq
!= null then
10351 n_pluseq
.parent
= self
10355 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10357 assert old_child
!= null
10358 if _n_pluseq
== old_child
then
10359 if new_child
!= null then
10360 new_child
.parent
= self
10361 assert new_child
isa TPluseq
10362 _n_pluseq
= new_child
10370 redef meth visit_all
(v
: Visitor)
10372 if _n_pluseq
!= null then
10377 redef meth visit_all_reverse
(v
: Visitor)
10379 if _n_pluseq
!= null then
10384 redef class AMinusAssignOp
10385 redef meth n_minuseq
=(n
: TMinuseq)
10393 private init empty_init
do end
10395 init init_aminusassignop
(
10396 n_minuseq
: TMinuseq
10400 _n_minuseq
= n_minuseq
10401 if n_minuseq
!= null then
10402 n_minuseq
.parent
= self
10406 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10408 assert old_child
!= null
10409 if _n_minuseq
== old_child
then
10410 if new_child
!= null then
10411 new_child
.parent
= self
10412 assert new_child
isa TMinuseq
10413 _n_minuseq
= new_child
10421 redef meth visit_all
(v
: Visitor)
10423 if _n_minuseq
!= null then
10424 v
.visit
(_n_minuseq
)
10428 redef meth visit_all_reverse
(v
: Visitor)
10430 if _n_minuseq
!= null then
10431 v
.visit
(_n_minuseq
)
10435 redef class AQualified
10436 redef meth n_classid
=(n
: TClassid)
10444 private init empty_init
do end
10446 init init_aqualified
(
10447 n_id
: Array[Object] , # Should be Array[TId]
10448 n_classid
: TClassid
10452 _n_id
= new List[TId]
10458 _n_classid
= n_classid
10459 if n_classid
!= null then
10460 n_classid
.parent
= self
10464 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10466 assert old_child
!= null
10467 for i
in [0.._n_id
.length
[ do
10468 if _n_id
[i
] == old_child
then
10469 if new_child
!= null then
10470 assert new_child
isa TId
10471 _n_id
[i
] = new_child
10472 new_child
.parent
= self
10479 if _n_classid
== old_child
then
10480 if new_child
!= null then
10481 new_child
.parent
= self
10482 assert new_child
isa TClassid
10483 _n_classid
= new_child
10491 redef meth visit_all
(v
: Visitor)
10496 if _n_classid
!= null then
10497 v
.visit
(_n_classid
)
10501 redef meth visit_all_reverse
(v
: Visitor)
10504 var i
= _n_id
.length
10510 if _n_classid
!= null then
10511 v
.visit
(_n_classid
)
10517 private init empty_init
do end
10520 n_comment
: Array[Object] # Should be Array[TComment]
10524 _n_comment
= new List[TComment]
10525 for n
in n_comment
do
10526 assert n
isa TComment
10532 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10534 assert old_child
!= null
10535 for i
in [0.._n_comment
.length
[ do
10536 if _n_comment
[i
] == old_child
then
10537 if new_child
!= null then
10538 assert new_child
isa TComment
10539 _n_comment
[i
] = new_child
10540 new_child
.parent
= self
10542 _n_comment
.remove_at
(i
)
10549 redef meth visit_all
(v
: Visitor)
10551 for n
in _n_comment
do
10556 redef meth visit_all_reverse
(v
: Visitor)
10559 var i
= _n_comment
.length
10561 v
.visit
(_n_comment
[i
])
10577 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10579 assert old_child
!= null
10580 if _n_base
== old_child
then
10581 if new_child
== null then
10583 new_child
.parent
= self
10584 assert new_child
isa PModule
10585 _n_base
= new_child
10587 old_child
.parent
= null
10592 redef meth visit_all
(v
: Visitor)
10594 if _n_base
!= null then
10599 redef meth visit_all_reverse
(v
: Visitor)
10601 if _n_base
!= null then