diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2014-10-02 17:31:26 -0400 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2014-10-02 17:31:26 -0400 |
commit | fbcb5e9093464fb53c2d5f55caf161e71d6a9f02 (patch) | |
tree | 86adc8e13b1a6b9a11a697901e9ee4ddaf72a230 /src/times.cc | |
parent | 61dd6bf663cfa86067aabf8ba341bdbde473b3f3 (diff) | |
download | fork-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.cc | 3 |
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; |