Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Aug 20, 2024
1 parent a789930 commit dc4fd90
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crates/swc_ecma_transforms_proposal/src/decorator_pass.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::mem::take;

use swc_ecma_ast::{Class, ClassDecl, ClassExpr, ExportDecl, Ident};
use swc_ecma_ast::*;
use swc_ecma_visit::{as_folder, Fold, VisitMut, VisitMutWith};

use crate::DecoratorVersion;
Expand Down Expand Up @@ -28,6 +28,15 @@ struct ClassState {
has_element_decorators: bool,
has_computed_keys_side_effects: bool,
elem_decs_use_fn_context: bool,

class_assignments: Vec<AssignExpr>,

proto_init_local: Ident,
static_init_local: Ident,
}

impl ClassState {
fn memoize_expr(&mut self, expr: Box<Expr>, hint: &str, assignments: &mut Vec<AssignExpr>) {}
}

impl DecoratorPass {
Expand All @@ -49,3 +58,5 @@ impl VisitMut for DecoratorPass {
self.transform_class(node.ident.clone(), &mut node.class);
}
}

fn uses_function_context_or_yield_await(dec: &Decorator) -> bool {}

0 comments on commit dc4fd90

Please sign in to comment.