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