🚧 extend API

This commit is contained in:
Niels Lohmann 2020-06-17 22:03:14 +02:00
parent e9bfcf7255
commit 74520d8bb0
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
5 changed files with 148 additions and 66 deletions

View file

@ -63,8 +63,11 @@ class parser
/// a parser reading from an input adapter
explicit parser(InputAdapterType&& adapter,
const parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true)
: callback(cb), m_lexer(std::move(adapter)), allow_exceptions(allow_exceptions_)
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(cb)
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();