We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Found a bug while trying to print an index access node in the AST. source code: myArray[idx] Expected: myArray[idx] Actual: idx[myArray]
myArray[idx]
idx[myArray]
I think that the (i *IndexAccess) Parse method has a bug where the index and base expressions are swapped.
(i *IndexAccess) Parse
Currently:
i.IndexExpression
ctx.Expression(0)
i.BaseExpression
ctx.Expression(1)
Should be:
The text was updated successfully, but these errors were encountered:
On a side note, I can't seem to label the issue due to lack of permissions 🫡
Sorry, something went wrong.
Wow missed this one out. Thank you! Going to fix it tomorrow
Alright @xianlinc it's resolved! Merging in soon the fix into the main. Thanks again for finding this out!
[Bugfix #190] AST Index Access Expression Swap (#191)
67d0fab
0x19
Successfully merging a pull request may close this issue.
Context
Found a bug while trying to print an index access node in the AST.
source code:
myArray[idx]
Expected:
myArray[idx]
Actual:
idx[myArray]
Problem
I think that the
(i *IndexAccess) Parse
method has a bug where the index and base expressions are swapped.Currently:
i.IndexExpression
->ctx.Expression(0)
i.BaseExpression
->ctx.Expression(1)
Should be:
i.IndexExpression
->ctx.Expression(1)
i.BaseExpression
->ctx.Expression(0)
The text was updated successfully, but these errors were encountered: