-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Parsing some expressions with canonical : ["InvisibleOperator"] can remove items that shouldn't be removed. For example,
- parsing the expression
1(2+3)withcanonical : ["InvisibleOperator"]drops the 1 (it shouldn't) - parsing the expression
1(2+3)withcanonical: falsedoesn't
Steps to Reproduce
Load the ComputeEngine and parse the expression 1(2+3).
const ce = new ComputeEngine();
expression = "1(1+1)";
ce.parse(expression , { canonical: ["InvisibleOperator"] }).print();Actual Result
Gives an oversimplified MathJSON like so
["Delimiter",["Add",2,3]]
Expected Result
A less simplified MathJSON object like the one found with canonical: false.
["Multiply",1,["Delimiter",["Add",2,3]]]
Environment
Compute Engine version 0.26.4
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working