math-expressions icon indicating copy to clipboard operation
math-expressions copied to clipboard

Any expression that state a literal positive number with + doesn't parse

Open Yivan000 opened this issue 3 years ago • 0 comments

Any mathematical expression that state a literal positive number with + doesn't parse, like:

  • 7+(+7)
  • +7
  • 7*+7
  • cos(+7)

All above throws this exception:

The following IndexError was thrown while handling a gesture:
RangeError (index): Index out of range: index must not be negative: -1

When the exception was thrown, this was the stack: 
...
packages/math_expressions/src/parser.dart 45:27                     parse
...

However, when it states a literal negative number with - does parse. This should also work with +.

Yivan000 avatar Mar 25 '21 07:03 Yivan000