Commit 40eabdd0 authored by Roberto Raggi's avatar Roberto Raggi Committed by Roberto Raggi
Browse files

Improved parsing of objc message expressions.

parent 56b48c23
......@@ -2556,6 +2556,7 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
case T_SLOT:
return parseQtMethod(node);
case T_LBRACKET:
case T_AT_STRING_LITERAL:
case T_AT_ENCODE:
case T_AT_PROTOCOL:
......@@ -2680,16 +2681,19 @@ bool Parser::parseObjCMessageArguments()
unsigned start = cursor();
if (parseObjCSelectorArgs()) {
while (LA() == T_COMMA) {
consumeToken(); // skip T_COMMA
ExpressionAST *expression = 0;
parseAssignmentExpression(expression);
while (parseObjCSelectorArgs()) {
// accept the selector args.
}
return true;
} else {
rewind(start);
parseObjCSelector();
}
rewind(start);
parseObjCSelector();
while (LA() == T_COMMA) {
consumeToken(); // skip T_COMMA
ExpressionAST *expression = 0;
parseAssignmentExpression(expression);
}
return true;
}
......
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