Skip to content

Commit

Permalink
Fixed order swapping
Browse files Browse the repository at this point in the history
  • Loading branch information
AjaniBilby committed Mar 24, 2024
1 parent 99af111 commit d72e96d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/compiler/codegen/expression/precedence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ export function ApplyPrecedence(syntax: Term_Expr) {
// (1 + 2) * 3 -> (2 * 3) + 1
root = {
type: "infix",
lhs: {
lhs: root.lhs,
op: root.op,
rhs: {
type: "infix",
lhs: root.rhs,
op,
rhs: arg,
ref: ReferenceRange.union(root.ref, arg.ref)
},
op: root.op,
rhs: root.lhs,
ref: ReferenceRange.union(arg.ref, arg.ref)
}
} else {
Expand Down

0 comments on commit d72e96d

Please sign in to comment.