expression.helper library

Functions

applyOperation(String operator, List<double> values) → void
Applies the given operator to the top two values in the values stack.
evaluateExpression(String expression) double
Evaluates an arithmetic expression and returns the result as a double.
isCharDigitOrDecimalPointOrPercentage(String s) bool
isNegativeUnaryOperator(String expression, int index) bool
isOperator(String s) bool
Returns true if s represents an arithmetic operator, false otherwise.
parseSimpleOperation(String expression) TSimpleOperation?
Parses a simple mathematical operation expression and returns a TSimpleOperation object that represents the operation.
precedence(String operator) int
Returns an integer representing the precedence level of the given operator.