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