diff options
Diffstat (limited to 'libjsonpp/jsonFlexLexer.cpp')
-rw-r--r-- | libjsonpp/jsonFlexLexer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libjsonpp/jsonFlexLexer.cpp b/libjsonpp/jsonFlexLexer.cpp index b761eb1..f8900b0 100644 --- a/libjsonpp/jsonFlexLexer.cpp +++ b/libjsonpp/jsonFlexLexer.cpp @@ -3,6 +3,16 @@ #include <glibmm/convert.h> namespace json { + jsonFlexLexer::jsonFlexLexer(std::istream & in, const std::string & enc) : + yyFlexLexer(&in, NULL), + encoding(enc) + { + yy_push_state(0); + acceptValues.push([this](const auto & value) { + return values.emplace(std::make_shared<Value>(value)).get(); + }); + } + ValuePtr jsonFlexLexer::getValue() const { |