MCPcopy Create free account
hub / github.com/breck7/scroll / readToken

Function readToken

external/.scrollLibs.js:2618–2629  ·  view source on GitHub ↗
(mode, stream, state, inner)

Source from the content-addressed store, hash-verified

2616 }
2617
2618 function readToken(mode, stream, state, inner) {
2619 for (var i = 0; i < 10; i++) {
2620 if (inner) {
2621 inner[0] = innerMode(mode, state).mode
2622 }
2623 var style = mode.token(stream, state)
2624 if (stream.pos > stream.start) {
2625 return style
2626 }
2627 }
2628 throw new Error("Mode " + mode.name + " failed to advance stream.")
2629 }
2630
2631 var Token = function (stream, type, state) {
2632 this.start = stream.start

Callers 3

processLineFunction · 0.85
takeTokenFunction · 0.85
runModeFunction · 0.85

Calls 2

innerModeFunction · 0.85
tokenMethod · 0.80

Tested by

no test coverage detected