← every case · 2000 · string forms
in a C# interpolated string a brace written twice, {{, is one brace of text and opens no hole. A counter that opens a hole there reads the /* inside the string as the start of a block comment, and the code line below comes out as a comment
| 1 | codecodecodecodecodecodecode | var s = $"{{ /* braces"; |
| 2 | codecodecodecodecodecodecode | int z = 1; |
| 3 | commentscommentscommentscommentscommentscommentscomments | /* a real comment */ |
stringcommentthe tag around another language
the /* inside the string opens a block comment, so the code line below counts as a comment. A plain string "{ /* braces" with no $ and one brace does the same, and --strip-str-comments counts both right
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs
--strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs --strip-str-comments
the /* inside the string opens a block comment, so the code line below counts as a comment. A plain string "{ /* braces" with no $ and one brace does the same, and --strip-str-comments counts both right
cloc --json --config /tmp/linejudge-empty-file cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs --docstring-as-code
codestats cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs --output json --hide timing --no-default-config --no-local --counting content
mezura cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs
tokei --output json cases/2000-string_forms/2079-doubled_brace_in_an_interpolated_string/input.cs