MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / tokenString

Function tokenString

static/js/codemirror/mode/css/css.js:275–289  ·  view source on GitHub ↗
(quote, nonInclusive)

Source from the content-addressed store, hash-verified

273 }
274
275 function tokenString(quote, nonInclusive) {
276 return function(stream, state) {
277 var escaped = false, ch;
278 while ((ch = stream.next()) != null) {
279 if (ch == quote && !escaped)
280 break;
281 escaped = !escaped && ch == "\\";
282 }
283 if (!escaped) {
284 if (nonInclusive) stream.backUp(1);
285 state.tokenize = tokenBase;
286 }
287 return ret("string", "string");
288 };
289 }
290
291 function tokenParenthesized(stream, state) {
292 stream.next(); // Must be '('

Callers 2

tokenBaseFunction · 0.70
tokenParenthesizedFunction · 0.70

Calls 2

retFunction · 0.70
nextMethod · 0.45

Tested by

no test coverage detected