From fbcb5e9093464fb53c2d5f55caf161e71d6a9f02 Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Thu, 2 Oct 2014 17:31:26 -0400 Subject: Fix period expression parsing for month to month without year Bug fix for #1074, a regression introduced by the fix for bug #375 --- src/times.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/times.cc') 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(*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(*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; -- cgit v1.2.3