True when `node` is nested inside another function_definition -- typically a lambda body or an inline helper. Such nodes inherit the enclosing function's @brief.
(node)
| 2238 | |
| 2239 | |
| 2240 | def _has_function_ancestor(node) -> bool: |
| 2241 | """True when `node` is nested inside another function_definition -- |
| 2242 | typically a lambda body or an inline helper. Such nodes inherit the |
| 2243 | enclosing function's @brief.""" |
| 2244 | parent = node.parent |
| 2245 | while parent is not None: |
| 2246 | if parent.type in ("function_definition", "lambda_expression"): |
| 2247 | return True |
| 2248 | parent = parent.parent |
| 2249 | return False |
| 2250 | |
| 2251 | |
| 2252 | def _comment_in_function_body(node) -> bool: |