MCPcopy Create free account
hub / github.com/apache/tvm / visit

Method visit

python/tvm/script/parser/core/doc.py:231–242  ·  view source on GitHub ↗
(self, node: doc.AST)

Source from the content-addressed store, hash-verified

229 """Node visitor for doc AST"""
230
231 def visit(self, node: doc.AST) -> None:
232 if isinstance(node, list | tuple):
233 for item in node:
234 self.visit(item)
235 return
236 if not isinstance(node, doc.AST):
237 return
238 getattr(
239 self,
240 "visit_" + node.__class__.__name__.split(".")[-1],
241 self.generic_visit,
242 )(node)
243
244 def generic_visit(self, node: doc.AST) -> None:
245 for field in node.__class__._FIELDS: # pylint: disable=protected-access

Callers 1

generic_visitMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected