From e4b3f0bb3a74b799f0f67d8b2f1efeedad5e2021 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 18 Nov 2009 05:45:48 -0500 Subject: The new period parser is passing all tests --- src/token.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 3df072a7..81c54a82 100644 --- a/src/token.cc +++ b/src/token.cc @@ -206,11 +206,12 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags) length++; date_interval_t timespan(buf); - if (! timespan) + optional begin = timespan.begin(); + if (! begin) throw_(parse_error, _("Date specifier does not refer to a starting date")); kind = VALUE; - value = *timespan.start; + value = *begin; break; } -- cgit v1.2.3