(stream, state)
| 198 | var OUTCLASS = "string"; |
| 199 | |
| 200 | function tokenString(stream, state) { |
| 201 | while (!stream.eol()) { |
| 202 | stream.eatWhile(/[^'"\\]/); |
| 203 | if (stream.eat("\\")) { |
| 204 | stream.next(); |
| 205 | if (singleline && stream.eol()) |
| 206 | return OUTCLASS; |
| 207 | } else if (stream.match(delimiter)) { |
| 208 | state.tokenize = tokenBase; |
| 209 | return OUTCLASS; |
| 210 | } else { |
| 211 | stream.eat(/['"]/); |
| 212 | } |
| 213 | } |
| 214 | if (singleline) { |
| 215 | if (parserConf.singleLineStringErrors) |
| 216 | return ERRORCLASS; |
| 217 | else |
| 218 | state.tokenize = tokenBase; |
| 219 | } |
| 220 | return OUTCLASS; |
| 221 | } |
| 222 | tokenString.isString = true; |
| 223 | return tokenString; |
| 224 | } |
nothing calls this directly
no outgoing calls
no test coverage detected