MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / readToken

Function readToken

static/libs/codemirror.js:1633–1640  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

1631}
1632
1633function readToken(mode, stream, state, inner) {
1634 for (var i = 0; i < 10; i++) {
1635 if (inner) { inner[0] = innerMode(mode, state).mode; }
1636 var style = mode.token(stream, state);
1637 if (stream.pos > stream.start) { return style }
1638 }
1639 throw new Error("Mode " + mode.name + " failed to advance stream.")
1640}
1641
1642var Token = function(stream, type, state) {
1643 this.start = stream.start; this.end = stream.pos;

Callers 3

processLineFunction · 0.85
takeTokenFunction · 0.85
runModeFunction · 0.85

Calls 1

innerModeFunction · 0.85

Tested by

no test coverage detected