summaryrefslogtreecommitdiff
path: root/lib/jsonParse-persistance.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-04-25 19:19:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-07 16:41:37 +0000
commitabd7f486a0fb34320e3afae6780677cfd4ff85cc (patch)
treef2633cc76e78e35300a7dafdf3bce1bd8bcf2b7b /lib/jsonParse-persistance.cpp
parentRemove spare semi colons (diff)
downloadilt-abd7f486a0fb34320e3afae6780677cfd4ff85cc.tar.bz2
ilt-abd7f486a0fb34320e3afae6780677cfd4ff85cc.tar.xz
ilt-abd7f486a0fb34320e3afae6780677cfd4ff85cc.zip
Erring toward complete JSON loader
Diffstat (limited to 'lib/jsonParse-persistance.cpp')
-rw-r--r--lib/jsonParse-persistance.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/jsonParse-persistance.cpp b/lib/jsonParse-persistance.cpp
index 89887da..ad9fc2a 100644
--- a/lib/jsonParse-persistance.cpp
+++ b/lib/jsonParse-persistance.cpp
@@ -1,11 +1,10 @@
#include "jsonParse-persistance.h"
namespace Persistanace {
- JsonParsePersistance::JsonParsePersistance(std::istream & in) : json::jsonParser {&in} { }
-
void
- JsonParsePersistance::loadState()
+ JsonParsePersistance::loadState(std::istream & in)
{
+ this->switch_streams(&in, nullptr);
yy_push_state(0);
yylex();
}
@@ -13,7 +12,8 @@ namespace Persistanace {
void
JsonParsePersistance::BeginObject()
{
- stk.push(current()->BeginObject());
+ current()->beforeValue(stk);
+ current()->BeginObject(stk);
}
void
@@ -61,7 +61,8 @@ namespace Persistanace {
void
JsonParsePersistance::EndObject()
{
- stk.pop();
+ current()->EndObject(stk);
+ current()->EndObject(stk);
}
template<typename T>