Yield the identifier value-nodes of a dict/list/set/tuple literal that are function-reference candidates: dict VALUES (never keys), and the elements of a list/set/tuple. Nested collections are reached by the caller's own recursion.
(coll_node)
| 4979 | _emit_indirect_by_name(ident_name, ident, scope_nid, context) |
| 4980 | |
| 4981 | def _python_dispatch_value_idents(coll_node): |
| 4982 | """Yield the identifier value-nodes of a dict/list/set/tuple literal that are |
| 4983 | function-reference candidates: dict VALUES (never keys), and the elements of a |
| 4984 | list/set/tuple. Nested collections are reached by the caller's own recursion.""" |
| 4985 | if coll_node.type == "dictionary": |
| 4986 | for pair in coll_node.children: |
| 4987 | if pair.type == "pair": |
| 4988 | val = pair.child_by_field_name("value") |
| 4989 | if val is not None and val.type == "identifier": |
| 4990 | yield val |
| 4991 | else: # list / set / tuple |
| 4992 | for el in coll_node.children: |
| 4993 | if el.type == "identifier": |
| 4994 | yield el |
| 4995 | |
| 4996 | def _python_ref_value_idents(value_node): |
| 4997 | """Identifiers on the VALUE side of an assignment RHS or a return: a bare name |
no outgoing calls
no test coverage detected