diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/func.cc | 2 | ||||
-rw-r--r-- | src/value.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/func.cc b/src/func.cc index a9d5948..4451267 100644 --- a/src/func.cc +++ b/src/func.cc @@ -311,7 +311,7 @@ Value builtin_str(const Context *, const std::vector<std::string>&, const std::v std::stringstream stream; for (size_t i = 0; i < args.size(); i++) { - stream << args[i]; + stream << args[i].toString(); } return Value(stream.str()); } diff --git a/src/value.cc b/src/value.cc index e08b2d8..ab78c2a 100644 --- a/src/value.cc +++ b/src/value.cc @@ -343,7 +343,7 @@ std::string Value::toString() const switch (this->type) { case STRING: - stream << '"' << this->text << '"'; + stream << this->text; break; case VECTOR: stream << '['; @@ -411,7 +411,8 @@ void Value::append(Value *val) std::ostream &operator<<(std::ostream &stream, const Value &value) { - stream << value.toString(); + if (value.type == Value::STRING) stream << QuotedString(value.toString()); + else stream << value.toString(); return stream; } |