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 if last_token
== null then
76 return "{first_token.locate}--????"
78 var lastpos
= last_token
.pos
+ last_token
.text
.length
- 1
79 if first_token
.line
== last_token
.line
then
80 return "{first_token.locate}--{lastpos}"
82 return "{first_token.locate}--{last_token.line}:{lastpos}"
86 redef meth replace_with
(n
: PNode)
90 n
.first_token
= first_token
91 n
.last_token
= last_token
94 redef meth line_number
96 if first_token
!= null then
97 return first_token
.line
104 # Abstract standard visitor
106 # Ask the visitor to visit a given node.
107 # Usually automatically called by visit_all* methods.
108 # Concrete visitors should redefine this method.
109 meth visit
(e
: PNode) is abstract
113 redef meth n_packagedecl
=(n
: PPackagedecl)
121 private init empty_init
do end
124 n_packagedecl
: PPackagedecl ,
125 n_imports
: Collection[Object] , # Should be Collection[PImport]
126 n_classdefs
: Collection[Object] # Should be Collection[PClassdef]
130 _n_packagedecl
= n_packagedecl
131 if n_packagedecl
!= null then
132 n_packagedecl
.parent
= self
134 _n_imports
= new List[PImport]
135 for n
in n_imports
do
140 _n_classdefs
= new List[PClassdef]
141 for n
in n_classdefs
do
142 assert n
isa PClassdef
148 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
150 assert old_child
!= null
151 if _n_packagedecl
== old_child
then
152 if new_child
!= null then
153 new_child
.parent
= self
154 assert new_child
isa PPackagedecl
155 _n_packagedecl
= new_child
157 _n_packagedecl
= null
161 for i
in [0.._n_imports
.length
[ do
162 if _n_imports
[i
] == old_child
then
163 if new_child
!= null then
164 assert new_child
isa PImport
165 _n_imports
[i
] = new_child
166 new_child
.parent
= self
168 _n_imports
.remove_at
(i
)
173 for i
in [0.._n_classdefs
.length
[ do
174 if _n_classdefs
[i
] == old_child
then
175 if new_child
!= null then
176 assert new_child
isa PClassdef
177 _n_classdefs
[i
] = new_child
178 new_child
.parent
= self
180 _n_classdefs
.remove_at
(i
)
187 redef meth visit_all
(v
: Visitor)
189 if _n_packagedecl
!= null then
190 v
.visit
(_n_packagedecl
)
192 for n
in _n_imports
do
195 for n
in _n_classdefs
do
200 redef meth visit_all_reverse
(v
: Visitor)
202 if _n_packagedecl
!= null then
203 v
.visit
(_n_packagedecl
)
206 var i
= _n_imports
.length
208 v
.visit
(_n_imports
[i
])
213 var i
= _n_classdefs
.length
215 v
.visit
(_n_classdefs
[i
])
221 redef class APackagedecl
222 redef meth n_doc
=(n
: PDoc)
229 redef meth n_kwpackage
=(n
: TKwpackage)
236 redef meth n_id
=(n
: TId)
244 private init empty_init
do end
246 init init_apackagedecl
(
248 n_kwpackage
: TKwpackage ,
254 if n_doc
!= null then
257 _n_kwpackage
= n_kwpackage
258 if n_kwpackage
!= null then
259 n_kwpackage
.parent
= self
267 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
269 assert old_child
!= null
270 if _n_doc
== old_child
then
271 if new_child
!= null then
272 new_child
.parent
= self
273 assert new_child
isa PDoc
280 if _n_kwpackage
== old_child
then
281 if new_child
!= null then
282 new_child
.parent
= self
283 assert new_child
isa TKwpackage
284 _n_kwpackage
= new_child
290 if _n_id
== old_child
then
291 if new_child
!= null then
292 new_child
.parent
= self
293 assert new_child
isa TId
302 redef meth visit_all
(v
: Visitor)
304 if _n_doc
!= null then
307 if _n_kwpackage
!= null then
308 v
.visit
(_n_kwpackage
)
310 if _n_id
!= null then
315 redef meth visit_all_reverse
(v
: Visitor)
317 if _n_doc
!= null then
320 if _n_kwpackage
!= null then
321 v
.visit
(_n_kwpackage
)
323 if _n_id
!= null then
329 redef meth n_visibility
=(n
: PVisibility)
336 redef meth n_kwimport
=(n
: TKwimport)
343 redef meth n_id
=(n
: TId)
351 private init empty_init
do end
354 n_visibility
: PVisibility ,
355 n_kwimport
: TKwimport ,
360 _n_visibility
= n_visibility
361 if n_visibility
!= null then
362 n_visibility
.parent
= self
364 _n_kwimport
= n_kwimport
365 if n_kwimport
!= null then
366 n_kwimport
.parent
= self
374 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
376 assert old_child
!= null
377 if _n_visibility
== old_child
then
378 if new_child
!= null then
379 new_child
.parent
= self
380 assert new_child
isa PVisibility
381 _n_visibility
= new_child
387 if _n_kwimport
== old_child
then
388 if new_child
!= null then
389 new_child
.parent
= self
390 assert new_child
isa TKwimport
391 _n_kwimport
= new_child
397 if _n_id
== old_child
then
398 if new_child
!= null then
399 new_child
.parent
= self
400 assert new_child
isa TId
409 redef meth visit_all
(v
: Visitor)
411 if _n_visibility
!= null then
412 v
.visit
(_n_visibility
)
414 if _n_kwimport
!= null then
417 if _n_id
!= null then
422 redef meth visit_all_reverse
(v
: Visitor)
424 if _n_visibility
!= null then
425 v
.visit
(_n_visibility
)
427 if _n_kwimport
!= null then
430 if _n_id
!= null then
435 redef class ANoImport
436 redef meth n_visibility
=(n
: PVisibility)
443 redef meth n_kwimport
=(n
: TKwimport)
450 redef meth n_kwend
=(n
: TKwend)
458 private init empty_init
do end
460 init init_anoimport
(
461 n_visibility
: PVisibility ,
462 n_kwimport
: TKwimport ,
467 _n_visibility
= n_visibility
468 if n_visibility
!= null then
469 n_visibility
.parent
= self
471 _n_kwimport
= n_kwimport
472 if n_kwimport
!= null then
473 n_kwimport
.parent
= self
476 if n_kwend
!= null then
477 n_kwend
.parent
= self
481 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
483 assert old_child
!= null
484 if _n_visibility
== old_child
then
485 if new_child
!= null then
486 new_child
.parent
= self
487 assert new_child
isa PVisibility
488 _n_visibility
= new_child
494 if _n_kwimport
== old_child
then
495 if new_child
!= null then
496 new_child
.parent
= self
497 assert new_child
isa TKwimport
498 _n_kwimport
= new_child
504 if _n_kwend
== old_child
then
505 if new_child
!= null then
506 new_child
.parent
= self
507 assert new_child
isa TKwend
516 redef meth visit_all
(v
: Visitor)
518 if _n_visibility
!= null then
519 v
.visit
(_n_visibility
)
521 if _n_kwimport
!= null then
524 if _n_kwend
!= null then
529 redef meth visit_all_reverse
(v
: Visitor)
531 if _n_visibility
!= null then
532 v
.visit
(_n_visibility
)
534 if _n_kwimport
!= null then
537 if _n_kwend
!= null then
542 redef class APublicVisibility
544 private init empty_init
do end
546 init init_apublicvisibility
551 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
553 assert old_child
!= null
556 redef meth visit_all
(v
: Visitor)
560 redef meth visit_all_reverse
(v
: Visitor)
564 redef class APrivateVisibility
565 redef meth n_kwprivate
=(n
: TKwprivate)
573 private init empty_init
do end
575 init init_aprivatevisibility
(
576 n_kwprivate
: TKwprivate
580 _n_kwprivate
= n_kwprivate
581 if n_kwprivate
!= null then
582 n_kwprivate
.parent
= self
586 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
588 assert old_child
!= null
589 if _n_kwprivate
== old_child
then
590 if new_child
!= null then
591 new_child
.parent
= self
592 assert new_child
isa TKwprivate
593 _n_kwprivate
= new_child
601 redef meth visit_all
(v
: Visitor)
603 if _n_kwprivate
!= null then
604 v
.visit
(_n_kwprivate
)
608 redef meth visit_all_reverse
(v
: Visitor)
610 if _n_kwprivate
!= null then
611 v
.visit
(_n_kwprivate
)
615 redef class AProtectedVisibility
616 redef meth n_kwprotected
=(n
: TKwprotected)
624 private init empty_init
do end
626 init init_aprotectedvisibility
(
627 n_kwprotected
: TKwprotected
631 _n_kwprotected
= n_kwprotected
632 if n_kwprotected
!= null then
633 n_kwprotected
.parent
= self
637 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
639 assert old_child
!= null
640 if _n_kwprotected
== old_child
then
641 if new_child
!= null then
642 new_child
.parent
= self
643 assert new_child
isa TKwprotected
644 _n_kwprotected
= new_child
646 _n_kwprotected
= null
652 redef meth visit_all
(v
: Visitor)
654 if _n_kwprotected
!= null then
655 v
.visit
(_n_kwprotected
)
659 redef meth visit_all_reverse
(v
: Visitor)
661 if _n_kwprotected
!= null then
662 v
.visit
(_n_kwprotected
)
666 redef class AIntrudeVisibility
667 redef meth n_kwintrude
=(n
: TKwintrude)
675 private init empty_init
do end
677 init init_aintrudevisibility
(
678 n_kwintrude
: TKwintrude
682 _n_kwintrude
= n_kwintrude
683 if n_kwintrude
!= null then
684 n_kwintrude
.parent
= self
688 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
690 assert old_child
!= null
691 if _n_kwintrude
== old_child
then
692 if new_child
!= null then
693 new_child
.parent
= self
694 assert new_child
isa TKwintrude
695 _n_kwintrude
= new_child
703 redef meth visit_all
(v
: Visitor)
705 if _n_kwintrude
!= null then
706 v
.visit
(_n_kwintrude
)
710 redef meth visit_all_reverse
(v
: Visitor)
712 if _n_kwintrude
!= null then
713 v
.visit
(_n_kwintrude
)
717 redef class AClassdef
718 redef meth n_doc
=(n
: PDoc)
725 redef meth n_kwredef
=(n
: TKwredef)
732 redef meth n_visibility
=(n
: PVisibility)
739 redef meth n_classkind
=(n
: PClasskind)
746 redef meth n_id
=(n
: TClassid)
754 private init empty_init
do end
756 init init_aclassdef
(
758 n_kwredef
: TKwredef ,
759 n_visibility
: PVisibility ,
760 n_classkind
: PClasskind ,
762 n_formaldefs
: Collection[Object] , # Should be Collection[PFormaldef]
763 n_superclasses
: Collection[Object] , # Should be Collection[PSuperclass]
764 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
769 if n_doc
!= null then
772 _n_kwredef
= n_kwredef
773 if n_kwredef
!= null then
774 n_kwredef
.parent
= self
776 _n_visibility
= n_visibility
777 if n_visibility
!= null then
778 n_visibility
.parent
= self
780 _n_classkind
= n_classkind
781 if n_classkind
!= null then
782 n_classkind
.parent
= self
788 _n_formaldefs
= new List[PFormaldef]
789 for n
in n_formaldefs
do
790 assert n
isa PFormaldef
794 _n_superclasses
= new List[PSuperclass]
795 for n
in n_superclasses
do
796 assert n
isa PSuperclass
797 _n_superclasses
.add
(n
)
800 _n_propdefs
= new List[PPropdef]
801 for n
in n_propdefs
do
802 assert n
isa PPropdef
808 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
810 assert old_child
!= null
811 if _n_doc
== old_child
then
812 if new_child
!= null then
813 new_child
.parent
= self
814 assert new_child
isa PDoc
821 if _n_kwredef
== old_child
then
822 if new_child
!= null then
823 new_child
.parent
= self
824 assert new_child
isa TKwredef
825 _n_kwredef
= new_child
831 if _n_visibility
== old_child
then
832 if new_child
!= null then
833 new_child
.parent
= self
834 assert new_child
isa PVisibility
835 _n_visibility
= new_child
841 if _n_classkind
== old_child
then
842 if new_child
!= null then
843 new_child
.parent
= self
844 assert new_child
isa PClasskind
845 _n_classkind
= new_child
851 if _n_id
== old_child
then
852 if new_child
!= null then
853 new_child
.parent
= self
854 assert new_child
isa TClassid
861 for i
in [0.._n_formaldefs
.length
[ do
862 if _n_formaldefs
[i
] == old_child
then
863 if new_child
!= null then
864 assert new_child
isa PFormaldef
865 _n_formaldefs
[i
] = new_child
866 new_child
.parent
= self
868 _n_formaldefs
.remove_at
(i
)
873 for i
in [0.._n_superclasses
.length
[ do
874 if _n_superclasses
[i
] == old_child
then
875 if new_child
!= null then
876 assert new_child
isa PSuperclass
877 _n_superclasses
[i
] = new_child
878 new_child
.parent
= self
880 _n_superclasses
.remove_at
(i
)
885 for i
in [0.._n_propdefs
.length
[ do
886 if _n_propdefs
[i
] == old_child
then
887 if new_child
!= null then
888 assert new_child
isa PPropdef
889 _n_propdefs
[i
] = new_child
890 new_child
.parent
= self
892 _n_propdefs
.remove_at
(i
)
899 redef meth visit_all
(v
: Visitor)
901 if _n_doc
!= null then
904 if _n_kwredef
!= null then
907 if _n_visibility
!= null then
908 v
.visit
(_n_visibility
)
910 if _n_classkind
!= null then
911 v
.visit
(_n_classkind
)
913 if _n_id
!= null then
916 for n
in _n_formaldefs
do
919 for n
in _n_superclasses
do
922 for n
in _n_propdefs
do
927 redef meth visit_all_reverse
(v
: Visitor)
929 if _n_doc
!= null then
932 if _n_kwredef
!= null then
935 if _n_visibility
!= null then
936 v
.visit
(_n_visibility
)
938 if _n_classkind
!= null then
939 v
.visit
(_n_classkind
)
941 if _n_id
!= null then
945 var i
= _n_formaldefs
.length
947 v
.visit
(_n_formaldefs
[i
])
952 var i
= _n_superclasses
.length
954 v
.visit
(_n_superclasses
[i
])
959 var i
= _n_propdefs
.length
961 v
.visit
(_n_propdefs
[i
])
967 redef class ATopClassdef
969 private init empty_init
do end
971 init init_atopclassdef
(
972 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
976 _n_propdefs
= new List[PPropdef]
977 for n
in n_propdefs
do
978 assert n
isa PPropdef
984 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
986 assert old_child
!= null
987 for i
in [0.._n_propdefs
.length
[ do
988 if _n_propdefs
[i
] == old_child
then
989 if new_child
!= null then
990 assert new_child
isa PPropdef
991 _n_propdefs
[i
] = new_child
992 new_child
.parent
= self
994 _n_propdefs
.remove_at
(i
)
1001 redef meth visit_all
(v
: Visitor)
1003 for n
in _n_propdefs
do
1008 redef meth visit_all_reverse
(v
: Visitor)
1011 var i
= _n_propdefs
.length
1013 v
.visit
(_n_propdefs
[i
])
1019 redef class AMainClassdef
1021 private init empty_init
do end
1023 init init_amainclassdef
(
1024 n_propdefs
: Collection[Object] # Should be Collection[PPropdef]
1028 _n_propdefs
= new List[PPropdef]
1029 for n
in n_propdefs
do
1030 assert n
isa PPropdef
1036 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1038 assert old_child
!= null
1039 for i
in [0.._n_propdefs
.length
[ do
1040 if _n_propdefs
[i
] == old_child
then
1041 if new_child
!= null then
1042 assert new_child
isa PPropdef
1043 _n_propdefs
[i
] = new_child
1044 new_child
.parent
= self
1046 _n_propdefs
.remove_at
(i
)
1053 redef meth visit_all
(v
: Visitor)
1055 for n
in _n_propdefs
do
1060 redef meth visit_all_reverse
(v
: Visitor)
1063 var i
= _n_propdefs
.length
1065 v
.visit
(_n_propdefs
[i
])
1071 redef class AConcreteClasskind
1072 redef meth n_kwclass
=(n
: TKwclass)
1080 private init empty_init
do end
1082 init init_aconcreteclasskind
(
1087 _n_kwclass
= n_kwclass
1088 if n_kwclass
!= null then
1089 n_kwclass
.parent
= self
1093 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1095 assert old_child
!= null
1096 if _n_kwclass
== old_child
then
1097 if new_child
!= null then
1098 new_child
.parent
= self
1099 assert new_child
isa TKwclass
1100 _n_kwclass
= new_child
1108 redef meth visit_all
(v
: Visitor)
1110 if _n_kwclass
!= null then
1115 redef meth visit_all_reverse
(v
: Visitor)
1117 if _n_kwclass
!= null then
1122 redef class AAbstractClasskind
1123 redef meth n_kwabstract
=(n
: TKwabstract)
1130 redef meth n_kwclass
=(n
: TKwclass)
1138 private init empty_init
do end
1140 init init_aabstractclasskind
(
1141 n_kwabstract
: TKwabstract ,
1146 _n_kwabstract
= n_kwabstract
1147 if n_kwabstract
!= null then
1148 n_kwabstract
.parent
= self
1150 _n_kwclass
= n_kwclass
1151 if n_kwclass
!= null then
1152 n_kwclass
.parent
= self
1156 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1158 assert old_child
!= null
1159 if _n_kwabstract
== old_child
then
1160 if new_child
!= null then
1161 new_child
.parent
= self
1162 assert new_child
isa TKwabstract
1163 _n_kwabstract
= new_child
1165 _n_kwabstract
= null
1169 if _n_kwclass
== old_child
then
1170 if new_child
!= null then
1171 new_child
.parent
= self
1172 assert new_child
isa TKwclass
1173 _n_kwclass
= new_child
1181 redef meth visit_all
(v
: Visitor)
1183 if _n_kwabstract
!= null then
1184 v
.visit
(_n_kwabstract
)
1186 if _n_kwclass
!= null then
1191 redef meth visit_all_reverse
(v
: Visitor)
1193 if _n_kwabstract
!= null then
1194 v
.visit
(_n_kwabstract
)
1196 if _n_kwclass
!= null then
1201 redef class AInterfaceClasskind
1202 redef meth n_kwinterface
=(n
: TKwinterface)
1210 private init empty_init
do end
1212 init init_ainterfaceclasskind
(
1213 n_kwinterface
: TKwinterface
1217 _n_kwinterface
= n_kwinterface
1218 if n_kwinterface
!= null then
1219 n_kwinterface
.parent
= self
1223 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1225 assert old_child
!= null
1226 if _n_kwinterface
== old_child
then
1227 if new_child
!= null then
1228 new_child
.parent
= self
1229 assert new_child
isa TKwinterface
1230 _n_kwinterface
= new_child
1232 _n_kwinterface
= null
1238 redef meth visit_all
(v
: Visitor)
1240 if _n_kwinterface
!= null then
1241 v
.visit
(_n_kwinterface
)
1245 redef meth visit_all_reverse
(v
: Visitor)
1247 if _n_kwinterface
!= null then
1248 v
.visit
(_n_kwinterface
)
1252 redef class AUniversalClasskind
1253 redef meth n_kwuniversal
=(n
: TKwuniversal)
1261 private init empty_init
do end
1263 init init_auniversalclasskind
(
1264 n_kwuniversal
: TKwuniversal
1268 _n_kwuniversal
= n_kwuniversal
1269 if n_kwuniversal
!= null then
1270 n_kwuniversal
.parent
= self
1274 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1276 assert old_child
!= null
1277 if _n_kwuniversal
== old_child
then
1278 if new_child
!= null then
1279 new_child
.parent
= self
1280 assert new_child
isa TKwuniversal
1281 _n_kwuniversal
= new_child
1283 _n_kwuniversal
= null
1289 redef meth visit_all
(v
: Visitor)
1291 if _n_kwuniversal
!= null then
1292 v
.visit
(_n_kwuniversal
)
1296 redef meth visit_all_reverse
(v
: Visitor)
1298 if _n_kwuniversal
!= null then
1299 v
.visit
(_n_kwuniversal
)
1303 redef class AFormaldef
1304 redef meth n_id
=(n
: TClassid)
1311 redef meth n_type
=(n
: PType)
1319 private init empty_init
do end
1321 init init_aformaldef
(
1328 if n_id
!= null then
1332 if n_type
!= null then
1333 n_type
.parent
= self
1337 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1339 assert old_child
!= null
1340 if _n_id
== old_child
then
1341 if new_child
!= null then
1342 new_child
.parent
= self
1343 assert new_child
isa TClassid
1350 if _n_type
== old_child
then
1351 if new_child
!= null then
1352 new_child
.parent
= self
1353 assert new_child
isa PType
1362 redef meth visit_all
(v
: Visitor)
1364 if _n_id
!= null then
1367 if _n_type
!= null then
1372 redef meth visit_all_reverse
(v
: Visitor)
1374 if _n_id
!= null then
1377 if _n_type
!= null then
1382 redef class ASuperclass
1383 redef meth n_kwspecial
=(n
: TKwspecial)
1390 redef meth n_type
=(n
: PType)
1398 private init empty_init
do end
1400 init init_asuperclass
(
1401 n_kwspecial
: TKwspecial ,
1406 _n_kwspecial
= n_kwspecial
1407 if n_kwspecial
!= null then
1408 n_kwspecial
.parent
= self
1411 if n_type
!= null then
1412 n_type
.parent
= self
1416 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1418 assert old_child
!= null
1419 if _n_kwspecial
== old_child
then
1420 if new_child
!= null then
1421 new_child
.parent
= self
1422 assert new_child
isa TKwspecial
1423 _n_kwspecial
= new_child
1429 if _n_type
== old_child
then
1430 if new_child
!= null then
1431 new_child
.parent
= self
1432 assert new_child
isa PType
1441 redef meth visit_all
(v
: Visitor)
1443 if _n_kwspecial
!= null then
1444 v
.visit
(_n_kwspecial
)
1446 if _n_type
!= null then
1451 redef meth visit_all_reverse
(v
: Visitor)
1453 if _n_kwspecial
!= null then
1454 v
.visit
(_n_kwspecial
)
1456 if _n_type
!= null then
1461 redef class AAttrPropdef
1462 redef meth n_doc
=(n
: PDoc)
1469 redef meth n_readable
=(n
: PAble)
1476 redef meth n_writable
=(n
: PAble)
1483 redef meth n_kwredef
=(n
: TKwredef)
1490 redef meth n_visibility
=(n
: PVisibility)
1497 redef meth n_kwattr
=(n
: TKwattr)
1504 redef meth n_kwvar
=(n
: TKwvar)
1511 redef meth n_id
=(n
: TAttrid)
1518 redef meth n_type
=(n
: PType)
1525 redef meth n_expr
=(n
: PExpr)
1533 private init empty_init
do end
1535 init init_aattrpropdef
(
1539 n_kwredef
: TKwredef ,
1540 n_visibility
: PVisibility ,
1550 if n_doc
!= null then
1553 _n_readable
= n_readable
1554 if n_readable
!= null then
1555 n_readable
.parent
= self
1557 _n_writable
= n_writable
1558 if n_writable
!= null then
1559 n_writable
.parent
= self
1561 _n_kwredef
= n_kwredef
1562 if n_kwredef
!= null then
1563 n_kwredef
.parent
= self
1565 _n_visibility
= n_visibility
1566 if n_visibility
!= null then
1567 n_visibility
.parent
= self
1569 _n_kwattr
= n_kwattr
1570 if n_kwattr
!= null then
1571 n_kwattr
.parent
= self
1574 if n_kwvar
!= null then
1575 n_kwvar
.parent
= self
1578 if n_id
!= null then
1582 if n_type
!= null then
1583 n_type
.parent
= self
1586 if n_expr
!= null then
1587 n_expr
.parent
= self
1591 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1593 assert old_child
!= null
1594 if _n_doc
== old_child
then
1595 if new_child
!= null then
1596 new_child
.parent
= self
1597 assert new_child
isa PDoc
1604 if _n_readable
== old_child
then
1605 if new_child
!= null then
1606 new_child
.parent
= self
1607 assert new_child
isa PAble
1608 _n_readable
= new_child
1614 if _n_writable
== old_child
then
1615 if new_child
!= null then
1616 new_child
.parent
= self
1617 assert new_child
isa PAble
1618 _n_writable
= new_child
1624 if _n_kwredef
== old_child
then
1625 if new_child
!= null then
1626 new_child
.parent
= self
1627 assert new_child
isa TKwredef
1628 _n_kwredef
= new_child
1634 if _n_visibility
== old_child
then
1635 if new_child
!= null then
1636 new_child
.parent
= self
1637 assert new_child
isa PVisibility
1638 _n_visibility
= new_child
1640 _n_visibility
= null
1644 if _n_kwattr
== old_child
then
1645 if new_child
!= null then
1646 new_child
.parent
= self
1647 assert new_child
isa TKwattr
1648 _n_kwattr
= new_child
1654 if _n_kwvar
== old_child
then
1655 if new_child
!= null then
1656 new_child
.parent
= self
1657 assert new_child
isa TKwvar
1658 _n_kwvar
= new_child
1664 if _n_id
== old_child
then
1665 if new_child
!= null then
1666 new_child
.parent
= self
1667 assert new_child
isa TAttrid
1674 if _n_type
== old_child
then
1675 if new_child
!= null then
1676 new_child
.parent
= self
1677 assert new_child
isa PType
1684 if _n_expr
== old_child
then
1685 if new_child
!= null then
1686 new_child
.parent
= self
1687 assert new_child
isa PExpr
1696 redef meth visit_all
(v
: Visitor)
1698 if _n_doc
!= null then
1701 if _n_readable
!= null then
1702 v
.visit
(_n_readable
)
1704 if _n_writable
!= null then
1705 v
.visit
(_n_writable
)
1707 if _n_kwredef
!= null then
1710 if _n_visibility
!= null then
1711 v
.visit
(_n_visibility
)
1713 if _n_kwattr
!= null then
1716 if _n_kwvar
!= null then
1719 if _n_id
!= null then
1722 if _n_type
!= null then
1725 if _n_expr
!= null then
1730 redef meth visit_all_reverse
(v
: Visitor)
1732 if _n_doc
!= null then
1735 if _n_readable
!= null then
1736 v
.visit
(_n_readable
)
1738 if _n_writable
!= null then
1739 v
.visit
(_n_writable
)
1741 if _n_kwredef
!= null then
1744 if _n_visibility
!= null then
1745 v
.visit
(_n_visibility
)
1747 if _n_kwattr
!= null then
1750 if _n_kwvar
!= null then
1753 if _n_id
!= null then
1756 if _n_type
!= null then
1759 if _n_expr
!= null then
1764 redef class AMethPropdef
1765 redef meth n_doc
=(n
: PDoc)
1772 redef meth n_kwredef
=(n
: TKwredef)
1779 redef meth n_visibility
=(n
: PVisibility)
1786 redef meth n_methid
=(n
: PMethid)
1793 redef meth n_signature
=(n
: PSignature)
1801 private init empty_init
do end
1803 init init_amethpropdef
(
1805 n_kwredef
: TKwredef ,
1806 n_visibility
: PVisibility ,
1808 n_signature
: PSignature
1813 if n_doc
!= null then
1816 _n_kwredef
= n_kwredef
1817 if n_kwredef
!= null then
1818 n_kwredef
.parent
= self
1820 _n_visibility
= n_visibility
1821 if n_visibility
!= null then
1822 n_visibility
.parent
= self
1824 _n_methid
= n_methid
1825 if n_methid
!= null then
1826 n_methid
.parent
= self
1828 _n_signature
= n_signature
1829 if n_signature
!= null then
1830 n_signature
.parent
= self
1834 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
1836 assert old_child
!= null
1837 if _n_doc
== old_child
then
1838 if new_child
!= null then
1839 new_child
.parent
= self
1840 assert new_child
isa PDoc
1847 if _n_kwredef
== old_child
then
1848 if new_child
!= null then
1849 new_child
.parent
= self
1850 assert new_child
isa TKwredef
1851 _n_kwredef
= new_child
1857 if _n_visibility
== old_child
then
1858 if new_child
!= null then
1859 new_child
.parent
= self
1860 assert new_child
isa PVisibility
1861 _n_visibility
= new_child
1863 _n_visibility
= null
1867 if _n_methid
== old_child
then
1868 if new_child
!= null then
1869 new_child
.parent
= self
1870 assert new_child
isa PMethid
1871 _n_methid
= new_child
1877 if _n_signature
== old_child
then
1878 if new_child
!= null then
1879 new_child
.parent
= self
1880 assert new_child
isa PSignature
1881 _n_signature
= new_child
1889 redef meth visit_all
(v
: Visitor)
1891 if _n_doc
!= null then
1894 if _n_kwredef
!= null then
1897 if _n_visibility
!= null then
1898 v
.visit
(_n_visibility
)
1900 if _n_methid
!= null then
1903 if _n_signature
!= null then
1904 v
.visit
(_n_signature
)
1908 redef meth visit_all_reverse
(v
: Visitor)
1910 if _n_doc
!= null then
1913 if _n_kwredef
!= null then
1916 if _n_visibility
!= null then
1917 v
.visit
(_n_visibility
)
1919 if _n_methid
!= null then
1922 if _n_signature
!= null then
1923 v
.visit
(_n_signature
)
1927 redef class ADeferredMethPropdef
1928 redef meth n_doc
=(n
: PDoc)
1935 redef meth n_kwredef
=(n
: TKwredef)
1942 redef meth n_visibility
=(n
: PVisibility)
1949 redef meth n_kwmeth
=(n
: TKwmeth)
1956 redef meth n_methid
=(n
: PMethid)
1963 redef meth n_signature
=(n
: PSignature)
1971 private init empty_init
do end
1973 init init_adeferredmethpropdef
(
1975 n_kwredef
: TKwredef ,
1976 n_visibility
: PVisibility ,
1979 n_signature
: PSignature
1984 if n_doc
!= null then
1987 _n_kwredef
= n_kwredef
1988 if n_kwredef
!= null then
1989 n_kwredef
.parent
= self
1991 _n_visibility
= n_visibility
1992 if n_visibility
!= null then
1993 n_visibility
.parent
= self
1995 _n_kwmeth
= n_kwmeth
1996 if n_kwmeth
!= null then
1997 n_kwmeth
.parent
= self
1999 _n_methid
= n_methid
2000 if n_methid
!= null then
2001 n_methid
.parent
= self
2003 _n_signature
= n_signature
2004 if n_signature
!= null then
2005 n_signature
.parent
= self
2009 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2011 assert old_child
!= null
2012 if _n_doc
== old_child
then
2013 if new_child
!= null then
2014 new_child
.parent
= self
2015 assert new_child
isa PDoc
2022 if _n_kwredef
== old_child
then
2023 if new_child
!= null then
2024 new_child
.parent
= self
2025 assert new_child
isa TKwredef
2026 _n_kwredef
= new_child
2032 if _n_visibility
== old_child
then
2033 if new_child
!= null then
2034 new_child
.parent
= self
2035 assert new_child
isa PVisibility
2036 _n_visibility
= new_child
2038 _n_visibility
= null
2042 if _n_kwmeth
== old_child
then
2043 if new_child
!= null then
2044 new_child
.parent
= self
2045 assert new_child
isa TKwmeth
2046 _n_kwmeth
= new_child
2052 if _n_methid
== old_child
then
2053 if new_child
!= null then
2054 new_child
.parent
= self
2055 assert new_child
isa PMethid
2056 _n_methid
= new_child
2062 if _n_signature
== old_child
then
2063 if new_child
!= null then
2064 new_child
.parent
= self
2065 assert new_child
isa PSignature
2066 _n_signature
= new_child
2074 redef meth visit_all
(v
: Visitor)
2076 if _n_doc
!= null then
2079 if _n_kwredef
!= null then
2082 if _n_visibility
!= null then
2083 v
.visit
(_n_visibility
)
2085 if _n_kwmeth
!= null then
2088 if _n_methid
!= null then
2091 if _n_signature
!= null then
2092 v
.visit
(_n_signature
)
2096 redef meth visit_all_reverse
(v
: Visitor)
2098 if _n_doc
!= null then
2101 if _n_kwredef
!= null then
2104 if _n_visibility
!= null then
2105 v
.visit
(_n_visibility
)
2107 if _n_kwmeth
!= null then
2110 if _n_methid
!= null then
2113 if _n_signature
!= null then
2114 v
.visit
(_n_signature
)
2118 redef class AInternMethPropdef
2119 redef meth n_doc
=(n
: PDoc)
2126 redef meth n_kwredef
=(n
: TKwredef)
2133 redef meth n_visibility
=(n
: PVisibility)
2140 redef meth n_kwmeth
=(n
: TKwmeth)
2147 redef meth n_methid
=(n
: PMethid)
2154 redef meth n_signature
=(n
: PSignature)
2162 private init empty_init
do end
2164 init init_ainternmethpropdef
(
2166 n_kwredef
: TKwredef ,
2167 n_visibility
: PVisibility ,
2170 n_signature
: PSignature
2175 if n_doc
!= null then
2178 _n_kwredef
= n_kwredef
2179 if n_kwredef
!= null then
2180 n_kwredef
.parent
= self
2182 _n_visibility
= n_visibility
2183 if n_visibility
!= null then
2184 n_visibility
.parent
= self
2186 _n_kwmeth
= n_kwmeth
2187 if n_kwmeth
!= null then
2188 n_kwmeth
.parent
= self
2190 _n_methid
= n_methid
2191 if n_methid
!= null then
2192 n_methid
.parent
= self
2194 _n_signature
= n_signature
2195 if n_signature
!= null then
2196 n_signature
.parent
= self
2200 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2202 assert old_child
!= null
2203 if _n_doc
== old_child
then
2204 if new_child
!= null then
2205 new_child
.parent
= self
2206 assert new_child
isa PDoc
2213 if _n_kwredef
== old_child
then
2214 if new_child
!= null then
2215 new_child
.parent
= self
2216 assert new_child
isa TKwredef
2217 _n_kwredef
= new_child
2223 if _n_visibility
== old_child
then
2224 if new_child
!= null then
2225 new_child
.parent
= self
2226 assert new_child
isa PVisibility
2227 _n_visibility
= new_child
2229 _n_visibility
= null
2233 if _n_kwmeth
== old_child
then
2234 if new_child
!= null then
2235 new_child
.parent
= self
2236 assert new_child
isa TKwmeth
2237 _n_kwmeth
= new_child
2243 if _n_methid
== old_child
then
2244 if new_child
!= null then
2245 new_child
.parent
= self
2246 assert new_child
isa PMethid
2247 _n_methid
= new_child
2253 if _n_signature
== old_child
then
2254 if new_child
!= null then
2255 new_child
.parent
= self
2256 assert new_child
isa PSignature
2257 _n_signature
= new_child
2265 redef meth visit_all
(v
: Visitor)
2267 if _n_doc
!= null then
2270 if _n_kwredef
!= null then
2273 if _n_visibility
!= null then
2274 v
.visit
(_n_visibility
)
2276 if _n_kwmeth
!= null then
2279 if _n_methid
!= null then
2282 if _n_signature
!= null then
2283 v
.visit
(_n_signature
)
2287 redef meth visit_all_reverse
(v
: Visitor)
2289 if _n_doc
!= null then
2292 if _n_kwredef
!= null then
2295 if _n_visibility
!= null then
2296 v
.visit
(_n_visibility
)
2298 if _n_kwmeth
!= null then
2301 if _n_methid
!= null then
2304 if _n_signature
!= null then
2305 v
.visit
(_n_signature
)
2309 redef class AExternMethPropdef
2310 redef meth n_doc
=(n
: PDoc)
2317 redef meth n_kwredef
=(n
: TKwredef)
2324 redef meth n_visibility
=(n
: PVisibility)
2331 redef meth n_kwmeth
=(n
: TKwmeth)
2338 redef meth n_methid
=(n
: PMethid)
2345 redef meth n_signature
=(n
: PSignature)
2352 redef meth n_extern
=(n
: TString)
2360 private init empty_init
do end
2362 init init_aexternmethpropdef
(
2364 n_kwredef
: TKwredef ,
2365 n_visibility
: PVisibility ,
2368 n_signature
: PSignature ,
2374 if n_doc
!= null then
2377 _n_kwredef
= n_kwredef
2378 if n_kwredef
!= null then
2379 n_kwredef
.parent
= self
2381 _n_visibility
= n_visibility
2382 if n_visibility
!= null then
2383 n_visibility
.parent
= self
2385 _n_kwmeth
= n_kwmeth
2386 if n_kwmeth
!= null then
2387 n_kwmeth
.parent
= self
2389 _n_methid
= n_methid
2390 if n_methid
!= null then
2391 n_methid
.parent
= self
2393 _n_signature
= n_signature
2394 if n_signature
!= null then
2395 n_signature
.parent
= self
2397 _n_extern
= n_extern
2398 if n_extern
!= null then
2399 n_extern
.parent
= self
2403 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2405 assert old_child
!= null
2406 if _n_doc
== old_child
then
2407 if new_child
!= null then
2408 new_child
.parent
= self
2409 assert new_child
isa PDoc
2416 if _n_kwredef
== old_child
then
2417 if new_child
!= null then
2418 new_child
.parent
= self
2419 assert new_child
isa TKwredef
2420 _n_kwredef
= new_child
2426 if _n_visibility
== old_child
then
2427 if new_child
!= null then
2428 new_child
.parent
= self
2429 assert new_child
isa PVisibility
2430 _n_visibility
= new_child
2432 _n_visibility
= null
2436 if _n_kwmeth
== old_child
then
2437 if new_child
!= null then
2438 new_child
.parent
= self
2439 assert new_child
isa TKwmeth
2440 _n_kwmeth
= new_child
2446 if _n_methid
== old_child
then
2447 if new_child
!= null then
2448 new_child
.parent
= self
2449 assert new_child
isa PMethid
2450 _n_methid
= new_child
2456 if _n_signature
== old_child
then
2457 if new_child
!= null then
2458 new_child
.parent
= self
2459 assert new_child
isa PSignature
2460 _n_signature
= new_child
2466 if _n_extern
== old_child
then
2467 if new_child
!= null then
2468 new_child
.parent
= self
2469 assert new_child
isa TString
2470 _n_extern
= new_child
2478 redef meth visit_all
(v
: Visitor)
2480 if _n_doc
!= null then
2483 if _n_kwredef
!= null then
2486 if _n_visibility
!= null then
2487 v
.visit
(_n_visibility
)
2489 if _n_kwmeth
!= null then
2492 if _n_methid
!= null then
2495 if _n_signature
!= null then
2496 v
.visit
(_n_signature
)
2498 if _n_extern
!= null then
2503 redef meth visit_all_reverse
(v
: Visitor)
2505 if _n_doc
!= null then
2508 if _n_kwredef
!= null then
2511 if _n_visibility
!= null then
2512 v
.visit
(_n_visibility
)
2514 if _n_kwmeth
!= null then
2517 if _n_methid
!= null then
2520 if _n_signature
!= null then
2521 v
.visit
(_n_signature
)
2523 if _n_extern
!= null then
2528 redef class AConcreteMethPropdef
2529 redef meth n_doc
=(n
: PDoc)
2536 redef meth n_kwredef
=(n
: TKwredef)
2543 redef meth n_visibility
=(n
: PVisibility)
2550 redef meth n_kwmeth
=(n
: TKwmeth)
2557 redef meth n_methid
=(n
: PMethid)
2564 redef meth n_signature
=(n
: PSignature)
2571 redef meth n_block
=(n
: PExpr)
2579 private init empty_init
do end
2581 init init_aconcretemethpropdef
(
2583 n_kwredef
: TKwredef ,
2584 n_visibility
: PVisibility ,
2587 n_signature
: PSignature ,
2593 if n_doc
!= null then
2596 _n_kwredef
= n_kwredef
2597 if n_kwredef
!= null then
2598 n_kwredef
.parent
= self
2600 _n_visibility
= n_visibility
2601 if n_visibility
!= null then
2602 n_visibility
.parent
= self
2604 _n_kwmeth
= n_kwmeth
2605 if n_kwmeth
!= null then
2606 n_kwmeth
.parent
= self
2608 _n_methid
= n_methid
2609 if n_methid
!= null then
2610 n_methid
.parent
= self
2612 _n_signature
= n_signature
2613 if n_signature
!= null then
2614 n_signature
.parent
= self
2617 if n_block
!= null then
2618 n_block
.parent
= self
2622 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2624 assert old_child
!= null
2625 if _n_doc
== old_child
then
2626 if new_child
!= null then
2627 new_child
.parent
= self
2628 assert new_child
isa PDoc
2635 if _n_kwredef
== old_child
then
2636 if new_child
!= null then
2637 new_child
.parent
= self
2638 assert new_child
isa TKwredef
2639 _n_kwredef
= new_child
2645 if _n_visibility
== old_child
then
2646 if new_child
!= null then
2647 new_child
.parent
= self
2648 assert new_child
isa PVisibility
2649 _n_visibility
= new_child
2651 _n_visibility
= null
2655 if _n_kwmeth
== old_child
then
2656 if new_child
!= null then
2657 new_child
.parent
= self
2658 assert new_child
isa TKwmeth
2659 _n_kwmeth
= new_child
2665 if _n_methid
== old_child
then
2666 if new_child
!= null then
2667 new_child
.parent
= self
2668 assert new_child
isa PMethid
2669 _n_methid
= new_child
2675 if _n_signature
== old_child
then
2676 if new_child
!= null then
2677 new_child
.parent
= self
2678 assert new_child
isa PSignature
2679 _n_signature
= new_child
2685 if _n_block
== old_child
then
2686 if new_child
!= null then
2687 new_child
.parent
= self
2688 assert new_child
isa PExpr
2689 _n_block
= new_child
2697 redef meth visit_all
(v
: Visitor)
2699 if _n_doc
!= null then
2702 if _n_kwredef
!= null then
2705 if _n_visibility
!= null then
2706 v
.visit
(_n_visibility
)
2708 if _n_kwmeth
!= null then
2711 if _n_methid
!= null then
2714 if _n_signature
!= null then
2715 v
.visit
(_n_signature
)
2717 if _n_block
!= null then
2722 redef meth visit_all_reverse
(v
: Visitor)
2724 if _n_doc
!= null then
2727 if _n_kwredef
!= null then
2730 if _n_visibility
!= null then
2731 v
.visit
(_n_visibility
)
2733 if _n_kwmeth
!= null then
2736 if _n_methid
!= null then
2739 if _n_signature
!= null then
2740 v
.visit
(_n_signature
)
2742 if _n_block
!= null then
2747 redef class AConcreteInitPropdef
2748 redef meth n_doc
=(n
: PDoc)
2755 redef meth n_kwredef
=(n
: TKwredef)
2762 redef meth n_visibility
=(n
: PVisibility)
2769 redef meth n_kwinit
=(n
: TKwinit)
2776 redef meth n_methid
=(n
: PMethid)
2783 redef meth n_signature
=(n
: PSignature)
2790 redef meth n_block
=(n
: PExpr)
2798 private init empty_init
do end
2800 init init_aconcreteinitpropdef
(
2802 n_kwredef
: TKwredef ,
2803 n_visibility
: PVisibility ,
2806 n_signature
: PSignature ,
2812 if n_doc
!= null then
2815 _n_kwredef
= n_kwredef
2816 if n_kwredef
!= null then
2817 n_kwredef
.parent
= self
2819 _n_visibility
= n_visibility
2820 if n_visibility
!= null then
2821 n_visibility
.parent
= self
2823 _n_kwinit
= n_kwinit
2824 if n_kwinit
!= null then
2825 n_kwinit
.parent
= self
2827 _n_methid
= n_methid
2828 if n_methid
!= null then
2829 n_methid
.parent
= self
2831 _n_signature
= n_signature
2832 if n_signature
!= null then
2833 n_signature
.parent
= self
2836 if n_block
!= null then
2837 n_block
.parent
= self
2841 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
2843 assert old_child
!= null
2844 if _n_doc
== old_child
then
2845 if new_child
!= null then
2846 new_child
.parent
= self
2847 assert new_child
isa PDoc
2854 if _n_kwredef
== old_child
then
2855 if new_child
!= null then
2856 new_child
.parent
= self
2857 assert new_child
isa TKwredef
2858 _n_kwredef
= new_child
2864 if _n_visibility
== old_child
then
2865 if new_child
!= null then
2866 new_child
.parent
= self
2867 assert new_child
isa PVisibility
2868 _n_visibility
= new_child
2870 _n_visibility
= null
2874 if _n_kwinit
== old_child
then
2875 if new_child
!= null then
2876 new_child
.parent
= self
2877 assert new_child
isa TKwinit
2878 _n_kwinit
= new_child
2884 if _n_methid
== old_child
then
2885 if new_child
!= null then
2886 new_child
.parent
= self
2887 assert new_child
isa PMethid
2888 _n_methid
= new_child
2894 if _n_signature
== old_child
then
2895 if new_child
!= null then
2896 new_child
.parent
= self
2897 assert new_child
isa PSignature
2898 _n_signature
= new_child
2904 if _n_block
== old_child
then
2905 if new_child
!= null then
2906 new_child
.parent
= self
2907 assert new_child
isa PExpr
2908 _n_block
= new_child
2916 redef meth visit_all
(v
: Visitor)
2918 if _n_doc
!= null then
2921 if _n_kwredef
!= null then
2924 if _n_visibility
!= null then
2925 v
.visit
(_n_visibility
)
2927 if _n_kwinit
!= null then
2930 if _n_methid
!= null then
2933 if _n_signature
!= null then
2934 v
.visit
(_n_signature
)
2936 if _n_block
!= null then
2941 redef meth visit_all_reverse
(v
: Visitor)
2943 if _n_doc
!= null then
2946 if _n_kwredef
!= null then
2949 if _n_visibility
!= null then
2950 v
.visit
(_n_visibility
)
2952 if _n_kwinit
!= null then
2955 if _n_methid
!= null then
2958 if _n_signature
!= null then
2959 v
.visit
(_n_signature
)
2961 if _n_block
!= null then
2966 redef class AMainMethPropdef
2967 redef meth n_kwredef
=(n
: TKwredef)
2974 redef meth n_block
=(n
: PExpr)
2982 private init empty_init
do end
2984 init init_amainmethpropdef
(
2985 n_kwredef
: TKwredef ,
2990 _n_kwredef
= n_kwredef
2991 if n_kwredef
!= null then
2992 n_kwredef
.parent
= self
2995 if n_block
!= null then
2996 n_block
.parent
= self
3000 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3002 assert old_child
!= null
3003 if _n_kwredef
== old_child
then
3004 if new_child
!= null then
3005 new_child
.parent
= self
3006 assert new_child
isa TKwredef
3007 _n_kwredef
= new_child
3013 if _n_block
== old_child
then
3014 if new_child
!= null then
3015 new_child
.parent
= self
3016 assert new_child
isa PExpr
3017 _n_block
= new_child
3025 redef meth visit_all
(v
: Visitor)
3027 if _n_kwredef
!= null then
3030 if _n_block
!= null then
3035 redef meth visit_all_reverse
(v
: Visitor)
3037 if _n_kwredef
!= null then
3040 if _n_block
!= null then
3045 redef class ATypePropdef
3046 redef meth n_doc
=(n
: PDoc)
3053 redef meth n_kwredef
=(n
: TKwredef)
3060 redef meth n_visibility
=(n
: PVisibility)
3067 redef meth n_kwtype
=(n
: TKwtype)
3074 redef meth n_id
=(n
: TClassid)
3081 redef meth n_type
=(n
: PType)
3089 private init empty_init
do end
3091 init init_atypepropdef
(
3093 n_kwredef
: TKwredef ,
3094 n_visibility
: PVisibility ,
3102 if n_doc
!= null then
3105 _n_kwredef
= n_kwredef
3106 if n_kwredef
!= null then
3107 n_kwredef
.parent
= self
3109 _n_visibility
= n_visibility
3110 if n_visibility
!= null then
3111 n_visibility
.parent
= self
3113 _n_kwtype
= n_kwtype
3114 if n_kwtype
!= null then
3115 n_kwtype
.parent
= self
3118 if n_id
!= null then
3122 if n_type
!= null then
3123 n_type
.parent
= self
3127 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3129 assert old_child
!= null
3130 if _n_doc
== old_child
then
3131 if new_child
!= null then
3132 new_child
.parent
= self
3133 assert new_child
isa PDoc
3140 if _n_kwredef
== old_child
then
3141 if new_child
!= null then
3142 new_child
.parent
= self
3143 assert new_child
isa TKwredef
3144 _n_kwredef
= new_child
3150 if _n_visibility
== old_child
then
3151 if new_child
!= null then
3152 new_child
.parent
= self
3153 assert new_child
isa PVisibility
3154 _n_visibility
= new_child
3156 _n_visibility
= null
3160 if _n_kwtype
== old_child
then
3161 if new_child
!= null then
3162 new_child
.parent
= self
3163 assert new_child
isa TKwtype
3164 _n_kwtype
= new_child
3170 if _n_id
== old_child
then
3171 if new_child
!= null then
3172 new_child
.parent
= self
3173 assert new_child
isa TClassid
3180 if _n_type
== old_child
then
3181 if new_child
!= null then
3182 new_child
.parent
= self
3183 assert new_child
isa PType
3192 redef meth visit_all
(v
: Visitor)
3194 if _n_doc
!= null then
3197 if _n_kwredef
!= null then
3200 if _n_visibility
!= null then
3201 v
.visit
(_n_visibility
)
3203 if _n_kwtype
!= null then
3206 if _n_id
!= null then
3209 if _n_type
!= null then
3214 redef meth visit_all_reverse
(v
: Visitor)
3216 if _n_doc
!= null then
3219 if _n_kwredef
!= null then
3222 if _n_visibility
!= null then
3223 v
.visit
(_n_visibility
)
3225 if _n_kwtype
!= null then
3228 if _n_id
!= null then
3231 if _n_type
!= null then
3236 redef class AReadAble
3237 redef meth n_kwredef
=(n
: TKwredef)
3244 redef meth n_kwreadable
=(n
: TKwreadable)
3252 private init empty_init
do end
3254 init init_areadable
(
3255 n_kwredef
: TKwredef ,
3256 n_kwreadable
: TKwreadable
3260 _n_kwredef
= n_kwredef
3261 if n_kwredef
!= null then
3262 n_kwredef
.parent
= self
3264 _n_kwreadable
= n_kwreadable
3265 if n_kwreadable
!= null then
3266 n_kwreadable
.parent
= self
3270 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3272 assert old_child
!= null
3273 if _n_kwredef
== old_child
then
3274 if new_child
!= null then
3275 new_child
.parent
= self
3276 assert new_child
isa TKwredef
3277 _n_kwredef
= new_child
3283 if _n_kwreadable
== old_child
then
3284 if new_child
!= null then
3285 new_child
.parent
= self
3286 assert new_child
isa TKwreadable
3287 _n_kwreadable
= new_child
3289 _n_kwreadable
= null
3295 redef meth visit_all
(v
: Visitor)
3297 if _n_kwredef
!= null then
3300 if _n_kwreadable
!= null then
3301 v
.visit
(_n_kwreadable
)
3305 redef meth visit_all_reverse
(v
: Visitor)
3307 if _n_kwredef
!= null then
3310 if _n_kwreadable
!= null then
3311 v
.visit
(_n_kwreadable
)
3315 redef class AWriteAble
3316 redef meth n_kwredef
=(n
: TKwredef)
3323 redef meth n_kwwritable
=(n
: TKwwritable)
3331 private init empty_init
do end
3333 init init_awriteable
(
3334 n_kwredef
: TKwredef ,
3335 n_kwwritable
: TKwwritable
3339 _n_kwredef
= n_kwredef
3340 if n_kwredef
!= null then
3341 n_kwredef
.parent
= self
3343 _n_kwwritable
= n_kwwritable
3344 if n_kwwritable
!= null then
3345 n_kwwritable
.parent
= self
3349 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3351 assert old_child
!= null
3352 if _n_kwredef
== old_child
then
3353 if new_child
!= null then
3354 new_child
.parent
= self
3355 assert new_child
isa TKwredef
3356 _n_kwredef
= new_child
3362 if _n_kwwritable
== old_child
then
3363 if new_child
!= null then
3364 new_child
.parent
= self
3365 assert new_child
isa TKwwritable
3366 _n_kwwritable
= new_child
3368 _n_kwwritable
= null
3374 redef meth visit_all
(v
: Visitor)
3376 if _n_kwredef
!= null then
3379 if _n_kwwritable
!= null then
3380 v
.visit
(_n_kwwritable
)
3384 redef meth visit_all_reverse
(v
: Visitor)
3386 if _n_kwredef
!= null then
3389 if _n_kwwritable
!= null then
3390 v
.visit
(_n_kwwritable
)
3394 redef class AIdMethid
3395 redef meth n_id
=(n
: TId)
3403 private init empty_init
do end
3405 init init_aidmethid
(
3411 if n_id
!= null then
3416 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3418 assert old_child
!= null
3419 if _n_id
== old_child
then
3420 if new_child
!= null then
3421 new_child
.parent
= self
3422 assert new_child
isa TId
3431 redef meth visit_all
(v
: Visitor)
3433 if _n_id
!= null then
3438 redef meth visit_all_reverse
(v
: Visitor)
3440 if _n_id
!= null then
3445 redef class APlusMethid
3446 redef meth n_plus
=(n
: TPlus)
3454 private init empty_init
do end
3456 init init_aplusmethid
(
3462 if n_plus
!= null then
3463 n_plus
.parent
= self
3467 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3469 assert old_child
!= null
3470 if _n_plus
== old_child
then
3471 if new_child
!= null then
3472 new_child
.parent
= self
3473 assert new_child
isa TPlus
3482 redef meth visit_all
(v
: Visitor)
3484 if _n_plus
!= null then
3489 redef meth visit_all_reverse
(v
: Visitor)
3491 if _n_plus
!= null then
3496 redef class AMinusMethid
3497 redef meth n_minus
=(n
: TMinus)
3505 private init empty_init
do end
3507 init init_aminusmethid
(
3513 if n_minus
!= null then
3514 n_minus
.parent
= self
3518 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3520 assert old_child
!= null
3521 if _n_minus
== old_child
then
3522 if new_child
!= null then
3523 new_child
.parent
= self
3524 assert new_child
isa TMinus
3525 _n_minus
= new_child
3533 redef meth visit_all
(v
: Visitor)
3535 if _n_minus
!= null then
3540 redef meth visit_all_reverse
(v
: Visitor)
3542 if _n_minus
!= null then
3547 redef class AStarMethid
3548 redef meth n_star
=(n
: TStar)
3556 private init empty_init
do end
3558 init init_astarmethid
(
3564 if n_star
!= null then
3565 n_star
.parent
= self
3569 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3571 assert old_child
!= null
3572 if _n_star
== old_child
then
3573 if new_child
!= null then
3574 new_child
.parent
= self
3575 assert new_child
isa TStar
3584 redef meth visit_all
(v
: Visitor)
3586 if _n_star
!= null then
3591 redef meth visit_all_reverse
(v
: Visitor)
3593 if _n_star
!= null then
3598 redef class ASlashMethid
3599 redef meth n_slash
=(n
: TSlash)
3607 private init empty_init
do end
3609 init init_aslashmethid
(
3615 if n_slash
!= null then
3616 n_slash
.parent
= self
3620 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3622 assert old_child
!= null
3623 if _n_slash
== old_child
then
3624 if new_child
!= null then
3625 new_child
.parent
= self
3626 assert new_child
isa TSlash
3627 _n_slash
= new_child
3635 redef meth visit_all
(v
: Visitor)
3637 if _n_slash
!= null then
3642 redef meth visit_all_reverse
(v
: Visitor)
3644 if _n_slash
!= null then
3649 redef class APercentMethid
3650 redef meth n_percent
=(n
: TPercent)
3658 private init empty_init
do end
3660 init init_apercentmethid
(
3665 _n_percent
= n_percent
3666 if n_percent
!= null then
3667 n_percent
.parent
= self
3671 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3673 assert old_child
!= null
3674 if _n_percent
== old_child
then
3675 if new_child
!= null then
3676 new_child
.parent
= self
3677 assert new_child
isa TPercent
3678 _n_percent
= new_child
3686 redef meth visit_all
(v
: Visitor)
3688 if _n_percent
!= null then
3693 redef meth visit_all_reverse
(v
: Visitor)
3695 if _n_percent
!= null then
3700 redef class AEqMethid
3701 redef meth n_eq
=(n
: TEq)
3709 private init empty_init
do end
3711 init init_aeqmethid
(
3717 if n_eq
!= null then
3722 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3724 assert old_child
!= null
3725 if _n_eq
== old_child
then
3726 if new_child
!= null then
3727 new_child
.parent
= self
3728 assert new_child
isa TEq
3737 redef meth visit_all
(v
: Visitor)
3739 if _n_eq
!= null then
3744 redef meth visit_all_reverse
(v
: Visitor)
3746 if _n_eq
!= null then
3751 redef class ANeMethid
3752 redef meth n_ne
=(n
: TNe)
3760 private init empty_init
do end
3762 init init_anemethid
(
3768 if n_ne
!= null then
3773 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3775 assert old_child
!= null
3776 if _n_ne
== old_child
then
3777 if new_child
!= null then
3778 new_child
.parent
= self
3779 assert new_child
isa TNe
3788 redef meth visit_all
(v
: Visitor)
3790 if _n_ne
!= null then
3795 redef meth visit_all_reverse
(v
: Visitor)
3797 if _n_ne
!= null then
3802 redef class ALeMethid
3803 redef meth n_le
=(n
: TLe)
3811 private init empty_init
do end
3813 init init_alemethid
(
3819 if n_le
!= null then
3824 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3826 assert old_child
!= null
3827 if _n_le
== old_child
then
3828 if new_child
!= null then
3829 new_child
.parent
= self
3830 assert new_child
isa TLe
3839 redef meth visit_all
(v
: Visitor)
3841 if _n_le
!= null then
3846 redef meth visit_all_reverse
(v
: Visitor)
3848 if _n_le
!= null then
3853 redef class AGeMethid
3854 redef meth n_ge
=(n
: TGe)
3862 private init empty_init
do end
3864 init init_agemethid
(
3870 if n_ge
!= null then
3875 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3877 assert old_child
!= null
3878 if _n_ge
== old_child
then
3879 if new_child
!= null then
3880 new_child
.parent
= self
3881 assert new_child
isa TGe
3890 redef meth visit_all
(v
: Visitor)
3892 if _n_ge
!= null then
3897 redef meth visit_all_reverse
(v
: Visitor)
3899 if _n_ge
!= null then
3904 redef class ALtMethid
3905 redef meth n_lt
=(n
: TLt)
3913 private init empty_init
do end
3915 init init_altmethid
(
3921 if n_lt
!= null then
3926 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3928 assert old_child
!= null
3929 if _n_lt
== old_child
then
3930 if new_child
!= null then
3931 new_child
.parent
= self
3932 assert new_child
isa TLt
3941 redef meth visit_all
(v
: Visitor)
3943 if _n_lt
!= null then
3948 redef meth visit_all_reverse
(v
: Visitor)
3950 if _n_lt
!= null then
3955 redef class AGtMethid
3956 redef meth n_gt
=(n
: TGt)
3964 private init empty_init
do end
3966 init init_agtmethid
(
3972 if n_gt
!= null then
3977 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
3979 assert old_child
!= null
3980 if _n_gt
== old_child
then
3981 if new_child
!= null then
3982 new_child
.parent
= self
3983 assert new_child
isa TGt
3992 redef meth visit_all
(v
: Visitor)
3994 if _n_gt
!= null then
3999 redef meth visit_all_reverse
(v
: Visitor)
4001 if _n_gt
!= null then
4006 redef class ABraMethid
4007 redef meth n_obra
=(n
: TObra)
4014 redef meth n_cbra
=(n
: TCbra)
4022 private init empty_init
do end
4024 init init_abramethid
(
4031 if n_obra
!= null then
4032 n_obra
.parent
= self
4035 if n_cbra
!= null then
4036 n_cbra
.parent
= self
4040 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4042 assert old_child
!= null
4043 if _n_obra
== old_child
then
4044 if new_child
!= null then
4045 new_child
.parent
= self
4046 assert new_child
isa TObra
4053 if _n_cbra
== old_child
then
4054 if new_child
!= null then
4055 new_child
.parent
= self
4056 assert new_child
isa TCbra
4065 redef meth visit_all
(v
: Visitor)
4067 if _n_obra
!= null then
4070 if _n_cbra
!= null then
4075 redef meth visit_all_reverse
(v
: Visitor)
4077 if _n_obra
!= null then
4080 if _n_cbra
!= null then
4085 redef class AStarshipMethid
4086 redef meth n_starship
=(n
: TStarship)
4094 private init empty_init
do end
4096 init init_astarshipmethid
(
4097 n_starship
: TStarship
4101 _n_starship
= n_starship
4102 if n_starship
!= null then
4103 n_starship
.parent
= self
4107 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4109 assert old_child
!= null
4110 if _n_starship
== old_child
then
4111 if new_child
!= null then
4112 new_child
.parent
= self
4113 assert new_child
isa TStarship
4114 _n_starship
= new_child
4122 redef meth visit_all
(v
: Visitor)
4124 if _n_starship
!= null then
4125 v
.visit
(_n_starship
)
4129 redef meth visit_all_reverse
(v
: Visitor)
4131 if _n_starship
!= null then
4132 v
.visit
(_n_starship
)
4136 redef class AAssignMethid
4137 redef meth n_id
=(n
: TId)
4144 redef meth n_assign
=(n
: TAssign)
4152 private init empty_init
do end
4154 init init_aassignmethid
(
4161 if n_id
!= null then
4164 _n_assign
= n_assign
4165 if n_assign
!= null then
4166 n_assign
.parent
= self
4170 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4172 assert old_child
!= null
4173 if _n_id
== old_child
then
4174 if new_child
!= null then
4175 new_child
.parent
= self
4176 assert new_child
isa TId
4183 if _n_assign
== old_child
then
4184 if new_child
!= null then
4185 new_child
.parent
= self
4186 assert new_child
isa TAssign
4187 _n_assign
= new_child
4195 redef meth visit_all
(v
: Visitor)
4197 if _n_id
!= null then
4200 if _n_assign
!= null then
4205 redef meth visit_all_reverse
(v
: Visitor)
4207 if _n_id
!= null then
4210 if _n_assign
!= null then
4215 redef class ABraassignMethid
4216 redef meth n_obra
=(n
: TObra)
4223 redef meth n_cbra
=(n
: TCbra)
4230 redef meth n_assign
=(n
: TAssign)
4238 private init empty_init
do end
4240 init init_abraassignmethid
(
4248 if n_obra
!= null then
4249 n_obra
.parent
= self
4252 if n_cbra
!= null then
4253 n_cbra
.parent
= self
4255 _n_assign
= n_assign
4256 if n_assign
!= null then
4257 n_assign
.parent
= self
4261 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4263 assert old_child
!= null
4264 if _n_obra
== old_child
then
4265 if new_child
!= null then
4266 new_child
.parent
= self
4267 assert new_child
isa TObra
4274 if _n_cbra
== old_child
then
4275 if new_child
!= null then
4276 new_child
.parent
= self
4277 assert new_child
isa TCbra
4284 if _n_assign
== old_child
then
4285 if new_child
!= null then
4286 new_child
.parent
= self
4287 assert new_child
isa TAssign
4288 _n_assign
= new_child
4296 redef meth visit_all
(v
: Visitor)
4298 if _n_obra
!= null then
4301 if _n_cbra
!= null then
4304 if _n_assign
!= null then
4309 redef meth visit_all_reverse
(v
: Visitor)
4311 if _n_obra
!= null then
4314 if _n_cbra
!= null then
4317 if _n_assign
!= null then
4322 redef class ASignature
4323 redef meth n_type
=(n
: PType)
4331 private init empty_init
do end
4333 init init_asignature
(
4334 n_params
: Collection[Object] , # Should be Collection[PParam]
4336 n_closure_decls
: Collection[Object] # Should be Collection[PClosureDecl]
4340 _n_params
= new List[PParam]
4341 for n
in n_params
do
4347 if n_type
!= null then
4348 n_type
.parent
= self
4350 _n_closure_decls
= new List[PClosureDecl]
4351 for n
in n_closure_decls
do
4352 assert n
isa PClosureDecl
4353 _n_closure_decls
.add
(n
)
4358 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4360 assert old_child
!= null
4361 for i
in [0.._n_params
.length
[ do
4362 if _n_params
[i
] == old_child
then
4363 if new_child
!= null then
4364 assert new_child
isa PParam
4365 _n_params
[i
] = new_child
4366 new_child
.parent
= self
4368 _n_params
.remove_at
(i
)
4373 if _n_type
== old_child
then
4374 if new_child
!= null then
4375 new_child
.parent
= self
4376 assert new_child
isa PType
4383 for i
in [0.._n_closure_decls
.length
[ do
4384 if _n_closure_decls
[i
] == old_child
then
4385 if new_child
!= null then
4386 assert new_child
isa PClosureDecl
4387 _n_closure_decls
[i
] = new_child
4388 new_child
.parent
= self
4390 _n_closure_decls
.remove_at
(i
)
4397 redef meth visit_all
(v
: Visitor)
4399 for n
in _n_params
do
4402 if _n_type
!= null then
4405 for n
in _n_closure_decls
do
4410 redef meth visit_all_reverse
(v
: Visitor)
4413 var i
= _n_params
.length
4415 v
.visit
(_n_params
[i
])
4419 if _n_type
!= null then
4423 var i
= _n_closure_decls
.length
4425 v
.visit
(_n_closure_decls
[i
])
4432 redef meth n_id
=(n
: TId)
4439 redef meth n_type
=(n
: PType)
4446 redef meth n_dotdotdot
=(n
: TDotdotdot)
4454 private init empty_init
do end
4459 n_dotdotdot
: TDotdotdot
4464 if n_id
!= null then
4468 if n_type
!= null then
4469 n_type
.parent
= self
4471 _n_dotdotdot
= n_dotdotdot
4472 if n_dotdotdot
!= null then
4473 n_dotdotdot
.parent
= self
4477 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4479 assert old_child
!= null
4480 if _n_id
== old_child
then
4481 if new_child
!= null then
4482 new_child
.parent
= self
4483 assert new_child
isa TId
4490 if _n_type
== old_child
then
4491 if new_child
!= null then
4492 new_child
.parent
= self
4493 assert new_child
isa PType
4500 if _n_dotdotdot
== old_child
then
4501 if new_child
!= null then
4502 new_child
.parent
= self
4503 assert new_child
isa TDotdotdot
4504 _n_dotdotdot
= new_child
4512 redef meth visit_all
(v
: Visitor)
4514 if _n_id
!= null then
4517 if _n_type
!= null then
4520 if _n_dotdotdot
!= null then
4521 v
.visit
(_n_dotdotdot
)
4525 redef meth visit_all_reverse
(v
: Visitor)
4527 if _n_id
!= null then
4530 if _n_type
!= null then
4533 if _n_dotdotdot
!= null then
4534 v
.visit
(_n_dotdotdot
)
4538 redef class AClosureDecl
4539 redef meth n_kwwith
=(n
: TKwwith)
4546 redef meth n_kwbreak
=(n
: TKwbreak)
4553 redef meth n_id
=(n
: TId)
4560 redef meth n_signature
=(n
: PSignature)
4567 redef meth n_expr
=(n
: PExpr)
4575 private init empty_init
do end
4577 init init_aclosuredecl
(
4579 n_kwbreak
: TKwbreak ,
4581 n_signature
: PSignature ,
4586 _n_kwwith
= n_kwwith
4587 if n_kwwith
!= null then
4588 n_kwwith
.parent
= self
4590 _n_kwbreak
= n_kwbreak
4591 if n_kwbreak
!= null then
4592 n_kwbreak
.parent
= self
4595 if n_id
!= null then
4598 _n_signature
= n_signature
4599 if n_signature
!= null then
4600 n_signature
.parent
= self
4603 if n_expr
!= null then
4604 n_expr
.parent
= self
4608 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4610 assert old_child
!= null
4611 if _n_kwwith
== old_child
then
4612 if new_child
!= null then
4613 new_child
.parent
= self
4614 assert new_child
isa TKwwith
4615 _n_kwwith
= new_child
4621 if _n_kwbreak
== old_child
then
4622 if new_child
!= null then
4623 new_child
.parent
= self
4624 assert new_child
isa TKwbreak
4625 _n_kwbreak
= new_child
4631 if _n_id
== old_child
then
4632 if new_child
!= null then
4633 new_child
.parent
= self
4634 assert new_child
isa TId
4641 if _n_signature
== old_child
then
4642 if new_child
!= null then
4643 new_child
.parent
= self
4644 assert new_child
isa PSignature
4645 _n_signature
= new_child
4651 if _n_expr
== old_child
then
4652 if new_child
!= null then
4653 new_child
.parent
= self
4654 assert new_child
isa PExpr
4663 redef meth visit_all
(v
: Visitor)
4665 if _n_kwwith
!= null then
4668 if _n_kwbreak
!= null then
4671 if _n_id
!= null then
4674 if _n_signature
!= null then
4675 v
.visit
(_n_signature
)
4677 if _n_expr
!= null then
4682 redef meth visit_all_reverse
(v
: Visitor)
4684 if _n_kwwith
!= null then
4687 if _n_kwbreak
!= null then
4690 if _n_id
!= null then
4693 if _n_signature
!= null then
4694 v
.visit
(_n_signature
)
4696 if _n_expr
!= null then
4702 redef meth n_kwnullable
=(n
: TKwnullable)
4709 redef meth n_id
=(n
: TClassid)
4717 private init empty_init
do end
4720 n_kwnullable
: TKwnullable ,
4722 n_types
: Collection[Object] # Should be Collection[PType]
4726 _n_kwnullable
= n_kwnullable
4727 if n_kwnullable
!= null then
4728 n_kwnullable
.parent
= self
4731 if n_id
!= null then
4734 _n_types
= new List[PType]
4742 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4744 assert old_child
!= null
4745 if _n_kwnullable
== old_child
then
4746 if new_child
!= null then
4747 new_child
.parent
= self
4748 assert new_child
isa TKwnullable
4749 _n_kwnullable
= new_child
4751 _n_kwnullable
= null
4755 if _n_id
== old_child
then
4756 if new_child
!= null then
4757 new_child
.parent
= self
4758 assert new_child
isa TClassid
4765 for i
in [0.._n_types
.length
[ do
4766 if _n_types
[i
] == old_child
then
4767 if new_child
!= null then
4768 assert new_child
isa PType
4769 _n_types
[i
] = new_child
4770 new_child
.parent
= self
4772 _n_types
.remove_at
(i
)
4779 redef meth visit_all
(v
: Visitor)
4781 if _n_kwnullable
!= null then
4782 v
.visit
(_n_kwnullable
)
4784 if _n_id
!= null then
4787 for n
in _n_types
do
4792 redef meth visit_all_reverse
(v
: Visitor)
4794 if _n_kwnullable
!= null then
4795 v
.visit
(_n_kwnullable
)
4797 if _n_id
!= null then
4801 var i
= _n_types
.length
4803 v
.visit
(_n_types
[i
])
4809 redef class ABlockExpr
4811 private init empty_init
do end
4813 init init_ablockexpr
(
4814 n_expr
: Collection[Object] # Should be Collection[PExpr]
4818 _n_expr
= new List[PExpr]
4826 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4828 assert old_child
!= null
4829 for i
in [0.._n_expr
.length
[ do
4830 if _n_expr
[i
] == old_child
then
4831 if new_child
!= null then
4832 assert new_child
isa PExpr
4833 _n_expr
[i
] = new_child
4834 new_child
.parent
= self
4836 _n_expr
.remove_at
(i
)
4843 redef meth visit_all
(v
: Visitor)
4850 redef meth visit_all_reverse
(v
: Visitor)
4853 var i
= _n_expr
.length
4861 redef class AVardeclExpr
4862 redef meth n_kwvar
=(n
: TKwvar)
4869 redef meth n_id
=(n
: TId)
4876 redef meth n_type
=(n
: PType)
4883 redef meth n_assign
=(n
: TAssign)
4890 redef meth n_expr
=(n
: PExpr)
4898 private init empty_init
do end
4900 init init_avardeclexpr
(
4910 if n_kwvar
!= null then
4911 n_kwvar
.parent
= self
4914 if n_id
!= null then
4918 if n_type
!= null then
4919 n_type
.parent
= self
4921 _n_assign
= n_assign
4922 if n_assign
!= null then
4923 n_assign
.parent
= self
4926 if n_expr
!= null then
4927 n_expr
.parent
= self
4931 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4933 assert old_child
!= null
4934 if _n_kwvar
== old_child
then
4935 if new_child
!= null then
4936 new_child
.parent
= self
4937 assert new_child
isa TKwvar
4938 _n_kwvar
= new_child
4944 if _n_id
== old_child
then
4945 if new_child
!= null then
4946 new_child
.parent
= self
4947 assert new_child
isa TId
4954 if _n_type
== old_child
then
4955 if new_child
!= null then
4956 new_child
.parent
= self
4957 assert new_child
isa PType
4964 if _n_assign
== old_child
then
4965 if new_child
!= null then
4966 new_child
.parent
= self
4967 assert new_child
isa TAssign
4968 _n_assign
= new_child
4974 if _n_expr
== old_child
then
4975 if new_child
!= null then
4976 new_child
.parent
= self
4977 assert new_child
isa PExpr
4986 redef meth visit_all
(v
: Visitor)
4988 if _n_kwvar
!= null then
4991 if _n_id
!= null then
4994 if _n_type
!= null then
4997 if _n_assign
!= null then
5000 if _n_expr
!= null then
5005 redef meth visit_all_reverse
(v
: Visitor)
5007 if _n_kwvar
!= null then
5010 if _n_id
!= null then
5013 if _n_type
!= null then
5016 if _n_assign
!= null then
5019 if _n_expr
!= null then
5024 redef class AReturnExpr
5025 redef meth n_kwreturn
=(n
: TKwreturn)
5032 redef meth n_expr
=(n
: PExpr)
5040 private init empty_init
do end
5042 init init_areturnexpr
(
5043 n_kwreturn
: TKwreturn ,
5048 _n_kwreturn
= n_kwreturn
5049 if n_kwreturn
!= null then
5050 n_kwreturn
.parent
= self
5053 if n_expr
!= null then
5054 n_expr
.parent
= self
5058 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5060 assert old_child
!= null
5061 if _n_kwreturn
== old_child
then
5062 if new_child
!= null then
5063 new_child
.parent
= self
5064 assert new_child
isa TKwreturn
5065 _n_kwreturn
= new_child
5071 if _n_expr
== old_child
then
5072 if new_child
!= null then
5073 new_child
.parent
= self
5074 assert new_child
isa PExpr
5083 redef meth visit_all
(v
: Visitor)
5085 if _n_kwreturn
!= null then
5086 v
.visit
(_n_kwreturn
)
5088 if _n_expr
!= null then
5093 redef meth visit_all_reverse
(v
: Visitor)
5095 if _n_kwreturn
!= null then
5096 v
.visit
(_n_kwreturn
)
5098 if _n_expr
!= null then
5103 redef class ABreakExpr
5104 redef meth n_kwbreak
=(n
: TKwbreak)
5111 redef meth n_expr
=(n
: PExpr)
5119 private init empty_init
do end
5121 init init_abreakexpr
(
5122 n_kwbreak
: TKwbreak ,
5127 _n_kwbreak
= n_kwbreak
5128 if n_kwbreak
!= null then
5129 n_kwbreak
.parent
= self
5132 if n_expr
!= null then
5133 n_expr
.parent
= self
5137 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5139 assert old_child
!= null
5140 if _n_kwbreak
== old_child
then
5141 if new_child
!= null then
5142 new_child
.parent
= self
5143 assert new_child
isa TKwbreak
5144 _n_kwbreak
= new_child
5150 if _n_expr
== old_child
then
5151 if new_child
!= null then
5152 new_child
.parent
= self
5153 assert new_child
isa PExpr
5162 redef meth visit_all
(v
: Visitor)
5164 if _n_kwbreak
!= null then
5167 if _n_expr
!= null then
5172 redef meth visit_all_reverse
(v
: Visitor)
5174 if _n_kwbreak
!= null then
5177 if _n_expr
!= null then
5182 redef class AAbortExpr
5183 redef meth n_kwabort
=(n
: TKwabort)
5191 private init empty_init
do end
5193 init init_aabortexpr
(
5198 _n_kwabort
= n_kwabort
5199 if n_kwabort
!= null then
5200 n_kwabort
.parent
= self
5204 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5206 assert old_child
!= null
5207 if _n_kwabort
== old_child
then
5208 if new_child
!= null then
5209 new_child
.parent
= self
5210 assert new_child
isa TKwabort
5211 _n_kwabort
= new_child
5219 redef meth visit_all
(v
: Visitor)
5221 if _n_kwabort
!= null then
5226 redef meth visit_all_reverse
(v
: Visitor)
5228 if _n_kwabort
!= null then
5233 redef class AContinueExpr
5234 redef meth n_kwcontinue
=(n
: TKwcontinue)
5241 redef meth n_expr
=(n
: PExpr)
5249 private init empty_init
do end
5251 init init_acontinueexpr
(
5252 n_kwcontinue
: TKwcontinue ,
5257 _n_kwcontinue
= n_kwcontinue
5258 if n_kwcontinue
!= null then
5259 n_kwcontinue
.parent
= self
5262 if n_expr
!= null then
5263 n_expr
.parent
= self
5267 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5269 assert old_child
!= null
5270 if _n_kwcontinue
== old_child
then
5271 if new_child
!= null then
5272 new_child
.parent
= self
5273 assert new_child
isa TKwcontinue
5274 _n_kwcontinue
= new_child
5276 _n_kwcontinue
= null
5280 if _n_expr
== old_child
then
5281 if new_child
!= null then
5282 new_child
.parent
= self
5283 assert new_child
isa PExpr
5292 redef meth visit_all
(v
: Visitor)
5294 if _n_kwcontinue
!= null then
5295 v
.visit
(_n_kwcontinue
)
5297 if _n_expr
!= null then
5302 redef meth visit_all_reverse
(v
: Visitor)
5304 if _n_kwcontinue
!= null then
5305 v
.visit
(_n_kwcontinue
)
5307 if _n_expr
!= null then
5313 redef meth n_kwdo
=(n
: TKwdo)
5320 redef meth n_block
=(n
: PExpr)
5328 private init empty_init
do end
5337 if n_kwdo
!= null then
5338 n_kwdo
.parent
= self
5341 if n_block
!= null then
5342 n_block
.parent
= self
5346 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5348 assert old_child
!= null
5349 if _n_kwdo
== old_child
then
5350 if new_child
!= null then
5351 new_child
.parent
= self
5352 assert new_child
isa TKwdo
5359 if _n_block
== old_child
then
5360 if new_child
!= null then
5361 new_child
.parent
= self
5362 assert new_child
isa PExpr
5363 _n_block
= new_child
5371 redef meth visit_all
(v
: Visitor)
5373 if _n_kwdo
!= null then
5376 if _n_block
!= null then
5381 redef meth visit_all_reverse
(v
: Visitor)
5383 if _n_kwdo
!= null then
5386 if _n_block
!= null then
5392 redef meth n_kwif
=(n
: TKwif)
5399 redef meth n_expr
=(n
: PExpr)
5406 redef meth n_then
=(n
: PExpr)
5413 redef meth n_else
=(n
: PExpr)
5421 private init empty_init
do end
5432 if n_kwif
!= null then
5433 n_kwif
.parent
= self
5436 if n_expr
!= null then
5437 n_expr
.parent
= self
5440 if n_then
!= null then
5441 n_then
.parent
= self
5444 if n_else
!= null then
5445 n_else
.parent
= self
5449 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5451 assert old_child
!= null
5452 if _n_kwif
== old_child
then
5453 if new_child
!= null then
5454 new_child
.parent
= self
5455 assert new_child
isa TKwif
5462 if _n_expr
== old_child
then
5463 if new_child
!= null then
5464 new_child
.parent
= self
5465 assert new_child
isa PExpr
5472 if _n_then
== old_child
then
5473 if new_child
!= null then
5474 new_child
.parent
= self
5475 assert new_child
isa PExpr
5482 if _n_else
== old_child
then
5483 if new_child
!= null then
5484 new_child
.parent
= self
5485 assert new_child
isa PExpr
5494 redef meth visit_all
(v
: Visitor)
5496 if _n_kwif
!= null then
5499 if _n_expr
!= null then
5502 if _n_then
!= null then
5505 if _n_else
!= null then
5510 redef meth visit_all_reverse
(v
: Visitor)
5512 if _n_kwif
!= null then
5515 if _n_expr
!= null then
5518 if _n_then
!= null then
5521 if _n_else
!= null then
5526 redef class AIfexprExpr
5527 redef meth n_kwif
=(n
: TKwif)
5534 redef meth n_expr
=(n
: PExpr)
5541 redef meth n_kwthen
=(n
: TKwthen)
5548 redef meth n_then
=(n
: PExpr)
5555 redef meth n_kwelse
=(n
: TKwelse)
5562 redef meth n_else
=(n
: PExpr)
5570 private init empty_init
do end
5572 init init_aifexprexpr
(
5583 if n_kwif
!= null then
5584 n_kwif
.parent
= self
5587 if n_expr
!= null then
5588 n_expr
.parent
= self
5590 _n_kwthen
= n_kwthen
5591 if n_kwthen
!= null then
5592 n_kwthen
.parent
= self
5595 if n_then
!= null then
5596 n_then
.parent
= self
5598 _n_kwelse
= n_kwelse
5599 if n_kwelse
!= null then
5600 n_kwelse
.parent
= self
5603 if n_else
!= null then
5604 n_else
.parent
= self
5608 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5610 assert old_child
!= null
5611 if _n_kwif
== old_child
then
5612 if new_child
!= null then
5613 new_child
.parent
= self
5614 assert new_child
isa TKwif
5621 if _n_expr
== old_child
then
5622 if new_child
!= null then
5623 new_child
.parent
= self
5624 assert new_child
isa PExpr
5631 if _n_kwthen
== old_child
then
5632 if new_child
!= null then
5633 new_child
.parent
= self
5634 assert new_child
isa TKwthen
5635 _n_kwthen
= new_child
5641 if _n_then
== old_child
then
5642 if new_child
!= null then
5643 new_child
.parent
= self
5644 assert new_child
isa PExpr
5651 if _n_kwelse
== old_child
then
5652 if new_child
!= null then
5653 new_child
.parent
= self
5654 assert new_child
isa TKwelse
5655 _n_kwelse
= new_child
5661 if _n_else
== old_child
then
5662 if new_child
!= null then
5663 new_child
.parent
= self
5664 assert new_child
isa PExpr
5673 redef meth visit_all
(v
: Visitor)
5675 if _n_kwif
!= null then
5678 if _n_expr
!= null then
5681 if _n_kwthen
!= null then
5684 if _n_then
!= null then
5687 if _n_kwelse
!= null then
5690 if _n_else
!= null then
5695 redef meth visit_all_reverse
(v
: Visitor)
5697 if _n_kwif
!= null then
5700 if _n_expr
!= null then
5703 if _n_kwthen
!= null then
5706 if _n_then
!= null then
5709 if _n_kwelse
!= null then
5712 if _n_else
!= null then
5717 redef class AWhileExpr
5718 redef meth n_kwwhile
=(n
: TKwwhile)
5725 redef meth n_expr
=(n
: PExpr)
5732 redef meth n_kwdo
=(n
: TKwdo)
5739 redef meth n_block
=(n
: PExpr)
5747 private init empty_init
do end
5749 init init_awhileexpr
(
5750 n_kwwhile
: TKwwhile ,
5757 _n_kwwhile
= n_kwwhile
5758 if n_kwwhile
!= null then
5759 n_kwwhile
.parent
= self
5762 if n_expr
!= null then
5763 n_expr
.parent
= self
5766 if n_kwdo
!= null then
5767 n_kwdo
.parent
= self
5770 if n_block
!= null then
5771 n_block
.parent
= self
5775 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5777 assert old_child
!= null
5778 if _n_kwwhile
== old_child
then
5779 if new_child
!= null then
5780 new_child
.parent
= self
5781 assert new_child
isa TKwwhile
5782 _n_kwwhile
= new_child
5788 if _n_expr
== old_child
then
5789 if new_child
!= null then
5790 new_child
.parent
= self
5791 assert new_child
isa PExpr
5798 if _n_kwdo
== old_child
then
5799 if new_child
!= null then
5800 new_child
.parent
= self
5801 assert new_child
isa TKwdo
5808 if _n_block
== old_child
then
5809 if new_child
!= null then
5810 new_child
.parent
= self
5811 assert new_child
isa PExpr
5812 _n_block
= new_child
5820 redef meth visit_all
(v
: Visitor)
5822 if _n_kwwhile
!= null then
5825 if _n_expr
!= null then
5828 if _n_kwdo
!= null then
5831 if _n_block
!= null then
5836 redef meth visit_all_reverse
(v
: Visitor)
5838 if _n_kwwhile
!= null then
5841 if _n_expr
!= null then
5844 if _n_kwdo
!= null then
5847 if _n_block
!= null then
5852 redef class AForExpr
5853 redef meth n_kwfor
=(n
: TKwfor)
5860 redef meth n_id
=(n
: TId)
5867 redef meth n_expr
=(n
: PExpr)
5874 redef meth n_kwdo
=(n
: TKwdo)
5881 redef meth n_block
=(n
: PExpr)
5889 private init empty_init
do end
5891 init init_aforexpr
(
5901 if n_kwfor
!= null then
5902 n_kwfor
.parent
= self
5905 if n_id
!= null then
5909 if n_expr
!= null then
5910 n_expr
.parent
= self
5913 if n_kwdo
!= null then
5914 n_kwdo
.parent
= self
5917 if n_block
!= null then
5918 n_block
.parent
= self
5922 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5924 assert old_child
!= null
5925 if _n_kwfor
== old_child
then
5926 if new_child
!= null then
5927 new_child
.parent
= self
5928 assert new_child
isa TKwfor
5929 _n_kwfor
= new_child
5935 if _n_id
== old_child
then
5936 if new_child
!= null then
5937 new_child
.parent
= self
5938 assert new_child
isa TId
5945 if _n_expr
== old_child
then
5946 if new_child
!= null then
5947 new_child
.parent
= self
5948 assert new_child
isa PExpr
5955 if _n_kwdo
== old_child
then
5956 if new_child
!= null then
5957 new_child
.parent
= self
5958 assert new_child
isa TKwdo
5965 if _n_block
== old_child
then
5966 if new_child
!= null then
5967 new_child
.parent
= self
5968 assert new_child
isa PExpr
5969 _n_block
= new_child
5977 redef meth visit_all
(v
: Visitor)
5979 if _n_kwfor
!= null then
5982 if _n_id
!= null then
5985 if _n_expr
!= null then
5988 if _n_kwdo
!= null then
5991 if _n_block
!= null then
5996 redef meth visit_all_reverse
(v
: Visitor)
5998 if _n_kwfor
!= null then
6001 if _n_id
!= null then
6004 if _n_expr
!= null then
6007 if _n_kwdo
!= null then
6010 if _n_block
!= null then
6015 redef class AAssertExpr
6016 redef meth n_kwassert
=(n
: TKwassert)
6023 redef meth n_id
=(n
: TId)
6030 redef meth n_expr
=(n
: PExpr)
6038 private init empty_init
do end
6040 init init_aassertexpr
(
6041 n_kwassert
: TKwassert ,
6047 _n_kwassert
= n_kwassert
6048 if n_kwassert
!= null then
6049 n_kwassert
.parent
= self
6052 if n_id
!= null then
6056 if n_expr
!= null then
6057 n_expr
.parent
= self
6061 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6063 assert old_child
!= null
6064 if _n_kwassert
== old_child
then
6065 if new_child
!= null then
6066 new_child
.parent
= self
6067 assert new_child
isa TKwassert
6068 _n_kwassert
= new_child
6074 if _n_id
== old_child
then
6075 if new_child
!= null then
6076 new_child
.parent
= self
6077 assert new_child
isa TId
6084 if _n_expr
== old_child
then
6085 if new_child
!= null then
6086 new_child
.parent
= self
6087 assert new_child
isa PExpr
6096 redef meth visit_all
(v
: Visitor)
6098 if _n_kwassert
!= null then
6099 v
.visit
(_n_kwassert
)
6101 if _n_id
!= null then
6104 if _n_expr
!= null then
6109 redef meth visit_all_reverse
(v
: Visitor)
6111 if _n_kwassert
!= null then
6112 v
.visit
(_n_kwassert
)
6114 if _n_id
!= null then
6117 if _n_expr
!= null then
6122 redef class AOnceExpr
6123 redef meth n_kwonce
=(n
: TKwonce)
6130 redef meth n_expr
=(n
: PExpr)
6138 private init empty_init
do end
6140 init init_aonceexpr
(
6146 _n_kwonce
= n_kwonce
6147 if n_kwonce
!= null then
6148 n_kwonce
.parent
= self
6151 if n_expr
!= null then
6152 n_expr
.parent
= self
6156 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6158 assert old_child
!= null
6159 if _n_kwonce
== old_child
then
6160 if new_child
!= null then
6161 new_child
.parent
= self
6162 assert new_child
isa TKwonce
6163 _n_kwonce
= new_child
6169 if _n_expr
== old_child
then
6170 if new_child
!= null then
6171 new_child
.parent
= self
6172 assert new_child
isa PExpr
6181 redef meth visit_all
(v
: Visitor)
6183 if _n_kwonce
!= null then
6186 if _n_expr
!= null then
6191 redef meth visit_all_reverse
(v
: Visitor)
6193 if _n_kwonce
!= null then
6196 if _n_expr
!= null then
6201 redef class ASendExpr
6202 redef meth n_expr
=(n
: PExpr)
6210 private init empty_init
do end
6212 init init_asendexpr
(
6218 if n_expr
!= null then
6219 n_expr
.parent
= self
6223 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6225 assert old_child
!= null
6226 if _n_expr
== old_child
then
6227 if new_child
!= null then
6228 new_child
.parent
= self
6229 assert new_child
isa PExpr
6238 redef meth visit_all
(v
: Visitor)
6240 if _n_expr
!= null then
6245 redef meth visit_all_reverse
(v
: Visitor)
6247 if _n_expr
!= null then
6252 redef class ABinopExpr
6253 redef meth n_expr
=(n
: PExpr)
6260 redef meth n_expr2
=(n
: PExpr)
6268 private init empty_init
do end
6270 init init_abinopexpr
(
6277 if n_expr
!= null then
6278 n_expr
.parent
= self
6281 if n_expr2
!= null then
6282 n_expr2
.parent
= self
6286 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6288 assert old_child
!= null
6289 if _n_expr
== old_child
then
6290 if new_child
!= null then
6291 new_child
.parent
= self
6292 assert new_child
isa PExpr
6299 if _n_expr2
== old_child
then
6300 if new_child
!= null then
6301 new_child
.parent
= self
6302 assert new_child
isa PExpr
6303 _n_expr2
= new_child
6311 redef meth visit_all
(v
: Visitor)
6313 if _n_expr
!= null then
6316 if _n_expr2
!= null then
6321 redef meth visit_all_reverse
(v
: Visitor)
6323 if _n_expr
!= null then
6326 if _n_expr2
!= null then
6332 redef meth n_expr
=(n
: PExpr)
6339 redef meth n_expr2
=(n
: PExpr)
6347 private init empty_init
do end
6356 if n_expr
!= null then
6357 n_expr
.parent
= self
6360 if n_expr2
!= null then
6361 n_expr2
.parent
= self
6365 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6367 assert old_child
!= null
6368 if _n_expr
== old_child
then
6369 if new_child
!= null then
6370 new_child
.parent
= self
6371 assert new_child
isa PExpr
6378 if _n_expr2
== old_child
then
6379 if new_child
!= null then
6380 new_child
.parent
= self
6381 assert new_child
isa PExpr
6382 _n_expr2
= new_child
6390 redef meth visit_all
(v
: Visitor)
6392 if _n_expr
!= null then
6395 if _n_expr2
!= null then
6400 redef meth visit_all_reverse
(v
: Visitor)
6402 if _n_expr
!= null then
6405 if _n_expr2
!= null then
6410 redef class AAndExpr
6411 redef meth n_expr
=(n
: PExpr)
6418 redef meth n_expr2
=(n
: PExpr)
6426 private init empty_init
do end
6428 init init_aandexpr
(
6435 if n_expr
!= null then
6436 n_expr
.parent
= self
6439 if n_expr2
!= null then
6440 n_expr2
.parent
= self
6444 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6446 assert old_child
!= null
6447 if _n_expr
== old_child
then
6448 if new_child
!= null then
6449 new_child
.parent
= self
6450 assert new_child
isa PExpr
6457 if _n_expr2
== old_child
then
6458 if new_child
!= null then
6459 new_child
.parent
= self
6460 assert new_child
isa PExpr
6461 _n_expr2
= new_child
6469 redef meth visit_all
(v
: Visitor)
6471 if _n_expr
!= null then
6474 if _n_expr2
!= null then
6479 redef meth visit_all_reverse
(v
: Visitor)
6481 if _n_expr
!= null then
6484 if _n_expr2
!= null then
6489 redef class ANotExpr
6490 redef meth n_kwnot
=(n
: TKwnot)
6497 redef meth n_expr
=(n
: PExpr)
6505 private init empty_init
do end
6507 init init_anotexpr
(
6514 if n_kwnot
!= null then
6515 n_kwnot
.parent
= self
6518 if n_expr
!= null then
6519 n_expr
.parent
= self
6523 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6525 assert old_child
!= null
6526 if _n_kwnot
== old_child
then
6527 if new_child
!= null then
6528 new_child
.parent
= self
6529 assert new_child
isa TKwnot
6530 _n_kwnot
= new_child
6536 if _n_expr
== old_child
then
6537 if new_child
!= null then
6538 new_child
.parent
= self
6539 assert new_child
isa PExpr
6548 redef meth visit_all
(v
: Visitor)
6550 if _n_kwnot
!= null then
6553 if _n_expr
!= null then
6558 redef meth visit_all_reverse
(v
: Visitor)
6560 if _n_kwnot
!= null then
6563 if _n_expr
!= null then
6569 redef meth n_expr
=(n
: PExpr)
6576 redef meth n_expr2
=(n
: PExpr)
6584 private init empty_init
do end
6593 if n_expr
!= null then
6594 n_expr
.parent
= self
6597 if n_expr2
!= null then
6598 n_expr2
.parent
= self
6602 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6604 assert old_child
!= null
6605 if _n_expr
== old_child
then
6606 if new_child
!= null then
6607 new_child
.parent
= self
6608 assert new_child
isa PExpr
6615 if _n_expr2
== old_child
then
6616 if new_child
!= null then
6617 new_child
.parent
= self
6618 assert new_child
isa PExpr
6619 _n_expr2
= new_child
6627 redef meth visit_all
(v
: Visitor)
6629 if _n_expr
!= null then
6632 if _n_expr2
!= null then
6637 redef meth visit_all_reverse
(v
: Visitor)
6639 if _n_expr
!= null then
6642 if _n_expr2
!= null then
6648 redef meth n_expr
=(n
: PExpr)
6655 redef meth n_expr2
=(n
: PExpr)
6663 private init empty_init
do end
6672 if n_expr
!= null then
6673 n_expr
.parent
= self
6676 if n_expr2
!= null then
6677 n_expr2
.parent
= self
6681 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6683 assert old_child
!= null
6684 if _n_expr
== old_child
then
6685 if new_child
!= null then
6686 new_child
.parent
= self
6687 assert new_child
isa PExpr
6694 if _n_expr2
== old_child
then
6695 if new_child
!= null then
6696 new_child
.parent
= self
6697 assert new_child
isa PExpr
6698 _n_expr2
= new_child
6706 redef meth visit_all
(v
: Visitor)
6708 if _n_expr
!= null then
6711 if _n_expr2
!= null then
6716 redef meth visit_all_reverse
(v
: Visitor)
6718 if _n_expr
!= null then
6721 if _n_expr2
!= null then
6727 redef meth n_expr
=(n
: PExpr)
6734 redef meth n_expr2
=(n
: PExpr)
6742 private init empty_init
do end
6751 if n_expr
!= null then
6752 n_expr
.parent
= self
6755 if n_expr2
!= null then
6756 n_expr2
.parent
= self
6760 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6762 assert old_child
!= null
6763 if _n_expr
== old_child
then
6764 if new_child
!= null then
6765 new_child
.parent
= self
6766 assert new_child
isa PExpr
6773 if _n_expr2
== old_child
then
6774 if new_child
!= null then
6775 new_child
.parent
= self
6776 assert new_child
isa PExpr
6777 _n_expr2
= new_child
6785 redef meth visit_all
(v
: Visitor)
6787 if _n_expr
!= null then
6790 if _n_expr2
!= null then
6795 redef meth visit_all_reverse
(v
: Visitor)
6797 if _n_expr
!= null then
6800 if _n_expr2
!= null then
6806 redef meth n_expr
=(n
: PExpr)
6813 redef meth n_expr2
=(n
: PExpr)
6821 private init empty_init
do end
6830 if n_expr
!= null then
6831 n_expr
.parent
= self
6834 if n_expr2
!= null then
6835 n_expr2
.parent
= self
6839 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6841 assert old_child
!= null
6842 if _n_expr
== old_child
then
6843 if new_child
!= null then
6844 new_child
.parent
= self
6845 assert new_child
isa PExpr
6852 if _n_expr2
== old_child
then
6853 if new_child
!= null then
6854 new_child
.parent
= self
6855 assert new_child
isa PExpr
6856 _n_expr2
= new_child
6864 redef meth visit_all
(v
: Visitor)
6866 if _n_expr
!= null then
6869 if _n_expr2
!= null then
6874 redef meth visit_all_reverse
(v
: Visitor)
6876 if _n_expr
!= null then
6879 if _n_expr2
!= null then
6885 redef meth n_expr
=(n
: PExpr)
6892 redef meth n_expr2
=(n
: PExpr)
6900 private init empty_init
do end
6909 if n_expr
!= null then
6910 n_expr
.parent
= self
6913 if n_expr2
!= null then
6914 n_expr2
.parent
= self
6918 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6920 assert old_child
!= null
6921 if _n_expr
== old_child
then
6922 if new_child
!= null then
6923 new_child
.parent
= self
6924 assert new_child
isa PExpr
6931 if _n_expr2
== old_child
then
6932 if new_child
!= null then
6933 new_child
.parent
= self
6934 assert new_child
isa PExpr
6935 _n_expr2
= new_child
6943 redef meth visit_all
(v
: Visitor)
6945 if _n_expr
!= null then
6948 if _n_expr2
!= null then
6953 redef meth visit_all_reverse
(v
: Visitor)
6955 if _n_expr
!= null then
6958 if _n_expr2
!= null then
6964 redef meth n_expr
=(n
: PExpr)
6971 redef meth n_expr2
=(n
: PExpr)
6979 private init empty_init
do end
6988 if n_expr
!= null then
6989 n_expr
.parent
= self
6992 if n_expr2
!= null then
6993 n_expr2
.parent
= self
6997 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6999 assert old_child
!= null
7000 if _n_expr
== old_child
then
7001 if new_child
!= null then
7002 new_child
.parent
= self
7003 assert new_child
isa PExpr
7010 if _n_expr2
== old_child
then
7011 if new_child
!= null then
7012 new_child
.parent
= self
7013 assert new_child
isa PExpr
7014 _n_expr2
= new_child
7022 redef meth visit_all
(v
: Visitor)
7024 if _n_expr
!= null then
7027 if _n_expr2
!= null then
7032 redef meth visit_all_reverse
(v
: Visitor)
7034 if _n_expr
!= null then
7037 if _n_expr2
!= null then
7043 redef meth n_expr
=(n
: PExpr)
7050 redef meth n_expr2
=(n
: PExpr)
7058 private init empty_init
do end
7067 if n_expr
!= null then
7068 n_expr
.parent
= self
7071 if n_expr2
!= null then
7072 n_expr2
.parent
= self
7076 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7078 assert old_child
!= null
7079 if _n_expr
== old_child
then
7080 if new_child
!= null then
7081 new_child
.parent
= self
7082 assert new_child
isa PExpr
7089 if _n_expr2
== old_child
then
7090 if new_child
!= null then
7091 new_child
.parent
= self
7092 assert new_child
isa PExpr
7093 _n_expr2
= new_child
7101 redef meth visit_all
(v
: Visitor)
7103 if _n_expr
!= null then
7106 if _n_expr2
!= null then
7111 redef meth visit_all_reverse
(v
: Visitor)
7113 if _n_expr
!= null then
7116 if _n_expr2
!= null then
7121 redef class AIsaExpr
7122 redef meth n_expr
=(n
: PExpr)
7129 redef meth n_type
=(n
: PType)
7137 private init empty_init
do end
7139 init init_aisaexpr
(
7146 if n_expr
!= null then
7147 n_expr
.parent
= self
7150 if n_type
!= null then
7151 n_type
.parent
= self
7155 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7157 assert old_child
!= null
7158 if _n_expr
== old_child
then
7159 if new_child
!= null then
7160 new_child
.parent
= self
7161 assert new_child
isa PExpr
7168 if _n_type
== old_child
then
7169 if new_child
!= null then
7170 new_child
.parent
= self
7171 assert new_child
isa PType
7180 redef meth visit_all
(v
: Visitor)
7182 if _n_expr
!= null then
7185 if _n_type
!= null then
7190 redef meth visit_all_reverse
(v
: Visitor)
7192 if _n_expr
!= null then
7195 if _n_type
!= null then
7200 redef class APlusExpr
7201 redef meth n_expr
=(n
: PExpr)
7208 redef meth n_expr2
=(n
: PExpr)
7216 private init empty_init
do end
7218 init init_aplusexpr
(
7225 if n_expr
!= null then
7226 n_expr
.parent
= self
7229 if n_expr2
!= null then
7230 n_expr2
.parent
= self
7234 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7236 assert old_child
!= null
7237 if _n_expr
== old_child
then
7238 if new_child
!= null then
7239 new_child
.parent
= self
7240 assert new_child
isa PExpr
7247 if _n_expr2
== old_child
then
7248 if new_child
!= null then
7249 new_child
.parent
= self
7250 assert new_child
isa PExpr
7251 _n_expr2
= new_child
7259 redef meth visit_all
(v
: Visitor)
7261 if _n_expr
!= null then
7264 if _n_expr2
!= null then
7269 redef meth visit_all_reverse
(v
: Visitor)
7271 if _n_expr
!= null then
7274 if _n_expr2
!= null then
7279 redef class AMinusExpr
7280 redef meth n_expr
=(n
: PExpr)
7287 redef meth n_expr2
=(n
: PExpr)
7295 private init empty_init
do end
7297 init init_aminusexpr
(
7304 if n_expr
!= null then
7305 n_expr
.parent
= self
7308 if n_expr2
!= null then
7309 n_expr2
.parent
= self
7313 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7315 assert old_child
!= null
7316 if _n_expr
== old_child
then
7317 if new_child
!= null then
7318 new_child
.parent
= self
7319 assert new_child
isa PExpr
7326 if _n_expr2
== old_child
then
7327 if new_child
!= null then
7328 new_child
.parent
= self
7329 assert new_child
isa PExpr
7330 _n_expr2
= new_child
7338 redef meth visit_all
(v
: Visitor)
7340 if _n_expr
!= null then
7343 if _n_expr2
!= null then
7348 redef meth visit_all_reverse
(v
: Visitor)
7350 if _n_expr
!= null then
7353 if _n_expr2
!= null then
7358 redef class AStarshipExpr
7359 redef meth n_expr
=(n
: PExpr)
7366 redef meth n_expr2
=(n
: PExpr)
7374 private init empty_init
do end
7376 init init_astarshipexpr
(
7383 if n_expr
!= null then
7384 n_expr
.parent
= self
7387 if n_expr2
!= null then
7388 n_expr2
.parent
= self
7392 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7394 assert old_child
!= null
7395 if _n_expr
== old_child
then
7396 if new_child
!= null then
7397 new_child
.parent
= self
7398 assert new_child
isa PExpr
7405 if _n_expr2
== old_child
then
7406 if new_child
!= null then
7407 new_child
.parent
= self
7408 assert new_child
isa PExpr
7409 _n_expr2
= new_child
7417 redef meth visit_all
(v
: Visitor)
7419 if _n_expr
!= null then
7422 if _n_expr2
!= null then
7427 redef meth visit_all_reverse
(v
: Visitor)
7429 if _n_expr
!= null then
7432 if _n_expr2
!= null then
7437 redef class AStarExpr
7438 redef meth n_expr
=(n
: PExpr)
7445 redef meth n_expr2
=(n
: PExpr)
7453 private init empty_init
do end
7455 init init_astarexpr
(
7462 if n_expr
!= null then
7463 n_expr
.parent
= self
7466 if n_expr2
!= null then
7467 n_expr2
.parent
= self
7471 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7473 assert old_child
!= null
7474 if _n_expr
== old_child
then
7475 if new_child
!= null then
7476 new_child
.parent
= self
7477 assert new_child
isa PExpr
7484 if _n_expr2
== old_child
then
7485 if new_child
!= null then
7486 new_child
.parent
= self
7487 assert new_child
isa PExpr
7488 _n_expr2
= new_child
7496 redef meth visit_all
(v
: Visitor)
7498 if _n_expr
!= null then
7501 if _n_expr2
!= null then
7506 redef meth visit_all_reverse
(v
: Visitor)
7508 if _n_expr
!= null then
7511 if _n_expr2
!= null then
7516 redef class ASlashExpr
7517 redef meth n_expr
=(n
: PExpr)
7524 redef meth n_expr2
=(n
: PExpr)
7532 private init empty_init
do end
7534 init init_aslashexpr
(
7541 if n_expr
!= null then
7542 n_expr
.parent
= self
7545 if n_expr2
!= null then
7546 n_expr2
.parent
= self
7550 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7552 assert old_child
!= null
7553 if _n_expr
== old_child
then
7554 if new_child
!= null then
7555 new_child
.parent
= self
7556 assert new_child
isa PExpr
7563 if _n_expr2
== old_child
then
7564 if new_child
!= null then
7565 new_child
.parent
= self
7566 assert new_child
isa PExpr
7567 _n_expr2
= new_child
7575 redef meth visit_all
(v
: Visitor)
7577 if _n_expr
!= null then
7580 if _n_expr2
!= null then
7585 redef meth visit_all_reverse
(v
: Visitor)
7587 if _n_expr
!= null then
7590 if _n_expr2
!= null then
7595 redef class APercentExpr
7596 redef meth n_expr
=(n
: PExpr)
7603 redef meth n_expr2
=(n
: PExpr)
7611 private init empty_init
do end
7613 init init_apercentexpr
(
7620 if n_expr
!= null then
7621 n_expr
.parent
= self
7624 if n_expr2
!= null then
7625 n_expr2
.parent
= self
7629 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7631 assert old_child
!= null
7632 if _n_expr
== old_child
then
7633 if new_child
!= null then
7634 new_child
.parent
= self
7635 assert new_child
isa PExpr
7642 if _n_expr2
== old_child
then
7643 if new_child
!= null then
7644 new_child
.parent
= self
7645 assert new_child
isa PExpr
7646 _n_expr2
= new_child
7654 redef meth visit_all
(v
: Visitor)
7656 if _n_expr
!= null then
7659 if _n_expr2
!= null then
7664 redef meth visit_all_reverse
(v
: Visitor)
7666 if _n_expr
!= null then
7669 if _n_expr2
!= null then
7674 redef class AUminusExpr
7675 redef meth n_minus
=(n
: TMinus)
7682 redef meth n_expr
=(n
: PExpr)
7690 private init empty_init
do end
7692 init init_auminusexpr
(
7699 if n_minus
!= null then
7700 n_minus
.parent
= self
7703 if n_expr
!= null then
7704 n_expr
.parent
= self
7708 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7710 assert old_child
!= null
7711 if _n_minus
== old_child
then
7712 if new_child
!= null then
7713 new_child
.parent
= self
7714 assert new_child
isa TMinus
7715 _n_minus
= new_child
7721 if _n_expr
== old_child
then
7722 if new_child
!= null then
7723 new_child
.parent
= self
7724 assert new_child
isa PExpr
7733 redef meth visit_all
(v
: Visitor)
7735 if _n_minus
!= null then
7738 if _n_expr
!= null then
7743 redef meth visit_all_reverse
(v
: Visitor)
7745 if _n_minus
!= null then
7748 if _n_expr
!= null then
7753 redef class ANewExpr
7754 redef meth n_kwnew
=(n
: TKwnew)
7761 redef meth n_type
=(n
: PType)
7768 redef meth n_id
=(n
: TId)
7776 private init empty_init
do end
7778 init init_anewexpr
(
7782 n_args
: Collection[Object] # Should be Collection[PExpr]
7787 if n_kwnew
!= null then
7788 n_kwnew
.parent
= self
7791 if n_type
!= null then
7792 n_type
.parent
= self
7795 if n_id
!= null then
7798 _n_args
= new List[PExpr]
7806 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7808 assert old_child
!= null
7809 if _n_kwnew
== old_child
then
7810 if new_child
!= null then
7811 new_child
.parent
= self
7812 assert new_child
isa TKwnew
7813 _n_kwnew
= new_child
7819 if _n_type
== old_child
then
7820 if new_child
!= null then
7821 new_child
.parent
= self
7822 assert new_child
isa PType
7829 if _n_id
== old_child
then
7830 if new_child
!= null then
7831 new_child
.parent
= self
7832 assert new_child
isa TId
7839 for i
in [0.._n_args
.length
[ do
7840 if _n_args
[i
] == old_child
then
7841 if new_child
!= null then
7842 assert new_child
isa PExpr
7843 _n_args
[i
] = new_child
7844 new_child
.parent
= self
7846 _n_args
.remove_at
(i
)
7853 redef meth visit_all
(v
: Visitor)
7855 if _n_kwnew
!= null then
7858 if _n_type
!= null then
7861 if _n_id
!= null then
7869 redef meth visit_all_reverse
(v
: Visitor)
7871 if _n_kwnew
!= null then
7874 if _n_type
!= null then
7877 if _n_id
!= null then
7881 var i
= _n_args
.length
7889 redef class AAttrExpr
7890 redef meth n_expr
=(n
: PExpr)
7897 redef meth n_id
=(n
: TAttrid)
7905 private init empty_init
do end
7907 init init_aattrexpr
(
7914 if n_expr
!= null then
7915 n_expr
.parent
= self
7918 if n_id
!= null then
7923 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7925 assert old_child
!= null
7926 if _n_expr
== old_child
then
7927 if new_child
!= null then
7928 new_child
.parent
= self
7929 assert new_child
isa PExpr
7936 if _n_id
== old_child
then
7937 if new_child
!= null then
7938 new_child
.parent
= self
7939 assert new_child
isa TAttrid
7948 redef meth visit_all
(v
: Visitor)
7950 if _n_expr
!= null then
7953 if _n_id
!= null then
7958 redef meth visit_all_reverse
(v
: Visitor)
7960 if _n_expr
!= null then
7963 if _n_id
!= null then
7968 redef class AAttrAssignExpr
7969 redef meth n_expr
=(n
: PExpr)
7976 redef meth n_id
=(n
: TAttrid)
7983 redef meth n_assign
=(n
: TAssign)
7990 redef meth n_value
=(n
: PExpr)
7998 private init empty_init
do end
8000 init init_aattrassignexpr
(
8009 if n_expr
!= null then
8010 n_expr
.parent
= self
8013 if n_id
!= null then
8016 _n_assign
= n_assign
8017 if n_assign
!= null then
8018 n_assign
.parent
= self
8021 if n_value
!= null then
8022 n_value
.parent
= self
8026 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8028 assert old_child
!= null
8029 if _n_expr
== old_child
then
8030 if new_child
!= null then
8031 new_child
.parent
= self
8032 assert new_child
isa PExpr
8039 if _n_id
== old_child
then
8040 if new_child
!= null then
8041 new_child
.parent
= self
8042 assert new_child
isa TAttrid
8049 if _n_assign
== old_child
then
8050 if new_child
!= null then
8051 new_child
.parent
= self
8052 assert new_child
isa TAssign
8053 _n_assign
= new_child
8059 if _n_value
== old_child
then
8060 if new_child
!= null then
8061 new_child
.parent
= self
8062 assert new_child
isa PExpr
8063 _n_value
= new_child
8071 redef meth visit_all
(v
: Visitor)
8073 if _n_expr
!= null then
8076 if _n_id
!= null then
8079 if _n_assign
!= null then
8082 if _n_value
!= null then
8087 redef meth visit_all_reverse
(v
: Visitor)
8089 if _n_expr
!= null then
8092 if _n_id
!= null then
8095 if _n_assign
!= null then
8098 if _n_value
!= null then
8103 redef class AAttrReassignExpr
8104 redef meth n_expr
=(n
: PExpr)
8111 redef meth n_id
=(n
: TAttrid)
8118 redef meth n_assign_op
=(n
: PAssignOp)
8125 redef meth n_value
=(n
: PExpr)
8133 private init empty_init
do end
8135 init init_aattrreassignexpr
(
8138 n_assign_op
: PAssignOp ,
8144 if n_expr
!= null then
8145 n_expr
.parent
= self
8148 if n_id
!= null then
8151 _n_assign_op
= n_assign_op
8152 if n_assign_op
!= null then
8153 n_assign_op
.parent
= self
8156 if n_value
!= null then
8157 n_value
.parent
= self
8161 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8163 assert old_child
!= null
8164 if _n_expr
== old_child
then
8165 if new_child
!= null then
8166 new_child
.parent
= self
8167 assert new_child
isa PExpr
8174 if _n_id
== old_child
then
8175 if new_child
!= null then
8176 new_child
.parent
= self
8177 assert new_child
isa TAttrid
8184 if _n_assign_op
== old_child
then
8185 if new_child
!= null then
8186 new_child
.parent
= self
8187 assert new_child
isa PAssignOp
8188 _n_assign_op
= new_child
8194 if _n_value
== old_child
then
8195 if new_child
!= null then
8196 new_child
.parent
= self
8197 assert new_child
isa PExpr
8198 _n_value
= new_child
8206 redef meth visit_all
(v
: Visitor)
8208 if _n_expr
!= null then
8211 if _n_id
!= null then
8214 if _n_assign_op
!= null then
8215 v
.visit
(_n_assign_op
)
8217 if _n_value
!= null then
8222 redef meth visit_all_reverse
(v
: Visitor)
8224 if _n_expr
!= null then
8227 if _n_id
!= null then
8230 if _n_assign_op
!= null then
8231 v
.visit
(_n_assign_op
)
8233 if _n_value
!= null then
8238 redef class ACallExpr
8239 redef meth n_expr
=(n
: PExpr)
8246 redef meth n_id
=(n
: TId)
8254 private init empty_init
do end
8256 init init_acallexpr
(
8259 n_args
: Collection[Object] , # Should be Collection[PExpr]
8260 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
8265 if n_expr
!= null then
8266 n_expr
.parent
= self
8269 if n_id
!= null then
8272 _n_args
= new List[PExpr]
8278 _n_closure_defs
= new List[PClosureDef]
8279 for n
in n_closure_defs
do
8280 assert n
isa PClosureDef
8281 _n_closure_defs
.add
(n
)
8286 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8288 assert old_child
!= null
8289 if _n_expr
== old_child
then
8290 if new_child
!= null then
8291 new_child
.parent
= self
8292 assert new_child
isa PExpr
8299 if _n_id
== old_child
then
8300 if new_child
!= null then
8301 new_child
.parent
= self
8302 assert new_child
isa TId
8309 for i
in [0.._n_args
.length
[ do
8310 if _n_args
[i
] == old_child
then
8311 if new_child
!= null then
8312 assert new_child
isa PExpr
8313 _n_args
[i
] = new_child
8314 new_child
.parent
= self
8316 _n_args
.remove_at
(i
)
8321 for i
in [0.._n_closure_defs
.length
[ do
8322 if _n_closure_defs
[i
] == old_child
then
8323 if new_child
!= null then
8324 assert new_child
isa PClosureDef
8325 _n_closure_defs
[i
] = new_child
8326 new_child
.parent
= self
8328 _n_closure_defs
.remove_at
(i
)
8335 redef meth visit_all
(v
: Visitor)
8337 if _n_expr
!= null then
8340 if _n_id
!= null then
8346 for n
in _n_closure_defs
do
8351 redef meth visit_all_reverse
(v
: Visitor)
8353 if _n_expr
!= null then
8356 if _n_id
!= null then
8360 var i
= _n_args
.length
8367 var i
= _n_closure_defs
.length
8369 v
.visit
(_n_closure_defs
[i
])
8375 redef class ACallAssignExpr
8376 redef meth n_expr
=(n
: PExpr)
8383 redef meth n_id
=(n
: TId)
8390 redef meth n_assign
=(n
: TAssign)
8397 redef meth n_value
=(n
: PExpr)
8405 private init empty_init
do end
8407 init init_acallassignexpr
(
8410 n_args
: Collection[Object] , # Should be Collection[PExpr]
8417 if n_expr
!= null then
8418 n_expr
.parent
= self
8421 if n_id
!= null then
8424 _n_args
= new List[PExpr]
8430 _n_assign
= n_assign
8431 if n_assign
!= null then
8432 n_assign
.parent
= self
8435 if n_value
!= null then
8436 n_value
.parent
= self
8440 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8442 assert old_child
!= null
8443 if _n_expr
== old_child
then
8444 if new_child
!= null then
8445 new_child
.parent
= self
8446 assert new_child
isa PExpr
8453 if _n_id
== old_child
then
8454 if new_child
!= null then
8455 new_child
.parent
= self
8456 assert new_child
isa TId
8463 for i
in [0.._n_args
.length
[ do
8464 if _n_args
[i
] == old_child
then
8465 if new_child
!= null then
8466 assert new_child
isa PExpr
8467 _n_args
[i
] = new_child
8468 new_child
.parent
= self
8470 _n_args
.remove_at
(i
)
8475 if _n_assign
== old_child
then
8476 if new_child
!= null then
8477 new_child
.parent
= self
8478 assert new_child
isa TAssign
8479 _n_assign
= new_child
8485 if _n_value
== old_child
then
8486 if new_child
!= null then
8487 new_child
.parent
= self
8488 assert new_child
isa PExpr
8489 _n_value
= new_child
8497 redef meth visit_all
(v
: Visitor)
8499 if _n_expr
!= null then
8502 if _n_id
!= null then
8508 if _n_assign
!= null then
8511 if _n_value
!= null then
8516 redef meth visit_all_reverse
(v
: Visitor)
8518 if _n_expr
!= null then
8521 if _n_id
!= null then
8525 var i
= _n_args
.length
8531 if _n_assign
!= null then
8534 if _n_value
!= null then
8539 redef class ACallReassignExpr
8540 redef meth n_expr
=(n
: PExpr)
8547 redef meth n_id
=(n
: TId)
8554 redef meth n_assign_op
=(n
: PAssignOp)
8561 redef meth n_value
=(n
: PExpr)
8569 private init empty_init
do end
8571 init init_acallreassignexpr
(
8574 n_args
: Collection[Object] , # Should be Collection[PExpr]
8575 n_assign_op
: PAssignOp ,
8581 if n_expr
!= null then
8582 n_expr
.parent
= self
8585 if n_id
!= null then
8588 _n_args
= new List[PExpr]
8594 _n_assign_op
= n_assign_op
8595 if n_assign_op
!= null then
8596 n_assign_op
.parent
= self
8599 if n_value
!= null then
8600 n_value
.parent
= self
8604 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8606 assert old_child
!= null
8607 if _n_expr
== old_child
then
8608 if new_child
!= null then
8609 new_child
.parent
= self
8610 assert new_child
isa PExpr
8617 if _n_id
== old_child
then
8618 if new_child
!= null then
8619 new_child
.parent
= self
8620 assert new_child
isa TId
8627 for i
in [0.._n_args
.length
[ do
8628 if _n_args
[i
] == old_child
then
8629 if new_child
!= null then
8630 assert new_child
isa PExpr
8631 _n_args
[i
] = new_child
8632 new_child
.parent
= self
8634 _n_args
.remove_at
(i
)
8639 if _n_assign_op
== old_child
then
8640 if new_child
!= null then
8641 new_child
.parent
= self
8642 assert new_child
isa PAssignOp
8643 _n_assign_op
= new_child
8649 if _n_value
== old_child
then
8650 if new_child
!= null then
8651 new_child
.parent
= self
8652 assert new_child
isa PExpr
8653 _n_value
= new_child
8661 redef meth visit_all
(v
: Visitor)
8663 if _n_expr
!= null then
8666 if _n_id
!= null then
8672 if _n_assign_op
!= null then
8673 v
.visit
(_n_assign_op
)
8675 if _n_value
!= null then
8680 redef meth visit_all_reverse
(v
: Visitor)
8682 if _n_expr
!= null then
8685 if _n_id
!= null then
8689 var i
= _n_args
.length
8695 if _n_assign_op
!= null then
8696 v
.visit
(_n_assign_op
)
8698 if _n_value
!= null then
8703 redef class ASuperExpr
8704 redef meth n_qualified
=(n
: PQualified)
8711 redef meth n_kwsuper
=(n
: TKwsuper)
8719 private init empty_init
do end
8721 init init_asuperexpr
(
8722 n_qualified
: PQualified ,
8723 n_kwsuper
: TKwsuper ,
8724 n_args
: Collection[Object] # Should be Collection[PExpr]
8728 _n_qualified
= n_qualified
8729 if n_qualified
!= null then
8730 n_qualified
.parent
= self
8732 _n_kwsuper
= n_kwsuper
8733 if n_kwsuper
!= null then
8734 n_kwsuper
.parent
= self
8736 _n_args
= new List[PExpr]
8744 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8746 assert old_child
!= null
8747 if _n_qualified
== old_child
then
8748 if new_child
!= null then
8749 new_child
.parent
= self
8750 assert new_child
isa PQualified
8751 _n_qualified
= new_child
8757 if _n_kwsuper
== old_child
then
8758 if new_child
!= null then
8759 new_child
.parent
= self
8760 assert new_child
isa TKwsuper
8761 _n_kwsuper
= new_child
8767 for i
in [0.._n_args
.length
[ do
8768 if _n_args
[i
] == old_child
then
8769 if new_child
!= null then
8770 assert new_child
isa PExpr
8771 _n_args
[i
] = new_child
8772 new_child
.parent
= self
8774 _n_args
.remove_at
(i
)
8781 redef meth visit_all
(v
: Visitor)
8783 if _n_qualified
!= null then
8784 v
.visit
(_n_qualified
)
8786 if _n_kwsuper
!= null then
8794 redef meth visit_all_reverse
(v
: Visitor)
8796 if _n_qualified
!= null then
8797 v
.visit
(_n_qualified
)
8799 if _n_kwsuper
!= null then
8803 var i
= _n_args
.length
8811 redef class AInitExpr
8812 redef meth n_expr
=(n
: PExpr)
8819 redef meth n_kwinit
=(n
: TKwinit)
8827 private init empty_init
do end
8829 init init_ainitexpr
(
8832 n_args
: Collection[Object] # Should be Collection[PExpr]
8837 if n_expr
!= null then
8838 n_expr
.parent
= self
8840 _n_kwinit
= n_kwinit
8841 if n_kwinit
!= null then
8842 n_kwinit
.parent
= self
8844 _n_args
= new List[PExpr]
8852 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8854 assert old_child
!= null
8855 if _n_expr
== old_child
then
8856 if new_child
!= null then
8857 new_child
.parent
= self
8858 assert new_child
isa PExpr
8865 if _n_kwinit
== old_child
then
8866 if new_child
!= null then
8867 new_child
.parent
= self
8868 assert new_child
isa TKwinit
8869 _n_kwinit
= new_child
8875 for i
in [0.._n_args
.length
[ do
8876 if _n_args
[i
] == old_child
then
8877 if new_child
!= null then
8878 assert new_child
isa PExpr
8879 _n_args
[i
] = new_child
8880 new_child
.parent
= self
8882 _n_args
.remove_at
(i
)
8889 redef meth visit_all
(v
: Visitor)
8891 if _n_expr
!= null then
8894 if _n_kwinit
!= null then
8902 redef meth visit_all_reverse
(v
: Visitor)
8904 if _n_expr
!= null then
8907 if _n_kwinit
!= null then
8911 var i
= _n_args
.length
8919 redef class ABraExpr
8920 redef meth n_expr
=(n
: PExpr)
8928 private init empty_init
do end
8930 init init_abraexpr
(
8932 n_args
: Collection[Object] , # Should be Collection[PExpr]
8933 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
8938 if n_expr
!= null then
8939 n_expr
.parent
= self
8941 _n_args
= new List[PExpr]
8947 _n_closure_defs
= new List[PClosureDef]
8948 for n
in n_closure_defs
do
8949 assert n
isa PClosureDef
8950 _n_closure_defs
.add
(n
)
8955 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8957 assert old_child
!= null
8958 if _n_expr
== old_child
then
8959 if new_child
!= null then
8960 new_child
.parent
= self
8961 assert new_child
isa PExpr
8968 for i
in [0.._n_args
.length
[ do
8969 if _n_args
[i
] == old_child
then
8970 if new_child
!= null then
8971 assert new_child
isa PExpr
8972 _n_args
[i
] = new_child
8973 new_child
.parent
= self
8975 _n_args
.remove_at
(i
)
8980 for i
in [0.._n_closure_defs
.length
[ do
8981 if _n_closure_defs
[i
] == old_child
then
8982 if new_child
!= null then
8983 assert new_child
isa PClosureDef
8984 _n_closure_defs
[i
] = new_child
8985 new_child
.parent
= self
8987 _n_closure_defs
.remove_at
(i
)
8994 redef meth visit_all
(v
: Visitor)
8996 if _n_expr
!= null then
9002 for n
in _n_closure_defs
do
9007 redef meth visit_all_reverse
(v
: Visitor)
9009 if _n_expr
!= null then
9013 var i
= _n_args
.length
9020 var i
= _n_closure_defs
.length
9022 v
.visit
(_n_closure_defs
[i
])
9028 redef class ABraAssignExpr
9029 redef meth n_expr
=(n
: PExpr)
9036 redef meth n_assign
=(n
: TAssign)
9043 redef meth n_value
=(n
: PExpr)
9051 private init empty_init
do end
9053 init init_abraassignexpr
(
9055 n_args
: Collection[Object] , # Should be Collection[PExpr]
9062 if n_expr
!= null then
9063 n_expr
.parent
= self
9065 _n_args
= new List[PExpr]
9071 _n_assign
= n_assign
9072 if n_assign
!= null then
9073 n_assign
.parent
= self
9076 if n_value
!= null then
9077 n_value
.parent
= self
9081 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9083 assert old_child
!= null
9084 if _n_expr
== old_child
then
9085 if new_child
!= null then
9086 new_child
.parent
= self
9087 assert new_child
isa PExpr
9094 for i
in [0.._n_args
.length
[ do
9095 if _n_args
[i
] == old_child
then
9096 if new_child
!= null then
9097 assert new_child
isa PExpr
9098 _n_args
[i
] = new_child
9099 new_child
.parent
= self
9101 _n_args
.remove_at
(i
)
9106 if _n_assign
== old_child
then
9107 if new_child
!= null then
9108 new_child
.parent
= self
9109 assert new_child
isa TAssign
9110 _n_assign
= new_child
9116 if _n_value
== old_child
then
9117 if new_child
!= null then
9118 new_child
.parent
= self
9119 assert new_child
isa PExpr
9120 _n_value
= new_child
9128 redef meth visit_all
(v
: Visitor)
9130 if _n_expr
!= null then
9136 if _n_assign
!= null then
9139 if _n_value
!= null then
9144 redef meth visit_all_reverse
(v
: Visitor)
9146 if _n_expr
!= null then
9150 var i
= _n_args
.length
9156 if _n_assign
!= null then
9159 if _n_value
!= null then
9164 redef class ABraReassignExpr
9165 redef meth n_expr
=(n
: PExpr)
9172 redef meth n_assign_op
=(n
: PAssignOp)
9179 redef meth n_value
=(n
: PExpr)
9187 private init empty_init
do end
9189 init init_abrareassignexpr
(
9191 n_args
: Collection[Object] , # Should be Collection[PExpr]
9192 n_assign_op
: PAssignOp ,
9198 if n_expr
!= null then
9199 n_expr
.parent
= self
9201 _n_args
= new List[PExpr]
9207 _n_assign_op
= n_assign_op
9208 if n_assign_op
!= null then
9209 n_assign_op
.parent
= self
9212 if n_value
!= null then
9213 n_value
.parent
= self
9217 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9219 assert old_child
!= null
9220 if _n_expr
== old_child
then
9221 if new_child
!= null then
9222 new_child
.parent
= self
9223 assert new_child
isa PExpr
9230 for i
in [0.._n_args
.length
[ do
9231 if _n_args
[i
] == old_child
then
9232 if new_child
!= null then
9233 assert new_child
isa PExpr
9234 _n_args
[i
] = new_child
9235 new_child
.parent
= self
9237 _n_args
.remove_at
(i
)
9242 if _n_assign_op
== old_child
then
9243 if new_child
!= null then
9244 new_child
.parent
= self
9245 assert new_child
isa PAssignOp
9246 _n_assign_op
= new_child
9252 if _n_value
== old_child
then
9253 if new_child
!= null then
9254 new_child
.parent
= self
9255 assert new_child
isa PExpr
9256 _n_value
= new_child
9264 redef meth visit_all
(v
: Visitor)
9266 if _n_expr
!= null then
9272 if _n_assign_op
!= null then
9273 v
.visit
(_n_assign_op
)
9275 if _n_value
!= null then
9280 redef meth visit_all_reverse
(v
: Visitor)
9282 if _n_expr
!= null then
9286 var i
= _n_args
.length
9292 if _n_assign_op
!= null then
9293 v
.visit
(_n_assign_op
)
9295 if _n_value
!= null then
9300 redef class AClosureCallExpr
9301 redef meth n_id
=(n
: TId)
9309 private init empty_init
do end
9311 init init_aclosurecallexpr
(
9313 n_args
: Collection[Object] , # Should be Collection[PExpr]
9314 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
9319 if n_id
!= null then
9322 _n_args
= new List[PExpr]
9328 _n_closure_defs
= new List[PClosureDef]
9329 for n
in n_closure_defs
do
9330 assert n
isa PClosureDef
9331 _n_closure_defs
.add
(n
)
9336 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9338 assert old_child
!= null
9339 if _n_id
== old_child
then
9340 if new_child
!= null then
9341 new_child
.parent
= self
9342 assert new_child
isa TId
9349 for i
in [0.._n_args
.length
[ do
9350 if _n_args
[i
] == old_child
then
9351 if new_child
!= null then
9352 assert new_child
isa PExpr
9353 _n_args
[i
] = new_child
9354 new_child
.parent
= self
9356 _n_args
.remove_at
(i
)
9361 for i
in [0.._n_closure_defs
.length
[ do
9362 if _n_closure_defs
[i
] == old_child
then
9363 if new_child
!= null then
9364 assert new_child
isa PClosureDef
9365 _n_closure_defs
[i
] = new_child
9366 new_child
.parent
= self
9368 _n_closure_defs
.remove_at
(i
)
9375 redef meth visit_all
(v
: Visitor)
9377 if _n_id
!= null then
9383 for n
in _n_closure_defs
do
9388 redef meth visit_all_reverse
(v
: Visitor)
9390 if _n_id
!= null then
9394 var i
= _n_args
.length
9401 var i
= _n_closure_defs
.length
9403 v
.visit
(_n_closure_defs
[i
])
9409 redef class AVarExpr
9410 redef meth n_id
=(n
: TId)
9418 private init empty_init
do end
9420 init init_avarexpr
(
9426 if n_id
!= null then
9431 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9433 assert old_child
!= null
9434 if _n_id
== old_child
then
9435 if new_child
!= null then
9436 new_child
.parent
= self
9437 assert new_child
isa TId
9446 redef meth visit_all
(v
: Visitor)
9448 if _n_id
!= null then
9453 redef meth visit_all_reverse
(v
: Visitor)
9455 if _n_id
!= null then
9460 redef class AVarAssignExpr
9461 redef meth n_id
=(n
: TId)
9468 redef meth n_assign
=(n
: TAssign)
9475 redef meth n_value
=(n
: PExpr)
9483 private init empty_init
do end
9485 init init_avarassignexpr
(
9493 if n_id
!= null then
9496 _n_assign
= n_assign
9497 if n_assign
!= null then
9498 n_assign
.parent
= self
9501 if n_value
!= null then
9502 n_value
.parent
= self
9506 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9508 assert old_child
!= null
9509 if _n_id
== old_child
then
9510 if new_child
!= null then
9511 new_child
.parent
= self
9512 assert new_child
isa TId
9519 if _n_assign
== old_child
then
9520 if new_child
!= null then
9521 new_child
.parent
= self
9522 assert new_child
isa TAssign
9523 _n_assign
= new_child
9529 if _n_value
== old_child
then
9530 if new_child
!= null then
9531 new_child
.parent
= self
9532 assert new_child
isa PExpr
9533 _n_value
= new_child
9541 redef meth visit_all
(v
: Visitor)
9543 if _n_id
!= null then
9546 if _n_assign
!= null then
9549 if _n_value
!= null then
9554 redef meth visit_all_reverse
(v
: Visitor)
9556 if _n_id
!= null then
9559 if _n_assign
!= null then
9562 if _n_value
!= null then
9567 redef class AVarReassignExpr
9568 redef meth n_id
=(n
: TId)
9575 redef meth n_assign_op
=(n
: PAssignOp)
9582 redef meth n_value
=(n
: PExpr)
9590 private init empty_init
do end
9592 init init_avarreassignexpr
(
9594 n_assign_op
: PAssignOp ,
9600 if n_id
!= null then
9603 _n_assign_op
= n_assign_op
9604 if n_assign_op
!= null then
9605 n_assign_op
.parent
= self
9608 if n_value
!= null then
9609 n_value
.parent
= self
9613 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9615 assert old_child
!= null
9616 if _n_id
== old_child
then
9617 if new_child
!= null then
9618 new_child
.parent
= self
9619 assert new_child
isa TId
9626 if _n_assign_op
== old_child
then
9627 if new_child
!= null then
9628 new_child
.parent
= self
9629 assert new_child
isa PAssignOp
9630 _n_assign_op
= new_child
9636 if _n_value
== old_child
then
9637 if new_child
!= null then
9638 new_child
.parent
= self
9639 assert new_child
isa PExpr
9640 _n_value
= new_child
9648 redef meth visit_all
(v
: Visitor)
9650 if _n_id
!= null then
9653 if _n_assign_op
!= null then
9654 v
.visit
(_n_assign_op
)
9656 if _n_value
!= null then
9661 redef meth visit_all_reverse
(v
: Visitor)
9663 if _n_id
!= null then
9666 if _n_assign_op
!= null then
9667 v
.visit
(_n_assign_op
)
9669 if _n_value
!= null then
9674 redef class ARangeExpr
9675 redef meth n_expr
=(n
: PExpr)
9682 redef meth n_expr2
=(n
: PExpr)
9690 private init empty_init
do end
9692 init init_arangeexpr
(
9699 if n_expr
!= null then
9700 n_expr
.parent
= self
9703 if n_expr2
!= null then
9704 n_expr2
.parent
= self
9708 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9710 assert old_child
!= null
9711 if _n_expr
== old_child
then
9712 if new_child
!= null then
9713 new_child
.parent
= self
9714 assert new_child
isa PExpr
9721 if _n_expr2
== old_child
then
9722 if new_child
!= null then
9723 new_child
.parent
= self
9724 assert new_child
isa PExpr
9725 _n_expr2
= new_child
9733 redef meth visit_all
(v
: Visitor)
9735 if _n_expr
!= null then
9738 if _n_expr2
!= null then
9743 redef meth visit_all_reverse
(v
: Visitor)
9745 if _n_expr
!= null then
9748 if _n_expr2
!= null then
9753 redef class ACrangeExpr
9754 redef meth n_expr
=(n
: PExpr)
9761 redef meth n_expr2
=(n
: PExpr)
9769 private init empty_init
do end
9771 init init_acrangeexpr
(
9778 if n_expr
!= null then
9779 n_expr
.parent
= self
9782 if n_expr2
!= null then
9783 n_expr2
.parent
= self
9787 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9789 assert old_child
!= null
9790 if _n_expr
== old_child
then
9791 if new_child
!= null then
9792 new_child
.parent
= self
9793 assert new_child
isa PExpr
9800 if _n_expr2
== old_child
then
9801 if new_child
!= null then
9802 new_child
.parent
= self
9803 assert new_child
isa PExpr
9804 _n_expr2
= new_child
9812 redef meth visit_all
(v
: Visitor)
9814 if _n_expr
!= null then
9817 if _n_expr2
!= null then
9822 redef meth visit_all_reverse
(v
: Visitor)
9824 if _n_expr
!= null then
9827 if _n_expr2
!= null then
9832 redef class AOrangeExpr
9833 redef meth n_expr
=(n
: PExpr)
9840 redef meth n_expr2
=(n
: PExpr)
9848 private init empty_init
do end
9850 init init_aorangeexpr
(
9857 if n_expr
!= null then
9858 n_expr
.parent
= self
9861 if n_expr2
!= null then
9862 n_expr2
.parent
= self
9866 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9868 assert old_child
!= null
9869 if _n_expr
== old_child
then
9870 if new_child
!= null then
9871 new_child
.parent
= self
9872 assert new_child
isa PExpr
9879 if _n_expr2
== old_child
then
9880 if new_child
!= null then
9881 new_child
.parent
= self
9882 assert new_child
isa PExpr
9883 _n_expr2
= new_child
9891 redef meth visit_all
(v
: Visitor)
9893 if _n_expr
!= null then
9896 if _n_expr2
!= null then
9901 redef meth visit_all_reverse
(v
: Visitor)
9903 if _n_expr
!= null then
9906 if _n_expr2
!= null then
9911 redef class AArrayExpr
9913 private init empty_init
do end
9915 init init_aarrayexpr
(
9916 n_exprs
: Collection[Object] # Should be Collection[PExpr]
9920 _n_exprs
= new List[PExpr]
9928 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9930 assert old_child
!= null
9931 for i
in [0.._n_exprs
.length
[ do
9932 if _n_exprs
[i
] == old_child
then
9933 if new_child
!= null then
9934 assert new_child
isa PExpr
9935 _n_exprs
[i
] = new_child
9936 new_child
.parent
= self
9938 _n_exprs
.remove_at
(i
)
9945 redef meth visit_all
(v
: Visitor)
9947 for n
in _n_exprs
do
9952 redef meth visit_all_reverse
(v
: Visitor)
9955 var i
= _n_exprs
.length
9957 v
.visit
(_n_exprs
[i
])
9963 redef class ASelfExpr
9964 redef meth n_kwself
=(n
: TKwself)
9972 private init empty_init
do end
9974 init init_aselfexpr
(
9979 _n_kwself
= n_kwself
9980 if n_kwself
!= null then
9981 n_kwself
.parent
= self
9985 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9987 assert old_child
!= null
9988 if _n_kwself
== old_child
then
9989 if new_child
!= null then
9990 new_child
.parent
= self
9991 assert new_child
isa TKwself
9992 _n_kwself
= new_child
10000 redef meth visit_all
(v
: Visitor)
10002 if _n_kwself
!= null then
10007 redef meth visit_all_reverse
(v
: Visitor)
10009 if _n_kwself
!= null then
10014 redef class AImplicitSelfExpr
10016 private init empty_init
do end
10018 init init_aimplicitselfexpr
10023 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10025 assert old_child
!= null
10028 redef meth visit_all
(v
: Visitor)
10032 redef meth visit_all_reverse
(v
: Visitor)
10036 redef class ATrueExpr
10037 redef meth n_kwtrue
=(n
: TKwtrue)
10045 private init empty_init
do end
10047 init init_atrueexpr
(
10052 _n_kwtrue
= n_kwtrue
10053 if n_kwtrue
!= null then
10054 n_kwtrue
.parent
= self
10058 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10060 assert old_child
!= null
10061 if _n_kwtrue
== old_child
then
10062 if new_child
!= null then
10063 new_child
.parent
= self
10064 assert new_child
isa TKwtrue
10065 _n_kwtrue
= new_child
10073 redef meth visit_all
(v
: Visitor)
10075 if _n_kwtrue
!= null then
10080 redef meth visit_all_reverse
(v
: Visitor)
10082 if _n_kwtrue
!= null then
10087 redef class AFalseExpr
10088 redef meth n_kwfalse
=(n
: TKwfalse)
10096 private init empty_init
do end
10098 init init_afalseexpr
(
10099 n_kwfalse
: TKwfalse
10103 _n_kwfalse
= n_kwfalse
10104 if n_kwfalse
!= null then
10105 n_kwfalse
.parent
= self
10109 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10111 assert old_child
!= null
10112 if _n_kwfalse
== old_child
then
10113 if new_child
!= null then
10114 new_child
.parent
= self
10115 assert new_child
isa TKwfalse
10116 _n_kwfalse
= new_child
10124 redef meth visit_all
(v
: Visitor)
10126 if _n_kwfalse
!= null then
10127 v
.visit
(_n_kwfalse
)
10131 redef meth visit_all_reverse
(v
: Visitor)
10133 if _n_kwfalse
!= null then
10134 v
.visit
(_n_kwfalse
)
10138 redef class ANullExpr
10139 redef meth n_kwnull
=(n
: TKwnull)
10147 private init empty_init
do end
10149 init init_anullexpr
(
10154 _n_kwnull
= n_kwnull
10155 if n_kwnull
!= null then
10156 n_kwnull
.parent
= self
10160 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10162 assert old_child
!= null
10163 if _n_kwnull
== old_child
then
10164 if new_child
!= null then
10165 new_child
.parent
= self
10166 assert new_child
isa TKwnull
10167 _n_kwnull
= new_child
10175 redef meth visit_all
(v
: Visitor)
10177 if _n_kwnull
!= null then
10182 redef meth visit_all_reverse
(v
: Visitor)
10184 if _n_kwnull
!= null then
10189 redef class AIntExpr
10190 redef meth n_number
=(n
: TNumber)
10198 private init empty_init
do end
10200 init init_aintexpr
(
10205 _n_number
= n_number
10206 if n_number
!= null then
10207 n_number
.parent
= self
10211 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10213 assert old_child
!= null
10214 if _n_number
== old_child
then
10215 if new_child
!= null then
10216 new_child
.parent
= self
10217 assert new_child
isa TNumber
10218 _n_number
= new_child
10226 redef meth visit_all
(v
: Visitor)
10228 if _n_number
!= null then
10233 redef meth visit_all_reverse
(v
: Visitor)
10235 if _n_number
!= null then
10240 redef class AFloatExpr
10241 redef meth n_float
=(n
: TFloat)
10249 private init empty_init
do end
10251 init init_afloatexpr
(
10257 if n_float
!= null then
10258 n_float
.parent
= self
10262 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10264 assert old_child
!= null
10265 if _n_float
== old_child
then
10266 if new_child
!= null then
10267 new_child
.parent
= self
10268 assert new_child
isa TFloat
10269 _n_float
= new_child
10277 redef meth visit_all
(v
: Visitor)
10279 if _n_float
!= null then
10284 redef meth visit_all_reverse
(v
: Visitor)
10286 if _n_float
!= null then
10291 redef class ACharExpr
10292 redef meth n_char
=(n
: TChar)
10300 private init empty_init
do end
10302 init init_acharexpr
(
10308 if n_char
!= null then
10309 n_char
.parent
= self
10313 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10315 assert old_child
!= null
10316 if _n_char
== old_child
then
10317 if new_child
!= null then
10318 new_child
.parent
= self
10319 assert new_child
isa TChar
10320 _n_char
= new_child
10328 redef meth visit_all
(v
: Visitor)
10330 if _n_char
!= null then
10335 redef meth visit_all_reverse
(v
: Visitor)
10337 if _n_char
!= null then
10342 redef class AStringExpr
10343 redef meth n_string
=(n
: TString)
10351 private init empty_init
do end
10353 init init_astringexpr
(
10358 _n_string
= n_string
10359 if n_string
!= null then
10360 n_string
.parent
= self
10364 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10366 assert old_child
!= null
10367 if _n_string
== old_child
then
10368 if new_child
!= null then
10369 new_child
.parent
= self
10370 assert new_child
isa TString
10371 _n_string
= new_child
10379 redef meth visit_all
(v
: Visitor)
10381 if _n_string
!= null then
10386 redef meth visit_all_reverse
(v
: Visitor)
10388 if _n_string
!= null then
10393 redef class AStartStringExpr
10394 redef meth n_string
=(n
: TStartString)
10402 private init empty_init
do end
10404 init init_astartstringexpr
(
10405 n_string
: TStartString
10409 _n_string
= n_string
10410 if n_string
!= null then
10411 n_string
.parent
= self
10415 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10417 assert old_child
!= null
10418 if _n_string
== old_child
then
10419 if new_child
!= null then
10420 new_child
.parent
= self
10421 assert new_child
isa TStartString
10422 _n_string
= new_child
10430 redef meth visit_all
(v
: Visitor)
10432 if _n_string
!= null then
10437 redef meth visit_all_reverse
(v
: Visitor)
10439 if _n_string
!= null then
10444 redef class AMidStringExpr
10445 redef meth n_string
=(n
: TMidString)
10453 private init empty_init
do end
10455 init init_amidstringexpr
(
10456 n_string
: TMidString
10460 _n_string
= n_string
10461 if n_string
!= null then
10462 n_string
.parent
= self
10466 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10468 assert old_child
!= null
10469 if _n_string
== old_child
then
10470 if new_child
!= null then
10471 new_child
.parent
= self
10472 assert new_child
isa TMidString
10473 _n_string
= new_child
10481 redef meth visit_all
(v
: Visitor)
10483 if _n_string
!= null then
10488 redef meth visit_all_reverse
(v
: Visitor)
10490 if _n_string
!= null then
10495 redef class AEndStringExpr
10496 redef meth n_string
=(n
: TEndString)
10504 private init empty_init
do end
10506 init init_aendstringexpr
(
10507 n_string
: TEndString
10511 _n_string
= n_string
10512 if n_string
!= null then
10513 n_string
.parent
= self
10517 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10519 assert old_child
!= null
10520 if _n_string
== old_child
then
10521 if new_child
!= null then
10522 new_child
.parent
= self
10523 assert new_child
isa TEndString
10524 _n_string
= new_child
10532 redef meth visit_all
(v
: Visitor)
10534 if _n_string
!= null then
10539 redef meth visit_all_reverse
(v
: Visitor)
10541 if _n_string
!= null then
10546 redef class ASuperstringExpr
10548 private init empty_init
do end
10550 init init_asuperstringexpr
(
10551 n_exprs
: Collection[Object] # Should be Collection[PExpr]
10555 _n_exprs
= new List[PExpr]
10556 for n
in n_exprs
do
10563 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10565 assert old_child
!= null
10566 for i
in [0.._n_exprs
.length
[ do
10567 if _n_exprs
[i
] == old_child
then
10568 if new_child
!= null then
10569 assert new_child
isa PExpr
10570 _n_exprs
[i
] = new_child
10571 new_child
.parent
= self
10573 _n_exprs
.remove_at
(i
)
10580 redef meth visit_all
(v
: Visitor)
10582 for n
in _n_exprs
do
10587 redef meth visit_all_reverse
(v
: Visitor)
10590 var i
= _n_exprs
.length
10592 v
.visit
(_n_exprs
[i
])
10598 redef class AParExpr
10599 redef meth n_expr
=(n
: PExpr)
10607 private init empty_init
do end
10609 init init_aparexpr
(
10615 if n_expr
!= null then
10616 n_expr
.parent
= self
10620 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10622 assert old_child
!= null
10623 if _n_expr
== old_child
then
10624 if new_child
!= null then
10625 new_child
.parent
= self
10626 assert new_child
isa PExpr
10627 _n_expr
= new_child
10635 redef meth visit_all
(v
: Visitor)
10637 if _n_expr
!= null then
10642 redef meth visit_all_reverse
(v
: Visitor)
10644 if _n_expr
!= null then
10649 redef class AAsCastExpr
10650 redef meth n_expr
=(n
: PExpr)
10657 redef meth n_kwas
=(n
: TKwas)
10664 redef meth n_type
=(n
: PType)
10672 private init empty_init
do end
10674 init init_aascastexpr
(
10682 if n_expr
!= null then
10683 n_expr
.parent
= self
10686 if n_kwas
!= null then
10687 n_kwas
.parent
= self
10690 if n_type
!= null then
10691 n_type
.parent
= self
10695 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10697 assert old_child
!= null
10698 if _n_expr
== old_child
then
10699 if new_child
!= null then
10700 new_child
.parent
= self
10701 assert new_child
isa PExpr
10702 _n_expr
= new_child
10708 if _n_kwas
== old_child
then
10709 if new_child
!= null then
10710 new_child
.parent
= self
10711 assert new_child
isa TKwas
10712 _n_kwas
= new_child
10718 if _n_type
== old_child
then
10719 if new_child
!= null then
10720 new_child
.parent
= self
10721 assert new_child
isa PType
10722 _n_type
= new_child
10730 redef meth visit_all
(v
: Visitor)
10732 if _n_expr
!= null then
10735 if _n_kwas
!= null then
10738 if _n_type
!= null then
10743 redef meth visit_all_reverse
(v
: Visitor)
10745 if _n_expr
!= null then
10748 if _n_kwas
!= null then
10751 if _n_type
!= null then
10756 redef class AAsNotnullExpr
10757 redef meth n_expr
=(n
: PExpr)
10764 redef meth n_kwas
=(n
: TKwas)
10771 redef meth n_kwnot
=(n
: TKwnot)
10778 redef meth n_kwnull
=(n
: TKwnull)
10786 private init empty_init
do end
10788 init init_aasnotnullexpr
(
10797 if n_expr
!= null then
10798 n_expr
.parent
= self
10801 if n_kwas
!= null then
10802 n_kwas
.parent
= self
10805 if n_kwnot
!= null then
10806 n_kwnot
.parent
= self
10808 _n_kwnull
= n_kwnull
10809 if n_kwnull
!= null then
10810 n_kwnull
.parent
= self
10814 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10816 assert old_child
!= null
10817 if _n_expr
== old_child
then
10818 if new_child
!= null then
10819 new_child
.parent
= self
10820 assert new_child
isa PExpr
10821 _n_expr
= new_child
10827 if _n_kwas
== old_child
then
10828 if new_child
!= null then
10829 new_child
.parent
= self
10830 assert new_child
isa TKwas
10831 _n_kwas
= new_child
10837 if _n_kwnot
== old_child
then
10838 if new_child
!= null then
10839 new_child
.parent
= self
10840 assert new_child
isa TKwnot
10841 _n_kwnot
= new_child
10847 if _n_kwnull
== old_child
then
10848 if new_child
!= null then
10849 new_child
.parent
= self
10850 assert new_child
isa TKwnull
10851 _n_kwnull
= new_child
10859 redef meth visit_all
(v
: Visitor)
10861 if _n_expr
!= null then
10864 if _n_kwas
!= null then
10867 if _n_kwnot
!= null then
10870 if _n_kwnull
!= null then
10875 redef meth visit_all_reverse
(v
: Visitor)
10877 if _n_expr
!= null then
10880 if _n_kwas
!= null then
10883 if _n_kwnot
!= null then
10886 if _n_kwnull
!= null then
10891 redef class AIssetAttrExpr
10892 redef meth n_kwisset
=(n
: TKwisset)
10899 redef meth n_expr
=(n
: PExpr)
10906 redef meth n_id
=(n
: TAttrid)
10914 private init empty_init
do end
10916 init init_aissetattrexpr
(
10917 n_kwisset
: TKwisset ,
10923 _n_kwisset
= n_kwisset
10924 if n_kwisset
!= null then
10925 n_kwisset
.parent
= self
10928 if n_expr
!= null then
10929 n_expr
.parent
= self
10932 if n_id
!= null then
10937 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10939 assert old_child
!= null
10940 if _n_kwisset
== old_child
then
10941 if new_child
!= null then
10942 new_child
.parent
= self
10943 assert new_child
isa TKwisset
10944 _n_kwisset
= new_child
10950 if _n_expr
== old_child
then
10951 if new_child
!= null then
10952 new_child
.parent
= self
10953 assert new_child
isa PExpr
10954 _n_expr
= new_child
10960 if _n_id
== old_child
then
10961 if new_child
!= null then
10962 new_child
.parent
= self
10963 assert new_child
isa TAttrid
10972 redef meth visit_all
(v
: Visitor)
10974 if _n_kwisset
!= null then
10975 v
.visit
(_n_kwisset
)
10977 if _n_expr
!= null then
10980 if _n_id
!= null then
10985 redef meth visit_all_reverse
(v
: Visitor)
10987 if _n_kwisset
!= null then
10988 v
.visit
(_n_kwisset
)
10990 if _n_expr
!= null then
10993 if _n_id
!= null then
10998 redef class APlusAssignOp
10999 redef meth n_pluseq
=(n
: TPluseq)
11007 private init empty_init
do end
11009 init init_aplusassignop
(
11014 _n_pluseq
= n_pluseq
11015 if n_pluseq
!= null then
11016 n_pluseq
.parent
= self
11020 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11022 assert old_child
!= null
11023 if _n_pluseq
== old_child
then
11024 if new_child
!= null then
11025 new_child
.parent
= self
11026 assert new_child
isa TPluseq
11027 _n_pluseq
= new_child
11035 redef meth visit_all
(v
: Visitor)
11037 if _n_pluseq
!= null then
11042 redef meth visit_all_reverse
(v
: Visitor)
11044 if _n_pluseq
!= null then
11049 redef class AMinusAssignOp
11050 redef meth n_minuseq
=(n
: TMinuseq)
11058 private init empty_init
do end
11060 init init_aminusassignop
(
11061 n_minuseq
: TMinuseq
11065 _n_minuseq
= n_minuseq
11066 if n_minuseq
!= null then
11067 n_minuseq
.parent
= self
11071 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11073 assert old_child
!= null
11074 if _n_minuseq
== old_child
then
11075 if new_child
!= null then
11076 new_child
.parent
= self
11077 assert new_child
isa TMinuseq
11078 _n_minuseq
= new_child
11086 redef meth visit_all
(v
: Visitor)
11088 if _n_minuseq
!= null then
11089 v
.visit
(_n_minuseq
)
11093 redef meth visit_all_reverse
(v
: Visitor)
11095 if _n_minuseq
!= null then
11096 v
.visit
(_n_minuseq
)
11100 redef class AClosureDef
11101 redef meth n_kwwith
=(n
: TKwwith)
11108 redef meth n_kwdo
=(n
: TKwdo)
11115 redef meth n_expr
=(n
: PExpr)
11123 private init empty_init
do end
11125 init init_aclosuredef
(
11126 n_kwwith
: TKwwith ,
11127 n_id
: Collection[Object] , # Should be Collection[TId]
11133 _n_kwwith
= n_kwwith
11134 if n_kwwith
!= null then
11135 n_kwwith
.parent
= self
11137 _n_id
= new List[TId]
11144 if n_kwdo
!= null then
11145 n_kwdo
.parent
= self
11148 if n_expr
!= null then
11149 n_expr
.parent
= self
11153 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11155 assert old_child
!= null
11156 if _n_kwwith
== old_child
then
11157 if new_child
!= null then
11158 new_child
.parent
= self
11159 assert new_child
isa TKwwith
11160 _n_kwwith
= new_child
11166 for i
in [0.._n_id
.length
[ do
11167 if _n_id
[i
] == old_child
then
11168 if new_child
!= null then
11169 assert new_child
isa TId
11170 _n_id
[i
] = new_child
11171 new_child
.parent
= self
11178 if _n_kwdo
== old_child
then
11179 if new_child
!= null then
11180 new_child
.parent
= self
11181 assert new_child
isa TKwdo
11182 _n_kwdo
= new_child
11188 if _n_expr
== old_child
then
11189 if new_child
!= null then
11190 new_child
.parent
= self
11191 assert new_child
isa PExpr
11192 _n_expr
= new_child
11200 redef meth visit_all
(v
: Visitor)
11202 if _n_kwwith
!= null then
11208 if _n_kwdo
!= null then
11211 if _n_expr
!= null then
11216 redef meth visit_all_reverse
(v
: Visitor)
11218 if _n_kwwith
!= null then
11222 var i
= _n_id
.length
11228 if _n_kwdo
!= null then
11231 if _n_expr
!= null then
11236 redef class AQualified
11237 redef meth n_classid
=(n
: TClassid)
11245 private init empty_init
do end
11247 init init_aqualified
(
11248 n_id
: Collection[Object] , # Should be Collection[TId]
11249 n_classid
: TClassid
11253 _n_id
= new List[TId]
11259 _n_classid
= n_classid
11260 if n_classid
!= null then
11261 n_classid
.parent
= self
11265 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11267 assert old_child
!= null
11268 for i
in [0.._n_id
.length
[ do
11269 if _n_id
[i
] == old_child
then
11270 if new_child
!= null then
11271 assert new_child
isa TId
11272 _n_id
[i
] = new_child
11273 new_child
.parent
= self
11280 if _n_classid
== old_child
then
11281 if new_child
!= null then
11282 new_child
.parent
= self
11283 assert new_child
isa TClassid
11284 _n_classid
= new_child
11292 redef meth visit_all
(v
: Visitor)
11297 if _n_classid
!= null then
11298 v
.visit
(_n_classid
)
11302 redef meth visit_all_reverse
(v
: Visitor)
11305 var i
= _n_id
.length
11311 if _n_classid
!= null then
11312 v
.visit
(_n_classid
)
11318 private init empty_init
do end
11321 n_comment
: Collection[Object] # Should be Collection[TComment]
11325 _n_comment
= new List[TComment]
11326 for n
in n_comment
do
11327 assert n
isa TComment
11333 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11335 assert old_child
!= null
11336 for i
in [0.._n_comment
.length
[ do
11337 if _n_comment
[i
] == old_child
then
11338 if new_child
!= null then
11339 assert new_child
isa TComment
11340 _n_comment
[i
] = new_child
11341 new_child
.parent
= self
11343 _n_comment
.remove_at
(i
)
11350 redef meth visit_all
(v
: Visitor)
11352 for n
in _n_comment
do
11357 redef meth visit_all_reverse
(v
: Visitor)
11360 var i
= _n_comment
.length
11362 v
.visit
(_n_comment
[i
])
11378 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11380 assert old_child
!= null
11381 if _n_base
== old_child
then
11382 if new_child
== null then
11384 new_child
.parent
= self
11385 assert new_child
isa PModule
11386 _n_base
= new_child
11388 old_child
.parent
= null
11393 redef meth visit_all
(v
: Visitor)
11395 if _n_base
!= null then
11400 redef meth visit_all_reverse
(v
: Visitor)
11402 if _n_base
!= null then