From a736ed2f58ade94b616ff58e6750cf022db4f9b6 Mon Sep 17 00:00:00 2001 From: Marvin Blum Date: Sun, 25 Oct 2015 19:43:21 +0100 Subject: [PATCH] Fix issue #1. Added windows new line/whitespace character. --- src/asl/parserHelper.go | 2 +- src/asl/tokenizer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asl/parserHelper.go b/src/asl/parserHelper.go index d8cd090..403f957 100644 --- a/src/asl/parserHelper.go +++ b/src/asl/parserHelper.go @@ -76,6 +76,6 @@ func appendOut(str string, newLine bool) { out += str if newLine && pretty { - out += "\n" + out += "\r\n" } } diff --git a/src/asl/tokenizer.go b/src/asl/tokenizer.go index 142c49b..f8890a5 100644 --- a/src/asl/tokenizer.go +++ b/src/asl/tokenizer.go @@ -47,7 +47,7 @@ var keywords = []string{ "exitwith", "waituntil"} -var whitespace = []byte{' ', '\n', '\t'} +var whitespace = []byte{' ', '\n', '\t', '\r'} var identifier = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_" // Tokenizes the given byte array into syntax tokens,