diff --git a/source/ast/function_expression.hpp b/source/ast/function_expression.hpp index f9c3686..5531ab2 100644 --- a/source/ast/function_expression.hpp +++ b/source/ast/function_expression.hpp @@ -16,5 +16,5 @@ struct function_expression : callable_expression auto compile(compiler& comp) const -> void override; const statement* body {}; - mutable std::string name; + std::string name; }; diff --git a/source/eval/object.hpp b/source/eval/object.hpp index 78a486b..068a175 100644 --- a/source/eval/object.hpp +++ b/source/eval/object.hpp @@ -144,7 +144,7 @@ struct string_object : hashable_object [[nodiscard]] auto type() const -> object_type override { return object_type::string; } - [[nodiscard]] auto inspect() const -> std::string override { return value; } + [[nodiscard]] auto inspect() const -> std::string override { return fmt::format(R"("{}")", value); } [[nodiscard]] auto hash_key() const -> hash_key_type override;