mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 12:51:57 +00:00
docs(ast): improve formatting of AstBuilder doc comments (#6756)
This commit is contained in:
parent
b8845773f7
commit
46720be7af
2 changed files with 370 additions and 370 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -285,12 +285,12 @@ fn generate_struct_builder_fn(ty: &StructDef, ctx: &LateCtx) -> TokenStream {
|
||||||
let alloc_fn_name = format_ident!("alloc_{fn_name}");
|
let alloc_fn_name = format_ident!("alloc_{fn_name}");
|
||||||
|
|
||||||
let article = article_for(ident.to_string());
|
let article = article_for(ident.to_string());
|
||||||
let fn_docs = DocComment::new(format!("Build {article} [`{ident}`]"))
|
let fn_docs = DocComment::new(format!("Build {article} [`{ident}`]."))
|
||||||
.with_description(format!("If you want the built node to be allocated in the memory arena, use [`AstBuilder::{alloc_fn_name}`] instead."))
|
.with_description(format!("If you want the built node to be allocated in the memory arena, use [`AstBuilder::{alloc_fn_name}`] instead."))
|
||||||
.with_params(¶ms);
|
.with_params(¶ms);
|
||||||
|
|
||||||
let alloc_docs =
|
let alloc_docs =
|
||||||
DocComment::new(format!("Build {article} [`{ident}`] and stores it in the memory arena."))
|
DocComment::new(format!("Build {article} [`{ident}`], and store it in the memory arena."))
|
||||||
.with_description(format!("Returns a [`Box`] containing the newly-allocated node. If you want a stack-allocated node, use [`AstBuilder::{fn_name}`] instead."))
|
.with_description(format!("Returns a [`Box`] containing the newly-allocated node. If you want a stack-allocated node, use [`AstBuilder::{fn_name}`] instead."))
|
||||||
.with_params(¶ms);
|
.with_params(¶ms);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue