-
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
Add else if to translator #32 #104
Add else if to translator #32 #104
Conversation
for more information, see https://pre-commit.ci
… 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
for more information, see https://pre-commit.ci
* feat: Implement tokens for unsigned int and double data types. * chore: Add test for data type tokenization * feat: Refactor unsigned int to uint after review and edit tests for same
for more information, see https://pre-commit.ci
…ements-to-the-translator
@samthakur587 I have created a new PR as per your advice. Please let me know if this is alright. It might be better to squash all the commits that I've made into one or just cherry pick the latest one but I'm not sure if that is okay |
hii @AxelB1011 great work so far just one last thing to fix . let's assume you have two continues can you try this example code for test your code .
|
you can take reference from this PR . i fixed this issue here . #39 |
Thank you for the feedback @samthakur587! I have used your code for reference and updated the tests. The parser seems to be working fine, unless I am missing something..?
|
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 @AxelB1011 really a great work everything LGTM 🚀
Thanks for your contribution
Assignment AND
Token at translator frontend #48,AddAssignment OR
Token at translator frontend #50,AddAssignment XOR
Token at translator frontend #51,AddAssignment Modulus
Token at translator frontend #52,AddModulus
Token at translator frontend #53PR Description
Modified the following files in the crosstl/src/translator directory:
parser.py: Updated the the parse_if_statement() function.
directx_codegen.py: Implemented else if for HLSL output.
metal_codegen.py: Implemented else if for Metal output.
opengl_codegen.py: Implemented else if for GLSL output.
test_lexer.py, test_parser.py, test_directx_codegen.py, test_metal_codegen.py, test_opengl_codegen.py: Added tests for multiple else if conditionals in test_translator and test_translator/test_codegen.
Related Issue
Closed #32
shader Sample
Checklist