fixed some memory leaks
This commit is contained in:
@@ -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
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user