Commit 8c0aa2d2 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixes: Parsing of block declarations in an @implementation block.

parent 4ef83082
......@@ -3763,10 +3763,26 @@ bool Parser::parseObjCMethodDefinitionList()
consumeToken();
break;
default:
// ### warning message
case T_SEMICOLON:
consumeToken();
break;
default:
if (LA() == T_EXTERN && LA(2) == T_STRING_LITERAL) {
DeclarationAST *declaration = 0;
parseDeclaration(declaration);
} else {
unsigned start = cursor();
DeclarationAST *declaration = 0;
if (! parseBlockDeclaration(declaration)) {
rewind(start);
_translationUnit->error(cursor(),
"skip token `%s'", tok().spell());
consumeToken();
}
}
break;
} // switch
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment