-
Notifications
You must be signed in to change notification settings - Fork 86
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
Assignment tokens #90
Conversation
…nment_tokens update
… into assignment_tokens merging
… modulus and modulus to the translator frontend. closes CrossGL#48,CrossGL#50,CrossGL#51,CrossGL#52,CrossGL#53
for more information, see https://pre-commit.ci
… into assignment_tokens merging
Hi @Proxihox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hii @Proxihox you only added the tests where is actual changes for the translator laxer . can you please add those also.
Hi @samthakur587 , I mentioned a sidenote at the end of my PR. Lines 48,49,50,55 and 56 of 'lexer.py' already have the code from my previous PR. I'll try to avoid such confusions from happening next time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hii @Proxihox yeah only tests are needed the tokens are already there . your tests are generating correct tokens . thanks for adding the tests .
everything LGTM 🚀
PR Description
Added Assignment and, assignment or, assignment xor, xor , assignemnt modulus and modulus to the translator frontend.
Also wrote a test function for the lexer for most of the operators and assignment operators.
Related Issue
closes #48
closes #50
closes #51
closes #52
closes #53
shader Sample
"""
int a = 1;
a += 1;
a *= 2;
a /= a;
a -= -1;
a %= 2;
a &= 1;
a |= 1;
a ^= 1;
"""
Side note: I must have mistakenly included the changes in 'translator/lexer.py' in my previous pull request so its not showing up as a change here.