Commit 7b2b1827 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixes: Parsing of objc method definitions.

parent 8c0aa2d2
......@@ -3772,7 +3772,6 @@ bool Parser::parseObjCMethodDefinitionList()
DeclarationAST *declaration = 0;
parseDeclaration(declaration);
} else {
unsigned start = cursor();
DeclarationAST *declaration = 0;
if (! parseBlockDeclaration(declaration)) {
rewind(start);
......@@ -3791,10 +3790,12 @@ bool Parser::parseObjCMethodDefinitionList()
bool Parser::parseObjCMethodDefinition()
{
if (LA() != T_MINUS && LA() != T_PLUS)
if (! parseObjCMethodPrototype())
return false;
parseObjCMethodSignature();
if (LA() == T_SEMICOLON)
consumeToken();
StatementAST *function_body = 0;
parseFunctionBody(function_body);
return true;
......
Markdown is supported
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