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

Function readToken

lib/web/CodeMirror/src/line/highlight.js:160–167  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

158}
159
160function readToken(mode, stream, state, inner) {
161 for (let i = 0; i < 10; i++) {
162 if (inner) inner[0] = innerMode(mode, state).mode
163 let style = mode.token(stream, state)
164 if (stream.pos > stream.start) return style
165 }
166 throw new Error("Mode " + mode.name + " failed to advance stream.")
167}
168
169class Token {
170 constructor(stream, type, state) {

Callers 3

processLineFunction · 0.70
takeTokenFunction · 0.70
runModeFunction · 0.70

Calls 1

innerModeFunction · 0.90

Tested by

no test coverage detected