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_BEGIN_NAMESPACE |
58 | |
59 | namespace QQmlJS { namespace AST { |
60 | |
61 | class QML_PARSER_EXPORT BaseVisitor |
62 | { |
63 | public: |
64 | class RecursionDepthCheck |
65 | { |
66 | Q_DISABLE_COPY(RecursionDepthCheck) |
67 | public: |
68 | RecursionDepthCheck(RecursionDepthCheck &&) = delete; |
69 | RecursionDepthCheck &operator=(RecursionDepthCheck &&) = delete; |
70 | |
71 | RecursionDepthCheck(BaseVisitor *visitor) : m_visitor(visitor) |
72 | { |
73 | ++(m_visitor->m_recursionDepth); |
74 | } |
75 | |
76 | ~RecursionDepthCheck() |
77 | { |
78 | --(m_visitor->m_recursionDepth); |
79 | } |
80 | |
81 | bool operator()() const { |
82 | return m_visitor->m_recursionDepth < s_recursionLimit; |
83 | } |
84 | |
85 | private: |
86 | static const quint16 s_recursionLimit = 4096; |
87 | BaseVisitor *m_visitor; |
88 | }; |
89 | |
90 | BaseVisitor(quint16 parentRecursionDepth = 0); |
91 | virtual ~BaseVisitor(); |
92 | |
93 | virtual bool preVisit(Node *) = 0; |
94 | virtual void postVisit(Node *) = 0; |
95 | |
96 | // Ui |
97 | virtual bool visit(UiProgram *) = 0; |
98 | virtual bool visit(UiHeaderItemList *) = 0; |
99 | virtual bool visit(UiPragma *) = 0; |
100 | virtual bool visit(UiImport *) = 0; |
101 | virtual bool visit(UiPublicMember *) = 0; |
102 | virtual bool visit(UiSourceElement *) = 0; |
103 | virtual bool visit(UiObjectDefinition *) = 0; |
104 | virtual bool visit(UiObjectInitializer *) = 0; |
105 | virtual bool visit(UiObjectBinding *) = 0; |
106 | virtual bool visit(UiScriptBinding *) = 0; |
107 | virtual bool visit(UiArrayBinding *) = 0; |
108 | virtual bool visit(UiParameterList *) = 0; |
109 | virtual bool visit(UiObjectMemberList *) = 0; |
110 | virtual bool visit(UiArrayMemberList *) = 0; |
111 | virtual bool visit(UiQualifiedId *) = 0; |
112 | virtual bool visit(UiEnumDeclaration *) = 0; |
113 | virtual bool visit(UiEnumMemberList *) = 0; |
114 | virtual bool visit(UiVersionSpecifier *) = 0; |
115 | virtual bool visit(UiInlineComponent *) = 0; |
116 | virtual bool visit(UiAnnotation *) = 0; |
117 | virtual bool visit(UiAnnotationList *) = 0; |
118 | virtual bool visit(UiRequired *) = 0; |
119 | |
120 | virtual void endVisit(UiProgram *) = 0; |
121 | virtual void endVisit(UiImport *) = 0; |
122 | virtual void endVisit(UiHeaderItemList *) = 0; |
123 | virtual void endVisit(UiPragma *) = 0; |
124 | virtual void endVisit(UiPublicMember *) = 0; |
125 | virtual void endVisit(UiSourceElement *) = 0; |
126 | virtual void endVisit(UiObjectDefinition *) = 0; |
127 | virtual void endVisit(UiObjectInitializer *) = 0; |
128 | virtual void endVisit(UiObjectBinding *) = 0; |
129 | virtual void endVisit(UiScriptBinding *) = 0; |
130 | virtual void endVisit(UiArrayBinding *) = 0; |
131 | virtual void endVisit(UiParameterList *) = 0; |
132 | virtual void endVisit(UiObjectMemberList *) = 0; |
133 | virtual void endVisit(UiArrayMemberList *) = 0; |
134 | virtual void endVisit(UiQualifiedId *) = 0; |
135 | virtual void endVisit(UiEnumDeclaration *) = 0; |
136 | virtual void endVisit(UiEnumMemberList *) = 0; |
137 | virtual void endVisit(UiVersionSpecifier *) = 0; |
138 | virtual void endVisit(UiInlineComponent *) = 0; |
139 | virtual void endVisit(UiAnnotation *) = 0; |
140 | virtual void endVisit(UiAnnotationList *) = 0; |
141 | virtual void endVisit(UiRequired *) = 0; |
142 | |
143 | // QQmlJS |
144 | virtual bool visit(ThisExpression *) = 0; |
145 | virtual void endVisit(ThisExpression *) = 0; |
146 | |
147 | virtual bool visit(IdentifierExpression *) = 0; |
148 | virtual void endVisit(IdentifierExpression *) = 0; |
149 | |
150 | virtual bool visit(NullExpression *) = 0; |
151 | virtual void endVisit(NullExpression *) = 0; |
152 | |
153 | virtual bool visit(TrueLiteral *) = 0; |
154 | virtual void endVisit(TrueLiteral *) = 0; |
155 | |
156 | virtual bool visit(FalseLiteral *) = 0; |
157 | virtual void endVisit(FalseLiteral *) = 0; |
158 | |
159 | virtual bool visit(SuperLiteral *) = 0; |
160 | virtual void endVisit(SuperLiteral *) = 0; |
161 | |
162 | virtual bool visit(StringLiteral *) = 0; |
163 | virtual void endVisit(StringLiteral *) = 0; |
164 | |
165 | virtual bool visit(TemplateLiteral *) = 0; |
166 | virtual void endVisit(TemplateLiteral *) = 0; |
167 | |
168 | virtual bool visit(NumericLiteral *) = 0; |
169 | virtual void endVisit(NumericLiteral *) = 0; |
170 | |
171 | virtual bool visit(RegExpLiteral *) = 0; |
172 | virtual void endVisit(RegExpLiteral *) = 0; |
173 | |
174 | virtual bool visit(ArrayPattern *) = 0; |
175 | virtual void endVisit(ArrayPattern *) = 0; |
176 | |
177 | virtual bool visit(ObjectPattern *) = 0; |
178 | virtual void endVisit(ObjectPattern *) = 0; |
179 | |
180 | virtual bool visit(PatternElementList *) = 0; |
181 | virtual void endVisit(PatternElementList *) = 0; |
182 | |
183 | virtual bool visit(PatternPropertyList *) = 0; |
184 | virtual void endVisit(PatternPropertyList *) = 0; |
185 | |
186 | virtual bool visit(PatternElement *) = 0; |
187 | virtual void endVisit(PatternElement *) = 0; |
188 | |
189 | virtual bool visit(PatternProperty *) = 0; |
190 | virtual void endVisit(PatternProperty *) = 0; |
191 | |
192 | virtual bool visit(Elision *) = 0; |
193 | virtual void endVisit(Elision *) = 0; |
194 | |
195 | virtual bool visit(NestedExpression *) = 0; |
196 | virtual void endVisit(NestedExpression *) = 0; |
197 | |
198 | virtual bool visit(IdentifierPropertyName *) = 0; |
199 | virtual void endVisit(IdentifierPropertyName *) = 0; |
200 | |
201 | virtual bool visit(StringLiteralPropertyName *) = 0; |
202 | virtual void endVisit(StringLiteralPropertyName *) = 0; |
203 | |
204 | virtual bool visit(NumericLiteralPropertyName *) = 0; |
205 | virtual void endVisit(NumericLiteralPropertyName *) = 0; |
206 | |
207 | virtual bool visit(ComputedPropertyName *) = 0; |
208 | virtual void endVisit(ComputedPropertyName *) = 0; |
209 | |
210 | virtual bool visit(ArrayMemberExpression *) = 0; |
211 | virtual void endVisit(ArrayMemberExpression *) = 0; |
212 | |
213 | virtual bool visit(FieldMemberExpression *) = 0; |
214 | virtual void endVisit(FieldMemberExpression *) = 0; |
215 | |
216 | virtual bool visit(TaggedTemplate *) = 0; |
217 | virtual void endVisit(TaggedTemplate *) = 0; |
218 | |
219 | virtual bool visit(NewMemberExpression *) = 0; |
220 | virtual void endVisit(NewMemberExpression *) = 0; |
221 | |
222 | virtual bool visit(NewExpression *) = 0; |
223 | virtual void endVisit(NewExpression *) = 0; |
224 | |
225 | virtual bool visit(CallExpression *) = 0; |
226 | virtual void endVisit(CallExpression *) = 0; |
227 | |
228 | virtual bool visit(ArgumentList *) = 0; |
229 | virtual void endVisit(ArgumentList *) = 0; |
230 | |
231 | virtual bool visit(PostIncrementExpression *) = 0; |
232 | virtual void endVisit(PostIncrementExpression *) = 0; |
233 | |
234 | virtual bool visit(PostDecrementExpression *) = 0; |
235 | virtual void endVisit(PostDecrementExpression *) = 0; |
236 | |
237 | virtual bool visit(DeleteExpression *) = 0; |
238 | virtual void endVisit(DeleteExpression *) = 0; |
239 | |
240 | virtual bool visit(VoidExpression *) = 0; |
241 | virtual void endVisit(VoidExpression *) = 0; |
242 | |
243 | virtual bool visit(TypeOfExpression *) = 0; |
244 | virtual void endVisit(TypeOfExpression *) = 0; |
245 | |
246 | virtual bool visit(PreIncrementExpression *) = 0; |
247 | virtual void endVisit(PreIncrementExpression *) = 0; |
248 | |
249 | virtual bool visit(PreDecrementExpression *) = 0; |
250 | virtual void endVisit(PreDecrementExpression *) = 0; |
251 | |
252 | virtual bool visit(UnaryPlusExpression *) = 0; |
253 | virtual void endVisit(UnaryPlusExpression *) = 0; |
254 | |
255 | virtual bool visit(UnaryMinusExpression *) = 0; |
256 | virtual void endVisit(UnaryMinusExpression *) = 0; |
257 | |
258 | virtual bool visit(TildeExpression *) = 0; |
259 | virtual void endVisit(TildeExpression *) = 0; |
260 | |
261 | virtual bool visit(NotExpression *) = 0; |
262 | virtual void endVisit(NotExpression *) = 0; |
263 | |
264 | virtual bool visit(BinaryExpression *) = 0; |
265 | virtual void endVisit(BinaryExpression *) = 0; |
266 | |
267 | virtual bool visit(ConditionalExpression *) = 0; |
268 | virtual void endVisit(ConditionalExpression *) = 0; |
269 | |
270 | virtual bool visit(Expression *) = 0; |
271 | virtual void endVisit(Expression *) = 0; |
272 | |
273 | virtual bool visit(Block *) = 0; |
274 | virtual void endVisit(Block *) = 0; |
275 | |
276 | virtual bool visit(StatementList *) = 0; |
277 | virtual void endVisit(StatementList *) = 0; |
278 | |
279 | virtual bool visit(VariableStatement *) = 0; |
280 | virtual void endVisit(VariableStatement *) = 0; |
281 | |
282 | virtual bool visit(VariableDeclarationList *) = 0; |
283 | virtual void endVisit(VariableDeclarationList *) = 0; |
284 | |
285 | virtual bool visit(EmptyStatement *) = 0; |
286 | virtual void endVisit(EmptyStatement *) = 0; |
287 | |
288 | virtual bool visit(ExpressionStatement *) = 0; |
289 | virtual void endVisit(ExpressionStatement *) = 0; |
290 | |
291 | virtual bool visit(IfStatement *) = 0; |
292 | virtual void endVisit(IfStatement *) = 0; |
293 | |
294 | virtual bool visit(DoWhileStatement *) = 0; |
295 | virtual void endVisit(DoWhileStatement *) = 0; |
296 | |
297 | virtual bool visit(WhileStatement *) = 0; |
298 | virtual void endVisit(WhileStatement *) = 0; |
299 | |
300 | virtual bool visit(ForStatement *) = 0; |
301 | virtual void endVisit(ForStatement *) = 0; |
302 | |
303 | virtual bool visit(ForEachStatement *) = 0; |
304 | virtual void endVisit(ForEachStatement *) = 0; |
305 | |
306 | virtual bool visit(ContinueStatement *) = 0; |
307 | virtual void endVisit(ContinueStatement *) = 0; |
308 | |
309 | virtual bool visit(BreakStatement *) = 0; |
310 | virtual void endVisit(BreakStatement *) = 0; |
311 | |
312 | virtual bool visit(ReturnStatement *) = 0; |
313 | virtual void endVisit(ReturnStatement *) = 0; |
314 | |
315 | virtual bool visit(YieldExpression *) = 0; |
316 | virtual void endVisit(YieldExpression *) = 0; |
317 | |
318 | virtual bool visit(WithStatement *) = 0; |
319 | virtual void endVisit(WithStatement *) = 0; |
320 | |
321 | virtual bool visit(SwitchStatement *) = 0; |
322 | virtual void endVisit(SwitchStatement *) = 0; |
323 | |
324 | virtual bool visit(CaseBlock *) = 0; |
325 | virtual void endVisit(CaseBlock *) = 0; |
326 | |
327 | virtual bool visit(CaseClauses *) = 0; |
328 | virtual void endVisit(CaseClauses *) = 0; |
329 | |
330 | virtual bool visit(CaseClause *) = 0; |
331 | virtual void endVisit(CaseClause *) = 0; |
332 | |
333 | virtual bool visit(DefaultClause *) = 0; |
334 | virtual void endVisit(DefaultClause *) = 0; |
335 | |
336 | virtual bool visit(LabelledStatement *) = 0; |
337 | virtual void endVisit(LabelledStatement *) = 0; |
338 | |
339 | virtual bool visit(ThrowStatement *) = 0; |
340 | virtual void endVisit(ThrowStatement *) = 0; |
341 | |
342 | virtual bool visit(TryStatement *) = 0; |
343 | virtual void endVisit(TryStatement *) = 0; |
344 | |
345 | virtual bool visit(Catch *) = 0; |
346 | virtual void endVisit(Catch *) = 0; |
347 | |
348 | virtual bool visit(Finally *) = 0; |
349 | virtual void endVisit(Finally *) = 0; |
350 | |
351 | virtual bool visit(FunctionDeclaration *) = 0; |
352 | virtual void endVisit(FunctionDeclaration *) = 0; |
353 | |
354 | virtual bool visit(FunctionExpression *) = 0; |
355 | virtual void endVisit(FunctionExpression *) = 0; |
356 | |
357 | virtual bool visit(FormalParameterList *) = 0; |
358 | virtual void endVisit(FormalParameterList *) = 0; |
359 | |
360 | virtual bool visit(ClassExpression *) = 0; |
361 | virtual void endVisit(ClassExpression *) = 0; |
362 | |
363 | virtual bool visit(ClassDeclaration *) = 0; |
364 | virtual void endVisit(ClassDeclaration *) = 0; |
365 | |
366 | virtual bool visit(ClassElementList *) = 0; |
367 | virtual void endVisit(ClassElementList *) = 0; |
368 | |
369 | virtual bool visit(Program *) = 0; |
370 | virtual void endVisit(Program *) = 0; |
371 | |
372 | virtual bool visit(NameSpaceImport *) = 0; |
373 | virtual void endVisit(NameSpaceImport *) = 0; |
374 | |
375 | virtual bool visit(ImportSpecifier *) = 0; |
376 | virtual void endVisit(ImportSpecifier *) = 0; |
377 | |
378 | virtual bool visit(ImportsList *) = 0; |
379 | virtual void endVisit(ImportsList *) = 0; |
380 | |
381 | virtual bool visit(NamedImports *) = 0; |
382 | virtual void endVisit(NamedImports *) = 0; |
383 | |
384 | virtual bool visit(FromClause *) = 0; |
385 | virtual void endVisit(FromClause *) = 0; |
386 | |
387 | virtual bool visit(ImportClause *) = 0; |
388 | virtual void endVisit(ImportClause *) = 0; |
389 | |
390 | virtual bool visit(ImportDeclaration *) = 0; |
391 | virtual void endVisit(ImportDeclaration *) = 0; |
392 | |
393 | virtual bool visit(ExportSpecifier *) = 0; |
394 | virtual void endVisit(ExportSpecifier *) = 0; |
395 | |
396 | virtual bool visit(ExportsList *) = 0; |
397 | virtual void endVisit(ExportsList *) = 0; |
398 | |
399 | virtual bool visit(ExportClause *) = 0; |
400 | virtual void endVisit(ExportClause *) = 0; |
401 | |
402 | virtual bool visit(ExportDeclaration *) = 0; |
403 | virtual void endVisit(ExportDeclaration *) = 0; |
404 | |
405 | virtual bool visit(ESModule *) = 0; |
406 | virtual void endVisit(ESModule *) = 0; |
407 | |
408 | virtual bool visit(DebuggerStatement *) = 0; |
409 | virtual void endVisit(DebuggerStatement *) = 0; |
410 | |
411 | virtual bool visit(Type *) = 0; |
412 | virtual void endVisit(Type *) = 0; |
413 | |
414 | virtual bool visit(TypeArgumentList *) = 0; |
415 | virtual void endVisit(TypeArgumentList *) = 0; |
416 | |
417 | virtual bool visit(TypeAnnotation *) = 0; |
418 | virtual void endVisit(TypeAnnotation *) = 0; |
419 | |
420 | virtual void throwRecursionDepthError() = 0; |
421 | |
422 | quint16 recursionDepth() const { return m_recursionDepth; } |
423 | |
424 | protected: |
425 | quint16 m_recursionDepth = 0; |
426 | friend class RecursionDepthCheck; |
427 | }; |
428 | |
429 | class QML_PARSER_EXPORT Visitor: public BaseVisitor |
430 | { |
431 | public: |
432 | Visitor(quint16 parentRecursionDepth = 0); |
433 | |
434 | bool preVisit(Node *) override { return true; } |
435 | void postVisit(Node *) override {} |
436 | |
437 | // Ui |
438 | bool visit(UiProgram *) override { return true; } |
439 | bool visit(UiHeaderItemList *) override { return true; } |
440 | bool visit(UiPragma *) override { return true; } |
441 | bool visit(UiImport *) override { return true; } |
442 | bool visit(UiPublicMember *) override { return true; } |
443 | bool visit(UiSourceElement *) override { return true; } |
444 | bool visit(UiObjectDefinition *) override { return true; } |
445 | bool visit(UiObjectInitializer *) override { return true; } |
446 | bool visit(UiObjectBinding *) override { return true; } |
447 | bool visit(UiScriptBinding *) override { return true; } |
448 | bool visit(UiArrayBinding *) override { return true; } |
449 | bool visit(UiParameterList *) override { return true; } |
450 | bool visit(UiObjectMemberList *) override { return true; } |
451 | bool visit(UiArrayMemberList *) override { return true; } |
452 | bool visit(UiQualifiedId *) override { return true; } |
453 | bool visit(UiEnumDeclaration *) override { return true; } |
454 | bool visit(UiEnumMemberList *) override { return true; } |
455 | bool visit(UiVersionSpecifier *) override { return true; } |
456 | bool visit(UiInlineComponent *) override { return true; } |
457 | bool visit(UiAnnotation *) override { return true; } |
458 | bool visit(UiAnnotationList *) override { return true; } |
459 | bool visit(UiRequired *) override { return true; } |
460 | |
461 | void endVisit(UiProgram *) override {} |
462 | void endVisit(UiImport *) override {} |
463 | void endVisit(UiHeaderItemList *) override {} |
464 | void endVisit(UiPragma *) override {} |
465 | void endVisit(UiPublicMember *) override {} |
466 | void endVisit(UiSourceElement *) override {} |
467 | void endVisit(UiObjectDefinition *) override {} |
468 | void endVisit(UiObjectInitializer *) override {} |
469 | void endVisit(UiObjectBinding *) override {} |
470 | void endVisit(UiScriptBinding *) override {} |
471 | void endVisit(UiArrayBinding *) override {} |
472 | void endVisit(UiParameterList *) override {} |
473 | void endVisit(UiObjectMemberList *) override {} |
474 | void endVisit(UiArrayMemberList *) override {} |
475 | void endVisit(UiQualifiedId *) override {} |
476 | void endVisit(UiEnumDeclaration *) override {} |
477 | void endVisit(UiEnumMemberList *) override {} |
478 | void endVisit(UiVersionSpecifier *) override {} |
479 | void endVisit(UiInlineComponent *) override {} |
480 | void endVisit(UiAnnotation *) override {} |
481 | void endVisit(UiAnnotationList *) override {} |
482 | void endVisit(UiRequired *) override {} |
483 | |
484 | // QQmlJS |
485 | bool visit(ThisExpression *) override { return true; } |
486 | void endVisit(ThisExpression *) override {} |
487 | |
488 | bool visit(IdentifierExpression *) override { return true; } |
489 | void endVisit(IdentifierExpression *) override {} |
490 | |
491 | bool visit(NullExpression *) override { return true; } |
492 | void endVisit(NullExpression *) override {} |
493 | |
494 | bool visit(TrueLiteral *) override { return true; } |
495 | void endVisit(TrueLiteral *) override {} |
496 | |
497 | bool visit(FalseLiteral *) override { return true; } |
498 | void endVisit(FalseLiteral *) override {} |
499 | |
500 | bool visit(SuperLiteral *) override { return true; } |
501 | void endVisit(SuperLiteral *) override {} |
502 | |
503 | bool visit(StringLiteral *) override { return true; } |
504 | void endVisit(StringLiteral *) override {} |
505 | |
506 | bool visit(TemplateLiteral *) override { return true; } |
507 | void endVisit(TemplateLiteral *) override {} |
508 | |
509 | bool visit(NumericLiteral *) override { return true; } |
510 | void endVisit(NumericLiteral *) override {} |
511 | |
512 | bool visit(RegExpLiteral *) override { return true; } |
513 | void endVisit(RegExpLiteral *) override {} |
514 | |
515 | bool visit(ArrayPattern *) override { return true; } |
516 | void endVisit(ArrayPattern *) override {} |
517 | |
518 | bool visit(ObjectPattern *) override { return true; } |
519 | void endVisit(ObjectPattern *) override {} |
520 | |
521 | bool visit(PatternElementList *) override { return true; } |
522 | void endVisit(PatternElementList *) override {} |
523 | |
524 | bool visit(PatternPropertyList *) override { return true; } |
525 | void endVisit(PatternPropertyList *) override {} |
526 | |
527 | bool visit(PatternElement *) override { return true; } |
528 | void endVisit(PatternElement *) override {} |
529 | |
530 | bool visit(PatternProperty *) override { return true; } |
531 | void endVisit(PatternProperty *) override {} |
532 | |
533 | bool visit(Elision *) override { return true; } |
534 | void endVisit(Elision *) override {} |
535 | |
536 | bool visit(NestedExpression *) override { return true; } |
537 | void endVisit(NestedExpression *) override {} |
538 | |
539 | bool visit(IdentifierPropertyName *) override { return true; } |
540 | void endVisit(IdentifierPropertyName *) override {} |
541 | |
542 | bool visit(StringLiteralPropertyName *) override { return true; } |
543 | void endVisit(StringLiteralPropertyName *) override {} |
544 | |
545 | bool visit(NumericLiteralPropertyName *) override { return true; } |
546 | void endVisit(NumericLiteralPropertyName *) override {} |
547 | |
548 | bool visit(ComputedPropertyName *) override { return true; } |
549 | void endVisit(ComputedPropertyName *) override {} |
550 | |
551 | bool visit(ArrayMemberExpression *) override { return true; } |
552 | void endVisit(ArrayMemberExpression *) override {} |
553 | |
554 | bool visit(FieldMemberExpression *) override { return true; } |
555 | void endVisit(FieldMemberExpression *) override {} |
556 | |
557 | bool visit(TaggedTemplate *) override { return true; } |
558 | void endVisit(TaggedTemplate *) override {} |
559 | |
560 | bool visit(NewMemberExpression *) override { return true; } |
561 | void endVisit(NewMemberExpression *) override {} |
562 | |
563 | bool visit(NewExpression *) override { return true; } |
564 | void endVisit(NewExpression *) override {} |
565 | |
566 | bool visit(CallExpression *) override { return true; } |
567 | void endVisit(CallExpression *) override {} |
568 | |
569 | bool visit(ArgumentList *) override { return true; } |
570 | void endVisit(ArgumentList *) override {} |
571 | |
572 | bool visit(PostIncrementExpression *) override { return true; } |
573 | void endVisit(PostIncrementExpression *) override {} |
574 | |
575 | bool visit(PostDecrementExpression *) override { return true; } |
576 | void endVisit(PostDecrementExpression *) override {} |
577 | |
578 | bool visit(DeleteExpression *) override { return true; } |
579 | void endVisit(DeleteExpression *) override {} |
580 | |
581 | bool visit(VoidExpression *) override { return true; } |
582 | void endVisit(VoidExpression *) override {} |
583 | |
584 | bool visit(TypeOfExpression *) override { return true; } |
585 | void endVisit(TypeOfExpression *) override {} |
586 | |
587 | bool visit(PreIncrementExpression *) override { return true; } |
588 | void endVisit(PreIncrementExpression *) override {} |
589 | |
590 | bool visit(PreDecrementExpression *) override { return true; } |
591 | void endVisit(PreDecrementExpression *) override {} |
592 | |
593 | bool visit(UnaryPlusExpression *) override { return true; } |
594 | void endVisit(UnaryPlusExpression *) override {} |
595 | |
596 | bool visit(UnaryMinusExpression *) override { return true; } |
597 | void endVisit(UnaryMinusExpression *) override {} |
598 | |
599 | bool visit(TildeExpression *) override { return true; } |
600 | void endVisit(TildeExpression *) override {} |
601 | |
602 | bool visit(NotExpression *) override { return true; } |
603 | void endVisit(NotExpression *) override {} |
604 | |
605 | bool visit(BinaryExpression *) override { return true; } |
606 | void endVisit(BinaryExpression *) override {} |
607 | |
608 | bool visit(ConditionalExpression *) override { return true; } |
609 | void endVisit(ConditionalExpression *) override {} |
610 | |
611 | bool visit(Expression *) override { return true; } |
612 | void endVisit(Expression *) override {} |
613 | |
614 | bool visit(Block *) override { return true; } |
615 | void endVisit(Block *) override {} |
616 | |
617 | bool visit(StatementList *) override { return true; } |
618 | void endVisit(StatementList *) override {} |
619 | |
620 | bool visit(VariableStatement *) override { return true; } |
621 | void endVisit(VariableStatement *) override {} |
622 | |
623 | bool visit(VariableDeclarationList *) override { return true; } |
624 | void endVisit(VariableDeclarationList *) override {} |
625 | |
626 | bool visit(EmptyStatement *) override { return true; } |
627 | void endVisit(EmptyStatement *) override {} |
628 | |
629 | bool visit(ExpressionStatement *) override { return true; } |
630 | void endVisit(ExpressionStatement *) override {} |
631 | |
632 | bool visit(IfStatement *) override { return true; } |
633 | void endVisit(IfStatement *) override {} |
634 | |
635 | bool visit(DoWhileStatement *) override { return true; } |
636 | void endVisit(DoWhileStatement *) override {} |
637 | |
638 | bool visit(WhileStatement *) override { return true; } |
639 | void endVisit(WhileStatement *) override {} |
640 | |
641 | bool visit(ForStatement *) override { return true; } |
642 | void endVisit(ForStatement *) override {} |
643 | |
644 | bool visit(ForEachStatement *) override { return true; } |
645 | void endVisit(ForEachStatement *) override {} |
646 | |
647 | bool visit(ContinueStatement *) override { return true; } |
648 | void endVisit(ContinueStatement *) override {} |
649 | |
650 | bool visit(BreakStatement *) override { return true; } |
651 | void endVisit(BreakStatement *) override {} |
652 | |
653 | bool visit(ReturnStatement *) override { return true; } |
654 | void endVisit(ReturnStatement *) override {} |
655 | |
656 | bool visit(YieldExpression *) override { return true; } |
657 | void endVisit(YieldExpression *) override {} |
658 | |
659 | bool visit(WithStatement *) override { return true; } |
660 | void endVisit(WithStatement *) override {} |
661 | |
662 | bool visit(SwitchStatement *) override { return true; } |
663 | void endVisit(SwitchStatement *) override {} |
664 | |
665 | bool visit(CaseBlock *) override { return true; } |
666 | void endVisit(CaseBlock *) override {} |
667 | |
668 | bool visit(CaseClauses *) override { return true; } |
669 | void endVisit(CaseClauses *) override {} |
670 | |
671 | bool visit(CaseClause *) override { return true; } |
672 | void endVisit(CaseClause *) override {} |
673 | |
674 | bool visit(DefaultClause *) override { return true; } |
675 | void endVisit(DefaultClause *) override {} |
676 | |
677 | bool visit(LabelledStatement *) override { return true; } |
678 | void endVisit(LabelledStatement *) override {} |
679 | |
680 | bool visit(ThrowStatement *) override { return true; } |
681 | void endVisit(ThrowStatement *) override {} |
682 | |
683 | bool visit(TryStatement *) override { return true; } |
684 | void endVisit(TryStatement *) override {} |
685 | |
686 | bool visit(Catch *) override { return true; } |
687 | void endVisit(Catch *) override {} |
688 | |
689 | bool visit(Finally *) override { return true; } |
690 | void endVisit(Finally *) override {} |
691 | |
692 | bool visit(FunctionDeclaration *) override { return true; } |
693 | void endVisit(FunctionDeclaration *) override {} |
694 | |
695 | bool visit(FunctionExpression *) override { return true; } |
696 | void endVisit(FunctionExpression *) override {} |
697 | |
698 | bool visit(FormalParameterList *) override { return true; } |
699 | void endVisit(FormalParameterList *) override {} |
700 | |
701 | bool visit(ClassExpression *) override { return true; } |
702 | void endVisit(ClassExpression *) override {} |
703 | |
704 | bool visit(ClassDeclaration *) override { return true; } |
705 | void endVisit(ClassDeclaration *) override {} |
706 | |
707 | bool visit(ClassElementList *) override { return true; } |
708 | void endVisit(ClassElementList *) override {} |
709 | |
710 | bool visit(Program *) override { return true; } |
711 | void endVisit(Program *) override {} |
712 | |
713 | bool visit(NameSpaceImport *) override { return true; } |
714 | void endVisit(NameSpaceImport *) override {} |
715 | |
716 | bool visit(ImportSpecifier *) override { return true; } |
717 | void endVisit(ImportSpecifier *) override {} |
718 | |
719 | bool visit(ImportsList *) override { return true; } |
720 | void endVisit(ImportsList *) override {} |
721 | |
722 | bool visit(NamedImports *) override { return true; } |
723 | void endVisit(NamedImports *) override {} |
724 | |
725 | bool visit(FromClause *) override { return true; } |
726 | void endVisit(FromClause *) override {} |
727 | |
728 | bool visit(ImportClause *) override { return true; } |
729 | void endVisit(ImportClause *) override {} |
730 | |
731 | bool visit(ImportDeclaration *) override { return true; } |
732 | void endVisit(ImportDeclaration *) override {} |
733 | |
734 | bool visit(ExportSpecifier *) override { return true; } |
735 | void endVisit(ExportSpecifier *) override {} |
736 | |
737 | bool visit(ExportsList *) override { return true; } |
738 | void endVisit(ExportsList *) override {} |
739 | |
740 | bool visit(ExportClause *) override { return true; } |
741 | void endVisit(ExportClause *) override {} |
742 | |
743 | bool visit(ExportDeclaration *) override { return true; } |
744 | void endVisit(ExportDeclaration *) override {} |
745 | |
746 | bool visit(ESModule *) override { return true; } |
747 | void endVisit(ESModule *) override {} |
748 | |
749 | bool visit(DebuggerStatement *) override { return true; } |
750 | void endVisit(DebuggerStatement *) override {} |
751 | |
752 | bool visit(Type *) override { return true; } |
753 | void endVisit(Type *) override {} |
754 | |
755 | bool visit(TypeArgumentList *) override { return true; } |
756 | void endVisit(TypeArgumentList *) override {} |
757 | |
758 | bool visit(TypeAnnotation *) override { return true; } |
759 | void endVisit(TypeAnnotation *) override {} |
760 | }; |
761 | |
762 | } } // namespace AST |
763 | |
764 | QT_END_NAMESPACE |
765 | |
766 | #endif // QQMLJSASTVISITOR_P_H |
767 |