Commit c00e3018 authored by Roberto Raggi's avatar Roberto Raggi Committed by Roberto Raggi
Browse files

Fixes: Parsing objc method definitions.

parent f9737ddc
......@@ -3744,6 +3744,42 @@ bool Parser::parseObjCImplementation(DeclarationAST *&)
}
parseObjClassInstanceVariables();
parseObjCMethodDefinitionList();
return true;
}
bool Parser::parseObjCMethodDefinitionList()
{
while (LA() && LA() != T_AT_END) {
unsigned start = cursor();
switch (LA()) {
case T_PLUS:
case T_MINUS:
parseObjCMethodDefinition();
if (start == cursor())
consumeToken();
break;
default:
// ### warning message
consumeToken();
break;
} // switch
}
return true;
}
bool Parser::parseObjCMethodDefinition()
{
if (LA() != T_MINUS && LA() != T_PLUS)
return false;
parseObjCMethodSignature();
StatementAST *function_body = 0;
parseFunctionBody(function_body);
return true;
}
......
......@@ -230,6 +230,8 @@ public:
bool parseObjCMessageReceiver();
bool parseObjCMessageArguments();
bool parseObjCSelectorArgs();
bool parseObjCMethodDefinitionList();
bool parseObjCMethodDefinition();
bool parseObjCProtocolRefs();
bool parseObjClassInstanceVariables();
......
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