From 54a7d4d054a0adc54030b589b540bcbec22461ba Mon Sep 17 00:00:00 2001 From: Gregory Todd Williams Date: Thu, 20 Sep 2018 16:12:24 -0700 Subject: [PATCH] Handle CRLF as a whitespace character to end comments in SPARQLLexer. --- Sources/SPARQLSyntax/SPARQLLexer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SPARQLSyntax/SPARQLLexer.swift b/Sources/SPARQLSyntax/SPARQLLexer.swift index 00c18d5..96bdfb1 100644 --- a/Sources/SPARQLSyntax/SPARQLLexer.swift +++ b/Sources/SPARQLSyntax/SPARQLLexer.swift @@ -766,7 +766,7 @@ public class SPARQLLexer: IteratorProtocol { continue } else if c == "#" { var chars = [Character]() - while c != "\n" && c != "\r" { + while c != "\n" && c != "\r" && c != "\r\n" { if let cc = try peekChar() { getChar() c = cc