aboutsummaryrefslogtreecommitdiffstats
path: root/src/c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/c.cpp')
-rw-r--r--src/c.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/c.cpp b/src/c.cpp
index ecf7d92..d6d71f3 100644
--- a/src/c.cpp
+++ b/src/c.cpp
@@ -152,6 +152,7 @@ struct CEngine : public Engine {
CVal compileTup(CEnv& cenv, const AType* type, const vector<CVal>& fields);
CVal compileDot(CEnv& cenv, CVal tup, int32_t index);
CVal compileLiteral(CEnv& cenv, AST* lit);
+ CVal compileString(CEnv& cenv, const char* str);
CVal compilePrimitive(CEnv& cenv, APrimitive* prim);
CVal compileIf(CEnv& cenv, AIf* aif);
CVal compileGlobal(CEnv& cenv, const AType* type, const string& sym, CVal val);
@@ -197,6 +198,12 @@ CEngine::compileLiteral(CEnv& cenv, AST* lit)
return new Value(lit->str());
}
+CVal
+CEngine::compileString(CEnv& cenv, const char* str)
+{
+ return new Value(str);
+}
+
CFunc
CEngine::compileFunction(CEnv& cenv, AFn* fn, const AType* type)
{