mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 23:30:37 +01:00
[poincare] Un-inline Symbol and Function UntypedBuilder
This commit is contained in:
committed by
LeaNumworks
parent
24c9617a89
commit
8ca4094e13
@@ -100,6 +100,16 @@ Function Function::Builder(const char * name, size_t length, Expression child) {
|
||||
return f;
|
||||
}
|
||||
|
||||
Expression Function::UntypedBuilder(const char * name, size_t length, Expression child, Context * context) {
|
||||
/* Create an expression only if it is not in the context or defined as a
|
||||
* function */
|
||||
Function f = Function::Builder(name, length, child);
|
||||
if (SymbolAbstract::ValidInContext(f, context)) {
|
||||
return f;
|
||||
}
|
||||
return Expression();
|
||||
}
|
||||
|
||||
Expression Function::replaceSymbolWithExpression(const SymbolAbstract & symbol, const Expression & expression) {
|
||||
// Replace the symbol in the child
|
||||
childAtIndex(0).replaceSymbolWithExpression(symbol, expression);
|
||||
|
||||
Reference in New Issue
Block a user