Lines Matching defs:token
306 std::optional<Value> JSONParser::ParseToken(Token token) {
307 switch (token) {
340 Token token = GetNextToken();
341 while (token != T_OBJECT_END) {
342 if (token != T_STRING) {
354 token = GetNextToken();
355 if (token != T_OBJECT_PAIR_SEPARATOR) {
360 // The next token is the value. Ownership transfers to |dict|.
371 token = GetNextToken();
372 if (token == T_LIST_SEPARATOR) {
374 token = GetNextToken();
375 if (token == T_OBJECT_END && !(options_ & JSON_ALLOW_TRAILING_COMMAS)) {
379 } else if (token != T_OBJECT_END) {
404 Token token = GetNextToken();
405 while (token != T_ARRAY_END) {
406 std::optional<Value> item = ParseToken(token);
414 token = GetNextToken();
415 if (token == T_LIST_SEPARATOR) {
417 token = GetNextToken();
418 if (token == T_ARRAY_END && !(options_ & JSON_ALLOW_TRAILING_COMMAS)) {
422 } else if (token != T_ARRAY_END) {
578 // Make sure that the token has more characters to consume the
657 // the top of the header), then make sure the next token is one which is