← every case · 5000 · line splices
a backslash at the end of the line continues the string in C, so the // inside it is not a comment. Case 5020 is its other half: a counter that never sees a splice and lets its strings run across lines reads this file right and is caught there, and one that never sees a splice and ends its strings with the line is caught here
| 1 | codecodecodecodecodecodecode | char *s = "line one\ |
| 2 | codecodecodecodecodecodecode | // not a real comment\ |
| 3 | codecodecodecodecodecodecode | line three"; |
| 4 | codecodecodecodecodecodecode | int x = 1; |
stringcommentthe tag around another language
a string that opened on an earlier line does not stop a // from being stripped, so the line of string text holding it counts as a comment. Inside a string that opens and closes on one line it is left alone
cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5010-line_splice_inside_a_string/input.c
--strip-str-comments
a string that opened on an earlier line does not stop a // from being stripped, so the line of string text holding it counts as a comment. Inside a string that opens and closes on one line it is left alone
cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --strip-str-comments
a string that opened on an earlier line does not stop a // from being stripped, so the line of string text holding it counts as a comment. Inside a string that opens and closes on one line it is left alone
cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --docstring-as-code
codestats cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --output json --hide timing --no-default-config --no-local --counting content
mezura cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/5000-line_splices/5010-line_splice_inside_a_string/input.c
tokei --output json cases/5000-line_splices/5010-line_splice_inside_a_string/input.c