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