← every case · 3000 · escapes and the closing quote

3020-multiline_string_ending_in_backslash

a raw string whose last byte is a backslash, written with the same symbol at both ends. A backtick string in Odin escapes nothing, so the second backtick closes it whatever precedes it. The block comment opens after the string on the same line, so a counter that leaves the string open hides the opener whether its strings end with the line or run on. The string runs over three lines and the middle one holds only //, so a counter that reads no raw string at all counts that line as a comment

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.odin
1codepackage main
2codeSeparators :: `
3code//
4code/\` /* a block comment
5commentsthat must be seen
6comments*/
7comments// a real comment

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

its Odin filters know no backtick string, so the line holding only // inside the raw string is dropped as a comment by its C++ comment filter. --strip-str-comments clears markers between double quotes only

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 3 code · 4 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin

cloc.default ✗ fails

--strip-str-comments

its Odin filters know no backtick string, so the line holding only // inside the raw string is dropped as a comment by its C++ comment filter. --strip-str-comments clears markers between double quotes only

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 3 code · 4 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin --strip-str-comments

cloc.docstring-as-code ✗ fails

its Odin filters know no backtick string, so the line holding only // inside the raw string is dropped as a comment by its C++ comment filter. --strip-str-comments clears markers between double quotes only

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 3 code · 4 comments

cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin --docstring-as-code

codestats.default ✓ agrees
the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 4 code · 3 comments

codestats cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask7 lines · 4 code · 2 comments · 1 extra
it answers7 lines · 4 code · 2 comments · 1 extra

mezura cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 4 code · 3 comments

mezura cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin --output json --hide timing --no-default-config --no-local --counting region

scc.default ✗ fails

its Odin has a double quoted string and no backtick one, so the // on line 3, inside the raw string, is read as a comment. The same /* comes out as code between double quotes and opens a comment between backticks

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 3 code · 4 comments

scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin

tokei.default ✗ fails

its Odin has double and single quoted strings and no backtick one, so the // on line 3, inside the raw string, is read as a comment. The same /* comes out as code between double quotes and opens a comment between backticks

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 3 code · 4 comments

tokei --output json cases/3000-escapes_and_the_closing_quote/3020-multiline_string_ending_in_backslash/input.odin