2014-04-28 10:39:27 +08:00
|
|
|
/*==-- clang-c/Documentation.h - Utilities for comment processing -*- C -*-===*\
|
|
|
|
|* *|
|
2019-01-19 16:50:56 +08:00
|
|
|
|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
|
|
|
|
|* Exceptions. *|
|
|
|
|
|* See https://llvm.org/LICENSE.txt for license information. *|
|
|
|
|
|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
|
2014-04-28 10:39:27 +08:00
|
|
|
|* *|
|
|
|
|
|*===----------------------------------------------------------------------===*|
|
|
|
|
|* *|
|
|
|
|
|* This header provides a supplementary interface for inspecting *|
|
|
|
|
|* documentation comments. *|
|
|
|
|
|* *|
|
|
|
|
\*===----------------------------------------------------------------------===*/
|
|
|
|
|
2014-08-14 00:25:19 +08:00
|
|
|
#ifndef LLVM_CLANG_C_DOCUMENTATION_H
|
|
|
|
#define LLVM_CLANG_C_DOCUMENTATION_H
|
2014-04-28 10:39:27 +08:00
|
|
|
|
|
|
|
#include "clang-c/Index.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \defgroup CINDEX_COMMENT Comment introspection
|
|
|
|
*
|
|
|
|
* The routines in this group provide access to information in documentation
|
|
|
|
* comments. These facilities are distinct from the core and may be subject to
|
|
|
|
* their own schedule of stability and deprecation.
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A parsed comment.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
typedef struct {
|
|
|
|
const void *ASTNode;
|
|
|
|
CXTranslationUnit TranslationUnit;
|
|
|
|
} CXComment;
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Given a cursor that represents a documentable entity (e.g.,
|
2014-04-28 10:39:27 +08:00
|
|
|
* declaration), return the associated parsed comment as a
|
|
|
|
* \c CXComment_FullComment AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXComment clang_Cursor_getParsedComment(CXCursor C);
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Describes the type of the comment AST node (\c CXComment). A comment
|
2014-04-28 10:39:27 +08:00
|
|
|
* node can be considered block content (e. g., paragraph), inline content
|
|
|
|
* (plain text) or neither (the root AST node).
|
|
|
|
*/
|
|
|
|
enum CXCommentKind {
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Null comment. No AST node is constructed at the requested location
|
2014-04-28 10:39:27 +08:00
|
|
|
* because there is no text or a syntax error.
|
|
|
|
*/
|
|
|
|
CXComment_Null = 0,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Plain text. Inline content.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXComment_Text = 1,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A command with word-like arguments that is considered inline content.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* For example: \\c command.
|
|
|
|
*/
|
|
|
|
CXComment_InlineCommand = 2,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* HTML start tag with attributes (name-value pairs). Considered
|
2014-04-28 10:39:27 +08:00
|
|
|
* inline content.
|
|
|
|
*
|
|
|
|
* For example:
|
|
|
|
* \verbatim
|
|
|
|
* <br> <br /> <a href="http://example.org/">
|
|
|
|
* \endverbatim
|
|
|
|
*/
|
|
|
|
CXComment_HTMLStartTag = 3,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* HTML end tag. Considered inline content.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* For example:
|
|
|
|
* \verbatim
|
|
|
|
* </a>
|
|
|
|
* \endverbatim
|
|
|
|
*/
|
|
|
|
CXComment_HTMLEndTag = 4,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A paragraph, contains inline comment. The paragraph itself is
|
2014-04-28 10:39:27 +08:00
|
|
|
* block content.
|
|
|
|
*/
|
|
|
|
CXComment_Paragraph = 5,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A command that has zero or more word-like arguments (number of
|
2014-04-28 10:39:27 +08:00
|
|
|
* word-like arguments depends on command name) and a paragraph as an
|
|
|
|
* argument. Block command is block content.
|
|
|
|
*
|
|
|
|
* Paragraph argument is also a child of the block command.
|
|
|
|
*
|
2018-05-09 09:00:01 +08:00
|
|
|
* For example: \has 0 word-like arguments and a paragraph argument.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* AST nodes of special kinds that parser knows about (e. g., \\param
|
|
|
|
* command) have their own node kinds.
|
|
|
|
*/
|
|
|
|
CXComment_BlockCommand = 6,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A \\param or \\arg command that describes the function parameter
|
2014-04-28 10:39:27 +08:00
|
|
|
* (name, passing direction, description).
|
|
|
|
*
|
|
|
|
* For example: \\param [in] ParamName description.
|
|
|
|
*/
|
|
|
|
CXComment_ParamCommand = 7,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A \\tparam command that describes a template parameter (name and
|
2014-04-28 10:39:27 +08:00
|
|
|
* description).
|
|
|
|
*
|
|
|
|
* For example: \\tparam T description.
|
|
|
|
*/
|
|
|
|
CXComment_TParamCommand = 8,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A verbatim block command (e. g., preformatted code). Verbatim
|
2014-04-28 10:39:27 +08:00
|
|
|
* block has an opening and a closing command and contains multiple lines of
|
|
|
|
* text (\c CXComment_VerbatimBlockLine child nodes).
|
|
|
|
*
|
|
|
|
* For example:
|
|
|
|
* \\verbatim
|
|
|
|
* aaa
|
|
|
|
* \\endverbatim
|
|
|
|
*/
|
|
|
|
CXComment_VerbatimBlockCommand = 9,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A line of text that is contained within a
|
2014-04-28 10:39:27 +08:00
|
|
|
* CXComment_VerbatimBlockCommand node.
|
|
|
|
*/
|
|
|
|
CXComment_VerbatimBlockLine = 10,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A verbatim line command. Verbatim line has an opening command,
|
2014-04-28 10:39:27 +08:00
|
|
|
* a single line of text (up to the newline after the opening command) and
|
|
|
|
* has no closing command.
|
|
|
|
*/
|
|
|
|
CXComment_VerbatimLine = 11,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A full comment attached to a declaration, contains block content.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXComment_FullComment = 12
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* The most appropriate rendering mode for an inline command, chosen on
|
2014-04-28 10:39:27 +08:00
|
|
|
* command semantics in Doxygen.
|
|
|
|
*/
|
|
|
|
enum CXCommentInlineCommandRenderKind {
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Command argument should be rendered in a normal font.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentInlineCommandRenderKind_Normal,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Command argument should be rendered in a bold font.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentInlineCommandRenderKind_Bold,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Command argument should be rendered in a monospaced font.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentInlineCommandRenderKind_Monospaced,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Command argument should be rendered emphasized (typically italic
|
2014-04-28 10:39:27 +08:00
|
|
|
* font).
|
|
|
|
*/
|
|
|
|
CXCommentInlineCommandRenderKind_Emphasized
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Describes parameter passing direction for \\param or \\arg command.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
enum CXCommentParamPassDirection {
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* The parameter is an input parameter.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentParamPassDirection_In,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* The parameter is an output parameter.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentParamPassDirection_Out,
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* The parameter is an input and output parameter.
|
2014-04-28 10:39:27 +08:00
|
|
|
*/
|
|
|
|
CXCommentParamPassDirection_InOut
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment AST node of any kind.
|
|
|
|
*
|
|
|
|
* \returns the type of the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE enum CXCommentKind clang_Comment_getKind(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment AST node of any kind.
|
|
|
|
*
|
|
|
|
* \returns number of children of the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE unsigned clang_Comment_getNumChildren(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment AST node of any kind.
|
|
|
|
*
|
|
|
|
* \param ChildIdx child index (zero-based).
|
|
|
|
*
|
|
|
|
* \returns the specified child of the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXComment clang_Comment_getChild(CXComment Comment, unsigned ChildIdx);
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* A \c CXComment_Paragraph node is considered whitespace if it contains
|
2014-04-28 10:39:27 +08:00
|
|
|
* only \c CXComment_Text nodes that are empty or whitespace.
|
|
|
|
*
|
|
|
|
* Other AST nodes (except \c CXComment_Paragraph and \c CXComment_Text) are
|
|
|
|
* never considered whitespace.
|
|
|
|
*
|
|
|
|
* \returns non-zero if \c Comment is whitespace.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE unsigned clang_Comment_isWhitespace(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \returns non-zero if \c Comment is inline content and has a newline
|
|
|
|
* immediately following it in the comment text. Newlines between paragraphs
|
|
|
|
* do not count.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_InlineContentComment_hasTrailingNewline(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_Text AST node.
|
|
|
|
*
|
|
|
|
* \returns text contained in the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_TextComment_getText(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_InlineCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns name of the inline command.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_InlineCommandComment_getCommandName(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_InlineCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns the most appropriate rendering mode, chosen on command
|
|
|
|
* semantics in Doxygen.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE enum CXCommentInlineCommandRenderKind
|
|
|
|
clang_InlineCommandComment_getRenderKind(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_InlineCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns number of command arguments.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_InlineCommandComment_getNumArgs(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_InlineCommand AST node.
|
|
|
|
*
|
|
|
|
* \param ArgIdx argument index (zero-based).
|
|
|
|
*
|
|
|
|
* \returns text of the specified argument.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_InlineCommandComment_getArgText(CXComment Comment,
|
|
|
|
unsigned ArgIdx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
|
|
|
|
* node.
|
|
|
|
*
|
|
|
|
* \returns HTML tag name.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_HTMLTagComment_getTagName(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
|
|
|
*
|
|
|
|
* \returns non-zero if tag is self-closing (for example, <br />).
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_HTMLStartTagComment_isSelfClosing(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
|
|
|
*
|
|
|
|
* \returns number of attributes (name-value pairs) attached to the start tag.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE unsigned clang_HTMLStartTag_getNumAttrs(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
|
|
|
*
|
|
|
|
* \param AttrIdx attribute index (zero-based).
|
|
|
|
*
|
|
|
|
* \returns name of the specified attribute.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_HTMLStartTag_getAttrName(CXComment Comment, unsigned AttrIdx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag AST node.
|
|
|
|
*
|
|
|
|
* \param AttrIdx attribute index (zero-based).
|
|
|
|
*
|
|
|
|
* \returns value of the specified attribute.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_HTMLStartTag_getAttrValue(CXComment Comment, unsigned AttrIdx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_BlockCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns name of the block command.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_BlockCommandComment_getCommandName(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_BlockCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns number of word-like arguments.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_BlockCommandComment_getNumArgs(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_BlockCommand AST node.
|
|
|
|
*
|
|
|
|
* \param ArgIdx argument index (zero-based).
|
|
|
|
*
|
|
|
|
* \returns text of the specified word-like argument.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_BlockCommandComment_getArgText(CXComment Comment,
|
|
|
|
unsigned ArgIdx);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_BlockCommand or
|
|
|
|
* \c CXComment_VerbatimBlockCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns paragraph argument of the block command.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXComment clang_BlockCommandComment_getParagraph(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_ParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns parameter name.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_ParamCommandComment_getParamName(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_ParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns non-zero if the parameter that this AST node represents was found
|
|
|
|
* in the function prototype and \c clang_ParamCommandComment_getParamIndex
|
|
|
|
* function will return a meaningful value.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_ParamCommandComment_isParamIndexValid(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_ParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns zero-based parameter index in function prototype.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_ParamCommandComment_getParamIndex(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_ParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns non-zero if parameter passing direction was specified explicitly in
|
|
|
|
* the comment.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_ParamCommandComment_isDirectionExplicit(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_ParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns parameter passing direction.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
enum CXCommentParamPassDirection clang_ParamCommandComment_getDirection(
|
|
|
|
CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_TParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns template parameter name.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_TParamCommandComment_getParamName(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_TParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns non-zero if the parameter that this AST node represents was found
|
|
|
|
* in the template parameter list and
|
|
|
|
* \c clang_TParamCommandComment_getDepth and
|
|
|
|
* \c clang_TParamCommandComment_getIndex functions will return a meaningful
|
|
|
|
* value.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_TParamCommandComment_isParamPositionValid(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_TParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns zero-based nesting depth of this parameter in the template parameter list.
|
|
|
|
*
|
|
|
|
* For example,
|
|
|
|
* \verbatim
|
|
|
|
* template<typename C, template<typename T> class TT>
|
|
|
|
* void test(TT<int> aaa);
|
|
|
|
* \endverbatim
|
|
|
|
* for C and TT nesting depth is 0,
|
|
|
|
* for T nesting depth is 1.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_TParamCommandComment_getDepth(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_TParamCommand AST node.
|
|
|
|
*
|
|
|
|
* \returns zero-based parameter index in the template parameter list at a
|
|
|
|
* given nesting depth.
|
|
|
|
*
|
|
|
|
* For example,
|
|
|
|
* \verbatim
|
|
|
|
* template<typename C, template<typename T> class TT>
|
|
|
|
* void test(TT<int> aaa);
|
|
|
|
* \endverbatim
|
|
|
|
* for C and TT nesting depth is 0, so we can ask for index at depth 0:
|
|
|
|
* at depth 0 C's index is 0, TT's index is 1.
|
|
|
|
*
|
|
|
|
* For T nesting depth is 1, so we can ask for index at depth 0 and 1:
|
|
|
|
* at depth 0 T's index is 1 (same as TT's),
|
|
|
|
* at depth 1 T's index is 0.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
unsigned clang_TParamCommandComment_getIndex(CXComment Comment, unsigned Depth);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_VerbatimBlockLine AST node.
|
|
|
|
*
|
|
|
|
* \returns text contained in the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE
|
|
|
|
CXString clang_VerbatimBlockLineComment_getText(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \param Comment a \c CXComment_VerbatimLine AST node.
|
|
|
|
*
|
|
|
|
* \returns text contained in the AST node.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_VerbatimLineComment_getText(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Convert an HTML tag AST node to string.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* \param Comment a \c CXComment_HTMLStartTag or \c CXComment_HTMLEndTag AST
|
|
|
|
* node.
|
|
|
|
*
|
|
|
|
* \returns string containing an HTML tag.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_HTMLTagComment_getAsString(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Convert a given full parsed comment to an HTML fragment.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* Specific details of HTML layout are subject to change. Don't try to parse
|
|
|
|
* this HTML back into an AST, use other APIs instead.
|
|
|
|
*
|
|
|
|
* Currently the following CSS classes are used:
|
2018-05-09 09:00:01 +08:00
|
|
|
* \li "para-brief" for \paragraph and equivalent commands;
|
2014-04-28 10:39:27 +08:00
|
|
|
* \li "para-returns" for \\returns paragraph and equivalent commands;
|
|
|
|
* \li "word-returns" for the "Returns" word in \\returns paragraph.
|
|
|
|
*
|
|
|
|
* Function argument documentation is rendered as a \<dl\> list with arguments
|
|
|
|
* sorted in function prototype order. CSS classes used:
|
|
|
|
* \li "param-name-index-NUMBER" for parameter name (\<dt\>);
|
|
|
|
* \li "param-descr-index-NUMBER" for parameter description (\<dd\>);
|
|
|
|
* \li "param-name-index-invalid" and "param-descr-index-invalid" are used if
|
|
|
|
* parameter index is invalid.
|
|
|
|
*
|
|
|
|
* Template parameter documentation is rendered as a \<dl\> list with
|
|
|
|
* parameters sorted in template parameter list order. CSS classes used:
|
|
|
|
* \li "tparam-name-index-NUMBER" for parameter name (\<dt\>);
|
|
|
|
* \li "tparam-descr-index-NUMBER" for parameter description (\<dd\>);
|
|
|
|
* \li "tparam-name-index-other" and "tparam-descr-index-other" are used for
|
|
|
|
* names inside template template parameters;
|
|
|
|
* \li "tparam-name-index-invalid" and "tparam-descr-index-invalid" are used if
|
|
|
|
* parameter position is invalid.
|
|
|
|
*
|
|
|
|
* \param Comment a \c CXComment_FullComment AST node.
|
|
|
|
*
|
|
|
|
* \returns string containing an HTML fragment.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_FullComment_getAsHTML(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
2018-05-09 09:00:01 +08:00
|
|
|
* Convert a given full parsed comment to an XML document.
|
2014-04-28 10:39:27 +08:00
|
|
|
*
|
|
|
|
* A Relax NG schema for the XML can be found in comment-xml-schema.rng file
|
|
|
|
* inside clang source tree.
|
|
|
|
*
|
|
|
|
* \param Comment a \c CXComment_FullComment AST node.
|
|
|
|
*
|
|
|
|
* \returns string containing an XML document.
|
|
|
|
*/
|
|
|
|
CINDEX_LINKAGE CXString clang_FullComment_getAsXML(CXComment Comment);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* CLANG_C_DOCUMENTATION_H */
|
|
|
|
|