From c071ca82aa632247caa1d54ca1587ea39199e544 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 26 Aug 2023 21:36:16 +0100 Subject: [PATCH] Fix empty strings being parsed incorrectly --- debug/app.ona | 2 +- source/ona/kym/tokens.zig | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/debug/app.ona b/debug/app.ona index 855cf63..c0a0c69 100644 --- a/debug/app.ona +++ b/debug/app.ona @@ -6,7 +6,7 @@ let pr = lambda (str): @print(str) end -pr("eeee") +pr("") while i < 5: pr("hello, world") diff --git a/source/ona/kym/tokens.zig b/source/ona/kym/tokens.zig index 875176a..0099df3 100755 --- a/source/ona/kym/tokens.zig +++ b/source/ona/kym/tokens.zig @@ -325,8 +325,6 @@ pub const Tokenizer = struct { const begin = cursor; - cursor += 1; - while (cursor < self.source.len) switch (self.source[cursor]) { '"' => break, else => cursor += 1,