Skip to content
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

Fix comments for smartPipeline topic-forbidding contexts #11597

Merged
merged 1 commit into from May 23, 2020
Merged

Fix comments for smartPipeline topic-forbidding contexts #11597

merged 1 commit into from May 23, 2020

Conversation

lazytype
Copy link
Contributor

Q                       A
Fixed Issues? no
Patch: Bug Fix? just comment strings
Major: Breaking Change? no
Minor: New Feature? no
Tests Added + Pass? no
Documentation PR Link no
Any Dependency Changes? no
License MIT

I think these comments were probably hastily copied and pasted between different statement types without updating the comments to be specific to that statement type. I updated the comments to reflect what's actually the case to the best of my ability.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0083c42:

Sandbox Source
boring-chatelet-qjyyj Configuration
bold-hugle-h13v5 Configuration

@babel-bot
Copy link
Collaborator

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

@@ -1197,8 +1195,7 @@ export default class StatementParser extends ExpressionParser {
this.expect(tt.braceL);

// For the smartPipelines plugin: Disable topic references from outer
// contexts within the class body. They are permitted in test expressions,
// outside of the class body.
// contexts within the class body.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this shortening is an improvement.

Copy link
Contributor Author

@lazytype lazytype May 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the existing comment was copy-pasted from parseWhileStatement, where the mention of a "test expression" makes sense since while loops have one, i.e.
while (<test_expression>) {
but since class bodies do not, removing mention of "test expression" is removing objectively false information from the comment (which I found to be quite confusing when I first encountered the comment).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, fair.

@mAAdhaTTah
Copy link
Contributor

The rest of these seem good tho.

@existentialism existentialism added the PR: Internal 🏠 A type of pull request used for our changelog categories label May 23, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit 62e686a into babel:master May 23, 2020
@lazytype lazytype deleted the fix_smart_pipeline_comments branch May 23, 2020 23:45
@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 Aug 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2020
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 PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants