1 #include "nit__parser_prod.sep.0.h"
2 /* method parser_prod#ACastAsExternCall#replace_child for (self: ACastAsExternCall, ANode, nullable ANode) */
3 void nit__parser_prod___ACastAsExternCall___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
4 val
* var_old_child
/* var old_child: ANode */;
5 val
* var_new_child
/* var new_child: nullable ANode */;
6 val
* var
/* : AType */;
7 short int var1
/* : Bool */;
8 val
* var_other
/* var other: nullable Object */;
9 short int var3
/* : Bool */;
10 short int var5
/* : Bool */;
11 short int var6
/* : Bool */;
14 const char* var_class_name
;
15 val
* var7
/* : nullable TDot */;
16 short int var8
/* : Bool */;
17 short int var9
/* : Bool */;
18 short int var11
/* : Bool */;
19 short int var13
/* : Bool */;
20 short int var14
/* : Bool */;
23 const char* var_class_name17
;
24 val
* var18
/* : TKwas */;
25 short int var19
/* : Bool */;
26 short int var21
/* : Bool */;
27 short int var23
/* : Bool */;
28 short int var24
/* : Bool */;
31 const char* var_class_name27
;
32 val
* var28
/* : AType */;
33 short int var29
/* : Bool */;
34 short int var31
/* : Bool */;
35 short int var33
/* : Bool */;
36 short int var34
/* : Bool */;
39 const char* var_class_name37
;
42 var
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_from_type
].val
; /* _n_from_type on <self:ACastAsExternCall> */
43 if (unlikely(var
== NULL
)) {
44 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_from_type");
45 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6592);
49 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
50 var_other
= var_old_child
;
52 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
53 var5
= var
== var_other
;
65 /* <var_new_child:nullable ANode> isa AType */
66 cltype
= type_nit__AType
.color
;
67 idtype
= type_nit__AType
.id
;
68 if(var_new_child
== NULL
) {
71 if(cltype
>= var_new_child
->type
->table_size
) {
74 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
77 if (unlikely(!var6
)) {
78 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
79 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name
);
80 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6593);
84 nit__parser_prod___ACastAsExternCall___n_from_type_61d(self
, var_new_child
); /* Direct call parser_prod#ACastAsExternCall#n_from_type= on <self:ACastAsExternCall>*/
89 var7
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_dot
].val
; /* _n_dot on <self:ACastAsExternCall> */
91 var8
= 0; /* <var_old_child:ANode> cannot be null */
93 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:nullable TDot> */
94 var_other
= var_old_child
;
96 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:nullable TDot(TDot)> */
97 var13
= var7
== var_other
;
110 /* <var_new_child:nullable ANode> isa nullable TDot */
111 cltype15
= type_nullable__nit__TDot
.color
;
112 idtype16
= type_nullable__nit__TDot
.id
;
113 if(var_new_child
== NULL
) {
116 if(cltype15
>= var_new_child
->type
->table_size
) {
119 var14
= var_new_child
->type
->type_table
[cltype15
] == idtype16
;
122 if (unlikely(!var14
)) {
123 var_class_name17
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
124 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TDot", var_class_name17
);
125 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6597);
129 nit__parser_prod___ACastAsExternCall___n_dot_61d(self
, var_new_child
); /* Direct call parser_prod#ACastAsExternCall#n_dot= on <self:ACastAsExternCall>*/
134 var18
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_kwas
].val
; /* _n_kwas on <self:ACastAsExternCall> */
135 if (unlikely(var18
== NULL
)) {
136 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
137 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6600);
141 { /* Inline kernel#Object#== (var18,var_old_child) on <var18:TKwas> */
142 var_other
= var_old_child
;
144 { /* Inline kernel#Object#is_same_instance (var18,var_other) on <var18:TKwas> */
145 var23
= var18
== var_other
;
157 /* <var_new_child:nullable ANode> isa TKwas */
158 cltype25
= type_nit__TKwas
.color
;
159 idtype26
= type_nit__TKwas
.id
;
160 if(var_new_child
== NULL
) {
163 if(cltype25
>= var_new_child
->type
->table_size
) {
166 var24
= var_new_child
->type
->type_table
[cltype25
] == idtype26
;
169 if (unlikely(!var24
)) {
170 var_class_name27
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
171 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwas", var_class_name27
);
172 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6601);
176 nit__parser_prod___ACastAsExternCall___n_kwas_61d(self
, var_new_child
); /* Direct call parser_prod#ACastAsExternCall#n_kwas= on <self:ACastAsExternCall>*/
181 var28
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_to_type
].val
; /* _n_to_type on <self:ACastAsExternCall> */
182 if (unlikely(var28
== NULL
)) {
183 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_to_type");
184 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6604);
188 { /* Inline kernel#Object#== (var28,var_old_child) on <var28:AType> */
189 var_other
= var_old_child
;
191 { /* Inline kernel#Object#is_same_instance (var28,var_other) on <var28:AType> */
192 var33
= var28
== var_other
;
204 /* <var_new_child:nullable ANode> isa AType */
205 cltype35
= type_nit__AType
.color
;
206 idtype36
= type_nit__AType
.id
;
207 if(var_new_child
== NULL
) {
210 if(cltype35
>= var_new_child
->type
->table_size
) {
213 var34
= var_new_child
->type
->type_table
[cltype35
] == idtype36
;
216 if (unlikely(!var34
)) {
217 var_class_name37
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
218 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name37
);
219 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6605);
223 nit__parser_prod___ACastAsExternCall___n_to_type_61d(self
, var_new_child
); /* Direct call parser_prod#ACastAsExternCall#n_to_type= on <self:ACastAsExternCall>*/
230 /* method parser_prod#ACastAsExternCall#n_from_type= for (self: ACastAsExternCall, AType) */
231 void nit__parser_prod___ACastAsExternCall___n_from_type_61d(val
* self
, val
* p0
) {
232 val
* var_node
/* var node: AType */;
234 self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_from_type
].val
= var_node
; /* _n_from_type on <self:ACastAsExternCall> */
236 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
237 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:AType> */
243 /* method parser_prod#ACastAsExternCall#n_dot= for (self: ACastAsExternCall, nullable TDot) */
244 void nit__parser_prod___ACastAsExternCall___n_dot_61d(val
* self
, val
* p0
) {
245 val
* var_node
/* var node: nullable TDot */;
246 val
* var
/* : null */;
247 short int var1
/* : Bool */;
248 short int var2
/* : Bool */;
249 val
* var_other
/* var other: nullable Object */;
250 short int var4
/* : Bool */;
251 short int var5
/* : Bool */;
253 self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_dot
].val
= var_node
; /* _n_dot on <self:ACastAsExternCall> */
255 if (var_node
== NULL
) {
256 var1
= 0; /* is null */
258 var1
= 1; /* arg is null and recv is not */
261 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TDot> */
264 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TDot(TDot)>*/;
275 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TDot(TDot)> */
276 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TDot(TDot)> */
284 /* method parser_prod#ACastAsExternCall#n_kwas= for (self: ACastAsExternCall, TKwas) */
285 void nit__parser_prod___ACastAsExternCall___n_kwas_61d(val
* self
, val
* p0
) {
286 val
* var_node
/* var node: TKwas */;
288 self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_kwas
].val
= var_node
; /* _n_kwas on <self:ACastAsExternCall> */
290 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
291 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwas> */
297 /* method parser_prod#ACastAsExternCall#n_to_type= for (self: ACastAsExternCall, AType) */
298 void nit__parser_prod___ACastAsExternCall___n_to_type_61d(val
* self
, val
* p0
) {
299 val
* var_node
/* var node: AType */;
301 self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_to_type
].val
= var_node
; /* _n_to_type on <self:ACastAsExternCall> */
303 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
304 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:AType> */
310 /* method parser_prod#ACastAsExternCall#visit_all for (self: ACastAsExternCall, Visitor) */
311 void nit__parser_prod___ACastAsExternCall___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
312 val
* var_v
/* var v: Visitor */;
313 val
* var
/* : AType */;
314 val
* var1
/* : nullable TDot */;
315 val
* var2
/* : TKwas */;
316 val
* var3
/* : AType */;
318 var
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_from_type
].val
; /* _n_from_type on <self:ACastAsExternCall> */
319 if (unlikely(var
== NULL
)) {
320 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_from_type");
321 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6634);
325 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
327 var1
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_dot
].val
; /* _n_dot on <self:ACastAsExternCall> */
329 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
331 var2
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_kwas
].val
; /* _n_kwas on <self:ACastAsExternCall> */
332 if (unlikely(var2
== NULL
)) {
333 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
334 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6636);
338 nit___nit__Visitor___enter_visit(var_v
, var2
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
340 var3
= self
->attrs
[COLOR_nit__parser_nodes__ACastAsExternCall___n_to_type
].val
; /* _n_to_type on <self:ACastAsExternCall> */
341 if (unlikely(var3
== NULL
)) {
342 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_to_type");
343 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6637);
347 nit___nit__Visitor___enter_visit(var_v
, var3
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
351 /* method parser_prod#AAsNullableExternCall#init_aasnullableexterncall for (self: AAsNullableExternCall, nullable AType, nullable TKwas, nullable TKwnullable) */
352 void nit__parser_prod___AAsNullableExternCall___init_aasnullableexterncall(val
* self
, val
* p0
, val
* p1
, val
* p2
) {
353 val
* var_n_type
/* var n_type: nullable AType */;
354 val
* var_n_kwas
/* var n_kwas: nullable TKwas */;
355 val
* var_n_kwnullable
/* var n_kwnullable: nullable TKwnullable */;
358 var_n_kwnullable
= p2
;
359 if (unlikely(var_n_type
== NULL
)) {
360 PRINT_ERROR("Runtime error: %s", "Cast failed");
361 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6647);
364 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_type
].val
= var_n_type
; /* _n_type on <self:AAsNullableExternCall> */
365 if (var_n_type
== NULL
) {
366 PRINT_ERROR("Runtime error: %s", "Receiver is null");
367 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6648);
370 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
371 if (unlikely(var_n_type
== NULL
)) {
372 PRINT_ERROR("Runtime error: %s", "Receiver is null");
373 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
376 var_n_type
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_type:nullable AType> */
380 if (unlikely(var_n_kwas
== NULL
)) {
381 PRINT_ERROR("Runtime error: %s", "Cast failed");
382 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6649);
385 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwas
].val
= var_n_kwas
; /* _n_kwas on <self:AAsNullableExternCall> */
386 if (var_n_kwas
== NULL
) {
387 PRINT_ERROR("Runtime error: %s", "Receiver is null");
388 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6650);
391 { /* Inline parser_nodes#ANode#parent= (var_n_kwas,self) on <var_n_kwas:nullable TKwas> */
392 if (unlikely(var_n_kwas
== NULL
)) {
393 PRINT_ERROR("Runtime error: %s", "Receiver is null");
394 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
397 var_n_kwas
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwas:nullable TKwas> */
401 if (unlikely(var_n_kwnullable
== NULL
)) {
402 PRINT_ERROR("Runtime error: %s", "Cast failed");
403 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6651);
406 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwnullable
].val
= var_n_kwnullable
; /* _n_kwnullable on <self:AAsNullableExternCall> */
407 if (var_n_kwnullable
== NULL
) {
408 PRINT_ERROR("Runtime error: %s", "Receiver is null");
409 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6652);
412 { /* Inline parser_nodes#ANode#parent= (var_n_kwnullable,self) on <var_n_kwnullable:nullable TKwnullable> */
413 if (unlikely(var_n_kwnullable
== NULL
)) {
414 PRINT_ERROR("Runtime error: %s", "Receiver is null");
415 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
418 var_n_kwnullable
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwnullable:nullable TKwnullable> */
424 /* method parser_prod#AAsNullableExternCall#replace_child for (self: AAsNullableExternCall, ANode, nullable ANode) */
425 void nit__parser_prod___AAsNullableExternCall___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
426 val
* var_old_child
/* var old_child: ANode */;
427 val
* var_new_child
/* var new_child: nullable ANode */;
428 val
* var
/* : AType */;
429 short int var1
/* : Bool */;
430 val
* var_other
/* var other: nullable Object */;
431 short int var3
/* : Bool */;
432 short int var5
/* : Bool */;
433 short int var6
/* : Bool */;
436 const char* var_class_name
;
437 val
* var7
/* : TKwas */;
438 short int var8
/* : Bool */;
439 short int var10
/* : Bool */;
440 short int var12
/* : Bool */;
441 short int var13
/* : Bool */;
444 const char* var_class_name16
;
445 val
* var17
/* : TKwnullable */;
446 short int var18
/* : Bool */;
447 short int var20
/* : Bool */;
448 short int var22
/* : Bool */;
449 short int var23
/* : Bool */;
452 const char* var_class_name26
;
455 var
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_type
].val
; /* _n_type on <self:AAsNullableExternCall> */
456 if (unlikely(var
== NULL
)) {
457 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
458 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6657);
462 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
463 var_other
= var_old_child
;
465 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
466 var5
= var
== var_other
;
478 /* <var_new_child:nullable ANode> isa AType */
479 cltype
= type_nit__AType
.color
;
480 idtype
= type_nit__AType
.id
;
481 if(var_new_child
== NULL
) {
484 if(cltype
>= var_new_child
->type
->table_size
) {
487 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
490 if (unlikely(!var6
)) {
491 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
492 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name
);
493 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6658);
497 nit__parser_prod___AAsNullableExternCall___n_type_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNullableExternCall#n_type= on <self:AAsNullableExternCall>*/
502 var7
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwas
].val
; /* _n_kwas on <self:AAsNullableExternCall> */
503 if (unlikely(var7
== NULL
)) {
504 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
505 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6661);
509 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TKwas> */
510 var_other
= var_old_child
;
512 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TKwas> */
513 var12
= var7
== var_other
;
525 /* <var_new_child:nullable ANode> isa TKwas */
526 cltype14
= type_nit__TKwas
.color
;
527 idtype15
= type_nit__TKwas
.id
;
528 if(var_new_child
== NULL
) {
531 if(cltype14
>= var_new_child
->type
->table_size
) {
534 var13
= var_new_child
->type
->type_table
[cltype14
] == idtype15
;
537 if (unlikely(!var13
)) {
538 var_class_name16
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
539 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwas", var_class_name16
);
540 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6662);
544 nit__parser_prod___AAsNullableExternCall___n_kwas_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNullableExternCall#n_kwas= on <self:AAsNullableExternCall>*/
549 var17
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwnullable
].val
; /* _n_kwnullable on <self:AAsNullableExternCall> */
550 if (unlikely(var17
== NULL
)) {
551 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
552 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6665);
556 { /* Inline kernel#Object#== (var17,var_old_child) on <var17:TKwnullable> */
557 var_other
= var_old_child
;
559 { /* Inline kernel#Object#is_same_instance (var17,var_other) on <var17:TKwnullable> */
560 var22
= var17
== var_other
;
572 /* <var_new_child:nullable ANode> isa TKwnullable */
573 cltype24
= type_nit__TKwnullable
.color
;
574 idtype25
= type_nit__TKwnullable
.id
;
575 if(var_new_child
== NULL
) {
578 if(cltype24
>= var_new_child
->type
->table_size
) {
581 var23
= var_new_child
->type
->type_table
[cltype24
] == idtype25
;
584 if (unlikely(!var23
)) {
585 var_class_name26
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
586 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnullable", var_class_name26
);
587 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6666);
591 nit__parser_prod___AAsNullableExternCall___n_kwnullable_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNullableExternCall#n_kwnullable= on <self:AAsNullableExternCall>*/
598 /* method parser_prod#AAsNullableExternCall#n_type= for (self: AAsNullableExternCall, AType) */
599 void nit__parser_prod___AAsNullableExternCall___n_type_61d(val
* self
, val
* p0
) {
600 val
* var_node
/* var node: AType */;
602 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_type
].val
= var_node
; /* _n_type on <self:AAsNullableExternCall> */
604 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
605 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:AType> */
611 /* method parser_prod#AAsNullableExternCall#n_kwas= for (self: AAsNullableExternCall, TKwas) */
612 void nit__parser_prod___AAsNullableExternCall___n_kwas_61d(val
* self
, val
* p0
) {
613 val
* var_node
/* var node: TKwas */;
615 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwas
].val
= var_node
; /* _n_kwas on <self:AAsNullableExternCall> */
617 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
618 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwas> */
624 /* method parser_prod#AAsNullableExternCall#n_kwnullable= for (self: AAsNullableExternCall, TKwnullable) */
625 void nit__parser_prod___AAsNullableExternCall___n_kwnullable_61d(val
* self
, val
* p0
) {
626 val
* var_node
/* var node: TKwnullable */;
628 self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwnullable
].val
= var_node
; /* _n_kwnullable on <self:AAsNullableExternCall> */
630 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnullable> */
631 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwnullable> */
637 /* method parser_prod#AAsNullableExternCall#visit_all for (self: AAsNullableExternCall, Visitor) */
638 void nit__parser_prod___AAsNullableExternCall___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
639 val
* var_v
/* var v: Visitor */;
640 val
* var
/* : AType */;
641 val
* var1
/* : TKwas */;
642 val
* var2
/* : TKwnullable */;
644 var
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_type
].val
; /* _n_type on <self:AAsNullableExternCall> */
645 if (unlikely(var
== NULL
)) {
646 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
647 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6690);
651 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
653 var1
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwas
].val
; /* _n_kwas on <self:AAsNullableExternCall> */
654 if (unlikely(var1
== NULL
)) {
655 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
656 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6691);
660 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
662 var2
= self
->attrs
[COLOR_nit__parser_nodes__AAsNullableExternCall___n_kwnullable
].val
; /* _n_kwnullable on <self:AAsNullableExternCall> */
663 if (unlikely(var2
== NULL
)) {
664 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
665 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6692);
669 nit___nit__Visitor___enter_visit(var_v
, var2
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
673 /* method parser_prod#AAsNotNullableExternCall#init_aasnotnullableexterncall for (self: AAsNotNullableExternCall, nullable AType, nullable TKwas, nullable TKwnot, nullable TKwnullable) */
674 void nit__parser_prod___AAsNotNullableExternCall___init_aasnotnullableexterncall(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
675 val
* var_n_type
/* var n_type: nullable AType */;
676 val
* var_n_kwas
/* var n_kwas: nullable TKwas */;
677 val
* var_n_kwnot
/* var n_kwnot: nullable TKwnot */;
678 val
* var_n_kwnullable
/* var n_kwnullable: nullable TKwnullable */;
682 var_n_kwnullable
= p3
;
683 if (unlikely(var_n_type
== NULL
)) {
684 PRINT_ERROR("Runtime error: %s", "Cast failed");
685 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6703);
688 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_type
].val
= var_n_type
; /* _n_type on <self:AAsNotNullableExternCall> */
689 if (var_n_type
== NULL
) {
690 PRINT_ERROR("Runtime error: %s", "Receiver is null");
691 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6704);
694 { /* Inline parser_nodes#ANode#parent= (var_n_type,self) on <var_n_type:nullable AType> */
695 if (unlikely(var_n_type
== NULL
)) {
696 PRINT_ERROR("Runtime error: %s", "Receiver is null");
697 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
700 var_n_type
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_type:nullable AType> */
704 if (unlikely(var_n_kwas
== NULL
)) {
705 PRINT_ERROR("Runtime error: %s", "Cast failed");
706 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6705);
709 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwas
].val
= var_n_kwas
; /* _n_kwas on <self:AAsNotNullableExternCall> */
710 if (var_n_kwas
== NULL
) {
711 PRINT_ERROR("Runtime error: %s", "Receiver is null");
712 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6706);
715 { /* Inline parser_nodes#ANode#parent= (var_n_kwas,self) on <var_n_kwas:nullable TKwas> */
716 if (unlikely(var_n_kwas
== NULL
)) {
717 PRINT_ERROR("Runtime error: %s", "Receiver is null");
718 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
721 var_n_kwas
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwas:nullable TKwas> */
725 if (unlikely(var_n_kwnot
== NULL
)) {
726 PRINT_ERROR("Runtime error: %s", "Cast failed");
727 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6707);
730 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnot
].val
= var_n_kwnot
; /* _n_kwnot on <self:AAsNotNullableExternCall> */
731 if (var_n_kwnot
== NULL
) {
732 PRINT_ERROR("Runtime error: %s", "Receiver is null");
733 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6708);
736 { /* Inline parser_nodes#ANode#parent= (var_n_kwnot,self) on <var_n_kwnot:nullable TKwnot> */
737 if (unlikely(var_n_kwnot
== NULL
)) {
738 PRINT_ERROR("Runtime error: %s", "Receiver is null");
739 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
742 var_n_kwnot
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwnot:nullable TKwnot> */
746 if (unlikely(var_n_kwnullable
== NULL
)) {
747 PRINT_ERROR("Runtime error: %s", "Cast failed");
748 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6709);
751 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnullable
].val
= var_n_kwnullable
; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
752 if (var_n_kwnullable
== NULL
) {
753 PRINT_ERROR("Runtime error: %s", "Receiver is null");
754 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6710);
757 { /* Inline parser_nodes#ANode#parent= (var_n_kwnullable,self) on <var_n_kwnullable:nullable TKwnullable> */
758 if (unlikely(var_n_kwnullable
== NULL
)) {
759 PRINT_ERROR("Runtime error: %s", "Receiver is null");
760 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
763 var_n_kwnullable
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwnullable:nullable TKwnullable> */
769 /* method parser_prod#AAsNotNullableExternCall#replace_child for (self: AAsNotNullableExternCall, ANode, nullable ANode) */
770 void nit__parser_prod___AAsNotNullableExternCall___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
771 val
* var_old_child
/* var old_child: ANode */;
772 val
* var_new_child
/* var new_child: nullable ANode */;
773 val
* var
/* : AType */;
774 short int var1
/* : Bool */;
775 val
* var_other
/* var other: nullable Object */;
776 short int var3
/* : Bool */;
777 short int var5
/* : Bool */;
778 short int var6
/* : Bool */;
781 const char* var_class_name
;
782 val
* var7
/* : TKwas */;
783 short int var8
/* : Bool */;
784 short int var10
/* : Bool */;
785 short int var12
/* : Bool */;
786 short int var13
/* : Bool */;
789 const char* var_class_name16
;
790 val
* var17
/* : TKwnot */;
791 short int var18
/* : Bool */;
792 short int var20
/* : Bool */;
793 short int var22
/* : Bool */;
794 short int var23
/* : Bool */;
797 const char* var_class_name26
;
798 val
* var27
/* : TKwnullable */;
799 short int var28
/* : Bool */;
800 short int var30
/* : Bool */;
801 short int var32
/* : Bool */;
802 short int var33
/* : Bool */;
805 const char* var_class_name36
;
808 var
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_type
].val
; /* _n_type on <self:AAsNotNullableExternCall> */
809 if (unlikely(var
== NULL
)) {
810 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
811 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6715);
815 { /* Inline kernel#Object#== (var,var_old_child) on <var:AType> */
816 var_other
= var_old_child
;
818 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:AType> */
819 var5
= var
== var_other
;
831 /* <var_new_child:nullable ANode> isa AType */
832 cltype
= type_nit__AType
.color
;
833 idtype
= type_nit__AType
.id
;
834 if(var_new_child
== NULL
) {
837 if(cltype
>= var_new_child
->type
->table_size
) {
840 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
843 if (unlikely(!var6
)) {
844 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
845 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AType", var_class_name
);
846 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6716);
850 nit__parser_prod___AAsNotNullableExternCall___n_type_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNotNullableExternCall#n_type= on <self:AAsNotNullableExternCall>*/
855 var7
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwas
].val
; /* _n_kwas on <self:AAsNotNullableExternCall> */
856 if (unlikely(var7
== NULL
)) {
857 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
858 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6719);
862 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TKwas> */
863 var_other
= var_old_child
;
865 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TKwas> */
866 var12
= var7
== var_other
;
878 /* <var_new_child:nullable ANode> isa TKwas */
879 cltype14
= type_nit__TKwas
.color
;
880 idtype15
= type_nit__TKwas
.id
;
881 if(var_new_child
== NULL
) {
884 if(cltype14
>= var_new_child
->type
->table_size
) {
887 var13
= var_new_child
->type
->type_table
[cltype14
] == idtype15
;
890 if (unlikely(!var13
)) {
891 var_class_name16
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
892 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwas", var_class_name16
);
893 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6720);
897 nit__parser_prod___AAsNotNullableExternCall___n_kwas_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwas= on <self:AAsNotNullableExternCall>*/
902 var17
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnot
].val
; /* _n_kwnot on <self:AAsNotNullableExternCall> */
903 if (unlikely(var17
== NULL
)) {
904 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnot");
905 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6723);
909 { /* Inline kernel#Object#== (var17,var_old_child) on <var17:TKwnot> */
910 var_other
= var_old_child
;
912 { /* Inline kernel#Object#is_same_instance (var17,var_other) on <var17:TKwnot> */
913 var22
= var17
== var_other
;
925 /* <var_new_child:nullable ANode> isa TKwnot */
926 cltype24
= type_nit__TKwnot
.color
;
927 idtype25
= type_nit__TKwnot
.id
;
928 if(var_new_child
== NULL
) {
931 if(cltype24
>= var_new_child
->type
->table_size
) {
934 var23
= var_new_child
->type
->type_table
[cltype24
] == idtype25
;
937 if (unlikely(!var23
)) {
938 var_class_name26
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
939 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnot", var_class_name26
);
940 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6724);
944 nit__parser_prod___AAsNotNullableExternCall___n_kwnot_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnot= on <self:AAsNotNullableExternCall>*/
949 var27
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnullable
].val
; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
950 if (unlikely(var27
== NULL
)) {
951 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
952 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6727);
956 { /* Inline kernel#Object#== (var27,var_old_child) on <var27:TKwnullable> */
957 var_other
= var_old_child
;
959 { /* Inline kernel#Object#is_same_instance (var27,var_other) on <var27:TKwnullable> */
960 var32
= var27
== var_other
;
972 /* <var_new_child:nullable ANode> isa TKwnullable */
973 cltype34
= type_nit__TKwnullable
.color
;
974 idtype35
= type_nit__TKwnullable
.id
;
975 if(var_new_child
== NULL
) {
978 if(cltype34
>= var_new_child
->type
->table_size
) {
981 var33
= var_new_child
->type
->type_table
[cltype34
] == idtype35
;
984 if (unlikely(!var33
)) {
985 var_class_name36
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
986 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwnullable", var_class_name36
);
987 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6728);
991 nit__parser_prod___AAsNotNullableExternCall___n_kwnullable_61d(self
, var_new_child
); /* Direct call parser_prod#AAsNotNullableExternCall#n_kwnullable= on <self:AAsNotNullableExternCall>*/
998 /* method parser_prod#AAsNotNullableExternCall#n_type= for (self: AAsNotNullableExternCall, AType) */
999 void nit__parser_prod___AAsNotNullableExternCall___n_type_61d(val
* self
, val
* p0
) {
1000 val
* var_node
/* var node: AType */;
1002 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_type
].val
= var_node
; /* _n_type on <self:AAsNotNullableExternCall> */
1004 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AType> */
1005 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:AType> */
1011 /* method parser_prod#AAsNotNullableExternCall#n_kwas= for (self: AAsNotNullableExternCall, TKwas) */
1012 void nit__parser_prod___AAsNotNullableExternCall___n_kwas_61d(val
* self
, val
* p0
) {
1013 val
* var_node
/* var node: TKwas */;
1015 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwas
].val
= var_node
; /* _n_kwas on <self:AAsNotNullableExternCall> */
1017 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwas> */
1018 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwas> */
1024 /* method parser_prod#AAsNotNullableExternCall#n_kwnot= for (self: AAsNotNullableExternCall, TKwnot) */
1025 void nit__parser_prod___AAsNotNullableExternCall___n_kwnot_61d(val
* self
, val
* p0
) {
1026 val
* var_node
/* var node: TKwnot */;
1028 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnot
].val
= var_node
; /* _n_kwnot on <self:AAsNotNullableExternCall> */
1030 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnot> */
1031 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwnot> */
1037 /* method parser_prod#AAsNotNullableExternCall#n_kwnullable= for (self: AAsNotNullableExternCall, TKwnullable) */
1038 void nit__parser_prod___AAsNotNullableExternCall___n_kwnullable_61d(val
* self
, val
* p0
) {
1039 val
* var_node
/* var node: TKwnullable */;
1041 self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnullable
].val
= var_node
; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
1043 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwnullable> */
1044 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwnullable> */
1050 /* method parser_prod#AAsNotNullableExternCall#visit_all for (self: AAsNotNullableExternCall, Visitor) */
1051 void nit__parser_prod___AAsNotNullableExternCall___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
1052 val
* var_v
/* var v: Visitor */;
1053 val
* var
/* : AType */;
1054 val
* var1
/* : TKwas */;
1055 val
* var2
/* : TKwnot */;
1056 val
* var3
/* : TKwnullable */;
1058 var
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_type
].val
; /* _n_type on <self:AAsNotNullableExternCall> */
1059 if (unlikely(var
== NULL
)) {
1060 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_type");
1061 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6757);
1065 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1067 var1
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwas
].val
; /* _n_kwas on <self:AAsNotNullableExternCall> */
1068 if (unlikely(var1
== NULL
)) {
1069 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwas");
1070 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6758);
1074 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1076 var2
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnot
].val
; /* _n_kwnot on <self:AAsNotNullableExternCall> */
1077 if (unlikely(var2
== NULL
)) {
1078 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnot");
1079 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6759);
1083 nit___nit__Visitor___enter_visit(var_v
, var2
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1085 var3
= self
->attrs
[COLOR_nit__parser_nodes__AAsNotNullableExternCall___n_kwnullable
].val
; /* _n_kwnullable on <self:AAsNotNullableExternCall> */
1086 if (unlikely(var3
== NULL
)) {
1087 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwnullable");
1088 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6760);
1092 nit___nit__Visitor___enter_visit(var_v
, var3
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1096 /* method parser_prod#AInLanguage#init_ainlanguage for (self: AInLanguage, nullable TKwin, nullable TString) */
1097 void nit__parser_prod___AInLanguage___init_ainlanguage(val
* self
, val
* p0
, val
* p1
) {
1098 val
* var_n_kwin
/* var n_kwin: nullable TKwin */;
1099 val
* var_n_string
/* var n_string: nullable TString */;
1102 if (unlikely(var_n_kwin
== NULL
)) {
1103 PRINT_ERROR("Runtime error: %s", "Cast failed");
1104 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6769);
1107 self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_kwin
].val
= var_n_kwin
; /* _n_kwin on <self:AInLanguage> */
1108 if (var_n_kwin
== NULL
) {
1109 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1110 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6770);
1113 { /* Inline parser_nodes#ANode#parent= (var_n_kwin,self) on <var_n_kwin:nullable TKwin> */
1114 if (unlikely(var_n_kwin
== NULL
)) {
1115 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1116 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
1119 var_n_kwin
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwin:nullable TKwin> */
1123 if (unlikely(var_n_string
== NULL
)) {
1124 PRINT_ERROR("Runtime error: %s", "Cast failed");
1125 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6771);
1128 self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_string
].val
= var_n_string
; /* _n_string on <self:AInLanguage> */
1129 if (var_n_string
== NULL
) {
1130 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1131 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6772);
1134 { /* Inline parser_nodes#ANode#parent= (var_n_string,self) on <var_n_string:nullable TString> */
1135 if (unlikely(var_n_string
== NULL
)) {
1136 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1137 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
1140 var_n_string
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_string:nullable TString> */
1146 /* method parser_prod#AInLanguage#replace_child for (self: AInLanguage, ANode, nullable ANode) */
1147 void nit__parser_prod___AInLanguage___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
1148 val
* var_old_child
/* var old_child: ANode */;
1149 val
* var_new_child
/* var new_child: nullable ANode */;
1150 val
* var
/* : TKwin */;
1151 short int var1
/* : Bool */;
1152 val
* var_other
/* var other: nullable Object */;
1153 short int var3
/* : Bool */;
1154 short int var5
/* : Bool */;
1155 short int var6
/* : Bool */;
1158 const char* var_class_name
;
1159 val
* var7
/* : TString */;
1160 short int var8
/* : Bool */;
1161 short int var10
/* : Bool */;
1162 short int var12
/* : Bool */;
1163 short int var13
/* : Bool */;
1166 const char* var_class_name16
;
1169 var
= self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_kwin
].val
; /* _n_kwin on <self:AInLanguage> */
1170 if (unlikely(var
== NULL
)) {
1171 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwin");
1172 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6777);
1176 { /* Inline kernel#Object#== (var,var_old_child) on <var:TKwin> */
1177 var_other
= var_old_child
;
1179 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:TKwin> */
1180 var5
= var
== var_other
;
1192 /* <var_new_child:nullable ANode> isa TKwin */
1193 cltype
= type_nit__TKwin
.color
;
1194 idtype
= type_nit__TKwin
.id
;
1195 if(var_new_child
== NULL
) {
1198 if(cltype
>= var_new_child
->type
->table_size
) {
1201 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
1204 if (unlikely(!var6
)) {
1205 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
1206 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwin", var_class_name
);
1207 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6778);
1211 nit__parser_prod___AInLanguage___n_kwin_61d(self
, var_new_child
); /* Direct call parser_prod#AInLanguage#n_kwin= on <self:AInLanguage>*/
1216 var7
= self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_string
].val
; /* _n_string on <self:AInLanguage> */
1217 if (unlikely(var7
== NULL
)) {
1218 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_string");
1219 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6781);
1223 { /* Inline kernel#Object#== (var7,var_old_child) on <var7:TString> */
1224 var_other
= var_old_child
;
1226 { /* Inline kernel#Object#is_same_instance (var7,var_other) on <var7:TString> */
1227 var12
= var7
== var_other
;
1230 RET_LABEL11
:(void)0;
1239 /* <var_new_child:nullable ANode> isa TString */
1240 cltype14
= type_nit__TString
.color
;
1241 idtype15
= type_nit__TString
.id
;
1242 if(var_new_child
== NULL
) {
1245 if(cltype14
>= var_new_child
->type
->table_size
) {
1248 var13
= var_new_child
->type
->type_table
[cltype14
] == idtype15
;
1251 if (unlikely(!var13
)) {
1252 var_class_name16
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
1253 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TString", var_class_name16
);
1254 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6782);
1258 nit__parser_prod___AInLanguage___n_string_61d(self
, var_new_child
); /* Direct call parser_prod#AInLanguage#n_string= on <self:AInLanguage>*/
1265 /* method parser_prod#AInLanguage#n_kwin= for (self: AInLanguage, TKwin) */
1266 void nit__parser_prod___AInLanguage___n_kwin_61d(val
* self
, val
* p0
) {
1267 val
* var_node
/* var node: TKwin */;
1269 self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_kwin
].val
= var_node
; /* _n_kwin on <self:AInLanguage> */
1271 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TKwin> */
1272 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TKwin> */
1278 /* method parser_prod#AInLanguage#n_string= for (self: AInLanguage, TString) */
1279 void nit__parser_prod___AInLanguage___n_string_61d(val
* self
, val
* p0
) {
1280 val
* var_node
/* var node: TString */;
1282 self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_string
].val
= var_node
; /* _n_string on <self:AInLanguage> */
1284 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TString> */
1285 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TString> */
1291 /* method parser_prod#AInLanguage#visit_all for (self: AInLanguage, Visitor) */
1292 void nit__parser_prod___AInLanguage___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
1293 val
* var_v
/* var v: Visitor */;
1294 val
* var
/* : TKwin */;
1295 val
* var1
/* : TString */;
1297 var
= self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_kwin
].val
; /* _n_kwin on <self:AInLanguage> */
1298 if (unlikely(var
== NULL
)) {
1299 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_kwin");
1300 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6801);
1304 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1306 var1
= self
->attrs
[COLOR_nit__parser_nodes__AInLanguage___n_string
].val
; /* _n_string on <self:AInLanguage> */
1307 if (unlikely(var1
== NULL
)) {
1308 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_string");
1309 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6802);
1313 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1317 /* method parser_prod#AExternCodeBlock#init_aexterncodeblock for (self: AExternCodeBlock, nullable AInLanguage, nullable TExternCodeSegment) */
1318 void nit__parser_prod___AExternCodeBlock___init_aexterncodeblock(val
* self
, val
* p0
, val
* p1
) {
1319 val
* var_n_in_language
/* var n_in_language: nullable AInLanguage */;
1320 val
* var_n_extern_code_segment
/* var n_extern_code_segment: nullable TExternCodeSegment */;
1321 val
* var
/* : null */;
1322 short int var1
/* : Bool */;
1323 short int var2
/* : Bool */;
1324 val
* var_other
/* var other: nullable Object */;
1325 short int var4
/* : Bool */;
1326 short int var5
/* : Bool */;
1327 var_n_in_language
= p0
;
1328 var_n_extern_code_segment
= p1
;
1329 self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_in_language
].val
= var_n_in_language
; /* _n_in_language on <self:AExternCodeBlock> */
1331 if (var_n_in_language
== NULL
) {
1332 var1
= 0; /* is null */
1334 var1
= 1; /* arg is null and recv is not */
1337 { /* Inline kernel#Object#!= (var_n_in_language,var) on <var_n_in_language:nullable AInLanguage> */
1340 var4
= ((short int (*)(val
* self
, val
* p0
))(var_n_in_language
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_in_language
, var_other
) /* == on <var_n_in_language:nullable AInLanguage(AInLanguage)>*/;
1351 { /* Inline parser_nodes#ANode#parent= (var_n_in_language,self) on <var_n_in_language:nullable AInLanguage(AInLanguage)> */
1352 var_n_in_language
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_in_language:nullable AInLanguage(AInLanguage)> */
1358 if (unlikely(var_n_extern_code_segment
== NULL
)) {
1359 PRINT_ERROR("Runtime error: %s", "Cast failed");
1360 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6813);
1363 self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_extern_code_segment
].val
= var_n_extern_code_segment
; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1364 if (var_n_extern_code_segment
== NULL
) {
1365 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1366 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6814);
1369 { /* Inline parser_nodes#ANode#parent= (var_n_extern_code_segment,self) on <var_n_extern_code_segment:nullable TExternCodeSegment> */
1370 if (unlikely(var_n_extern_code_segment
== NULL
)) {
1371 PRINT_ERROR("Runtime error: %s", "Receiver is null");
1372 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
1375 var_n_extern_code_segment
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_extern_code_segment:nullable TExternCodeSegment> */
1381 /* method parser_prod#AExternCodeBlock#replace_child for (self: AExternCodeBlock, ANode, nullable ANode) */
1382 void nit__parser_prod___AExternCodeBlock___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
1383 val
* var_old_child
/* var old_child: ANode */;
1384 val
* var_new_child
/* var new_child: nullable ANode */;
1385 val
* var
/* : nullable AInLanguage */;
1386 short int var1
/* : Bool */;
1387 short int var2
/* : Bool */;
1388 val
* var_other
/* var other: nullable Object */;
1389 short int var4
/* : Bool */;
1390 short int var6
/* : Bool */;
1391 short int var7
/* : Bool */;
1394 const char* var_class_name
;
1395 val
* var8
/* : TExternCodeSegment */;
1396 short int var9
/* : Bool */;
1397 short int var11
/* : Bool */;
1398 short int var13
/* : Bool */;
1399 short int var14
/* : Bool */;
1402 const char* var_class_name17
;
1405 var
= self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_in_language
].val
; /* _n_in_language on <self:AExternCodeBlock> */
1407 var1
= 0; /* <var_old_child:ANode> cannot be null */
1409 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AInLanguage> */
1410 var_other
= var_old_child
;
1412 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AInLanguage(AInLanguage)> */
1413 var6
= var
== var_other
;
1426 /* <var_new_child:nullable ANode> isa nullable AInLanguage */
1427 cltype
= type_nullable__nit__AInLanguage
.color
;
1428 idtype
= type_nullable__nit__AInLanguage
.id
;
1429 if(var_new_child
== NULL
) {
1432 if(cltype
>= var_new_child
->type
->table_size
) {
1435 var7
= var_new_child
->type
->type_table
[cltype
] == idtype
;
1438 if (unlikely(!var7
)) {
1439 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
1440 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AInLanguage", var_class_name
);
1441 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6820);
1445 nit__parser_prod___AExternCodeBlock___n_in_language_61d(self
, var_new_child
); /* Direct call parser_prod#AExternCodeBlock#n_in_language= on <self:AExternCodeBlock>*/
1450 var8
= self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_extern_code_segment
].val
; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1451 if (unlikely(var8
== NULL
)) {
1452 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_segment");
1453 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6823);
1457 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:TExternCodeSegment> */
1458 var_other
= var_old_child
;
1460 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:TExternCodeSegment> */
1461 var13
= var8
== var_other
;
1464 RET_LABEL12
:(void)0;
1469 RET_LABEL10
:(void)0;
1473 /* <var_new_child:nullable ANode> isa TExternCodeSegment */
1474 cltype15
= type_nit__TExternCodeSegment
.color
;
1475 idtype16
= type_nit__TExternCodeSegment
.id
;
1476 if(var_new_child
== NULL
) {
1479 if(cltype15
>= var_new_child
->type
->table_size
) {
1482 var14
= var_new_child
->type
->type_table
[cltype15
] == idtype16
;
1485 if (unlikely(!var14
)) {
1486 var_class_name17
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
1487 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TExternCodeSegment", var_class_name17
);
1488 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6824);
1492 nit__parser_prod___AExternCodeBlock___n_extern_code_segment_61d(self
, var_new_child
); /* Direct call parser_prod#AExternCodeBlock#n_extern_code_segment= on <self:AExternCodeBlock>*/
1499 /* method parser_prod#AExternCodeBlock#n_in_language= for (self: AExternCodeBlock, nullable AInLanguage) */
1500 void nit__parser_prod___AExternCodeBlock___n_in_language_61d(val
* self
, val
* p0
) {
1501 val
* var_node
/* var node: nullable AInLanguage */;
1502 val
* var
/* : null */;
1503 short int var1
/* : Bool */;
1504 short int var2
/* : Bool */;
1505 val
* var_other
/* var other: nullable Object */;
1506 short int var4
/* : Bool */;
1507 short int var5
/* : Bool */;
1509 self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_in_language
].val
= var_node
; /* _n_in_language on <self:AExternCodeBlock> */
1511 if (var_node
== NULL
) {
1512 var1
= 0; /* is null */
1514 var1
= 1; /* arg is null and recv is not */
1517 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AInLanguage> */
1520 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable AInLanguage(AInLanguage)>*/;
1531 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AInLanguage(AInLanguage)> */
1532 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable AInLanguage(AInLanguage)> */
1540 /* method parser_prod#AExternCodeBlock#n_extern_code_segment= for (self: AExternCodeBlock, TExternCodeSegment) */
1541 void nit__parser_prod___AExternCodeBlock___n_extern_code_segment_61d(val
* self
, val
* p0
) {
1542 val
* var_node
/* var node: TExternCodeSegment */;
1544 self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_extern_code_segment
].val
= var_node
; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1546 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:TExternCodeSegment> */
1547 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:TExternCodeSegment> */
1553 /* method parser_prod#AExternCodeBlock#visit_all for (self: AExternCodeBlock, Visitor) */
1554 void nit__parser_prod___AExternCodeBlock___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
1555 val
* var_v
/* var v: Visitor */;
1556 val
* var
/* : nullable AInLanguage */;
1557 val
* var1
/* : TExternCodeSegment */;
1559 var
= self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_in_language
].val
; /* _n_in_language on <self:AExternCodeBlock> */
1561 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1563 var1
= self
->attrs
[COLOR_nit__parser_nodes__AExternCodeBlock___n_extern_code_segment
].val
; /* _n_extern_code_segment on <self:AExternCodeBlock> */
1564 if (unlikely(var1
== NULL
)) {
1565 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_extern_code_segment");
1566 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6844);
1570 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1574 /* method parser_prod#AQualified#init_aqualified for (self: AQualified, Collection[Object], nullable TClassid) */
1575 void nit__parser_prod___AQualified___init_aqualified(val
* self
, val
* p0
, val
* p1
) {
1576 val
* var_n_id
/* var n_id: Collection[Object] */;
1577 val
* var_n_classid
/* var n_classid: nullable TClassid */;
1578 val
* var
/* : ANodes[TId] */;
1579 val
* var2
/* : ANodes[TId] */;
1580 val
* var3
/* : null */;
1581 short int var4
/* : Bool */;
1582 short int var5
/* : Bool */;
1583 val
* var_other
/* var other: nullable Object */;
1584 short int var7
/* : Bool */;
1585 short int var8
/* : Bool */;
1589 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1590 var2
= self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_id
].val
; /* _n_id on <self:AQualified> */
1591 if (unlikely(var2
== NULL
)) {
1592 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1593 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2503);
1601 nit___nit__ANodes___unsafe_add_all(var
, var_n_id
); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[TId]>*/
1603 self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_classid
].val
= var_n_classid
; /* _n_classid on <self:AQualified> */
1605 if (var_n_classid
== NULL
) {
1606 var4
= 0; /* is null */
1608 var4
= 1; /* arg is null and recv is not */
1611 { /* Inline kernel#Object#!= (var_n_classid,var3) on <var_n_classid:nullable TClassid> */
1614 var7
= ((short int (*)(val
* self
, val
* p0
))(var_n_classid
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_classid
, var_other
) /* == on <var_n_classid:nullable TClassid(TClassid)>*/;
1625 { /* Inline parser_nodes#ANode#parent= (var_n_classid,self) on <var_n_classid:nullable TClassid(TClassid)> */
1626 var_n_classid
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_classid:nullable TClassid(TClassid)> */
1634 /* method parser_prod#AQualified#replace_child for (self: AQualified, ANode, nullable ANode) */
1635 void nit__parser_prod___AQualified___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
1636 val
* var_old_child
/* var old_child: ANode */;
1637 val
* var_new_child
/* var new_child: nullable ANode */;
1638 val
* var
/* : ANodes[TId] */;
1639 val
* var2
/* : ANodes[TId] */;
1640 short int var3
/* : Bool */;
1641 val
* var4
/* : nullable TClassid */;
1642 short int var5
/* : Bool */;
1643 short int var6
/* : Bool */;
1644 val
* var_other
/* var other: nullable Object */;
1645 short int var8
/* : Bool */;
1646 short int var10
/* : Bool */;
1647 short int var11
/* : Bool */;
1650 const char* var_class_name
;
1654 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1655 var2
= self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_id
].val
; /* _n_id on <self:AQualified> */
1656 if (unlikely(var2
== NULL
)) {
1657 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1658 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2503);
1666 var3
= nit___nit__ANodes___replace_child(var
, var_old_child
, var_new_child
);
1672 var4
= self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_classid
].val
; /* _n_classid on <self:AQualified> */
1674 var5
= 0; /* <var_old_child:ANode> cannot be null */
1676 { /* Inline kernel#Object#== (var4,var_old_child) on <var4:nullable TClassid> */
1677 var_other
= var_old_child
;
1679 { /* Inline kernel#Object#is_same_instance (var4,var_other) on <var4:nullable TClassid(TClassid)> */
1680 var10
= var4
== var_other
;
1693 /* <var_new_child:nullable ANode> isa nullable TClassid */
1694 cltype
= type_nullable__nit__TClassid
.color
;
1695 idtype
= type_nullable__nit__TClassid
.id
;
1696 if(var_new_child
== NULL
) {
1699 if(cltype
>= var_new_child
->type
->table_size
) {
1702 var11
= var_new_child
->type
->type_table
[cltype
] == idtype
;
1705 if (unlikely(!var11
)) {
1706 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
1707 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TClassid", var_class_name
);
1708 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6862);
1712 nit__parser_prod___AQualified___n_classid_61d(self
, var_new_child
); /* Direct call parser_prod#AQualified#n_classid= on <self:AQualified>*/
1719 /* method parser_prod#AQualified#n_classid= for (self: AQualified, nullable TClassid) */
1720 void nit__parser_prod___AQualified___n_classid_61d(val
* self
, val
* p0
) {
1721 val
* var_node
/* var node: nullable TClassid */;
1722 val
* var
/* : null */;
1723 short int var1
/* : Bool */;
1724 short int var2
/* : Bool */;
1725 val
* var_other
/* var other: nullable Object */;
1726 short int var4
/* : Bool */;
1727 short int var5
/* : Bool */;
1729 self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_classid
].val
= var_node
; /* _n_classid on <self:AQualified> */
1731 if (var_node
== NULL
) {
1732 var1
= 0; /* is null */
1734 var1
= 1; /* arg is null and recv is not */
1737 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TClassid> */
1740 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TClassid(TClassid)>*/;
1751 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TClassid(TClassid)> */
1752 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TClassid(TClassid)> */
1760 /* method parser_prod#AQualified#visit_all for (self: AQualified, Visitor) */
1761 void nit__parser_prod___AQualified___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
1762 val
* var_v
/* var v: Visitor */;
1763 val
* var
/* : ANodes[TId] */;
1764 val
* var2
/* : ANodes[TId] */;
1765 val
* var3
/* : nullable TClassid */;
1768 { /* Inline parser_nodes#AQualified#n_id (self) on <self:AQualified> */
1769 var2
= self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_id
].val
; /* _n_id on <self:AQualified> */
1770 if (unlikely(var2
== NULL
)) {
1771 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
1772 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2503);
1780 nit___nit__ANodes___visit_all(var
, var_v
); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[TId]>*/
1782 var3
= self
->attrs
[COLOR_nit__parser_nodes__AQualified___n_classid
].val
; /* _n_classid on <self:AQualified> */
1784 nit___nit__Visitor___enter_visit(var_v
, var3
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
1788 /* method parser_prod#ADoc#init_adoc for (self: ADoc, Collection[Object]) */
1789 void nit__parser_prod___ADoc___init_adoc(val
* self
, val
* p0
) {
1790 val
* var_n_comment
/* var n_comment: Collection[Object] */;
1791 val
* var
/* : ANodes[TComment] */;
1792 val
* var2
/* : ANodes[TComment] */;
1795 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1796 var2
= self
->attrs
[COLOR_nit__parser_nodes__ADoc___n_comment
].val
; /* _n_comment on <self:ADoc> */
1797 if (unlikely(var2
== NULL
)) {
1798 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1799 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2515);
1807 nit___nit__ANodes___unsafe_add_all(var
, var_n_comment
); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var:ANodes[TComment]>*/
1811 /* method parser_prod#ADoc#replace_child for (self: ADoc, ANode, nullable ANode) */
1812 void nit__parser_prod___ADoc___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
1813 val
* var_old_child
/* var old_child: ANode */;
1814 val
* var_new_child
/* var new_child: nullable ANode */;
1815 val
* var
/* : ANodes[TComment] */;
1816 val
* var2
/* : ANodes[TComment] */;
1817 short int var3
/* : Bool */;
1821 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1822 var2
= self
->attrs
[COLOR_nit__parser_nodes__ADoc___n_comment
].val
; /* _n_comment on <self:ADoc> */
1823 if (unlikely(var2
== NULL
)) {
1824 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1825 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2515);
1833 var3
= nit___nit__ANodes___replace_child(var
, var_old_child
, var_new_child
);
1841 /* method parser_prod#ADoc#visit_all for (self: ADoc, Visitor) */
1842 void nit__parser_prod___ADoc___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
1843 val
* var_v
/* var v: Visitor */;
1844 val
* var
/* : ANodes[TComment] */;
1845 val
* var2
/* : ANodes[TComment] */;
1848 { /* Inline parser_nodes#ADoc#n_comment (self) on <self:ADoc> */
1849 var2
= self
->attrs
[COLOR_nit__parser_nodes__ADoc___n_comment
].val
; /* _n_comment on <self:ADoc> */
1850 if (unlikely(var2
== NULL
)) {
1851 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_comment");
1852 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2515);
1860 nit___nit__ANodes___visit_all(var
, var_v
); /* Direct call parser_nodes#ANodes#visit_all on <var:ANodes[TComment]>*/
1864 /* method parser_prod#AAnnotations#init_aannotations for (self: AAnnotations, nullable TAt, nullable TOpar, Collection[Object], nullable TCpar) */
1865 void nit__parser_prod___AAnnotations___init_aannotations(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
) {
1866 val
* var_n_at
/* var n_at: nullable TAt */;
1867 val
* var_n_opar
/* var n_opar: nullable TOpar */;
1868 val
* var_n_items
/* var n_items: Collection[Object] */;
1869 val
* var_n_cpar
/* var n_cpar: nullable TCpar */;
1870 val
* var
/* : null */;
1871 short int var1
/* : Bool */;
1872 short int var2
/* : Bool */;
1873 val
* var_other
/* var other: nullable Object */;
1874 short int var4
/* : Bool */;
1875 short int var5
/* : Bool */;
1876 val
* var7
/* : null */;
1877 short int var8
/* : Bool */;
1878 short int var9
/* : Bool */;
1879 short int var11
/* : Bool */;
1880 short int var12
/* : Bool */;
1881 val
* var14
/* : ANodes[AAnnotation] */;
1882 val
* var16
/* : ANodes[AAnnotation] */;
1883 val
* var17
/* : null */;
1884 short int var18
/* : Bool */;
1885 short int var19
/* : Bool */;
1886 short int var21
/* : Bool */;
1887 short int var22
/* : Bool */;
1892 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_at
].val
= var_n_at
; /* _n_at on <self:AAnnotations> */
1894 if (var_n_at
== NULL
) {
1895 var1
= 0; /* is null */
1897 var1
= 1; /* arg is null and recv is not */
1900 { /* Inline kernel#Object#!= (var_n_at,var) on <var_n_at:nullable TAt> */
1903 var4
= ((short int (*)(val
* self
, val
* p0
))(var_n_at
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_at
, var_other
) /* == on <var_n_at:nullable TAt(TAt)>*/;
1914 { /* Inline parser_nodes#ANode#parent= (var_n_at,self) on <var_n_at:nullable TAt(TAt)> */
1915 var_n_at
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_at:nullable TAt(TAt)> */
1921 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_opar
].val
= var_n_opar
; /* _n_opar on <self:AAnnotations> */
1923 if (var_n_opar
== NULL
) {
1924 var8
= 0; /* is null */
1926 var8
= 1; /* arg is null and recv is not */
1929 { /* Inline kernel#Object#!= (var_n_opar,var7) on <var_n_opar:nullable TOpar> */
1932 var11
= ((short int (*)(val
* self
, val
* p0
))(var_n_opar
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_opar
, var_other
) /* == on <var_n_opar:nullable TOpar(TOpar)>*/;
1937 RET_LABEL10
:(void)0;
1943 { /* Inline parser_nodes#ANode#parent= (var_n_opar,self) on <var_n_opar:nullable TOpar(TOpar)> */
1944 var_n_opar
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_opar:nullable TOpar(TOpar)> */
1945 RET_LABEL13
:(void)0;
1951 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
1952 var16
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_items
].val
; /* _n_items on <self:AAnnotations> */
1953 if (unlikely(var16
== NULL
)) {
1954 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
1955 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2535);
1959 RET_LABEL15
:(void)0;
1963 nit___nit__ANodes___unsafe_add_all(var14
, var_n_items
); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var14:ANodes[AAnnotation]>*/
1965 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_cpar
].val
= var_n_cpar
; /* _n_cpar on <self:AAnnotations> */
1967 if (var_n_cpar
== NULL
) {
1968 var18
= 0; /* is null */
1970 var18
= 1; /* arg is null and recv is not */
1973 { /* Inline kernel#Object#!= (var_n_cpar,var17) on <var_n_cpar:nullable TCpar> */
1976 var21
= ((short int (*)(val
* self
, val
* p0
))(var_n_cpar
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_cpar
, var_other
) /* == on <var_n_cpar:nullable TCpar(TCpar)>*/;
1981 RET_LABEL20
:(void)0;
1987 { /* Inline parser_nodes#ANode#parent= (var_n_cpar,self) on <var_n_cpar:nullable TCpar(TCpar)> */
1988 var_n_cpar
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_cpar:nullable TCpar(TCpar)> */
1989 RET_LABEL23
:(void)0;
1996 /* method parser_prod#AAnnotations#replace_child for (self: AAnnotations, ANode, nullable ANode) */
1997 void nit__parser_prod___AAnnotations___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
1998 val
* var_old_child
/* var old_child: ANode */;
1999 val
* var_new_child
/* var new_child: nullable ANode */;
2000 val
* var
/* : nullable TAt */;
2001 short int var1
/* : Bool */;
2002 short int var2
/* : Bool */;
2003 val
* var_other
/* var other: nullable Object */;
2004 short int var4
/* : Bool */;
2005 short int var6
/* : Bool */;
2006 short int var7
/* : Bool */;
2009 const char* var_class_name
;
2010 val
* var8
/* : nullable TOpar */;
2011 short int var9
/* : Bool */;
2012 short int var10
/* : Bool */;
2013 short int var12
/* : Bool */;
2014 short int var14
/* : Bool */;
2015 short int var15
/* : Bool */;
2018 const char* var_class_name18
;
2019 val
* var19
/* : ANodes[AAnnotation] */;
2020 val
* var21
/* : ANodes[AAnnotation] */;
2021 short int var22
/* : Bool */;
2022 val
* var23
/* : nullable TCpar */;
2023 short int var24
/* : Bool */;
2024 short int var25
/* : Bool */;
2025 short int var27
/* : Bool */;
2026 short int var29
/* : Bool */;
2027 short int var30
/* : Bool */;
2030 const char* var_class_name33
;
2033 var
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_at
].val
; /* _n_at on <self:AAnnotations> */
2035 var1
= 0; /* <var_old_child:ANode> cannot be null */
2037 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable TAt> */
2038 var_other
= var_old_child
;
2040 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable TAt(TAt)> */
2041 var6
= var
== var_other
;
2054 /* <var_new_child:nullable ANode> isa nullable TAt */
2055 cltype
= type_nullable__nit__TAt
.color
;
2056 idtype
= type_nullable__nit__TAt
.id
;
2057 if(var_new_child
== NULL
) {
2060 if(cltype
>= var_new_child
->type
->table_size
) {
2063 var7
= var_new_child
->type
->type_table
[cltype
] == idtype
;
2066 if (unlikely(!var7
)) {
2067 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2068 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TAt", var_class_name
);
2069 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6920);
2073 nit__parser_prod___AAnnotations___n_at_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotations#n_at= on <self:AAnnotations>*/
2078 var8
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_opar
].val
; /* _n_opar on <self:AAnnotations> */
2080 var9
= 0; /* <var_old_child:ANode> cannot be null */
2082 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TOpar> */
2083 var_other
= var_old_child
;
2085 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TOpar(TOpar)> */
2086 var14
= var8
== var_other
;
2089 RET_LABEL13
:(void)0;
2094 RET_LABEL11
:(void)0;
2099 /* <var_new_child:nullable ANode> isa nullable TOpar */
2100 cltype16
= type_nullable__nit__TOpar
.color
;
2101 idtype17
= type_nullable__nit__TOpar
.id
;
2102 if(var_new_child
== NULL
) {
2105 if(cltype16
>= var_new_child
->type
->table_size
) {
2108 var15
= var_new_child
->type
->type_table
[cltype16
] == idtype17
;
2111 if (unlikely(!var15
)) {
2112 var_class_name18
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2113 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TOpar", var_class_name18
);
2114 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6924);
2118 nit__parser_prod___AAnnotations___n_opar_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotations#n_opar= on <self:AAnnotations>*/
2124 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
2125 var21
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_items
].val
; /* _n_items on <self:AAnnotations> */
2126 if (unlikely(var21
== NULL
)) {
2127 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
2128 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2535);
2132 RET_LABEL20
:(void)0;
2136 var22
= nit___nit__ANodes___replace_child(var19
, var_old_child
, var_new_child
);
2142 var23
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_cpar
].val
; /* _n_cpar on <self:AAnnotations> */
2143 if (var23
== NULL
) {
2144 var24
= 0; /* <var_old_child:ANode> cannot be null */
2146 { /* Inline kernel#Object#== (var23,var_old_child) on <var23:nullable TCpar> */
2147 var_other
= var_old_child
;
2149 { /* Inline kernel#Object#is_same_instance (var23,var_other) on <var23:nullable TCpar(TCpar)> */
2150 var29
= var23
== var_other
;
2153 RET_LABEL28
:(void)0;
2158 RET_LABEL26
:(void)0;
2163 /* <var_new_child:nullable ANode> isa nullable TCpar */
2164 cltype31
= type_nullable__nit__TCpar
.color
;
2165 idtype32
= type_nullable__nit__TCpar
.id
;
2166 if(var_new_child
== NULL
) {
2169 if(cltype31
>= var_new_child
->type
->table_size
) {
2172 var30
= var_new_child
->type
->type_table
[cltype31
] == idtype32
;
2175 if (unlikely(!var30
)) {
2176 var_class_name33
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2177 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TCpar", var_class_name33
);
2178 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6929);
2182 nit__parser_prod___AAnnotations___n_cpar_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotations#n_cpar= on <self:AAnnotations>*/
2189 /* method parser_prod#AAnnotations#n_at= for (self: AAnnotations, nullable TAt) */
2190 void nit__parser_prod___AAnnotations___n_at_61d(val
* self
, val
* p0
) {
2191 val
* var_node
/* var node: nullable TAt */;
2192 val
* var
/* : null */;
2193 short int var1
/* : Bool */;
2194 short int var2
/* : Bool */;
2195 val
* var_other
/* var other: nullable Object */;
2196 short int var4
/* : Bool */;
2197 short int var5
/* : Bool */;
2199 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_at
].val
= var_node
; /* _n_at on <self:AAnnotations> */
2201 if (var_node
== NULL
) {
2202 var1
= 0; /* is null */
2204 var1
= 1; /* arg is null and recv is not */
2207 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TAt> */
2210 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TAt(TAt)>*/;
2221 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TAt(TAt)> */
2222 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TAt(TAt)> */
2230 /* method parser_prod#AAnnotations#n_opar= for (self: AAnnotations, nullable TOpar) */
2231 void nit__parser_prod___AAnnotations___n_opar_61d(val
* self
, val
* p0
) {
2232 val
* var_node
/* var node: nullable TOpar */;
2233 val
* var
/* : null */;
2234 short int var1
/* : Bool */;
2235 short int var2
/* : Bool */;
2236 val
* var_other
/* var other: nullable Object */;
2237 short int var4
/* : Bool */;
2238 short int var5
/* : Bool */;
2240 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_opar
].val
= var_node
; /* _n_opar on <self:AAnnotations> */
2242 if (var_node
== NULL
) {
2243 var1
= 0; /* is null */
2245 var1
= 1; /* arg is null and recv is not */
2248 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TOpar> */
2251 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TOpar(TOpar)>*/;
2262 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TOpar(TOpar)> */
2263 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TOpar(TOpar)> */
2271 /* method parser_prod#AAnnotations#n_cpar= for (self: AAnnotations, nullable TCpar) */
2272 void nit__parser_prod___AAnnotations___n_cpar_61d(val
* self
, val
* p0
) {
2273 val
* var_node
/* var node: nullable TCpar */;
2274 val
* var
/* : null */;
2275 short int var1
/* : Bool */;
2276 short int var2
/* : Bool */;
2277 val
* var_other
/* var other: nullable Object */;
2278 short int var4
/* : Bool */;
2279 short int var5
/* : Bool */;
2281 self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_cpar
].val
= var_node
; /* _n_cpar on <self:AAnnotations> */
2283 if (var_node
== NULL
) {
2284 var1
= 0; /* is null */
2286 var1
= 1; /* arg is null and recv is not */
2289 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TCpar> */
2292 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TCpar(TCpar)>*/;
2303 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TCpar(TCpar)> */
2304 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TCpar(TCpar)> */
2312 /* method parser_prod#AAnnotations#visit_all for (self: AAnnotations, Visitor) */
2313 void nit__parser_prod___AAnnotations___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
2314 val
* var_v
/* var v: Visitor */;
2315 val
* var
/* : nullable TAt */;
2316 val
* var1
/* : nullable TOpar */;
2317 val
* var2
/* : ANodes[AAnnotation] */;
2318 val
* var4
/* : ANodes[AAnnotation] */;
2319 val
* var5
/* : nullable TCpar */;
2321 var
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_at
].val
; /* _n_at on <self:AAnnotations> */
2323 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2325 var1
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_opar
].val
; /* _n_opar on <self:AAnnotations> */
2327 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2330 { /* Inline parser_nodes#AAnnotations#n_items (self) on <self:AAnnotations> */
2331 var4
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_items
].val
; /* _n_items on <self:AAnnotations> */
2332 if (unlikely(var4
== NULL
)) {
2333 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_items");
2334 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2535);
2342 nit___nit__ANodes___visit_all(var2
, var_v
); /* Direct call parser_nodes#ANodes#visit_all on <var2:ANodes[AAnnotation]>*/
2344 var5
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotations___n_cpar
].val
; /* _n_cpar on <self:AAnnotations> */
2346 nit___nit__Visitor___enter_visit(var_v
, var5
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
2350 /* method parser_prod#AAnnotation#init_aannotation for (self: AAnnotation, nullable ADoc, nullable TKwredef, nullable AVisibility, nullable AAtid, nullable TOpar, Collection[Object], nullable TCpar, nullable AAnnotations) */
2351 void nit__parser_prod___AAnnotation___init_aannotation(val
* self
, val
* p0
, val
* p1
, val
* p2
, val
* p3
, val
* p4
, val
* p5
, val
* p6
, val
* p7
) {
2352 val
* var_n_doc
/* var n_doc: nullable ADoc */;
2353 val
* var_n_kwredef
/* var n_kwredef: nullable TKwredef */;
2354 val
* var_n_visibility
/* var n_visibility: nullable AVisibility */;
2355 val
* var_n_atid
/* var n_atid: nullable AAtid */;
2356 val
* var_n_opar
/* var n_opar: nullable TOpar */;
2357 val
* var_n_args
/* var n_args: Collection[Object] */;
2358 val
* var_n_cpar
/* var n_cpar: nullable TCpar */;
2359 val
* var_n_annotations
/* var n_annotations: nullable AAnnotations */;
2360 val
* var
/* : null */;
2361 short int var1
/* : Bool */;
2362 short int var2
/* : Bool */;
2363 val
* var_other
/* var other: nullable Object */;
2364 short int var4
/* : Bool */;
2365 short int var5
/* : Bool */;
2366 val
* var7
/* : null */;
2367 short int var8
/* : Bool */;
2368 short int var9
/* : Bool */;
2369 short int var11
/* : Bool */;
2370 short int var12
/* : Bool */;
2371 val
* var14
/* : null */;
2372 short int var15
/* : Bool */;
2373 short int var16
/* : Bool */;
2374 short int var18
/* : Bool */;
2375 short int var19
/* : Bool */;
2376 val
* var22
/* : null */;
2377 short int var23
/* : Bool */;
2378 short int var24
/* : Bool */;
2379 short int var26
/* : Bool */;
2380 short int var27
/* : Bool */;
2381 val
* var29
/* : ANodes[AExpr] */;
2382 val
* var31
/* : ANodes[AExpr] */;
2383 val
* var32
/* : null */;
2384 short int var33
/* : Bool */;
2385 short int var34
/* : Bool */;
2386 short int var36
/* : Bool */;
2387 short int var37
/* : Bool */;
2388 val
* var39
/* : null */;
2389 short int var40
/* : Bool */;
2390 short int var41
/* : Bool */;
2391 short int var43
/* : Bool */;
2392 short int var44
/* : Bool */;
2395 var_n_visibility
= p2
;
2400 var_n_annotations
= p7
;
2401 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_doc
].val
= var_n_doc
; /* _n_doc on <self:AAnnotation> */
2403 if (var_n_doc
== NULL
) {
2404 var1
= 0; /* is null */
2406 var1
= 1; /* arg is null and recv is not */
2409 { /* Inline kernel#Object#!= (var_n_doc,var) on <var_n_doc:nullable ADoc> */
2412 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)>*/;
2423 { /* Inline parser_nodes#ANode#parent= (var_n_doc,self) on <var_n_doc:nullable ADoc(ADoc)> */
2424 var_n_doc
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_doc:nullable ADoc(ADoc)> */
2430 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_kwredef
].val
= var_n_kwredef
; /* _n_kwredef on <self:AAnnotation> */
2432 if (var_n_kwredef
== NULL
) {
2433 var8
= 0; /* is null */
2435 var8
= 1; /* arg is null and recv is not */
2438 { /* Inline kernel#Object#!= (var_n_kwredef,var7) on <var_n_kwredef:nullable TKwredef> */
2441 var11
= ((short int (*)(val
* self
, val
* p0
))(var_n_kwredef
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_kwredef
, var_other
) /* == on <var_n_kwredef:nullable TKwredef(TKwredef)>*/;
2446 RET_LABEL10
:(void)0;
2452 { /* Inline parser_nodes#ANode#parent= (var_n_kwredef,self) on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2453 var_n_kwredef
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_kwredef:nullable TKwredef(TKwredef)> */
2454 RET_LABEL13
:(void)0;
2459 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_visibility
].val
= var_n_visibility
; /* _n_visibility on <self:AAnnotation> */
2461 if (var_n_visibility
== NULL
) {
2462 var15
= 0; /* is null */
2464 var15
= 1; /* arg is null and recv is not */
2467 { /* Inline kernel#Object#!= (var_n_visibility,var14) on <var_n_visibility:nullable AVisibility> */
2470 var18
= ((short int (*)(val
* self
, val
* p0
))(var_n_visibility
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_visibility
, var_other
) /* == on <var_n_visibility:nullable AVisibility(AVisibility)>*/;
2475 RET_LABEL17
:(void)0;
2481 { /* Inline parser_nodes#ANode#parent= (var_n_visibility,self) on <var_n_visibility:nullable AVisibility(AVisibility)> */
2482 var_n_visibility
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_visibility:nullable AVisibility(AVisibility)> */
2483 RET_LABEL20
:(void)0;
2488 if (unlikely(var_n_atid
== NULL
)) {
2489 PRINT_ERROR("Runtime error: %s", "Cast failed");
2490 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6977);
2493 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_atid
].val
= var_n_atid
; /* _n_atid on <self:AAnnotation> */
2494 if (var_n_atid
== NULL
) {
2495 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2496 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6978);
2499 { /* Inline parser_nodes#ANode#parent= (var_n_atid,self) on <var_n_atid:nullable AAtid> */
2500 if (unlikely(var_n_atid
== NULL
)) {
2501 PRINT_ERROR("Runtime error: %s", "Receiver is null");
2502 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
2505 var_n_atid
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_atid:nullable AAtid> */
2506 RET_LABEL21
:(void)0;
2509 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_opar
].val
= var_n_opar
; /* _n_opar on <self:AAnnotation> */
2511 if (var_n_opar
== NULL
) {
2512 var23
= 0; /* is null */
2514 var23
= 1; /* arg is null and recv is not */
2517 { /* Inline kernel#Object#!= (var_n_opar,var22) on <var_n_opar:nullable TOpar> */
2520 var26
= ((short int (*)(val
* self
, val
* p0
))(var_n_opar
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_opar
, var_other
) /* == on <var_n_opar:nullable TOpar(TOpar)>*/;
2525 RET_LABEL25
:(void)0;
2531 { /* Inline parser_nodes#ANode#parent= (var_n_opar,self) on <var_n_opar:nullable TOpar(TOpar)> */
2532 var_n_opar
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_opar:nullable TOpar(TOpar)> */
2533 RET_LABEL28
:(void)0;
2539 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
2540 var31
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_args
].val
; /* _n_args on <self:AAnnotation> */
2541 if (unlikely(var31
== NULL
)) {
2542 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
2543 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2552);
2547 RET_LABEL30
:(void)0;
2551 nit___nit__ANodes___unsafe_add_all(var29
, var_n_args
); /* Direct call parser_nodes#ANodes#unsafe_add_all on <var29:ANodes[AExpr]>*/
2553 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_cpar
].val
= var_n_cpar
; /* _n_cpar on <self:AAnnotation> */
2555 if (var_n_cpar
== NULL
) {
2556 var33
= 0; /* is null */
2558 var33
= 1; /* arg is null and recv is not */
2561 { /* Inline kernel#Object#!= (var_n_cpar,var32) on <var_n_cpar:nullable TCpar> */
2564 var36
= ((short int (*)(val
* self
, val
* p0
))(var_n_cpar
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_n_cpar
, var_other
) /* == on <var_n_cpar:nullable TCpar(TCpar)>*/;
2569 RET_LABEL35
:(void)0;
2575 { /* Inline parser_nodes#ANode#parent= (var_n_cpar,self) on <var_n_cpar:nullable TCpar(TCpar)> */
2576 var_n_cpar
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_cpar:nullable TCpar(TCpar)> */
2577 RET_LABEL38
:(void)0;
2582 self
->attrs
[COLOR_nit__parser_nodes__Prod___n_annotations
].val
= var_n_annotations
; /* _n_annotations on <self:AAnnotation> */
2584 if (var_n_annotations
== NULL
) {
2585 var40
= 0; /* is null */
2587 var40
= 1; /* arg is null and recv is not */
2590 { /* Inline kernel#Object#!= (var_n_annotations,var39) on <var_n_annotations:nullable AAnnotations> */
2593 var43
= ((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)>*/;
2598 RET_LABEL42
:(void)0;
2604 { /* Inline parser_nodes#ANode#parent= (var_n_annotations,self) on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2605 var_n_annotations
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_annotations:nullable AAnnotations(AAnnotations)> */
2606 RET_LABEL45
:(void)0;
2613 /* method parser_prod#AAnnotation#replace_child for (self: AAnnotation, ANode, nullable ANode) */
2614 void nit__parser_prod___AAnnotation___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
2615 val
* var_old_child
/* var old_child: ANode */;
2616 val
* var_new_child
/* var new_child: nullable ANode */;
2617 val
* var
/* : nullable ADoc */;
2618 short int var1
/* : Bool */;
2619 short int var2
/* : Bool */;
2620 val
* var_other
/* var other: nullable Object */;
2621 short int var4
/* : Bool */;
2622 short int var6
/* : Bool */;
2623 short int var7
/* : Bool */;
2626 const char* var_class_name
;
2627 val
* var8
/* : nullable TKwredef */;
2628 short int var9
/* : Bool */;
2629 short int var10
/* : Bool */;
2630 short int var12
/* : Bool */;
2631 short int var14
/* : Bool */;
2632 short int var15
/* : Bool */;
2635 const char* var_class_name18
;
2636 val
* var19
/* : nullable AVisibility */;
2637 short int var20
/* : Bool */;
2638 short int var21
/* : Bool */;
2639 short int var23
/* : Bool */;
2640 short int var25
/* : Bool */;
2641 short int var26
/* : Bool */;
2644 const char* var_class_name29
;
2645 val
* var30
/* : AAtid */;
2646 short int var31
/* : Bool */;
2647 short int var33
/* : Bool */;
2648 short int var35
/* : Bool */;
2649 short int var36
/* : Bool */;
2652 const char* var_class_name39
;
2653 val
* var40
/* : nullable TOpar */;
2654 short int var41
/* : Bool */;
2655 short int var42
/* : Bool */;
2656 short int var44
/* : Bool */;
2657 short int var46
/* : Bool */;
2658 short int var47
/* : Bool */;
2661 const char* var_class_name50
;
2662 val
* var51
/* : ANodes[AExpr] */;
2663 val
* var53
/* : ANodes[AExpr] */;
2664 short int var54
/* : Bool */;
2665 val
* var55
/* : nullable TCpar */;
2666 short int var56
/* : Bool */;
2667 short int var57
/* : Bool */;
2668 short int var59
/* : Bool */;
2669 short int var61
/* : Bool */;
2670 short int var62
/* : Bool */;
2673 const char* var_class_name65
;
2674 val
* var66
/* : nullable AAnnotations */;
2675 short int var67
/* : Bool */;
2676 short int var68
/* : Bool */;
2677 short int var70
/* : Bool */;
2678 short int var72
/* : Bool */;
2679 short int var73
/* : Bool */;
2682 const char* var_class_name76
;
2685 var
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_doc
].val
; /* _n_doc on <self:AAnnotation> */
2687 var1
= 0; /* <var_old_child:ANode> cannot be null */
2689 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable ADoc> */
2690 var_other
= var_old_child
;
2692 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable ADoc(ADoc)> */
2693 var6
= var
== var_other
;
2706 /* <var_new_child:nullable ANode> isa nullable ADoc */
2707 cltype
= type_nullable__nit__ADoc
.color
;
2708 idtype
= type_nullable__nit__ADoc
.id
;
2709 if(var_new_child
== NULL
) {
2712 if(cltype
>= var_new_child
->type
->table_size
) {
2715 var7
= var_new_child
->type
->type_table
[cltype
] == idtype
;
2718 if (unlikely(!var7
)) {
2719 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2720 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable ADoc", var_class_name
);
2721 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6991);
2725 nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_doc_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_doc= on <self:AAnnotation>*/
2730 var8
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_kwredef
].val
; /* _n_kwredef on <self:AAnnotation> */
2732 var9
= 0; /* <var_old_child:ANode> cannot be null */
2734 { /* Inline kernel#Object#== (var8,var_old_child) on <var8:nullable TKwredef> */
2735 var_other
= var_old_child
;
2737 { /* Inline kernel#Object#is_same_instance (var8,var_other) on <var8:nullable TKwredef(TKwredef)> */
2738 var14
= var8
== var_other
;
2741 RET_LABEL13
:(void)0;
2746 RET_LABEL11
:(void)0;
2751 /* <var_new_child:nullable ANode> isa nullable TKwredef */
2752 cltype16
= type_nullable__nit__TKwredef
.color
;
2753 idtype17
= type_nullable__nit__TKwredef
.id
;
2754 if(var_new_child
== NULL
) {
2757 if(cltype16
>= var_new_child
->type
->table_size
) {
2760 var15
= var_new_child
->type
->type_table
[cltype16
] == idtype17
;
2763 if (unlikely(!var15
)) {
2764 var_class_name18
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2765 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TKwredef", var_class_name18
);
2766 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6995);
2770 nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_kwredef_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_kwredef= on <self:AAnnotation>*/
2775 var19
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_visibility
].val
; /* _n_visibility on <self:AAnnotation> */
2776 if (var19
== NULL
) {
2777 var20
= 0; /* <var_old_child:ANode> cannot be null */
2779 { /* Inline kernel#Object#== (var19,var_old_child) on <var19:nullable AVisibility> */
2780 var_other
= var_old_child
;
2782 { /* Inline kernel#Object#is_same_instance (var19,var_other) on <var19:nullable AVisibility(AVisibility)> */
2783 var25
= var19
== var_other
;
2786 RET_LABEL24
:(void)0;
2791 RET_LABEL22
:(void)0;
2796 /* <var_new_child:nullable ANode> isa nullable AVisibility */
2797 cltype27
= type_nullable__nit__AVisibility
.color
;
2798 idtype28
= type_nullable__nit__AVisibility
.id
;
2799 if(var_new_child
== NULL
) {
2802 if(cltype27
>= var_new_child
->type
->table_size
) {
2805 var26
= var_new_child
->type
->type_table
[cltype27
] == idtype28
;
2808 if (unlikely(!var26
)) {
2809 var_class_name29
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2810 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AVisibility", var_class_name29
);
2811 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 6999);
2815 nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_visibility_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_visibility= on <self:AAnnotation>*/
2820 var30
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_atid
].val
; /* _n_atid on <self:AAnnotation> */
2821 if (unlikely(var30
== NULL
)) {
2822 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_atid");
2823 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7002);
2827 { /* Inline kernel#Object#== (var30,var_old_child) on <var30:AAtid> */
2828 var_other
= var_old_child
;
2830 { /* Inline kernel#Object#is_same_instance (var30,var_other) on <var30:AAtid> */
2831 var35
= var30
== var_other
;
2834 RET_LABEL34
:(void)0;
2839 RET_LABEL32
:(void)0;
2843 /* <var_new_child:nullable ANode> isa AAtid */
2844 cltype37
= type_nit__AAtid
.color
;
2845 idtype38
= type_nit__AAtid
.id
;
2846 if(var_new_child
== NULL
) {
2849 if(cltype37
>= var_new_child
->type
->table_size
) {
2852 var36
= var_new_child
->type
->type_table
[cltype37
] == idtype38
;
2855 if (unlikely(!var36
)) {
2856 var_class_name39
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2857 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AAtid", var_class_name39
);
2858 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7003);
2862 nit__parser_prod___AAnnotation___n_atid_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_atid= on <self:AAnnotation>*/
2867 var40
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_opar
].val
; /* _n_opar on <self:AAnnotation> */
2868 if (var40
== NULL
) {
2869 var41
= 0; /* <var_old_child:ANode> cannot be null */
2871 { /* Inline kernel#Object#== (var40,var_old_child) on <var40:nullable TOpar> */
2872 var_other
= var_old_child
;
2874 { /* Inline kernel#Object#is_same_instance (var40,var_other) on <var40:nullable TOpar(TOpar)> */
2875 var46
= var40
== var_other
;
2878 RET_LABEL45
:(void)0;
2883 RET_LABEL43
:(void)0;
2888 /* <var_new_child:nullable ANode> isa nullable TOpar */
2889 cltype48
= type_nullable__nit__TOpar
.color
;
2890 idtype49
= type_nullable__nit__TOpar
.id
;
2891 if(var_new_child
== NULL
) {
2894 if(cltype48
>= var_new_child
->type
->table_size
) {
2897 var47
= var_new_child
->type
->type_table
[cltype48
] == idtype49
;
2900 if (unlikely(!var47
)) {
2901 var_class_name50
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2902 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TOpar", var_class_name50
);
2903 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7007);
2907 nit__parser_prod___AAnnotation___n_opar_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_opar= on <self:AAnnotation>*/
2913 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
2914 var53
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_args
].val
; /* _n_args on <self:AAnnotation> */
2915 if (unlikely(var53
== NULL
)) {
2916 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
2917 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2552);
2921 RET_LABEL52
:(void)0;
2925 var54
= nit___nit__ANodes___replace_child(var51
, var_old_child
, var_new_child
);
2931 var55
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_cpar
].val
; /* _n_cpar on <self:AAnnotation> */
2932 if (var55
== NULL
) {
2933 var56
= 0; /* <var_old_child:ANode> cannot be null */
2935 { /* Inline kernel#Object#== (var55,var_old_child) on <var55:nullable TCpar> */
2936 var_other
= var_old_child
;
2938 { /* Inline kernel#Object#is_same_instance (var55,var_other) on <var55:nullable TCpar(TCpar)> */
2939 var61
= var55
== var_other
;
2942 RET_LABEL60
:(void)0;
2947 RET_LABEL58
:(void)0;
2952 /* <var_new_child:nullable ANode> isa nullable TCpar */
2953 cltype63
= type_nullable__nit__TCpar
.color
;
2954 idtype64
= type_nullable__nit__TCpar
.id
;
2955 if(var_new_child
== NULL
) {
2958 if(cltype63
>= var_new_child
->type
->table_size
) {
2961 var62
= var_new_child
->type
->type_table
[cltype63
] == idtype64
;
2964 if (unlikely(!var62
)) {
2965 var_class_name65
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
2966 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable TCpar", var_class_name65
);
2967 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7012);
2971 nit__parser_prod___AAnnotation___n_cpar_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_cpar= on <self:AAnnotation>*/
2976 var66
= self
->attrs
[COLOR_nit__parser_nodes__Prod___n_annotations
].val
; /* _n_annotations on <self:AAnnotation> */
2977 if (var66
== NULL
) {
2978 var67
= 0; /* <var_old_child:ANode> cannot be null */
2980 { /* Inline kernel#Object#== (var66,var_old_child) on <var66:nullable AAnnotations> */
2981 var_other
= var_old_child
;
2983 { /* Inline kernel#Object#is_same_instance (var66,var_other) on <var66:nullable AAnnotations(AAnnotations)> */
2984 var72
= var66
== var_other
;
2987 RET_LABEL71
:(void)0;
2992 RET_LABEL69
:(void)0;
2997 /* <var_new_child:nullable ANode> isa nullable AAnnotations */
2998 cltype74
= type_nullable__nit__AAnnotations
.color
;
2999 idtype75
= type_nullable__nit__AAnnotations
.id
;
3000 if(var_new_child
== NULL
) {
3003 if(cltype74
>= var_new_child
->type
->table_size
) {
3006 var73
= var_new_child
->type
->type_table
[cltype74
] == idtype75
;
3009 if (unlikely(!var73
)) {
3010 var_class_name76
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
3011 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "nullable AAnnotations", var_class_name76
);
3012 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7016);
3016 nit__parser_prod___AAnnotation___nit__parser_nodes__Prod__n_annotations_61d(self
, var_new_child
); /* Direct call parser_prod#AAnnotation#n_annotations= on <self:AAnnotation>*/
3023 /* method parser_prod#AAnnotation#n_doc= for (self: AAnnotation, nullable ADoc) */
3024 void nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_doc_61d(val
* self
, val
* p0
) {
3025 val
* var_node
/* var node: nullable ADoc */;
3026 val
* var
/* : null */;
3027 short int var1
/* : Bool */;
3028 short int var2
/* : Bool */;
3029 val
* var_other
/* var other: nullable Object */;
3030 short int var4
/* : Bool */;
3031 short int var5
/* : Bool */;
3033 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_doc
].val
= var_node
; /* _n_doc on <self:AAnnotation> */
3035 if (var_node
== NULL
) {
3036 var1
= 0; /* is null */
3038 var1
= 1; /* arg is null and recv is not */
3041 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable ADoc> */
3044 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable ADoc(ADoc)>*/;
3055 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable ADoc(ADoc)> */
3056 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable ADoc(ADoc)> */
3064 /* method parser_prod#AAnnotation#n_kwredef= for (self: AAnnotation, nullable TKwredef) */
3065 void nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_kwredef_61d(val
* self
, val
* p0
) {
3066 val
* var_node
/* var node: nullable TKwredef */;
3067 val
* var
/* : null */;
3068 short int var1
/* : Bool */;
3069 short int var2
/* : Bool */;
3070 val
* var_other
/* var other: nullable Object */;
3071 short int var4
/* : Bool */;
3072 short int var5
/* : Bool */;
3074 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_kwredef
].val
= var_node
; /* _n_kwredef on <self:AAnnotation> */
3076 if (var_node
== NULL
) {
3077 var1
= 0; /* is null */
3079 var1
= 1; /* arg is null and recv is not */
3082 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TKwredef> */
3085 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TKwredef(TKwredef)>*/;
3096 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TKwredef(TKwredef)> */
3097 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TKwredef(TKwredef)> */
3105 /* method parser_prod#AAnnotation#n_visibility= for (self: AAnnotation, nullable AVisibility) */
3106 void nit__parser_prod___AAnnotation___nit__parser_nodes__ADefinition__n_visibility_61d(val
* self
, val
* p0
) {
3107 val
* var_node
/* var node: nullable AVisibility */;
3108 val
* var
/* : null */;
3109 short int var1
/* : Bool */;
3110 short int var2
/* : Bool */;
3111 val
* var_other
/* var other: nullable Object */;
3112 short int var4
/* : Bool */;
3113 short int var5
/* : Bool */;
3115 self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_visibility
].val
= var_node
; /* _n_visibility on <self:AAnnotation> */
3117 if (var_node
== NULL
) {
3118 var1
= 0; /* is null */
3120 var1
= 1; /* arg is null and recv is not */
3123 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AVisibility> */
3126 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable AVisibility(AVisibility)>*/;
3137 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AVisibility(AVisibility)> */
3138 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable AVisibility(AVisibility)> */
3146 /* method parser_prod#AAnnotation#n_atid= for (self: AAnnotation, AAtid) */
3147 void nit__parser_prod___AAnnotation___n_atid_61d(val
* self
, val
* p0
) {
3148 val
* var_node
/* var node: AAtid */;
3150 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_atid
].val
= var_node
; /* _n_atid on <self:AAnnotation> */
3152 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:AAtid> */
3153 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:AAtid> */
3159 /* method parser_prod#AAnnotation#n_opar= for (self: AAnnotation, nullable TOpar) */
3160 void nit__parser_prod___AAnnotation___n_opar_61d(val
* self
, val
* p0
) {
3161 val
* var_node
/* var node: nullable TOpar */;
3162 val
* var
/* : null */;
3163 short int var1
/* : Bool */;
3164 short int var2
/* : Bool */;
3165 val
* var_other
/* var other: nullable Object */;
3166 short int var4
/* : Bool */;
3167 short int var5
/* : Bool */;
3169 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_opar
].val
= var_node
; /* _n_opar on <self:AAnnotation> */
3171 if (var_node
== NULL
) {
3172 var1
= 0; /* is null */
3174 var1
= 1; /* arg is null and recv is not */
3177 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TOpar> */
3180 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TOpar(TOpar)>*/;
3191 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TOpar(TOpar)> */
3192 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TOpar(TOpar)> */
3200 /* method parser_prod#AAnnotation#n_cpar= for (self: AAnnotation, nullable TCpar) */
3201 void nit__parser_prod___AAnnotation___n_cpar_61d(val
* self
, val
* p0
) {
3202 val
* var_node
/* var node: nullable TCpar */;
3203 val
* var
/* : null */;
3204 short int var1
/* : Bool */;
3205 short int var2
/* : Bool */;
3206 val
* var_other
/* var other: nullable Object */;
3207 short int var4
/* : Bool */;
3208 short int var5
/* : Bool */;
3210 self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_cpar
].val
= var_node
; /* _n_cpar on <self:AAnnotation> */
3212 if (var_node
== NULL
) {
3213 var1
= 0; /* is null */
3215 var1
= 1; /* arg is null and recv is not */
3218 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable TCpar> */
3221 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable TCpar(TCpar)>*/;
3232 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable TCpar(TCpar)> */
3233 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable TCpar(TCpar)> */
3241 /* method parser_prod#AAnnotation#n_annotations= for (self: AAnnotation, nullable AAnnotations) */
3242 void nit__parser_prod___AAnnotation___nit__parser_nodes__Prod__n_annotations_61d(val
* self
, val
* p0
) {
3243 val
* var_node
/* var node: nullable AAnnotations */;
3244 val
* var
/* : null */;
3245 short int var1
/* : Bool */;
3246 short int var2
/* : Bool */;
3247 val
* var_other
/* var other: nullable Object */;
3248 short int var4
/* : Bool */;
3249 short int var5
/* : Bool */;
3251 self
->attrs
[COLOR_nit__parser_nodes__Prod___n_annotations
].val
= var_node
; /* _n_annotations on <self:AAnnotation> */
3253 if (var_node
== NULL
) {
3254 var1
= 0; /* is null */
3256 var1
= 1; /* arg is null and recv is not */
3259 { /* Inline kernel#Object#!= (var_node,var) on <var_node:nullable AAnnotations> */
3262 var4
= ((short int (*)(val
* self
, val
* p0
))(var_node
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var_node
, var_other
) /* == on <var_node:nullable AAnnotations(AAnnotations)>*/;
3273 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:nullable AAnnotations(AAnnotations)> */
3274 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:nullable AAnnotations(AAnnotations)> */
3282 /* method parser_prod#AAnnotation#visit_all for (self: AAnnotation, Visitor) */
3283 void nit__parser_prod___AAnnotation___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
3284 val
* var_v
/* var v: Visitor */;
3285 val
* var
/* : nullable ADoc */;
3286 val
* var1
/* : nullable TKwredef */;
3287 val
* var2
/* : nullable AVisibility */;
3288 val
* var3
/* : AAtid */;
3289 val
* var4
/* : nullable TOpar */;
3290 val
* var5
/* : ANodes[AExpr] */;
3291 val
* var7
/* : ANodes[AExpr] */;
3292 val
* var8
/* : nullable TCpar */;
3293 val
* var9
/* : nullable AAnnotations */;
3295 var
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_doc
].val
; /* _n_doc on <self:AAnnotation> */
3297 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3299 var1
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_kwredef
].val
; /* _n_kwredef on <self:AAnnotation> */
3301 nit___nit__Visitor___enter_visit(var_v
, var1
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3303 var2
= self
->attrs
[COLOR_nit__parser_nodes__ADefinition___n_visibility
].val
; /* _n_visibility on <self:AAnnotation> */
3305 nit___nit__Visitor___enter_visit(var_v
, var2
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3307 var3
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_atid
].val
; /* _n_atid on <self:AAnnotation> */
3308 if (unlikely(var3
== NULL
)) {
3309 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_atid");
3310 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7063);
3314 nit___nit__Visitor___enter_visit(var_v
, var3
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3316 var4
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_opar
].val
; /* _n_opar on <self:AAnnotation> */
3318 nit___nit__Visitor___enter_visit(var_v
, var4
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3321 { /* Inline parser_nodes#AAnnotation#n_args (self) on <self:AAnnotation> */
3322 var7
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_args
].val
; /* _n_args on <self:AAnnotation> */
3323 if (unlikely(var7
== NULL
)) {
3324 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_args");
3325 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 2552);
3333 nit___nit__ANodes___visit_all(var5
, var_v
); /* Direct call parser_nodes#ANodes#visit_all on <var5:ANodes[AExpr]>*/
3335 var8
= self
->attrs
[COLOR_nit__parser_nodes__AAnnotation___n_cpar
].val
; /* _n_cpar on <self:AAnnotation> */
3337 nit___nit__Visitor___enter_visit(var_v
, var8
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3339 var9
= self
->attrs
[COLOR_nit__parser_nodes__Prod___n_annotations
].val
; /* _n_annotations on <self:AAnnotation> */
3341 nit___nit__Visitor___enter_visit(var_v
, var9
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3345 /* method parser_prod#AIdAtid#init_aidatid for (self: AIdAtid, nullable TId) */
3346 void nit__parser_prod___AIdAtid___init_aidatid(val
* self
, val
* p0
) {
3347 val
* var_n_id
/* var n_id: nullable TId */;
3349 if (unlikely(var_n_id
== NULL
)) {
3350 PRINT_ERROR("Runtime error: %s", "Cast failed");
3351 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7075);
3354 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_n_id
; /* _n_id on <self:AIdAtid> */
3355 if (var_n_id
== NULL
) {
3356 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3357 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7076);
3360 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TId> */
3361 if (unlikely(var_n_id
== NULL
)) {
3362 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3363 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
3366 var_n_id
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_id:nullable TId> */
3372 /* method parser_prod#AIdAtid#replace_child for (self: AIdAtid, ANode, nullable ANode) */
3373 void nit__parser_prod___AIdAtid___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
3374 val
* var_old_child
/* var old_child: ANode */;
3375 val
* var_new_child
/* var new_child: nullable ANode */;
3376 val
* var
/* : Token */;
3377 short int var1
/* : Bool */;
3378 val
* var_other
/* var other: nullable Object */;
3379 short int var3
/* : Bool */;
3380 short int var5
/* : Bool */;
3381 short int var6
/* : Bool */;
3384 const char* var_class_name
;
3387 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AIdAtid> */
3388 if (unlikely(var
== NULL
)) {
3389 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3390 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7081);
3394 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
3395 var_other
= var_old_child
;
3397 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
3398 var5
= var
== var_other
;
3410 /* <var_new_child:nullable ANode> isa TId */
3411 cltype
= type_nit__TId
.color
;
3412 idtype
= type_nit__TId
.id
;
3413 if(var_new_child
== NULL
) {
3416 if(cltype
>= var_new_child
->type
->table_size
) {
3419 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
3422 if (unlikely(!var6
)) {
3423 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
3424 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TId", var_class_name
);
3425 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7082);
3429 nit__parser_prod___AIdAtid___nit__parser_nodes__AAtid__n_id_61d(self
, var_new_child
); /* Direct call parser_prod#AIdAtid#n_id= on <self:AIdAtid>*/
3436 /* method parser_prod#AIdAtid#n_id= for (self: AIdAtid, Token) */
3437 void nit__parser_prod___AIdAtid___nit__parser_nodes__AAtid__n_id_61d(val
* self
, val
* p0
) {
3438 val
* var_node
/* var node: Token */;
3440 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_node
; /* _n_id on <self:AIdAtid> */
3442 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
3443 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:Token> */
3449 /* method parser_prod#AIdAtid#visit_all for (self: AIdAtid, Visitor) */
3450 void nit__parser_prod___AIdAtid___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
3451 val
* var_v
/* var v: Visitor */;
3452 val
* var
/* : Token */;
3454 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AIdAtid> */
3455 if (unlikely(var
== NULL
)) {
3456 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3457 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7096);
3461 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3465 /* method parser_prod#AKwexternAtid#init_akwexternatid for (self: AKwexternAtid, nullable TKwextern) */
3466 void nit__parser_prod___AKwexternAtid___init_akwexternatid(val
* self
, val
* p0
) {
3467 val
* var_n_id
/* var n_id: nullable TKwextern */;
3469 if (unlikely(var_n_id
== NULL
)) {
3470 PRINT_ERROR("Runtime error: %s", "Cast failed");
3471 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7104);
3474 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_n_id
; /* _n_id on <self:AKwexternAtid> */
3475 if (var_n_id
== NULL
) {
3476 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3477 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7105);
3480 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TKwextern> */
3481 if (unlikely(var_n_id
== NULL
)) {
3482 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3483 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
3486 var_n_id
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_id:nullable TKwextern> */
3492 /* method parser_prod#AKwexternAtid#replace_child for (self: AKwexternAtid, ANode, nullable ANode) */
3493 void nit__parser_prod___AKwexternAtid___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
3494 val
* var_old_child
/* var old_child: ANode */;
3495 val
* var_new_child
/* var new_child: nullable ANode */;
3496 val
* var
/* : Token */;
3497 short int var1
/* : Bool */;
3498 val
* var_other
/* var other: nullable Object */;
3499 short int var3
/* : Bool */;
3500 short int var5
/* : Bool */;
3501 short int var6
/* : Bool */;
3504 const char* var_class_name
;
3507 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AKwexternAtid> */
3508 if (unlikely(var
== NULL
)) {
3509 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3510 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7110);
3514 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
3515 var_other
= var_old_child
;
3517 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
3518 var5
= var
== var_other
;
3530 /* <var_new_child:nullable ANode> isa TKwextern */
3531 cltype
= type_nit__TKwextern
.color
;
3532 idtype
= type_nit__TKwextern
.id
;
3533 if(var_new_child
== NULL
) {
3536 if(cltype
>= var_new_child
->type
->table_size
) {
3539 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
3542 if (unlikely(!var6
)) {
3543 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
3544 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwextern", var_class_name
);
3545 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7111);
3549 nit__parser_prod___AKwexternAtid___nit__parser_nodes__AAtid__n_id_61d(self
, var_new_child
); /* Direct call parser_prod#AKwexternAtid#n_id= on <self:AKwexternAtid>*/
3556 /* method parser_prod#AKwexternAtid#n_id= for (self: AKwexternAtid, Token) */
3557 void nit__parser_prod___AKwexternAtid___nit__parser_nodes__AAtid__n_id_61d(val
* self
, val
* p0
) {
3558 val
* var_node
/* var node: Token */;
3560 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_node
; /* _n_id on <self:AKwexternAtid> */
3562 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
3563 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:Token> */
3569 /* method parser_prod#AKwexternAtid#visit_all for (self: AKwexternAtid, Visitor) */
3570 void nit__parser_prod___AKwexternAtid___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
3571 val
* var_v
/* var v: Visitor */;
3572 val
* var
/* : Token */;
3574 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AKwexternAtid> */
3575 if (unlikely(var
== NULL
)) {
3576 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3577 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7125);
3581 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3585 /* method parser_prod#AKwabstractAtid#init_akwabstractatid for (self: AKwabstractAtid, nullable TKwabstract) */
3586 void nit__parser_prod___AKwabstractAtid___init_akwabstractatid(val
* self
, val
* p0
) {
3587 val
* var_n_id
/* var n_id: nullable TKwabstract */;
3589 if (unlikely(var_n_id
== NULL
)) {
3590 PRINT_ERROR("Runtime error: %s", "Cast failed");
3591 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7133);
3594 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_n_id
; /* _n_id on <self:AKwabstractAtid> */
3595 if (var_n_id
== NULL
) {
3596 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3597 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7134);
3600 { /* Inline parser_nodes#ANode#parent= (var_n_id,self) on <var_n_id:nullable TKwabstract> */
3601 if (unlikely(var_n_id
== NULL
)) {
3602 PRINT_ERROR("Runtime error: %s", "Receiver is null");
3603 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_nodes
, 36);
3606 var_n_id
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_n_id:nullable TKwabstract> */
3612 /* method parser_prod#AKwabstractAtid#replace_child for (self: AKwabstractAtid, ANode, nullable ANode) */
3613 void nit__parser_prod___AKwabstractAtid___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
3614 val
* var_old_child
/* var old_child: ANode */;
3615 val
* var_new_child
/* var new_child: nullable ANode */;
3616 val
* var
/* : Token */;
3617 short int var1
/* : Bool */;
3618 val
* var_other
/* var other: nullable Object */;
3619 short int var3
/* : Bool */;
3620 short int var5
/* : Bool */;
3621 short int var6
/* : Bool */;
3624 const char* var_class_name
;
3627 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AKwabstractAtid> */
3628 if (unlikely(var
== NULL
)) {
3629 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3630 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7139);
3634 { /* Inline kernel#Object#== (var,var_old_child) on <var:Token> */
3635 var_other
= var_old_child
;
3637 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:Token> */
3638 var5
= var
== var_other
;
3650 /* <var_new_child:nullable ANode> isa TKwabstract */
3651 cltype
= type_nit__TKwabstract
.color
;
3652 idtype
= type_nit__TKwabstract
.id
;
3653 if(var_new_child
== NULL
) {
3656 if(cltype
>= var_new_child
->type
->table_size
) {
3659 var6
= var_new_child
->type
->type_table
[cltype
] == idtype
;
3662 if (unlikely(!var6
)) {
3663 var_class_name
= var_new_child
== NULL ?
"null" : var_new_child
->type
->name
;
3664 PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "TKwabstract", var_class_name
);
3665 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7140);
3669 nit__parser_prod___AKwabstractAtid___nit__parser_nodes__AAtid__n_id_61d(self
, var_new_child
); /* Direct call parser_prod#AKwabstractAtid#n_id= on <self:AKwabstractAtid>*/
3676 /* method parser_prod#AKwabstractAtid#n_id= for (self: AKwabstractAtid, Token) */
3677 void nit__parser_prod___AKwabstractAtid___nit__parser_nodes__AAtid__n_id_61d(val
* self
, val
* p0
) {
3678 val
* var_node
/* var node: Token */;
3680 self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
= var_node
; /* _n_id on <self:AKwabstractAtid> */
3682 { /* Inline parser_nodes#ANode#parent= (var_node,self) on <var_node:Token> */
3683 var_node
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_node:Token> */
3689 /* method parser_prod#AKwabstractAtid#visit_all for (self: AKwabstractAtid, Visitor) */
3690 void nit__parser_prod___AKwabstractAtid___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
3691 val
* var_v
/* var v: Visitor */;
3692 val
* var
/* : Token */;
3694 var
= self
->attrs
[COLOR_nit__parser_nodes__AAtid___n_id
].val
; /* _n_id on <self:AKwabstractAtid> */
3695 if (unlikely(var
== NULL
)) {
3696 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_id");
3697 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7154);
3701 nit___nit__Visitor___enter_visit(var_v
, var
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3705 /* method parser_prod#Start#replace_child for (self: Start, ANode, nullable ANode) */
3706 void nit__parser_prod___Start___nit__parser_nodes__ANode__replace_child(val
* self
, val
* p0
, val
* p1
) {
3707 val
* var_old_child
/* var old_child: ANode */;
3708 val
* var_new_child
/* var new_child: nullable ANode */;
3709 val
* var
/* : nullable AModule */;
3710 short int var1
/* : Bool */;
3711 short int var2
/* : Bool */;
3712 val
* var_other
/* var other: nullable Object */;
3713 short int var4
/* : Bool */;
3714 short int var6
/* : Bool */;
3715 val
* var7
/* : null */;
3716 short int var8
/* : Bool */;
3717 short int var9
/* : Bool */;
3718 short int var11
/* : Bool */;
3719 short int var13
/* : Bool */;
3720 short int var15
/* : Bool */;
3723 val
* var16
/* : null */;
3726 var
= self
->attrs
[COLOR_nit__parser_nodes__Start___n_base
].val
; /* _n_base on <self:Start> */
3728 var1
= 0; /* <var_old_child:ANode> cannot be null */
3730 { /* Inline kernel#Object#== (var,var_old_child) on <var:nullable AModule> */
3731 var_other
= var_old_child
;
3733 { /* Inline kernel#Object#is_same_instance (var,var_other) on <var:nullable AModule(AModule)> */
3734 var6
= var
== var_other
;
3748 if (var_new_child
== NULL
) {
3749 var8
= 1; /* is null */
3751 var8
= 0; /* arg is null but recv is not */
3754 { /* Inline kernel#Object#== (var_new_child,var7) on <var_new_child:nullable ANode> */
3757 { /* Inline kernel#Object#is_same_instance (var_new_child,var_other) on <var_new_child:nullable ANode(ANode)> */
3758 var13
= var_new_child
== var_other
;
3761 RET_LABEL12
:(void)0;
3766 RET_LABEL10
:(void)0;
3773 { /* Inline parser_nodes#ANode#parent= (var_new_child,self) on <var_new_child:nullable ANode(ANode)> */
3774 var_new_child
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= self
; /* _parent on <var_new_child:nullable ANode(ANode)> */
3775 RET_LABEL14
:(void)0;
3778 /* <var_new_child:nullable ANode(ANode)> isa AModule */
3779 cltype
= type_nit__AModule
.color
;
3780 idtype
= type_nit__AModule
.id
;
3781 if(cltype
>= var_new_child
->type
->table_size
) {
3784 var15
= var_new_child
->type
->type_table
[cltype
] == idtype
;
3786 if (unlikely(!var15
)) {
3787 PRINT_ERROR("Runtime error: %s", "Assert failed");
3788 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7194);
3791 self
->attrs
[COLOR_nit__parser_nodes__Start___n_base
].val
= var_new_child
; /* _n_base on <self:Start> */
3795 { /* Inline parser_nodes#ANode#parent= (var_old_child,var16) on <var_old_child:ANode> */
3796 var_old_child
->attrs
[COLOR_nit__parser_nodes__ANode___parent
].val
= var16
; /* _parent on <var_old_child:ANode> */
3797 RET_LABEL17
:(void)0;
3805 /* method parser_prod#Start#visit_all for (self: Start, Visitor) */
3806 void nit__parser_prod___Start___nit__parser_nodes__ANode__visit_all(val
* self
, val
* p0
) {
3807 val
* var_v
/* var v: Visitor */;
3808 val
* var
/* : nullable AModule */;
3809 val
* var1
/* : null */;
3810 short int var2
/* : Bool */;
3811 short int var3
/* : Bool */;
3812 val
* var_other
/* var other: nullable Object */;
3813 short int var5
/* : Bool */;
3814 short int var6
/* : Bool */;
3815 val
* var7
/* : nullable AModule */;
3816 val
* var8
/* : EOF */;
3818 var
= self
->attrs
[COLOR_nit__parser_nodes__Start___n_base
].val
; /* _n_base on <self:Start> */
3821 var2
= 0; /* is null */
3823 var2
= 1; /* arg is null and recv is not */
3826 { /* Inline kernel#Object#!= (var,var1) on <var:nullable AModule> */
3829 var5
= ((short int (*)(val
* self
, val
* p0
))(var
->class->vft
[COLOR_standard__kernel__Object___61d_61d
]))(var
, var_other
) /* == on <var:nullable AModule(AModule)>*/;
3839 var7
= self
->attrs
[COLOR_nit__parser_nodes__Start___n_base
].val
; /* _n_base on <self:Start> */
3840 if (unlikely(var7
== NULL
)) {
3841 PRINT_ERROR("Runtime error: %s", "Cast failed");
3842 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7205);
3846 nit___nit__Visitor___enter_visit(var_v
, var7
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/
3850 var8
= self
->attrs
[COLOR_nit__parser_nodes__Start___n_eof
].val
; /* _n_eof on <self:Start> */
3851 if (unlikely(var8
== NULL
)) {
3852 PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _n_eof");
3853 PRINT_ERROR(" (%s:%d)\n", FILE_nit__parser_prod
, 7207);
3857 nit___nit__Visitor___enter_visit(var_v
, var8
); /* Direct call parser_nodes#Visitor#enter_visit on <var_v:Visitor>*/