fix: add CRLF handling to scanner.v

pull/417/head
Oxylibrium 2019-06-23 08:51:22 +05:30 committed by Alex Medvednikov
parent ac4a4cbcc9
commit 461b78bc77
1 changed files with 5 additions and 0 deletions

View File

@ -302,6 +302,11 @@ fn (s mut Scanner) scan() ScanRes {
return scan_res(PIPE, '')
case `,`:
return scan_res(COMMA, '')
case `\r`:
if nextc == `\n` {
s.pos++
return scan_res(NL, '')
}
case `\n`:
return scan_res(NL, '')
case `.`: