From 27462d9a335f91e5b9544ee03b01636737b3c9e8 Mon Sep 17 00:00:00 2001 From: koniifer Date: Sun, 1 Sep 2024 18:45:38 +0100 Subject: [PATCH] forgot octals exist --- hblang/src/lexer.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hblang/src/lexer.rs b/hblang/src/lexer.rs index 8f36d695..984451b1 100644 --- a/hblang/src/lexer.rs +++ b/hblang/src/lexer.rs @@ -304,6 +304,12 @@ impl<'a> Lexer<'a> { } T::Number } + b'0' if self.advance_if(b'o') => { + while let Some(b'0'..=b'9') = self.peek() { + self.advance(); + } + T::Number + } b'0'..=b'9' => { while let Some(b'0'..=b'9') = self.peek() { self.advance();