The Ruby `call` node whose argument_list (or keyword pair) contains `node` — nearest `call` ancestor within 4 parent hops (function-ref.ts:837).
(node: Node)
| 1112 | /// The Ruby `call` node whose argument_list (or keyword pair) contains `node` |
| 1113 | /// — nearest `call` ancestor within 4 parent hops (function-ref.ts:837). |
| 1114 | fn ruby_enclosing_call(node: Node) -> Option<Node> { |
| 1115 | let mut cur = node.parent(); |
| 1116 | for _ in 0..4 { |
| 1117 | let c = cur?; |
| 1118 | if c.kind() == "call" { |
| 1119 | return Some(c); |
| 1120 | } |
| 1121 | cur = c.parent(); |
| 1122 | } |
| 1123 | None |
| 1124 | } |
| 1125 | |
| 1126 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 1127 | match s { |
no outgoing calls
no test coverage detected