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

Adding postfix expressions (++ and --) - changed evaluation order to be more human friendly (appears left to right now) #73

Merged
merged 7 commits into from
Jul 28, 2024

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Jul 28, 2024

  • Adding postfix expressions (++ and --) Fixes add ++ and -- #17
  • changed evaluation order to be more human friendly (appears left to right now)
  • remove extra () if the expression is: ident = expre e.g a = 1 + 2 instead of a = (1 + 2) before

@ldemailly ldemailly marked this pull request as draft July 28, 2024 01:40
@ldemailly ldemailly changed the title Adding postfix expressions (++ and --) - wip Adding postfix expressions (++ and --) Jul 28, 2024
@ldemailly ldemailly marked this pull request as ready for review July 28, 2024 22:03
@ldemailly
Copy link
Member Author

This not quite true postfix version won't quite work for say arr[i]++

…lly meant swapping left and right. also removed 1 level of () when outer expression is assign; so a=1+2 is a = 1 + 2 and not a = (1 + 2)
@ldemailly ldemailly changed the title Adding postfix expressions (++ and --) Adding postfix expressions (++ and --) - changed evaluation order to be more human friendly (appears left to right now) Jul 28, 2024
@ldemailly ldemailly merged commit 4c948a9 into main Jul 28, 2024
1 check passed
@ldemailly ldemailly deleted the postfix branch July 28, 2024 22:50
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.

add ++ and --
1 participant