@@ -150,12 +150,11 @@ extension TokenConsumer {
150150}
151151
152152extension Parser {
153- @_spi ( RawSyntax)
154- public struct DeclAttributes {
155- public var attributes : RawAttributeListSyntax ?
156- public var modifiers : RawModifierListSyntax ?
153+ struct DeclAttributes {
154+ var attributes : RawAttributeListSyntax ?
155+ var modifiers : RawModifierListSyntax ?
157156
158- public init ( attributes: RawAttributeListSyntax ? , modifiers: RawModifierListSyntax ? ) {
157+ init ( attributes: RawAttributeListSyntax ? , modifiers: RawModifierListSyntax ? ) {
159158 self . attributes = attributes
160159 self . modifiers = modifiers
161160 }
@@ -188,8 +187,7 @@ extension Parser {
188187 ///
189188 /// If `inMemberDeclList` is `true`, we know that the next item must be a
190189 /// declaration and thus start with a keyword. This allows futher recovery.
191- @_spi ( RawSyntax)
192- public mutating func parseDeclaration( inMemberDeclList: Bool = false ) -> RawDeclSyntax {
190+ mutating func parseDeclaration( inMemberDeclList: Bool = false ) -> RawDeclSyntax {
193191 switch self . at ( anyIn: PoundDeclarationStart . self) {
194192 case ( . poundIfKeyword, _) ? :
195193 if self . withLookahead ( { $0. consumeIfConfigOfAttributes ( ) } ) {
@@ -320,8 +318,7 @@ extension Parser {
320318 /// import-declaration → attributes? 'import' import-kind? import-path
321319 /// import-kind → 'typealias' | 'struct' | 'class' | 'enum' | 'protocol' | 'let' | 'var' | 'func'
322320 /// import-path → identifier | identifier '.' import-path
323- @_spi ( RawSyntax)
324- public mutating func parseImportDeclaration(
321+ mutating func parseImportDeclaration(
325322 _ attrs: DeclAttributes ,
326323 _ handle: RecoveryConsumptionHandle
327324 ) -> RawImportDeclSyntax {
@@ -339,8 +336,7 @@ extension Parser {
339336 )
340337 }
341338
342- @_spi ( RawSyntax)
343- public mutating func parseImportKind( ) -> RawTokenSyntax ? {
339+ mutating func parseImportKind( ) -> RawTokenSyntax ? {
344340 enum ImportKind : TokenSpecSet {
345341 case `typealias`
346342 case `struct`
@@ -385,8 +381,7 @@ extension Parser {
385381 return self . consume ( ifAnyIn: ImportKind . self)
386382 }
387383
388- @_spi ( RawSyntax)
389- public mutating func parseImportPath( ) -> RawImportPathSyntax {
384+ mutating func parseImportPath( ) -> RawImportPathSyntax {
390385 var elements = [ RawImportPathComponentSyntax] ( )
391386 var keepGoing : RawTokenSyntax ? = nil
392387 var loopProgress = LoopProgressCondition ( )
@@ -415,8 +410,7 @@ extension Parser {
415410 /// extension-body → '{' extension-members? '}'
416411 /// extension-members → extension-member extension-members?
417412 /// extension-member → declaration | compiler-control-statement
418- @_spi ( RawSyntax)
419- public mutating func parseExtensionDeclaration(
413+ mutating func parseExtensionDeclaration(
420414 _ attrs: DeclAttributes ,
421415 _ handle: RecoveryConsumptionHandle
422416 ) -> RawExtensionDeclSyntax {
@@ -468,8 +462,7 @@ extension Parser {
468462 )
469463 }
470464
471- @_spi ( RawSyntax)
472- public mutating func parseGenericParameters( ) -> RawGenericParameterClauseSyntax {
465+ mutating func parseGenericParameters( ) -> RawGenericParameterClauseSyntax {
473466 if let remainingTokens = remainingTokensIfMaximumNestingLevelReached ( ) {
474467 return RawGenericParameterClauseSyntax (
475468 remainingTokens,
@@ -631,8 +624,7 @@ extension Parser {
631624 }
632625 }
633626
634- @_spi ( RawSyntax)
635- public mutating func parseGenericWhereClause( ) -> RawGenericWhereClauseSyntax {
627+ mutating func parseGenericWhereClause( ) -> RawGenericWhereClauseSyntax {
636628 let ( unexpectedBeforeWhereKeyword, whereKeyword) = self . expect ( . keyword( . where) )
637629
638630 var elements = [ RawGenericRequirementSyntax] ( )
@@ -808,8 +800,7 @@ extension Parser {
808800}
809801
810802extension Parser {
811- @_spi ( RawSyntax)
812- public mutating func parseMemberDeclListItem( ) -> RawMemberDeclListItemSyntax ? {
803+ mutating func parseMemberDeclListItem( ) -> RawMemberDeclListItemSyntax ? {
813804 if let remainingTokens = remainingTokensIfMaximumNestingLevelReached ( ) {
814805 let item = RawMemberDeclListItemSyntax (
815806 remainingTokens,
@@ -848,8 +839,7 @@ extension Parser {
848839 /// `introducer` is the `struct`, `class`, ... keyword that is the cause that the member decl block is being parsed.
849840 /// If the left brace is missing, its indentation will be used to judge whether a following `}` was
850841 /// indented to close this code block or a surrounding context. See `expectRightBrace`.
851- @_spi ( RawSyntax)
852- public mutating func parseMemberDeclList( introducer: RawTokenSyntax ? = nil ) -> RawMemberDeclBlockSyntax {
842+ mutating func parseMemberDeclList( introducer: RawTokenSyntax ? = nil ) -> RawMemberDeclBlockSyntax {
853843 var elements = [ RawMemberDeclListItemSyntax] ( )
854844 let ( unexpectedBeforeLBrace, lbrace) = self . expect ( . leftBrace)
855845 do {
@@ -907,8 +897,7 @@ extension Parser {
907897 /// raw-value-style-enum-case → enum-case-name raw-value-assignment?
908898 /// raw-value-assignment → = raw-value-literal
909899 /// raw-value-literal → numeric-literal | static-string-literal | boolean-literal
910- @_spi ( RawSyntax)
911- public mutating func parseEnumCaseDeclaration(
900+ mutating func parseEnumCaseDeclaration(
912901 _ attrs: DeclAttributes ,
913902 _ handle: RecoveryConsumptionHandle
914903 ) -> RawEnumCaseDeclSyntax {
@@ -974,8 +963,7 @@ extension Parser {
974963 /// =======
975964 ///
976965 /// protocol-associated-type-declaration → attributes? access-level-modifier? 'associatedtype' typealias-name type-inheritance-clause? typealias-assignment? generic-where-clause?
977- @_spi ( RawSyntax)
978- public mutating func parseAssociatedTypeDeclaration(
966+ mutating func parseAssociatedTypeDeclaration(
979967 _ attrs: DeclAttributes ,
980968 _ handle: RecoveryConsumptionHandle
981969 ) -> RawAssociatedtypeDeclSyntax {
@@ -1065,8 +1053,7 @@ extension Parser {
10651053 /// initializer-head → attributes? declaration-modifiers? 'init' '?'
10661054 /// initializer-head → attributes? declaration-modifiers? 'init' '!'
10671055 /// initializer-body → code-block
1068- @_spi ( RawSyntax)
1069- public mutating func parseInitializerDeclaration(
1056+ mutating func parseInitializerDeclaration(
10701057 _ attrs: DeclAttributes ,
10711058 _ handle: RecoveryConsumptionHandle
10721059 ) -> RawInitializerDeclSyntax {
@@ -1121,8 +1108,7 @@ extension Parser {
11211108 /// =======
11221109 ///
11231110 /// deinitializer-declaration → attributes? 'deinit' code-block
1124- @_spi ( RawSyntax)
1125- public mutating func parseDeinitializerDeclaration(
1111+ mutating func parseDeinitializerDeclaration(
11261112 _ attrs: DeclAttributes ,
11271113 _ handle: RecoveryConsumptionHandle
11281114 ) -> RawDeinitializerDeclSyntax {
@@ -1170,8 +1156,7 @@ extension Parser {
11701156}
11711157
11721158extension Parser {
1173- @_spi ( RawSyntax)
1174- public mutating func parseFuncDeclaration(
1159+ mutating func parseFuncDeclaration(
11751160 _ attrs: DeclAttributes ,
11761161 _ handle: RecoveryConsumptionHandle
11771162 ) -> RawFunctionDeclSyntax {
@@ -1221,8 +1206,7 @@ extension Parser {
12211206 )
12221207 }
12231208
1224- @_spi ( RawSyntax)
1225- public mutating func parseFunctionSignature( allowOutput: Bool = true ) -> RawFunctionSignatureSyntax {
1209+ mutating func parseFunctionSignature( allowOutput: Bool = true ) -> RawFunctionSignatureSyntax {
12261210 let input = self . parseParameterClause ( RawParameterClauseSyntax . self) { parser in
12271211 parser. parseFunctionParameter ( )
12281212 }
@@ -1268,8 +1252,7 @@ extension Parser {
12681252 /// subscript-declaration → subscript-head subscript-result generic-where-clause? getter-setter-keyword-block
12691253 /// subscript-head → attributes? declaration-modifiers? 'subscript' generic-parameter-clause? parameter-clause
12701254 /// subscript-result → '->' attributes? type
1271- @_spi ( RawSyntax)
1272- public mutating func parseSubscriptDeclaration(
1255+ mutating func parseSubscriptDeclaration(
12731256 _ attrs: DeclAttributes ,
12741257 _ handle: RecoveryConsumptionHandle
12751258 ) -> RawSubscriptDeclSyntax {
@@ -1349,8 +1332,7 @@ extension Parser {
13491332 /// }
13501333 /// }
13511334 /// ```
1352- @_spi ( RawSyntax)
1353- public mutating func parseBindingDeclaration(
1335+ mutating func parseBindingDeclaration(
13541336 _ attrs: DeclAttributes ,
13551337 _ handle: RecoveryConsumptionHandle ,
13561338 inMemberDeclList: Bool = false
@@ -1572,8 +1554,7 @@ extension Parser {
15721554 /// getter-setter-block → code-block
15731555 /// getter-setter-block → { getter-clause setter-clause opt }
15741556 /// getter-setter-block → { setter-clause getter-clause }
1575- @_spi ( RawSyntax)
1576- public mutating func parseGetSet( ) -> RawSubscriptDeclSyntax . Accessor {
1557+ mutating func parseGetSet( ) -> RawSubscriptDeclSyntax . Accessor {
15771558 // Parse getter and setter.
15781559 let unexpectedBeforeLBrace : RawUnexpectedNodesSyntax ?
15791560 let lbrace : RawTokenSyntax
@@ -1647,8 +1628,7 @@ extension Parser {
16471628 /// typealias-declaration → attributes? access-level-modifier? 'typealias' typealias-name generic-parameter-clause? typealias-assignment
16481629 /// typealias-name → identifier
16491630 /// typealias-assignment → '=' type
1650- @_spi ( RawSyntax)
1651- public mutating func parseTypealiasDeclaration(
1631+ mutating func parseTypealiasDeclaration(
16521632 _ attrs: DeclAttributes ,
16531633 _ handle: RecoveryConsumptionHandle
16541634 ) -> RawTypealiasDeclSyntax {
@@ -1714,8 +1694,7 @@ extension Parser {
17141694 /// postfix-operator-declaration → 'postfix' 'operator' operator
17151695 /// infix-operator-declaration → 'infix' 'operator' operator infix-operator-group?
17161696 /// infix-operator-group → ':' precedence-group-name
1717- @_spi ( RawSyntax)
1718- public mutating func parseOperatorDeclaration(
1697+ mutating func parseOperatorDeclaration(
17191698 _ attrs: DeclAttributes ,
17201699 _ handle: RecoveryConsumptionHandle
17211700 ) -> RawOperatorDeclSyntax {
@@ -1832,8 +1811,7 @@ extension Parser {
18321811 ///
18331812 /// precedence-group-names → precedence-group-name | precedence-group-name ',' precedence-group-names
18341813 /// precedence-group-name → identifier
1835- @_spi ( RawSyntax)
1836- public mutating func parsePrecedenceGroupDeclaration(
1814+ mutating func parsePrecedenceGroupDeclaration(
18371815 _ attrs: DeclAttributes ,
18381816 _ handle: RecoveryConsumptionHandle
18391817 ) -> RawPrecedenceGroupDeclSyntax {
@@ -1860,8 +1838,7 @@ extension Parser {
18601838 )
18611839 }
18621840
1863- @_spi ( RawSyntax)
1864- public mutating func parsePrecedenceGroupAttributeListSyntax( ) -> RawPrecedenceGroupAttributeListSyntax {
1841+ mutating func parsePrecedenceGroupAttributeListSyntax( ) -> RawPrecedenceGroupAttributeListSyntax {
18651842 enum LabelText : TokenSpecSet {
18661843 case associativity
18671844 case assignment
0 commit comments