misc/vim: inform the user when no results are found
[nit.git] / c_src / nit__parser_prod.sep.1.c
1 #include "nit__parser_prod.sep.0.h"
2 /* method parser_prod#AModule#init_amodule for (self: AModule, nullable AModuledecl, Collection[Object], Collection[Object], Collection[Object]) */
3 void nit__parser_prod___AModule___init_amodule(val* self, val* p0, val* p1, val* p2, val* p3) {
4 val* var_n_moduledecl /* var n_moduledecl: nullable AModuledecl */;
5 val* var_n_imports /* var n_imports: Collection[Object] */;
6 val* var_n_extern_code_blocks /* var n_extern_code_blocks: Collection[Object] */;
7 val* var_n_classdefs /* var n_classdefs: Collection[Object] */;
8 val* var /* : null */;
9 short int var1 /* : Bool */;
10 short int var2 /* : Bool */;
11 val* var_other /* var other: nullable Object */;
12 short int var4 /* : Bool */;
13 short int var5 /* : Bool */;
14 val* var7 /* : ANodes[AImport] */;
15 val* var9 /* : ANodes[AImport] */;
16 val* var10 /* : ANodes[AExternCodeBlock] */;
17 val* var12 /* : ANodes[AExternCodeBlock] */;
18 val* var13 /* : ANodes[AClassdef] */;
19 val* var15 /* : ANodes[AClassdef] */;
20 var_n_moduledecl = p0;
21 var_n_imports = p1;
22 var_n_extern_code_blocks = p2;
23 var_n_classdefs = p3;
24 self->attrs[COLOR_nit__parser_nodes__AModule___n_moduledecl].val = var_n_moduledecl; /* _n_moduledecl on <self:AModule> */
25 var = NULL;
26 if (var_n_moduledecl == NULL) {
27 var1 = 0; /* is null */
28 } else {
29 var1 = 1; /* arg is null and recv is not */
30 }
31 if (0) {
32 { /* Inline kernel#Object#!= (var_n_moduledecl,var) on <var_n_moduledecl:nullable AModuledecl> */
33 var_other = var;
34 {
35 var4 = ((short int (*)(val* self, val* p0))(var_n_moduledecl->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_moduledecl, var_other) /* == on <var_n_moduledecl:nullable AModuledecl(AModuledecl)>*/;
36 }
37 var5 = !var4;
38 var2 = var5;
39 goto RET_LABEL3;
40 RET_LABEL3:(void)0;
41 }
42 var1 = var2;
43 }
44 if (var1){
45 {
46 { /* Inline parser_nodes#ANode#parent= (var_n_moduledecl,self) on <var_n_moduledecl:nullable AModuledecl(AModuledecl)> */
47 var_n_moduledecl->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_moduledecl:nullable AModuledecl(AModuledecl)> */
48 RET_LABEL6:(void)0;
49 }
50 }
51 } else {
52 }
53 {
54 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
55 var9 = self->attrs[COLOR_nit__parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
56 if (unlikely(var9 == NULL)) {
57 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
58 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 913);
59 show_backtrace(1);
60 }
61 var7 = var9;
62 RET_LABEL8:(void)0;
63 }
64 }
65 {
66 nit___nit__ANodes___unsafe_add_all(var7, var_n_imports); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var7:ANodes[AImport]>*/
67 }
68 {
69 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
70 var12 = self->attrs[COLOR_nit__parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
71 if (unlikely(var12 == NULL)) {
72 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
73 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 916);
74 show_backtrace(1);
75 }
76 var10 = var12;
77 RET_LABEL11:(void)0;
78 }
79 }
80 {
81 nit___nit__ANodes___unsafe_add_all(var10, var_n_extern_code_blocks); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var10:ANodes[AExternCodeBlock]>*/
82 }
83 {
84 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
85 var15 = self->attrs[COLOR_nit__parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
86 if (unlikely(var15 == NULL)) {
87 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
88 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 919);
89 show_backtrace(1);
90 }
91 var13 = var15;
92 RET_LABEL14:(void)0;
93 }
94 }
95 {
96 nit___nit__ANodes___unsafe_add_all(var13, var_n_classdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var13:ANodes[AClassdef]>*/
97 }
98 RET_LABEL:;
99 }
100 /* method parser_prod#AModule#replace_child for (self: AModule, ANode, nullable ANode) */
101 void nit__parser_prod___AModule___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
102 val* var_old_child /* var old_child: ANode */;
103 val* var_new_child /* var new_child: nullable ANode */;
104 val* var /* : nullable AModuledecl */;
105 short int var1 /* : Bool */;
106 short int var2 /* : Bool */;
107 val* var_other /* var other: nullable Object */;
108 short int var4 /* : Bool */;
109 short int var6 /* : Bool */;
110 short int var7 /* : Bool */;
111 int cltype;
112 int idtype;
113 const char* var_class_name;
114 val* var8 /* : ANodes[AImport] */;
115 val* var10 /* : ANodes[AImport] */;
116 short int var11 /* : Bool */;
117 val* var12 /* : ANodes[AExternCodeBlock] */;
118 val* var14 /* : ANodes[AExternCodeBlock] */;
119 short int var15 /* : Bool */;
120 val* var16 /* : ANodes[AClassdef] */;
121 val* var18 /* : ANodes[AClassdef] */;
122 short int var19 /* : Bool */;
123 var_old_child = p0;
124 var_new_child = p1;
125 var = self->attrs[COLOR_nit__parser_nodes__AModule___n_moduledecl].val; /* _n_moduledecl on <self:AModule> */
126 if (var == NULL) {
127 var1 = 0; /* <var_old_child:ANode> cannot be null */
128 } else {
129 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AModuledecl> */
130 var_other = var_old_child;
131 {
132 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AModuledecl(AModuledecl)> */
133 var6 = var == var_other;
134 var4 = var6;
135 goto RET_LABEL5;
136 RET_LABEL5:(void)0;
137 }
138 }
139 var2 = var4;
140 goto RET_LABEL3;
141 RET_LABEL3:(void)0;
142 }
143 var1 = var2;
144 }
145 if (var1){
146 /* <var_new_child:nullable ANode> isa nullable AModuledecl */
147 cltype = type_nullable__nit__AModuledecl.color;
148 idtype = type_nullable__nit__AModuledecl.id;
149 if(var_new_child == NULL) {
150 var7 = 1;
151 } else {
152 if(cltype >= var_new_child->type->table_size) {
153 var7 = 0;
154 } else {
155 var7 = var_new_child->type->type_table[cltype] == idtype;
156 }
157 }
158 if (unlikely(!var7)) {
159 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
160 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AModuledecl", var_class_name);
161 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 27);
162 show_backtrace(1);
163 }
164 {
165 nit__parser_prod___AModule___n_moduledecl_61d(self, var_new_child); /* Direct call parser_prod#AModule#n_moduledecl= on <self:AModule>*/
166 }
167 goto RET_LABEL;
168 } else {
169 }
170 {
171 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
172 var10 = self->attrs[COLOR_nit__parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
173 if (unlikely(var10 == NULL)) {
174 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
175 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 913);
176 show_backtrace(1);
177 }
178 var8 = var10;
179 RET_LABEL9:(void)0;
180 }
181 }
182 {
183 var11 = nit___nit__ANodes___replace_child(var8, var_old_child, var_new_child);
184 }
185 if (var11){
186 goto RET_LABEL;
187 } else {
188 }
189 {
190 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
191 var14 = self->attrs[COLOR_nit__parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
192 if (unlikely(var14 == NULL)) {
193 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
194 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 916);
195 show_backtrace(1);
196 }
197 var12 = var14;
198 RET_LABEL13:(void)0;
199 }
200 }
201 {
202 var15 = nit___nit__ANodes___replace_child(var12, var_old_child, var_new_child);
203 }
204 if (var15){
205 goto RET_LABEL;
206 } else {
207 }
208 {
209 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
210 var18 = self->attrs[COLOR_nit__parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
211 if (unlikely(var18 == NULL)) {
212 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
213 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 919);
214 show_backtrace(1);
215 }
216 var16 = var18;
217 RET_LABEL17:(void)0;
218 }
219 }
220 {
221 var19 = nit___nit__ANodes___replace_child(var16, var_old_child, var_new_child);
222 }
223 if (var19){
224 goto RET_LABEL;
225 } else {
226 }
227 RET_LABEL:;
228 }
229 /* method parser_prod#AModule#n_moduledecl= for (self: AModule, nullable AModuledecl) */
230 void nit__parser_prod___AModule___n_moduledecl_61d(val* self, val* p0) {
231 val* var_node /* var node: nullable AModuledecl */;
232 val* var /* : null */;
233 short int var1 /* : Bool */;
234 short int var2 /* : Bool */;
235 val* var_other /* var other: nullable Object */;
236 short int var4 /* : Bool */;
237 short int var5 /* : Bool */;
238 var_node = p0;
239 self->attrs[COLOR_nit__parser_nodes__AModule___n_moduledecl].val = var_node; /* _n_moduledecl on <self:AModule> */
240 var = NULL;
241 if (var_node == NULL) {
242 var1 = 0; /* is null */
243 } else {
244 var1 = 1; /* arg is null and recv is not */
245 }
246 if (0) {
247 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AModuledecl> */
248 var_other = var;
249 {
250 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AModuledecl(AModuledecl)>*/;
251 }
252 var5 = !var4;
253 var2 = var5;
254 goto RET_LABEL3;
255 RET_LABEL3:(void)0;
256 }
257 var1 = var2;
258 }
259 if (var1){
260 {
261 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AModuledecl(AModuledecl)> */
262 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AModuledecl(AModuledecl)> */
263 RET_LABEL6:(void)0;
264 }
265 }
266 } else {
267 }
268 RET_LABEL:;
269 }
270 /* method parser_prod#AModule#visit_all for (self: AModule, Visitor) */
271 void nit__parser_prod___AModule___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
272 val* var_v /* var v: Visitor */;
273 val* var /* : nullable AModuledecl */;
274 val* var1 /* : ANodes[AImport] */;
275 val* var3 /* : ANodes[AImport] */;
276 val* var4 /* : ANodes[AExternCodeBlock] */;
277 val* var6 /* : ANodes[AExternCodeBlock] */;
278 val* var7 /* : ANodes[AClassdef] */;
279 val* var9 /* : ANodes[AClassdef] */;
280 var_v = p0;
281 var = self->attrs[COLOR_nit__parser_nodes__AModule___n_moduledecl].val; /* _n_moduledecl on <self:AModule> */
282 {
283 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
284 }
285 {
286 { /* Inline parser_nodes#AModule#n_imports (self) on <self:AModule> */
287 var3 = self->attrs[COLOR_nit__parser_nodes__AModule___n_imports].val; /* _n_imports on <self:AModule> */
288 if (unlikely(var3 == NULL)) {
289 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_imports");
290 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 913);
291 show_backtrace(1);
292 }
293 var1 = var3;
294 RET_LABEL2:(void)0;
295 }
296 }
297 {
298 nit___nit__ANodes___visit_all(var1, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var1:ANodes[AImport]>*/
299 }
300 {
301 { /* Inline parser_nodes#AModule#n_extern_code_blocks (self) on <self:AModule> */
302 var6 = self->attrs[COLOR_nit__parser_nodes__AModule___n_extern_code_blocks].val; /* _n_extern_code_blocks on <self:AModule> */
303 if (unlikely(var6 == NULL)) {
304 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_blocks");
305 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 916);
306 show_backtrace(1);
307 }
308 var4 = var6;
309 RET_LABEL5:(void)0;
310 }
311 }
312 {
313 nit___nit__ANodes___visit_all(var4, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var4:ANodes[AExternCodeBlock]>*/
314 }
315 {
316 { /* Inline parser_nodes#AModule#n_classdefs (self) on <self:AModule> */
317 var9 = self->attrs[COLOR_nit__parser_nodes__AModule___n_classdefs].val; /* _n_classdefs on <self:AModule> */
318 if (unlikely(var9 == NULL)) {
319 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classdefs");
320 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 919);
321 show_backtrace(1);
322 }
323 var7 = var9;
324 RET_LABEL8:(void)0;
325 }
326 }
327 {
328 nit___nit__ANodes___visit_all(var7, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var7:ANodes[AClassdef]>*/
329 }
330 RET_LABEL:;
331 }
332 /* method parser_prod#AModuledecl#init_amoduledecl for (self: AModuledecl, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmodule, nullable AModuleName, nullable AAnnotations) */
333 void nit__parser_prod___AModuledecl___init_amoduledecl(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5) {
334 val* var_n_doc /* var n_doc: nullable ADoc */;
335 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
336 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
337 val* var_n_kwmodule /* var n_kwmodule: nullable TKwmodule */;
338 val* var_n_name /* var n_name: nullable AModuleName */;
339 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
340 val* var /* : null */;
341 short int var1 /* : Bool */;
342 short int var2 /* : Bool */;
343 val* var_other /* var other: nullable Object */;
344 short int var4 /* : Bool */;
345 short int var5 /* : Bool */;
346 val* var7 /* : null */;
347 short int var8 /* : Bool */;
348 short int var9 /* : Bool */;
349 short int var11 /* : Bool */;
350 short int var12 /* : Bool */;
351 val* var17 /* : null */;
352 short int var18 /* : Bool */;
353 short int var19 /* : Bool */;
354 short int var21 /* : Bool */;
355 short int var22 /* : Bool */;
356 var_n_doc = p0;
357 var_n_kwredef = p1;
358 var_n_visibility = p2;
359 var_n_kwmodule = p3;
360 var_n_name = p4;
361 var_n_annotations = p5;
362 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_n_doc; /* _n_doc on <self:AModuledecl> */
363 var = NULL;
364 if (var_n_doc == NULL) {
365 var1 = 0; /* is null */
366 } else {
367 var1 = 1; /* arg is null and recv is not */
368 }
369 if (0) {
370 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
371 var_other = var;
372 {
373 var4 = ((short int (*)(val* self, val* p0))(var_n_doc->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
374 }
375 var5 = !var4;
376 var2 = var5;
377 goto RET_LABEL3;
378 RET_LABEL3:(void)0;
379 }
380 var1 = var2;
381 }
382 if (var1){
383 {
384 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
385 var_n_doc->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
386 RET_LABEL6:(void)0;
387 }
388 }
389 } else {
390 }
391 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AModuledecl> */
392 var7 = NULL;
393 if (var_n_kwredef == NULL) {
394 var8 = 0; /* is null */
395 } else {
396 var8 = 1; /* arg is null and recv is not */
397 }
398 if (0) {
399 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
400 var_other = var7;
401 {
402 var11 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
403 }
404 var12 = !var11;
405 var9 = var12;
406 goto RET_LABEL10;
407 RET_LABEL10:(void)0;
408 }
409 var8 = var9;
410 }
411 if (var8){
412 {
413 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
414 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
415 RET_LABEL13:(void)0;
416 }
417 }
418 } else {
419 }
420 if (unlikely(var_n_visibility == NULL)) {
421 PRINT_ERROR("Runtime error: %s", "Cast failed");
422 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 64);
423 show_backtrace(1);
424 }
425 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AModuledecl> */
426 if (var_n_visibility == NULL) {
427 PRINT_ERROR("Runtime error: %s", "Receiver is null");
428 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 65);
429 show_backtrace(1);
430 } else {
431 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
432 if (unlikely(var_n_visibility == NULL)) {
433 PRINT_ERROR("Runtime error: %s", "Receiver is null");
434 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
435 show_backtrace(1);
436 }
437 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
438 RET_LABEL14:(void)0;
439 }
440 }
441 if (unlikely(var_n_kwmodule == NULL)) {
442 PRINT_ERROR("Runtime error: %s", "Cast failed");
443 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 66);
444 show_backtrace(1);
445 }
446 self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_kwmodule].val = var_n_kwmodule; /* _n_kwmodule on <self:AModuledecl> */
447 if (var_n_kwmodule == NULL) {
448 PRINT_ERROR("Runtime error: %s", "Receiver is null");
449 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 67);
450 show_backtrace(1);
451 } else {
452 { /* Inline parser_nodes#ANode#parent= (var_n_kwmodule,self) on <var_n_kwmodule:nullable TKwmodule> */
453 if (unlikely(var_n_kwmodule == NULL)) {
454 PRINT_ERROR("Runtime error: %s", "Receiver is null");
455 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
456 show_backtrace(1);
457 }
458 var_n_kwmodule->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwmodule:nullable TKwmodule> */
459 RET_LABEL15:(void)0;
460 }
461 }
462 if (unlikely(var_n_name == NULL)) {
463 PRINT_ERROR("Runtime error: %s", "Cast failed");
464 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 68);
465 show_backtrace(1);
466 }
467 self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_name].val = var_n_name; /* _n_name on <self:AModuledecl> */
468 if (var_n_name == NULL) {
469 PRINT_ERROR("Runtime error: %s", "Receiver is null");
470 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 69);
471 show_backtrace(1);
472 } else {
473 { /* Inline parser_nodes#ANode#parent= (var_n_name,self) on <var_n_name:nullable AModuleName> */
474 if (unlikely(var_n_name == NULL)) {
475 PRINT_ERROR("Runtime error: %s", "Receiver is null");
476 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
477 show_backtrace(1);
478 }
479 var_n_name->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_name:nullable AModuleName> */
480 RET_LABEL16:(void)0;
481 }
482 }
483 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AModuledecl> */
484 var17 = NULL;
485 if (var_n_annotations == NULL) {
486 var18 = 0; /* is null */
487 } else {
488 var18 = 1; /* arg is null and recv is not */
489 }
490 if (0) {
491 { /* Inline kernel#Object#!= (var_n_annotations,var17) on <var_n_annotations:nullable AAnnotations> */
492 var_other = var17;
493 {
494 var21 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
495 }
496 var22 = !var21;
497 var19 = var22;
498 goto RET_LABEL20;
499 RET_LABEL20:(void)0;
500 }
501 var18 = var19;
502 }
503 if (var18){
504 {
505 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
506 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
507 RET_LABEL23:(void)0;
508 }
509 }
510 } else {
511 }
512 RET_LABEL:;
513 }
514 /* method parser_prod#AModuledecl#replace_child for (self: AModuledecl, ANode, nullable ANode) */
515 void nit__parser_prod___AModuledecl___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
516 val* var_old_child /* var old_child: ANode */;
517 val* var_new_child /* var new_child: nullable ANode */;
518 val* var /* : nullable ADoc */;
519 short int var1 /* : Bool */;
520 short int var2 /* : Bool */;
521 val* var_other /* var other: nullable Object */;
522 short int var4 /* : Bool */;
523 short int var6 /* : Bool */;
524 short int var7 /* : Bool */;
525 int cltype;
526 int idtype;
527 const char* var_class_name;
528 val* var8 /* : nullable TKwredef */;
529 short int var9 /* : Bool */;
530 short int var10 /* : Bool */;
531 short int var12 /* : Bool */;
532 short int var14 /* : Bool */;
533 short int var15 /* : Bool */;
534 int cltype16;
535 int idtype17;
536 const char* var_class_name18;
537 val* var19 /* : nullable AVisibility */;
538 short int var20 /* : Bool */;
539 short int var21 /* : Bool */;
540 short int var23 /* : Bool */;
541 short int var25 /* : Bool */;
542 short int var26 /* : Bool */;
543 int cltype27;
544 int idtype28;
545 const char* var_class_name29;
546 val* var30 /* : TKwmodule */;
547 short int var31 /* : Bool */;
548 short int var33 /* : Bool */;
549 short int var35 /* : Bool */;
550 short int var36 /* : Bool */;
551 int cltype37;
552 int idtype38;
553 const char* var_class_name39;
554 val* var40 /* : AModuleName */;
555 short int var41 /* : Bool */;
556 short int var43 /* : Bool */;
557 short int var45 /* : Bool */;
558 short int var46 /* : Bool */;
559 int cltype47;
560 int idtype48;
561 const char* var_class_name49;
562 val* var50 /* : nullable AAnnotations */;
563 short int var51 /* : Bool */;
564 short int var52 /* : Bool */;
565 short int var54 /* : Bool */;
566 short int var56 /* : Bool */;
567 short int var57 /* : Bool */;
568 int cltype58;
569 int idtype59;
570 const char* var_class_name60;
571 var_old_child = p0;
572 var_new_child = p1;
573 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AModuledecl> */
574 if (var == NULL) {
575 var1 = 0; /* <var_old_child:ANode> cannot be null */
576 } else {
577 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
578 var_other = var_old_child;
579 {
580 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
581 var6 = var == var_other;
582 var4 = var6;
583 goto RET_LABEL5;
584 RET_LABEL5:(void)0;
585 }
586 }
587 var2 = var4;
588 goto RET_LABEL3;
589 RET_LABEL3:(void)0;
590 }
591 var1 = var2;
592 }
593 if (var1){
594 /* <var_new_child:nullable ANode> isa nullable ADoc */
595 cltype = type_nullable__nit__ADoc.color;
596 idtype = type_nullable__nit__ADoc.id;
597 if(var_new_child == NULL) {
598 var7 = 1;
599 } else {
600 if(cltype >= var_new_child->type->table_size) {
601 var7 = 0;
602 } else {
603 var7 = var_new_child->type->type_table[cltype] == idtype;
604 }
605 }
606 if (unlikely(!var7)) {
607 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
608 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
609 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 77);
610 show_backtrace(1);
611 }
612 {
613 nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_doc= on <self:AModuledecl>*/
614 }
615 goto RET_LABEL;
616 } else {
617 }
618 var8 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AModuledecl> */
619 if (var8 == NULL) {
620 var9 = 0; /* <var_old_child:ANode> cannot be null */
621 } else {
622 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
623 var_other = var_old_child;
624 {
625 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
626 var14 = var8 == var_other;
627 var12 = var14;
628 goto RET_LABEL13;
629 RET_LABEL13:(void)0;
630 }
631 }
632 var10 = var12;
633 goto RET_LABEL11;
634 RET_LABEL11:(void)0;
635 }
636 var9 = var10;
637 }
638 if (var9){
639 /* <var_new_child:nullable ANode> isa nullable TKwredef */
640 cltype16 = type_nullable__nit__TKwredef.color;
641 idtype17 = type_nullable__nit__TKwredef.id;
642 if(var_new_child == NULL) {
643 var15 = 1;
644 } else {
645 if(cltype16 >= var_new_child->type->table_size) {
646 var15 = 0;
647 } else {
648 var15 = var_new_child->type->type_table[cltype16] == idtype17;
649 }
650 }
651 if (unlikely(!var15)) {
652 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
653 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
654 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 81);
655 show_backtrace(1);
656 }
657 {
658 nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_kwredef= on <self:AModuledecl>*/
659 }
660 goto RET_LABEL;
661 } else {
662 }
663 var19 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AModuledecl> */
664 if (var19 == NULL) {
665 var20 = 0; /* <var_old_child:ANode> cannot be null */
666 } else {
667 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
668 var_other = var_old_child;
669 {
670 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
671 var25 = var19 == var_other;
672 var23 = var25;
673 goto RET_LABEL24;
674 RET_LABEL24:(void)0;
675 }
676 }
677 var21 = var23;
678 goto RET_LABEL22;
679 RET_LABEL22:(void)0;
680 }
681 var20 = var21;
682 }
683 if (var20){
684 /* <var_new_child:nullable ANode> isa AVisibility */
685 cltype27 = type_nit__AVisibility.color;
686 idtype28 = type_nit__AVisibility.id;
687 if(var_new_child == NULL) {
688 var26 = 0;
689 } else {
690 if(cltype27 >= var_new_child->type->table_size) {
691 var26 = 0;
692 } else {
693 var26 = var_new_child->type->type_table[cltype27] == idtype28;
694 }
695 }
696 if (unlikely(!var26)) {
697 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
698 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
699 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 85);
700 show_backtrace(1);
701 }
702 {
703 nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_visibility= on <self:AModuledecl>*/
704 }
705 goto RET_LABEL;
706 } else {
707 }
708 var30 = self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_kwmodule].val; /* _n_kwmodule on <self:AModuledecl> */
709 if (unlikely(var30 == NULL)) {
710 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwmodule");
711 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 88);
712 show_backtrace(1);
713 }
714 {
715 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwmodule> */
716 var_other = var_old_child;
717 {
718 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwmodule> */
719 var35 = var30 == var_other;
720 var33 = var35;
721 goto RET_LABEL34;
722 RET_LABEL34:(void)0;
723 }
724 }
725 var31 = var33;
726 goto RET_LABEL32;
727 RET_LABEL32:(void)0;
728 }
729 }
730 if (var31){
731 /* <var_new_child:nullable ANode> isa TKwmodule */
732 cltype37 = type_nit__TKwmodule.color;
733 idtype38 = type_nit__TKwmodule.id;
734 if(var_new_child == NULL) {
735 var36 = 0;
736 } else {
737 if(cltype37 >= var_new_child->type->table_size) {
738 var36 = 0;
739 } else {
740 var36 = var_new_child->type->type_table[cltype37] == idtype38;
741 }
742 }
743 if (unlikely(!var36)) {
744 var_class_name39 = var_new_child == NULL ? "null" : var_new_child->type->name;
745 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwmodule", var_class_name39);
746 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 89);
747 show_backtrace(1);
748 }
749 {
750 nit__parser_prod___AModuledecl___n_kwmodule_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_kwmodule= on <self:AModuledecl>*/
751 }
752 goto RET_LABEL;
753 } else {
754 }
755 var40 = self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_name].val; /* _n_name on <self:AModuledecl> */
756 if (unlikely(var40 == NULL)) {
757 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
758 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 92);
759 show_backtrace(1);
760 }
761 {
762 { /* Inline kernel#Object#== (var40,var_old_child) on <var40:AModuleName> */
763 var_other = var_old_child;
764 {
765 { /* Inline kernel#Object#is_same_instance (var40,var_other) on <var40:AModuleName> */
766 var45 = var40 == var_other;
767 var43 = var45;
768 goto RET_LABEL44;
769 RET_LABEL44:(void)0;
770 }
771 }
772 var41 = var43;
773 goto RET_LABEL42;
774 RET_LABEL42:(void)0;
775 }
776 }
777 if (var41){
778 /* <var_new_child:nullable ANode> isa AModuleName */
779 cltype47 = type_nit__AModuleName.color;
780 idtype48 = type_nit__AModuleName.id;
781 if(var_new_child == NULL) {
782 var46 = 0;
783 } else {
784 if(cltype47 >= var_new_child->type->table_size) {
785 var46 = 0;
786 } else {
787 var46 = var_new_child->type->type_table[cltype47] == idtype48;
788 }
789 }
790 if (unlikely(!var46)) {
791 var_class_name49 = var_new_child == NULL ? "null" : var_new_child->type->name;
792 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AModuleName", var_class_name49);
793 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 93);
794 show_backtrace(1);
795 }
796 {
797 nit__parser_prod___AModuledecl___n_name_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_name= on <self:AModuledecl>*/
798 }
799 goto RET_LABEL;
800 } else {
801 }
802 var50 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AModuledecl> */
803 if (var50 == NULL) {
804 var51 = 0; /* <var_old_child:ANode> cannot be null */
805 } else {
806 { /* Inline kernel#Object#== (var50,var_old_child) on <var50:nullable AAnnotations> */
807 var_other = var_old_child;
808 {
809 { /* Inline kernel#Object#is_same_instance (var50,var_other) on <var50:nullable AAnnotations(AAnnotations)> */
810 var56 = var50 == var_other;
811 var54 = var56;
812 goto RET_LABEL55;
813 RET_LABEL55:(void)0;
814 }
815 }
816 var52 = var54;
817 goto RET_LABEL53;
818 RET_LABEL53:(void)0;
819 }
820 var51 = var52;
821 }
822 if (var51){
823 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
824 cltype58 = type_nullable__nit__AAnnotations.color;
825 idtype59 = type_nullable__nit__AAnnotations.id;
826 if(var_new_child == NULL) {
827 var57 = 1;
828 } else {
829 if(cltype58 >= var_new_child->type->table_size) {
830 var57 = 0;
831 } else {
832 var57 = var_new_child->type->type_table[cltype58] == idtype59;
833 }
834 }
835 if (unlikely(!var57)) {
836 var_class_name60 = var_new_child == NULL ? "null" : var_new_child->type->name;
837 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name60);
838 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 97);
839 show_backtrace(1);
840 }
841 {
842 nit__parser_prod___AModuledecl___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AModuledecl#n_annotations= on <self:AModuledecl>*/
843 }
844 goto RET_LABEL;
845 } else {
846 }
847 RET_LABEL:;
848 }
849 /* method parser_prod#AModuledecl#n_doc= for (self: AModuledecl, nullable ADoc) */
850 void nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_doc_61d(val* self, val* p0) {
851 val* var_node /* var node: nullable ADoc */;
852 val* var /* : null */;
853 short int var1 /* : Bool */;
854 short int var2 /* : Bool */;
855 val* var_other /* var other: nullable Object */;
856 short int var4 /* : Bool */;
857 short int var5 /* : Bool */;
858 var_node = p0;
859 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_node; /* _n_doc on <self:AModuledecl> */
860 var = NULL;
861 if (var_node == NULL) {
862 var1 = 0; /* is null */
863 } else {
864 var1 = 1; /* arg is null and recv is not */
865 }
866 if (0) {
867 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
868 var_other = var;
869 {
870 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
871 }
872 var5 = !var4;
873 var2 = var5;
874 goto RET_LABEL3;
875 RET_LABEL3:(void)0;
876 }
877 var1 = var2;
878 }
879 if (var1){
880 {
881 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
882 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
883 RET_LABEL6:(void)0;
884 }
885 }
886 } else {
887 }
888 RET_LABEL:;
889 }
890 /* method parser_prod#AModuledecl#n_kwredef= for (self: AModuledecl, nullable TKwredef) */
891 void nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
892 val* var_node /* var node: nullable TKwredef */;
893 val* var /* : null */;
894 short int var1 /* : Bool */;
895 short int var2 /* : Bool */;
896 val* var_other /* var other: nullable Object */;
897 short int var4 /* : Bool */;
898 short int var5 /* : Bool */;
899 var_node = p0;
900 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:AModuledecl> */
901 var = NULL;
902 if (var_node == NULL) {
903 var1 = 0; /* is null */
904 } else {
905 var1 = 1; /* arg is null and recv is not */
906 }
907 if (0) {
908 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
909 var_other = var;
910 {
911 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
912 }
913 var5 = !var4;
914 var2 = var5;
915 goto RET_LABEL3;
916 RET_LABEL3:(void)0;
917 }
918 var1 = var2;
919 }
920 if (var1){
921 {
922 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
923 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
924 RET_LABEL6:(void)0;
925 }
926 }
927 } else {
928 }
929 RET_LABEL:;
930 }
931 /* method parser_prod#AModuledecl#n_visibility= for (self: AModuledecl, nullable AVisibility) */
932 void nit__parser_prod___AModuledecl___nit__parser_nodes__ADefinition__n_visibility_61d(val* self, val* p0) {
933 val* var_node /* var node: nullable AVisibility */;
934 var_node = p0;
935 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_node; /* _n_visibility on <self:AModuledecl> */
936 if (var_node == NULL) {
937 PRINT_ERROR("Runtime error: %s", "Receiver is null");
938 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 115);
939 show_backtrace(1);
940 } else {
941 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
942 if (unlikely(var_node == NULL)) {
943 PRINT_ERROR("Runtime error: %s", "Receiver is null");
944 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
945 show_backtrace(1);
946 }
947 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
948 RET_LABEL1:(void)0;
949 }
950 }
951 RET_LABEL:;
952 }
953 /* method parser_prod#AModuledecl#n_kwmodule= for (self: AModuledecl, TKwmodule) */
954 void nit__parser_prod___AModuledecl___n_kwmodule_61d(val* self, val* p0) {
955 val* var_node /* var node: TKwmodule */;
956 var_node = p0;
957 self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_kwmodule].val = var_node; /* _n_kwmodule on <self:AModuledecl> */
958 {
959 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwmodule> */
960 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwmodule> */
961 RET_LABEL1:(void)0;
962 }
963 }
964 RET_LABEL:;
965 }
966 /* method parser_prod#AModuledecl#n_name= for (self: AModuledecl, AModuleName) */
967 void nit__parser_prod___AModuledecl___n_name_61d(val* self, val* p0) {
968 val* var_node /* var node: AModuleName */;
969 var_node = p0;
970 self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_name].val = var_node; /* _n_name on <self:AModuledecl> */
971 {
972 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AModuleName> */
973 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AModuleName> */
974 RET_LABEL1:(void)0;
975 }
976 }
977 RET_LABEL:;
978 }
979 /* method parser_prod#AModuledecl#n_annotations= for (self: AModuledecl, nullable AAnnotations) */
980 void nit__parser_prod___AModuledecl___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
981 val* var_node /* var node: nullable AAnnotations */;
982 val* var /* : null */;
983 short int var1 /* : Bool */;
984 short int var2 /* : Bool */;
985 val* var_other /* var other: nullable Object */;
986 short int var4 /* : Bool */;
987 short int var5 /* : Bool */;
988 var_node = p0;
989 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AModuledecl> */
990 var = NULL;
991 if (var_node == NULL) {
992 var1 = 0; /* is null */
993 } else {
994 var1 = 1; /* arg is null and recv is not */
995 }
996 if (0) {
997 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
998 var_other = var;
999 {
1000 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
1001 }
1002 var5 = !var4;
1003 var2 = var5;
1004 goto RET_LABEL3;
1005 RET_LABEL3:(void)0;
1006 }
1007 var1 = var2;
1008 }
1009 if (var1){
1010 {
1011 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
1012 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
1013 RET_LABEL6:(void)0;
1014 }
1015 }
1016 } else {
1017 }
1018 RET_LABEL:;
1019 }
1020 /* method parser_prod#AModuledecl#visit_all for (self: AModuledecl, Visitor) */
1021 void nit__parser_prod___AModuledecl___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
1022 val* var_v /* var v: Visitor */;
1023 val* var /* : nullable ADoc */;
1024 val* var1 /* : nullable TKwredef */;
1025 val* var2 /* : nullable AVisibility */;
1026 val* var3 /* : TKwmodule */;
1027 val* var4 /* : AModuleName */;
1028 val* var5 /* : nullable AAnnotations */;
1029 var_v = p0;
1030 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AModuledecl> */
1031 {
1032 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1033 }
1034 var1 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AModuledecl> */
1035 {
1036 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1037 }
1038 var2 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AModuledecl> */
1039 {
1040 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1041 }
1042 var3 = self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_kwmodule].val; /* _n_kwmodule on <self:AModuledecl> */
1043 if (unlikely(var3 == NULL)) {
1044 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwmodule");
1045 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 139);
1046 show_backtrace(1);
1047 }
1048 {
1049 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1050 }
1051 var4 = self->attrs[COLOR_nit__parser_nodes__AModuledecl___n_name].val; /* _n_name on <self:AModuledecl> */
1052 if (unlikely(var4 == NULL)) {
1053 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1054 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 140);
1055 show_backtrace(1);
1056 }
1057 {
1058 nit___nit__Visitor___enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1059 }
1060 var5 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AModuledecl> */
1061 {
1062 nit___nit__Visitor___enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1063 }
1064 RET_LABEL:;
1065 }
1066 /* method parser_prod#AStdImport#init_astdimport for (self: AStdImport, nullable AVisibility, nullable TKwimport, nullable AModuleName, nullable AAnnotations) */
1067 void nit__parser_prod___AStdImport___init_astdimport(val* self, val* p0, val* p1, val* p2, val* p3) {
1068 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
1069 val* var_n_kwimport /* var n_kwimport: nullable TKwimport */;
1070 val* var_n_name /* var n_name: nullable AModuleName */;
1071 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
1072 val* var /* : null */;
1073 short int var4 /* : Bool */;
1074 short int var5 /* : Bool */;
1075 val* var_other /* var other: nullable Object */;
1076 short int var7 /* : Bool */;
1077 short int var8 /* : Bool */;
1078 var_n_visibility = p0;
1079 var_n_kwimport = p1;
1080 var_n_name = p2;
1081 var_n_annotations = p3;
1082 if (unlikely(var_n_visibility == NULL)) {
1083 PRINT_ERROR("Runtime error: %s", "Cast failed");
1084 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 152);
1085 show_backtrace(1);
1086 }
1087 self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AStdImport> */
1088 if (var_n_visibility == NULL) {
1089 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1090 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 153);
1091 show_backtrace(1);
1092 } else {
1093 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
1094 if (unlikely(var_n_visibility == NULL)) {
1095 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1096 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1097 show_backtrace(1);
1098 }
1099 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
1100 RET_LABEL1:(void)0;
1101 }
1102 }
1103 if (unlikely(var_n_kwimport == NULL)) {
1104 PRINT_ERROR("Runtime error: %s", "Cast failed");
1105 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 154);
1106 show_backtrace(1);
1107 }
1108 self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val = var_n_kwimport; /* _n_kwimport on <self:AStdImport> */
1109 if (var_n_kwimport == NULL) {
1110 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1111 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 155);
1112 show_backtrace(1);
1113 } else {
1114 { /* Inline parser_nodes#ANode#parent= (var_n_kwimport,self) on <var_n_kwimport:nullable TKwimport> */
1115 if (unlikely(var_n_kwimport == NULL)) {
1116 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1117 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1118 show_backtrace(1);
1119 }
1120 var_n_kwimport->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwimport:nullable TKwimport> */
1121 RET_LABEL2:(void)0;
1122 }
1123 }
1124 if (unlikely(var_n_name == NULL)) {
1125 PRINT_ERROR("Runtime error: %s", "Cast failed");
1126 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 156);
1127 show_backtrace(1);
1128 }
1129 self->attrs[COLOR_nit__parser_nodes__AStdImport___n_name].val = var_n_name; /* _n_name on <self:AStdImport> */
1130 if (var_n_name == NULL) {
1131 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1132 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 157);
1133 show_backtrace(1);
1134 } else {
1135 { /* Inline parser_nodes#ANode#parent= (var_n_name,self) on <var_n_name:nullable AModuleName> */
1136 if (unlikely(var_n_name == NULL)) {
1137 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1138 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1139 show_backtrace(1);
1140 }
1141 var_n_name->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_name:nullable AModuleName> */
1142 RET_LABEL3:(void)0;
1143 }
1144 }
1145 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AStdImport> */
1146 var = NULL;
1147 if (var_n_annotations == NULL) {
1148 var4 = 0; /* is null */
1149 } else {
1150 var4 = 1; /* arg is null and recv is not */
1151 }
1152 if (0) {
1153 { /* Inline kernel#Object#!= (var_n_annotations,var) on <var_n_annotations:nullable AAnnotations> */
1154 var_other = var;
1155 {
1156 var7 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
1157 }
1158 var8 = !var7;
1159 var5 = var8;
1160 goto RET_LABEL6;
1161 RET_LABEL6:(void)0;
1162 }
1163 var4 = var5;
1164 }
1165 if (var4){
1166 {
1167 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
1168 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
1169 RET_LABEL9:(void)0;
1170 }
1171 }
1172 } else {
1173 }
1174 RET_LABEL:;
1175 }
1176 /* method parser_prod#AStdImport#replace_child for (self: AStdImport, ANode, nullable ANode) */
1177 void nit__parser_prod___AStdImport___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
1178 val* var_old_child /* var old_child: ANode */;
1179 val* var_new_child /* var new_child: nullable ANode */;
1180 val* var /* : AVisibility */;
1181 short int var1 /* : Bool */;
1182 val* var_other /* var other: nullable Object */;
1183 short int var3 /* : Bool */;
1184 short int var5 /* : Bool */;
1185 short int var6 /* : Bool */;
1186 int cltype;
1187 int idtype;
1188 const char* var_class_name;
1189 val* var7 /* : TKwimport */;
1190 short int var8 /* : Bool */;
1191 short int var10 /* : Bool */;
1192 short int var12 /* : Bool */;
1193 short int var13 /* : Bool */;
1194 int cltype14;
1195 int idtype15;
1196 const char* var_class_name16;
1197 val* var17 /* : AModuleName */;
1198 short int var18 /* : Bool */;
1199 short int var20 /* : Bool */;
1200 short int var22 /* : Bool */;
1201 short int var23 /* : Bool */;
1202 int cltype24;
1203 int idtype25;
1204 const char* var_class_name26;
1205 val* var27 /* : nullable AAnnotations */;
1206 short int var28 /* : Bool */;
1207 short int var29 /* : Bool */;
1208 short int var31 /* : Bool */;
1209 short int var33 /* : Bool */;
1210 short int var34 /* : Bool */;
1211 int cltype35;
1212 int idtype36;
1213 const char* var_class_name37;
1214 var_old_child = p0;
1215 var_new_child = p1;
1216 var = self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val; /* _n_visibility on <self:AStdImport> */
1217 if (unlikely(var == NULL)) {
1218 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1219 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 164);
1220 show_backtrace(1);
1221 }
1222 {
1223 { /* Inline kernel#Object#== (var,var_old_child) on <var:AVisibility> */
1224 var_other = var_old_child;
1225 {
1226 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AVisibility> */
1227 var5 = var == var_other;
1228 var3 = var5;
1229 goto RET_LABEL4;
1230 RET_LABEL4:(void)0;
1231 }
1232 }
1233 var1 = var3;
1234 goto RET_LABEL2;
1235 RET_LABEL2:(void)0;
1236 }
1237 }
1238 if (var1){
1239 /* <var_new_child:nullable ANode> isa AVisibility */
1240 cltype = type_nit__AVisibility.color;
1241 idtype = type_nit__AVisibility.id;
1242 if(var_new_child == NULL) {
1243 var6 = 0;
1244 } else {
1245 if(cltype >= var_new_child->type->table_size) {
1246 var6 = 0;
1247 } else {
1248 var6 = var_new_child->type->type_table[cltype] == idtype;
1249 }
1250 }
1251 if (unlikely(!var6)) {
1252 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1253 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name);
1254 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 165);
1255 show_backtrace(1);
1256 }
1257 {
1258 nit__parser_prod___AStdImport___nit__parser_nodes__AImport__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_visibility= on <self:AStdImport>*/
1259 }
1260 goto RET_LABEL;
1261 } else {
1262 }
1263 var7 = self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val; /* _n_kwimport on <self:AStdImport> */
1264 if (unlikely(var7 == NULL)) {
1265 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1266 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 168);
1267 show_backtrace(1);
1268 }
1269 {
1270 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TKwimport> */
1271 var_other = var_old_child;
1272 {
1273 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TKwimport> */
1274 var12 = var7 == var_other;
1275 var10 = var12;
1276 goto RET_LABEL11;
1277 RET_LABEL11:(void)0;
1278 }
1279 }
1280 var8 = var10;
1281 goto RET_LABEL9;
1282 RET_LABEL9:(void)0;
1283 }
1284 }
1285 if (var8){
1286 /* <var_new_child:nullable ANode> isa TKwimport */
1287 cltype14 = type_nit__TKwimport.color;
1288 idtype15 = type_nit__TKwimport.id;
1289 if(var_new_child == NULL) {
1290 var13 = 0;
1291 } else {
1292 if(cltype14 >= var_new_child->type->table_size) {
1293 var13 = 0;
1294 } else {
1295 var13 = var_new_child->type->type_table[cltype14] == idtype15;
1296 }
1297 }
1298 if (unlikely(!var13)) {
1299 var_class_name16 = var_new_child == NULL ? "null" : var_new_child->type->name;
1300 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwimport", var_class_name16);
1301 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 169);
1302 show_backtrace(1);
1303 }
1304 {
1305 nit__parser_prod___AStdImport___nit__parser_nodes__AImport__n_kwimport_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_kwimport= on <self:AStdImport>*/
1306 }
1307 goto RET_LABEL;
1308 } else {
1309 }
1310 var17 = self->attrs[COLOR_nit__parser_nodes__AStdImport___n_name].val; /* _n_name on <self:AStdImport> */
1311 if (unlikely(var17 == NULL)) {
1312 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1313 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 172);
1314 show_backtrace(1);
1315 }
1316 {
1317 { /* Inline kernel#Object#== (var17,var_old_child) on <var17:AModuleName> */
1318 var_other = var_old_child;
1319 {
1320 { /* Inline kernel#Object#is_same_instance (var17,var_other) on <var17:AModuleName> */
1321 var22 = var17 == var_other;
1322 var20 = var22;
1323 goto RET_LABEL21;
1324 RET_LABEL21:(void)0;
1325 }
1326 }
1327 var18 = var20;
1328 goto RET_LABEL19;
1329 RET_LABEL19:(void)0;
1330 }
1331 }
1332 if (var18){
1333 /* <var_new_child:nullable ANode> isa AModuleName */
1334 cltype24 = type_nit__AModuleName.color;
1335 idtype25 = type_nit__AModuleName.id;
1336 if(var_new_child == NULL) {
1337 var23 = 0;
1338 } else {
1339 if(cltype24 >= var_new_child->type->table_size) {
1340 var23 = 0;
1341 } else {
1342 var23 = var_new_child->type->type_table[cltype24] == idtype25;
1343 }
1344 }
1345 if (unlikely(!var23)) {
1346 var_class_name26 = var_new_child == NULL ? "null" : var_new_child->type->name;
1347 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AModuleName", var_class_name26);
1348 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 173);
1349 show_backtrace(1);
1350 }
1351 {
1352 nit__parser_prod___AStdImport___n_name_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_name= on <self:AStdImport>*/
1353 }
1354 goto RET_LABEL;
1355 } else {
1356 }
1357 var27 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdImport> */
1358 if (var27 == NULL) {
1359 var28 = 0; /* <var_old_child:ANode> cannot be null */
1360 } else {
1361 { /* Inline kernel#Object#== (var27,var_old_child) on <var27:nullable AAnnotations> */
1362 var_other = var_old_child;
1363 {
1364 { /* Inline kernel#Object#is_same_instance (var27,var_other) on <var27:nullable AAnnotations(AAnnotations)> */
1365 var33 = var27 == var_other;
1366 var31 = var33;
1367 goto RET_LABEL32;
1368 RET_LABEL32:(void)0;
1369 }
1370 }
1371 var29 = var31;
1372 goto RET_LABEL30;
1373 RET_LABEL30:(void)0;
1374 }
1375 var28 = var29;
1376 }
1377 if (var28){
1378 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
1379 cltype35 = type_nullable__nit__AAnnotations.color;
1380 idtype36 = type_nullable__nit__AAnnotations.id;
1381 if(var_new_child == NULL) {
1382 var34 = 1;
1383 } else {
1384 if(cltype35 >= var_new_child->type->table_size) {
1385 var34 = 0;
1386 } else {
1387 var34 = var_new_child->type->type_table[cltype35] == idtype36;
1388 }
1389 }
1390 if (unlikely(!var34)) {
1391 var_class_name37 = var_new_child == NULL ? "null" : var_new_child->type->name;
1392 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name37);
1393 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 177);
1394 show_backtrace(1);
1395 }
1396 {
1397 nit__parser_prod___AStdImport___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AStdImport#n_annotations= on <self:AStdImport>*/
1398 }
1399 goto RET_LABEL;
1400 } else {
1401 }
1402 RET_LABEL:;
1403 }
1404 /* method parser_prod#AStdImport#n_visibility= for (self: AStdImport, AVisibility) */
1405 void nit__parser_prod___AStdImport___nit__parser_nodes__AImport__n_visibility_61d(val* self, val* p0) {
1406 val* var_node /* var node: AVisibility */;
1407 var_node = p0;
1408 self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val = var_node; /* _n_visibility on <self:AStdImport> */
1409 {
1410 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
1411 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
1412 RET_LABEL1:(void)0;
1413 }
1414 }
1415 RET_LABEL:;
1416 }
1417 /* method parser_prod#AStdImport#n_kwimport= for (self: AStdImport, TKwimport) */
1418 void nit__parser_prod___AStdImport___nit__parser_nodes__AImport__n_kwimport_61d(val* self, val* p0) {
1419 val* var_node /* var node: TKwimport */;
1420 var_node = p0;
1421 self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val = var_node; /* _n_kwimport on <self:AStdImport> */
1422 {
1423 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwimport> */
1424 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwimport> */
1425 RET_LABEL1:(void)0;
1426 }
1427 }
1428 RET_LABEL:;
1429 }
1430 /* method parser_prod#AStdImport#n_name= for (self: AStdImport, AModuleName) */
1431 void nit__parser_prod___AStdImport___n_name_61d(val* self, val* p0) {
1432 val* var_node /* var node: AModuleName */;
1433 var_node = p0;
1434 self->attrs[COLOR_nit__parser_nodes__AStdImport___n_name].val = var_node; /* _n_name on <self:AStdImport> */
1435 {
1436 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AModuleName> */
1437 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AModuleName> */
1438 RET_LABEL1:(void)0;
1439 }
1440 }
1441 RET_LABEL:;
1442 }
1443 /* method parser_prod#AStdImport#n_annotations= for (self: AStdImport, nullable AAnnotations) */
1444 void nit__parser_prod___AStdImport___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
1445 val* var_node /* var node: nullable AAnnotations */;
1446 val* var /* : null */;
1447 short int var1 /* : Bool */;
1448 short int var2 /* : Bool */;
1449 val* var_other /* var other: nullable Object */;
1450 short int var4 /* : Bool */;
1451 short int var5 /* : Bool */;
1452 var_node = p0;
1453 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AStdImport> */
1454 var = NULL;
1455 if (var_node == NULL) {
1456 var1 = 0; /* is null */
1457 } else {
1458 var1 = 1; /* arg is null and recv is not */
1459 }
1460 if (0) {
1461 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
1462 var_other = var;
1463 {
1464 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
1465 }
1466 var5 = !var4;
1467 var2 = var5;
1468 goto RET_LABEL3;
1469 RET_LABEL3:(void)0;
1470 }
1471 var1 = var2;
1472 }
1473 if (var1){
1474 {
1475 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
1476 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
1477 RET_LABEL6:(void)0;
1478 }
1479 }
1480 } else {
1481 }
1482 RET_LABEL:;
1483 }
1484 /* method parser_prod#AStdImport#visit_all for (self: AStdImport, Visitor) */
1485 void nit__parser_prod___AStdImport___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
1486 val* var_v /* var v: Visitor */;
1487 val* var /* : AVisibility */;
1488 val* var1 /* : TKwimport */;
1489 val* var2 /* : AModuleName */;
1490 val* var3 /* : nullable AAnnotations */;
1491 var_v = p0;
1492 var = self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val; /* _n_visibility on <self:AStdImport> */
1493 if (unlikely(var == NULL)) {
1494 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1495 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 206);
1496 show_backtrace(1);
1497 }
1498 {
1499 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1500 }
1501 var1 = self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val; /* _n_kwimport on <self:AStdImport> */
1502 if (unlikely(var1 == NULL)) {
1503 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1504 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 207);
1505 show_backtrace(1);
1506 }
1507 {
1508 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1509 }
1510 var2 = self->attrs[COLOR_nit__parser_nodes__AStdImport___n_name].val; /* _n_name on <self:AStdImport> */
1511 if (unlikely(var2 == NULL)) {
1512 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_name");
1513 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 208);
1514 show_backtrace(1);
1515 }
1516 {
1517 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1518 }
1519 var3 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdImport> */
1520 {
1521 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1522 }
1523 RET_LABEL:;
1524 }
1525 /* method parser_prod#ANoImport#init_anoimport for (self: ANoImport, nullable AVisibility, nullable TKwimport, nullable TKwend) */
1526 void nit__parser_prod___ANoImport___init_anoimport(val* self, val* p0, val* p1, val* p2) {
1527 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
1528 val* var_n_kwimport /* var n_kwimport: nullable TKwimport */;
1529 val* var_n_kwend /* var n_kwend: nullable TKwend */;
1530 var_n_visibility = p0;
1531 var_n_kwimport = p1;
1532 var_n_kwend = p2;
1533 if (unlikely(var_n_visibility == NULL)) {
1534 PRINT_ERROR("Runtime error: %s", "Cast failed");
1535 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 219);
1536 show_backtrace(1);
1537 }
1538 self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val = var_n_visibility; /* _n_visibility on <self:ANoImport> */
1539 if (var_n_visibility == NULL) {
1540 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1541 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 220);
1542 show_backtrace(1);
1543 } else {
1544 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
1545 if (unlikely(var_n_visibility == NULL)) {
1546 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1547 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1548 show_backtrace(1);
1549 }
1550 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
1551 RET_LABEL1:(void)0;
1552 }
1553 }
1554 if (unlikely(var_n_kwimport == NULL)) {
1555 PRINT_ERROR("Runtime error: %s", "Cast failed");
1556 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 221);
1557 show_backtrace(1);
1558 }
1559 self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val = var_n_kwimport; /* _n_kwimport on <self:ANoImport> */
1560 if (var_n_kwimport == NULL) {
1561 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1562 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 222);
1563 show_backtrace(1);
1564 } else {
1565 { /* Inline parser_nodes#ANode#parent= (var_n_kwimport,self) on <var_n_kwimport:nullable TKwimport> */
1566 if (unlikely(var_n_kwimport == NULL)) {
1567 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1568 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1569 show_backtrace(1);
1570 }
1571 var_n_kwimport->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwimport:nullable TKwimport> */
1572 RET_LABEL2:(void)0;
1573 }
1574 }
1575 if (unlikely(var_n_kwend == NULL)) {
1576 PRINT_ERROR("Runtime error: %s", "Cast failed");
1577 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 223);
1578 show_backtrace(1);
1579 }
1580 self->attrs[COLOR_nit__parser_nodes__ANoImport___n_kwend].val = var_n_kwend; /* _n_kwend on <self:ANoImport> */
1581 if (var_n_kwend == NULL) {
1582 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1583 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 224);
1584 show_backtrace(1);
1585 } else {
1586 { /* Inline parser_nodes#ANode#parent= (var_n_kwend,self) on <var_n_kwend:nullable TKwend> */
1587 if (unlikely(var_n_kwend == NULL)) {
1588 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1589 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
1590 show_backtrace(1);
1591 }
1592 var_n_kwend->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwend:nullable TKwend> */
1593 RET_LABEL3:(void)0;
1594 }
1595 }
1596 RET_LABEL:;
1597 }
1598 /* method parser_prod#ANoImport#replace_child for (self: ANoImport, ANode, nullable ANode) */
1599 void nit__parser_prod___ANoImport___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
1600 val* var_old_child /* var old_child: ANode */;
1601 val* var_new_child /* var new_child: nullable ANode */;
1602 val* var /* : AVisibility */;
1603 short int var1 /* : Bool */;
1604 val* var_other /* var other: nullable Object */;
1605 short int var3 /* : Bool */;
1606 short int var5 /* : Bool */;
1607 short int var6 /* : Bool */;
1608 int cltype;
1609 int idtype;
1610 const char* var_class_name;
1611 val* var7 /* : TKwimport */;
1612 short int var8 /* : Bool */;
1613 short int var10 /* : Bool */;
1614 short int var12 /* : Bool */;
1615 short int var13 /* : Bool */;
1616 int cltype14;
1617 int idtype15;
1618 const char* var_class_name16;
1619 val* var17 /* : TKwend */;
1620 short int var18 /* : Bool */;
1621 short int var20 /* : Bool */;
1622 short int var22 /* : Bool */;
1623 short int var23 /* : Bool */;
1624 int cltype24;
1625 int idtype25;
1626 const char* var_class_name26;
1627 var_old_child = p0;
1628 var_new_child = p1;
1629 var = self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val; /* _n_visibility on <self:ANoImport> */
1630 if (unlikely(var == NULL)) {
1631 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1632 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 229);
1633 show_backtrace(1);
1634 }
1635 {
1636 { /* Inline kernel#Object#== (var,var_old_child) on <var:AVisibility> */
1637 var_other = var_old_child;
1638 {
1639 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AVisibility> */
1640 var5 = var == var_other;
1641 var3 = var5;
1642 goto RET_LABEL4;
1643 RET_LABEL4:(void)0;
1644 }
1645 }
1646 var1 = var3;
1647 goto RET_LABEL2;
1648 RET_LABEL2:(void)0;
1649 }
1650 }
1651 if (var1){
1652 /* <var_new_child:nullable ANode> isa AVisibility */
1653 cltype = type_nit__AVisibility.color;
1654 idtype = type_nit__AVisibility.id;
1655 if(var_new_child == NULL) {
1656 var6 = 0;
1657 } else {
1658 if(cltype >= var_new_child->type->table_size) {
1659 var6 = 0;
1660 } else {
1661 var6 = var_new_child->type->type_table[cltype] == idtype;
1662 }
1663 }
1664 if (unlikely(!var6)) {
1665 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1666 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name);
1667 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 230);
1668 show_backtrace(1);
1669 }
1670 {
1671 nit__parser_prod___ANoImport___nit__parser_nodes__AImport__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_visibility= on <self:ANoImport>*/
1672 }
1673 goto RET_LABEL;
1674 } else {
1675 }
1676 var7 = self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val; /* _n_kwimport on <self:ANoImport> */
1677 if (unlikely(var7 == NULL)) {
1678 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1679 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 233);
1680 show_backtrace(1);
1681 }
1682 {
1683 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TKwimport> */
1684 var_other = var_old_child;
1685 {
1686 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TKwimport> */
1687 var12 = var7 == var_other;
1688 var10 = var12;
1689 goto RET_LABEL11;
1690 RET_LABEL11:(void)0;
1691 }
1692 }
1693 var8 = var10;
1694 goto RET_LABEL9;
1695 RET_LABEL9:(void)0;
1696 }
1697 }
1698 if (var8){
1699 /* <var_new_child:nullable ANode> isa TKwimport */
1700 cltype14 = type_nit__TKwimport.color;
1701 idtype15 = type_nit__TKwimport.id;
1702 if(var_new_child == NULL) {
1703 var13 = 0;
1704 } else {
1705 if(cltype14 >= var_new_child->type->table_size) {
1706 var13 = 0;
1707 } else {
1708 var13 = var_new_child->type->type_table[cltype14] == idtype15;
1709 }
1710 }
1711 if (unlikely(!var13)) {
1712 var_class_name16 = var_new_child == NULL ? "null" : var_new_child->type->name;
1713 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwimport", var_class_name16);
1714 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 234);
1715 show_backtrace(1);
1716 }
1717 {
1718 nit__parser_prod___ANoImport___nit__parser_nodes__AImport__n_kwimport_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_kwimport= on <self:ANoImport>*/
1719 }
1720 goto RET_LABEL;
1721 } else {
1722 }
1723 var17 = self->attrs[COLOR_nit__parser_nodes__ANoImport___n_kwend].val; /* _n_kwend on <self:ANoImport> */
1724 if (unlikely(var17 == NULL)) {
1725 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
1726 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 237);
1727 show_backtrace(1);
1728 }
1729 {
1730 { /* Inline kernel#Object#== (var17,var_old_child) on <var17:TKwend> */
1731 var_other = var_old_child;
1732 {
1733 { /* Inline kernel#Object#is_same_instance (var17,var_other) on <var17:TKwend> */
1734 var22 = var17 == var_other;
1735 var20 = var22;
1736 goto RET_LABEL21;
1737 RET_LABEL21:(void)0;
1738 }
1739 }
1740 var18 = var20;
1741 goto RET_LABEL19;
1742 RET_LABEL19:(void)0;
1743 }
1744 }
1745 if (var18){
1746 /* <var_new_child:nullable ANode> isa TKwend */
1747 cltype24 = type_nit__TKwend.color;
1748 idtype25 = type_nit__TKwend.id;
1749 if(var_new_child == NULL) {
1750 var23 = 0;
1751 } else {
1752 if(cltype24 >= var_new_child->type->table_size) {
1753 var23 = 0;
1754 } else {
1755 var23 = var_new_child->type->type_table[cltype24] == idtype25;
1756 }
1757 }
1758 if (unlikely(!var23)) {
1759 var_class_name26 = var_new_child == NULL ? "null" : var_new_child->type->name;
1760 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwend", var_class_name26);
1761 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 238);
1762 show_backtrace(1);
1763 }
1764 {
1765 nit__parser_prod___ANoImport___n_kwend_61d(self, var_new_child); /* Direct call parser_prod#ANoImport#n_kwend= on <self:ANoImport>*/
1766 }
1767 goto RET_LABEL;
1768 } else {
1769 }
1770 RET_LABEL:;
1771 }
1772 /* method parser_prod#ANoImport#n_visibility= for (self: ANoImport, AVisibility) */
1773 void nit__parser_prod___ANoImport___nit__parser_nodes__AImport__n_visibility_61d(val* self, val* p0) {
1774 val* var_node /* var node: AVisibility */;
1775 var_node = p0;
1776 self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val = var_node; /* _n_visibility on <self:ANoImport> */
1777 {
1778 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AVisibility> */
1779 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AVisibility> */
1780 RET_LABEL1:(void)0;
1781 }
1782 }
1783 RET_LABEL:;
1784 }
1785 /* method parser_prod#ANoImport#n_kwimport= for (self: ANoImport, TKwimport) */
1786 void nit__parser_prod___ANoImport___nit__parser_nodes__AImport__n_kwimport_61d(val* self, val* p0) {
1787 val* var_node /* var node: TKwimport */;
1788 var_node = p0;
1789 self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val = var_node; /* _n_kwimport on <self:ANoImport> */
1790 {
1791 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwimport> */
1792 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwimport> */
1793 RET_LABEL1:(void)0;
1794 }
1795 }
1796 RET_LABEL:;
1797 }
1798 /* method parser_prod#ANoImport#n_kwend= for (self: ANoImport, TKwend) */
1799 void nit__parser_prod___ANoImport___n_kwend_61d(val* self, val* p0) {
1800 val* var_node /* var node: TKwend */;
1801 var_node = p0;
1802 self->attrs[COLOR_nit__parser_nodes__ANoImport___n_kwend].val = var_node; /* _n_kwend on <self:ANoImport> */
1803 {
1804 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwend> */
1805 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwend> */
1806 RET_LABEL1:(void)0;
1807 }
1808 }
1809 RET_LABEL:;
1810 }
1811 /* method parser_prod#ANoImport#visit_all for (self: ANoImport, Visitor) */
1812 void nit__parser_prod___ANoImport___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
1813 val* var_v /* var v: Visitor */;
1814 val* var /* : AVisibility */;
1815 val* var1 /* : TKwimport */;
1816 val* var2 /* : TKwend */;
1817 var_v = p0;
1818 var = self->attrs[COLOR_nit__parser_nodes__AImport___n_visibility].val; /* _n_visibility on <self:ANoImport> */
1819 if (unlikely(var == NULL)) {
1820 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_visibility");
1821 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 262);
1822 show_backtrace(1);
1823 }
1824 {
1825 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1826 }
1827 var1 = self->attrs[COLOR_nit__parser_nodes__AImport___n_kwimport].val; /* _n_kwimport on <self:ANoImport> */
1828 if (unlikely(var1 == NULL)) {
1829 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwimport");
1830 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 263);
1831 show_backtrace(1);
1832 }
1833 {
1834 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1835 }
1836 var2 = self->attrs[COLOR_nit__parser_nodes__ANoImport___n_kwend].val; /* _n_kwend on <self:ANoImport> */
1837 if (unlikely(var2 == NULL)) {
1838 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
1839 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 264);
1840 show_backtrace(1);
1841 }
1842 {
1843 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1844 }
1845 RET_LABEL:;
1846 }
1847 /* method parser_prod#APublicVisibility#init_apublicvisibility for (self: APublicVisibility, nullable TKwpublic) */
1848 void nit__parser_prod___APublicVisibility___init_apublicvisibility(val* self, val* p0) {
1849 val* var_n_kwpublic /* var n_kwpublic: nullable TKwpublic */;
1850 val* var /* : null */;
1851 short int var1 /* : Bool */;
1852 short int var2 /* : Bool */;
1853 val* var_other /* var other: nullable Object */;
1854 short int var4 /* : Bool */;
1855 short int var5 /* : Bool */;
1856 var_n_kwpublic = p0;
1857 self->attrs[COLOR_nit__parser_nodes__APublicVisibility___n_kwpublic].val = var_n_kwpublic; /* _n_kwpublic on <self:APublicVisibility> */
1858 var = NULL;
1859 if (var_n_kwpublic == NULL) {
1860 var1 = 0; /* is null */
1861 } else {
1862 var1 = 1; /* arg is null and recv is not */
1863 }
1864 if (0) {
1865 { /* Inline kernel#Object#!= (var_n_kwpublic,var) on <var_n_kwpublic:nullable TKwpublic> */
1866 var_other = var;
1867 {
1868 var4 = ((short int (*)(val* self, val* p0))(var_n_kwpublic->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwpublic, var_other) /* == on <var_n_kwpublic:nullable TKwpublic(TKwpublic)>*/;
1869 }
1870 var5 = !var4;
1871 var2 = var5;
1872 goto RET_LABEL3;
1873 RET_LABEL3:(void)0;
1874 }
1875 var1 = var2;
1876 }
1877 if (var1){
1878 {
1879 { /* Inline parser_nodes#ANode#parent= (var_n_kwpublic,self) on <var_n_kwpublic:nullable TKwpublic(TKwpublic)> */
1880 var_n_kwpublic->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwpublic:nullable TKwpublic(TKwpublic)> */
1881 RET_LABEL6:(void)0;
1882 }
1883 }
1884 } else {
1885 }
1886 RET_LABEL:;
1887 }
1888 /* method parser_prod#APublicVisibility#replace_child for (self: APublicVisibility, ANode, nullable ANode) */
1889 void nit__parser_prod___APublicVisibility___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
1890 val* var_old_child /* var old_child: ANode */;
1891 val* var_new_child /* var new_child: nullable ANode */;
1892 val* var /* : nullable TKwpublic */;
1893 short int var1 /* : Bool */;
1894 short int var2 /* : Bool */;
1895 val* var_other /* var other: nullable Object */;
1896 short int var4 /* : Bool */;
1897 short int var6 /* : Bool */;
1898 short int var7 /* : Bool */;
1899 int cltype;
1900 int idtype;
1901 const char* var_class_name;
1902 var_old_child = p0;
1903 var_new_child = p1;
1904 var = self->attrs[COLOR_nit__parser_nodes__APublicVisibility___n_kwpublic].val; /* _n_kwpublic on <self:APublicVisibility> */
1905 if (var == NULL) {
1906 var1 = 0; /* <var_old_child:ANode> cannot be null */
1907 } else {
1908 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TKwpublic> */
1909 var_other = var_old_child;
1910 {
1911 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TKwpublic(TKwpublic)> */
1912 var6 = var == var_other;
1913 var4 = var6;
1914 goto RET_LABEL5;
1915 RET_LABEL5:(void)0;
1916 }
1917 }
1918 var2 = var4;
1919 goto RET_LABEL3;
1920 RET_LABEL3:(void)0;
1921 }
1922 var1 = var2;
1923 }
1924 if (var1){
1925 /* <var_new_child:nullable ANode> isa nullable TKwpublic */
1926 cltype = type_nullable__nit__TKwpublic.color;
1927 idtype = type_nullable__nit__TKwpublic.id;
1928 if(var_new_child == NULL) {
1929 var7 = 1;
1930 } else {
1931 if(cltype >= var_new_child->type->table_size) {
1932 var7 = 0;
1933 } else {
1934 var7 = var_new_child->type->type_table[cltype] == idtype;
1935 }
1936 }
1937 if (unlikely(!var7)) {
1938 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
1939 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwpublic", var_class_name);
1940 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 279);
1941 show_backtrace(1);
1942 }
1943 {
1944 nit__parser_prod___APublicVisibility___n_kwpublic_61d(self, var_new_child); /* Direct call parser_prod#APublicVisibility#n_kwpublic= on <self:APublicVisibility>*/
1945 }
1946 goto RET_LABEL;
1947 } else {
1948 }
1949 RET_LABEL:;
1950 }
1951 /* method parser_prod#APublicVisibility#n_kwpublic= for (self: APublicVisibility, nullable TKwpublic) */
1952 void nit__parser_prod___APublicVisibility___n_kwpublic_61d(val* self, val* p0) {
1953 val* var_node /* var node: nullable TKwpublic */;
1954 val* var /* : null */;
1955 short int var1 /* : Bool */;
1956 short int var2 /* : Bool */;
1957 val* var_other /* var other: nullable Object */;
1958 short int var4 /* : Bool */;
1959 short int var5 /* : Bool */;
1960 var_node = p0;
1961 self->attrs[COLOR_nit__parser_nodes__APublicVisibility___n_kwpublic].val = var_node; /* _n_kwpublic on <self:APublicVisibility> */
1962 var = NULL;
1963 if (var_node == NULL) {
1964 var1 = 0; /* is null */
1965 } else {
1966 var1 = 1; /* arg is null and recv is not */
1967 }
1968 if (0) {
1969 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwpublic> */
1970 var_other = var;
1971 {
1972 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwpublic(TKwpublic)>*/;
1973 }
1974 var5 = !var4;
1975 var2 = var5;
1976 goto RET_LABEL3;
1977 RET_LABEL3:(void)0;
1978 }
1979 var1 = var2;
1980 }
1981 if (var1){
1982 {
1983 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwpublic(TKwpublic)> */
1984 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwpublic(TKwpublic)> */
1985 RET_LABEL6:(void)0;
1986 }
1987 }
1988 } else {
1989 }
1990 RET_LABEL:;
1991 }
1992 /* method parser_prod#APublicVisibility#visit_all for (self: APublicVisibility, Visitor) */
1993 void nit__parser_prod___APublicVisibility___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
1994 val* var_v /* var v: Visitor */;
1995 val* var /* : nullable TKwpublic */;
1996 var_v = p0;
1997 var = self->attrs[COLOR_nit__parser_nodes__APublicVisibility___n_kwpublic].val; /* _n_kwpublic on <self:APublicVisibility> */
1998 {
1999 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2000 }
2001 RET_LABEL:;
2002 }
2003 /* method parser_prod#APrivateVisibility#init_aprivatevisibility for (self: APrivateVisibility, nullable TKwprivate) */
2004 void nit__parser_prod___APrivateVisibility___init_aprivatevisibility(val* self, val* p0) {
2005 val* var_n_kwprivate /* var n_kwprivate: nullable TKwprivate */;
2006 var_n_kwprivate = p0;
2007 if (unlikely(var_n_kwprivate == NULL)) {
2008 PRINT_ERROR("Runtime error: %s", "Cast failed");
2009 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 301);
2010 show_backtrace(1);
2011 }
2012 self->attrs[COLOR_nit__parser_nodes__APrivateVisibility___n_kwprivate].val = var_n_kwprivate; /* _n_kwprivate on <self:APrivateVisibility> */
2013 if (var_n_kwprivate == NULL) {
2014 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2015 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 302);
2016 show_backtrace(1);
2017 } else {
2018 { /* Inline parser_nodes#ANode#parent= (var_n_kwprivate,self) on <var_n_kwprivate:nullable TKwprivate> */
2019 if (unlikely(var_n_kwprivate == NULL)) {
2020 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2021 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2022 show_backtrace(1);
2023 }
2024 var_n_kwprivate->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwprivate:nullable TKwprivate> */
2025 RET_LABEL1:(void)0;
2026 }
2027 }
2028 RET_LABEL:;
2029 }
2030 /* method parser_prod#APrivateVisibility#replace_child for (self: APrivateVisibility, ANode, nullable ANode) */
2031 void nit__parser_prod___APrivateVisibility___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
2032 val* var_old_child /* var old_child: ANode */;
2033 val* var_new_child /* var new_child: nullable ANode */;
2034 val* var /* : TKwprivate */;
2035 short int var1 /* : Bool */;
2036 val* var_other /* var other: nullable Object */;
2037 short int var3 /* : Bool */;
2038 short int var5 /* : Bool */;
2039 short int var6 /* : Bool */;
2040 int cltype;
2041 int idtype;
2042 const char* var_class_name;
2043 var_old_child = p0;
2044 var_new_child = p1;
2045 var = self->attrs[COLOR_nit__parser_nodes__APrivateVisibility___n_kwprivate].val; /* _n_kwprivate on <self:APrivateVisibility> */
2046 if (unlikely(var == NULL)) {
2047 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprivate");
2048 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 307);
2049 show_backtrace(1);
2050 }
2051 {
2052 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwprivate> */
2053 var_other = var_old_child;
2054 {
2055 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwprivate> */
2056 var5 = var == var_other;
2057 var3 = var5;
2058 goto RET_LABEL4;
2059 RET_LABEL4:(void)0;
2060 }
2061 }
2062 var1 = var3;
2063 goto RET_LABEL2;
2064 RET_LABEL2:(void)0;
2065 }
2066 }
2067 if (var1){
2068 /* <var_new_child:nullable ANode> isa TKwprivate */
2069 cltype = type_nit__TKwprivate.color;
2070 idtype = type_nit__TKwprivate.id;
2071 if(var_new_child == NULL) {
2072 var6 = 0;
2073 } else {
2074 if(cltype >= var_new_child->type->table_size) {
2075 var6 = 0;
2076 } else {
2077 var6 = var_new_child->type->type_table[cltype] == idtype;
2078 }
2079 }
2080 if (unlikely(!var6)) {
2081 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2082 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwprivate", var_class_name);
2083 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 308);
2084 show_backtrace(1);
2085 }
2086 {
2087 nit__parser_prod___APrivateVisibility___n_kwprivate_61d(self, var_new_child); /* Direct call parser_prod#APrivateVisibility#n_kwprivate= on <self:APrivateVisibility>*/
2088 }
2089 goto RET_LABEL;
2090 } else {
2091 }
2092 RET_LABEL:;
2093 }
2094 /* method parser_prod#APrivateVisibility#n_kwprivate= for (self: APrivateVisibility, TKwprivate) */
2095 void nit__parser_prod___APrivateVisibility___n_kwprivate_61d(val* self, val* p0) {
2096 val* var_node /* var node: TKwprivate */;
2097 var_node = p0;
2098 self->attrs[COLOR_nit__parser_nodes__APrivateVisibility___n_kwprivate].val = var_node; /* _n_kwprivate on <self:APrivateVisibility> */
2099 {
2100 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwprivate> */
2101 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwprivate> */
2102 RET_LABEL1:(void)0;
2103 }
2104 }
2105 RET_LABEL:;
2106 }
2107 /* method parser_prod#APrivateVisibility#visit_all for (self: APrivateVisibility, Visitor) */
2108 void nit__parser_prod___APrivateVisibility___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
2109 val* var_v /* var v: Visitor */;
2110 val* var /* : TKwprivate */;
2111 var_v = p0;
2112 var = self->attrs[COLOR_nit__parser_nodes__APrivateVisibility___n_kwprivate].val; /* _n_kwprivate on <self:APrivateVisibility> */
2113 if (unlikely(var == NULL)) {
2114 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprivate");
2115 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 322);
2116 show_backtrace(1);
2117 }
2118 {
2119 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2120 }
2121 RET_LABEL:;
2122 }
2123 /* method parser_prod#AProtectedVisibility#init_aprotectedvisibility for (self: AProtectedVisibility, nullable TKwprotected) */
2124 void nit__parser_prod___AProtectedVisibility___init_aprotectedvisibility(val* self, val* p0) {
2125 val* var_n_kwprotected /* var n_kwprotected: nullable TKwprotected */;
2126 var_n_kwprotected = p0;
2127 if (unlikely(var_n_kwprotected == NULL)) {
2128 PRINT_ERROR("Runtime error: %s", "Cast failed");
2129 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 330);
2130 show_backtrace(1);
2131 }
2132 self->attrs[COLOR_nit__parser_nodes__AProtectedVisibility___n_kwprotected].val = var_n_kwprotected; /* _n_kwprotected on <self:AProtectedVisibility> */
2133 if (var_n_kwprotected == NULL) {
2134 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2135 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 331);
2136 show_backtrace(1);
2137 } else {
2138 { /* Inline parser_nodes#ANode#parent= (var_n_kwprotected,self) on <var_n_kwprotected:nullable TKwprotected> */
2139 if (unlikely(var_n_kwprotected == NULL)) {
2140 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2141 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2142 show_backtrace(1);
2143 }
2144 var_n_kwprotected->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwprotected:nullable TKwprotected> */
2145 RET_LABEL1:(void)0;
2146 }
2147 }
2148 RET_LABEL:;
2149 }
2150 /* method parser_prod#AProtectedVisibility#replace_child for (self: AProtectedVisibility, ANode, nullable ANode) */
2151 void nit__parser_prod___AProtectedVisibility___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
2152 val* var_old_child /* var old_child: ANode */;
2153 val* var_new_child /* var new_child: nullable ANode */;
2154 val* var /* : TKwprotected */;
2155 short int var1 /* : Bool */;
2156 val* var_other /* var other: nullable Object */;
2157 short int var3 /* : Bool */;
2158 short int var5 /* : Bool */;
2159 short int var6 /* : Bool */;
2160 int cltype;
2161 int idtype;
2162 const char* var_class_name;
2163 var_old_child = p0;
2164 var_new_child = p1;
2165 var = self->attrs[COLOR_nit__parser_nodes__AProtectedVisibility___n_kwprotected].val; /* _n_kwprotected on <self:AProtectedVisibility> */
2166 if (unlikely(var == NULL)) {
2167 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprotected");
2168 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 336);
2169 show_backtrace(1);
2170 }
2171 {
2172 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwprotected> */
2173 var_other = var_old_child;
2174 {
2175 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwprotected> */
2176 var5 = var == var_other;
2177 var3 = var5;
2178 goto RET_LABEL4;
2179 RET_LABEL4:(void)0;
2180 }
2181 }
2182 var1 = var3;
2183 goto RET_LABEL2;
2184 RET_LABEL2:(void)0;
2185 }
2186 }
2187 if (var1){
2188 /* <var_new_child:nullable ANode> isa TKwprotected */
2189 cltype = type_nit__TKwprotected.color;
2190 idtype = type_nit__TKwprotected.id;
2191 if(var_new_child == NULL) {
2192 var6 = 0;
2193 } else {
2194 if(cltype >= var_new_child->type->table_size) {
2195 var6 = 0;
2196 } else {
2197 var6 = var_new_child->type->type_table[cltype] == idtype;
2198 }
2199 }
2200 if (unlikely(!var6)) {
2201 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2202 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwprotected", var_class_name);
2203 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 337);
2204 show_backtrace(1);
2205 }
2206 {
2207 nit__parser_prod___AProtectedVisibility___n_kwprotected_61d(self, var_new_child); /* Direct call parser_prod#AProtectedVisibility#n_kwprotected= on <self:AProtectedVisibility>*/
2208 }
2209 goto RET_LABEL;
2210 } else {
2211 }
2212 RET_LABEL:;
2213 }
2214 /* method parser_prod#AProtectedVisibility#n_kwprotected= for (self: AProtectedVisibility, TKwprotected) */
2215 void nit__parser_prod___AProtectedVisibility___n_kwprotected_61d(val* self, val* p0) {
2216 val* var_node /* var node: TKwprotected */;
2217 var_node = p0;
2218 self->attrs[COLOR_nit__parser_nodes__AProtectedVisibility___n_kwprotected].val = var_node; /* _n_kwprotected on <self:AProtectedVisibility> */
2219 {
2220 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwprotected> */
2221 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwprotected> */
2222 RET_LABEL1:(void)0;
2223 }
2224 }
2225 RET_LABEL:;
2226 }
2227 /* method parser_prod#AProtectedVisibility#visit_all for (self: AProtectedVisibility, Visitor) */
2228 void nit__parser_prod___AProtectedVisibility___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
2229 val* var_v /* var v: Visitor */;
2230 val* var /* : TKwprotected */;
2231 var_v = p0;
2232 var = self->attrs[COLOR_nit__parser_nodes__AProtectedVisibility___n_kwprotected].val; /* _n_kwprotected on <self:AProtectedVisibility> */
2233 if (unlikely(var == NULL)) {
2234 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwprotected");
2235 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 351);
2236 show_backtrace(1);
2237 }
2238 {
2239 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2240 }
2241 RET_LABEL:;
2242 }
2243 /* method parser_prod#AIntrudeVisibility#init_aintrudevisibility for (self: AIntrudeVisibility, nullable TKwintrude) */
2244 void nit__parser_prod___AIntrudeVisibility___init_aintrudevisibility(val* self, val* p0) {
2245 val* var_n_kwintrude /* var n_kwintrude: nullable TKwintrude */;
2246 var_n_kwintrude = p0;
2247 if (unlikely(var_n_kwintrude == NULL)) {
2248 PRINT_ERROR("Runtime error: %s", "Cast failed");
2249 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 359);
2250 show_backtrace(1);
2251 }
2252 self->attrs[COLOR_nit__parser_nodes__AIntrudeVisibility___n_kwintrude].val = var_n_kwintrude; /* _n_kwintrude on <self:AIntrudeVisibility> */
2253 if (var_n_kwintrude == NULL) {
2254 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2255 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 360);
2256 show_backtrace(1);
2257 } else {
2258 { /* Inline parser_nodes#ANode#parent= (var_n_kwintrude,self) on <var_n_kwintrude:nullable TKwintrude> */
2259 if (unlikely(var_n_kwintrude == NULL)) {
2260 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2261 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2262 show_backtrace(1);
2263 }
2264 var_n_kwintrude->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwintrude:nullable TKwintrude> */
2265 RET_LABEL1:(void)0;
2266 }
2267 }
2268 RET_LABEL:;
2269 }
2270 /* method parser_prod#AIntrudeVisibility#replace_child for (self: AIntrudeVisibility, ANode, nullable ANode) */
2271 void nit__parser_prod___AIntrudeVisibility___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
2272 val* var_old_child /* var old_child: ANode */;
2273 val* var_new_child /* var new_child: nullable ANode */;
2274 val* var /* : TKwintrude */;
2275 short int var1 /* : Bool */;
2276 val* var_other /* var other: nullable Object */;
2277 short int var3 /* : Bool */;
2278 short int var5 /* : Bool */;
2279 short int var6 /* : Bool */;
2280 int cltype;
2281 int idtype;
2282 const char* var_class_name;
2283 var_old_child = p0;
2284 var_new_child = p1;
2285 var = self->attrs[COLOR_nit__parser_nodes__AIntrudeVisibility___n_kwintrude].val; /* _n_kwintrude on <self:AIntrudeVisibility> */
2286 if (unlikely(var == NULL)) {
2287 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwintrude");
2288 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 365);
2289 show_backtrace(1);
2290 }
2291 {
2292 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwintrude> */
2293 var_other = var_old_child;
2294 {
2295 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwintrude> */
2296 var5 = var == var_other;
2297 var3 = var5;
2298 goto RET_LABEL4;
2299 RET_LABEL4:(void)0;
2300 }
2301 }
2302 var1 = var3;
2303 goto RET_LABEL2;
2304 RET_LABEL2:(void)0;
2305 }
2306 }
2307 if (var1){
2308 /* <var_new_child:nullable ANode> isa TKwintrude */
2309 cltype = type_nit__TKwintrude.color;
2310 idtype = type_nit__TKwintrude.id;
2311 if(var_new_child == NULL) {
2312 var6 = 0;
2313 } else {
2314 if(cltype >= var_new_child->type->table_size) {
2315 var6 = 0;
2316 } else {
2317 var6 = var_new_child->type->type_table[cltype] == idtype;
2318 }
2319 }
2320 if (unlikely(!var6)) {
2321 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2322 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwintrude", var_class_name);
2323 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 366);
2324 show_backtrace(1);
2325 }
2326 {
2327 nit__parser_prod___AIntrudeVisibility___n_kwintrude_61d(self, var_new_child); /* Direct call parser_prod#AIntrudeVisibility#n_kwintrude= on <self:AIntrudeVisibility>*/
2328 }
2329 goto RET_LABEL;
2330 } else {
2331 }
2332 RET_LABEL:;
2333 }
2334 /* method parser_prod#AIntrudeVisibility#n_kwintrude= for (self: AIntrudeVisibility, TKwintrude) */
2335 void nit__parser_prod___AIntrudeVisibility___n_kwintrude_61d(val* self, val* p0) {
2336 val* var_node /* var node: TKwintrude */;
2337 var_node = p0;
2338 self->attrs[COLOR_nit__parser_nodes__AIntrudeVisibility___n_kwintrude].val = var_node; /* _n_kwintrude on <self:AIntrudeVisibility> */
2339 {
2340 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwintrude> */
2341 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwintrude> */
2342 RET_LABEL1:(void)0;
2343 }
2344 }
2345 RET_LABEL:;
2346 }
2347 /* method parser_prod#AIntrudeVisibility#visit_all for (self: AIntrudeVisibility, Visitor) */
2348 void nit__parser_prod___AIntrudeVisibility___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
2349 val* var_v /* var v: Visitor */;
2350 val* var /* : TKwintrude */;
2351 var_v = p0;
2352 var = self->attrs[COLOR_nit__parser_nodes__AIntrudeVisibility___n_kwintrude].val; /* _n_kwintrude on <self:AIntrudeVisibility> */
2353 if (unlikely(var == NULL)) {
2354 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwintrude");
2355 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 380);
2356 show_backtrace(1);
2357 }
2358 {
2359 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2360 }
2361 RET_LABEL:;
2362 }
2363 /* method parser_prod#AStdClassdef#init_astdclassdef for (self: AStdClassdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AClasskind, nullable TClassid, Collection[Object], nullable AAnnotations, nullable AExternCodeBlock, Collection[Object], Collection[Object], nullable TKwend) */
2364 void nit__parser_prod___AStdClassdef___init_astdclassdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10) {
2365 val* var_n_doc /* var n_doc: nullable ADoc */;
2366 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
2367 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
2368 val* var_n_classkind /* var n_classkind: nullable AClasskind */;
2369 val* var_n_id /* var n_id: nullable TClassid */;
2370 val* var_n_formaldefs /* var n_formaldefs: Collection[Object] */;
2371 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
2372 val* var_n_extern_code_block /* var n_extern_code_block: nullable AExternCodeBlock */;
2373 val* var_n_superclasses /* var n_superclasses: Collection[Object] */;
2374 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
2375 val* var_n_kwend /* var n_kwend: nullable TKwend */;
2376 val* var /* : null */;
2377 short int var1 /* : Bool */;
2378 short int var2 /* : Bool */;
2379 val* var_other /* var other: nullable Object */;
2380 short int var4 /* : Bool */;
2381 short int var5 /* : Bool */;
2382 val* var7 /* : null */;
2383 short int var8 /* : Bool */;
2384 short int var9 /* : Bool */;
2385 short int var11 /* : Bool */;
2386 short int var12 /* : Bool */;
2387 val* var16 /* : null */;
2388 short int var17 /* : Bool */;
2389 short int var18 /* : Bool */;
2390 short int var20 /* : Bool */;
2391 short int var21 /* : Bool */;
2392 val* var23 /* : ANodes[AFormaldef] */;
2393 val* var25 /* : ANodes[AFormaldef] */;
2394 val* var26 /* : null */;
2395 short int var27 /* : Bool */;
2396 short int var28 /* : Bool */;
2397 short int var30 /* : Bool */;
2398 short int var31 /* : Bool */;
2399 val* var33 /* : null */;
2400 short int var34 /* : Bool */;
2401 short int var35 /* : Bool */;
2402 short int var37 /* : Bool */;
2403 short int var38 /* : Bool */;
2404 val* var40 /* : ANodes[ASuperclass] */;
2405 val* var42 /* : ANodes[ASuperclass] */;
2406 val* var43 /* : ANodes[APropdef] */;
2407 val* var45 /* : ANodes[APropdef] */;
2408 var_n_doc = p0;
2409 var_n_kwredef = p1;
2410 var_n_visibility = p2;
2411 var_n_classkind = p3;
2412 var_n_id = p4;
2413 var_n_formaldefs = p5;
2414 var_n_annotations = p6;
2415 var_n_extern_code_block = p7;
2416 var_n_superclasses = p8;
2417 var_n_propdefs = p9;
2418 var_n_kwend = p10;
2419 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_n_doc; /* _n_doc on <self:AStdClassdef> */
2420 var = NULL;
2421 if (var_n_doc == NULL) {
2422 var1 = 0; /* is null */
2423 } else {
2424 var1 = 1; /* arg is null and recv is not */
2425 }
2426 if (0) {
2427 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
2428 var_other = var;
2429 {
2430 var4 = ((short int (*)(val* self, val* p0))(var_n_doc->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
2431 }
2432 var5 = !var4;
2433 var2 = var5;
2434 goto RET_LABEL3;
2435 RET_LABEL3:(void)0;
2436 }
2437 var1 = var2;
2438 }
2439 if (var1){
2440 {
2441 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
2442 var_n_doc->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
2443 RET_LABEL6:(void)0;
2444 }
2445 }
2446 } else {
2447 }
2448 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AStdClassdef> */
2449 var7 = NULL;
2450 if (var_n_kwredef == NULL) {
2451 var8 = 0; /* is null */
2452 } else {
2453 var8 = 1; /* arg is null and recv is not */
2454 }
2455 if (0) {
2456 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
2457 var_other = var7;
2458 {
2459 var11 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
2460 }
2461 var12 = !var11;
2462 var9 = var12;
2463 goto RET_LABEL10;
2464 RET_LABEL10:(void)0;
2465 }
2466 var8 = var9;
2467 }
2468 if (var8){
2469 {
2470 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2471 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2472 RET_LABEL13:(void)0;
2473 }
2474 }
2475 } else {
2476 }
2477 if (unlikely(var_n_visibility == NULL)) {
2478 PRINT_ERROR("Runtime error: %s", "Cast failed");
2479 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 402);
2480 show_backtrace(1);
2481 }
2482 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AStdClassdef> */
2483 if (var_n_visibility == NULL) {
2484 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2485 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 403);
2486 show_backtrace(1);
2487 } else {
2488 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
2489 if (unlikely(var_n_visibility == NULL)) {
2490 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2491 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2492 show_backtrace(1);
2493 }
2494 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
2495 RET_LABEL14:(void)0;
2496 }
2497 }
2498 if (unlikely(var_n_classkind == NULL)) {
2499 PRINT_ERROR("Runtime error: %s", "Cast failed");
2500 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 404);
2501 show_backtrace(1);
2502 }
2503 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_classkind].val = var_n_classkind; /* _n_classkind on <self:AStdClassdef> */
2504 if (var_n_classkind == NULL) {
2505 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2506 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 405);
2507 show_backtrace(1);
2508 } else {
2509 { /* Inline parser_nodes#ANode#parent= (var_n_classkind,self) on <var_n_classkind:nullable AClasskind> */
2510 if (unlikely(var_n_classkind == NULL)) {
2511 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2512 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2513 show_backtrace(1);
2514 }
2515 var_n_classkind->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_classkind:nullable AClasskind> */
2516 RET_LABEL15:(void)0;
2517 }
2518 }
2519 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_id].val = var_n_id; /* _n_id on <self:AStdClassdef> */
2520 var16 = NULL;
2521 if (var_n_id == NULL) {
2522 var17 = 0; /* is null */
2523 } else {
2524 var17 = 1; /* arg is null and recv is not */
2525 }
2526 if (0) {
2527 { /* Inline kernel#Object#!= (var_n_id,var16) on <var_n_id:nullable TClassid> */
2528 var_other = var16;
2529 {
2530 var20 = ((short int (*)(val* self, val* p0))(var_n_id->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_id, var_other) /* == on <var_n_id:nullable TClassid(TClassid)>*/;
2531 }
2532 var21 = !var20;
2533 var18 = var21;
2534 goto RET_LABEL19;
2535 RET_LABEL19:(void)0;
2536 }
2537 var17 = var18;
2538 }
2539 if (var17){
2540 {
2541 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid(TClassid)> */
2542 var_n_id->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid(TClassid)> */
2543 RET_LABEL22:(void)0;
2544 }
2545 }
2546 } else {
2547 }
2548 {
2549 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
2550 var25 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
2551 if (unlikely(var25 == NULL)) {
2552 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
2553 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1027);
2554 show_backtrace(1);
2555 }
2556 var23 = var25;
2557 RET_LABEL24:(void)0;
2558 }
2559 }
2560 {
2561 nit___nit__ANodes___unsafe_add_all(var23, var_n_formaldefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var23:ANodes[AFormaldef]>*/
2562 }
2563 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AStdClassdef> */
2564 var26 = NULL;
2565 if (var_n_annotations == NULL) {
2566 var27 = 0; /* is null */
2567 } else {
2568 var27 = 1; /* arg is null and recv is not */
2569 }
2570 if (0) {
2571 { /* Inline kernel#Object#!= (var_n_annotations,var26) on <var_n_annotations:nullable AAnnotations> */
2572 var_other = var26;
2573 {
2574 var30 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
2575 }
2576 var31 = !var30;
2577 var28 = var31;
2578 goto RET_LABEL29;
2579 RET_LABEL29:(void)0;
2580 }
2581 var27 = var28;
2582 }
2583 if (var27){
2584 {
2585 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2586 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2587 RET_LABEL32:(void)0;
2588 }
2589 }
2590 } else {
2591 }
2592 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_extern_code_block].val = var_n_extern_code_block; /* _n_extern_code_block on <self:AStdClassdef> */
2593 var33 = NULL;
2594 if (var_n_extern_code_block == NULL) {
2595 var34 = 0; /* is null */
2596 } else {
2597 var34 = 1; /* arg is null and recv is not */
2598 }
2599 if (0) {
2600 { /* Inline kernel#Object#!= (var_n_extern_code_block,var33) on <var_n_extern_code_block:nullable AExternCodeBlock> */
2601 var_other = var33;
2602 {
2603 var37 = ((short int (*)(val* self, val* p0))(var_n_extern_code_block->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_extern_code_block, var_other) /* == on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)>*/;
2604 }
2605 var38 = !var37;
2606 var35 = var38;
2607 goto RET_LABEL36;
2608 RET_LABEL36:(void)0;
2609 }
2610 var34 = var35;
2611 }
2612 if (var34){
2613 {
2614 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_block,self) on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
2615 var_n_extern_code_block->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
2616 RET_LABEL39:(void)0;
2617 }
2618 }
2619 } else {
2620 }
2621 {
2622 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
2623 var42 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
2624 if (unlikely(var42 == NULL)) {
2625 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
2626 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1033);
2627 show_backtrace(1);
2628 }
2629 var40 = var42;
2630 RET_LABEL41:(void)0;
2631 }
2632 }
2633 {
2634 nit___nit__ANodes___unsafe_add_all(var40, var_n_superclasses); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var40:ANodes[ASuperclass]>*/
2635 }
2636 {
2637 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
2638 var45 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
2639 if (unlikely(var45 == NULL)) {
2640 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
2641 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
2642 show_backtrace(1);
2643 }
2644 var43 = var45;
2645 RET_LABEL44:(void)0;
2646 }
2647 }
2648 {
2649 nit___nit__ANodes___unsafe_add_all(var43, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var43:ANodes[APropdef]>*/
2650 }
2651 if (unlikely(var_n_kwend == NULL)) {
2652 PRINT_ERROR("Runtime error: %s", "Cast failed");
2653 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 415);
2654 show_backtrace(1);
2655 }
2656 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_kwend].val = var_n_kwend; /* _n_kwend on <self:AStdClassdef> */
2657 if (var_n_kwend == NULL) {
2658 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2659 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 416);
2660 show_backtrace(1);
2661 } else {
2662 { /* Inline parser_nodes#ANode#parent= (var_n_kwend,self) on <var_n_kwend:nullable TKwend> */
2663 if (unlikely(var_n_kwend == NULL)) {
2664 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2665 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
2666 show_backtrace(1);
2667 }
2668 var_n_kwend->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwend:nullable TKwend> */
2669 RET_LABEL46:(void)0;
2670 }
2671 }
2672 RET_LABEL:;
2673 }
2674 /* method parser_prod#AStdClassdef#replace_child for (self: AStdClassdef, ANode, nullable ANode) */
2675 void nit__parser_prod___AStdClassdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
2676 val* var_old_child /* var old_child: ANode */;
2677 val* var_new_child /* var new_child: nullable ANode */;
2678 val* var /* : nullable ADoc */;
2679 short int var1 /* : Bool */;
2680 short int var2 /* : Bool */;
2681 val* var_other /* var other: nullable Object */;
2682 short int var4 /* : Bool */;
2683 short int var6 /* : Bool */;
2684 short int var7 /* : Bool */;
2685 int cltype;
2686 int idtype;
2687 const char* var_class_name;
2688 val* var8 /* : nullable TKwredef */;
2689 short int var9 /* : Bool */;
2690 short int var10 /* : Bool */;
2691 short int var12 /* : Bool */;
2692 short int var14 /* : Bool */;
2693 short int var15 /* : Bool */;
2694 int cltype16;
2695 int idtype17;
2696 const char* var_class_name18;
2697 val* var19 /* : nullable AVisibility */;
2698 short int var20 /* : Bool */;
2699 short int var21 /* : Bool */;
2700 short int var23 /* : Bool */;
2701 short int var25 /* : Bool */;
2702 short int var26 /* : Bool */;
2703 int cltype27;
2704 int idtype28;
2705 const char* var_class_name29;
2706 val* var30 /* : AClasskind */;
2707 short int var31 /* : Bool */;
2708 short int var33 /* : Bool */;
2709 short int var35 /* : Bool */;
2710 short int var36 /* : Bool */;
2711 int cltype37;
2712 int idtype38;
2713 const char* var_class_name39;
2714 val* var40 /* : nullable TClassid */;
2715 short int var41 /* : Bool */;
2716 short int var42 /* : Bool */;
2717 short int var44 /* : Bool */;
2718 short int var46 /* : Bool */;
2719 short int var47 /* : Bool */;
2720 int cltype48;
2721 int idtype49;
2722 const char* var_class_name50;
2723 val* var51 /* : ANodes[AFormaldef] */;
2724 val* var53 /* : ANodes[AFormaldef] */;
2725 short int var54 /* : Bool */;
2726 val* var55 /* : nullable AAnnotations */;
2727 short int var56 /* : Bool */;
2728 short int var57 /* : Bool */;
2729 short int var59 /* : Bool */;
2730 short int var61 /* : Bool */;
2731 short int var62 /* : Bool */;
2732 int cltype63;
2733 int idtype64;
2734 const char* var_class_name65;
2735 val* var66 /* : nullable AExternCodeBlock */;
2736 short int var67 /* : Bool */;
2737 short int var68 /* : Bool */;
2738 short int var70 /* : Bool */;
2739 short int var72 /* : Bool */;
2740 short int var73 /* : Bool */;
2741 int cltype74;
2742 int idtype75;
2743 const char* var_class_name76;
2744 val* var77 /* : ANodes[ASuperclass] */;
2745 val* var79 /* : ANodes[ASuperclass] */;
2746 short int var80 /* : Bool */;
2747 val* var81 /* : ANodes[APropdef] */;
2748 val* var83 /* : ANodes[APropdef] */;
2749 short int var84 /* : Bool */;
2750 val* var85 /* : TKwend */;
2751 short int var86 /* : Bool */;
2752 short int var88 /* : Bool */;
2753 short int var90 /* : Bool */;
2754 short int var91 /* : Bool */;
2755 int cltype92;
2756 int idtype93;
2757 const char* var_class_name94;
2758 var_old_child = p0;
2759 var_new_child = p1;
2760 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AStdClassdef> */
2761 if (var == NULL) {
2762 var1 = 0; /* <var_old_child:ANode> cannot be null */
2763 } else {
2764 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
2765 var_other = var_old_child;
2766 {
2767 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
2768 var6 = var == var_other;
2769 var4 = var6;
2770 goto RET_LABEL5;
2771 RET_LABEL5:(void)0;
2772 }
2773 }
2774 var2 = var4;
2775 goto RET_LABEL3;
2776 RET_LABEL3:(void)0;
2777 }
2778 var1 = var2;
2779 }
2780 if (var1){
2781 /* <var_new_child:nullable ANode> isa nullable ADoc */
2782 cltype = type_nullable__nit__ADoc.color;
2783 idtype = type_nullable__nit__ADoc.id;
2784 if(var_new_child == NULL) {
2785 var7 = 1;
2786 } else {
2787 if(cltype >= var_new_child->type->table_size) {
2788 var7 = 0;
2789 } else {
2790 var7 = var_new_child->type->type_table[cltype] == idtype;
2791 }
2792 }
2793 if (unlikely(!var7)) {
2794 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
2795 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
2796 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 422);
2797 show_backtrace(1);
2798 }
2799 {
2800 nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_doc= on <self:AStdClassdef>*/
2801 }
2802 goto RET_LABEL;
2803 } else {
2804 }
2805 var8 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AStdClassdef> */
2806 if (var8 == NULL) {
2807 var9 = 0; /* <var_old_child:ANode> cannot be null */
2808 } else {
2809 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
2810 var_other = var_old_child;
2811 {
2812 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
2813 var14 = var8 == var_other;
2814 var12 = var14;
2815 goto RET_LABEL13;
2816 RET_LABEL13:(void)0;
2817 }
2818 }
2819 var10 = var12;
2820 goto RET_LABEL11;
2821 RET_LABEL11:(void)0;
2822 }
2823 var9 = var10;
2824 }
2825 if (var9){
2826 /* <var_new_child:nullable ANode> isa nullable TKwredef */
2827 cltype16 = type_nullable__nit__TKwredef.color;
2828 idtype17 = type_nullable__nit__TKwredef.id;
2829 if(var_new_child == NULL) {
2830 var15 = 1;
2831 } else {
2832 if(cltype16 >= var_new_child->type->table_size) {
2833 var15 = 0;
2834 } else {
2835 var15 = var_new_child->type->type_table[cltype16] == idtype17;
2836 }
2837 }
2838 if (unlikely(!var15)) {
2839 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
2840 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
2841 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 426);
2842 show_backtrace(1);
2843 }
2844 {
2845 nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_kwredef= on <self:AStdClassdef>*/
2846 }
2847 goto RET_LABEL;
2848 } else {
2849 }
2850 var19 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AStdClassdef> */
2851 if (var19 == NULL) {
2852 var20 = 0; /* <var_old_child:ANode> cannot be null */
2853 } else {
2854 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
2855 var_other = var_old_child;
2856 {
2857 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
2858 var25 = var19 == var_other;
2859 var23 = var25;
2860 goto RET_LABEL24;
2861 RET_LABEL24:(void)0;
2862 }
2863 }
2864 var21 = var23;
2865 goto RET_LABEL22;
2866 RET_LABEL22:(void)0;
2867 }
2868 var20 = var21;
2869 }
2870 if (var20){
2871 /* <var_new_child:nullable ANode> isa AVisibility */
2872 cltype27 = type_nit__AVisibility.color;
2873 idtype28 = type_nit__AVisibility.id;
2874 if(var_new_child == NULL) {
2875 var26 = 0;
2876 } else {
2877 if(cltype27 >= var_new_child->type->table_size) {
2878 var26 = 0;
2879 } else {
2880 var26 = var_new_child->type->type_table[cltype27] == idtype28;
2881 }
2882 }
2883 if (unlikely(!var26)) {
2884 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
2885 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
2886 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 430);
2887 show_backtrace(1);
2888 }
2889 {
2890 nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_visibility= on <self:AStdClassdef>*/
2891 }
2892 goto RET_LABEL;
2893 } else {
2894 }
2895 var30 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_classkind].val; /* _n_classkind on <self:AStdClassdef> */
2896 if (unlikely(var30 == NULL)) {
2897 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classkind");
2898 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 433);
2899 show_backtrace(1);
2900 }
2901 {
2902 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:AClasskind> */
2903 var_other = var_old_child;
2904 {
2905 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:AClasskind> */
2906 var35 = var30 == var_other;
2907 var33 = var35;
2908 goto RET_LABEL34;
2909 RET_LABEL34:(void)0;
2910 }
2911 }
2912 var31 = var33;
2913 goto RET_LABEL32;
2914 RET_LABEL32:(void)0;
2915 }
2916 }
2917 if (var31){
2918 /* <var_new_child:nullable ANode> isa AClasskind */
2919 cltype37 = type_nit__AClasskind.color;
2920 idtype38 = type_nit__AClasskind.id;
2921 if(var_new_child == NULL) {
2922 var36 = 0;
2923 } else {
2924 if(cltype37 >= var_new_child->type->table_size) {
2925 var36 = 0;
2926 } else {
2927 var36 = var_new_child->type->type_table[cltype37] == idtype38;
2928 }
2929 }
2930 if (unlikely(!var36)) {
2931 var_class_name39 = var_new_child == NULL ? "null" : var_new_child->type->name;
2932 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AClasskind", var_class_name39);
2933 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 434);
2934 show_backtrace(1);
2935 }
2936 {
2937 nit__parser_prod___AStdClassdef___n_classkind_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_classkind= on <self:AStdClassdef>*/
2938 }
2939 goto RET_LABEL;
2940 } else {
2941 }
2942 var40 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_id].val; /* _n_id on <self:AStdClassdef> */
2943 if (var40 == NULL) {
2944 var41 = 0; /* <var_old_child:ANode> cannot be null */
2945 } else {
2946 { /* Inline kernel#Object#== (var40,var_old_child) on <var40:nullable TClassid> */
2947 var_other = var_old_child;
2948 {
2949 { /* Inline kernel#Object#is_same_instance (var40,var_other) on <var40:nullable TClassid(TClassid)> */
2950 var46 = var40 == var_other;
2951 var44 = var46;
2952 goto RET_LABEL45;
2953 RET_LABEL45:(void)0;
2954 }
2955 }
2956 var42 = var44;
2957 goto RET_LABEL43;
2958 RET_LABEL43:(void)0;
2959 }
2960 var41 = var42;
2961 }
2962 if (var41){
2963 /* <var_new_child:nullable ANode> isa nullable TClassid */
2964 cltype48 = type_nullable__nit__TClassid.color;
2965 idtype49 = type_nullable__nit__TClassid.id;
2966 if(var_new_child == NULL) {
2967 var47 = 1;
2968 } else {
2969 if(cltype48 >= var_new_child->type->table_size) {
2970 var47 = 0;
2971 } else {
2972 var47 = var_new_child->type->type_table[cltype48] == idtype49;
2973 }
2974 }
2975 if (unlikely(!var47)) {
2976 var_class_name50 = var_new_child == NULL ? "null" : var_new_child->type->name;
2977 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TClassid", var_class_name50);
2978 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 438);
2979 show_backtrace(1);
2980 }
2981 {
2982 nit__parser_prod___AStdClassdef___n_id_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_id= on <self:AStdClassdef>*/
2983 }
2984 goto RET_LABEL;
2985 } else {
2986 }
2987 {
2988 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
2989 var53 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
2990 if (unlikely(var53 == NULL)) {
2991 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
2992 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1027);
2993 show_backtrace(1);
2994 }
2995 var51 = var53;
2996 RET_LABEL52:(void)0;
2997 }
2998 }
2999 {
3000 var54 = nit___nit__ANodes___replace_child(var51, var_old_child, var_new_child);
3001 }
3002 if (var54){
3003 goto RET_LABEL;
3004 } else {
3005 }
3006 var55 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdClassdef> */
3007 if (var55 == NULL) {
3008 var56 = 0; /* <var_old_child:ANode> cannot be null */
3009 } else {
3010 { /* Inline kernel#Object#== (var55,var_old_child) on <var55:nullable AAnnotations> */
3011 var_other = var_old_child;
3012 {
3013 { /* Inline kernel#Object#is_same_instance (var55,var_other) on <var55:nullable AAnnotations(AAnnotations)> */
3014 var61 = var55 == var_other;
3015 var59 = var61;
3016 goto RET_LABEL60;
3017 RET_LABEL60:(void)0;
3018 }
3019 }
3020 var57 = var59;
3021 goto RET_LABEL58;
3022 RET_LABEL58:(void)0;
3023 }
3024 var56 = var57;
3025 }
3026 if (var56){
3027 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
3028 cltype63 = type_nullable__nit__AAnnotations.color;
3029 idtype64 = type_nullable__nit__AAnnotations.id;
3030 if(var_new_child == NULL) {
3031 var62 = 1;
3032 } else {
3033 if(cltype63 >= var_new_child->type->table_size) {
3034 var62 = 0;
3035 } else {
3036 var62 = var_new_child->type->type_table[cltype63] == idtype64;
3037 }
3038 }
3039 if (unlikely(!var62)) {
3040 var_class_name65 = var_new_child == NULL ? "null" : var_new_child->type->name;
3041 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name65);
3042 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 443);
3043 show_backtrace(1);
3044 }
3045 {
3046 nit__parser_prod___AStdClassdef___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_annotations= on <self:AStdClassdef>*/
3047 }
3048 goto RET_LABEL;
3049 } else {
3050 }
3051 var66 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AStdClassdef> */
3052 if (var66 == NULL) {
3053 var67 = 0; /* <var_old_child:ANode> cannot be null */
3054 } else {
3055 { /* Inline kernel#Object#== (var66,var_old_child) on <var66:nullable AExternCodeBlock> */
3056 var_other = var_old_child;
3057 {
3058 { /* Inline kernel#Object#is_same_instance (var66,var_other) on <var66:nullable AExternCodeBlock(AExternCodeBlock)> */
3059 var72 = var66 == var_other;
3060 var70 = var72;
3061 goto RET_LABEL71;
3062 RET_LABEL71:(void)0;
3063 }
3064 }
3065 var68 = var70;
3066 goto RET_LABEL69;
3067 RET_LABEL69:(void)0;
3068 }
3069 var67 = var68;
3070 }
3071 if (var67){
3072 /* <var_new_child:nullable ANode> isa nullable AExternCodeBlock */
3073 cltype74 = type_nullable__nit__AExternCodeBlock.color;
3074 idtype75 = type_nullable__nit__AExternCodeBlock.id;
3075 if(var_new_child == NULL) {
3076 var73 = 1;
3077 } else {
3078 if(cltype74 >= var_new_child->type->table_size) {
3079 var73 = 0;
3080 } else {
3081 var73 = var_new_child->type->type_table[cltype74] == idtype75;
3082 }
3083 }
3084 if (unlikely(!var73)) {
3085 var_class_name76 = var_new_child == NULL ? "null" : var_new_child->type->name;
3086 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCodeBlock", var_class_name76);
3087 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 447);
3088 show_backtrace(1);
3089 }
3090 {
3091 nit__parser_prod___AStdClassdef___n_extern_code_block_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_extern_code_block= on <self:AStdClassdef>*/
3092 }
3093 goto RET_LABEL;
3094 } else {
3095 }
3096 {
3097 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
3098 var79 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
3099 if (unlikely(var79 == NULL)) {
3100 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
3101 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1033);
3102 show_backtrace(1);
3103 }
3104 var77 = var79;
3105 RET_LABEL78:(void)0;
3106 }
3107 }
3108 {
3109 var80 = nit___nit__ANodes___replace_child(var77, var_old_child, var_new_child);
3110 }
3111 if (var80){
3112 goto RET_LABEL;
3113 } else {
3114 }
3115 {
3116 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
3117 var83 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
3118 if (unlikely(var83 == NULL)) {
3119 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3120 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3121 show_backtrace(1);
3122 }
3123 var81 = var83;
3124 RET_LABEL82:(void)0;
3125 }
3126 }
3127 {
3128 var84 = nit___nit__ANodes___replace_child(var81, var_old_child, var_new_child);
3129 }
3130 if (var84){
3131 goto RET_LABEL;
3132 } else {
3133 }
3134 var85 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_kwend].val; /* _n_kwend on <self:AStdClassdef> */
3135 if (unlikely(var85 == NULL)) {
3136 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
3137 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 452);
3138 show_backtrace(1);
3139 }
3140 {
3141 { /* Inline kernel#Object#== (var85,var_old_child) on <var85:TKwend> */
3142 var_other = var_old_child;
3143 {
3144 { /* Inline kernel#Object#is_same_instance (var85,var_other) on <var85:TKwend> */
3145 var90 = var85 == var_other;
3146 var88 = var90;
3147 goto RET_LABEL89;
3148 RET_LABEL89:(void)0;
3149 }
3150 }
3151 var86 = var88;
3152 goto RET_LABEL87;
3153 RET_LABEL87:(void)0;
3154 }
3155 }
3156 if (var86){
3157 /* <var_new_child:nullable ANode> isa TKwend */
3158 cltype92 = type_nit__TKwend.color;
3159 idtype93 = type_nit__TKwend.id;
3160 if(var_new_child == NULL) {
3161 var91 = 0;
3162 } else {
3163 if(cltype92 >= var_new_child->type->table_size) {
3164 var91 = 0;
3165 } else {
3166 var91 = var_new_child->type->type_table[cltype92] == idtype93;
3167 }
3168 }
3169 if (unlikely(!var91)) {
3170 var_class_name94 = var_new_child == NULL ? "null" : var_new_child->type->name;
3171 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwend", var_class_name94);
3172 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 453);
3173 show_backtrace(1);
3174 }
3175 {
3176 nit__parser_prod___AStdClassdef___n_kwend_61d(self, var_new_child); /* Direct call parser_prod#AStdClassdef#n_kwend= on <self:AStdClassdef>*/
3177 }
3178 goto RET_LABEL;
3179 } else {
3180 }
3181 RET_LABEL:;
3182 }
3183 /* method parser_prod#AStdClassdef#n_doc= for (self: AStdClassdef, nullable ADoc) */
3184 void nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_doc_61d(val* self, val* p0) {
3185 val* var_node /* var node: nullable ADoc */;
3186 val* var /* : null */;
3187 short int var1 /* : Bool */;
3188 short int var2 /* : Bool */;
3189 val* var_other /* var other: nullable Object */;
3190 short int var4 /* : Bool */;
3191 short int var5 /* : Bool */;
3192 var_node = p0;
3193 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_node; /* _n_doc on <self:AStdClassdef> */
3194 var = NULL;
3195 if (var_node == NULL) {
3196 var1 = 0; /* is null */
3197 } else {
3198 var1 = 1; /* arg is null and recv is not */
3199 }
3200 if (0) {
3201 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
3202 var_other = var;
3203 {
3204 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
3205 }
3206 var5 = !var4;
3207 var2 = var5;
3208 goto RET_LABEL3;
3209 RET_LABEL3:(void)0;
3210 }
3211 var1 = var2;
3212 }
3213 if (var1){
3214 {
3215 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
3216 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
3217 RET_LABEL6:(void)0;
3218 }
3219 }
3220 } else {
3221 }
3222 RET_LABEL:;
3223 }
3224 /* method parser_prod#AStdClassdef#n_kwredef= for (self: AStdClassdef, nullable TKwredef) */
3225 void nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
3226 val* var_node /* var node: nullable TKwredef */;
3227 val* var /* : null */;
3228 short int var1 /* : Bool */;
3229 short int var2 /* : Bool */;
3230 val* var_other /* var other: nullable Object */;
3231 short int var4 /* : Bool */;
3232 short int var5 /* : Bool */;
3233 var_node = p0;
3234 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:AStdClassdef> */
3235 var = NULL;
3236 if (var_node == NULL) {
3237 var1 = 0; /* is null */
3238 } else {
3239 var1 = 1; /* arg is null and recv is not */
3240 }
3241 if (0) {
3242 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
3243 var_other = var;
3244 {
3245 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
3246 }
3247 var5 = !var4;
3248 var2 = var5;
3249 goto RET_LABEL3;
3250 RET_LABEL3:(void)0;
3251 }
3252 var1 = var2;
3253 }
3254 if (var1){
3255 {
3256 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
3257 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
3258 RET_LABEL6:(void)0;
3259 }
3260 }
3261 } else {
3262 }
3263 RET_LABEL:;
3264 }
3265 /* method parser_prod#AStdClassdef#n_visibility= for (self: AStdClassdef, nullable AVisibility) */
3266 void nit__parser_prod___AStdClassdef___nit__parser_nodes__ADefinition__n_visibility_61d(val* self, val* p0) {
3267 val* var_node /* var node: nullable AVisibility */;
3268 var_node = p0;
3269 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_node; /* _n_visibility on <self:AStdClassdef> */
3270 if (var_node == NULL) {
3271 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3272 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 471);
3273 show_backtrace(1);
3274 } else {
3275 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
3276 if (unlikely(var_node == NULL)) {
3277 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3278 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
3279 show_backtrace(1);
3280 }
3281 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
3282 RET_LABEL1:(void)0;
3283 }
3284 }
3285 RET_LABEL:;
3286 }
3287 /* method parser_prod#AStdClassdef#n_classkind= for (self: AStdClassdef, AClasskind) */
3288 void nit__parser_prod___AStdClassdef___n_classkind_61d(val* self, val* p0) {
3289 val* var_node /* var node: AClasskind */;
3290 var_node = p0;
3291 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_classkind].val = var_node; /* _n_classkind on <self:AStdClassdef> */
3292 {
3293 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AClasskind> */
3294 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AClasskind> */
3295 RET_LABEL1:(void)0;
3296 }
3297 }
3298 RET_LABEL:;
3299 }
3300 /* method parser_prod#AStdClassdef#n_id= for (self: AStdClassdef, nullable TClassid) */
3301 void nit__parser_prod___AStdClassdef___n_id_61d(val* self, val* p0) {
3302 val* var_node /* var node: nullable TClassid */;
3303 val* var /* : null */;
3304 short int var1 /* : Bool */;
3305 short int var2 /* : Bool */;
3306 val* var_other /* var other: nullable Object */;
3307 short int var4 /* : Bool */;
3308 short int var5 /* : Bool */;
3309 var_node = p0;
3310 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_id].val = var_node; /* _n_id on <self:AStdClassdef> */
3311 var = NULL;
3312 if (var_node == NULL) {
3313 var1 = 0; /* is null */
3314 } else {
3315 var1 = 1; /* arg is null and recv is not */
3316 }
3317 if (0) {
3318 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TClassid> */
3319 var_other = var;
3320 {
3321 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TClassid(TClassid)>*/;
3322 }
3323 var5 = !var4;
3324 var2 = var5;
3325 goto RET_LABEL3;
3326 RET_LABEL3:(void)0;
3327 }
3328 var1 = var2;
3329 }
3330 if (var1){
3331 {
3332 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TClassid(TClassid)> */
3333 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TClassid(TClassid)> */
3334 RET_LABEL6:(void)0;
3335 }
3336 }
3337 } else {
3338 }
3339 RET_LABEL:;
3340 }
3341 /* method parser_prod#AStdClassdef#n_annotations= for (self: AStdClassdef, nullable AAnnotations) */
3342 void nit__parser_prod___AStdClassdef___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
3343 val* var_node /* var node: nullable AAnnotations */;
3344 val* var /* : null */;
3345 short int var1 /* : Bool */;
3346 short int var2 /* : Bool */;
3347 val* var_other /* var other: nullable Object */;
3348 short int var4 /* : Bool */;
3349 short int var5 /* : Bool */;
3350 var_node = p0;
3351 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AStdClassdef> */
3352 var = NULL;
3353 if (var_node == NULL) {
3354 var1 = 0; /* is null */
3355 } else {
3356 var1 = 1; /* arg is null and recv is not */
3357 }
3358 if (0) {
3359 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
3360 var_other = var;
3361 {
3362 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
3363 }
3364 var5 = !var4;
3365 var2 = var5;
3366 goto RET_LABEL3;
3367 RET_LABEL3:(void)0;
3368 }
3369 var1 = var2;
3370 }
3371 if (var1){
3372 {
3373 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
3374 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
3375 RET_LABEL6:(void)0;
3376 }
3377 }
3378 } else {
3379 }
3380 RET_LABEL:;
3381 }
3382 /* method parser_prod#AStdClassdef#n_extern_code_block= for (self: AStdClassdef, nullable AExternCodeBlock) */
3383 void nit__parser_prod___AStdClassdef___n_extern_code_block_61d(val* self, val* p0) {
3384 val* var_node /* var node: nullable AExternCodeBlock */;
3385 val* var /* : null */;
3386 short int var1 /* : Bool */;
3387 short int var2 /* : Bool */;
3388 val* var_other /* var other: nullable Object */;
3389 short int var4 /* : Bool */;
3390 short int var5 /* : Bool */;
3391 var_node = p0;
3392 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_extern_code_block].val = var_node; /* _n_extern_code_block on <self:AStdClassdef> */
3393 var = NULL;
3394 if (var_node == NULL) {
3395 var1 = 0; /* is null */
3396 } else {
3397 var1 = 1; /* arg is null and recv is not */
3398 }
3399 if (0) {
3400 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCodeBlock> */
3401 var_other = var;
3402 {
3403 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCodeBlock(AExternCodeBlock)>*/;
3404 }
3405 var5 = !var4;
3406 var2 = var5;
3407 goto RET_LABEL3;
3408 RET_LABEL3:(void)0;
3409 }
3410 var1 = var2;
3411 }
3412 if (var1){
3413 {
3414 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
3415 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
3416 RET_LABEL6:(void)0;
3417 }
3418 }
3419 } else {
3420 }
3421 RET_LABEL:;
3422 }
3423 /* method parser_prod#AStdClassdef#n_kwend= for (self: AStdClassdef, TKwend) */
3424 void nit__parser_prod___AStdClassdef___n_kwend_61d(val* self, val* p0) {
3425 val* var_node /* var node: TKwend */;
3426 var_node = p0;
3427 self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_kwend].val = var_node; /* _n_kwend on <self:AStdClassdef> */
3428 {
3429 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwend> */
3430 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwend> */
3431 RET_LABEL1:(void)0;
3432 }
3433 }
3434 RET_LABEL:;
3435 }
3436 /* method parser_prod#AStdClassdef#visit_all for (self: AStdClassdef, Visitor) */
3437 void nit__parser_prod___AStdClassdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
3438 val* var_v /* var v: Visitor */;
3439 val* var /* : nullable ADoc */;
3440 val* var1 /* : nullable TKwredef */;
3441 val* var2 /* : nullable AVisibility */;
3442 val* var3 /* : AClasskind */;
3443 val* var4 /* : nullable TClassid */;
3444 val* var5 /* : ANodes[AFormaldef] */;
3445 val* var7 /* : ANodes[AFormaldef] */;
3446 val* var8 /* : nullable AAnnotations */;
3447 val* var9 /* : nullable AExternCodeBlock */;
3448 val* var10 /* : ANodes[ASuperclass] */;
3449 val* var12 /* : ANodes[ASuperclass] */;
3450 val* var13 /* : ANodes[APropdef] */;
3451 val* var15 /* : ANodes[APropdef] */;
3452 val* var16 /* : TKwend */;
3453 var_v = p0;
3454 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AStdClassdef> */
3455 {
3456 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3457 }
3458 var1 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AStdClassdef> */
3459 {
3460 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3461 }
3462 var2 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AStdClassdef> */
3463 {
3464 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3465 }
3466 var3 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_classkind].val; /* _n_classkind on <self:AStdClassdef> */
3467 if (unlikely(var3 == NULL)) {
3468 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_classkind");
3469 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 505);
3470 show_backtrace(1);
3471 }
3472 {
3473 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3474 }
3475 var4 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_id].val; /* _n_id on <self:AStdClassdef> */
3476 {
3477 nit___nit__Visitor___enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3478 }
3479 {
3480 { /* Inline parser_nodes#AStdClassdef#n_formaldefs (self) on <self:AStdClassdef> */
3481 var7 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_formaldefs].val; /* _n_formaldefs on <self:AStdClassdef> */
3482 if (unlikely(var7 == NULL)) {
3483 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_formaldefs");
3484 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1027);
3485 show_backtrace(1);
3486 }
3487 var5 = var7;
3488 RET_LABEL6:(void)0;
3489 }
3490 }
3491 {
3492 nit___nit__ANodes___visit_all(var5, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var5:ANodes[AFormaldef]>*/
3493 }
3494 var8 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AStdClassdef> */
3495 {
3496 nit___nit__Visitor___enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3497 }
3498 var9 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AStdClassdef> */
3499 {
3500 nit___nit__Visitor___enter_visit(var_v, var9); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3501 }
3502 {
3503 { /* Inline parser_nodes#AStdClassdef#n_superclasses (self) on <self:AStdClassdef> */
3504 var12 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_superclasses].val; /* _n_superclasses on <self:AStdClassdef> */
3505 if (unlikely(var12 == NULL)) {
3506 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_superclasses");
3507 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1033);
3508 show_backtrace(1);
3509 }
3510 var10 = var12;
3511 RET_LABEL11:(void)0;
3512 }
3513 }
3514 {
3515 nit___nit__ANodes___visit_all(var10, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var10:ANodes[ASuperclass]>*/
3516 }
3517 {
3518 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AStdClassdef> */
3519 var15 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AStdClassdef> */
3520 if (unlikely(var15 == NULL)) {
3521 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3522 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3523 show_backtrace(1);
3524 }
3525 var13 = var15;
3526 RET_LABEL14:(void)0;
3527 }
3528 }
3529 {
3530 nit___nit__ANodes___visit_all(var13, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var13:ANodes[APropdef]>*/
3531 }
3532 var16 = self->attrs[COLOR_nit__parser_nodes__AStdClassdef___n_kwend].val; /* _n_kwend on <self:AStdClassdef> */
3533 if (unlikely(var16 == NULL)) {
3534 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwend");
3535 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 512);
3536 show_backtrace(1);
3537 }
3538 {
3539 nit___nit__Visitor___enter_visit(var_v, var16); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3540 }
3541 RET_LABEL:;
3542 }
3543 /* method parser_prod#ATopClassdef#init_atopclassdef for (self: ATopClassdef, Collection[Object]) */
3544 void nit__parser_prod___ATopClassdef___init_atopclassdef(val* self, val* p0) {
3545 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
3546 val* var /* : ANodes[APropdef] */;
3547 val* var2 /* : ANodes[APropdef] */;
3548 var_n_propdefs = p0;
3549 {
3550 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3551 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3552 if (unlikely(var2 == NULL)) {
3553 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3554 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3555 show_backtrace(1);
3556 }
3557 var = var2;
3558 RET_LABEL1:(void)0;
3559 }
3560 }
3561 {
3562 nit___nit__ANodes___unsafe_add_all(var, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[APropdef]>*/
3563 }
3564 RET_LABEL:;
3565 }
3566 /* method parser_prod#ATopClassdef#replace_child for (self: ATopClassdef, ANode, nullable ANode) */
3567 void nit__parser_prod___ATopClassdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
3568 val* var_old_child /* var old_child: ANode */;
3569 val* var_new_child /* var new_child: nullable ANode */;
3570 val* var /* : ANodes[APropdef] */;
3571 val* var2 /* : ANodes[APropdef] */;
3572 short int var3 /* : Bool */;
3573 var_old_child = p0;
3574 var_new_child = p1;
3575 {
3576 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3577 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3578 if (unlikely(var2 == NULL)) {
3579 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3580 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3581 show_backtrace(1);
3582 }
3583 var = var2;
3584 RET_LABEL1:(void)0;
3585 }
3586 }
3587 {
3588 var3 = nit___nit__ANodes___replace_child(var, var_old_child, var_new_child);
3589 }
3590 if (var3){
3591 goto RET_LABEL;
3592 } else {
3593 }
3594 RET_LABEL:;
3595 }
3596 /* method parser_prod#ATopClassdef#visit_all for (self: ATopClassdef, Visitor) */
3597 void nit__parser_prod___ATopClassdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
3598 val* var_v /* var v: Visitor */;
3599 val* var /* : ANodes[APropdef] */;
3600 val* var2 /* : ANodes[APropdef] */;
3601 var_v = p0;
3602 {
3603 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:ATopClassdef> */
3604 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:ATopClassdef> */
3605 if (unlikely(var2 == NULL)) {
3606 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3607 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3608 show_backtrace(1);
3609 }
3610 var = var2;
3611 RET_LABEL1:(void)0;
3612 }
3613 }
3614 {
3615 nit___nit__ANodes___visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[APropdef]>*/
3616 }
3617 RET_LABEL:;
3618 }
3619 /* method parser_prod#AMainClassdef#init_amainclassdef for (self: AMainClassdef, Collection[Object]) */
3620 void nit__parser_prod___AMainClassdef___init_amainclassdef(val* self, val* p0) {
3621 val* var_n_propdefs /* var n_propdefs: Collection[Object] */;
3622 val* var /* : ANodes[APropdef] */;
3623 val* var2 /* : ANodes[APropdef] */;
3624 var_n_propdefs = p0;
3625 {
3626 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
3627 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
3628 if (unlikely(var2 == NULL)) {
3629 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3630 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3631 show_backtrace(1);
3632 }
3633 var = var2;
3634 RET_LABEL1:(void)0;
3635 }
3636 }
3637 {
3638 nit___nit__ANodes___unsafe_add_all(var, var_n_propdefs); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[APropdef]>*/
3639 }
3640 RET_LABEL:;
3641 }
3642 /* method parser_prod#AMainClassdef#replace_child for (self: AMainClassdef, ANode, nullable ANode) */
3643 void nit__parser_prod___AMainClassdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
3644 val* var_old_child /* var old_child: ANode */;
3645 val* var_new_child /* var new_child: nullable ANode */;
3646 val* var /* : ANodes[APropdef] */;
3647 val* var2 /* : ANodes[APropdef] */;
3648 short int var3 /* : Bool */;
3649 var_old_child = p0;
3650 var_new_child = p1;
3651 {
3652 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
3653 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
3654 if (unlikely(var2 == NULL)) {
3655 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3656 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3657 show_backtrace(1);
3658 }
3659 var = var2;
3660 RET_LABEL1:(void)0;
3661 }
3662 }
3663 {
3664 var3 = nit___nit__ANodes___replace_child(var, var_old_child, var_new_child);
3665 }
3666 if (var3){
3667 goto RET_LABEL;
3668 } else {
3669 }
3670 RET_LABEL:;
3671 }
3672 /* method parser_prod#AMainClassdef#visit_all for (self: AMainClassdef, Visitor) */
3673 void nit__parser_prod___AMainClassdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
3674 val* var_v /* var v: Visitor */;
3675 val* var /* : ANodes[APropdef] */;
3676 val* var2 /* : ANodes[APropdef] */;
3677 var_v = p0;
3678 {
3679 { /* Inline parser_nodes#AClassdef#n_propdefs (self) on <self:AMainClassdef> */
3680 var2 = self->attrs[COLOR_nit__parser_nodes__AClassdef___n_propdefs].val; /* _n_propdefs on <self:AMainClassdef> */
3681 if (unlikely(var2 == NULL)) {
3682 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_propdefs");
3683 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 1012);
3684 show_backtrace(1);
3685 }
3686 var = var2;
3687 RET_LABEL1:(void)0;
3688 }
3689 }
3690 {
3691 nit___nit__ANodes___visit_all(var, var_v); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[APropdef]>*/
3692 }
3693 RET_LABEL:;
3694 }
3695 /* method parser_prod#AConcreteClasskind#init_aconcreteclasskind for (self: AConcreteClasskind, nullable TKwclass) */
3696 void nit__parser_prod___AConcreteClasskind___init_aconcreteclasskind(val* self, val* p0) {
3697 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
3698 var_n_kwclass = p0;
3699 if (unlikely(var_n_kwclass == NULL)) {
3700 PRINT_ERROR("Runtime error: %s", "Cast failed");
3701 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 560);
3702 show_backtrace(1);
3703 }
3704 self->attrs[COLOR_nit__parser_nodes__AConcreteClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AConcreteClasskind> */
3705 if (var_n_kwclass == NULL) {
3706 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3707 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 561);
3708 show_backtrace(1);
3709 } else {
3710 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass> */
3711 if (unlikely(var_n_kwclass == NULL)) {
3712 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3713 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
3714 show_backtrace(1);
3715 }
3716 var_n_kwclass->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass> */
3717 RET_LABEL1:(void)0;
3718 }
3719 }
3720 RET_LABEL:;
3721 }
3722 /* method parser_prod#AConcreteClasskind#replace_child for (self: AConcreteClasskind, ANode, nullable ANode) */
3723 void nit__parser_prod___AConcreteClasskind___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
3724 val* var_old_child /* var old_child: ANode */;
3725 val* var_new_child /* var new_child: nullable ANode */;
3726 val* var /* : TKwclass */;
3727 short int var1 /* : Bool */;
3728 val* var_other /* var other: nullable Object */;
3729 short int var3 /* : Bool */;
3730 short int var5 /* : Bool */;
3731 short int var6 /* : Bool */;
3732 int cltype;
3733 int idtype;
3734 const char* var_class_name;
3735 var_old_child = p0;
3736 var_new_child = p1;
3737 var = self->attrs[COLOR_nit__parser_nodes__AConcreteClasskind___n_kwclass].val; /* _n_kwclass on <self:AConcreteClasskind> */
3738 if (unlikely(var == NULL)) {
3739 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
3740 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 566);
3741 show_backtrace(1);
3742 }
3743 {
3744 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwclass> */
3745 var_other = var_old_child;
3746 {
3747 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwclass> */
3748 var5 = var == var_other;
3749 var3 = var5;
3750 goto RET_LABEL4;
3751 RET_LABEL4:(void)0;
3752 }
3753 }
3754 var1 = var3;
3755 goto RET_LABEL2;
3756 RET_LABEL2:(void)0;
3757 }
3758 }
3759 if (var1){
3760 /* <var_new_child:nullable ANode> isa TKwclass */
3761 cltype = type_nit__TKwclass.color;
3762 idtype = type_nit__TKwclass.id;
3763 if(var_new_child == NULL) {
3764 var6 = 0;
3765 } else {
3766 if(cltype >= var_new_child->type->table_size) {
3767 var6 = 0;
3768 } else {
3769 var6 = var_new_child->type->type_table[cltype] == idtype;
3770 }
3771 }
3772 if (unlikely(!var6)) {
3773 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3774 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwclass", var_class_name);
3775 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 567);
3776 show_backtrace(1);
3777 }
3778 {
3779 nit__parser_prod___AConcreteClasskind___n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AConcreteClasskind#n_kwclass= on <self:AConcreteClasskind>*/
3780 }
3781 goto RET_LABEL;
3782 } else {
3783 }
3784 RET_LABEL:;
3785 }
3786 /* method parser_prod#AConcreteClasskind#n_kwclass= for (self: AConcreteClasskind, TKwclass) */
3787 void nit__parser_prod___AConcreteClasskind___n_kwclass_61d(val* self, val* p0) {
3788 val* var_node /* var node: TKwclass */;
3789 var_node = p0;
3790 self->attrs[COLOR_nit__parser_nodes__AConcreteClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AConcreteClasskind> */
3791 {
3792 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwclass> */
3793 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwclass> */
3794 RET_LABEL1:(void)0;
3795 }
3796 }
3797 RET_LABEL:;
3798 }
3799 /* method parser_prod#AConcreteClasskind#visit_all for (self: AConcreteClasskind, Visitor) */
3800 void nit__parser_prod___AConcreteClasskind___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
3801 val* var_v /* var v: Visitor */;
3802 val* var /* : TKwclass */;
3803 var_v = p0;
3804 var = self->attrs[COLOR_nit__parser_nodes__AConcreteClasskind___n_kwclass].val; /* _n_kwclass on <self:AConcreteClasskind> */
3805 if (unlikely(var == NULL)) {
3806 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
3807 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 581);
3808 show_backtrace(1);
3809 }
3810 {
3811 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3812 }
3813 RET_LABEL:;
3814 }
3815 /* method parser_prod#AAbstractClasskind#init_aabstractclasskind for (self: AAbstractClasskind, nullable TKwabstract, nullable TKwclass) */
3816 void nit__parser_prod___AAbstractClasskind___init_aabstractclasskind(val* self, val* p0, val* p1) {
3817 val* var_n_kwabstract /* var n_kwabstract: nullable TKwabstract */;
3818 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
3819 var_n_kwabstract = p0;
3820 var_n_kwclass = p1;
3821 if (unlikely(var_n_kwabstract == NULL)) {
3822 PRINT_ERROR("Runtime error: %s", "Cast failed");
3823 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 590);
3824 show_backtrace(1);
3825 }
3826 self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwabstract].val = var_n_kwabstract; /* _n_kwabstract on <self:AAbstractClasskind> */
3827 if (var_n_kwabstract == NULL) {
3828 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3829 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 591);
3830 show_backtrace(1);
3831 } else {
3832 { /* Inline parser_nodes#ANode#parent= (var_n_kwabstract,self) on <var_n_kwabstract:nullable TKwabstract> */
3833 if (unlikely(var_n_kwabstract == NULL)) {
3834 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3835 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
3836 show_backtrace(1);
3837 }
3838 var_n_kwabstract->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwabstract:nullable TKwabstract> */
3839 RET_LABEL1:(void)0;
3840 }
3841 }
3842 if (unlikely(var_n_kwclass == NULL)) {
3843 PRINT_ERROR("Runtime error: %s", "Cast failed");
3844 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 592);
3845 show_backtrace(1);
3846 }
3847 self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AAbstractClasskind> */
3848 if (var_n_kwclass == NULL) {
3849 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3850 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 593);
3851 show_backtrace(1);
3852 } else {
3853 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass> */
3854 if (unlikely(var_n_kwclass == NULL)) {
3855 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3856 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
3857 show_backtrace(1);
3858 }
3859 var_n_kwclass->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass> */
3860 RET_LABEL2:(void)0;
3861 }
3862 }
3863 RET_LABEL:;
3864 }
3865 /* method parser_prod#AAbstractClasskind#replace_child for (self: AAbstractClasskind, ANode, nullable ANode) */
3866 void nit__parser_prod___AAbstractClasskind___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
3867 val* var_old_child /* var old_child: ANode */;
3868 val* var_new_child /* var new_child: nullable ANode */;
3869 val* var /* : TKwabstract */;
3870 short int var1 /* : Bool */;
3871 val* var_other /* var other: nullable Object */;
3872 short int var3 /* : Bool */;
3873 short int var5 /* : Bool */;
3874 short int var6 /* : Bool */;
3875 int cltype;
3876 int idtype;
3877 const char* var_class_name;
3878 val* var7 /* : TKwclass */;
3879 short int var8 /* : Bool */;
3880 short int var10 /* : Bool */;
3881 short int var12 /* : Bool */;
3882 short int var13 /* : Bool */;
3883 int cltype14;
3884 int idtype15;
3885 const char* var_class_name16;
3886 var_old_child = p0;
3887 var_new_child = p1;
3888 var = self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwabstract].val; /* _n_kwabstract on <self:AAbstractClasskind> */
3889 if (unlikely(var == NULL)) {
3890 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwabstract");
3891 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 598);
3892 show_backtrace(1);
3893 }
3894 {
3895 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwabstract> */
3896 var_other = var_old_child;
3897 {
3898 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwabstract> */
3899 var5 = var == var_other;
3900 var3 = var5;
3901 goto RET_LABEL4;
3902 RET_LABEL4:(void)0;
3903 }
3904 }
3905 var1 = var3;
3906 goto RET_LABEL2;
3907 RET_LABEL2:(void)0;
3908 }
3909 }
3910 if (var1){
3911 /* <var_new_child:nullable ANode> isa TKwabstract */
3912 cltype = type_nit__TKwabstract.color;
3913 idtype = type_nit__TKwabstract.id;
3914 if(var_new_child == NULL) {
3915 var6 = 0;
3916 } else {
3917 if(cltype >= var_new_child->type->table_size) {
3918 var6 = 0;
3919 } else {
3920 var6 = var_new_child->type->type_table[cltype] == idtype;
3921 }
3922 }
3923 if (unlikely(!var6)) {
3924 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
3925 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwabstract", var_class_name);
3926 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 599);
3927 show_backtrace(1);
3928 }
3929 {
3930 nit__parser_prod___AAbstractClasskind___n_kwabstract_61d(self, var_new_child); /* Direct call parser_prod#AAbstractClasskind#n_kwabstract= on <self:AAbstractClasskind>*/
3931 }
3932 goto RET_LABEL;
3933 } else {
3934 }
3935 var7 = self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwclass].val; /* _n_kwclass on <self:AAbstractClasskind> */
3936 if (unlikely(var7 == NULL)) {
3937 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
3938 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 602);
3939 show_backtrace(1);
3940 }
3941 {
3942 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TKwclass> */
3943 var_other = var_old_child;
3944 {
3945 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TKwclass> */
3946 var12 = var7 == var_other;
3947 var10 = var12;
3948 goto RET_LABEL11;
3949 RET_LABEL11:(void)0;
3950 }
3951 }
3952 var8 = var10;
3953 goto RET_LABEL9;
3954 RET_LABEL9:(void)0;
3955 }
3956 }
3957 if (var8){
3958 /* <var_new_child:nullable ANode> isa TKwclass */
3959 cltype14 = type_nit__TKwclass.color;
3960 idtype15 = type_nit__TKwclass.id;
3961 if(var_new_child == NULL) {
3962 var13 = 0;
3963 } else {
3964 if(cltype14 >= var_new_child->type->table_size) {
3965 var13 = 0;
3966 } else {
3967 var13 = var_new_child->type->type_table[cltype14] == idtype15;
3968 }
3969 }
3970 if (unlikely(!var13)) {
3971 var_class_name16 = var_new_child == NULL ? "null" : var_new_child->type->name;
3972 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwclass", var_class_name16);
3973 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 603);
3974 show_backtrace(1);
3975 }
3976 {
3977 nit__parser_prod___AAbstractClasskind___n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AAbstractClasskind#n_kwclass= on <self:AAbstractClasskind>*/
3978 }
3979 goto RET_LABEL;
3980 } else {
3981 }
3982 RET_LABEL:;
3983 }
3984 /* method parser_prod#AAbstractClasskind#n_kwabstract= for (self: AAbstractClasskind, TKwabstract) */
3985 void nit__parser_prod___AAbstractClasskind___n_kwabstract_61d(val* self, val* p0) {
3986 val* var_node /* var node: TKwabstract */;
3987 var_node = p0;
3988 self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwabstract].val = var_node; /* _n_kwabstract on <self:AAbstractClasskind> */
3989 {
3990 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwabstract> */
3991 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwabstract> */
3992 RET_LABEL1:(void)0;
3993 }
3994 }
3995 RET_LABEL:;
3996 }
3997 /* method parser_prod#AAbstractClasskind#n_kwclass= for (self: AAbstractClasskind, TKwclass) */
3998 void nit__parser_prod___AAbstractClasskind___n_kwclass_61d(val* self, val* p0) {
3999 val* var_node /* var node: TKwclass */;
4000 var_node = p0;
4001 self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AAbstractClasskind> */
4002 {
4003 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwclass> */
4004 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwclass> */
4005 RET_LABEL1:(void)0;
4006 }
4007 }
4008 RET_LABEL:;
4009 }
4010 /* method parser_prod#AAbstractClasskind#visit_all for (self: AAbstractClasskind, Visitor) */
4011 void nit__parser_prod___AAbstractClasskind___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
4012 val* var_v /* var v: Visitor */;
4013 val* var /* : TKwabstract */;
4014 val* var1 /* : TKwclass */;
4015 var_v = p0;
4016 var = self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwabstract].val; /* _n_kwabstract on <self:AAbstractClasskind> */
4017 if (unlikely(var == NULL)) {
4018 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwabstract");
4019 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 622);
4020 show_backtrace(1);
4021 }
4022 {
4023 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4024 }
4025 var1 = self->attrs[COLOR_nit__parser_nodes__AAbstractClasskind___n_kwclass].val; /* _n_kwclass on <self:AAbstractClasskind> */
4026 if (unlikely(var1 == NULL)) {
4027 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwclass");
4028 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 623);
4029 show_backtrace(1);
4030 }
4031 {
4032 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4033 }
4034 RET_LABEL:;
4035 }
4036 /* method parser_prod#AInterfaceClasskind#init_ainterfaceclasskind for (self: AInterfaceClasskind, nullable TKwinterface) */
4037 void nit__parser_prod___AInterfaceClasskind___init_ainterfaceclasskind(val* self, val* p0) {
4038 val* var_n_kwinterface /* var n_kwinterface: nullable TKwinterface */;
4039 var_n_kwinterface = p0;
4040 if (unlikely(var_n_kwinterface == NULL)) {
4041 PRINT_ERROR("Runtime error: %s", "Cast failed");
4042 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 631);
4043 show_backtrace(1);
4044 }
4045 self->attrs[COLOR_nit__parser_nodes__AInterfaceClasskind___n_kwinterface].val = var_n_kwinterface; /* _n_kwinterface on <self:AInterfaceClasskind> */
4046 if (var_n_kwinterface == NULL) {
4047 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4048 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 632);
4049 show_backtrace(1);
4050 } else {
4051 { /* Inline parser_nodes#ANode#parent= (var_n_kwinterface,self) on <var_n_kwinterface:nullable TKwinterface> */
4052 if (unlikely(var_n_kwinterface == NULL)) {
4053 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4054 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4055 show_backtrace(1);
4056 }
4057 var_n_kwinterface->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwinterface:nullable TKwinterface> */
4058 RET_LABEL1:(void)0;
4059 }
4060 }
4061 RET_LABEL:;
4062 }
4063 /* method parser_prod#AInterfaceClasskind#replace_child for (self: AInterfaceClasskind, ANode, nullable ANode) */
4064 void nit__parser_prod___AInterfaceClasskind___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
4065 val* var_old_child /* var old_child: ANode */;
4066 val* var_new_child /* var new_child: nullable ANode */;
4067 val* var /* : TKwinterface */;
4068 short int var1 /* : Bool */;
4069 val* var_other /* var other: nullable Object */;
4070 short int var3 /* : Bool */;
4071 short int var5 /* : Bool */;
4072 short int var6 /* : Bool */;
4073 int cltype;
4074 int idtype;
4075 const char* var_class_name;
4076 var_old_child = p0;
4077 var_new_child = p1;
4078 var = self->attrs[COLOR_nit__parser_nodes__AInterfaceClasskind___n_kwinterface].val; /* _n_kwinterface on <self:AInterfaceClasskind> */
4079 if (unlikely(var == NULL)) {
4080 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwinterface");
4081 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 637);
4082 show_backtrace(1);
4083 }
4084 {
4085 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwinterface> */
4086 var_other = var_old_child;
4087 {
4088 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwinterface> */
4089 var5 = var == var_other;
4090 var3 = var5;
4091 goto RET_LABEL4;
4092 RET_LABEL4:(void)0;
4093 }
4094 }
4095 var1 = var3;
4096 goto RET_LABEL2;
4097 RET_LABEL2:(void)0;
4098 }
4099 }
4100 if (var1){
4101 /* <var_new_child:nullable ANode> isa TKwinterface */
4102 cltype = type_nit__TKwinterface.color;
4103 idtype = type_nit__TKwinterface.id;
4104 if(var_new_child == NULL) {
4105 var6 = 0;
4106 } else {
4107 if(cltype >= var_new_child->type->table_size) {
4108 var6 = 0;
4109 } else {
4110 var6 = var_new_child->type->type_table[cltype] == idtype;
4111 }
4112 }
4113 if (unlikely(!var6)) {
4114 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4115 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwinterface", var_class_name);
4116 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 638);
4117 show_backtrace(1);
4118 }
4119 {
4120 nit__parser_prod___AInterfaceClasskind___n_kwinterface_61d(self, var_new_child); /* Direct call parser_prod#AInterfaceClasskind#n_kwinterface= on <self:AInterfaceClasskind>*/
4121 }
4122 goto RET_LABEL;
4123 } else {
4124 }
4125 RET_LABEL:;
4126 }
4127 /* method parser_prod#AInterfaceClasskind#n_kwinterface= for (self: AInterfaceClasskind, TKwinterface) */
4128 void nit__parser_prod___AInterfaceClasskind___n_kwinterface_61d(val* self, val* p0) {
4129 val* var_node /* var node: TKwinterface */;
4130 var_node = p0;
4131 self->attrs[COLOR_nit__parser_nodes__AInterfaceClasskind___n_kwinterface].val = var_node; /* _n_kwinterface on <self:AInterfaceClasskind> */
4132 {
4133 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwinterface> */
4134 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwinterface> */
4135 RET_LABEL1:(void)0;
4136 }
4137 }
4138 RET_LABEL:;
4139 }
4140 /* method parser_prod#AInterfaceClasskind#visit_all for (self: AInterfaceClasskind, Visitor) */
4141 void nit__parser_prod___AInterfaceClasskind___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
4142 val* var_v /* var v: Visitor */;
4143 val* var /* : TKwinterface */;
4144 var_v = p0;
4145 var = self->attrs[COLOR_nit__parser_nodes__AInterfaceClasskind___n_kwinterface].val; /* _n_kwinterface on <self:AInterfaceClasskind> */
4146 if (unlikely(var == NULL)) {
4147 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwinterface");
4148 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 652);
4149 show_backtrace(1);
4150 }
4151 {
4152 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4153 }
4154 RET_LABEL:;
4155 }
4156 /* method parser_prod#AEnumClasskind#init_aenumclasskind for (self: AEnumClasskind, nullable TKwenum) */
4157 void nit__parser_prod___AEnumClasskind___init_aenumclasskind(val* self, val* p0) {
4158 val* var_n_kwenum /* var n_kwenum: nullable TKwenum */;
4159 var_n_kwenum = p0;
4160 if (unlikely(var_n_kwenum == NULL)) {
4161 PRINT_ERROR("Runtime error: %s", "Cast failed");
4162 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 660);
4163 show_backtrace(1);
4164 }
4165 self->attrs[COLOR_nit__parser_nodes__AEnumClasskind___n_kwenum].val = var_n_kwenum; /* _n_kwenum on <self:AEnumClasskind> */
4166 if (var_n_kwenum == NULL) {
4167 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4168 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 661);
4169 show_backtrace(1);
4170 } else {
4171 { /* Inline parser_nodes#ANode#parent= (var_n_kwenum,self) on <var_n_kwenum:nullable TKwenum> */
4172 if (unlikely(var_n_kwenum == NULL)) {
4173 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4174 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4175 show_backtrace(1);
4176 }
4177 var_n_kwenum->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwenum:nullable TKwenum> */
4178 RET_LABEL1:(void)0;
4179 }
4180 }
4181 RET_LABEL:;
4182 }
4183 /* method parser_prod#AEnumClasskind#replace_child for (self: AEnumClasskind, ANode, nullable ANode) */
4184 void nit__parser_prod___AEnumClasskind___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
4185 val* var_old_child /* var old_child: ANode */;
4186 val* var_new_child /* var new_child: nullable ANode */;
4187 val* var /* : TKwenum */;
4188 short int var1 /* : Bool */;
4189 val* var_other /* var other: nullable Object */;
4190 short int var3 /* : Bool */;
4191 short int var5 /* : Bool */;
4192 short int var6 /* : Bool */;
4193 int cltype;
4194 int idtype;
4195 const char* var_class_name;
4196 var_old_child = p0;
4197 var_new_child = p1;
4198 var = self->attrs[COLOR_nit__parser_nodes__AEnumClasskind___n_kwenum].val; /* _n_kwenum on <self:AEnumClasskind> */
4199 if (unlikely(var == NULL)) {
4200 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwenum");
4201 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 666);
4202 show_backtrace(1);
4203 }
4204 {
4205 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwenum> */
4206 var_other = var_old_child;
4207 {
4208 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwenum> */
4209 var5 = var == var_other;
4210 var3 = var5;
4211 goto RET_LABEL4;
4212 RET_LABEL4:(void)0;
4213 }
4214 }
4215 var1 = var3;
4216 goto RET_LABEL2;
4217 RET_LABEL2:(void)0;
4218 }
4219 }
4220 if (var1){
4221 /* <var_new_child:nullable ANode> isa TKwenum */
4222 cltype = type_nit__TKwenum.color;
4223 idtype = type_nit__TKwenum.id;
4224 if(var_new_child == NULL) {
4225 var6 = 0;
4226 } else {
4227 if(cltype >= var_new_child->type->table_size) {
4228 var6 = 0;
4229 } else {
4230 var6 = var_new_child->type->type_table[cltype] == idtype;
4231 }
4232 }
4233 if (unlikely(!var6)) {
4234 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4235 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwenum", var_class_name);
4236 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 667);
4237 show_backtrace(1);
4238 }
4239 {
4240 nit__parser_prod___AEnumClasskind___n_kwenum_61d(self, var_new_child); /* Direct call parser_prod#AEnumClasskind#n_kwenum= on <self:AEnumClasskind>*/
4241 }
4242 goto RET_LABEL;
4243 } else {
4244 }
4245 RET_LABEL:;
4246 }
4247 /* method parser_prod#AEnumClasskind#n_kwenum= for (self: AEnumClasskind, TKwenum) */
4248 void nit__parser_prod___AEnumClasskind___n_kwenum_61d(val* self, val* p0) {
4249 val* var_node /* var node: TKwenum */;
4250 var_node = p0;
4251 self->attrs[COLOR_nit__parser_nodes__AEnumClasskind___n_kwenum].val = var_node; /* _n_kwenum on <self:AEnumClasskind> */
4252 {
4253 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwenum> */
4254 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwenum> */
4255 RET_LABEL1:(void)0;
4256 }
4257 }
4258 RET_LABEL:;
4259 }
4260 /* method parser_prod#AEnumClasskind#visit_all for (self: AEnumClasskind, Visitor) */
4261 void nit__parser_prod___AEnumClasskind___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
4262 val* var_v /* var v: Visitor */;
4263 val* var /* : TKwenum */;
4264 var_v = p0;
4265 var = self->attrs[COLOR_nit__parser_nodes__AEnumClasskind___n_kwenum].val; /* _n_kwenum on <self:AEnumClasskind> */
4266 if (unlikely(var == NULL)) {
4267 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwenum");
4268 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 681);
4269 show_backtrace(1);
4270 }
4271 {
4272 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4273 }
4274 RET_LABEL:;
4275 }
4276 /* method parser_prod#AExternClasskind#init_aexternclasskind for (self: AExternClasskind, nullable TKwextern, nullable TKwclass) */
4277 void nit__parser_prod___AExternClasskind___init_aexternclasskind(val* self, val* p0, val* p1) {
4278 val* var_n_kwextern /* var n_kwextern: nullable TKwextern */;
4279 val* var_n_kwclass /* var n_kwclass: nullable TKwclass */;
4280 val* var /* : null */;
4281 short int var2 /* : Bool */;
4282 short int var3 /* : Bool */;
4283 val* var_other /* var other: nullable Object */;
4284 short int var5 /* : Bool */;
4285 short int var6 /* : Bool */;
4286 var_n_kwextern = p0;
4287 var_n_kwclass = p1;
4288 if (unlikely(var_n_kwextern == NULL)) {
4289 PRINT_ERROR("Runtime error: %s", "Cast failed");
4290 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 690);
4291 show_backtrace(1);
4292 }
4293 self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwextern].val = var_n_kwextern; /* _n_kwextern on <self:AExternClasskind> */
4294 if (var_n_kwextern == NULL) {
4295 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4296 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 691);
4297 show_backtrace(1);
4298 } else {
4299 { /* Inline parser_nodes#ANode#parent= (var_n_kwextern,self) on <var_n_kwextern:nullable TKwextern> */
4300 if (unlikely(var_n_kwextern == NULL)) {
4301 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4302 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4303 show_backtrace(1);
4304 }
4305 var_n_kwextern->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwextern:nullable TKwextern> */
4306 RET_LABEL1:(void)0;
4307 }
4308 }
4309 self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwclass].val = var_n_kwclass; /* _n_kwclass on <self:AExternClasskind> */
4310 var = NULL;
4311 if (var_n_kwclass == NULL) {
4312 var2 = 0; /* is null */
4313 } else {
4314 var2 = 1; /* arg is null and recv is not */
4315 }
4316 if (0) {
4317 { /* Inline kernel#Object#!= (var_n_kwclass,var) on <var_n_kwclass:nullable TKwclass> */
4318 var_other = var;
4319 {
4320 var5 = ((short int (*)(val* self, val* p0))(var_n_kwclass->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwclass, var_other) /* == on <var_n_kwclass:nullable TKwclass(TKwclass)>*/;
4321 }
4322 var6 = !var5;
4323 var3 = var6;
4324 goto RET_LABEL4;
4325 RET_LABEL4:(void)0;
4326 }
4327 var2 = var3;
4328 }
4329 if (var2){
4330 {
4331 { /* Inline parser_nodes#ANode#parent= (var_n_kwclass,self) on <var_n_kwclass:nullable TKwclass(TKwclass)> */
4332 var_n_kwclass->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwclass:nullable TKwclass(TKwclass)> */
4333 RET_LABEL7:(void)0;
4334 }
4335 }
4336 } else {
4337 }
4338 RET_LABEL:;
4339 }
4340 /* method parser_prod#AExternClasskind#replace_child for (self: AExternClasskind, ANode, nullable ANode) */
4341 void nit__parser_prod___AExternClasskind___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
4342 val* var_old_child /* var old_child: ANode */;
4343 val* var_new_child /* var new_child: nullable ANode */;
4344 val* var /* : TKwextern */;
4345 short int var1 /* : Bool */;
4346 val* var_other /* var other: nullable Object */;
4347 short int var3 /* : Bool */;
4348 short int var5 /* : Bool */;
4349 short int var6 /* : Bool */;
4350 int cltype;
4351 int idtype;
4352 const char* var_class_name;
4353 val* var7 /* : nullable TKwclass */;
4354 short int var8 /* : Bool */;
4355 short int var9 /* : Bool */;
4356 short int var11 /* : Bool */;
4357 short int var13 /* : Bool */;
4358 short int var14 /* : Bool */;
4359 int cltype15;
4360 int idtype16;
4361 const char* var_class_name17;
4362 var_old_child = p0;
4363 var_new_child = p1;
4364 var = self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwextern].val; /* _n_kwextern on <self:AExternClasskind> */
4365 if (unlikely(var == NULL)) {
4366 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwextern");
4367 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 698);
4368 show_backtrace(1);
4369 }
4370 {
4371 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwextern> */
4372 var_other = var_old_child;
4373 {
4374 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwextern> */
4375 var5 = var == var_other;
4376 var3 = var5;
4377 goto RET_LABEL4;
4378 RET_LABEL4:(void)0;
4379 }
4380 }
4381 var1 = var3;
4382 goto RET_LABEL2;
4383 RET_LABEL2:(void)0;
4384 }
4385 }
4386 if (var1){
4387 /* <var_new_child:nullable ANode> isa TKwextern */
4388 cltype = type_nit__TKwextern.color;
4389 idtype = type_nit__TKwextern.id;
4390 if(var_new_child == NULL) {
4391 var6 = 0;
4392 } else {
4393 if(cltype >= var_new_child->type->table_size) {
4394 var6 = 0;
4395 } else {
4396 var6 = var_new_child->type->type_table[cltype] == idtype;
4397 }
4398 }
4399 if (unlikely(!var6)) {
4400 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4401 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwextern", var_class_name);
4402 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 699);
4403 show_backtrace(1);
4404 }
4405 {
4406 nit__parser_prod___AExternClasskind___n_kwextern_61d(self, var_new_child); /* Direct call parser_prod#AExternClasskind#n_kwextern= on <self:AExternClasskind>*/
4407 }
4408 goto RET_LABEL;
4409 } else {
4410 }
4411 var7 = self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwclass].val; /* _n_kwclass on <self:AExternClasskind> */
4412 if (var7 == NULL) {
4413 var8 = 0; /* <var_old_child:ANode> cannot be null */
4414 } else {
4415 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:nullable TKwclass> */
4416 var_other = var_old_child;
4417 {
4418 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:nullable TKwclass(TKwclass)> */
4419 var13 = var7 == var_other;
4420 var11 = var13;
4421 goto RET_LABEL12;
4422 RET_LABEL12:(void)0;
4423 }
4424 }
4425 var9 = var11;
4426 goto RET_LABEL10;
4427 RET_LABEL10:(void)0;
4428 }
4429 var8 = var9;
4430 }
4431 if (var8){
4432 /* <var_new_child:nullable ANode> isa nullable TKwclass */
4433 cltype15 = type_nullable__nit__TKwclass.color;
4434 idtype16 = type_nullable__nit__TKwclass.id;
4435 if(var_new_child == NULL) {
4436 var14 = 1;
4437 } else {
4438 if(cltype15 >= var_new_child->type->table_size) {
4439 var14 = 0;
4440 } else {
4441 var14 = var_new_child->type->type_table[cltype15] == idtype16;
4442 }
4443 }
4444 if (unlikely(!var14)) {
4445 var_class_name17 = var_new_child == NULL ? "null" : var_new_child->type->name;
4446 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwclass", var_class_name17);
4447 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 703);
4448 show_backtrace(1);
4449 }
4450 {
4451 nit__parser_prod___AExternClasskind___n_kwclass_61d(self, var_new_child); /* Direct call parser_prod#AExternClasskind#n_kwclass= on <self:AExternClasskind>*/
4452 }
4453 goto RET_LABEL;
4454 } else {
4455 }
4456 RET_LABEL:;
4457 }
4458 /* method parser_prod#AExternClasskind#n_kwextern= for (self: AExternClasskind, TKwextern) */
4459 void nit__parser_prod___AExternClasskind___n_kwextern_61d(val* self, val* p0) {
4460 val* var_node /* var node: TKwextern */;
4461 var_node = p0;
4462 self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwextern].val = var_node; /* _n_kwextern on <self:AExternClasskind> */
4463 {
4464 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwextern> */
4465 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwextern> */
4466 RET_LABEL1:(void)0;
4467 }
4468 }
4469 RET_LABEL:;
4470 }
4471 /* method parser_prod#AExternClasskind#n_kwclass= for (self: AExternClasskind, nullable TKwclass) */
4472 void nit__parser_prod___AExternClasskind___n_kwclass_61d(val* self, val* p0) {
4473 val* var_node /* var node: nullable TKwclass */;
4474 val* var /* : null */;
4475 short int var1 /* : Bool */;
4476 short int var2 /* : Bool */;
4477 val* var_other /* var other: nullable Object */;
4478 short int var4 /* : Bool */;
4479 short int var5 /* : Bool */;
4480 var_node = p0;
4481 self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwclass].val = var_node; /* _n_kwclass on <self:AExternClasskind> */
4482 var = NULL;
4483 if (var_node == NULL) {
4484 var1 = 0; /* is null */
4485 } else {
4486 var1 = 1; /* arg is null and recv is not */
4487 }
4488 if (0) {
4489 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwclass> */
4490 var_other = var;
4491 {
4492 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwclass(TKwclass)>*/;
4493 }
4494 var5 = !var4;
4495 var2 = var5;
4496 goto RET_LABEL3;
4497 RET_LABEL3:(void)0;
4498 }
4499 var1 = var2;
4500 }
4501 if (var1){
4502 {
4503 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwclass(TKwclass)> */
4504 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwclass(TKwclass)> */
4505 RET_LABEL6:(void)0;
4506 }
4507 }
4508 } else {
4509 }
4510 RET_LABEL:;
4511 }
4512 /* method parser_prod#AExternClasskind#visit_all for (self: AExternClasskind, Visitor) */
4513 void nit__parser_prod___AExternClasskind___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
4514 val* var_v /* var v: Visitor */;
4515 val* var /* : TKwextern */;
4516 val* var1 /* : nullable TKwclass */;
4517 var_v = p0;
4518 var = self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwextern].val; /* _n_kwextern on <self:AExternClasskind> */
4519 if (unlikely(var == NULL)) {
4520 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwextern");
4521 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 722);
4522 show_backtrace(1);
4523 }
4524 {
4525 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4526 }
4527 var1 = self->attrs[COLOR_nit__parser_nodes__AExternClasskind___n_kwclass].val; /* _n_kwclass on <self:AExternClasskind> */
4528 {
4529 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4530 }
4531 RET_LABEL:;
4532 }
4533 /* method parser_prod#AFormaldef#init_aformaldef for (self: AFormaldef, nullable TClassid, nullable AType, nullable AAnnotations) */
4534 void nit__parser_prod___AFormaldef___init_aformaldef(val* self, val* p0, val* p1, val* p2) {
4535 val* var_n_id /* var n_id: nullable TClassid */;
4536 val* var_n_type /* var n_type: nullable AType */;
4537 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
4538 val* var /* : null */;
4539 short int var2 /* : Bool */;
4540 short int var3 /* : Bool */;
4541 val* var_other /* var other: nullable Object */;
4542 short int var5 /* : Bool */;
4543 short int var6 /* : Bool */;
4544 val* var8 /* : null */;
4545 short int var9 /* : Bool */;
4546 short int var10 /* : Bool */;
4547 short int var12 /* : Bool */;
4548 short int var13 /* : Bool */;
4549 var_n_id = p0;
4550 var_n_type = p1;
4551 var_n_annotations = p2;
4552 if (unlikely(var_n_id == NULL)) {
4553 PRINT_ERROR("Runtime error: %s", "Cast failed");
4554 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 733);
4555 show_backtrace(1);
4556 }
4557 self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_id].val = var_n_id; /* _n_id on <self:AFormaldef> */
4558 if (var_n_id == NULL) {
4559 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4560 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 734);
4561 show_backtrace(1);
4562 } else {
4563 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid> */
4564 if (unlikely(var_n_id == NULL)) {
4565 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4566 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4567 show_backtrace(1);
4568 }
4569 var_n_id->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid> */
4570 RET_LABEL1:(void)0;
4571 }
4572 }
4573 self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_type].val = var_n_type; /* _n_type on <self:AFormaldef> */
4574 var = NULL;
4575 if (var_n_type == NULL) {
4576 var2 = 0; /* is null */
4577 } else {
4578 var2 = 1; /* arg is null and recv is not */
4579 }
4580 if (0) {
4581 { /* Inline kernel#Object#!= (var_n_type,var) on <var_n_type:nullable AType> */
4582 var_other = var;
4583 {
4584 var5 = ((short int (*)(val* self, val* p0))(var_n_type->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_type, var_other) /* == on <var_n_type:nullable AType(AType)>*/;
4585 }
4586 var6 = !var5;
4587 var3 = var6;
4588 goto RET_LABEL4;
4589 RET_LABEL4:(void)0;
4590 }
4591 var2 = var3;
4592 }
4593 if (var2){
4594 {
4595 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType(AType)> */
4596 var_n_type->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType(AType)> */
4597 RET_LABEL7:(void)0;
4598 }
4599 }
4600 } else {
4601 }
4602 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AFormaldef> */
4603 var8 = NULL;
4604 if (var_n_annotations == NULL) {
4605 var9 = 0; /* is null */
4606 } else {
4607 var9 = 1; /* arg is null and recv is not */
4608 }
4609 if (0) {
4610 { /* Inline kernel#Object#!= (var_n_annotations,var8) on <var_n_annotations:nullable AAnnotations> */
4611 var_other = var8;
4612 {
4613 var12 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
4614 }
4615 var13 = !var12;
4616 var10 = var13;
4617 goto RET_LABEL11;
4618 RET_LABEL11:(void)0;
4619 }
4620 var9 = var10;
4621 }
4622 if (var9){
4623 {
4624 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
4625 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
4626 RET_LABEL14:(void)0;
4627 }
4628 }
4629 } else {
4630 }
4631 RET_LABEL:;
4632 }
4633 /* method parser_prod#AFormaldef#replace_child for (self: AFormaldef, ANode, nullable ANode) */
4634 void nit__parser_prod___AFormaldef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
4635 val* var_old_child /* var old_child: ANode */;
4636 val* var_new_child /* var new_child: nullable ANode */;
4637 val* var /* : TClassid */;
4638 short int var1 /* : Bool */;
4639 val* var_other /* var other: nullable Object */;
4640 short int var3 /* : Bool */;
4641 short int var5 /* : Bool */;
4642 short int var6 /* : Bool */;
4643 int cltype;
4644 int idtype;
4645 const char* var_class_name;
4646 val* var7 /* : nullable AType */;
4647 short int var8 /* : Bool */;
4648 short int var9 /* : Bool */;
4649 short int var11 /* : Bool */;
4650 short int var13 /* : Bool */;
4651 short int var14 /* : Bool */;
4652 int cltype15;
4653 int idtype16;
4654 const char* var_class_name17;
4655 val* var18 /* : nullable AAnnotations */;
4656 short int var19 /* : Bool */;
4657 short int var20 /* : Bool */;
4658 short int var22 /* : Bool */;
4659 short int var24 /* : Bool */;
4660 short int var25 /* : Bool */;
4661 int cltype26;
4662 int idtype27;
4663 const char* var_class_name28;
4664 var_old_child = p0;
4665 var_new_child = p1;
4666 var = self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_id].val; /* _n_id on <self:AFormaldef> */
4667 if (unlikely(var == NULL)) {
4668 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4669 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 743);
4670 show_backtrace(1);
4671 }
4672 {
4673 { /* Inline kernel#Object#== (var,var_old_child) on <var:TClassid> */
4674 var_other = var_old_child;
4675 {
4676 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TClassid> */
4677 var5 = var == var_other;
4678 var3 = var5;
4679 goto RET_LABEL4;
4680 RET_LABEL4:(void)0;
4681 }
4682 }
4683 var1 = var3;
4684 goto RET_LABEL2;
4685 RET_LABEL2:(void)0;
4686 }
4687 }
4688 if (var1){
4689 /* <var_new_child:nullable ANode> isa TClassid */
4690 cltype = type_nit__TClassid.color;
4691 idtype = type_nit__TClassid.id;
4692 if(var_new_child == NULL) {
4693 var6 = 0;
4694 } else {
4695 if(cltype >= var_new_child->type->table_size) {
4696 var6 = 0;
4697 } else {
4698 var6 = var_new_child->type->type_table[cltype] == idtype;
4699 }
4700 }
4701 if (unlikely(!var6)) {
4702 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
4703 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TClassid", var_class_name);
4704 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 744);
4705 show_backtrace(1);
4706 }
4707 {
4708 nit__parser_prod___AFormaldef___n_id_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_id= on <self:AFormaldef>*/
4709 }
4710 goto RET_LABEL;
4711 } else {
4712 }
4713 var7 = self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_type].val; /* _n_type on <self:AFormaldef> */
4714 if (var7 == NULL) {
4715 var8 = 0; /* <var_old_child:ANode> cannot be null */
4716 } else {
4717 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:nullable AType> */
4718 var_other = var_old_child;
4719 {
4720 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:nullable AType(AType)> */
4721 var13 = var7 == var_other;
4722 var11 = var13;
4723 goto RET_LABEL12;
4724 RET_LABEL12:(void)0;
4725 }
4726 }
4727 var9 = var11;
4728 goto RET_LABEL10;
4729 RET_LABEL10:(void)0;
4730 }
4731 var8 = var9;
4732 }
4733 if (var8){
4734 /* <var_new_child:nullable ANode> isa nullable AType */
4735 cltype15 = type_nullable__nit__AType.color;
4736 idtype16 = type_nullable__nit__AType.id;
4737 if(var_new_child == NULL) {
4738 var14 = 1;
4739 } else {
4740 if(cltype15 >= var_new_child->type->table_size) {
4741 var14 = 0;
4742 } else {
4743 var14 = var_new_child->type->type_table[cltype15] == idtype16;
4744 }
4745 }
4746 if (unlikely(!var14)) {
4747 var_class_name17 = var_new_child == NULL ? "null" : var_new_child->type->name;
4748 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AType", var_class_name17);
4749 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 748);
4750 show_backtrace(1);
4751 }
4752 {
4753 nit__parser_prod___AFormaldef___n_type_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_type= on <self:AFormaldef>*/
4754 }
4755 goto RET_LABEL;
4756 } else {
4757 }
4758 var18 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AFormaldef> */
4759 if (var18 == NULL) {
4760 var19 = 0; /* <var_old_child:ANode> cannot be null */
4761 } else {
4762 { /* Inline kernel#Object#== (var18,var_old_child) on <var18:nullable AAnnotations> */
4763 var_other = var_old_child;
4764 {
4765 { /* Inline kernel#Object#is_same_instance (var18,var_other) on <var18:nullable AAnnotations(AAnnotations)> */
4766 var24 = var18 == var_other;
4767 var22 = var24;
4768 goto RET_LABEL23;
4769 RET_LABEL23:(void)0;
4770 }
4771 }
4772 var20 = var22;
4773 goto RET_LABEL21;
4774 RET_LABEL21:(void)0;
4775 }
4776 var19 = var20;
4777 }
4778 if (var19){
4779 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
4780 cltype26 = type_nullable__nit__AAnnotations.color;
4781 idtype27 = type_nullable__nit__AAnnotations.id;
4782 if(var_new_child == NULL) {
4783 var25 = 1;
4784 } else {
4785 if(cltype26 >= var_new_child->type->table_size) {
4786 var25 = 0;
4787 } else {
4788 var25 = var_new_child->type->type_table[cltype26] == idtype27;
4789 }
4790 }
4791 if (unlikely(!var25)) {
4792 var_class_name28 = var_new_child == NULL ? "null" : var_new_child->type->name;
4793 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name28);
4794 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 752);
4795 show_backtrace(1);
4796 }
4797 {
4798 nit__parser_prod___AFormaldef___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AFormaldef#n_annotations= on <self:AFormaldef>*/
4799 }
4800 goto RET_LABEL;
4801 } else {
4802 }
4803 RET_LABEL:;
4804 }
4805 /* method parser_prod#AFormaldef#n_id= for (self: AFormaldef, TClassid) */
4806 void nit__parser_prod___AFormaldef___n_id_61d(val* self, val* p0) {
4807 val* var_node /* var node: TClassid */;
4808 var_node = p0;
4809 self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_id].val = var_node; /* _n_id on <self:AFormaldef> */
4810 {
4811 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TClassid> */
4812 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TClassid> */
4813 RET_LABEL1:(void)0;
4814 }
4815 }
4816 RET_LABEL:;
4817 }
4818 /* method parser_prod#AFormaldef#n_type= for (self: AFormaldef, nullable AType) */
4819 void nit__parser_prod___AFormaldef___n_type_61d(val* self, val* p0) {
4820 val* var_node /* var node: nullable AType */;
4821 val* var /* : null */;
4822 short int var1 /* : Bool */;
4823 short int var2 /* : Bool */;
4824 val* var_other /* var other: nullable Object */;
4825 short int var4 /* : Bool */;
4826 short int var5 /* : Bool */;
4827 var_node = p0;
4828 self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_type].val = var_node; /* _n_type on <self:AFormaldef> */
4829 var = NULL;
4830 if (var_node == NULL) {
4831 var1 = 0; /* is null */
4832 } else {
4833 var1 = 1; /* arg is null and recv is not */
4834 }
4835 if (0) {
4836 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AType> */
4837 var_other = var;
4838 {
4839 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AType(AType)>*/;
4840 }
4841 var5 = !var4;
4842 var2 = var5;
4843 goto RET_LABEL3;
4844 RET_LABEL3:(void)0;
4845 }
4846 var1 = var2;
4847 }
4848 if (var1){
4849 {
4850 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AType(AType)> */
4851 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AType(AType)> */
4852 RET_LABEL6:(void)0;
4853 }
4854 }
4855 } else {
4856 }
4857 RET_LABEL:;
4858 }
4859 /* method parser_prod#AFormaldef#n_annotations= for (self: AFormaldef, nullable AAnnotations) */
4860 void nit__parser_prod___AFormaldef___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
4861 val* var_node /* var node: nullable AAnnotations */;
4862 val* var /* : null */;
4863 short int var1 /* : Bool */;
4864 short int var2 /* : Bool */;
4865 val* var_other /* var other: nullable Object */;
4866 short int var4 /* : Bool */;
4867 short int var5 /* : Bool */;
4868 var_node = p0;
4869 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AFormaldef> */
4870 var = NULL;
4871 if (var_node == NULL) {
4872 var1 = 0; /* is null */
4873 } else {
4874 var1 = 1; /* arg is null and recv is not */
4875 }
4876 if (0) {
4877 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
4878 var_other = var;
4879 {
4880 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
4881 }
4882 var5 = !var4;
4883 var2 = var5;
4884 goto RET_LABEL3;
4885 RET_LABEL3:(void)0;
4886 }
4887 var1 = var2;
4888 }
4889 if (var1){
4890 {
4891 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
4892 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
4893 RET_LABEL6:(void)0;
4894 }
4895 }
4896 } else {
4897 }
4898 RET_LABEL:;
4899 }
4900 /* method parser_prod#AFormaldef#visit_all for (self: AFormaldef, Visitor) */
4901 void nit__parser_prod___AFormaldef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
4902 val* var_v /* var v: Visitor */;
4903 val* var /* : TClassid */;
4904 val* var1 /* : nullable AType */;
4905 val* var2 /* : nullable AAnnotations */;
4906 var_v = p0;
4907 var = self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_id].val; /* _n_id on <self:AFormaldef> */
4908 if (unlikely(var == NULL)) {
4909 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
4910 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 776);
4911 show_backtrace(1);
4912 }
4913 {
4914 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4915 }
4916 var1 = self->attrs[COLOR_nit__parser_nodes__AFormaldef___n_type].val; /* _n_type on <self:AFormaldef> */
4917 {
4918 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4919 }
4920 var2 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AFormaldef> */
4921 {
4922 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
4923 }
4924 RET_LABEL:;
4925 }
4926 /* method parser_prod#ASuperclass#init_asuperclass for (self: ASuperclass, nullable TKwsuper, nullable AType, nullable AAnnotations) */
4927 void nit__parser_prod___ASuperclass___init_asuperclass(val* self, val* p0, val* p1, val* p2) {
4928 val* var_n_kwsuper /* var n_kwsuper: nullable TKwsuper */;
4929 val* var_n_type /* var n_type: nullable AType */;
4930 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
4931 val* var /* : null */;
4932 short int var3 /* : Bool */;
4933 short int var4 /* : Bool */;
4934 val* var_other /* var other: nullable Object */;
4935 short int var6 /* : Bool */;
4936 short int var7 /* : Bool */;
4937 var_n_kwsuper = p0;
4938 var_n_type = p1;
4939 var_n_annotations = p2;
4940 if (unlikely(var_n_kwsuper == NULL)) {
4941 PRINT_ERROR("Runtime error: %s", "Cast failed");
4942 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 788);
4943 show_backtrace(1);
4944 }
4945 self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_kwsuper].val = var_n_kwsuper; /* _n_kwsuper on <self:ASuperclass> */
4946 if (var_n_kwsuper == NULL) {
4947 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4948 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 789);
4949 show_backtrace(1);
4950 } else {
4951 { /* Inline parser_nodes#ANode#parent= (var_n_kwsuper,self) on <var_n_kwsuper:nullable TKwsuper> */
4952 if (unlikely(var_n_kwsuper == NULL)) {
4953 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4954 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4955 show_backtrace(1);
4956 }
4957 var_n_kwsuper->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwsuper:nullable TKwsuper> */
4958 RET_LABEL1:(void)0;
4959 }
4960 }
4961 if (unlikely(var_n_type == NULL)) {
4962 PRINT_ERROR("Runtime error: %s", "Cast failed");
4963 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 790);
4964 show_backtrace(1);
4965 }
4966 self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_type].val = var_n_type; /* _n_type on <self:ASuperclass> */
4967 if (var_n_type == NULL) {
4968 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4969 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 791);
4970 show_backtrace(1);
4971 } else {
4972 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
4973 if (unlikely(var_n_type == NULL)) {
4974 PRINT_ERROR("Runtime error: %s", "Receiver is null");
4975 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
4976 show_backtrace(1);
4977 }
4978 var_n_type->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
4979 RET_LABEL2:(void)0;
4980 }
4981 }
4982 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:ASuperclass> */
4983 var = NULL;
4984 if (var_n_annotations == NULL) {
4985 var3 = 0; /* is null */
4986 } else {
4987 var3 = 1; /* arg is null and recv is not */
4988 }
4989 if (0) {
4990 { /* Inline kernel#Object#!= (var_n_annotations,var) on <var_n_annotations:nullable AAnnotations> */
4991 var_other = var;
4992 {
4993 var6 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
4994 }
4995 var7 = !var6;
4996 var4 = var7;
4997 goto RET_LABEL5;
4998 RET_LABEL5:(void)0;
4999 }
5000 var3 = var4;
5001 }
5002 if (var3){
5003 {
5004 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5005 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5006 RET_LABEL8:(void)0;
5007 }
5008 }
5009 } else {
5010 }
5011 RET_LABEL:;
5012 }
5013 /* method parser_prod#ASuperclass#replace_child for (self: ASuperclass, ANode, nullable ANode) */
5014 void nit__parser_prod___ASuperclass___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
5015 val* var_old_child /* var old_child: ANode */;
5016 val* var_new_child /* var new_child: nullable ANode */;
5017 val* var /* : TKwsuper */;
5018 short int var1 /* : Bool */;
5019 val* var_other /* var other: nullable Object */;
5020 short int var3 /* : Bool */;
5021 short int var5 /* : Bool */;
5022 short int var6 /* : Bool */;
5023 int cltype;
5024 int idtype;
5025 const char* var_class_name;
5026 val* var7 /* : AType */;
5027 short int var8 /* : Bool */;
5028 short int var10 /* : Bool */;
5029 short int var12 /* : Bool */;
5030 short int var13 /* : Bool */;
5031 int cltype14;
5032 int idtype15;
5033 const char* var_class_name16;
5034 val* var17 /* : nullable AAnnotations */;
5035 short int var18 /* : Bool */;
5036 short int var19 /* : Bool */;
5037 short int var21 /* : Bool */;
5038 short int var23 /* : Bool */;
5039 short int var24 /* : Bool */;
5040 int cltype25;
5041 int idtype26;
5042 const char* var_class_name27;
5043 var_old_child = p0;
5044 var_new_child = p1;
5045 var = self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_kwsuper].val; /* _n_kwsuper on <self:ASuperclass> */
5046 if (unlikely(var == NULL)) {
5047 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwsuper");
5048 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 798);
5049 show_backtrace(1);
5050 }
5051 {
5052 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwsuper> */
5053 var_other = var_old_child;
5054 {
5055 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwsuper> */
5056 var5 = var == var_other;
5057 var3 = var5;
5058 goto RET_LABEL4;
5059 RET_LABEL4:(void)0;
5060 }
5061 }
5062 var1 = var3;
5063 goto RET_LABEL2;
5064 RET_LABEL2:(void)0;
5065 }
5066 }
5067 if (var1){
5068 /* <var_new_child:nullable ANode> isa TKwsuper */
5069 cltype = type_nit__TKwsuper.color;
5070 idtype = type_nit__TKwsuper.id;
5071 if(var_new_child == NULL) {
5072 var6 = 0;
5073 } else {
5074 if(cltype >= var_new_child->type->table_size) {
5075 var6 = 0;
5076 } else {
5077 var6 = var_new_child->type->type_table[cltype] == idtype;
5078 }
5079 }
5080 if (unlikely(!var6)) {
5081 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
5082 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwsuper", var_class_name);
5083 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 799);
5084 show_backtrace(1);
5085 }
5086 {
5087 nit__parser_prod___ASuperclass___n_kwsuper_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_kwsuper= on <self:ASuperclass>*/
5088 }
5089 goto RET_LABEL;
5090 } else {
5091 }
5092 var7 = self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_type].val; /* _n_type on <self:ASuperclass> */
5093 if (unlikely(var7 == NULL)) {
5094 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
5095 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 802);
5096 show_backtrace(1);
5097 }
5098 {
5099 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:AType> */
5100 var_other = var_old_child;
5101 {
5102 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:AType> */
5103 var12 = var7 == var_other;
5104 var10 = var12;
5105 goto RET_LABEL11;
5106 RET_LABEL11:(void)0;
5107 }
5108 }
5109 var8 = var10;
5110 goto RET_LABEL9;
5111 RET_LABEL9:(void)0;
5112 }
5113 }
5114 if (var8){
5115 /* <var_new_child:nullable ANode> isa AType */
5116 cltype14 = type_nit__AType.color;
5117 idtype15 = type_nit__AType.id;
5118 if(var_new_child == NULL) {
5119 var13 = 0;
5120 } else {
5121 if(cltype14 >= var_new_child->type->table_size) {
5122 var13 = 0;
5123 } else {
5124 var13 = var_new_child->type->type_table[cltype14] == idtype15;
5125 }
5126 }
5127 if (unlikely(!var13)) {
5128 var_class_name16 = var_new_child == NULL ? "null" : var_new_child->type->name;
5129 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name16);
5130 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 803);
5131 show_backtrace(1);
5132 }
5133 {
5134 nit__parser_prod___ASuperclass___n_type_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_type= on <self:ASuperclass>*/
5135 }
5136 goto RET_LABEL;
5137 } else {
5138 }
5139 var17 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ASuperclass> */
5140 if (var17 == NULL) {
5141 var18 = 0; /* <var_old_child:ANode> cannot be null */
5142 } else {
5143 { /* Inline kernel#Object#== (var17,var_old_child) on <var17:nullable AAnnotations> */
5144 var_other = var_old_child;
5145 {
5146 { /* Inline kernel#Object#is_same_instance (var17,var_other) on <var17:nullable AAnnotations(AAnnotations)> */
5147 var23 = var17 == var_other;
5148 var21 = var23;
5149 goto RET_LABEL22;
5150 RET_LABEL22:(void)0;
5151 }
5152 }
5153 var19 = var21;
5154 goto RET_LABEL20;
5155 RET_LABEL20:(void)0;
5156 }
5157 var18 = var19;
5158 }
5159 if (var18){
5160 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
5161 cltype25 = type_nullable__nit__AAnnotations.color;
5162 idtype26 = type_nullable__nit__AAnnotations.id;
5163 if(var_new_child == NULL) {
5164 var24 = 1;
5165 } else {
5166 if(cltype25 >= var_new_child->type->table_size) {
5167 var24 = 0;
5168 } else {
5169 var24 = var_new_child->type->type_table[cltype25] == idtype26;
5170 }
5171 }
5172 if (unlikely(!var24)) {
5173 var_class_name27 = var_new_child == NULL ? "null" : var_new_child->type->name;
5174 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name27);
5175 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 807);
5176 show_backtrace(1);
5177 }
5178 {
5179 nit__parser_prod___ASuperclass___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#ASuperclass#n_annotations= on <self:ASuperclass>*/
5180 }
5181 goto RET_LABEL;
5182 } else {
5183 }
5184 RET_LABEL:;
5185 }
5186 /* method parser_prod#ASuperclass#n_kwsuper= for (self: ASuperclass, TKwsuper) */
5187 void nit__parser_prod___ASuperclass___n_kwsuper_61d(val* self, val* p0) {
5188 val* var_node /* var node: TKwsuper */;
5189 var_node = p0;
5190 self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_kwsuper].val = var_node; /* _n_kwsuper on <self:ASuperclass> */
5191 {
5192 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwsuper> */
5193 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwsuper> */
5194 RET_LABEL1:(void)0;
5195 }
5196 }
5197 RET_LABEL:;
5198 }
5199 /* method parser_prod#ASuperclass#n_type= for (self: ASuperclass, AType) */
5200 void nit__parser_prod___ASuperclass___n_type_61d(val* self, val* p0) {
5201 val* var_node /* var node: AType */;
5202 var_node = p0;
5203 self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_type].val = var_node; /* _n_type on <self:ASuperclass> */
5204 {
5205 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
5206 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
5207 RET_LABEL1:(void)0;
5208 }
5209 }
5210 RET_LABEL:;
5211 }
5212 /* method parser_prod#ASuperclass#n_annotations= for (self: ASuperclass, nullable AAnnotations) */
5213 void nit__parser_prod___ASuperclass___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
5214 val* var_node /* var node: nullable AAnnotations */;
5215 val* var /* : null */;
5216 short int var1 /* : Bool */;
5217 short int var2 /* : Bool */;
5218 val* var_other /* var other: nullable Object */;
5219 short int var4 /* : Bool */;
5220 short int var5 /* : Bool */;
5221 var_node = p0;
5222 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:ASuperclass> */
5223 var = NULL;
5224 if (var_node == NULL) {
5225 var1 = 0; /* is null */
5226 } else {
5227 var1 = 1; /* arg is null and recv is not */
5228 }
5229 if (0) {
5230 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
5231 var_other = var;
5232 {
5233 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
5234 }
5235 var5 = !var4;
5236 var2 = var5;
5237 goto RET_LABEL3;
5238 RET_LABEL3:(void)0;
5239 }
5240 var1 = var2;
5241 }
5242 if (var1){
5243 {
5244 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
5245 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
5246 RET_LABEL6:(void)0;
5247 }
5248 }
5249 } else {
5250 }
5251 RET_LABEL:;
5252 }
5253 /* method parser_prod#ASuperclass#visit_all for (self: ASuperclass, Visitor) */
5254 void nit__parser_prod___ASuperclass___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
5255 val* var_v /* var v: Visitor */;
5256 val* var /* : TKwsuper */;
5257 val* var1 /* : AType */;
5258 val* var2 /* : nullable AAnnotations */;
5259 var_v = p0;
5260 var = self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_kwsuper].val; /* _n_kwsuper on <self:ASuperclass> */
5261 if (unlikely(var == NULL)) {
5262 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwsuper");
5263 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 831);
5264 show_backtrace(1);
5265 }
5266 {
5267 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5268 }
5269 var1 = self->attrs[COLOR_nit__parser_nodes__ASuperclass___n_type].val; /* _n_type on <self:ASuperclass> */
5270 if (unlikely(var1 == NULL)) {
5271 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
5272 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 832);
5273 show_backtrace(1);
5274 }
5275 {
5276 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5277 }
5278 var2 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ASuperclass> */
5279 {
5280 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
5281 }
5282 RET_LABEL:;
5283 }
5284 /* method parser_prod#AAttrPropdef#init_aattrpropdef for (self: AAttrPropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwvar, nullable TId, nullable AType, nullable AExpr, nullable AAnnotations, nullable AExpr) */
5285 void nit__parser_prod___AAttrPropdef___init_aattrpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8) {
5286 val* var_n_doc /* var n_doc: nullable ADoc */;
5287 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
5288 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
5289 val* var_n_kwvar /* var n_kwvar: nullable TKwvar */;
5290 val* var_n_id2 /* var n_id2: nullable TId */;
5291 val* var_n_type /* var n_type: nullable AType */;
5292 val* var_n_expr /* var n_expr: nullable AExpr */;
5293 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
5294 val* var_n_block /* var n_block: nullable AExpr */;
5295 val* var /* : null */;
5296 short int var1 /* : Bool */;
5297 short int var2 /* : Bool */;
5298 val* var_other /* var other: nullable Object */;
5299 short int var4 /* : Bool */;
5300 short int var5 /* : Bool */;
5301 val* var7 /* : null */;
5302 short int var8 /* : Bool */;
5303 short int var9 /* : Bool */;
5304 short int var11 /* : Bool */;
5305 short int var12 /* : Bool */;
5306 val* var17 /* : null */;
5307 short int var18 /* : Bool */;
5308 short int var19 /* : Bool */;
5309 short int var21 /* : Bool */;
5310 short int var22 /* : Bool */;
5311 val* var24 /* : null */;
5312 short int var25 /* : Bool */;
5313 short int var26 /* : Bool */;
5314 short int var28 /* : Bool */;
5315 short int var29 /* : Bool */;
5316 val* var31 /* : null */;
5317 short int var32 /* : Bool */;
5318 short int var33 /* : Bool */;
5319 short int var35 /* : Bool */;
5320 short int var36 /* : Bool */;
5321 val* var38 /* : null */;
5322 short int var39 /* : Bool */;
5323 short int var40 /* : Bool */;
5324 short int var42 /* : Bool */;
5325 short int var43 /* : Bool */;
5326 var_n_doc = p0;
5327 var_n_kwredef = p1;
5328 var_n_visibility = p2;
5329 var_n_kwvar = p3;
5330 var_n_id2 = p4;
5331 var_n_type = p5;
5332 var_n_expr = p6;
5333 var_n_annotations = p7;
5334 var_n_block = p8;
5335 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_n_doc; /* _n_doc on <self:AAttrPropdef> */
5336 var = NULL;
5337 if (var_n_doc == NULL) {
5338 var1 = 0; /* is null */
5339 } else {
5340 var1 = 1; /* arg is null and recv is not */
5341 }
5342 if (0) {
5343 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
5344 var_other = var;
5345 {
5346 var4 = ((short int (*)(val* self, val* p0))(var_n_doc->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
5347 }
5348 var5 = !var4;
5349 var2 = var5;
5350 goto RET_LABEL3;
5351 RET_LABEL3:(void)0;
5352 }
5353 var1 = var2;
5354 }
5355 if (var1){
5356 {
5357 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
5358 var_n_doc->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
5359 RET_LABEL6:(void)0;
5360 }
5361 }
5362 } else {
5363 }
5364 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AAttrPropdef> */
5365 var7 = NULL;
5366 if (var_n_kwredef == NULL) {
5367 var8 = 0; /* is null */
5368 } else {
5369 var8 = 1; /* arg is null and recv is not */
5370 }
5371 if (0) {
5372 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
5373 var_other = var7;
5374 {
5375 var11 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
5376 }
5377 var12 = !var11;
5378 var9 = var12;
5379 goto RET_LABEL10;
5380 RET_LABEL10:(void)0;
5381 }
5382 var8 = var9;
5383 }
5384 if (var8){
5385 {
5386 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
5387 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
5388 RET_LABEL13:(void)0;
5389 }
5390 }
5391 } else {
5392 }
5393 if (unlikely(var_n_visibility == NULL)) {
5394 PRINT_ERROR("Runtime error: %s", "Cast failed");
5395 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 853);
5396 show_backtrace(1);
5397 }
5398 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AAttrPropdef> */
5399 if (var_n_visibility == NULL) {
5400 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5401 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 854);
5402 show_backtrace(1);
5403 } else {
5404 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
5405 if (unlikely(var_n_visibility == NULL)) {
5406 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5407 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
5408 show_backtrace(1);
5409 }
5410 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
5411 RET_LABEL14:(void)0;
5412 }
5413 }
5414 if (unlikely(var_n_kwvar == NULL)) {
5415 PRINT_ERROR("Runtime error: %s", "Cast failed");
5416 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 855);
5417 show_backtrace(1);
5418 }
5419 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_kwvar].val = var_n_kwvar; /* _n_kwvar on <self:AAttrPropdef> */
5420 if (var_n_kwvar == NULL) {
5421 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5422 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 856);
5423 show_backtrace(1);
5424 } else {
5425 { /* Inline parser_nodes#ANode#parent= (var_n_kwvar,self) on <var_n_kwvar:nullable TKwvar> */
5426 if (unlikely(var_n_kwvar == NULL)) {
5427 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5428 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
5429 show_backtrace(1);
5430 }
5431 var_n_kwvar->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwvar:nullable TKwvar> */
5432 RET_LABEL15:(void)0;
5433 }
5434 }
5435 if (unlikely(var_n_id2 == NULL)) {
5436 PRINT_ERROR("Runtime error: %s", "Cast failed");
5437 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 857);
5438 show_backtrace(1);
5439 }
5440 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_id2].val = var_n_id2; /* _n_id2 on <self:AAttrPropdef> */
5441 if (var_n_id2 == NULL) {
5442 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5443 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 858);
5444 show_backtrace(1);
5445 } else {
5446 { /* Inline parser_nodes#ANode#parent= (var_n_id2,self) on <var_n_id2:nullable TId> */
5447 if (unlikely(var_n_id2 == NULL)) {
5448 PRINT_ERROR("Runtime error: %s", "Receiver is null");
5449 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
5450 show_backtrace(1);
5451 }
5452 var_n_id2->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id2:nullable TId> */
5453 RET_LABEL16:(void)0;
5454 }
5455 }
5456 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_type].val = var_n_type; /* _n_type on <self:AAttrPropdef> */
5457 var17 = NULL;
5458 if (var_n_type == NULL) {
5459 var18 = 0; /* is null */
5460 } else {
5461 var18 = 1; /* arg is null and recv is not */
5462 }
5463 if (0) {
5464 { /* Inline kernel#Object#!= (var_n_type,var17) on <var_n_type:nullable AType> */
5465 var_other = var17;
5466 {
5467 var21 = ((short int (*)(val* self, val* p0))(var_n_type->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_type, var_other) /* == on <var_n_type:nullable AType(AType)>*/;
5468 }
5469 var22 = !var21;
5470 var19 = var22;
5471 goto RET_LABEL20;
5472 RET_LABEL20:(void)0;
5473 }
5474 var18 = var19;
5475 }
5476 if (var18){
5477 {
5478 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType(AType)> */
5479 var_n_type->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType(AType)> */
5480 RET_LABEL23:(void)0;
5481 }
5482 }
5483 } else {
5484 }
5485 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_expr].val = var_n_expr; /* _n_expr on <self:AAttrPropdef> */
5486 var24 = NULL;
5487 if (var_n_expr == NULL) {
5488 var25 = 0; /* is null */
5489 } else {
5490 var25 = 1; /* arg is null and recv is not */
5491 }
5492 if (0) {
5493 { /* Inline kernel#Object#!= (var_n_expr,var24) on <var_n_expr:nullable AExpr> */
5494 var_other = var24;
5495 {
5496 var28 = ((short int (*)(val* self, val* p0))(var_n_expr->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_expr, var_other) /* == on <var_n_expr:nullable AExpr(AExpr)>*/;
5497 }
5498 var29 = !var28;
5499 var26 = var29;
5500 goto RET_LABEL27;
5501 RET_LABEL27:(void)0;
5502 }
5503 var25 = var26;
5504 }
5505 if (var25){
5506 {
5507 { /* Inline parser_nodes#ANode#parent= (var_n_expr,self) on <var_n_expr:nullable AExpr(AExpr)> */
5508 var_n_expr->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_expr:nullable AExpr(AExpr)> */
5509 RET_LABEL30:(void)0;
5510 }
5511 }
5512 } else {
5513 }
5514 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AAttrPropdef> */
5515 var31 = NULL;
5516 if (var_n_annotations == NULL) {
5517 var32 = 0; /* is null */
5518 } else {
5519 var32 = 1; /* arg is null and recv is not */
5520 }
5521 if (0) {
5522 { /* Inline kernel#Object#!= (var_n_annotations,var31) on <var_n_annotations:nullable AAnnotations> */
5523 var_other = var31;
5524 {
5525 var35 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
5526 }
5527 var36 = !var35;
5528 var33 = var36;
5529 goto RET_LABEL34;
5530 RET_LABEL34:(void)0;
5531 }
5532 var32 = var33;
5533 }
5534 if (var32){
5535 {
5536 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5537 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
5538 RET_LABEL37:(void)0;
5539 }
5540 }
5541 } else {
5542 }
5543 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_block].val = var_n_block; /* _n_block on <self:AAttrPropdef> */
5544 var38 = NULL;
5545 if (var_n_block == NULL) {
5546 var39 = 0; /* is null */
5547 } else {
5548 var39 = 1; /* arg is null and recv is not */
5549 }
5550 if (0) {
5551 { /* Inline kernel#Object#!= (var_n_block,var38) on <var_n_block:nullable AExpr> */
5552 var_other = var38;
5553 {
5554 var42 = ((short int (*)(val* self, val* p0))(var_n_block->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
5555 }
5556 var43 = !var42;
5557 var40 = var43;
5558 goto RET_LABEL41;
5559 RET_LABEL41:(void)0;
5560 }
5561 var39 = var40;
5562 }
5563 if (var39){
5564 {
5565 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
5566 var_n_block->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
5567 RET_LABEL44:(void)0;
5568 }
5569 }
5570 } else {
5571 }
5572 RET_LABEL:;
5573 }
5574 /* method parser_prod#AAttrPropdef#replace_child for (self: AAttrPropdef, ANode, nullable ANode) */
5575 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
5576 val* var_old_child /* var old_child: ANode */;
5577 val* var_new_child /* var new_child: nullable ANode */;
5578 val* var /* : nullable ADoc */;
5579 short int var1 /* : Bool */;
5580 short int var2 /* : Bool */;
5581 val* var_other /* var other: nullable Object */;
5582 short int var4 /* : Bool */;
5583 short int var6 /* : Bool */;
5584 short int var7 /* : Bool */;
5585 int cltype;
5586 int idtype;
5587 const char* var_class_name;
5588 val* var8 /* : nullable TKwredef */;
5589 short int var9 /* : Bool */;
5590 short int var10 /* : Bool */;
5591 short int var12 /* : Bool */;
5592 short int var14 /* : Bool */;
5593 short int var15 /* : Bool */;
5594 int cltype16;
5595 int idtype17;
5596 const char* var_class_name18;
5597 val* var19 /* : nullable AVisibility */;
5598 short int var20 /* : Bool */;
5599 short int var21 /* : Bool */;
5600 short int var23 /* : Bool */;
5601 short int var25 /* : Bool */;
5602 short int var26 /* : Bool */;
5603 int cltype27;
5604 int idtype28;
5605 const char* var_class_name29;
5606 val* var30 /* : TKwvar */;
5607 short int var31 /* : Bool */;
5608 short int var33 /* : Bool */;
5609 short int var35 /* : Bool */;
5610 short int var36 /* : Bool */;
5611 int cltype37;
5612 int idtype38;
5613 const char* var_class_name39;
5614 val* var40 /* : TId */;
5615 short int var41 /* : Bool */;
5616 short int var43 /* : Bool */;
5617 short int var45 /* : Bool */;
5618 short int var46 /* : Bool */;
5619 int cltype47;
5620 int idtype48;
5621 const char* var_class_name49;
5622 val* var50 /* : nullable AType */;
5623 short int var51 /* : Bool */;
5624 short int var52 /* : Bool */;
5625 short int var54 /* : Bool */;
5626 short int var56 /* : Bool */;
5627 short int var57 /* : Bool */;
5628 int cltype58;
5629 int idtype59;
5630 const char* var_class_name60;
5631 val* var61 /* : nullable AExpr */;
5632 short int var62 /* : Bool */;
5633 short int var63 /* : Bool */;
5634 short int var65 /* : Bool */;
5635 short int var67 /* : Bool */;
5636 short int var68 /* : Bool */;
5637 int cltype69;
5638 int idtype70;
5639 const char* var_class_name71;
5640 val* var72 /* : nullable AAnnotations */;
5641 short int var73 /* : Bool */;
5642 short int var74 /* : Bool */;
5643 short int var76 /* : Bool */;
5644 short int var78 /* : Bool */;
5645 short int var79 /* : Bool */;
5646 int cltype80;
5647 int idtype81;
5648 const char* var_class_name82;
5649 val* var83 /* : nullable AExpr */;
5650 short int var84 /* : Bool */;
5651 short int var85 /* : Bool */;
5652 short int var87 /* : Bool */;
5653 short int var89 /* : Bool */;
5654 short int var90 /* : Bool */;
5655 int cltype91;
5656 int idtype92;
5657 const char* var_class_name93;
5658 var_old_child = p0;
5659 var_new_child = p1;
5660 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AAttrPropdef> */
5661 if (var == NULL) {
5662 var1 = 0; /* <var_old_child:ANode> cannot be null */
5663 } else {
5664 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
5665 var_other = var_old_child;
5666 {
5667 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
5668 var6 = var == var_other;
5669 var4 = var6;
5670 goto RET_LABEL5;
5671 RET_LABEL5:(void)0;
5672 }
5673 }
5674 var2 = var4;
5675 goto RET_LABEL3;
5676 RET_LABEL3:(void)0;
5677 }
5678 var1 = var2;
5679 }
5680 if (var1){
5681 /* <var_new_child:nullable ANode> isa nullable ADoc */
5682 cltype = type_nullable__nit__ADoc.color;
5683 idtype = type_nullable__nit__ADoc.id;
5684 if(var_new_child == NULL) {
5685 var7 = 1;
5686 } else {
5687 if(cltype >= var_new_child->type->table_size) {
5688 var7 = 0;
5689 } else {
5690 var7 = var_new_child->type->type_table[cltype] == idtype;
5691 }
5692 }
5693 if (unlikely(!var7)) {
5694 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
5695 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
5696 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 872);
5697 show_backtrace(1);
5698 }
5699 {
5700 nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_doc= on <self:AAttrPropdef>*/
5701 }
5702 goto RET_LABEL;
5703 } else {
5704 }
5705 var8 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AAttrPropdef> */
5706 if (var8 == NULL) {
5707 var9 = 0; /* <var_old_child:ANode> cannot be null */
5708 } else {
5709 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
5710 var_other = var_old_child;
5711 {
5712 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
5713 var14 = var8 == var_other;
5714 var12 = var14;
5715 goto RET_LABEL13;
5716 RET_LABEL13:(void)0;
5717 }
5718 }
5719 var10 = var12;
5720 goto RET_LABEL11;
5721 RET_LABEL11:(void)0;
5722 }
5723 var9 = var10;
5724 }
5725 if (var9){
5726 /* <var_new_child:nullable ANode> isa nullable TKwredef */
5727 cltype16 = type_nullable__nit__TKwredef.color;
5728 idtype17 = type_nullable__nit__TKwredef.id;
5729 if(var_new_child == NULL) {
5730 var15 = 1;
5731 } else {
5732 if(cltype16 >= var_new_child->type->table_size) {
5733 var15 = 0;
5734 } else {
5735 var15 = var_new_child->type->type_table[cltype16] == idtype17;
5736 }
5737 }
5738 if (unlikely(!var15)) {
5739 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
5740 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
5741 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 876);
5742 show_backtrace(1);
5743 }
5744 {
5745 nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_kwredef= on <self:AAttrPropdef>*/
5746 }
5747 goto RET_LABEL;
5748 } else {
5749 }
5750 var19 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AAttrPropdef> */
5751 if (var19 == NULL) {
5752 var20 = 0; /* <var_old_child:ANode> cannot be null */
5753 } else {
5754 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
5755 var_other = var_old_child;
5756 {
5757 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
5758 var25 = var19 == var_other;
5759 var23 = var25;
5760 goto RET_LABEL24;
5761 RET_LABEL24:(void)0;
5762 }
5763 }
5764 var21 = var23;
5765 goto RET_LABEL22;
5766 RET_LABEL22:(void)0;
5767 }
5768 var20 = var21;
5769 }
5770 if (var20){
5771 /* <var_new_child:nullable ANode> isa AVisibility */
5772 cltype27 = type_nit__AVisibility.color;
5773 idtype28 = type_nit__AVisibility.id;
5774 if(var_new_child == NULL) {
5775 var26 = 0;
5776 } else {
5777 if(cltype27 >= var_new_child->type->table_size) {
5778 var26 = 0;
5779 } else {
5780 var26 = var_new_child->type->type_table[cltype27] == idtype28;
5781 }
5782 }
5783 if (unlikely(!var26)) {
5784 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
5785 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
5786 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 880);
5787 show_backtrace(1);
5788 }
5789 {
5790 nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_visibility= on <self:AAttrPropdef>*/
5791 }
5792 goto RET_LABEL;
5793 } else {
5794 }
5795 var30 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_kwvar].val; /* _n_kwvar on <self:AAttrPropdef> */
5796 if (unlikely(var30 == NULL)) {
5797 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwvar");
5798 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 883);
5799 show_backtrace(1);
5800 }
5801 {
5802 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwvar> */
5803 var_other = var_old_child;
5804 {
5805 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwvar> */
5806 var35 = var30 == var_other;
5807 var33 = var35;
5808 goto RET_LABEL34;
5809 RET_LABEL34:(void)0;
5810 }
5811 }
5812 var31 = var33;
5813 goto RET_LABEL32;
5814 RET_LABEL32:(void)0;
5815 }
5816 }
5817 if (var31){
5818 /* <var_new_child:nullable ANode> isa TKwvar */
5819 cltype37 = type_nit__TKwvar.color;
5820 idtype38 = type_nit__TKwvar.id;
5821 if(var_new_child == NULL) {
5822 var36 = 0;
5823 } else {
5824 if(cltype37 >= var_new_child->type->table_size) {
5825 var36 = 0;
5826 } else {
5827 var36 = var_new_child->type->type_table[cltype37] == idtype38;
5828 }
5829 }
5830 if (unlikely(!var36)) {
5831 var_class_name39 = var_new_child == NULL ? "null" : var_new_child->type->name;
5832 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwvar", var_class_name39);
5833 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 884);
5834 show_backtrace(1);
5835 }
5836 {
5837 nit__parser_prod___AAttrPropdef___n_kwvar_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_kwvar= on <self:AAttrPropdef>*/
5838 }
5839 goto RET_LABEL;
5840 } else {
5841 }
5842 var40 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_id2].val; /* _n_id2 on <self:AAttrPropdef> */
5843 if (unlikely(var40 == NULL)) {
5844 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id2");
5845 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 887);
5846 show_backtrace(1);
5847 }
5848 {
5849 { /* Inline kernel#Object#== (var40,var_old_child) on <var40:TId> */
5850 var_other = var_old_child;
5851 {
5852 { /* Inline kernel#Object#is_same_instance (var40,var_other) on <var40:TId> */
5853 var45 = var40 == var_other;
5854 var43 = var45;
5855 goto RET_LABEL44;
5856 RET_LABEL44:(void)0;
5857 }
5858 }
5859 var41 = var43;
5860 goto RET_LABEL42;
5861 RET_LABEL42:(void)0;
5862 }
5863 }
5864 if (var41){
5865 /* <var_new_child:nullable ANode> isa TId */
5866 cltype47 = type_nit__TId.color;
5867 idtype48 = type_nit__TId.id;
5868 if(var_new_child == NULL) {
5869 var46 = 0;
5870 } else {
5871 if(cltype47 >= var_new_child->type->table_size) {
5872 var46 = 0;
5873 } else {
5874 var46 = var_new_child->type->type_table[cltype47] == idtype48;
5875 }
5876 }
5877 if (unlikely(!var46)) {
5878 var_class_name49 = var_new_child == NULL ? "null" : var_new_child->type->name;
5879 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TId", var_class_name49);
5880 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 888);
5881 show_backtrace(1);
5882 }
5883 {
5884 nit__parser_prod___AAttrPropdef___n_id2_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_id2= on <self:AAttrPropdef>*/
5885 }
5886 goto RET_LABEL;
5887 } else {
5888 }
5889 var50 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_type].val; /* _n_type on <self:AAttrPropdef> */
5890 if (var50 == NULL) {
5891 var51 = 0; /* <var_old_child:ANode> cannot be null */
5892 } else {
5893 { /* Inline kernel#Object#== (var50,var_old_child) on <var50:nullable AType> */
5894 var_other = var_old_child;
5895 {
5896 { /* Inline kernel#Object#is_same_instance (var50,var_other) on <var50:nullable AType(AType)> */
5897 var56 = var50 == var_other;
5898 var54 = var56;
5899 goto RET_LABEL55;
5900 RET_LABEL55:(void)0;
5901 }
5902 }
5903 var52 = var54;
5904 goto RET_LABEL53;
5905 RET_LABEL53:(void)0;
5906 }
5907 var51 = var52;
5908 }
5909 if (var51){
5910 /* <var_new_child:nullable ANode> isa nullable AType */
5911 cltype58 = type_nullable__nit__AType.color;
5912 idtype59 = type_nullable__nit__AType.id;
5913 if(var_new_child == NULL) {
5914 var57 = 1;
5915 } else {
5916 if(cltype58 >= var_new_child->type->table_size) {
5917 var57 = 0;
5918 } else {
5919 var57 = var_new_child->type->type_table[cltype58] == idtype59;
5920 }
5921 }
5922 if (unlikely(!var57)) {
5923 var_class_name60 = var_new_child == NULL ? "null" : var_new_child->type->name;
5924 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AType", var_class_name60);
5925 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 892);
5926 show_backtrace(1);
5927 }
5928 {
5929 nit__parser_prod___AAttrPropdef___n_type_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_type= on <self:AAttrPropdef>*/
5930 }
5931 goto RET_LABEL;
5932 } else {
5933 }
5934 var61 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_expr].val; /* _n_expr on <self:AAttrPropdef> */
5935 if (var61 == NULL) {
5936 var62 = 0; /* <var_old_child:ANode> cannot be null */
5937 } else {
5938 { /* Inline kernel#Object#== (var61,var_old_child) on <var61:nullable AExpr> */
5939 var_other = var_old_child;
5940 {
5941 { /* Inline kernel#Object#is_same_instance (var61,var_other) on <var61:nullable AExpr(AExpr)> */
5942 var67 = var61 == var_other;
5943 var65 = var67;
5944 goto RET_LABEL66;
5945 RET_LABEL66:(void)0;
5946 }
5947 }
5948 var63 = var65;
5949 goto RET_LABEL64;
5950 RET_LABEL64:(void)0;
5951 }
5952 var62 = var63;
5953 }
5954 if (var62){
5955 /* <var_new_child:nullable ANode> isa nullable AExpr */
5956 cltype69 = type_nullable__nit__AExpr.color;
5957 idtype70 = type_nullable__nit__AExpr.id;
5958 if(var_new_child == NULL) {
5959 var68 = 1;
5960 } else {
5961 if(cltype69 >= var_new_child->type->table_size) {
5962 var68 = 0;
5963 } else {
5964 var68 = var_new_child->type->type_table[cltype69] == idtype70;
5965 }
5966 }
5967 if (unlikely(!var68)) {
5968 var_class_name71 = var_new_child == NULL ? "null" : var_new_child->type->name;
5969 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name71);
5970 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 896);
5971 show_backtrace(1);
5972 }
5973 {
5974 nit__parser_prod___AAttrPropdef___n_expr_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_expr= on <self:AAttrPropdef>*/
5975 }
5976 goto RET_LABEL;
5977 } else {
5978 }
5979 var72 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAttrPropdef> */
5980 if (var72 == NULL) {
5981 var73 = 0; /* <var_old_child:ANode> cannot be null */
5982 } else {
5983 { /* Inline kernel#Object#== (var72,var_old_child) on <var72:nullable AAnnotations> */
5984 var_other = var_old_child;
5985 {
5986 { /* Inline kernel#Object#is_same_instance (var72,var_other) on <var72:nullable AAnnotations(AAnnotations)> */
5987 var78 = var72 == var_other;
5988 var76 = var78;
5989 goto RET_LABEL77;
5990 RET_LABEL77:(void)0;
5991 }
5992 }
5993 var74 = var76;
5994 goto RET_LABEL75;
5995 RET_LABEL75:(void)0;
5996 }
5997 var73 = var74;
5998 }
5999 if (var73){
6000 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
6001 cltype80 = type_nullable__nit__AAnnotations.color;
6002 idtype81 = type_nullable__nit__AAnnotations.id;
6003 if(var_new_child == NULL) {
6004 var79 = 1;
6005 } else {
6006 if(cltype80 >= var_new_child->type->table_size) {
6007 var79 = 0;
6008 } else {
6009 var79 = var_new_child->type->type_table[cltype80] == idtype81;
6010 }
6011 }
6012 if (unlikely(!var79)) {
6013 var_class_name82 = var_new_child == NULL ? "null" : var_new_child->type->name;
6014 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name82);
6015 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 900);
6016 show_backtrace(1);
6017 }
6018 {
6019 nit__parser_prod___AAttrPropdef___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_annotations= on <self:AAttrPropdef>*/
6020 }
6021 goto RET_LABEL;
6022 } else {
6023 }
6024 var83 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_block].val; /* _n_block on <self:AAttrPropdef> */
6025 if (var83 == NULL) {
6026 var84 = 0; /* <var_old_child:ANode> cannot be null */
6027 } else {
6028 { /* Inline kernel#Object#== (var83,var_old_child) on <var83:nullable AExpr> */
6029 var_other = var_old_child;
6030 {
6031 { /* Inline kernel#Object#is_same_instance (var83,var_other) on <var83:nullable AExpr(AExpr)> */
6032 var89 = var83 == var_other;
6033 var87 = var89;
6034 goto RET_LABEL88;
6035 RET_LABEL88:(void)0;
6036 }
6037 }
6038 var85 = var87;
6039 goto RET_LABEL86;
6040 RET_LABEL86:(void)0;
6041 }
6042 var84 = var85;
6043 }
6044 if (var84){
6045 /* <var_new_child:nullable ANode> isa nullable AExpr */
6046 cltype91 = type_nullable__nit__AExpr.color;
6047 idtype92 = type_nullable__nit__AExpr.id;
6048 if(var_new_child == NULL) {
6049 var90 = 1;
6050 } else {
6051 if(cltype91 >= var_new_child->type->table_size) {
6052 var90 = 0;
6053 } else {
6054 var90 = var_new_child->type->type_table[cltype91] == idtype92;
6055 }
6056 }
6057 if (unlikely(!var90)) {
6058 var_class_name93 = var_new_child == NULL ? "null" : var_new_child->type->name;
6059 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name93);
6060 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 904);
6061 show_backtrace(1);
6062 }
6063 {
6064 nit__parser_prod___AAttrPropdef___n_block_61d(self, var_new_child); /* Direct call parser_prod#AAttrPropdef#n_block= on <self:AAttrPropdef>*/
6065 }
6066 goto RET_LABEL;
6067 } else {
6068 }
6069 RET_LABEL:;
6070 }
6071 /* method parser_prod#AAttrPropdef#n_doc= for (self: AAttrPropdef, nullable ADoc) */
6072 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_doc_61d(val* self, val* p0) {
6073 val* var_node /* var node: nullable ADoc */;
6074 val* var /* : null */;
6075 short int var1 /* : Bool */;
6076 short int var2 /* : Bool */;
6077 val* var_other /* var other: nullable Object */;
6078 short int var4 /* : Bool */;
6079 short int var5 /* : Bool */;
6080 var_node = p0;
6081 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_node; /* _n_doc on <self:AAttrPropdef> */
6082 var = NULL;
6083 if (var_node == NULL) {
6084 var1 = 0; /* is null */
6085 } else {
6086 var1 = 1; /* arg is null and recv is not */
6087 }
6088 if (0) {
6089 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
6090 var_other = var;
6091 {
6092 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
6093 }
6094 var5 = !var4;
6095 var2 = var5;
6096 goto RET_LABEL3;
6097 RET_LABEL3:(void)0;
6098 }
6099 var1 = var2;
6100 }
6101 if (var1){
6102 {
6103 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
6104 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
6105 RET_LABEL6:(void)0;
6106 }
6107 }
6108 } else {
6109 }
6110 RET_LABEL:;
6111 }
6112 /* method parser_prod#AAttrPropdef#n_kwredef= for (self: AAttrPropdef, nullable TKwredef) */
6113 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
6114 val* var_node /* var node: nullable TKwredef */;
6115 val* var /* : null */;
6116 short int var1 /* : Bool */;
6117 short int var2 /* : Bool */;
6118 val* var_other /* var other: nullable Object */;
6119 short int var4 /* : Bool */;
6120 short int var5 /* : Bool */;
6121 var_node = p0;
6122 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:AAttrPropdef> */
6123 var = NULL;
6124 if (var_node == NULL) {
6125 var1 = 0; /* is null */
6126 } else {
6127 var1 = 1; /* arg is null and recv is not */
6128 }
6129 if (0) {
6130 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
6131 var_other = var;
6132 {
6133 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
6134 }
6135 var5 = !var4;
6136 var2 = var5;
6137 goto RET_LABEL3;
6138 RET_LABEL3:(void)0;
6139 }
6140 var1 = var2;
6141 }
6142 if (var1){
6143 {
6144 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
6145 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
6146 RET_LABEL6:(void)0;
6147 }
6148 }
6149 } else {
6150 }
6151 RET_LABEL:;
6152 }
6153 /* method parser_prod#AAttrPropdef#n_visibility= for (self: AAttrPropdef, nullable AVisibility) */
6154 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__ADefinition__n_visibility_61d(val* self, val* p0) {
6155 val* var_node /* var node: nullable AVisibility */;
6156 var_node = p0;
6157 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_node; /* _n_visibility on <self:AAttrPropdef> */
6158 if (var_node == NULL) {
6159 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6160 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 922);
6161 show_backtrace(1);
6162 } else {
6163 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
6164 if (unlikely(var_node == NULL)) {
6165 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6166 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
6167 show_backtrace(1);
6168 }
6169 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
6170 RET_LABEL1:(void)0;
6171 }
6172 }
6173 RET_LABEL:;
6174 }
6175 /* method parser_prod#AAttrPropdef#n_kwvar= for (self: AAttrPropdef, TKwvar) */
6176 void nit__parser_prod___AAttrPropdef___n_kwvar_61d(val* self, val* p0) {
6177 val* var_node /* var node: TKwvar */;
6178 var_node = p0;
6179 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_kwvar].val = var_node; /* _n_kwvar on <self:AAttrPropdef> */
6180 {
6181 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwvar> */
6182 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwvar> */
6183 RET_LABEL1:(void)0;
6184 }
6185 }
6186 RET_LABEL:;
6187 }
6188 /* method parser_prod#AAttrPropdef#n_id2= for (self: AAttrPropdef, TId) */
6189 void nit__parser_prod___AAttrPropdef___n_id2_61d(val* self, val* p0) {
6190 val* var_node /* var node: TId */;
6191 var_node = p0;
6192 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_id2].val = var_node; /* _n_id2 on <self:AAttrPropdef> */
6193 {
6194 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TId> */
6195 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TId> */
6196 RET_LABEL1:(void)0;
6197 }
6198 }
6199 RET_LABEL:;
6200 }
6201 /* method parser_prod#AAttrPropdef#n_type= for (self: AAttrPropdef, nullable AType) */
6202 void nit__parser_prod___AAttrPropdef___n_type_61d(val* self, val* p0) {
6203 val* var_node /* var node: nullable AType */;
6204 val* var /* : null */;
6205 short int var1 /* : Bool */;
6206 short int var2 /* : Bool */;
6207 val* var_other /* var other: nullable Object */;
6208 short int var4 /* : Bool */;
6209 short int var5 /* : Bool */;
6210 var_node = p0;
6211 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_type].val = var_node; /* _n_type on <self:AAttrPropdef> */
6212 var = NULL;
6213 if (var_node == NULL) {
6214 var1 = 0; /* is null */
6215 } else {
6216 var1 = 1; /* arg is null and recv is not */
6217 }
6218 if (0) {
6219 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AType> */
6220 var_other = var;
6221 {
6222 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AType(AType)>*/;
6223 }
6224 var5 = !var4;
6225 var2 = var5;
6226 goto RET_LABEL3;
6227 RET_LABEL3:(void)0;
6228 }
6229 var1 = var2;
6230 }
6231 if (var1){
6232 {
6233 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AType(AType)> */
6234 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AType(AType)> */
6235 RET_LABEL6:(void)0;
6236 }
6237 }
6238 } else {
6239 }
6240 RET_LABEL:;
6241 }
6242 /* method parser_prod#AAttrPropdef#n_expr= for (self: AAttrPropdef, nullable AExpr) */
6243 void nit__parser_prod___AAttrPropdef___n_expr_61d(val* self, val* p0) {
6244 val* var_node /* var node: nullable AExpr */;
6245 val* var /* : null */;
6246 short int var1 /* : Bool */;
6247 short int var2 /* : Bool */;
6248 val* var_other /* var other: nullable Object */;
6249 short int var4 /* : Bool */;
6250 short int var5 /* : Bool */;
6251 var_node = p0;
6252 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_expr].val = var_node; /* _n_expr on <self:AAttrPropdef> */
6253 var = NULL;
6254 if (var_node == NULL) {
6255 var1 = 0; /* is null */
6256 } else {
6257 var1 = 1; /* arg is null and recv is not */
6258 }
6259 if (0) {
6260 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
6261 var_other = var;
6262 {
6263 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
6264 }
6265 var5 = !var4;
6266 var2 = var5;
6267 goto RET_LABEL3;
6268 RET_LABEL3:(void)0;
6269 }
6270 var1 = var2;
6271 }
6272 if (var1){
6273 {
6274 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
6275 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
6276 RET_LABEL6:(void)0;
6277 }
6278 }
6279 } else {
6280 }
6281 RET_LABEL:;
6282 }
6283 /* method parser_prod#AAttrPropdef#n_annotations= for (self: AAttrPropdef, nullable AAnnotations) */
6284 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
6285 val* var_node /* var node: nullable AAnnotations */;
6286 val* var /* : null */;
6287 short int var1 /* : Bool */;
6288 short int var2 /* : Bool */;
6289 val* var_other /* var other: nullable Object */;
6290 short int var4 /* : Bool */;
6291 short int var5 /* : Bool */;
6292 var_node = p0;
6293 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AAttrPropdef> */
6294 var = NULL;
6295 if (var_node == NULL) {
6296 var1 = 0; /* is null */
6297 } else {
6298 var1 = 1; /* arg is null and recv is not */
6299 }
6300 if (0) {
6301 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
6302 var_other = var;
6303 {
6304 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
6305 }
6306 var5 = !var4;
6307 var2 = var5;
6308 goto RET_LABEL3;
6309 RET_LABEL3:(void)0;
6310 }
6311 var1 = var2;
6312 }
6313 if (var1){
6314 {
6315 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
6316 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
6317 RET_LABEL6:(void)0;
6318 }
6319 }
6320 } else {
6321 }
6322 RET_LABEL:;
6323 }
6324 /* method parser_prod#AAttrPropdef#n_block= for (self: AAttrPropdef, nullable AExpr) */
6325 void nit__parser_prod___AAttrPropdef___n_block_61d(val* self, val* p0) {
6326 val* var_node /* var node: nullable AExpr */;
6327 val* var /* : null */;
6328 short int var1 /* : Bool */;
6329 short int var2 /* : Bool */;
6330 val* var_other /* var other: nullable Object */;
6331 short int var4 /* : Bool */;
6332 short int var5 /* : Bool */;
6333 var_node = p0;
6334 self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_block].val = var_node; /* _n_block on <self:AAttrPropdef> */
6335 var = NULL;
6336 if (var_node == NULL) {
6337 var1 = 0; /* is null */
6338 } else {
6339 var1 = 1; /* arg is null and recv is not */
6340 }
6341 if (0) {
6342 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
6343 var_other = var;
6344 {
6345 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
6346 }
6347 var5 = !var4;
6348 var2 = var5;
6349 goto RET_LABEL3;
6350 RET_LABEL3:(void)0;
6351 }
6352 var1 = var2;
6353 }
6354 if (var1){
6355 {
6356 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
6357 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
6358 RET_LABEL6:(void)0;
6359 }
6360 }
6361 } else {
6362 }
6363 RET_LABEL:;
6364 }
6365 /* method parser_prod#AAttrPropdef#visit_all for (self: AAttrPropdef, Visitor) */
6366 void nit__parser_prod___AAttrPropdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
6367 val* var_v /* var v: Visitor */;
6368 val* var /* : nullable ADoc */;
6369 val* var1 /* : nullable TKwredef */;
6370 val* var2 /* : nullable AVisibility */;
6371 val* var3 /* : TKwvar */;
6372 val* var4 /* : TId */;
6373 val* var5 /* : nullable AType */;
6374 val* var6 /* : nullable AExpr */;
6375 val* var7 /* : nullable AAnnotations */;
6376 val* var8 /* : nullable AExpr */;
6377 var_v = p0;
6378 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AAttrPropdef> */
6379 {
6380 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6381 }
6382 var1 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AAttrPropdef> */
6383 {
6384 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6385 }
6386 var2 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AAttrPropdef> */
6387 {
6388 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6389 }
6390 var3 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_kwvar].val; /* _n_kwvar on <self:AAttrPropdef> */
6391 if (unlikely(var3 == NULL)) {
6392 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwvar");
6393 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 961);
6394 show_backtrace(1);
6395 }
6396 {
6397 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6398 }
6399 var4 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_id2].val; /* _n_id2 on <self:AAttrPropdef> */
6400 if (unlikely(var4 == NULL)) {
6401 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id2");
6402 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 962);
6403 show_backtrace(1);
6404 }
6405 {
6406 nit___nit__Visitor___enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6407 }
6408 var5 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_type].val; /* _n_type on <self:AAttrPropdef> */
6409 {
6410 nit___nit__Visitor___enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6411 }
6412 var6 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_expr].val; /* _n_expr on <self:AAttrPropdef> */
6413 {
6414 nit___nit__Visitor___enter_visit(var_v, var6); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6415 }
6416 var7 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AAttrPropdef> */
6417 {
6418 nit___nit__Visitor___enter_visit(var_v, var7); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6419 }
6420 var8 = self->attrs[COLOR_nit__parser_nodes__AAttrPropdef___n_block].val; /* _n_block on <self:AAttrPropdef> */
6421 {
6422 nit___nit__Visitor___enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6423 }
6424 RET_LABEL:;
6425 }
6426 /* method parser_prod#AMainMethPropdef#init_amainmethpropdef for (self: AMainMethPropdef, nullable TKwredef, nullable AExpr) */
6427 void nit__parser_prod___AMainMethPropdef___init_amainmethpropdef(val* self, val* p0, val* p1) {
6428 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
6429 val* var_n_block /* var n_block: nullable AExpr */;
6430 val* var /* : null */;
6431 short int var1 /* : Bool */;
6432 short int var2 /* : Bool */;
6433 val* var_other /* var other: nullable Object */;
6434 short int var4 /* : Bool */;
6435 short int var5 /* : Bool */;
6436 val* var7 /* : null */;
6437 short int var8 /* : Bool */;
6438 short int var9 /* : Bool */;
6439 short int var11 /* : Bool */;
6440 short int var12 /* : Bool */;
6441 var_n_kwredef = p0;
6442 var_n_block = p1;
6443 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AMainMethPropdef> */
6444 var = NULL;
6445 if (var_n_kwredef == NULL) {
6446 var1 = 0; /* is null */
6447 } else {
6448 var1 = 1; /* arg is null and recv is not */
6449 }
6450 if (0) {
6451 { /* Inline kernel#Object#!= (var_n_kwredef,var) on <var_n_kwredef:nullable TKwredef> */
6452 var_other = var;
6453 {
6454 var4 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
6455 }
6456 var5 = !var4;
6457 var2 = var5;
6458 goto RET_LABEL3;
6459 RET_LABEL3:(void)0;
6460 }
6461 var1 = var2;
6462 }
6463 if (var1){
6464 {
6465 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
6466 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
6467 RET_LABEL6:(void)0;
6468 }
6469 }
6470 } else {
6471 }
6472 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val = var_n_block; /* _n_block on <self:AMainMethPropdef> */
6473 var7 = NULL;
6474 if (var_n_block == NULL) {
6475 var8 = 0; /* is null */
6476 } else {
6477 var8 = 1; /* arg is null and recv is not */
6478 }
6479 if (0) {
6480 { /* Inline kernel#Object#!= (var_n_block,var7) on <var_n_block:nullable AExpr> */
6481 var_other = var7;
6482 {
6483 var11 = ((short int (*)(val* self, val* p0))(var_n_block->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
6484 }
6485 var12 = !var11;
6486 var9 = var12;
6487 goto RET_LABEL10;
6488 RET_LABEL10:(void)0;
6489 }
6490 var8 = var9;
6491 }
6492 if (var8){
6493 {
6494 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
6495 var_n_block->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
6496 RET_LABEL13:(void)0;
6497 }
6498 }
6499 } else {
6500 }
6501 RET_LABEL:;
6502 }
6503 /* method parser_prod#AMainMethPropdef#replace_child for (self: AMainMethPropdef, ANode, nullable ANode) */
6504 void nit__parser_prod___AMainMethPropdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
6505 val* var_old_child /* var old_child: ANode */;
6506 val* var_new_child /* var new_child: nullable ANode */;
6507 val* var /* : nullable TKwredef */;
6508 short int var1 /* : Bool */;
6509 short int var2 /* : Bool */;
6510 val* var_other /* var other: nullable Object */;
6511 short int var4 /* : Bool */;
6512 short int var6 /* : Bool */;
6513 short int var7 /* : Bool */;
6514 int cltype;
6515 int idtype;
6516 const char* var_class_name;
6517 val* var8 /* : nullable AExpr */;
6518 short int var9 /* : Bool */;
6519 short int var10 /* : Bool */;
6520 short int var12 /* : Bool */;
6521 short int var14 /* : Bool */;
6522 short int var15 /* : Bool */;
6523 int cltype16;
6524 int idtype17;
6525 const char* var_class_name18;
6526 var_old_child = p0;
6527 var_new_child = p1;
6528 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AMainMethPropdef> */
6529 if (var == NULL) {
6530 var1 = 0; /* <var_old_child:ANode> cannot be null */
6531 } else {
6532 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TKwredef> */
6533 var_other = var_old_child;
6534 {
6535 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TKwredef(TKwredef)> */
6536 var6 = var == var_other;
6537 var4 = var6;
6538 goto RET_LABEL5;
6539 RET_LABEL5:(void)0;
6540 }
6541 }
6542 var2 = var4;
6543 goto RET_LABEL3;
6544 RET_LABEL3:(void)0;
6545 }
6546 var1 = var2;
6547 }
6548 if (var1){
6549 /* <var_new_child:nullable ANode> isa nullable TKwredef */
6550 cltype = type_nullable__nit__TKwredef.color;
6551 idtype = type_nullable__nit__TKwredef.id;
6552 if(var_new_child == NULL) {
6553 var7 = 1;
6554 } else {
6555 if(cltype >= var_new_child->type->table_size) {
6556 var7 = 0;
6557 } else {
6558 var7 = var_new_child->type->type_table[cltype] == idtype;
6559 }
6560 }
6561 if (unlikely(!var7)) {
6562 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
6563 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name);
6564 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 984);
6565 show_backtrace(1);
6566 }
6567 {
6568 nit__parser_prod___AMainMethPropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#AMainMethPropdef#n_kwredef= on <self:AMainMethPropdef>*/
6569 }
6570 goto RET_LABEL;
6571 } else {
6572 }
6573 var8 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMainMethPropdef> */
6574 if (var8 == NULL) {
6575 var9 = 0; /* <var_old_child:ANode> cannot be null */
6576 } else {
6577 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable AExpr> */
6578 var_other = var_old_child;
6579 {
6580 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable AExpr(AExpr)> */
6581 var14 = var8 == var_other;
6582 var12 = var14;
6583 goto RET_LABEL13;
6584 RET_LABEL13:(void)0;
6585 }
6586 }
6587 var10 = var12;
6588 goto RET_LABEL11;
6589 RET_LABEL11:(void)0;
6590 }
6591 var9 = var10;
6592 }
6593 if (var9){
6594 /* <var_new_child:nullable ANode> isa nullable AExpr */
6595 cltype16 = type_nullable__nit__AExpr.color;
6596 idtype17 = type_nullable__nit__AExpr.id;
6597 if(var_new_child == NULL) {
6598 var15 = 1;
6599 } else {
6600 if(cltype16 >= var_new_child->type->table_size) {
6601 var15 = 0;
6602 } else {
6603 var15 = var_new_child->type->type_table[cltype16] == idtype17;
6604 }
6605 }
6606 if (unlikely(!var15)) {
6607 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
6608 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name18);
6609 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 988);
6610 show_backtrace(1);
6611 }
6612 {
6613 nit__parser_prod___AMainMethPropdef___nit__parser_nodes__AMethPropdef__n_block_61d(self, var_new_child); /* Direct call parser_prod#AMainMethPropdef#n_block= on <self:AMainMethPropdef>*/
6614 }
6615 goto RET_LABEL;
6616 } else {
6617 }
6618 RET_LABEL:;
6619 }
6620 /* method parser_prod#AMainMethPropdef#n_kwredef= for (self: AMainMethPropdef, nullable TKwredef) */
6621 void nit__parser_prod___AMainMethPropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
6622 val* var_node /* var node: nullable TKwredef */;
6623 val* var /* : null */;
6624 short int var1 /* : Bool */;
6625 short int var2 /* : Bool */;
6626 val* var_other /* var other: nullable Object */;
6627 short int var4 /* : Bool */;
6628 short int var5 /* : Bool */;
6629 var_node = p0;
6630 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:AMainMethPropdef> */
6631 var = NULL;
6632 if (var_node == NULL) {
6633 var1 = 0; /* is null */
6634 } else {
6635 var1 = 1; /* arg is null and recv is not */
6636 }
6637 if (0) {
6638 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
6639 var_other = var;
6640 {
6641 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
6642 }
6643 var5 = !var4;
6644 var2 = var5;
6645 goto RET_LABEL3;
6646 RET_LABEL3:(void)0;
6647 }
6648 var1 = var2;
6649 }
6650 if (var1){
6651 {
6652 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
6653 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
6654 RET_LABEL6:(void)0;
6655 }
6656 }
6657 } else {
6658 }
6659 RET_LABEL:;
6660 }
6661 /* method parser_prod#AMainMethPropdef#n_block= for (self: AMainMethPropdef, nullable AExpr) */
6662 void nit__parser_prod___AMainMethPropdef___nit__parser_nodes__AMethPropdef__n_block_61d(val* self, val* p0) {
6663 val* var_node /* var node: nullable AExpr */;
6664 val* var /* : null */;
6665 short int var1 /* : Bool */;
6666 short int var2 /* : Bool */;
6667 val* var_other /* var other: nullable Object */;
6668 short int var4 /* : Bool */;
6669 short int var5 /* : Bool */;
6670 var_node = p0;
6671 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val = var_node; /* _n_block on <self:AMainMethPropdef> */
6672 var = NULL;
6673 if (var_node == NULL) {
6674 var1 = 0; /* is null */
6675 } else {
6676 var1 = 1; /* arg is null and recv is not */
6677 }
6678 if (0) {
6679 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
6680 var_other = var;
6681 {
6682 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
6683 }
6684 var5 = !var4;
6685 var2 = var5;
6686 goto RET_LABEL3;
6687 RET_LABEL3:(void)0;
6688 }
6689 var1 = var2;
6690 }
6691 if (var1){
6692 {
6693 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
6694 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
6695 RET_LABEL6:(void)0;
6696 }
6697 }
6698 } else {
6699 }
6700 RET_LABEL:;
6701 }
6702 /* method parser_prod#AMainMethPropdef#visit_all for (self: AMainMethPropdef, Visitor) */
6703 void nit__parser_prod___AMainMethPropdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
6704 val* var_v /* var v: Visitor */;
6705 val* var /* : nullable TKwredef */;
6706 val* var1 /* : nullable AExpr */;
6707 var_v = p0;
6708 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AMainMethPropdef> */
6709 {
6710 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6711 }
6712 var1 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMainMethPropdef> */
6713 {
6714 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
6715 }
6716 RET_LABEL:;
6717 }
6718 /* method parser_prod#ATypePropdef#init_atypepropdef for (self: ATypePropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwtype, nullable TClassid, nullable AType, nullable AAnnotations) */
6719 void nit__parser_prod___ATypePropdef___init_atypepropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6) {
6720 val* var_n_doc /* var n_doc: nullable ADoc */;
6721 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
6722 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
6723 val* var_n_kwtype /* var n_kwtype: nullable TKwtype */;
6724 val* var_n_id /* var n_id: nullable TClassid */;
6725 val* var_n_type /* var n_type: nullable AType */;
6726 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
6727 val* var /* : null */;
6728 short int var1 /* : Bool */;
6729 short int var2 /* : Bool */;
6730 val* var_other /* var other: nullable Object */;
6731 short int var4 /* : Bool */;
6732 short int var5 /* : Bool */;
6733 val* var7 /* : null */;
6734 short int var8 /* : Bool */;
6735 short int var9 /* : Bool */;
6736 short int var11 /* : Bool */;
6737 short int var12 /* : Bool */;
6738 val* var18 /* : null */;
6739 short int var19 /* : Bool */;
6740 short int var20 /* : Bool */;
6741 short int var22 /* : Bool */;
6742 short int var23 /* : Bool */;
6743 var_n_doc = p0;
6744 var_n_kwredef = p1;
6745 var_n_visibility = p2;
6746 var_n_kwtype = p3;
6747 var_n_id = p4;
6748 var_n_type = p5;
6749 var_n_annotations = p6;
6750 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_n_doc; /* _n_doc on <self:ATypePropdef> */
6751 var = NULL;
6752 if (var_n_doc == NULL) {
6753 var1 = 0; /* is null */
6754 } else {
6755 var1 = 1; /* arg is null and recv is not */
6756 }
6757 if (0) {
6758 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
6759 var_other = var;
6760 {
6761 var4 = ((short int (*)(val* self, val* p0))(var_n_doc->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
6762 }
6763 var5 = !var4;
6764 var2 = var5;
6765 goto RET_LABEL3;
6766 RET_LABEL3:(void)0;
6767 }
6768 var1 = var2;
6769 }
6770 if (var1){
6771 {
6772 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
6773 var_n_doc->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
6774 RET_LABEL6:(void)0;
6775 }
6776 }
6777 } else {
6778 }
6779 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:ATypePropdef> */
6780 var7 = NULL;
6781 if (var_n_kwredef == NULL) {
6782 var8 = 0; /* is null */
6783 } else {
6784 var8 = 1; /* arg is null and recv is not */
6785 }
6786 if (0) {
6787 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
6788 var_other = var7;
6789 {
6790 var11 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
6791 }
6792 var12 = !var11;
6793 var9 = var12;
6794 goto RET_LABEL10;
6795 RET_LABEL10:(void)0;
6796 }
6797 var8 = var9;
6798 }
6799 if (var8){
6800 {
6801 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
6802 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
6803 RET_LABEL13:(void)0;
6804 }
6805 }
6806 } else {
6807 }
6808 if (unlikely(var_n_visibility == NULL)) {
6809 PRINT_ERROR("Runtime error: %s", "Cast failed");
6810 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1026);
6811 show_backtrace(1);
6812 }
6813 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_n_visibility; /* _n_visibility on <self:ATypePropdef> */
6814 if (var_n_visibility == NULL) {
6815 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6816 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1027);
6817 show_backtrace(1);
6818 } else {
6819 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
6820 if (unlikely(var_n_visibility == NULL)) {
6821 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6822 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
6823 show_backtrace(1);
6824 }
6825 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
6826 RET_LABEL14:(void)0;
6827 }
6828 }
6829 if (unlikely(var_n_kwtype == NULL)) {
6830 PRINT_ERROR("Runtime error: %s", "Cast failed");
6831 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1028);
6832 show_backtrace(1);
6833 }
6834 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_kwtype].val = var_n_kwtype; /* _n_kwtype on <self:ATypePropdef> */
6835 if (var_n_kwtype == NULL) {
6836 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6837 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1029);
6838 show_backtrace(1);
6839 } else {
6840 { /* Inline parser_nodes#ANode#parent= (var_n_kwtype,self) on <var_n_kwtype:nullable TKwtype> */
6841 if (unlikely(var_n_kwtype == NULL)) {
6842 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6843 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
6844 show_backtrace(1);
6845 }
6846 var_n_kwtype->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwtype:nullable TKwtype> */
6847 RET_LABEL15:(void)0;
6848 }
6849 }
6850 if (unlikely(var_n_id == NULL)) {
6851 PRINT_ERROR("Runtime error: %s", "Cast failed");
6852 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1030);
6853 show_backtrace(1);
6854 }
6855 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_id].val = var_n_id; /* _n_id on <self:ATypePropdef> */
6856 if (var_n_id == NULL) {
6857 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6858 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1031);
6859 show_backtrace(1);
6860 } else {
6861 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TClassid> */
6862 if (unlikely(var_n_id == NULL)) {
6863 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6864 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
6865 show_backtrace(1);
6866 }
6867 var_n_id->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TClassid> */
6868 RET_LABEL16:(void)0;
6869 }
6870 }
6871 if (unlikely(var_n_type == NULL)) {
6872 PRINT_ERROR("Runtime error: %s", "Cast failed");
6873 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1032);
6874 show_backtrace(1);
6875 }
6876 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_type].val = var_n_type; /* _n_type on <self:ATypePropdef> */
6877 if (var_n_type == NULL) {
6878 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6879 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1033);
6880 show_backtrace(1);
6881 } else {
6882 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
6883 if (unlikely(var_n_type == NULL)) {
6884 PRINT_ERROR("Runtime error: %s", "Receiver is null");
6885 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
6886 show_backtrace(1);
6887 }
6888 var_n_type->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_type:nullable AType> */
6889 RET_LABEL17:(void)0;
6890 }
6891 }
6892 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:ATypePropdef> */
6893 var18 = NULL;
6894 if (var_n_annotations == NULL) {
6895 var19 = 0; /* is null */
6896 } else {
6897 var19 = 1; /* arg is null and recv is not */
6898 }
6899 if (0) {
6900 { /* Inline kernel#Object#!= (var_n_annotations,var18) on <var_n_annotations:nullable AAnnotations> */
6901 var_other = var18;
6902 {
6903 var22 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
6904 }
6905 var23 = !var22;
6906 var20 = var23;
6907 goto RET_LABEL21;
6908 RET_LABEL21:(void)0;
6909 }
6910 var19 = var20;
6911 }
6912 if (var19){
6913 {
6914 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
6915 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
6916 RET_LABEL24:(void)0;
6917 }
6918 }
6919 } else {
6920 }
6921 RET_LABEL:;
6922 }
6923 /* method parser_prod#ATypePropdef#replace_child for (self: ATypePropdef, ANode, nullable ANode) */
6924 void nit__parser_prod___ATypePropdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
6925 val* var_old_child /* var old_child: ANode */;
6926 val* var_new_child /* var new_child: nullable ANode */;
6927 val* var /* : nullable ADoc */;
6928 short int var1 /* : Bool */;
6929 short int var2 /* : Bool */;
6930 val* var_other /* var other: nullable Object */;
6931 short int var4 /* : Bool */;
6932 short int var6 /* : Bool */;
6933 short int var7 /* : Bool */;
6934 int cltype;
6935 int idtype;
6936 const char* var_class_name;
6937 val* var8 /* : nullable TKwredef */;
6938 short int var9 /* : Bool */;
6939 short int var10 /* : Bool */;
6940 short int var12 /* : Bool */;
6941 short int var14 /* : Bool */;
6942 short int var15 /* : Bool */;
6943 int cltype16;
6944 int idtype17;
6945 const char* var_class_name18;
6946 val* var19 /* : nullable AVisibility */;
6947 short int var20 /* : Bool */;
6948 short int var21 /* : Bool */;
6949 short int var23 /* : Bool */;
6950 short int var25 /* : Bool */;
6951 short int var26 /* : Bool */;
6952 int cltype27;
6953 int idtype28;
6954 const char* var_class_name29;
6955 val* var30 /* : TKwtype */;
6956 short int var31 /* : Bool */;
6957 short int var33 /* : Bool */;
6958 short int var35 /* : Bool */;
6959 short int var36 /* : Bool */;
6960 int cltype37;
6961 int idtype38;
6962 const char* var_class_name39;
6963 val* var40 /* : TClassid */;
6964 short int var41 /* : Bool */;
6965 short int var43 /* : Bool */;
6966 short int var45 /* : Bool */;
6967 short int var46 /* : Bool */;
6968 int cltype47;
6969 int idtype48;
6970 const char* var_class_name49;
6971 val* var50 /* : AType */;
6972 short int var51 /* : Bool */;
6973 short int var53 /* : Bool */;
6974 short int var55 /* : Bool */;
6975 short int var56 /* : Bool */;
6976 int cltype57;
6977 int idtype58;
6978 const char* var_class_name59;
6979 val* var60 /* : nullable AAnnotations */;
6980 short int var61 /* : Bool */;
6981 short int var62 /* : Bool */;
6982 short int var64 /* : Bool */;
6983 short int var66 /* : Bool */;
6984 short int var67 /* : Bool */;
6985 int cltype68;
6986 int idtype69;
6987 const char* var_class_name70;
6988 var_old_child = p0;
6989 var_new_child = p1;
6990 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:ATypePropdef> */
6991 if (var == NULL) {
6992 var1 = 0; /* <var_old_child:ANode> cannot be null */
6993 } else {
6994 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
6995 var_other = var_old_child;
6996 {
6997 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
6998 var6 = var == var_other;
6999 var4 = var6;
7000 goto RET_LABEL5;
7001 RET_LABEL5:(void)0;
7002 }
7003 }
7004 var2 = var4;
7005 goto RET_LABEL3;
7006 RET_LABEL3:(void)0;
7007 }
7008 var1 = var2;
7009 }
7010 if (var1){
7011 /* <var_new_child:nullable ANode> isa nullable ADoc */
7012 cltype = type_nullable__nit__ADoc.color;
7013 idtype = type_nullable__nit__ADoc.id;
7014 if(var_new_child == NULL) {
7015 var7 = 1;
7016 } else {
7017 if(cltype >= var_new_child->type->table_size) {
7018 var7 = 0;
7019 } else {
7020 var7 = var_new_child->type->type_table[cltype] == idtype;
7021 }
7022 }
7023 if (unlikely(!var7)) {
7024 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
7025 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
7026 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1041);
7027 show_backtrace(1);
7028 }
7029 {
7030 nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_doc_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_doc= on <self:ATypePropdef>*/
7031 }
7032 goto RET_LABEL;
7033 } else {
7034 }
7035 var8 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:ATypePropdef> */
7036 if (var8 == NULL) {
7037 var9 = 0; /* <var_old_child:ANode> cannot be null */
7038 } else {
7039 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
7040 var_other = var_old_child;
7041 {
7042 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
7043 var14 = var8 == var_other;
7044 var12 = var14;
7045 goto RET_LABEL13;
7046 RET_LABEL13:(void)0;
7047 }
7048 }
7049 var10 = var12;
7050 goto RET_LABEL11;
7051 RET_LABEL11:(void)0;
7052 }
7053 var9 = var10;
7054 }
7055 if (var9){
7056 /* <var_new_child:nullable ANode> isa nullable TKwredef */
7057 cltype16 = type_nullable__nit__TKwredef.color;
7058 idtype17 = type_nullable__nit__TKwredef.id;
7059 if(var_new_child == NULL) {
7060 var15 = 1;
7061 } else {
7062 if(cltype16 >= var_new_child->type->table_size) {
7063 var15 = 0;
7064 } else {
7065 var15 = var_new_child->type->type_table[cltype16] == idtype17;
7066 }
7067 }
7068 if (unlikely(!var15)) {
7069 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
7070 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
7071 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1045);
7072 show_backtrace(1);
7073 }
7074 {
7075 nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_kwredef= on <self:ATypePropdef>*/
7076 }
7077 goto RET_LABEL;
7078 } else {
7079 }
7080 var19 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:ATypePropdef> */
7081 if (var19 == NULL) {
7082 var20 = 0; /* <var_old_child:ANode> cannot be null */
7083 } else {
7084 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
7085 var_other = var_old_child;
7086 {
7087 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
7088 var25 = var19 == var_other;
7089 var23 = var25;
7090 goto RET_LABEL24;
7091 RET_LABEL24:(void)0;
7092 }
7093 }
7094 var21 = var23;
7095 goto RET_LABEL22;
7096 RET_LABEL22:(void)0;
7097 }
7098 var20 = var21;
7099 }
7100 if (var20){
7101 /* <var_new_child:nullable ANode> isa AVisibility */
7102 cltype27 = type_nit__AVisibility.color;
7103 idtype28 = type_nit__AVisibility.id;
7104 if(var_new_child == NULL) {
7105 var26 = 0;
7106 } else {
7107 if(cltype27 >= var_new_child->type->table_size) {
7108 var26 = 0;
7109 } else {
7110 var26 = var_new_child->type->type_table[cltype27] == idtype28;
7111 }
7112 }
7113 if (unlikely(!var26)) {
7114 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
7115 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
7116 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1049);
7117 show_backtrace(1);
7118 }
7119 {
7120 nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_visibility= on <self:ATypePropdef>*/
7121 }
7122 goto RET_LABEL;
7123 } else {
7124 }
7125 var30 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_kwtype].val; /* _n_kwtype on <self:ATypePropdef> */
7126 if (unlikely(var30 == NULL)) {
7127 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwtype");
7128 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1052);
7129 show_backtrace(1);
7130 }
7131 {
7132 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:TKwtype> */
7133 var_other = var_old_child;
7134 {
7135 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:TKwtype> */
7136 var35 = var30 == var_other;
7137 var33 = var35;
7138 goto RET_LABEL34;
7139 RET_LABEL34:(void)0;
7140 }
7141 }
7142 var31 = var33;
7143 goto RET_LABEL32;
7144 RET_LABEL32:(void)0;
7145 }
7146 }
7147 if (var31){
7148 /* <var_new_child:nullable ANode> isa TKwtype */
7149 cltype37 = type_nit__TKwtype.color;
7150 idtype38 = type_nit__TKwtype.id;
7151 if(var_new_child == NULL) {
7152 var36 = 0;
7153 } else {
7154 if(cltype37 >= var_new_child->type->table_size) {
7155 var36 = 0;
7156 } else {
7157 var36 = var_new_child->type->type_table[cltype37] == idtype38;
7158 }
7159 }
7160 if (unlikely(!var36)) {
7161 var_class_name39 = var_new_child == NULL ? "null" : var_new_child->type->name;
7162 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwtype", var_class_name39);
7163 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1053);
7164 show_backtrace(1);
7165 }
7166 {
7167 nit__parser_prod___ATypePropdef___n_kwtype_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_kwtype= on <self:ATypePropdef>*/
7168 }
7169 goto RET_LABEL;
7170 } else {
7171 }
7172 var40 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_id].val; /* _n_id on <self:ATypePropdef> */
7173 if (unlikely(var40 == NULL)) {
7174 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
7175 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1056);
7176 show_backtrace(1);
7177 }
7178 {
7179 { /* Inline kernel#Object#== (var40,var_old_child) on <var40:TClassid> */
7180 var_other = var_old_child;
7181 {
7182 { /* Inline kernel#Object#is_same_instance (var40,var_other) on <var40:TClassid> */
7183 var45 = var40 == var_other;
7184 var43 = var45;
7185 goto RET_LABEL44;
7186 RET_LABEL44:(void)0;
7187 }
7188 }
7189 var41 = var43;
7190 goto RET_LABEL42;
7191 RET_LABEL42:(void)0;
7192 }
7193 }
7194 if (var41){
7195 /* <var_new_child:nullable ANode> isa TClassid */
7196 cltype47 = type_nit__TClassid.color;
7197 idtype48 = type_nit__TClassid.id;
7198 if(var_new_child == NULL) {
7199 var46 = 0;
7200 } else {
7201 if(cltype47 >= var_new_child->type->table_size) {
7202 var46 = 0;
7203 } else {
7204 var46 = var_new_child->type->type_table[cltype47] == idtype48;
7205 }
7206 }
7207 if (unlikely(!var46)) {
7208 var_class_name49 = var_new_child == NULL ? "null" : var_new_child->type->name;
7209 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TClassid", var_class_name49);
7210 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1057);
7211 show_backtrace(1);
7212 }
7213 {
7214 nit__parser_prod___ATypePropdef___n_id_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_id= on <self:ATypePropdef>*/
7215 }
7216 goto RET_LABEL;
7217 } else {
7218 }
7219 var50 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_type].val; /* _n_type on <self:ATypePropdef> */
7220 if (unlikely(var50 == NULL)) {
7221 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
7222 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1060);
7223 show_backtrace(1);
7224 }
7225 {
7226 { /* Inline kernel#Object#== (var50,var_old_child) on <var50:AType> */
7227 var_other = var_old_child;
7228 {
7229 { /* Inline kernel#Object#is_same_instance (var50,var_other) on <var50:AType> */
7230 var55 = var50 == var_other;
7231 var53 = var55;
7232 goto RET_LABEL54;
7233 RET_LABEL54:(void)0;
7234 }
7235 }
7236 var51 = var53;
7237 goto RET_LABEL52;
7238 RET_LABEL52:(void)0;
7239 }
7240 }
7241 if (var51){
7242 /* <var_new_child:nullable ANode> isa AType */
7243 cltype57 = type_nit__AType.color;
7244 idtype58 = type_nit__AType.id;
7245 if(var_new_child == NULL) {
7246 var56 = 0;
7247 } else {
7248 if(cltype57 >= var_new_child->type->table_size) {
7249 var56 = 0;
7250 } else {
7251 var56 = var_new_child->type->type_table[cltype57] == idtype58;
7252 }
7253 }
7254 if (unlikely(!var56)) {
7255 var_class_name59 = var_new_child == NULL ? "null" : var_new_child->type->name;
7256 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name59);
7257 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1061);
7258 show_backtrace(1);
7259 }
7260 {
7261 nit__parser_prod___ATypePropdef___n_type_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_type= on <self:ATypePropdef>*/
7262 }
7263 goto RET_LABEL;
7264 } else {
7265 }
7266 var60 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ATypePropdef> */
7267 if (var60 == NULL) {
7268 var61 = 0; /* <var_old_child:ANode> cannot be null */
7269 } else {
7270 { /* Inline kernel#Object#== (var60,var_old_child) on <var60:nullable AAnnotations> */
7271 var_other = var_old_child;
7272 {
7273 { /* Inline kernel#Object#is_same_instance (var60,var_other) on <var60:nullable AAnnotations(AAnnotations)> */
7274 var66 = var60 == var_other;
7275 var64 = var66;
7276 goto RET_LABEL65;
7277 RET_LABEL65:(void)0;
7278 }
7279 }
7280 var62 = var64;
7281 goto RET_LABEL63;
7282 RET_LABEL63:(void)0;
7283 }
7284 var61 = var62;
7285 }
7286 if (var61){
7287 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
7288 cltype68 = type_nullable__nit__AAnnotations.color;
7289 idtype69 = type_nullable__nit__AAnnotations.id;
7290 if(var_new_child == NULL) {
7291 var67 = 1;
7292 } else {
7293 if(cltype68 >= var_new_child->type->table_size) {
7294 var67 = 0;
7295 } else {
7296 var67 = var_new_child->type->type_table[cltype68] == idtype69;
7297 }
7298 }
7299 if (unlikely(!var67)) {
7300 var_class_name70 = var_new_child == NULL ? "null" : var_new_child->type->name;
7301 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name70);
7302 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1065);
7303 show_backtrace(1);
7304 }
7305 {
7306 nit__parser_prod___ATypePropdef___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#ATypePropdef#n_annotations= on <self:ATypePropdef>*/
7307 }
7308 goto RET_LABEL;
7309 } else {
7310 }
7311 RET_LABEL:;
7312 }
7313 /* method parser_prod#ATypePropdef#n_doc= for (self: ATypePropdef, nullable ADoc) */
7314 void nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_doc_61d(val* self, val* p0) {
7315 val* var_node /* var node: nullable ADoc */;
7316 val* var /* : null */;
7317 short int var1 /* : Bool */;
7318 short int var2 /* : Bool */;
7319 val* var_other /* var other: nullable Object */;
7320 short int var4 /* : Bool */;
7321 short int var5 /* : Bool */;
7322 var_node = p0;
7323 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_node; /* _n_doc on <self:ATypePropdef> */
7324 var = NULL;
7325 if (var_node == NULL) {
7326 var1 = 0; /* is null */
7327 } else {
7328 var1 = 1; /* arg is null and recv is not */
7329 }
7330 if (0) {
7331 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
7332 var_other = var;
7333 {
7334 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
7335 }
7336 var5 = !var4;
7337 var2 = var5;
7338 goto RET_LABEL3;
7339 RET_LABEL3:(void)0;
7340 }
7341 var1 = var2;
7342 }
7343 if (var1){
7344 {
7345 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
7346 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
7347 RET_LABEL6:(void)0;
7348 }
7349 }
7350 } else {
7351 }
7352 RET_LABEL:;
7353 }
7354 /* method parser_prod#ATypePropdef#n_kwredef= for (self: ATypePropdef, nullable TKwredef) */
7355 void nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
7356 val* var_node /* var node: nullable TKwredef */;
7357 val* var /* : null */;
7358 short int var1 /* : Bool */;
7359 short int var2 /* : Bool */;
7360 val* var_other /* var other: nullable Object */;
7361 short int var4 /* : Bool */;
7362 short int var5 /* : Bool */;
7363 var_node = p0;
7364 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:ATypePropdef> */
7365 var = NULL;
7366 if (var_node == NULL) {
7367 var1 = 0; /* is null */
7368 } else {
7369 var1 = 1; /* arg is null and recv is not */
7370 }
7371 if (0) {
7372 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
7373 var_other = var;
7374 {
7375 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
7376 }
7377 var5 = !var4;
7378 var2 = var5;
7379 goto RET_LABEL3;
7380 RET_LABEL3:(void)0;
7381 }
7382 var1 = var2;
7383 }
7384 if (var1){
7385 {
7386 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
7387 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
7388 RET_LABEL6:(void)0;
7389 }
7390 }
7391 } else {
7392 }
7393 RET_LABEL:;
7394 }
7395 /* method parser_prod#ATypePropdef#n_visibility= for (self: ATypePropdef, nullable AVisibility) */
7396 void nit__parser_prod___ATypePropdef___nit__parser_nodes__ADefinition__n_visibility_61d(val* self, val* p0) {
7397 val* var_node /* var node: nullable AVisibility */;
7398 var_node = p0;
7399 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_node; /* _n_visibility on <self:ATypePropdef> */
7400 if (var_node == NULL) {
7401 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7402 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1083);
7403 show_backtrace(1);
7404 } else {
7405 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
7406 if (unlikely(var_node == NULL)) {
7407 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7408 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
7409 show_backtrace(1);
7410 }
7411 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
7412 RET_LABEL1:(void)0;
7413 }
7414 }
7415 RET_LABEL:;
7416 }
7417 /* method parser_prod#ATypePropdef#n_kwtype= for (self: ATypePropdef, TKwtype) */
7418 void nit__parser_prod___ATypePropdef___n_kwtype_61d(val* self, val* p0) {
7419 val* var_node /* var node: TKwtype */;
7420 var_node = p0;
7421 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_kwtype].val = var_node; /* _n_kwtype on <self:ATypePropdef> */
7422 {
7423 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwtype> */
7424 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TKwtype> */
7425 RET_LABEL1:(void)0;
7426 }
7427 }
7428 RET_LABEL:;
7429 }
7430 /* method parser_prod#ATypePropdef#n_id= for (self: ATypePropdef, TClassid) */
7431 void nit__parser_prod___ATypePropdef___n_id_61d(val* self, val* p0) {
7432 val* var_node /* var node: TClassid */;
7433 var_node = p0;
7434 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_id].val = var_node; /* _n_id on <self:ATypePropdef> */
7435 {
7436 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TClassid> */
7437 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TClassid> */
7438 RET_LABEL1:(void)0;
7439 }
7440 }
7441 RET_LABEL:;
7442 }
7443 /* method parser_prod#ATypePropdef#n_type= for (self: ATypePropdef, AType) */
7444 void nit__parser_prod___ATypePropdef___n_type_61d(val* self, val* p0) {
7445 val* var_node /* var node: AType */;
7446 var_node = p0;
7447 self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_type].val = var_node; /* _n_type on <self:ATypePropdef> */
7448 {
7449 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
7450 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:AType> */
7451 RET_LABEL1:(void)0;
7452 }
7453 }
7454 RET_LABEL:;
7455 }
7456 /* method parser_prod#ATypePropdef#n_annotations= for (self: ATypePropdef, nullable AAnnotations) */
7457 void nit__parser_prod___ATypePropdef___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
7458 val* var_node /* var node: nullable AAnnotations */;
7459 val* var /* : null */;
7460 short int var1 /* : Bool */;
7461 short int var2 /* : Bool */;
7462 val* var_other /* var other: nullable Object */;
7463 short int var4 /* : Bool */;
7464 short int var5 /* : Bool */;
7465 var_node = p0;
7466 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:ATypePropdef> */
7467 var = NULL;
7468 if (var_node == NULL) {
7469 var1 = 0; /* is null */
7470 } else {
7471 var1 = 1; /* arg is null and recv is not */
7472 }
7473 if (0) {
7474 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
7475 var_other = var;
7476 {
7477 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
7478 }
7479 var5 = !var4;
7480 var2 = var5;
7481 goto RET_LABEL3;
7482 RET_LABEL3:(void)0;
7483 }
7484 var1 = var2;
7485 }
7486 if (var1){
7487 {
7488 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
7489 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
7490 RET_LABEL6:(void)0;
7491 }
7492 }
7493 } else {
7494 }
7495 RET_LABEL:;
7496 }
7497 /* method parser_prod#ATypePropdef#visit_all for (self: ATypePropdef, Visitor) */
7498 void nit__parser_prod___ATypePropdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
7499 val* var_v /* var v: Visitor */;
7500 val* var /* : nullable ADoc */;
7501 val* var1 /* : nullable TKwredef */;
7502 val* var2 /* : nullable AVisibility */;
7503 val* var3 /* : TKwtype */;
7504 val* var4 /* : TClassid */;
7505 val* var5 /* : AType */;
7506 val* var6 /* : nullable AAnnotations */;
7507 var_v = p0;
7508 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:ATypePropdef> */
7509 {
7510 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7511 }
7512 var1 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:ATypePropdef> */
7513 {
7514 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7515 }
7516 var2 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:ATypePropdef> */
7517 {
7518 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7519 }
7520 var3 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_kwtype].val; /* _n_kwtype on <self:ATypePropdef> */
7521 if (unlikely(var3 == NULL)) {
7522 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwtype");
7523 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1112);
7524 show_backtrace(1);
7525 }
7526 {
7527 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7528 }
7529 var4 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_id].val; /* _n_id on <self:ATypePropdef> */
7530 if (unlikely(var4 == NULL)) {
7531 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
7532 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1113);
7533 show_backtrace(1);
7534 }
7535 {
7536 nit___nit__Visitor___enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7537 }
7538 var5 = self->attrs[COLOR_nit__parser_nodes__ATypePropdef___n_type].val; /* _n_type on <self:ATypePropdef> */
7539 if (unlikely(var5 == NULL)) {
7540 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
7541 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1114);
7542 show_backtrace(1);
7543 }
7544 {
7545 nit___nit__Visitor___enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7546 }
7547 var6 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:ATypePropdef> */
7548 {
7549 nit___nit__Visitor___enter_visit(var_v, var6); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
7550 }
7551 RET_LABEL:;
7552 }
7553 /* method parser_prod#AMethPropdef#init_amethpropdef for (self: AMethPropdef, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable TKwmeth, nullable TKwinit, nullable TKwnew, nullable AMethid, nullable ASignature, nullable AAnnotations, nullable AExternCalls, nullable AExternCodeBlock, nullable AExpr) */
7554 void nit__parser_prod___AMethPropdef___init_amethpropdef(val* self, val* p0, val* p1, val* p2, val* p3, val* p4, val* p5, val* p6, val* p7, val* p8, val* p9, val* p10, val* p11) {
7555 val* var_n_doc /* var n_doc: nullable ADoc */;
7556 val* var_n_kwredef /* var n_kwredef: nullable TKwredef */;
7557 val* var_n_visibility /* var n_visibility: nullable AVisibility */;
7558 val* var_n_kwmeth /* var n_kwmeth: nullable TKwmeth */;
7559 val* var_n_kwinit /* var n_kwinit: nullable TKwinit */;
7560 val* var_n_kwnew /* var n_kwnew: nullable TKwnew */;
7561 val* var_n_methid /* var n_methid: nullable AMethid */;
7562 val* var_n_signature /* var n_signature: nullable ASignature */;
7563 val* var_n_annotations /* var n_annotations: nullable AAnnotations */;
7564 val* var_n_extern_calls /* var n_extern_calls: nullable AExternCalls */;
7565 val* var_n_extern_code_block /* var n_extern_code_block: nullable AExternCodeBlock */;
7566 val* var_n_block /* var n_block: nullable AExpr */;
7567 val* var /* : null */;
7568 short int var1 /* : Bool */;
7569 short int var2 /* : Bool */;
7570 val* var_other /* var other: nullable Object */;
7571 short int var4 /* : Bool */;
7572 short int var5 /* : Bool */;
7573 val* var7 /* : null */;
7574 short int var8 /* : Bool */;
7575 short int var9 /* : Bool */;
7576 short int var11 /* : Bool */;
7577 short int var12 /* : Bool */;
7578 val* var15 /* : null */;
7579 short int var16 /* : Bool */;
7580 short int var17 /* : Bool */;
7581 short int var19 /* : Bool */;
7582 short int var20 /* : Bool */;
7583 val* var22 /* : null */;
7584 short int var23 /* : Bool */;
7585 short int var24 /* : Bool */;
7586 short int var26 /* : Bool */;
7587 short int var27 /* : Bool */;
7588 val* var29 /* : null */;
7589 short int var30 /* : Bool */;
7590 short int var31 /* : Bool */;
7591 short int var33 /* : Bool */;
7592 short int var34 /* : Bool */;
7593 val* var36 /* : null */;
7594 short int var37 /* : Bool */;
7595 short int var38 /* : Bool */;
7596 short int var40 /* : Bool */;
7597 short int var41 /* : Bool */;
7598 val* var44 /* : null */;
7599 short int var45 /* : Bool */;
7600 short int var46 /* : Bool */;
7601 short int var48 /* : Bool */;
7602 short int var49 /* : Bool */;
7603 val* var51 /* : null */;
7604 short int var52 /* : Bool */;
7605 short int var53 /* : Bool */;
7606 short int var55 /* : Bool */;
7607 short int var56 /* : Bool */;
7608 val* var58 /* : null */;
7609 short int var59 /* : Bool */;
7610 short int var60 /* : Bool */;
7611 short int var62 /* : Bool */;
7612 short int var63 /* : Bool */;
7613 val* var65 /* : null */;
7614 short int var66 /* : Bool */;
7615 short int var67 /* : Bool */;
7616 short int var69 /* : Bool */;
7617 short int var70 /* : Bool */;
7618 var_n_doc = p0;
7619 var_n_kwredef = p1;
7620 var_n_visibility = p2;
7621 var_n_kwmeth = p3;
7622 var_n_kwinit = p4;
7623 var_n_kwnew = p5;
7624 var_n_methid = p6;
7625 var_n_signature = p7;
7626 var_n_annotations = p8;
7627 var_n_extern_calls = p9;
7628 var_n_extern_code_block = p10;
7629 var_n_block = p11;
7630 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_n_doc; /* _n_doc on <self:AMethPropdef> */
7631 var = NULL;
7632 if (var_n_doc == NULL) {
7633 var1 = 0; /* is null */
7634 } else {
7635 var1 = 1; /* arg is null and recv is not */
7636 }
7637 if (0) {
7638 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
7639 var_other = var;
7640 {
7641 var4 = ((short int (*)(val* self, val* p0))(var_n_doc->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_doc, var_other) /* == on <var_n_doc:nullable ADoc(ADoc)>*/;
7642 }
7643 var5 = !var4;
7644 var2 = var5;
7645 goto RET_LABEL3;
7646 RET_LABEL3:(void)0;
7647 }
7648 var1 = var2;
7649 }
7650 if (var1){
7651 {
7652 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
7653 var_n_doc->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
7654 RET_LABEL6:(void)0;
7655 }
7656 }
7657 } else {
7658 }
7659 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_n_kwredef; /* _n_kwredef on <self:AMethPropdef> */
7660 var7 = NULL;
7661 if (var_n_kwredef == NULL) {
7662 var8 = 0; /* is null */
7663 } else {
7664 var8 = 1; /* arg is null and recv is not */
7665 }
7666 if (0) {
7667 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
7668 var_other = var7;
7669 {
7670 var11 = ((short int (*)(val* self, val* p0))(var_n_kwredef->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwredef, var_other) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
7671 }
7672 var12 = !var11;
7673 var9 = var12;
7674 goto RET_LABEL10;
7675 RET_LABEL10:(void)0;
7676 }
7677 var8 = var9;
7678 }
7679 if (var8){
7680 {
7681 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7682 var_n_kwredef->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
7683 RET_LABEL13:(void)0;
7684 }
7685 }
7686 } else {
7687 }
7688 if (unlikely(var_n_visibility == NULL)) {
7689 PRINT_ERROR("Runtime error: %s", "Cast failed");
7690 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1138);
7691 show_backtrace(1);
7692 }
7693 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_n_visibility; /* _n_visibility on <self:AMethPropdef> */
7694 if (var_n_visibility == NULL) {
7695 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7696 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1139);
7697 show_backtrace(1);
7698 } else {
7699 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility> */
7700 if (unlikely(var_n_visibility == NULL)) {
7701 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7702 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
7703 show_backtrace(1);
7704 }
7705 var_n_visibility->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_visibility:nullable AVisibility> */
7706 RET_LABEL14:(void)0;
7707 }
7708 }
7709 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwmeth].val = var_n_kwmeth; /* _n_kwmeth on <self:AMethPropdef> */
7710 var15 = NULL;
7711 if (var_n_kwmeth == NULL) {
7712 var16 = 0; /* is null */
7713 } else {
7714 var16 = 1; /* arg is null and recv is not */
7715 }
7716 if (0) {
7717 { /* Inline kernel#Object#!= (var_n_kwmeth,var15) on <var_n_kwmeth:nullable TKwmeth> */
7718 var_other = var15;
7719 {
7720 var19 = ((short int (*)(val* self, val* p0))(var_n_kwmeth->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwmeth, var_other) /* == on <var_n_kwmeth:nullable TKwmeth(TKwmeth)>*/;
7721 }
7722 var20 = !var19;
7723 var17 = var20;
7724 goto RET_LABEL18;
7725 RET_LABEL18:(void)0;
7726 }
7727 var16 = var17;
7728 }
7729 if (var16){
7730 {
7731 { /* Inline parser_nodes#ANode#parent= (var_n_kwmeth,self) on <var_n_kwmeth:nullable TKwmeth(TKwmeth)> */
7732 var_n_kwmeth->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwmeth:nullable TKwmeth(TKwmeth)> */
7733 RET_LABEL21:(void)0;
7734 }
7735 }
7736 } else {
7737 }
7738 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwinit].val = var_n_kwinit; /* _n_kwinit on <self:AMethPropdef> */
7739 var22 = NULL;
7740 if (var_n_kwinit == NULL) {
7741 var23 = 0; /* is null */
7742 } else {
7743 var23 = 1; /* arg is null and recv is not */
7744 }
7745 if (0) {
7746 { /* Inline kernel#Object#!= (var_n_kwinit,var22) on <var_n_kwinit:nullable TKwinit> */
7747 var_other = var22;
7748 {
7749 var26 = ((short int (*)(val* self, val* p0))(var_n_kwinit->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwinit, var_other) /* == on <var_n_kwinit:nullable TKwinit(TKwinit)>*/;
7750 }
7751 var27 = !var26;
7752 var24 = var27;
7753 goto RET_LABEL25;
7754 RET_LABEL25:(void)0;
7755 }
7756 var23 = var24;
7757 }
7758 if (var23){
7759 {
7760 { /* Inline parser_nodes#ANode#parent= (var_n_kwinit,self) on <var_n_kwinit:nullable TKwinit(TKwinit)> */
7761 var_n_kwinit->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwinit:nullable TKwinit(TKwinit)> */
7762 RET_LABEL28:(void)0;
7763 }
7764 }
7765 } else {
7766 }
7767 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwnew].val = var_n_kwnew; /* _n_kwnew on <self:AMethPropdef> */
7768 var29 = NULL;
7769 if (var_n_kwnew == NULL) {
7770 var30 = 0; /* is null */
7771 } else {
7772 var30 = 1; /* arg is null and recv is not */
7773 }
7774 if (0) {
7775 { /* Inline kernel#Object#!= (var_n_kwnew,var29) on <var_n_kwnew:nullable TKwnew> */
7776 var_other = var29;
7777 {
7778 var33 = ((short int (*)(val* self, val* p0))(var_n_kwnew->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_kwnew, var_other) /* == on <var_n_kwnew:nullable TKwnew(TKwnew)>*/;
7779 }
7780 var34 = !var33;
7781 var31 = var34;
7782 goto RET_LABEL32;
7783 RET_LABEL32:(void)0;
7784 }
7785 var30 = var31;
7786 }
7787 if (var30){
7788 {
7789 { /* Inline parser_nodes#ANode#parent= (var_n_kwnew,self) on <var_n_kwnew:nullable TKwnew(TKwnew)> */
7790 var_n_kwnew->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_kwnew:nullable TKwnew(TKwnew)> */
7791 RET_LABEL35:(void)0;
7792 }
7793 }
7794 } else {
7795 }
7796 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_methid].val = var_n_methid; /* _n_methid on <self:AMethPropdef> */
7797 var36 = NULL;
7798 if (var_n_methid == NULL) {
7799 var37 = 0; /* is null */
7800 } else {
7801 var37 = 1; /* arg is null and recv is not */
7802 }
7803 if (0) {
7804 { /* Inline kernel#Object#!= (var_n_methid,var36) on <var_n_methid:nullable AMethid> */
7805 var_other = var36;
7806 {
7807 var40 = ((short int (*)(val* self, val* p0))(var_n_methid->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_methid, var_other) /* == on <var_n_methid:nullable AMethid(AMethid)>*/;
7808 }
7809 var41 = !var40;
7810 var38 = var41;
7811 goto RET_LABEL39;
7812 RET_LABEL39:(void)0;
7813 }
7814 var37 = var38;
7815 }
7816 if (var37){
7817 {
7818 { /* Inline parser_nodes#ANode#parent= (var_n_methid,self) on <var_n_methid:nullable AMethid(AMethid)> */
7819 var_n_methid->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_methid:nullable AMethid(AMethid)> */
7820 RET_LABEL42:(void)0;
7821 }
7822 }
7823 } else {
7824 }
7825 if (unlikely(var_n_signature == NULL)) {
7826 PRINT_ERROR("Runtime error: %s", "Cast failed");
7827 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1148);
7828 show_backtrace(1);
7829 }
7830 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_signature].val = var_n_signature; /* _n_signature on <self:AMethPropdef> */
7831 if (var_n_signature == NULL) {
7832 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7833 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1149);
7834 show_backtrace(1);
7835 } else {
7836 { /* Inline parser_nodes#ANode#parent= (var_n_signature,self) on <var_n_signature:nullable ASignature> */
7837 if (unlikely(var_n_signature == NULL)) {
7838 PRINT_ERROR("Runtime error: %s", "Receiver is null");
7839 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
7840 show_backtrace(1);
7841 }
7842 var_n_signature->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_signature:nullable ASignature> */
7843 RET_LABEL43:(void)0;
7844 }
7845 }
7846 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_n_annotations; /* _n_annotations on <self:AMethPropdef> */
7847 var44 = NULL;
7848 if (var_n_annotations == NULL) {
7849 var45 = 0; /* is null */
7850 } else {
7851 var45 = 1; /* arg is null and recv is not */
7852 }
7853 if (0) {
7854 { /* Inline kernel#Object#!= (var_n_annotations,var44) on <var_n_annotations:nullable AAnnotations> */
7855 var_other = var44;
7856 {
7857 var48 = ((short int (*)(val* self, val* p0))(var_n_annotations->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_annotations, var_other) /* == on <var_n_annotations:nullable AAnnotations(AAnnotations)>*/;
7858 }
7859 var49 = !var48;
7860 var46 = var49;
7861 goto RET_LABEL47;
7862 RET_LABEL47:(void)0;
7863 }
7864 var45 = var46;
7865 }
7866 if (var45){
7867 {
7868 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
7869 var_n_annotations->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
7870 RET_LABEL50:(void)0;
7871 }
7872 }
7873 } else {
7874 }
7875 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_calls].val = var_n_extern_calls; /* _n_extern_calls on <self:AMethPropdef> */
7876 var51 = NULL;
7877 if (var_n_extern_calls == NULL) {
7878 var52 = 0; /* is null */
7879 } else {
7880 var52 = 1; /* arg is null and recv is not */
7881 }
7882 if (0) {
7883 { /* Inline kernel#Object#!= (var_n_extern_calls,var51) on <var_n_extern_calls:nullable AExternCalls> */
7884 var_other = var51;
7885 {
7886 var55 = ((short int (*)(val* self, val* p0))(var_n_extern_calls->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_extern_calls, var_other) /* == on <var_n_extern_calls:nullable AExternCalls(AExternCalls)>*/;
7887 }
7888 var56 = !var55;
7889 var53 = var56;
7890 goto RET_LABEL54;
7891 RET_LABEL54:(void)0;
7892 }
7893 var52 = var53;
7894 }
7895 if (var52){
7896 {
7897 { /* Inline parser_nodes#ANode#parent= (var_n_extern_calls,self) on <var_n_extern_calls:nullable AExternCalls(AExternCalls)> */
7898 var_n_extern_calls->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_calls:nullable AExternCalls(AExternCalls)> */
7899 RET_LABEL57:(void)0;
7900 }
7901 }
7902 } else {
7903 }
7904 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_code_block].val = var_n_extern_code_block; /* _n_extern_code_block on <self:AMethPropdef> */
7905 var58 = NULL;
7906 if (var_n_extern_code_block == NULL) {
7907 var59 = 0; /* is null */
7908 } else {
7909 var59 = 1; /* arg is null and recv is not */
7910 }
7911 if (0) {
7912 { /* Inline kernel#Object#!= (var_n_extern_code_block,var58) on <var_n_extern_code_block:nullable AExternCodeBlock> */
7913 var_other = var58;
7914 {
7915 var62 = ((short int (*)(val* self, val* p0))(var_n_extern_code_block->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_extern_code_block, var_other) /* == on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)>*/;
7916 }
7917 var63 = !var62;
7918 var60 = var63;
7919 goto RET_LABEL61;
7920 RET_LABEL61:(void)0;
7921 }
7922 var59 = var60;
7923 }
7924 if (var59){
7925 {
7926 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_block,self) on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
7927 var_n_extern_code_block->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_extern_code_block:nullable AExternCodeBlock(AExternCodeBlock)> */
7928 RET_LABEL64:(void)0;
7929 }
7930 }
7931 } else {
7932 }
7933 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val = var_n_block; /* _n_block on <self:AMethPropdef> */
7934 var65 = NULL;
7935 if (var_n_block == NULL) {
7936 var66 = 0; /* is null */
7937 } else {
7938 var66 = 1; /* arg is null and recv is not */
7939 }
7940 if (0) {
7941 { /* Inline kernel#Object#!= (var_n_block,var65) on <var_n_block:nullable AExpr> */
7942 var_other = var65;
7943 {
7944 var69 = ((short int (*)(val* self, val* p0))(var_n_block->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_n_block, var_other) /* == on <var_n_block:nullable AExpr(AExpr)>*/;
7945 }
7946 var70 = !var69;
7947 var67 = var70;
7948 goto RET_LABEL68;
7949 RET_LABEL68:(void)0;
7950 }
7951 var66 = var67;
7952 }
7953 if (var66){
7954 {
7955 { /* Inline parser_nodes#ANode#parent= (var_n_block,self) on <var_n_block:nullable AExpr(AExpr)> */
7956 var_n_block->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_block:nullable AExpr(AExpr)> */
7957 RET_LABEL71:(void)0;
7958 }
7959 }
7960 } else {
7961 }
7962 RET_LABEL:;
7963 }
7964 /* method parser_prod#AMethPropdef#replace_child for (self: AMethPropdef, ANode, nullable ANode) */
7965 void nit__parser_prod___AMethPropdef___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
7966 val* var_old_child /* var old_child: ANode */;
7967 val* var_new_child /* var new_child: nullable ANode */;
7968 val* var /* : nullable ADoc */;
7969 short int var1 /* : Bool */;
7970 short int var2 /* : Bool */;
7971 val* var_other /* var other: nullable Object */;
7972 short int var4 /* : Bool */;
7973 short int var6 /* : Bool */;
7974 short int var7 /* : Bool */;
7975 int cltype;
7976 int idtype;
7977 const char* var_class_name;
7978 val* var8 /* : nullable TKwredef */;
7979 short int var9 /* : Bool */;
7980 short int var10 /* : Bool */;
7981 short int var12 /* : Bool */;
7982 short int var14 /* : Bool */;
7983 short int var15 /* : Bool */;
7984 int cltype16;
7985 int idtype17;
7986 const char* var_class_name18;
7987 val* var19 /* : nullable AVisibility */;
7988 short int var20 /* : Bool */;
7989 short int var21 /* : Bool */;
7990 short int var23 /* : Bool */;
7991 short int var25 /* : Bool */;
7992 short int var26 /* : Bool */;
7993 int cltype27;
7994 int idtype28;
7995 const char* var_class_name29;
7996 val* var30 /* : nullable TKwmeth */;
7997 short int var31 /* : Bool */;
7998 short int var32 /* : Bool */;
7999 short int var34 /* : Bool */;
8000 short int var36 /* : Bool */;
8001 short int var37 /* : Bool */;
8002 int cltype38;
8003 int idtype39;
8004 const char* var_class_name40;
8005 val* var41 /* : nullable TKwinit */;
8006 short int var42 /* : Bool */;
8007 short int var43 /* : Bool */;
8008 short int var45 /* : Bool */;
8009 short int var47 /* : Bool */;
8010 short int var48 /* : Bool */;
8011 int cltype49;
8012 int idtype50;
8013 const char* var_class_name51;
8014 val* var52 /* : nullable TKwnew */;
8015 short int var53 /* : Bool */;
8016 short int var54 /* : Bool */;
8017 short int var56 /* : Bool */;
8018 short int var58 /* : Bool */;
8019 short int var59 /* : Bool */;
8020 int cltype60;
8021 int idtype61;
8022 const char* var_class_name62;
8023 val* var63 /* : nullable AMethid */;
8024 short int var64 /* : Bool */;
8025 short int var65 /* : Bool */;
8026 short int var67 /* : Bool */;
8027 short int var69 /* : Bool */;
8028 short int var70 /* : Bool */;
8029 int cltype71;
8030 int idtype72;
8031 const char* var_class_name73;
8032 val* var74 /* : nullable ASignature */;
8033 short int var75 /* : Bool */;
8034 short int var76 /* : Bool */;
8035 short int var78 /* : Bool */;
8036 short int var80 /* : Bool */;
8037 short int var81 /* : Bool */;
8038 int cltype82;
8039 int idtype83;
8040 const char* var_class_name84;
8041 val* var85 /* : nullable AAnnotations */;
8042 short int var86 /* : Bool */;
8043 short int var87 /* : Bool */;
8044 short int var89 /* : Bool */;
8045 short int var91 /* : Bool */;
8046 short int var92 /* : Bool */;
8047 int cltype93;
8048 int idtype94;
8049 const char* var_class_name95;
8050 val* var96 /* : nullable AExternCalls */;
8051 short int var97 /* : Bool */;
8052 short int var98 /* : Bool */;
8053 short int var100 /* : Bool */;
8054 short int var102 /* : Bool */;
8055 short int var103 /* : Bool */;
8056 int cltype104;
8057 int idtype105;
8058 const char* var_class_name106;
8059 val* var107 /* : nullable AExternCodeBlock */;
8060 short int var108 /* : Bool */;
8061 short int var109 /* : Bool */;
8062 short int var111 /* : Bool */;
8063 short int var113 /* : Bool */;
8064 short int var114 /* : Bool */;
8065 int cltype115;
8066 int idtype116;
8067 const char* var_class_name117;
8068 val* var118 /* : nullable AExpr */;
8069 short int var119 /* : Bool */;
8070 short int var120 /* : Bool */;
8071 short int var122 /* : Bool */;
8072 short int var124 /* : Bool */;
8073 short int var125 /* : Bool */;
8074 int cltype126;
8075 int idtype127;
8076 const char* var_class_name128;
8077 var_old_child = p0;
8078 var_new_child = p1;
8079 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AMethPropdef> */
8080 if (var == NULL) {
8081 var1 = 0; /* <var_old_child:ANode> cannot be null */
8082 } else {
8083 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
8084 var_other = var_old_child;
8085 {
8086 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
8087 var6 = var == var_other;
8088 var4 = var6;
8089 goto RET_LABEL5;
8090 RET_LABEL5:(void)0;
8091 }
8092 }
8093 var2 = var4;
8094 goto RET_LABEL3;
8095 RET_LABEL3:(void)0;
8096 }
8097 var1 = var2;
8098 }
8099 if (var1){
8100 /* <var_new_child:nullable ANode> isa nullable ADoc */
8101 cltype = type_nullable__nit__ADoc.color;
8102 idtype = type_nullable__nit__ADoc.id;
8103 if(var_new_child == NULL) {
8104 var7 = 1;
8105 } else {
8106 if(cltype >= var_new_child->type->table_size) {
8107 var7 = 0;
8108 } else {
8109 var7 = var_new_child->type->type_table[cltype] == idtype;
8110 }
8111 }
8112 if (unlikely(!var7)) {
8113 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
8114 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name);
8115 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1163);
8116 show_backtrace(1);
8117 }
8118 {
8119 nit__parser_prod___AMethPropdef___nit__parser_nodes__ADefinition__n_doc_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_doc= on <self:AMethPropdef>*/
8120 }
8121 goto RET_LABEL;
8122 } else {
8123 }
8124 var8 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AMethPropdef> */
8125 if (var8 == NULL) {
8126 var9 = 0; /* <var_old_child:ANode> cannot be null */
8127 } else {
8128 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
8129 var_other = var_old_child;
8130 {
8131 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
8132 var14 = var8 == var_other;
8133 var12 = var14;
8134 goto RET_LABEL13;
8135 RET_LABEL13:(void)0;
8136 }
8137 }
8138 var10 = var12;
8139 goto RET_LABEL11;
8140 RET_LABEL11:(void)0;
8141 }
8142 var9 = var10;
8143 }
8144 if (var9){
8145 /* <var_new_child:nullable ANode> isa nullable TKwredef */
8146 cltype16 = type_nullable__nit__TKwredef.color;
8147 idtype17 = type_nullable__nit__TKwredef.id;
8148 if(var_new_child == NULL) {
8149 var15 = 1;
8150 } else {
8151 if(cltype16 >= var_new_child->type->table_size) {
8152 var15 = 0;
8153 } else {
8154 var15 = var_new_child->type->type_table[cltype16] == idtype17;
8155 }
8156 }
8157 if (unlikely(!var15)) {
8158 var_class_name18 = var_new_child == NULL ? "null" : var_new_child->type->name;
8159 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18);
8160 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1167);
8161 show_backtrace(1);
8162 }
8163 {
8164 ((void (*)(val* self, val* p0))(self->class->vft[COLOR_nit__parser_nodes__ADefinition__n_kwredef_61d]))(self, var_new_child) /* n_kwredef= on <self:AMethPropdef>*/;
8165 }
8166 goto RET_LABEL;
8167 } else {
8168 }
8169 var19 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AMethPropdef> */
8170 if (var19 == NULL) {
8171 var20 = 0; /* <var_old_child:ANode> cannot be null */
8172 } else {
8173 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
8174 var_other = var_old_child;
8175 {
8176 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
8177 var25 = var19 == var_other;
8178 var23 = var25;
8179 goto RET_LABEL24;
8180 RET_LABEL24:(void)0;
8181 }
8182 }
8183 var21 = var23;
8184 goto RET_LABEL22;
8185 RET_LABEL22:(void)0;
8186 }
8187 var20 = var21;
8188 }
8189 if (var20){
8190 /* <var_new_child:nullable ANode> isa AVisibility */
8191 cltype27 = type_nit__AVisibility.color;
8192 idtype28 = type_nit__AVisibility.id;
8193 if(var_new_child == NULL) {
8194 var26 = 0;
8195 } else {
8196 if(cltype27 >= var_new_child->type->table_size) {
8197 var26 = 0;
8198 } else {
8199 var26 = var_new_child->type->type_table[cltype27] == idtype28;
8200 }
8201 }
8202 if (unlikely(!var26)) {
8203 var_class_name29 = var_new_child == NULL ? "null" : var_new_child->type->name;
8204 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AVisibility", var_class_name29);
8205 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1171);
8206 show_backtrace(1);
8207 }
8208 {
8209 nit__parser_prod___AMethPropdef___nit__parser_nodes__ADefinition__n_visibility_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_visibility= on <self:AMethPropdef>*/
8210 }
8211 goto RET_LABEL;
8212 } else {
8213 }
8214 var30 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwmeth].val; /* _n_kwmeth on <self:AMethPropdef> */
8215 if (var30 == NULL) {
8216 var31 = 0; /* <var_old_child:ANode> cannot be null */
8217 } else {
8218 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:nullable TKwmeth> */
8219 var_other = var_old_child;
8220 {
8221 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:nullable TKwmeth(TKwmeth)> */
8222 var36 = var30 == var_other;
8223 var34 = var36;
8224 goto RET_LABEL35;
8225 RET_LABEL35:(void)0;
8226 }
8227 }
8228 var32 = var34;
8229 goto RET_LABEL33;
8230 RET_LABEL33:(void)0;
8231 }
8232 var31 = var32;
8233 }
8234 if (var31){
8235 /* <var_new_child:nullable ANode> isa nullable TKwmeth */
8236 cltype38 = type_nullable__nit__TKwmeth.color;
8237 idtype39 = type_nullable__nit__TKwmeth.id;
8238 if(var_new_child == NULL) {
8239 var37 = 1;
8240 } else {
8241 if(cltype38 >= var_new_child->type->table_size) {
8242 var37 = 0;
8243 } else {
8244 var37 = var_new_child->type->type_table[cltype38] == idtype39;
8245 }
8246 }
8247 if (unlikely(!var37)) {
8248 var_class_name40 = var_new_child == NULL ? "null" : var_new_child->type->name;
8249 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwmeth", var_class_name40);
8250 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1175);
8251 show_backtrace(1);
8252 }
8253 {
8254 nit__parser_prod___AMethPropdef___n_kwmeth_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwmeth= on <self:AMethPropdef>*/
8255 }
8256 goto RET_LABEL;
8257 } else {
8258 }
8259 var41 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwinit].val; /* _n_kwinit on <self:AMethPropdef> */
8260 if (var41 == NULL) {
8261 var42 = 0; /* <var_old_child:ANode> cannot be null */
8262 } else {
8263 { /* Inline kernel#Object#== (var41,var_old_child) on <var41:nullable TKwinit> */
8264 var_other = var_old_child;
8265 {
8266 { /* Inline kernel#Object#is_same_instance (var41,var_other) on <var41:nullable TKwinit(TKwinit)> */
8267 var47 = var41 == var_other;
8268 var45 = var47;
8269 goto RET_LABEL46;
8270 RET_LABEL46:(void)0;
8271 }
8272 }
8273 var43 = var45;
8274 goto RET_LABEL44;
8275 RET_LABEL44:(void)0;
8276 }
8277 var42 = var43;
8278 }
8279 if (var42){
8280 /* <var_new_child:nullable ANode> isa nullable TKwinit */
8281 cltype49 = type_nullable__nit__TKwinit.color;
8282 idtype50 = type_nullable__nit__TKwinit.id;
8283 if(var_new_child == NULL) {
8284 var48 = 1;
8285 } else {
8286 if(cltype49 >= var_new_child->type->table_size) {
8287 var48 = 0;
8288 } else {
8289 var48 = var_new_child->type->type_table[cltype49] == idtype50;
8290 }
8291 }
8292 if (unlikely(!var48)) {
8293 var_class_name51 = var_new_child == NULL ? "null" : var_new_child->type->name;
8294 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwinit", var_class_name51);
8295 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1179);
8296 show_backtrace(1);
8297 }
8298 {
8299 nit__parser_prod___AMethPropdef___n_kwinit_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwinit= on <self:AMethPropdef>*/
8300 }
8301 goto RET_LABEL;
8302 } else {
8303 }
8304 var52 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwnew].val; /* _n_kwnew on <self:AMethPropdef> */
8305 if (var52 == NULL) {
8306 var53 = 0; /* <var_old_child:ANode> cannot be null */
8307 } else {
8308 { /* Inline kernel#Object#== (var52,var_old_child) on <var52:nullable TKwnew> */
8309 var_other = var_old_child;
8310 {
8311 { /* Inline kernel#Object#is_same_instance (var52,var_other) on <var52:nullable TKwnew(TKwnew)> */
8312 var58 = var52 == var_other;
8313 var56 = var58;
8314 goto RET_LABEL57;
8315 RET_LABEL57:(void)0;
8316 }
8317 }
8318 var54 = var56;
8319 goto RET_LABEL55;
8320 RET_LABEL55:(void)0;
8321 }
8322 var53 = var54;
8323 }
8324 if (var53){
8325 /* <var_new_child:nullable ANode> isa nullable TKwnew */
8326 cltype60 = type_nullable__nit__TKwnew.color;
8327 idtype61 = type_nullable__nit__TKwnew.id;
8328 if(var_new_child == NULL) {
8329 var59 = 1;
8330 } else {
8331 if(cltype60 >= var_new_child->type->table_size) {
8332 var59 = 0;
8333 } else {
8334 var59 = var_new_child->type->type_table[cltype60] == idtype61;
8335 }
8336 }
8337 if (unlikely(!var59)) {
8338 var_class_name62 = var_new_child == NULL ? "null" : var_new_child->type->name;
8339 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwnew", var_class_name62);
8340 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1183);
8341 show_backtrace(1);
8342 }
8343 {
8344 nit__parser_prod___AMethPropdef___n_kwnew_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_kwnew= on <self:AMethPropdef>*/
8345 }
8346 goto RET_LABEL;
8347 } else {
8348 }
8349 var63 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_methid].val; /* _n_methid on <self:AMethPropdef> */
8350 if (var63 == NULL) {
8351 var64 = 0; /* <var_old_child:ANode> cannot be null */
8352 } else {
8353 { /* Inline kernel#Object#== (var63,var_old_child) on <var63:nullable AMethid> */
8354 var_other = var_old_child;
8355 {
8356 { /* Inline kernel#Object#is_same_instance (var63,var_other) on <var63:nullable AMethid(AMethid)> */
8357 var69 = var63 == var_other;
8358 var67 = var69;
8359 goto RET_LABEL68;
8360 RET_LABEL68:(void)0;
8361 }
8362 }
8363 var65 = var67;
8364 goto RET_LABEL66;
8365 RET_LABEL66:(void)0;
8366 }
8367 var64 = var65;
8368 }
8369 if (var64){
8370 /* <var_new_child:nullable ANode> isa nullable AMethid */
8371 cltype71 = type_nullable__nit__AMethid.color;
8372 idtype72 = type_nullable__nit__AMethid.id;
8373 if(var_new_child == NULL) {
8374 var70 = 1;
8375 } else {
8376 if(cltype71 >= var_new_child->type->table_size) {
8377 var70 = 0;
8378 } else {
8379 var70 = var_new_child->type->type_table[cltype71] == idtype72;
8380 }
8381 }
8382 if (unlikely(!var70)) {
8383 var_class_name73 = var_new_child == NULL ? "null" : var_new_child->type->name;
8384 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AMethid", var_class_name73);
8385 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1187);
8386 show_backtrace(1);
8387 }
8388 {
8389 nit__parser_prod___AMethPropdef___n_methid_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_methid= on <self:AMethPropdef>*/
8390 }
8391 goto RET_LABEL;
8392 } else {
8393 }
8394 var74 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_signature].val; /* _n_signature on <self:AMethPropdef> */
8395 if (var74 == NULL) {
8396 var75 = 0; /* <var_old_child:ANode> cannot be null */
8397 } else {
8398 { /* Inline kernel#Object#== (var74,var_old_child) on <var74:nullable ASignature> */
8399 var_other = var_old_child;
8400 {
8401 { /* Inline kernel#Object#is_same_instance (var74,var_other) on <var74:nullable ASignature(ASignature)> */
8402 var80 = var74 == var_other;
8403 var78 = var80;
8404 goto RET_LABEL79;
8405 RET_LABEL79:(void)0;
8406 }
8407 }
8408 var76 = var78;
8409 goto RET_LABEL77;
8410 RET_LABEL77:(void)0;
8411 }
8412 var75 = var76;
8413 }
8414 if (var75){
8415 /* <var_new_child:nullable ANode> isa ASignature */
8416 cltype82 = type_nit__ASignature.color;
8417 idtype83 = type_nit__ASignature.id;
8418 if(var_new_child == NULL) {
8419 var81 = 0;
8420 } else {
8421 if(cltype82 >= var_new_child->type->table_size) {
8422 var81 = 0;
8423 } else {
8424 var81 = var_new_child->type->type_table[cltype82] == idtype83;
8425 }
8426 }
8427 if (unlikely(!var81)) {
8428 var_class_name84 = var_new_child == NULL ? "null" : var_new_child->type->name;
8429 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "ASignature", var_class_name84);
8430 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1191);
8431 show_backtrace(1);
8432 }
8433 {
8434 nit__parser_prod___AMethPropdef___n_signature_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_signature= on <self:AMethPropdef>*/
8435 }
8436 goto RET_LABEL;
8437 } else {
8438 }
8439 var85 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AMethPropdef> */
8440 if (var85 == NULL) {
8441 var86 = 0; /* <var_old_child:ANode> cannot be null */
8442 } else {
8443 { /* Inline kernel#Object#== (var85,var_old_child) on <var85:nullable AAnnotations> */
8444 var_other = var_old_child;
8445 {
8446 { /* Inline kernel#Object#is_same_instance (var85,var_other) on <var85:nullable AAnnotations(AAnnotations)> */
8447 var91 = var85 == var_other;
8448 var89 = var91;
8449 goto RET_LABEL90;
8450 RET_LABEL90:(void)0;
8451 }
8452 }
8453 var87 = var89;
8454 goto RET_LABEL88;
8455 RET_LABEL88:(void)0;
8456 }
8457 var86 = var87;
8458 }
8459 if (var86){
8460 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
8461 cltype93 = type_nullable__nit__AAnnotations.color;
8462 idtype94 = type_nullable__nit__AAnnotations.id;
8463 if(var_new_child == NULL) {
8464 var92 = 1;
8465 } else {
8466 if(cltype93 >= var_new_child->type->table_size) {
8467 var92 = 0;
8468 } else {
8469 var92 = var_new_child->type->type_table[cltype93] == idtype94;
8470 }
8471 }
8472 if (unlikely(!var92)) {
8473 var_class_name95 = var_new_child == NULL ? "null" : var_new_child->type->name;
8474 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name95);
8475 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1195);
8476 show_backtrace(1);
8477 }
8478 {
8479 nit__parser_prod___AMethPropdef___nit__parser_nodes__Prod__n_annotations_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_annotations= on <self:AMethPropdef>*/
8480 }
8481 goto RET_LABEL;
8482 } else {
8483 }
8484 var96 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_calls].val; /* _n_extern_calls on <self:AMethPropdef> */
8485 if (var96 == NULL) {
8486 var97 = 0; /* <var_old_child:ANode> cannot be null */
8487 } else {
8488 { /* Inline kernel#Object#== (var96,var_old_child) on <var96:nullable AExternCalls> */
8489 var_other = var_old_child;
8490 {
8491 { /* Inline kernel#Object#is_same_instance (var96,var_other) on <var96:nullable AExternCalls(AExternCalls)> */
8492 var102 = var96 == var_other;
8493 var100 = var102;
8494 goto RET_LABEL101;
8495 RET_LABEL101:(void)0;
8496 }
8497 }
8498 var98 = var100;
8499 goto RET_LABEL99;
8500 RET_LABEL99:(void)0;
8501 }
8502 var97 = var98;
8503 }
8504 if (var97){
8505 /* <var_new_child:nullable ANode> isa nullable AExternCalls */
8506 cltype104 = type_nullable__nit__AExternCalls.color;
8507 idtype105 = type_nullable__nit__AExternCalls.id;
8508 if(var_new_child == NULL) {
8509 var103 = 1;
8510 } else {
8511 if(cltype104 >= var_new_child->type->table_size) {
8512 var103 = 0;
8513 } else {
8514 var103 = var_new_child->type->type_table[cltype104] == idtype105;
8515 }
8516 }
8517 if (unlikely(!var103)) {
8518 var_class_name106 = var_new_child == NULL ? "null" : var_new_child->type->name;
8519 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCalls", var_class_name106);
8520 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1199);
8521 show_backtrace(1);
8522 }
8523 {
8524 nit__parser_prod___AMethPropdef___n_extern_calls_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_extern_calls= on <self:AMethPropdef>*/
8525 }
8526 goto RET_LABEL;
8527 } else {
8528 }
8529 var107 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AMethPropdef> */
8530 if (var107 == NULL) {
8531 var108 = 0; /* <var_old_child:ANode> cannot be null */
8532 } else {
8533 { /* Inline kernel#Object#== (var107,var_old_child) on <var107:nullable AExternCodeBlock> */
8534 var_other = var_old_child;
8535 {
8536 { /* Inline kernel#Object#is_same_instance (var107,var_other) on <var107:nullable AExternCodeBlock(AExternCodeBlock)> */
8537 var113 = var107 == var_other;
8538 var111 = var113;
8539 goto RET_LABEL112;
8540 RET_LABEL112:(void)0;
8541 }
8542 }
8543 var109 = var111;
8544 goto RET_LABEL110;
8545 RET_LABEL110:(void)0;
8546 }
8547 var108 = var109;
8548 }
8549 if (var108){
8550 /* <var_new_child:nullable ANode> isa nullable AExternCodeBlock */
8551 cltype115 = type_nullable__nit__AExternCodeBlock.color;
8552 idtype116 = type_nullable__nit__AExternCodeBlock.id;
8553 if(var_new_child == NULL) {
8554 var114 = 1;
8555 } else {
8556 if(cltype115 >= var_new_child->type->table_size) {
8557 var114 = 0;
8558 } else {
8559 var114 = var_new_child->type->type_table[cltype115] == idtype116;
8560 }
8561 }
8562 if (unlikely(!var114)) {
8563 var_class_name117 = var_new_child == NULL ? "null" : var_new_child->type->name;
8564 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExternCodeBlock", var_class_name117);
8565 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1203);
8566 show_backtrace(1);
8567 }
8568 {
8569 nit__parser_prod___AMethPropdef___n_extern_code_block_61d(self, var_new_child); /* Direct call parser_prod#AMethPropdef#n_extern_code_block= on <self:AMethPropdef>*/
8570 }
8571 goto RET_LABEL;
8572 } else {
8573 }
8574 var118 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMethPropdef> */
8575 if (var118 == NULL) {
8576 var119 = 0; /* <var_old_child:ANode> cannot be null */
8577 } else {
8578 { /* Inline kernel#Object#== (var118,var_old_child) on <var118:nullable AExpr> */
8579 var_other = var_old_child;
8580 {
8581 { /* Inline kernel#Object#is_same_instance (var118,var_other) on <var118:nullable AExpr(AExpr)> */
8582 var124 = var118 == var_other;
8583 var122 = var124;
8584 goto RET_LABEL123;
8585 RET_LABEL123:(void)0;
8586 }
8587 }
8588 var120 = var122;
8589 goto RET_LABEL121;
8590 RET_LABEL121:(void)0;
8591 }
8592 var119 = var120;
8593 }
8594 if (var119){
8595 /* <var_new_child:nullable ANode> isa nullable AExpr */
8596 cltype126 = type_nullable__nit__AExpr.color;
8597 idtype127 = type_nullable__nit__AExpr.id;
8598 if(var_new_child == NULL) {
8599 var125 = 1;
8600 } else {
8601 if(cltype126 >= var_new_child->type->table_size) {
8602 var125 = 0;
8603 } else {
8604 var125 = var_new_child->type->type_table[cltype126] == idtype127;
8605 }
8606 }
8607 if (unlikely(!var125)) {
8608 var_class_name128 = var_new_child == NULL ? "null" : var_new_child->type->name;
8609 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AExpr", var_class_name128);
8610 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1207);
8611 show_backtrace(1);
8612 }
8613 {
8614 ((void (*)(val* self, val* p0))(self->class->vft[COLOR_nit__parser_nodes__AMethPropdef__n_block_61d]))(self, var_new_child) /* n_block= on <self:AMethPropdef>*/;
8615 }
8616 goto RET_LABEL;
8617 } else {
8618 }
8619 RET_LABEL:;
8620 }
8621 /* method parser_prod#AMethPropdef#n_doc= for (self: AMethPropdef, nullable ADoc) */
8622 void nit__parser_prod___AMethPropdef___nit__parser_nodes__ADefinition__n_doc_61d(val* self, val* p0) {
8623 val* var_node /* var node: nullable ADoc */;
8624 val* var /* : null */;
8625 short int var1 /* : Bool */;
8626 short int var2 /* : Bool */;
8627 val* var_other /* var other: nullable Object */;
8628 short int var4 /* : Bool */;
8629 short int var5 /* : Bool */;
8630 var_node = p0;
8631 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val = var_node; /* _n_doc on <self:AMethPropdef> */
8632 var = NULL;
8633 if (var_node == NULL) {
8634 var1 = 0; /* is null */
8635 } else {
8636 var1 = 1; /* arg is null and recv is not */
8637 }
8638 if (0) {
8639 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
8640 var_other = var;
8641 {
8642 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable ADoc(ADoc)>*/;
8643 }
8644 var5 = !var4;
8645 var2 = var5;
8646 goto RET_LABEL3;
8647 RET_LABEL3:(void)0;
8648 }
8649 var1 = var2;
8650 }
8651 if (var1){
8652 {
8653 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
8654 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ADoc(ADoc)> */
8655 RET_LABEL6:(void)0;
8656 }
8657 }
8658 } else {
8659 }
8660 RET_LABEL:;
8661 }
8662 /* method parser_prod#AMethPropdef#n_kwredef= for (self: AMethPropdef, nullable TKwredef) */
8663 void nit__parser_prod___AMethPropdef___nit__parser_nodes__ADefinition__n_kwredef_61d(val* self, val* p0) {
8664 val* var_node /* var node: nullable TKwredef */;
8665 val* var /* : null */;
8666 short int var1 /* : Bool */;
8667 short int var2 /* : Bool */;
8668 val* var_other /* var other: nullable Object */;
8669 short int var4 /* : Bool */;
8670 short int var5 /* : Bool */;
8671 var_node = p0;
8672 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val = var_node; /* _n_kwredef on <self:AMethPropdef> */
8673 var = NULL;
8674 if (var_node == NULL) {
8675 var1 = 0; /* is null */
8676 } else {
8677 var1 = 1; /* arg is null and recv is not */
8678 }
8679 if (0) {
8680 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
8681 var_other = var;
8682 {
8683 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
8684 }
8685 var5 = !var4;
8686 var2 = var5;
8687 goto RET_LABEL3;
8688 RET_LABEL3:(void)0;
8689 }
8690 var1 = var2;
8691 }
8692 if (var1){
8693 {
8694 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
8695 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
8696 RET_LABEL6:(void)0;
8697 }
8698 }
8699 } else {
8700 }
8701 RET_LABEL:;
8702 }
8703 /* method parser_prod#AMethPropdef#n_visibility= for (self: AMethPropdef, nullable AVisibility) */
8704 void nit__parser_prod___AMethPropdef___nit__parser_nodes__ADefinition__n_visibility_61d(val* self, val* p0) {
8705 val* var_node /* var node: nullable AVisibility */;
8706 var_node = p0;
8707 self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val = var_node; /* _n_visibility on <self:AMethPropdef> */
8708 if (var_node == NULL) {
8709 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8710 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1225);
8711 show_backtrace(1);
8712 } else {
8713 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility> */
8714 if (unlikely(var_node == NULL)) {
8715 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8716 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
8717 show_backtrace(1);
8718 }
8719 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AVisibility> */
8720 RET_LABEL1:(void)0;
8721 }
8722 }
8723 RET_LABEL:;
8724 }
8725 /* method parser_prod#AMethPropdef#n_kwmeth= for (self: AMethPropdef, nullable TKwmeth) */
8726 void nit__parser_prod___AMethPropdef___n_kwmeth_61d(val* self, val* p0) {
8727 val* var_node /* var node: nullable TKwmeth */;
8728 val* var /* : null */;
8729 short int var1 /* : Bool */;
8730 short int var2 /* : Bool */;
8731 val* var_other /* var other: nullable Object */;
8732 short int var4 /* : Bool */;
8733 short int var5 /* : Bool */;
8734 var_node = p0;
8735 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwmeth].val = var_node; /* _n_kwmeth on <self:AMethPropdef> */
8736 var = NULL;
8737 if (var_node == NULL) {
8738 var1 = 0; /* is null */
8739 } else {
8740 var1 = 1; /* arg is null and recv is not */
8741 }
8742 if (0) {
8743 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwmeth> */
8744 var_other = var;
8745 {
8746 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwmeth(TKwmeth)>*/;
8747 }
8748 var5 = !var4;
8749 var2 = var5;
8750 goto RET_LABEL3;
8751 RET_LABEL3:(void)0;
8752 }
8753 var1 = var2;
8754 }
8755 if (var1){
8756 {
8757 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwmeth(TKwmeth)> */
8758 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwmeth(TKwmeth)> */
8759 RET_LABEL6:(void)0;
8760 }
8761 }
8762 } else {
8763 }
8764 RET_LABEL:;
8765 }
8766 /* method parser_prod#AMethPropdef#n_kwinit= for (self: AMethPropdef, nullable TKwinit) */
8767 void nit__parser_prod___AMethPropdef___n_kwinit_61d(val* self, val* p0) {
8768 val* var_node /* var node: nullable TKwinit */;
8769 val* var /* : null */;
8770 short int var1 /* : Bool */;
8771 short int var2 /* : Bool */;
8772 val* var_other /* var other: nullable Object */;
8773 short int var4 /* : Bool */;
8774 short int var5 /* : Bool */;
8775 var_node = p0;
8776 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwinit].val = var_node; /* _n_kwinit on <self:AMethPropdef> */
8777 var = NULL;
8778 if (var_node == NULL) {
8779 var1 = 0; /* is null */
8780 } else {
8781 var1 = 1; /* arg is null and recv is not */
8782 }
8783 if (0) {
8784 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwinit> */
8785 var_other = var;
8786 {
8787 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwinit(TKwinit)>*/;
8788 }
8789 var5 = !var4;
8790 var2 = var5;
8791 goto RET_LABEL3;
8792 RET_LABEL3:(void)0;
8793 }
8794 var1 = var2;
8795 }
8796 if (var1){
8797 {
8798 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwinit(TKwinit)> */
8799 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwinit(TKwinit)> */
8800 RET_LABEL6:(void)0;
8801 }
8802 }
8803 } else {
8804 }
8805 RET_LABEL:;
8806 }
8807 /* method parser_prod#AMethPropdef#n_kwnew= for (self: AMethPropdef, nullable TKwnew) */
8808 void nit__parser_prod___AMethPropdef___n_kwnew_61d(val* self, val* p0) {
8809 val* var_node /* var node: nullable TKwnew */;
8810 val* var /* : null */;
8811 short int var1 /* : Bool */;
8812 short int var2 /* : Bool */;
8813 val* var_other /* var other: nullable Object */;
8814 short int var4 /* : Bool */;
8815 short int var5 /* : Bool */;
8816 var_node = p0;
8817 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwnew].val = var_node; /* _n_kwnew on <self:AMethPropdef> */
8818 var = NULL;
8819 if (var_node == NULL) {
8820 var1 = 0; /* is null */
8821 } else {
8822 var1 = 1; /* arg is null and recv is not */
8823 }
8824 if (0) {
8825 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwnew> */
8826 var_other = var;
8827 {
8828 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable TKwnew(TKwnew)>*/;
8829 }
8830 var5 = !var4;
8831 var2 = var5;
8832 goto RET_LABEL3;
8833 RET_LABEL3:(void)0;
8834 }
8835 var1 = var2;
8836 }
8837 if (var1){
8838 {
8839 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwnew(TKwnew)> */
8840 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable TKwnew(TKwnew)> */
8841 RET_LABEL6:(void)0;
8842 }
8843 }
8844 } else {
8845 }
8846 RET_LABEL:;
8847 }
8848 /* method parser_prod#AMethPropdef#n_methid= for (self: AMethPropdef, nullable AMethid) */
8849 void nit__parser_prod___AMethPropdef___n_methid_61d(val* self, val* p0) {
8850 val* var_node /* var node: nullable AMethid */;
8851 val* var /* : null */;
8852 short int var1 /* : Bool */;
8853 short int var2 /* : Bool */;
8854 val* var_other /* var other: nullable Object */;
8855 short int var4 /* : Bool */;
8856 short int var5 /* : Bool */;
8857 var_node = p0;
8858 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_methid].val = var_node; /* _n_methid on <self:AMethPropdef> */
8859 var = NULL;
8860 if (var_node == NULL) {
8861 var1 = 0; /* is null */
8862 } else {
8863 var1 = 1; /* arg is null and recv is not */
8864 }
8865 if (0) {
8866 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AMethid> */
8867 var_other = var;
8868 {
8869 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AMethid(AMethid)>*/;
8870 }
8871 var5 = !var4;
8872 var2 = var5;
8873 goto RET_LABEL3;
8874 RET_LABEL3:(void)0;
8875 }
8876 var1 = var2;
8877 }
8878 if (var1){
8879 {
8880 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AMethid(AMethid)> */
8881 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AMethid(AMethid)> */
8882 RET_LABEL6:(void)0;
8883 }
8884 }
8885 } else {
8886 }
8887 RET_LABEL:;
8888 }
8889 /* method parser_prod#AMethPropdef#n_signature= for (self: AMethPropdef, nullable ASignature) */
8890 void nit__parser_prod___AMethPropdef___n_signature_61d(val* self, val* p0) {
8891 val* var_node /* var node: nullable ASignature */;
8892 var_node = p0;
8893 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_signature].val = var_node; /* _n_signature on <self:AMethPropdef> */
8894 if (var_node == NULL) {
8895 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8896 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1250);
8897 show_backtrace(1);
8898 } else {
8899 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ASignature> */
8900 if (unlikely(var_node == NULL)) {
8901 PRINT_ERROR("Runtime error: %s", "Receiver is null");
8902 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
8903 show_backtrace(1);
8904 }
8905 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable ASignature> */
8906 RET_LABEL1:(void)0;
8907 }
8908 }
8909 RET_LABEL:;
8910 }
8911 /* method parser_prod#AMethPropdef#n_annotations= for (self: AMethPropdef, nullable AAnnotations) */
8912 void nit__parser_prod___AMethPropdef___nit__parser_nodes__Prod__n_annotations_61d(val* self, val* p0) {
8913 val* var_node /* var node: nullable AAnnotations */;
8914 val* var /* : null */;
8915 short int var1 /* : Bool */;
8916 short int var2 /* : Bool */;
8917 val* var_other /* var other: nullable Object */;
8918 short int var4 /* : Bool */;
8919 short int var5 /* : Bool */;
8920 var_node = p0;
8921 self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val = var_node; /* _n_annotations on <self:AMethPropdef> */
8922 var = NULL;
8923 if (var_node == NULL) {
8924 var1 = 0; /* is null */
8925 } else {
8926 var1 = 1; /* arg is null and recv is not */
8927 }
8928 if (0) {
8929 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
8930 var_other = var;
8931 {
8932 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
8933 }
8934 var5 = !var4;
8935 var2 = var5;
8936 goto RET_LABEL3;
8937 RET_LABEL3:(void)0;
8938 }
8939 var1 = var2;
8940 }
8941 if (var1){
8942 {
8943 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
8944 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
8945 RET_LABEL6:(void)0;
8946 }
8947 }
8948 } else {
8949 }
8950 RET_LABEL:;
8951 }
8952 /* method parser_prod#AMethPropdef#n_extern_calls= for (self: AMethPropdef, nullable AExternCalls) */
8953 void nit__parser_prod___AMethPropdef___n_extern_calls_61d(val* self, val* p0) {
8954 val* var_node /* var node: nullable AExternCalls */;
8955 val* var /* : null */;
8956 short int var1 /* : Bool */;
8957 short int var2 /* : Bool */;
8958 val* var_other /* var other: nullable Object */;
8959 short int var4 /* : Bool */;
8960 short int var5 /* : Bool */;
8961 var_node = p0;
8962 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_calls].val = var_node; /* _n_extern_calls on <self:AMethPropdef> */
8963 var = NULL;
8964 if (var_node == NULL) {
8965 var1 = 0; /* is null */
8966 } else {
8967 var1 = 1; /* arg is null and recv is not */
8968 }
8969 if (0) {
8970 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCalls> */
8971 var_other = var;
8972 {
8973 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCalls(AExternCalls)>*/;
8974 }
8975 var5 = !var4;
8976 var2 = var5;
8977 goto RET_LABEL3;
8978 RET_LABEL3:(void)0;
8979 }
8980 var1 = var2;
8981 }
8982 if (var1){
8983 {
8984 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCalls(AExternCalls)> */
8985 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCalls(AExternCalls)> */
8986 RET_LABEL6:(void)0;
8987 }
8988 }
8989 } else {
8990 }
8991 RET_LABEL:;
8992 }
8993 /* method parser_prod#AMethPropdef#n_extern_code_block= for (self: AMethPropdef, nullable AExternCodeBlock) */
8994 void nit__parser_prod___AMethPropdef___n_extern_code_block_61d(val* self, val* p0) {
8995 val* var_node /* var node: nullable AExternCodeBlock */;
8996 val* var /* : null */;
8997 short int var1 /* : Bool */;
8998 short int var2 /* : Bool */;
8999 val* var_other /* var other: nullable Object */;
9000 short int var4 /* : Bool */;
9001 short int var5 /* : Bool */;
9002 var_node = p0;
9003 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_code_block].val = var_node; /* _n_extern_code_block on <self:AMethPropdef> */
9004 var = NULL;
9005 if (var_node == NULL) {
9006 var1 = 0; /* is null */
9007 } else {
9008 var1 = 1; /* arg is null and recv is not */
9009 }
9010 if (0) {
9011 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExternCodeBlock> */
9012 var_other = var;
9013 {
9014 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExternCodeBlock(AExternCodeBlock)>*/;
9015 }
9016 var5 = !var4;
9017 var2 = var5;
9018 goto RET_LABEL3;
9019 RET_LABEL3:(void)0;
9020 }
9021 var1 = var2;
9022 }
9023 if (var1){
9024 {
9025 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
9026 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExternCodeBlock(AExternCodeBlock)> */
9027 RET_LABEL6:(void)0;
9028 }
9029 }
9030 } else {
9031 }
9032 RET_LABEL:;
9033 }
9034 /* method parser_prod#AMethPropdef#n_block= for (self: AMethPropdef, nullable AExpr) */
9035 void nit__parser_prod___AMethPropdef___n_block_61d(val* self, val* p0) {
9036 val* var_node /* var node: nullable AExpr */;
9037 val* var /* : null */;
9038 short int var1 /* : Bool */;
9039 short int var2 /* : Bool */;
9040 val* var_other /* var other: nullable Object */;
9041 short int var4 /* : Bool */;
9042 short int var5 /* : Bool */;
9043 var_node = p0;
9044 self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val = var_node; /* _n_block on <self:AMethPropdef> */
9045 var = NULL;
9046 if (var_node == NULL) {
9047 var1 = 0; /* is null */
9048 } else {
9049 var1 = 1; /* arg is null and recv is not */
9050 }
9051 if (0) {
9052 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AExpr> */
9053 var_other = var;
9054 {
9055 var4 = ((short int (*)(val* self, val* p0))(var_node->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_node, var_other) /* == on <var_node:nullable AExpr(AExpr)>*/;
9056 }
9057 var5 = !var4;
9058 var2 = var5;
9059 goto RET_LABEL3;
9060 RET_LABEL3:(void)0;
9061 }
9062 var1 = var2;
9063 }
9064 if (var1){
9065 {
9066 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AExpr(AExpr)> */
9067 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:nullable AExpr(AExpr)> */
9068 RET_LABEL6:(void)0;
9069 }
9070 }
9071 } else {
9072 }
9073 RET_LABEL:;
9074 }
9075 /* method parser_prod#AMethPropdef#visit_all for (self: AMethPropdef, Visitor) */
9076 void nit__parser_prod___AMethPropdef___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9077 val* var_v /* var v: Visitor */;
9078 val* var /* : nullable ADoc */;
9079 val* var1 /* : nullable TKwredef */;
9080 val* var2 /* : nullable AVisibility */;
9081 val* var3 /* : nullable TKwmeth */;
9082 val* var4 /* : nullable TKwinit */;
9083 val* var5 /* : nullable TKwnew */;
9084 val* var6 /* : nullable AMethid */;
9085 val* var7 /* : nullable ASignature */;
9086 val* var8 /* : nullable AAnnotations */;
9087 val* var9 /* : nullable AExternCalls */;
9088 val* var10 /* : nullable AExternCodeBlock */;
9089 val* var11 /* : nullable AExpr */;
9090 var_v = p0;
9091 var = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_doc].val; /* _n_doc on <self:AMethPropdef> */
9092 {
9093 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9094 }
9095 var1 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_kwredef].val; /* _n_kwredef on <self:AMethPropdef> */
9096 {
9097 nit___nit__Visitor___enter_visit(var_v, var1); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9098 }
9099 var2 = self->attrs[COLOR_nit__parser_nodes__ADefinition___n_visibility].val; /* _n_visibility on <self:AMethPropdef> */
9100 {
9101 nit___nit__Visitor___enter_visit(var_v, var2); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9102 }
9103 var3 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwmeth].val; /* _n_kwmeth on <self:AMethPropdef> */
9104 {
9105 nit___nit__Visitor___enter_visit(var_v, var3); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9106 }
9107 var4 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwinit].val; /* _n_kwinit on <self:AMethPropdef> */
9108 {
9109 nit___nit__Visitor___enter_visit(var_v, var4); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9110 }
9111 var5 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_kwnew].val; /* _n_kwnew on <self:AMethPropdef> */
9112 {
9113 nit___nit__Visitor___enter_visit(var_v, var5); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9114 }
9115 var6 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_methid].val; /* _n_methid on <self:AMethPropdef> */
9116 {
9117 nit___nit__Visitor___enter_visit(var_v, var6); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9118 }
9119 var7 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_signature].val; /* _n_signature on <self:AMethPropdef> */
9120 {
9121 nit___nit__Visitor___enter_visit(var_v, var7); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9122 }
9123 var8 = self->attrs[COLOR_nit__parser_nodes__Prod___n_annotations].val; /* _n_annotations on <self:AMethPropdef> */
9124 {
9125 nit___nit__Visitor___enter_visit(var_v, var8); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9126 }
9127 var9 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_calls].val; /* _n_extern_calls on <self:AMethPropdef> */
9128 {
9129 nit___nit__Visitor___enter_visit(var_v, var9); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9130 }
9131 var10 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_extern_code_block].val; /* _n_extern_code_block on <self:AMethPropdef> */
9132 {
9133 nit___nit__Visitor___enter_visit(var_v, var10); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9134 }
9135 var11 = self->attrs[COLOR_nit__parser_nodes__AMethPropdef___n_block].val; /* _n_block on <self:AMethPropdef> */
9136 {
9137 nit___nit__Visitor___enter_visit(var_v, var11); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9138 }
9139 RET_LABEL:;
9140 }
9141 /* method parser_prod#AIdMethid#init_aidmethid for (self: AIdMethid, nullable TId) */
9142 void nit__parser_prod___AIdMethid___init_aidmethid(val* self, val* p0) {
9143 val* var_n_id /* var n_id: nullable TId */;
9144 var_n_id = p0;
9145 if (unlikely(var_n_id == NULL)) {
9146 PRINT_ERROR("Runtime error: %s", "Cast failed");
9147 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1295);
9148 show_backtrace(1);
9149 }
9150 self->attrs[COLOR_nit__parser_nodes__AIdMethid___n_id].val = var_n_id; /* _n_id on <self:AIdMethid> */
9151 if (var_n_id == NULL) {
9152 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9153 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1296);
9154 show_backtrace(1);
9155 } else {
9156 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TId> */
9157 if (unlikely(var_n_id == NULL)) {
9158 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9159 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9160 show_backtrace(1);
9161 }
9162 var_n_id->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_id:nullable TId> */
9163 RET_LABEL1:(void)0;
9164 }
9165 }
9166 RET_LABEL:;
9167 }
9168 /* method parser_prod#AIdMethid#replace_child for (self: AIdMethid, ANode, nullable ANode) */
9169 void nit__parser_prod___AIdMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9170 val* var_old_child /* var old_child: ANode */;
9171 val* var_new_child /* var new_child: nullable ANode */;
9172 val* var /* : TId */;
9173 short int var1 /* : Bool */;
9174 val* var_other /* var other: nullable Object */;
9175 short int var3 /* : Bool */;
9176 short int var5 /* : Bool */;
9177 short int var6 /* : Bool */;
9178 int cltype;
9179 int idtype;
9180 const char* var_class_name;
9181 var_old_child = p0;
9182 var_new_child = p1;
9183 var = self->attrs[COLOR_nit__parser_nodes__AIdMethid___n_id].val; /* _n_id on <self:AIdMethid> */
9184 if (unlikely(var == NULL)) {
9185 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
9186 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1301);
9187 show_backtrace(1);
9188 }
9189 {
9190 { /* Inline kernel#Object#== (var,var_old_child) on <var:TId> */
9191 var_other = var_old_child;
9192 {
9193 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TId> */
9194 var5 = var == var_other;
9195 var3 = var5;
9196 goto RET_LABEL4;
9197 RET_LABEL4:(void)0;
9198 }
9199 }
9200 var1 = var3;
9201 goto RET_LABEL2;
9202 RET_LABEL2:(void)0;
9203 }
9204 }
9205 if (var1){
9206 /* <var_new_child:nullable ANode> isa TId */
9207 cltype = type_nit__TId.color;
9208 idtype = type_nit__TId.id;
9209 if(var_new_child == NULL) {
9210 var6 = 0;
9211 } else {
9212 if(cltype >= var_new_child->type->table_size) {
9213 var6 = 0;
9214 } else {
9215 var6 = var_new_child->type->type_table[cltype] == idtype;
9216 }
9217 }
9218 if (unlikely(!var6)) {
9219 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9220 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TId", var_class_name);
9221 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1302);
9222 show_backtrace(1);
9223 }
9224 {
9225 nit__parser_prod___AIdMethid___n_id_61d(self, var_new_child); /* Direct call parser_prod#AIdMethid#n_id= on <self:AIdMethid>*/
9226 }
9227 goto RET_LABEL;
9228 } else {
9229 }
9230 RET_LABEL:;
9231 }
9232 /* method parser_prod#AIdMethid#n_id= for (self: AIdMethid, TId) */
9233 void nit__parser_prod___AIdMethid___n_id_61d(val* self, val* p0) {
9234 val* var_node /* var node: TId */;
9235 var_node = p0;
9236 self->attrs[COLOR_nit__parser_nodes__AIdMethid___n_id].val = var_node; /* _n_id on <self:AIdMethid> */
9237 {
9238 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TId> */
9239 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TId> */
9240 RET_LABEL1:(void)0;
9241 }
9242 }
9243 RET_LABEL:;
9244 }
9245 /* method parser_prod#AIdMethid#visit_all for (self: AIdMethid, Visitor) */
9246 void nit__parser_prod___AIdMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9247 val* var_v /* var v: Visitor */;
9248 val* var /* : TId */;
9249 var_v = p0;
9250 var = self->attrs[COLOR_nit__parser_nodes__AIdMethid___n_id].val; /* _n_id on <self:AIdMethid> */
9251 if (unlikely(var == NULL)) {
9252 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
9253 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1316);
9254 show_backtrace(1);
9255 }
9256 {
9257 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9258 }
9259 RET_LABEL:;
9260 }
9261 /* method parser_prod#APlusMethid#init_aplusmethid for (self: APlusMethid, nullable TPlus) */
9262 void nit__parser_prod___APlusMethid___init_aplusmethid(val* self, val* p0) {
9263 val* var_n_plus /* var n_plus: nullable TPlus */;
9264 var_n_plus = p0;
9265 if (unlikely(var_n_plus == NULL)) {
9266 PRINT_ERROR("Runtime error: %s", "Cast failed");
9267 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1324);
9268 show_backtrace(1);
9269 }
9270 self->attrs[COLOR_nit__parser_nodes__APlusMethid___n_plus].val = var_n_plus; /* _n_plus on <self:APlusMethid> */
9271 if (var_n_plus == NULL) {
9272 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9273 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1325);
9274 show_backtrace(1);
9275 } else {
9276 { /* Inline parser_nodes#ANode#parent= (var_n_plus,self) on <var_n_plus:nullable TPlus> */
9277 if (unlikely(var_n_plus == NULL)) {
9278 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9279 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9280 show_backtrace(1);
9281 }
9282 var_n_plus->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_plus:nullable TPlus> */
9283 RET_LABEL1:(void)0;
9284 }
9285 }
9286 RET_LABEL:;
9287 }
9288 /* method parser_prod#APlusMethid#replace_child for (self: APlusMethid, ANode, nullable ANode) */
9289 void nit__parser_prod___APlusMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9290 val* var_old_child /* var old_child: ANode */;
9291 val* var_new_child /* var new_child: nullable ANode */;
9292 val* var /* : TPlus */;
9293 short int var1 /* : Bool */;
9294 val* var_other /* var other: nullable Object */;
9295 short int var3 /* : Bool */;
9296 short int var5 /* : Bool */;
9297 short int var6 /* : Bool */;
9298 int cltype;
9299 int idtype;
9300 const char* var_class_name;
9301 var_old_child = p0;
9302 var_new_child = p1;
9303 var = self->attrs[COLOR_nit__parser_nodes__APlusMethid___n_plus].val; /* _n_plus on <self:APlusMethid> */
9304 if (unlikely(var == NULL)) {
9305 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_plus");
9306 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1330);
9307 show_backtrace(1);
9308 }
9309 {
9310 { /* Inline kernel#Object#== (var,var_old_child) on <var:TPlus> */
9311 var_other = var_old_child;
9312 {
9313 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TPlus> */
9314 var5 = var == var_other;
9315 var3 = var5;
9316 goto RET_LABEL4;
9317 RET_LABEL4:(void)0;
9318 }
9319 }
9320 var1 = var3;
9321 goto RET_LABEL2;
9322 RET_LABEL2:(void)0;
9323 }
9324 }
9325 if (var1){
9326 /* <var_new_child:nullable ANode> isa TPlus */
9327 cltype = type_nit__TPlus.color;
9328 idtype = type_nit__TPlus.id;
9329 if(var_new_child == NULL) {
9330 var6 = 0;
9331 } else {
9332 if(cltype >= var_new_child->type->table_size) {
9333 var6 = 0;
9334 } else {
9335 var6 = var_new_child->type->type_table[cltype] == idtype;
9336 }
9337 }
9338 if (unlikely(!var6)) {
9339 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9340 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TPlus", var_class_name);
9341 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1331);
9342 show_backtrace(1);
9343 }
9344 {
9345 nit__parser_prod___APlusMethid___n_plus_61d(self, var_new_child); /* Direct call parser_prod#APlusMethid#n_plus= on <self:APlusMethid>*/
9346 }
9347 goto RET_LABEL;
9348 } else {
9349 }
9350 RET_LABEL:;
9351 }
9352 /* method parser_prod#APlusMethid#n_plus= for (self: APlusMethid, TPlus) */
9353 void nit__parser_prod___APlusMethid___n_plus_61d(val* self, val* p0) {
9354 val* var_node /* var node: TPlus */;
9355 var_node = p0;
9356 self->attrs[COLOR_nit__parser_nodes__APlusMethid___n_plus].val = var_node; /* _n_plus on <self:APlusMethid> */
9357 {
9358 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TPlus> */
9359 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TPlus> */
9360 RET_LABEL1:(void)0;
9361 }
9362 }
9363 RET_LABEL:;
9364 }
9365 /* method parser_prod#APlusMethid#visit_all for (self: APlusMethid, Visitor) */
9366 void nit__parser_prod___APlusMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9367 val* var_v /* var v: Visitor */;
9368 val* var /* : TPlus */;
9369 var_v = p0;
9370 var = self->attrs[COLOR_nit__parser_nodes__APlusMethid___n_plus].val; /* _n_plus on <self:APlusMethid> */
9371 if (unlikely(var == NULL)) {
9372 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_plus");
9373 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1345);
9374 show_backtrace(1);
9375 }
9376 {
9377 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9378 }
9379 RET_LABEL:;
9380 }
9381 /* method parser_prod#AMinusMethid#init_aminusmethid for (self: AMinusMethid, nullable TMinus) */
9382 void nit__parser_prod___AMinusMethid___init_aminusmethid(val* self, val* p0) {
9383 val* var_n_minus /* var n_minus: nullable TMinus */;
9384 var_n_minus = p0;
9385 if (unlikely(var_n_minus == NULL)) {
9386 PRINT_ERROR("Runtime error: %s", "Cast failed");
9387 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1353);
9388 show_backtrace(1);
9389 }
9390 self->attrs[COLOR_nit__parser_nodes__AMinusMethid___n_minus].val = var_n_minus; /* _n_minus on <self:AMinusMethid> */
9391 if (var_n_minus == NULL) {
9392 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9393 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1354);
9394 show_backtrace(1);
9395 } else {
9396 { /* Inline parser_nodes#ANode#parent= (var_n_minus,self) on <var_n_minus:nullable TMinus> */
9397 if (unlikely(var_n_minus == NULL)) {
9398 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9399 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9400 show_backtrace(1);
9401 }
9402 var_n_minus->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_minus:nullable TMinus> */
9403 RET_LABEL1:(void)0;
9404 }
9405 }
9406 RET_LABEL:;
9407 }
9408 /* method parser_prod#AMinusMethid#replace_child for (self: AMinusMethid, ANode, nullable ANode) */
9409 void nit__parser_prod___AMinusMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9410 val* var_old_child /* var old_child: ANode */;
9411 val* var_new_child /* var new_child: nullable ANode */;
9412 val* var /* : TMinus */;
9413 short int var1 /* : Bool */;
9414 val* var_other /* var other: nullable Object */;
9415 short int var3 /* : Bool */;
9416 short int var5 /* : Bool */;
9417 short int var6 /* : Bool */;
9418 int cltype;
9419 int idtype;
9420 const char* var_class_name;
9421 var_old_child = p0;
9422 var_new_child = p1;
9423 var = self->attrs[COLOR_nit__parser_nodes__AMinusMethid___n_minus].val; /* _n_minus on <self:AMinusMethid> */
9424 if (unlikely(var == NULL)) {
9425 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_minus");
9426 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1359);
9427 show_backtrace(1);
9428 }
9429 {
9430 { /* Inline kernel#Object#== (var,var_old_child) on <var:TMinus> */
9431 var_other = var_old_child;
9432 {
9433 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TMinus> */
9434 var5 = var == var_other;
9435 var3 = var5;
9436 goto RET_LABEL4;
9437 RET_LABEL4:(void)0;
9438 }
9439 }
9440 var1 = var3;
9441 goto RET_LABEL2;
9442 RET_LABEL2:(void)0;
9443 }
9444 }
9445 if (var1){
9446 /* <var_new_child:nullable ANode> isa TMinus */
9447 cltype = type_nit__TMinus.color;
9448 idtype = type_nit__TMinus.id;
9449 if(var_new_child == NULL) {
9450 var6 = 0;
9451 } else {
9452 if(cltype >= var_new_child->type->table_size) {
9453 var6 = 0;
9454 } else {
9455 var6 = var_new_child->type->type_table[cltype] == idtype;
9456 }
9457 }
9458 if (unlikely(!var6)) {
9459 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9460 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TMinus", var_class_name);
9461 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1360);
9462 show_backtrace(1);
9463 }
9464 {
9465 nit__parser_prod___AMinusMethid___n_minus_61d(self, var_new_child); /* Direct call parser_prod#AMinusMethid#n_minus= on <self:AMinusMethid>*/
9466 }
9467 goto RET_LABEL;
9468 } else {
9469 }
9470 RET_LABEL:;
9471 }
9472 /* method parser_prod#AMinusMethid#n_minus= for (self: AMinusMethid, TMinus) */
9473 void nit__parser_prod___AMinusMethid___n_minus_61d(val* self, val* p0) {
9474 val* var_node /* var node: TMinus */;
9475 var_node = p0;
9476 self->attrs[COLOR_nit__parser_nodes__AMinusMethid___n_minus].val = var_node; /* _n_minus on <self:AMinusMethid> */
9477 {
9478 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TMinus> */
9479 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TMinus> */
9480 RET_LABEL1:(void)0;
9481 }
9482 }
9483 RET_LABEL:;
9484 }
9485 /* method parser_prod#AMinusMethid#visit_all for (self: AMinusMethid, Visitor) */
9486 void nit__parser_prod___AMinusMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9487 val* var_v /* var v: Visitor */;
9488 val* var /* : TMinus */;
9489 var_v = p0;
9490 var = self->attrs[COLOR_nit__parser_nodes__AMinusMethid___n_minus].val; /* _n_minus on <self:AMinusMethid> */
9491 if (unlikely(var == NULL)) {
9492 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_minus");
9493 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1374);
9494 show_backtrace(1);
9495 }
9496 {
9497 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9498 }
9499 RET_LABEL:;
9500 }
9501 /* method parser_prod#AStarMethid#init_astarmethid for (self: AStarMethid, nullable TStar) */
9502 void nit__parser_prod___AStarMethid___init_astarmethid(val* self, val* p0) {
9503 val* var_n_star /* var n_star: nullable TStar */;
9504 var_n_star = p0;
9505 if (unlikely(var_n_star == NULL)) {
9506 PRINT_ERROR("Runtime error: %s", "Cast failed");
9507 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1382);
9508 show_backtrace(1);
9509 }
9510 self->attrs[COLOR_nit__parser_nodes__AStarMethid___n_star].val = var_n_star; /* _n_star on <self:AStarMethid> */
9511 if (var_n_star == NULL) {
9512 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9513 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1383);
9514 show_backtrace(1);
9515 } else {
9516 { /* Inline parser_nodes#ANode#parent= (var_n_star,self) on <var_n_star:nullable TStar> */
9517 if (unlikely(var_n_star == NULL)) {
9518 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9519 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9520 show_backtrace(1);
9521 }
9522 var_n_star->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_star:nullable TStar> */
9523 RET_LABEL1:(void)0;
9524 }
9525 }
9526 RET_LABEL:;
9527 }
9528 /* method parser_prod#AStarMethid#replace_child for (self: AStarMethid, ANode, nullable ANode) */
9529 void nit__parser_prod___AStarMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9530 val* var_old_child /* var old_child: ANode */;
9531 val* var_new_child /* var new_child: nullable ANode */;
9532 val* var /* : TStar */;
9533 short int var1 /* : Bool */;
9534 val* var_other /* var other: nullable Object */;
9535 short int var3 /* : Bool */;
9536 short int var5 /* : Bool */;
9537 short int var6 /* : Bool */;
9538 int cltype;
9539 int idtype;
9540 const char* var_class_name;
9541 var_old_child = p0;
9542 var_new_child = p1;
9543 var = self->attrs[COLOR_nit__parser_nodes__AStarMethid___n_star].val; /* _n_star on <self:AStarMethid> */
9544 if (unlikely(var == NULL)) {
9545 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_star");
9546 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1388);
9547 show_backtrace(1);
9548 }
9549 {
9550 { /* Inline kernel#Object#== (var,var_old_child) on <var:TStar> */
9551 var_other = var_old_child;
9552 {
9553 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TStar> */
9554 var5 = var == var_other;
9555 var3 = var5;
9556 goto RET_LABEL4;
9557 RET_LABEL4:(void)0;
9558 }
9559 }
9560 var1 = var3;
9561 goto RET_LABEL2;
9562 RET_LABEL2:(void)0;
9563 }
9564 }
9565 if (var1){
9566 /* <var_new_child:nullable ANode> isa TStar */
9567 cltype = type_nit__TStar.color;
9568 idtype = type_nit__TStar.id;
9569 if(var_new_child == NULL) {
9570 var6 = 0;
9571 } else {
9572 if(cltype >= var_new_child->type->table_size) {
9573 var6 = 0;
9574 } else {
9575 var6 = var_new_child->type->type_table[cltype] == idtype;
9576 }
9577 }
9578 if (unlikely(!var6)) {
9579 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9580 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TStar", var_class_name);
9581 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1389);
9582 show_backtrace(1);
9583 }
9584 {
9585 nit__parser_prod___AStarMethid___n_star_61d(self, var_new_child); /* Direct call parser_prod#AStarMethid#n_star= on <self:AStarMethid>*/
9586 }
9587 goto RET_LABEL;
9588 } else {
9589 }
9590 RET_LABEL:;
9591 }
9592 /* method parser_prod#AStarMethid#n_star= for (self: AStarMethid, TStar) */
9593 void nit__parser_prod___AStarMethid___n_star_61d(val* self, val* p0) {
9594 val* var_node /* var node: TStar */;
9595 var_node = p0;
9596 self->attrs[COLOR_nit__parser_nodes__AStarMethid___n_star].val = var_node; /* _n_star on <self:AStarMethid> */
9597 {
9598 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TStar> */
9599 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TStar> */
9600 RET_LABEL1:(void)0;
9601 }
9602 }
9603 RET_LABEL:;
9604 }
9605 /* method parser_prod#AStarMethid#visit_all for (self: AStarMethid, Visitor) */
9606 void nit__parser_prod___AStarMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9607 val* var_v /* var v: Visitor */;
9608 val* var /* : TStar */;
9609 var_v = p0;
9610 var = self->attrs[COLOR_nit__parser_nodes__AStarMethid___n_star].val; /* _n_star on <self:AStarMethid> */
9611 if (unlikely(var == NULL)) {
9612 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_star");
9613 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1403);
9614 show_backtrace(1);
9615 }
9616 {
9617 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9618 }
9619 RET_LABEL:;
9620 }
9621 /* method parser_prod#AStarstarMethid#init_astarstarmethid for (self: AStarstarMethid, nullable TStarstar) */
9622 void nit__parser_prod___AStarstarMethid___init_astarstarmethid(val* self, val* p0) {
9623 val* var_n_starstar /* var n_starstar: nullable TStarstar */;
9624 var_n_starstar = p0;
9625 if (unlikely(var_n_starstar == NULL)) {
9626 PRINT_ERROR("Runtime error: %s", "Cast failed");
9627 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1411);
9628 show_backtrace(1);
9629 }
9630 self->attrs[COLOR_nit__parser_nodes__AStarstarMethid___n_starstar].val = var_n_starstar; /* _n_starstar on <self:AStarstarMethid> */
9631 if (var_n_starstar == NULL) {
9632 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9633 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1412);
9634 show_backtrace(1);
9635 } else {
9636 { /* Inline parser_nodes#ANode#parent= (var_n_starstar,self) on <var_n_starstar:nullable TStarstar> */
9637 if (unlikely(var_n_starstar == NULL)) {
9638 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9639 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9640 show_backtrace(1);
9641 }
9642 var_n_starstar->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_starstar:nullable TStarstar> */
9643 RET_LABEL1:(void)0;
9644 }
9645 }
9646 RET_LABEL:;
9647 }
9648 /* method parser_prod#AStarstarMethid#replace_child for (self: AStarstarMethid, ANode, nullable ANode) */
9649 void nit__parser_prod___AStarstarMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9650 val* var_old_child /* var old_child: ANode */;
9651 val* var_new_child /* var new_child: nullable ANode */;
9652 val* var /* : TStarstar */;
9653 short int var1 /* : Bool */;
9654 val* var_other /* var other: nullable Object */;
9655 short int var3 /* : Bool */;
9656 short int var5 /* : Bool */;
9657 short int var6 /* : Bool */;
9658 int cltype;
9659 int idtype;
9660 const char* var_class_name;
9661 var_old_child = p0;
9662 var_new_child = p1;
9663 var = self->attrs[COLOR_nit__parser_nodes__AStarstarMethid___n_starstar].val; /* _n_starstar on <self:AStarstarMethid> */
9664 if (unlikely(var == NULL)) {
9665 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_starstar");
9666 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1417);
9667 show_backtrace(1);
9668 }
9669 {
9670 { /* Inline kernel#Object#== (var,var_old_child) on <var:TStarstar> */
9671 var_other = var_old_child;
9672 {
9673 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TStarstar> */
9674 var5 = var == var_other;
9675 var3 = var5;
9676 goto RET_LABEL4;
9677 RET_LABEL4:(void)0;
9678 }
9679 }
9680 var1 = var3;
9681 goto RET_LABEL2;
9682 RET_LABEL2:(void)0;
9683 }
9684 }
9685 if (var1){
9686 /* <var_new_child:nullable ANode> isa TStarstar */
9687 cltype = type_nit__TStarstar.color;
9688 idtype = type_nit__TStarstar.id;
9689 if(var_new_child == NULL) {
9690 var6 = 0;
9691 } else {
9692 if(cltype >= var_new_child->type->table_size) {
9693 var6 = 0;
9694 } else {
9695 var6 = var_new_child->type->type_table[cltype] == idtype;
9696 }
9697 }
9698 if (unlikely(!var6)) {
9699 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9700 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TStarstar", var_class_name);
9701 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1418);
9702 show_backtrace(1);
9703 }
9704 {
9705 nit__parser_prod___AStarstarMethid___n_starstar_61d(self, var_new_child); /* Direct call parser_prod#AStarstarMethid#n_starstar= on <self:AStarstarMethid>*/
9706 }
9707 goto RET_LABEL;
9708 } else {
9709 }
9710 RET_LABEL:;
9711 }
9712 /* method parser_prod#AStarstarMethid#n_starstar= for (self: AStarstarMethid, TStarstar) */
9713 void nit__parser_prod___AStarstarMethid___n_starstar_61d(val* self, val* p0) {
9714 val* var_node /* var node: TStarstar */;
9715 var_node = p0;
9716 self->attrs[COLOR_nit__parser_nodes__AStarstarMethid___n_starstar].val = var_node; /* _n_starstar on <self:AStarstarMethid> */
9717 {
9718 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TStarstar> */
9719 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TStarstar> */
9720 RET_LABEL1:(void)0;
9721 }
9722 }
9723 RET_LABEL:;
9724 }
9725 /* method parser_prod#AStarstarMethid#visit_all for (self: AStarstarMethid, Visitor) */
9726 void nit__parser_prod___AStarstarMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9727 val* var_v /* var v: Visitor */;
9728 val* var /* : TStarstar */;
9729 var_v = p0;
9730 var = self->attrs[COLOR_nit__parser_nodes__AStarstarMethid___n_starstar].val; /* _n_starstar on <self:AStarstarMethid> */
9731 if (unlikely(var == NULL)) {
9732 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_starstar");
9733 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1432);
9734 show_backtrace(1);
9735 }
9736 {
9737 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9738 }
9739 RET_LABEL:;
9740 }
9741 /* method parser_prod#ASlashMethid#init_aslashmethid for (self: ASlashMethid, nullable TSlash) */
9742 void nit__parser_prod___ASlashMethid___init_aslashmethid(val* self, val* p0) {
9743 val* var_n_slash /* var n_slash: nullable TSlash */;
9744 var_n_slash = p0;
9745 if (unlikely(var_n_slash == NULL)) {
9746 PRINT_ERROR("Runtime error: %s", "Cast failed");
9747 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1440);
9748 show_backtrace(1);
9749 }
9750 self->attrs[COLOR_nit__parser_nodes__ASlashMethid___n_slash].val = var_n_slash; /* _n_slash on <self:ASlashMethid> */
9751 if (var_n_slash == NULL) {
9752 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9753 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1441);
9754 show_backtrace(1);
9755 } else {
9756 { /* Inline parser_nodes#ANode#parent= (var_n_slash,self) on <var_n_slash:nullable TSlash> */
9757 if (unlikely(var_n_slash == NULL)) {
9758 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9759 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9760 show_backtrace(1);
9761 }
9762 var_n_slash->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_slash:nullable TSlash> */
9763 RET_LABEL1:(void)0;
9764 }
9765 }
9766 RET_LABEL:;
9767 }
9768 /* method parser_prod#ASlashMethid#replace_child for (self: ASlashMethid, ANode, nullable ANode) */
9769 void nit__parser_prod___ASlashMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9770 val* var_old_child /* var old_child: ANode */;
9771 val* var_new_child /* var new_child: nullable ANode */;
9772 val* var /* : TSlash */;
9773 short int var1 /* : Bool */;
9774 val* var_other /* var other: nullable Object */;
9775 short int var3 /* : Bool */;
9776 short int var5 /* : Bool */;
9777 short int var6 /* : Bool */;
9778 int cltype;
9779 int idtype;
9780 const char* var_class_name;
9781 var_old_child = p0;
9782 var_new_child = p1;
9783 var = self->attrs[COLOR_nit__parser_nodes__ASlashMethid___n_slash].val; /* _n_slash on <self:ASlashMethid> */
9784 if (unlikely(var == NULL)) {
9785 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_slash");
9786 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1446);
9787 show_backtrace(1);
9788 }
9789 {
9790 { /* Inline kernel#Object#== (var,var_old_child) on <var:TSlash> */
9791 var_other = var_old_child;
9792 {
9793 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TSlash> */
9794 var5 = var == var_other;
9795 var3 = var5;
9796 goto RET_LABEL4;
9797 RET_LABEL4:(void)0;
9798 }
9799 }
9800 var1 = var3;
9801 goto RET_LABEL2;
9802 RET_LABEL2:(void)0;
9803 }
9804 }
9805 if (var1){
9806 /* <var_new_child:nullable ANode> isa TSlash */
9807 cltype = type_nit__TSlash.color;
9808 idtype = type_nit__TSlash.id;
9809 if(var_new_child == NULL) {
9810 var6 = 0;
9811 } else {
9812 if(cltype >= var_new_child->type->table_size) {
9813 var6 = 0;
9814 } else {
9815 var6 = var_new_child->type->type_table[cltype] == idtype;
9816 }
9817 }
9818 if (unlikely(!var6)) {
9819 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9820 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TSlash", var_class_name);
9821 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1447);
9822 show_backtrace(1);
9823 }
9824 {
9825 nit__parser_prod___ASlashMethid___n_slash_61d(self, var_new_child); /* Direct call parser_prod#ASlashMethid#n_slash= on <self:ASlashMethid>*/
9826 }
9827 goto RET_LABEL;
9828 } else {
9829 }
9830 RET_LABEL:;
9831 }
9832 /* method parser_prod#ASlashMethid#n_slash= for (self: ASlashMethid, TSlash) */
9833 void nit__parser_prod___ASlashMethid___n_slash_61d(val* self, val* p0) {
9834 val* var_node /* var node: TSlash */;
9835 var_node = p0;
9836 self->attrs[COLOR_nit__parser_nodes__ASlashMethid___n_slash].val = var_node; /* _n_slash on <self:ASlashMethid> */
9837 {
9838 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TSlash> */
9839 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TSlash> */
9840 RET_LABEL1:(void)0;
9841 }
9842 }
9843 RET_LABEL:;
9844 }
9845 /* method parser_prod#ASlashMethid#visit_all for (self: ASlashMethid, Visitor) */
9846 void nit__parser_prod___ASlashMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9847 val* var_v /* var v: Visitor */;
9848 val* var /* : TSlash */;
9849 var_v = p0;
9850 var = self->attrs[COLOR_nit__parser_nodes__ASlashMethid___n_slash].val; /* _n_slash on <self:ASlashMethid> */
9851 if (unlikely(var == NULL)) {
9852 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_slash");
9853 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1461);
9854 show_backtrace(1);
9855 }
9856 {
9857 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9858 }
9859 RET_LABEL:;
9860 }
9861 /* method parser_prod#APercentMethid#init_apercentmethid for (self: APercentMethid, nullable TPercent) */
9862 void nit__parser_prod___APercentMethid___init_apercentmethid(val* self, val* p0) {
9863 val* var_n_percent /* var n_percent: nullable TPercent */;
9864 var_n_percent = p0;
9865 if (unlikely(var_n_percent == NULL)) {
9866 PRINT_ERROR("Runtime error: %s", "Cast failed");
9867 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1469);
9868 show_backtrace(1);
9869 }
9870 self->attrs[COLOR_nit__parser_nodes__APercentMethid___n_percent].val = var_n_percent; /* _n_percent on <self:APercentMethid> */
9871 if (var_n_percent == NULL) {
9872 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9873 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1470);
9874 show_backtrace(1);
9875 } else {
9876 { /* Inline parser_nodes#ANode#parent= (var_n_percent,self) on <var_n_percent:nullable TPercent> */
9877 if (unlikely(var_n_percent == NULL)) {
9878 PRINT_ERROR("Runtime error: %s", "Receiver is null");
9879 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes, 36);
9880 show_backtrace(1);
9881 }
9882 var_n_percent->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_n_percent:nullable TPercent> */
9883 RET_LABEL1:(void)0;
9884 }
9885 }
9886 RET_LABEL:;
9887 }
9888 /* method parser_prod#APercentMethid#replace_child for (self: APercentMethid, ANode, nullable ANode) */
9889 void nit__parser_prod___APercentMethid___nit__parser_nodes__ANode__replace_child(val* self, val* p0, val* p1) {
9890 val* var_old_child /* var old_child: ANode */;
9891 val* var_new_child /* var new_child: nullable ANode */;
9892 val* var /* : TPercent */;
9893 short int var1 /* : Bool */;
9894 val* var_other /* var other: nullable Object */;
9895 short int var3 /* : Bool */;
9896 short int var5 /* : Bool */;
9897 short int var6 /* : Bool */;
9898 int cltype;
9899 int idtype;
9900 const char* var_class_name;
9901 var_old_child = p0;
9902 var_new_child = p1;
9903 var = self->attrs[COLOR_nit__parser_nodes__APercentMethid___n_percent].val; /* _n_percent on <self:APercentMethid> */
9904 if (unlikely(var == NULL)) {
9905 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_percent");
9906 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1475);
9907 show_backtrace(1);
9908 }
9909 {
9910 { /* Inline kernel#Object#== (var,var_old_child) on <var:TPercent> */
9911 var_other = var_old_child;
9912 {
9913 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TPercent> */
9914 var5 = var == var_other;
9915 var3 = var5;
9916 goto RET_LABEL4;
9917 RET_LABEL4:(void)0;
9918 }
9919 }
9920 var1 = var3;
9921 goto RET_LABEL2;
9922 RET_LABEL2:(void)0;
9923 }
9924 }
9925 if (var1){
9926 /* <var_new_child:nullable ANode> isa TPercent */
9927 cltype = type_nit__TPercent.color;
9928 idtype = type_nit__TPercent.id;
9929 if(var_new_child == NULL) {
9930 var6 = 0;
9931 } else {
9932 if(cltype >= var_new_child->type->table_size) {
9933 var6 = 0;
9934 } else {
9935 var6 = var_new_child->type->type_table[cltype] == idtype;
9936 }
9937 }
9938 if (unlikely(!var6)) {
9939 var_class_name = var_new_child == NULL ? "null" : var_new_child->type->name;
9940 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TPercent", var_class_name);
9941 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1476);
9942 show_backtrace(1);
9943 }
9944 {
9945 nit__parser_prod___APercentMethid___n_percent_61d(self, var_new_child); /* Direct call parser_prod#APercentMethid#n_percent= on <self:APercentMethid>*/
9946 }
9947 goto RET_LABEL;
9948 } else {
9949 }
9950 RET_LABEL:;
9951 }
9952 /* method parser_prod#APercentMethid#n_percent= for (self: APercentMethid, TPercent) */
9953 void nit__parser_prod___APercentMethid___n_percent_61d(val* self, val* p0) {
9954 val* var_node /* var node: TPercent */;
9955 var_node = p0;
9956 self->attrs[COLOR_nit__parser_nodes__APercentMethid___n_percent].val = var_node; /* _n_percent on <self:APercentMethid> */
9957 {
9958 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TPercent> */
9959 var_node->attrs[COLOR_nit__parser_nodes__ANode___parent].val = self; /* _parent on <var_node:TPercent> */
9960 RET_LABEL1:(void)0;
9961 }
9962 }
9963 RET_LABEL:;
9964 }
9965 /* method parser_prod#APercentMethid#visit_all for (self: APercentMethid, Visitor) */
9966 void nit__parser_prod___APercentMethid___nit__parser_nodes__ANode__visit_all(val* self, val* p0) {
9967 val* var_v /* var v: Visitor */;
9968 val* var /* : TPercent */;
9969 var_v = p0;
9970 var = self->attrs[COLOR_nit__parser_nodes__APercentMethid___n_percent].val; /* _n_percent on <self:APercentMethid> */
9971 if (unlikely(var == NULL)) {
9972 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_percent");
9973 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod, 1490);
9974 show_backtrace(1);
9975 }
9976 {
9977 nit___nit__Visitor___enter_visit(var_v, var); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
9978 }
9979 RET_LABEL:;
9980 }