JavaScript: Expose another useful predicate on API-graph nodes.

This commit is contained in:
Max Schaefer
2020-09-17 11:58:01 +01:00
parent 86404af501
commit 46ba4a1fa8

View File

@@ -223,6 +223,9 @@ module API {
) and
length in [1 .. Impl::distanceFromRoot(this)]
}
/** Gets the shortest distance from the root to this node in the API graph. */
int getDepth() { result = Impl::distanceFromRoot(this) }
}
/** The root node of an API graph. */