Function tvm::script::printer::ToStmtDocArray#
Defined in File doc_translator.h
Function Documentation#
-
inline ffi::Array<StmtDoc> tvm::script::printer::ToStmtDocArray(const ffi::List<Doc> &docs)#
Convert collected Docs to statements in their original order.
- Parameters:
docs – The Docs to convert, without modifying the collection.
- Throws:
ffi::Error – If a Doc is neither a StmtBlockDoc nor a StmtDoc.
- Returns:
An owning array containing each StmtBlockDoc’s statements in place, and each other Doc converted with as_or_throw<StmtDoc>().