Skip to content

Commit 4393893

Browse files
Thirumalai-Shaktivelczgdp1807
authored andcommitted
[Parser] Recognize "\r\n" as a newline
1 parent 9298964 commit 4393893

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lpython/parser/tokenizer.re

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ int Tokenizer::lex(Allocator &al, YYSTYPE &yylval, Location &loc, diag::Diagnost
264264
re2c:define:YYCTYPE = "unsigned char";
265265
266266
end = "\x00";
267-
whitespace = [ \t\v\r]+;
268-
newline = "\n";
267+
whitespace = [ \t\v]+;
268+
newline = "\n" | "\r\n";
269269
digit = [0-9];
270270
int_oct = "0"[oO]([0-7] | "_" [0-7])+;
271271
int_bin = "0"[bB]([01] | "_" [01])+;

0 commit comments

Comments
 (0)