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

Function tokenLexer

static/editor.md/lib/codemirror/mode/vbscript/vbscript.js:285–305  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

283
284
285 function tokenLexer(stream, state) {
286 var style = state.tokenize(stream, state);
287 var current = stream.current();
288
289 // Handle '.' connected identifiers
290 if (current === '.') {
291 style = state.tokenize(stream, state);
292
293 current = stream.current();
294 if (style && (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword')){//|| knownWords.indexOf(current.substring(1)) > -1) {
295 if (style === 'builtin' || style === 'keyword') style='variable';
296 if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2';
297
298 return style;
299 } else {
300 return ERRORCLASS;
301 }
302 }
303
304 return style;
305 }
306
307 var external = {
308 electricChars:"dDpPtTfFeE ",

Callers 1

vbscript.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected