From 461b78bc778feca199c8290d9213a9e87c0a4e6d Mon Sep 17 00:00:00 2001 From: Oxylibrium Date: Sun, 23 Jun 2019 08:51:22 +0530 Subject: [PATCH] fix: add CRLF handling to scanner.v --- compiler/scanner.v | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/scanner.v b/compiler/scanner.v index 9c6ea0d5a1..fa95dcc161 100644 --- a/compiler/scanner.v +++ b/compiler/scanner.v @@ -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 `.`: