MCPcopy Create free account
hub / github.com/nodejs/node / find_all

Method find_all

deps/v8/third_party/jinja2/nodes.py:193–202  ·  view source on GitHub ↗

Find all the nodes of a given type. If the type is a tuple, the check is performed for any of the tuple items.

(
        self, node_type: t.Union[t.Type[_NodeBound], t.Tuple[t.Type[_NodeBound], ...]]
    )

Source from the content-addressed store, hash-verified

191 return None
192
193 def find_all(
194 self, node_type: t.Union[t.Type[_NodeBound], t.Tuple[t.Type[_NodeBound], ...]]
195 ) -> t.Iterator[_NodeBound]:
196 """Find all the nodes of a given type. If the type is a tuple,
197 the check is performed for any of the tuple items.
198 """
199 for child in self.iter_child_nodes():
200 if isinstance(child, node_type):
201 yield child # type: ignore
202 yield from child.find_all(node_type)
203
204 def set_ctx(self, ctx: str) -> "Node":
205 """Reset the context of a node and all child nodes. Per default the

Callers 5

findMethod · 0.95
extract_from_astFunction · 0.45
visit_TemplateMethod · 0.45
visit_ForMethod · 0.45

Calls 1

iter_child_nodesMethod · 0.95

Tested by

no test coverage detected