(quote)
| 50 | } |
| 51 | |
| 52 | function tokenString(quote) { |
| 53 | return function(stream, state) { |
| 54 | var escaped = false, next, end = false; |
| 55 | while((next = stream.next()) != null) { |
| 56 | if (next == quote && !escaped) { |
| 57 | end = true; break; |
| 58 | } |
| 59 | escaped = !escaped && next == "\\"; |
| 60 | } |
| 61 | if (end || !(escaped || multiLineStrings)) |
| 62 | state.tokenize = tokenBase; |
| 63 | return ret("string", "error"); |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | function tokenBase(stream, state) { |
| 68 | var ch = stream.next(); |