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

Function tokenWord

static/editor.md/lib/codemirror/mode/solr/solr.js:57–74  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

55 }
56
57 function tokenWord(ch) {
58 return function(stream, state) {
59 var word = ch;
60 while ((ch = stream.peek()) && ch.match(isStringChar) != null) {
61 word += stream.next();
62 }
63
64 state.tokenize = tokenBase;
65 if (isOperatorString.test(word))
66 return "operator";
67 else if (isNumber(word))
68 return "number";
69 else if (stream.peek() == ":")
70 return "field";
71 else
72 return "string";
73 };
74 }
75
76 function tokenBase(stream, state) {
77 var ch = stream.next();

Callers 1

tokenBaseFunction · 0.85

Calls 1

isNumberFunction · 0.70

Tested by

no test coverage detected