Lines Matching refs:p
172 char_u *p; in is_simple_key() local
176 for (p = key + 1; *p != NUL; ++p) in is_simple_key()
177 if (!ASCII_ISALPHA(*p) && *p != '_' && !vim_isdigit(*p)) in is_simple_key()
412 char_u *p; in json_decode_string() local
419 p = reader->js_buf + reader->js_used + 1; // skip over " or ' in json_decode_string()
420 while (*p != quote) in json_decode_string()
424 if (*p == NUL || p[1] == NUL || utf_ptr2len(p) < utf_byte2len(*p)) in json_decode_string()
430 len = (int)(reader->js_end - p); in json_decode_string()
431 reader->js_used = (int)(p - reader->js_buf); in json_decode_string()
434 p = reader->js_buf + reader->js_used; in json_decode_string()
439 if (*p == '\\') in json_decode_string()
442 switch (p[1]) in json_decode_string()
453 && (int)(reader->js_end - p) < NUMBUFLEN) in json_decode_string()
455 reader->js_used = (int)(p - reader->js_buf); in json_decode_string()
458 p = reader->js_buf + reader->js_used; in json_decode_string()
465 vim_str2nr(p + 2, NULL, &len, in json_decode_string()
473 p += len + 2; in json_decode_string()
475 && (int)(reader->js_end - p) >= 6 in json_decode_string()
476 && *p == '\\' && *(p+1) == 'u') in json_decode_string()
482 vim_str2nr(p + 2, NULL, &len, in json_decode_string()
492 p += len + 2; in json_decode_string()
507 ++p; in json_decode_string()
512 p += 2; in json_decode_string()
519 len = utf_ptr2len(p); in json_decode_string()
527 mch_memmove((char *)ga.ga_data + ga.ga_len, p, (size_t)len); in json_decode_string()
530 p += len; in json_decode_string()
534 reader->js_used = (int)(p - reader->js_buf); in json_decode_string()
535 if (*p == quote) in json_decode_string()
596 char_u *p; in json_decode_item() local
613 p = reader->js_buf + reader->js_used; in json_decode_item()
621 p = reader->js_buf + reader->js_used; in json_decode_item()
622 if (*p == NUL) in json_decode_item()
631 if (*p == (top_item->jd_type == JSON_ARRAY ? ']' : '}')) in json_decode_item()
657 key = p = reader->js_buf + reader->js_used; in json_decode_item()
658 while (*p != NUL && *p != ':' && *p > ' ') in json_decode_item()
659 ++p; in json_decode_item()
663 cur_item->vval.v_string = vim_strnsave(key, p - key); in json_decode_item()
666 reader->js_used += (int)(p - key); in json_decode_item()
670 switch (*p) in json_decode_item()
735 retval = json_decode_string(reader, cur_item, *p); in json_decode_item()
740 retval = json_decode_string(reader, cur_item, *p); in json_decode_item()
743 semsg(_(e_json_error), p); in json_decode_item()
751 semsg(_(e_json_error), p); in json_decode_item()
766 if (VIM_ISDIGIT(*p) || (*p == '-' in json_decode_item()
767 && (VIM_ISDIGIT(p[1]) || p[1] == NUL))) in json_decode_item()
769 char_u *sp = p; in json_decode_item()
781 semsg(_(e_json_error), p); in json_decode_item()
794 len = string2float(p, &f, FALSE); in json_decode_item()
799 len = string2float(p, &cur_item->vval.v_float, in json_decode_item()
813 semsg(_(e_json_error), p); in json_decode_item()
827 if (STRNICMP((char *)p, "false", 5) == 0) in json_decode_item()
838 if (STRNICMP((char *)p, "true", 4) == 0) in json_decode_item()
849 if (STRNICMP((char *)p, "null", 4) == 0) in json_decode_item()
861 if (STRNICMP((char *)p, "NaN", 3) == 0) in json_decode_item()
872 if (STRNICMP((char *)p, "-Infinity", 9) == 0) in json_decode_item()
883 if (STRNICMP((char *)p, "Infinity", 8) == 0) in json_decode_item()
899 (len < 5 && STRNICMP((char *)p, "false", len) == 0) in json_decode_item()
901 || (len < 9 && STRNICMP((char *)p, "-Infinity", len) == 0) in json_decode_item()
902 || (len < 8 && STRNICMP((char *)p, "Infinity", len) == 0) in json_decode_item()
903 || (len < 3 && STRNICMP((char *)p, "NaN", len) == 0) in json_decode_item()
905 || (len < 4 && (STRNICMP((char *)p, "true", len) == 0 in json_decode_item()
906 || STRNICMP((char *)p, "null", len) == 0))) in json_decode_item()
965 p = reader->js_buf + reader->js_used; in json_decode_item()
966 if (*p == ',') in json_decode_item()
968 else if (*p != ']') in json_decode_item()
970 if (*p == NUL) in json_decode_item()
974 semsg(_(e_json_error), p); in json_decode_item()
983 p = reader->js_buf + reader->js_used; in json_decode_item()
984 if (*p != ':') in json_decode_item()
988 if (*p == NUL) in json_decode_item()
992 semsg(_(e_json_error), p); in json_decode_item()
1038 p = reader->js_buf + reader->js_used; in json_decode_item()
1039 if (*p == ',') in json_decode_item()
1041 else if (*p != '}') in json_decode_item()
1043 if (*p == NUL) in json_decode_item()
1047 semsg(_(e_json_error), p); in json_decode_item()
1066 semsg(_(e_json_error), p); in json_decode_item()