aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr.hpp')
-rw-r--r--tuplr.hpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tuplr.hpp b/tuplr.hpp
index ba4f9a9..bd4788c 100644
--- a/tuplr.hpp
+++ b/tuplr.hpp
@@ -445,7 +445,7 @@ struct CEnvPimpl;
/// Compile-Time Environment
struct CEnv {
- CEnv(PEnv& p, CEngine& engine);
+ CEnv(PEnv& p, TEnv& t, CEngine& engine);
~CEnv();
typedef Env<const AST*, AST*> Code;
@@ -457,6 +457,7 @@ struct CEnv {
void precompile(AST* obj, CValue value) { vals.def(obj, value); }
CValue compile(AST* obj);
void optimise(CFunction f);
+ void write(std::ostream& os);
CEngine& engine;
PEnv& penv;
@@ -470,5 +471,15 @@ private:
CEnvPimpl* _pimpl;
};
+
+/***************************************************************************
+ * EVAL/REPL/MAIN *
+ ***************************************************************************/
+
+void initLang(PEnv& penv, TEnv& tenv);
+CEnv* newCenv(PEnv& penv, TEnv& tenv);
+int eval(CEnv& cenv, const string& name, istream& is);
+int repl(CEnv& cenv);
+
#endif // TUPLR_HPP