mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(semantic): Remove redundunt is_leading check for JSDoc (#5877)
Late review for #5876 👀
`is_leading()` was already covered by `is_jsdoc()`.
9115dd947a/crates/oxc_ast/src/trivia.rs (L108-L110)
This commit is contained in:
parent
9115dd947a
commit
f360e2c6f8
1 changed files with 1 additions and 4 deletions
|
|
@ -15,10 +15,7 @@ pub struct JSDocBuilder<'a> {
|
|||
impl<'a> JSDocBuilder<'a> {
|
||||
pub fn new(source_text: &'a str, trivias: &Trivias) -> Self {
|
||||
let mut not_attached_docs: FxHashMap<u32, Vec<_>> = FxHashMap::default();
|
||||
for comment in trivias
|
||||
.comments()
|
||||
.filter(|comment| comment.is_leading() && comment.is_jsdoc(source_text))
|
||||
{
|
||||
for comment in trivias.comments().filter(|comment| comment.is_jsdoc(source_text)) {
|
||||
not_attached_docs
|
||||
.entry(comment.attached_to)
|
||||
.or_default()
|
||||
|
|
|
|||
Loading…
Reference in a new issue