-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
astAbstract Syntax TreeAbstract Syntax TreebugSomething isn't workingSomething isn't workinghigh priorityHigh Priority TasksHigh Priority Tasks
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
astAbstract Syntax TreeAbstract Syntax TreebugSomething isn't workingSomething isn't workinghigh priorityHigh Priority TasksHigh Priority Tasks