1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef QMLCODEPARSER_H |
5 | #define QMLCODEPARSER_H |
6 | |
7 | #include "codeparser.h" |
8 | |
9 | #include <QtCore/qset.h> |
10 | |
11 | #include <private/qqmljsengine_p.h> |
12 | #include <private/qqmljslexer_p.h> |
13 | #include <private/qqmljsparser_p.h> |
14 | |
15 | QT_BEGIN_NAMESPACE |
16 | |
17 | class Node; |
18 | class QString; |
19 | |
20 | class QmlCodeParser : public CodeParser |
21 | { |
22 | public: |
23 | QmlCodeParser() = default; |
24 | ~QmlCodeParser() override = default; |
25 | |
26 | void initializeParser() override {} |
27 | void terminateParser() override {} |
28 | QString language() override; |
29 | QStringList sourceFileNameFilter() override; |
30 | void parseSourceFile(const Location &location, const QString &filePath, CppCodeParser&) override; |
31 | |
32 | /* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */ |
33 | void (QString &script); |
34 | }; |
35 | |
36 | QT_END_NAMESPACE |
37 | |
38 | #endif |
39 | |