(state: string, prefix_token_regex: RegExp, token_class: string)
| 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'); |
no outgoing calls
no test coverage detected