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
Fix comments for smartPipeline topic-forbidding contexts #11597
Conversation
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:
|
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. |
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.
I'm not sure this shortening is an improvement.
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.
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).
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.
Ah, fair.
The rest of these seem good tho. |
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.