feat: add assignment, bit, and boolean operators#144
Merged
Wodann merged 1 commit intomun-lang:masterfrom Apr 30, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 82.04% 82.26% +0.21%
==========================================
Files 160 160
Lines 10826 11022 +196
==========================================
+ Hits 8882 9067 +185
- Misses 1944 1955 +11
Continue to review full report at Codecov.
|
baszalmstra
approved these changes
Apr 30, 2020
Collaborator
baszalmstra
left a comment
There was a problem hiding this comment.
Personally I think we should use ^ for xor.
This PR looks great! Very well done!! 👍
Collaborator
Author
|
I agree. In that case I will add |
boolean and struct assignment were added, as well as boolean and/or and bitwise and/or/xor/shiftleft/shiftright operations
2f624ad to
78c9169
Compare
Collaborator
Author
|
I've added the bitwise xor operator as well as the left-shift and right-shift operators. For scrutiny, could you please check the changed files @baszalmstra ? |
Collaborator
|
Still looks good to me! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds:
boolassignment operatorstructassignment operator (both forstruct(value)andstruct(gc))booland/or (a && b || c)bool(a | b & c,a |= b,a &= b)a >> b,a << b,a >>= b,a <<= b)Tasks that were not done yet, but should be in a future PR:
Diagnostic[discussion]
Do we want to use theWe've decided to use the^sign for bitwise xor or the power operator?^sign for bitwise xor