mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When the SymbolGraph json is requested via (key.retrieve_symbol_graph: 1) this adds
a new field in the response that lists all the parent contexts of the symbol under
the cursor with their symbol graph kind and name, and their USR:
key.parent_contexts: [
{
key.kind: "swift.struct",
key.name: "Parent",
key.usr: "s:27cursor_symbol_graph_parents6ParentV"
},
...
]
}
Resolves rdar://problem/73904365
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
//===--- SymbolGraphPathComponent.h - Swift SymbolGraph Path Component ----===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_SYMBOLGRAPHGEN_PATHCOMPONENT_H
|
|
#define SWIFT_SYMBOLGRAPHGEN_PATHCOMPONENT_H
|
|
|
|
#include "llvm/ADT/SmallString.h"
|
|
|
|
namespace swift {
|
|
class ValueDecl;
|
|
|
|
namespace symbolgraphgen {
|
|
|
|
/// Summary information for a node along a path through a symbol graph.
|
|
struct PathComponent {
|
|
/// The title of the corresponding symbol graph node.
|
|
SmallString<32> Title;
|
|
/// The kind of the corresponding symbol graph node.
|
|
StringRef Kind;
|
|
/// The swift decl associated with the corresponding symbol graph node.
|
|
const ValueDecl *VD;
|
|
};
|
|
|
|
} // end namespace symbolgraphgen
|
|
} // end namespace swift
|
|
|
|
#endif // SWIFT_SYMBOLGRAPHGEN_PATHCOMPONENT_H
|