summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-11-10 12:49:49 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2009-11-10 16:20:11 +0100
commit86a8812beb9b122c37e474810dbf43567d727cac (patch)
treedfb623f6c2ec110bdce1cc8a869ebba67ac3b0cd /src/shared/cplusplus
parent4c246763627cbc69b09ebe2ac1ea8be16669569f (diff)
downloadqt-creator-86a8812beb9b122c37e474810dbf43567d727cac.tar.gz
Removed ObjCSynthesizedPropertyAST
Done with Erik Verbruggen
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/AST.cpp19
-rw-r--r--src/shared/cplusplus/AST.h16
-rw-r--r--src/shared/cplusplus/ASTVisit.cpp8
-rw-r--r--src/shared/cplusplus/ASTfwd.h2
-rw-r--r--src/shared/cplusplus/Parser.cpp16
5 files changed, 9 insertions, 52 deletions
diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp
index ccab8122b6..0ef6f91f4a 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 fc884741db..da2c9d1fae 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 b6d1815197..aea713c4c7 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 7db518e87d..d38aafc128 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 cec6388eee..40581cc9e9 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));
}
}