fixed some memory leaks

This commit is contained in:
Karma Riuk
2025-07-14 15:20:30 +02:00
parent 9e63c923da
commit 34e4bfe9c9
2 changed files with 7 additions and 0 deletions

View File

@@ -20,4 +20,10 @@ namespace ast {
ss << "else" << alternative->str(); ss << "else" << alternative->str();
return ss.str(); return ss.str();
}; };
if_then_else::~if_then_else() {
delete condition;
delete consequence;
delete alternative;
}
} // namespace ast } // namespace ast

View File

@@ -15,5 +15,6 @@ namespace ast {
std::string token_literal() const override; std::string token_literal() const override;
std::string str() const override; std::string str() const override;
~if_then_else();
}; };
} // namespace ast } // namespace ast