diff options
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r-- | src/NXP/Classes/Calculator.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php index 253e70c..1ceac84 100644 --- a/src/NXP/Classes/Calculator.php +++ b/src/NXP/Classes/Calculator.php @@ -13,13 +13,14 @@ namespace NXP\Classes; use NXP\Classes\Token\InterfaceOperator; use NXP\Classes\Token\TokenFunction; use NXP\Classes\Token\TokenNumber; -use NXP\Classes\Token\TokenString; +use NXP\Classes\Token\TokenStringSingleQuoted; +use NXP\Classes\Token\TokenStringDoubleQuoted; use NXP\Classes\Token\TokenVariable; use NXP\Exception\IncorrectExpressionException; use NXP\Exception\UnknownVariableException; /** - * @author Alexander Kiryukhin <alexander@symdev.org> + * @author Alexander Kiryukhin <a.kiryukhin@mail.ru> */ class Calculator { @@ -38,7 +39,10 @@ class Calculator if ($token instanceof TokenNumber) { array_push($stack, $token); } - if ($token instanceof TokenString) { + if ($token instanceof TokenStringDoubleQuoted) { + array_push($stack, $token); + } + if ($token instanceof TokenStringSingleQuoted) { array_push($stack, $token); } if ($token instanceof TokenVariable) { |