Parse ObjC identifier list.

This commit is contained in:
Roberto Raggi
2009-01-08 12:08:06 +01:00
parent a725915ee0
commit 7b3bcfa5fa

View File

@@ -3328,6 +3328,21 @@ bool Parser::parseObjCPropertyDynamic(DeclarationAST *&node)
bool Parser::parseObjCIdentifierList(IdentifierListAST *&node)
{
if (LA() == T_IDENTIFIER) {
IdentifierListAST **it = &node;
IdentifierListAST *id = new (_pool) IdentifierListAST;
id->identifier_token = consumeToken();
*it = id;
while (LA() == T_COMMA) {
consumeToken();
if (LA() == T_IDENTIFIER) {
it = &(*it)->next;
IdentifierListAST *id = new (_pool) IdentifierListAST;
id->identifier_token = consumeToken();
*it = id;
}
}
}
return false;
}