diff --git a/src/parse.c b/src/parse.c index c9638ba19bca..58660af02b61 100644 --- a/src/parse.c +++ b/src/parse.c @@ -669,7 +669,16 @@ Dsymbols *Parser::parseDeclDefs(int once, Dsymbol **pLastDecl, PrefixAttributes if ((pAttrs->protection.kind == PROTpackage) && (token.value == TOKlparen)) { pkg_prot_idents = parseQualifiedIdentifier("protection package"); - check(TOKrparen); + + if (pkg_prot_idents) + check(TOKrparen); + else + { + while (token.value != TOKsemicolon && token.value != TOKeof) + nextToken(); + nextToken(); + break; + } } } @@ -1245,6 +1254,8 @@ Identifiers* Parser::parseQualifiedIdentifier(const char* entity) entity, token.toChars() ); + + return NULL; } Identifier *id = token.ident;