(quote)
| 106 | } |
| 107 | |
| 108 | function tokenString(quote) { |
| 109 | return function(stream, state) { |
| 110 | var escaped = false, next, end = false; |
| 111 | while ((next = stream.next()) != null) { |
| 112 | if (next == quote && !escaped) {end = true; break;} |
| 113 | escaped = !escaped && next == "\\"; |
| 114 | } |
| 115 | if (end || !(escaped || multiLineStrings)) |
| 116 | state.tokenize = tokenBase; |
| 117 | return "string"; |
| 118 | }; |
| 119 | } |
| 120 | |
| 121 | function tokenComment(stream, state) { |
| 122 | var maybeEnd = false, ch; |