mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Report cursor info information for literals
Adds literals support for the CursorInfo request. Previously CursorInfo just returned error for literals. Implements issue #57725
This commit is contained in:
@@ -333,6 +333,13 @@ UIdent SwiftLangSupport::getUIDForDecl(const Decl *D, bool IsRef) {
|
||||
return UIdentVisitor(IsRef).visit(const_cast<Decl*>(D));
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForLiteral(const Expr *Lit) {
|
||||
if (dyn_cast<ObjectLiteralExpr>(Lit)) {
|
||||
return KindExprObjectLiteral;
|
||||
}
|
||||
return KindExprLiteral;
|
||||
}
|
||||
|
||||
UIdent SwiftLangSupport::getUIDForExtensionOfDecl(const Decl *D) {
|
||||
switch (D->getKind()) {
|
||||
case swift::DeclKind::Struct:
|
||||
|
||||
Reference in New Issue
Block a user