aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr.hpp')
-rw-r--r--tuplr.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tuplr.hpp b/tuplr.hpp
index 8910136..97a5988 100644
--- a/tuplr.hpp
+++ b/tuplr.hpp
@@ -165,6 +165,7 @@ struct Object {
static GC pool;
};
+
/***************************************************************************
* Abstract Syntax Tree *
***************************************************************************/
@@ -264,7 +265,8 @@ struct AType : public ATuple {
AType(Cursor c, AST* ast, ...) : ATuple(c), kind(EXPR), id(0) {
if (!ast) return;
va_list args; va_start(args, ast);
- push_back(ast);
+ if (ast)
+ push_back(ast);
for (AST* a = va_arg(args, AST*); a; a = va_arg(args, AST*))
push_back(a);
va_end(args);
@@ -361,7 +363,7 @@ struct AClosure : public ATuple {
bool operator==(const AST& rhs) const { return this == &rhs; }
void constrain(TEnv& tenv, Constraints& c) const;
void lift(CEnv& cenv);
- void liftCall(CEnv& cenv, const vector<AType*>& argsT);
+ void liftCall(CEnv& cenv, const AType& argsT);
CValue compile(CEnv& cenv);
ATuple* prot() const { return at(1)->to<ATuple*>(); }
Funcs funcs;
@@ -607,6 +609,8 @@ struct CEnv {
CFunction alloc;
Subst tsubst;
+ map<string,string> args;
+
private:
struct PImpl; ///< Private Implementation
PImpl* _pimpl;