()
| 101 | } |
| 102 | |
| 103 | public Number getNumber() { |
| 104 | eatws(); |
| 105 | int start = pos; |
| 106 | boolean flt = false; |
| 107 | |
| 108 | while (pos < end) { |
| 109 | char ch = val.charAt(pos); |
| 110 | if ((ch >= '0' && ch <= '9') || ch == '+' || ch == '-') { |
| 111 | pos++; |
| 112 | } else if (ch == '.' || ch == 'e' || ch == 'E') { |
| 113 | flt = true; |
| 114 | pos++; |
| 115 | } else { |
| 116 | break; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | String v = val.substring(start, pos); |
| 121 | if (flt) { |
| 122 | return Double.parseDouble(v); |
| 123 | } else { |
| 124 | return Long.parseLong(v); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | public double getDouble() { |
| 129 | eatws(); |
no test coverage detected