(l *lexer, delim byte)
| 453 | } |
| 454 | |
| 455 | func eatDelimStr(l *lexer, delim byte) bool { |
| 456 | first := l.next() |
| 457 | if first != delim { |
| 458 | l.rewind() |
| 459 | return false |
| 460 | } |
| 461 | |
| 462 | for { |
| 463 | c := l.next() |
| 464 | |
| 465 | if c == eof { |
| 466 | return false |
| 467 | } |
| 468 | |
| 469 | if c == bs { |
| 470 | _, p := l.peek(1) |
| 471 | if p[0] == delim || p[0] == bs { |
| 472 | l.next() |
| 473 | } |
| 474 | } else if c == delim { |
| 475 | _, p := l.peek(1) |
| 476 | if p[0] == delim { |
| 477 | l.next() |
| 478 | } else { |
| 479 | break |
| 480 | } |
| 481 | |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | return true |
| 486 | } |
| 487 | |
| 488 | func eatIdentifier(l *lexer) bool { |
| 489 | b := l.next() |
no test coverage detected