mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[XcodeGen] Make 'Byte' comform 'ExpressibleByUnicodeScalarLiteral'
Instead of comparing with 'UnicodeScalar', construct 'Byte' from literals and compare with them. Make it less evil :)
This commit is contained in:
@@ -78,7 +78,7 @@ extension String {
|
||||
let result = scanner.consumeWhole { consumer in
|
||||
switch consumer.peek {
|
||||
case "\\", "\"":
|
||||
consumer.append(Byte(ascii: "\\"))
|
||||
consumer.append("\\")
|
||||
case " ", "$": // $ is potentially a variable reference
|
||||
needsQuotes = true
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user