← every case · 1000 · comments
Rust block comments nest, and on /*/*/ the two openers take the first four bytes. Each */ that seems to sit on that line shares a byte with one of them and closes nothing, so the comment is two levels deep when the line ends and needs both closers below. A counter that does not nest, or that nests but reads a closer out of bytes an opener already took, closes everything on the first line
| 1 | commentscommentscommentsextracommentscommentscomments | /*/*/ |
| 2 | commentscommentscommentsextracommentscommentscomments | */ |
| 3 | commentscommentscommentscommentscommentscommentscomments | let x = 1; |
| 4 | commentscommentscommentsextracommentscommentscomments | */ |
| 5 | codecodecodecodecodecodecode | let y = 2; |
stringcommentthe tag around another language
the */ ending the first line closes the comment although Rust's pair nests, so the lines under it up to and including the second closer are left as code
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs
--strip-str-comments
the */ ending the first line closes the comment although Rust's pair nests, so the lines under it up to and including the second closer are left as code
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs --strip-str-comments
the */ ending the first line closes the comment although Rust's pair nests, so the lines under it up to and including the second closer are left as code
cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs --docstring-as-code
codestats cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs --output json-compact --include-generated --no-gitignore --hidden --no-config
mezura cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs --output json --hide timing --no-default-config --no-local --counting content
mezura cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs --output json --hide timing --no-default-config --no-local --counting region
scc --format json --no-config cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs
tokei --output json cases/1000-comments/1215-nesting_openers_sharing_bytes_with_closers/input.rs