()
| 539 | } |
| 540 | |
| 541 | func (p *textParser) skipWhitespace() { |
| 542 | i := 0 |
| 543 | for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { |
| 544 | if p.s[i] == '#' { |
| 545 | // comment; skip to end of line or input |
| 546 | for i < len(p.s) && p.s[i] != '\n' { |
| 547 | i++ |
| 548 | } |
| 549 | if i == len(p.s) { |
| 550 | break |
| 551 | } |
| 552 | } |
| 553 | if p.s[i] == '\n' { |
| 554 | p.line++ |
| 555 | } |
| 556 | i++ |
| 557 | } |
| 558 | p.offset += i |
| 559 | p.s = p.s[i:len(p.s)] |
| 560 | if len(p.s) == 0 { |
| 561 | p.done = true |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | func (p *textParser) advance() { |
| 566 | // Skip whitespace |
no test coverage detected