← 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
| 1 | codecodecodecodecode | char *s = "line one\ |
| 2 | codecodecodecodecode | // not a real comment\ |
| 3 | codecodecodecodecode | line three"; |
| 4 | codecodecodecodecode | 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 cases/5000-line_splices/5010-line_splice_inside_a_string/input.c
mezura cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --output json --hide timing --counting content
mezura cases/5000-line_splices/5010-line_splice_inside_a_string/input.c --output json --hide timing --counting region
scc --format json 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