[poincare/parser] Add context

This commit is contained in:
Léa Saviot
2020-01-16 11:13:22 +01:00
parent 158a45e94d
commit 756eeeb2d8
38 changed files with 182 additions and 156 deletions

View File

@@ -78,7 +78,7 @@ ExpiringPointer<Calculation> CalculationStore::push(const char * text, Context *
* want to keep Ans symbol in the calculation store. */
const char * inputSerialization = nextSerializationLocation;
{
Expression input = Expression::Parse(text).replaceSymbolWithExpression(Symbol::Ans(), ans);
Expression input = Expression::Parse(text, context).replaceSymbolWithExpression(Symbol::Ans(), ans);
if (!serializeExpression(input, nextSerializationLocation, &newCalculationsLocation)) {
/* If the input does not fit in the store (event if the current
* calculation is the only calculation), just replace the calculation with