MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / nodeFinder

Function nodeFinder

src/util/nodeFinders.ts:5–11  ·  view source on GitHub ↗
(
  isTargetNode: (node: SyntaxNode) => boolean
)

Source from the content-addressed store, hash-verified

3import { NodeFinder } from "../typings/Types";
4
5export const nodeFinder = (
6 isTargetNode: (node: SyntaxNode) => boolean
7): NodeFinder => {
8 return (node: SyntaxNode) => {
9 return isTargetNode(node) ? node : null;
10 };
11};
12
13/**
14 * Given a list of node finders returns a new node finder which applies them in

Callers 4

csharp.tsFile · 0.90
chainedMatcherFunction · 0.85
chainedNodeFinderFunction · 0.85
typedNodeFinderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected