MCPcopy Create free account
hub / github.com/TruthHun/BookStack / cpp11StringHook

Function cpp11StringHook

static/editor.md/lib/codemirror/mode/clike/clike.js:209–231  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 1

tokenRawStringFunction · 0.85

Tested by

no test coverage detected