summaryrefslogtreecommitdiff
path: root/src/times.cc
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2014-10-02 17:31:26 -0400
committerMartin Michlmayr <tbm@cyrius.com>2014-10-02 17:31:26 -0400
commitfbcb5e9093464fb53c2d5f55caf161e71d6a9f02 (patch)
tree86adc8e13b1a6b9a11a697901e9ee4ddaf72a230 /src/times.cc
parent61dd6bf663cfa86067aabf8ba341bdbde473b3f3 (diff)
downloadfork-ledger-fbcb5e9093464fb53c2d5f55caf161e71d6a9f02.tar.gz
fork-ledger-fbcb5e9093464fb53c2d5f55caf161e71d6a9f02.tar.bz2
fork-ledger-fbcb5e9093464fb53c2d5f55caf161e71d6a9f02.zip
Fix period expression parsing for month to month without year
Bug fix for #1074, a regression introduced by the fix for bug #375
Diffstat (limited to 'src/times.cc')
-rw-r--r--src/times.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/times.cc b/src/times.cc
index b527de87..45734bdc 100644
--- a/src/times.cc
+++ b/src/times.cc
@@ -839,7 +839,7 @@ void date_parser_t::determine_when(date_parser_t::lexer_t::token_t& tok,
specifier.month =
date_specifier_t::month_type
(boost::get<date_time::months_of_year>(*tok.value));
- tok = lexer.next_token();
+ tok = lexer.peek_token();
switch (tok.kind) {
case lexer_t::token_t::TOK_A_YEAR:
specifier.year = boost::get<date_specifier_t::year_type>(*tok.value);
@@ -847,7 +847,6 @@ void date_parser_t::determine_when(date_parser_t::lexer_t::token_t& tok,
case lexer_t::token_t::END_REACHED:
break;
default:
- tok.unexpected();
break;
}
break;