@@ -1256,44 +1256,10 @@ class Parser {
1256
1256
return isLifetimeDependenceToken ();
1257
1257
}
1258
1258
1259
- struct ParsedTypeAttributeList {
1260
- ParamDecl::Specifier Specifier = ParamDecl::Specifier::Default;
1261
- SourceLoc SpecifierLoc;
1262
- SourceLoc IsolatedLoc;
1263
- SourceLoc ConstLoc;
1264
- SourceLoc SendingLoc;
1265
- SmallVector<TypeOrCustomAttr> Attributes;
1266
- SmallVector<LifetimeDependenceSpecifier> lifetimeDependenceSpecifiers;
1267
-
1268
- // / Main entry point for parsing.
1269
- // /
1270
- // / Inline we just have the fast path of failing to match. We call slowParse
1271
- // / that contains the outline of more complex implementation. This is HOT
1272
- // / code!
1273
- ParserStatus parse (Parser &P) {
1274
- auto &Tok = P.Tok ;
1275
- if (Tok.is (tok::at_sign) || P.isParameterSpecifier ())
1276
- return slowParse (P);
1277
- return makeParserSuccess ();
1278
- }
1279
-
1280
- TypeRepr *applyAttributesToType (Parser &P, TypeRepr *Type) const ;
1281
-
1282
- private:
1283
- // / An out of line implementation of the more complicated cases. This
1284
- // / ensures on the inlined fast path we handle the case of not matching.
1285
- ParserStatus slowParse (Parser &P);
1286
- };
1287
-
1288
1259
bool parseConventionAttributeInternal (SourceLoc atLoc, SourceLoc attrLoc,
1289
1260
ConventionTypeAttr *&result,
1290
1261
bool justChecking);
1291
1262
1292
- ParserStatus parseTypeAttribute (TypeOrCustomAttr &result, SourceLoc AtLoc,
1293
- SourceLoc AtEndLoc,
1294
- PatternBindingInitializer *&initContext,
1295
- bool justChecking = false );
1296
-
1297
1263
ParserStatus parseLifetimeDependenceSpecifiers (
1298
1264
SmallVectorImpl<LifetimeDependenceSpecifier> &specifierList);
1299
1265
@@ -1488,6 +1454,40 @@ class Parser {
1488
1454
// / Parse a dotted type, e.g. 'Foo<X>.Y.Z', 'P.Type', '[X].Y'.
1489
1455
ParserResult<TypeRepr> parseTypeDotted (ParserResult<TypeRepr> Base);
1490
1456
1457
+ struct ParsedTypeAttributeList {
1458
+ ParamDecl::Specifier Specifier = ParamDecl::Specifier::Default;
1459
+ SourceLoc SpecifierLoc;
1460
+ SourceLoc IsolatedLoc;
1461
+ SourceLoc ConstLoc;
1462
+ SourceLoc SendingLoc;
1463
+ SmallVector<TypeOrCustomAttr> Attributes;
1464
+ SmallVector<LifetimeDependenceSpecifier> lifetimeDependenceSpecifiers;
1465
+
1466
+ // / Main entry point for parsing.
1467
+ // /
1468
+ // / Inline we just have the fast path of failing to match. We call slowParse
1469
+ // / that contains the outline of more complex implementation. This is HOT
1470
+ // / code!
1471
+ ParserStatus parse (Parser &P) {
1472
+ auto &Tok = P.Tok ;
1473
+ if (Tok.is (tok::at_sign) || P.isParameterSpecifier ())
1474
+ return slowParse (P);
1475
+ return makeParserSuccess ();
1476
+ }
1477
+
1478
+ TypeRepr *applyAttributesToType (Parser &P, TypeRepr *Type) const ;
1479
+
1480
+ private:
1481
+ // / An out of line implementation of the more complicated cases. This
1482
+ // / ensures on the inlined fast path we handle the case of not matching.
1483
+ ParserStatus slowParse (Parser &P);
1484
+ };
1485
+
1486
+ ParserStatus parseTypeAttribute (TypeOrCustomAttr &result, SourceLoc AtLoc,
1487
+ SourceLoc AtEndLoc,
1488
+ PatternBindingInitializer *&initContext,
1489
+ bool justChecking = false );
1490
+
1491
1491
ParserResult<TypeRepr> parseOldStyleProtocolComposition ();
1492
1492
ParserResult<TypeRepr> parseAnyType ();
1493
1493
ParserResult<TypeRepr> parseSILBoxType (GenericParamList *generics,
0 commit comments