mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 01:00:50 +01:00
[poincare] Clean Expression and Layout builders
Before: Opposite(Opposite(Rational(1))) misleadingly created the expression "-1"; now, Opposite::Builder(Opposite::Builder(Rational(1))) creates "--1"
This commit is contained in:
committed by
LeaNumworks
parent
b3d15d7e7f
commit
ac6f23684d
@@ -105,7 +105,7 @@ Expression Function::replaceSymbolWithExpression(const SymbolAbstract & symbol,
|
||||
value = value.replaceSymbolWithExpression(xSymbol, xValue);
|
||||
Expression p = parent();
|
||||
if (!p.isUninitialized() && p.node()->childNeedsParenthesis(value.node())) {
|
||||
value = Parenthesis(value);
|
||||
value = Parenthesis::Builder(value);
|
||||
}
|
||||
replaceWithInPlace(value);
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user