File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 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(|| {
6767 {
6868 // On Windows, treat \r\n as a single newline token
6969 // 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 ( )
7171 }
7272 #[ cfg( not( windows) ) ]
7373 {
@@ -236,8 +236,7 @@ mod tests {
236236 // Check that we have exactly one newline token between "select" and "1"
237237 assert_eq ! ( tokens[ 0 ] . kind, SyntaxKind :: Select ) ;
238238 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 ) ;
241240 }
242241
243242 #[ test]
You can’t perform that action at this time.
0 commit comments