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

Add postfix increment/decrement operator #16

Open
LefterisJP opened this issue Feb 6, 2017 · 0 comments
Open

Add postfix increment/decrement operator #16

LefterisJP opened this issue Feb 6, 2017 · 0 comments

Comments

@LefterisJP
Copy link
Contributor

LefterisJP commented Feb 6, 2017

At the moment we only have a syntactic prefix increment and decrement operator ++ and -- which acts like a postfix operator.
Think on whether we also want the postfix one and if yes then properly implement the different behaviour in the backend too.

Remember that the rule is:

  • Postfix operator evaluates the value of the expression prior to incrementing or decrementing
  • Prefix operator evaluates the value of the expression after incrementing or decrementing.

At the moment in the backend we simply increment or decrement one to the expression's value after it has been evaluated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant