mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Revert "[poincare/expression] deepBeautify bubbles up Undefined children"
This reverts commit 300399fe4d.
Not necessary anymore to bubble up Undefined children in deepBeautify
since Unit::shallowBeautify does not introduce any Undefined Expression.
This commit is contained in:
committed by
Émilie Feral
parent
01b94f8543
commit
651b705dbd
@@ -825,12 +825,6 @@ Expression Expression::deepBeautify(ExpressionNode::ReductionContext reductionCo
|
||||
for (int i = 0; i < nbChildren; i++) {
|
||||
Expression child = e.childAtIndex(i);
|
||||
child = child.deepBeautify(reductionContext);
|
||||
/* Unit::shallowBeautify replaces units in inhomogeneous Expression by
|
||||
* Undefined. Undefined children must be bubbled up to the root.
|
||||
*/
|
||||
if (child.type() == ExpressionNode::Type::Undefined) {
|
||||
return e.replaceWithUndefinedInPlace();
|
||||
}
|
||||
// We add missing Parentheses after beautifying the parent and child
|
||||
if (e.node()->childAtIndexNeedsUserParentheses(child, i)) {
|
||||
e.replaceChildAtIndexInPlace(i, Parenthesis::Builder(child));
|
||||
|
||||
Reference in New Issue
Block a user