================
@@ -214,52 +202,53 @@ struct OrderedListNode : BlockNode {
 struct BlockQuoteNode : BlockNode {
   BlockList Children;
   BlockQuoteNode() : BlockNode(NodeKind::NK_BlockQuote) {}
-  void dump(llvm::raw_ostream &OS = llvm::errs()) const {
-    OS << "BlockQuoteNode\n";
-  }
+  void print(llvm::raw_ostream &OS) const;
+  LLVM_DUMP_METHOD void dump() const;
   static bool classof(const BlockNode *N) {
     return N->Kind == NodeKind::NK_BlockQuote;
   }
 };
 
 struct ThematicBreakNode : BlockNode {
   ThematicBreakNode() : BlockNode(NodeKind::NK_ThematicBreak) {}
-  void dump(llvm::raw_ostream &OS = llvm::errs()) const {
-    OS << "ThematicBreakNode\n";
-  }
+  void print(llvm::raw_ostream &OS) const;
+  LLVM_DUMP_METHOD void dump() const;
   static bool classof(const BlockNode *N) {
     return N->Kind == NodeKind::NK_ThematicBreak;
   }
 };
 
 struct DocumentNode : BlockNode {
+  // FIXME: add constructor that accepts children once parser is in place
   BlockList Children;
   DocumentNode() : BlockNode(NodeKind::NK_Document) {}
-  void dump(llvm::raw_ostream &OS = llvm::errs()) const {
-    OS << "DocumentNode\n";
-  }
+  void print(llvm::raw_ostream &OS) const;
+  LLVM_DUMP_METHOD void dump() const;
   static bool classof(const BlockNode *N) {
     return N->Kind == NodeKind::NK_Document;
   }
 };
 
 
//===----------------------------------------------------------------------===//
----------------
ilovepi wrote:

Not sure this comment block is pulling much weight. You're probably better 
served by adding documentation to the class itself. 

Also everything is in markdown.cpp/h, you may want to consider at what point 
keeping everything in a single TU is no longer the best choice, and what that 
division would look like. 

https://github.com/llvm/llvm-project/pull/205609
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to