aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/lex/lexer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/lex/lexer.rs')
-rw-r--r--compiler/src/lex/lexer.rs6
1 files changed, 1 insertions, 5 deletions
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> {
131 131
132 // Number 132 // Number
133 ch if ch.is_ascii_digit() 133 ch if ch.is_ascii_digit()
134 || ch == '.' && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit())
135 || matches!(ch, '+' | '-') 134 || matches!(ch, '+' | '-')
136 && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit()) 135 && self.peek_nth(1).is_some_and(|ch| ch.is_ascii_digit()) =>
137 || matches!(ch, '+' | '-')
138 && self.peek_nth(1).is_some_and(|ch| ch == '.')
139 && self.peek_nth(2).is_some_and(|ch| ch.is_ascii_digit()) =>
140 { 136 {
141 Token::Number(self.next_atom()) 137 Token::Number(self.next_atom())
142 } 138 }