Commit cefdb3da authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixed parsing of properties whose name is a C++ keyword.

Reviewed-by: Roberto Raggi
parent d2bb23e6
......@@ -1792,8 +1792,15 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
if (LA() == T_LPAREN) {
ast->lparen_token = consumeToken();
parseTypeId(ast->type_id);
SimpleNameAST *property_name = new (_pool) SimpleNameAST;
match(T_IDENTIFIER, &property_name->identifier_token);
// special case: keywords are allowed for property names!
if (tok().isKeyword()) {
property_name->identifier_token = consumeToken();
} else {
match(T_IDENTIFIER, &property_name->identifier_token);
}
ast->property_name = property_name;
QtPropertyDeclarationItemListAST **iter = &ast->property_declaration_items;
while (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