(quote)
| 118 | |
| 119 | // 'string', with char specified in quote escaped by '\' |
| 120 | function tokenLiteral(quote) { |
| 121 | return function(stream, state) { |
| 122 | var escaped = false, ch; |
| 123 | while ((ch = stream.next()) != null) { |
| 124 | if (ch == quote && !escaped) { |
| 125 | state.tokenize = tokenBase; |
| 126 | break; |
| 127 | } |
| 128 | escaped = !escaped && ch == "\\"; |
| 129 | } |
| 130 | return "string"; |
| 131 | }; |
| 132 | } |
| 133 | function tokenComment(stream, state) { |
| 134 | while (true) { |
| 135 | if (stream.skipTo("*")) { |