[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:
Rintaro Ishizaki
2025-01-28 21:38:46 -08:00
parent aa0e3dc9ea
commit 2d64ef2528
4 changed files with 10 additions and 34 deletions

View File

@@ -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: