diff options
author | Eric Anholt <[email protected]> | 2012-01-30 09:46:09 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-02-03 11:06:59 +0100 |
commit | 01a5a2c9d761d4c9d72c236084efee700dcb28b8 (patch) | |
tree | 8a54ecf6f8c8fccd0cfdc2d46f2ddbac75adab07 /src/glsl | |
parent | 663dcbbffeaedf0643e7e9d930ccfbcd698d1d9c (diff) |
glsl: Add other missing error location information for switch statements.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_parser.yy | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 8368d063a6d..d5e85abc021 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -1671,6 +1671,7 @@ switch_statement: SWITCH '(' expression ')' switch_body { $$ = new(state) ast_switch_statement($3, $5); + $$->set_location(yylloc); } ; @@ -1707,6 +1708,7 @@ case_label_list: labels->labels.push_tail(& $1->link); $$ = labels; + $$->set_location(yylloc); } | case_label_list case_label { @@ -1719,6 +1721,7 @@ case_statement: 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; @@ -1734,6 +1737,7 @@ case_statement_list: case_statement { ast_case_statement_list *cases= new(state) ast_case_statement_list(); + cases->set_location(yylloc); cases->cases.push_tail(& $1->link); $$ = cases; |