From 8f662fb152dca30e38e01870f439b74936a995f3 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Mon, 25 Oct 2021 13:40:48 -0700 Subject: [PATCH] Fix expr parser treating - and / as commutative --- lib/common/expression-parser.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/common/expression-parser.ts b/lib/common/expression-parser.ts index 5ce675a..ea6b294 100644 --- a/lib/common/expression-parser.ts +++ b/lib/common/expression-parser.ts @@ -87,8 +87,6 @@ function binaryLeft( rest.reduce((acc, ch) => { const [op, another] = ch; if (Array.isArray(acc) && op === acc[0]) return acc.concat([another]); - if (Array.isArray(another) && op === another[0]) - return [op, acc].concat(another.slice(1)); return [op, acc, another]; }, first) );