@@ -2105,7 +2105,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
21052105 * A helper for error messages that should print the current token. The
21062106 * format must contain exactly one %.*s specifier.
21072107 */
2108- #define token_error (lex , format ) \
2108+ #define json_token_error (lex , format ) \
21092109 appendStringInfo((lex)->errormsg, _(format), \
21102110 (int) ((lex)->token_terminator - (lex)->token_start), \
21112111 (lex)->token_start);
@@ -2124,41 +2124,41 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
21242124 case JSON_NESTING_TOO_DEEP :
21252125 return (_ ("JSON nested too deep, maximum permitted depth is 6400" ));
21262126 case JSON_ESCAPING_INVALID :
2127- token_error (lex , "Escape sequence \"\\%.*s\" is invalid." );
2127+ json_token_error (lex , "Escape sequence \"\\%.*s\" is invalid." );
21282128 break ;
21292129 case JSON_ESCAPING_REQUIRED :
21302130 appendStringInfo (lex -> errormsg ,
21312131 _ ("Character with value 0x%02x must be escaped." ),
21322132 (unsigned char ) * (lex -> token_terminator ));
21332133 break ;
21342134 case JSON_EXPECTED_END :
2135- token_error (lex , "Expected end of input, but found \"%.*s\"." );
2135+ json_token_error (lex , "Expected end of input, but found \"%.*s\"." );
21362136 break ;
21372137 case JSON_EXPECTED_ARRAY_FIRST :
2138- token_error (lex , "Expected array element or \"]\", but found \"%.*s\"." );
2138+ json_token_error (lex , "Expected array element or \"]\", but found \"%.*s\"." );
21392139 break ;
21402140 case JSON_EXPECTED_ARRAY_NEXT :
2141- token_error (lex , "Expected \",\" or \"]\", but found \"%.*s\"." );
2141+ json_token_error (lex , "Expected \",\" or \"]\", but found \"%.*s\"." );
21422142 break ;
21432143 case JSON_EXPECTED_COLON :
2144- token_error (lex , "Expected \":\", but found \"%.*s\"." );
2144+ json_token_error (lex , "Expected \":\", but found \"%.*s\"." );
21452145 break ;
21462146 case JSON_EXPECTED_JSON :
2147- token_error (lex , "Expected JSON value, but found \"%.*s\"." );
2147+ json_token_error (lex , "Expected JSON value, but found \"%.*s\"." );
21482148 break ;
21492149 case JSON_EXPECTED_MORE :
21502150 return _ ("The input string ended unexpectedly." );
21512151 case JSON_EXPECTED_OBJECT_FIRST :
2152- token_error (lex , "Expected string or \"}\", but found \"%.*s\"." );
2152+ json_token_error (lex , "Expected string or \"}\", but found \"%.*s\"." );
21532153 break ;
21542154 case JSON_EXPECTED_OBJECT_NEXT :
2155- token_error (lex , "Expected \",\" or \"}\", but found \"%.*s\"." );
2155+ json_token_error (lex , "Expected \",\" or \"}\", but found \"%.*s\"." );
21562156 break ;
21572157 case JSON_EXPECTED_STRING :
2158- token_error (lex , "Expected string, but found \"%.*s\"." );
2158+ json_token_error (lex , "Expected string, but found \"%.*s\"." );
21592159 break ;
21602160 case JSON_INVALID_TOKEN :
2161- token_error (lex , "Token \"%.*s\" is invalid." );
2161+ json_token_error (lex , "Token \"%.*s\" is invalid." );
21622162 break ;
21632163 case JSON_UNICODE_CODE_POINT_ZERO :
21642164 return _ ("\\u0000 cannot be converted to text." );
@@ -2189,7 +2189,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
21892189 /* fall through to the error code after switch */
21902190 break ;
21912191 }
2192- #undef token_error
2192+ #undef json_token_error
21932193
21942194 /*
21952195 * We don't use a default: case, so that the compiler will warn about
0 commit comments