mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 16:42:28 +03:00
Update swc_ecma_utils (#927)
This commit is contained in:
parent
5baa636a4b
commit
54e0bfd878
@ -679,3 +679,19 @@ to!(
|
||||
}",
|
||||
"export abstract class Kernel {}"
|
||||
);
|
||||
|
||||
to!(
|
||||
issue_926,
|
||||
"class A extends Object {
|
||||
constructor(public a, private b) {
|
||||
super();
|
||||
}
|
||||
}",
|
||||
"class A extends Object {
|
||||
constructor(a, b){
|
||||
super();
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
}
|
||||
}"
|
||||
);
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "swc_ecma_utils"
|
||||
version = "0.16.0"
|
||||
version = "0.16.1"
|
||||
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
|
||||
license = "Apache-2.0/MIT"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
|
@ -1458,20 +1458,20 @@ pub fn prepend_stmts<T: StmtLike>(
|
||||
) {
|
||||
let idx = to
|
||||
.iter()
|
||||
.position(|item| match item.as_stmt() {
|
||||
Some(&Stmt::Expr(ExprStmt { ref expr, .. }))
|
||||
if match &**expr {
|
||||
Expr::Lit(Lit::Str(..)) => true,
|
||||
.position(|item| {
|
||||
match item.as_stmt() {
|
||||
Some(&Stmt::Expr(ExprStmt { ref expr, .. })) => match &**expr {
|
||||
Expr::Lit(Lit::Str(..)) => return false,
|
||||
Expr::Call(expr) => match expr.callee {
|
||||
ExprOrSuper::Super(_) => true,
|
||||
ExprOrSuper::Expr(_) => false,
|
||||
ExprOrSuper::Super(_) => return false,
|
||||
ExprOrSuper::Expr(_) => {}
|
||||
},
|
||||
_ => false,
|
||||
} =>
|
||||
{
|
||||
false
|
||||
_ => {}
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
_ => true,
|
||||
|
||||
true
|
||||
})
|
||||
.unwrap_or(to.len());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user