MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / visit

Method visit

tools/python-3.11.9-amd64/Lib/ast.py:814–819  ·  view source on GitHub ↗

Outputs a source code string that, if converted back to an ast (using ast.parse) will generate an AST equivalent to *node*

(self, node)

Source from the content-addressed store, hash-verified

812 # NodeVisitor.generic_visit to handle any nodes (as it calls back in to
813 # the subclass visit() method, which resets self._source to an empty list)
814 def visit(self, node):
815 """Outputs a source code string that, if converted back to an ast
816 (using ast.parse) will generate an AST equivalent to *node*"""
817 self._source = []
818 self.traverse(node)
819 return "".join(self._source)
820
821 def _write_docstring_and_traverse_body(self, node):
822 if (docstring := self.get_raw_docstring(node)):

Callers 8

generic_visitMethod · 0.45
traverseMethod · 0.45
unparse_innerMethod · 0.45
unparseFunction · 0.45
findsourceFunction · 0.45
visit_BinOpMethod · 0.45
pFunction · 0.45
_create_treeFunction · 0.45

Calls 2

traverseMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected