make parser invisible from outside

mutable-v2
Evgeniy A. Dushistov 2016-04-28 01:28:42 +03:00
parent eefbd630ec
commit 0e4ace7e40
1 changed files with 3 additions and 1 deletions

View File

@ -326,11 +326,12 @@ static inline bool in_range(long x, long lower, long upper) {
return (x >= lower && x <= upper);
}
namespace {
/* JsonParser
*
* Object that tracks all state of an in-progress parse.
*/
struct JsonParser {
struct JsonParser final {
/* State
*/
@ -718,6 +719,7 @@ struct JsonParser {
return fail("expected value, got " + esc(ch));
}
};
}//namespace {
Json Json::parse(const string &in, string &err, JsonParse strategy) {
JsonParser parser { in, 0, err, false, strategy };