aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-10 01:12:16 +0000
committerDavid Robillard <d@drobilla.net>2010-12-10 01:12:16 +0000
commitedd04d465f41613d85b505844542c366b6117f86 (patch)
treef53feba5d71a492e2e8efc993823bdc7d649a026 /src/resp.hpp
parent46af3ed1f9c552928ef61b4e609157768bcf4807 (diff)
downloadresp-edd04d465f41613d85b505844542c366b6117f86.tar.gz
resp-edd04d465f41613d85b505844542c366b6117f86.tar.bz2
resp-edd04d465f41613d85b505844542c366b6117f86.zip
Convert match form to if at lift stage (remove knowledge of match from compile stage and backends).
git-svn-id: http://svn.drobilla.net/resp/resp@342 ad02d1e2-f140-0410-9f75-f8b11f17cedd
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 *