mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Duration: May also terminate on Lexer::singleCharOperator
This commit is contained in:
parent
1ec029be9b
commit
2355738c7a
1 changed files with 6 additions and 4 deletions
|
@ -314,7 +314,8 @@ bool Duration::parse (const std::string& input, std::string::size_type& start)
|
|||
if (n.getOneOf (units, unit))
|
||||
{
|
||||
if (n.depleted () ||
|
||||
Lexer::isWhitespace (n.next ()))
|
||||
Lexer::isWhitespace (n.next ()) ||
|
||||
Lexer::isSingleCharOperator (n.next ()))
|
||||
{
|
||||
start = original_start + n.cursor ();
|
||||
|
||||
|
@ -337,7 +338,8 @@ bool Duration::parse (const std::string& input, std::string::size_type& start)
|
|||
if (n.getOneOf (units, unit))
|
||||
{
|
||||
if (n.depleted () ||
|
||||
Lexer::isWhitespace (n.next ()))
|
||||
Lexer::isWhitespace (n.next ()) ||
|
||||
Lexer::isSingleCharOperator (n.next ()))
|
||||
{
|
||||
start = original_start + n.cursor ();
|
||||
double quantity = strtod (number.c_str (), NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue