aboutsummaryrefslogtreecommitdiffstats
path: root/src/tuplr.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tuplr.hpp')
-rw-r--r--src/tuplr.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tuplr.hpp b/src/tuplr.hpp
index da8eea5..1e64da1 100644
--- a/src/tuplr.hpp
+++ b/src/tuplr.hpp
@@ -237,7 +237,7 @@ struct ALiteral : public AST {
struct AString : public AST, public std::string {
AString(Cursor c, const string& s) : AST(c), std::string(s) {}
bool operator==(const AST& rhs) const { return this == &rhs; }
- void constrain(TEnv& tenv, Constraints& c) const {}
+ void constrain(TEnv& tenv, Constraints& c) const;
CValue compile(CEnv& cenv) { return NULL; }
};
@@ -535,6 +535,8 @@ struct PEnv : private map<const string, ASymbol*> {
return new ALiteral<int32_t>(strtol(s.c_str(), NULL, 10), exp->loc);
else
return new ALiteral<float>(strtod(s.c_str(), NULL), exp->loc);
+ } else if ((*str)[0] == '\"') {
+ return new AString(exp->loc, str->substr(1, str->length() - 2));
} else {
const PEnv::Handler* h = handler(false, *str);
if (h)