-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Comprehensive list of supported commands #821
base: develop
Are you sure you want to change the base?
doc: Comprehensive list of supported commands #821
Conversation
An automated preview of the documentation is available at https://821.mrdocs.prtest2.cppalliance.org/index.html |
So they're unsupported?
So they're supported? |
@@ -0,0 +1,176 @@ | |||
= Comprehensive List of Commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already a section for this on the commands page.
The term "commands" for documentation commands might be ambiguous with command line commands.
This could be something like "Documentation Command Reference" but the navtitle would have to be shorter like "Documentation Commands" or something,
|
||
Below is the complete list of supported commands: | ||
|
||
* xref:commands/a.adoc[@a] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page is kind of boring and ugly.
Commands could be on a table like the ones mrdocs generates where the first column has the command and the second column has a brief description.
To make it less repetitive, commands can be put into subsections categories. The basic categories are block and inline commands. Then there's subcategories based on what the command does.
Each section can have a small paragraph explaining the table to come.
The command text should be as wrapped in "`"s.
Unsupported commands can be in red without a page so that users and developers can keep track of them.
Unimplemented commands are unsupported commands.
@@ -56,6 +56,11 @@ The following commands can be used to format the text in the doc comments: | |||
| | |||
|=== | |||
|
|||
== Full List of Commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need that (the nav is more visible already). The one that already exists also needs to be removed.
Equivalent to xref:commands/e.adoc[@e] and xref:commands/em.adoc[@em]. To emphasize multiple words use <em>multiple words</em>. | ||
|
||
== Example | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's markdown. Not asciidoctor.
@anchor <word> | ||
|
||
== Description | ||
This command places an invisible, named anchor into the documentation to which you can refer with the xref:commands/ref.adoc[@ref] command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All supported commands need examples.
@callergraph | ||
|
||
== Description | ||
When this command is put in a comment block of a function or method and HAVE_DOT is set to `YES`, then MrDocs will generate a caller graph for that function (provided the implementation of the function or method is called by other documented functions). The caller graph will be generated regardless of the value of CALLER_GRAPH. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No point in describing unsupported commands.
|
||
|
||
|
||
*Note:* The completeness (and correctness) of the caller graph depends on the MrDocs code parser which is not perfect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not imperfect. It's 100% unsupported.
|
||
/*! A test class. */ | ||
|
||
class Include_Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't tell me you're copy/pasting these from doxygen's documentation.
Fixes #676
In the file
src/lib/AST/ParseJavadoc.cpp
, there are mainly two functions in charge of handling documentation commands:JavadocVisitor::visitInlineCommandComment(...)
This one mentions inline commands such as:
@n
,@a
,@e
,@em
,@copybrief
,@copydetails
,@copydoc
, and@ref
.JavadocVisitor::visitBlockCommandComment(...)
@brief
,@short
,@return
/@returns
/@result
,@throw
/@throws
/@exception
,@note
,@warning
,@par
,@li
,@details
,@see
,@pre
,@post
.These commands trigger specific behavior in MrDocs.
@addindex
,@addtogroup
,@anchor
,@arg
, …,@xrefitem
).Although they are present in the
CommandTraits
enum and do not cause errors, MrDocs currently does nothing with them.I have decided to include all these "passively supported" commands in the documentation because:
CommandTraits
enumeration.Additionally, I have made the following documentation adjustments:
Removed references to other programming languages (Objective-C, Java, etc.). For instance, commands like
@category
and@protocol
(which apply only to Objective-C) were removed. We kept The C programming languages for compatibility and relevance alongside C++. Code, examples and mentions to other programming languages were removed.Added the
@endlink
command, which was commented out in thevisitBlockCommandComment(...)
switch but referenced by@link
. I decided to keep it to cover the@link ... @endlink
pair.There are open questions about how to handle other points mentioned in the docs:
CALLER_GRAPH
,ENABLED_SECTIONS
, etc.).<em>multiple words</em>
) which is referenced in multiple places.@startuml
command, which suggests needing Java and PlantUML. We need to decide if we want to support it.With this PR, all commands included in the enumeration are now documented, so they can be referenced, even though MrDocs does not yet perform additional processing for some of them.