silentmatt / expr-eval

Mathematical expression evaluator in JavaScript
http://silentmatt.com/javascript-expression-evaluator/
MIT License
1.19k stars 239 forks source link

Add variable assignment #199

Closed eliot-akira closed 5 years ago

eliot-akira commented 5 years ago

This adds a variable assignment operator = as per #65.

It passes all existing tests, as well as a few more I added to confirm basic functioning.

Some of points you raised in the issue are not addressed:

silentmatt commented 5 years ago

Thanks for contributing this! I have a couple small changes to allow chaining (e.g. x = y = z+1), but for the most part this looks good.