From 36a0ea2bcbe306ef845549defb894f479b47a9a1 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 11:23:35 +0100 Subject: Removed DeclarationListAST node. Done with Erik Verbruggen --- src/shared/cplusplus/AST.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/shared/cplusplus/AST.cpp') diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index 18357aee9d..9cb2d1f742 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -552,21 +552,6 @@ unsigned CtorInitializerAST::lastToken() const return colon_token + 1; } -unsigned DeclarationListAST::firstToken() const -{ - return declaration->firstToken(); -} - -unsigned DeclarationListAST::lastToken() const -{ - for (const DeclarationListAST *it = this; it; it = it->next) { - if (! it->next) - return it->declaration->lastToken(); - } - - return 0; -} - unsigned DeclaratorAST::firstToken() const { if (attributes) @@ -1642,7 +1627,7 @@ unsigned TemplateTypeParameterAST::lastToken() const for (DeclarationListAST *it = template_parameters; it; it = it->next) { if (! it->next) - return it->declaration->lastToken(); + return it->value->lastToken(); } if (less_token) -- cgit v1.2.1