diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-15 01:14:13 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-15 22:39:44 -0400 |
commit | a05353e26928464b485767cc843ec5b3d9e47040 (patch) | |
tree | e46fa45354ecebceeca8b631893aef4edb0d281c /src/token.cc | |
parent | 1889d449b6f7321d711c00a33f17adfbb986287e (diff) | |
download | fork-ledger-a05353e26928464b485767cc843ec5b3d9e47040.tar.gz fork-ledger-a05353e26928464b485767cc843ec5b3d9e47040.tar.bz2 fork-ledger-a05353e26928464b485767cc843ec5b3d9e47040.zip |
First iteration of the new date_interval_t rewrite
Diffstat (limited to 'src/token.cc')
-rw-r--r-- | src/token.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/token.cc b/src/token.cc index b7c19ceb..fde6a0e3 100644 --- a/src/token.cc +++ b/src/token.cc @@ -205,9 +205,12 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) in.get(c); length++; - interval_t timespan(buf); + date_interval_t timespan(buf); + if (! timespan) + throw_(parse_error, + _("Date specifier does not refer to a starting date")); kind = VALUE; - value = timespan.first(); + value = *timespan.start; break; } |