Add helper method for Kotlin indexer
The Kotlin indexer uses this helper method.
@@ -122,6 +122,12 @@ public class KytheEntrySets {
return new NodeBuilder(kind, language);
}
+ /** Returns a new {@link NodeBuilder} with the given node kind and vname set. */
+ public NodeBuilder newNode(NodeKind kind, VName source) {
+ getStatisticsCollector().incrementCounter("new-node-" + kind);
+ return new NodeBuilder(kind, source);
+ }
+
/** Returns (and emits) a new builtin node. */
public EntrySet newBuiltinAndEmit(String name) {
return newBuiltinAndEmit(name, Optional.empty());
