mirror of
https://github.com/swc-project/swc.git
synced 2025-01-02 18:43:52 +03:00
fix(es/codegen): Emit static
before readonly
(#2271)
This commit is contained in:
parent
ce01b8a9b7
commit
8e0a5450b1
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2557,7 +2557,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_codegen"
|
||||
version = "0.70.4"
|
||||
version = "0.70.5"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"num-bigint",
|
||||
|
@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"]
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_ecma_codegen"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.70.4"
|
||||
version = "0.70.5"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1"
|
||||
|
@ -1109,13 +1109,13 @@ impl<'a> Emitter<'a> {
|
||||
|
||||
self.emit_accesibility(n.accessibility)?;
|
||||
|
||||
if n.readonly {
|
||||
keyword!("readonly");
|
||||
if n.is_static {
|
||||
keyword!("static");
|
||||
space!();
|
||||
}
|
||||
|
||||
if n.is_static {
|
||||
keyword!("static");
|
||||
if n.readonly {
|
||||
keyword!("readonly");
|
||||
space!();
|
||||
}
|
||||
|
||||
@ -1151,16 +1151,16 @@ impl<'a> Emitter<'a> {
|
||||
self.emit_accesibility(n.accessibility)?;
|
||||
}
|
||||
|
||||
if n.readonly {
|
||||
keyword!("readonly");
|
||||
space!()
|
||||
}
|
||||
|
||||
if n.is_static {
|
||||
keyword!("static");
|
||||
space!();
|
||||
}
|
||||
|
||||
if n.readonly {
|
||||
keyword!("readonly");
|
||||
space!()
|
||||
}
|
||||
|
||||
if n.computed {
|
||||
punct!("[");
|
||||
emit!(n.key);
|
||||
|
Loading…
Reference in New Issue
Block a user