cur_stage->required_version = ver;
}
-void Parser::stage_change(StageType stage)
+void Parser::stage_change(Stage::Type stage)
{
if(!allow_stage_change)
throw invalid_shader_source(tokenizer.get_location(), "Changing stage not allowed here");
module->stages.push_back(stage);
- if(cur_stage->type!=SHARED)
+ if(cur_stage->type!=Stage::SHARED)
module->stages.back().previous = cur_stage;
cur_stage = &module->stages.back();
}
RefPtr<Import> Parser::parse_import()
{
- if(cur_stage->type!=SHARED)
+ if(cur_stage->type!=Stage::SHARED)
throw invalid_shader_source(tokenizer.get_location(), "Imports are only allowed in the shared section");
tokenizer.expect("import");
RefPtr<Passthrough> pass = new Passthrough;
pass->source = source_index;
pass->line = tokenizer.get_location().line;
- if(cur_stage->type==GEOMETRY)
+ if(cur_stage->type==Stage::GEOMETRY)
{
tokenizer.expect("[");
pass->subscript = parse_expression();