Skip to content

[SwiftParser] Handle nested '#if' in attribute list correctly #3133

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
Aug 4, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 2, 2025

Parse the following '#if' directive as an attribute list for the func decl.

#if condition
#if condition
@attr
#endif
#endif
func foo()

rdar://157211447

Parse the following '#if' directive as an attribute list for the func
decl.
  ```
  #if condition
  #if condition
  @attr
  #endif
  #endif
  func foo()
  ```
@rintaro rintaro force-pushed the parse-attr-nested-if-rdar157211447 branch from ae70a22 to 191392b Compare August 2, 2025 00:02
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.

🙇‍♂️

@rintaro
Copy link
Member Author

rintaro commented Aug 2, 2025

@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.

Nice catch

@rintaro rintaro merged commit 1aa6098 into swiftlang:main Aug 4, 2025
29 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