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

Function tokenString

lib/web/CodeMirror/mode/javascript/javascript.js:136–150  ·  view source on GitHub ↗
(quote)

Source from the content-addressed store, hash-verified

134 }
135
136 function tokenString(quote) {
137 return function(stream, state) {
138 var escaped = false, next;
139 if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
140 state.tokenize = tokenBase;
141 return ret("jsonld-keyword", "meta");
142 }
143 while ((next = stream.next()) != null) {
144 if (next == quote && !escaped) break;
145 escaped = !escaped && next == "\\";
146 }
147 if (!escaped) state.tokenize = tokenBase;
148 return ret("string", "string");
149 };
150 }
151
152 function tokenComment(stream, state) {
153 var maybeEnd = false, ch;

Callers 1

tokenBaseFunction · 0.70

Calls 4

retFunction · 0.70
nextMethod · 0.65
peekMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected