File indexing completed on 2024-04-21 12:09:18

0001 /***************************************************************************
0002  *   This file is part of KDevelop                                         *
0003  *   Copyright 2010 Niko Sams <niko.sams@gmail.com>                        *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU Library General Public License as       *
0007  *   published by the Free Software Foundation; either version 2 of the    *
0008  *   License, or (at your option) any later version.                       *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU Library General Public     *
0016  *   License along with this program; if not, write to the                 *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
0019  ***************************************************************************/
0020 
0021 #ifndef DECLARATIONBUILDER_H
0022 #define DECLARATIONBUILDER_H
0023 
0024 #include "contextbuilder.h"
0025 #include <language/duchain/builders/abstractdeclarationbuilder.h>
0026 
0027 namespace KDvelop
0028 {
0029 class Declaration;
0030 }
0031 namespace Css
0032 {
0033 class ParseSession;
0034 class EditorIntegrator;
0035 
0036 typedef KDevelop::AbstractDeclarationBuilder<AstNode, SpecifierAst, ContextBuilder> DeclarationBuilderBase;
0037 
0038 class DeclarationBuilder : public DeclarationBuilderBase
0039 {
0040 public:
0041     DeclarationBuilder(EditorIntegrator* editor) {
0042         setEditor(editor);
0043     }
0044     DeclarationBuilder() {}
0045 protected:
0046     void visitRuleset(RulesetAst* node) override;
0047 
0048     void closeDeclaration() override;
0049 };
0050 
0051 }
0052 
0053 #endif // DECLARATIONBUILDER_H
0054