MCPcopy
hub / github.com/pandao/editor.md / tokenDollar

Function tokenDollar

lib/codemirror/mode/shell/shell.js:107–121  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

105 };
106
107 var tokenDollar = function(stream, state) {
108 if (state.tokens.length > 1) stream.eat('$');
109 var ch = stream.next(), hungry = /\w/;
110 if (ch === '{') hungry = /[^}]/;
111 if (ch === '(') {
112 state.tokens[0] = tokenString(')');
113 return tokenize(stream, state);
114 }
115 if (!/\d/.test(ch)) {
116 stream.eatWhile(hungry);
117 stream.eat('}');
118 }
119 state.tokens.shift();
120 return 'def';
121 };
122
123 function tokenize(stream, state) {
124 return (state.tokens[0] || tokenBase) (stream, state);

Callers

nothing calls this directly

Calls 2

tokenStringFunction · 0.70
tokenizeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…