From 7c574980b7193cb3f4011966897b7517f00aad4e Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Wed, 30 Mar 2022 13:26:38 +0200 Subject: [PATCH] PR#107 --- .../Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res index e7a7d805..5b16fb54 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res @@ -18,7 +18,7 @@ let rec fromNode = (mathJsNode: Parse.node): result => ) ) - let caseFunctionNode = fNode => { + let castFunctionNode = fNode => { let fn = fNode["fn"]->ExpressionValue.EvSymbol->ExtressionT.EValue let lispArgs = fNode["args"]->Belt.List.fromArray->fromNodeList lispArgs->Result.map(argsCode => list{fn, ...argsCode}->ExtressionT.EList) @@ -75,8 +75,8 @@ let rec fromNode = (mathJsNode: Parse.node): result => aNode["items"]->Belt.List.fromArray->fromNodeList->Result.map(list => ExtressionT.EList(list)) | MjConstantNode(cNode) => cNode["value"]->JavaScript.Gate.jsToEv->Result.map(v => v->ExtressionT.EValue) - | MjFunctionNode(fNode) => fNode->caseFunctionNode - | MjOperatorNode(opNode) => opNode->Parse.castOperatorNodeToFunctionNode->caseFunctionNode + | MjFunctionNode(fNode) => fNode->castFunctionNode + | MjOperatorNode(opNode) => opNode->Parse.castOperatorNodeToFunctionNode->castFunctionNode | MjParenthesisNode(pNode) => pNode["content"]->fromNode | MjAccessorNode(aNode) => caseAccessorNode(aNode["object"], aNode["index"]) | MjObjectNode(oNode) => caseObjectNode(oNode)