| 135 | } |
| 136 | |
| 137 | function tokenString(quote) { |
| 138 | return function(stream, state) { |
| 139 | var escaped = false, next; |
| 140 | if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ |
| 141 | state.tokenize = tokenBase; |
| 142 | return ret("jsonld-keyword", "meta"); |
| 143 | } |
| 144 | while ((next = stream.next()) != null) { |
| 145 | if (next == quote && !escaped) break; |
| 146 | escaped = !escaped && next == "\\"; |
| 147 | } |
| 148 | if (!escaped) state.tokenize = tokenBase; |
| 149 | return ret("string", "string"); |
| 150 | }; |
| 151 | } |
| 152 | |
| 153 | function tokenComment(stream, state) { |
| 154 | var maybeEnd = false, ch; |