← every case · 7000 · literals with their own delimiters
a block comment opener inside a JavaScript regular expression. Knowing that the slash begins a pattern where a division could stand takes reading what came before it, which is more than any counter here attempts. What each of them does with the opener after that is its own. The file ends with a block comment of its own, so a comment opened there by mistake has a closer to reach, and a counter that ignores an opener nobody closes cannot pass by accident
| 1 | codecodecodecodecodecodecode | let re = /a[/*]b/; |
| 2 | codecodecodecodecodecodecode | let x = 1; |
| 3 | codecodecodecodecodecodecode | let y = 2; |
| 4 | commentscommentscommentscommentscommentscommentscomments | /* a real comment */ |
stringcommentthe tag around another language
the /* inside the pattern is read as a comment opener, and the comment ending the file closes it, so the two code lines between count as comment
cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js
--strip-str-comments
the /* inside the pattern is read as a comment opener, and the comment ending the file closes it, so the two code lines between count as comment
cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --strip-str-comments
the /* inside the pattern is read as a comment opener, and the comment ending the file closes it, so the two code lines between count as comment
cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --docstring-as-code
codestats cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --output json --hide timing --no-default-config --no-local --counting content
mezura cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js --output json --hide timing --no-default-config --no-local --counting region
the /* opens a comment that swallows the two lines under it, and the comment ending the file closes it
scc --format json --no-config cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js
the /* opens a comment that swallows the two lines under it, and the comment ending the file closes it
tokei --output json cases/7000-literals_with_their_own_delimiters/7020-regex_holding_a_comment_opener/input.js