New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve source map generation #14967
Changes from 3 commits
aeab923
4c4ac39
a3038b7
d90f6ec
7ef541c
28cc7de
2949354
3eaf31c
d23bc56
ca34bac
d32a7a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,15 +36,11 @@ export function BlockStatement(this: Printer, node: t.BlockStatement) { | |
this.printSequence(node.body, node, { indent: true }); | ||
this.removeTrailingNewline(); | ||
|
||
this.sourceWithOffset("end", node.loc, 0, -1); | ||
|
||
if (!this.endsWith(charCodes.lineFeed)) this.newline(); | ||
|
||
this.rightBrace(); | ||
} else { | ||
this.sourceWithOffset("end", node.loc, 0, -1); | ||
this.token("}"); | ||
} | ||
|
||
this.sourceWithOffset("end", node.loc, 0, -1); | ||
this.rightBrace(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also check if we need the same fix for |
||
} | ||
|
||
export function Directive(this: Printer, node: t.Directive) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for this? This should work as an input.