summaryrefslogtreecommitdiff
path: root/src/core/resource/ResourceManager.cpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-27 21:19:55 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-27 21:19:55 +0100
commit32f305fe931ec68b68326cf9f4cd64e7550af326 (patch)
tree309baeebae10627e94080d5f56e83d9ade4a86de /src/core/resource/ResourceManager.cpp
parent048db07ca91505ccfcb98e29ed6868f1aa64a514 (diff)
parent4c3d0cd465a4445e1fbd851e975727be064a92f4 (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/resource/ResourceManager.cpp')
-rw-r--r--src/core/resource/ResourceManager.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/resource/ResourceManager.cpp b/src/core/resource/ResourceManager.cpp
index 2e15c85..2484cb2 100644
--- a/src/core/resource/ResourceManager.cpp
+++ b/src/core/resource/ResourceManager.cpp
@@ -94,20 +94,21 @@ NodeVector<Node> ResourceManager::parse(
// We can now try to parse the given file
NodeVector<Node> parsedNodes;
- try {
- // Set the current source id in the logger instance. Note that this
- // modifies the logger instance -- the GuardedLogger is just used to
- // make sure the default location is popped from the stack again.
- GuardedLogger guardedLogger(logger, SourceLocation{sourceId});
+ // Set the current source id in the logger instance. Note that this
+ // modifies the logger instance -- the GuardedLogger is just used to
+ // make sure the default location is popped from the stack again.
+ GuardedLogger guardedLogger(logger, SourceLocation{sourceId});
+
+ try {
// Fetch the input stream and create a char reader
std::unique_ptr<std::istream> is = resource.stream();
CharReader reader(*is, sourceId);
- // Actually parse the input stream, distinguish the LINK and the
+ // Actually parse the input stream, distinguish the IMPORT and the
// INCLUDE mode
switch (mode) {
- case ParseMode::LINK: {
+ case ParseMode::IMPORT: {
// Create a new, empty parser scope instance and a new parser
// context with this instance in place
ParserScope innerScope;
@@ -183,13 +184,13 @@ NodeVector<Node> ResourceManager::parse(
return parsedNodes;
}
-NodeVector<Node> ResourceManager::link(ParserContext &ctx,
+NodeVector<Node> ResourceManager::import(ParserContext &ctx,
const std::string &path,
const std::string &mimetype,
const std::string &rel,
const RttiSet &supportedTypes)
{
- return parse(ctx, path, mimetype, rel, supportedTypes, ParseMode::LINK);
+ return parse(ctx, path, mimetype, rel, supportedTypes, ParseMode::IMPORT);
}
NodeVector<Node> ResourceManager::include(ParserContext &ctx,