-
Notifications
You must be signed in to change notification settings - Fork 427
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
Syntax and parsing for '-define-availability' argument #2954
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can’t say that I love this but I don’t have a better solution either, so good with me.
for node in NON_BASE_SYNTAX_NODES { | ||
if let spi = node.spi, seen.insert(spi.text).inserted { | ||
AttributeSyntax("@_spi(\(spi))").with(\.trailingTrivia, .space) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated at least 3 times. Could we share it?
@@ -13,9 +13,9 @@ | |||
//===----------------------------------------------------------------------===// | |||
|
|||
#if compiler(>=6) | |||
@_spi(RawSyntax) public import SwiftSyntax | |||
@_spi(RawSyntax) @_spi(ExperimentalLanguageFeatures) @_spi(Compiler) public import SwiftSyntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@_spi(RawSyntax) @_spi(ExperimentalLanguageFeatures) @_spi(Compiler) public import SwiftSyntax | |
@_spi(RawSyntax) @_spi(ExperimentalLanguageFeatures) @_spi(Compiler) public import SwiftSyntax |
7ae0295
to
923a242
Compare
@swift-ci Please test |
internal import SwiftSyntax | ||
@_spi(RawSyntax) @_spi(ExperimentalLanguageFeatures) @_spi(Compiler) public import SwiftSyntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import access level changed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it .internal
by default
7830845
to
624fde6
Compare
Under 'Compier' SPI. This is for parsing arguments for '-define-availability' compiler option: <identifier> <version-tuple>? ':' <availability-spec-list>
Import all known @_spi.
624fde6
to
a1c17fe
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
No description provided.