(x float64)
| 213 | } |
| 214 | |
| 215 | func (s *scanner) readHexNumber(x float64) (n float64, c rune, i int) { |
| 216 | if c, n = s.current, x; !isHexadecimal(c) { |
| 217 | return |
| 218 | } |
| 219 | for { |
| 220 | switch { |
| 221 | case '0' <= c && c <= '9': |
| 222 | c = c - '0' |
| 223 | case 'a' <= c && c <= 'f': |
| 224 | c = c - 'a' + 10 |
| 225 | case 'A' <= c && c <= 'F': |
| 226 | c = c - 'A' + 10 |
| 227 | default: |
| 228 | return |
| 229 | } |
| 230 | s.advance() |
| 231 | c, n, i = s.current, n*16.0+float64(c), i+1 |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func (s *scanner) readNumber() token { |
| 236 | const bits64, base10 = 64, 10 |
no test coverage detected