diff options
Diffstat (limited to 'src/core/parser/stack')
-rw-r--r-- | src/core/parser/stack/DocumentHandler.cpp | 9 | ||||
-rw-r--r-- | src/core/parser/stack/Stack.cpp | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index ce6267f..04f79fb 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -634,11 +634,12 @@ void DocumentChildHandler::end() case HandlerType::COMMAND: case HandlerType::ANNOTATION_START: case HandlerType::TOKEN: - // In case of explicit fields we do not want to pop something from - // the stack. - if (!isExplicitField) { + if(!isExplicitField){ // pop the "main" element. scope().pop(logger()); + } else{ + // in case of explicit fields, roll back. + rollbackPath(); } break; case HandlerType::ANNOTATION_END: @@ -692,8 +693,8 @@ void DocumentChildHandler::fieldEnd() { if (!isExplicitField) { popTokens(); + rollbackPath(); } - rollbackPath(); } bool DocumentChildHandler::convertData(Handle<FieldDescriptor> field, diff --git a/src/core/parser/stack/Stack.cpp b/src/core/parser/stack/Stack.cpp index 88ddeee..41ced2a 100644 --- a/src/core/parser/stack/Stack.cpp +++ b/src/core/parser/stack/Stack.cpp @@ -35,9 +35,6 @@ #include <iostream> #endif -// TODO: Remove -#include <iostream> - namespace ousia { namespace parser_stack { namespace { |