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

Fix: For issue #88 #165

Open adityanarayanan343 opened 1 month ago

adityanarayanan343 commented 1 month ago

PR Description

This pull request is to fix the issue of updating the parser to handle the LBRACKET and RBRACKET tokens, allowing it to parse array indexing operations correctly.

Related Issue

Close #88 PS: I don't know how to write test case for this so kindly please help me with it thanks :)

samthakur587 commented 1 month ago

hii @adityanarayanan343 can you please add tests also for this .

adityanarayanan343 commented 1 month ago

Yaa @samthakur587 i will...

samthakur587 commented 1 month ago

hii @adityanarayanan343 thanks for the PR . for the test cases you have to write the unit test at file tests/ test_translator/test_lexer.py and parser.py . you can write any example which contain the array indexing or LBRACKET and RBRACKET tokens.

adityanarayanan343 commented 1 month ago

Yes i will write it asap pls give me some time @samthakur587

adityanarayanan343 commented 1 month ago

Hey @samthakur587 I think i have fixed the issue here please do check and inform me if there is any problem in the fix and also I have written the test cases too you can check it

Thanks Aditya