(quote)
| 23 | } |
| 24 | |
| 25 | function tokenString(quote) { |
| 26 | return function(stream, state) { |
| 27 | var escaped = false, next; |
| 28 | while ((next = stream.next()) != null) { |
| 29 | if (next == quote && !escaped) break; |
| 30 | escaped = !escaped && next == "\\"; |
| 31 | } |
| 32 | |
| 33 | if (!escaped) state.tokenize = tokenBase; |
| 34 | return "string"; |
| 35 | }; |
| 36 | } |
| 37 | |
| 38 | function tokenOperator(operator) { |
| 39 | return function(stream, state) { |