8fd5c6a1be
* develop: (22 commits) components-lint respects components prettierignore format main.css and prettierignore base.css scoped tailwind preflight, top-level .squiggle wrapper grammar: identifiers with modules Refactored reducerInterface files Added simple scientific units Added stdev to table of stats, when needed Added stdev and variance to Distribution Operation Constructors Quick addition of stdev-variance-min-max-mode ⬆️ Bump @types/node from 17.0.38 to 17.0.40 ⬆️ Bump webpack from 5.72.1 to 5.73.0 ⬆️ Bump @storybook/react from 6.5.6 to 6.5.7 ⬆️ Bump ts-node from 10.8.0 to 10.8.1 ⬆️ Bump @storybook/builder-webpack5 from 6.5.6 to 6.5.7 ⬆️ Bump peggy from 2.0.0 to 2.0.1 ⬆️ Bump @storybook/addon-essentials from 6.5.6 to 6.5.7 ⬆️ Bump @storybook/preset-create-react-app from 4.1.1 to 4.1.2 ⬆️ Bump @hookform/resolvers from 2.8.10 to 2.9.0 ⬆️ Bump typescript from 4.7.2 to 4.7.3 ⬆️ Bump @storybook/manager-webpack5 from 6.5.6 to 6.5.7 ... |
||
---|---|---|
.. | ||
Reducer_Dispatch | ||
Reducer_Expression | ||
Reducer_Extra | ||
Reducer_Js | ||
Reducer_MathJs | ||
Reducer_Peggy | ||
README.md | ||
Reducer_ErrorValue.res | ||
Reducer.res | ||
Reducer.resi |
To interface your library there only 2 files to be modified:
-
Reducer/ReducerInterface/ReducerInterface_ExpressionValue.res
This is where your additional types are referred for the dispatcher.
-
Reducer/ReducerInterface/ReducerInterface_ExternalLibrary.res
This is where dispatching to your library is done. If the dispatcher becomes beastly then feel free to divide it into submodules.
The Reducer is built to use different external libraries as well as different external parsers. Both external parsers and external libraries are plugins.
And finally try using Reducer.eval to how your extentions look:
test("1+2", () => expectEvalToBe( "1+2", "Ok(3)"))