c_src: update
[nit.git] / c_src / parser_prod.sep.6.c
1 #include "parser_prod.sep.0.h"
2 /* method parser_prod#ACastAsExternCall#n_dot= for (self: ACastAsExternCall, nullable TDot) */
3 void parser_prod__ACastAsExternCall__n_dot_61d(val* self, val* p0) {
4 val* var_node /* var node: nullable TDot */;
5 val* var /* : null */;
6 short int var1 /* : Bool */;
7 short int var2 /* : Bool */;
8 val* var_other /* var other: nullable Object */;
9 short int var4 /* : Bool */;
10 short int var5 /* : Bool */;
11 short int var6 /* : Bool */;
12 var_node = p0;
13 self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_dot].val = var_node; /* _n_dot on <self:ACastAsExternCall> */
14 var = NULL;
15 if (var_node == NULL) {
16 var1 = 0; /* is null */
17 } else {
18 var1 = 1; /* arg is null and recv is not */
19 }
20 if (0) {
21 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TDot> */
22 var_other = var;
23 {
24 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TDot(TDot)>*/;
25 var4 = var5;
26 }
27 var6 = !var4;
28 var2 = var6;
29 goto RET_LABEL3;
30 RET_LABEL3:(void)0;
31 }
32 var1 = var2;
33 }
34 if (var1){
35 {
36 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TDot(TDot)> */
37 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TDot(TDot)> */
38 RET_LABEL7:(void)0;
39 }
40 }
41 } else {
42 }
43 RET_LABEL:;
44 }
45 /* method parser_prod#ACastAsExternCall#n_dot= for (self: Object, nullable TDot) */
46 void VIRTUAL_parser_prod__ACastAsExternCall__n_dot_61d(val* self, val* p0) {
47 parser_prod__ACastAsExternCall__n_dot_61d(self, p0); /* Direct call parser_prod#ACastAsExternCall#n_dot= on <self:Object(ACastAsExternCall)>*/
48 RET_LABEL:;
49 }
50 /* method parser_prod#ACastAsExternCall#n_kwas= for (self: ACastAsExternCall, TKwas) */
51 void parser_prod__ACastAsExternCall__n_kwas_61d(val* self, val* p0) {
52 val* var_node /* var node: TKwas */;
53 var_node = p0;
54 self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_kwas].val = var_node; /* _n_kwas on <self:ACastAsExternCall> */
55 {
56 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
57 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwas> */
58 RET_LABEL1:(void)0;
59 }
60 }
61 RET_LABEL:;
62 }
63 /* method parser_prod#ACastAsExternCall#n_kwas= for (self: Object, TKwas) */
64 void VIRTUAL_parser_prod__ACastAsExternCall__n_kwas_61d(val* self, val* p0) {
65 parser_prod__ACastAsExternCall__n_kwas_61d(self, p0); /* Direct call parser_prod#ACastAsExternCall#n_kwas= on <self:Object(ACastAsExternCall)>*/
66 RET_LABEL:;
67 }
68 /* method parser_prod#ACastAsExternCall#n_to_type= for (self: ACastAsExternCall, AType) */
69 void parser_prod__ACastAsExternCall__n_to_type_61d(val* self, val* p0) {
70 val* var_node /* var node: AType */;
71 var_node = p0;
72 self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_to_type].val = var_node; /* _n_to_type on <self:ACastAsExternCall> */
73 {
74 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
75 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
76 RET_LABEL1:(void)0;
77 }
78 }
79 RET_LABEL:;
80 }
81 /* method parser_prod#ACastAsExternCall#n_to_type= for (self: Object, AType) */
82 void VIRTUAL_parser_prod__ACastAsExternCall__n_to_type_61d(val* self, val* p0) {
83 parser_prod__ACastAsExternCall__n_to_type_61d(self, p0); /* Direct call parser_prod#ACastAsExternCall#n_to_type= on <self:Object(ACastAsExternCall)>*/
84 RET_LABEL:;
85 }
86 /* method parser_prod#ACastAsExternCall#visit_all for (self: ACastAsExternCall, Visitor) */
87 void parser_prod__ACastAsExternCall__visit_all(val* self, val* p0) {
88 val* var_v /* var v: Visitor */;
89 val* var /* : AType */;
90 val* var1 /* : nullable TDot */;
91 val* var2 /* : TKwas */;
92 val* var3 /* : AType */;
93 var_v = p0;
94 var = self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_from_type].val; /* _n_from_type on <self:ACastAsExternCall> */
95 if (unlikely(var == NULL)) {
96 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_from_type");
97 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7272);
98 show_backtrace(1);
99 }
100 {
101 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
102 }
103 var1 = self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_dot].val; /* _n_dot on <self:ACastAsExternCall> */
104 {
105 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
106 }
107 var2 = self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_kwas].val; /* _n_kwas on <self:ACastAsExternCall> */
108 if (unlikely(var2 == NULL)) {
109 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
110 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7274);
111 show_backtrace(1);
112 }
113 {
114 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
115 }
116 var3 = self->attrs[COLOR_parser_nodes__ACastAsExternCall___n_to_type].val; /* _n_to_type on <self:ACastAsExternCall> */
117 if (unlikely(var3 == NULL)) {
118 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_to_type");
119 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7275);
120 show_backtrace(1);
121 }
122 {
123 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
124 }
125 RET_LABEL:;
126 }
127 /* method parser_prod#ACastAsExternCall#visit_all for (self: Object, Visitor) */
128 void VIRTUAL_parser_prod__ACastAsExternCall__visit_all(val* self, val* p0) {
129 parser_prod__ACastAsExternCall__visit_all(self, p0); /* Direct call parser_prod#ACastAsExternCall#visit_all on <self:Object(ACastAsExternCall)>*/
130 RET_LABEL:;
131 }
132 /* method parser_prod#AAsNullableExternCall#init_aasnullableexterncall for (self: AAsNullableExternCall, nullable AType, nullable TKwas, nullable TKwnullable) */
133 void parser_prod__AAsNullableExternCall__init_aasnullableexterncall(val* self, val* p0, val* p1, val* p2) {
134 val* var_n_type /* var n_type: nullable AType */;
135 val* var_n_kwas /* var n_kwas: nullable TKwas */;
136 val* var_n_kwnullable /* var n_kwnullable: nullable TKwnullable */;
137 var_n_type = p0;
138 var_n_kwas = p1;
139 var_n_kwnullable = p2;
140 if (unlikely(var_n_type == NULL)) {
141 PRINT_ERROR("Runtime error: %s", "Cast failed");
142 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7285);
143 show_backtrace(1);
144 }
145 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_type].val = var_n_type; /* _n_type on <self:AAsNullableExternCall> */
146 if (var_n_type == NULL) {
147 PRINT_ERROR("Runtime error: %s", "Receiver is null");
148 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7286);
149 show_backtrace(1);
150 } else {
151 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
152 if (unlikely(var_n_type == NULL)) {
153 PRINT_ERROR("Runtime error: %s", "Receiver is null");
154 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
155 show_backtrace(1);
156 }
157 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
158 RET_LABEL1:(void)0;
159 }
160 }
161 if (unlikely(var_n_kwas == NULL)) {
162 PRINT_ERROR("Runtime error: %s", "Cast failed");
163 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7287);
164 show_backtrace(1);
165 }
166 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwas].val = var_n_kwas; /* _n_kwas on <self:AAsNullableExternCall> */
167 if (var_n_kwas == NULL) {
168 PRINT_ERROR("Runtime error: %s", "Receiver is null");
169 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7288);
170 show_backtrace(1);
171 } else {
172 { /* Inline parser_nodes#ANode#parent= (var_n_kwas,self) on <var_n_kwas:nullable TKwas> */
173 if (unlikely(var_n_kwas == NULL)) {
174 PRINT_ERROR("Runtime error: %s", "Receiver is null");
175 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
176 show_backtrace(1);
177 }
178 var_n_kwas->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwas:nullable TKwas> */
179 RET_LABEL2:(void)0;
180 }
181 }
182 if (unlikely(var_n_kwnullable == NULL)) {
183 PRINT_ERROR("Runtime error: %s", "Cast failed");
184 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7289);
185 show_backtrace(1);
186 }
187 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwnullable].val = var_n_kwnullable; /* _n_kwnullable on <self:AAsNullableExternCall> */
188 if (var_n_kwnullable == NULL) {
189 PRINT_ERROR("Runtime error: %s", "Receiver is null");
190 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7290);
191 show_backtrace(1);
192 } else {
193 { /* Inline parser_nodes#ANode#parent= (var_n_kwnullable,self) on <var_n_kwnullable:nullable TKwnullable> */
194 if (unlikely(var_n_kwnullable == NULL)) {
195 PRINT_ERROR("Runtime error: %s", "Receiver is null");
196 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
197 show_backtrace(1);
198 }
199 var_n_kwnullable->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwnullable:nullable TKwnullable> */
200 RET_LABEL3:(void)0;
201 }
202 }
203 RET_LABEL:;
204 }
205 /* method parser_prod#AAsNullableExternCall#init_aasnullableexterncall for (self: Object, nullable AType, nullable TKwas, nullable TKwnullable) */
206 void VIRTUAL_parser_prod__AAsNullableExternCall__init_aasnullableexterncall(val* self, val* p0, val* p1, val* p2) {
207 parser_prod__AAsNullableExternCall__init_aasnullableexterncall(self, p0, p1, p2); /* Direct call parser_prod#AAsNullableExternCall#init_aasnullableexterncall on <self:Object(AAsNullableExternCall)>*/
208 RET_LABEL:;
209 }
210 /* method parser_prod#AAsNullableExternCall#replace_child for (self: AAsNullableExternCall, ANode, nullable ANode) */
211 void parser_prod__AAsNullableExternCall__replace_child(val* self, val* p0, val* p1) {
212 val* var_old_child /* var old_child: ANode */;
213 val* var_new_child /* var new_child: nullable ANode */;
214 val* var /* : AType */;
215 short int var1 /* : Bool */;
216 short int var2 /* : Bool */;
217 val* var_other /* var other: nullable Object */;
218 short int var4 /* : Bool */;
219 short int var6 /* : Bool */;
220 short int var7 /* : Bool */;
221 int cltype;
222 int idtype;
223 const char* var_class_name;
224 val* var8 /* : TKwas */;
225 short int var9 /* : Bool */;
226 short int var10 /* : Bool */;
227 short int var12 /* : Bool */;
228 short int var14 /* : Bool */;
229 short int var15 /* : Bool */;
230 int cltype16;
231 int idtype17;
232 const char* var_class_name18;
233 val* var19 /* : TKwnullable */;
234 short int var20 /* : Bool */;
235 short int var21 /* : Bool */;
236 short int var23 /* : Bool */;
237 short int var25 /* : Bool */;
238 short int var26 /* : Bool */;
239 int cltype27;
240 int idtype28;
241 const char* var_class_name29;
242 var_old_child = p0;
243 var_new_child = p1;
244 var = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_type].val; /* _n_type on <self:AAsNullableExternCall> */
245 if (unlikely(var == NULL)) {
246 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
247 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7295);
248 show_backtrace(1);
249 }
250 {
251 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
252 var_other = var_old_child;
253 {
254 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
255 var6 = var == var_other;
256 var4 = var6;
257 goto RET_LABEL5;
258 RET_LABEL5:(void)0;
259 }
260 }
261 var2 = var4;
262 goto RET_LABEL3;
263 RET_LABEL3:(void)0;
264 }
265 var1 = var2;
266 }
267 if (var1){
268 /* <var_new_child:nullable ANode> isa AType */
269 cltype = type_parser_nodes__AType.color;
270 idtype = type_parser_nodes__AType.id;
271 if(var_new_child == NULL) {
272 var7 = 0;
273 } else {
274 if(cltype >= var_new_child->type->table_size) {
275 var7 = 0;
276 } else {
277 var7 = var_new_child->type->type_table[cltype] == idtype;
278 }
279 }
280 if (unlikely(!var7)) {
281 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
282 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name);
283 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7296);
284 show_backtrace(1);
285 }
286 {
287 parser_prod__AAsNullableExternCall__n_type_61d(self, var_new_child); /* Direct call parser_prod#AAsNullableExternCall#n_type= on <self:AAsNullableExternCall>*/
288 }
289 goto RET_LABEL;
290 } else {
291 }
292 var8 = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwas].val; /* _n_kwas on <self:AAsNullableExternCall> */
293 if (unlikely(var8 == NULL)) {
294 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
295 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7299);
296 show_backtrace(1);
297 }
298 {
299 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TKwas> */
300 var_other = var_old_child;
301 {
302 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TKwas> */
303 var14 = var8 == var_other;
304 var12 = var14;
305 goto RET_LABEL13;
306 RET_LABEL13:(void)0;
307 }
308 }
309 var10 = var12;
310 goto RET_LABEL11;
311 RET_LABEL11:(void)0;
312 }
313 var9 = var10;
314 }
315 if (var9){
316 /* <var_new_child:nullable ANode> isa TKwas */
317 cltype16 = type_parser_nodes__TKwas.color;
318 idtype17 = type_parser_nodes__TKwas.id;
319 if(var_new_child == NULL) {
320 var15 = 0;
321 } else {
322 if(cltype16 >= var_new_child->type->table_size) {
323 var15 = 0;
324 } else {
325 var15 = var_new_child->type->type_table[cltype16] == idtype17;
326 }
327 }
328 if (unlikely(!var15)) {
329 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
330 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwas", var_class_name18);
331 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7300);
332 show_backtrace(1);
333 }
334 {
335 parser_prod__AAsNullableExternCall__n_kwas_61d(self, var_new_child); /* Direct call parser_prod#AAsNullableExternCall#n_kwas= on <self:AAsNullableExternCall>*/
336 }
337 goto RET_LABEL;
338 } else {
339 }
340 var19 = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwnullable].val; /* _n_kwnullable on <self:AAsNullableExternCall> */
341 if (unlikely(var19 == NULL)) {
342 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
343 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7303);
344 show_backtrace(1);
345 }
346 {
347 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:TKwnullable> */
348 var_other = var_old_child;
349 {
350 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:TKwnullable> */
351 var25 = var19 == var_other;
352 var23 = var25;
353 goto RET_LABEL24;
354 RET_LABEL24:(void)0;
355 }
356 }
357 var21 = var23;
358 goto RET_LABEL22;
359 RET_LABEL22:(void)0;
360 }
361 var20 = var21;
362 }
363 if (var20){
364 /* <var_new_child:nullable ANode> isa TKwnullable */
365 cltype27 = type_parser_nodes__TKwnullable.color;
366 idtype28 = type_parser_nodes__TKwnullable.id;
367 if(var_new_child == NULL) {
368 var26 = 0;
369 } else {
370 if(cltype27 >= var_new_child->type->table_size) {
371 var26 = 0;
372 } else {
373 var26 = var_new_child->type->type_table[cltype27] == idtype28;
374 }
375 }
376 if (unlikely(!var26)) {
377 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
378 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnullable", var_class_name29);
379 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7304);
380 show_backtrace(1);
381 }
382 {
383 parser_prod__AAsNullableExternCall__n_kwnullable_61d(self, var_new_child); /* Direct call parser_prod#AAsNullableExternCall#n_kwnullable= on <self:AAsNullableExternCall>*/
384 }
385 goto RET_LABEL;
386 } else {
387 }
388 RET_LABEL:;
389 }
390 /* method parser_prod#AAsNullableExternCall#replace_child for (self: Object, ANode, nullable ANode) */
391 void VIRTUAL_parser_prod__AAsNullableExternCall__replace_child(val* self, val* p0, val* p1) {
392 parser_prod__AAsNullableExternCall__replace_child(self, p0, p1); /* Direct call parser_prod#AAsNullableExternCall#replace_child on <self:Object(AAsNullableExternCall)>*/
393 RET_LABEL:;
394 }
395 /* method parser_prod#AAsNullableExternCall#n_type= for (self: AAsNullableExternCall, AType) */
396 void parser_prod__AAsNullableExternCall__n_type_61d(val* self, val* p0) {
397 val* var_node /* var node: AType */;
398 var_node = p0;
399 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_type].val = var_node; /* _n_type on <self:AAsNullableExternCall> */
400 {
401 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
402 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
403 RET_LABEL1:(void)0;
404 }
405 }
406 RET_LABEL:;
407 }
408 /* method parser_prod#AAsNullableExternCall#n_type= for (self: Object, AType) */
409 void VIRTUAL_parser_prod__AAsNullableExternCall__n_type_61d(val* self, val* p0) {
410 parser_prod__AAsNullableExternCall__n_type_61d(self, p0); /* Direct call parser_prod#AAsNullableExternCall#n_type= on <self:Object(AAsNullableExternCall)>*/
411 RET_LABEL:;
412 }
413 /* method parser_prod#AAsNullableExternCall#n_kwas= for (self: AAsNullableExternCall, TKwas) */
414 void parser_prod__AAsNullableExternCall__n_kwas_61d(val* self, val* p0) {
415 val* var_node /* var node: TKwas */;
416 var_node = p0;
417 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwas].val = var_node; /* _n_kwas on <self:AAsNullableExternCall> */
418 {
419 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
420 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwas> */
421 RET_LABEL1:(void)0;
422 }
423 }
424 RET_LABEL:;
425 }
426 /* method parser_prod#AAsNullableExternCall#n_kwas= for (self: Object, TKwas) */
427 void VIRTUAL_parser_prod__AAsNullableExternCall__n_kwas_61d(val* self, val* p0) {
428 parser_prod__AAsNullableExternCall__n_kwas_61d(self, p0); /* Direct call parser_prod#AAsNullableExternCall#n_kwas= on <self:Object(AAsNullableExternCall)>*/
429 RET_LABEL:;
430 }
431 /* method parser_prod#AAsNullableExternCall#n_kwnullable= for (self: AAsNullableExternCall, TKwnullable) */
432 void parser_prod__AAsNullableExternCall__n_kwnullable_61d(val* self, val* p0) {
433 val* var_node /* var node: TKwnullable */;
434 var_node = p0;
435 self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwnullable].val = var_node; /* _n_kwnullable on <self:AAsNullableExternCall> */
436 {
437 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnullable> */
438 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwnullable> */
439 RET_LABEL1:(void)0;
440 }
441 }
442 RET_LABEL:;
443 }
444 /* method parser_prod#AAsNullableExternCall#n_kwnullable= for (self: Object, TKwnullable) */
445 void VIRTUAL_parser_prod__AAsNullableExternCall__n_kwnullable_61d(val* self, val* p0) {
446 parser_prod__AAsNullableExternCall__n_kwnullable_61d(self, p0); /* Direct call parser_prod#AAsNullableExternCall#n_kwnullable= on <self:Object(AAsNullableExternCall)>*/
447 RET_LABEL:;
448 }
449 /* method parser_prod#AAsNullableExternCall#visit_all for (self: AAsNullableExternCall, Visitor) */
450 void parser_prod__AAsNullableExternCall__visit_all(val* self, val* p0) {
451 val* var_v /* var v: Visitor */;
452 val* var /* : AType */;
453 val* var1 /* : TKwas */;
454 val* var2 /* : TKwnullable */;
455 var_v = p0;
456 var = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_type].val; /* _n_type on <self:AAsNullableExternCall> */
457 if (unlikely(var == NULL)) {
458 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
459 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7328);
460 show_backtrace(1);
461 }
462 {
463 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
464 }
465 var1 = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwas].val; /* _n_kwas on <self:AAsNullableExternCall> */
466 if (unlikely(var1 == NULL)) {
467 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
468 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7329);
469 show_backtrace(1);
470 }
471 {
472 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
473 }
474 var2 = self->attrs[COLOR_parser_nodes__AAsNullableExternCall___n_kwnullable].val; /* _n_kwnullable on <self:AAsNullableExternCall> */
475 if (unlikely(var2 == NULL)) {
476 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
477 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7330);
478 show_backtrace(1);
479 }
480 {
481 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
482 }
483 RET_LABEL:;
484 }
485 /* method parser_prod#AAsNullableExternCall#visit_all for (self: Object, Visitor) */
486 void VIRTUAL_parser_prod__AAsNullableExternCall__visit_all(val* self, val* p0) {
487 parser_prod__AAsNullableExternCall__visit_all(self, p0); /* Direct call parser_prod#AAsNullableExternCall#visit_all on <self:Object(AAsNullableExternCall)>*/
488 RET_LABEL:;
489 }
490 /* method parser_prod#AAsNotNullableExternCall#init_aasnotnullableexterncall for (self: AAsNotNullableExternCall, nullable AType, nullable TKwas, nullable TKwnot, nullable TKwnullable) */
491 void parser_prod__AAsNotNullableExternCall__init_aasnotnullableexterncall(val* self, val* p0, val* p1, val* p2, val* p3) {
492 val* var_n_type /* var n_type: nullable AType */;
493 val* var_n_kwas /* var n_kwas: nullable TKwas */;
494 val* var_n_kwnot /* var n_kwnot: nullable TKwnot */;
495 val* var_n_kwnullable /* var n_kwnullable: nullable TKwnullable */;
496 var_n_type = p0;
497 var_n_kwas = p1;
498 var_n_kwnot = p2;
499 var_n_kwnullable = p3;
500 if (unlikely(var_n_type == NULL)) {
501 PRINT_ERROR("Runtime error: %s", "Cast failed");
502 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7341);
503 show_backtrace(1);
504 }
505 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_type].val = var_n_type; /* _n_type on <self:AAsNotNullableExternCall> */
506 if (var_n_type == NULL) {
507 PRINT_ERROR("Runtime error: %s", "Receiver is null");
508 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7342);
509 show_backtrace(1);
510 } else {
511 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
512 if (unlikely(var_n_type == NULL)) {
513 PRINT_ERROR("Runtime error: %s", "Receiver is null");
514 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
515 show_backtrace(1);
516 }
517 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
518 RET_LABEL1:(void)0;
519 }
520 }
521 if (unlikely(var_n_kwas == NULL)) {
522 PRINT_ERROR("Runtime error: %s", "Cast failed");
523 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7343);
524 show_backtrace(1);
525 }
526 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwas].val = var_n_kwas; /* _n_kwas on <self:AAsNotNullableExternCall> */
527 if (var_n_kwas == NULL) {
528 PRINT_ERROR("Runtime error: %s", "Receiver is null");
529 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7344);
530 show_backtrace(1);
531 } else {
532 { /* Inline parser_nodes#ANode#parent= (var_n_kwas,self) on <var_n_kwas:nullable TKwas> */
533 if (unlikely(var_n_kwas == NULL)) {
534 PRINT_ERROR("Runtime error: %s", "Receiver is null");
535 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
536 show_backtrace(1);
537 }
538 var_n_kwas->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwas:nullable TKwas> */
539 RET_LABEL2:(void)0;
540 }
541 }
542 if (unlikely(var_n_kwnot == NULL)) {
543 PRINT_ERROR("Runtime error: %s", "Cast failed");
544 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7345);
545 show_backtrace(1);
546 }
547 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnot].val = var_n_kwnot; /* _n_kwnot on <self:AAsNotNullableExternCall> */
548 if (var_n_kwnot == NULL) {
549 PRINT_ERROR("Runtime error: %s", "Receiver is null");
550 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7346);
551 show_backtrace(1);
552 } else {
553 { /* Inline parser_nodes#ANode#parent= (var_n_kwnot,self) on <var_n_kwnot:nullable TKwnot> */
554 if (unlikely(var_n_kwnot == NULL)) {
555 PRINT_ERROR("Runtime error: %s", "Receiver is null");
556 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
557 show_backtrace(1);
558 }
559 var_n_kwnot->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwnot:nullable TKwnot> */
560 RET_LABEL3:(void)0;
561 }
562 }
563 if (unlikely(var_n_kwnullable == NULL)) {
564 PRINT_ERROR("Runtime error: %s", "Cast failed");
565 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7347);
566 show_backtrace(1);
567 }
568 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnullable].val = var_n_kwnullable; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
569 if (var_n_kwnullable == NULL) {
570 PRINT_ERROR("Runtime error: %s", "Receiver is null");
571 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7348);
572 show_backtrace(1);
573 } else {
574 { /* Inline parser_nodes#ANode#parent= (var_n_kwnullable,self) on <var_n_kwnullable:nullable TKwnullable> */
575 if (unlikely(var_n_kwnullable == NULL)) {
576 PRINT_ERROR("Runtime error: %s", "Receiver is null");
577 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
578 show_backtrace(1);
579 }
580 var_n_kwnullable->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwnullable:nullable TKwnullable> */
581 RET_LABEL4:(void)0;
582 }
583 }
584 RET_LABEL:;
585 }
586 /* method parser_prod#AAsNotNullableExternCall#init_aasnotnullableexterncall for (self: Object, nullable AType, nullable TKwas, nullable TKwnot, nullable TKwnullable) */
587 void VIRTUAL_parser_prod__AAsNotNullableExternCall__init_aasnotnullableexterncall(val* self, val* p0, val* p1, val* p2, val* p3) {
588 parser_prod__AAsNotNullableExternCall__init_aasnotnullableexterncall(self, p0, p1, p2, p3); /* Direct call parser_prod#AAsNotNullableExternCall#init_aasnotnullableexterncall on <self:Object(AAsNotNullableExternCall)>*/
589 RET_LABEL:;
590 }
591 /* method parser_prod#AAsNotNullableExternCall#replace_child for (self: AAsNotNullableExternCall, ANode, nullable ANode) */
592 void parser_prod__AAsNotNullableExternCall__replace_child(val* self, val* p0, val* p1) {
593 val* var_old_child /* var old_child: ANode */;
594 val* var_new_child /* var new_child: nullable ANode */;
595 val* var /* : AType */;
596 short int var1 /* : Bool */;
597 short int var2 /* : Bool */;
598 val* var_other /* var other: nullable Object */;
599 short int var4 /* : Bool */;
600 short int var6 /* : Bool */;
601 short int var7 /* : Bool */;
602 int cltype;
603 int idtype;
604 const char* var_class_name;
605 val* var8 /* : TKwas */;
606 short int var9 /* : Bool */;
607 short int var10 /* : Bool */;
608 short int var12 /* : Bool */;
609 short int var14 /* : Bool */;
610 short int var15 /* : Bool */;
611 int cltype16;
612 int idtype17;
613 const char* var_class_name18;
614 val* var19 /* : TKwnot */;
615 short int var20 /* : Bool */;
616 short int var21 /* : Bool */;
617 short int var23 /* : Bool */;
618 short int var25 /* : Bool */;
619 short int var26 /* : Bool */;
620 int cltype27;
621 int idtype28;
622 const char* var_class_name29;
623 val* var30 /* : TKwnullable */;
624 short int var31 /* : Bool */;
625 short int var32 /* : Bool */;
626 short int var34 /* : Bool */;
627 short int var36 /* : Bool */;
628 short int var37 /* : Bool */;
629 int cltype38;
630 int idtype39;
631 const char* var_class_name40;
632 var_old_child = p0;
633 var_new_child = p1;
634 var = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_type].val; /* _n_type on <self:AAsNotNullableExternCall> */
635 if (unlikely(var == NULL)) {
636 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
637 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7353);
638 show_backtrace(1);
639 }
640 {
641 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
642 var_other = var_old_child;
643 {
644 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
645 var6 = var == var_other;
646 var4 = var6;
647 goto RET_LABEL5;
648 RET_LABEL5:(void)0;
649 }
650 }
651 var2 = var4;
652 goto RET_LABEL3;
653 RET_LABEL3:(void)0;
654 }
655 var1 = var2;
656 }
657 if (var1){
658 /* <var_new_child:nullable ANode> isa AType */
659 cltype = type_parser_nodes__AType.color;
660 idtype = type_parser_nodes__AType.id;
661 if(var_new_child == NULL) {
662 var7 = 0;
663 } else {
664 if(cltype >= var_new_child->type->table_size) {
665 var7 = 0;
666 } else {
667 var7 = var_new_child->type->type_table[cltype] == idtype;
668 }
669 }
670 if (unlikely(!var7)) {
671 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
672 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name);
673 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7354);
674 show_backtrace(1);
675 }
676 {
677 parser_prod__AAsNotNullableExternCall__n_type_61d(self, var_new_child); /* Direct call parser_prod#AAsNotNullableExternCall#n_type= on <self:AAsNotNullableExternCall>*/
678 }
679 goto RET_LABEL;
680 } else {
681 }
682 var8 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwas].val; /* _n_kwas on <self:AAsNotNullableExternCall> */
683 if (unlikely(var8 == NULL)) {
684 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
685 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7357);
686 show_backtrace(1);
687 }
688 {
689 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TKwas> */
690 var_other = var_old_child;
691 {
692 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TKwas> */
693 var14 = var8 == var_other;
694 var12 = var14;
695 goto RET_LABEL13;
696 RET_LABEL13:(void)0;
697 }
698 }
699 var10 = var12;
700 goto RET_LABEL11;
701 RET_LABEL11:(void)0;
702 }
703 var9 = var10;
704 }
705 if (var9){
706 /* <var_new_child:nullable ANode> isa TKwas */
707 cltype16 = type_parser_nodes__TKwas.color;
708 idtype17 = type_parser_nodes__TKwas.id;
709 if(var_new_child == NULL) {
710 var15 = 0;
711 } else {
712 if(cltype16 >= var_new_child->type->table_size) {
713 var15 = 0;
714 } else {
715 var15 = var_new_child->type->type_table[cltype16] == idtype17;
716 }
717 }
718 if (unlikely(!var15)) {
719 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
720 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwas", var_class_name18);
721 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7358);
722 show_backtrace(1);
723 }
724 {
725 parser_prod__AAsNotNullableExternCall__n_kwas_61d(self, var_new_child); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwas= on <self:AAsNotNullableExternCall>*/
726 }
727 goto RET_LABEL;
728 } else {
729 }
730 var19 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnot].val; /* _n_kwnot on <self:AAsNotNullableExternCall> */
731 if (unlikely(var19 == NULL)) {
732 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnot");
733 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7361);
734 show_backtrace(1);
735 }
736 {
737 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:TKwnot> */
738 var_other = var_old_child;
739 {
740 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:TKwnot> */
741 var25 = var19 == var_other;
742 var23 = var25;
743 goto RET_LABEL24;
744 RET_LABEL24:(void)0;
745 }
746 }
747 var21 = var23;
748 goto RET_LABEL22;
749 RET_LABEL22:(void)0;
750 }
751 var20 = var21;
752 }
753 if (var20){
754 /* <var_new_child:nullable ANode> isa TKwnot */
755 cltype27 = type_parser_nodes__TKwnot.color;
756 idtype28 = type_parser_nodes__TKwnot.id;
757 if(var_new_child == NULL) {
758 var26 = 0;
759 } else {
760 if(cltype27 >= var_new_child->type->table_size) {
761 var26 = 0;
762 } else {
763 var26 = var_new_child->type->type_table[cltype27] == idtype28;
764 }
765 }
766 if (unlikely(!var26)) {
767 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
768 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnot", var_class_name29);
769 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7362);
770 show_backtrace(1);
771 }
772 {
773 parser_prod__AAsNotNullableExternCall__n_kwnot_61d(self, var_new_child); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnot= on <self:AAsNotNullableExternCall>*/
774 }
775 goto RET_LABEL;
776 } else {
777 }
778 var30 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnullable].val; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
779 if (unlikely(var30 == NULL)) {
780 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
781 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7365);
782 show_backtrace(1);
783 }
784 {
785 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwnullable> */
786 var_other = var_old_child;
787 {
788 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwnullable> */
789 var36 = var30 == var_other;
790 var34 = var36;
791 goto RET_LABEL35;
792 RET_LABEL35:(void)0;
793 }
794 }
795 var32 = var34;
796 goto RET_LABEL33;
797 RET_LABEL33:(void)0;
798 }
799 var31 = var32;
800 }
801 if (var31){
802 /* <var_new_child:nullable ANode> isa TKwnullable */
803 cltype38 = type_parser_nodes__TKwnullable.color;
804 idtype39 = type_parser_nodes__TKwnullable.id;
805 if(var_new_child == NULL) {
806 var37 = 0;
807 } else {
808 if(cltype38 >= var_new_child->type->table_size) {
809 var37 = 0;
810 } else {
811 var37 = var_new_child->type->type_table[cltype38] == idtype39;
812 }
813 }
814 if (unlikely(!var37)) {
815 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
816 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnullable", var_class_name40);
817 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7366);
818 show_backtrace(1);
819 }
820 {
821 parser_prod__AAsNotNullableExternCall__n_kwnullable_61d(self, var_new_child); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnullable= on <self:AAsNotNullableExternCall>*/
822 }
823 goto RET_LABEL;
824 } else {
825 }
826 RET_LABEL:;
827 }
828 /* method parser_prod#AAsNotNullableExternCall#replace_child for (self: Object, ANode, nullable ANode) */
829 void VIRTUAL_parser_prod__AAsNotNullableExternCall__replace_child(val* self, val* p0, val* p1) {
830 parser_prod__AAsNotNullableExternCall__replace_child(self, p0, p1); /* Direct call parser_prod#AAsNotNullableExternCall#replace_child on <self:Object(AAsNotNullableExternCall)>*/
831 RET_LABEL:;
832 }
833 /* method parser_prod#AAsNotNullableExternCall#n_type= for (self: AAsNotNullableExternCall, AType) */
834 void parser_prod__AAsNotNullableExternCall__n_type_61d(val* self, val* p0) {
835 val* var_node /* var node: AType */;
836 var_node = p0;
837 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_type].val = var_node; /* _n_type on <self:AAsNotNullableExternCall> */
838 {
839 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
840 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
841 RET_LABEL1:(void)0;
842 }
843 }
844 RET_LABEL:;
845 }
846 /* method parser_prod#AAsNotNullableExternCall#n_type= for (self: Object, AType) */
847 void VIRTUAL_parser_prod__AAsNotNullableExternCall__n_type_61d(val* self, val* p0) {
848 parser_prod__AAsNotNullableExternCall__n_type_61d(self, p0); /* Direct call parser_prod#AAsNotNullableExternCall#n_type= on <self:Object(AAsNotNullableExternCall)>*/
849 RET_LABEL:;
850 }
851 /* method parser_prod#AAsNotNullableExternCall#n_kwas= for (self: AAsNotNullableExternCall, TKwas) */
852 void parser_prod__AAsNotNullableExternCall__n_kwas_61d(val* self, val* p0) {
853 val* var_node /* var node: TKwas */;
854 var_node = p0;
855 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwas].val = var_node; /* _n_kwas on <self:AAsNotNullableExternCall> */
856 {
857 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
858 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwas> */
859 RET_LABEL1:(void)0;
860 }
861 }
862 RET_LABEL:;
863 }
864 /* method parser_prod#AAsNotNullableExternCall#n_kwas= for (self: Object, TKwas) */
865 void VIRTUAL_parser_prod__AAsNotNullableExternCall__n_kwas_61d(val* self, val* p0) {
866 parser_prod__AAsNotNullableExternCall__n_kwas_61d(self, p0); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwas= on <self:Object(AAsNotNullableExternCall)>*/
867 RET_LABEL:;
868 }
869 /* method parser_prod#AAsNotNullableExternCall#n_kwnot= for (self: AAsNotNullableExternCall, TKwnot) */
870 void parser_prod__AAsNotNullableExternCall__n_kwnot_61d(val* self, val* p0) {
871 val* var_node /* var node: TKwnot */;
872 var_node = p0;
873 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnot].val = var_node; /* _n_kwnot on <self:AAsNotNullableExternCall> */
874 {
875 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnot> */
876 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwnot> */
877 RET_LABEL1:(void)0;
878 }
879 }
880 RET_LABEL:;
881 }
882 /* method parser_prod#AAsNotNullableExternCall#n_kwnot= for (self: Object, TKwnot) */
883 void VIRTUAL_parser_prod__AAsNotNullableExternCall__n_kwnot_61d(val* self, val* p0) {
884 parser_prod__AAsNotNullableExternCall__n_kwnot_61d(self, p0); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnot= on <self:Object(AAsNotNullableExternCall)>*/
885 RET_LABEL:;
886 }
887 /* method parser_prod#AAsNotNullableExternCall#n_kwnullable= for (self: AAsNotNullableExternCall, TKwnullable) */
888 void parser_prod__AAsNotNullableExternCall__n_kwnullable_61d(val* self, val* p0) {
889 val* var_node /* var node: TKwnullable */;
890 var_node = p0;
891 self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnullable].val = var_node; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
892 {
893 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnullable> */
894 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwnullable> */
895 RET_LABEL1:(void)0;
896 }
897 }
898 RET_LABEL:;
899 }
900 /* method parser_prod#AAsNotNullableExternCall#n_kwnullable= for (self: Object, TKwnullable) */
901 void VIRTUAL_parser_prod__AAsNotNullableExternCall__n_kwnullable_61d(val* self, val* p0) {
902 parser_prod__AAsNotNullableExternCall__n_kwnullable_61d(self, p0); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnullable= on <self:Object(AAsNotNullableExternCall)>*/
903 RET_LABEL:;
904 }
905 /* method parser_prod#AAsNotNullableExternCall#visit_all for (self: AAsNotNullableExternCall, Visitor) */
906 void parser_prod__AAsNotNullableExternCall__visit_all(val* self, val* p0) {
907 val* var_v /* var v: Visitor */;
908 val* var /* : AType */;
909 val* var1 /* : TKwas */;
910 val* var2 /* : TKwnot */;
911 val* var3 /* : TKwnullable */;
912 var_v = p0;
913 var = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_type].val; /* _n_type on <self:AAsNotNullableExternCall> */
914 if (unlikely(var == NULL)) {
915 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
916 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7395);
917 show_backtrace(1);
918 }
919 {
920 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
921 }
922 var1 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwas].val; /* _n_kwas on <self:AAsNotNullableExternCall> */
923 if (unlikely(var1 == NULL)) {
924 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
925 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7396);
926 show_backtrace(1);
927 }
928 {
929 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
930 }
931 var2 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnot].val; /* _n_kwnot on <self:AAsNotNullableExternCall> */
932 if (unlikely(var2 == NULL)) {
933 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnot");
934 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7397);
935 show_backtrace(1);
936 }
937 {
938 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
939 }
940 var3 = self->attrs[COLOR_parser_nodes__AAsNotNullableExternCall___n_kwnullable].val; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
941 if (unlikely(var3 == NULL)) {
942 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
943 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7398);
944 show_backtrace(1);
945 }
946 {
947 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
948 }
949 RET_LABEL:;
950 }
951 /* method parser_prod#AAsNotNullableExternCall#visit_all for (self: Object, Visitor) */
952 void VIRTUAL_parser_prod__AAsNotNullableExternCall__visit_all(val* self, val* p0) {
953 parser_prod__AAsNotNullableExternCall__visit_all(self, p0); /* Direct call parser_prod#AAsNotNullableExternCall#visit_all on <self:Object(AAsNotNullableExternCall)>*/
954 RET_LABEL:;
955 }
956 /* method parser_prod#AInLanguage#init_ainlanguage for (self: AInLanguage, nullable TKwin, nullable TString) */
957 void parser_prod__AInLanguage__init_ainlanguage(val* self, val* p0, val* p1) {
958 val* var_n_kwin /* var n_kwin: nullable TKwin */;
959 val* var_n_string /* var n_string: nullable TString */;
960 var_n_kwin = p0;
961 var_n_string = p1;
962 if (unlikely(var_n_kwin == NULL)) {
963 PRINT_ERROR("Runtime error: %s", "Cast failed");
964 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7407);
965 show_backtrace(1);
966 }
967 self->attrs[COLOR_parser_nodes__AInLanguage___n_kwin].val = var_n_kwin; /* _n_kwin on <self:AInLanguage> */
968 if (var_n_kwin == NULL) {
969 PRINT_ERROR("Runtime error: %s", "Receiver is null");
970 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7408);
971 show_backtrace(1);
972 } else {
973 { /* Inline parser_nodes#ANode#parent= (var_n_kwin,self) on <var_n_kwin:nullable TKwin> */
974 if (unlikely(var_n_kwin == NULL)) {
975 PRINT_ERROR("Runtime error: %s", "Receiver is null");
976 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
977 show_backtrace(1);
978 }
979 var_n_kwin->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwin:nullable TKwin> */
980 RET_LABEL1:(void)0;
981 }
982 }
983 if (unlikely(var_n_string == NULL)) {
984 PRINT_ERROR("Runtime error: %s", "Cast failed");
985 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7409);
986 show_backtrace(1);
987 }
988 self->attrs[COLOR_parser_nodes__AInLanguage___n_string].val = var_n_string; /* _n_string on <self:AInLanguage> */
989 if (var_n_string == NULL) {
990 PRINT_ERROR("Runtime error: %s", "Receiver is null");
991 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7410);
992 show_backtrace(1);
993 } else {
994 { /* Inline parser_nodes#ANode#parent= (var_n_string,self) on <var_n_string:nullable TString> */
995 if (unlikely(var_n_string == NULL)) {
996 PRINT_ERROR("Runtime error: %s", "Receiver is null");
997 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
998 show_backtrace(1);
999 }
1000 var_n_string->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_string:nullable TString> */
1001 RET_LABEL2:(void)0;
1002 }
1003 }
1004 RET_LABEL:;
1005 }
1006 /* method parser_prod#AInLanguage#init_ainlanguage for (self: Object, nullable TKwin, nullable TString) */
1007 void VIRTUAL_parser_prod__AInLanguage__init_ainlanguage(val* self, val* p0, val* p1) {
1008 parser_prod__AInLanguage__init_ainlanguage(self, p0, p1); /* Direct call parser_prod#AInLanguage#init_ainlanguage on <self:Object(AInLanguage)>*/
1009 RET_LABEL:;
1010 }
1011 /* method parser_prod#AInLanguage#replace_child for (self: AInLanguage, ANode, nullable ANode) */
1012 void parser_prod__AInLanguage__replace_child(val* self, val* p0, val* p1) {
1013 val* var_old_child /* var old_child: ANode */;
1014 val* var_new_child /* var new_child: nullable ANode */;
1015 val* var /* : TKwin */;
1016 short int var1 /* : Bool */;
1017 short int var2 /* : Bool */;
1018 val* var_other /* var other: nullable Object */;
1019 short int var4 /* : Bool */;
1020 short int var6 /* : Bool */;
1021 short int var7 /* : Bool */;
1022 int cltype;
1023 int idtype;
1024 const char* var_class_name;
1025 val* var8 /* : TString */;
1026 short int var9 /* : Bool */;
1027 short int var10 /* : Bool */;
1028 short int var12 /* : Bool */;
1029 short int var14 /* : Bool */;
1030 short int var15 /* : Bool */;
1031 int cltype16;
1032 int idtype17;
1033 const char* var_class_name18;
1034 var_old_child = p0;
1035 var_new_child = p1;
1036 var = self->attrs[COLOR_parser_nodes__AInLanguage___n_kwin].val; /* _n_kwin on <self:AInLanguage> */
1037 if (unlikely(var == NULL)) {
1038 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwin");
1039 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7415);
1040 show_backtrace(1);
1041 }
1042 {
1043 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwin> */
1044 var_other = var_old_child;
1045 {
1046 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwin> */
1047 var6 = var == var_other;
1048 var4 = var6;
1049 goto RET_LABEL5;
1050 RET_LABEL5:(void)0;
1051 }
1052 }
1053 var2 = var4;
1054 goto RET_LABEL3;
1055 RET_LABEL3:(void)0;
1056 }
1057 var1 = var2;
1058 }
1059 if (var1){
1060 /* <var_new_child:nullable ANode> isa TKwin */
1061 cltype = type_parser_nodes__TKwin.color;
1062 idtype = type_parser_nodes__TKwin.id;
1063 if(var_new_child == NULL) {
1064 var7 = 0;
1065 } else {
1066 if(cltype >= var_new_child->type->table_size) {
1067 var7 = 0;
1068 } else {
1069 var7 = var_new_child->type->type_table[cltype] == idtype;
1070 }
1071 }
1072 if (unlikely(!var7)) {
1073 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1074 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwin", var_class_name);
1075 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7416);
1076 show_backtrace(1);
1077 }
1078 {
1079 parser_prod__AInLanguage__n_kwin_61d(self, var_new_child); /* Direct call parser_prod#AInLanguage#n_kwin= on <self:AInLanguage>*/
1080 }
1081 goto RET_LABEL;
1082 } else {
1083 }
1084 var8 = self->attrs[COLOR_parser_nodes__AInLanguage___n_string].val; /* _n_string on <self:AInLanguage> */
1085 if (unlikely(var8 == NULL)) {
1086 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_string");
1087 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7419);
1088 show_backtrace(1);
1089 }
1090 {
1091 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TString> */
1092 var_other = var_old_child;
1093 {
1094 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TString> */
1095 var14 = var8 == var_other;
1096 var12 = var14;
1097 goto RET_LABEL13;
1098 RET_LABEL13:(void)0;
1099 }
1100 }
1101 var10 = var12;
1102 goto RET_LABEL11;
1103 RET_LABEL11:(void)0;
1104 }
1105 var9 = var10;
1106 }
1107 if (var9){
1108 /* <var_new_child:nullable ANode> isa TString */
1109 cltype16 = type_parser_nodes__TString.color;
1110 idtype17 = type_parser_nodes__TString.id;
1111 if(var_new_child == NULL) {
1112 var15 = 0;
1113 } else {
1114 if(cltype16 >= var_new_child->type->table_size) {
1115 var15 = 0;
1116 } else {
1117 var15 = var_new_child->type->type_table[cltype16] == idtype17;
1118 }
1119 }
1120 if (unlikely(!var15)) {
1121 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
1122 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TString", var_class_name18);
1123 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7420);
1124 show_backtrace(1);
1125 }
1126 {
1127 parser_prod__AInLanguage__n_string_61d(self, var_new_child); /* Direct call parser_prod#AInLanguage#n_string= on <self:AInLanguage>*/
1128 }
1129 goto RET_LABEL;
1130 } else {
1131 }
1132 RET_LABEL:;
1133 }
1134 /* method parser_prod#AInLanguage#replace_child for (self: Object, ANode, nullable ANode) */
1135 void VIRTUAL_parser_prod__AInLanguage__replace_child(val* self, val* p0, val* p1) {
1136 parser_prod__AInLanguage__replace_child(self, p0, p1); /* Direct call parser_prod#AInLanguage#replace_child on <self:Object(AInLanguage)>*/
1137 RET_LABEL:;
1138 }
1139 /* method parser_prod#AInLanguage#n_kwin= for (self: AInLanguage, TKwin) */
1140 void parser_prod__AInLanguage__n_kwin_61d(val* self, val* p0) {
1141 val* var_node /* var node: TKwin */;
1142 var_node = p0;
1143 self->attrs[COLOR_parser_nodes__AInLanguage___n_kwin].val = var_node; /* _n_kwin on <self:AInLanguage> */
1144 {
1145 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwin> */
1146 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwin> */
1147 RET_LABEL1:(void)0;
1148 }
1149 }
1150 RET_LABEL:;
1151 }
1152 /* method parser_prod#AInLanguage#n_kwin= for (self: Object, TKwin) */
1153 void VIRTUAL_parser_prod__AInLanguage__n_kwin_61d(val* self, val* p0) {
1154 parser_prod__AInLanguage__n_kwin_61d(self, p0); /* Direct call parser_prod#AInLanguage#n_kwin= on <self:Object(AInLanguage)>*/
1155 RET_LABEL:;
1156 }
1157 /* method parser_prod#AInLanguage#n_string= for (self: AInLanguage, TString) */
1158 void parser_prod__AInLanguage__n_string_61d(val* self, val* p0) {
1159 val* var_node /* var node: TString */;
1160 var_node = p0;
1161 self->attrs[COLOR_parser_nodes__AInLanguage___n_string].val = var_node; /* _n_string on <self:AInLanguage> */
1162 {
1163 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TString> */
1164 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TString> */
1165 RET_LABEL1:(void)0;
1166 }
1167 }
1168 RET_LABEL:;
1169 }
1170 /* method parser_prod#AInLanguage#n_string= for (self: Object, TString) */
1171 void VIRTUAL_parser_prod__AInLanguage__n_string_61d(val* self, val* p0) {
1172 parser_prod__AInLanguage__n_string_61d(self, p0); /* Direct call parser_prod#AInLanguage#n_string= on <self:Object(AInLanguage)>*/
1173 RET_LABEL:;
1174 }
1175 /* method parser_prod#AInLanguage#visit_all for (self: AInLanguage, Visitor) */
1176 void parser_prod__AInLanguage__visit_all(val* self, val* p0) {
1177 val* var_v /* var v: Visitor */;
1178 val* var /* : TKwin */;
1179 val* var1 /* : TString */;
1180 var_v = p0;
1181 var = self->attrs[COLOR_parser_nodes__AInLanguage___n_kwin].val; /* _n_kwin on <self:AInLanguage> */
1182 if (unlikely(var == NULL)) {
1183 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwin");
1184 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7439);
1185 show_backtrace(1);
1186 }
1187 {
1188 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1189 }
1190 var1 = self->attrs[COLOR_parser_nodes__AInLanguage___n_string].val; /* _n_string on <self:AInLanguage> */
1191 if (unlikely(var1 == NULL)) {
1192 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_string");
1193 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7440);
1194 show_backtrace(1);
1195 }
1196 {
1197 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1198 }
1199 RET_LABEL:;
1200 }
1201 /* method parser_prod#AInLanguage#visit_all for (self: Object, Visitor) */
1202 void VIRTUAL_parser_prod__AInLanguage__visit_all(val* self, val* p0) {
1203 parser_prod__AInLanguage__visit_all(self, p0); /* Direct call parser_prod#AInLanguage#visit_all on <self:Object(AInLanguage)>*/
1204 RET_LABEL:;
1205 }
1206 /* method parser_prod#AExternCodeBlock#init_aexterncodeblock for (self: AExternCodeBlock, nullable AInLanguage, nullable TExternCodeSegment) */
1207 void parser_prod__AExternCodeBlock__init_aexterncodeblock(val* self, val* p0, val* p1) {
1208 val* var_n_in_language /* var n_in_language: nullable AInLanguage */;
1209 val* var_n_extern_code_segment /* var n_extern_code_segment: nullable TExternCodeSegment */;
1210 val* var /* : null */;
1211 short int var1 /* : Bool */;
1212 short int var2 /* : Bool */;
1213 val* var_other /* var other: nullable Object */;
1214 short int var4 /* : Bool */;
1215 short int var5 /* : Bool */;
1216 short int var6 /* : Bool */;
1217 var_n_in_language = p0;
1218 var_n_extern_code_segment = p1;
1219 self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_in_language].val = var_n_in_language; /* _n_in_language on <self:AExternCodeBlock> */
1220 var = NULL;
1221 if (var_n_in_language == NULL) {
1222 var1 = 0; /* is null */
1223 } else {
1224 var1 = 1; /* arg is null and recv is not */
1225 }
1226 if (0) {
1227 { /* Inline kernel#Object#!= (var_n_in_language,var) on <var_n_in_language:nullable AInLanguage> */
1228 var_other = var;
1229 {
1230 var5 = ((short int (*)(val*, val*))(var_n_in_language->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_in_language, var_other) /* == on <var_n_in_language:nullable AInLanguage(AInLanguage)>*/;
1231 var4 = var5;
1232 }
1233 var6 = !var4;
1234 var2 = var6;
1235 goto RET_LABEL3;
1236 RET_LABEL3:(void)0;
1237 }
1238 var1 = var2;
1239 }
1240 if (var1){
1241 {
1242 { /* Inline parser_nodes#ANode#parent= (var_n_in_language,self) on <var_n_in_language:nullable AInLanguage(AInLanguage)> */
1243 var_n_in_language->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_in_language:nullable AInLanguage(AInLanguage)> */
1244 RET_LABEL7:(void)0;
1245 }
1246 }
1247 } else {
1248 }
1249 if (unlikely(var_n_extern_code_segment == NULL)) {
1250 PRINT_ERROR("Runtime error: %s", "Cast failed");
1251 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7451);
1252 show_backtrace(1);
1253 }
1254 self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_extern_code_segment].val = var_n_extern_code_segment; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1255 if (var_n_extern_code_segment == NULL) {
1256 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1257 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7452);
1258 show_backtrace(1);
1259 } else {
1260 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_segment,self) on <var_n_extern_code_segment:nullable TExternCodeSegment> */
1261 if (unlikely(var_n_extern_code_segment == NULL)) {
1262 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1263 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
1264 show_backtrace(1);
1265 }
1266 var_n_extern_code_segment->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_code_segment:nullable TExternCodeSegment> */
1267 RET_LABEL8:(void)0;
1268 }
1269 }
1270 RET_LABEL:;
1271 }
1272 /* method parser_prod#AExternCodeBlock#init_aexterncodeblock for (self: Object, nullable AInLanguage, nullable TExternCodeSegment) */
1273 void VIRTUAL_parser_prod__AExternCodeBlock__init_aexterncodeblock(val* self, val* p0, val* p1) {
1274 parser_prod__AExternCodeBlock__init_aexterncodeblock(self, p0, p1); /* Direct call parser_prod#AExternCodeBlock#init_aexterncodeblock on <self:Object(AExternCodeBlock)>*/
1275 RET_LABEL:;
1276 }
1277 /* method parser_prod#AExternCodeBlock#replace_child for (self: AExternCodeBlock, ANode, nullable ANode) */
1278 void parser_prod__AExternCodeBlock__replace_child(val* self, val* p0, val* p1) {
1279 val* var_old_child /* var old_child: ANode */;
1280 val* var_new_child /* var new_child: nullable ANode */;
1281 val* var /* : nullable AInLanguage */;
1282 short int var1 /* : Bool */;
1283 short int var2 /* : Bool */;
1284 val* var_other /* var other: nullable Object */;
1285 short int var4 /* : Bool */;
1286 short int var6 /* : Bool */;
1287 short int var7 /* : Bool */;
1288 int cltype;
1289 int idtype;
1290 const char* var_class_name;
1291 val* var8 /* : TExternCodeSegment */;
1292 short int var9 /* : Bool */;
1293 short int var10 /* : Bool */;
1294 short int var12 /* : Bool */;
1295 short int var14 /* : Bool */;
1296 short int var15 /* : Bool */;
1297 int cltype16;
1298 int idtype17;
1299 const char* var_class_name18;
1300 var_old_child = p0;
1301 var_new_child = p1;
1302 var = self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_in_language].val; /* _n_in_language on <self:AExternCodeBlock> */
1303 if (var == NULL) {
1304 var1 = 0; /* <var_old_child:ANode> cannot be null */
1305 } else {
1306 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AInLanguage> */
1307 var_other = var_old_child;
1308 {
1309 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AInLanguage(AInLanguage)> */
1310 var6 = var == var_other;
1311 var4 = var6;
1312 goto RET_LABEL5;
1313 RET_LABEL5:(void)0;
1314 }
1315 }
1316 var2 = var4;
1317 goto RET_LABEL3;
1318 RET_LABEL3:(void)0;
1319 }
1320 var1 = var2;
1321 }
1322 if (var1){
1323 /* <var_new_child:nullable ANode> isa nullable AInLanguage */
1324 cltype = type_nullable_parser_nodes__AInLanguage.color;
1325 idtype = type_nullable_parser_nodes__AInLanguage.id;
1326 if(var_new_child == NULL) {
1327 var7 = 1;
1328 } else {
1329 if(cltype >= var_new_child->type->table_size) {
1330 var7 = 0;
1331 } else {
1332 var7 = var_new_child->type->type_table[cltype] == idtype;
1333 }
1334 }
1335 if (unlikely(!var7)) {
1336 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1337 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AInLanguage", var_class_name);
1338 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7458);
1339 show_backtrace(1);
1340 }
1341 {
1342 parser_prod__AExternCodeBlock__n_in_language_61d(self, var_new_child); /* Direct call parser_prod#AExternCodeBlock#n_in_language= on <self:AExternCodeBlock>*/
1343 }
1344 goto RET_LABEL;
1345 } else {
1346 }
1347 var8 = self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_extern_code_segment].val; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1348 if (unlikely(var8 == NULL)) {
1349 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_segment");
1350 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7461);
1351 show_backtrace(1);
1352 }
1353 {
1354 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TExternCodeSegment> */
1355 var_other = var_old_child;
1356 {
1357 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TExternCodeSegment> */
1358 var14 = var8 == var_other;
1359 var12 = var14;
1360 goto RET_LABEL13;
1361 RET_LABEL13:(void)0;
1362 }
1363 }
1364 var10 = var12;
1365 goto RET_LABEL11;
1366 RET_LABEL11:(void)0;
1367 }
1368 var9 = var10;
1369 }
1370 if (var9){
1371 /* <var_new_child:nullable ANode> isa TExternCodeSegment */
1372 cltype16 = type_parser_nodes__TExternCodeSegment.color;
1373 idtype17 = type_parser_nodes__TExternCodeSegment.id;
1374 if(var_new_child == NULL) {
1375 var15 = 0;
1376 } else {
1377 if(cltype16 >= var_new_child->type->table_size) {
1378 var15 = 0;
1379 } else {
1380 var15 = var_new_child->type->type_table[cltype16] == idtype17;
1381 }
1382 }
1383 if (unlikely(!var15)) {
1384 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
1385 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TExternCodeSegment", var_class_name18);
1386 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7462);
1387 show_backtrace(1);
1388 }
1389 {
1390 parser_prod__AExternCodeBlock__n_extern_code_segment_61d(self, var_new_child); /* Direct call parser_prod#AExternCodeBlock#n_extern_code_segment= on <self:AExternCodeBlock>*/
1391 }
1392 goto RET_LABEL;
1393 } else {
1394 }
1395 RET_LABEL:;
1396 }
1397 /* method parser_prod#AExternCodeBlock#replace_child for (self: Object, ANode, nullable ANode) */
1398 void VIRTUAL_parser_prod__AExternCodeBlock__replace_child(val* self, val* p0, val* p1) {
1399 parser_prod__AExternCodeBlock__replace_child(self, p0, p1); /* Direct call parser_prod#AExternCodeBlock#replace_child on <self:Object(AExternCodeBlock)>*/
1400 RET_LABEL:;
1401 }
1402 /* method parser_prod#AExternCodeBlock#n_in_language= for (self: AExternCodeBlock, nullable AInLanguage) */
1403 void parser_prod__AExternCodeBlock__n_in_language_61d(val* self, val* p0) {
1404 val* var_node /* var node: nullable AInLanguage */;
1405 val* var /* : null */;
1406 short int var1 /* : Bool */;
1407 short int var2 /* : Bool */;
1408 val* var_other /* var other: nullable Object */;
1409 short int var4 /* : Bool */;
1410 short int var5 /* : Bool */;
1411 short int var6 /* : Bool */;
1412 var_node = p0;
1413 self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_in_language].val = var_node; /* _n_in_language on <self:AExternCodeBlock> */
1414 var = NULL;
1415 if (var_node == NULL) {
1416 var1 = 0; /* is null */
1417 } else {
1418 var1 = 1; /* arg is null and recv is not */
1419 }
1420 if (0) {
1421 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AInLanguage> */
1422 var_other = var;
1423 {
1424 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AInLanguage(AInLanguage)>*/;
1425 var4 = var5;
1426 }
1427 var6 = !var4;
1428 var2 = var6;
1429 goto RET_LABEL3;
1430 RET_LABEL3:(void)0;
1431 }
1432 var1 = var2;
1433 }
1434 if (var1){
1435 {
1436 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AInLanguage(AInLanguage)> */
1437 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AInLanguage(AInLanguage)> */
1438 RET_LABEL7:(void)0;
1439 }
1440 }
1441 } else {
1442 }
1443 RET_LABEL:;
1444 }
1445 /* method parser_prod#AExternCodeBlock#n_in_language= for (self: Object, nullable AInLanguage) */
1446 void VIRTUAL_parser_prod__AExternCodeBlock__n_in_language_61d(val* self, val* p0) {
1447 parser_prod__AExternCodeBlock__n_in_language_61d(self, p0); /* Direct call parser_prod#AExternCodeBlock#n_in_language= on <self:Object(AExternCodeBlock)>*/
1448 RET_LABEL:;
1449 }
1450 /* method parser_prod#AExternCodeBlock#n_extern_code_segment= for (self: AExternCodeBlock, TExternCodeSegment) */
1451 void parser_prod__AExternCodeBlock__n_extern_code_segment_61d(val* self, val* p0) {
1452 val* var_node /* var node: TExternCodeSegment */;
1453 var_node = p0;
1454 self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_extern_code_segment].val = var_node; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1455 {
1456 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TExternCodeSegment> */
1457 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TExternCodeSegment> */
1458 RET_LABEL1:(void)0;
1459 }
1460 }
1461 RET_LABEL:;
1462 }
1463 /* method parser_prod#AExternCodeBlock#n_extern_code_segment= for (self: Object, TExternCodeSegment) */
1464 void VIRTUAL_parser_prod__AExternCodeBlock__n_extern_code_segment_61d(val* self, val* p0) {
1465 parser_prod__AExternCodeBlock__n_extern_code_segment_61d(self, p0); /* Direct call parser_prod#AExternCodeBlock#n_extern_code_segment= on <self:Object(AExternCodeBlock)>*/
1466 RET_LABEL:;
1467 }
1468 /* method parser_prod#AExternCodeBlock#visit_all for (self: AExternCodeBlock, Visitor) */
1469 void parser_prod__AExternCodeBlock__visit_all(val* self, val* p0) {
1470 val* var_v /* var v: Visitor */;
1471 val* var /* : nullable AInLanguage */;
1472 val* var1 /* : TExternCodeSegment */;
1473 var_v = p0;
1474 var = self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_in_language].val; /* _n_in_language on <self:AExternCodeBlock> */
1475 {
1476 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1477 }
1478 var1 = self->attrs[COLOR_parser_nodes__AExternCodeBlock___n_extern_code_segment].val; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1479 if (unlikely(var1 == NULL)) {
1480 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_segment");
1481 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7482);
1482 show_backtrace(1);
1483 }
1484 {
1485 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1486 }
1487 RET_LABEL:;
1488 }
1489 /* method parser_prod#AExternCodeBlock#visit_all for (self: Object, Visitor) */
1490 void VIRTUAL_parser_prod__AExternCodeBlock__visit_all(val* self, val* p0) {
1491 parser_prod__AExternCodeBlock__visit_all(self, p0); /* Direct call parser_prod#AExternCodeBlock#visit_all on <self:Object(AExternCodeBlock)>*/
1492 RET_LABEL:;
1493 }
1494 /* method parser_prod#AQualified#init_aqualified for (self: AQualified, Collection[Object], nullable TClassid) */
1495 void parser_prod__AQualified__init_aqualified(val* self, val* p0, val* p1) {
1496 val* var_n_id /* var n_id: Collection[Object] */;
1497 val* var_n_classid /* var n_classid: nullable TClassid */;
1498 val* var /* : ANodes[TId] */;
1499 val* var2 /* : ANodes[TId] */;
1500 val* var3 /* : null */;
1501 short int var4 /* : Bool */;
1502 short int var5 /* : Bool */;
1503 val* var_other /* var other: nullable Object */;
1504 short int var7 /* : Bool */;
1505 short int var8 /* : Bool */;
1506 short int var9 /* : Bool */;
1507 var_n_id = p0;
1508 var_n_classid = p1;
1509 {
1510 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1511 var2 = self->attrs[COLOR_parser_nodes__AQualified___n_id].val; /* _n_id on <self:AQualified> */
1512 if (unlikely(var2 == NULL)) {
1513 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1514 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2380);
1515 show_backtrace(1);
1516 }
1517 var = var2;
1518 RET_LABEL1:(void)0;
1519 }
1520 }
1521 {
1522 parser_nodes__ANodes__unsafe_add_all(var, var_n_id); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[TId]>*/
1523 }
1524 self->attrs[COLOR_parser_nodes__AQualified___n_classid].val = var_n_classid; /* _n_classid on <self:AQualified> */
1525 var3 = NULL;
1526 if (var_n_classid == NULL) {
1527 var4 = 0; /* is null */
1528 } else {
1529 var4 = 1; /* arg is null and recv is not */
1530 }
1531 if (0) {
1532 { /* Inline kernel#Object#!= (var_n_classid,var3) on <var_n_classid:nullable TClassid> */
1533 var_other = var3;
1534 {
1535 var8 = ((short int (*)(val*, val*))(var_n_classid->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_classid, var_other) /* == on <var_n_classid:nullable TClassid(TClassid)>*/;
1536 var7 = var8;
1537 }
1538 var9 = !var7;
1539 var5 = var9;
1540 goto RET_LABEL6;
1541 RET_LABEL6:(void)0;
1542 }
1543 var4 = var5;
1544 }
1545 if (var4){
1546 {
1547 { /* Inline parser_nodes#ANode#parent= (var_n_classid,self) on <var_n_classid:nullable TClassid(TClassid)> */
1548 var_n_classid->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_classid:nullable TClassid(TClassid)> */
1549 RET_LABEL10:(void)0;
1550 }
1551 }
1552 } else {
1553 }
1554 RET_LABEL:;
1555 }
1556 /* method parser_prod#AQualified#init_aqualified for (self: Object, Collection[Object], nullable TClassid) */
1557 void VIRTUAL_parser_prod__AQualified__init_aqualified(val* self, val* p0, val* p1) {
1558 parser_prod__AQualified__init_aqualified(self, p0, p1); /* Direct call parser_prod#AQualified#init_aqualified on <self:Object(AQualified)>*/
1559 RET_LABEL:;
1560 }
1561 /* method parser_prod#AQualified#replace_child for (self: AQualified, ANode, nullable ANode) */
1562 void parser_prod__AQualified__replace_child(val* self, val* p0, val* p1) {
1563 val* var_old_child /* var old_child: ANode */;
1564 val* var_new_child /* var new_child: nullable ANode */;
1565 val* var /* : ANodes[TId] */;
1566 val* var2 /* : ANodes[TId] */;
1567 short int var3 /* : Bool */;
1568 val* var4 /* : nullable TClassid */;
1569 short int var5 /* : Bool */;
1570 short int var6 /* : Bool */;
1571 val* var_other /* var other: nullable Object */;
1572 short int var8 /* : Bool */;
1573 short int var10 /* : Bool */;
1574 short int var11 /* : Bool */;
1575 int cltype;
1576 int idtype;
1577 const char* var_class_name;
1578 var_old_child = p0;
1579 var_new_child = p1;
1580 {
1581 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1582 var2 = self->attrs[COLOR_parser_nodes__AQualified___n_id].val; /* _n_id on <self:AQualified> */
1583 if (unlikely(var2 == NULL)) {
1584 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1585 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2380);
1586 show_backtrace(1);
1587 }
1588 var = var2;
1589 RET_LABEL1:(void)0;
1590 }
1591 }
1592 {
1593 var3 = parser_nodes__ANodes__replace_child(var, var_old_child, var_new_child);
1594 }
1595 if (var3){
1596 goto RET_LABEL;
1597 } else {
1598 }
1599 var4 = self->attrs[COLOR_parser_nodes__AQualified___n_classid].val; /* _n_classid on <self:AQualified> */
1600 if (var4 == NULL) {
1601 var5 = 0; /* <var_old_child:ANode> cannot be null */
1602 } else {
1603 { /* Inline kernel#Object#== (var4,var_old_child) on <var4:nullable TClassid> */
1604 var_other = var_old_child;
1605 {
1606 { /* Inline kernel#Object#is_same_instance (var4,var_other) on <var4:nullable TClassid(TClassid)> */
1607 var10 = var4 == var_other;
1608 var8 = var10;
1609 goto RET_LABEL9;
1610 RET_LABEL9:(void)0;
1611 }
1612 }
1613 var6 = var8;
1614 goto RET_LABEL7;
1615 RET_LABEL7:(void)0;
1616 }
1617 var5 = var6;
1618 }
1619 if (var5){
1620 /* <var_new_child:nullable ANode> isa nullable TClassid */
1621 cltype = type_nullable_parser_nodes__TClassid.color;
1622 idtype = type_nullable_parser_nodes__TClassid.id;
1623 if(var_new_child == NULL) {
1624 var11 = 1;
1625 } else {
1626 if(cltype >= var_new_child->type->table_size) {
1627 var11 = 0;
1628 } else {
1629 var11 = var_new_child->type->type_table[cltype] == idtype;
1630 }
1631 }
1632 if (unlikely(!var11)) {
1633 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1634 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TClassid", var_class_name);
1635 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7500);
1636 show_backtrace(1);
1637 }
1638 {
1639 parser_prod__AQualified__n_classid_61d(self, var_new_child); /* Direct call parser_prod#AQualified#n_classid= on <self:AQualified>*/
1640 }
1641 goto RET_LABEL;
1642 } else {
1643 }
1644 RET_LABEL:;
1645 }
1646 /* method parser_prod#AQualified#replace_child for (self: Object, ANode, nullable ANode) */
1647 void VIRTUAL_parser_prod__AQualified__replace_child(val* self, val* p0, val* p1) {
1648 parser_prod__AQualified__replace_child(self, p0, p1); /* Direct call parser_prod#AQualified#replace_child on <self:Object(AQualified)>*/
1649 RET_LABEL:;
1650 }
1651 /* method parser_prod#AQualified#n_classid= for (self: AQualified, nullable TClassid) */
1652 void parser_prod__AQualified__n_classid_61d(val* self, val* p0) {
1653 val* var_node /* var node: nullable TClassid */;
1654 val* var /* : null */;
1655 short int var1 /* : Bool */;
1656 short int var2 /* : Bool */;
1657 val* var_other /* var other: nullable Object */;
1658 short int var4 /* : Bool */;
1659 short int var5 /* : Bool */;
1660 short int var6 /* : Bool */;
1661 var_node = p0;
1662 self->attrs[COLOR_parser_nodes__AQualified___n_classid].val = var_node; /* _n_classid on <self:AQualified> */
1663 var = NULL;
1664 if (var_node == NULL) {
1665 var1 = 0; /* is null */
1666 } else {
1667 var1 = 1; /* arg is null and recv is not */
1668 }
1669 if (0) {
1670 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TClassid> */
1671 var_other = var;
1672 {
1673 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TClassid(TClassid)>*/;
1674 var4 = var5;
1675 }
1676 var6 = !var4;
1677 var2 = var6;
1678 goto RET_LABEL3;
1679 RET_LABEL3:(void)0;
1680 }
1681 var1 = var2;
1682 }
1683 if (var1){
1684 {
1685 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TClassid(TClassid)> */
1686 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TClassid(TClassid)> */
1687 RET_LABEL7:(void)0;
1688 }
1689 }
1690 } else {
1691 }
1692 RET_LABEL:;
1693 }
1694 /* method parser_prod#AQualified#n_classid= for (self: Object, nullable TClassid) */
1695 void VIRTUAL_parser_prod__AQualified__n_classid_61d(val* self, val* p0) {
1696 parser_prod__AQualified__n_classid_61d(self, p0); /* Direct call parser_prod#AQualified#n_classid= on <self:Object(AQualified)>*/
1697 RET_LABEL:;
1698 }
1699 /* method parser_prod#AQualified#visit_all for (self: AQualified, Visitor) */
1700 void parser_prod__AQualified__visit_all(val* self, val* p0) {
1701 val* var_v /* var v: Visitor */;
1702 val* var /* : ANodes[TId] */;
1703 val* var2 /* : ANodes[TId] */;
1704 val* var3 /* : nullable TClassid */;
1705 var_v = p0;
1706 {
1707 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1708 var2 = self->attrs[COLOR_parser_nodes__AQualified___n_id].val; /* _n_id on <self:AQualified> */
1709 if (unlikely(var2 == NULL)) {
1710 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1711 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2380);
1712 show_backtrace(1);
1713 }
1714 var = var2;
1715 RET_LABEL1:(void)0;
1716 }
1717 }
1718 {
1719 parser_nodes__ANodes__visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[TId]>*/
1720 }
1721 var3 = self->attrs[COLOR_parser_nodes__AQualified___n_classid].val; /* _n_classid on <self:AQualified> */
1722 {
1723 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1724 }
1725 RET_LABEL:;
1726 }
1727 /* method parser_prod#AQualified#visit_all for (self: Object, Visitor) */
1728 void VIRTUAL_parser_prod__AQualified__visit_all(val* self, val* p0) {
1729 parser_prod__AQualified__visit_all(self, p0); /* Direct call parser_prod#AQualified#visit_all on <self:Object(AQualified)>*/
1730 RET_LABEL:;
1731 }
1732 /* method parser_prod#ADoc#init_adoc for (self: ADoc, Collection[Object]) */
1733 void parser_prod__ADoc__init_adoc(val* self, val* p0) {
1734 val* var_n_comment /* var n_comment: Collection[Object] */;
1735 val* var /* : ANodes[TComment] */;
1736 val* var2 /* : ANodes[TComment] */;
1737 var_n_comment = p0;
1738 {
1739 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1740 var2 = self->attrs[COLOR_parser_nodes__ADoc___n_comment].val; /* _n_comment on <self:ADoc> */
1741 if (unlikely(var2 == NULL)) {
1742 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1743 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2391);
1744 show_backtrace(1);
1745 }
1746 var = var2;
1747 RET_LABEL1:(void)0;
1748 }
1749 }
1750 {
1751 parser_nodes__ANodes__unsafe_add_all(var, var_n_comment); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[TComment]>*/
1752 }
1753 RET_LABEL:;
1754 }
1755 /* method parser_prod#ADoc#init_adoc for (self: Object, Collection[Object]) */
1756 void VIRTUAL_parser_prod__ADoc__init_adoc(val* self, val* p0) {
1757 parser_prod__ADoc__init_adoc(self, p0); /* Direct call parser_prod#ADoc#init_adoc on <self:Object(ADoc)>*/
1758 RET_LABEL:;
1759 }
1760 /* method parser_prod#ADoc#replace_child for (self: ADoc, ANode, nullable ANode) */
1761 void parser_prod__ADoc__replace_child(val* self, val* p0, val* p1) {
1762 val* var_old_child /* var old_child: ANode */;
1763 val* var_new_child /* var new_child: nullable ANode */;
1764 val* var /* : ANodes[TComment] */;
1765 val* var2 /* : ANodes[TComment] */;
1766 short int var3 /* : Bool */;
1767 var_old_child = p0;
1768 var_new_child = p1;
1769 {
1770 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1771 var2 = self->attrs[COLOR_parser_nodes__ADoc___n_comment].val; /* _n_comment on <self:ADoc> */
1772 if (unlikely(var2 == NULL)) {
1773 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1774 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2391);
1775 show_backtrace(1);
1776 }
1777 var = var2;
1778 RET_LABEL1:(void)0;
1779 }
1780 }
1781 {
1782 var3 = parser_nodes__ANodes__replace_child(var, var_old_child, var_new_child);
1783 }
1784 if (var3){
1785 goto RET_LABEL;
1786 } else {
1787 }
1788 RET_LABEL:;
1789 }
1790 /* method parser_prod#ADoc#replace_child for (self: Object, ANode, nullable ANode) */
1791 void VIRTUAL_parser_prod__ADoc__replace_child(val* self, val* p0, val* p1) {
1792 parser_prod__ADoc__replace_child(self, p0, p1); /* Direct call parser_prod#ADoc#replace_child on <self:Object(ADoc)>*/
1793 RET_LABEL:;
1794 }
1795 /* method parser_prod#ADoc#visit_all for (self: ADoc, Visitor) */
1796 void parser_prod__ADoc__visit_all(val* self, val* p0) {
1797 val* var_v /* var v: Visitor */;
1798 val* var /* : ANodes[TComment] */;
1799 val* var2 /* : ANodes[TComment] */;
1800 var_v = p0;
1801 {
1802 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1803 var2 = self->attrs[COLOR_parser_nodes__ADoc___n_comment].val; /* _n_comment on <self:ADoc> */
1804 if (unlikely(var2 == NULL)) {
1805 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1806 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2391);
1807 show_backtrace(1);
1808 }
1809 var = var2;
1810 RET_LABEL1:(void)0;
1811 }
1812 }
1813 {
1814 parser_nodes__ANodes__visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[TComment]>*/
1815 }
1816 RET_LABEL:;
1817 }
1818 /* method parser_prod#ADoc#visit_all for (self: Object, Visitor) */
1819 void VIRTUAL_parser_prod__ADoc__visit_all(val* self, val* p0) {
1820 parser_prod__ADoc__visit_all(self, p0); /* Direct call parser_prod#ADoc#visit_all on <self:Object(ADoc)>*/
1821 RET_LABEL:;
1822 }
1823 /* method parser_prod#AAnnotations#init_aannotations for (self: AAnnotations, nullable TAt, nullable TOpar, Collection[Object], nullable TCpar) */
1824 void parser_prod__AAnnotations__init_aannotations(val* self, val* p0, val* p1, val* p2, val* p3) {
1825 val* var_n_at /* var n_at: nullable TAt */;
1826 val* var_n_opar /* var n_opar: nullable TOpar */;
1827 val* var_n_items /* var n_items: Collection[Object] */;
1828 val* var_n_cpar /* var n_cpar: nullable TCpar */;
1829 val* var /* : null */;
1830 short int var1 /* : Bool */;
1831 short int var2 /* : Bool */;
1832 val* var_other /* var other: nullable Object */;
1833 short int var4 /* : Bool */;
1834 short int var5 /* : Bool */;
1835 short int var6 /* : Bool */;
1836 val* var8 /* : null */;
1837 short int var9 /* : Bool */;
1838 short int var10 /* : Bool */;
1839 short int var12 /* : Bool */;
1840 short int var13 /* : Bool */;
1841 short int var14 /* : Bool */;
1842 val* var16 /* : ANodes[AAnnotation] */;
1843 val* var18 /* : ANodes[AAnnotation] */;
1844 val* var19 /* : null */;
1845 short int var20 /* : Bool */;
1846 short int var21 /* : Bool */;
1847 short int var23 /* : Bool */;
1848 short int var24 /* : Bool */;
1849 short int var25 /* : Bool */;
1850 var_n_at = p0;
1851 var_n_opar = p1;
1852 var_n_items = p2;
1853 var_n_cpar = p3;
1854 self->attrs[COLOR_parser_nodes__AAnnotations___n_at].val = var_n_at; /* _n_at on <self:AAnnotations> */
1855 var = NULL;
1856 if (var_n_at == NULL) {
1857 var1 = 0; /* is null */
1858 } else {
1859 var1 = 1; /* arg is null and recv is not */
1860 }
1861 if (0) {
1862 { /* Inline kernel#Object#!= (var_n_at,var) on <var_n_at:nullable TAt> */
1863 var_other = var;
1864 {
1865 var5 = ((short int (*)(val*, val*))(var_n_at->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_at, var_other) /* == on <var_n_at:nullable TAt(TAt)>*/;
1866 var4 = var5;
1867 }
1868 var6 = !var4;
1869 var2 = var6;
1870 goto RET_LABEL3;
1871 RET_LABEL3:(void)0;
1872 }
1873 var1 = var2;
1874 }
1875 if (var1){
1876 {
1877 { /* Inline parser_nodes#ANode#parent= (var_n_at,self) on <var_n_at:nullable TAt(TAt)> */
1878 var_n_at->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_at:nullable TAt(TAt)> */
1879 RET_LABEL7:(void)0;
1880 }
1881 }
1882 } else {
1883 }
1884 self->attrs[COLOR_parser_nodes__AAnnotations___n_opar].val = var_n_opar; /* _n_opar on <self:AAnnotations> */
1885 var8 = NULL;
1886 if (var_n_opar == NULL) {
1887 var9 = 0; /* is null */
1888 } else {
1889 var9 = 1; /* arg is null and recv is not */
1890 }
1891 if (0) {
1892 { /* Inline kernel#Object#!= (var_n_opar,var8) on <var_n_opar:nullable TOpar> */
1893 var_other = var8;
1894 {
1895 var13 = ((short int (*)(val*, val*))(var_n_opar->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_opar, var_other) /* == on <var_n_opar:nullable TOpar(TOpar)>*/;
1896 var12 = var13;
1897 }
1898 var14 = !var12;
1899 var10 = var14;
1900 goto RET_LABEL11;
1901 RET_LABEL11:(void)0;
1902 }
1903 var9 = var10;
1904 }
1905 if (var9){
1906 {
1907 { /* Inline parser_nodes#ANode#parent= (var_n_opar,self) on <var_n_opar:nullable TOpar(TOpar)> */
1908 var_n_opar->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_opar:nullable TOpar(TOpar)> */
1909 RET_LABEL15:(void)0;
1910 }
1911 }
1912 } else {
1913 }
1914 {
1915 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
1916 var18 = self->attrs[COLOR_parser_nodes__AAnnotations___n_items].val; /* _n_items on <self:AAnnotations> */
1917 if (unlikely(var18 == NULL)) {
1918 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
1919 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2403);
1920 show_backtrace(1);
1921 }
1922 var16 = var18;
1923 RET_LABEL17:(void)0;
1924 }
1925 }
1926 {
1927 parser_nodes__ANodes__unsafe_add_all(var16, var_n_items); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var16:ANodes[AAnnotation]>*/
1928 }
1929 self->attrs[COLOR_parser_nodes__AAnnotations___n_cpar].val = var_n_cpar; /* _n_cpar on <self:AAnnotations> */
1930 var19 = NULL;
1931 if (var_n_cpar == NULL) {
1932 var20 = 0; /* is null */
1933 } else {
1934 var20 = 1; /* arg is null and recv is not */
1935 }
1936 if (0) {
1937 { /* Inline kernel#Object#!= (var_n_cpar,var19) on <var_n_cpar:nullable TCpar> */
1938 var_other = var19;
1939 {
1940 var24 = ((short int (*)(val*, val*))(var_n_cpar->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_cpar, var_other) /* == on <var_n_cpar:nullable TCpar(TCpar)>*/;
1941 var23 = var24;
1942 }
1943 var25 = !var23;
1944 var21 = var25;
1945 goto RET_LABEL22;
1946 RET_LABEL22:(void)0;
1947 }
1948 var20 = var21;
1949 }
1950 if (var20){
1951 {
1952 { /* Inline parser_nodes#ANode#parent= (var_n_cpar,self) on <var_n_cpar:nullable TCpar(TCpar)> */
1953 var_n_cpar->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_cpar:nullable TCpar(TCpar)> */
1954 RET_LABEL26:(void)0;
1955 }
1956 }
1957 } else {
1958 }
1959 RET_LABEL:;
1960 }
1961 /* method parser_prod#AAnnotations#init_aannotations for (self: Object, nullable TAt, nullable TOpar, Collection[Object], nullable TCpar) */
1962 void VIRTUAL_parser_prod__AAnnotations__init_aannotations(val* self, val* p0, val* p1, val* p2, val* p3) {
1963 parser_prod__AAnnotations__init_aannotations(self, p0, p1, p2, p3); /* Direct call parser_prod#AAnnotations#init_aannotations on <self:Object(AAnnotations)>*/
1964 RET_LABEL:;
1965 }
1966 /* method parser_prod#AAnnotations#replace_child for (self: AAnnotations, ANode, nullable ANode) */
1967 void parser_prod__AAnnotations__replace_child(val* self, val* p0, val* p1) {
1968 val* var_old_child /* var old_child: ANode */;
1969 val* var_new_child /* var new_child: nullable ANode */;
1970 val* var /* : nullable TAt */;
1971 short int var1 /* : Bool */;
1972 short int var2 /* : Bool */;
1973 val* var_other /* var other: nullable Object */;
1974 short int var4 /* : Bool */;
1975 short int var6 /* : Bool */;
1976 short int var7 /* : Bool */;
1977 int cltype;
1978 int idtype;
1979 const char* var_class_name;
1980 val* var8 /* : nullable TOpar */;
1981 short int var9 /* : Bool */;
1982 short int var10 /* : Bool */;
1983 short int var12 /* : Bool */;
1984 short int var14 /* : Bool */;
1985 short int var15 /* : Bool */;
1986 int cltype16;
1987 int idtype17;
1988 const char* var_class_name18;
1989 val* var19 /* : ANodes[AAnnotation] */;
1990 val* var21 /* : ANodes[AAnnotation] */;
1991 short int var22 /* : Bool */;
1992 val* var23 /* : nullable TCpar */;
1993 short int var24 /* : Bool */;
1994 short int var25 /* : Bool */;
1995 short int var27 /* : Bool */;
1996 short int var29 /* : Bool */;
1997 short int var30 /* : Bool */;
1998 int cltype31;
1999 int idtype32;
2000 const char* var_class_name33;
2001 var_old_child = p0;
2002 var_new_child = p1;
2003 var = self->attrs[COLOR_parser_nodes__AAnnotations___n_at].val; /* _n_at on <self:AAnnotations> */
2004 if (var == NULL) {
2005 var1 = 0; /* <var_old_child:ANode> cannot be null */
2006 } else {
2007 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TAt> */
2008 var_other = var_old_child;
2009 {
2010 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TAt(TAt)> */
2011 var6 = var == var_other;
2012 var4 = var6;
2013 goto RET_LABEL5;
2014 RET_LABEL5:(void)0;
2015 }
2016 }
2017 var2 = var4;
2018 goto RET_LABEL3;
2019 RET_LABEL3:(void)0;
2020 }
2021 var1 = var2;
2022 }
2023 if (var1){
2024 /* <var_new_child:nullable ANode> isa nullable TAt */
2025 cltype = type_nullable_parser_nodes__TAt.color;
2026 idtype = type_nullable_parser_nodes__TAt.id;
2027 if(var_new_child == NULL) {
2028 var7 = 1;
2029 } else {
2030 if(cltype >= var_new_child->type->table_size) {
2031 var7 = 0;
2032 } else {
2033 var7 = var_new_child->type->type_table[cltype] == idtype;
2034 }
2035 }
2036 if (unlikely(!var7)) {
2037 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2038 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TAt", var_class_name);
2039 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7558);
2040 show_backtrace(1);
2041 }
2042 {
2043 parser_prod__AAnnotations__n_at_61d(self, var_new_child); /* Direct call parser_prod#AAnnotations#n_at= on <self:AAnnotations>*/
2044 }
2045 goto RET_LABEL;
2046 } else {
2047 }
2048 var8 = self->attrs[COLOR_parser_nodes__AAnnotations___n_opar].val; /* _n_opar on <self:AAnnotations> */
2049 if (var8 == NULL) {
2050 var9 = 0; /* <var_old_child:ANode> cannot be null */
2051 } else {
2052 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TOpar> */
2053 var_other = var_old_child;
2054 {
2055 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TOpar(TOpar)> */
2056 var14 = var8 == var_other;
2057 var12 = var14;
2058 goto RET_LABEL13;
2059 RET_LABEL13:(void)0;
2060 }
2061 }
2062 var10 = var12;
2063 goto RET_LABEL11;
2064 RET_LABEL11:(void)0;
2065 }
2066 var9 = var10;
2067 }
2068 if (var9){
2069 /* <var_new_child:nullable ANode> isa nullable TOpar */
2070 cltype16 = type_nullable_parser_nodes__TOpar.color;
2071 idtype17 = type_nullable_parser_nodes__TOpar.id;
2072 if(var_new_child == NULL) {
2073 var15 = 1;
2074 } else {
2075 if(cltype16 >= var_new_child->type->table_size) {
2076 var15 = 0;
2077 } else {
2078 var15 = var_new_child->type->type_table[cltype16] == idtype17;
2079 }
2080 }
2081 if (unlikely(!var15)) {
2082 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
2083 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TOpar", var_class_name18);
2084 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7562);
2085 show_backtrace(1);
2086 }
2087 {
2088 parser_prod__AAnnotations__n_opar_61d(self, var_new_child); /* Direct call parser_prod#AAnnotations#n_opar= on <self:AAnnotations>*/
2089 }
2090 goto RET_LABEL;
2091 } else {
2092 }
2093 {
2094 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
2095 var21 = self->attrs[COLOR_parser_nodes__AAnnotations___n_items].val; /* _n_items on <self:AAnnotations> */
2096 if (unlikely(var21 == NULL)) {
2097 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
2098 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2403);
2099 show_backtrace(1);
2100 }
2101 var19 = var21;
2102 RET_LABEL20:(void)0;
2103 }
2104 }
2105 {
2106 var22 = parser_nodes__ANodes__replace_child(var19, var_old_child, var_new_child);
2107 }
2108 if (var22){
2109 goto RET_LABEL;
2110 } else {
2111 }
2112 var23 = self->attrs[COLOR_parser_nodes__AAnnotations___n_cpar].val; /* _n_cpar on <self:AAnnotations> */
2113 if (var23 == NULL) {
2114 var24 = 0; /* <var_old_child:ANode> cannot be null */
2115 } else {
2116 { /* Inline kernel#Object#== (var23,var_old_child) on <var23:nullable TCpar> */
2117 var_other = var_old_child;
2118 {
2119 { /* Inline kernel#Object#is_same_instance (var23,var_other) on <var23:nullable TCpar(TCpar)> */
2120 var29 = var23 == var_other;
2121 var27 = var29;
2122 goto RET_LABEL28;
2123 RET_LABEL28:(void)0;
2124 }
2125 }
2126 var25 = var27;
2127 goto RET_LABEL26;
2128 RET_LABEL26:(void)0;
2129 }
2130 var24 = var25;
2131 }
2132 if (var24){
2133 /* <var_new_child:nullable ANode> isa nullable TCpar */
2134 cltype31 = type_nullable_parser_nodes__TCpar.color;
2135 idtype32 = type_nullable_parser_nodes__TCpar.id;
2136 if(var_new_child == NULL) {
2137 var30 = 1;
2138 } else {
2139 if(cltype31 >= var_new_child->type->table_size) {
2140 var30 = 0;
2141 } else {
2142 var30 = var_new_child->type->type_table[cltype31] == idtype32;
2143 }
2144 }
2145 if (unlikely(!var30)) {
2146 var_class_name33 = var_new_child == NULL ? "null" : var_new_child->type->name;
2147 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TCpar", var_class_name33);
2148 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7567);
2149 show_backtrace(1);
2150 }
2151 {
2152 parser_prod__AAnnotations__n_cpar_61d(self, var_new_child); /* Direct call parser_prod#AAnnotations#n_cpar= on <self:AAnnotations>*/
2153 }
2154 goto RET_LABEL;
2155 } else {
2156 }
2157 RET_LABEL:;
2158 }
2159 /* method parser_prod#AAnnotations#replace_child for (self: Object, ANode, nullable ANode) */
2160 void VIRTUAL_parser_prod__AAnnotations__replace_child(val* self, val* p0, val* p1) {
2161 parser_prod__AAnnotations__replace_child(self, p0, p1); /* Direct call parser_prod#AAnnotations#replace_child on <self:Object(AAnnotations)>*/
2162 RET_LABEL:;
2163 }
2164 /* method parser_prod#AAnnotations#n_at= for (self: AAnnotations, nullable TAt) */
2165 void parser_prod__AAnnotations__n_at_61d(val* self, val* p0) {
2166 val* var_node /* var node: nullable TAt */;
2167 val* var /* : null */;
2168 short int var1 /* : Bool */;
2169 short int var2 /* : Bool */;
2170 val* var_other /* var other: nullable Object */;
2171 short int var4 /* : Bool */;
2172 short int var5 /* : Bool */;
2173 short int var6 /* : Bool */;
2174 var_node = p0;
2175 self->attrs[COLOR_parser_nodes__AAnnotations___n_at].val = var_node; /* _n_at on <self:AAnnotations> */
2176 var = NULL;
2177 if (var_node == NULL) {
2178 var1 = 0; /* is null */
2179 } else {
2180 var1 = 1; /* arg is null and recv is not */
2181 }
2182 if (0) {
2183 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TAt> */
2184 var_other = var;
2185 {
2186 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TAt(TAt)>*/;
2187 var4 = var5;
2188 }
2189 var6 = !var4;
2190 var2 = var6;
2191 goto RET_LABEL3;
2192 RET_LABEL3:(void)0;
2193 }
2194 var1 = var2;
2195 }
2196 if (var1){
2197 {
2198 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TAt(TAt)> */
2199 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TAt(TAt)> */
2200 RET_LABEL7:(void)0;
2201 }
2202 }
2203 } else {
2204 }
2205 RET_LABEL:;
2206 }
2207 /* method parser_prod#AAnnotations#n_at= for (self: Object, nullable TAt) */
2208 void VIRTUAL_parser_prod__AAnnotations__n_at_61d(val* self, val* p0) {
2209 parser_prod__AAnnotations__n_at_61d(self, p0); /* Direct call parser_prod#AAnnotations#n_at= on <self:Object(AAnnotations)>*/
2210 RET_LABEL:;
2211 }
2212 /* method parser_prod#AAnnotations#n_opar= for (self: AAnnotations, nullable TOpar) */
2213 void parser_prod__AAnnotations__n_opar_61d(val* self, val* p0) {
2214 val* var_node /* var node: nullable TOpar */;
2215 val* var /* : null */;
2216 short int var1 /* : Bool */;
2217 short int var2 /* : Bool */;
2218 val* var_other /* var other: nullable Object */;
2219 short int var4 /* : Bool */;
2220 short int var5 /* : Bool */;
2221 short int var6 /* : Bool */;
2222 var_node = p0;
2223 self->attrs[COLOR_parser_nodes__AAnnotations___n_opar].val = var_node; /* _n_opar on <self:AAnnotations> */
2224 var = NULL;
2225 if (var_node == NULL) {
2226 var1 = 0; /* is null */
2227 } else {
2228 var1 = 1; /* arg is null and recv is not */
2229 }
2230 if (0) {
2231 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TOpar> */
2232 var_other = var;
2233 {
2234 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TOpar(TOpar)>*/;
2235 var4 = var5;
2236 }
2237 var6 = !var4;
2238 var2 = var6;
2239 goto RET_LABEL3;
2240 RET_LABEL3:(void)0;
2241 }
2242 var1 = var2;
2243 }
2244 if (var1){
2245 {
2246 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TOpar(TOpar)> */
2247 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TOpar(TOpar)> */
2248 RET_LABEL7:(void)0;
2249 }
2250 }
2251 } else {
2252 }
2253 RET_LABEL:;
2254 }
2255 /* method parser_prod#AAnnotations#n_opar= for (self: Object, nullable TOpar) */
2256 void VIRTUAL_parser_prod__AAnnotations__n_opar_61d(val* self, val* p0) {
2257 parser_prod__AAnnotations__n_opar_61d(self, p0); /* Direct call parser_prod#AAnnotations#n_opar= on <self:Object(AAnnotations)>*/
2258 RET_LABEL:;
2259 }
2260 /* method parser_prod#AAnnotations#n_cpar= for (self: AAnnotations, nullable TCpar) */
2261 void parser_prod__AAnnotations__n_cpar_61d(val* self, val* p0) {
2262 val* var_node /* var node: nullable TCpar */;
2263 val* var /* : null */;
2264 short int var1 /* : Bool */;
2265 short int var2 /* : Bool */;
2266 val* var_other /* var other: nullable Object */;
2267 short int var4 /* : Bool */;
2268 short int var5 /* : Bool */;
2269 short int var6 /* : Bool */;
2270 var_node = p0;
2271 self->attrs[COLOR_parser_nodes__AAnnotations___n_cpar].val = var_node; /* _n_cpar on <self:AAnnotations> */
2272 var = NULL;
2273 if (var_node == NULL) {
2274 var1 = 0; /* is null */
2275 } else {
2276 var1 = 1; /* arg is null and recv is not */
2277 }
2278 if (0) {
2279 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TCpar> */
2280 var_other = var;
2281 {
2282 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TCpar(TCpar)>*/;
2283 var4 = var5;
2284 }
2285 var6 = !var4;
2286 var2 = var6;
2287 goto RET_LABEL3;
2288 RET_LABEL3:(void)0;
2289 }
2290 var1 = var2;
2291 }
2292 if (var1){
2293 {
2294 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TCpar(TCpar)> */
2295 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TCpar(TCpar)> */
2296 RET_LABEL7:(void)0;
2297 }
2298 }
2299 } else {
2300 }
2301 RET_LABEL:;
2302 }
2303 /* method parser_prod#AAnnotations#n_cpar= for (self: Object, nullable TCpar) */
2304 void VIRTUAL_parser_prod__AAnnotations__n_cpar_61d(val* self, val* p0) {
2305 parser_prod__AAnnotations__n_cpar_61d(self, p0); /* Direct call parser_prod#AAnnotations#n_cpar= on <self:Object(AAnnotations)>*/
2306 RET_LABEL:;
2307 }
2308 /* method parser_prod#AAnnotations#visit_all for (self: AAnnotations, Visitor) */
2309 void parser_prod__AAnnotations__visit_all(val* self, val* p0) {
2310 val* var_v /* var v: Visitor */;
2311 val* var /* : nullable TAt */;
2312 val* var1 /* : nullable TOpar */;
2313 val* var2 /* : ANodes[AAnnotation] */;
2314 val* var4 /* : ANodes[AAnnotation] */;
2315 val* var5 /* : nullable TCpar */;
2316 var_v = p0;
2317 var = self->attrs[COLOR_parser_nodes__AAnnotations___n_at].val; /* _n_at on <self:AAnnotations> */
2318 {
2319 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2320 }
2321 var1 = self->attrs[COLOR_parser_nodes__AAnnotations___n_opar].val; /* _n_opar on <self:AAnnotations> */
2322 {
2323 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2324 }
2325 {
2326 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
2327 var4 = self->attrs[COLOR_parser_nodes__AAnnotations___n_items].val; /* _n_items on <self:AAnnotations> */
2328 if (unlikely(var4 == NULL)) {
2329 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
2330 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2403);
2331 show_backtrace(1);
2332 }
2333 var2 = var4;
2334 RET_LABEL3:(void)0;
2335 }
2336 }
2337 {
2338 parser_nodes__ANodes__visit_all(var2, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var2:ANodes[AAnnotation]>*/
2339 }
2340 var5 = self->attrs[COLOR_parser_nodes__AAnnotations___n_cpar].val; /* _n_cpar on <self:AAnnotations> */
2341 {
2342 parser_nodes__Visitor__enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2343 }
2344 RET_LABEL:;
2345 }
2346 /* method parser_prod#AAnnotations#visit_all for (self: Object, Visitor) */
2347 void VIRTUAL_parser_prod__AAnnotations__visit_all(val* self, val* p0) {
2348 parser_prod__AAnnotations__visit_all(self, p0); /* Direct call parser_prod#AAnnotations#visit_all on <self:Object(AAnnotations)>*/
2349 RET_LABEL:;
2350 }
2351 /* method parser_prod#AAnnotation#init_aannotation for (self: AAnnotation, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AAtid, nullable TOpar, Collection[Object], nullable TCpar, nullable AAnnotations) */
2352 void parser_prod__AAnnotation__init_aannotation(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7) {
2353 val* var_n_doc /* var n_doc: nullable ADoc */;
2354 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
2355 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
2356 val* var_n_atid /* var n_atid: nullable AAtid */;
2357 val* var_n_opar /* var n_opar: nullable TOpar */;
2358 val* var_n_args /* var n_args: Collection[Object] */;
2359 val* var_n_cpar /* var n_cpar: nullable TCpar */;
2360 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
2361 val* var /* : null */;
2362 short int var1 /* : Bool */;
2363 short int var2 /* : Bool */;
2364 val* var_other /* var other: nullable Object */;
2365 short int var4 /* : Bool */;
2366 short int var5 /* : Bool */;
2367 short int var6 /* : Bool */;
2368 val* var8 /* : null */;
2369 short int var9 /* : Bool */;
2370 short int var10 /* : Bool */;
2371 short int var12 /* : Bool */;
2372 short int var13 /* : Bool */;
2373 short int var14 /* : Bool */;
2374 val* var16 /* : null */;
2375 short int var17 /* : Bool */;
2376 short int var18 /* : Bool */;
2377 short int var20 /* : Bool */;
2378 short int var21 /* : Bool */;
2379 short int var22 /* : Bool */;
2380 val* var25 /* : null */;
2381 short int var26 /* : Bool */;
2382 short int var27 /* : Bool */;
2383 short int var29 /* : Bool */;
2384 short int var30 /* : Bool */;
2385 short int var31 /* : Bool */;
2386 val* var33 /* : ANodes[AAtArg] */;
2387 val* var35 /* : ANodes[AAtArg] */;
2388 val* var36 /* : null */;
2389 short int var37 /* : Bool */;
2390 short int var38 /* : Bool */;
2391 short int var40 /* : Bool */;
2392 short int var41 /* : Bool */;
2393 short int var42 /* : Bool */;
2394 val* var44 /* : null */;
2395 short int var45 /* : Bool */;
2396 short int var46 /* : Bool */;
2397 short int var48 /* : Bool */;
2398 short int var49 /* : Bool */;
2399 short int var50 /* : Bool */;
2400 var_n_doc = p0;
2401 var_n_kwredef = p1;
2402 var_n_visibility = p2;
2403 var_n_atid = p3;
2404 var_n_opar = p4;
2405 var_n_args = p5;
2406 var_n_cpar = p6;
2407 var_n_annotations = p7;
2408 self->attrs[COLOR_parser_nodes__AAnnotation___n_doc].val = var_n_doc; /* _n_doc on <self:AAnnotation> */
2409 var = NULL;
2410 if (var_n_doc == NULL) {
2411 var1 = 0; /* is null */
2412 } else {
2413 var1 = 1; /* arg is null and recv is not */
2414 }
2415 if (0) {
2416 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
2417 var_other = var;
2418 {
2419 var5 = ((short int (*)(val*, val*))(var_n_doc->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
2420 var4 = var5;
2421 }
2422 var6 = !var4;
2423 var2 = var6;
2424 goto RET_LABEL3;
2425 RET_LABEL3:(void)0;
2426 }
2427 var1 = var2;
2428 }
2429 if (var1){
2430 {
2431 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
2432 var_n_doc->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
2433 RET_LABEL7:(void)0;
2434 }
2435 }
2436 } else {
2437 }
2438 self->attrs[COLOR_parser_nodes__AAnnotation___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AAnnotation> */
2439 var8 = NULL;
2440 if (var_n_kwredef == NULL) {
2441 var9 = 0; /* is null */
2442 } else {
2443 var9 = 1; /* arg is null and recv is not */
2444 }
2445 if (0) {
2446 { /* Inline kernel#Object#!= (var_n_kwredef,var8) on <var_n_kwredef:nullable TKwredef> */
2447 var_other = var8;
2448 {
2449 var13 = ((short int (*)(val*, val*))(var_n_kwredef->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
2450 var12 = var13;
2451 }
2452 var14 = !var12;
2453 var10 = var14;
2454 goto RET_LABEL11;
2455 RET_LABEL11:(void)0;
2456 }
2457 var9 = var10;
2458 }
2459 if (var9){
2460 {
2461 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2462 var_n_kwredef->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2463 RET_LABEL15:(void)0;
2464 }
2465 }
2466 } else {
2467 }
2468 self->attrs[COLOR_parser_nodes__AAnnotation___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AAnnotation> */
2469 var16 = NULL;
2470 if (var_n_visibility == NULL) {
2471 var17 = 0; /* is null */
2472 } else {
2473 var17 = 1; /* arg is null and recv is not */
2474 }
2475 if (0) {
2476 { /* Inline kernel#Object#!= (var_n_visibility,var16) on <var_n_visibility:nullable AVisibility> */
2477 var_other = var16;
2478 {
2479 var21 = ((short int (*)(val*, val*))(var_n_visibility->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_visibility, var_other) /* == on <var_n_visibility:nullable AVisibility(AVisibility)>*/;
2480 var20 = var21;
2481 }
2482 var22 = !var20;
2483 var18 = var22;
2484 goto RET_LABEL19;
2485 RET_LABEL19:(void)0;
2486 }
2487 var17 = var18;
2488 }
2489 if (var17){
2490 {
2491 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility(AVisibility)> */
2492 var_n_visibility->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility(AVisibility)> */
2493 RET_LABEL23:(void)0;
2494 }
2495 }
2496 } else {
2497 }
2498 if (unlikely(var_n_atid == NULL)) {
2499 PRINT_ERROR("Runtime error: %s", "Cast failed");
2500 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7615);
2501 show_backtrace(1);
2502 }
2503 self->attrs[COLOR_parser_nodes__AAnnotation___n_atid].val = var_n_atid; /* _n_atid on <self:AAnnotation> */
2504 if (var_n_atid == NULL) {
2505 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2506 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7616);
2507 show_backtrace(1);
2508 } else {
2509 { /* Inline parser_nodes#ANode#parent= (var_n_atid,self) on <var_n_atid:nullable AAtid> */
2510 if (unlikely(var_n_atid == NULL)) {
2511 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2512 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
2513 show_backtrace(1);
2514 }
2515 var_n_atid->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_atid:nullable AAtid> */
2516 RET_LABEL24:(void)0;
2517 }
2518 }
2519 self->attrs[COLOR_parser_nodes__AAnnotation___n_opar].val = var_n_opar; /* _n_opar on <self:AAnnotation> */
2520 var25 = NULL;
2521 if (var_n_opar == NULL) {
2522 var26 = 0; /* is null */
2523 } else {
2524 var26 = 1; /* arg is null and recv is not */
2525 }
2526 if (0) {
2527 { /* Inline kernel#Object#!= (var_n_opar,var25) on <var_n_opar:nullable TOpar> */
2528 var_other = var25;
2529 {
2530 var30 = ((short int (*)(val*, val*))(var_n_opar->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_opar, var_other) /* == on <var_n_opar:nullable TOpar(TOpar)>*/;
2531 var29 = var30;
2532 }
2533 var31 = !var29;
2534 var27 = var31;
2535 goto RET_LABEL28;
2536 RET_LABEL28:(void)0;
2537 }
2538 var26 = var27;
2539 }
2540 if (var26){
2541 {
2542 { /* Inline parser_nodes#ANode#parent= (var_n_opar,self) on <var_n_opar:nullable TOpar(TOpar)> */
2543 var_n_opar->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_opar:nullable TOpar(TOpar)> */
2544 RET_LABEL32:(void)0;
2545 }
2546 }
2547 } else {
2548 }
2549 {
2550 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
2551 var35 = self->attrs[COLOR_parser_nodes__AAnnotation___n_args].val; /* _n_args on <self:AAnnotation> */
2552 if (unlikely(var35 == NULL)) {
2553 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
2554 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2426);
2555 show_backtrace(1);
2556 }
2557 var33 = var35;
2558 RET_LABEL34:(void)0;
2559 }
2560 }
2561 {
2562 parser_nodes__ANodes__unsafe_add_all(var33, var_n_args); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var33:ANodes[AAtArg]>*/
2563 }
2564 self->attrs[COLOR_parser_nodes__AAnnotation___n_cpar].val = var_n_cpar; /* _n_cpar on <self:AAnnotation> */
2565 var36 = NULL;
2566 if (var_n_cpar == NULL) {
2567 var37 = 0; /* is null */
2568 } else {
2569 var37 = 1; /* arg is null and recv is not */
2570 }
2571 if (0) {
2572 { /* Inline kernel#Object#!= (var_n_cpar,var36) on <var_n_cpar:nullable TCpar> */
2573 var_other = var36;
2574 {
2575 var41 = ((short int (*)(val*, val*))(var_n_cpar->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_cpar, var_other) /* == on <var_n_cpar:nullable TCpar(TCpar)>*/;
2576 var40 = var41;
2577 }
2578 var42 = !var40;
2579 var38 = var42;
2580 goto RET_LABEL39;
2581 RET_LABEL39:(void)0;
2582 }
2583 var37 = var38;
2584 }
2585 if (var37){
2586 {
2587 { /* Inline parser_nodes#ANode#parent= (var_n_cpar,self) on <var_n_cpar:nullable TCpar(TCpar)> */
2588 var_n_cpar->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_cpar:nullable TCpar(TCpar)> */
2589 RET_LABEL43:(void)0;
2590 }
2591 }
2592 } else {
2593 }
2594 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AAnnotation> */
2595 var44 = NULL;
2596 if (var_n_annotations == NULL) {
2597 var45 = 0; /* is null */
2598 } else {
2599 var45 = 1; /* arg is null and recv is not */
2600 }
2601 if (0) {
2602 { /* Inline kernel#Object#!= (var_n_annotations,var44) on <var_n_annotations:nullable AAnnotations> */
2603 var_other = var44;
2604 {
2605 var49 = ((short int (*)(val*, val*))(var_n_annotations->class->vft[COLOR_kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
2606 var48 = var49;
2607 }
2608 var50 = !var48;
2609 var46 = var50;
2610 goto RET_LABEL47;
2611 RET_LABEL47:(void)0;
2612 }
2613 var45 = var46;
2614 }
2615 if (var45){
2616 {
2617 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2618 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2619 RET_LABEL51:(void)0;
2620 }
2621 }
2622 } else {
2623 }
2624 RET_LABEL:;
2625 }
2626 /* method parser_prod#AAnnotation#init_aannotation for (self: Object, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AAtid, nullable TOpar, Collection[Object], nullable TCpar, nullable AAnnotations) */
2627 void VIRTUAL_parser_prod__AAnnotation__init_aannotation(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7) {
2628 parser_prod__AAnnotation__init_aannotation(self, p0, p1, p2, p3, p4, p5, p6, p7); /* Direct call parser_prod#AAnnotation#init_aannotation on <self:Object(AAnnotation)>*/
2629 RET_LABEL:;
2630 }
2631 /* method parser_prod#AAnnotation#replace_child for (self: AAnnotation, ANode, nullable ANode) */
2632 void parser_prod__AAnnotation__replace_child(val* self, val* p0, val* p1) {
2633 val* var_old_child /* var old_child: ANode */;
2634 val* var_new_child /* var new_child: nullable ANode */;
2635 val* var /* : nullable ADoc */;
2636 short int var1 /* : Bool */;
2637 short int var2 /* : Bool */;
2638 val* var_other /* var other: nullable Object */;
2639 short int var4 /* : Bool */;
2640 short int var6 /* : Bool */;
2641 short int var7 /* : Bool */;
2642 int cltype;
2643 int idtype;
2644 const char* var_class_name;
2645 val* var8 /* : nullable TKwredef */;
2646 short int var9 /* : Bool */;
2647 short int var10 /* : Bool */;
2648 short int var12 /* : Bool */;
2649 short int var14 /* : Bool */;
2650 short int var15 /* : Bool */;
2651 int cltype16;
2652 int idtype17;
2653 const char* var_class_name18;
2654 val* var19 /* : nullable AVisibility */;
2655 short int var20 /* : Bool */;
2656 short int var21 /* : Bool */;
2657 short int var23 /* : Bool */;
2658 short int var25 /* : Bool */;
2659 short int var26 /* : Bool */;
2660 int cltype27;
2661 int idtype28;
2662 const char* var_class_name29;
2663 val* var30 /* : AAtid */;
2664 short int var31 /* : Bool */;
2665 short int var32 /* : Bool */;
2666 short int var34 /* : Bool */;
2667 short int var36 /* : Bool */;
2668 short int var37 /* : Bool */;
2669 int cltype38;
2670 int idtype39;
2671 const char* var_class_name40;
2672 val* var41 /* : nullable TOpar */;
2673 short int var42 /* : Bool */;
2674 short int var43 /* : Bool */;
2675 short int var45 /* : Bool */;
2676 short int var47 /* : Bool */;
2677 short int var48 /* : Bool */;
2678 int cltype49;
2679 int idtype50;
2680 const char* var_class_name51;
2681 val* var52 /* : ANodes[AAtArg] */;
2682 val* var54 /* : ANodes[AAtArg] */;
2683 short int var55 /* : Bool */;
2684 val* var56 /* : nullable TCpar */;
2685 short int var57 /* : Bool */;
2686 short int var58 /* : Bool */;
2687 short int var60 /* : Bool */;
2688 short int var62 /* : Bool */;
2689 short int var63 /* : Bool */;
2690 int cltype64;
2691 int idtype65;
2692 const char* var_class_name66;
2693 val* var67 /* : nullable AAnnotations */;
2694 short int var68 /* : Bool */;
2695 short int var69 /* : Bool */;
2696 short int var71 /* : Bool */;
2697 short int var73 /* : Bool */;
2698 short int var74 /* : Bool */;
2699 int cltype75;
2700 int idtype76;
2701 const char* var_class_name77;
2702 var_old_child = p0;
2703 var_new_child = p1;
2704 var = self->attrs[COLOR_parser_nodes__AAnnotation___n_doc].val; /* _n_doc on <self:AAnnotation> */
2705 if (var == NULL) {
2706 var1 = 0; /* <var_old_child:ANode> cannot be null */
2707 } else {
2708 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
2709 var_other = var_old_child;
2710 {
2711 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
2712 var6 = var == var_other;
2713 var4 = var6;
2714 goto RET_LABEL5;
2715 RET_LABEL5:(void)0;
2716 }
2717 }
2718 var2 = var4;
2719 goto RET_LABEL3;
2720 RET_LABEL3:(void)0;
2721 }
2722 var1 = var2;
2723 }
2724 if (var1){
2725 /* <var_new_child:nullable ANode> isa nullable ADoc */
2726 cltype = type_nullable_parser_nodes__ADoc.color;
2727 idtype = type_nullable_parser_nodes__ADoc.id;
2728 if(var_new_child == NULL) {
2729 var7 = 1;
2730 } else {
2731 if(cltype >= var_new_child->type->table_size) {
2732 var7 = 0;
2733 } else {
2734 var7 = var_new_child->type->type_table[cltype] == idtype;
2735 }
2736 }
2737 if (unlikely(!var7)) {
2738 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2739 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
2740 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7629);
2741 show_backtrace(1);
2742 }
2743 {
2744 parser_prod__AAnnotation__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_doc= on <self:AAnnotation>*/
2745 }
2746 goto RET_LABEL;
2747 } else {
2748 }
2749 var8 = self->attrs[COLOR_parser_nodes__AAnnotation___n_kwredef].val; /* _n_kwredef on <self:AAnnotation> */
2750 if (var8 == NULL) {
2751 var9 = 0; /* <var_old_child:ANode> cannot be null */
2752 } else {
2753 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
2754 var_other = var_old_child;
2755 {
2756 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
2757 var14 = var8 == var_other;
2758 var12 = var14;
2759 goto RET_LABEL13;
2760 RET_LABEL13:(void)0;
2761 }
2762 }
2763 var10 = var12;
2764 goto RET_LABEL11;
2765 RET_LABEL11:(void)0;
2766 }
2767 var9 = var10;
2768 }
2769 if (var9){
2770 /* <var_new_child:nullable ANode> isa nullable TKwredef */
2771 cltype16 = type_nullable_parser_nodes__TKwredef.color;
2772 idtype17 = type_nullable_parser_nodes__TKwredef.id;
2773 if(var_new_child == NULL) {
2774 var15 = 1;
2775 } else {
2776 if(cltype16 >= var_new_child->type->table_size) {
2777 var15 = 0;
2778 } else {
2779 var15 = var_new_child->type->type_table[cltype16] == idtype17;
2780 }
2781 }
2782 if (unlikely(!var15)) {
2783 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
2784 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
2785 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7633);
2786 show_backtrace(1);
2787 }
2788 {
2789 parser_prod__AAnnotation__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_kwredef= on <self:AAnnotation>*/
2790 }
2791 goto RET_LABEL;
2792 } else {
2793 }
2794 var19 = self->attrs[COLOR_parser_nodes__AAnnotation___n_visibility].val; /* _n_visibility on <self:AAnnotation> */
2795 if (var19 == NULL) {
2796 var20 = 0; /* <var_old_child:ANode> cannot be null */
2797 } else {
2798 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
2799 var_other = var_old_child;
2800 {
2801 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
2802 var25 = var19 == var_other;
2803 var23 = var25;
2804 goto RET_LABEL24;
2805 RET_LABEL24:(void)0;
2806 }
2807 }
2808 var21 = var23;
2809 goto RET_LABEL22;
2810 RET_LABEL22:(void)0;
2811 }
2812 var20 = var21;
2813 }
2814 if (var20){
2815 /* <var_new_child:nullable ANode> isa nullable AVisibility */
2816 cltype27 = type_nullable_parser_nodes__AVisibility.color;
2817 idtype28 = type_nullable_parser_nodes__AVisibility.id;
2818 if(var_new_child == NULL) {
2819 var26 = 1;
2820 } else {
2821 if(cltype27 >= var_new_child->type->table_size) {
2822 var26 = 0;
2823 } else {
2824 var26 = var_new_child->type->type_table[cltype27] == idtype28;
2825 }
2826 }
2827 if (unlikely(!var26)) {
2828 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
2829 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AVisibility", var_class_name29);
2830 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7637);
2831 show_backtrace(1);
2832 }
2833 {
2834 parser_prod__AAnnotation__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_visibility= on <self:AAnnotation>*/
2835 }
2836 goto RET_LABEL;
2837 } else {
2838 }
2839 var30 = self->attrs[COLOR_parser_nodes__AAnnotation___n_atid].val; /* _n_atid on <self:AAnnotation> */
2840 if (unlikely(var30 == NULL)) {
2841 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_atid");
2842 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7640);
2843 show_backtrace(1);
2844 }
2845 {
2846 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:AAtid> */
2847 var_other = var_old_child;
2848 {
2849 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:AAtid> */
2850 var36 = var30 == var_other;
2851 var34 = var36;
2852 goto RET_LABEL35;
2853 RET_LABEL35:(void)0;
2854 }
2855 }
2856 var32 = var34;
2857 goto RET_LABEL33;
2858 RET_LABEL33:(void)0;
2859 }
2860 var31 = var32;
2861 }
2862 if (var31){
2863 /* <var_new_child:nullable ANode> isa AAtid */
2864 cltype38 = type_parser_nodes__AAtid.color;
2865 idtype39 = type_parser_nodes__AAtid.id;
2866 if(var_new_child == NULL) {
2867 var37 = 0;
2868 } else {
2869 if(cltype38 >= var_new_child->type->table_size) {
2870 var37 = 0;
2871 } else {
2872 var37 = var_new_child->type->type_table[cltype38] == idtype39;
2873 }
2874 }
2875 if (unlikely(!var37)) {
2876 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
2877 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AAtid", var_class_name40);
2878 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7641);
2879 show_backtrace(1);
2880 }
2881 {
2882 parser_prod__AAnnotation__n_atid_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_atid= on <self:AAnnotation>*/
2883 }
2884 goto RET_LABEL;
2885 } else {
2886 }
2887 var41 = self->attrs[COLOR_parser_nodes__AAnnotation___n_opar].val; /* _n_opar on <self:AAnnotation> */
2888 if (var41 == NULL) {
2889 var42 = 0; /* <var_old_child:ANode> cannot be null */
2890 } else {
2891 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:nullable TOpar> */
2892 var_other = var_old_child;
2893 {
2894 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:nullable TOpar(TOpar)> */
2895 var47 = var41 == var_other;
2896 var45 = var47;
2897 goto RET_LABEL46;
2898 RET_LABEL46:(void)0;
2899 }
2900 }
2901 var43 = var45;
2902 goto RET_LABEL44;
2903 RET_LABEL44:(void)0;
2904 }
2905 var42 = var43;
2906 }
2907 if (var42){
2908 /* <var_new_child:nullable ANode> isa nullable TOpar */
2909 cltype49 = type_nullable_parser_nodes__TOpar.color;
2910 idtype50 = type_nullable_parser_nodes__TOpar.id;
2911 if(var_new_child == NULL) {
2912 var48 = 1;
2913 } else {
2914 if(cltype49 >= var_new_child->type->table_size) {
2915 var48 = 0;
2916 } else {
2917 var48 = var_new_child->type->type_table[cltype49] == idtype50;
2918 }
2919 }
2920 if (unlikely(!var48)) {
2921 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
2922 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TOpar", var_class_name51);
2923 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7645);
2924 show_backtrace(1);
2925 }
2926 {
2927 parser_prod__AAnnotation__n_opar_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_opar= on <self:AAnnotation>*/
2928 }
2929 goto RET_LABEL;
2930 } else {
2931 }
2932 {
2933 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
2934 var54 = self->attrs[COLOR_parser_nodes__AAnnotation___n_args].val; /* _n_args on <self:AAnnotation> */
2935 if (unlikely(var54 == NULL)) {
2936 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
2937 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2426);
2938 show_backtrace(1);
2939 }
2940 var52 = var54;
2941 RET_LABEL53:(void)0;
2942 }
2943 }
2944 {
2945 var55 = parser_nodes__ANodes__replace_child(var52, var_old_child, var_new_child);
2946 }
2947 if (var55){
2948 goto RET_LABEL;
2949 } else {
2950 }
2951 var56 = self->attrs[COLOR_parser_nodes__AAnnotation___n_cpar].val; /* _n_cpar on <self:AAnnotation> */
2952 if (var56 == NULL) {
2953 var57 = 0; /* <var_old_child:ANode> cannot be null */
2954 } else {
2955 { /* Inline kernel#Object#== (var56,var_old_child) on <var56:nullable TCpar> */
2956 var_other = var_old_child;
2957 {
2958 { /* Inline kernel#Object#is_same_instance (var56,var_other) on <var56:nullable TCpar(TCpar)> */
2959 var62 = var56 == var_other;
2960 var60 = var62;
2961 goto RET_LABEL61;
2962 RET_LABEL61:(void)0;
2963 }
2964 }
2965 var58 = var60;
2966 goto RET_LABEL59;
2967 RET_LABEL59:(void)0;
2968 }
2969 var57 = var58;
2970 }
2971 if (var57){
2972 /* <var_new_child:nullable ANode> isa nullable TCpar */
2973 cltype64 = type_nullable_parser_nodes__TCpar.color;
2974 idtype65 = type_nullable_parser_nodes__TCpar.id;
2975 if(var_new_child == NULL) {
2976 var63 = 1;
2977 } else {
2978 if(cltype64 >= var_new_child->type->table_size) {
2979 var63 = 0;
2980 } else {
2981 var63 = var_new_child->type->type_table[cltype64] == idtype65;
2982 }
2983 }
2984 if (unlikely(!var63)) {
2985 var_class_name66 = var_new_child == NULL ? "null" : var_new_child->type->name;
2986 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TCpar", var_class_name66);
2987 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7650);
2988 show_backtrace(1);
2989 }
2990 {
2991 parser_prod__AAnnotation__n_cpar_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_cpar= on <self:AAnnotation>*/
2992 }
2993 goto RET_LABEL;
2994 } else {
2995 }
2996 var67 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAnnotation> */
2997 if (var67 == NULL) {
2998 var68 = 0; /* <var_old_child:ANode> cannot be null */
2999 } else {
3000 { /* Inline kernel#Object#== (var67,var_old_child) on <var67:nullable AAnnotations> */
3001 var_other = var_old_child;
3002 {
3003 { /* Inline kernel#Object#is_same_instance (var67,var_other) on <var67:nullable AAnnotations(AAnnotations)> */
3004 var73 = var67 == var_other;
3005 var71 = var73;
3006 goto RET_LABEL72;
3007 RET_LABEL72:(void)0;
3008 }
3009 }
3010 var69 = var71;
3011 goto RET_LABEL70;
3012 RET_LABEL70:(void)0;
3013 }
3014 var68 = var69;
3015 }
3016 if (var68){
3017 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
3018 cltype75 = type_nullable_parser_nodes__AAnnotations.color;
3019 idtype76 = type_nullable_parser_nodes__AAnnotations.id;
3020 if(var_new_child == NULL) {
3021 var74 = 1;
3022 } else {
3023 if(cltype75 >= var_new_child->type->table_size) {
3024 var74 = 0;
3025 } else {
3026 var74 = var_new_child->type->type_table[cltype75] == idtype76;
3027 }
3028 }
3029 if (unlikely(!var74)) {
3030 var_class_name77 = var_new_child == NULL ? "null" : var_new_child->type->name;
3031 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name77);
3032 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7654);
3033 show_backtrace(1);
3034 }
3035 {
3036 parser_prod__AAnnotation__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AAnnotation#n_annotations= on <self:AAnnotation>*/
3037 }
3038 goto RET_LABEL;
3039 } else {
3040 }
3041 RET_LABEL:;
3042 }
3043 /* method parser_prod#AAnnotation#replace_child for (self: Object, ANode, nullable ANode) */
3044 void VIRTUAL_parser_prod__AAnnotation__replace_child(val* self, val* p0, val* p1) {
3045 parser_prod__AAnnotation__replace_child(self, p0, p1); /* Direct call parser_prod#AAnnotation#replace_child on <self:Object(AAnnotation)>*/
3046 RET_LABEL:;
3047 }
3048 /* method parser_prod#AAnnotation#n_doc= for (self: AAnnotation, nullable ADoc) */
3049 void parser_prod__AAnnotation__n_doc_61d(val* self, val* p0) {
3050 val* var_node /* var node: nullable ADoc */;
3051 val* var /* : null */;
3052 short int var1 /* : Bool */;
3053 short int var2 /* : Bool */;
3054 val* var_other /* var other: nullable Object */;
3055 short int var4 /* : Bool */;
3056 short int var5 /* : Bool */;
3057 short int var6 /* : Bool */;
3058 var_node = p0;
3059 self->attrs[COLOR_parser_nodes__AAnnotation___n_doc].val = var_node; /* _n_doc on <self:AAnnotation> */
3060 var = NULL;
3061 if (var_node == NULL) {
3062 var1 = 0; /* is null */
3063 } else {
3064 var1 = 1; /* arg is null and recv is not */
3065 }
3066 if (0) {
3067 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
3068 var_other = var;
3069 {
3070 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
3071 var4 = var5;
3072 }
3073 var6 = !var4;
3074 var2 = var6;
3075 goto RET_LABEL3;
3076 RET_LABEL3:(void)0;
3077 }
3078 var1 = var2;
3079 }
3080 if (var1){
3081 {
3082 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
3083 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
3084 RET_LABEL7:(void)0;
3085 }
3086 }
3087 } else {
3088 }
3089 RET_LABEL:;
3090 }
3091 /* method parser_prod#AAnnotation#n_doc= for (self: Object, nullable ADoc) */
3092 void VIRTUAL_parser_prod__AAnnotation__n_doc_61d(val* self, val* p0) {
3093 parser_prod__AAnnotation__n_doc_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_doc= on <self:Object(AAnnotation)>*/
3094 RET_LABEL:;
3095 }
3096 /* method parser_prod#AAnnotation#n_kwredef= for (self: AAnnotation, nullable TKwredef) */
3097 void parser_prod__AAnnotation__n_kwredef_61d(val* self, val* p0) {
3098 val* var_node /* var node: nullable TKwredef */;
3099 val* var /* : null */;
3100 short int var1 /* : Bool */;
3101 short int var2 /* : Bool */;
3102 val* var_other /* var other: nullable Object */;
3103 short int var4 /* : Bool */;
3104 short int var5 /* : Bool */;
3105 short int var6 /* : Bool */;
3106 var_node = p0;
3107 self->attrs[COLOR_parser_nodes__AAnnotation___n_kwredef].val = var_node; /* _n_kwredef on <self:AAnnotation> */
3108 var = NULL;
3109 if (var_node == NULL) {
3110 var1 = 0; /* is null */
3111 } else {
3112 var1 = 1; /* arg is null and recv is not */
3113 }
3114 if (0) {
3115 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
3116 var_other = var;
3117 {
3118 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
3119 var4 = var5;
3120 }
3121 var6 = !var4;
3122 var2 = var6;
3123 goto RET_LABEL3;
3124 RET_LABEL3:(void)0;
3125 }
3126 var1 = var2;
3127 }
3128 if (var1){
3129 {
3130 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
3131 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
3132 RET_LABEL7:(void)0;
3133 }
3134 }
3135 } else {
3136 }
3137 RET_LABEL:;
3138 }
3139 /* method parser_prod#AAnnotation#n_kwredef= for (self: Object, nullable TKwredef) */
3140 void VIRTUAL_parser_prod__AAnnotation__n_kwredef_61d(val* self, val* p0) {
3141 parser_prod__AAnnotation__n_kwredef_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_kwredef= on <self:Object(AAnnotation)>*/
3142 RET_LABEL:;
3143 }
3144 /* method parser_prod#AAnnotation#n_visibility= for (self: AAnnotation, nullable AVisibility) */
3145 void parser_prod__AAnnotation__n_visibility_61d(val* self, val* p0) {
3146 val* var_node /* var node: nullable AVisibility */;
3147 val* var /* : null */;
3148 short int var1 /* : Bool */;
3149 short int var2 /* : Bool */;
3150 val* var_other /* var other: nullable Object */;
3151 short int var4 /* : Bool */;
3152 short int var5 /* : Bool */;
3153 short int var6 /* : Bool */;
3154 var_node = p0;
3155 self->attrs[COLOR_parser_nodes__AAnnotation___n_visibility].val = var_node; /* _n_visibility on <self:AAnnotation> */
3156 var = NULL;
3157 if (var_node == NULL) {
3158 var1 = 0; /* is null */
3159 } else {
3160 var1 = 1; /* arg is null and recv is not */
3161 }
3162 if (0) {
3163 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AVisibility> */
3164 var_other = var;
3165 {
3166 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AVisibility(AVisibility)>*/;
3167 var4 = var5;
3168 }
3169 var6 = !var4;
3170 var2 = var6;
3171 goto RET_LABEL3;
3172 RET_LABEL3:(void)0;
3173 }
3174 var1 = var2;
3175 }
3176 if (var1){
3177 {
3178 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility(AVisibility)> */
3179 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility(AVisibility)> */
3180 RET_LABEL7:(void)0;
3181 }
3182 }
3183 } else {
3184 }
3185 RET_LABEL:;
3186 }
3187 /* method parser_prod#AAnnotation#n_visibility= for (self: Object, nullable AVisibility) */
3188 void VIRTUAL_parser_prod__AAnnotation__n_visibility_61d(val* self, val* p0) {
3189 parser_prod__AAnnotation__n_visibility_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_visibility= on <self:Object(AAnnotation)>*/
3190 RET_LABEL:;
3191 }
3192 /* method parser_prod#AAnnotation#n_atid= for (self: AAnnotation, AAtid) */
3193 void parser_prod__AAnnotation__n_atid_61d(val* self, val* p0) {
3194 val* var_node /* var node: AAtid */;
3195 var_node = p0;
3196 self->attrs[COLOR_parser_nodes__AAnnotation___n_atid].val = var_node; /* _n_atid on <self:AAnnotation> */
3197 {
3198 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AAtid> */
3199 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AAtid> */
3200 RET_LABEL1:(void)0;
3201 }
3202 }
3203 RET_LABEL:;
3204 }
3205 /* method parser_prod#AAnnotation#n_atid= for (self: Object, AAtid) */
3206 void VIRTUAL_parser_prod__AAnnotation__n_atid_61d(val* self, val* p0) {
3207 parser_prod__AAnnotation__n_atid_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_atid= on <self:Object(AAnnotation)>*/
3208 RET_LABEL:;
3209 }
3210 /* method parser_prod#AAnnotation#n_opar= for (self: AAnnotation, nullable TOpar) */
3211 void parser_prod__AAnnotation__n_opar_61d(val* self, val* p0) {
3212 val* var_node /* var node: nullable TOpar */;
3213 val* var /* : null */;
3214 short int var1 /* : Bool */;
3215 short int var2 /* : Bool */;
3216 val* var_other /* var other: nullable Object */;
3217 short int var4 /* : Bool */;
3218 short int var5 /* : Bool */;
3219 short int var6 /* : Bool */;
3220 var_node = p0;
3221 self->attrs[COLOR_parser_nodes__AAnnotation___n_opar].val = var_node; /* _n_opar on <self:AAnnotation> */
3222 var = NULL;
3223 if (var_node == NULL) {
3224 var1 = 0; /* is null */
3225 } else {
3226 var1 = 1; /* arg is null and recv is not */
3227 }
3228 if (0) {
3229 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TOpar> */
3230 var_other = var;
3231 {
3232 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TOpar(TOpar)>*/;
3233 var4 = var5;
3234 }
3235 var6 = !var4;
3236 var2 = var6;
3237 goto RET_LABEL3;
3238 RET_LABEL3:(void)0;
3239 }
3240 var1 = var2;
3241 }
3242 if (var1){
3243 {
3244 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TOpar(TOpar)> */
3245 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TOpar(TOpar)> */
3246 RET_LABEL7:(void)0;
3247 }
3248 }
3249 } else {
3250 }
3251 RET_LABEL:;
3252 }
3253 /* method parser_prod#AAnnotation#n_opar= for (self: Object, nullable TOpar) */
3254 void VIRTUAL_parser_prod__AAnnotation__n_opar_61d(val* self, val* p0) {
3255 parser_prod__AAnnotation__n_opar_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_opar= on <self:Object(AAnnotation)>*/
3256 RET_LABEL:;
3257 }
3258 /* method parser_prod#AAnnotation#n_cpar= for (self: AAnnotation, nullable TCpar) */
3259 void parser_prod__AAnnotation__n_cpar_61d(val* self, val* p0) {
3260 val* var_node /* var node: nullable TCpar */;
3261 val* var /* : null */;
3262 short int var1 /* : Bool */;
3263 short int var2 /* : Bool */;
3264 val* var_other /* var other: nullable Object */;
3265 short int var4 /* : Bool */;
3266 short int var5 /* : Bool */;
3267 short int var6 /* : Bool */;
3268 var_node = p0;
3269 self->attrs[COLOR_parser_nodes__AAnnotation___n_cpar].val = var_node; /* _n_cpar on <self:AAnnotation> */
3270 var = NULL;
3271 if (var_node == NULL) {
3272 var1 = 0; /* is null */
3273 } else {
3274 var1 = 1; /* arg is null and recv is not */
3275 }
3276 if (0) {
3277 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TCpar> */
3278 var_other = var;
3279 {
3280 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TCpar(TCpar)>*/;
3281 var4 = var5;
3282 }
3283 var6 = !var4;
3284 var2 = var6;
3285 goto RET_LABEL3;
3286 RET_LABEL3:(void)0;
3287 }
3288 var1 = var2;
3289 }
3290 if (var1){
3291 {
3292 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TCpar(TCpar)> */
3293 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TCpar(TCpar)> */
3294 RET_LABEL7:(void)0;
3295 }
3296 }
3297 } else {
3298 }
3299 RET_LABEL:;
3300 }
3301 /* method parser_prod#AAnnotation#n_cpar= for (self: Object, nullable TCpar) */
3302 void VIRTUAL_parser_prod__AAnnotation__n_cpar_61d(val* self, val* p0) {
3303 parser_prod__AAnnotation__n_cpar_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_cpar= on <self:Object(AAnnotation)>*/
3304 RET_LABEL:;
3305 }
3306 /* method parser_prod#AAnnotation#n_annotations= for (self: AAnnotation, nullable AAnnotations) */
3307 void parser_prod__AAnnotation__n_annotations_61d(val* self, val* p0) {
3308 val* var_node /* var node: nullable AAnnotations */;
3309 val* var /* : null */;
3310 short int var1 /* : Bool */;
3311 short int var2 /* : Bool */;
3312 val* var_other /* var other: nullable Object */;
3313 short int var4 /* : Bool */;
3314 short int var5 /* : Bool */;
3315 short int var6 /* : Bool */;
3316 var_node = p0;
3317 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AAnnotation> */
3318 var = NULL;
3319 if (var_node == NULL) {
3320 var1 = 0; /* is null */
3321 } else {
3322 var1 = 1; /* arg is null and recv is not */
3323 }
3324 if (0) {
3325 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
3326 var_other = var;
3327 {
3328 var5 = ((short int (*)(val*, val*))(var_node->class->vft[COLOR_kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
3329 var4 = var5;
3330 }
3331 var6 = !var4;
3332 var2 = var6;
3333 goto RET_LABEL3;
3334 RET_LABEL3:(void)0;
3335 }
3336 var1 = var2;
3337 }
3338 if (var1){
3339 {
3340 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
3341 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
3342 RET_LABEL7:(void)0;
3343 }
3344 }
3345 } else {
3346 }
3347 RET_LABEL:;
3348 }
3349 /* method parser_prod#AAnnotation#n_annotations= for (self: Object, nullable AAnnotations) */
3350 void VIRTUAL_parser_prod__AAnnotation__n_annotations_61d(val* self, val* p0) {
3351 parser_prod__AAnnotation__n_annotations_61d(self, p0); /* Direct call parser_prod#AAnnotation#n_annotations= on <self:Object(AAnnotation)>*/
3352 RET_LABEL:;
3353 }
3354 /* method parser_prod#AAnnotation#visit_all for (self: AAnnotation, Visitor) */
3355 void parser_prod__AAnnotation__visit_all(val* self, val* p0) {
3356 val* var_v /* var v: Visitor */;
3357 val* var /* : nullable ADoc */;
3358 val* var1 /* : nullable TKwredef */;
3359 val* var2 /* : nullable AVisibility */;
3360 val* var3 /* : AAtid */;
3361 val* var4 /* : nullable TOpar */;
3362 val* var5 /* : ANodes[AAtArg] */;
3363 val* var7 /* : ANodes[AAtArg] */;
3364 val* var8 /* : nullable TCpar */;
3365 val* var9 /* : nullable AAnnotations */;
3366 var_v = p0;
3367 var = self->attrs[COLOR_parser_nodes__AAnnotation___n_doc].val; /* _n_doc on <self:AAnnotation> */
3368 {
3369 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3370 }
3371 var1 = self->attrs[COLOR_parser_nodes__AAnnotation___n_kwredef].val; /* _n_kwredef on <self:AAnnotation> */
3372 {
3373 parser_nodes__Visitor__enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3374 }
3375 var2 = self->attrs[COLOR_parser_nodes__AAnnotation___n_visibility].val; /* _n_visibility on <self:AAnnotation> */
3376 {
3377 parser_nodes__Visitor__enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3378 }
3379 var3 = self->attrs[COLOR_parser_nodes__AAnnotation___n_atid].val; /* _n_atid on <self:AAnnotation> */
3380 if (unlikely(var3 == NULL)) {
3381 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_atid");
3382 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7701);
3383 show_backtrace(1);
3384 }
3385 {
3386 parser_nodes__Visitor__enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3387 }
3388 var4 = self->attrs[COLOR_parser_nodes__AAnnotation___n_opar].val; /* _n_opar on <self:AAnnotation> */
3389 {
3390 parser_nodes__Visitor__enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3391 }
3392 {
3393 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
3394 var7 = self->attrs[COLOR_parser_nodes__AAnnotation___n_args].val; /* _n_args on <self:AAnnotation> */
3395 if (unlikely(var7 == NULL)) {
3396 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
3397 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 2426);
3398 show_backtrace(1);
3399 }
3400 var5 = var7;
3401 RET_LABEL6:(void)0;
3402 }
3403 }
3404 {
3405 parser_nodes__ANodes__visit_all(var5, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var5:ANodes[AAtArg]>*/
3406 }
3407 var8 = self->attrs[COLOR_parser_nodes__AAnnotation___n_cpar].val; /* _n_cpar on <self:AAnnotation> */
3408 {
3409 parser_nodes__Visitor__enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3410 }
3411 var9 = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAnnotation> */
3412 {
3413 parser_nodes__Visitor__enter_visit(var_v, var9); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3414 }
3415 RET_LABEL:;
3416 }
3417 /* method parser_prod#AAnnotation#visit_all for (self: Object, Visitor) */
3418 void VIRTUAL_parser_prod__AAnnotation__visit_all(val* self, val* p0) {
3419 parser_prod__AAnnotation__visit_all(self, p0); /* Direct call parser_prod#AAnnotation#visit_all on <self:Object(AAnnotation)>*/
3420 RET_LABEL:;
3421 }
3422 /* method parser_prod#ATypeAtArg#init_atypeatarg for (self: ATypeAtArg, nullable AType) */
3423 void parser_prod__ATypeAtArg__init_atypeatarg(val* self, val* p0) {
3424 val* var_n_type /* var n_type: nullable AType */;
3425 var_n_type = p0;
3426 if (unlikely(var_n_type == NULL)) {
3427 PRINT_ERROR("Runtime error: %s", "Cast failed");
3428 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7713);
3429 show_backtrace(1);
3430 }
3431 self->attrs[COLOR_parser_nodes__ATypeAtArg___n_type].val = var_n_type; /* _n_type on <self:ATypeAtArg> */
3432 if (var_n_type == NULL) {
3433 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3434 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7714);
3435 show_backtrace(1);
3436 } else {
3437 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
3438 if (unlikely(var_n_type == NULL)) {
3439 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3440 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
3441 show_backtrace(1);
3442 }
3443 var_n_type->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
3444 RET_LABEL1:(void)0;
3445 }
3446 }
3447 RET_LABEL:;
3448 }
3449 /* method parser_prod#ATypeAtArg#init_atypeatarg for (self: Object, nullable AType) */
3450 void VIRTUAL_parser_prod__ATypeAtArg__init_atypeatarg(val* self, val* p0) {
3451 parser_prod__ATypeAtArg__init_atypeatarg(self, p0); /* Direct call parser_prod#ATypeAtArg#init_atypeatarg on <self:Object(ATypeAtArg)>*/
3452 RET_LABEL:;
3453 }
3454 /* method parser_prod#ATypeAtArg#replace_child for (self: ATypeAtArg, ANode, nullable ANode) */
3455 void parser_prod__ATypeAtArg__replace_child(val* self, val* p0, val* p1) {
3456 val* var_old_child /* var old_child: ANode */;
3457 val* var_new_child /* var new_child: nullable ANode */;
3458 val* var /* : AType */;
3459 short int var1 /* : Bool */;
3460 short int var2 /* : Bool */;
3461 val* var_other /* var other: nullable Object */;
3462 short int var4 /* : Bool */;
3463 short int var6 /* : Bool */;
3464 short int var7 /* : Bool */;
3465 int cltype;
3466 int idtype;
3467 const char* var_class_name;
3468 var_old_child = p0;
3469 var_new_child = p1;
3470 var = self->attrs[COLOR_parser_nodes__ATypeAtArg___n_type].val; /* _n_type on <self:ATypeAtArg> */
3471 if (unlikely(var == NULL)) {
3472 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
3473 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7719);
3474 show_backtrace(1);
3475 }
3476 {
3477 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
3478 var_other = var_old_child;
3479 {
3480 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
3481 var6 = var == var_other;
3482 var4 = var6;
3483 goto RET_LABEL5;
3484 RET_LABEL5:(void)0;
3485 }
3486 }
3487 var2 = var4;
3488 goto RET_LABEL3;
3489 RET_LABEL3:(void)0;
3490 }
3491 var1 = var2;
3492 }
3493 if (var1){
3494 /* <var_new_child:nullable ANode> isa AType */
3495 cltype = type_parser_nodes__AType.color;
3496 idtype = type_parser_nodes__AType.id;
3497 if(var_new_child == NULL) {
3498 var7 = 0;
3499 } else {
3500 if(cltype >= var_new_child->type->table_size) {
3501 var7 = 0;
3502 } else {
3503 var7 = var_new_child->type->type_table[cltype] == idtype;
3504 }
3505 }
3506 if (unlikely(!var7)) {
3507 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3508 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name);
3509 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7720);
3510 show_backtrace(1);
3511 }
3512 {
3513 parser_prod__ATypeAtArg__n_type_61d(self, var_new_child); /* Direct call parser_prod#ATypeAtArg#n_type= on <self:ATypeAtArg>*/
3514 }
3515 goto RET_LABEL;
3516 } else {
3517 }
3518 RET_LABEL:;
3519 }
3520 /* method parser_prod#ATypeAtArg#replace_child for (self: Object, ANode, nullable ANode) */
3521 void VIRTUAL_parser_prod__ATypeAtArg__replace_child(val* self, val* p0, val* p1) {
3522 parser_prod__ATypeAtArg__replace_child(self, p0, p1); /* Direct call parser_prod#ATypeAtArg#replace_child on <self:Object(ATypeAtArg)>*/
3523 RET_LABEL:;
3524 }
3525 /* method parser_prod#ATypeAtArg#n_type= for (self: ATypeAtArg, AType) */
3526 void parser_prod__ATypeAtArg__n_type_61d(val* self, val* p0) {
3527 val* var_node /* var node: AType */;
3528 var_node = p0;
3529 self->attrs[COLOR_parser_nodes__ATypeAtArg___n_type].val = var_node; /* _n_type on <self:ATypeAtArg> */
3530 {
3531 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
3532 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
3533 RET_LABEL1:(void)0;
3534 }
3535 }
3536 RET_LABEL:;
3537 }
3538 /* method parser_prod#ATypeAtArg#n_type= for (self: Object, AType) */
3539 void VIRTUAL_parser_prod__ATypeAtArg__n_type_61d(val* self, val* p0) {
3540 parser_prod__ATypeAtArg__n_type_61d(self, p0); /* Direct call parser_prod#ATypeAtArg#n_type= on <self:Object(ATypeAtArg)>*/
3541 RET_LABEL:;
3542 }
3543 /* method parser_prod#ATypeAtArg#visit_all for (self: ATypeAtArg, Visitor) */
3544 void parser_prod__ATypeAtArg__visit_all(val* self, val* p0) {
3545 val* var_v /* var v: Visitor */;
3546 val* var /* : AType */;
3547 var_v = p0;
3548 var = self->attrs[COLOR_parser_nodes__ATypeAtArg___n_type].val; /* _n_type on <self:ATypeAtArg> */
3549 if (unlikely(var == NULL)) {
3550 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
3551 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7734);
3552 show_backtrace(1);
3553 }
3554 {
3555 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3556 }
3557 RET_LABEL:;
3558 }
3559 /* method parser_prod#ATypeAtArg#visit_all for (self: Object, Visitor) */
3560 void VIRTUAL_parser_prod__ATypeAtArg__visit_all(val* self, val* p0) {
3561 parser_prod__ATypeAtArg__visit_all(self, p0); /* Direct call parser_prod#ATypeAtArg#visit_all on <self:Object(ATypeAtArg)>*/
3562 RET_LABEL:;
3563 }
3564 /* method parser_prod#AExprAtArg#init_aexpratarg for (self: AExprAtArg, nullable AExpr) */
3565 void parser_prod__AExprAtArg__init_aexpratarg(val* self, val* p0) {
3566 val* var_n_expr /* var n_expr: nullable AExpr */;
3567 var_n_expr = p0;
3568 if (unlikely(var_n_expr == NULL)) {
3569 PRINT_ERROR("Runtime error: %s", "Cast failed");
3570 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7742);
3571 show_backtrace(1);
3572 }
3573 self->attrs[COLOR_parser_nodes__AExprAtArg___n_expr].val = var_n_expr; /* _n_expr on <self:AExprAtArg> */
3574 if (var_n_expr == NULL) {
3575 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3576 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7743);
3577 show_backtrace(1);
3578 } else {
3579 { /* Inline parser_nodes#ANode#parent= (var_n_expr,self) on <var_n_expr:nullable AExpr> */
3580 if (unlikely(var_n_expr == NULL)) {
3581 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3582 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
3583 show_backtrace(1);
3584 }
3585 var_n_expr->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_expr:nullable AExpr> */
3586 RET_LABEL1:(void)0;
3587 }
3588 }
3589 RET_LABEL:;
3590 }
3591 /* method parser_prod#AExprAtArg#init_aexpratarg for (self: Object, nullable AExpr) */
3592 void VIRTUAL_parser_prod__AExprAtArg__init_aexpratarg(val* self, val* p0) {
3593 parser_prod__AExprAtArg__init_aexpratarg(self, p0); /* Direct call parser_prod#AExprAtArg#init_aexpratarg on <self:Object(AExprAtArg)>*/
3594 RET_LABEL:;
3595 }
3596 /* method parser_prod#AExprAtArg#replace_child for (self: AExprAtArg, ANode, nullable ANode) */
3597 void parser_prod__AExprAtArg__replace_child(val* self, val* p0, val* p1) {
3598 val* var_old_child /* var old_child: ANode */;
3599 val* var_new_child /* var new_child: nullable ANode */;
3600 val* var /* : AExpr */;
3601 short int var1 /* : Bool */;
3602 short int var2 /* : Bool */;
3603 val* var_other /* var other: nullable Object */;
3604 short int var4 /* : Bool */;
3605 short int var6 /* : Bool */;
3606 short int var7 /* : Bool */;
3607 int cltype;
3608 int idtype;
3609 const char* var_class_name;
3610 var_old_child = p0;
3611 var_new_child = p1;
3612 var = self->attrs[COLOR_parser_nodes__AExprAtArg___n_expr].val; /* _n_expr on <self:AExprAtArg> */
3613 if (unlikely(var == NULL)) {
3614 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
3615 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7748);
3616 show_backtrace(1);
3617 }
3618 {
3619 { /* Inline kernel#Object#== (var,var_old_child) on <var:AExpr> */
3620 var_other = var_old_child;
3621 {
3622 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AExpr> */
3623 var6 = var == var_other;
3624 var4 = var6;
3625 goto RET_LABEL5;
3626 RET_LABEL5:(void)0;
3627 }
3628 }
3629 var2 = var4;
3630 goto RET_LABEL3;
3631 RET_LABEL3:(void)0;
3632 }
3633 var1 = var2;
3634 }
3635 if (var1){
3636 /* <var_new_child:nullable ANode> isa AExpr */
3637 cltype = type_parser_nodes__AExpr.color;
3638 idtype = type_parser_nodes__AExpr.id;
3639 if(var_new_child == NULL) {
3640 var7 = 0;
3641 } else {
3642 if(cltype >= var_new_child->type->table_size) {
3643 var7 = 0;
3644 } else {
3645 var7 = var_new_child->type->type_table[cltype] == idtype;
3646 }
3647 }
3648 if (unlikely(!var7)) {
3649 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3650 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AExpr", var_class_name);
3651 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7749);
3652 show_backtrace(1);
3653 }
3654 {
3655 parser_prod__AExprAtArg__n_expr_61d(self, var_new_child); /* Direct call parser_prod#AExprAtArg#n_expr= on <self:AExprAtArg>*/
3656 }
3657 goto RET_LABEL;
3658 } else {
3659 }
3660 RET_LABEL:;
3661 }
3662 /* method parser_prod#AExprAtArg#replace_child for (self: Object, ANode, nullable ANode) */
3663 void VIRTUAL_parser_prod__AExprAtArg__replace_child(val* self, val* p0, val* p1) {
3664 parser_prod__AExprAtArg__replace_child(self, p0, p1); /* Direct call parser_prod#AExprAtArg#replace_child on <self:Object(AExprAtArg)>*/
3665 RET_LABEL:;
3666 }
3667 /* method parser_prod#AExprAtArg#n_expr= for (self: AExprAtArg, AExpr) */
3668 void parser_prod__AExprAtArg__n_expr_61d(val* self, val* p0) {
3669 val* var_node /* var node: AExpr */;
3670 var_node = p0;
3671 self->attrs[COLOR_parser_nodes__AExprAtArg___n_expr].val = var_node; /* _n_expr on <self:AExprAtArg> */
3672 {
3673 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AExpr> */
3674 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AExpr> */
3675 RET_LABEL1:(void)0;
3676 }
3677 }
3678 RET_LABEL:;
3679 }
3680 /* method parser_prod#AExprAtArg#n_expr= for (self: Object, AExpr) */
3681 void VIRTUAL_parser_prod__AExprAtArg__n_expr_61d(val* self, val* p0) {
3682 parser_prod__AExprAtArg__n_expr_61d(self, p0); /* Direct call parser_prod#AExprAtArg#n_expr= on <self:Object(AExprAtArg)>*/
3683 RET_LABEL:;
3684 }
3685 /* method parser_prod#AExprAtArg#visit_all for (self: AExprAtArg, Visitor) */
3686 void parser_prod__AExprAtArg__visit_all(val* self, val* p0) {
3687 val* var_v /* var v: Visitor */;
3688 val* var /* : AExpr */;
3689 var_v = p0;
3690 var = self->attrs[COLOR_parser_nodes__AExprAtArg___n_expr].val; /* _n_expr on <self:AExprAtArg> */
3691 if (unlikely(var == NULL)) {
3692 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_expr");
3693 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7763);
3694 show_backtrace(1);
3695 }
3696 {
3697 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3698 }
3699 RET_LABEL:;
3700 }
3701 /* method parser_prod#AExprAtArg#visit_all for (self: Object, Visitor) */
3702 void VIRTUAL_parser_prod__AExprAtArg__visit_all(val* self, val* p0) {
3703 parser_prod__AExprAtArg__visit_all(self, p0); /* Direct call parser_prod#AExprAtArg#visit_all on <self:Object(AExprAtArg)>*/
3704 RET_LABEL:;
3705 }
3706 /* method parser_prod#AAtAtArg#init_aatatarg for (self: AAtAtArg, nullable AAnnotations) */
3707 void parser_prod__AAtAtArg__init_aatatarg(val* self, val* p0) {
3708 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
3709 var_n_annotations = p0;
3710 if (unlikely(var_n_annotations == NULL)) {
3711 PRINT_ERROR("Runtime error: %s", "Cast failed");
3712 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7771);
3713 show_backtrace(1);
3714 }
3715 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AAtAtArg> */
3716 if (var_n_annotations == NULL) {
3717 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3718 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7772);
3719 show_backtrace(1);
3720 } else {
3721 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations> */
3722 if (unlikely(var_n_annotations == NULL)) {
3723 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3724 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
3725 show_backtrace(1);
3726 }
3727 var_n_annotations->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations> */
3728 RET_LABEL1:(void)0;
3729 }
3730 }
3731 RET_LABEL:;
3732 }
3733 /* method parser_prod#AAtAtArg#init_aatatarg for (self: Object, nullable AAnnotations) */
3734 void VIRTUAL_parser_prod__AAtAtArg__init_aatatarg(val* self, val* p0) {
3735 parser_prod__AAtAtArg__init_aatatarg(self, p0); /* Direct call parser_prod#AAtAtArg#init_aatatarg on <self:Object(AAtAtArg)>*/
3736 RET_LABEL:;
3737 }
3738 /* method parser_prod#AAtAtArg#replace_child for (self: AAtAtArg, ANode, nullable ANode) */
3739 void parser_prod__AAtAtArg__replace_child(val* self, val* p0, val* p1) {
3740 val* var_old_child /* var old_child: ANode */;
3741 val* var_new_child /* var new_child: nullable ANode */;
3742 val* var /* : nullable AAnnotations */;
3743 short int var1 /* : Bool */;
3744 short int var2 /* : Bool */;
3745 val* var_other /* var other: nullable Object */;
3746 short int var4 /* : Bool */;
3747 short int var6 /* : Bool */;
3748 short int var7 /* : Bool */;
3749 int cltype;
3750 int idtype;
3751 const char* var_class_name;
3752 var_old_child = p0;
3753 var_new_child = p1;
3754 var = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAtAtArg> */
3755 if (var == NULL) {
3756 var1 = 0; /* <var_old_child:ANode> cannot be null */
3757 } else {
3758 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AAnnotations> */
3759 var_other = var_old_child;
3760 {
3761 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AAnnotations(AAnnotations)> */
3762 var6 = var == var_other;
3763 var4 = var6;
3764 goto RET_LABEL5;
3765 RET_LABEL5:(void)0;
3766 }
3767 }
3768 var2 = var4;
3769 goto RET_LABEL3;
3770 RET_LABEL3:(void)0;
3771 }
3772 var1 = var2;
3773 }
3774 if (var1){
3775 /* <var_new_child:nullable ANode> isa AAnnotations */
3776 cltype = type_parser_nodes__AAnnotations.color;
3777 idtype = type_parser_nodes__AAnnotations.id;
3778 if(var_new_child == NULL) {
3779 var7 = 0;
3780 } else {
3781 if(cltype >= var_new_child->type->table_size) {
3782 var7 = 0;
3783 } else {
3784 var7 = var_new_child->type->type_table[cltype] == idtype;
3785 }
3786 }
3787 if (unlikely(!var7)) {
3788 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3789 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AAnnotations", var_class_name);
3790 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7778);
3791 show_backtrace(1);
3792 }
3793 {
3794 parser_prod__AAtAtArg__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AAtAtArg#n_annotations= on <self:AAtAtArg>*/
3795 }
3796 goto RET_LABEL;
3797 } else {
3798 }
3799 RET_LABEL:;
3800 }
3801 /* method parser_prod#AAtAtArg#replace_child for (self: Object, ANode, nullable ANode) */
3802 void VIRTUAL_parser_prod__AAtAtArg__replace_child(val* self, val* p0, val* p1) {
3803 parser_prod__AAtAtArg__replace_child(self, p0, p1); /* Direct call parser_prod#AAtAtArg#replace_child on <self:Object(AAtAtArg)>*/
3804 RET_LABEL:;
3805 }
3806 /* method parser_prod#AAtAtArg#n_annotations= for (self: AAtAtArg, nullable AAnnotations) */
3807 void parser_prod__AAtAtArg__n_annotations_61d(val* self, val* p0) {
3808 val* var_node /* var node: nullable AAnnotations */;
3809 var_node = p0;
3810 self->attrs[COLOR_parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AAtAtArg> */
3811 if (var_node == NULL) {
3812 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3813 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7786);
3814 show_backtrace(1);
3815 } else {
3816 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations> */
3817 if (unlikely(var_node == NULL)) {
3818 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3819 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
3820 show_backtrace(1);
3821 }
3822 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations> */
3823 RET_LABEL1:(void)0;
3824 }
3825 }
3826 RET_LABEL:;
3827 }
3828 /* method parser_prod#AAtAtArg#n_annotations= for (self: Object, nullable AAnnotations) */
3829 void VIRTUAL_parser_prod__AAtAtArg__n_annotations_61d(val* self, val* p0) {
3830 parser_prod__AAtAtArg__n_annotations_61d(self, p0); /* Direct call parser_prod#AAtAtArg#n_annotations= on <self:Object(AAtAtArg)>*/
3831 RET_LABEL:;
3832 }
3833 /* method parser_prod#AAtAtArg#visit_all for (self: AAtAtArg, Visitor) */
3834 void parser_prod__AAtAtArg__visit_all(val* self, val* p0) {
3835 val* var_v /* var v: Visitor */;
3836 val* var /* : nullable AAnnotations */;
3837 var_v = p0;
3838 var = self->attrs[COLOR_parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAtAtArg> */
3839 {
3840 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3841 }
3842 RET_LABEL:;
3843 }
3844 /* method parser_prod#AAtAtArg#visit_all for (self: Object, Visitor) */
3845 void VIRTUAL_parser_prod__AAtAtArg__visit_all(val* self, val* p0) {
3846 parser_prod__AAtAtArg__visit_all(self, p0); /* Direct call parser_prod#AAtAtArg#visit_all on <self:Object(AAtAtArg)>*/
3847 RET_LABEL:;
3848 }
3849 /* method parser_prod#AIdAtid#init_aidatid for (self: AIdAtid, nullable TId) */
3850 void parser_prod__AIdAtid__init_aidatid(val* self, val* p0) {
3851 val* var_n_id /* var n_id: nullable TId */;
3852 var_n_id = p0;
3853 if (unlikely(var_n_id == NULL)) {
3854 PRINT_ERROR("Runtime error: %s", "Cast failed");
3855 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7800);
3856 show_backtrace(1);
3857 }
3858 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_n_id; /* _n_id on <self:AIdAtid> */
3859 if (var_n_id == NULL) {
3860 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3861 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7801);
3862 show_backtrace(1);
3863 } else {
3864 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TId> */
3865 if (unlikely(var_n_id == NULL)) {
3866 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3867 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
3868 show_backtrace(1);
3869 }
3870 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TId> */
3871 RET_LABEL1:(void)0;
3872 }
3873 }
3874 RET_LABEL:;
3875 }
3876 /* method parser_prod#AIdAtid#init_aidatid for (self: Object, nullable TId) */
3877 void VIRTUAL_parser_prod__AIdAtid__init_aidatid(val* self, val* p0) {
3878 parser_prod__AIdAtid__init_aidatid(self, p0); /* Direct call parser_prod#AIdAtid#init_aidatid on <self:Object(AIdAtid)>*/
3879 RET_LABEL:;
3880 }
3881 /* method parser_prod#AIdAtid#replace_child for (self: AIdAtid, ANode, nullable ANode) */
3882 void parser_prod__AIdAtid__replace_child(val* self, val* p0, val* p1) {
3883 val* var_old_child /* var old_child: ANode */;
3884 val* var_new_child /* var new_child: nullable ANode */;
3885 val* var /* : Token */;
3886 short int var1 /* : Bool */;
3887 short int var2 /* : Bool */;
3888 val* var_other /* var other: nullable Object */;
3889 short int var4 /* : Bool */;
3890 short int var6 /* : Bool */;
3891 short int var7 /* : Bool */;
3892 int cltype;
3893 int idtype;
3894 const char* var_class_name;
3895 var_old_child = p0;
3896 var_new_child = p1;
3897 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AIdAtid> */
3898 if (unlikely(var == NULL)) {
3899 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3900 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7806);
3901 show_backtrace(1);
3902 }
3903 {
3904 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
3905 var_other = var_old_child;
3906 {
3907 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
3908 var6 = var == var_other;
3909 var4 = var6;
3910 goto RET_LABEL5;
3911 RET_LABEL5:(void)0;
3912 }
3913 }
3914 var2 = var4;
3915 goto RET_LABEL3;
3916 RET_LABEL3:(void)0;
3917 }
3918 var1 = var2;
3919 }
3920 if (var1){
3921 /* <var_new_child:nullable ANode> isa TId */
3922 cltype = type_parser_nodes__TId.color;
3923 idtype = type_parser_nodes__TId.id;
3924 if(var_new_child == NULL) {
3925 var7 = 0;
3926 } else {
3927 if(cltype >= var_new_child->type->table_size) {
3928 var7 = 0;
3929 } else {
3930 var7 = var_new_child->type->type_table[cltype] == idtype;
3931 }
3932 }
3933 if (unlikely(!var7)) {
3934 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3935 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TId", var_class_name);
3936 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7807);
3937 show_backtrace(1);
3938 }
3939 {
3940 parser_prod__AIdAtid__n_id_61d(self, var_new_child); /* Direct call parser_prod#AIdAtid#n_id= on <self:AIdAtid>*/
3941 }
3942 goto RET_LABEL;
3943 } else {
3944 }
3945 RET_LABEL:;
3946 }
3947 /* method parser_prod#AIdAtid#replace_child for (self: Object, ANode, nullable ANode) */
3948 void VIRTUAL_parser_prod__AIdAtid__replace_child(val* self, val* p0, val* p1) {
3949 parser_prod__AIdAtid__replace_child(self, p0, p1); /* Direct call parser_prod#AIdAtid#replace_child on <self:Object(AIdAtid)>*/
3950 RET_LABEL:;
3951 }
3952 /* method parser_prod#AIdAtid#n_id= for (self: AIdAtid, Token) */
3953 void parser_prod__AIdAtid__n_id_61d(val* self, val* p0) {
3954 val* var_node /* var node: Token */;
3955 var_node = p0;
3956 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_node; /* _n_id on <self:AIdAtid> */
3957 {
3958 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
3959 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:Token> */
3960 RET_LABEL1:(void)0;
3961 }
3962 }
3963 RET_LABEL:;
3964 }
3965 /* method parser_prod#AIdAtid#n_id= for (self: Object, Token) */
3966 void VIRTUAL_parser_prod__AIdAtid__n_id_61d(val* self, val* p0) {
3967 parser_prod__AIdAtid__n_id_61d(self, p0); /* Direct call parser_prod#AIdAtid#n_id= on <self:Object(AIdAtid)>*/
3968 RET_LABEL:;
3969 }
3970 /* method parser_prod#AIdAtid#visit_all for (self: AIdAtid, Visitor) */
3971 void parser_prod__AIdAtid__visit_all(val* self, val* p0) {
3972 val* var_v /* var v: Visitor */;
3973 val* var /* : Token */;
3974 var_v = p0;
3975 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AIdAtid> */
3976 if (unlikely(var == NULL)) {
3977 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3978 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7821);
3979 show_backtrace(1);
3980 }
3981 {
3982 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3983 }
3984 RET_LABEL:;
3985 }
3986 /* method parser_prod#AIdAtid#visit_all for (self: Object, Visitor) */
3987 void VIRTUAL_parser_prod__AIdAtid__visit_all(val* self, val* p0) {
3988 parser_prod__AIdAtid__visit_all(self, p0); /* Direct call parser_prod#AIdAtid#visit_all on <self:Object(AIdAtid)>*/
3989 RET_LABEL:;
3990 }
3991 /* method parser_prod#AKwreadableAtid#init_akwreadableatid for (self: AKwreadableAtid, nullable TKwreadable) */
3992 void parser_prod__AKwreadableAtid__init_akwreadableatid(val* self, val* p0) {
3993 val* var_n_id /* var n_id: nullable TKwreadable */;
3994 var_n_id = p0;
3995 if (unlikely(var_n_id == NULL)) {
3996 PRINT_ERROR("Runtime error: %s", "Cast failed");
3997 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7887);
3998 show_backtrace(1);
3999 }
4000 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_n_id; /* _n_id on <self:AKwreadableAtid> */
4001 if (var_n_id == NULL) {
4002 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4003 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7888);
4004 show_backtrace(1);
4005 } else {
4006 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TKwreadable> */
4007 if (unlikely(var_n_id == NULL)) {
4008 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4009 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
4010 show_backtrace(1);
4011 }
4012 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TKwreadable> */
4013 RET_LABEL1:(void)0;
4014 }
4015 }
4016 RET_LABEL:;
4017 }
4018 /* method parser_prod#AKwreadableAtid#init_akwreadableatid for (self: Object, nullable TKwreadable) */
4019 void VIRTUAL_parser_prod__AKwreadableAtid__init_akwreadableatid(val* self, val* p0) {
4020 parser_prod__AKwreadableAtid__init_akwreadableatid(self, p0); /* Direct call parser_prod#AKwreadableAtid#init_akwreadableatid on <self:Object(AKwreadableAtid)>*/
4021 RET_LABEL:;
4022 }
4023 /* method parser_prod#AKwreadableAtid#replace_child for (self: AKwreadableAtid, ANode, nullable ANode) */
4024 void parser_prod__AKwreadableAtid__replace_child(val* self, val* p0, val* p1) {
4025 val* var_old_child /* var old_child: ANode */;
4026 val* var_new_child /* var new_child: nullable ANode */;
4027 val* var /* : Token */;
4028 short int var1 /* : Bool */;
4029 short int var2 /* : Bool */;
4030 val* var_other /* var other: nullable Object */;
4031 short int var4 /* : Bool */;
4032 short int var6 /* : Bool */;
4033 short int var7 /* : Bool */;
4034 int cltype;
4035 int idtype;
4036 const char* var_class_name;
4037 var_old_child = p0;
4038 var_new_child = p1;
4039 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AKwreadableAtid> */
4040 if (unlikely(var == NULL)) {
4041 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4042 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7893);
4043 show_backtrace(1);
4044 }
4045 {
4046 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
4047 var_other = var_old_child;
4048 {
4049 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
4050 var6 = var == var_other;
4051 var4 = var6;
4052 goto RET_LABEL5;
4053 RET_LABEL5:(void)0;
4054 }
4055 }
4056 var2 = var4;
4057 goto RET_LABEL3;
4058 RET_LABEL3:(void)0;
4059 }
4060 var1 = var2;
4061 }
4062 if (var1){
4063 /* <var_new_child:nullable ANode> isa TKwreadable */
4064 cltype = type_parser_nodes__TKwreadable.color;
4065 idtype = type_parser_nodes__TKwreadable.id;
4066 if(var_new_child == NULL) {
4067 var7 = 0;
4068 } else {
4069 if(cltype >= var_new_child->type->table_size) {
4070 var7 = 0;
4071 } else {
4072 var7 = var_new_child->type->type_table[cltype] == idtype;
4073 }
4074 }
4075 if (unlikely(!var7)) {
4076 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4077 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwreadable", var_class_name);
4078 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7894);
4079 show_backtrace(1);
4080 }
4081 {
4082 parser_prod__AKwreadableAtid__n_id_61d(self, var_new_child); /* Direct call parser_prod#AKwreadableAtid#n_id= on <self:AKwreadableAtid>*/
4083 }
4084 goto RET_LABEL;
4085 } else {
4086 }
4087 RET_LABEL:;
4088 }
4089 /* method parser_prod#AKwreadableAtid#replace_child for (self: Object, ANode, nullable ANode) */
4090 void VIRTUAL_parser_prod__AKwreadableAtid__replace_child(val* self, val* p0, val* p1) {
4091 parser_prod__AKwreadableAtid__replace_child(self, p0, p1); /* Direct call parser_prod#AKwreadableAtid#replace_child on <self:Object(AKwreadableAtid)>*/
4092 RET_LABEL:;
4093 }
4094 /* method parser_prod#AKwreadableAtid#n_id= for (self: AKwreadableAtid, Token) */
4095 void parser_prod__AKwreadableAtid__n_id_61d(val* self, val* p0) {
4096 val* var_node /* var node: Token */;
4097 var_node = p0;
4098 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_node; /* _n_id on <self:AKwreadableAtid> */
4099 {
4100 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
4101 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:Token> */
4102 RET_LABEL1:(void)0;
4103 }
4104 }
4105 RET_LABEL:;
4106 }
4107 /* method parser_prod#AKwreadableAtid#n_id= for (self: Object, Token) */
4108 void VIRTUAL_parser_prod__AKwreadableAtid__n_id_61d(val* self, val* p0) {
4109 parser_prod__AKwreadableAtid__n_id_61d(self, p0); /* Direct call parser_prod#AKwreadableAtid#n_id= on <self:Object(AKwreadableAtid)>*/
4110 RET_LABEL:;
4111 }
4112 /* method parser_prod#AKwreadableAtid#visit_all for (self: AKwreadableAtid, Visitor) */
4113 void parser_prod__AKwreadableAtid__visit_all(val* self, val* p0) {
4114 val* var_v /* var v: Visitor */;
4115 val* var /* : Token */;
4116 var_v = p0;
4117 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AKwreadableAtid> */
4118 if (unlikely(var == NULL)) {
4119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4120 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7908);
4121 show_backtrace(1);
4122 }
4123 {
4124 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4125 }
4126 RET_LABEL:;
4127 }
4128 /* method parser_prod#AKwreadableAtid#visit_all for (self: Object, Visitor) */
4129 void VIRTUAL_parser_prod__AKwreadableAtid__visit_all(val* self, val* p0) {
4130 parser_prod__AKwreadableAtid__visit_all(self, p0); /* Direct call parser_prod#AKwreadableAtid#visit_all on <self:Object(AKwreadableAtid)>*/
4131 RET_LABEL:;
4132 }
4133 /* method parser_prod#AKwwritableAtid#init_akwwritableatid for (self: AKwwritableAtid, nullable TKwwritable) */
4134 void parser_prod__AKwwritableAtid__init_akwwritableatid(val* self, val* p0) {
4135 val* var_n_id /* var n_id: nullable TKwwritable */;
4136 var_n_id = p0;
4137 if (unlikely(var_n_id == NULL)) {
4138 PRINT_ERROR("Runtime error: %s", "Cast failed");
4139 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7916);
4140 show_backtrace(1);
4141 }
4142 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_n_id; /* _n_id on <self:AKwwritableAtid> */
4143 if (var_n_id == NULL) {
4144 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4145 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7917);
4146 show_backtrace(1);
4147 } else {
4148 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TKwwritable> */
4149 if (unlikely(var_n_id == NULL)) {
4150 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4151 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_nodes.nit", 38);
4152 show_backtrace(1);
4153 }
4154 var_n_id->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TKwwritable> */
4155 RET_LABEL1:(void)0;
4156 }
4157 }
4158 RET_LABEL:;
4159 }
4160 /* method parser_prod#AKwwritableAtid#init_akwwritableatid for (self: Object, nullable TKwwritable) */
4161 void VIRTUAL_parser_prod__AKwwritableAtid__init_akwwritableatid(val* self, val* p0) {
4162 parser_prod__AKwwritableAtid__init_akwwritableatid(self, p0); /* Direct call parser_prod#AKwwritableAtid#init_akwwritableatid on <self:Object(AKwwritableAtid)>*/
4163 RET_LABEL:;
4164 }
4165 /* method parser_prod#AKwwritableAtid#replace_child for (self: AKwwritableAtid, ANode, nullable ANode) */
4166 void parser_prod__AKwwritableAtid__replace_child(val* self, val* p0, val* p1) {
4167 val* var_old_child /* var old_child: ANode */;
4168 val* var_new_child /* var new_child: nullable ANode */;
4169 val* var /* : Token */;
4170 short int var1 /* : Bool */;
4171 short int var2 /* : Bool */;
4172 val* var_other /* var other: nullable Object */;
4173 short int var4 /* : Bool */;
4174 short int var6 /* : Bool */;
4175 short int var7 /* : Bool */;
4176 int cltype;
4177 int idtype;
4178 const char* var_class_name;
4179 var_old_child = p0;
4180 var_new_child = p1;
4181 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AKwwritableAtid> */
4182 if (unlikely(var == NULL)) {
4183 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4184 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7922);
4185 show_backtrace(1);
4186 }
4187 {
4188 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
4189 var_other = var_old_child;
4190 {
4191 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
4192 var6 = var == var_other;
4193 var4 = var6;
4194 goto RET_LABEL5;
4195 RET_LABEL5:(void)0;
4196 }
4197 }
4198 var2 = var4;
4199 goto RET_LABEL3;
4200 RET_LABEL3:(void)0;
4201 }
4202 var1 = var2;
4203 }
4204 if (var1){
4205 /* <var_new_child:nullable ANode> isa TKwwritable */
4206 cltype = type_parser_nodes__TKwwritable.color;
4207 idtype = type_parser_nodes__TKwwritable.id;
4208 if(var_new_child == NULL) {
4209 var7 = 0;
4210 } else {
4211 if(cltype >= var_new_child->type->table_size) {
4212 var7 = 0;
4213 } else {
4214 var7 = var_new_child->type->type_table[cltype] == idtype;
4215 }
4216 }
4217 if (unlikely(!var7)) {
4218 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4219 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwwritable", var_class_name);
4220 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7923);
4221 show_backtrace(1);
4222 }
4223 {
4224 parser_prod__AKwwritableAtid__n_id_61d(self, var_new_child); /* Direct call parser_prod#AKwwritableAtid#n_id= on <self:AKwwritableAtid>*/
4225 }
4226 goto RET_LABEL;
4227 } else {
4228 }
4229 RET_LABEL:;
4230 }
4231 /* method parser_prod#AKwwritableAtid#replace_child for (self: Object, ANode, nullable ANode) */
4232 void VIRTUAL_parser_prod__AKwwritableAtid__replace_child(val* self, val* p0, val* p1) {
4233 parser_prod__AKwwritableAtid__replace_child(self, p0, p1); /* Direct call parser_prod#AKwwritableAtid#replace_child on <self:Object(AKwwritableAtid)>*/
4234 RET_LABEL:;
4235 }
4236 /* method parser_prod#AKwwritableAtid#n_id= for (self: AKwwritableAtid, Token) */
4237 void parser_prod__AKwwritableAtid__n_id_61d(val* self, val* p0) {
4238 val* var_node /* var node: Token */;
4239 var_node = p0;
4240 self->attrs[COLOR_parser_nodes__AAtid___n_id].val = var_node; /* _n_id on <self:AKwwritableAtid> */
4241 {
4242 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
4243 var_node->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_node:Token> */
4244 RET_LABEL1:(void)0;
4245 }
4246 }
4247 RET_LABEL:;
4248 }
4249 /* method parser_prod#AKwwritableAtid#n_id= for (self: Object, Token) */
4250 void VIRTUAL_parser_prod__AKwwritableAtid__n_id_61d(val* self, val* p0) {
4251 parser_prod__AKwwritableAtid__n_id_61d(self, p0); /* Direct call parser_prod#AKwwritableAtid#n_id= on <self:Object(AKwwritableAtid)>*/
4252 RET_LABEL:;
4253 }
4254 /* method parser_prod#AKwwritableAtid#visit_all for (self: AKwwritableAtid, Visitor) */
4255 void parser_prod__AKwwritableAtid__visit_all(val* self, val* p0) {
4256 val* var_v /* var v: Visitor */;
4257 val* var /* : Token */;
4258 var_v = p0;
4259 var = self->attrs[COLOR_parser_nodes__AAtid___n_id].val; /* _n_id on <self:AKwwritableAtid> */
4260 if (unlikely(var == NULL)) {
4261 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4262 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7937);
4263 show_backtrace(1);
4264 }
4265 {
4266 parser_nodes__Visitor__enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4267 }
4268 RET_LABEL:;
4269 }
4270 /* method parser_prod#AKwwritableAtid#visit_all for (self: Object, Visitor) */
4271 void VIRTUAL_parser_prod__AKwwritableAtid__visit_all(val* self, val* p0) {
4272 parser_prod__AKwwritableAtid__visit_all(self, p0); /* Direct call parser_prod#AKwwritableAtid#visit_all on <self:Object(AKwwritableAtid)>*/
4273 RET_LABEL:;
4274 }
4275 /* method parser_prod#Start#replace_child for (self: Start, ANode, nullable ANode) */
4276 void parser_prod__Start__replace_child(val* self, val* p0, val* p1) {
4277 val* var_old_child /* var old_child: ANode */;
4278 val* var_new_child /* var new_child: nullable ANode */;
4279 val* var /* : nullable AModule */;
4280 short int var1 /* : Bool */;
4281 short int var2 /* : Bool */;
4282 val* var_other /* var other: nullable Object */;
4283 short int var4 /* : Bool */;
4284 short int var6 /* : Bool */;
4285 val* var7 /* : null */;
4286 short int var8 /* : Bool */;
4287 short int var9 /* : Bool */;
4288 short int var11 /* : Bool */;
4289 short int var13 /* : Bool */;
4290 short int var15 /* : Bool */;
4291 int cltype;
4292 int idtype;
4293 val* var16 /* : null */;
4294 var_old_child = p0;
4295 var_new_child = p1;
4296 var = self->attrs[COLOR_parser_nodes__Start___n_base].val; /* _n_base on <self:Start> */
4297 if (var == NULL) {
4298 var1 = 0; /* <var_old_child:ANode> cannot be null */
4299 } else {
4300 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AModule> */
4301 var_other = var_old_child;
4302 {
4303 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AModule(AModule)> */
4304 var6 = var == var_other;
4305 var4 = var6;
4306 goto RET_LABEL5;
4307 RET_LABEL5:(void)0;
4308 }
4309 }
4310 var2 = var4;
4311 goto RET_LABEL3;
4312 RET_LABEL3:(void)0;
4313 }
4314 var1 = var2;
4315 }
4316 if (var1){
4317 var7 = NULL;
4318 if (var_new_child == NULL) {
4319 var8 = 1; /* is null */
4320 } else {
4321 var8 = 0; /* arg is null but recv is not */
4322 }
4323 if (0) {
4324 { /* Inline kernel#Object#== (var_new_child,var7) on <var_new_child:nullable ANode> */
4325 var_other = var7;
4326 {
4327 { /* Inline kernel#Object#is_same_instance (var_new_child,var_other) on <var_new_child:nullable ANode(ANode)> */
4328 var13 = var_new_child == var_other;
4329 var11 = var13;
4330 goto RET_LABEL12;
4331 RET_LABEL12:(void)0;
4332 }
4333 }
4334 var9 = var11;
4335 goto RET_LABEL10;
4336 RET_LABEL10:(void)0;
4337 }
4338 var8 = var9;
4339 }
4340 if (var8){
4341 } else {
4342 {
4343 { /* Inline parser_nodes#ANode#parent= (var_new_child,self) on <var_new_child:nullable ANode(ANode)> */
4344 var_new_child->attrs[COLOR_parser_nodes__ANode___parent].val = self; /* _parent on <var_new_child:nullable ANode(ANode)> */
4345 RET_LABEL14:(void)0;
4346 }
4347 }
4348 /* <var_new_child:nullable ANode(ANode)> isa AModule */
4349 cltype = type_parser_nodes__AModule.color;
4350 idtype = type_parser_nodes__AModule.id;
4351 if(cltype >= var_new_child->type->table_size) {
4352 var15 = 0;
4353 } else {
4354 var15 = var_new_child->type->type_table[cltype] == idtype;
4355 }
4356 if (unlikely(!var15)) {
4357 PRINT_ERROR("Runtime error: %s", "Assert failed");
4358 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7977);
4359 show_backtrace(1);
4360 }
4361 self->attrs[COLOR_parser_nodes__Start___n_base].val = var_new_child; /* _n_base on <self:Start> */
4362 }
4363 var16 = NULL;
4364 {
4365 { /* Inline parser_nodes#ANode#parent= (var_old_child,var16) on <var_old_child:ANode> */
4366 var_old_child->attrs[COLOR_parser_nodes__ANode___parent].val = var16; /* _parent on <var_old_child:ANode> */
4367 RET_LABEL17:(void)0;
4368 }
4369 }
4370 goto RET_LABEL;
4371 } else {
4372 }
4373 RET_LABEL:;
4374 }
4375 /* method parser_prod#Start#replace_child for (self: Object, ANode, nullable ANode) */
4376 void VIRTUAL_parser_prod__Start__replace_child(val* self, val* p0, val* p1) {
4377 parser_prod__Start__replace_child(self, p0, p1); /* Direct call parser_prod#Start#replace_child on <self:Object(Start)>*/
4378 RET_LABEL:;
4379 }
4380 /* method parser_prod#Start#visit_all for (self: Start, Visitor) */
4381 void parser_prod__Start__visit_all(val* self, val* p0) {
4382 val* var_v /* var v: Visitor */;
4383 val* var /* : nullable AModule */;
4384 val* var1 /* : null */;
4385 short int var2 /* : Bool */;
4386 short int var3 /* : Bool */;
4387 val* var_other /* var other: nullable Object */;
4388 short int var5 /* : Bool */;
4389 short int var6 /* : Bool */;
4390 short int var7 /* : Bool */;
4391 val* var8 /* : nullable AModule */;
4392 val* var9 /* : EOF */;
4393 var_v = p0;
4394 var = self->attrs[COLOR_parser_nodes__Start___n_base].val; /* _n_base on <self:Start> */
4395 var1 = NULL;
4396 if (var == NULL) {
4397 var2 = 0; /* is null */
4398 } else {
4399 var2 = 1; /* arg is null and recv is not */
4400 }
4401 if (0) {
4402 { /* Inline kernel#Object#!= (var,var1) on <var:nullable AModule> */
4403 var_other = var1;
4404 {
4405 var6 = ((short int (*)(val*, val*))(var->class->vft[COLOR_kernel__Object___61d_61d]))(var, var_other) /* == on <var:nullable AModule(AModule)>*/;
4406 var5 = var6;
4407 }
4408 var7 = !var5;
4409 var3 = var7;
4410 goto RET_LABEL4;
4411 RET_LABEL4:(void)0;
4412 }
4413 var2 = var3;
4414 }
4415 if (var2){
4416 var8 = self->attrs[COLOR_parser_nodes__Start___n_base].val; /* _n_base on <self:Start> */
4417 if (unlikely(var8 == NULL)) {
4418 PRINT_ERROR("Runtime error: %s", "Cast failed");
4419 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7988);
4420 show_backtrace(1);
4421 }
4422 {
4423 parser_nodes__Visitor__enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4424 }
4425 } else {
4426 }
4427 var9 = self->attrs[COLOR_parser_nodes__Start___n_eof].val; /* _n_eof on <self:Start> */
4428 if (unlikely(var9 == NULL)) {
4429 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_eof");
4430 PRINT_ERROR(" (%s:%d)\n", "src/parser/parser_prod.nit", 7990);
4431 show_backtrace(1);
4432 }
4433 {
4434 parser_nodes__Visitor__enter_visit(var_v, var9); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4435 }
4436 RET_LABEL:;
4437 }
4438 /* method parser_prod#Start#visit_all for (self: Object, Visitor) */
4439 void VIRTUAL_parser_prod__Start__visit_all(val* self, val* p0) {
4440 parser_prod__Start__visit_all(self, p0); /* Direct call parser_prod#Start#visit_all on <self:Object(Start)>*/
4441 RET_LABEL:;
4442 }