Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup ECE - Evaluate LocalVariableDeclarationStatement #6

Merged
merged 8 commits into from
Oct 3, 2023
Merged

Conversation

xyliew25
Copy link
Contributor

@xyliew25 xyliew25 commented Sep 20, 2023

Most of the ECE logic is referenced from js-slang.

Due to the limitation of the java-parser library used, expressions such as 1 + 2 * 3 are not parsed with the appropriate precedence of multiplicative operations over additive operations. Hence, some post-processing is done to encode the appropriate precedence. As a result, both types of expression such as 1 + 2 * 3 and 1 + (2 * 3) are evaluated correctly.

@xyliew25 xyliew25 marked this pull request as draft September 20, 2023 14:46
@xyliew25 xyliew25 self-assigned this Sep 20, 2023
@xyliew25 xyliew25 marked this pull request as ready for review September 22, 2023 17:25
@xyliew25 xyliew25 requested review from 1001mei and bryanlohxz and removed request for 1001mei September 22, 2023 17:26
Copy link
Contributor

@1001mei 1001mei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to ast looks good to me.

@xyliew25 xyliew25 merged commit 07616a1 into main Oct 3, 2023
@xyliew25 xyliew25 deleted the ece branch January 1, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants