| 1275 | } |
| 1276 | |
| 1277 | static void json_next_number_token(json_parse_t *json, json_token_t *token) |
| 1278 | { |
| 1279 | char *endptr; |
| 1280 | |
| 1281 | token->type = T_NUMBER; |
| 1282 | token->value.number = fpconv_strtod(json->ptr, &endptr); |
| 1283 | if (json->ptr == endptr) |
| 1284 | json_set_token_error(token, json, "invalid number"); |
| 1285 | else |
| 1286 | json->ptr = endptr; /* Skip the processed number */ |
| 1287 | |
| 1288 | return; |
| 1289 | } |
| 1290 | |
| 1291 | /* Fills in the token struct. |
| 1292 | * T_STRING will return a pointer to the json_parse_t temporary string |
no test coverage detected