From ef387fc051a23cb3c2d345a91a869449d5222ee95aeec3cd6226f81b49999933 Mon Sep 17 00:00:00 2001 From: Apache Date: Wed, 12 Jun 2024 23:13:20 -0500 Subject: [PATCH] Improve float support --- src/tokenizer.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/tokenizer.rs b/src/tokenizer.rs index c94609d..e3385f6 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -170,18 +170,13 @@ impl Tokenizer { self.storage.clear(); self.storage.push(c); continue; - - - // Allow numbers to also start with _ for fun - // ______100_0__: 1,000 - - // TODO: delete this when I expand identifiers to include more symbols - } else if c.is_numeric() || c == '_' || c == '.' { + } else if c.is_numeric() || c == '.' { self.reading_num = true; self.storage.clear(); if c.is_numeric() { self.storage.push(c); } else if c == '.' { + self.is_float = true; self.storage.push('0'); self.storage.push(c); }