Skip to content

Commit

Permalink
chore: remove oxc_transformer for a reimplementation (#2865)
Browse files Browse the repository at this point in the history
closes #2860
  • Loading branch information
Boshen authored Mar 30, 2024
1 parent 31ed532 commit c1a2958
Show file tree
Hide file tree
Showing 46 changed files with 316 additions and 6,264 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions crates/oxc_transformer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ workspace = true
doctest = false

[dependencies]
bitflags = { workspace = true }
oxc_ast = { workspace = true }
oxc_span = { workspace = true }
oxc_allocator = { workspace = true }
oxc_syntax = { workspace = true }
oxc_semantic = { workspace = true }
oxc_diagnostics = { workspace = true }
rustc-hash = { workspace = true }

serde = { workspace = true, features = ["derive"] }
phf = { workspace = true, features = ["macros"] }

[dev-dependencies]
oxc_parser = { workspace = true }
Expand Down
14 changes: 2 additions & 12 deletions crates/oxc_transformer/examples/transformer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ use oxc_codegen::{Codegen, CodegenOptions};
use oxc_parser::Parser;
use oxc_semantic::SemanticBuilder;
use oxc_span::SourceType;
use oxc_transformer::{
ReactJsxOptions, ReactJsxRuntime, ReactJsxRuntimeOption, TransformOptions, TransformTarget,
Transformer,
};
use oxc_transformer::{TransformOptions, Transformer};

// Instruction:
// create a `test.js`,
Expand Down Expand Up @@ -45,14 +42,7 @@ fn main() {
.semantic;

let program = allocator.alloc(ret.program);
let transform_options = TransformOptions {
target: TransformTarget::ES5,
react_jsx: Some(ReactJsxOptions {
runtime: Some(ReactJsxRuntimeOption::Valid(ReactJsxRuntime::Classic)),
..ReactJsxOptions::default()
}),
..TransformOptions::default()
};
let transform_options = TransformOptions {};
Transformer::new(&allocator, source_type, semantic, transform_options).build(program).unwrap();

let printed = Codegen::<false>::new("", &source_text, CodegenOptions::default())
Expand Down
66 changes: 0 additions & 66 deletions crates/oxc_transformer/src/context.rs

This file was deleted.

142 changes: 0 additions & 142 deletions crates/oxc_transformer/src/es2015/arrow_functions.rs

This file was deleted.

75 changes: 0 additions & 75 deletions crates/oxc_transformer/src/es2015/duplicate_keys.rs

This file was deleted.

Loading

0 comments on commit c1a2958

Please sign in to comment.