diff --git a/generator/parser/parser.cpp b/generator/parser/parser.cpp index f1a09071f..408de0091 100644 --- a/generator/parser/parser.cpp +++ b/generator/parser/parser.cpp @@ -168,6 +168,7 @@ void Parser::tokenRequiredError(int token) err += token_name(token_stream.lookAhead()); err += "''"; + reportError(err); } @@ -1935,7 +1936,7 @@ bool Parser::parseClassSpecifier(TypeSpecifierAST *&node) NameAST *name = 0; parseName(name, true); - + BaseClauseAST *bases = 0; if (token_stream.lookAhead() == ':') @@ -3165,11 +3166,14 @@ bool Parser::parseDeclarationInternal(DeclarationAST *&node) WinDeclSpecAST *winDeclSpec = 0; parseWinDeclSpec(winDeclSpec); + const ListNode* cv = 0; + parseCvQualify(cv); + const ListNode *funSpec = 0; bool hasFunSpec = parseFunctionSpecifier(funSpec); - const ListNode *cv = 0; - parseCvQualify(cv); + if (!cv) + parseCvQualify(cv); const ListNode *storageSpec = 0; bool hasStorageSpec = parseStorageClassSpecifier(storageSpec);