I'm currently adding support for Objective-C to Noctule.
I noticed that all declarations and references to structs in following snippet are highlighted by SourceKit LSP with tokenType "class":
struct First { // <-- First is highlighted as "class", not "struct"
int a;
};
typedef struct {
int a;
} Second; // <-- Second is highlighted as "class", not "struct"
int something() {
struct First first; // <-- First is highlighted as "class", not "struct"
Second second; // <-- Second is highlighted as "class", not "struct"
}
Is this a limitation of SourceKit LSP and/or clang or is it more likely a bug and "struct" should used for highlighting?
Maybe C++ bias? In C++ struct and class are interchangeable outside of the original definition (and even within it's just setting the default visibility). And C doesn't have classes at all, so distinguishing them doesn't matter (until it's Objective-C).