fix(es/codegen): Emit static before readonly (#2271)

This commit is contained in:
David Sherret 2021-09-19 03:28:33 -04:00 committed by GitHub
parent ce01b8a9b7
commit 8e0a5450b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

2
Cargo.lock generated
View File

@ -2557,7 +2557,7 @@ dependencies = [
[[package]]
name = "swc_ecma_codegen"
version = "0.70.4"
version = "0.70.5"
dependencies = [
"bitflags",
"num-bigint",

View File

@ -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"

View File

@ -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);