summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter/interpreter.cc
diff options
context:
space:
mode:
authorschodet2006-04-02 17:23:53 +0000
committerschodet2006-04-02 17:23:53 +0000
commitc425ae7693b604c190d3904e7ef965f93d34edee (patch)
tree4ce709554b2c0d2e872a0da6c903de77765ee02c /i/marvin/src/interpreter/interpreter.cc
parentc927f32a735e1600cf6b50a315d204963cf5877e (diff)
Support des fonctions qui ne retournent pas de bool.
Support du dry run.
Diffstat (limited to 'i/marvin/src/interpreter/interpreter.cc')
-rw-r--r--i/marvin/src/interpreter/interpreter.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/i/marvin/src/interpreter/interpreter.cc b/i/marvin/src/interpreter/interpreter.cc
index 4b034e3..a7f905c 100644
--- a/i/marvin/src/interpreter/interpreter.cc
+++ b/i/marvin/src/interpreter/interpreter.cc
@@ -47,8 +47,9 @@ Interpreter::add (const std::string &s, Func *f)
}
/// Call a function by name.
-bool
-Interpreter::call (const std::string &s, const Args &a) const
+void
+Interpreter::call (const std::string &s, const Args &a,
+ bool dryrun/*false*/) const
{
Funcs::const_iterator i;
i = funcs_.find (s);
@@ -56,7 +57,7 @@ Interpreter::call (const std::string &s, const Args &a) const
throw std::runtime_error ("function \'" + s + "\' does not exist");
try
{
- return (*i->second) (a);
+ (*i->second) (a, dryrun);
}
catch (const std::exception &e)
{