MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / parseCpp2Interpolation

Function parseCpp2Interpolation

static/modes/cppfront-mode.ts:117–127  ·  view source on GitHub ↗
(state: string, prefix_token_regex: RegExp, token_class: string)

Source from the content-addressed store, hash-verified

115 ];
116
117 function parseCpp2Interpolation(state: string, prefix_token_regex: RegExp, token_class: string) {
118 cppfront.tokenizer[state].unshift([
119 prefix_token_regex.source + /(@at_cpp2_interpolation)/.source,
120 {
121 cases: {
122 '$S3==cpp2': [token_class, {token: '@rematch', next: 'parse_cpp2_interpolation'}],
123 '@': [token_class, token_class],
124 },
125 },
126 ]);
127 }
128 // Highlight interpolation also in non-interpolated raw string literal as it's most likely used for reflection.
129 parseCpp2Interpolation('string', /([^\\"]*?)/, 'string');
130 parseCpp2Interpolation('raw', /(.*?)/, 'string.raw');

Callers 1

setupLiteralParsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected