Support Hex, Binary, and Octal number literals #20

Merged
mlokis merged 3 commits from :trunk into trunk 2024-09-01 14:19:14 -05:00
Showing only changes of commit 27462d9a33 - Show all commits

View file

@ -304,6 +304,12 @@ impl<'a> Lexer<'a> {
} }
T::Number T::Number
} }
b'0' if self.advance_if(b'o') => {
while let Some(b'0'..=b'9') = self.peek() {
mlokis marked this conversation as resolved Outdated

same here but octal

same here but octal
self.advance();
}
T::Number
}
b'0'..=b'9' => { b'0'..=b'9' => {
while let Some(b'0'..=b'9') = self.peek() { while let Some(b'0'..=b'9') = self.peek() {
self.advance(); self.advance();