Browse Source

glsl: Add other missing error location information for switch statements.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
tags/i965-primitive-restart-v2
Eric Anholt 13 years ago
parent
commit
01a5a2c9d7
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/glsl/glsl_parser.yy

+ 4
- 0
src/glsl/glsl_parser.yy View File

SWITCH '(' expression ')' switch_body SWITCH '(' expression ')' switch_body
{ {
$$ = new(state) ast_switch_statement($3, $5); $$ = new(state) ast_switch_statement($3, $5);
$$->set_location(yylloc);
} }
; ;




labels->labels.push_tail(& $1->link); labels->labels.push_tail(& $1->link);
$$ = labels; $$ = labels;
$$->set_location(yylloc);
} }
| case_label_list case_label | case_label_list case_label
{ {
case_label_list statement case_label_list statement
{ {
ast_case_statement *stmts = new(state) ast_case_statement($1); ast_case_statement *stmts = new(state) ast_case_statement($1);
stmts->set_location(yylloc);


stmts->stmts.push_tail(& $2->link); stmts->stmts.push_tail(& $2->link);
$$ = stmts; $$ = stmts;
case_statement case_statement
{ {
ast_case_statement_list *cases= new(state) ast_case_statement_list(); ast_case_statement_list *cases= new(state) ast_case_statement_list();
cases->set_location(yylloc);


cases->cases.push_tail(& $1->link); cases->cases.push_tail(& $1->link);
$$ = cases; $$ = cases;

Loading…
Cancel
Save