(quote, nonInclusive)
| 273 | } |
| 274 | |
| 275 | function tokenString(quote, nonInclusive) { |
| 276 | return function(stream, state) { |
| 277 | var escaped = false, ch; |
| 278 | while ((ch = stream.next()) != null) { |
| 279 | if (ch == quote && !escaped) |
| 280 | break; |
| 281 | escaped = !escaped && ch == "\\"; |
| 282 | } |
| 283 | if (!escaped) { |
| 284 | if (nonInclusive) stream.backUp(1); |
| 285 | state.tokenize = tokenBase; |
| 286 | } |
| 287 | return ret("string", "string"); |
| 288 | }; |
| 289 | } |
| 290 | |
| 291 | function tokenParenthesized(stream, state) { |
| 292 | stream.next(); // Must be '(' |
no test coverage detected