diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-04-09 11:33:34 +0200 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2016-04-25 22:19:34 +0200 |
commit | 3ad6d09b82f9b3c4118b3264b1a013384c81e3c2 (patch) | |
tree | c46f1c2498cd92b55070be4e2459ca757afba897 /src/core/parser | |
parent | 1a2e47eefee90fea2779ec3551f214c572fcc7f9 (diff) |
added test for empty explicit fields, which currently fails.
Diffstat (limited to 'src/core/parser')
-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) { |