Skip to content

Commit 031d0b4

Browse files
committed
Minor cleanup from if to guard statement
I think the guard is a lot easier to read here, noticed while reviewing #3171.
1 parent a113ef9 commit 031d0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftParser/Lookahead.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ extension Parser.Lookahead {
266266
}
267267

268268
// If we don't have attributes, then it cannot be an accessor block.
269-
if nextToken.rawTokenKind != .atSign {
269+
guard self.at(.atSign) else {
270270
return false
271271
}
272272

0 commit comments

Comments
 (0)