summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-22 16:25:51 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-22 16:25:51 -0400
commitccedf7d57f6cc42553f1d80189bf1491df6680e2 (patch)
tree550826fed1ede33d005f6bfba7ebed109f79f453 /src/token.cc
parent4e64364d3a6e575d7c9cb3db412dae36132b9f2d (diff)
downloadfork-ledger-ccedf7d57f6cc42553f1d80189bf1491df6680e2.tar.gz
fork-ledger-ccedf7d57f6cc42553f1d80189bf1491df6680e2.tar.bz2
fork-ledger-ccedf7d57f6cc42553f1d80189bf1491df6680e2.zip
Parse != as !(==) and !~ as !(=~), for simplicity's sake.
Diffstat (limited to 'src/token.cc')
-rw-r--r--src/token.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/token.cc b/src/token.cc
index 5c950d6d..66125b93 100644
--- a/src/token.cc
+++ b/src/token.cc
@@ -172,6 +172,14 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags)
length = 2;
break;
}
+ else if (c == '~') {
+ in.get(c);
+ symbol[1] = c;
+ symbol[2] = '\0';
+ kind = NMATCH;
+ length = 2;
+ break;
+ }
kind = EXCLAM;
break;