Created
June 9, 2019 09:28
-
-
Save RotBolt/c83c58278a4ab25836311fa357e1957f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (operator in Operators.values()) { | |
var position = expression.reversed().lastIndexOf(operator.sign) | |
while (position > 0) { | |
if (isOperator(operator, expression, position)) { | |
... | |
... | |
} | |
// check again for same operator till the previous position | |
if (position > 0) { | |
position = expression.substring(0,position). | |
reversed().lastIndexOf(operator.sign) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment