Skip to content

Commit 917d2cb

Browse files
committed
chore: function specifiers in the dom are flat
1 parent fbb8f09 commit 917d2cb

File tree

7 files changed

+31
-262
lines changed

7 files changed

+31
-262
lines changed

addons/generator/asciidoc/partials/function-sig.adoc.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[source,cpp,subs=+macros]
22
----
3-
{{#if (eq specs.storageClass "static")}}
3+
{{#if (eq storageClass "static")}}
44
static
55
{{/if}}
66
{{>type-name return}}
@@ -16,7 +16,7 @@ static
1616
{{~else~}}
1717
{{name}}()
1818
{{~/if~}}
19-
{{#if (eq specs.exceptionSpec "noexcept")}} noexcept{{/if~}}
20-
{{#if specs.isDeleted}} = delete{{/if~}}
19+
{{#if (eq exceptionSpec "noexcept")}} noexcept{{/if~}}
20+
{{#if isDeleted}} = delete{{/if~}}
2121
;
2222
----
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{{#if (eq kind "function")}}
2-
{{#if (eq specs.storageClass "static")}}static {{/if~}}
2+
{{#if (eq storageClass "static")}}static {{/if~}}
33
{{>type-name return}} {{name}}(
44
{{~#each params}}
55
{{>type-name type}}
66
{{#if name}} {{name}}{{/if}}
77
{{~#unless @last}}, {{/unless}}
88
{{~/each}})
9-
{{~#if (eq specs.exceptionSpec "noexcept")}} noexcept{{/if~}}
9+
{{~#if (eq exceptionSpec "noexcept")}} noexcept{{/if~}}
1010
;
1111
{{~else~}}
1212
{{/if}}

include/mrdox/Dom/DomFnSpecs.hpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

include/mrdox/Dom/DomJavadoc.hpp

Lines changed: 0 additions & 38 deletions
This file was deleted.

source/Dom/DomFnSpecs.cpp

Lines changed: 0 additions & 109 deletions
This file was deleted.

source/Dom/DomJavadoc.cpp

Lines changed: 0 additions & 63 deletions
This file was deleted.

source/Dom/DomMetadata.cpp

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include "Support/Radix.hpp"
1212
#include <mrdox/Metadata.hpp>
13-
#include <mrdox/Dom/DomFnSpecs.hpp>
1413
#include <mrdox/Dom/DomMetadata.hpp>
1514

1615
#include "-adoc/DocVisitor.hpp" // VFALCO NO!
@@ -784,10 +783,32 @@ construct() const
784783
if constexpr(T::isFunction())
785784
{
786785
list.insert(list.end(), {
787-
{ "params", dom::create<DomParamArray>(I_.Params, corpus_) },
788-
{ "return", dom::create<DomTypeInfo>(I_.ReturnType, corpus_) },
789-
{ "specs", dom::create<DomFnSpecs>(I_, corpus_) },
790-
{ "template", domCreate(I_.Template, corpus_) }
786+
{ "params", dom::create<DomParamArray>(I_.Params, corpus_) },
787+
{ "return", dom::create<DomTypeInfo>(I_.ReturnType, corpus_) },
788+
{ "template", domCreate(I_.Template, corpus_) },
789+
790+
{ "isVariadic", I_.specs0.isVariadic.get() },
791+
{ "isVirtual", I_.specs0.isVirtual.get() },
792+
{ "isVirtualAsWritten", I_.specs0.isVirtualAsWritten.get() },
793+
{ "isPure", I_.specs0.isPure.get() },
794+
{ "isDefaulted", I_.specs0.isDefaulted.get() },
795+
{ "isExplicitlyDefaulted",I_.specs0.isExplicitlyDefaulted.get() },
796+
{ "isDeleted", I_.specs0.isDeleted.get() },
797+
{ "isDeletedAsWritten", I_.specs0.isDeletedAsWritten.get() },
798+
{ "isNoReturn", I_.specs0.isNoReturn.get() },
799+
{ "hasOverrideAttr", I_.specs0.hasOverrideAttr.get() },
800+
{ "hasTrailingReturn", I_.specs0.hasTrailingReturn.get() },
801+
{ "isConst", I_.specs0.isConst.get() },
802+
{ "isVolatile", I_.specs0.isVolatile.get() },
803+
{ "isFinal", I_.specs0.isFinal.get() },
804+
{ "isNodiscard", I_.specs1.isNodiscard.get() },
805+
806+
{ "constexprKind", toString(I_.specs0.constexprKind.get()) },
807+
{ "exceptionSpec", toString(I_.specs0.exceptionSpec.get()) },
808+
{ "overloadedOperator", I_.specs0.overloadedOperator.get() },
809+
{ "storageClass", toString(I_.specs0.storageClass.get()) },
810+
{ "refQualifier", toString(I_.specs0.refQualifier.get()) },
811+
{ "explicitSpec", toString(I_.specs1.explicitSpec.get()) }
791812
});
792813
}
793814
if constexpr(T::isEnum())

0 commit comments

Comments
 (0)