You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/15 07:01:30 UTC

[GitHub] [tvm] junrushao1994 commented on a diff in pull request #12048: [TVMScript] ExprDoc

junrushao1994 commented on code in PR #12048:
URL: https://github.com/apache/tvm/pull/12048#discussion_r921872445


##########
include/tvm/script/printer/doc.h:
##########
@@ -63,13 +63,43 @@ class Doc : public ObjectRef {
   TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS(Doc, ObjectRef, DocNode);
 };
 
+class ExprDoc;
+
 /*!
  * \brief The base class of expression doc.
  *
  * \sa ExprDoc
  */
 class ExprDocNode : public DocNode {
  public:
+  /*!
+   * \brief Create a doc representing attribute access on the current ExprDoc
+   * \param attr The attribute to access.
+   */
+  ExprDoc Attr(String attr) const;
+
+  /*!
+   * \brief Create a doc representing index access on the current ExprDoc
+   * \param indices The indices to access.
+   */
+  ExprDoc Index(Array<Doc> indices) const;
+
+  /*!
+   * \brief Create a doc representing calling the current ExprDoc
+   * \param args The positional arguments of the function call.
+   */
+  ExprDoc Call(Array<ExprDoc, void> args) const;
+
+  /*!
+   * \brief Create a doc representing attribute access on the current ExprDoc
+   * \param args The positional arguments of the function call.
+   * \param kwargs_keys Keys of keywords arguments of the function call.
+   * \param kwargs_values Values of keywords arguments of the function call.
+   */
+  ExprDoc Call(Array<ExprDoc, void> args,        //
+               Array<String, void> kwargs_keys,  //

Review Comment:
   nit
   
   ```suggestion
                  Array<String> kwargs_keys,  //
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org