diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/command.cpp | 11 | ||||
-rw-r--r-- | src/util/command.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/util/command.cpp b/src/util/command.cpp index 06545a0a0..90204a63f 100644 --- a/src/util/command.cpp +++ b/src/util/command.cpp @@ -34,6 +34,15 @@ ostream& operator<<(ostream& out, const Command& c) { return out; } +ostream& operator<<(ostream& out, const Command* c) { + if (c == NULL) { + out << "null"; + } else { + c->toStream(out); + } + return out; +} + std::string Command::toString() const { stringstream ss; toStream(ss); @@ -111,7 +120,7 @@ void CheckSatCommand::toStream(ostream& out) const { void QueryCommand::toStream(ostream& out) const { out << "Query("; - d_expr.printAst(out, 2); + d_expr.printAst(out, 0); out << ")"; } diff --git a/src/util/command.h b/src/util/command.h index b41be4592..57edfea01 100644 --- a/src/util/command.h +++ b/src/util/command.h @@ -30,6 +30,7 @@ namespace CVC4 { namespace CVC4 { std::ostream& operator<<(std::ostream&, const Command&) CVC4_PUBLIC; +std::ostream& operator<<(std::ostream&, const Command*) CVC4_PUBLIC; class CVC4_PUBLIC Command { public: |