forked from swiftlang/swift-syntax
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge branch upstream/main into wasm32-wasi-test #55
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added a new Identifier type which contains a name property This name property contains a sanitized version of the TokenSyntax's text property which for now only consists of trimming backticks
This acts as a convenience property to convert a TokenSyntax to an Identifier
This isn't explicitly needed for this problem but it seems as though the default for all types that can conform to Sendable/Hashable should This also sets up this new type for Swift 6.0 (and the current Swift 5.10) to pass this type around safely when needed As well as allows Identifier to be a key in a dictionary which could be a common scenario
When trying to create an Identifier from a non-identifier token, the initializer should fail, returning nil Additionally the identifier property of the TokenSyntax should also return nil
…ate-backtick-tokens Add Identifier wrapper that strips backticks from token text
We are cherry-picking this change to `release/6.0` in swiftlang#2666.
…e-notes Move the `TokenSyntax.identifier` release notes to 600.md
[SwiftParser] Handle extraneous case keyword after comma in switch case.
We used C atomics but these were allocated as Swift variables. Even thought they were atomic, concurrent accesses to them could violate Swift’s exclusivity laws, raising thread sanitizer errors. Allocate the C atomic using malloc to fix this problem.
Heap allocate our atomics
Remove resultDependsOn/resultDependsOnSelf
Mark MacroSpec as Sendable
Exclude `.index-build` folder generated by SourceKit-LSP’s background indexing
We treated enum case parameters the same way as function parameters and weren’t considering that they can be unlabeled. That caused us to insert eg. `_ ` in front of the case’s type, producing `case myCase(_ String)`, which is invalid. Report `enumCaseParameters` as a special parameter kind so that sourcekitd can work with it. swiftlang/sourcekit-lsp#1228
…tion-converter Make SourceLocationConverter Sendable
Fix renaming enum case parameters with unnamed associated arguments
The compiler may send the same syntax to the plugins multiple times. For example, 'memberAttribute' macro request contains parent nominal decl syntax, and the compiler sends a request for each members. Parsing it multiple times is a waste. rdar://129624305
Avoid 'import WinSDK' in swift sources or `#include` in headers. This is to avoid linking with Swift overlay library (swiftWinSDK.dll) so swift-frontend with plugins won't depends on it.
…egistry [Macros] Cache parsed syntax tree in compiler plugins
[Windows] Avoid linking with swiftWinSDK.dll
Co-authored-by: Alex Hoppen <alex@alexhoppen.de>
Each target name is prefixed with SWIFTSYNTAX_TARGET_NAMESPACE Also, add SWIFTSYNTAX_EMIT_MODULE setting; 'true' for building library-evolution enabled modules with .swiftinterface, 'false' for building fragile modules, undefined is 'true'
Having the trimmed node be attached to a parent was not intuitive because eg. printing the parent node would have the trimmed trivia missing, most likely forming invalid Swift code.
Update Contributing Docs - Encourage PRs Even When Stuck
Detach node when accessing .trimmed
[CMake] Add option to set the target namespace
…exicalContext` Now that we have, we can change the default implementation of `MacroExpansionContext.lexicalContext` to return an empty array and be deprecated, making not implementing `lexicalContext` a compile-time warning instead of a runtime error. rdar://123410459
deleting this file in favor of the org wide coc in the .github repo. having this file in place means that this repo opts out of those org wide benefits.
…ext-default-implementation Properly deprecate default implementation of `MacroExpansionContext.lexicalContext`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.