(l *lexer)
| 421 | } |
| 422 | |
| 423 | func eatNumber(l *lexer) bool { |
| 424 | if l.hasPrefix("-") { |
| 425 | l.pos++ |
| 426 | } |
| 427 | |
| 428 | n1 := l.accept(numbers) |
| 429 | n2 := 0 |
| 430 | |
| 431 | p := l.next() |
| 432 | if p == dot { |
| 433 | n2 = l.accept(numbers) |
| 434 | if n2 == 0 { |
| 435 | return false |
| 436 | } |
| 437 | } else { |
| 438 | l.rewind() |
| 439 | } |
| 440 | |
| 441 | return n1+n2 > 0 |
| 442 | } |
| 443 | |
| 444 | func eatString(l *lexer) bool { |
| 445 | delim := l.next() |
no test coverage detected