File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ static PATTERN_LEXER: LazyLock<Regex> = LazyLock::new(|| {
67
67
{
68
68
// On Windows, treat \r\n as a single newline token
69
69
// and treat \r as a whitespace token
70
- Regex :: new ( r"(?P<whitespace> ( |\r) +)|(?P<newline>(\r\n|\n)+)|(?P<tab>\t+)" ) . unwrap ( )
70
+ Regex :: new ( r"(?P<whitespace> +)|(?P<newline>(\r\n|\n|\r )+)|(?P<tab>\t+)" ) . unwrap ( )
71
71
}
72
72
#[ cfg( not( windows) ) ]
73
73
{
@@ -236,8 +236,7 @@ mod tests {
236
236
// Check that we have exactly one newline token between "select" and "1"
237
237
assert_eq ! ( tokens[ 0 ] . kind, SyntaxKind :: Select ) ;
238
238
assert_eq ! ( tokens[ 1 ] . kind, SyntaxKind :: Newline ) ;
239
- assert_eq ! ( tokens[ 2 ] . kind, SyntaxKind :: Whitespace ) ;
240
- assert_eq ! ( tokens[ 3 ] . kind, SyntaxKind :: Iconst ) ;
239
+ assert_eq ! ( tokens[ 2 ] . kind, SyntaxKind :: Iconst ) ;
241
240
}
242
241
243
242
#[ test]
You can’t perform that action at this time.
0 commit comments