Not sure if this is a bug, or a feature request, so I'm filing it as a bug for the moment.
I am using SwiftSyntax to parse a definition file (to be clear, I'm talking about the file generated by Xcode when you right click on a symbol and select "jump to definition").
For example, a stripped-down piece of the SwiftUI definition file looks like this:
The projectedValue variable is properly parsed as VariableDeclSyntax, but wrappedValue is parsed as UnknownDeclSyntax. The "set" part is what makes SwiftSyntax to not detect a variable.
This makes sense in a way, as that is not a valid syntax to use while writing code. However, in the context of the definition file it is ok. The color coding in Xcode also provides a hint, as the "nonmutating set" shows uncolored.
I tried to dig a little more, but I think the problem (if it is such), resides in the lib_InternalSwiftSyntaxParser.dylib library.