diff options
author | David Robillard <d@drobilla.net> | 2010-12-10 01:12:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-10 01:12:16 +0000 |
commit | edd04d465f41613d85b505844542c366b6117f86 (patch) | |
tree | f53feba5d71a492e2e8efc993823bdc7d649a026 /src/resp.hpp | |
parent | 46af3ed1f9c552928ef61b4e609157768bcf4807 (diff) | |
download | resp-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.hpp | 4 |
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 * |