Commit 546f87e5 authored by Francis Dupont's avatar Francis Dupont

[5036] Added \r as a valid whitespace (cf JSON standard)

parent aef276b9
......@@ -66,7 +66,7 @@ unsigned int comment_start_line = 0;
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
int \-?[0-9]+
blank [ \t]
blank [ \t\r]
UnicodeEscapeSequence u[0-9A-Fa-f]{4}
JSONEscapeCharacter ["\\/bfnrt]
......
......@@ -274,6 +274,10 @@ TEST(ParserTest, errors) {
"<string>:1.2: syntax error, unexpected end of file");
testError("\n", Parser6Context::PARSER_JSON,
"<string>:2.1: syntax error, unexpected end of file");
testError("\t", Parser6Context::PARSER_JSON,
"<string>:1.2: syntax error, unexpected end of file");
testError("\r", Parser6Context::PARSER_JSON,
"<string>:1.2: syntax error, unexpected end of file");
// comments
testError("# nothing\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment