mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[XcodeGen] Pattern match by KeyPath<T, Bool>
Simpler pattern match by `is` properties. E.g. `\.isNewline`
This commit is contained in:
@@ -130,7 +130,7 @@ fileprivate extension ByteScanner {
|
||||
// Consume the element, stopping at the first space.
|
||||
return try consume(using: { consumer in
|
||||
switch consumer.peek {
|
||||
case let c where c.isSpaceOrTab:
|
||||
case \.isSpaceOrTab:
|
||||
return false
|
||||
case "\"":
|
||||
try consumer.consumeStringLiteral()
|
||||
|
||||
Reference in New Issue
Block a user