MCPcopy
hub / github.com/tomnomnom/gron / acceptUntil

Method acceptUntil

ungron.go:152–159  ·  view source on GitHub ↗

acceptUntil accepts runes until it hits a delimiter rune contained in the provided string

(delims string)

Source from the content-addressed store, hash-verified

150// acceptUntil accepts runes until it hits a delimiter
151// rune contained in the provided string
152func (l *lexer) acceptUntil(delims string) {
153 for !strings.ContainsRune(delims, l.next()) {
154 if l.cur == utf8.RuneError {
155 return
156 }
157 }
158 l.backup()
159}
160
161// acceptUntilUnescaped accepts runes until it hits a delimiter
162// rune contained in the provided string, unless that rune was

Callers 1

lexValueFunction · 0.80

Calls 2

nextMethod · 0.95
backupMethod · 0.95

Tested by

no test coverage detected