MCPcopy Create free account
hub / github.com/TruthHun/BookStack / skipMatching

Function skipMatching

static/editor.md/lib/codemirror/addon/tern/tern.js:340–349  ·  view source on GitHub ↗
(upto)

Source from the content-addressed store, hash-verified

338 var args = [], pos = 3;
339
340 function skipMatching(upto) {
341 var depth = 0, start = pos;
342 for (;;) {
343 var next = text.charAt(pos);
344 if (upto.test(next) && !depth) return text.slice(start, pos);
345 if (/[{\[\(]/.test(next)) ++depth;
346 else if (/[}\]\)]/.test(next)) --depth;
347 ++pos;
348 }
349 }
350
351 // Parse arguments
352 if (text.charAt(pos) != ")") for (;;) {

Callers 1

parseFnTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected