forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix printing BigIntLiterals/DecimalLiterals with compact option (babe…
- Loading branch information
1 parent
b6002d7
commit 8660b02
Showing
7 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/babel-generator/test/fixtures/types/BigIntLiteral-compact/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function a() { return 100n; } | ||
function b() { return 9223372036854775807n; } | ||
function c() { return 0o16432n; } | ||
function d() { return 0xFFF123n; } | ||
function e() { return 0b101011101n; } |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/types/BigIntLiteral-compact/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"compact": true | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/types/BigIntLiteral-compact/output.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
packages/babel-generator/test/fixtures/types/DecimalLiteral-compact/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function a() { return 100m; } | ||
function b() { return 9223372036854775807m; } | ||
function c() { return 0.m; } | ||
function d() { return 3.1415926535897932m; } | ||
function e() { return 100.000m; } |
4 changes: 4 additions & 0 deletions
4
packages/babel-generator/test/fixtures/types/DecimalLiteral-compact/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"compact": true, | ||
"plugins": ["decimal"] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/types/DecimalLiteral-compact/output.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.