@@ -354,7 +354,7 @@ extension Parser {
354354 /// `copy` etc. are only contextually a keyword if they are followed by an
355355 /// identifier or keyword on the same line. We do this to ensure that we do
356356 /// not break any copy functions defined by users.
357- private mutating func isContextualExpressionModifier ( ) -> Bool {
357+ private mutating func atContextualExpressionModifier ( ) -> Bool {
358358 return self . peek (
359359 isAt: TokenSpec ( . identifier, allowAtStartOfLine: false ) ,
360360 TokenSpec ( . dollarIdentifier, allowAtStartOfLine: false ) ,
@@ -444,7 +444,7 @@ extension Parser {
444444 )
445445
446446 case ( . copy, let handle) ? :
447- if !isContextualExpressionModifier ( ) {
447+ if !atContextualExpressionModifier ( ) {
448448 break EXPR_PREFIX
449449 }
450450
@@ -463,7 +463,7 @@ extension Parser {
463463 )
464464
465465 case ( . consume, let handle) ? :
466- if !isContextualExpressionModifier ( ) {
466+ if !atContextualExpressionModifier ( ) {
467467 break EXPR_PREFIX
468468 }
469469
@@ -486,7 +486,7 @@ extension Parser {
486486 return RawExprSyntax ( parsePackExpansionExpr ( repeatHandle: handle, flavor, pattern: pattern) )
487487
488488 case ( . each, let handle) ? :
489- if !isContextualExpressionModifier ( ) {
489+ if !atContextualExpressionModifier ( ) {
490490 break EXPR_PREFIX
491491 }
492492
@@ -501,7 +501,7 @@ extension Parser {
501501 )
502502
503503 case ( . any, _) ? :
504- if !isContextualExpressionModifier ( ) {
504+ if !atContextualExpressionModifier ( ) {
505505 break EXPR_PREFIX
506506 }
507507
@@ -874,7 +874,7 @@ extension Parser {
874874 }
875875 } while lookahead. at ( . poundIf) && lookahead. hasProgressed ( & loopProgress)
876876
877- guard lookahead. isAtStartOfPostfixExprSuffix ( ) else {
877+ guard lookahead. atStartOfPostfixExprSuffix ( ) else {
878878 break
879879 }
880880 }
@@ -2149,7 +2149,7 @@ extension Parser {
21492149 while !self . at ( . endOfFile, . rightBrace) && !self . at ( . poundEndif, . poundElseif, . poundElse)
21502150 && self . hasProgressed ( & elementsProgress)
21512151 {
2152- if self . withLookahead ( { $0. isAtStartOfSwitchCase ( allowRecovery: false ) } ) {
2152+ if self . withLookahead ( { $0. atStartOfSwitchCase ( allowRecovery: false ) } ) {
21532153 elements. append ( . switchCase( self . parseSwitchCase ( ) ) )
21542154 } else if self . canRecoverTo ( . poundIf) != nil {
21552155 // '#if' in 'case' position can enclose zero or more 'case' or 'default'
@@ -2206,7 +2206,7 @@ extension Parser {
22062206 )
22072207 )
22082208 )
2209- } else if self . withLookahead ( { $0. isAtStartOfSwitchCase ( allowRecovery: true ) } ) {
2209+ } else if self . withLookahead ( { $0. atStartOfSwitchCase ( allowRecovery: true ) } ) {
22102210 elements. append ( . switchCase( self . parseSwitchCase ( ) ) )
22112211 } else {
22122212 break
@@ -2217,7 +2217,7 @@ extension Parser {
22172217
22182218 mutating func parseSwitchCaseBody( ) -> RawCodeBlockItemListSyntax {
22192219 parseCodeBlockItemList ( until: {
2220- $0. at ( . rightBrace) || $0. at ( . poundEndif, . poundElseif, . poundElse) || $0. withLookahead ( { $0. isStartOfConditionalSwitchCases ( ) } )
2220+ $0. at ( . rightBrace) || $0. at ( . poundEndif, . poundElseif, . poundElse) || $0. withLookahead ( { $0. atStartOfConditionalSwitchCases ( ) } )
22212221 } )
22222222 }
22232223
@@ -2487,7 +2487,7 @@ extension Parser.Lookahead {
24872487extension Parser . Lookahead {
24882488 // Helper function to see if we can parse member reference like suffixes
24892489 // inside '#if'.
2490- fileprivate mutating func isAtStartOfPostfixExprSuffix ( ) -> Bool {
2490+ fileprivate mutating func atStartOfPostfixExprSuffix ( ) -> Bool {
24912491 guard self . at ( . period) else {
24922492 return false
24932493 }
0 commit comments