Commit 4c246763 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Removed ObjCMessageArgumentDeclarationListAST

Done with Erik Verbruggen
parent 98802456
......@@ -2155,28 +2155,6 @@ unsigned ObjCMessageArgumentDeclarationAST::lastToken() const
return 0;
}
unsigned ObjCMessageArgumentDeclarationListAST::firstToken() const
{
if (argument_declaration)
return argument_declaration->firstToken();
else if (next)
return next->firstToken();
else
// ### Assert?
return 0;
}
unsigned ObjCMessageArgumentDeclarationListAST::lastToken() const
{
for (const ObjCMessageArgumentDeclarationListAST *it = this; it; it = it->next) {
if (! it->next && it->argument_declaration) {
return it->argument_declaration->lastToken();
}
}
// ### assert?
return 0;
}
unsigned ObjCMethodPrototypeAST::firstToken() const
{
return method_type_token;
......
......@@ -2445,22 +2445,6 @@ protected:
virtual void accept0(ASTVisitor *visitor);
};
class CPLUSPLUS_EXPORT ObjCMessageArgumentDeclarationListAST: public AST
{
public:
ObjCMessageArgumentDeclarationAST *argument_declaration;
ObjCMessageArgumentDeclarationListAST *next;
public:
virtual ObjCMessageArgumentDeclarationListAST *asObjCMessageArgumentDeclarationList() { return this; }
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
protected:
virtual void accept0(ASTVisitor *visitor);
};
class CPLUSPLUS_EXPORT ObjCMethodPrototypeAST: public AST
{
public:
......
......@@ -1069,14 +1069,6 @@ void ObjCMessageArgumentDeclarationAST::accept0(ASTVisitor *visitor)
visitor->endVisit(this);
}
void ObjCMessageArgumentDeclarationListAST::accept0(ASTVisitor *visitor)
{
if (visitor->visit(this)) {
accept(argument_declaration, visitor);
}
visitor->endVisit(this);
}
void ObjCMethodPrototypeAST::accept0(ASTVisitor *visitor)
{
if (visitor->visit(this)) {
......
......@@ -131,7 +131,6 @@ class ObjCFastEnumerationAST;
class ObjCInstanceVariablesDeclarationAST;
class ObjCMessageArgumentAST;
class ObjCMessageArgumentDeclarationAST;
class ObjCMessageArgumentDeclarationListAST;
class ObjCMessageExpressionAST;
class ObjCMethodDeclarationAST;
class ObjCMethodPrototypeAST;
......@@ -201,6 +200,7 @@ typedef List<NameAST *> ObjCIdentifierListAST;
typedef List<ObjCMessageArgumentAST *> ObjCMessageArgumentListAST;
typedef List<ObjCSelectorArgumentAST *> ObjCSelectorArgumentListAST;
typedef List<ObjCPropertyAttributeAST *> ObjCPropertyAttributeListAST;
typedef List<ObjCMessageArgumentDeclarationAST *> ObjCMessageArgumentDeclarationListAST;
typedef ExpressionListAST TemplateArgumentListAST;
......
......@@ -267,7 +267,7 @@ bool CheckDeclarator::visit(ObjCMethodPrototypeAST *ast)
if (ast->selector && ast->selector->asObjCSelectorWithArguments()) {
// TODO: add arguments (EV)
for (ObjCMessageArgumentDeclarationListAST *it = ast->arguments; it; it = it->next) {
ObjCMessageArgumentDeclarationAST *argDecl = it->argument_declaration;
ObjCMessageArgumentDeclarationAST *argDecl = it->value;
semantic()->check(argDecl, method->arguments());
}
......
......@@ -4899,7 +4899,7 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
sel->selector_arguments->value = argument;
ast->arguments = new (_pool) ObjCMessageArgumentDeclarationListAST;
ast->arguments->argument_declaration = declaration;
ast->arguments->value = declaration;
ObjCMessageArgumentDeclarationListAST *lastArg = ast->arguments;
while (parseObjCKeywordDeclaration(argument, declaration)) {
......@@ -4909,7 +4909,7 @@ bool Parser::parseObjCMethodPrototype(ObjCMethodPrototypeAST *&node)
lastArg->next = new (_pool) ObjCMessageArgumentDeclarationListAST;
lastArg = lastArg->next;
lastArg->argument_declaration = declaration;
lastArg->value = declaration;
}
while (LA() == T_COMMA) {
......
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