summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-15 01:14:13 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-15 22:39:44 -0400
commita05353e26928464b485767cc843ec5b3d9e47040 (patch)
treee46fa45354ecebceeca8b631893aef4edb0d281c /src/token.cc
parent1889d449b6f7321d711c00a33f17adfbb986287e (diff)
downloadfork-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.cc7
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;
}