Duration: May also terminate on Lexer::singleCharOperator
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user