Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmljsast.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#include <QString>
6#include <QLocale>
7#include "common/qqmljsdiagnosticmessage_p.h"
8#include "common/qqmljssourcelocation_p.h"
9#include "qqmljsast_p.h"
10
12#include <qlocale.h>
13
14#include <algorithm>
15#include <array>
16
17QT_BEGIN_NAMESPACE
18
19namespace QQmlJS { namespace AST {
20
21FunctionExpression *asAnonymousFunctionDefinition(Node *n)
22{
23 if (!n)
24 return nullptr;
25 FunctionExpression *f = n->asFunctionDefinition();
26 if (!f || !f->name.isNull())
27 return nullptr;
28 return f;
29}
30
31ClassExpression *asAnonymousClassDefinition(Node *n)
32{
33 if (!n)
34 return nullptr;
35 ClassExpression *c = n->asClassDefinition();
36 if (!c || !c->name.isNull())
37 return nullptr;
38 return c;
39}
40
42{
43 return nullptr;
44}
45
47{
48 return nullptr;
49}
50
52{
53 return nullptr;
54}
55
57{
58 return nullptr;
59}
60
65
67{
68 return nullptr;
69}
70
72{
73 return nullptr;
74}
75
77{
78 return nullptr;
79}
80
82{
83 static const bool doIgnore = qEnvironmentVariableIsSet("QV4_CRASH_ON_STACKOVERFLOW");
84 return doIgnore;
85}
86
88{
89 return this;
90}
91
93{
94 for (const Node *node = this;;) {
95 switch (node->kind) {
97 const auto *fme = AST::cast<const FieldMemberExpression*>(node);
98 if (fme->isOptional)
99 return true;
100 node = fme->base;
101 break;
102 }
104 const auto *ame = AST::cast<const ArrayMemberExpression*>(node);
105 if (ame->isOptional)
106 return true;
107 node = ame->base;
108 break;
109 }
110 case Kind_CallExpression: {
111 const auto *ce = AST::cast<const CallExpression*>(node);
112 if (ce->isOptional)
113 return true;
114 node = ce->base;
115 break;
116 }
118 const auto *ne = AST::cast<const NestedExpression*>(node);
119 node = ne->expression;
120 break;
121 }
122 default:
123 // These unhandled nodes lead to invalid lvalues anyway, so they do not need to be handled here.
124 return false;
125 }
126 }
127 return false;
128}
129
131{
132 AST::ExpressionNode *expr = this;
133 AST::FormalParameterList *f = nullptr;
136 if (!f)
137 return nullptr;
138
141 }
142
143 AST::ExpressionNode *rhs = nullptr;
145 if (assign->op != QSOperator::Assign)
146 return nullptr;
147 expr = assign->left;
148 rhs = assign->right;
149 }
150 AST::PatternElement *binding = nullptr;
152 binding = new (pool) AST::PatternElement(idExpr->name, /*type annotation*/nullptr, rhs);
154 } else if (AST::Pattern *p = expr->patternCast()) {
156 QString s;
158 return nullptr;
159 binding = new (pool) AST::PatternElement(p, rhs);
161 }
162 if (!binding)
163 return nullptr;
164
165 return new (pool) AST::FormalParameterList(f, binding);
166}
167
172
174{
175 visitor->visit(this);
176 visitor->endVisit(this);
177}
178
180{
181 return this;
182}
183
185{
186 return this;
187}
188
190{
191 if (visitor->visit(this)) {
193 }
194 visitor->endVisit(this);
195}
196
201
206
208{
209 if (visitor->visit(this)) {
210 }
211
212 visitor->endVisit(this);
213}
214
216{
217 if (visitor->visit(this)) {
218 }
219
220 visitor->endVisit(this);
221}
222
224{
225 if (visitor->visit(this)) {
226 }
227
228 visitor->endVisit(this);
229}
230
232{
233 if (visitor->visit(this)) {
234 }
235
236 visitor->endVisit(this);
237}
238
240{
241 if (visitor->visit(this)) {
242 }
243
244 visitor->endVisit(this);
245}
246
248{
249 if (visitor->visit(this)) {
250 }
251
252 visitor->endVisit(this);
253}
254
255
257{
258 if (visitor->visit(this)) {
259 }
260
261 visitor->endVisit(this);
262}
263
265{
266 bool accepted = true;
267 for (TemplateLiteral *it = this; it && accepted; it = it->next) {
269 if (accepted)
272 }
273}
274
276{
277 if (visitor->visit(this)) {
278 }
279
280 visitor->endVisit(this);
281}
282
284{
285 if (visitor->visit(this)) {
286 }
287
288 visitor->endVisit(this);
289}
290
292{
293 if (visitor->visit(this))
295
296 visitor->endVisit(this);
297}
298
300 for (PatternElementList *it = elements; it != nullptr; it = it->next) {
302 if (e && e->bindingTarget != nullptr) {
303 if (errorLocation)
305 return false;
306 }
307 }
308 return true;
309}
310
312{
313 if (visitor->visit(this)) {
315 }
316
317 visitor->endVisit(this);
318}
319
320/*
321 This is the grammar for AssignmentPattern that we need to convert the literal to:
322
323 AssignmentPattern:
324 ObjectAssignmentPattern
325 ArrayAssignmentPattern
326 ArrayAssignmentPattern:
327 [ ElisionOpt AssignmentRestElementOpt ]
328 [ AssignmentElementList ]
329 [ AssignmentElementList , ElisionOpt AssignmentRestElementOpt ]
330 AssignmentElementList:
331 AssignmentElisionElement
332 AssignmentElementList , AssignmentElisionElement
333 AssignmentElisionElement:
334 ElisionOpt AssignmentElement
335 AssignmentRestElement:
336 ... DestructuringAssignmentTarget
337
338 ObjectAssignmentPattern:
339 {}
340 { AssignmentPropertyList }
341 { AssignmentPropertyList, }
342 AssignmentPropertyList:
343 AssignmentProperty
344 AssignmentPropertyList , AssignmentProperty
345 AssignmentProperty:
346 IdentifierReference InitializerOpt_In
347 PropertyName:
348 AssignmentElement
349
350 AssignmentElement:
351 DestructuringAssignmentTarget InitializerOpt_In
352 DestructuringAssignmentTarget:
353 LeftHandSideExpression
354
355 It was originally parsed with the following grammar:
356
357ArrayLiteral:
358 [ ElisionOpt ]
359 [ ElementList ]
360 [ ElementList , ElisionOpt ]
361ElementList:
362 ElisionOpt AssignmentExpression_In
363 ElisionOpt SpreadElement
364 ElementList , ElisionOpt AssignmentExpression_In
365 ElementList , Elisionopt SpreadElement
366SpreadElement:
367 ... AssignmentExpression_In
368ObjectLiteral:
369 {}
370 { PropertyDefinitionList }
371 { PropertyDefinitionList , }
372PropertyDefinitionList:
373 PropertyDefinition
374 PropertyDefinitionList , PropertyDefinition
375PropertyDefinition:
376 IdentifierReference
377 CoverInitializedName
378 PropertyName : AssignmentExpression_In
379 MethodDefinition
380PropertyName:
381 LiteralPropertyName
382 ComputedPropertyName
383
384*/
386{
387 if (parseMode == Binding)
388 return true;
389 for (auto *it = elements; it; it = it->next) {
390 if (!it->element)
391 continue;
394 *errorMessage = QString::fromLatin1("'...' can only appear as last element in a destructuring list.");
395 return false;
396 }
398 return false;
399 }
401 return true;
402}
403
405{
407 for (auto *it = elements; it; it = it->next) {
408 if (!it->element)
409 continue;
411 }
412 return result;
413}
414
416{
417 if (parseMode == Binding)
418 return true;
419 for (auto *it = properties; it; it = it->next) {
421 return false;
422 }
424 return true;
425}
426
434
436{
439 Q_ASSERT(bindingTarget == nullptr);
440 Q_ASSERT(bindingTarget == nullptr);
443
444 initializer = nullptr;
446 if (type == SpreadElement) {
447 if (!lhs) {
449 *errorMessage = QString::fromLatin1("Invalid lhs expression after '...' in destructuring expression.");
450 return false;
451 }
452 } else {
454
456 if (b->op != QSOperator::Assign) {
458 *errorMessage = QString::fromLatin1("Invalid assignment operation in destructuring expression");
459 return false;
460 }
463 Q_ASSERT(lhs);
464 } else {
466 }
467 if (!lhs) {
469 *errorMessage = QString::fromLatin1("Destructuring target is not a left hand side expression.");
470 return false;
471 }
472 }
473
474 if (auto *i = cast<IdentifierExpression *>(lhs)) {
477 return true;
478 }
479
481 if (auto *p = lhs->patternCast()) {
483 return false;
484 }
485 return true;
486}
487
489{
490 LeftHandSideExpression *lhs = nullptr;
491
492 if (bindingTarget) {
494 } else if (initializer) {
497 if (b->op == QSOperator::Assign)
499 }
500 }
501
502 if (!lhs)
503 return { };
504
505 if (auto *p = lhs->patternCast())
506 return p->warningsForAssignments();
507
508 return { };
509}
510
512{
514 if (type == Binding)
515 return true;
516 if (type == Getter || type == Setter) {
518 *errorMessage = QString::fromLatin1("Invalid getter/setter in destructuring expression.");
519 return false;
520 }
521 if (type == Method)
522 type = Literal;
525}
526
528{
530
531 if (!colonToken.isValid()) {
532 if (const BinaryExpression *b =
534 if (b->op == QSOperator::Assign) {
536 QString::fromLatin1("Invalid shorthand property initializer"), QtWarningMsg,
537 b->operatorToken });
538 }
539 }
540 }
541
543 return result;
544}
545
547{
548 if (visitor->visit(this)) {
549 // ###
550 }
551
552 visitor->endVisit(this);
553}
554
556{
557 if (visitor->visit(this)) {
558 }
559
560 visitor->endVisit(this);
561}
562
564{
565 if (visitor->visit(this)) {
566 }
567
568 visitor->endVisit(this);
569}
570
572{
573 if (visitor->visit(this)) {
574 }
575
576 visitor->endVisit(this);
577}
578
579namespace {
580struct LocaleWithoutZeroPadding : public QLocale
581{
582 LocaleWithoutZeroPadding()
583 : QLocale(QLocale::C)
584 {
585 setNumberOptions(QLocale::OmitLeadingZeroInExponent | QLocale::OmitGroupSeparator);
586 }
587};
588}
589
591{
592 // Can't use QString::number here anymore as it does zero padding by default now.
593
594 // In C++11 this initialization is thread-safe (6.7 [stmt.dcl] p4)
596 // Because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562 we can't use thread_local
597 // for the locale variable and therefore rely on toString(double) to be thread-safe.
598 return locale.toString(id, 'g', 16);
599}
600
602{
603 if (visitor->visit(this)) {
606 }
607
608 visitor->endVisit(this);
609}
610
612{
613 if (visitor->visit(this)) {
615 }
616
617 visitor->endVisit(this);
618}
619
621{
622 if (visitor->visit(this)) {
625 }
626
627 visitor->endVisit(this);
628}
629
631{
632 if (visitor->visit(this)) {
634 }
635
636 visitor->endVisit(this);
637}
638
640{
641 if (visitor->visit(this)) {
644 }
645
646 visitor->endVisit(this);
647}
648
650{
651 if (visitor->visit(this)) {
652 for (ArgumentList *it = this; it; it = it->next) {
654 }
655 }
656
657 visitor->endVisit(this);
658}
659
661{
662 if (visitor->visit(this)) {
664 }
665
666 visitor->endVisit(this);
667}
668
670{
671 if (visitor->visit(this)) {
673 }
674
675 visitor->endVisit(this);
676}
677
679{
680 if (visitor->visit(this)) {
682 }
683
684 visitor->endVisit(this);
685}
686
688{
689 if (visitor->visit(this)) {
691 }
692
693 visitor->endVisit(this);
694}
695
697{
698 if (visitor->visit(this)) {
700 }
701
702 visitor->endVisit(this);
703}
704
706{
707 if (visitor->visit(this)) {
709 }
710
711 visitor->endVisit(this);
712}
713
715{
716 if (visitor->visit(this)) {
718 }
719
720 visitor->endVisit(this);
721}
722
724{
725 if (visitor->visit(this)) {
727 }
728
729 visitor->endVisit(this);
730}
731
733{
734 if (visitor->visit(this)) {
736 }
737
738 visitor->endVisit(this);
739}
740
742{
743 if (visitor->visit(this)) {
745 }
746
747 visitor->endVisit(this);
748}
749
751{
752 if (visitor->visit(this)) {
754 }
755
756 visitor->endVisit(this);
757}
758
760{
761 if (visitor->visit(this)) {
764 }
765
766 visitor->endVisit(this);
767}
768
770{
771 if (visitor->visit(this)) {
773 accept(ok, visitor);
774 accept(ko, visitor);
775 }
776
777 visitor->endVisit(this);
778}
779
781{
782 if (visitor->visit(this)) {
785 }
786
787 visitor->endVisit(this);
788}
789
791{
792 if (visitor->visit(this)) {
794 }
795
796 visitor->endVisit(this);
797}
798
800{
801 if (visitor->visit(this)) {
802 for (StatementList *it = this; it; it = it->next) {
804 }
805 }
806
807 visitor->endVisit(this);
808}
809
811{
812 if (visitor->visit(this)) {
814 }
815
816 visitor->endVisit(this);
817}
818
820{
821 if (visitor->visit(this)) {
822 for (VariableDeclarationList *it = this; it; it = it->next) {
824 }
825 }
826
827 visitor->endVisit(this);
828}
829
831{
832 if (visitor->visit(this)) {
833 }
834
835 visitor->endVisit(this);
836}
837
839{
840 if (visitor->visit(this)) {
842 }
843
844 visitor->endVisit(this);
845}
846
848{
849 if (visitor->visit(this)) {
851 accept(ok, visitor);
852 accept(ko, visitor);
853 }
854
855 visitor->endVisit(this);
856}
857
859{
860 if (visitor->visit(this)) {
863 }
864
865 visitor->endVisit(this);
866}
867
869{
870 if (visitor->visit(this)) {
873 }
874
875 visitor->endVisit(this);
876}
877
890
892{
893 if (visitor->visit(this)) {
897 }
898
899 visitor->endVisit(this);
900}
901
903{
904 if (visitor->visit(this)) {
905 }
906
907 visitor->endVisit(this);
908}
909
911{
912 if (visitor->visit(this)) {
913 }
914
915 visitor->endVisit(this);
916}
917
919{
920 if (visitor->visit(this)) {
922 }
923
924 visitor->endVisit(this);
925}
926
928{
929 if (visitor->visit(this)) {
931 }
932
933 visitor->endVisit(this);
934}
935
936
938{
939 if (visitor->visit(this)) {
942 }
943
944 visitor->endVisit(this);
945}
946
948{
949 if (visitor->visit(this)) {
952 }
953
954 visitor->endVisit(this);
955}
956
958{
959 if (visitor->visit(this)) {
963 }
964
965 visitor->endVisit(this);
966}
967
969{
970 if (visitor->visit(this)) {
971 for (CaseClauses *it = this; it; it = it->next) {
973 }
974 }
975
976 visitor->endVisit(this);
977}
978
980{
981 if (visitor->visit(this)) {
984 }
985
986 visitor->endVisit(this);
987}
988
990{
991 if (visitor->visit(this)) {
993 }
994
995 visitor->endVisit(this);
996}
997
999{
1000 if (visitor->visit(this)) {
1002 }
1003
1004 visitor->endVisit(this);
1005}
1006
1008{
1009 if (visitor->visit(this)) {
1011 }
1012
1013 visitor->endVisit(this);
1014}
1015
1017{
1018 if (visitor->visit(this)) {
1022 }
1023
1024 visitor->endVisit(this);
1025}
1026
1028{
1029 if (visitor->visit(this)) {
1032 }
1033
1034 visitor->endVisit(this);
1035}
1036
1038{
1039 if (visitor->visit(this)) {
1041 }
1042
1043 visitor->endVisit(this);
1044}
1045
1047{
1048 if (visitor->visit(this)) {
1052 }
1053
1054 visitor->endVisit(this);
1055}
1056
1058{
1059 if (visitor->visit(this)) {
1063 }
1064
1065 visitor->endVisit(this);
1066}
1067
1072
1074{
1076 int i = 0;
1077 for (const FormalParameterList *it = this; it; it = it->next) {
1078 if (it->element) {
1081 if (duplicateIndex >= 0) {
1082 // change the name of the earlier argument to enforce the lookup semantics from the spec
1084 }
1087 : BoundName::Declared };
1088 }
1089 ++i;
1090 }
1091 return formals;
1092}
1093
1095{
1097 for (const FormalParameterList *it = this; it; it = it->next) {
1098 if (it->element)
1100 }
1101 return names;
1102}
1103
1105{
1106 bool accepted = true;
1107 for (FormalParameterList *it = this; it && accepted; it = it->next) {
1109 if (accepted)
1112 }
1113}
1114
1121
1123{
1124 if (visitor->visit(this)) {
1126 }
1127
1128 visitor->endVisit(this);
1129}
1130
1132{
1133 if (visitor->visit(this)) {
1134
1135 }
1136 visitor->endVisit(this);
1137}
1138
1140{
1141 if (visitor->visit(this)) {
1142 for (ImportsList *it = this; it; it = it->next) {
1144 }
1145 }
1146
1147 visitor->endVisit(this);
1148}
1149
1151{
1152 if (visitor->visit(this)) {
1154 }
1155
1156 visitor->endVisit(this);
1157}
1158
1160{
1161 if (visitor->visit(this)) {
1162 }
1163
1164 visitor->endVisit(this);
1165}
1166
1168{
1169 if (visitor->visit(this)) {
1170 }
1171
1172 visitor->endVisit(this);
1173}
1174
1176{
1177 if (visitor->visit(this)) {
1180 }
1181
1182 visitor->endVisit(this);
1183}
1184
1186{
1187 if (visitor->visit(this)) {
1190 }
1191
1192 visitor->endVisit(this);
1193}
1194
1196{
1197 if (visitor->visit(this)) {
1198
1199 }
1200
1201 visitor->endVisit(this);
1202}
1203
1205{
1206 if (visitor->visit(this)) {
1207 for (ExportsList *it = this; it; it = it->next) {
1209 }
1210 }
1211
1212 visitor->endVisit(this);
1213}
1214
1216{
1217 if (visitor->visit(this)) {
1219 }
1220
1221 visitor->endVisit(this);
1222}
1223
1234
1236{
1237 if (visitor->visit(this)) {
1239 }
1240
1241 visitor->endVisit(this);
1242}
1243
1245{
1246 if (visitor->visit(this)) {
1247 }
1248
1249 visitor->endVisit(this);
1250}
1251
1253{
1254 if (visitor->visit(this)) {
1257 }
1258
1259 visitor->endVisit(this);
1260}
1261
1263{
1264 if (visitor->visit(this)) {
1265 // accept(annotations, visitor); // accept manually in visit if interested
1266 // accept(memberType, visitor); // accept manually in visit if interested
1269 // accept(parameters, visitor); // accept manually in visit if interested
1270 }
1271
1272 visitor->endVisit(this);
1273}
1274
1276{
1277 if (visitor->visit(this)) {
1278 // accept(annotations, visitor); // accept manually in visit if interested
1281 }
1282
1283 visitor->endVisit(this);
1284}
1285
1287{
1288 if (visitor->visit(this)) {
1290 }
1291
1292 visitor->endVisit(this);
1293}
1294
1296{
1297 if (visitor->visit(this)) {
1298 // accept(type, visitor); // accept manually in visit if interested
1299 }
1300 visitor->endVisit(this);
1301}
1302
1304{
1305 if (visitor->visit(this)) {
1306 // accept(annotations, visitor); // accept manually in visit if interested
1310 }
1311
1312 visitor->endVisit(this);
1313}
1314
1316{
1317 if (visitor->visit(this)) {
1318 // accept(annotations, visitor); // accept manually in visit if interested
1321 }
1322
1323 visitor->endVisit(this);
1324}
1325
1327{
1328 if (visitor->visit(this)) {
1329 // accept(annotations, visitor); // accept manually in visit if interested
1332 }
1333
1334 visitor->endVisit(this);
1335}
1336
1338{
1339 if (visitor->visit(this)) {
1340 for (UiObjectMemberList *it = this; it; it = it->next)
1342 }
1343
1344 visitor->endVisit(this);
1345}
1346
1348{
1349 if (visitor->visit(this)) {
1350 for (UiArrayMemberList *it = this; it; it = it->next)
1352 }
1353
1354 visitor->endVisit(this);
1355}
1356
1358{
1359 if (visitor->visit(this)) {
1360 // accept(next, visitor) // accept manually in visit if interested
1361 }
1362
1363 visitor->endVisit(this);
1364}
1365
1367{
1368 if (visitor->visit(this)) {
1371 }
1372
1373 visitor->endVisit(this);
1374}
1375
1377{
1378 if (visitor->visit(this)) {
1380 }
1381
1382 visitor->endVisit(this);
1383}
1384
1386{
1387 if (visitor->visit(this)) {
1389 // accept(version, visitor); // accept manually in visit if interested
1390 }
1391
1392 visitor->endVisit(this);
1393}
1394
1396{
1397 if (visitor->visit(this)) {
1398 }
1399
1400 visitor->endVisit(this);
1401}
1402
1403
1405{
1406 if (visitor->visit(this)) {
1407 }
1408
1409 visitor->endVisit(this);
1410}
1411
1413{
1414 bool accepted = true;
1415 for (UiHeaderItemList *it = this; it && accepted; it = it->next) {
1417 if (accepted)
1419
1421 }
1422}
1423
1424
1426{
1427 if (visitor->visit(this)) {
1428 // accept(annotations, visitor); // accept manually in visit if interested
1430 }
1431
1432 visitor->endVisit(this);
1433}
1434
1436{
1437 if (visitor->visit(this)) {
1438 // accept(annotations, visitor); // accept manually in visit if interested
1440 }
1441
1442 visitor->endVisit(this);
1443}
1444
1446{
1447 if (visitor->visit(this)) {
1448 }
1449
1450 visitor->endVisit(this);
1451}
1452
1454{
1455 if (visitor->visit(this)) {
1458 }
1459
1460 visitor->endVisit(this);
1461}
1462
1467
1469{
1470 if (visitor->visit(this)) {
1474 }
1475
1476 visitor->endVisit(this);
1477}
1478
1491
1493{
1494 bool accepted = true;
1495 for (PatternElementList *it = this; it && accepted; it = it->next) {
1497 if (accepted) {
1500 }
1502 }
1503}
1504
1506{
1507 for (PatternElementList *it = this; it; it = it->next) {
1508 if (it->element)
1510 }
1511}
1512
1514{
1515 if (visitor->visit(this)) {
1520 }
1521
1522 visitor->endVisit(this);
1523}
1524
1529
1531{
1532 bool accepted = true;
1533 for (PatternPropertyList *it = this; it && accepted; it = it->next) {
1535 if (accepted)
1538 }
1539}
1540
1546
1548{
1549 if (visitor->visit(this)) {
1551 }
1552
1553 visitor->endVisit(this);
1554}
1555
1557{
1558 if (visitor->visit(this)) {
1561 }
1562
1563 visitor->endVisit(this);
1564}
1565
1567{
1568 return this;
1569}
1570
1572{
1573 if (visitor->visit(this)) {
1576 }
1577
1578 visitor->endVisit(this);
1579}
1580
1582{
1583 bool accepted = true;
1584 for (ClassElementList *it = this; it && accepted; it = it->next) {
1586 if (accepted)
1588
1590 }
1591}
1592
1594{
1596 next = nullptr;
1597 return front;
1598}
1599
1601{
1602 return this;
1603}
1604
1609
1611{
1612 if (visitor->visit(this)) {
1613 }
1614 visitor->endVisit(this);
1615}
1616
1618{
1620 toString(&result);
1621 return result;
1622}
1623
1625{
1627
1628 if (typeArgument) {
1629 out->append(QLatin1Char('<'));
1631 out->append(QLatin1Char('>'));
1632 };
1633}
1634
1636{
1637 if (visitor->visit(this)) {
1638 // accept(annotations, visitor); // accept manually in visit if interested
1640 }
1641
1642 visitor->endVisit(this);
1643}
1644
1646{
1647 if (visitor->visit(this)) {
1648 }
1649
1650 visitor->endVisit(this);
1651}
1652
1654{
1655 if (visitor->visit(this)) {
1656 for (UiAnnotationList *it = this; it; it = it->next)
1658 }
1659
1660 visitor->endVisit(this);
1661}
1662
1664{
1665 if (visitor->visit(this)) {
1668 }
1669
1670 visitor->endVisit(this);
1671}
1672
1679
1686
1687} } // namespace QQmlJS::AST
1688
1689QT_END_NAMESPACE
FunctionExpression * asAnonymousFunctionDefinition(Node *n)
Definition qqmljsast.cpp:21
ClassExpression * asAnonymousClassDefinition(Node *n)
Definition qqmljsast.cpp:31