struct _mesa_glsl_parse_state *state)
{
- if (mode == ast_return) {
+ switch (mode) {
+ case ast_return: {
ir_return *inst;
assert(state->current_function);
}
instructions->push_tail(inst);
+ break;
}
- if (mode == ast_discard) {
+ case ast_discard:
/* FINISHME: discard support */
if (state->target != fragment_shader) {
YYLTYPE loc = this->get_location();
_mesa_glsl_error(& loc, state,
"`discard' may only appear in a fragment shader");
}
+ break;
+
+ case ast_break:
+ case ast_continue:
+ break;
}
/* Jump instructions do not have r-values.