Skip to content

Commit e7fd73f

Browse files
author
John Holdsworth
committed
Revert other minor changes.
1 parent 74bdfc6 commit e7fd73f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SwiftParser/Lexer/Cursor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ extension Lexer.Cursor {
16771677
return self.lexUnicodeEscape()
16781678
case "\n", "\r":
16791679
if isMultilineString && self.maybeConsumeNewlineEscape() {
1680-
return .success(UInt32(("\n")))
1680+
return .success(UInt32(UInt8(ascii: "\n")))
16811681
}
16821682
return .error(.invalidEscapeSequenceInStringLiteral)
16831683
case nil:

Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ extension Unicode.Scalar {
9696
var isOperatorStartCodePoint: Bool {
9797
// ASCII operator chars.
9898
if self.value < 0x80 {
99-
switch self {
99+
switch UInt8(self.value) {
100100
case "/", "=", "-", "+", "*", "%", "<",
101101
">", "!", "&", "|", "^", "~", ".", "?":
102102
return true

0 commit comments

Comments
 (0)