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:
parent
ac4a4cbcc9
commit
461b78bc77
@ -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 `.`:
|
||||
|
Loading…
Reference in New Issue
Block a user