MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / tokenDollar

Function tokenDollar

lib/web/CodeMirror/mode/shell/shell.js:128–138  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

126 }
127
128 var tokenDollar = function(stream, state) {
129 if (state.tokens.length > 1) stream.eat('$');
130 var ch = stream.next()
131 if (/['"({]/.test(ch)) {
132 state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string");
133 return tokenize(stream, state);
134 }
135 if (!/\d/.test(ch)) stream.eatWhile(/\w/);
136 state.tokens.shift();
137 return 'def';
138 };
139
140 function tokenHeredoc(delim) {
141 return function(stream, state) {

Callers

nothing calls this directly

Calls 6

eatMethod · 0.80
eatWhileMethod · 0.80
tokenStringFunction · 0.70
tokenizeFunction · 0.70
nextMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected