File indexing completed on 2024-05-19 15:42:34
0001 /* 0002 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0003 SPDX-FileCopyrightText: 2010-2011 Sven Brauch <svenbrauch@googlemail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef ASTBUILDER_H 0009 #define ASTBUILDER_H 0010 0011 #include "ast.h" 0012 #include "parserexport.h" 0013 0014 #include <QUrl> 0015 #include "astdefaultvisitor.h" 0016 0017 #include <language/duchain/topducontext.h> 0018 0019 typedef struct _object PyObject; 0020 0021 namespace PythonParser 0022 { 0023 class Parser; 0024 class AstNode; 0025 } 0026 0027 namespace Python 0028 { 0029 class Ast; 0030 class CodeAst; 0031 0032 QString PyUnicodeObjectToQString(PyObject* obj); 0033 0034 class KDEVPYTHONPARSER_EXPORT AstBuilder 0035 { 0036 public: 0037 CodeAst::Ptr parse(const QUrl& filename, QString &contents); 0038 QList<KDevelop::ProblemPointer> m_problems; 0039 private: 0040 static QMutex pyInitLock; 0041 }; 0042 0043 } 0044 0045 #endif