MCPcopy Create free account
hub / github.com/gobwas/httphead / fetchComment

Method fetchComment

lexer.go:218–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216}
217
218func (l *Scanner) fetchComment() (ok bool) {
219 l.pos++
220
221 n := ScanPairGreedy(l.data[l.pos:], '(', ')')
222 if n == -1 {
223 l.err = true
224 return false
225 }
226
227 l.itemType = ItemComment
228 l.itemBytes = RemoveByte(l.data[l.pos:l.pos+n], '\\')
229 l.pos += n + 1
230
231 return true
232}
233
234// ScanUntil scans for first non-escaped character c in given data.
235// It returns index of matched c and -1 if c is not found.

Callers 2

NextMethod · 0.95

Calls 2

ScanPairGreedyFunction · 0.85
RemoveByteFunction · 0.85

Tested by 1