Skip to content

Fix spacings around !and ? #1218

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
Jan 13, 2023
Merged

Conversation

kimdv
Copy link
Contributor

@kimdv kimdv commented Jan 11, 2023

Fixes some spacing regressions found in #1217

@kimdv kimdv requested a review from ahoppen as a code owner January 11, 2023 10:18
@kimdv kimdv mentioned this pull request Jan 11, 2023
@kimdv kimdv force-pushed the kimdv/fix-spacing-pt-2 branch from b96ea09 to 021c2a4 Compare January 11, 2023 10:26
@kimdv
Copy link
Contributor Author

kimdv commented Jan 11, 2023

@swift-ci please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

This makes me wonder whether the better default would be to mark exclamationMark and postfixQuestionMark as not having a trailing space and selectively enabling it in cases where we want a trailing space.

I’m thinking that in the most cases the exclamation and question mark will be appended to an identifier and since identifiers don’t have a trailing space, ! and ? also shouldn’t have a trailing space. I might be wrong though.

@kimdv
Copy link
Contributor Author

kimdv commented Jan 11, 2023

I can see what happens 😬

@kimdv kimdv force-pushed the kimdv/fix-spacing-pt-2 branch from 021c2a4 to 51d94a0 Compare January 11, 2023 10:46
@kimdv kimdv requested a review from ahoppen January 11, 2023 10:46
@kimdv
Copy link
Contributor Author

kimdv commented Jan 11, 2023

@swift-ci please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

I like this much better.

@kimdv kimdv force-pushed the kimdv/fix-spacing-pt-2 branch from 51d94a0 to afc428e Compare January 12, 2023 07:47
@kimdv kimdv force-pushed the kimdv/fix-spacing-pt-2 branch from afc428e to c96d707 Compare January 12, 2023 11:05
@kimdv
Copy link
Contributor Author

kimdv commented Jan 12, 2023

@swift-ci please test

@kimdv kimdv merged commit 0aa125b into swiftlang:main Jan 13, 2023
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Jan 13, 2023
@kimdv kimdv deleted the kimdv/fix-spacing-pt-2 branch January 25, 2023 20:54
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