TomFrost / Jexl

Javascript Expression Language: Powerful context-based expression parser and evaluator
MIT License
573 stars 93 forks source link

fix(Lexer): Interpret minus correctly #122

Open Dossar opened 2 years ago

Dossar commented 2 years ago

Addresses https://github.com/TomFrost/Jexl/issues/97

Incorporates the suggestion provided in this comment, courtesy of OlivierB-OB: https://github.com/TomFrost/Jexl/issues/97#issuecomment-745129713

Basically, if there is a minus sign for a negative value past the first argument, there is a parsing error. Adding comma to the list of minusNegatesAfter should allow proper interpretation of negative values after the first argument.

Dossar commented 2 years ago

@TomFrost The fix in addition to unit tests have been added in this PR. To me it looks good to merge for fixing this issue, but would like your feedback.

Arihy commented 2 years ago

Hello @TomFrost, any idea when this PR will be merged ?