MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / dispatch

Function dispatch

codegraph-kernel/src/tsjs/fnref.rs:35–44  ·  view source on GitHub ↗

TS_JS_SPEC.dispatch: container node type → capture mode.

(kind: &str)

Source from the content-addressed store, hash-verified

33
34/// TS_JS_SPEC.dispatch: container node type → capture mode.
35pub fn dispatch(kind: &str) -> Option<Mode> {
36 match kind {
37 "arguments" => Some(Mode::Args),
38 "assignment_expression" => Some(Mode::Rhs),
39 "variable_declarator" => Some(Mode::VarInit),
40 "pair" => Some(Mode::Value),
41 "array" => Some(Mode::List),
42 _ => None,
43 }
44}
45
46/// captureFnRefCandidates for the TS/JS spec. Returns (candidate, mode) pairs.
47pub fn capture(container: Node, mode: Mode, src: &str) -> Vec<(Candidate, Mode)> {

Callers 1

maybe_capture_fn_refsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected