summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-19 03:37:16 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-19 03:37:16 -0500
commitcc9110a43a1e2d006de8d24a84bbfb2c6918cf33 (patch)
tree4230ae03ebea8e2cbc0b6e1de821730e4819af47 /src/token.cc
parent6b557f810e1c6eb2dcd8a24eeeacfcf9cc8210e3 (diff)
parent63fee4c83775f79364199ea547dbc7e068b0abc8 (diff)
downloadfork-ledger-cc9110a43a1e2d006de8d24a84bbfb2c6918cf33.tar.gz
fork-ledger-cc9110a43a1e2d006de8d24a84bbfb2c6918cf33.tar.bz2
fork-ledger-cc9110a43a1e2d006de8d24a84bbfb2c6918cf33.zip
Merge branch 'next'
Diffstat (limited to 'src/token.cc')
-rw-r--r--src/token.cc5
1 files changed, 3 insertions, 2 deletions
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<date_t> 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;
}