6utt3rfly / jse-eval

Javascript Expression Evaluator
MIT License
22 stars 7 forks source link

add jsep Compound expression support #50

Closed 6utt3rfly closed 2 years ago

6utt3rfly commented 2 years ago

adds compound expression support, which allows expressions like: a = 1; b = a; c = a + b;

Note, however, that JSEP does not support further expressions (i.e. arr.map(v => { const x = 1; return x + 1; }), where const and return are unknown syntax to JSEP).

Multiple non-assignment expressions would not make much sense: a + 1; b + 2;, which would simply return the final result. Therefore, I'm thinking it likely makes the most sense only with assignment operations.

Fixes #49

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: