TS_JS_SPEC.dispatch: container node type → capture mode.
(kind: &str)
| 33 | |
| 34 | /// TS_JS_SPEC.dispatch: container node type → capture mode. |
| 35 | pub 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. |
| 47 | pub fn capture(container: Node, mode: Mode, src: &str) -> Vec<(Candidate, Mode)> { |
no outgoing calls
no test coverage detected