Skip to content

Commit 93d45b9

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 93d45b9

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
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);

tasks/transform_conformance/babel.snap.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
commit: 12619ffe
22

3-
Passed: 473/927
3+
Passed: 472/927
44

55
# All Passed:
66
* babel-preset-react
@@ -445,10 +445,11 @@ Passed: 473/927
445445
* opts/optimizeConstEnums/input.ts
446446
* opts/rewriteImportExtensions/input.ts
447447

448-
# babel-plugin-transform-typescript (129/151)
448+
# babel-plugin-transform-typescript (128/151)
449449
* enum/mix-references/input.ts
450450
* enum/ts5.0-const-foldable/input.ts
451451
* exports/declared-types/input.ts
452+
* exports/imported-types/input.ts
452453
* exports/interface/input.ts
453454
* imports/elide-no-import-specifiers/input.ts
454455
* imports/elision-locations/input.ts

0 commit comments

Comments
 (0)