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

Method find_all

tools/inspector_protocol/jinja2/nodes.py:184–192  ·  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)

Source from the content-addressed store, hash-verified

182 return result
183
184 def find_all(self, node_type):
185 """Find all the nodes of a given type. If the type is a tuple,
186 the check is performed for any of the tuple items.
187 """
188 for child in self.iter_child_nodes():
189 if isinstance(child, node_type):
190 yield child
191 for result in child.find_all(node_type):
192 yield result
193
194 def set_ctx(self, ctx):
195 """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