xref: /freebsd-src/contrib/llvm-project/clang/include/clang/Index/CommentToXML.h (revision fe6060f10f634930ff71b7c50291ddc610da2475)
1*0b57cec5SDimitry Andric //===--- CommentToXML.h - Convert comments to XML representation ----------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric 
9*0b57cec5SDimitry Andric #ifndef LLVM_CLANG_INDEX_COMMENTTOXML_H
10*0b57cec5SDimitry Andric #define LLVM_CLANG_INDEX_COMMENTTOXML_H
11*0b57cec5SDimitry Andric 
12*0b57cec5SDimitry Andric #include "clang/Basic/LLVM.h"
13*0b57cec5SDimitry Andric 
14*0b57cec5SDimitry Andric namespace clang {
15*0b57cec5SDimitry Andric class ASTContext;
16*0b57cec5SDimitry Andric 
17*0b57cec5SDimitry Andric namespace comments {
18*0b57cec5SDimitry Andric class FullComment;
19*0b57cec5SDimitry Andric class HTMLTagComment;
20*0b57cec5SDimitry Andric }
21*0b57cec5SDimitry Andric 
22*0b57cec5SDimitry Andric namespace index {
23*0b57cec5SDimitry Andric class CommentToXMLConverter {
24*0b57cec5SDimitry Andric public:
25*0b57cec5SDimitry Andric   CommentToXMLConverter();
26*0b57cec5SDimitry Andric   ~CommentToXMLConverter();
27*0b57cec5SDimitry Andric 
28*0b57cec5SDimitry Andric   void convertCommentToHTML(const comments::FullComment *FC,
29*0b57cec5SDimitry Andric                             SmallVectorImpl<char> &HTML,
30*0b57cec5SDimitry Andric                             const ASTContext &Context);
31*0b57cec5SDimitry Andric 
32*0b57cec5SDimitry Andric   void convertHTMLTagNodeToText(const comments::HTMLTagComment *HTC,
33*0b57cec5SDimitry Andric                                 SmallVectorImpl<char> &Text,
34*0b57cec5SDimitry Andric                                 const ASTContext &Context);
35*0b57cec5SDimitry Andric 
36*0b57cec5SDimitry Andric   void convertCommentToXML(const comments::FullComment *FC,
37*0b57cec5SDimitry Andric                            SmallVectorImpl<char> &XML,
38*0b57cec5SDimitry Andric                            const ASTContext &Context);
39*0b57cec5SDimitry Andric };
40*0b57cec5SDimitry Andric 
41*0b57cec5SDimitry Andric } // namespace index
42*0b57cec5SDimitry Andric } // namespace clang
43*0b57cec5SDimitry Andric 
44*0b57cec5SDimitry Andric #endif // LLVM_CLANG_INDEX_COMMENTTOXML_H
45*0b57cec5SDimitry Andric 
46