#include "clang/Index/CommentToXML.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Comment.h"
#include "clang/AST/CommentVisitor.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Index/USRGeneration.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Support/raw_ostream.h"
usingnamespaceclang;
usingnamespaceclang::comments;
usingnamespaceclang::index;
namespace {
class ParamCommandCommentCompareIndex { … };
class TParamCommandCommentComparePosition { … };
struct FullCommentParts { … };
FullCommentParts::FullCommentParts(const FullComment *C,
const CommandTraits &Traits) : … { … }
void printHTMLStartTagComment(const HTMLStartTagComment *C,
llvm::raw_svector_ostream &Result) { … }
class CommentASTToHTMLConverter :
public ConstCommentVisitor<CommentASTToHTMLConverter> { … };
}
void CommentASTToHTMLConverter::visitTextComment(const TextComment *C) { … }
void CommentASTToHTMLConverter::visitInlineCommandComment(
const InlineCommandComment *C) { … }
void CommentASTToHTMLConverter::visitHTMLStartTagComment(
const HTMLStartTagComment *C) { … }
void CommentASTToHTMLConverter::visitHTMLEndTagComment(
const HTMLEndTagComment *C) { … }
void CommentASTToHTMLConverter::visitParagraphComment(
const ParagraphComment *C) { … }
void CommentASTToHTMLConverter::visitBlockCommandComment(
const BlockCommandComment *C) { … }
void CommentASTToHTMLConverter::visitParamCommandComment(
const ParamCommandComment *C) { … }
void CommentASTToHTMLConverter::visitTParamCommandComment(
const TParamCommandComment *C) { … }
void CommentASTToHTMLConverter::visitVerbatimBlockComment(
const VerbatimBlockComment *C) { … }
void CommentASTToHTMLConverter::visitVerbatimBlockLineComment(
const VerbatimBlockLineComment *C) { … }
void CommentASTToHTMLConverter::visitVerbatimLineComment(
const VerbatimLineComment *C) { … }
void CommentASTToHTMLConverter::visitFullComment(const FullComment *C) { … }
void CommentASTToHTMLConverter::visitNonStandaloneParagraphComment(
const ParagraphComment *C) { … }
void CommentASTToHTMLConverter::appendToResultWithHTMLEscaping(StringRef S) { … }
namespace {
class CommentASTToXMLConverter :
public ConstCommentVisitor<CommentASTToXMLConverter> { … };
void getSourceTextOfDeclaration(const DeclInfo *ThisDecl,
SmallVectorImpl<char> &Str) { … }
void CommentASTToXMLConverter::formatTextOfDeclaration(
const DeclInfo *DI, SmallString<128> &Declaration) { … }
}
void CommentASTToXMLConverter::visitTextComment(const TextComment *C) { … }
void CommentASTToXMLConverter::visitInlineCommandComment(
const InlineCommandComment *C) { … }
void CommentASTToXMLConverter::visitHTMLStartTagComment(
const HTMLStartTagComment *C) { … }
void
CommentASTToXMLConverter::visitHTMLEndTagComment(const HTMLEndTagComment *C) { … }
void CommentASTToXMLConverter::visitParagraphComment(
const ParagraphComment *C) { … }
void CommentASTToXMLConverter::appendParagraphCommentWithKind(
const ParagraphComment *C, StringRef ParagraphKind,
StringRef PrependBodyText) { … }
void CommentASTToXMLConverter::visitBlockCommandComment(
const BlockCommandComment *C) { … }
void CommentASTToXMLConverter::visitParamCommandComment(
const ParamCommandComment *C) { … }
void CommentASTToXMLConverter::visitTParamCommandComment(
const TParamCommandComment *C) { … }
void CommentASTToXMLConverter::visitVerbatimBlockComment(
const VerbatimBlockComment *C) { … }
void CommentASTToXMLConverter::visitVerbatimBlockLineComment(
const VerbatimBlockLineComment *C) { … }
void CommentASTToXMLConverter::visitVerbatimLineComment(
const VerbatimLineComment *C) { … }
void CommentASTToXMLConverter::visitFullComment(const FullComment *C) { … }
void CommentASTToXMLConverter::appendToResultWithXMLEscaping(StringRef S) { … }
void CommentASTToXMLConverter::appendToResultWithCDATAEscaping(StringRef S) { … }
CommentToXMLConverter::CommentToXMLConverter() { … }
CommentToXMLConverter::~CommentToXMLConverter() { … }
void CommentToXMLConverter::convertCommentToHTML(const FullComment *FC,
SmallVectorImpl<char> &HTML,
const ASTContext &Context) { … }
void CommentToXMLConverter::convertHTMLTagNodeToText(
const comments::HTMLTagComment *HTC, SmallVectorImpl<char> &Text,
const ASTContext &Context) { … }
void CommentToXMLConverter::convertCommentToXML(const FullComment *FC,
SmallVectorImpl<char> &XML,
const ASTContext &Context) { … }