MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / tokenString

Function tokenString

static/libs/javascript.js:137–151  ·  view source on GitHub ↗
(quote)

Source from the content-addressed store, hash-verified

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

Callers 1

tokenBaseFunction · 0.85

Calls 1

retFunction · 0.85

Tested by

no test coverage detected