diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-01-21 17:48:28 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-01-21 17:48:28 +0530 |
| commit | c9075367a178644d12a179919aa07616938b7315 (patch) | |
| tree | d3ffccc2b1db372e496016caa145f00ca7b81409 /src | |
| parent | c7a137861494edd65d0c8de76ab09f422ab15481 (diff) | |
| download | css-everything-c9075367a178644d12a179919aa07616938b7315.tar.gz css-everything-c9075367a178644d12a179919aa07616938b7315.zip | |
fix: fixes nested fixity issue
Diffstat (limited to '')
| -rw-r--r-- | src/parser.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/parser.ts b/src/parser.ts index c2aa30f..81f7a9e 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -119,14 +119,10 @@ const precedence = (op: BinOp) => const binOpWithFixitySwitchity = (op: BinOp, left: Expr, right: Expr) => match(right, { BinOp: binOp => { - if (precedence(op) > precedence(binOp.op)) { + if (precedence(op) >= precedence(binOp.op)) { return Expr.BinOp({ op: binOp.op, - left: Expr.BinOp({ - op, - left: left, - right: binOp.left, - }), + left: binOpWithFixitySwitchity(op, left, binOp.left), right: binOp.right, }) } |
