diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index ccab8122b6fdb6f5ae9a5e1af32aa115099c66c0..0ef6f91f4a355614d8cbcb5ff53f09ece29c1076 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -2207,25 +2207,6 @@ unsigned ObjCSynthesizedPropertyAST::lastToken() const return property_identifier + 1; } -unsigned ObjCSynthesizedPropertyListAST::firstToken() const -{ - if (synthesized_property) - return synthesized_property->firstToken(); - // ### assert? - return 0; -} - -unsigned ObjCSynthesizedPropertyListAST::lastToken() const -{ - for (const ObjCSynthesizedPropertyListAST *it = this; it; it = it->next) { - if (! it->next && it->synthesized_property) { - return it->synthesized_property->lastToken(); - } - } - // ### assert? - return 0; -} - unsigned ObjCSynthesizedPropertiesDeclarationAST::firstToken() const { return synthesized_token; diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h index fc884741db9c79abf79856f25f3955eacc49ead4..da2c9d1fae6fd7c2ae8c36b6c118f1f065bf3e3c 100644 --- a/src/shared/cplusplus/AST.h +++ b/src/shared/cplusplus/AST.h @@ -2502,22 +2502,6 @@ protected: virtual void accept0(ASTVisitor *visitor); }; -class CPLUSPLUS_EXPORT ObjCSynthesizedPropertyListAST: public AST -{ -public: - ObjCSynthesizedPropertyAST *synthesized_property; - ObjCSynthesizedPropertyListAST *next; - -public: - virtual ObjCSynthesizedPropertyListAST *asObjCSynthesizedPropertyList() { return this; } - - virtual unsigned firstToken() const; - virtual unsigned lastToken() const; - -protected: - virtual void accept0(ASTVisitor *visitor); -}; - class CPLUSPLUS_EXPORT ObjCSynthesizedPropertiesDeclarationAST: public DeclarationAST { public: diff --git a/src/shared/cplusplus/ASTVisit.cpp b/src/shared/cplusplus/ASTVisit.cpp index b6d18151973b90b22641d949b52faad05fa09eb0..aea713c4c75fe058e7341b8f29e4b28307fdb29b 100644 --- a/src/shared/cplusplus/ASTVisit.cpp +++ b/src/shared/cplusplus/ASTVisit.cpp @@ -1098,14 +1098,6 @@ void ObjCSynthesizedPropertyAST::accept0(ASTVisitor *visitor) visitor->endVisit(this); } -void ObjCSynthesizedPropertyListAST::accept0(ASTVisitor *visitor) -{ - if (visitor->visit(this)) { - accept(synthesized_property, visitor); - } - visitor->endVisit(this); -} - void ObjCSynthesizedPropertiesDeclarationAST::accept0(ASTVisitor *visitor) { if (visitor->visit(this)) { diff --git a/src/shared/cplusplus/ASTfwd.h b/src/shared/cplusplus/ASTfwd.h index 7db518e87df0ad299b28de568d7907cf8bad3c25..d38aafc128cb21f59d2655b364c2e417f7cbf649 100644 --- a/src/shared/cplusplus/ASTfwd.h +++ b/src/shared/cplusplus/ASTfwd.h @@ -148,7 +148,6 @@ class ObjCSelectorWithoutArgumentsAST; class ObjCSynchronizedStatementAST; class ObjCSynthesizedPropertiesDeclarationAST; class ObjCSynthesizedPropertyAST; -class ObjCSynthesizedPropertyListAST; class ObjCTypeNameAST; class ObjCVisibilityDeclarationAST; class OperatorAST; @@ -201,6 +200,7 @@ typedef List<ObjCMessageArgumentAST *> ObjCMessageArgumentListAST; typedef List<ObjCSelectorArgumentAST *> ObjCSelectorArgumentListAST; typedef List<ObjCPropertyAttributeAST *> ObjCPropertyAttributeListAST; typedef List<ObjCMessageArgumentDeclarationAST *> ObjCMessageArgumentDeclarationListAST; +typedef List<ObjCSynthesizedPropertyAST *> ObjCSynthesizedPropertyListAST; typedef ExpressionListAST TemplateArgumentListAST; diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index cec6388eeef512c602ac4caa4e0bbfef6bb7ec0b..40581cc9e9163e43275163a3044221256000a8c9 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -4577,13 +4577,13 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node) ast->synthesized_token = consumeToken(); ObjCSynthesizedPropertyListAST *last = new (_pool) ObjCSynthesizedPropertyListAST; ast->property_identifiers = last; - last->synthesized_property = new (_pool) ObjCSynthesizedPropertyAST; - match(T_IDENTIFIER, &(last->synthesized_property->property_identifier)); + last->value = new (_pool) ObjCSynthesizedPropertyAST; + match(T_IDENTIFIER, &(last->value->property_identifier)); if (LA() == T_EQUAL) { - last->synthesized_property->equals_token = consumeToken(); + last->value->equals_token = consumeToken(); - match(T_IDENTIFIER, &(last->synthesized_property->property_alias_identifier)); + match(T_IDENTIFIER, &(last->value->property_alias_identifier)); } while (LA() == T_COMMA) { @@ -4592,13 +4592,13 @@ bool Parser::parseObjCMethodDefinitionList(DeclarationListAST *&node) last->next = new (_pool) ObjCSynthesizedPropertyListAST; last = last->next; - last->synthesized_property = new (_pool) ObjCSynthesizedPropertyAST; - match(T_IDENTIFIER, &(last->synthesized_property->property_identifier)); + last->value = new (_pool) ObjCSynthesizedPropertyAST; + match(T_IDENTIFIER, &(last->value->property_identifier)); if (LA() == T_EQUAL) { - last->synthesized_property->equals_token = consumeToken(); + last->value->equals_token = consumeToken(); - match(T_IDENTIFIER, &(last->synthesized_property->property_alias_identifier)); + match(T_IDENTIFIER, &(last->value->property_alias_identifier)); } }