← every case · 3000 · escapes and the closing quote
standard SQL escapes a quote by doubling it and the backslash is an ordinary character
| 1 | codecodecodecodecode | UPDATE t SET path = 'C:\'; |
| 2 | commentscommentscommentscommentscomments | -- a real comment |
| 3 | codecodecodecodecode | SELECT 2; |
stringcommentthe tag around another language
cloc --json cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql
mezura cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --output json --hide timing --counting content
mezura cases/3000-escapes_and_the_closing_quote/3070-backslash_before_a_closing_quote_in_sql/input.sql --output json --hide timing --counting region
the backslash cancels the closing quote, and its strings cross lines, so the comment under the path is counted as string content
scc --format json 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 under 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