diff options
Diffstat (limited to 'src/c.cpp')
-rw-r--r-- | src/c.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) { |