diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-26 00:30:17 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-26 00:30:17 +0100 |
commit | e68c220586dfd1f14283def578c4c4ef109baed4 (patch) | |
tree | 8e197f3957c55cfc56f5b2319b042470bee9d28d /src/core | |
parent | 174bab2a00b890495f458a982ecec7342579ea56 (diff) |
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.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/resource/ResourceManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<Node> 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: { |