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