Crate doxygen_rs
source ·Expand description
Simple Doxygen to Rustdoc translation.
Provides a simple and straightforward API to translate raw Doxygen comments to Rustdoc comments. Purely experimental right now, maybe practical in a future?
Examples
use doxygen_rs::transform;
let rustdoc = transform("@brief Example Doxygen brief");
assert_eq!(rustdoc, "Example Doxygen brief\n\n");
Supported commands
See the tracking issue for the exhaustive list
And the following flavours are soported:
\brief
\\brief
@brief
Inner workings
When the transform
function is called, 3 other functions are called:
- The input is parsed to a
Vec
ofparser::Value
(parser::parse_comment
) - The values are used to generate an AST (
ast::generate_ast
) - The AST is used to generate the Rustdoc (
generator::generate_rustdoc
)
transform [parse_comment -> generate_ast -> generate_rustdoc]
Modules
This module contains functions that generate ASTs from
Vec
of crate::parser::Value
Generate raw Rustdoc comments from a given
crate::ast::ParsedDoxygen
Functions
Transforms raw Doxygen comments to raw Rustdoc comments