MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / eat

Method eat

lib/web/CodeMirror/src/util/StringStream.js:25–31  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

23 return this.string.charAt(this.pos++)
24 }
25 eat(match) {
26 let ch = this.string.charAt(this.pos)
27 let ok
28 if (typeof match == "string") ok = ch == match
29 else ok = ch && (match.test ? match.test(ch) : match(ch))
30 if (ok) {++this.pos; return ch}
31 }
32 eatWhile(match) {
33 let start = this.pos
34 while (this.eat(match)){}

Callers 15

eatWhileMethod · 0.95
VimFunction · 0.95
parseArgsFunction · 0.95
acorn.jsFile · 0.80
acorn_loose.jsFile · 0.80
def.jsFile · 0.80
beginParamsFunction · 0.80
inStringFunction · 0.80
inVariableFunction · 0.80
inTagFunction · 0.80
dart.jsFile · 0.80
tokenStringFunction · 0.80

Calls 2

matchFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected