diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-01 22:10:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-01 22:10:32 -0400 |
commit | fb5428ce85127413da6cba184dda178352a82b3c (patch) | |
tree | e72d931ec737a7442a61bdfc3a61379a3fa8de48 /src/token.cc | |
parent | 7128fdb6373c901c9c68e2d8ddac911891466c40 (diff) | |
download | fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.gz fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.tar.bz2 fork-ledger-fb5428ce85127413da6cba184dda178352a82b3c.zip |
Added support for metadata and tagging, and made regexs a first-class type.
Diffstat (limited to 'src/token.cc')
-rw-r--r-- | src/token.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/token.cc b/src/token.cc index 0fd2c25a..a2046924 100644 --- a/src/token.cc +++ b/src/token.cc @@ -110,8 +110,7 @@ void expr_t::token_t::parse_ident(std::istream& in) length = 0; char c, buf[256]; - READ_INTO_(in, buf, 255, c, length, - std::isalnum(c) || c == '_' || c == '.' || c == '-'); + READ_INTO_(in, buf, 255, c, length, std::isalnum(c) || c == '_' || c == '-'); value.set_string(buf); } @@ -280,8 +279,8 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) in.get(c); length++; - kind = MASK; - value.set_string(buf); + kind = VALUE; + value.set_mask(buf); } break; } @@ -334,6 +333,11 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) kind = GREATER; break; + case '.': + in.get(c); + kind = DOT; + break; + case ',': in.get(c); kind = COMMA; |