Adding support for '\r' char to lexer.

This commit is contained in:
Yury Korchemkin
2015-01-04 14:25:17 -08:00
parent e46d2e479b
commit 6912eec6a7
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -781,6 +781,9 @@ static void nextToken(Parser* parser)
twoCharToken(parser, '=', TOKEN_BANGEQ, TOKEN_BANG);
return;
case '\r':
twoCharToken(parser, '\n', TOKEN_LINE, TOKEN_LINE);
return;
case '\n':
makeToken(parser, TOKEN_LINE);
return;