This addresses issues raised in https://bugs.llvm.org/show_bug.cgi?id=44454.
There are outstanding issues with multi-line verbatim strings in C# that will be addressed in a follow-up PR.
Differential D73492
[clang-format] Handle quotes and escaped braces in C# interpolated strings jbcoe on Jan 27 2020, 9:35 AM. Authored by
Details This addresses issues raised in https://bugs.llvm.org/show_bug.cgi?id=44454. There are outstanding issues with multi-line verbatim strings in C# that will be addressed in a follow-up PR.
Diff Detail Event TimelineComment Actions This looks good, I had lots of problems when I first started the C# support around this which the initial C# support tried to address by adding support in the lexer, but we pulled back from that implementation. So its no surprise to me we are hitting a few errors in this area, one issue I've had problems with is a string ending with \ e.g. @"ABC\" + x + "ABC" this can confuse the tokenizer into thinking this is one string 'ABC" + x + ' But I think adding more support here to handle these cases is good. I'd like to see more test examples if possible Comment Actions Just for reference, take a look at D58404: [clang-format] Add basic support for formatting C# files especially the historical diff https://reviews.llvm.org/D58404?vs=on&id=188239&whitespace=ignore-most#toc in the end, we didn't land that Lex changes but incase we feel it needs to come back to provide full support for C# strings it might help a little
|
nit: start with an upper case: // Interpolated ...