forked from qt-creator/qt-creator
Fixes: Parsing of objc method definitions.
This commit is contained in:
@@ -3772,7 +3772,6 @@ bool Parser::parseObjCMethodDefinitionList()
|
|||||||
DeclarationAST *declaration = 0;
|
DeclarationAST *declaration = 0;
|
||||||
parseDeclaration(declaration);
|
parseDeclaration(declaration);
|
||||||
} else {
|
} else {
|
||||||
unsigned start = cursor();
|
|
||||||
DeclarationAST *declaration = 0;
|
DeclarationAST *declaration = 0;
|
||||||
if (! parseBlockDeclaration(declaration)) {
|
if (! parseBlockDeclaration(declaration)) {
|
||||||
rewind(start);
|
rewind(start);
|
||||||
@@ -3791,10 +3790,12 @@ bool Parser::parseObjCMethodDefinitionList()
|
|||||||
|
|
||||||
bool Parser::parseObjCMethodDefinition()
|
bool Parser::parseObjCMethodDefinition()
|
||||||
{
|
{
|
||||||
if (LA() != T_MINUS && LA() != T_PLUS)
|
if (! parseObjCMethodPrototype())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
parseObjCMethodSignature();
|
if (LA() == T_SEMICOLON)
|
||||||
|
consumeToken();
|
||||||
|
|
||||||
StatementAST *function_body = 0;
|
StatementAST *function_body = 0;
|
||||||
parseFunctionBody(function_body);
|
parseFunctionBody(function_body);
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user