Skip to content

Commit

Permalink
more elaborate check for : range versus ternary ?:
Browse files Browse the repository at this point in the history
  • Loading branch information
spennihana committed Aug 6, 2014
1 parent 67d2d3b commit cd4c087
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/water/exec/Exec2.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ String isID() {
char c = _buf[_x];
// Fail on special chars in the grammar
if( isReserved(c) && c != ':') return null;
if (c == ':') {
if (!isDigit(_buf[_x+1])) return null;
}
// Fail on leading numeric
if( isDigit(c) ) return null;
if (c == '^' && _buf[_x+1] == '-') return _str.substring(++_x -1, _x);
Expand Down

0 comments on commit cd4c087

Please sign in to comment.