X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fparser.cpp;h=31f9fcb65cc7ffe4da48cacd8cc41e0c7787dba5;hp=0c3a5e35a57a35033024989aa96076b06bd141cd;hb=6dcf74922f46b086ad394c19fd6ce083a635b290;hpb=713ff9619daa858ffbd428f7699cd57598563dbd diff --git a/source/glsl/parser.cpp b/source/glsl/parser.cpp index 0c3a5e35..31f9fcb6 100644 --- a/source/glsl/parser.cpp +++ b/source/glsl/parser.cpp @@ -294,6 +294,8 @@ RefPtr Parser::parse_global_declaration() } else if(is_qualifier(token)) return parse_variable_declaration(); + else if(token=="virtual") + return parse_function_declaration(); else if(is_type(token)) { if(tokenizer.peek_token(2)=="(") @@ -750,6 +752,7 @@ RefPtr Parser::parse_function_declaration() { RefPtr func = create_node(); + func->virtua = check("virtual"); func->return_type = expect_type(); func->name = expect_identifier(); tokenizer.expect("("); @@ -768,6 +771,8 @@ RefPtr Parser::parse_function_declaration() } tokenizer.expect(")"); + func->overrd = check("override"); + string token = tokenizer.peek_token(); if(token=="{") {