MCPcopy Create free account
hub / github.com/adhocteam/pushup / sync

Method sync

parser.go:664–670  ·  view source on GitHub ↗

sync synchronizes the global offset position in the main Pushup parser with the Go code scanner.

()

Source from the content-addressed store, hash-verified

662// sync synchronizes the global offset position in the main Pushup parser with
663// the Go code scanner.
664func (p *codeParser) sync() goToken {
665 t := p.peek()
666 // the Go scanner skips over whitespace so we need to be careful about the
667 // logic for advancing the main parser internal source offset.
668 p.parser.offset = p.tokenOffset(t) + len(t.String())
669 return t
670}
671
672// advance consumes the lookahead token (which should be accessed via p.peek())
673func (p *codeParser) advance() {

Callers 2

advanceMethod · 0.95

Calls 3

peekMethod · 0.95
tokenOffsetMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected