Skip to content

Commit 335024e

Browse files
authored
Merge pull request #621 from omochi/fix-lexer-comment
Fix comment and remove semicolon in Lexer
2 parents 101bbc6 + de047ea commit 335024e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftParser/Lexer.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ extension Lexer.Cursor {
215215
case UInt8(ascii: "/"):
216216
if self.input.baseAddress! - 1 != bufferBegin.input.baseAddress
217217
&& self.input.baseAddress!.advanced(by: -2).pointee == UInt8(ascii: "*") {
218-
return false; // End of a slash-star comment, so whitespace.
218+
return false // End of a slash-star comment, so whitespace.
219219
} else {
220220
return true
221221
}
222222
case 0xA0:
223223
if self.input.baseAddress! - 1 != bufferBegin.input.baseAddress
224224
&& self.input.baseAddress!.advanced(by: -2).pointee == 0xC2 {
225-
return false; // End of a slash-star comment, so whitespace.
225+
return false // End of a Non-breaking whitespace (U+00A0).
226226
} else {
227227
return true
228228
}
@@ -246,7 +246,7 @@ extension Lexer.Cursor {
246246
// if (tokEnd == codeCompletionPtr) { // code-completion
247247
// return true
248248
// }
249-
return false; // whitespace / last char in file
249+
return false // whitespace / last char in file
250250

251251
case UInt8(ascii: "."):
252252
// Prefer the '^' in "x^.y" to be a postfix op, not binary, but the '^' in
@@ -262,7 +262,7 @@ extension Lexer.Cursor {
262262
}
263263
case 0xC2:
264264
if self.input.count > 1, self.peek(at: 1) == 0xA0 {
265-
return false; // Non-breaking whitespace (U+00A0)
265+
return false // Non-breaking whitespace (U+00A0)
266266
} else {
267267
return true
268268
}

0 commit comments

Comments
 (0)