6utt3rfly / jse-eval

Javascript Expression Evaluator
MIT License
22 stars 7 forks source link

Compound use case #49

Closed tvkit closed 2 years ago

tvkit commented 2 years ago

Given the Assignment plugin, I attempted to evaluate a compound expression. The ast was constructed but the evaluator didn't much care for it. I was anticipating the assigned var would be passed into the subsequent expression(s):

a = 1;
b = a;
c = a + b;

where c would evaluate to 2.

Is this something that could be supported by jse-eval or via a plugin?

Noticed the volume of work you provided here and on the related projects. 👍

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

6utt3rfly commented 2 years ago

Thanks for reporting, @tvkit ! I'm thinking that without assignment expressions, Compound support never made much sense. Hopefully this PR + release helps?

tvkit commented 2 years ago

Agreed... that without assignments, the preceding expression results are nebulous.

I tested the scenario that prompted the #49 issue. Works perfectly!