1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix: add CRLF handling to scanner.v

This commit is contained in:
Oxylibrium 2019-06-23 08:51:22 +05:30 committed by Alex Medvednikov
parent ac4a4cbcc9
commit 461b78bc77

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 `.`: