X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramparser.cpp;h=393936624556df0a0c9fe5b2fef6a8576a1f5b0c;hp=4f08b97718d26afe4ab1b41b60af3ee5f737d70b;hb=ca52c492bd4f2fa1a1db3a85e50eaf7c43474830;hpb=ef9ffbc287417520d223ce29dc6c2de110cac945 diff --git a/source/programparser.cpp b/source/programparser.cpp index 4f08b977..39393662 100644 --- a/source/programparser.cpp +++ b/source/programparser.cpp @@ -112,7 +112,7 @@ void ProgramParser::parse_source() source_end = source.end(); current_line = 1; allow_preprocess = true; - while(RefPtr statement = parse_global_declaration()) + while(RefPtr statement = parse_global_declaration()) cur_stage->content.body.push_back(statement); } @@ -426,7 +426,7 @@ void ProgramParser::preprocess_stage() cur_stage = &module->stages.back(); } -RefPtr ProgramParser::parse_global_declaration() +RefPtr ProgramParser::parse_global_declaration() { allow_stage_change = true; string token = peek_token(); @@ -480,7 +480,7 @@ RefPtr ProgramParser::parse_global_declaration() throw runtime_error(format_syntax_error("a global declaration")); } -RefPtr ProgramParser::parse_statement() +RefPtr ProgramParser::parse_statement() { string token = peek_token(); if(token=="if") @@ -522,7 +522,7 @@ RefPtr ProgramParser::parse_import() expect("import"); RefPtr import = new Import; - import->module = parse_token(); + import->module = expect_identifier(); expect(";"); return import; }