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