We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1375f8 commit aed2194Copy full SHA for aed2194
src/sea_of_nodes/parser.rs
@@ -1811,7 +1811,7 @@ impl<'a> Lexer<'a> {
1811
fn parse_number<'t>(&mut self, types: &Types<'t>) -> PResult<Ty<'t>> {
1812
let (flt, snum) = self.is_long_or_double();
1813
if !flt {
1814
- if snum.chars().next() == Some('0') {
+ if snum.len() > 1 && snum.chars().next() == Some('0') {
1815
Err("Syntax error: integer values cannot start with '0'".to_string())
1816
} else {
1817
snum.parse().map(|i| *types.get_int(i)).map_err(|_| {
0 commit comments