@@ -110,7 +110,7 @@ extension TokenConsumer {
110110 declStartKeyword = subparser. at ( anyIn: DeclarationKeyword . self) ? . 0
111111 }
112112 switch declStartKeyword {
113- case . lhs ( . actor ) :
113+ case . group ( . actor ) :
114114 // actor Foo {}
115115 if subparser. peek ( ) . rawTokenKind == . identifier {
116116 return true
@@ -123,16 +123,16 @@ extension TokenConsumer {
123123 lookahead. consumeAnyToken ( )
124124 } while lookahead. atStartOfDeclaration ( isAtTopLevel: isAtTopLevel, allowInitDecl: allowInitDecl)
125125 return lookahead. at ( . identifier)
126- case . lhs ( . case) :
126+ case . simple ( . case) :
127127 // When 'case' appears inside a function, it's probably a switch
128128 // case, not an enum case declaration.
129129 return false
130- case . lhs ( . `init`) :
130+ case . simple ( . `init`) :
131131 return allowInitDecl
132- case . lhs ( . macro) :
132+ case . simple ( . macro) :
133133 // macro Foo ...
134134 return subparser. peek ( ) . rawTokenKind == . identifier
135- case . lhs ( . pound) :
135+ case . simple ( . pound) :
136136 // Force parsing '#<identifier>' after attributes as a macro expansion decl.
137137 if hasAttribute || hasModifier {
138138 return true
@@ -215,7 +215,7 @@ extension Parser {
215215 } else if atFunctionDeclarationWithoutFuncKeyword ( ) {
216216 // We aren't at a declaration keyword and it looks like we are at a function
217217 // declaration. Parse a function declaration.
218- recoveryResult = ( . lhs ( . func) , . missing( . keyword( . func) ) )
218+ recoveryResult = ( . simple ( . func) , . missing( . keyword( . func) ) )
219219 } else {
220220 // In all other cases, use standard token recovery to find the declaration
221221 // to parse.
@@ -226,53 +226,53 @@ extension Parser {
226226 }
227227
228228 switch recoveryResult {
229- case ( . lhs ( . import) , let handle) ? :
229+ case ( . simple ( . import) , let handle) ? :
230230 return RawDeclSyntax ( self . parseImportDeclaration ( attrs, handle) )
231- case ( . lhs ( . class) , let handle) ? :
231+ case ( . group ( . class) , let handle) ? :
232232 return RawDeclSyntax (
233233 self . parseNominalTypeDeclaration ( for: RawClassDeclSyntax . self, attrs: attrs, introucerHandle: handle)
234234 )
235- case ( . lhs ( . enum) , let handle) ? :
235+ case ( . group ( . enum) , let handle) ? :
236236 return RawDeclSyntax (
237237 self . parseNominalTypeDeclaration ( for: RawEnumDeclSyntax . self, attrs: attrs, introucerHandle: handle)
238238 )
239- case ( . lhs ( . case) , let handle) ? :
239+ case ( . simple ( . case) , let handle) ? :
240240 return RawDeclSyntax ( self . parseEnumCaseDeclaration ( attrs, handle) )
241- case ( . lhs ( . struct) , let handle) ? :
241+ case ( . group ( . struct) , let handle) ? :
242242 return RawDeclSyntax (
243243 self . parseNominalTypeDeclaration ( for: RawStructDeclSyntax . self, attrs: attrs, introucerHandle: handle)
244244 )
245- case ( . lhs ( . protocol) , let handle) ? :
245+ case ( . group ( . protocol) , let handle) ? :
246246 return RawDeclSyntax (
247247 self . parseNominalTypeDeclaration ( for: RawProtocolDeclSyntax . self, attrs: attrs, introucerHandle: handle)
248248 )
249- case ( . lhs ( . associatedtype) , let handle) ? :
249+ case ( . simple ( . associatedtype) , let handle) ? :
250250 return RawDeclSyntax ( self . parseAssociatedTypeDeclaration ( attrs, handle) )
251- case ( . lhs ( . typealias) , let handle) ? :
251+ case ( . simple ( . typealias) , let handle) ? :
252252 return RawDeclSyntax ( self . parseTypealiasDeclaration ( attrs, handle) )
253- case ( . lhs ( . extension) , let handle) ? :
253+ case ( . group ( . extension) , let handle) ? :
254254 return RawDeclSyntax ( self . parseExtensionDeclaration ( attrs, handle) )
255- case ( . lhs ( . func) , let handle) ? :
255+ case ( . simple ( . func) , let handle) ? :
256256 return RawDeclSyntax ( self . parseFuncDeclaration ( attrs, handle) )
257- case ( . lhs ( . subscript) , let handle) ? :
257+ case ( . simple ( . subscript) , let handle) ? :
258258 return RawDeclSyntax ( self . parseSubscriptDeclaration ( attrs, handle) )
259- case ( . lhs ( . `init`) , let handle) ? :
259+ case ( . simple ( . `init`) , let handle) ? :
260260 return RawDeclSyntax ( self . parseInitializerDeclaration ( attrs, handle) )
261- case ( . lhs ( . deinit) , let handle) ? :
261+ case ( . simple ( . deinit) , let handle) ? :
262262 return RawDeclSyntax ( self . parseDeinitializerDeclaration ( attrs, handle) )
263- case ( . lhs ( . operator) , let handle) ? :
263+ case ( . simple ( . operator) , let handle) ? :
264264 return RawDeclSyntax ( self . parseOperatorDeclaration ( attrs, handle) )
265- case ( . lhs ( . precedencegroup) , let handle) ? :
265+ case ( . simple ( . precedencegroup) , let handle) ? :
266266 return RawDeclSyntax ( self . parsePrecedenceGroupDeclaration ( attrs, handle) )
267- case ( . lhs ( . actor ) , let handle) ? :
267+ case ( . group ( . actor ) , let handle) ? :
268268 return RawDeclSyntax (
269269 self . parseNominalTypeDeclaration ( for: RawActorDeclSyntax . self, attrs: attrs, introucerHandle: handle)
270270 )
271- case ( . lhs ( . macro) , let handle) ? :
271+ case ( . simple ( . macro) , let handle) ? :
272272 return RawDeclSyntax ( self . parseMacroDeclaration ( attrs: attrs, introducerHandle: handle) )
273- case ( . lhs ( . pound) , let handle) ? :
273+ case ( . simple ( . pound) , let handle) ? :
274274 return RawDeclSyntax ( self . parseMacroExpansionDeclaration ( attrs, handle) )
275- case ( . rhs , let handle) ? :
275+ case ( . binding , let handle) ? :
276276 return RawDeclSyntax ( self . parseBindingDeclaration ( attrs, handle, inMemberDeclList: inMemberDeclList) )
277277 case nil :
278278 break
0 commit comments