SWITCH '(' expression ')' switch_body
{
$$ = new(state) ast_switch_statement($3, $5);
+ $$->set_location(yylloc);
}
;
labels->labels.push_tail(& $1->link);
$$ = labels;
+ $$->set_location(yylloc);
}
| case_label_list case_label
{
case_label_list statement
{
ast_case_statement *stmts = new(state) ast_case_statement($1);
+ stmts->set_location(yylloc);
stmts->stmts.push_tail(& $2->link);
$$ = stmts;
case_statement
{
ast_case_statement_list *cases= new(state) ast_case_statement_list();
+ cases->set_location(yylloc);
cases->cases.push_tail(& $1->link);
$$ = cases;