Crate dc_ock

Source

Structs§

EvaluationError

Enums§

CalcType
enum CalcType is a type containing operations used in the calculator.

Functions§

eval
eval takes a &str and a &mut VecDeque<f64>, evaluates the expression, and prints the result, pushing the results onto the stack of type VecDeque provided as a parameter.
safe_eval
safe_eval takes a &str evaluates the expression, returning the resulting stack as a Result if the expression is valid, or an Err if the expression is invalid or otherwise cannot be evaluated.
safe_eval_with_stack
safe_eval_with_stack takes an &str expression, and a stack VecDeque<f64>, and evaluates the expression, returning the resulting stack as a Result if the if the expression is valid, or an Err if the expression is invalid or otherwise cannot be evaluated.
str_to_calc_type
str_to_calc_type converts a string to an optional CalcType.