Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/oxc_semantic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
use std::ops::RangeBounds;

use oxc_ast::{
AstKind, Comment, CommentsRange, ast::IdentifierReference, comments_range, has_comments_between,
AstKind, Comment, CommentsRange, ast::IdentifierReference, comments_range,
has_comments_between, is_inside_comment,
};
#[cfg(feature = "cfg")]
use oxc_cfg::ControlFlowGraph;
Expand Down Expand Up @@ -158,6 +159,10 @@ impl<'a> Semantic<'a> {
has_comments_between(self.comments, span)
}

pub fn is_inside_comment(&self, pos: u32) -> bool {
is_inside_comment(self.comments, pos)
}

pub fn irregular_whitespaces(&self) -> &[Span] {
&self.irregular_whitespaces
}
Expand Down
Loading