@@ -327,7 +327,7 @@ type asm_qualifier =
327
327
% type < (Symbol. identifier, Cabs. type_name) Cn. cn_function> cn_function
328
328
% type < (Symbol. identifier, Cabs. type_name) Cn. cn_predicate> cn_predicate
329
329
% type < (Symbol. identifier) Cn. cn_datatype> cn_datatype
330
- % type < (Symbol. identifier, Cabs. type_name) Cn. cn_clauses> clauses
330
+ % type < (Symbol. identifier, Cabs. type_name) Cn. cn_clauses> clauses if_clauses
331
331
% type < (Symbol. identifier, Cabs. type_name) Cn. cn_clause> clause
332
332
% type < (Symbol. identifier, Cabs. type_name) Cn. cn_resource> resource
333
333
% type < (Symbol. identifier, Cabs. type_name) Cn. cn_pred> pred
@@ -2318,12 +2318,18 @@ cons_args:
2318
2318
{ xs }
2319
2319
2320
2320
2321
+ if_clauses:
2322
+ | LBRACE cs= clauses RBRACE
2323
+ { cs }
2324
+ | IF LPAREN e= expr RPAREN LBRACE c= clause SEMICOLON RBRACE ELSE cs = if_clauses
2325
+ { Cerb_frontend.Cn. CN_if (region $ loc noCursor, e, c, cs) }
2326
+ ;
2327
+
2321
2328
clauses:
2322
2329
| c= clause SEMICOLON
2323
2330
{ Cerb_frontend.Cn. CN_clause (region $ loc noCursor, c) }
2324
- | IF LPAREN e= expr RPAREN LBRACE c= clause SEMICOLON RBRACE ELSE LBRACE cs= clauses RBRACE
2325
- { Cerb_frontend.Cn. CN_if (region $ loc noCursor, e, c, cs) }
2326
- ;
2331
+ | c= if_clauses
2332
+ { c }
2327
2333
2328
2334
cn_option_func_body:
2329
2335
| cn_func_body= delimited(LBRACE , expr, RBRACE )
0 commit comments