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

feat: increment/decrement statements #28

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

shenyih0ng
Copy link
Owner

Description

This PR implements support for increment and decrement statements. These new statements will be treated as syntactic sugar for assignment statements, for example a++ will be parsed as a = a + 1 and b-- will be parsed as b = b - 1. As such, there is no need for extra handling of this new grammar in our Go ECE, the interpreter will see it as a Assignment statement.

There is no need for changes to the ECE since `IncDecStmt` is treated as
syntatic sugar for `Assignment`
@shenyih0ng shenyih0ng self-assigned this Apr 12, 2024
@shenyih0ng shenyih0ng merged commit 022d0ce into master Apr 12, 2024
1 check passed
@shenyih0ng shenyih0ng deleted the feat/inc-dec-stmts branch April 12, 2024 10:11
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.

1 participant