(stream, state)
| 207 | } |
| 208 | |
| 209 | function cpp11StringHook(stream, state) { |
| 210 | stream.backUp(1); |
| 211 | // Raw strings. |
| 212 | if (stream.match(/(R|u8R|uR|UR|LR)/)) { |
| 213 | var match = stream.match(/"([^\s\\()]{0,16})\(/); |
| 214 | if (!match) { |
| 215 | return false; |
| 216 | } |
| 217 | state.cpp11RawStringDelim = match[1]; |
| 218 | state.tokenize = tokenRawString; |
| 219 | return tokenRawString(stream, state); |
| 220 | } |
| 221 | // Unicode strings/chars. |
| 222 | if (stream.match(/(u8|u|U|L)/)) { |
| 223 | if (stream.match(/["']/, /* eat */ false)) { |
| 224 | return "string"; |
| 225 | } |
| 226 | return false; |
| 227 | } |
| 228 | // Ignore this hook. |
| 229 | stream.next(); |
| 230 | return false; |
| 231 | } |
| 232 | |
| 233 | // C#-style strings where "" escapes a quote. |
| 234 | function tokenAtString(stream, state) { |
nothing calls this directly
no test coverage detected