本文整理汇总了Python中incoq.compiler.incast.L.export_incast方法的典型用法代码示例。如果您正苦于以下问题:Python L.export_incast方法的具体用法?Python L.export_incast怎么用?Python L.export_incast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类incoq.compiler.incast.L
的用法示例。
在下文中一共展示了L.export_incast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: py_postprocess
# 需要导入模块: from incoq.compiler.incast import L [as 别名]
# 或者: from incoq.compiler.incast.L import export_incast [as 别名]
def py_postprocess(tree, *, decls, header):
"""Take in an IncAST tree, postprocess it, and return the
corresponding Python AST tree. See postprocess_var_decls()
for the format of decls.
"""
# Convert to Python AST.
tree = L.export_incast(tree)
# Add in declarations for relations.
tree = postprocess_var_decls(tree, decls)
# Add in main boilerplate, if main() is defined.
tree = postprocess_main_call(tree)
# Add the runtime import statement.
tree = postprocess_runtime_import(tree)
# Correct any missing Pass statements.
tree = postprocess_pass(tree)
# Add header information.
tree = postprocess_header(tree, header)
return tree