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) {
270 }
271}
272
274{
275 if (visitor->visit(this)) {
276 }
277
278 visitor->endVisit(this);
279}
280
282{
283 if (visitor->visit(this)) {
284 }
285
286 visitor->endVisit(this);
287}
288
290{
291 if (visitor->visit(this))
293
294 visitor->endVisit(this);
295}
296
298 for (PatternElementList *it = elements; it != nullptr; it = it->next) {
300 if (e && e->bindingTarget != nullptr) {
301 if (errorLocation)
303 return false;
304 }
305 }
306 return true;
307}
308
310{
311 if (visitor->visit(this)) {
313 }
314
315 visitor->endVisit(this);
316}
317
318/*
319 This is the grammar for AssignmentPattern that we need to convert the literal to:
320
321 AssignmentPattern:
322 ObjectAssignmentPattern
323 ArrayAssignmentPattern
324 ArrayAssignmentPattern:
325 [ ElisionOpt AssignmentRestElementOpt ]
326 [ AssignmentElementList ]
327 [ AssignmentElementList , ElisionOpt AssignmentRestElementOpt ]
328 AssignmentElementList:
329 AssignmentElisionElement
330 AssignmentElementList , AssignmentElisionElement
331 AssignmentElisionElement:
332 ElisionOpt AssignmentElement
333 AssignmentRestElement:
334 ... DestructuringAssignmentTarget
335
336 ObjectAssignmentPattern:
337 {}
338 { AssignmentPropertyList }
339 { AssignmentPropertyList, }
340 AssignmentPropertyList:
341 AssignmentProperty
342 AssignmentPropertyList , AssignmentProperty
343 AssignmentProperty:
344 IdentifierReference InitializerOpt_In
345 PropertyName:
346 AssignmentElement
347
348 AssignmentElement:
349 DestructuringAssignmentTarget InitializerOpt_In
350 DestructuringAssignmentTarget:
351 LeftHandSideExpression
352
353 It was originally parsed with the following grammar:
354
355ArrayLiteral:
356 [ ElisionOpt ]
357 [ ElementList ]
358 [ ElementList , ElisionOpt ]
359ElementList:
360 ElisionOpt AssignmentExpression_In
361 ElisionOpt SpreadElement
362 ElementList , ElisionOpt AssignmentExpression_In
363 ElementList , Elisionopt SpreadElement
364SpreadElement:
365 ... AssignmentExpression_In
366ObjectLiteral:
367 {}
368 { PropertyDefinitionList }
369 { PropertyDefinitionList , }
370PropertyDefinitionList:
371 PropertyDefinition
372 PropertyDefinitionList , PropertyDefinition
373PropertyDefinition:
374 IdentifierReference
375 CoverInitializedName
376 PropertyName : AssignmentExpression_In
377 MethodDefinition
378PropertyName:
379 LiteralPropertyName
380 ComputedPropertyName
381
382*/
384{
385 if (parseMode == Binding)
386 return true;
387 for (auto *it = elements; it; it = it->next) {
388 if (!it->element)
389 continue;
392 *errorMessage = QString::fromLatin1("'...' can only appear as last element in a destructuring list.");
393 return false;
394 }
396 return false;
397 }
399 return true;
400}
401
403{
405 for (auto *it = elements; it; it = it->next) {
406 if (!it->element)
407 continue;
409 }
410 return result;
411}
412
414{
415 if (parseMode == Binding)
416 return true;
417 for (auto *it = properties; it; it = it->next) {
419 return false;
420 }
422 return true;
423}
424
432
434{
437 Q_ASSERT(bindingTarget == nullptr);
438 Q_ASSERT(bindingTarget == nullptr);
441
442 initializer = nullptr;
444 if (type == SpreadElement) {
445 if (!lhs) {
447 *errorMessage = QString::fromLatin1("Invalid lhs expression after '...' in destructuring expression.");
448 return false;
449 }
450 } else {
452
454 if (b->op != QSOperator::Assign) {
456 *errorMessage = QString::fromLatin1("Invalid assignment operation in destructuring expression");
457 return false;
458 }
461 Q_ASSERT(lhs);
462 } else {
464 }
465 if (!lhs) {
467 *errorMessage = QString::fromLatin1("Destructuring target is not a left hand side expression.");
468 return false;
469 }
470 }
471
472 if (auto *i = cast<IdentifierExpression *>(lhs)) {
475 return true;
476 }
477
479 if (auto *p = lhs->patternCast()) {
481 return false;
482 }
483 return true;
484}
485
487{
488 LeftHandSideExpression *lhs = nullptr;
489
490 if (bindingTarget) {
492 } else if (initializer) {
495 if (b->op == QSOperator::Assign)
497 }
498 }
499
500 if (!lhs)
501 return { };
502
503 if (auto *p = lhs->patternCast())
504 return p->warningsForAssignments();
505
506 return { };
507}
508
510{
512 if (type == Binding)
513 return true;
514 if (type == Getter || type == Setter) {
516 *errorMessage = QString::fromLatin1("Invalid getter/setter in destructuring expression.");
517 return false;
518 }
519 if (type == Method)
520 type = Literal;
523}
524
526{
528
529 if (!colonToken.isValid()) {
530 if (const BinaryExpression *b =
532 if (b->op == QSOperator::Assign) {
534 QString::fromLatin1("Invalid shorthand property initializer"), QtWarningMsg,
535 b->operatorToken });
536 }
537 }
538 }
539
541 return result;
542}
543
545{
546 if (visitor->visit(this)) {
547 // ###
548 }
549
550 visitor->endVisit(this);
551}
552
554{
555 if (visitor->visit(this)) {
556 }
557
558 visitor->endVisit(this);
559}
560
562{
563 if (visitor->visit(this)) {
564 }
565
566 visitor->endVisit(this);
567}
568
570{
571 if (visitor->visit(this)) {
572 }
573
574 visitor->endVisit(this);
575}
576
577namespace {
578struct LocaleWithoutZeroPadding : public QLocale
579{
580 LocaleWithoutZeroPadding()
581 : QLocale(QLocale::C)
582 {
583 setNumberOptions(QLocale::OmitLeadingZeroInExponent | QLocale::OmitGroupSeparator);
584 }
585};
586}
587
589{
590 // Can't use QString::number here anymore as it does zero padding by default now.
591
592 // In C++11 this initialization is thread-safe (6.7 [stmt.dcl] p4)
594 // Because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562 we can't use thread_local
595 // for the locale variable and therefore rely on toString(double) to be thread-safe.
596 return locale.toString(id, 'g', 16);
597}
598
600{
601 if (visitor->visit(this)) {
604 }
605
606 visitor->endVisit(this);
607}
608
610{
611 if (visitor->visit(this)) {
613 }
614
615 visitor->endVisit(this);
616}
617
619{
620 if (visitor->visit(this)) {
623 }
624
625 visitor->endVisit(this);
626}
627
629{
630 if (visitor->visit(this)) {
632 }
633
634 visitor->endVisit(this);
635}
636
638{
639 if (visitor->visit(this)) {
642 }
643
644 visitor->endVisit(this);
645}
646
648{
649 if (visitor->visit(this)) {
650 for (ArgumentList *it = this; it; it = it->next) {
652 }
653 }
654
655 visitor->endVisit(this);
656}
657
659{
660 if (visitor->visit(this)) {
662 }
663
664 visitor->endVisit(this);
665}
666
668{
669 if (visitor->visit(this)) {
671 }
672
673 visitor->endVisit(this);
674}
675
677{
678 if (visitor->visit(this)) {
680 }
681
682 visitor->endVisit(this);
683}
684
686{
687 if (visitor->visit(this)) {
689 }
690
691 visitor->endVisit(this);
692}
693
695{
696 if (visitor->visit(this)) {
698 }
699
700 visitor->endVisit(this);
701}
702
704{
705 if (visitor->visit(this)) {
707 }
708
709 visitor->endVisit(this);
710}
711
713{
714 if (visitor->visit(this)) {
716 }
717
718 visitor->endVisit(this);
719}
720
722{
723 if (visitor->visit(this)) {
725 }
726
727 visitor->endVisit(this);
728}
729
731{
732 if (visitor->visit(this)) {
734 }
735
736 visitor->endVisit(this);
737}
738
740{
741 if (visitor->visit(this)) {
743 }
744
745 visitor->endVisit(this);
746}
747
749{
750 if (visitor->visit(this)) {
752 }
753
754 visitor->endVisit(this);
755}
756
758{
759 if (visitor->visit(this)) {
762 }
763
764 visitor->endVisit(this);
765}
766
768{
769 if (visitor->visit(this)) {
771 accept(ok, visitor);
772 accept(ko, visitor);
773 }
774
775 visitor->endVisit(this);
776}
777
779{
780 if (visitor->visit(this)) {
783 }
784
785 visitor->endVisit(this);
786}
787
789{
790 if (visitor->visit(this)) {
792 }
793
794 visitor->endVisit(this);
795}
796
798{
799 if (visitor->visit(this)) {
800 for (StatementList *it = this; it; it = it->next) {
802 }
803 }
804
805 visitor->endVisit(this);
806}
807
809{
810 if (visitor->visit(this)) {
812 }
813
814 visitor->endVisit(this);
815}
816
818{
819 if (visitor->visit(this)) {
820 for (VariableDeclarationList *it = this; it; it = it->next) {
822 }
823 }
824
825 visitor->endVisit(this);
826}
827
829{
830 if (visitor->visit(this)) {
831 }
832
833 visitor->endVisit(this);
834}
835
837{
838 if (visitor->visit(this)) {
840 }
841
842 visitor->endVisit(this);
843}
844
846{
847 if (visitor->visit(this)) {
849 accept(ok, visitor);
850 accept(ko, visitor);
851 }
852
853 visitor->endVisit(this);
854}
855
857{
858 if (visitor->visit(this)) {
861 }
862
863 visitor->endVisit(this);
864}
865
867{
868 if (visitor->visit(this)) {
871 }
872
873 visitor->endVisit(this);
874}
875
888
890{
891 if (visitor->visit(this)) {
895 }
896
897 visitor->endVisit(this);
898}
899
901{
902 if (visitor->visit(this)) {
903 }
904
905 visitor->endVisit(this);
906}
907
909{
910 if (visitor->visit(this)) {
911 }
912
913 visitor->endVisit(this);
914}
915
917{
918 if (visitor->visit(this)) {
920 }
921
922 visitor->endVisit(this);
923}
924
926{
927 if (visitor->visit(this)) {
929 }
930
931 visitor->endVisit(this);
932}
933
934
936{
937 if (visitor->visit(this)) {
940 }
941
942 visitor->endVisit(this);
943}
944
946{
947 if (visitor->visit(this)) {
950 }
951
952 visitor->endVisit(this);
953}
954
956{
957 if (visitor->visit(this)) {
961 }
962
963 visitor->endVisit(this);
964}
965
967{
968 if (visitor->visit(this)) {
969 for (CaseClauses *it = this; it; it = it->next) {
971 }
972 }
973
974 visitor->endVisit(this);
975}
976
978{
979 if (visitor->visit(this)) {
982 }
983
984 visitor->endVisit(this);
985}
986
988{
989 if (visitor->visit(this)) {
991 }
992
993 visitor->endVisit(this);
994}
995
997{
998 if (visitor->visit(this)) {
1000 }
1001
1002 visitor->endVisit(this);
1003}
1004
1006{
1007 if (visitor->visit(this)) {
1009 }
1010
1011 visitor->endVisit(this);
1012}
1013
1015{
1016 if (visitor->visit(this)) {
1020 }
1021
1022 visitor->endVisit(this);
1023}
1024
1026{
1027 if (visitor->visit(this)) {
1030 }
1031
1032 visitor->endVisit(this);
1033}
1034
1036{
1037 if (visitor->visit(this)) {
1039 }
1040
1041 visitor->endVisit(this);
1042}
1043
1045{
1046 if (visitor->visit(this)) {
1050 }
1051
1052 visitor->endVisit(this);
1053}
1054
1056{
1057 if (visitor->visit(this)) {
1061 }
1062
1063 visitor->endVisit(this);
1064}
1065
1070
1072{
1074 int i = 0;
1075 for (const FormalParameterList *it = this; it; it = it->next) {
1076 if (it->element) {
1079 if (duplicateIndex >= 0) {
1080 // change the name of the earlier argument to enforce the lookup semantics from the spec
1082 }
1085 : BoundName::Declared };
1086 }
1087 ++i;
1088 }
1089 return formals;
1090}
1091
1093{
1095 for (const FormalParameterList *it = this; it; it = it->next) {
1096 if (it->element)
1098 }
1099 return names;
1100}
1101
1103{
1104 bool accepted = true;
1105 for (FormalParameterList *it = this; it && accepted; it = it->next) {
1107 if (accepted)
1110 }
1111}
1112
1119
1121{
1122 if (visitor->visit(this)) {
1124 }
1125
1126 visitor->endVisit(this);
1127}
1128
1130{
1131 if (visitor->visit(this)) {
1132
1133 }
1134 visitor->endVisit(this);
1135}
1136
1138{
1139 if (visitor->visit(this)) {
1140 for (ImportsList *it = this; it; it = it->next) {
1142 }
1143 }
1144
1145 visitor->endVisit(this);
1146}
1147
1149{
1150 if (visitor->visit(this)) {
1152 }
1153
1154 visitor->endVisit(this);
1155}
1156
1158{
1159 if (visitor->visit(this)) {
1160 }
1161
1162 visitor->endVisit(this);
1163}
1164
1166{
1167 if (visitor->visit(this)) {
1168 }
1169
1170 visitor->endVisit(this);
1171}
1172
1174{
1175 if (visitor->visit(this)) {
1178 }
1179
1180 visitor->endVisit(this);
1181}
1182
1184{
1185 if (visitor->visit(this)) {
1188 }
1189
1190 visitor->endVisit(this);
1191}
1192
1194{
1195 if (visitor->visit(this)) {
1196
1197 }
1198
1199 visitor->endVisit(this);
1200}
1201
1203{
1204 if (visitor->visit(this)) {
1205 for (ExportsList *it = this; it; it = it->next) {
1207 }
1208 }
1209
1210 visitor->endVisit(this);
1211}
1212
1214{
1215 if (visitor->visit(this)) {
1217 }
1218
1219 visitor->endVisit(this);
1220}
1221
1232
1234{
1235 if (visitor->visit(this)) {
1237 }
1238
1239 visitor->endVisit(this);
1240}
1241
1243{
1244 if (visitor->visit(this)) {
1245 }
1246
1247 visitor->endVisit(this);
1248}
1249
1251{
1252 if (visitor->visit(this)) {
1255 }
1256
1257 visitor->endVisit(this);
1258}
1259
1261{
1262 if (visitor->visit(this)) {
1263 // accept(annotations, visitor); // accept manually in visit if interested
1264 // accept(memberType, visitor); // accept manually in visit if interested
1267 // accept(parameters, visitor); // accept manually in visit if interested
1268 }
1269
1270 visitor->endVisit(this);
1271}
1272
1274{
1275 if (visitor->visit(this)) {
1276 // accept(annotations, visitor); // accept manually in visit if interested
1279 }
1280
1281 visitor->endVisit(this);
1282}
1283
1285{
1286 if (visitor->visit(this)) {
1288 }
1289
1290 visitor->endVisit(this);
1291}
1292
1294{
1295 if (visitor->visit(this)) {
1296 // accept(type, visitor); // accept manually in visit if interested
1297 }
1298 visitor->endVisit(this);
1299}
1300
1302{
1303 if (visitor->visit(this)) {
1304 // accept(annotations, visitor); // accept manually in visit if interested
1308 }
1309
1310 visitor->endVisit(this);
1311}
1312
1314{
1315 if (visitor->visit(this)) {
1316 // accept(annotations, visitor); // accept manually in visit if interested
1319 }
1320
1321 visitor->endVisit(this);
1322}
1323
1325{
1326 if (visitor->visit(this)) {
1327 // accept(annotations, visitor); // accept manually in visit if interested
1330 }
1331
1332 visitor->endVisit(this);
1333}
1334
1336{
1337 if (visitor->visit(this)) {
1338 for (UiObjectMemberList *it = this; it; it = it->next)
1340 }
1341
1342 visitor->endVisit(this);
1343}
1344
1346{
1347 if (visitor->visit(this)) {
1348 for (UiArrayMemberList *it = this; it; it = it->next)
1350 }
1351
1352 visitor->endVisit(this);
1353}
1354
1356{
1357 if (visitor->visit(this)) {
1358 // accept(next, visitor) // accept manually in visit if interested
1359 }
1360
1361 visitor->endVisit(this);
1362}
1363
1365{
1366 if (visitor->visit(this)) {
1369 }
1370
1371 visitor->endVisit(this);
1372}
1373
1375{
1376 if (visitor->visit(this)) {
1378 }
1379
1380 visitor->endVisit(this);
1381}
1382
1384{
1385 if (visitor->visit(this)) {
1387 // accept(version, visitor); // accept manually in visit if interested
1388 }
1389
1390 visitor->endVisit(this);
1391}
1392
1394{
1395 if (visitor->visit(this)) {
1396 }
1397
1398 visitor->endVisit(this);
1399}
1400
1401
1403{
1404 if (visitor->visit(this)) {
1405 }
1406
1407 visitor->endVisit(this);
1408}
1409
1411{
1412 bool accepted = true;
1413 for (UiHeaderItemList *it = this; it && accepted; it = it->next) {
1415 if (accepted)
1417
1419 }
1420}
1421
1422
1424{
1425 if (visitor->visit(this)) {
1426 // accept(annotations, visitor); // accept manually in visit if interested
1428 }
1429
1430 visitor->endVisit(this);
1431}
1432
1434{
1435 if (visitor->visit(this)) {
1436 // accept(annotations, visitor); // accept manually in visit if interested
1438 }
1439
1440 visitor->endVisit(this);
1441}
1442
1444{
1445 if (visitor->visit(this)) {
1446 }
1447
1448 visitor->endVisit(this);
1449}
1450
1452{
1453 if (visitor->visit(this)) {
1456 }
1457
1458 visitor->endVisit(this);
1459}
1460
1465
1467{
1468 if (visitor->visit(this)) {
1472 }
1473
1474 visitor->endVisit(this);
1475}
1476
1489
1491{
1492 bool accepted = true;
1493 for (PatternElementList *it = this; it && accepted; it = it->next) {
1495 if (accepted) {
1498 }
1500 }
1501}
1502
1504{
1505 for (PatternElementList *it = this; it; it = it->next) {
1506 if (it->element)
1508 }
1509}
1510
1512{
1513 if (visitor->visit(this)) {
1518 }
1519
1520 visitor->endVisit(this);
1521}
1522
1527
1529{
1530 bool accepted = true;
1531 for (PatternPropertyList *it = this; it && accepted; it = it->next) {
1533 if (accepted)
1536 }
1537}
1538
1544
1546{
1547 if (visitor->visit(this)) {
1549 }
1550
1551 visitor->endVisit(this);
1552}
1553
1555{
1556 if (visitor->visit(this)) {
1559 }
1560
1561 visitor->endVisit(this);
1562}
1563
1565{
1566 return this;
1567}
1568
1570{
1571 if (visitor->visit(this)) {
1574 }
1575
1576 visitor->endVisit(this);
1577}
1578
1580{
1581 bool accepted = true;
1582 for (ClassElementList *it = this; it && accepted; it = it->next) {
1584 if (accepted)
1586
1588 }
1589}
1590
1592{
1594 next = nullptr;
1595 return front;
1596}
1597
1599{
1600 return this;
1601}
1602
1607
1609{
1610 if (visitor->visit(this)) {
1611 }
1612 visitor->endVisit(this);
1613}
1614
1616{
1618 toString(&result);
1619 return result;
1620}
1621
1623{
1625
1626 if (typeArgument) {
1627 out->append(QLatin1Char('<'));
1629 out->append(QLatin1Char('>'));
1630 };
1631}
1632
1634{
1635 if (visitor->visit(this)) {
1636 // accept(annotations, visitor); // accept manually in visit if interested
1638 }
1639
1640 visitor->endVisit(this);
1641}
1642
1644{
1645 if (visitor->visit(this)) {
1646 }
1647
1648 visitor->endVisit(this);
1649}
1650
1652{
1653 if (visitor->visit(this)) {
1654 for (UiAnnotationList *it = this; it; it = it->next)
1656 }
1657
1658 visitor->endVisit(this);
1659}
1660
1662{
1663 if (visitor->visit(this)) {
1666 }
1667
1668 visitor->endVisit(this);
1669}
1670
1677
1684
1685} } // namespace QQmlJS::AST
1686
1687QT_END_NAMESPACE
FunctionExpression * asAnonymousFunctionDefinition(Node *n)
Definition qqmljsast.cpp:21
ClassExpression * asAnonymousClassDefinition(Node *n)
Definition qqmljsast.cpp:31