swift-syntax
swift-syntax copied to clipboard
A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.
Introduces the `EffectfulExprSyntax` protocol, designed to provide a common interface for effectful expressions such as `try` and `await`. Resolves #2549
Lookahead to determine when we are parsing a type within an expression context was failing to consider inverted constraints. Make sure we look past the `~` to an identifier.
## Motivation Following the issue opened in https://github.com/apple/swift-syntax/issues/1936, take the code below as an example: ```swift let x = y.`z`() ``` When wanting to pull out the character ```swift `z`...
## Motivation Original issue here: https://github.com/apple/swift-syntax/issues/1890 Currently when pulling comments out of `Trivia` or `TriviaPiece`s we get the comment delimiters such as `//`, `/* */` etc. then we have to...
### Description There are four kinds of comment tracked by `TriviaPiece`. It'd be a nice convenience to be able to extract the string values of those comments. May I suggest...
rdar://125579439
### Description If I have an expression like so: ```swift let x = y.`z`() ``` Then the syntax node representing `z` contains the surrounding backticks. I then need to strip...
Created my own so we're not stomping on each other's results in the other PR with we both use it.
### Issue Kind Bad Diagnostic Produced ### Source Code ```swift func foo() -> throws(MyError) Int {} ``` ### Description Applying the Fix-It for the parser diagnostics here produces malformed code,...