Skip to content

Commit 3b40ffb

Browse files
committed
feat(travserse): disable syntax check and disable build module record
These can be skipped because : * semantic errors are not passed to the caller * module record is not used, so cant
1 parent ebb6eb8 commit 3b40ffb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

crates/oxc_traverse/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@
6060
//! scheme could very easily be derailed entirely by a single mistake, so in my opinion, it's unwise
6161
//! to edit by hand.
6262
63-
use std::path::PathBuf;
64-
6563
use oxc_allocator::Allocator;
6664
use oxc_ast::ast::Program;
6765
use oxc_semantic::SemanticBuilder;
@@ -147,11 +145,7 @@ pub fn traverse_mut<'a, Tr: Traverse<'a>>(
147145
source_type: SourceType,
148146
allocator: &'a Allocator,
149147
) {
150-
let semantic = SemanticBuilder::new(source_text, source_type)
151-
.with_check_syntax_error(true)
152-
.build_module_record(PathBuf::default(), program)
153-
.build(program)
154-
.semantic;
148+
let semantic = SemanticBuilder::new(source_text, source_type).build(program).semantic;
155149
let (symbols, scopes) = semantic.into_symbol_table_and_scope_tree();
156150

157151
let mut ctx = TraverseCtx::new(scopes, symbols, allocator);

0 commit comments

Comments
 (0)