Skip to content

Match freestanding macros in vim syntax #79867

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
Mar 11, 2025

Conversation

jerryjrchen
Copy link
Contributor

Any valid name beginning with # that isn't already a preprocessor macro is now considered a freestanding macro. Previously, only preprocessor macros were handled in the vim syntax file, e.g. #if.

For example, this properly handles the syntax for the #expect and the #require macros used in Swift Testing.

Attached a screenshot of the before and after:
before-and-after

Resolves rdar://135162741.

Any valid name beginning with `#` that isn't already a preprocessor
macro is now considered a freestanding macro. Previously, only
preprocessor macros were handled in the vim syntax file, e.g. `#if`.

For example, this properly handles the syntax for the `#expect` and the
`#require` macros used in Swift Testing.
@jerryjrchen jerryjrchen requested a review from compnerd as a code owner March 8, 2025 21:02
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Thanks!

@compnerd
Copy link
Member

compnerd commented Mar 8, 2025

@swift-ci please smoke test

@compnerd compnerd enabled auto-merge March 8, 2025 22:34
@compnerd
Copy link
Member

compnerd commented Mar 9, 2025

@swift-ci please smoke test macOS platform

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.

LGTM. Thanks.

@ahoppen
Copy link
Member

ahoppen commented Mar 10, 2025

@swift-ci Please test macOS

@compnerd compnerd merged commit 2cf3c3e into swiftlang:main Mar 11, 2025
3 of 4 checks passed
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