MCPcopy
hub / github.com/golang/protobuf / skipWhitespace

Method skipWhitespace

proto/text_decode.go:541–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

539}
540
541func (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
565func (p *textParser) advance() {
566 // Skip whitespace

Callers 2

advanceMethod · 0.95
nextMethod · 0.95

Calls 1

isWhitespaceFunction · 0.85

Tested by

no test coverage detected