Skip to content

Remove name_for_diagnostics='name' #982

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

Merged
merged 1 commit into from
Oct 19, 2022

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Oct 19, 2022

@bnbarham We chatted about this before. Do you think the new error messages are better? I don’t really have strong opinions.

@ahoppen ahoppen requested a review from bnbarham October 19, 2022 07:57
@ahoppen
Copy link
Member Author

ahoppen commented Oct 19, 2022

@swift-ci Please test

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Oct 19, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit c1ab7e6 into swiftlang:main Oct 19, 2022
@ahoppen ahoppen deleted the ahoppen/remove-name-name-for-diags branch October 19, 2022 16:26
Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

Yeah, I like it better 👍

@@ -5,7 +5,7 @@
# labeled-stmt -> label ':' stmt
Node('LabeledStmt', name_for_diagnostics='labeled statement', kind='Stmt',
children=[
Child('LabelName', kind='IdentifierToken', name_for_diagnostics='name'),
Child('LabelName', kind='IdentifierToken', name_for_diagnostics='label name'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't seem to be a test for this case?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don’t actually think we ever hit this right now because we only parse a labeled statement if there is a label. But I think it doesn’t hurt either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants