← every case · 7000 · literals with their own delimiters

7030-block_comment_where_a_pattern_may_begin

a JavaScript block comment stands where a regular expression could begin, right after an =. The /* opens the comment, since a pattern never begins with *. A counter that opens a pattern at the slash ends it at the lone slash inside the comment, then takes the quote after it for an open string, which hides the real comment later on the line

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.js
1codeconst x = /* a / "b */ 1; /* a real comment
2commentsthat closes on this line */
3codelet y = 1;

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js

cloc.default ✓ agrees

--strip-str-comments

the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js --strip-str-comments

cloc.docstring-as-code ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js --docstring-as-code

codestats.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

codestats cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask3 lines · 2 code · 1 comments · 0 extra
it answers3 lines · 2 code · 1 comments · 0 extra

mezura cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

mezura cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js --output json --hide timing --no-default-config --no-local --counting region

scc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

scc --format json --no-config cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js

tokei.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

tokei --output json cases/7000-literals_with_their_own_delimiters/7030-block_comment_where_a_pattern_may_begin/input.js