(quote)
| 153 | } |
| 154 | |
| 155 | function tokenString(quote) { |
| 156 | return function(stream, state) { |
| 157 | var escaped = false, next, end = false; |
| 158 | while ((next = stream.next()) != null) { |
| 159 | if (next == quote && !escaped) { |
| 160 | end = true; |
| 161 | break; |
| 162 | } |
| 163 | escaped = !escaped && next == "\\"; |
| 164 | } |
| 165 | if (end || !escaped) state.tokenize = null; |
| 166 | return "string"; |
| 167 | }; |
| 168 | } |
| 169 | |
| 170 | // Interface |
| 171 |