Skip to content

Improve multiline comments handling in yield/await expression#17324

Merged
JLHwung merged 2 commits intobabel:mainfrom
JLHwung:generator-fix
May 26, 2025
Merged

Improve multiline comments handling in yield/await expression#17324
JLHwung merged 2 commits intobabel:mainfrom
JLHwung:generator-fix

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented May 22, 2025

Q                       A
Fixed Issues? Comments are missing when Babel prints an empty yield expression with multi-line comments (REPL)
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we improved the line terminator handling when printing lone yield expression and await expression. The spec does not forbid line terminator after await, so we relax the await expression requirements. New tested are added such that they are failing on the main but passing on this PR.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: generator labels May 22, 2025
@babel-bot
Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/59370

@JLHwung JLHwung merged commit ec10e83 into babel:main May 26, 2025
57 checks passed
@JLHwung JLHwung deleted the generator-fix branch May 26, 2025 12:17
noelportillo

This comment was marked as spam.

@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 14, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants