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

Function readToken

static/mergely/lib/codemirror.js:6761–6768  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

6759 }
6760
6761 function readToken(mode, stream, state, inner) {
6762 for (var i = 0; i < 10; i++) {
6763 if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;
6764 var style = mode.token(stream, state);
6765 if (stream.pos > stream.start) return style;
6766 }
6767 throw new Error("Mode " + mode.name + " failed to advance stream.");
6768 }
6769
6770 // Utility for getTokenAt and getLineTokens
6771 function takeToken(cm, pos, precise, asArray) {

Callers 3

takeTokenFunction · 0.70
runModeFunction · 0.70
processLineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected