Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Nov 23, 2023
1 parent 60251b3 commit 45d9a22
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions crates/swc_ecma_ast/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
TsAsExpr, TsConstAssertion, TsInstantiation, TsNonNullExpr, TsSatisfiesExpr, TsTypeAnn,
TsTypeAssertion, TsTypeParamDecl, TsTypeParamInstantiation,
},
ComputedPropName, Id, Invalid,
ArrayPat, ComputedPropName, Id, Invalid, ObjectPat,
};

#[ast_node(no_clone)]
Expand Down Expand Up @@ -1117,8 +1117,19 @@ pub enum AssignTarget {
#[tag("TsNonNullExpression")]
#[tag("TsTypeAssertion")]
Simple(SimpleAssignTarget),
#[tag("*")]
Pat(Box<Pat>),
#[tag("ArrayPattern")]
#[tag("ObjectPattern")]
Pat(AssignTargetPat),
}

#[ast_node]
#[derive(Eq, Hash, EqIgnoreSpan)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum AssignTargetPat {
#[tag("ArrayPattern")]
Array(ArrayPat),
#[tag("ObjectPattern")]
Object(ObjectPat),
}

#[ast_node]
Expand Down

0 comments on commit 45d9a22

Please sign in to comment.