MCPcopy Create free account
hub / github.com/TruthHun/BookStack / tokenString

Function tokenString

static/editor.md/lib/codemirror/mode/julia/julia.js:221–244  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

219 var OUTCLASS = 'string';
220
221 function tokenString(stream, state) {
222 while (!stream.eol()) {
223 stream.eatWhile(/[^'"\\]/);
224 if (stream.eat('\\')) {
225 stream.next();
226 if (singleline && stream.eol()) {
227 return OUTCLASS;
228 }
229 } else if (stream.match(delimiter)) {
230 state.tokenize = tokenBase;
231 return OUTCLASS;
232 } else {
233 stream.eat(/['"]/);
234 }
235 }
236 if (singleline) {
237 if (parserConf.singleLineStringErrors) {
238 return ERRORCLASS;
239 } else {
240 state.tokenize = tokenBase;
241 }
242 }
243 return OUTCLASS;
244 }
245 tokenString.isString = true;
246 return tokenString;
247 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected