MCPcopy Create free account
hub / github.com/defold/defold / json_next_number_token

Function json_next_number_token

engine/script/src/luacjson/lua_cjson.c:1277–1289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1275}
1276
1277static 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

Callers 1

json_next_tokenFunction · 0.85

Calls 2

fpconv_strtodFunction · 0.85
json_set_token_errorFunction · 0.85

Tested by

no test coverage detected