mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Replace decl.name with syntaxtype.keyword as appropriate
We aren't ready to start marking up all keywords yet, but start by replacing the cases where we currently have decl.name. rdar://problem/24292226
This commit is contained in:
@@ -82,6 +82,11 @@ static StringRef getDeclNameTagForDecl(const Decl *D) {
|
||||
// When we're examining the parameter itself, it is the local name that is
|
||||
// the name of the variable.
|
||||
return LocalParamNameTag;
|
||||
case DeclKind::Constructor:
|
||||
case DeclKind::Destructor:
|
||||
case DeclKind::Subscript:
|
||||
// The names 'init'/'deinit'/'subscript' are actually keywords.
|
||||
return "syntaxtype.keyword";
|
||||
default:
|
||||
return "decl.name";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user