calculateResult

Calculates the expression and returns its result.

Return

the result of the expression

Throws

if an expression variable doesn't have an associated value

if an operator or function doesn't have enough operands to get applied

if an unknown token is found in the expression during calculating