From e68c220586dfd1f14283def578c4c4ef109baed4 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 26 Jan 2015 00:30:17 +0100 Subject: Moving code for deferred Resolution and validation to "LINK" mode of Parser -> this causes these operations whenever the top-level scope instance is destroyed, which is the last possible point at which deferred resolution can take place. Validation must come after deferred resolution. --- src/core/resource/ResourceManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/resource') diff --git a/src/core/resource/ResourceManager.cpp b/src/core/resource/ResourceManager.cpp index 11d01a7..c7a4104 100644 --- a/src/core/resource/ResourceManager.cpp +++ b/src/core/resource/ResourceManager.cpp @@ -103,6 +103,14 @@ Rooted ResourceManager::parse(Registry ®istry, ParserContext &ctx, ParserScope scope; // New empty parser scope instance ParserContext childCtx = ctx.clone(scope, sourceId); node = req.getParser()->parse(reader, childCtx); + + // Perform all deferred resolutions + scope.performDeferredResolution(ctx.getLogger()); + + // Validate the parsed node + if (node != nullptr) { + node->validate(ctx.getLogger()); + } break; } case ParseMode::INCLUDE: { -- cgit v1.2.3