Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/parser/qqmljsastvisitor_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 QQMLJSASTVISITOR_P_H | - |
41 | #define QQMLJSASTVISITOR_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 "qqmljsastfwd_p.h" | - |
55 | #include "qqmljsglobal_p.h" | - |
56 | - | |
57 | QT_QML_BEGIN_NAMESPACE | - |
58 | - | |
59 | namespace QQmlJS { namespace AST { | - |
60 | - | |
61 | class QML_PARSER_EXPORT Visitor | - |
62 | { | - |
63 | public: | - |
64 | Visitor(); | - |
65 | virtual ~Visitor(); | - |
66 | - | |
67 | virtual bool preVisit(Node *) { return true; } executed 254039310 times by 147 tests: return true; Executed by:
| 254039310 |
68 | virtual void postVisit(Node *) {} | - |
69 | - | |
70 | // Ui | - |
71 | virtual bool visit(UiProgram *) { return true; } executed 7326 times by 1 test: return true; Executed by:
| 7326 |
72 | virtual bool visit(UiHeaderItemList *) { return true; } executed 9866 times by 1 test: return true; Executed by:
| 9866 |
73 | virtual bool visit(UiPragma *) { return true; } executed 36 times by 1 test: return true; Executed by:
| 36 |
74 | virtual bool visit(UiImport *) { return true; } executed 9830 times by 1 test: return true; Executed by:
| 9830 |
75 | virtual bool visit(UiPublicMember *) { return true; } executed 12056 times by 1 test: return true; Executed by:
| 12056 |
76 | virtual bool visit(UiSourceElement *) { return true; } executed 2742 times by 1 test: return true; Executed by:
| 2742 |
77 | virtual bool visit(UiObjectDefinition *) { return true; } executed 43662 times by 1 test: return true; Executed by:
| 43662 |
78 | virtual bool visit(UiObjectInitializer *) { return true; } executed 47826 times by 1 test: return true; Executed by:
| 47826 |
79 | virtual bool visit(UiObjectBinding *) { return true; } executed 4164 times by 1 test: return true; Executed by:
| 4164 |
80 | virtual bool visit(UiScriptBinding *) { return true; } executed 128128 times by 1 test: return true; Executed by:
| 128128 |
81 | virtual bool visit(UiArrayBinding *) { return true; } executed 450 times by 1 test: return true; Executed by:
| 450 |
82 | virtual bool visit(UiParameterList *) { return true; } never executed: return true; | 0 |
83 | virtual bool visit(UiObjectMemberList *) { return true; } executed 48666 times by 1 test: return true; Executed by:
| 48666 |
84 | virtual bool visit(UiArrayMemberList *) { return true; } executed 450 times by 1 test: return true; Executed by:
| 450 |
85 | virtual bool visit(UiQualifiedId *) { return true; } executed 189762 times by 1 test: return true; Executed by:
| 189762 |
86 | virtual bool visit(UiQualifiedPragmaId *) { return true; } executed 36 times by 1 test: return true; Executed by:
| 36 |
87 | virtual bool visit(UiEnumDeclaration *) { return true; } executed 18 times by 1 test: return true; Executed by:
| 18 |
88 | virtual bool visit(UiEnumMemberList *) { return true; } executed 18 times by 1 test: return true; Executed by:
| 18 |
89 | - | |
90 | virtual void endVisit(UiProgram *) {} | - |
91 | virtual void endVisit(UiImport *) {} | - |
92 | virtual void endVisit(UiHeaderItemList *) {} | - |
93 | virtual void endVisit(UiPragma *) {} | - |
94 | virtual void endVisit(UiPublicMember *) {} | - |
95 | virtual void endVisit(UiSourceElement *) {} | - |
96 | virtual void endVisit(UiObjectDefinition *) {} | - |
97 | virtual void endVisit(UiObjectInitializer *) {} | - |
98 | virtual void endVisit(UiObjectBinding *) {} | - |
99 | virtual void endVisit(UiScriptBinding *) {} | - |
100 | virtual void endVisit(UiArrayBinding *) {} | - |
101 | virtual void endVisit(UiParameterList *) {} | - |
102 | virtual void endVisit(UiObjectMemberList *) {} | - |
103 | virtual void endVisit(UiArrayMemberList *) {} | - |
104 | virtual void endVisit(UiQualifiedId *) {} | - |
105 | virtual void endVisit(UiQualifiedPragmaId *) {} | - |
106 | virtual void endVisit(UiEnumDeclaration *) {} | - |
107 | virtual void endVisit(UiEnumMemberList *) { } | - |
108 | - | |
109 | // QQmlJS | - |
110 | virtual bool visit(ThisExpression *) { return true; } executed 20402 times by 15 tests: return true; Executed by:
| 20402 |
111 | virtual void endVisit(ThisExpression *) {} | - |
112 | - | |
113 | virtual bool visit(IdentifierExpression *) { return true; } executed 27005602 times by 130 tests: return true; Executed by:
| 27005602 |
114 | virtual void endVisit(IdentifierExpression *) {} | - |
115 | - | |
116 | virtual bool visit(NullExpression *) { return true; } executed 504638 times by 35 tests: return true; Executed by:
| 504638 |
117 | virtual void endVisit(NullExpression *) {} | - |
118 | - | |
119 | virtual bool visit(TrueLiteral *) { return true; } executed 624637 times by 62 tests: return true; Executed by:
| 624637 |
120 | virtual void endVisit(TrueLiteral *) {} | - |
121 | - | |
122 | virtual bool visit(FalseLiteral *) { return true; } executed 164678 times by 50 tests: return true; Executed by:
| 164678 |
123 | virtual void endVisit(FalseLiteral *) {} | - |
124 | - | |
125 | virtual bool visit(SuperLiteral *) { return true; } executed 2901 times by 2 tests: return true; Executed by:
| 2901 |
126 | virtual void endVisit(SuperLiteral *) {} | - |
127 | - | |
128 | virtual bool visit(StringLiteral *) { return true; } executed 17859132 times by 90 tests: return true; Executed by:
| 17859132 |
129 | virtual void endVisit(StringLiteral *) {} | - |
130 | - | |
131 | virtual bool visit(TemplateLiteral *) { return true; } executed 3326 times by 3 tests: return true; Executed by:
| 3326 |
132 | virtual void endVisit(TemplateLiteral *) {} | - |
133 | - | |
134 | virtual bool visit(NumericLiteral *) { return true; } executed 4080934 times by 92 tests: return true; Executed by:
| 4080934 |
135 | virtual void endVisit(NumericLiteral *) {} | - |
136 | - | |
137 | virtual bool visit(RegExpLiteral *) { return true; } executed 2120700 times by 9 tests: return true; Executed by:
| 2120700 |
138 | virtual void endVisit(RegExpLiteral *) {} | - |
139 | - | |
140 | virtual bool visit(ArrayPattern *) { return true; } executed 166781 times by 47 tests: return true; Executed by:
| 166781 |
141 | virtual void endVisit(ArrayPattern *) {} | - |
142 | - | |
143 | virtual bool visit(ObjectPattern *) { return true; } executed 179115 times by 37 tests: return true; Executed by:
| 179115 |
144 | virtual void endVisit(ObjectPattern *) {} | - |
145 | - | |
146 | virtual bool visit(PatternElementList *) { return true; } executed 389254 times by 41 tests: return true; Executed by:
| 389254 |
147 | virtual void endVisit(PatternElementList *) {} | - |
148 | - | |
149 | virtual bool visit(PatternPropertyList *) { return true; } executed 318399 times by 34 tests: return true; Executed by:
| 318399 |
150 | virtual void endVisit(PatternPropertyList *) {} | - |
151 | - | |
152 | virtual bool visit(PatternElement *) { return true; } executed 4772041 times by 67 tests: return true; Executed by:
| 4772041 |
153 | virtual void endVisit(PatternElement *) {} | - |
154 | - | |
155 | virtual bool visit(PatternProperty *) { return true; } executed 235514 times by 34 tests: return true; Executed by:
| 235514 |
156 | virtual void endVisit(PatternProperty *) {} | - |
157 | - | |
158 | virtual bool visit(Elision *) { return true; } executed 6937 times by 4 tests: return true; Executed by:
| 6937 |
159 | virtual void endVisit(Elision *) {} | - |
160 | - | |
161 | virtual bool visit(NestedExpression *) { return true; } executed 747140 times by 45 tests: return true; Executed by:
| 747140 |
162 | virtual void endVisit(NestedExpression *) {} | - |
163 | - | |
164 | virtual bool visit(IdentifierPropertyName *) { return true; } executed 277066 times by 22 tests: return true; Executed by:
| 277066 |
165 | virtual void endVisit(IdentifierPropertyName *) {} | - |
166 | - | |
167 | virtual bool visit(StringLiteralPropertyName *) { return true; } executed 44884 times by 21 tests: return true; Executed by:
| 44884 |
168 | virtual void endVisit(StringLiteralPropertyName *) {} | - |
169 | - | |
170 | virtual bool visit(NumericLiteralPropertyName *) { return true; } executed 14381 times by 3 tests: return true; Executed by:
| 14381 |
171 | virtual void endVisit(NumericLiteralPropertyName *) {} | - |
172 | - | |
173 | virtual bool visit(ComputedPropertyName *) { return true; } executed 4364 times by 2 tests: return true; Executed by:
| 4364 |
174 | virtual void endVisit(ComputedPropertyName *) {} | - |
175 | - | |
176 | virtual bool visit(ArrayMemberExpression *) { return true; } executed 163396 times by 34 tests: return true; Executed by:
| 163396 |
177 | virtual void endVisit(ArrayMemberExpression *) {} | - |
178 | - | |
179 | virtual bool visit(FieldMemberExpression *) { return true; } executed 5434739 times by 114 tests: return true; Executed by:
| 5434739 |
180 | virtual void endVisit(FieldMemberExpression *) {} | - |
181 | - | |
182 | virtual bool visit(TaggedTemplate *) { return true; } executed 1062 times by 2 tests: return true; Executed by:
| 1062 |
183 | virtual void endVisit(TaggedTemplate *) {} | - |
184 | - | |
185 | virtual bool visit(NewMemberExpression *) { return true; } executed 693703 times by 22 tests: return true; Executed by:
| 693703 |
186 | virtual void endVisit(NewMemberExpression *) {} | - |
187 | - | |
188 | virtual bool visit(NewExpression *) { return true; } executed 3413 times by 10 tests: return true; Executed by:
| 3413 |
189 | virtual void endVisit(NewExpression *) {} | - |
190 | - | |
191 | virtual bool visit(CallExpression *) { return true; } executed 10242983 times by 88 tests: return true; Executed by:
| 10242983 |
192 | virtual void endVisit(CallExpression *) {} | - |
193 | - | |
194 | virtual bool visit(ArgumentList *) { return true; } executed 12650672 times by 78 tests: return true; Executed by:
| 12650672 |
195 | virtual void endVisit(ArgumentList *) {} | - |
196 | - | |
197 | virtual bool visit(PostIncrementExpression *) { return true; } executed 20363 times by 29 tests: return true; Executed by:
| 20363 |
198 | virtual void endVisit(PostIncrementExpression *) {} | - |
199 | - | |
200 | virtual bool visit(PostDecrementExpression *) { return true; } executed 931 times by 9 tests: return true; Executed by:
| 931 |
201 | virtual void endVisit(PostDecrementExpression *) {} | - |
202 | - | |
203 | virtual bool visit(DeleteExpression *) { return true; } executed 125840 times by 9 tests: return true; Executed by:
| 125840 |
204 | virtual void endVisit(DeleteExpression *) {} | - |
205 | - | |
206 | virtual bool visit(VoidExpression *) { return true; } executed 7572 times by 6 tests: return true; Executed by:
| 7572 |
207 | virtual void endVisit(VoidExpression *) {} | - |
208 | - | |
209 | virtual bool visit(TypeOfExpression *) { return true; } executed 831147 times by 14 tests: return true; Executed by:
| 831147 |
210 | virtual void endVisit(TypeOfExpression *) {} | - |
211 | - | |
212 | virtual bool visit(PreIncrementExpression *) { return true; } executed 6195 times by 33 tests: return true; Executed by:
| 6195 |
213 | virtual void endVisit(PreIncrementExpression *) {} | - |
214 | - | |
215 | virtual bool visit(PreDecrementExpression *) { return true; } executed 737 times by 7 tests: return true; Executed by:
| 737 |
216 | virtual void endVisit(PreDecrementExpression *) {} | - |
217 | - | |
218 | virtual bool visit(UnaryPlusExpression *) { return true; } executed 10593 times by 4 tests: return true; Executed by:
| 10593 |
219 | virtual void endVisit(UnaryPlusExpression *) {} | - |
220 | - | |
221 | virtual bool visit(UnaryMinusExpression *) { return true; } executed 204685 times by 25 tests: return true; Executed by:
| 204685 |
222 | virtual void endVisit(UnaryMinusExpression *) {} | - |
223 | - | |
224 | virtual bool visit(TildeExpression *) { return true; } executed 2080 times by 5 tests: return true; Executed by:
| 2080 |
225 | virtual void endVisit(TildeExpression *) {} | - |
226 | - | |
227 | virtual bool visit(NotExpression *) { return true; } executed 734861 times by 34 tests: return true; Executed by:
| 734861 |
228 | virtual void endVisit(NotExpression *) {} | - |
229 | - | |
230 | virtual bool visit(BinaryExpression *) { return true; } executed 15393382 times by 100 tests: return true; Executed by:
| 15393382 |
231 | virtual void endVisit(BinaryExpression *) {} | - |
232 | - | |
233 | virtual bool visit(ConditionalExpression *) { return true; } executed 204650 times by 45 tests: return true; Executed by:
| 204650 |
234 | virtual void endVisit(ConditionalExpression *) {} | - |
235 | - | |
236 | virtual bool visit(Expression *) { return true; } executed 8702 times by 6 tests: return true; Executed by:
| 8702 |
237 | virtual void endVisit(Expression *) {} | - |
238 | - | |
239 | virtual bool visit(Block *) { return true; } executed 6672099 times by 78 tests: return true; Executed by:
| 6672099 |
240 | virtual void endVisit(Block *) {} | - |
241 | - | |
242 | virtual bool visit(StatementList *) { return true; } executed 13855259 times by 103 tests: return true; Executed by:
| 13855259 |
243 | virtual void endVisit(StatementList *) {} | - |
244 | - | |
245 | virtual bool visit(VariableStatement *) { return true; } executed 1691120 times by 49 tests: return true; Executed by:
| 1691120 |
246 | virtual void endVisit(VariableStatement *) {} | - |
247 | - | |
248 | virtual bool visit(VariableDeclarationList *) { return true; } executed 1737096 times by 51 tests: return true; Executed by:
| 1737096 |
249 | virtual void endVisit(VariableDeclarationList *) {} | - |
250 | - | |
251 | virtual bool visit(EmptyStatement *) { return true; } executed 6765 times by 8 tests: return true; Executed by:
| 6765 |
252 | virtual void endVisit(EmptyStatement *) {} | - |
253 | - | |
254 | virtual bool visit(ExpressionStatement *) { return true; } executed 13863832 times by 141 tests: return true; Executed by:
| 13863832 |
255 | virtual void endVisit(ExpressionStatement *) {} | - |
256 | - | |
257 | virtual bool visit(IfStatement *) { return true; } executed 4789513 times by 60 tests: return true; Executed by:
| 4789513 |
258 | virtual void endVisit(IfStatement *) {} | - |
259 | - | |
260 | virtual bool visit(DoWhileStatement *) { return true; } executed 1453 times by 11 tests: return true; Executed by:
| 1453 |
261 | virtual void endVisit(DoWhileStatement *) {} | - |
262 | - | |
263 | virtual bool visit(WhileStatement *) { return true; } executed 3855 times by 14 tests: return true; Executed by:
| 3855 |
264 | virtual void endVisit(WhileStatement *) {} | - |
265 | - | |
266 | virtual bool visit(ForStatement *) { return true; } executed 33077 times by 28 tests: return true; Executed by:
| 33077 |
267 | virtual void endVisit(ForStatement *) {} | - |
268 | - | |
269 | virtual bool visit(ForEachStatement *) { return true; } executed 42675 times by 14 tests: return true; Executed by:
| 42675 |
270 | virtual void endVisit(ForEachStatement *) {} | - |
271 | - | |
272 | virtual bool visit(ContinueStatement *) { return true; } executed 7040 times by 10 tests: return true; Executed by:
| 7040 |
273 | virtual void endVisit(ContinueStatement *) {} | - |
274 | - | |
275 | virtual bool visit(BreakStatement *) { return true; } executed 113058 times by 10 tests: return true; Executed by:
| 113058 |
276 | virtual void endVisit(BreakStatement *) {} | - |
277 | - | |
278 | virtual bool visit(ReturnStatement *) { return true; } executed 3828399 times by 49 tests: return true; Executed by:
| 3828399 |
279 | virtual void endVisit(ReturnStatement *) {} | - |
280 | - | |
281 | virtual bool visit(YieldExpression *) { return true; } executed 10749 times by 2 tests: return true; Executed by:
| 10749 |
282 | virtual void endVisit(YieldExpression *) {} | - |
283 | - | |
284 | virtual bool visit(WithStatement *) { return true; } executed 2335 times by 7 tests: return true; Executed by:
| 2335 |
285 | virtual void endVisit(WithStatement *) {} | - |
286 | - | |
287 | virtual bool visit(SwitchStatement *) { return true; } executed 2818 times by 7 tests: return true; Executed by:
| 2818 |
288 | virtual void endVisit(SwitchStatement *) {} | - |
289 | - | |
290 | virtual bool visit(CaseBlock *) { return true; } executed 1931 times by 7 tests: return true; Executed by:
| 1931 |
291 | virtual void endVisit(CaseBlock *) {} | - |
292 | - | |
293 | virtual bool visit(CaseClauses *) { return true; } executed 2657 times by 7 tests: return true; Executed by:
| 2657 |
294 | virtual void endVisit(CaseClauses *) {} | - |
295 | - | |
296 | virtual bool visit(CaseClause *) { return true; } executed 244551 times by 7 tests: return true; Executed by:
| 244551 |
297 | virtual void endVisit(CaseClause *) {} | - |
298 | - | |
299 | virtual bool visit(DefaultClause *) { return true; } executed 1736 times by 7 tests: return true; Executed by:
| 1736 |
300 | virtual void endVisit(DefaultClause *) {} | - |
301 | - | |
302 | virtual bool visit(LabelledStatement *) { return true; } executed 2795 times by 6 tests: return true; Executed by:
| 2795 |
303 | virtual void endVisit(LabelledStatement *) {} | - |
304 | - | |
305 | virtual bool visit(ThrowStatement *) { return true; } executed 399989 times by 14 tests: return true; Executed by:
| 399989 |
306 | virtual void endVisit(ThrowStatement *) {} | - |
307 | - | |
308 | virtual bool visit(TryStatement *) { return true; } executed 437471 times by 22 tests: return true; Executed by:
| 437471 |
309 | virtual void endVisit(TryStatement *) {} | - |
310 | - | |
311 | virtual bool visit(Catch *) { return true; } executed 322787 times by 22 tests: return true; Executed by:
| 322787 |
312 | virtual void endVisit(Catch *) {} | - |
313 | - | |
314 | virtual bool visit(Finally *) { return true; } executed 3486 times by 6 tests: return true; Executed by:
| 3486 |
315 | virtual void endVisit(Finally *) {} | - |
316 | - | |
317 | virtual bool visit(FunctionDeclaration *) { return true; } executed 311686 times by 18 tests: return true; Executed by:
| 311686 |
318 | virtual void endVisit(FunctionDeclaration *) {} | - |
319 | - | |
320 | virtual bool visit(FunctionExpression *) { return true; } executed 1715606 times by 29 tests: return true; Executed by:
| 1715606 |
321 | virtual void endVisit(FunctionExpression *) {} | - |
322 | - | |
323 | virtual bool visit(FormalParameterList *) { return true; } executed 4754301 times by 22 tests: return true; Executed by:
| 4754301 |
324 | virtual void endVisit(FormalParameterList *) {} | - |
325 | - | |
326 | virtual bool visit(ClassExpression *) { return true; } executed 6948 times by 2 tests: return true; Executed by:
| 6948 |
327 | virtual void endVisit(ClassExpression *) {} | - |
328 | - | |
329 | virtual bool visit(ClassDeclaration *) { return true; } executed 7623 times by 2 tests: return true; Executed by:
| 7623 |
330 | virtual void endVisit(ClassDeclaration *) {} | - |
331 | - | |
332 | virtual bool visit(ClassElementList *) { return true; } executed 22418 times by 2 tests: return true; Executed by:
| 22418 |
333 | virtual void endVisit(ClassElementList *) {} | - |
334 | - | |
335 | virtual bool visit(Program *) { return true; } executed 50062 times by 1 test: return true; Executed by:
| 50062 |
336 | virtual void endVisit(Program *) {} | - |
337 | - | |
338 | virtual bool visit(DebuggerStatement *) { return true; } executed 16 times by 3 tests: return true; Executed by:
| 16 |
339 | virtual void endVisit(DebuggerStatement *) {} | - |
340 | }; | - |
341 | - | |
342 | } } // namespace AST | - |
343 | - | |
344 | QT_QML_END_NAMESPACE | - |
345 | - | |
346 | #endif // QQMLJSASTVISITOR_P_H | - |
Source code | Switch to Preprocessed file |