← every case · 3000 · escapes and the closing quote
standard SQL escapes a quote by doubling it and the backslash is an ordinary character. A block comment opens after the string on the same line, so a counter that reads the backslash as an escape leaves the string open and hides the opener, whether its strings end with the line or run on
| 1 | codecodecodecodecodecodecode | UPDATE t SET path = 'C:\'; /* a real comment |
| 2 | commentscommentscommentscommentscommentscommentscomments | that closes on this line */ |
| 3 | codecodecodecodecodecodecode | SELECT 2; |
stringcommentthe tag around another language
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql
--strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --strip-str-comments
cloc --json --config /tmp/linejudge-empty-file cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --docstring-as-code
codestats cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --output json --hide timing --no-default-config --no-local --counting content
mezura cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql
the backslash cancels the closing quote, and its strings cross lines, so the comment after the path is counted as string content
tokei --output json cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql