From ba4a974be9ed3535a38829438c7e33af13f38b5b Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Fri, 25 Mar 2022 17:34:27 +0100 Subject: [PATCH] fix on comments for pull request --- .../squiggle-lang/__tests__/Reducer/Reducer_test.res | 3 +-- .../Reducer/Reducer_CodeTree/Reducer_CodeTree_T.res | 2 +- .../Reducer_Extension_CodeTreeValue.res | 2 +- .../Reducer/Reducer_MathJs/Reducer_MathJs_Parse.res | 2 +- .../Reducer_MathJs/Reducer_MathJs_ToCodeTree.res | 12 ------------ 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res index 85200d27..b138938d 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res @@ -7,6 +7,7 @@ describe("reducer using mathjs parse", () => { // Reducer.parse is called by Reducer.eval // See https://mathjs.org/docs/expressions/syntax.html // See https://mathjs.org/docs/reference/functions.html + // Those tests show that we are converting mathjs parse tree to what we need describe("expressions", () => { test("1", () => expectParseToBe("1", "Ok(1)")) @@ -49,8 +50,6 @@ describe("eval", () => { // TODO more built ins }) describe("arrays", () => { - //Note. () is a empty list in Lisp - // The only builtin structure in Lisp is list test("empty array", () => expectEvalToBe( "[]", "Ok([])")) test("[1, 2, 3]", () => expectEvalToBe( "[1, 2, 3]", "Ok([1, 2, 3])")) test("['hello', 'world']", () => expectEvalToBe( "['hello', 'world']", "Ok(['hello', 'world'])")) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_CodeTree/Reducer_CodeTree_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_CodeTree/Reducer_CodeTree_T.res index 0c3303e3..16dd635b 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_CodeTree/Reducer_CodeTree_T.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_CodeTree/Reducer_CodeTree_T.res @@ -4,4 +4,4 @@ type codeTreeValue = CTV.codeTreeValue type rec codeTree = | CtList(list) // A list to map-reduce -| CtValue(codeTreeValue) // Irreducable built-in value. Reducer should not know the internals. External libraries are responsible +| CtValue(codeTreeValue) // Irreducible built-in value. Reducer should not know the internals. External libraries are responsible diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extension/Reducer_Extension_CodeTreeValue.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extension/Reducer_Extension_CodeTreeValue.res index f7c7ae92..66026dad 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extension/Reducer_Extension_CodeTreeValue.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extension/Reducer_Extension_CodeTreeValue.res @@ -1,5 +1,5 @@ /* - Irreducable values. Reducer does not know about those. Only used for external calls + Irreducible values. Reducer does not know about those. Only used for external calls This is a configuration to to make external calls of those types */ module AE = Reducer_Extra_Array diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Parse.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Parse.res index b899c202..f1097f9a 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Parse.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Parse.res @@ -8,7 +8,7 @@ module Rerr = Reducer_Error type reducerError = Rerr.reducerError -type rec node = { +type node = { "type": string, "isNode": bool, "comment": string diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToCodeTree.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToCodeTree.res index 14921ee8..815f12f6 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToCodeTree.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToCodeTree.res @@ -9,18 +9,6 @@ type codeTree = CTT.codeTree type codeTreeValue = CTV.codeTreeValue type reducerError = Rerr.reducerError -// TODO: -// AccessorNode -// AssignmentNode -// BlockNode -// ConditionalNode -// FunctionAssignmentNode -// IndexNode -// ObjectNode -// RangeNode -// RelationalNode -// SymbolNode - let rec fromNode = (mjnode: MJ.node): result => MJ.castNodeType(mjnode) -> Result.flatMap(typedMjNode => {