fix: add CRLF handling to scanner.v
parent
ac4a4cbcc9
commit
461b78bc77
|
@ -302,6 +302,11 @@ fn (s mut Scanner) scan() ScanRes {
|
||||||
return scan_res(PIPE, '')
|
return scan_res(PIPE, '')
|
||||||
case `,`:
|
case `,`:
|
||||||
return scan_res(COMMA, '')
|
return scan_res(COMMA, '')
|
||||||
|
case `\r`:
|
||||||
|
if nextc == `\n` {
|
||||||
|
s.pos++
|
||||||
|
return scan_res(NL, '')
|
||||||
|
}
|
||||||
case `\n`:
|
case `\n`:
|
||||||
return scan_res(NL, '')
|
return scan_res(NL, '')
|
||||||
case `.`:
|
case `.`:
|
||||||
|
|
Loading…
Reference in New Issue