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_id
=(n
: TClassid)
4710 private init empty_init
do end
4714 n_types
: Collection[Object] # Should be Collection[PType]
4719 if n_id
!= null then
4722 _n_types
= new List[PType]
4730 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4732 assert old_child
!= null
4733 if _n_id
== old_child
then
4734 if new_child
!= null then
4735 new_child
.parent
= self
4736 assert new_child
isa TClassid
4743 for i
in [0.._n_types
.length
[ do
4744 if _n_types
[i
] == old_child
then
4745 if new_child
!= null then
4746 assert new_child
isa PType
4747 _n_types
[i
] = new_child
4748 new_child
.parent
= self
4750 _n_types
.remove_at
(i
)
4757 redef meth visit_all
(v
: Visitor)
4759 if _n_id
!= null then
4762 for n
in _n_types
do
4767 redef meth visit_all_reverse
(v
: Visitor)
4769 if _n_id
!= null then
4773 var i
= _n_types
.length
4775 v
.visit
(_n_types
[i
])
4781 redef class ABlockExpr
4783 private init empty_init
do end
4785 init init_ablockexpr
(
4786 n_expr
: Collection[Object] # Should be Collection[PExpr]
4790 _n_expr
= new List[PExpr]
4798 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4800 assert old_child
!= null
4801 for i
in [0.._n_expr
.length
[ do
4802 if _n_expr
[i
] == old_child
then
4803 if new_child
!= null then
4804 assert new_child
isa PExpr
4805 _n_expr
[i
] = new_child
4806 new_child
.parent
= self
4808 _n_expr
.remove_at
(i
)
4815 redef meth visit_all
(v
: Visitor)
4822 redef meth visit_all_reverse
(v
: Visitor)
4825 var i
= _n_expr
.length
4833 redef class AVardeclExpr
4834 redef meth n_kwvar
=(n
: TKwvar)
4841 redef meth n_id
=(n
: TId)
4848 redef meth n_type
=(n
: PType)
4855 redef meth n_assign
=(n
: TAssign)
4862 redef meth n_expr
=(n
: PExpr)
4870 private init empty_init
do end
4872 init init_avardeclexpr
(
4882 if n_kwvar
!= null then
4883 n_kwvar
.parent
= self
4886 if n_id
!= null then
4890 if n_type
!= null then
4891 n_type
.parent
= self
4893 _n_assign
= n_assign
4894 if n_assign
!= null then
4895 n_assign
.parent
= self
4898 if n_expr
!= null then
4899 n_expr
.parent
= self
4903 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
4905 assert old_child
!= null
4906 if _n_kwvar
== old_child
then
4907 if new_child
!= null then
4908 new_child
.parent
= self
4909 assert new_child
isa TKwvar
4910 _n_kwvar
= new_child
4916 if _n_id
== old_child
then
4917 if new_child
!= null then
4918 new_child
.parent
= self
4919 assert new_child
isa TId
4926 if _n_type
== old_child
then
4927 if new_child
!= null then
4928 new_child
.parent
= self
4929 assert new_child
isa PType
4936 if _n_assign
== old_child
then
4937 if new_child
!= null then
4938 new_child
.parent
= self
4939 assert new_child
isa TAssign
4940 _n_assign
= new_child
4946 if _n_expr
== old_child
then
4947 if new_child
!= null then
4948 new_child
.parent
= self
4949 assert new_child
isa PExpr
4958 redef meth visit_all
(v
: Visitor)
4960 if _n_kwvar
!= null then
4963 if _n_id
!= null then
4966 if _n_type
!= null then
4969 if _n_assign
!= null then
4972 if _n_expr
!= null then
4977 redef meth visit_all_reverse
(v
: Visitor)
4979 if _n_kwvar
!= null then
4982 if _n_id
!= null then
4985 if _n_type
!= null then
4988 if _n_assign
!= null then
4991 if _n_expr
!= null then
4996 redef class AReturnExpr
4997 redef meth n_kwreturn
=(n
: TKwreturn)
5004 redef meth n_expr
=(n
: PExpr)
5012 private init empty_init
do end
5014 init init_areturnexpr
(
5015 n_kwreturn
: TKwreturn ,
5020 _n_kwreturn
= n_kwreturn
5021 if n_kwreturn
!= null then
5022 n_kwreturn
.parent
= self
5025 if n_expr
!= null then
5026 n_expr
.parent
= self
5030 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5032 assert old_child
!= null
5033 if _n_kwreturn
== old_child
then
5034 if new_child
!= null then
5035 new_child
.parent
= self
5036 assert new_child
isa TKwreturn
5037 _n_kwreturn
= new_child
5043 if _n_expr
== old_child
then
5044 if new_child
!= null then
5045 new_child
.parent
= self
5046 assert new_child
isa PExpr
5055 redef meth visit_all
(v
: Visitor)
5057 if _n_kwreturn
!= null then
5058 v
.visit
(_n_kwreturn
)
5060 if _n_expr
!= null then
5065 redef meth visit_all_reverse
(v
: Visitor)
5067 if _n_kwreturn
!= null then
5068 v
.visit
(_n_kwreturn
)
5070 if _n_expr
!= null then
5075 redef class ABreakExpr
5076 redef meth n_kwbreak
=(n
: TKwbreak)
5083 redef meth n_expr
=(n
: PExpr)
5091 private init empty_init
do end
5093 init init_abreakexpr
(
5094 n_kwbreak
: TKwbreak ,
5099 _n_kwbreak
= n_kwbreak
5100 if n_kwbreak
!= null then
5101 n_kwbreak
.parent
= self
5104 if n_expr
!= null then
5105 n_expr
.parent
= self
5109 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5111 assert old_child
!= null
5112 if _n_kwbreak
== old_child
then
5113 if new_child
!= null then
5114 new_child
.parent
= self
5115 assert new_child
isa TKwbreak
5116 _n_kwbreak
= new_child
5122 if _n_expr
== old_child
then
5123 if new_child
!= null then
5124 new_child
.parent
= self
5125 assert new_child
isa PExpr
5134 redef meth visit_all
(v
: Visitor)
5136 if _n_kwbreak
!= null then
5139 if _n_expr
!= null then
5144 redef meth visit_all_reverse
(v
: Visitor)
5146 if _n_kwbreak
!= null then
5149 if _n_expr
!= null then
5154 redef class AAbortExpr
5155 redef meth n_kwabort
=(n
: TKwabort)
5163 private init empty_init
do end
5165 init init_aabortexpr
(
5170 _n_kwabort
= n_kwabort
5171 if n_kwabort
!= null then
5172 n_kwabort
.parent
= self
5176 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5178 assert old_child
!= null
5179 if _n_kwabort
== old_child
then
5180 if new_child
!= null then
5181 new_child
.parent
= self
5182 assert new_child
isa TKwabort
5183 _n_kwabort
= new_child
5191 redef meth visit_all
(v
: Visitor)
5193 if _n_kwabort
!= null then
5198 redef meth visit_all_reverse
(v
: Visitor)
5200 if _n_kwabort
!= null then
5205 redef class AContinueExpr
5206 redef meth n_kwcontinue
=(n
: TKwcontinue)
5213 redef meth n_expr
=(n
: PExpr)
5221 private init empty_init
do end
5223 init init_acontinueexpr
(
5224 n_kwcontinue
: TKwcontinue ,
5229 _n_kwcontinue
= n_kwcontinue
5230 if n_kwcontinue
!= null then
5231 n_kwcontinue
.parent
= self
5234 if n_expr
!= null then
5235 n_expr
.parent
= self
5239 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5241 assert old_child
!= null
5242 if _n_kwcontinue
== old_child
then
5243 if new_child
!= null then
5244 new_child
.parent
= self
5245 assert new_child
isa TKwcontinue
5246 _n_kwcontinue
= new_child
5248 _n_kwcontinue
= null
5252 if _n_expr
== old_child
then
5253 if new_child
!= null then
5254 new_child
.parent
= self
5255 assert new_child
isa PExpr
5264 redef meth visit_all
(v
: Visitor)
5266 if _n_kwcontinue
!= null then
5267 v
.visit
(_n_kwcontinue
)
5269 if _n_expr
!= null then
5274 redef meth visit_all_reverse
(v
: Visitor)
5276 if _n_kwcontinue
!= null then
5277 v
.visit
(_n_kwcontinue
)
5279 if _n_expr
!= null then
5285 redef meth n_kwdo
=(n
: TKwdo)
5292 redef meth n_block
=(n
: PExpr)
5300 private init empty_init
do end
5309 if n_kwdo
!= null then
5310 n_kwdo
.parent
= self
5313 if n_block
!= null then
5314 n_block
.parent
= self
5318 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5320 assert old_child
!= null
5321 if _n_kwdo
== old_child
then
5322 if new_child
!= null then
5323 new_child
.parent
= self
5324 assert new_child
isa TKwdo
5331 if _n_block
== old_child
then
5332 if new_child
!= null then
5333 new_child
.parent
= self
5334 assert new_child
isa PExpr
5335 _n_block
= new_child
5343 redef meth visit_all
(v
: Visitor)
5345 if _n_kwdo
!= null then
5348 if _n_block
!= null then
5353 redef meth visit_all_reverse
(v
: Visitor)
5355 if _n_kwdo
!= null then
5358 if _n_block
!= null then
5364 redef meth n_kwif
=(n
: TKwif)
5371 redef meth n_expr
=(n
: PExpr)
5378 redef meth n_then
=(n
: PExpr)
5385 redef meth n_else
=(n
: PExpr)
5393 private init empty_init
do end
5404 if n_kwif
!= null then
5405 n_kwif
.parent
= self
5408 if n_expr
!= null then
5409 n_expr
.parent
= self
5412 if n_then
!= null then
5413 n_then
.parent
= self
5416 if n_else
!= null then
5417 n_else
.parent
= self
5421 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5423 assert old_child
!= null
5424 if _n_kwif
== old_child
then
5425 if new_child
!= null then
5426 new_child
.parent
= self
5427 assert new_child
isa TKwif
5434 if _n_expr
== old_child
then
5435 if new_child
!= null then
5436 new_child
.parent
= self
5437 assert new_child
isa PExpr
5444 if _n_then
== old_child
then
5445 if new_child
!= null then
5446 new_child
.parent
= self
5447 assert new_child
isa PExpr
5454 if _n_else
== old_child
then
5455 if new_child
!= null then
5456 new_child
.parent
= self
5457 assert new_child
isa PExpr
5466 redef meth visit_all
(v
: Visitor)
5468 if _n_kwif
!= null then
5471 if _n_expr
!= null then
5474 if _n_then
!= null then
5477 if _n_else
!= null then
5482 redef meth visit_all_reverse
(v
: Visitor)
5484 if _n_kwif
!= null then
5487 if _n_expr
!= null then
5490 if _n_then
!= null then
5493 if _n_else
!= null then
5498 redef class AIfexprExpr
5499 redef meth n_kwif
=(n
: TKwif)
5506 redef meth n_expr
=(n
: PExpr)
5513 redef meth n_kwthen
=(n
: TKwthen)
5520 redef meth n_then
=(n
: PExpr)
5527 redef meth n_kwelse
=(n
: TKwelse)
5534 redef meth n_else
=(n
: PExpr)
5542 private init empty_init
do end
5544 init init_aifexprexpr
(
5555 if n_kwif
!= null then
5556 n_kwif
.parent
= self
5559 if n_expr
!= null then
5560 n_expr
.parent
= self
5562 _n_kwthen
= n_kwthen
5563 if n_kwthen
!= null then
5564 n_kwthen
.parent
= self
5567 if n_then
!= null then
5568 n_then
.parent
= self
5570 _n_kwelse
= n_kwelse
5571 if n_kwelse
!= null then
5572 n_kwelse
.parent
= self
5575 if n_else
!= null then
5576 n_else
.parent
= self
5580 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5582 assert old_child
!= null
5583 if _n_kwif
== old_child
then
5584 if new_child
!= null then
5585 new_child
.parent
= self
5586 assert new_child
isa TKwif
5593 if _n_expr
== old_child
then
5594 if new_child
!= null then
5595 new_child
.parent
= self
5596 assert new_child
isa PExpr
5603 if _n_kwthen
== old_child
then
5604 if new_child
!= null then
5605 new_child
.parent
= self
5606 assert new_child
isa TKwthen
5607 _n_kwthen
= new_child
5613 if _n_then
== old_child
then
5614 if new_child
!= null then
5615 new_child
.parent
= self
5616 assert new_child
isa PExpr
5623 if _n_kwelse
== old_child
then
5624 if new_child
!= null then
5625 new_child
.parent
= self
5626 assert new_child
isa TKwelse
5627 _n_kwelse
= new_child
5633 if _n_else
== old_child
then
5634 if new_child
!= null then
5635 new_child
.parent
= self
5636 assert new_child
isa PExpr
5645 redef meth visit_all
(v
: Visitor)
5647 if _n_kwif
!= null then
5650 if _n_expr
!= null then
5653 if _n_kwthen
!= null then
5656 if _n_then
!= null then
5659 if _n_kwelse
!= null then
5662 if _n_else
!= null then
5667 redef meth visit_all_reverse
(v
: Visitor)
5669 if _n_kwif
!= null then
5672 if _n_expr
!= null then
5675 if _n_kwthen
!= null then
5678 if _n_then
!= null then
5681 if _n_kwelse
!= null then
5684 if _n_else
!= null then
5689 redef class AWhileExpr
5690 redef meth n_kwwhile
=(n
: TKwwhile)
5697 redef meth n_expr
=(n
: PExpr)
5704 redef meth n_kwdo
=(n
: TKwdo)
5711 redef meth n_block
=(n
: PExpr)
5719 private init empty_init
do end
5721 init init_awhileexpr
(
5722 n_kwwhile
: TKwwhile ,
5729 _n_kwwhile
= n_kwwhile
5730 if n_kwwhile
!= null then
5731 n_kwwhile
.parent
= self
5734 if n_expr
!= null then
5735 n_expr
.parent
= self
5738 if n_kwdo
!= null then
5739 n_kwdo
.parent
= self
5742 if n_block
!= null then
5743 n_block
.parent
= self
5747 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5749 assert old_child
!= null
5750 if _n_kwwhile
== old_child
then
5751 if new_child
!= null then
5752 new_child
.parent
= self
5753 assert new_child
isa TKwwhile
5754 _n_kwwhile
= new_child
5760 if _n_expr
== old_child
then
5761 if new_child
!= null then
5762 new_child
.parent
= self
5763 assert new_child
isa PExpr
5770 if _n_kwdo
== old_child
then
5771 if new_child
!= null then
5772 new_child
.parent
= self
5773 assert new_child
isa TKwdo
5780 if _n_block
== old_child
then
5781 if new_child
!= null then
5782 new_child
.parent
= self
5783 assert new_child
isa PExpr
5784 _n_block
= new_child
5792 redef meth visit_all
(v
: Visitor)
5794 if _n_kwwhile
!= null then
5797 if _n_expr
!= null then
5800 if _n_kwdo
!= null then
5803 if _n_block
!= null then
5808 redef meth visit_all_reverse
(v
: Visitor)
5810 if _n_kwwhile
!= null then
5813 if _n_expr
!= null then
5816 if _n_kwdo
!= null then
5819 if _n_block
!= null then
5824 redef class AForExpr
5825 redef meth n_kwfor
=(n
: TKwfor)
5832 redef meth n_id
=(n
: TId)
5839 redef meth n_expr
=(n
: PExpr)
5846 redef meth n_kwdo
=(n
: TKwdo)
5853 redef meth n_block
=(n
: PExpr)
5861 private init empty_init
do end
5863 init init_aforexpr
(
5873 if n_kwfor
!= null then
5874 n_kwfor
.parent
= self
5877 if n_id
!= null then
5881 if n_expr
!= null then
5882 n_expr
.parent
= self
5885 if n_kwdo
!= null then
5886 n_kwdo
.parent
= self
5889 if n_block
!= null then
5890 n_block
.parent
= self
5894 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
5896 assert old_child
!= null
5897 if _n_kwfor
== old_child
then
5898 if new_child
!= null then
5899 new_child
.parent
= self
5900 assert new_child
isa TKwfor
5901 _n_kwfor
= new_child
5907 if _n_id
== old_child
then
5908 if new_child
!= null then
5909 new_child
.parent
= self
5910 assert new_child
isa TId
5917 if _n_expr
== old_child
then
5918 if new_child
!= null then
5919 new_child
.parent
= self
5920 assert new_child
isa PExpr
5927 if _n_kwdo
== old_child
then
5928 if new_child
!= null then
5929 new_child
.parent
= self
5930 assert new_child
isa TKwdo
5937 if _n_block
== old_child
then
5938 if new_child
!= null then
5939 new_child
.parent
= self
5940 assert new_child
isa PExpr
5941 _n_block
= new_child
5949 redef meth visit_all
(v
: Visitor)
5951 if _n_kwfor
!= null then
5954 if _n_id
!= null then
5957 if _n_expr
!= null then
5960 if _n_kwdo
!= null then
5963 if _n_block
!= null then
5968 redef meth visit_all_reverse
(v
: Visitor)
5970 if _n_kwfor
!= null then
5973 if _n_id
!= null then
5976 if _n_expr
!= null then
5979 if _n_kwdo
!= null then
5982 if _n_block
!= null then
5987 redef class AAssertExpr
5988 redef meth n_kwassert
=(n
: TKwassert)
5995 redef meth n_id
=(n
: TId)
6002 redef meth n_expr
=(n
: PExpr)
6010 private init empty_init
do end
6012 init init_aassertexpr
(
6013 n_kwassert
: TKwassert ,
6019 _n_kwassert
= n_kwassert
6020 if n_kwassert
!= null then
6021 n_kwassert
.parent
= self
6024 if n_id
!= null then
6028 if n_expr
!= null then
6029 n_expr
.parent
= self
6033 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6035 assert old_child
!= null
6036 if _n_kwassert
== old_child
then
6037 if new_child
!= null then
6038 new_child
.parent
= self
6039 assert new_child
isa TKwassert
6040 _n_kwassert
= new_child
6046 if _n_id
== old_child
then
6047 if new_child
!= null then
6048 new_child
.parent
= self
6049 assert new_child
isa TId
6056 if _n_expr
== old_child
then
6057 if new_child
!= null then
6058 new_child
.parent
= self
6059 assert new_child
isa PExpr
6068 redef meth visit_all
(v
: Visitor)
6070 if _n_kwassert
!= null then
6071 v
.visit
(_n_kwassert
)
6073 if _n_id
!= null then
6076 if _n_expr
!= null then
6081 redef meth visit_all_reverse
(v
: Visitor)
6083 if _n_kwassert
!= null then
6084 v
.visit
(_n_kwassert
)
6086 if _n_id
!= null then
6089 if _n_expr
!= null then
6094 redef class AOnceExpr
6095 redef meth n_kwonce
=(n
: TKwonce)
6102 redef meth n_expr
=(n
: PExpr)
6110 private init empty_init
do end
6112 init init_aonceexpr
(
6118 _n_kwonce
= n_kwonce
6119 if n_kwonce
!= null then
6120 n_kwonce
.parent
= self
6123 if n_expr
!= null then
6124 n_expr
.parent
= self
6128 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6130 assert old_child
!= null
6131 if _n_kwonce
== old_child
then
6132 if new_child
!= null then
6133 new_child
.parent
= self
6134 assert new_child
isa TKwonce
6135 _n_kwonce
= new_child
6141 if _n_expr
== old_child
then
6142 if new_child
!= null then
6143 new_child
.parent
= self
6144 assert new_child
isa PExpr
6153 redef meth visit_all
(v
: Visitor)
6155 if _n_kwonce
!= null then
6158 if _n_expr
!= null then
6163 redef meth visit_all_reverse
(v
: Visitor)
6165 if _n_kwonce
!= null then
6168 if _n_expr
!= null then
6173 redef class ASendExpr
6174 redef meth n_expr
=(n
: PExpr)
6182 private init empty_init
do end
6184 init init_asendexpr
(
6190 if n_expr
!= null then
6191 n_expr
.parent
= self
6195 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6197 assert old_child
!= null
6198 if _n_expr
== old_child
then
6199 if new_child
!= null then
6200 new_child
.parent
= self
6201 assert new_child
isa PExpr
6210 redef meth visit_all
(v
: Visitor)
6212 if _n_expr
!= null then
6217 redef meth visit_all_reverse
(v
: Visitor)
6219 if _n_expr
!= null then
6224 redef class ABinopExpr
6225 redef meth n_expr
=(n
: PExpr)
6232 redef meth n_expr2
=(n
: PExpr)
6240 private init empty_init
do end
6242 init init_abinopexpr
(
6249 if n_expr
!= null then
6250 n_expr
.parent
= self
6253 if n_expr2
!= null then
6254 n_expr2
.parent
= self
6258 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6260 assert old_child
!= null
6261 if _n_expr
== old_child
then
6262 if new_child
!= null then
6263 new_child
.parent
= self
6264 assert new_child
isa PExpr
6271 if _n_expr2
== old_child
then
6272 if new_child
!= null then
6273 new_child
.parent
= self
6274 assert new_child
isa PExpr
6275 _n_expr2
= new_child
6283 redef meth visit_all
(v
: Visitor)
6285 if _n_expr
!= null then
6288 if _n_expr2
!= null then
6293 redef meth visit_all_reverse
(v
: Visitor)
6295 if _n_expr
!= null then
6298 if _n_expr2
!= null then
6304 redef meth n_expr
=(n
: PExpr)
6311 redef meth n_expr2
=(n
: PExpr)
6319 private init empty_init
do end
6328 if n_expr
!= null then
6329 n_expr
.parent
= self
6332 if n_expr2
!= null then
6333 n_expr2
.parent
= self
6337 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6339 assert old_child
!= null
6340 if _n_expr
== old_child
then
6341 if new_child
!= null then
6342 new_child
.parent
= self
6343 assert new_child
isa PExpr
6350 if _n_expr2
== old_child
then
6351 if new_child
!= null then
6352 new_child
.parent
= self
6353 assert new_child
isa PExpr
6354 _n_expr2
= new_child
6362 redef meth visit_all
(v
: Visitor)
6364 if _n_expr
!= null then
6367 if _n_expr2
!= null then
6372 redef meth visit_all_reverse
(v
: Visitor)
6374 if _n_expr
!= null then
6377 if _n_expr2
!= null then
6382 redef class AAndExpr
6383 redef meth n_expr
=(n
: PExpr)
6390 redef meth n_expr2
=(n
: PExpr)
6398 private init empty_init
do end
6400 init init_aandexpr
(
6407 if n_expr
!= null then
6408 n_expr
.parent
= self
6411 if n_expr2
!= null then
6412 n_expr2
.parent
= self
6416 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6418 assert old_child
!= null
6419 if _n_expr
== old_child
then
6420 if new_child
!= null then
6421 new_child
.parent
= self
6422 assert new_child
isa PExpr
6429 if _n_expr2
== old_child
then
6430 if new_child
!= null then
6431 new_child
.parent
= self
6432 assert new_child
isa PExpr
6433 _n_expr2
= new_child
6441 redef meth visit_all
(v
: Visitor)
6443 if _n_expr
!= null then
6446 if _n_expr2
!= null then
6451 redef meth visit_all_reverse
(v
: Visitor)
6453 if _n_expr
!= null then
6456 if _n_expr2
!= null then
6461 redef class ANotExpr
6462 redef meth n_kwnot
=(n
: TKwnot)
6469 redef meth n_expr
=(n
: PExpr)
6477 private init empty_init
do end
6479 init init_anotexpr
(
6486 if n_kwnot
!= null then
6487 n_kwnot
.parent
= self
6490 if n_expr
!= null then
6491 n_expr
.parent
= self
6495 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6497 assert old_child
!= null
6498 if _n_kwnot
== old_child
then
6499 if new_child
!= null then
6500 new_child
.parent
= self
6501 assert new_child
isa TKwnot
6502 _n_kwnot
= new_child
6508 if _n_expr
== old_child
then
6509 if new_child
!= null then
6510 new_child
.parent
= self
6511 assert new_child
isa PExpr
6520 redef meth visit_all
(v
: Visitor)
6522 if _n_kwnot
!= null then
6525 if _n_expr
!= null then
6530 redef meth visit_all_reverse
(v
: Visitor)
6532 if _n_kwnot
!= null then
6535 if _n_expr
!= null then
6541 redef meth n_expr
=(n
: PExpr)
6548 redef meth n_expr2
=(n
: PExpr)
6556 private init empty_init
do end
6565 if n_expr
!= null then
6566 n_expr
.parent
= self
6569 if n_expr2
!= null then
6570 n_expr2
.parent
= self
6574 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6576 assert old_child
!= null
6577 if _n_expr
== old_child
then
6578 if new_child
!= null then
6579 new_child
.parent
= self
6580 assert new_child
isa PExpr
6587 if _n_expr2
== old_child
then
6588 if new_child
!= null then
6589 new_child
.parent
= self
6590 assert new_child
isa PExpr
6591 _n_expr2
= new_child
6599 redef meth visit_all
(v
: Visitor)
6601 if _n_expr
!= null then
6604 if _n_expr2
!= null then
6609 redef meth visit_all_reverse
(v
: Visitor)
6611 if _n_expr
!= null then
6614 if _n_expr2
!= null then
6620 redef meth n_expr
=(n
: PExpr)
6627 redef meth n_expr2
=(n
: PExpr)
6635 private init empty_init
do end
6644 if n_expr
!= null then
6645 n_expr
.parent
= self
6648 if n_expr2
!= null then
6649 n_expr2
.parent
= self
6653 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6655 assert old_child
!= null
6656 if _n_expr
== old_child
then
6657 if new_child
!= null then
6658 new_child
.parent
= self
6659 assert new_child
isa PExpr
6666 if _n_expr2
== old_child
then
6667 if new_child
!= null then
6668 new_child
.parent
= self
6669 assert new_child
isa PExpr
6670 _n_expr2
= new_child
6678 redef meth visit_all
(v
: Visitor)
6680 if _n_expr
!= null then
6683 if _n_expr2
!= null then
6688 redef meth visit_all_reverse
(v
: Visitor)
6690 if _n_expr
!= null then
6693 if _n_expr2
!= null then
6699 redef meth n_expr
=(n
: PExpr)
6706 redef meth n_expr2
=(n
: PExpr)
6714 private init empty_init
do end
6723 if n_expr
!= null then
6724 n_expr
.parent
= self
6727 if n_expr2
!= null then
6728 n_expr2
.parent
= self
6732 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6734 assert old_child
!= null
6735 if _n_expr
== old_child
then
6736 if new_child
!= null then
6737 new_child
.parent
= self
6738 assert new_child
isa PExpr
6745 if _n_expr2
== old_child
then
6746 if new_child
!= null then
6747 new_child
.parent
= self
6748 assert new_child
isa PExpr
6749 _n_expr2
= new_child
6757 redef meth visit_all
(v
: Visitor)
6759 if _n_expr
!= null then
6762 if _n_expr2
!= null then
6767 redef meth visit_all_reverse
(v
: Visitor)
6769 if _n_expr
!= null then
6772 if _n_expr2
!= null then
6778 redef meth n_expr
=(n
: PExpr)
6785 redef meth n_expr2
=(n
: PExpr)
6793 private init empty_init
do end
6802 if n_expr
!= null then
6803 n_expr
.parent
= self
6806 if n_expr2
!= null then
6807 n_expr2
.parent
= self
6811 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6813 assert old_child
!= null
6814 if _n_expr
== old_child
then
6815 if new_child
!= null then
6816 new_child
.parent
= self
6817 assert new_child
isa PExpr
6824 if _n_expr2
== old_child
then
6825 if new_child
!= null then
6826 new_child
.parent
= self
6827 assert new_child
isa PExpr
6828 _n_expr2
= new_child
6836 redef meth visit_all
(v
: Visitor)
6838 if _n_expr
!= null then
6841 if _n_expr2
!= null then
6846 redef meth visit_all_reverse
(v
: Visitor)
6848 if _n_expr
!= null then
6851 if _n_expr2
!= null then
6857 redef meth n_expr
=(n
: PExpr)
6864 redef meth n_expr2
=(n
: PExpr)
6872 private init empty_init
do end
6881 if n_expr
!= null then
6882 n_expr
.parent
= self
6885 if n_expr2
!= null then
6886 n_expr2
.parent
= self
6890 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6892 assert old_child
!= null
6893 if _n_expr
== old_child
then
6894 if new_child
!= null then
6895 new_child
.parent
= self
6896 assert new_child
isa PExpr
6903 if _n_expr2
== old_child
then
6904 if new_child
!= null then
6905 new_child
.parent
= self
6906 assert new_child
isa PExpr
6907 _n_expr2
= new_child
6915 redef meth visit_all
(v
: Visitor)
6917 if _n_expr
!= null then
6920 if _n_expr2
!= null then
6925 redef meth visit_all_reverse
(v
: Visitor)
6927 if _n_expr
!= null then
6930 if _n_expr2
!= null then
6936 redef meth n_expr
=(n
: PExpr)
6943 redef meth n_expr2
=(n
: PExpr)
6951 private init empty_init
do end
6960 if n_expr
!= null then
6961 n_expr
.parent
= self
6964 if n_expr2
!= null then
6965 n_expr2
.parent
= self
6969 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
6971 assert old_child
!= null
6972 if _n_expr
== old_child
then
6973 if new_child
!= null then
6974 new_child
.parent
= self
6975 assert new_child
isa PExpr
6982 if _n_expr2
== old_child
then
6983 if new_child
!= null then
6984 new_child
.parent
= self
6985 assert new_child
isa PExpr
6986 _n_expr2
= new_child
6994 redef meth visit_all
(v
: Visitor)
6996 if _n_expr
!= null then
6999 if _n_expr2
!= null then
7004 redef meth visit_all_reverse
(v
: Visitor)
7006 if _n_expr
!= null then
7009 if _n_expr2
!= null then
7015 redef meth n_expr
=(n
: PExpr)
7022 redef meth n_expr2
=(n
: PExpr)
7030 private init empty_init
do end
7039 if n_expr
!= null then
7040 n_expr
.parent
= self
7043 if n_expr2
!= null then
7044 n_expr2
.parent
= self
7048 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7050 assert old_child
!= null
7051 if _n_expr
== old_child
then
7052 if new_child
!= null then
7053 new_child
.parent
= self
7054 assert new_child
isa PExpr
7061 if _n_expr2
== old_child
then
7062 if new_child
!= null then
7063 new_child
.parent
= self
7064 assert new_child
isa PExpr
7065 _n_expr2
= new_child
7073 redef meth visit_all
(v
: Visitor)
7075 if _n_expr
!= null then
7078 if _n_expr2
!= null then
7083 redef meth visit_all_reverse
(v
: Visitor)
7085 if _n_expr
!= null then
7088 if _n_expr2
!= null then
7093 redef class AIsaExpr
7094 redef meth n_expr
=(n
: PExpr)
7101 redef meth n_type
=(n
: PType)
7109 private init empty_init
do end
7111 init init_aisaexpr
(
7118 if n_expr
!= null then
7119 n_expr
.parent
= self
7122 if n_type
!= null then
7123 n_type
.parent
= self
7127 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7129 assert old_child
!= null
7130 if _n_expr
== old_child
then
7131 if new_child
!= null then
7132 new_child
.parent
= self
7133 assert new_child
isa PExpr
7140 if _n_type
== old_child
then
7141 if new_child
!= null then
7142 new_child
.parent
= self
7143 assert new_child
isa PType
7152 redef meth visit_all
(v
: Visitor)
7154 if _n_expr
!= null then
7157 if _n_type
!= null then
7162 redef meth visit_all_reverse
(v
: Visitor)
7164 if _n_expr
!= null then
7167 if _n_type
!= null then
7172 redef class APlusExpr
7173 redef meth n_expr
=(n
: PExpr)
7180 redef meth n_expr2
=(n
: PExpr)
7188 private init empty_init
do end
7190 init init_aplusexpr
(
7197 if n_expr
!= null then
7198 n_expr
.parent
= self
7201 if n_expr2
!= null then
7202 n_expr2
.parent
= self
7206 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7208 assert old_child
!= null
7209 if _n_expr
== old_child
then
7210 if new_child
!= null then
7211 new_child
.parent
= self
7212 assert new_child
isa PExpr
7219 if _n_expr2
== old_child
then
7220 if new_child
!= null then
7221 new_child
.parent
= self
7222 assert new_child
isa PExpr
7223 _n_expr2
= new_child
7231 redef meth visit_all
(v
: Visitor)
7233 if _n_expr
!= null then
7236 if _n_expr2
!= null then
7241 redef meth visit_all_reverse
(v
: Visitor)
7243 if _n_expr
!= null then
7246 if _n_expr2
!= null then
7251 redef class AMinusExpr
7252 redef meth n_expr
=(n
: PExpr)
7259 redef meth n_expr2
=(n
: PExpr)
7267 private init empty_init
do end
7269 init init_aminusexpr
(
7276 if n_expr
!= null then
7277 n_expr
.parent
= self
7280 if n_expr2
!= null then
7281 n_expr2
.parent
= self
7285 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7287 assert old_child
!= null
7288 if _n_expr
== old_child
then
7289 if new_child
!= null then
7290 new_child
.parent
= self
7291 assert new_child
isa PExpr
7298 if _n_expr2
== old_child
then
7299 if new_child
!= null then
7300 new_child
.parent
= self
7301 assert new_child
isa PExpr
7302 _n_expr2
= new_child
7310 redef meth visit_all
(v
: Visitor)
7312 if _n_expr
!= null then
7315 if _n_expr2
!= null then
7320 redef meth visit_all_reverse
(v
: Visitor)
7322 if _n_expr
!= null then
7325 if _n_expr2
!= null then
7330 redef class AStarshipExpr
7331 redef meth n_expr
=(n
: PExpr)
7338 redef meth n_expr2
=(n
: PExpr)
7346 private init empty_init
do end
7348 init init_astarshipexpr
(
7355 if n_expr
!= null then
7356 n_expr
.parent
= self
7359 if n_expr2
!= null then
7360 n_expr2
.parent
= self
7364 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7366 assert old_child
!= null
7367 if _n_expr
== old_child
then
7368 if new_child
!= null then
7369 new_child
.parent
= self
7370 assert new_child
isa PExpr
7377 if _n_expr2
== old_child
then
7378 if new_child
!= null then
7379 new_child
.parent
= self
7380 assert new_child
isa PExpr
7381 _n_expr2
= new_child
7389 redef meth visit_all
(v
: Visitor)
7391 if _n_expr
!= null then
7394 if _n_expr2
!= null then
7399 redef meth visit_all_reverse
(v
: Visitor)
7401 if _n_expr
!= null then
7404 if _n_expr2
!= null then
7409 redef class AStarExpr
7410 redef meth n_expr
=(n
: PExpr)
7417 redef meth n_expr2
=(n
: PExpr)
7425 private init empty_init
do end
7427 init init_astarexpr
(
7434 if n_expr
!= null then
7435 n_expr
.parent
= self
7438 if n_expr2
!= null then
7439 n_expr2
.parent
= self
7443 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7445 assert old_child
!= null
7446 if _n_expr
== old_child
then
7447 if new_child
!= null then
7448 new_child
.parent
= self
7449 assert new_child
isa PExpr
7456 if _n_expr2
== old_child
then
7457 if new_child
!= null then
7458 new_child
.parent
= self
7459 assert new_child
isa PExpr
7460 _n_expr2
= new_child
7468 redef meth visit_all
(v
: Visitor)
7470 if _n_expr
!= null then
7473 if _n_expr2
!= null then
7478 redef meth visit_all_reverse
(v
: Visitor)
7480 if _n_expr
!= null then
7483 if _n_expr2
!= null then
7488 redef class ASlashExpr
7489 redef meth n_expr
=(n
: PExpr)
7496 redef meth n_expr2
=(n
: PExpr)
7504 private init empty_init
do end
7506 init init_aslashexpr
(
7513 if n_expr
!= null then
7514 n_expr
.parent
= self
7517 if n_expr2
!= null then
7518 n_expr2
.parent
= self
7522 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7524 assert old_child
!= null
7525 if _n_expr
== old_child
then
7526 if new_child
!= null then
7527 new_child
.parent
= self
7528 assert new_child
isa PExpr
7535 if _n_expr2
== old_child
then
7536 if new_child
!= null then
7537 new_child
.parent
= self
7538 assert new_child
isa PExpr
7539 _n_expr2
= new_child
7547 redef meth visit_all
(v
: Visitor)
7549 if _n_expr
!= null then
7552 if _n_expr2
!= null then
7557 redef meth visit_all_reverse
(v
: Visitor)
7559 if _n_expr
!= null then
7562 if _n_expr2
!= null then
7567 redef class APercentExpr
7568 redef meth n_expr
=(n
: PExpr)
7575 redef meth n_expr2
=(n
: PExpr)
7583 private init empty_init
do end
7585 init init_apercentexpr
(
7592 if n_expr
!= null then
7593 n_expr
.parent
= self
7596 if n_expr2
!= null then
7597 n_expr2
.parent
= self
7601 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7603 assert old_child
!= null
7604 if _n_expr
== old_child
then
7605 if new_child
!= null then
7606 new_child
.parent
= self
7607 assert new_child
isa PExpr
7614 if _n_expr2
== old_child
then
7615 if new_child
!= null then
7616 new_child
.parent
= self
7617 assert new_child
isa PExpr
7618 _n_expr2
= new_child
7626 redef meth visit_all
(v
: Visitor)
7628 if _n_expr
!= null then
7631 if _n_expr2
!= null then
7636 redef meth visit_all_reverse
(v
: Visitor)
7638 if _n_expr
!= null then
7641 if _n_expr2
!= null then
7646 redef class AUminusExpr
7647 redef meth n_minus
=(n
: TMinus)
7654 redef meth n_expr
=(n
: PExpr)
7662 private init empty_init
do end
7664 init init_auminusexpr
(
7671 if n_minus
!= null then
7672 n_minus
.parent
= self
7675 if n_expr
!= null then
7676 n_expr
.parent
= self
7680 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7682 assert old_child
!= null
7683 if _n_minus
== old_child
then
7684 if new_child
!= null then
7685 new_child
.parent
= self
7686 assert new_child
isa TMinus
7687 _n_minus
= new_child
7693 if _n_expr
== old_child
then
7694 if new_child
!= null then
7695 new_child
.parent
= self
7696 assert new_child
isa PExpr
7705 redef meth visit_all
(v
: Visitor)
7707 if _n_minus
!= null then
7710 if _n_expr
!= null then
7715 redef meth visit_all_reverse
(v
: Visitor)
7717 if _n_minus
!= null then
7720 if _n_expr
!= null then
7725 redef class ANewExpr
7726 redef meth n_kwnew
=(n
: TKwnew)
7733 redef meth n_type
=(n
: PType)
7740 redef meth n_id
=(n
: TId)
7748 private init empty_init
do end
7750 init init_anewexpr
(
7754 n_args
: Collection[Object] # Should be Collection[PExpr]
7759 if n_kwnew
!= null then
7760 n_kwnew
.parent
= self
7763 if n_type
!= null then
7764 n_type
.parent
= self
7767 if n_id
!= null then
7770 _n_args
= new List[PExpr]
7778 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7780 assert old_child
!= null
7781 if _n_kwnew
== old_child
then
7782 if new_child
!= null then
7783 new_child
.parent
= self
7784 assert new_child
isa TKwnew
7785 _n_kwnew
= new_child
7791 if _n_type
== old_child
then
7792 if new_child
!= null then
7793 new_child
.parent
= self
7794 assert new_child
isa PType
7801 if _n_id
== old_child
then
7802 if new_child
!= null then
7803 new_child
.parent
= self
7804 assert new_child
isa TId
7811 for i
in [0.._n_args
.length
[ do
7812 if _n_args
[i
] == old_child
then
7813 if new_child
!= null then
7814 assert new_child
isa PExpr
7815 _n_args
[i
] = new_child
7816 new_child
.parent
= self
7818 _n_args
.remove_at
(i
)
7825 redef meth visit_all
(v
: Visitor)
7827 if _n_kwnew
!= null then
7830 if _n_type
!= null then
7833 if _n_id
!= null then
7841 redef meth visit_all_reverse
(v
: Visitor)
7843 if _n_kwnew
!= null then
7846 if _n_type
!= null then
7849 if _n_id
!= null then
7853 var i
= _n_args
.length
7861 redef class AAttrExpr
7862 redef meth n_expr
=(n
: PExpr)
7869 redef meth n_id
=(n
: TAttrid)
7877 private init empty_init
do end
7879 init init_aattrexpr
(
7886 if n_expr
!= null then
7887 n_expr
.parent
= self
7890 if n_id
!= null then
7895 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
7897 assert old_child
!= null
7898 if _n_expr
== old_child
then
7899 if new_child
!= null then
7900 new_child
.parent
= self
7901 assert new_child
isa PExpr
7908 if _n_id
== old_child
then
7909 if new_child
!= null then
7910 new_child
.parent
= self
7911 assert new_child
isa TAttrid
7920 redef meth visit_all
(v
: Visitor)
7922 if _n_expr
!= null then
7925 if _n_id
!= null then
7930 redef meth visit_all_reverse
(v
: Visitor)
7932 if _n_expr
!= null then
7935 if _n_id
!= null then
7940 redef class AAttrAssignExpr
7941 redef meth n_expr
=(n
: PExpr)
7948 redef meth n_id
=(n
: TAttrid)
7955 redef meth n_assign
=(n
: TAssign)
7962 redef meth n_value
=(n
: PExpr)
7970 private init empty_init
do end
7972 init init_aattrassignexpr
(
7981 if n_expr
!= null then
7982 n_expr
.parent
= self
7985 if n_id
!= null then
7988 _n_assign
= n_assign
7989 if n_assign
!= null then
7990 n_assign
.parent
= self
7993 if n_value
!= null then
7994 n_value
.parent
= self
7998 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8000 assert old_child
!= null
8001 if _n_expr
== old_child
then
8002 if new_child
!= null then
8003 new_child
.parent
= self
8004 assert new_child
isa PExpr
8011 if _n_id
== old_child
then
8012 if new_child
!= null then
8013 new_child
.parent
= self
8014 assert new_child
isa TAttrid
8021 if _n_assign
== old_child
then
8022 if new_child
!= null then
8023 new_child
.parent
= self
8024 assert new_child
isa TAssign
8025 _n_assign
= new_child
8031 if _n_value
== old_child
then
8032 if new_child
!= null then
8033 new_child
.parent
= self
8034 assert new_child
isa PExpr
8035 _n_value
= new_child
8043 redef meth visit_all
(v
: Visitor)
8045 if _n_expr
!= null then
8048 if _n_id
!= null then
8051 if _n_assign
!= null then
8054 if _n_value
!= null then
8059 redef meth visit_all_reverse
(v
: Visitor)
8061 if _n_expr
!= null then
8064 if _n_id
!= null then
8067 if _n_assign
!= null then
8070 if _n_value
!= null then
8075 redef class AAttrReassignExpr
8076 redef meth n_expr
=(n
: PExpr)
8083 redef meth n_id
=(n
: TAttrid)
8090 redef meth n_assign_op
=(n
: PAssignOp)
8097 redef meth n_value
=(n
: PExpr)
8105 private init empty_init
do end
8107 init init_aattrreassignexpr
(
8110 n_assign_op
: PAssignOp ,
8116 if n_expr
!= null then
8117 n_expr
.parent
= self
8120 if n_id
!= null then
8123 _n_assign_op
= n_assign_op
8124 if n_assign_op
!= null then
8125 n_assign_op
.parent
= self
8128 if n_value
!= null then
8129 n_value
.parent
= self
8133 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8135 assert old_child
!= null
8136 if _n_expr
== old_child
then
8137 if new_child
!= null then
8138 new_child
.parent
= self
8139 assert new_child
isa PExpr
8146 if _n_id
== old_child
then
8147 if new_child
!= null then
8148 new_child
.parent
= self
8149 assert new_child
isa TAttrid
8156 if _n_assign_op
== old_child
then
8157 if new_child
!= null then
8158 new_child
.parent
= self
8159 assert new_child
isa PAssignOp
8160 _n_assign_op
= new_child
8166 if _n_value
== old_child
then
8167 if new_child
!= null then
8168 new_child
.parent
= self
8169 assert new_child
isa PExpr
8170 _n_value
= new_child
8178 redef meth visit_all
(v
: Visitor)
8180 if _n_expr
!= null then
8183 if _n_id
!= null then
8186 if _n_assign_op
!= null then
8187 v
.visit
(_n_assign_op
)
8189 if _n_value
!= null then
8194 redef meth visit_all_reverse
(v
: Visitor)
8196 if _n_expr
!= null then
8199 if _n_id
!= null then
8202 if _n_assign_op
!= null then
8203 v
.visit
(_n_assign_op
)
8205 if _n_value
!= null then
8210 redef class ACallExpr
8211 redef meth n_expr
=(n
: PExpr)
8218 redef meth n_id
=(n
: TId)
8226 private init empty_init
do end
8228 init init_acallexpr
(
8231 n_args
: Collection[Object] , # Should be Collection[PExpr]
8232 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
8237 if n_expr
!= null then
8238 n_expr
.parent
= self
8241 if n_id
!= null then
8244 _n_args
= new List[PExpr]
8250 _n_closure_defs
= new List[PClosureDef]
8251 for n
in n_closure_defs
do
8252 assert n
isa PClosureDef
8253 _n_closure_defs
.add
(n
)
8258 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8260 assert old_child
!= null
8261 if _n_expr
== old_child
then
8262 if new_child
!= null then
8263 new_child
.parent
= self
8264 assert new_child
isa PExpr
8271 if _n_id
== old_child
then
8272 if new_child
!= null then
8273 new_child
.parent
= self
8274 assert new_child
isa TId
8281 for i
in [0.._n_args
.length
[ do
8282 if _n_args
[i
] == old_child
then
8283 if new_child
!= null then
8284 assert new_child
isa PExpr
8285 _n_args
[i
] = new_child
8286 new_child
.parent
= self
8288 _n_args
.remove_at
(i
)
8293 for i
in [0.._n_closure_defs
.length
[ do
8294 if _n_closure_defs
[i
] == old_child
then
8295 if new_child
!= null then
8296 assert new_child
isa PClosureDef
8297 _n_closure_defs
[i
] = new_child
8298 new_child
.parent
= self
8300 _n_closure_defs
.remove_at
(i
)
8307 redef meth visit_all
(v
: Visitor)
8309 if _n_expr
!= null then
8312 if _n_id
!= null then
8318 for n
in _n_closure_defs
do
8323 redef meth visit_all_reverse
(v
: Visitor)
8325 if _n_expr
!= null then
8328 if _n_id
!= null then
8332 var i
= _n_args
.length
8339 var i
= _n_closure_defs
.length
8341 v
.visit
(_n_closure_defs
[i
])
8347 redef class ACallAssignExpr
8348 redef meth n_expr
=(n
: PExpr)
8355 redef meth n_id
=(n
: TId)
8362 redef meth n_assign
=(n
: TAssign)
8369 redef meth n_value
=(n
: PExpr)
8377 private init empty_init
do end
8379 init init_acallassignexpr
(
8382 n_args
: Collection[Object] , # Should be Collection[PExpr]
8389 if n_expr
!= null then
8390 n_expr
.parent
= self
8393 if n_id
!= null then
8396 _n_args
= new List[PExpr]
8402 _n_assign
= n_assign
8403 if n_assign
!= null then
8404 n_assign
.parent
= self
8407 if n_value
!= null then
8408 n_value
.parent
= self
8412 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8414 assert old_child
!= null
8415 if _n_expr
== old_child
then
8416 if new_child
!= null then
8417 new_child
.parent
= self
8418 assert new_child
isa PExpr
8425 if _n_id
== old_child
then
8426 if new_child
!= null then
8427 new_child
.parent
= self
8428 assert new_child
isa TId
8435 for i
in [0.._n_args
.length
[ do
8436 if _n_args
[i
] == old_child
then
8437 if new_child
!= null then
8438 assert new_child
isa PExpr
8439 _n_args
[i
] = new_child
8440 new_child
.parent
= self
8442 _n_args
.remove_at
(i
)
8447 if _n_assign
== old_child
then
8448 if new_child
!= null then
8449 new_child
.parent
= self
8450 assert new_child
isa TAssign
8451 _n_assign
= new_child
8457 if _n_value
== old_child
then
8458 if new_child
!= null then
8459 new_child
.parent
= self
8460 assert new_child
isa PExpr
8461 _n_value
= new_child
8469 redef meth visit_all
(v
: Visitor)
8471 if _n_expr
!= null then
8474 if _n_id
!= null then
8480 if _n_assign
!= null then
8483 if _n_value
!= null then
8488 redef meth visit_all_reverse
(v
: Visitor)
8490 if _n_expr
!= null then
8493 if _n_id
!= null then
8497 var i
= _n_args
.length
8503 if _n_assign
!= null then
8506 if _n_value
!= null then
8511 redef class ACallReassignExpr
8512 redef meth n_expr
=(n
: PExpr)
8519 redef meth n_id
=(n
: TId)
8526 redef meth n_assign_op
=(n
: PAssignOp)
8533 redef meth n_value
=(n
: PExpr)
8541 private init empty_init
do end
8543 init init_acallreassignexpr
(
8546 n_args
: Collection[Object] , # Should be Collection[PExpr]
8547 n_assign_op
: PAssignOp ,
8553 if n_expr
!= null then
8554 n_expr
.parent
= self
8557 if n_id
!= null then
8560 _n_args
= new List[PExpr]
8566 _n_assign_op
= n_assign_op
8567 if n_assign_op
!= null then
8568 n_assign_op
.parent
= self
8571 if n_value
!= null then
8572 n_value
.parent
= self
8576 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8578 assert old_child
!= null
8579 if _n_expr
== old_child
then
8580 if new_child
!= null then
8581 new_child
.parent
= self
8582 assert new_child
isa PExpr
8589 if _n_id
== old_child
then
8590 if new_child
!= null then
8591 new_child
.parent
= self
8592 assert new_child
isa TId
8599 for i
in [0.._n_args
.length
[ do
8600 if _n_args
[i
] == old_child
then
8601 if new_child
!= null then
8602 assert new_child
isa PExpr
8603 _n_args
[i
] = new_child
8604 new_child
.parent
= self
8606 _n_args
.remove_at
(i
)
8611 if _n_assign_op
== old_child
then
8612 if new_child
!= null then
8613 new_child
.parent
= self
8614 assert new_child
isa PAssignOp
8615 _n_assign_op
= new_child
8621 if _n_value
== old_child
then
8622 if new_child
!= null then
8623 new_child
.parent
= self
8624 assert new_child
isa PExpr
8625 _n_value
= new_child
8633 redef meth visit_all
(v
: Visitor)
8635 if _n_expr
!= null then
8638 if _n_id
!= null then
8644 if _n_assign_op
!= null then
8645 v
.visit
(_n_assign_op
)
8647 if _n_value
!= null then
8652 redef meth visit_all_reverse
(v
: Visitor)
8654 if _n_expr
!= null then
8657 if _n_id
!= null then
8661 var i
= _n_args
.length
8667 if _n_assign_op
!= null then
8668 v
.visit
(_n_assign_op
)
8670 if _n_value
!= null then
8675 redef class ASuperExpr
8676 redef meth n_qualified
=(n
: PQualified)
8683 redef meth n_kwsuper
=(n
: TKwsuper)
8691 private init empty_init
do end
8693 init init_asuperexpr
(
8694 n_qualified
: PQualified ,
8695 n_kwsuper
: TKwsuper ,
8696 n_args
: Collection[Object] # Should be Collection[PExpr]
8700 _n_qualified
= n_qualified
8701 if n_qualified
!= null then
8702 n_qualified
.parent
= self
8704 _n_kwsuper
= n_kwsuper
8705 if n_kwsuper
!= null then
8706 n_kwsuper
.parent
= self
8708 _n_args
= new List[PExpr]
8716 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8718 assert old_child
!= null
8719 if _n_qualified
== old_child
then
8720 if new_child
!= null then
8721 new_child
.parent
= self
8722 assert new_child
isa PQualified
8723 _n_qualified
= new_child
8729 if _n_kwsuper
== old_child
then
8730 if new_child
!= null then
8731 new_child
.parent
= self
8732 assert new_child
isa TKwsuper
8733 _n_kwsuper
= new_child
8739 for i
in [0.._n_args
.length
[ do
8740 if _n_args
[i
] == old_child
then
8741 if new_child
!= null then
8742 assert new_child
isa PExpr
8743 _n_args
[i
] = new_child
8744 new_child
.parent
= self
8746 _n_args
.remove_at
(i
)
8753 redef meth visit_all
(v
: Visitor)
8755 if _n_qualified
!= null then
8756 v
.visit
(_n_qualified
)
8758 if _n_kwsuper
!= null then
8766 redef meth visit_all_reverse
(v
: Visitor)
8768 if _n_qualified
!= null then
8769 v
.visit
(_n_qualified
)
8771 if _n_kwsuper
!= null then
8775 var i
= _n_args
.length
8783 redef class AInitExpr
8784 redef meth n_expr
=(n
: PExpr)
8791 redef meth n_kwinit
=(n
: TKwinit)
8799 private init empty_init
do end
8801 init init_ainitexpr
(
8804 n_args
: Collection[Object] # Should be Collection[PExpr]
8809 if n_expr
!= null then
8810 n_expr
.parent
= self
8812 _n_kwinit
= n_kwinit
8813 if n_kwinit
!= null then
8814 n_kwinit
.parent
= self
8816 _n_args
= new List[PExpr]
8824 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8826 assert old_child
!= null
8827 if _n_expr
== old_child
then
8828 if new_child
!= null then
8829 new_child
.parent
= self
8830 assert new_child
isa PExpr
8837 if _n_kwinit
== old_child
then
8838 if new_child
!= null then
8839 new_child
.parent
= self
8840 assert new_child
isa TKwinit
8841 _n_kwinit
= new_child
8847 for i
in [0.._n_args
.length
[ do
8848 if _n_args
[i
] == old_child
then
8849 if new_child
!= null then
8850 assert new_child
isa PExpr
8851 _n_args
[i
] = new_child
8852 new_child
.parent
= self
8854 _n_args
.remove_at
(i
)
8861 redef meth visit_all
(v
: Visitor)
8863 if _n_expr
!= null then
8866 if _n_kwinit
!= null then
8874 redef meth visit_all_reverse
(v
: Visitor)
8876 if _n_expr
!= null then
8879 if _n_kwinit
!= null then
8883 var i
= _n_args
.length
8891 redef class ABraExpr
8892 redef meth n_expr
=(n
: PExpr)
8900 private init empty_init
do end
8902 init init_abraexpr
(
8904 n_args
: Collection[Object] , # Should be Collection[PExpr]
8905 n_closure_defs
: Collection[Object] # Should be Collection[PClosureDef]
8910 if n_expr
!= null then
8911 n_expr
.parent
= self
8913 _n_args
= new List[PExpr]
8919 _n_closure_defs
= new List[PClosureDef]
8920 for n
in n_closure_defs
do
8921 assert n
isa PClosureDef
8922 _n_closure_defs
.add
(n
)
8927 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
8929 assert old_child
!= null
8930 if _n_expr
== old_child
then
8931 if new_child
!= null then
8932 new_child
.parent
= self
8933 assert new_child
isa PExpr
8940 for i
in [0.._n_args
.length
[ do
8941 if _n_args
[i
] == old_child
then
8942 if new_child
!= null then
8943 assert new_child
isa PExpr
8944 _n_args
[i
] = new_child
8945 new_child
.parent
= self
8947 _n_args
.remove_at
(i
)
8952 for i
in [0.._n_closure_defs
.length
[ do
8953 if _n_closure_defs
[i
] == old_child
then
8954 if new_child
!= null then
8955 assert new_child
isa PClosureDef
8956 _n_closure_defs
[i
] = new_child
8957 new_child
.parent
= self
8959 _n_closure_defs
.remove_at
(i
)
8966 redef meth visit_all
(v
: Visitor)
8968 if _n_expr
!= null then
8974 for n
in _n_closure_defs
do
8979 redef meth visit_all_reverse
(v
: Visitor)
8981 if _n_expr
!= null then
8985 var i
= _n_args
.length
8992 var i
= _n_closure_defs
.length
8994 v
.visit
(_n_closure_defs
[i
])
9000 redef class ABraAssignExpr
9001 redef meth n_expr
=(n
: PExpr)
9008 redef meth n_assign
=(n
: TAssign)
9015 redef meth n_value
=(n
: PExpr)
9023 private init empty_init
do end
9025 init init_abraassignexpr
(
9027 n_args
: Collection[Object] , # Should be Collection[PExpr]
9034 if n_expr
!= null then
9035 n_expr
.parent
= self
9037 _n_args
= new List[PExpr]
9043 _n_assign
= n_assign
9044 if n_assign
!= null then
9045 n_assign
.parent
= self
9048 if n_value
!= null then
9049 n_value
.parent
= self
9053 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9055 assert old_child
!= null
9056 if _n_expr
== old_child
then
9057 if new_child
!= null then
9058 new_child
.parent
= self
9059 assert new_child
isa PExpr
9066 for i
in [0.._n_args
.length
[ do
9067 if _n_args
[i
] == old_child
then
9068 if new_child
!= null then
9069 assert new_child
isa PExpr
9070 _n_args
[i
] = new_child
9071 new_child
.parent
= self
9073 _n_args
.remove_at
(i
)
9078 if _n_assign
== old_child
then
9079 if new_child
!= null then
9080 new_child
.parent
= self
9081 assert new_child
isa TAssign
9082 _n_assign
= new_child
9088 if _n_value
== old_child
then
9089 if new_child
!= null then
9090 new_child
.parent
= self
9091 assert new_child
isa PExpr
9092 _n_value
= new_child
9100 redef meth visit_all
(v
: Visitor)
9102 if _n_expr
!= null then
9108 if _n_assign
!= null then
9111 if _n_value
!= null then
9116 redef meth visit_all_reverse
(v
: Visitor)
9118 if _n_expr
!= null then
9122 var i
= _n_args
.length
9128 if _n_assign
!= null then
9131 if _n_value
!= null then
9136 redef class ABraReassignExpr
9137 redef meth n_expr
=(n
: PExpr)
9144 redef meth n_assign_op
=(n
: PAssignOp)
9151 redef meth n_value
=(n
: PExpr)
9159 private init empty_init
do end
9161 init init_abrareassignexpr
(
9163 n_args
: Collection[Object] , # Should be Collection[PExpr]
9164 n_assign_op
: PAssignOp ,
9170 if n_expr
!= null then
9171 n_expr
.parent
= self
9173 _n_args
= new List[PExpr]
9179 _n_assign_op
= n_assign_op
9180 if n_assign_op
!= null then
9181 n_assign_op
.parent
= self
9184 if n_value
!= null then
9185 n_value
.parent
= self
9189 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9191 assert old_child
!= null
9192 if _n_expr
== old_child
then
9193 if new_child
!= null then
9194 new_child
.parent
= self
9195 assert new_child
isa PExpr
9202 for i
in [0.._n_args
.length
[ do
9203 if _n_args
[i
] == old_child
then
9204 if new_child
!= null then
9205 assert new_child
isa PExpr
9206 _n_args
[i
] = new_child
9207 new_child
.parent
= self
9209 _n_args
.remove_at
(i
)
9214 if _n_assign_op
== old_child
then
9215 if new_child
!= null then
9216 new_child
.parent
= self
9217 assert new_child
isa PAssignOp
9218 _n_assign_op
= new_child
9224 if _n_value
== old_child
then
9225 if new_child
!= null then
9226 new_child
.parent
= self
9227 assert new_child
isa PExpr
9228 _n_value
= new_child
9236 redef meth visit_all
(v
: Visitor)
9238 if _n_expr
!= null then
9244 if _n_assign_op
!= null then
9245 v
.visit
(_n_assign_op
)
9247 if _n_value
!= null then
9252 redef meth visit_all_reverse
(v
: Visitor)
9254 if _n_expr
!= null then
9258 var i
= _n_args
.length
9264 if _n_assign_op
!= null then
9265 v
.visit
(_n_assign_op
)
9267 if _n_value
!= null then
9272 redef class AVarExpr
9273 redef meth n_id
=(n
: TId)
9281 private init empty_init
do end
9283 init init_avarexpr
(
9289 if n_id
!= null then
9294 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9296 assert old_child
!= null
9297 if _n_id
== old_child
then
9298 if new_child
!= null then
9299 new_child
.parent
= self
9300 assert new_child
isa TId
9309 redef meth visit_all
(v
: Visitor)
9311 if _n_id
!= null then
9316 redef meth visit_all_reverse
(v
: Visitor)
9318 if _n_id
!= null then
9323 redef class AVarAssignExpr
9324 redef meth n_id
=(n
: TId)
9331 redef meth n_assign
=(n
: TAssign)
9338 redef meth n_value
=(n
: PExpr)
9346 private init empty_init
do end
9348 init init_avarassignexpr
(
9356 if n_id
!= null then
9359 _n_assign
= n_assign
9360 if n_assign
!= null then
9361 n_assign
.parent
= self
9364 if n_value
!= null then
9365 n_value
.parent
= self
9369 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9371 assert old_child
!= null
9372 if _n_id
== old_child
then
9373 if new_child
!= null then
9374 new_child
.parent
= self
9375 assert new_child
isa TId
9382 if _n_assign
== old_child
then
9383 if new_child
!= null then
9384 new_child
.parent
= self
9385 assert new_child
isa TAssign
9386 _n_assign
= new_child
9392 if _n_value
== old_child
then
9393 if new_child
!= null then
9394 new_child
.parent
= self
9395 assert new_child
isa PExpr
9396 _n_value
= new_child
9404 redef meth visit_all
(v
: Visitor)
9406 if _n_id
!= null then
9409 if _n_assign
!= null then
9412 if _n_value
!= null then
9417 redef meth visit_all_reverse
(v
: Visitor)
9419 if _n_id
!= null then
9422 if _n_assign
!= null then
9425 if _n_value
!= null then
9430 redef class AVarReassignExpr
9431 redef meth n_id
=(n
: TId)
9438 redef meth n_assign_op
=(n
: PAssignOp)
9445 redef meth n_value
=(n
: PExpr)
9453 private init empty_init
do end
9455 init init_avarreassignexpr
(
9457 n_assign_op
: PAssignOp ,
9463 if n_id
!= null then
9466 _n_assign_op
= n_assign_op
9467 if n_assign_op
!= null then
9468 n_assign_op
.parent
= self
9471 if n_value
!= null then
9472 n_value
.parent
= self
9476 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9478 assert old_child
!= null
9479 if _n_id
== old_child
then
9480 if new_child
!= null then
9481 new_child
.parent
= self
9482 assert new_child
isa TId
9489 if _n_assign_op
== old_child
then
9490 if new_child
!= null then
9491 new_child
.parent
= self
9492 assert new_child
isa PAssignOp
9493 _n_assign_op
= new_child
9499 if _n_value
== old_child
then
9500 if new_child
!= null then
9501 new_child
.parent
= self
9502 assert new_child
isa PExpr
9503 _n_value
= new_child
9511 redef meth visit_all
(v
: Visitor)
9513 if _n_id
!= null then
9516 if _n_assign_op
!= null then
9517 v
.visit
(_n_assign_op
)
9519 if _n_value
!= null then
9524 redef meth visit_all_reverse
(v
: Visitor)
9526 if _n_id
!= null then
9529 if _n_assign_op
!= null then
9530 v
.visit
(_n_assign_op
)
9532 if _n_value
!= null then
9537 redef class ARangeExpr
9538 redef meth n_expr
=(n
: PExpr)
9545 redef meth n_expr2
=(n
: PExpr)
9553 private init empty_init
do end
9555 init init_arangeexpr
(
9562 if n_expr
!= null then
9563 n_expr
.parent
= self
9566 if n_expr2
!= null then
9567 n_expr2
.parent
= self
9571 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9573 assert old_child
!= null
9574 if _n_expr
== old_child
then
9575 if new_child
!= null then
9576 new_child
.parent
= self
9577 assert new_child
isa PExpr
9584 if _n_expr2
== old_child
then
9585 if new_child
!= null then
9586 new_child
.parent
= self
9587 assert new_child
isa PExpr
9588 _n_expr2
= new_child
9596 redef meth visit_all
(v
: Visitor)
9598 if _n_expr
!= null then
9601 if _n_expr2
!= null then
9606 redef meth visit_all_reverse
(v
: Visitor)
9608 if _n_expr
!= null then
9611 if _n_expr2
!= null then
9616 redef class ACrangeExpr
9617 redef meth n_expr
=(n
: PExpr)
9624 redef meth n_expr2
=(n
: PExpr)
9632 private init empty_init
do end
9634 init init_acrangeexpr
(
9641 if n_expr
!= null then
9642 n_expr
.parent
= self
9645 if n_expr2
!= null then
9646 n_expr2
.parent
= self
9650 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9652 assert old_child
!= null
9653 if _n_expr
== old_child
then
9654 if new_child
!= null then
9655 new_child
.parent
= self
9656 assert new_child
isa PExpr
9663 if _n_expr2
== old_child
then
9664 if new_child
!= null then
9665 new_child
.parent
= self
9666 assert new_child
isa PExpr
9667 _n_expr2
= new_child
9675 redef meth visit_all
(v
: Visitor)
9677 if _n_expr
!= null then
9680 if _n_expr2
!= null then
9685 redef meth visit_all_reverse
(v
: Visitor)
9687 if _n_expr
!= null then
9690 if _n_expr2
!= null then
9695 redef class AOrangeExpr
9696 redef meth n_expr
=(n
: PExpr)
9703 redef meth n_expr2
=(n
: PExpr)
9711 private init empty_init
do end
9713 init init_aorangeexpr
(
9720 if n_expr
!= null then
9721 n_expr
.parent
= self
9724 if n_expr2
!= null then
9725 n_expr2
.parent
= self
9729 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9731 assert old_child
!= null
9732 if _n_expr
== old_child
then
9733 if new_child
!= null then
9734 new_child
.parent
= self
9735 assert new_child
isa PExpr
9742 if _n_expr2
== old_child
then
9743 if new_child
!= null then
9744 new_child
.parent
= self
9745 assert new_child
isa PExpr
9746 _n_expr2
= new_child
9754 redef meth visit_all
(v
: Visitor)
9756 if _n_expr
!= null then
9759 if _n_expr2
!= null then
9764 redef meth visit_all_reverse
(v
: Visitor)
9766 if _n_expr
!= null then
9769 if _n_expr2
!= null then
9774 redef class AArrayExpr
9776 private init empty_init
do end
9778 init init_aarrayexpr
(
9779 n_exprs
: Collection[Object] # Should be Collection[PExpr]
9783 _n_exprs
= new List[PExpr]
9791 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9793 assert old_child
!= null
9794 for i
in [0.._n_exprs
.length
[ do
9795 if _n_exprs
[i
] == old_child
then
9796 if new_child
!= null then
9797 assert new_child
isa PExpr
9798 _n_exprs
[i
] = new_child
9799 new_child
.parent
= self
9801 _n_exprs
.remove_at
(i
)
9808 redef meth visit_all
(v
: Visitor)
9810 for n
in _n_exprs
do
9815 redef meth visit_all_reverse
(v
: Visitor)
9818 var i
= _n_exprs
.length
9820 v
.visit
(_n_exprs
[i
])
9826 redef class ASelfExpr
9827 redef meth n_kwself
=(n
: TKwself)
9835 private init empty_init
do end
9837 init init_aselfexpr
(
9842 _n_kwself
= n_kwself
9843 if n_kwself
!= null then
9844 n_kwself
.parent
= self
9848 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9850 assert old_child
!= null
9851 if _n_kwself
== old_child
then
9852 if new_child
!= null then
9853 new_child
.parent
= self
9854 assert new_child
isa TKwself
9855 _n_kwself
= new_child
9863 redef meth visit_all
(v
: Visitor)
9865 if _n_kwself
!= null then
9870 redef meth visit_all_reverse
(v
: Visitor)
9872 if _n_kwself
!= null then
9877 redef class AImplicitSelfExpr
9879 private init empty_init
do end
9881 init init_aimplicitselfexpr
9886 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9888 assert old_child
!= null
9891 redef meth visit_all
(v
: Visitor)
9895 redef meth visit_all_reverse
(v
: Visitor)
9899 redef class ATrueExpr
9900 redef meth n_kwtrue
=(n
: TKwtrue)
9908 private init empty_init
do end
9910 init init_atrueexpr
(
9915 _n_kwtrue
= n_kwtrue
9916 if n_kwtrue
!= null then
9917 n_kwtrue
.parent
= self
9921 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9923 assert old_child
!= null
9924 if _n_kwtrue
== old_child
then
9925 if new_child
!= null then
9926 new_child
.parent
= self
9927 assert new_child
isa TKwtrue
9928 _n_kwtrue
= new_child
9936 redef meth visit_all
(v
: Visitor)
9938 if _n_kwtrue
!= null then
9943 redef meth visit_all_reverse
(v
: Visitor)
9945 if _n_kwtrue
!= null then
9950 redef class AFalseExpr
9951 redef meth n_kwfalse
=(n
: TKwfalse)
9959 private init empty_init
do end
9961 init init_afalseexpr
(
9966 _n_kwfalse
= n_kwfalse
9967 if n_kwfalse
!= null then
9968 n_kwfalse
.parent
= self
9972 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
9974 assert old_child
!= null
9975 if _n_kwfalse
== old_child
then
9976 if new_child
!= null then
9977 new_child
.parent
= self
9978 assert new_child
isa TKwfalse
9979 _n_kwfalse
= new_child
9987 redef meth visit_all
(v
: Visitor)
9989 if _n_kwfalse
!= null then
9994 redef meth visit_all_reverse
(v
: Visitor)
9996 if _n_kwfalse
!= null then
10001 redef class ANullExpr
10002 redef meth n_kwnull
=(n
: TKwnull)
10010 private init empty_init
do end
10012 init init_anullexpr
(
10017 _n_kwnull
= n_kwnull
10018 if n_kwnull
!= null then
10019 n_kwnull
.parent
= self
10023 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10025 assert old_child
!= null
10026 if _n_kwnull
== old_child
then
10027 if new_child
!= null then
10028 new_child
.parent
= self
10029 assert new_child
isa TKwnull
10030 _n_kwnull
= new_child
10038 redef meth visit_all
(v
: Visitor)
10040 if _n_kwnull
!= null then
10045 redef meth visit_all_reverse
(v
: Visitor)
10047 if _n_kwnull
!= null then
10052 redef class AIntExpr
10053 redef meth n_number
=(n
: TNumber)
10061 private init empty_init
do end
10063 init init_aintexpr
(
10068 _n_number
= n_number
10069 if n_number
!= null then
10070 n_number
.parent
= self
10074 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10076 assert old_child
!= null
10077 if _n_number
== old_child
then
10078 if new_child
!= null then
10079 new_child
.parent
= self
10080 assert new_child
isa TNumber
10081 _n_number
= new_child
10089 redef meth visit_all
(v
: Visitor)
10091 if _n_number
!= null then
10096 redef meth visit_all_reverse
(v
: Visitor)
10098 if _n_number
!= null then
10103 redef class AFloatExpr
10104 redef meth n_float
=(n
: TFloat)
10112 private init empty_init
do end
10114 init init_afloatexpr
(
10120 if n_float
!= null then
10121 n_float
.parent
= self
10125 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10127 assert old_child
!= null
10128 if _n_float
== old_child
then
10129 if new_child
!= null then
10130 new_child
.parent
= self
10131 assert new_child
isa TFloat
10132 _n_float
= new_child
10140 redef meth visit_all
(v
: Visitor)
10142 if _n_float
!= null then
10147 redef meth visit_all_reverse
(v
: Visitor)
10149 if _n_float
!= null then
10154 redef class ACharExpr
10155 redef meth n_char
=(n
: TChar)
10163 private init empty_init
do end
10165 init init_acharexpr
(
10171 if n_char
!= null then
10172 n_char
.parent
= self
10176 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10178 assert old_child
!= null
10179 if _n_char
== old_child
then
10180 if new_child
!= null then
10181 new_child
.parent
= self
10182 assert new_child
isa TChar
10183 _n_char
= new_child
10191 redef meth visit_all
(v
: Visitor)
10193 if _n_char
!= null then
10198 redef meth visit_all_reverse
(v
: Visitor)
10200 if _n_char
!= null then
10205 redef class AStringExpr
10206 redef meth n_string
=(n
: TString)
10214 private init empty_init
do end
10216 init init_astringexpr
(
10221 _n_string
= n_string
10222 if n_string
!= null then
10223 n_string
.parent
= self
10227 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10229 assert old_child
!= null
10230 if _n_string
== old_child
then
10231 if new_child
!= null then
10232 new_child
.parent
= self
10233 assert new_child
isa TString
10234 _n_string
= new_child
10242 redef meth visit_all
(v
: Visitor)
10244 if _n_string
!= null then
10249 redef meth visit_all_reverse
(v
: Visitor)
10251 if _n_string
!= null then
10256 redef class AStartStringExpr
10257 redef meth n_string
=(n
: TStartString)
10265 private init empty_init
do end
10267 init init_astartstringexpr
(
10268 n_string
: TStartString
10272 _n_string
= n_string
10273 if n_string
!= null then
10274 n_string
.parent
= self
10278 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10280 assert old_child
!= null
10281 if _n_string
== old_child
then
10282 if new_child
!= null then
10283 new_child
.parent
= self
10284 assert new_child
isa TStartString
10285 _n_string
= new_child
10293 redef meth visit_all
(v
: Visitor)
10295 if _n_string
!= null then
10300 redef meth visit_all_reverse
(v
: Visitor)
10302 if _n_string
!= null then
10307 redef class AMidStringExpr
10308 redef meth n_string
=(n
: TMidString)
10316 private init empty_init
do end
10318 init init_amidstringexpr
(
10319 n_string
: TMidString
10323 _n_string
= n_string
10324 if n_string
!= null then
10325 n_string
.parent
= self
10329 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10331 assert old_child
!= null
10332 if _n_string
== old_child
then
10333 if new_child
!= null then
10334 new_child
.parent
= self
10335 assert new_child
isa TMidString
10336 _n_string
= new_child
10344 redef meth visit_all
(v
: Visitor)
10346 if _n_string
!= null then
10351 redef meth visit_all_reverse
(v
: Visitor)
10353 if _n_string
!= null then
10358 redef class AEndStringExpr
10359 redef meth n_string
=(n
: TEndString)
10367 private init empty_init
do end
10369 init init_aendstringexpr
(
10370 n_string
: TEndString
10374 _n_string
= n_string
10375 if n_string
!= null then
10376 n_string
.parent
= self
10380 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10382 assert old_child
!= null
10383 if _n_string
== old_child
then
10384 if new_child
!= null then
10385 new_child
.parent
= self
10386 assert new_child
isa TEndString
10387 _n_string
= new_child
10395 redef meth visit_all
(v
: Visitor)
10397 if _n_string
!= null then
10402 redef meth visit_all_reverse
(v
: Visitor)
10404 if _n_string
!= null then
10409 redef class ASuperstringExpr
10411 private init empty_init
do end
10413 init init_asuperstringexpr
(
10414 n_exprs
: Collection[Object] # Should be Collection[PExpr]
10418 _n_exprs
= new List[PExpr]
10419 for n
in n_exprs
do
10426 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10428 assert old_child
!= null
10429 for i
in [0.._n_exprs
.length
[ do
10430 if _n_exprs
[i
] == old_child
then
10431 if new_child
!= null then
10432 assert new_child
isa PExpr
10433 _n_exprs
[i
] = new_child
10434 new_child
.parent
= self
10436 _n_exprs
.remove_at
(i
)
10443 redef meth visit_all
(v
: Visitor)
10445 for n
in _n_exprs
do
10450 redef meth visit_all_reverse
(v
: Visitor)
10453 var i
= _n_exprs
.length
10455 v
.visit
(_n_exprs
[i
])
10461 redef class AParExpr
10462 redef meth n_expr
=(n
: PExpr)
10470 private init empty_init
do end
10472 init init_aparexpr
(
10478 if n_expr
!= null then
10479 n_expr
.parent
= self
10483 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10485 assert old_child
!= null
10486 if _n_expr
== old_child
then
10487 if new_child
!= null then
10488 new_child
.parent
= self
10489 assert new_child
isa PExpr
10490 _n_expr
= new_child
10498 redef meth visit_all
(v
: Visitor)
10500 if _n_expr
!= null then
10505 redef meth visit_all_reverse
(v
: Visitor)
10507 if _n_expr
!= null then
10512 redef class AAsCastExpr
10513 redef meth n_expr
=(n
: PExpr)
10520 redef meth n_kwas
=(n
: TKwas)
10527 redef meth n_type
=(n
: PType)
10535 private init empty_init
do end
10537 init init_aascastexpr
(
10545 if n_expr
!= null then
10546 n_expr
.parent
= self
10549 if n_kwas
!= null then
10550 n_kwas
.parent
= self
10553 if n_type
!= null then
10554 n_type
.parent
= self
10558 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10560 assert old_child
!= null
10561 if _n_expr
== old_child
then
10562 if new_child
!= null then
10563 new_child
.parent
= self
10564 assert new_child
isa PExpr
10565 _n_expr
= new_child
10571 if _n_kwas
== old_child
then
10572 if new_child
!= null then
10573 new_child
.parent
= self
10574 assert new_child
isa TKwas
10575 _n_kwas
= new_child
10581 if _n_type
== old_child
then
10582 if new_child
!= null then
10583 new_child
.parent
= self
10584 assert new_child
isa PType
10585 _n_type
= new_child
10593 redef meth visit_all
(v
: Visitor)
10595 if _n_expr
!= null then
10598 if _n_kwas
!= null then
10601 if _n_type
!= null then
10606 redef meth visit_all_reverse
(v
: Visitor)
10608 if _n_expr
!= null then
10611 if _n_kwas
!= null then
10614 if _n_type
!= null then
10619 redef class APlusAssignOp
10620 redef meth n_pluseq
=(n
: TPluseq)
10628 private init empty_init
do end
10630 init init_aplusassignop
(
10635 _n_pluseq
= n_pluseq
10636 if n_pluseq
!= null then
10637 n_pluseq
.parent
= self
10641 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10643 assert old_child
!= null
10644 if _n_pluseq
== old_child
then
10645 if new_child
!= null then
10646 new_child
.parent
= self
10647 assert new_child
isa TPluseq
10648 _n_pluseq
= new_child
10656 redef meth visit_all
(v
: Visitor)
10658 if _n_pluseq
!= null then
10663 redef meth visit_all_reverse
(v
: Visitor)
10665 if _n_pluseq
!= null then
10670 redef class AMinusAssignOp
10671 redef meth n_minuseq
=(n
: TMinuseq)
10679 private init empty_init
do end
10681 init init_aminusassignop
(
10682 n_minuseq
: TMinuseq
10686 _n_minuseq
= n_minuseq
10687 if n_minuseq
!= null then
10688 n_minuseq
.parent
= self
10692 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10694 assert old_child
!= null
10695 if _n_minuseq
== old_child
then
10696 if new_child
!= null then
10697 new_child
.parent
= self
10698 assert new_child
isa TMinuseq
10699 _n_minuseq
= new_child
10707 redef meth visit_all
(v
: Visitor)
10709 if _n_minuseq
!= null then
10710 v
.visit
(_n_minuseq
)
10714 redef meth visit_all_reverse
(v
: Visitor)
10716 if _n_minuseq
!= null then
10717 v
.visit
(_n_minuseq
)
10721 redef class AClosureDef
10722 redef meth n_kwwith
=(n
: TKwwith)
10729 redef meth n_kwdo
=(n
: TKwdo)
10736 redef meth n_expr
=(n
: PExpr)
10744 private init empty_init
do end
10746 init init_aclosuredef
(
10747 n_kwwith
: TKwwith ,
10748 n_id
: Collection[Object] , # Should be Collection[TId]
10754 _n_kwwith
= n_kwwith
10755 if n_kwwith
!= null then
10756 n_kwwith
.parent
= self
10758 _n_id
= new List[TId]
10765 if n_kwdo
!= null then
10766 n_kwdo
.parent
= self
10769 if n_expr
!= null then
10770 n_expr
.parent
= self
10774 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10776 assert old_child
!= null
10777 if _n_kwwith
== old_child
then
10778 if new_child
!= null then
10779 new_child
.parent
= self
10780 assert new_child
isa TKwwith
10781 _n_kwwith
= new_child
10787 for i
in [0.._n_id
.length
[ do
10788 if _n_id
[i
] == old_child
then
10789 if new_child
!= null then
10790 assert new_child
isa TId
10791 _n_id
[i
] = new_child
10792 new_child
.parent
= self
10799 if _n_kwdo
== old_child
then
10800 if new_child
!= null then
10801 new_child
.parent
= self
10802 assert new_child
isa TKwdo
10803 _n_kwdo
= new_child
10809 if _n_expr
== old_child
then
10810 if new_child
!= null then
10811 new_child
.parent
= self
10812 assert new_child
isa PExpr
10813 _n_expr
= new_child
10821 redef meth visit_all
(v
: Visitor)
10823 if _n_kwwith
!= null then
10829 if _n_kwdo
!= null then
10832 if _n_expr
!= null then
10837 redef meth visit_all_reverse
(v
: Visitor)
10839 if _n_kwwith
!= null then
10843 var i
= _n_id
.length
10849 if _n_kwdo
!= null then
10852 if _n_expr
!= null then
10857 redef class AQualified
10858 redef meth n_classid
=(n
: TClassid)
10866 private init empty_init
do end
10868 init init_aqualified
(
10869 n_id
: Collection[Object] , # Should be Collection[TId]
10870 n_classid
: TClassid
10874 _n_id
= new List[TId]
10880 _n_classid
= n_classid
10881 if n_classid
!= null then
10882 n_classid
.parent
= self
10886 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10888 assert old_child
!= null
10889 for i
in [0.._n_id
.length
[ do
10890 if _n_id
[i
] == old_child
then
10891 if new_child
!= null then
10892 assert new_child
isa TId
10893 _n_id
[i
] = new_child
10894 new_child
.parent
= self
10901 if _n_classid
== old_child
then
10902 if new_child
!= null then
10903 new_child
.parent
= self
10904 assert new_child
isa TClassid
10905 _n_classid
= new_child
10913 redef meth visit_all
(v
: Visitor)
10918 if _n_classid
!= null then
10919 v
.visit
(_n_classid
)
10923 redef meth visit_all_reverse
(v
: Visitor)
10926 var i
= _n_id
.length
10932 if _n_classid
!= null then
10933 v
.visit
(_n_classid
)
10939 private init empty_init
do end
10942 n_comment
: Collection[Object] # Should be Collection[TComment]
10946 _n_comment
= new List[TComment]
10947 for n
in n_comment
do
10948 assert n
isa TComment
10954 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
10956 assert old_child
!= null
10957 for i
in [0.._n_comment
.length
[ do
10958 if _n_comment
[i
] == old_child
then
10959 if new_child
!= null then
10960 assert new_child
isa TComment
10961 _n_comment
[i
] = new_child
10962 new_child
.parent
= self
10964 _n_comment
.remove_at
(i
)
10971 redef meth visit_all
(v
: Visitor)
10973 for n
in _n_comment
do
10978 redef meth visit_all_reverse
(v
: Visitor)
10981 var i
= _n_comment
.length
10983 v
.visit
(_n_comment
[i
])
10999 redef meth replace_child
(old_child
: PNode, new_child
: PNode)
11001 assert old_child
!= null
11002 if _n_base
== old_child
then
11003 if new_child
== null then
11005 new_child
.parent
= self
11006 assert new_child
isa PModule
11007 _n_base
= new_child
11009 old_child
.parent
= null
11014 redef meth visit_all
(v
: Visitor)
11016 if _n_base
!= null then
11021 redef meth visit_all_reverse
(v
: Visitor)
11023 if _n_base
!= null then