summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter/interpreter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/interpreter/interpreter.cc')
-rw-r--r--i/marvin/src/interpreter/interpreter.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/i/marvin/src/interpreter/interpreter.cc b/i/marvin/src/interpreter/interpreter.cc
index a7f905c..bdc918a 100644
--- a/i/marvin/src/interpreter/interpreter.cc
+++ b/i/marvin/src/interpreter/interpreter.cc
@@ -23,6 +23,7 @@
//
// }}}
#include "interpreter.hh"
+#include "interpreter_parser.hh"
/// Destructor.
Interpreter::~Interpreter (void)
@@ -66,3 +67,19 @@ Interpreter::call (const std::string &s, const Args &a,
}
}
+/// Interpret a string.
+void
+Interpreter::interpretString (const std::string &s, bool dryrun/*false*/)
+{
+ InterpreterParser p (*this, dryrun);
+ p.parseString (s);
+}
+
+/// Interpret a file.
+void
+Interpreter::interpretFile (const std::string &file, bool dryrun/*false*/)
+{
+ InterpreterParser p (*this, dryrun);
+ p.parseFile (file);
+}
+