-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
DocsDocumentation related issuesDocumentation related issuesMacrosIssues related to macrosIssues related to macroshacktoberfesthelp wanted
Description
Please Describe The Problem To Be Solved
Comments for keys in a match statement covered by the index attribute should be parsed as descriptions of the return value.
For example, the following should be parsed so the description of the id index is The ID of the channel category, and be passed to the markdown file.
impl UserData for TBChannelCategory {
#[lua_document("TBChannelCategory", index)]
fn add_methods<'lua, T: rlua::UserDataMethods<'lua, Self>>(methods: &mut T) {
methods.add_meta_method(MetaMethod::Index, |ctx, this, value: String| {
Ok(match value.as_str() {
/// The ID of the channel category
"id" => convert_constructable2::<TBChannelId, _, SerenityContext>(this.0.id, this.1.clone(), ctx)?,
...,
&_ => Value::Nil,
})
})
}
}Metadata
Metadata
Assignees
Labels
DocsDocumentation related issuesDocumentation related issuesMacrosIssues related to macrosIssues related to macroshacktoberfesthelp wanted