From 5b631fb5883c64017038ac94ded4c928880cd6fc Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Fri, 17 Jan 2020 10:38:59 -0500 Subject: [PATCH] don't count chars in comment --- src/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexer.rs b/src/lexer.rs index 0672546..97be80b 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -162,7 +162,7 @@ impl<'a> Lexer<'a> { self.pos.next_char(); match self.buf.peek().expect("expected something after '/'") { '/' => { - self.pos.chars(self.buf.by_ref().take_while(|x| x != &'\n').count() as u32);//.for_each(); + self.buf.by_ref().take_while(|x| x != &'\n').for_each(drop); self.pos.newline(); } '*' => {