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

Function tokenVariable

static/editor.md/lib/codemirror/mode/xquery/xquery.js:283–297  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

281
282 // tokenizer for variables
283 function tokenVariable(stream, state) {
284 var isVariableChar = /[\w\$_-]/;
285
286 // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote
287 if(stream.eat("\"")) {
288 while(stream.next() !== '\"'){};
289 stream.eat(":");
290 } else {
291 stream.eatWhile(isVariableChar);
292 if(!stream.match(":=", false)) stream.eat(":");
293 }
294 stream.eatWhile(isVariableChar);
295 state.tokenize = tokenBase;
296 return ret("variable", "variable");
297 }
298
299 // tokenizer for XML tags
300 function tokenTag(name, isclose) {

Callers

nothing calls this directly

Calls 1

retFunction · 0.70

Tested by

no test coverage detected