| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/parser/qqmljsengine_p.h |
| Source code | Switch to Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | /**************************************************************************** | - |
| 2 | ** | - |
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | - |
| 4 | ** Contact: https://www.qt.io/licensing/ | - |
| 5 | ** | - |
| 6 | ** This file is part of the QtQml module of the Qt Toolkit. | - |
| 7 | ** | - |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
| 9 | ** Commercial License Usage | - |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
| 11 | ** accordance with the commercial license agreement provided with the | - |
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | - |
| 16 | ** | - |
| 17 | ** GNU Lesser General Public License Usage | - |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
| 19 | ** General Public License version 3 as published by the Free Software | - |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - |
| 21 | ** packaging of this file. Please review the following information to | - |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - |
| 24 | ** | - |
| 25 | ** GNU General Public License Usage | - |
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - |
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - |
| 31 | ** included in the packaging of this file. Please review the following | - |
| 32 | ** information to ensure the GNU General Public License requirements will | - |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - |
| 35 | ** | - |
| 36 | ** $QT_END_LICENSE$ | - |
| 37 | ** | - |
| 38 | ****************************************************************************/ | - |
| 39 | - | |
| 40 | #ifndef QQMLJSENGINE_P_H | - |
| 41 | #define QQMLJSENGINE_P_H | - |
| 42 | - | |
| 43 | // | - |
| 44 | // W A R N I N G | - |
| 45 | // ------------- | - |
| 46 | // | - |
| 47 | // This file is not part of the Qt API. It exists purely as an | - |
| 48 | // implementation detail. This header file may change from version to | - |
| 49 | // version without notice, or even be removed. | - |
| 50 | // | - |
| 51 | // We mean it. | - |
| 52 | // | - |
| 53 | - | |
| 54 | #include "qqmljsglobal_p.h" | - |
| 55 | #include "qqmljsastfwd_p.h" | - |
| 56 | #include "qqmljsmemorypool_p.h" | - |
| 57 | - | |
| 58 | #include <QtCore/qstring.h> | - |
| 59 | #include <QtCore/qset.h> | - |
| 60 | - | |
| 61 | QT_QML_BEGIN_NAMESPACE | - |
| 62 | - | |
| 63 | namespace QQmlJS { | - |
| 64 | - | |
| 65 | class Lexer; | - |
| 66 | class MemoryPool; | - |
| 67 | - | |
| 68 | class QML_PARSER_EXPORT Directives { | - |
| 69 | public: | - |
| 70 | virtual ~Directives() {} | - |
| 71 | - | |
| 72 | virtual void pragmaLibrary() | - |
| 73 | { | - |
| 74 | } | - |
| 75 | - | |
| 76 | virtual void importFile(const QString &jsfile, const QString &module, int line, int column) | - |
| 77 | { | - |
| 78 | Q_UNUSED(jsfile); | - |
| 79 | Q_UNUSED(module); | - |
| 80 | Q_UNUSED(line); | - |
| 81 | Q_UNUSED(column); | - |
| 82 | } executed 218 times by 1 test: end of blockExecuted by:
| 218 |
| 83 | - | |
| 84 | virtual void importModule(const QString &uri, const QString &version, const QString &module, int line, int column) | - |
| 85 | { | - |
| 86 | Q_UNUSED(uri); | - |
| 87 | Q_UNUSED(version); | - |
| 88 | Q_UNUSED(module); | - |
| 89 | Q_UNUSED(line); | - |
| 90 | Q_UNUSED(column); | - |
| 91 | } executed 80 times by 1 test: end of blockExecuted by:
| 80 |
| 92 | }; | - |
| 93 | - | |
| 94 | - | |
| 95 | class QML_PARSER_EXPORT DiagnosticMessage | - |
| 96 | { | - |
| 97 | public: | - |
| 98 | enum Kind { Warning, Error }; | - |
| 99 | - | |
| 100 | DiagnosticMessage() {} | - |
| 101 | - | |
| 102 | DiagnosticMessage(Kind kind, const AST::SourceLocation &loc, const QString &message) | - |
| 103 | : kind(kind), loc(loc), message(message) {} executed 31475 times by 10 tests: end of blockExecuted by:
| 31475 |
| 104 | - | |
| 105 | bool isWarning() const | - |
| 106 | { return kind == Warning; } executed 26 times by 1 test: return kind == Warning;Executed by:
| 26 |
| 107 | - | |
| 108 | bool isError() const | - |
| 109 | { return kind == Error; } executed 4834 times by 7 tests: return kind == Error;Executed by:
| 4834 |
| 110 | - | |
| 111 | Kind kind = Error; | - |
| 112 | AST::SourceLocation loc; | - |
| 113 | QString message; | - |
| 114 | }; | - |
| 115 | - | |
| 116 | class QML_PARSER_EXPORT Engine | - |
| 117 | { | - |
| 118 | Lexer *_lexer; | - |
| 119 | Directives *_directives; | - |
| 120 | MemoryPool _pool; | - |
| 121 | QList<AST::SourceLocation> _comments; | - |
| 122 | QString _extraCode; | - |
| 123 | QString _code; | - |
| 124 | - | |
| 125 | public: | - |
| 126 | Engine(); | - |
| 127 | ~Engine(); | - |
| 128 | - | |
| 129 | void setCode(const QString &code); | - |
| 130 | const QString &code() const { return _code; } never executed: return _code; | 0 |
| 131 | - | |
| 132 | void addComment(int pos, int len, int line, int col); | - |
| 133 | QList<AST::SourceLocation> comments() const; | - |
| 134 | - | |
| 135 | Lexer *lexer() const; | - |
| 136 | void setLexer(Lexer *lexer); | - |
| 137 | - | |
| 138 | Directives *directives() const; | - |
| 139 | void setDirectives(Directives *directives); | - |
| 140 | - | |
| 141 | MemoryPool *pool(); | - |
| 142 | - | |
| 143 | inline QStringRef midRef(int position, int size) { return _code.midRef(position, size); } executed 33212337 times by 149 tests: return _code.midRef(position, size);Executed by:
| 33212337 |
| 144 | - | |
| 145 | QStringRef newStringRef(const QString &s); | - |
| 146 | QStringRef newStringRef(const QChar *chars, int size); | - |
| 147 | }; | - |
| 148 | - | |
| 149 | double integerFromString(const char *buf, int size, int radix); | - |
| 150 | - | |
| 151 | } // end of namespace QQmlJS | - |
| 152 | - | |
| 153 | QT_QML_END_NAMESPACE | - |
| 154 | - | |
| 155 | #endif // QQMLJSENGINE_P_H | - |
| Source code | Switch to Preprocessed file |