Closed zcappp closed 2 years ago
:tada: This issue has been resolved in version 1.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/assignment-v1.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/ternary-v1.0.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@6utt3rfly Thank you for the quick fixing! as the ternary plugin is built-in by default, I upgraded jsep core and assignment plugin to latest, ignoring ternary, it seems error still there. can you check if latest ternary is included in jsep core package?
by the way, when excecuting "yarn upgrade", there are warnings:
Workspaces can only be enabled in private projects
I guess it was caused by workspaces statement in package.json
@zclc - it looks like there are still a couple issues remaining, sorry. I've added issue #195 to figure out how we want to deal with left/right-associativity, which is ultimately the root cause of this issue. In the meantime, parentheses will help you work around the issue until we can implement a more complete solution.
Also, thanks for the note on the workspaces
warning too - that shouldn't be hard to fix 🙂
@zclc - would you like to try manually testing the PR to see if it resolves your issues?
@6utt3rfly I just reinstalled latest jsep and its plugins, the issue is still there. I am wondering if the latest packages are really built from latest source code. I saw there is v1.2.0 release, but the version on package.json is still on 1.0.2. below are all the lastest versions I got:
"@jsep-plugin/assignment": "^1.0.1",
"@jsep-plugin/comment": "^1.0.1",
"@jsep-plugin/new": "^1.0.1",
"@jsep-plugin/object": "^1.1.0",
"@jsep-plugin/regex": "^1.0.1",
"jsep": "^1.1.0",
@zclc We haven't built a new release with PR #199 (still in review). Are you able to manually use the source from that PR to try?
I tried, but I didn't get to know how to pull PR yet. by the way I also failed to build jsep locally. currenly I am using acorn instead to parse my expression, but I still like the lightweight of jsep.
:tada: This issue has been resolved in version 1.3.0-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/assignment-v1.2.0-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/ternary-v1.1.0-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
FYI @zclc - you can now use jsep@1.3.0-beta.1
, @jsep-plugin/assignment@1.2.0-beta.1
, and @jsep-plugin/object@1.2.0-beta.1
(pre-release versions)
:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/assignment-v1.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/object-v1.2.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @jsep-plugin/ternary-v1.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
among those new plugins I thirst for object plugin most, thank you to make it possible! when I register both assignment and object plugins, it make combination of assignment and ternary error out. such as
a ? log(a) : a = 1
we expect to compute testa
first and then the assignment later on:but in fact it will throw out error:
but if I group the assignment with parentheses:
a ? log(a) : (a = 1)
jsep can parse as expected.I remove the registration of assignment plugin, and add it as binaryOP:
jsep.addBinaryOp("=", 0.96)
then jsep works as expected!note: I give it precedence of 0.96 as I found assignment plugin have
jsep.addBinaryOp(':', 0.95)