This commit is contained in:
blueloveTH 2023-06-13 21:50:56 +08:00
parent 925679a040
commit 81feb7a245
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,6 @@ inline const float kTypeAttrLoadFactor = 0.5f;
#pragma warning (disable:4101)
#pragma warning (disable:4244)
#define _CRT_NONSTDC_NO_DEPRECATE
#define strdup _strdup
#endif
#ifdef _MSC_VER

View File

@ -394,7 +394,7 @@ struct Lexer {
}
}
SyntaxError("invalid special token");
}
} return false;
case '%': add_token_2('=', TK("%"), TK("%=")); return true;
case '&': add_token_2('=', TK("&"), TK("&=")); return true;
case '|': add_token_2('=', TK("|"), TK("|=")); return true;
@ -481,8 +481,8 @@ struct Lexer {
switch (eat_name())
{
case 0: break;
case 1: SyntaxError("invalid char: " + std::string(1, c));
case 2: SyntaxError("invalid utf8 sequence: " + std::string(1, c));
case 1: SyntaxError("invalid char: " + std::string(1, c)); break;
case 2: SyntaxError("invalid utf8 sequence: " + std::string(1, c)); break;
case 3: SyntaxError("@id contains invalid char"); break;
case 4: SyntaxError("invalid JSON token"); break;
default: FATAL_ERROR();