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 797ae2e..2a716c2 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -96,6 +96,16 @@ ACons::compile(CEnv& cenv) } CVal +ADot::compile(CEnv& cenv) +{ + const_iterator i = begin(); + AST* tup = *++i; + ALiteral<int32_t>* index = (*++i)->as<ALiteral<int32_t>*>(); + CVal tupVal = tup->compile(cenv); + return cenv.engine()->compileDot(cenv, tupVal, index->val); +} + +CVal APrimitive::compile(CEnv& cenv) { return cenv.engine()->compilePrimitive(cenv, this); |