From 843242e692280d604b74324ba26ead6158223439 Mon Sep 17 00:00:00 2001 From: Tolmachev Igor Date: Sun, 10 May 2026 12:54:41 +0300 Subject: Remove Float from parser Dropped to make the language simpler. --- compiler/src/lex/lexer.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'compiler/src/lex/lexer.rs') diff --git a/compiler/src/lex/lexer.rs b/compiler/src/lex/lexer.rs index 6efbca0..5e45b20 100644 --- a/compiler/src/lex/lexer.rs +++ b/compiler/src/lex/lexer.rs @@ -131,12 +131,8 @@ impl<'a> Iterator for Lexer<'a> { // Number ch if ch.is_ascii_digit() - || ch == '.' && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit()) || matches!(ch, '+' | '-') - && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit()) - || matches!(ch, '+' | '-') - && self.peek_nth(1).is_some_and(|ch| ch == '.') - && self.peek_nth(2).is_some_and(|ch| ch.is_ascii_digit()) => + && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit()) => { Token::Number(self.next_atom()) } -- cgit v1.3