mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
fix(es/codegen): Mark bigint as an item starting with number (#5207)
This commit is contained in:
parent
31bbf2ddbb
commit
387d5e41db
19
crates/swc/tests/fixture/issues-5xxx/5206/input/.swcrc
Normal file
19
crates/swc/tests/fixture/issues-5xxx/5206/input/.swcrc
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"jsc": {
|
||||
"parser": {
|
||||
"syntax": "ecmascript",
|
||||
"jsx": false
|
||||
},
|
||||
"target": "es2022",
|
||||
"loose": false,
|
||||
"minify": {
|
||||
"compress": false,
|
||||
"mangle": false
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"type": "es6"
|
||||
},
|
||||
"minify": true,
|
||||
"isModule": true
|
||||
}
|
3
crates/swc/tests/fixture/issues-5xxx/5206/input/index.js
Normal file
3
crates/swc/tests/fixture/issues-5xxx/5206/input/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
function zero() {
|
||||
return 0n
|
||||
}
|
@ -0,0 +1 @@
|
||||
function zero(){return 0n}
|
@ -74,6 +74,7 @@ impl StartsWithAlphaNum for Expr {
|
||||
| Expr::Lit(Lit::Bool(_))
|
||||
| Expr::Lit(Lit::Num(_))
|
||||
| Expr::Lit(Lit::Null(_))
|
||||
| Expr::Lit(Lit::BigInt(_))
|
||||
| Expr::Await(_)
|
||||
| Expr::Fn(_)
|
||||
| Expr::Class(_)
|
||||
|
Loading…
Reference in New Issue
Block a user