Commit 304075d4 authored by newgre's avatar newgre
Browse files

- Moved to_string() back into the statement class.

parent 42b956c9
......@@ -15,13 +15,14 @@
namespace gdsl {
namespace rreil {
// Acts as the base class for all expression and statement types in the RREIL
// Acts as the base class for all expression and statement types in the RReil
// language.
class statement {
public:
virtual ~statement() {}
virtual void accept(statement_visitor &v) = 0;
std::string to_string() const;
private:
virtual void put(std::ostream &out) const = 0;
friend std::ostream &operator<<(std::ostream &out,
......@@ -34,7 +35,5 @@ typedef std::vector<rreil::statement*> statements_t;
// stream.
std::ostream &operator<<(std::ostream &out, const statement &statement);
std::string to_string(const statement &statement);
} // namespace rreil
} // namespace gdsl
......@@ -13,8 +13,8 @@ std::ostream &gdsl::rreil::operator<<(std::ostream &out,
return out;
}
std::string gdsl::rreil::to_string(const statement &statement) {
std::string gdsl::rreil::statement::to_string() const {
std::stringstream o;
o << statement;
o << *this;
return o.str();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment