Skip to content

Commit

Permalink
feat(transformer): class properties transform
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 5, 2024
1 parent d481df1 commit 1411b66
Show file tree
Hide file tree
Showing 11 changed files with 2,138 additions and 49 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_transformer/src/common/helper_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub enum Helper {
AsyncToGenerator,
ObjectSpread2,
WrapAsyncGenerator,
DefineProperty,
}

impl Helper {
Expand All @@ -154,6 +155,7 @@ impl Helper {
Self::AsyncToGenerator => "asyncToGenerator",
Self::ObjectSpread2 => "objectSpread2",
Self::WrapAsyncGenerator => "wrapAsyncGenerator",
Self::DefineProperty => "defineProperty",
}
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/common/statement_injector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ impl<'a> StatementInjectorStore<'a> {
// The non-trivial inner functions are not marked `#[inline]` - compiler can decide whether to inline or not.
impl<'a> StatementInjectorStore<'a> {
/// Add a statement to be inserted immediately before the target statement.
#[expect(dead_code)]
#[inline]
pub fn insert_before<A: GetAddress>(&self, target: &A, stmt: Statement<'a>) {
self.insert_before_address(target.address(), stmt);
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/common/var_declarations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ impl<'a> VarDeclarationsStore<'a> {

/// Add a `let` declaration to be inserted at top of current enclosing statement block,
/// given a `BoundIdentifier`.
#[expect(dead_code)]
pub fn insert_let(
&self,
binding: &BoundIdentifier<'a>,
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/compiler_assumptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ pub struct CompilerAssumptions {
pub set_computed_properties: bool,

#[serde(default)]
#[deprecated = "Not Implemented"]
pub set_public_class_fields: bool,

#[serde(default)]
Expand Down
Loading

0 comments on commit 1411b66

Please sign in to comment.