MCPcopy Index your code
hub / github.com/csev/py4e / tokenString

Function tokenString

tools/pythonauto/static/codemirrorepl/python.js:169–192  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

167 var OUTCLASS = 'string';
168
169 function tokenString(stream, state) {
170 while (!stream.eol()) {
171 stream.eatWhile(/[^'"\\]/);
172 if (stream.eat('\\')) {
173 stream.next();
174 if (singleline && stream.eol()) {
175 return OUTCLASS;
176 }
177 } else if (stream.match(delimiter)) {
178 state.tokenize = tokenBase;
179 return OUTCLASS;
180 } else {
181 stream.eat(/['"]/);
182 }
183 }
184 if (singleline) {
185 if (parserConf.singleLineStringErrors) {
186 return ERRORCLASS;
187 } else {
188 state.tokenize = tokenBase;
189 }
190 }
191 return OUTCLASS;
192 }
193 tokenString.isString = true;
194 return tokenString;
195 }

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected