diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/parser/ParserScope.cpp | 4 | ||||
-rw-r--r-- | src/core/parser/stack/DocumentHandler.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/parser/ParserScope.cpp b/src/core/parser/ParserScope.cpp index c46dc51..e5bf6f6 100644 --- a/src/core/parser/ParserScope.cpp +++ b/src/core/parser/ParserScope.cpp @@ -174,12 +174,12 @@ ParserScope::ParserScope() : topLevelDepth(0) {} bool ParserScope::checkUnwound(Logger &logger) const { - if (nodes.size() != topLevelDepth) { + if (nodes.size() > topLevelDepth) { logger.error("Not all open elements have been closed!", SourceLocation{}, MessageMode::NO_CONTEXT); logger.note("Still open elements are: ", SourceLocation{}, MessageMode::NO_CONTEXT); - for (size_t i = topLevelDepth + 1; i < nodes.size(); i++) { + for (size_t i = topLevelDepth; i < nodes.size(); i++) { logger.note(std::string("Element of interal type ") + nodes[i]->type()->name + std::string(" defined here:"), diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index 3e85f72..ce6267f 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -334,7 +334,6 @@ bool DocumentChildHandler::startCommand(Variant::mapType &args) } // Otherwise create a new StructuredEntity - // TODO: Consider Anchors and AnnotationEntities Rooted<StructuredClass> strct = scope().resolve<StructuredClass>( Utils::split(name(), ':'), logger()); if (strct == nullptr) { |