================
@@ -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;
}
};
//===----------------------------------------------------------------------===//
----------------
Neil-N4 wrote:
Moved docs to the classes themselves. will think about splitting TUs once the
parser grows more
https://github.com/llvm/llvm-project/pull/205609
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits