Add git hooks

Signed-off-by: CHatingPython <chatingpython@gmail.com>
This commit is contained in:
CHatingPython
2026-05-26 13:14:37 +02:00
committed by CHatingPython
parent 7017d83204
commit 4a58e97812
9 changed files with 70 additions and 43 deletions
-16
View File
@@ -50,22 +50,6 @@ class function_definition_node : public function_declarartion_node {
public:
function_definition_node(front::token name, function_body_handle&& body)
: function_declarartion_node(name), m_body(std::move(body)) {}
~function_definition_node() override = default;
function_definition_node(function_definition_node&& other) noexcept
: function_declarartion_node(std::move(other)), m_body(std::move(other.m_body)) {}
function_definition_node(const function_definition_node&) = delete;
function_definition_node& operator=(function_definition_node&& other) noexcept {
if (this == &other) return *this;
function_declarartion_node::operator=(std::move(other));
m_body = std::move(other.m_body);
return *this;
}
function_definition_node& operator=(const function_definition_node&) = delete;
public:
declaration_node_t declaration_type() const override { return declaration_node_t::FunctionDefinition; }
+1 -1
View File
@@ -32,7 +32,7 @@ public:
const handle<std::string_view>& value() const { return m_value; }
public:
std::ostream& print(std::ostream& os) const override {
if (m_value.has_error()) return os << (std::string)m_value;
if (m_value.has_error()) return os << m_value.error();
return os << "string literal (" << *m_value << ")";
}
private: