diff --git a/src/ast/expressions/if_then_else.cpp b/src/ast/expressions/if_then_else.cpp index 5648d10..53de1e5 100644 --- a/src/ast/expressions/if_then_else.cpp +++ b/src/ast/expressions/if_then_else.cpp @@ -20,4 +20,10 @@ namespace ast { ss << "else" << alternative->str(); return ss.str(); }; + + if_then_else::~if_then_else() { + delete condition; + delete consequence; + delete alternative; + } } // namespace ast diff --git a/src/ast/expressions/if_then_else.hpp b/src/ast/expressions/if_then_else.hpp index 99d0f46..cf2c8fd 100644 --- a/src/ast/expressions/if_then_else.hpp +++ b/src/ast/expressions/if_then_else.hpp @@ -15,5 +15,6 @@ namespace ast { std::string token_literal() const override; std::string str() const override; + ~if_then_else(); }; } // namespace ast