Skip to content

Commit 2a1d566

Browse files
committed
update lexer to support carriage returns for windoof
1 parent 55f6851 commit 2a1d566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/pg_lexer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub static WHITESPACE_TOKENS: &[SyntaxKind] = &[
6060
];
6161

6262
static PATTERN_LEXER: LazyLock<Regex> =
63-
LazyLock::new(|| Regex::new(r"(?P<whitespace> +)|(?P<newline>\n+)|(?P<tab>\t+)").unwrap());
63+
LazyLock::new(|| Regex::new(r"(?P<whitespace> +)|(?P<newline>\r?\n+)|(?P<tab>\t+)").unwrap());
6464

6565
fn whitespace_tokens(input: &str) -> VecDeque<Token> {
6666
let mut tokens = VecDeque::new();

0 commit comments

Comments
 (0)