diff options
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index d525f57..797ae2e 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -86,6 +86,16 @@ AIf::compile(CEnv& cenv) } CVal +ACons::compile(CEnv& cenv) +{ + const AType* type = cenv.type(this); + vector<CVal> fields; + for (const_iterator i = begin() + 1; i != end(); ++i) + fields.push_back((*i)->compile(cenv)); + return cenv.engine()->compileTup(cenv, type, fields); +} + +CVal APrimitive::compile(CEnv& cenv) { return cenv.engine()->compilePrimitive(cenv, this); |