hasFunctionAncestor (tree-sitter.ts:295).
(node: Node)
| 2712 | |
| 2713 | /// hasFunctionAncestor (tree-sitter.ts:295). |
| 2714 | fn has_function_ancestor(node: Node) -> bool { |
| 2715 | let mut p = node.parent(); |
| 2716 | while let Some(n) = p { |
| 2717 | if n.kind() == "function_definition" { |
| 2718 | return true; |
| 2719 | } |
| 2720 | p = n.parent(); |
| 2721 | } |
| 2722 | false |
| 2723 | } |
| 2724 | |
| 2725 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 2726 | match s { |