From bb349cda5f71376abf333eff60e02f2944bc6bd1 Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 14 Aug 2015 23:19:17 -0700 Subject: [PATCH] Fix newline tokenizing bug Still need to fix parsing because of the final newline --- src/tokenizer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 61d266a..d135041 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -42,7 +42,8 @@ pub fn tokenize(input: &str) -> Vec { } while let Some(c) = iterator.next() { - if char::is_whitespace(c) { + + if char::is_whitespace(c) && c != '\n' { continue; } else if c == '"' {