From 58d89968a7d2e917c3dbc8bbeaaa0cf04e1c3e68 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();