summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-24 14:00:29 -1000
committerFuwn <[email protected]>2022-06-24 14:00:29 -1000
commitd183f153a0f9a36c5530c0579adbbf15dca86f02 (patch)
tree2f6322ff245259ff1506a0fb2684d73cf78251f8
parentrefactor(parser): out-of-line definition for parser_exception (diff)
downloadcait-d183f153a0f9a36c5530c0579adbbf15dca86f02.tar.xz
cait-d183f153a0f9a36c5530c0579adbbf15dca86f02.zip
fix(node): stringable explicit copy constructor
-rw-r--r--src/node.cc6
-rw-r--r--src/node.hh4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/node.cc b/src/node.cc
index 9b76c27..0079dcb 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -22,6 +22,12 @@
namespace cait::node {
+stringable::stringable() = default;
+
+stringable::stringable(const stringable &) = default;
+
+stringable::~stringable() = default;
+
variable::variable(const token &variable_name,
std::vector<token> variable_value_list)
: _name(variable_name), _value_list(std::move(variable_value_list)) {}
diff --git a/src/node.hh b/src/node.hh
index 919d013..992721c 100644
--- a/src/node.hh
+++ b/src/node.hh
@@ -44,8 +44,10 @@ using node_set =
class stringable {
public:
+ stringable();
+ explicit stringable(const stringable &);
+ virtual ~stringable();
[[nodiscard]] virtual auto string() const -> std::string = 0;
- virtual ~stringable() = default;
};
class variable : stringable {