MCPcopy Index your code
hub / github.com/apache/tvm / as_ast

Method as_ast

python/tvm/script/parser/core/diagnostics.py:92–100  ·  view source on GitHub ↗

Parse the source code into AST. Returns ------- res : doc.AST The AST of source code.

(self)

Source from the content-addressed store, hash-verified

90 self.full_source = "".join(src)
91
92 def as_ast(self) -> doc.AST:
93 """Parse the source code into AST.
94
95 Returns
96 -------
97 res : doc.AST
98 The AST of source code.
99 """
100 return doc.parse(self.source)
101
102
103_getfile = inspect.getfile # pylint: disable=invalid-name

Callers 5

parseFunction · 0.95
test_source_astFunction · 0.95
_calcFunction · 0.95
get_macro_defMethod · 0.80
parseMethod · 0.80

Calls 1

parseMethod · 0.80

Tested by 2

test_source_astFunction · 0.76
_calcFunction · 0.76