| 994 | } |
| 995 | |
| 996 | static void json_next_number_token(json_parse_t *json, json_token_t *token) |
| 997 | { |
| 998 | char *endptr; |
| 999 | |
| 1000 | token->type = T_NUMBER; |
| 1001 | token->value.number = fpconv_strtod(json->ptr, &endptr); |
| 1002 | if (json->ptr == endptr) |
| 1003 | json_set_token_error(token, json, "invalid number"); |
| 1004 | else |
| 1005 | json->ptr = endptr; /* Skip the processed number */ |
| 1006 | |
| 1007 | return; |
| 1008 | } |
| 1009 | |
| 1010 | /* Fills in the token struct. |
| 1011 | * T_STRING will return a pointer to the json_parse_t temporary string |
no test coverage detected