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

Use TokenSyntax.indentationOfLine from SwiftBasicFormat instead of duplicating indentation inferring logic #1225

Merged
merged 2 commits into from
May 6, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 6, 2024

Follow-up to #1206. SwiftBasicFormat already has TokenSyntax.indentationOfLine that also takes into account trailing trivia of the previous token, so we don’t need to re-implement it here.

Also use as(DeclSyntaxEnum.self) instead of force-unwrapping.

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Ah, very good!

@ahoppen
Copy link
Member Author

ahoppen commented May 6, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 6, 2024

@swift-ci Please test Windows

@ahoppen ahoppen enabled auto-merge May 6, 2024 18:07
@ahoppen ahoppen merged commit 5e1ff2d into swiftlang:main May 6, 2024
3 checks passed
@ahoppen ahoppen deleted the add-documentation-followup branch May 7, 2024 16:00
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.

3 participants