From 21fdc2d06af7d8bfbdf7f7a97efb4fa13a55a179 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Wed, 17 Feb 2010 16:25:12 +0100 Subject: [PATCH] Replaced usages of concrete type SimpleNameAST with the abstract NameAST. --- src/shared/cplusplus/AST.h | 4 ++-- src/shared/cplusplus/Parser.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h index 2072af3e167..cccba947eeb 100644 --- a/src/shared/cplusplus/AST.h +++ b/src/shared/cplusplus/AST.h @@ -577,7 +577,7 @@ public: unsigned property_specifier_token; unsigned lparen_token; ExpressionAST *type_id; - SimpleNameAST *property_name; + NameAST *property_name; QtPropertyDeclarationItemListAST *property_declaration_items; unsigned rparen_token; @@ -2931,7 +2931,7 @@ class CPLUSPLUS_EXPORT ObjCMessageArgumentDeclarationAST: public AST public: ObjCTypeNameAST* type_name; SpecifierListAST *attribute_list; - SimpleNameAST *param_name; + NameAST *param_name; public: // annotations Argument *argument; diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 845fabcfe50..08ff9615d13 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -1792,8 +1792,9 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node) if (LA() == T_LPAREN) { ast->lparen_token = consumeToken(); parseTypeId(ast->type_id); - ast->property_name = new (_pool) SimpleNameAST; - match(T_IDENTIFIER, &ast->property_name->identifier_token); + SimpleNameAST *property_name = new (_pool) SimpleNameAST; + match(T_IDENTIFIER, &property_name->identifier_token); + ast->property_name = property_name; QtPropertyDeclarationItemListAST **iter = &ast->property_declaration_items; while (true) { if (LA() == T_RPAREN) { @@ -5277,8 +5278,9 @@ bool Parser::parseObjCKeywordDeclaration(ObjCSelectorArgumentAST *&argument, Obj while (parseAttributeSpecifier(*attr)) attr = &(*attr)->next; - node->param_name = new (_pool) SimpleNameAST; - match(T_IDENTIFIER, &node->param_name->identifier_token); + SimpleNameAST *param_name = new (_pool) SimpleNameAST; + match(T_IDENTIFIER, ¶m_name->identifier_token); + node->param_name = param_name; return true; } -- GitLab