feat(indexing): add ref/id edge
* feat(indexing): add ref/id edge
This PR adds a new edge, `ref/id`, meant to help return more complete
lists of use sites for the identifiers for nodes. In particular, it
should help automated refactoring tools.
Other names that have been proposed for this edge include `ref/nominal`
and `ref/syntactic`.
@@ -1201,6 +1201,34 @@ public class E {
}
--------------------------------------------------------------------------------
+[[refid]]
+ref/id
+~~~~~~~~~~~
+Brief description::
+ A *ref/id* B if A does not otherwise *ref* or *define* B but the bytes of A's
+ span are determined by the identifier of B.
+Points from::
+ anchors
+Points toward::
+ semantic nodes
+Ordinals are used::
+ never
+
+[kythe,C++,"Constructors and destructors are named after their classes."]
+--------------------------------------------------------------------------------
+//- @C defines/binding ClassC
+class C {
+ //- @C defines/binding CtorC
+ //- // @C ref/id ClassC
+ C(int i);
+};
+
+//- @"C(1)" ref/call CtorC
+//- @C ref CtorC
+//- // @C ref/id ClassC
+void f() { auto c = C(1); }
+--------------------------------------------------------------------------------
+
[[refincludes]]
ref/includes
~~~~~~~~~~~~
