Expand description
Calculator library for evaluating freehand mathematical expressions.
The general workflow goes like this:
-
Create a
Context: a reusable type which contains expression history. -
Parse an
ast::Exprwithast::parser::ExprParser. -
Evaluate that expression with
Context::evaluate.
You can freely modify the parsed expression; the types in ast are all public.
To enable calculation based on your custom numeric type, just impl [types::Calcable] for your type.
Modules§
Structs§
- Context
- Calculation context.
Enums§
- Arithmetic
Error - Error
- Parse
Value Error - Value
- A numeric value.
- Value
Error