Fix expr parser treating - and / as commutative

This commit is contained in:
Zaid Abdulla committed 2021-10-25 13:40:48 -07:00
1 parent dd722ba6e0
commit 8f662fb152
1 file changed
-2
-2
View File
@@ -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)
);