summaryrefslogtreecommitdiff
path: root/src/core/parser/ParserStack.cpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-18 15:30:18 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-18 15:30:18 +0100
commit8ab0709045667f8e1a67a9981c619980c9aebd1a (patch)
treef39812b3d216566de7c4dcdaacc7c607aa7e646c /src/core/parser/ParserStack.cpp
parentcd55519130c5f91d95107b3b1e1a8203caa5008a (diff)
parent372c67e0844654362fc7d440b0b4a31500a6d02a (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/parser/ParserStack.cpp')
-rw-r--r--src/core/parser/ParserStack.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/parser/ParserStack.cpp b/src/core/parser/ParserStack.cpp
index caf2116..9cf782f 100644
--- a/src/core/parser/ParserStack.cpp
+++ b/src/core/parser/ParserStack.cpp
@@ -63,11 +63,11 @@ void Handler::child(std::shared_ptr<Handler> handler)
HandlerInstance HandlerDescriptor::create(const ParserContext &ctx,
std::string name, State parentState,
- bool isChild,
- Variant::mapType &args) const
+ bool isChild, Variant::mapType &args,
+ const SourceLocation &location) const
{
Handler *h;
- HandlerData data{ctx, name, targetState, parentState, isChild};
+ HandlerData data{ctx, name, targetState, parentState, isChild, location};
if (ctor) {
h = ctor(data);
} else {
@@ -115,7 +115,8 @@ std::set<std::string> ParserStack::expectedCommands(State state)
return res;
}
-void ParserStack::start(std::string name, Variant::mapType &args)
+void ParserStack::start(std::string name, Variant::mapType &args,
+ const SourceLocation &location)
{
// Fetch the current handler and the current state
const HandlerInstance *h = stack.empty() ? nullptr : &stack.top();
@@ -143,11 +144,11 @@ void ParserStack::start(std::string name, Variant::mapType &args)
}
// Instantiate the handler and call its start function
- stack.emplace(
- descr->create(ctx, name, curState, isChild, args));
+ stack.emplace(descr->create(ctx, name, curState, isChild, args, location));
}
-void ParserStack::start(std::string name, const Variant::mapType &args)
+void ParserStack::start(std::string name, const Variant::mapType &args,
+ const SourceLocation &location)
{
Variant::mapType argsCopy(args);
start(name, argsCopy);