aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resp.hpp')
-rw-r--r--src/resp.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resp.hpp b/src/resp.hpp
index d90ccf0..266387c 100644
--- a/src/resp.hpp
+++ b/src/resp.hpp
@@ -157,6 +157,8 @@ extern ostream& operator<<(ostream& out, const AST* ast);
struct AST : public Object {
AST(Tag t, Cursor c=Cursor()) : loc(c) { this->tag(t); }
bool operator==(const AST& o) const;
+ bool operator!=(const AST& o) const;
+
string str() const { ostringstream ss; ss << this; return ss.str(); }
const ATuple* as_tuple() const {
@@ -485,6 +487,8 @@ AST::operator==(const AST& rhs) const
return false;
}
+inline bool AST::operator!=(const AST& rhs) const { return !(operator==(rhs)); }
+
/***************************************************************************
* Lexical Environmment *