| ... | ... | @@ -172,13 +172,10 @@ fn parseNumber(alloc: std.mem.Allocator, p: *Parser) anyerror!?ValueIndex { |
| 172 | 172 | |
| 173 | 173 | if (try p.eatByte('-')) |c| { |
| 174 | 174 | try characters.append(c); |
| 175 | | |
| 176 | | if (try p.eatByte('0')) |_| { |
| 177 | | if (p.slice()[0] != '.') return try p.addNumber(alloc, "-0"); |
| 178 | | } |
| 179 | 175 | } |
| 180 | | if (try p.eatByte('0')) |_| { |
| 181 | | if (p.slice()[0] != '.') return try p.addNumber(alloc, "0"); |
| 176 | if (try p.eatByte('0')) |c| { |
| 177 | try characters.append(c); |
| 178 | if (try p.eatRange('1', '9')) |_| return error.JsonExpectedTODO; |
| 182 | 179 | } |
| 183 | 180 | while (try p.eatRange('0', '9')) |d| { |
| 184 | 181 | try characters.append(d); |