Handle CR LF newline natively in lexer

This commit is contained in:
take-cheeze
2019-12-23 21:01:11 +09:00
parent 49301ed785
commit 10e9f193ca
+7
View File
@@ -3984,6 +3984,13 @@ nextc(parser_state *p)
if (c >= 0) {
p->column++;
}
if (c == '\r') {
const int lf = nextc(p);
if (lf == '\n') {
return '\n';
}
pushback(p, lf);
}
return c;
eof: