Skip to content

Commit

Permalink
perf(semantic): only check for jsdoc if jsdoc building is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Jun 30, 2024
1 parent d953c85 commit b234ddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ impl<'a> SemanticBuilder<'a> {

fn create_ast_node(&mut self, kind: AstKind<'a>) {
let mut flags = self.current_node_flags;
if self.jsdoc.retrieve_attached_jsdoc(&kind) {

if self.build_jsdoc && self.jsdoc.retrieve_attached_jsdoc(&kind) {
flags |= NodeFlags::JSDoc;
}

Expand Down

0 comments on commit b234ddd

Please sign in to comment.