13 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_FORMATTEDSTRING_H 14 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_FORMATTEDSTRING_H 16 #include "llvm/Support/raw_ostream.h" 36 virtual bool isRuler()
const {
return false; }
37 virtual ~Block() =
default;
64 std::vector<Chunk> Chunks;
77 std::vector<class Document> Items;
90 void addCodeBlock(std::string
Code, std::string Language =
"cpp");
103 std::vector<std::unique_ptr<Block>>
Children;
virtual void renderPlainText(llvm::raw_ostream &OS) const =0
std::string asPlainText() const
virtual bool isRuler() const
std::string asMarkdown() const
A format-agnostic representation for structured text.
std::vector< std::unique_ptr< HTMLNode > > Children
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Represents parts of the markup that can contain strings, like inline code, code block or plain text...
Holds text and knows how to lay it out.
virtual void renderMarkdown(llvm::raw_ostream &OS) const =0
Represents a sequence of one or more documents.