CrossGL / crosstl

Translates native shader languages into CrossGL universal shader language and vice versa.
https://crossgl.net
Apache License 2.0
36 stars 39 forks source link

TODO tasks for directx backend #175

Open samthakur587 opened 1 month ago

samthakur587 commented 1 month ago

Task: Add Support for Additional Operators and Keywords in the DirectX Backend

This task is focused on extending the functionality of the DirectX backend by adding support for several new tokens. These tokens must be added to the lexer.py, properly parsed in parser.py, and correctly translated in directxtocrossglcodegen.py to ensure full compatibility within the CrossTL ecosystem.

  1. Update lexer.py:

    Add new operators and keywords for each task as given .

  2. Update parser.py:

    Modify the parser to ensure that the new tokens are recognized and processed accurately.

  3. Update directxtocrossglcodegen.py:

    Ensure that these tokens are properly translated from HLSL to CrossGL. Extend the logic for code generation to handle these new operators and keywords in DirectX shader code.

  4. Add Bitwise Operators:

    • Purpose: Handle bitwise operations.
    • Tokens to Add:
      • [ ] #178
      • [x] #179
      • [x] #180
      • [x] #181
      • [ ] #182
  5. Add Logical Operators:

    • Purpose: Handle logical operations.
    • Tokens to Add:
      • [ ] #183
      • [ ] #184
  6. Add Assignment Operators for Bitwise Operations:

    • Purpose: Handle bitwise assignment operations.
    • Tokens to Add:
    • [x] #185
    • [x] #186
    • [x] #187
  7. Add Scalar Types (half, double):

    • Purpose: Support scalar types in HLSL.
    • Tokens to Add:
    • [ ] #188
    • [ ] #189
  8. Add static Keyword:

    • Purpose: Handle the static keyword for defining static variables.
    • Token to Add:
      • [ ] #190
  9. Add control flow statement Keyword:

    • Purpose: Handle the all control flow statements
      • [x] #191
      • [x] #192
      • [ ] #193
  10. Add pre processor Keyword:

    • Purpose: Handle the pre processor in hlsl
      • [ ] #194
      • [ ] #195
      • [ ] #196
      • [ ] #197

This task is created for Hacktoberfest to welcome contributors to improve the project’s functionality by supporting these new tokens. Contributors should follow the contributing guidelines provided in the repository.

for and query feel free to ask on our discord server we will be happy to help you out 😄

We welcome contributions and encourage developers of all levels to participate!

Cheers! 🎉 Good luck with CrossTL and Hacktoberfest! If you need further assistance, feel free to ask anytime. Happy coding!

AxelB1011 commented 1 month ago

Can I take this one please?