Skip to content

Commit

Permalink
Merge pull request #224 from uklimaschewski/custom_alpha_operator_fun…
Browse files Browse the repository at this point in the history
…ction_preference

Custom alpha operator precedes function recognition
  • Loading branch information
uklimaschewski authored Sep 8, 2019
2 parents 8845640 + ee4f303 commit abf8970
Show file tree
Hide file tree
Showing 2 changed files with 328 additions and 307 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/udojava/evalex/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ && isHexDigit(
}
pos--;
}
if (ch == '(') {
token.type = TokenType.FUNCTION;
} else if (operators.containsKey(token.surface)) {
if (operators.containsKey(token.surface)) {
token.type = TokenType.OPERATOR;
} else if (ch == '(') {
token.type = TokenType.FUNCTION;
} else {
token.type = TokenType.VARIABLE;
}
Expand Down
Loading

0 comments on commit abf8970

Please sign in to comment.