diff --git a/docs/modules/ROOT/pages/generators.adoc b/docs/modules/ROOT/pages/generators.adoc index e2c436b058..355c750fff 100644 --- a/docs/modules/ROOT/pages/generators.adoc +++ b/docs/modules/ROOT/pages/generators.adoc @@ -89,15 +89,17 @@ Each symbol goes through a main layout template in the `/generator//generator//partials` directory. -It contains the following subdirectories: +It typically contains the following files and subdirectories: -* `symbols`: Contains one partial for each symbol kind. -The fields of each symbol object are described in the <> section. -* `signature`: Contains one partial for each symbol kind that renders the signature of the symbol as if declared in {cpp}. -* `types`: partials for rendering other types of objects in a canonical form. -Please refer to the <> for more information on each type of object. +* `symbol`: A generic partial for rendering symbols. +* `location`: Partials for rendering <>. +* `symbol`: Partials for rendering <>. +* `template`: Partials for rendering <>. +* `type`: Partials for rendering <>. * `markup`: partials for rendering markup elements such as lists, tables, and code blocks, in the output format. +Please refer to the <> for more information on each type of object. + Partials common to all generators are available in the `/generator/common/partials` directory. The common partials are loaded before the generator-specific partials, which can override any common partials. diff --git a/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs b/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs index 0522a7379b..e46ae27839 100644 --- a/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs +++ b/share/mrdocs/addons/generator/adoc/layouts/wrapper.adoc.hbs @@ -1,8 +1,14 @@ {{! The wrapper for single page documentation or symbols in a multipage documentation }} -{{#unless @root.config.multipage }} +{{! Title }} +{{#if @root.config.multipage }} +{{! Multipage documentation: symbol is available to the wrapper }} +[#{{{symbol.anchor}}}] += {{> symbol/qualified-name symbol }} +{{else}} +{{! Single page documentation: symbol is not available to the wrapper }} = Reference +{{/if}} :mrdocs: -{{/unless}} {{! Content generated with index.hbs }} {{{contents}}} diff --git a/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs b/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs index 95a095eefa..1d3e475159 100644 --- a/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs +++ b/share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs @@ -1,5 +1,9 @@ +{{#unless @root.config.multipage }} +{{! Single page documentation: symbol is not available to the wrapper but it's available here }} +{{! Include the symbol title at a higher level }} [#{{{symbol.anchor}}}] -={{#unless @root.config.multipage}}={{/unless}} {{#unless (eq symbol.kind "friend")}}{{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}{{#if symbol.parent}}Unnamed{{else}}Global{{/if}} {{or symbol.tag symbol.kind}}{{/if}}{{else}}{{#if symbol.symbol.name}}{{>types/nested-name-specifier symbol=symbol.symbol.parent includeNamespace=true}}{{symbol.symbol.name}}{{else}}{{symbol.type.name}}{{/if}}{{/unless}} +== {{> symbol/qualified-name symbol }} +{{/unless}} {{! Brief }} {{#if symbol.doc.brief}} @@ -10,12 +14,12 @@ {{#unless (contains (arr "namespace") symbol.kind)}} =={{#unless @root.config.multipage}}={{/unless}} Synopsis -{{>types/source dcl=(primary_location symbol)}} +{{>location/source dcl=(primary_location symbol)}} {{#if (ne symbol.kind "overloads")}} [source,cpp,subs="verbatim,macros,-callouts"] ---- -{{> signature }} +{{> symbol/signature symbol }} ---- @@ -23,7 +27,7 @@ {{#each symbol.members as | member |}} [source,cpp,subs="verbatim,macros,-callouts"] ---- -{{> signature symbol=member link=member}} +{{> symbol/signature member link=member}} ---- @@ -34,15 +38,15 @@ {{#if symbol.interface}} {{#if (eq symbol.kind "record")}} {{#with symbol.interface}} -{{>types/tranche tranche=public label="" is-namespace=false}} +{{>symbol/tranche tranche=public label="" is-namespace=false}} -{{>types/tranche tranche=protected label="Protected" is-namespace=false}} +{{>symbol/tranche tranche=protected label="Protected" is-namespace=false}} -{{>types/tranche tranche=private label="Private" is-namespace=false}} +{{>symbol/tranche tranche=private label="Private" is-namespace=false}} {{/with}} {{else}} -{{>types/tranche tranche=symbol.interface label="" is-namespace=true}} +{{>symbol/tranche tranche=symbol.interface label="" is-namespace=true}} {{/if}} {{else if symbol.members}} @@ -54,7 +58,7 @@ |=== |Name |Description {{#each symbol.members}} -|xref:{{{anchor}}}[`pass:v[{{>types/declarator-id . nolink=true}}]`] | {{~doc.brief}} +|xref:{{{anchor}}}[`pass:v[{{>symbol/name . nolink=true}}]`] | {{~doc.brief}} {{/each}} |=== @@ -62,7 +66,7 @@ {{/if}} {{! Using directives }} {{#if symbol.usingDirectives}} -{{>types/info-list members=symbol.usingDirectives title="Using Directives"}} +{{>symbol/members-table members=symbol.usingDirectives title="Using Directives"}} {{/if}} {{! Description }} @@ -161,7 +165,7 @@ =={{#unless @root.config.multipage}}={{/unless}} Parameters |=== -| Name | Description {{! TODO: | Type? }} +| Name | Description {{#each symbol.doc.params}} | *{{name}}* @@ -176,7 +180,7 @@ =={{#unless @root.config.multipage}}={{/unless}} Parameters |=== -| Name | Description {{! TODO: | Type? }} +| Name | Description {{#each allParams as |param|}} | *{{param.name}}* diff --git a/share/mrdocs/addons/generator/common/partials/location/source.hbs b/share/mrdocs/addons/generator/common/partials/location/source.hbs new file mode 100644 index 0000000000..dc7cf379fa --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/location/source.hbs @@ -0,0 +1,19 @@ +{{!-- + Renders where the symbol is declared with a link + + If the `base-url` config option is defined, the file name will be + linked to the source file. + + Expected Context: {Location Object} + + Example: + {{> location/source symbol.loc.def }} + +--}} +Declared in {{#>markup/code~}} + {{ str "<" }}{{#unless (and @root.config.base-url (eq dcl.kind "source"))~}} + {{dcl.file}} + {{~else~}} + {{#>markup/a href=(concat @root.config.base-url dcl.file '#L' dcl.line)}}{{dcl.file}}{{/markup/a}} + {{~/unless~}}{{ str ">" }} +{{~/markup/code}} diff --git a/share/mrdocs/addons/generator/common/partials/signature.hbs b/share/mrdocs/addons/generator/common/partials/signature.hbs deleted file mode 100644 index 9de33a16db..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature.hbs +++ /dev/null @@ -1 +0,0 @@ -{{> (concat 'signature' '/' (lookup symbol 'kind')) }} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/alias.hbs b/share/mrdocs/addons/generator/common/partials/signature/alias.hbs deleted file mode 100644 index ba2c17aeaa..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/alias.hbs +++ /dev/null @@ -1 +0,0 @@ -namespace {{symbol.name}} = {{>types/name-info symbol.aliasedSymbol}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/concept.hbs b/share/mrdocs/addons/generator/common/partials/signature/concept.hbs deleted file mode 100644 index 91d87cf35b..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/concept.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{>types/template-head symbol.template}} - -concept {{>types/declarator-id symbol}} = {{symbol.constraint}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/enum.hbs b/share/mrdocs/addons/generator/common/partials/signature/enum.hbs deleted file mode 100644 index fe72f6fbe3..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/enum.hbs +++ /dev/null @@ -1,2 +0,0 @@ -enum {{>types/declarator-id symbol~}} -{{#if symbol.type}} : {{>types/declarator symbol.type}}{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/enumerator.hbs b/share/mrdocs/addons/generator/common/partials/signature/enumerator.hbs deleted file mode 100644 index e223c917b9..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/enumerator.hbs +++ /dev/null @@ -1 +0,0 @@ -{{symbol.name}}{{#if symbol.initializer}} = {{symbol.initializer}}{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/field.hbs b/share/mrdocs/addons/generator/common/partials/signature/field.hbs deleted file mode 100644 index 402744c4f3..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/field.hbs +++ /dev/null @@ -1,6 +0,0 @@ -{{#if symbol.isMutable}}mutable -{{/if~}} -{{>types/declarator-before symbol.type}} {{>types/declarator-id symbol~}} -{{#if symbol.isBitfield}} : {{symbol.bitfieldWidth}}{{/if~}} -{{#if symbol.default}} = {{symbol.default}}{{/if~}} -{{>types/declarator-after symbol.type}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/friend.hbs b/share/mrdocs/addons/generator/common/partials/signature/friend.hbs deleted file mode 100644 index 6ba58b48ea..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/friend.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{#if symbol.type~}} -friend {{>types/declarator symbol.type~}}; -{{~else if symbol.symbol~}} -{{> (concat 'signature' '/' (lookup . 'symbol.symbol.kind')) symbol=symbol.symbol isFriend=true~}} -{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/function.hbs b/share/mrdocs/addons/generator/common/partials/signature/function.hbs deleted file mode 100644 index fdd385c7ce..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/function.hbs +++ /dev/null @@ -1,31 +0,0 @@ -{{#if symbol.template}}{{>types/template-head symbol.template}} -{{/if~}} -{{#if isFriend}}friend -{{/if~}} -{{#if symbol.constexprKind}}{{symbol.constexprKind}} -{{/if~}} -{{#if symbol.storageClass}}{{symbol.storageClass}} -{{/if~}} -{{#if symbol.isVirtual}}virtual -{{/if~}} -{{#if symbol.explicitSpec}}{{symbol.explicitSpec}} -{{/if~}} -{{#if (eq symbol.class "normal")}}{{>types/declarator-before symbol.return}} -{{/if~}} -{{>types/declarator-id symbol link=(select link link symbol.template.primary)}} -({{#if symbol.isExplicitObjectMemberFunction}}this {{/if}}{{#each symbol.params}}{{#unless (and @first @last)}} - {{/unless}}{{>types/declarator type decl-name=name~}} - {{#if default}} = {{default}}{{/if~}} - {{#unless @last}},{{/unless~}} -{{/each~}}{{#if symbol.isVariadic}}{{#if symbol.params}}, {{/if}}...{{/if}}) -{{~#if symbol.isConst}} const{{/if~}} -{{#if symbol.isVolatile}} volatile{{/if~}} -{{#if symbol.refQualifier}} {{symbol.refQualifier}}{{/if~}} -{{#if symbol.exceptionSpec}} {{symbol.exceptionSpec}}{{/if~}} -{{#if (eq symbol.class "normal")}}{{>types/declarator-after symbol.return}}{{/if~}} -{{#if symbol.requires}} requires {{symbol.requires}}{{/if~}} -{{#if symbol.hasOverrideAttr}} override{{/if~}} -{{#if symbol.isFinal}} final{{/if~}} -{{#if symbol.isPure}} = 0{{/if~}} -{{#if symbol.isDeleted}} = delete{{/if~}} -{{#if symbol.isDefaulted}} = default{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/guide.hbs b/share/mrdocs/addons/generator/common/partials/signature/guide.hbs deleted file mode 100644 index ee2135898c..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/guide.hbs +++ /dev/null @@ -1,8 +0,0 @@ -{{#if symbol.template}}{{>types/template-head symbol.template}} -{{/if~}} -{{>types/declarator-id symbol}} -({{#each symbol.params}}{{#unless (and @first @last)}} - {{/unless}}{{>types/declarator type decl-name=name~}} - {{#if default}} = {{default}}{{/if~}} - {{#unless @last}},{{/unless~}} -{{/each~}}) -> {{>types/declarator symbol.deduced}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/record.hbs b/share/mrdocs/addons/generator/common/partials/signature/record.hbs deleted file mode 100644 index 55b9128c17..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/record.hbs +++ /dev/null @@ -1,15 +0,0 @@ -{{#if symbol.template}}{{>types/template-head symbol.template}} -{{/if~}} -{{#if isFriend}}friend {{/if}}{{symbol.tag}} {{>types/declarator-id symbol link=(select link link symbol.template.primary)~}} -{{#unless symbol.bases~}} -{{else if isFriend~}} -{{else}} - -{{#each symbol.bases~}} - {{#if @first}} - :{{else}} - ,{{/if~}} - {{#unless (eq access ../symbol.defaultAccess)}} {{access}}{{/unless~}} - {{#if isVirtual}} virtual{{/if}} {{>types/declarator type~}} -{{/each~}} -{{/unless}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/typedef.hbs b/share/mrdocs/addons/generator/common/partials/signature/typedef.hbs deleted file mode 100644 index 84788d355a..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/typedef.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{#if symbol.isUsing~}} - {{#if symbol.template}}{{>types/template-head symbol.template}} - {{/if~}} - using {{symbol.name}} = {{>types/declarator symbol.type}} -{{~else~}} - typedef {{>types/declarator symbol.type decl-name=symbol.name}} -{{~/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/using.hbs b/share/mrdocs/addons/generator/common/partials/signature/using.hbs deleted file mode 100644 index 6c3c088565..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/using.hbs +++ /dev/null @@ -1 +0,0 @@ -using {{#if (contains (arr "typename" "enum") symbol.class)}} {{symbol.class}}{{/if}}{{#if symbol.qualifier}}{{>types/name-info symbol.qualifier}}::{{/if}}{{symbol.name}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/variable.hbs b/share/mrdocs/addons/generator/common/partials/signature/variable.hbs deleted file mode 100644 index 0ee26e4f84..0000000000 --- a/share/mrdocs/addons/generator/common/partials/signature/variable.hbs +++ /dev/null @@ -1,11 +0,0 @@ -{{#if symbol.template}}{{>types/template-head symbol.template}} -{{/if~}} -{{#if symbol.constexprKind}}{{symbol.constexprKind}} -{{/if~}} -{{#if symbol.storageClass}}{{symbol.storageClass}} -{{/if~}} -{{#if symbol.isThreadLocal}}thread_local -{{/if~}} -{{>types/declarator-before symbol.type}} {{>types/declarator-id symbol link=(select link link symbol.template.primary)~}} -{{>types/declarator-after symbol.type~}} -{{#if symbol.initializer}} = {{symbol.initializer}}{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/info-member.hbs b/share/mrdocs/addons/generator/common/partials/symbol/detail/members-table-row.hbs similarity index 70% rename from share/mrdocs/addons/generator/common/partials/types/info-member.hbs rename to share/mrdocs/addons/generator/common/partials/symbol/detail/members-table-row.hbs index ffe77ff626..472063a8c2 100644 --- a/share/mrdocs/addons/generator/common/partials/types/info-member.hbs +++ b/share/mrdocs/addons/generator/common/partials/symbol/detail/members-table-row.hbs @@ -2,7 +2,7 @@ {{#>markup/tr~}} {{#>markup/td}} {{! Member name, linked to its documentation }} -{{#>markup/a href=(relativize url)}}{{#>markup/code}}{{>types/declarator-id . nolink=true}}{{/markup/code}}{{/markup/a}} {{>types/special-name-suffix .}} +{{#>markup/a href=(relativize url)}}{{#>markup/code}}{{>symbol/name . nolink=true}}{{/markup/code}}{{/markup/a}} {{>symbol/special-function-suffix .}} {{~/markup/td}} {{#>markup/td}} {{#if (ne kind "overloads")~}} diff --git a/share/mrdocs/addons/generator/common/partials/types/info-list.hbs b/share/mrdocs/addons/generator/common/partials/symbol/members-table.hbs similarity index 50% rename from share/mrdocs/addons/generator/common/partials/types/info-list.hbs rename to share/mrdocs/addons/generator/common/partials/symbol/members-table.hbs index acb85c94f1..442b4abca6 100644 --- a/share/mrdocs/addons/generator/common/partials/types/info-list.hbs +++ b/share/mrdocs/addons/generator/common/partials/symbol/members-table.hbs @@ -1,4 +1,16 @@ -{{! List the "members" field of a symbol as a table with the symbol name and brief for each member. }} +{{!-- + Renders all symbols of the "members" field as a table. + + This partials renders each row with the symbol name and brief for + each member. + + Expected Context: {Symbol Object} + + Example: + {{> symbol/members-table symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} {{#if members}} {{#>markup/h level=(select @root.config.multipage 1 2)}}{{title}}{{/markup/h}} {{#>markup/table cols=2}} @@ -10,7 +22,7 @@ {{/markup/thead}} {{#>markup/tbody}} {{#each (sort_by members "name")}} -{{>types/info-member .}} +{{> symbol/detail/members-table-row .}} {{/each}} {{/markup/tbody}} {{/markup/table}} diff --git a/share/mrdocs/addons/generator/common/partials/symbol/name-info.hbs b/share/mrdocs/addons/generator/common/partials/symbol/name-info.hbs new file mode 100644 index 0000000000..2338e7c09a --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/name-info.hbs @@ -0,0 +1,33 @@ +{{!-- + Renders a Name Info object. + + Expected Context: {Name Info Object} + + Optional parameters: + nolink: If true, the name will not be linked. + + Example: + {{> name-info symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if prefix~}} + {{> symbol/name-info prefix nolink=nolink~}}:: +{{~/if~}} +{{#if (contains (arr "see-below" "implementation-defined") name)~}} + {{! These are special names that should not be linked. }} + {{ str '_'}}{{name}}{{ str '_'~}} +{{else~}} + {{! Render the name of the symbol. ~}} + {{#if (and symbol.url (not nolink))~}} + {{! Link to the symbol's documentation. ~}} + {{#>markup/a href=(relativize symbol.url)}}{{name}}{{/markup/a~}} + {{else~}} + {{! No link, just the name. ~}} + {{name~}} + {{/if~}} + {{#if args~}} + {{! Render the template arguments of the symbol. ~}} + {{>template/args args=args nolink=nolink~}} + {{/if~}} +{{/if~}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/name.hbs b/share/mrdocs/addons/generator/common/partials/symbol/name.hbs new file mode 100644 index 0000000000..47bd794d37 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/name.hbs @@ -0,0 +1,36 @@ +{{!-- + Renders the symbol name in an appropriate format for section titles. + + This is typically a linked name, but it can also be a special name like + "see-below" or "implementation-defined". + + Expected Context: {Symbol Object} + + Optional parameters: + nolink: If true, types and symbols will not be linked. + link: Symbol that should be linked to, regardless of the original symbol. + + Example: + {{> declarator symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if (and (eq kind "function") (eq class "conversion"))~}} + {{! Conversion operator: "operator" and the type declarator ~}} + operator {{>type/declarator return nolink=nolink~}} +{{else if (eq kind "guide")~}} + {{! Deduction guide: "deduced" type declarator ~}} + {{>type/declarator deduced nolink=nolink~}} +{{else~}} + {{#if (and link.url (not nolink))~}} + {{! Symbol with URL: link to the symbol documentation ~}} + {{#>markup/a href=(relativize link.url)}}{{name}}{{/markup/a~}} + {{else~}} + {{! Symbol without URL: plain text ~}} + {{name~}} + {{/if~}} + {{#if (contains (arr "explicit" "partial") template.kind)~}} + {{! Explicit or partial template: render the template arguments ~}} + {{>template/args args=template.args nolink=nolink~}} + {{/if~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/qualified-name.hbs b/share/mrdocs/addons/generator/common/partials/symbol/qualified-name.hbs new file mode 100644 index 0000000000..bcddc1efb5 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/qualified-name.hbs @@ -0,0 +1,47 @@ +{{!-- + Renders the qualified symbol name in an appropriate format for section titles. + + This partial renders the symbol name in a format where all parent namespaces + are linked to their documentation. The symbol name is then appended to the + linked namespaces. + + It also includes exceptions for unnamed symbols and friend declarations. + Unnamed symbols need to be handled differently as they have no name to display. + Friend declarations need to be handled differently as they are not part of the + symbol hierarchy and need to be linked to the befriended symbol or type. + + Expected Context: {Symbol Object} + + Example: + {{> symbol/qualified-name symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{! We remove whitespace between all tag so the result is in a single line ~}} +{{~#if (ne kind "friend")~}} + {{~#if name~}} + {{! General case: linked namespaces followed by the symbol name ~}} + {{#each (reverse namespace)~}} + {{#if name~}} + {{>symbol/name . link=.}}:: + {{~/if}} + {{~/each}}{{>symbol/name .}} + {{~else~}} + {{! Unnamed symbol: use the symbol type in the title ~}} + {{~#if parent~}} + {{! Symbol with no name but with a parent ~}} + Unnamed + {{~else~}} + {{! Symbol with no name and no parent: Global symbol ~}} + Global + {{~/if}} {{or tag kind~}} + {{~/if~}} +{{~else~}} + {{~#if symbol~}} + {{! Friend symbol: use the befriended symbol ~}} + {{>symbol/qualified-name symbol~}} + {{~else~}} + {{! Friend type: use the type name ~}} + {{~type.name~}} + {{~/if~}} +{{~/if~}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature.hbs new file mode 100644 index 0000000000..226239421d --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature.hbs @@ -0,0 +1,14 @@ +{{!-- + Render a symbol object as a C++ code signature. + + The signature for each symbol type is ultimately defined in + symbol/signature/.hbs. + + Expected Context: {Symbol Object} + + Example: + {{> symbol/signature symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{> (concat 'symbol/signature/' kind) }} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/alias.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/alias.hbs new file mode 100644 index 0000000000..cdc7fdb24d --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/alias.hbs @@ -0,0 +1 @@ +namespace {{ name }} = {{> symbol/name-info aliasedSymbol }}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/concept.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/concept.hbs new file mode 100644 index 0000000000..ae55eb0c2a --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/concept.hbs @@ -0,0 +1,3 @@ +{{>template/head template}} + +concept {{>symbol/name symbol}} = {{constraint}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/enum.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/enum.hbs new file mode 100644 index 0000000000..c8b31f32ce --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/enum.hbs @@ -0,0 +1,2 @@ +enum {{>symbol/name .~}} +{{#if type}} : {{>type/declarator type}}{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/enumerator.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/enumerator.hbs new file mode 100644 index 0000000000..ed01c62ec9 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/enumerator.hbs @@ -0,0 +1 @@ +{{ name }}{{#if initializer}} = {{initializer}}{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs new file mode 100644 index 0000000000..2eaa14db0c --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs @@ -0,0 +1,6 @@ +{{#if isMutable}}mutable +{{/if~}} +{{>type/declarator-prefix type}} {{>symbol/name symbol~}} +{{#if isBitfield}} : {{bitfieldWidth}}{{/if~}} +{{#if default}} = {{default}}{{/if~}} +{{>type/declarator-suffix type}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/friend.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/friend.hbs new file mode 100644 index 0000000000..f7306e7079 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/friend.hbs @@ -0,0 +1,5 @@ +{{#if type~}} +friend {{>type/declarator type~}}; +{{~else if symbol~}} +{{> (concat 'symbol/signature/' (lookup . 'symbol.kind')) symbol isFriend=true~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs new file mode 100644 index 0000000000..987e562935 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs @@ -0,0 +1,31 @@ +{{#if template}}{{>template/head template}} +{{/if~}} +{{#if isFriend}}friend +{{/if~}} +{{#if constexprKind}}{{constexprKind}} +{{/if~}} +{{#if storageClass}}{{storageClass}} +{{/if~}} +{{#if isVirtual}}virtual +{{/if~}} +{{#if explicitSpec}}{{explicitSpec}} +{{/if~}} +{{#if (eq class "normal")}}{{>type/declarator-prefix return}} +{{/if~}} +{{>symbol/name symbol link=(select link link template.primary)}} +({{#if isExplicitObjectMemberFunction}}this {{/if}}{{#each params}}{{#unless (and @first @last)}} + {{/unless}}{{>type/declarator type decl-name=name~}} + {{#if default}} = {{default}}{{/if~}} + {{#unless @last}},{{/unless~}} +{{/each~}}{{#if isVariadic}}{{#if params}}, {{/if}}...{{/if}}) +{{~#if isConst}} const{{/if~}} +{{#if isVolatile}} volatile{{/if~}} +{{#if refQualifier}} {{refQualifier}}{{/if~}} +{{#if exceptionSpec}} {{exceptionSpec}}{{/if~}} +{{#if (eq class "normal")}}{{>type/declarator-suffix return}}{{/if~}} +{{#if requires}} requires {{requires}}{{/if~}} +{{#if hasOverrideAttr}} override{{/if~}} +{{#if isFinal}} final{{/if~}} +{{#if isPure}} = 0{{/if~}} +{{#if isDeleted}} = delete{{/if~}} +{{#if isDefaulted}} = default{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/guide.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/guide.hbs new file mode 100644 index 0000000000..416053e6d2 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/guide.hbs @@ -0,0 +1,8 @@ +{{#if template}}{{>template/head template}} +{{/if~}} +{{>symbol/name symbol}} +({{#each params}}{{#unless (and @first @last)}} + {{/unless}}{{>type/declarator type decl-name=name~}} + {{#if default}} = {{default}}{{/if~}} + {{#unless @last}},{{/unless~}} +{{/each~}}) -> {{>type/declarator deduced}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/namespace.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/namespace.hbs similarity index 100% rename from share/mrdocs/addons/generator/common/partials/signature/namespace.hbs rename to share/mrdocs/addons/generator/common/partials/symbol/signature/namespace.hbs diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/record.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/record.hbs new file mode 100644 index 0000000000..ac15fd774e --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/record.hbs @@ -0,0 +1,15 @@ +{{#if template}}{{>template/head template}} +{{/if~}} +{{#if isFriend}}friend {{/if}}{{tag}} {{>symbol/name symbol link=(select link link template.primary)~}} +{{#unless bases~}} +{{else if isFriend~}} +{{else}} + +{{#each bases~}} + {{#if @first}} + :{{else}} + ,{{/if~}} + {{#unless (eq access ../defaultAccess)}} {{access}}{{/unless~}} + {{#if isVirtual}} virtual{{/if}} {{>type/declarator type~}} +{{/each~}} +{{/unless}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/specialization.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/specialization.hbs similarity index 100% rename from share/mrdocs/addons/generator/common/partials/signature/specialization.hbs rename to share/mrdocs/addons/generator/common/partials/symbol/signature/specialization.hbs diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/typedef.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/typedef.hbs new file mode 100644 index 0000000000..1469df45ed --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/typedef.hbs @@ -0,0 +1,7 @@ +{{#if isUsing~}} + {{#if template}}{{>template/head template}} + {{/if~}} + using {{name}} = {{>type/declarator type}} +{{~else~}} + typedef {{>type/declarator type decl-name=name}} +{{~/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/signature/undefined.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/undefined.hbs similarity index 100% rename from share/mrdocs/addons/generator/common/partials/signature/undefined.hbs rename to share/mrdocs/addons/generator/common/partials/symbol/signature/undefined.hbs diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/using.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/using.hbs new file mode 100644 index 0000000000..323d8b9f17 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/using.hbs @@ -0,0 +1,5 @@ +using {{#if (contains (arr "typename" "enum") class)}} {{class}} +{{~/if~}} +{{~#if qualifier~}} + {{>symbol/name-info qualifier }}:: +{{~/if}}{{name}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/signature/variable.hbs b/share/mrdocs/addons/generator/common/partials/symbol/signature/variable.hbs new file mode 100644 index 0000000000..5fd8e22b76 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/signature/variable.hbs @@ -0,0 +1,11 @@ +{{#if template}}{{>template/head template}} +{{/if~}} +{{#if constexprKind}}{{constexprKind}} +{{/if~}} +{{#if storageClass}}{{storageClass}} +{{/if~}} +{{#if isThreadLocal}}thread_local +{{/if~}} +{{>type/declarator-prefix type}} {{>symbol/name symbol link=(select link link template.primary)~}} +{{>type/declarator-suffix type~}} +{{#if initializer}} = {{initializer}}{{/if}}; \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/special-function-suffix.hbs b/share/mrdocs/addons/generator/common/partials/symbol/special-function-suffix.hbs new file mode 100644 index 0000000000..16658c2182 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/special-function-suffix.hbs @@ -0,0 +1,27 @@ +{{!-- + Renders a suffix for a special function types + (e.g., constructor, destructor, overload, variant member) + + This partial is used in symbol tables to display additional information + about a symbol. + + Expected Context: {Symbol Object} + + Example: + {{> symbol/special-function-suffix symbol }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if (eq kind "overloads")~}} + {{>symbol/special-function-suffix (front members)}} +{{~else if (eq kind "function")~}} + {{#if (eq class "constructor")}} + {{#>markup/span class="small"}}[constructor]{{/markup/span}} + {{~else if (eq class "destructor")~}} + {{#>markup/span class="small"}}[destructor]{{/markup/span}} + {{~/if~}} +{{else if (eq kind "field")~}} + {{~#if isVariant~}} + {{#>markup/span class="small"}}[variant member]{{/markup/span}} + {{~/if~}} +{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/symbol/tranche.hbs b/share/mrdocs/addons/generator/common/partials/symbol/tranche.hbs new file mode 100644 index 0000000000..7ad8a07752 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/symbol/tranche.hbs @@ -0,0 +1,33 @@ +{{!-- + Renders the members table for each tranche of a scope. + + This partial creates a table for each tranche of a scope, such as namespaces, + classes, or structs. This allows members to be listed in separate tables based + on their kind. + + Each value in the tranche is a list of symbols that belong to the tranche. + + Expected Context: {Tranche Object} + + Example: + {{> symbol/tranche symbol.interface.public }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{>symbol/members-table members=tranche.namespaces title="Namespaces"}} +{{>symbol/members-table members=(concat tranche.records tranche.types) title=(concat (select label (concat label " ") "") "Types")}} +{{>symbol/members-table members=tranche.enums title=(concat (select label (concat label " ") "") "Enums")}} +{{#if is-namespace}} +{{>symbol/members-table members=tranche.overloads title="Functions"}} +{{>symbol/members-table members=tranche.variables title="Variables"}} +{{>symbol/members-table members=tranche.concepts title="Concepts"}} +{{else}} +{{>symbol/members-table members=tranche.overloads title=(concat (select label (concat label " ") "") "Member Functions")}} +{{>symbol/members-table members=tranche.staticoverloads title=(concat (select label (concat label " ") "") "Static Member Functions")}} +{{>symbol/members-table members=tranche.fields title=(concat (select label (concat label " ") "") "Data Members")}} +{{>symbol/members-table members=tranche.variables title=(concat (select label (concat label " ") "") "Static Data Members")}} +{{>symbol/members-table members=tranche.friends title=(concat (select label (concat label " ") "") "Friends")}} +{{>symbol/members-table members=tranche.aliases title=(concat (select label (concat label " ") "") "Aliases")}} +{{>symbol/members-table members=tranche.usings title=(concat (select label (concat label " ") "") "Using Declarations")}} +{{/if}} +{{>symbol/members-table members=tranche.guides title=(concat (select label (concat label " ") "") "Deduction Guides")}} diff --git a/share/mrdocs/addons/generator/common/partials/template/arg.hbs b/share/mrdocs/addons/generator/common/partials/template/arg.hbs new file mode 100644 index 0000000000..ddde8e75fd --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/template/arg.hbs @@ -0,0 +1,26 @@ +{{!-- + + Renders a template argument. + + This partial renders a template argument for a template instantiation. + + Expected Context: {TArg} + + Example: + {{> template/arg symbol.template.args[0] }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if (eq kind "type")~}} + {{! TArg is a type: render the declarator ~}} + {{~>type/declarator type nolink=nolink~}} +{{else if (eq kind "non-type")~}} + {{! TArg is a non-type: render the value string as is ~}} + {{~value~}} +{{else if (eq kind "template")~}} + {{! TArg is another template: render the template head ~}} + {{#if (and template (not nolink))}}{{#>markup/a href=(relativize template.url)}}{{name}}{{/markup/a}}{{else~}}{{name~}}{{/if~}} +{{/if~}} +{{~#if is-pack~}} + ... +{{~/if~}} diff --git a/share/mrdocs/addons/generator/common/partials/template/args.hbs b/share/mrdocs/addons/generator/common/partials/template/args.hbs new file mode 100644 index 0000000000..f394655ca3 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/template/args.hbs @@ -0,0 +1,17 @@ +{{!-- + + Renders all template arguments. + + This partial renders all template arguments for a template instantiation. + + Expected Context: {Template Info} + + Example: + {{> template/args symbol.template.args }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{ str '<' }}{{~#each args~}} +{{~>template/arg nolink=../nolink~}} +{{~#if (not @last)}}, {{/if~}} +{{~/each~}}{{ str '>' }} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/template/head.hbs b/share/mrdocs/addons/generator/common/partials/template/head.hbs new file mode 100644 index 0000000000..0152caeb67 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/template/head.hbs @@ -0,0 +1,16 @@ +{{!-- + Renders the template head for a template declaration. + + This partial renders the template head with all the template parameters. + + Expected Context: {Template Info} + + Example: + {{> template/head symbol.template }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +template{{ str '<' }}{{#each params}}{{#unless (and @first @last)}} + {{/unless}}{{>template/param~}} + {{#unless @last}},{{/unless~}} +{{/each}}{{ str '>' }}{{#if requires}} requires {{requires}}{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/template/param.hbs b/share/mrdocs/addons/generator/common/partials/template/param.hbs new file mode 100644 index 0000000000..156e0827d8 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/template/param.hbs @@ -0,0 +1,28 @@ +{{!-- + + Renders a template parameter. + + If the template parameter is a type, the templated type name is rendered. + If the template parameter is a non-type, the declarator of the type is rendered. + If the template parameter is a template, the template head is rendered. + + Expected Context: {TParam} + + Example: + {{> template/param tparam }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if (eq kind "type")~}} + {{#if constraint}}{{>symbol/name-info constraint }}{{else}}{{key}}{{/if~}} + {{#if is-pack}}...{{/if~}} + {{#if name}} {{name}}{{/if~}} + {{#if default}} = {{>template/arg default~}}{{/if~}} +{{else if (eq kind "non-type")~}} + {{>type/declarator type decl-name=name}}{{#if is-pack}}...{{/if~}} + {{#if default}} = {{>template/arg default~}}{{/if~}} +{{else if (eq kind "template")~}} + {{>template/head}} typename{{#if is-pack}}...{{/if~}} + {{#if name}} {{name}}{{/if~}} + {{#if default}} = {{>template/arg default~}}{{/if~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/type/declarator-prefix.hbs b/share/mrdocs/addons/generator/common/partials/type/declarator-prefix.hbs new file mode 100644 index 0000000000..508f570ff8 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/type/declarator-prefix.hbs @@ -0,0 +1,64 @@ +{{!-- + Renders declaration prefix of a Type Info Object. + + The prefix is the part of the declaration that comes before the type name. + It includes the pointer, array, and function declarators. + + Expected Context: {Type Info} + + Optional parameters: + nolink: If true, types and symbols will not be linked. + + Example: + {{> declarator-prefix type }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if pointee-type~}} + {{! Pointee type is array or function ~}} + {{~>type/declarator-prefix pointee-type nolink=nolink~}} + {{#if (contains (arr "array" "function") pointee-type.kind)~}} + {{! Open the function parenthesis for the declarator suffix ~}} + {{! The symbol name will be rendered between the prefix and suffix ~}} + ( + {{~/if~}} +{{~/if~}} +{{#if element-type~}} + {{! Array type declarator prefix includes prefix of element type ~}} + {{~>type/declarator-prefix element-type nolink=nolink~}} +{{/if~}} +{{#if return-type~}} + {{! Function prefix includes prefix of return type ~}} + {{~>type/declarator-prefix return-type nolink=nolink~}} +{{/if~}} +{{#if (eq kind "named")~}} + {{! Named type declarator prefix includes the name ~}} + {{>symbol/name-info name nolink=nolink }} +{{~else if (eq kind "auto")~}} + {{! Auto type declarator prefix includes the keyword ~}} + {{#if constraint~}} + {{>symbol/name-info constraint nolink=nolink }} {{/if~}} + {{keyword~}} +{{~/if~}} +{{#if cv-qualifiers~}} + {{! cv-qualifiers as literal strings ~}} + {{ str ' ' }}{{cv-qualifiers}} +{{~/if~}} +{{#if (eq kind "lvalue-reference")~}} + {{! Refqualifiers as "&" or "&&" ~}} + & +{{~ else if (eq kind "rvalue-reference") ~}} + && +{{~ else if (eq kind "pointer")~}} + * +{{~ else if (eq kind "member-pointer")~}} + {{! Member pointer declarator prefix includes the class name ~}} + {{>type/declarator parent-type nolink=nolink}}::* +{{~ else if (eq kind "decltype")~}} + {{! Decltype declarator prefix includes the expression ~}} + decltype({{operand}}) +{{~/if~}} +{{#if is-pack~}} + {{! Pack declarator prefix includes the ellipsis ~}} + ... +{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/type/declarator-suffix.hbs b/share/mrdocs/addons/generator/common/partials/type/declarator-suffix.hbs new file mode 100644 index 0000000000..e45af5a0bb --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/type/declarator-suffix.hbs @@ -0,0 +1,47 @@ +{{!-- + Renders declaration suffix of a Type Info Object. + + The suffix is the part of the declaration that comes after the type name. + It might include the suffix for pointee types, array element types, + or function parameters with specifiers. + + Expected Context: {Type Info} + + Optional parameters: + nolink: If true, types and symbols will not be linked. + + Example: + {{> declarator-suffix type }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{#if pointee-type~}} + {{! Pointee type is array or function ~}} + {{#if (contains (arr "array" "function") pointee-type.kind)~}} + {{! Close the function parenthesis from the declarator prefix ~}} + {{! The symbol name will be rendered between the prefix and suffix ~}} + ) + {{~/if~}} + {{! Declarator suffix of the pointee type ~}} + {{~>type/declarator-suffix pointee-type nolink=nolink~}} +{{else if (eq kind "array")~}} + {{! Array declarator suffix includes bounds and array element suffix ~}} + [{{bounds-value}}] + {{~>type/declarator-suffix element-type nolink=nolink~}} +{{else if (eq kind "function")~}} + {{! Function declarator suffix includes parameter types and cv-qualifiers ~}} + ({{#each param-types~}} + {{~>type/declarator nolink=../nolink~}} + {{~#unless @last}}, {{/unless~}} + {{/each~}} + {{! Include final "..." for variadic functions ~}} + {{#if is-variadic}}{{#if param-types}}, {{/if}}...{{/if}}){{!~}} + {{! cv-qualifiers as literal strings ~}} + {{~#if cv-qualifiers}} {{cv-qualifiers}}{{/if~}} + {{! Refqualifiers as "&" or "&&" ~}} + {{#if (eq ref-qualifier "lvalue")}} &{{else if (eq ref-qualifier "rvalue")}} &&{{/if~}} + {{! Exception spec as literal string ~}} + {{#if exception-spec}} {{exception-spec}}{{/if~}} + {{! Declarator suffix of the return type ~}} + {{~>type/declarator-suffix return-type nolink=nolink~}} +{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/type/declarator.hbs b/share/mrdocs/addons/generator/common/partials/type/declarator.hbs new file mode 100644 index 0000000000..6b8068de85 --- /dev/null +++ b/share/mrdocs/addons/generator/common/partials/type/declarator.hbs @@ -0,0 +1,25 @@ +{{!-- + Renders a Type Info Object as a declaration. + + Expected Context: {Type Info} + + Optional parameters: + decl-name: The symbol name for the declaration. + decl-name-targs: The symbol template arguments for the declaration. + nolink: If true, types and symbols will not be linked. + + Example: + {{> declarator type }} + + See: https://mrdocs.com/docs/mrdocs/develop/generators.html#dom_reference +--}} +{{! Render the prefix of the declaration. ~}} +{{>type/declarator-prefix nolink=nolink~}} +{{! Render the symbol name between the prefix and suffix. ~}} +{{~#if decl-name}} {{decl-name~}} + {{~#if decl-name-targs~}} + {{>template/args args=decl-name-targs nolink=nolink}} + {{~/if~}} +{{~/if~}} +{{! Render the suffix of the declaration. ~}} +{{~>type/declarator-suffix nolink=nolink}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/declarator-after.hbs b/share/mrdocs/addons/generator/common/partials/types/declarator-after.hbs deleted file mode 100644 index 4351dacfe3..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/declarator-after.hbs +++ /dev/null @@ -1,16 +0,0 @@ -{{! Helper for "declarator" partial }} -{{#if pointee-type~}} - {{#if (or (eq pointee-type.kind "array") (eq pointee-type.kind "function"))}}){{/if~}} - {{~>types/declarator-after pointee-type nolink=nolink~}} -{{else if (eq kind "array")~}} - [{{bounds-value}}] - {{~>types/declarator-after element-type nolink=nolink~}} -{{else if (eq kind "function")~}} - ({{#each param-types~}} - {{~>types/declarator nolink=../nolink~}}{{~#unless @last}}, {{/unless~}} - {{/each~}}{{#if is-variadic}}{{#if param-types}}, {{/if}}...{{/if}}) - {{~#if cv-qualifiers}} {{cv-qualifiers}}{{/if~}} - {{#if (eq ref-qualifier "lvalue")}} &{{else if (eq ref-qualifier "rvalue")}} &&{{/if~}} - {{#if exception-spec}} {{exception-spec}}{{/if~}} - {{~>types/declarator-after return-type nolink=nolink~}} -{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/declarator-before.hbs b/share/mrdocs/addons/generator/common/partials/types/declarator-before.hbs deleted file mode 100644 index f46216c9e3..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/declarator-before.hbs +++ /dev/null @@ -1,18 +0,0 @@ -{{! Helper for "declarator" partial }} -{{#if pointee-type~}} - {{~>types/declarator-before pointee-type nolink=nolink~}} - {{#if (or (eq pointee-type.kind "array") (eq pointee-type.kind "function"))}}({{/if~}} -{{~/if~}} -{{#if element-type~}}{{~>types/declarator-before element-type nolink=nolink~}}{{/if~}} -{{#if return-type~}}{{~>types/declarator-before return-type nolink=nolink~}}{{/if~}} -{{#if (eq kind "named")}}{{>types/name-info name nolink=nolink}}{{/if~}} -{{#if (eq kind "auto")}}{{#if constraint}}{{>types/name-info constraint nolink=nolink}} {{/if~}}{{keyword}}{{/if~}} -{{#if cv-qualifiers~}} - {{#if pointee-type}} {{cv-qualifiers}}{{else}} {{cv-qualifiers}}{{/if~}} -{{/if~}} -{{#if (eq kind "lvalue-reference")}}&{{/if~}} -{{#if (eq kind "rvalue-reference")}}&&{{/if~}} -{{#if (eq kind "pointer")}}*{{/if~}} -{{#if (eq kind "member-pointer")}}{{>types/declarator parent-type nolink=nolink}}::*{{/if~}} -{{#if (eq kind "decltype")}}decltype({{operand}}){{/if~}} -{{#if is-pack~}}...{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/declarator-id.hbs b/share/mrdocs/addons/generator/common/partials/types/declarator-id.hbs deleted file mode 100644 index 32e56aa5b8..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/declarator-id.hbs +++ /dev/null @@ -1,11 +0,0 @@ -{{! The declarator for a symbol: typically the symbol name with a link }} -{{#if (and (eq kind "function") (eq class "conversion"))~}} - operator {{>types/declarator return nolink=nolink~}} -{{else if (eq kind "guide")~}} - {{>types/declarator deduced nolink=nolink~}} -{{else~}} - {{#if (and link.url (not nolink))}}{{#>markup/a href=(relativize link.url)}}{{name}}{{/markup/a}}{{else}}{{name}}{{/if~}} - {{#if (or (eq template.kind "explicit") (eq template.kind "partial"))~}} - {{>types/template-args args=template.args nolink=nolink~}} - {{/if~}} -{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/declarator.hbs b/share/mrdocs/addons/generator/common/partials/types/declarator.hbs deleted file mode 100644 index dad2b1d446..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/declarator.hbs +++ /dev/null @@ -1,6 +0,0 @@ -{{! Render a type object as a declaration }} -{{>types/declarator-before nolink=nolink~}} -{{~#if decl-name}} {{decl-name~}} -{{~#if decl-name-targs~}}{{>types/template-args args=decl-name-targs nolink=nolink}}{{~/if~}} -{{~/if~}} -{{~>types/declarator-after nolink=nolink}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/name-info.hbs b/share/mrdocs/addons/generator/common/partials/types/name-info.hbs deleted file mode 100644 index fbabcbb167..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/name-info.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{! Renders a name info object }} -{{#if prefix~}} -{{>types/name-info prefix nolink=nolink~}}:: -{{~/if~}} -{{#if (or (eq name "see-below") (eq name "implementation-defined"))~}}{{ str '_'}}{{name}}{{ str '_'}}{{else~}} -{{#if (and symbol.url (not nolink))}}{{#>markup/a href=(relativize symbol.url)}}{{name}}{{/markup/a}}{{else~}} -{{name}}{{/if}}{{#if args}}{{>types/template-args args=args nolink=nolink}}{{/if~}}{{/if~}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/nested-name-specifier.hbs b/share/mrdocs/addons/generator/common/partials/types/nested-name-specifier.hbs deleted file mode 100644 index 83883cdc2c..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/nested-name-specifier.hbs +++ /dev/null @@ -1,8 +0,0 @@ -{{! Print the symbol name with its parent namespace(s) if any. }} -{{#if (and symbol (or includeNamespace (ne symbol.kind "namespace")))~}} -{{#if symbol.parent~}} -{{>types/nested-name-specifier symbol=symbol.parent~}} -{{else~}} -{{/if~}} -{{#if symbol.name}}{{>types/declarator-id symbol link=symbol}}::{{/if~}} -{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/qualified-path.hbs b/share/mrdocs/addons/generator/common/partials/types/qualified-path.hbs deleted file mode 100644 index 6b75458332..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/qualified-path.hbs +++ /dev/null @@ -1,8 +0,0 @@ -{{! Renders the qualified path of a symbol with proper links for each component. }} -{{#unless (or (contains @root.symbol.namespace symbol) (eq @root.symbol symbol))~}} -{{#if symbol.parent~}} -{{>types/qualified-path symbol=symbol.parent nolink=nolink~}} -{{else~}} -{{/if~}} -{{#if symbol.name}}{{#if (not nolink)}}{{#>markup/a href=(relativize symbol.url)}}{{symbol.name}}{{/markup/a}}{{else}}{{symbol.name}}{{/if}}::{{/if~}} -{{/unless}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/source.hbs b/share/mrdocs/addons/generator/common/partials/types/source.hbs deleted file mode 100644 index c9974a8fa3..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/source.hbs +++ /dev/null @@ -1,12 +0,0 @@ -{{! - Renders where the symbol is declared with a link - to the source file when the `base-url` config - option is defined -}} -Declared in {{#>markup/code~}} -{{ str "<" }}{{#unless (and @root.config.base-url (eq dcl.kind "source"))~}} -{{dcl.file}} -{{~else~}} -{{#>markup/a href=(concat @root.config.base-url dcl.file '#L' dcl.line)}}{{dcl.file}}{{/markup/a}} -{{~/unless~}}{{ str ">" }} -{{~/markup/code}} diff --git a/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs b/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs deleted file mode 100644 index 0d0eec35a5..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/special-name-suffix.hbs +++ /dev/null @@ -1,18 +0,0 @@ -{{! - Renders the name of the symbol with a suffix when - the symbol is a special member (e.g., constructor, - destructor, overload, variant member) -}} -{{#if (eq kind "overloads")~}} - {{>types/special-name-suffix (front members)}} -{{~else if (eq kind "function")~}} - {{#if (eq class "constructor")}} - {{#>markup/span class="small"}}[constructor]{{/markup/span}} - {{~else if (eq class "destructor")~}} - {{#>markup/span class="small"}}[destructor]{{/markup/span}} - {{~/if~}} -{{else if (eq kind "field")~}} - {{~#if isVariant~}} - {{#>markup/span class="small"}}[variant member]{{/markup/span}} - {{~/if~}} -{{~/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/template-arg.hbs b/share/mrdocs/addons/generator/common/partials/types/template-arg.hbs deleted file mode 100644 index d0df22bde5..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/template-arg.hbs +++ /dev/null @@ -1,9 +0,0 @@ -{{! Renders a template argument }} -{{#if (eq kind "type")~}} -{{~>types/declarator type nolink=nolink~}} -{{else if (eq kind "non-type")~}} -{{~value~}} -{{else if (eq kind "template")~}} -{{#if (and template (not nolink))}}{{#>markup/a href=(relativize template.url)}}{{name}}{{/markup/a}}{{else~}}{{name~}}{{/if~}} -{{/if~}} -{{~#if is-pack}}...{{/if~}} diff --git a/share/mrdocs/addons/generator/common/partials/types/template-args.hbs b/share/mrdocs/addons/generator/common/partials/types/template-args.hbs deleted file mode 100644 index 68d9d0acf8..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/template-args.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{! Render all template arguments }} -{{ str '<' }}{{~#each args~}} -{{~>types/template-arg nolink=../nolink~}} -{{~#if (not @last)}}, {{/if~}} -{{~/each~}}{{ str '>' }} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/template-head.hbs b/share/mrdocs/addons/generator/common/partials/types/template-head.hbs deleted file mode 100644 index 685d460e99..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/template-head.hbs +++ /dev/null @@ -1,5 +0,0 @@ -{{! Renders the template head for a template declaration. }} -template{{ str '<' }}{{#each params}}{{#unless (and @first @last)}} - {{/unless}}{{>types/template-param~}} - {{#unless @last}},{{/unless~}} -{{/each}}{{ str '>' }}{{#if requires}} requires {{requires}}{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/template-param.hbs b/share/mrdocs/addons/generator/common/partials/types/template-param.hbs deleted file mode 100644 index 29ec264014..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/template-param.hbs +++ /dev/null @@ -1,14 +0,0 @@ -{{! Renders a template parameter }} -{{#if (eq kind "type")~}} - {{#if constraint}}{{>types/name-info constraint}}{{else}}{{key}}{{/if~}} - {{#if is-pack}}...{{/if~}} - {{#if name}} {{name}}{{/if~}} - {{#if default}} = {{>types/template-arg default~}}{{/if~}} -{{else if (eq kind "non-type")~}} - {{>types/declarator type decl-name=name}}{{#if is-pack}}...{{/if~}} - {{#if default}} = {{>types/template-arg default~}}{{/if~}} -{{else if (eq kind "template")~}} - {{>types/template-head}} typename{{#if is-pack}}...{{/if~}} - {{#if name}} {{name}}{{/if~}} - {{#if default}} = {{>types/template-arg default~}}{{/if~}} -{{/if}} \ No newline at end of file diff --git a/share/mrdocs/addons/generator/common/partials/types/tranche.hbs b/share/mrdocs/addons/generator/common/partials/types/tranche.hbs deleted file mode 100644 index ac7d922ee9..0000000000 --- a/share/mrdocs/addons/generator/common/partials/types/tranche.hbs +++ /dev/null @@ -1,18 +0,0 @@ -{{! Renders an info-list table for each list in a Tranche }} -{{>types/info-list members=tranche.namespaces title="Namespaces"}} -{{>types/info-list members=(concat tranche.records tranche.types) title=(concat (select label (concat label " ") "") "Types")}} -{{>types/info-list members=tranche.enums title=(concat (select label (concat label " ") "") "Enums")}} -{{#if is-namespace}} -{{>types/info-list members=tranche.overloads title="Functions"}} -{{>types/info-list members=tranche.variables title="Variables"}} -{{>types/info-list members=tranche.concepts title="Concepts"}} -{{else}} -{{>types/info-list members=tranche.overloads title=(concat (select label (concat label " ") "") "Member Functions")}} -{{>types/info-list members=tranche.staticoverloads title=(concat (select label (concat label " ") "") "Static Member Functions")}} -{{>types/info-list members=tranche.fields title=(concat (select label (concat label " ") "") "Data Members")}} -{{>types/info-list members=tranche.variables title=(concat (select label (concat label " ") "") "Static Data Members")}} -{{>types/info-list members=tranche.friends title=(concat (select label (concat label " ") "") "Friends")}} -{{>types/info-list members=tranche.aliases title=(concat (select label (concat label " ") "") "Aliases")}} -{{>types/info-list members=tranche.usings title=(concat (select label (concat label " ") "") "Using Declarations")}} -{{/if}} -{{>types/info-list members=tranche.guides title=(concat (select label (concat label " ") "") "Deduction Guides")}} diff --git a/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs b/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs index d97a82dc15..8bc4ae8f7e 100644 --- a/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs +++ b/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs @@ -1,15 +1,26 @@ {{! The wrapper for single page documentation or symbols in a multipage documentation }} +{{! This content is not indented and neither is the partial to preserve code blocks and minimize diffs }} -Reference{{#if symbol}}: {{symbol.name}}{{/if}} +{{! Title }} +{{#if @root.config.multipage }} +{{! Multipage documentation: symbol is available to the wrapper }} +Reference{{#if symbol.name}}: {{symbol.name}}{{/if}} +{{else}} +{{! Single page documentation: symbol is not available to the wrapper }} +Reference +{{/if}}
-{{#unless @root.config.multipage }} +{{#if @root.config.multipage }} +{{! Multipage documentation: main title is the linked qualified symbol name }} +

{{> symbol/qualified-name symbol }}

+{{else}} +{{! Single page documentation: main title is "Reference" }}

Reference

-{{/unless}} +{{/if}} {{! Content generated with index.hbs }} -{{! This content is not indented and neither is the partial because of code blocks }} {{{contents}}}
diff --git a/share/mrdocs/addons/generator/html/partials/symbol.html.hbs b/share/mrdocs/addons/generator/html/partials/symbol.html.hbs index 36a5047e7f..1495699eda 100644 --- a/share/mrdocs/addons/generator/html/partials/symbol.html.hbs +++ b/share/mrdocs/addons/generator/html/partials/symbol.html.hbs @@ -1,6 +1,10 @@ +{{#unless @root.config.multipage }} +{{! Single page documentation: symbol is not available to the wrapper but it's available here }} +{{! Include the symbol title at a higher level }}
-

{{#unless (eq symbol.kind "friend")}}{{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}{{#if symbol.parent}}Unnamed{{else}}Global{{/if}} {{or symbol.tag symbol.kind}}{{/if}}{{else}}{{#if symbol.symbol.name}}{{>types/nested-name-specifier symbol=symbol.symbol.parent includeNamespace=true}}{{symbol.symbol.name}}{{else}}{{symbol.type.name}}{{/if}}{{/unless}}

+

{{> symbol/qualified-name symbol }}

+{{/unless}} {{! Brief }} {{#if symbol.doc.brief}}
@@ -8,18 +12,20 @@
{{/if}} +{{#unless @root.config.multipage }}
+{{/unless}} {{! Synopsis }} {{#unless (contains (arr "namespace") symbol.kind)}}

Synopsis

-{{>types/source dcl=(primary_location symbol)}} +{{>location/source dcl=(primary_location symbol)}}
{{#if (ne symbol.kind "overloads")}}
 
-{{> signature }}
+{{> symbol/signature symbol }}
 
 
 
@@ -27,7 +33,7 @@ {{#each symbol.members as | member |}}
 
-{{> signature symbol=member link=member}}
+{{> symbol/signature member }}
 
 
 
@@ -40,14 +46,14 @@ {{#if symbol.interface}} {{#if (eq symbol.kind "record")}} {{#with symbol.interface}} -{{>types/tranche tranche=public label="" is-namespace=false}} +{{>symbol/tranche tranche=public label="" is-namespace=false}} -{{>types/tranche tranche=protected label="Protected" is-namespace=false}} +{{>symbol/tranche tranche=protected label="Protected" is-namespace=false}} -{{>types/tranche tranche=private label="Private" is-namespace=false}} +{{>symbol/tranche tranche=private label="Private" is-namespace=false}} {{/with}} {{else}} -{{>types/tranche tranche=symbol.interface label="" is-namespace=true}} +{{>symbol/tranche tranche=symbol.interface label="" is-namespace=true}} {{/if}} {{else if symbol.members}} {{! Members }} @@ -64,7 +70,7 @@ {{#each symbol.members}} -{{>types/declarator-id . nolink=true}} +{{>symbol/name . nolink=true}} {{{doc.brief}}} {{/each}} @@ -76,7 +82,7 @@ {{! Using directives }} {{#if symbol.usingDirectives}}
-{{>types/info-list members=symbol.usingDirectives title="Using Directives"}} +{{>symbol/members-table members=symbol.usingDirectives title="Using Directives"}}
@@ -288,4 +294,6 @@ {{/each}}
{{/if}} +{{#unless @root.config.multipage }}
+{{/unless}} diff --git a/test-files/golden-tests/class-template-partial-spec.adoc b/test-files/golden-tests/class-template-partial-spec.adoc index 390345723d..84f90aaff4 100644 --- a/test-files/golden-tests/class-template-partial-spec.adoc +++ b/test-files/golden-tests/class-template-partial-spec.adoc @@ -62,7 +62,7 @@ struct B; [#A-B-06] -== <<#A,A>>::B +== <<#A,A>>::B === Synopsis @@ -77,7 +77,7 @@ struct <<#A-B-0a,B>>; [#A-B-04] -== <<#A,A>>::B +== <<#A,A>>::B === Synopsis diff --git a/test-files/golden-tests/class-template-partial-spec.html b/test-files/golden-tests/class-template-partial-spec.html index f8c447c7e2..2300910b90 100644 --- a/test-files/golden-tests/class-template-partial-spec.html +++ b/test-files/golden-tests/class-template-partial-spec.html @@ -80,7 +80,7 @@

Synopsis

-

A::B

+

A::B<U*, T>

Synopsis

@@ -98,7 +98,7 @@

Synopsis

-

A::B

+

A::B<T, long>

Synopsis

diff --git a/test-files/golden-tests/class-template-spec.adoc b/test-files/golden-tests/class-template-spec.adoc index 56569191f6..1380937d28 100644 --- a/test-files/golden-tests/class-template-spec.adoc +++ b/test-files/golden-tests/class-template-spec.adoc @@ -75,7 +75,7 @@ f(); ---- [#A-00] -== A +== A === Synopsis @@ -111,7 +111,7 @@ g(); ---- [#A-0c] -== A +== A === Synopsis @@ -183,7 +183,7 @@ f(); ---- [#B-07] -== B +== B === Synopsis @@ -219,7 +219,7 @@ g(); ---- [#B-06] -== B +== B === Synopsis @@ -293,7 +293,7 @@ f(); ---- [#C-0a] -== C +== C === Synopsis @@ -329,7 +329,7 @@ g(); ---- [#C-0e] -== C +== C === Synopsis diff --git a/test-files/golden-tests/class-template-spec.html b/test-files/golden-tests/class-template-spec.html index cdaf532309..d51e1acdcc 100644 --- a/test-files/golden-tests/class-template-spec.html +++ b/test-files/golden-tests/class-template-spec.html @@ -88,7 +88,7 @@

Synopsis

-

A

+

A<int>

Synopsis

@@ -135,7 +135,7 @@

Synopsis

-

A

+

A<long>

Synopsis

@@ -229,7 +229,7 @@

Synopsis

-

B

+

B<T*>

Synopsis

@@ -276,7 +276,7 @@

Synopsis

-

B

+

B<T&>

Synopsis

@@ -372,7 +372,7 @@

Synopsis

-

C

+

C<int, int>

Synopsis

@@ -419,7 +419,7 @@

Synopsis

-

C

+

C<T*, int>

Synopsis

diff --git a/test-files/golden-tests/class-template-specializations-1.adoc b/test-files/golden-tests/class-template-specializations-1.adoc index d07acfda51..9998e00da4 100644 --- a/test-files/golden-tests/class-template-specializations-1.adoc +++ b/test-files/golden-tests/class-template-specializations-1.adoc @@ -602,7 +602,7 @@ f9(); ---- [#S0-0be] -== S0 +== S0<0> === Synopsis @@ -617,7 +617,7 @@ struct <<#S0-0cf,S0>><0>; [#S0-0c4] -== S0 +== S0<1, T*> === Synopsis @@ -632,7 +632,7 @@ struct <<#S0-0cf,S0>><1, T*>; [#S0-02] -== S0 +== S0<1, int*> === Synopsis diff --git a/test-files/golden-tests/class-template-specializations-1.html b/test-files/golden-tests/class-template-specializations-1.html index d58842c6fa..0ac6efc1ed 100644 --- a/test-files/golden-tests/class-template-specializations-1.html +++ b/test-files/golden-tests/class-template-specializations-1.html @@ -691,7 +691,7 @@

Synopsis

-

S0

+

S0<0>

Synopsis

@@ -709,7 +709,7 @@

Synopsis

-

S0

+

S0<1, T*>

Synopsis

@@ -727,7 +727,7 @@

Synopsis

-

S0

+

S0<1, int*>

Synopsis

diff --git a/test-files/golden-tests/class-template-specializations-2.adoc b/test-files/golden-tests/class-template-specializations-2.adoc index a96bd21e22..6b4eeb6240 100644 --- a/test-files/golden-tests/class-template-specializations-2.adoc +++ b/test-files/golden-tests/class-template-specializations-2.adoc @@ -36,7 +36,7 @@ struct A; [#A-03] -== A +== A === Synopsis @@ -81,7 +81,7 @@ struct B; [#A-03-B-01] -== <<#A-03,A>>::B +== <<#A-03,A>>::B === Synopsis @@ -119,7 +119,7 @@ struct C; [#A-03-B-0b] -== <<#A-03,A>>::B +== <<#A-03,A>>::B === Synopsis @@ -134,7 +134,7 @@ struct <<#A-03-B-05,B>>; [#A-06] -== A +== A === Synopsis @@ -203,7 +203,7 @@ struct E; [#A-06-D-0b-E-04] -== <<#A-06,A>>::<<#A-06-D-0b,D>>::E +== <<#A-06,A>>::<<#A-06-D-0b,D>>::E === Synopsis @@ -241,7 +241,7 @@ struct F; [#A-06-D-04] -== <<#A-06,A>>::D +== <<#A-06,A>>::D === Synopsis @@ -283,7 +283,7 @@ struct G; [#A-06-D-04-G-0c] -== <<#A-06,A>>::<<#A-06-D-04,D>>::G +== <<#A-06,A>>::<<#A-06-D-04,D>>::G === Synopsis diff --git a/test-files/golden-tests/class-template-specializations-2.html b/test-files/golden-tests/class-template-specializations-2.html index 2ac3db552a..612fafc630 100644 --- a/test-files/golden-tests/class-template-specializations-2.html +++ b/test-files/golden-tests/class-template-specializations-2.html @@ -47,7 +47,7 @@

Synopsis

-

A

+

A<T*>

Synopsis

@@ -100,7 +100,7 @@

Synopsis

-

A<T*>::B

+

A<T*>::B<U*>

Synopsis

@@ -148,7 +148,7 @@

Synopsis

-

A<T*>::B

+

A<T*>::B<int>

Synopsis

@@ -166,7 +166,7 @@

Synopsis

-

A

+

A<double>

Synopsis

@@ -250,7 +250,7 @@

Synopsis

-

A<double>::D::E

+

A<double>::D::E<T*>

Synopsis

@@ -298,7 +298,7 @@

Synopsis

-

A<double>::D

+

A<double>::D<float>

Synopsis

@@ -349,7 +349,7 @@

Synopsis

-

A<double>::D<float>::G

+

A<double>::D<float>::G<T*>

Synopsis

diff --git a/test-files/golden-tests/class-template-specializations-3.adoc b/test-files/golden-tests/class-template-specializations-3.adoc index f1fd8bcef2..e4e292fa67 100644 --- a/test-files/golden-tests/class-template-specializations-3.adoc +++ b/test-files/golden-tests/class-template-specializations-3.adoc @@ -104,7 +104,7 @@ struct D; [#A-0e-B-07-D-0f] -== <<#A-0e,A>>::<<#A-0e-B-07,B>>::D +== <<#A-0e,A>>::<<#A-0e-B-07,B>>::D === Synopsis @@ -119,7 +119,7 @@ struct <<#A-0e-B-07-D-09,D>>; [#A-0e-B-00] -== <<#A-0e,A>>::B +== <<#A-0e,A>>::B === Synopsis @@ -178,7 +178,7 @@ struct D; [#A-0e-B-00-D-0d] -== <<#A-0e,A>>::<<#A-0e-B-00,B>>::D +== <<#A-0e,A>>::<<#A-0e-B-00,B>>::D === Synopsis diff --git a/test-files/golden-tests/class-template-specializations-3.html b/test-files/golden-tests/class-template-specializations-3.html index 0ff60909a7..25b4ca4ae7 100644 --- a/test-files/golden-tests/class-template-specializations-3.html +++ b/test-files/golden-tests/class-template-specializations-3.html @@ -130,7 +130,7 @@

Synopsis

-

A::B::D

+

A::B::D<bool>

Synopsis

@@ -148,7 +148,7 @@

Synopsis

-

A::B

+

A::B<double>

Synopsis

@@ -218,7 +218,7 @@

Synopsis

-

A::B<double>::D

+

A::B<double>::D<bool>

Synopsis

diff --git a/test-files/golden-tests/duplicate-jdoc.adoc b/test-files/golden-tests/duplicate-jdoc.adoc index 74785355c6..1aa24aae6a 100644 --- a/test-files/golden-tests/duplicate-jdoc.adoc +++ b/test-files/golden-tests/duplicate-jdoc.adoc @@ -104,7 +104,7 @@ g0(int a); === Parameters |=== -| Name | Description +| Name | Description | *a* | @@ -135,7 +135,7 @@ g1(int a); === Parameters |=== -| Name | Description +| Name | Description | *a* | diff --git a/test-files/golden-tests/explicit-ctor.html b/test-files/golden-tests/explicit-ctor.html index 619ff9996a..3cdee0ea29 100644 --- a/test-files/golden-tests/explicit-ctor.html +++ b/test-files/golden-tests/explicit-ctor.html @@ -71,28 +71,28 @@

Synopsis

 
 explicit
-Explicit();
+Explicit();
 
 
» more...
 
 explicit
-Explicit(Explicit const&);
+Explicit(Explicit const&);
 
 
» more...
 
 explicit
-Explicit(Explicit&&) noexcept;
+Explicit(Explicit&&) noexcept;
 
 
» more...
 
 explicit
-Explicit(
+Explicit(
     int,
     int);
 
@@ -208,28 +208,28 @@ 

Synopsis

 
 explicit(true)
-ExplicitTrue();
+ExplicitTrue();
 
 
» more...
 
 explicit(true)
-ExplicitTrue(ExplicitTrue const&);
+ExplicitTrue(ExplicitTrue const&);
 
 
» more...
 
 explicit(true)
-ExplicitTrue(ExplicitTrue&&) noexcept;
+ExplicitTrue(ExplicitTrue&&) noexcept;
 
 
» more...
 
 explicit(true)
-ExplicitTrue(
+ExplicitTrue(
     int,
     int);
 
@@ -345,28 +345,28 @@ 

Synopsis

 
 explicit(false)
-ExplicitFalse();
+ExplicitFalse();
 
 
» more...
 
 explicit(false)
-ExplicitFalse(ExplicitFalse const&);
+ExplicitFalse(ExplicitFalse const&);
 
 
» more...
 
 explicit(false)
-ExplicitFalse(ExplicitFalse&&) noexcept;
+ExplicitFalse(ExplicitFalse&&) noexcept;
 
 
» more...
 
 explicit(false)
-ExplicitFalse(
+ExplicitFalse(
     int,
     int);
 
@@ -483,28 +483,28 @@ 

Synopsis

 
 explicit(B)
-ExplicitExpression();
+ExplicitExpression();
 
 
» more...
 
 explicit(B)
-ExplicitExpression(ExplicitExpression const&);
+ExplicitExpression(ExplicitExpression const&);
 
 
» more...
 
 explicit(B)
-ExplicitExpression(ExplicitExpression&&) noexcept;
+ExplicitExpression(ExplicitExpression&&) noexcept;
 
 
» more...
 
 explicit(B)
-ExplicitExpression(
+ExplicitExpression(
     int,
     int);
 
diff --git a/test-files/golden-tests/explicit-deduct-guide.adoc b/test-files/golden-tests/explicit-deduct-guide.adoc
index db49e42ed5..b4d40d0e06 100644
--- a/test-files/golden-tests/explicit-deduct-guide.adoc
+++ b/test-files/golden-tests/explicit-deduct-guide.adoc
@@ -48,7 +48,7 @@ struct X;
 
 
 [#X-0d]
-== X
+== <<#X-0e,X>><0>
 
 === Synopsis
 
@@ -59,7 +59,7 @@ Declared in ``
 ----
 
 [#X-00]
-== X
+== <<#X-0e,X>><0>
 
 === Synopsis
 
@@ -70,7 +70,7 @@ Declared in ``
 ----
 
 [#X-0b]
-== X
+== <<#X-0e,X>><0>
 
 === Synopsis
 
@@ -81,7 +81,7 @@ Declared in ``
 ----
 
 [#X-06]
-== X
+== <<#X-0e,X>><0>
 
 === Synopsis
 
diff --git a/test-files/golden-tests/explicit-deduct-guide.html b/test-files/golden-tests/explicit-deduct-guide.html
index a15d2e862c..d4bc60a7a4 100644
--- a/test-files/golden-tests/explicit-deduct-guide.html
+++ b/test-files/golden-tests/explicit-deduct-guide.html
@@ -62,7 +62,7 @@ 

Synopsis

-

X

+

X<0>

Synopsis

@@ -77,7 +77,7 @@

Synopsis

-

X

+

X<0>

Synopsis

@@ -92,7 +92,7 @@

Synopsis

-

X

+

X<0>

Synopsis

@@ -107,7 +107,7 @@

Synopsis

-

X

+

X<0>

Synopsis

diff --git a/test-files/golden-tests/explicit-object-parameter.html b/test-files/golden-tests/explicit-object-parameter.html index 90f2da6a5c..2322669afd 100644 --- a/test-files/golden-tests/explicit-object-parameter.html +++ b/test-files/golden-tests/explicit-object-parameter.html @@ -65,7 +65,7 @@

Synopsis

template<typename Self> constexpr auto&& -value(this Self&& self); +value(this Self&& self); » more... @@ -74,7 +74,7 @@

Synopsis

template<typename Self> constexpr auto&& -value(this +value(this Self&& self, int x); diff --git a/test-files/golden-tests/nested-private-template.adoc b/test-files/golden-tests/nested-private-template.adoc index 187fa0e242..e3438d703a 100644 --- a/test-files/golden-tests/nested-private-template.adoc +++ b/test-files/golden-tests/nested-private-template.adoc @@ -59,7 +59,7 @@ struct impl; [#range-impl-00] -== <<#range,range>>::impl +== <<#range,range>>::impl === Synopsis diff --git a/test-files/golden-tests/nested-private-template.html b/test-files/golden-tests/nested-private-template.html index d36aba5659..59b8997c67 100644 --- a/test-files/golden-tests/nested-private-template.html +++ b/test-files/golden-tests/nested-private-template.html @@ -78,7 +78,7 @@

Synopsis

-

range::impl

+

range::impl<R, false>

Synopsis

diff --git a/test-files/golden-tests/param-direction.adoc b/test-files/golden-tests/param-direction.adoc index 0c0734797f..4c27c042ff 100644 --- a/test-files/golden-tests/param-direction.adoc +++ b/test-files/golden-tests/param-direction.adoc @@ -56,7 +56,7 @@ f(int x0); === Parameters |=== -| Name | Description +| Name | Description | *x0* | @@ -79,7 +79,7 @@ g( === Parameters |=== -| Name | Description +| Name | Description | *x1* | @@ -104,7 +104,7 @@ h( === Parameters |=== -| Name | Description +| Name | Description | *x2* | @@ -129,7 +129,7 @@ i( === Parameters |=== -| Name | Description +| Name | Description | *x3* | @@ -154,7 +154,7 @@ j( === Parameters |=== -| Name | Description +| Name | Description | *x4* | @@ -180,7 +180,7 @@ k( === Parameters |=== -| Name | Description +| Name | Description | *x5* | @@ -209,7 +209,7 @@ l( === Parameters |=== -| Name | Description +| Name | Description | *x6* | @@ -236,7 +236,7 @@ m( === Parameters |=== -| Name | Description +| Name | Description | *x7* | @@ -259,7 +259,7 @@ n(int x8); === Parameters |=== -| Name | Description +| Name | Description | *x8* | @@ -280,7 +280,7 @@ o(int x9); === Parameters |=== -| Name | Description +| Name | Description | *x9* | diff --git a/test-files/golden-tests/param.adoc b/test-files/golden-tests/param.adoc index e35ae1d88c..029da39683 100644 --- a/test-files/golden-tests/param.adoc +++ b/test-files/golden-tests/param.adoc @@ -38,7 +38,7 @@ f(int x); === Parameters |=== -| Name | Description +| Name | Description | *x* | @@ -61,7 +61,7 @@ g( === Parameters |=== -| Name | Description +| Name | Description | *x* | @@ -87,7 +87,7 @@ h( === Parameters |=== -| Name | Description +| Name | Description | *x* | @@ -116,7 +116,7 @@ i( === Parameters |=== -| Name | Description +| Name | Description | *w* | diff --git a/test-files/golden-tests/record-1.adoc b/test-files/golden-tests/record-1.adoc index 11c3b14ba7..a8107e5962 100644 --- a/test-files/golden-tests/record-1.adoc +++ b/test-files/golden-tests/record-1.adoc @@ -203,7 +203,7 @@ the separator === Parameters |=== -| Name | Description +| Name | Description | *x* | diff --git a/test-files/golden-tests/requires-clause.html b/test-files/golden-tests/requires-clause.html index c5df06a646..82b9f5b07e 100644 --- a/test-files/golden-tests/requires-clause.html +++ b/test-files/golden-tests/requires-clause.html @@ -48,7 +48,7 @@

Synopsis

template<typename T> void -f() requires (sizeof(T) == 4); +f() requires (sizeof(T) == 4); » more... @@ -56,7 +56,7 @@

Synopsis

template<typename T> void -f() requires (sizeof(T) == 2); +f() requires (sizeof(T) == 2); » more... @@ -108,7 +108,7 @@

Synopsis

template<typename T> requires (sizeof(T) == 4) void -g(); +g(); » more... @@ -116,7 +116,7 @@

Synopsis

template<typename T> requires (sizeof(U) == 2) void -g(); +g(); » more... diff --git a/test-files/golden-tests/static-data-template.adoc b/test-files/golden-tests/static-data-template.adoc index 9fcc6e5bed..bfda0e4f35 100644 --- a/test-files/golden-tests/static-data-template.adoc +++ b/test-files/golden-tests/static-data-template.adoc @@ -61,7 +61,7 @@ T const x = 0; ---- [#A-x-0a] -== <<#A,A>>::x +== <<#A,A>>::x === Synopsis @@ -75,7 +75,7 @@ T const <<#A-x-0e,x>> = 1; ---- [#A-x-07] -== <<#A,A>>::x +== <<#A,A>>::x === Synopsis diff --git a/test-files/golden-tests/static-data-template.html b/test-files/golden-tests/static-data-template.html index 0dcaccc682..3357324942 100644 --- a/test-files/golden-tests/static-data-template.html +++ b/test-files/golden-tests/static-data-template.html @@ -80,7 +80,7 @@

Synopsis

-

A::x

+

A::x<U*, T>

Synopsis

@@ -98,7 +98,7 @@

Synopsis

-

A::x

+

A::x<T, long>

Synopsis

diff --git a/test-files/golden-tests/temp/c_mct_expl_inline.adoc b/test-files/golden-tests/temp/c_mct_expl_inline.adoc index bc9620f48b..69336a3530 100644 --- a/test-files/golden-tests/temp/c_mct_expl_inline.adoc +++ b/test-files/golden-tests/temp/c_mct_expl_inline.adoc @@ -77,7 +77,7 @@ f(); ---- [#A-B-01] -== <<#A,A>>::B +== <<#A,A>>::B === Synopsis diff --git a/test-files/golden-tests/temp/c_mct_expl_inline.html b/test-files/golden-tests/temp/c_mct_expl_inline.html index b9d7a8179e..fcad55951a 100644 --- a/test-files/golden-tests/temp/c_mct_expl_inline.html +++ b/test-files/golden-tests/temp/c_mct_expl_inline.html @@ -104,7 +104,7 @@

Synopsis

-

A::B

+

A::B<int>

Synopsis

diff --git a/test-files/golden-tests/temp/c_mct_expl_outside.adoc b/test-files/golden-tests/temp/c_mct_expl_outside.adoc index dc095fef52..e00108c1ec 100644 --- a/test-files/golden-tests/temp/c_mct_expl_outside.adoc +++ b/test-files/golden-tests/temp/c_mct_expl_outside.adoc @@ -77,7 +77,7 @@ f(); ---- [#A-B-01] -== <<#A,A>>::B +== <<#A,A>>::B === Synopsis diff --git a/test-files/golden-tests/temp/c_mct_expl_outside.html b/test-files/golden-tests/temp/c_mct_expl_outside.html index 1d1cd88d15..2215a40836 100644 --- a/test-files/golden-tests/temp/c_mct_expl_outside.html +++ b/test-files/golden-tests/temp/c_mct_expl_outside.html @@ -104,7 +104,7 @@

Synopsis

-

A::B

+

A::B<int>

Synopsis

diff --git a/test-files/golden-tests/temp/c_mft_expl_inline.adoc b/test-files/golden-tests/temp/c_mft_expl_inline.adoc index fae167fe89..5a98353480 100644 --- a/test-files/golden-tests/temp/c_mft_expl_inline.adoc +++ b/test-files/golden-tests/temp/c_mft_expl_inline.adoc @@ -70,7 +70,7 @@ f(); ---- [#A-f-0b] -== <<#A,A>>::f +== <<#A,A>>::f === Synopsis diff --git a/test-files/golden-tests/temp/c_mft_expl_inline.html b/test-files/golden-tests/temp/c_mft_expl_inline.html index d9f5c7b410..1afe9d3cd1 100644 --- a/test-files/golden-tests/temp/c_mft_expl_inline.html +++ b/test-files/golden-tests/temp/c_mft_expl_inline.html @@ -64,7 +64,7 @@

Synopsis

template<typename T> void -f(); +f(); » more... @@ -72,7 +72,7 @@

Synopsis

template<> void -f<int>(); +f<int>(); » more... @@ -97,7 +97,7 @@

Synopsis

-

A::f

+

A::f<int>

Synopsis

diff --git a/test-files/golden-tests/temp/c_mft_expl_outside.adoc b/test-files/golden-tests/temp/c_mft_expl_outside.adoc index 3f5a26562d..c17635b3e5 100644 --- a/test-files/golden-tests/temp/c_mft_expl_outside.adoc +++ b/test-files/golden-tests/temp/c_mft_expl_outside.adoc @@ -70,7 +70,7 @@ f(); ---- [#A-f-0b] -== <<#A,A>>::f +== <<#A,A>>::f === Synopsis diff --git a/test-files/golden-tests/temp/c_mft_expl_outside.html b/test-files/golden-tests/temp/c_mft_expl_outside.html index 92c5510703..7d2aa714e8 100644 --- a/test-files/golden-tests/temp/c_mft_expl_outside.html +++ b/test-files/golden-tests/temp/c_mft_expl_outside.html @@ -64,7 +64,7 @@

Synopsis

template<typename T> void -f(); +f(); » more... @@ -72,7 +72,7 @@

Synopsis

template<> void -f<int>(); +f<int>(); » more... @@ -97,7 +97,7 @@

Synopsis

-

A::f

+

A::f<int>

Synopsis

diff --git a/test-files/golden-tests/temp/ct_expl.adoc b/test-files/golden-tests/temp/ct_expl.adoc index 16ca58c84b..2f41abc0a0 100644 --- a/test-files/golden-tests/temp/ct_expl.adoc +++ b/test-files/golden-tests/temp/ct_expl.adoc @@ -54,7 +54,7 @@ f(); ---- [#A-00] -== A +== A === Synopsis diff --git a/test-files/golden-tests/temp/ct_expl.html b/test-files/golden-tests/temp/ct_expl.html index faf6bf92cc..6da5022e4a 100644 --- a/test-files/golden-tests/temp/ct_expl.html +++ b/test-files/golden-tests/temp/ct_expl.html @@ -74,7 +74,7 @@

Synopsis

-

A

+

A<int>

Synopsis

diff --git a/test-files/golden-tests/temp/ct_mct_expl_inline.adoc b/test-files/golden-tests/temp/ct_mct_expl_inline.adoc index 9487c13603..dfaa4852e6 100644 --- a/test-files/golden-tests/temp/ct_mct_expl_inline.adoc +++ b/test-files/golden-tests/temp/ct_mct_expl_inline.adoc @@ -78,7 +78,7 @@ f(); ---- [#A-B-06] -== <<#A,A>>::B +== <<#A,A>>::B === Synopsis diff --git a/test-files/golden-tests/temp/ct_mct_expl_inline.html b/test-files/golden-tests/temp/ct_mct_expl_inline.html index 9a19dcabd6..9a184745d0 100644 --- a/test-files/golden-tests/temp/ct_mct_expl_inline.html +++ b/test-files/golden-tests/temp/ct_mct_expl_inline.html @@ -105,7 +105,7 @@

Synopsis

-

A::B

+

A::B<int>

Synopsis

diff --git a/test-files/golden-tests/temp/ct_mft_expl_inline.adoc b/test-files/golden-tests/temp/ct_mft_expl_inline.adoc index 517b7b91e1..6ef88545b9 100644 --- a/test-files/golden-tests/temp/ct_mft_expl_inline.adoc +++ b/test-files/golden-tests/temp/ct_mft_expl_inline.adoc @@ -71,7 +71,7 @@ f(); ---- [#A-f-04] -== <<#A,A>>::f +== <<#A,A>>::f === Synopsis diff --git a/test-files/golden-tests/temp/ct_mft_expl_inline.html b/test-files/golden-tests/temp/ct_mft_expl_inline.html index eaacbe9cf0..a4fe3b4d73 100644 --- a/test-files/golden-tests/temp/ct_mft_expl_inline.html +++ b/test-files/golden-tests/temp/ct_mft_expl_inline.html @@ -65,7 +65,7 @@

Synopsis

template<typename U> void -f(); +f(); » more... @@ -73,7 +73,7 @@

Synopsis

template<> void -f<int>(); +f<int>(); » more... @@ -98,7 +98,7 @@

Synopsis

-

A::f

+

A::f<int>

Synopsis

diff --git a/test-files/golden-tests/temp/ft_expl.adoc b/test-files/golden-tests/temp/ft_expl.adoc index cad5eed205..10c1f44e0e 100644 --- a/test-files/golden-tests/temp/ft_expl.adoc +++ b/test-files/golden-tests/temp/ft_expl.adoc @@ -47,7 +47,7 @@ f(); ---- [#f-0c] -== f +== f === Synopsis diff --git a/test-files/golden-tests/temp/ft_expl.html b/test-files/golden-tests/temp/ft_expl.html index 0b1700e784..ab1ee57267 100644 --- a/test-files/golden-tests/temp/ft_expl.html +++ b/test-files/golden-tests/temp/ft_expl.html @@ -34,7 +34,7 @@

Synopsis

template<typename T> void -f(); +f(); » more... @@ -42,7 +42,7 @@

Synopsis

template<> void -f<int>(); +f<int>(); » more... @@ -67,7 +67,7 @@

Synopsis

-

f

+

f<int>

Synopsis

diff --git a/test-files/golden-tests/var-template.adoc b/test-files/golden-tests/var-template.adoc index f7a01dd754..4aaace96ea 100644 --- a/test-files/golden-tests/var-template.adoc +++ b/test-files/golden-tests/var-template.adoc @@ -42,7 +42,7 @@ unsigned int A = pass:[sizeof(T)]; ---- [#A-08e] -== A +== A === Synopsis @@ -54,7 +54,7 @@ unsigned int <<#A-084,A>> = 0; ---- [#A-01] -== A +== A === Synopsis @@ -108,7 +108,7 @@ unsigned int C = 0; ---- [#B-C-05] -== <<#B,B>>::C +== <<#B,B>>::C === Synopsis @@ -121,7 +121,7 @@ unsigned int <<#B-C-0e,C>> = pass:[-1]; ---- [#B-C-0c] -== <<#B,B>>::C +== <<#B,B>>::C === Synopsis diff --git a/test-files/golden-tests/var-template.html b/test-files/golden-tests/var-template.html index 3f9cbffdd5..8d026684cc 100644 --- a/test-files/golden-tests/var-template.html +++ b/test-files/golden-tests/var-template.html @@ -58,7 +58,7 @@

Synopsis

-

A

+

A<void>

Synopsis

@@ -74,7 +74,7 @@

Synopsis

-

A

+

A<T&>

Synopsis

@@ -141,7 +141,7 @@

Synopsis

-

B::C

+

B::C<int>

Synopsis

@@ -158,7 +158,7 @@

Synopsis

-

B::C

+

B::C<T*>

Synopsis