forked from qt-creator/qt-creator
Removed ObjCSynthesizedPropertyAST
Done with Erik Verbruggen
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user