]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/parser.cpp
Remove support for the legacy stage change syntax
[libs/gl.git] / source / glsl / parser.cpp
index 7f0f8e138629f37ee03c67e2b60a1481e5e5b458..60cc3516b0750db9f131e8a665b135c89d7dab7b 100644 (file)
@@ -49,17 +49,6 @@ Module &Parser::parse(IO::Base &io, const string &n, unsigned i)
 
 void Parser::parse_source(const string &name)
 {
-       while(1)
-       {
-               string::size_type slashes = source.find("//////");
-               if(slashes==string::npos)
-                       break;
-
-               string::size_type newline = source.find('\n', slashes);
-               string pragma = format("#pragma MSP stage(%s)", source.substr(slashes+6, newline-slashes-6));
-               source.replace(slashes, newline-slashes, pragma);
-       }
-
        delete module;
        module = new Module;
        cur_stage = &module->shared;
@@ -78,7 +67,7 @@ void Parser::stage_change(Stage::Type stage)
        if(!allow_stage_change)
                throw invalid_shader_source(tokenizer.get_location(), "Changing stage not allowed here");
        else if(stage<=cur_stage->type)
-               throw invalid_shader_source(tokenizer.get_location(), "Stage '%s' not allowed here", stage);
+               throw invalid_shader_source(tokenizer.get_location(), "Stage '%s' not allowed here", Stage::get_stage_name(stage));
 
        module->stages.push_back(stage);