expression.helper library
Functions
-
applyOperation(
String operator, List< double> values) → void -
Applies the given
operatorto the top two values in thevaluesstack. -
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
trueifsrepresents an arithmetic operator,falseotherwise. -
parseSimpleOperation(
String expression) → TSimpleOperation? -
Parses a simple mathematical operation expression and returns a
TSimpleOperationobject that represents the operation. -
precedence(
String operator) → int -
Returns an integer representing the precedence level of
the given
operator.