MCPcopy
hub / github.com/witheve/Eve / readToken

Function readToken

src/codemirror.js:6786–6793  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

6784 }
6785
6786 function readToken(mode, stream, state, inner) {
6787 for (var i = 0; i < 10; i++) {
6788 if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;
6789 var style = mode.token(stream, state);
6790 if (stream.pos > stream.start) return style;
6791 }
6792 throw new Error("Mode " + mode.name + " failed to advance stream.");
6793 }
6794
6795 // Utility for getTokenAt and getLineTokens
6796 function takeToken(cm, pos, precise, asArray) {

Callers 3

takeTokenFunction · 0.85
runModeFunction · 0.85
processLineFunction · 0.85

Calls 1

tokenMethod · 0.80

Tested by

no test coverage detected