-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support anonymous union members
- Loading branch information
1 parent
1e162bf
commit 8d8a007
Showing
8 changed files
with
105 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
share/mrdocs/addons/generator/asciidoc/partials/special-name-suffix.adoc.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{{#if (eq kind "overload")}}{{>special-name-suffix (front members)~}} | ||
{{else if (eq kind "function")~}} | ||
{{#if (eq class "constructor")}}[.small]#[constructor]# | ||
{{~else if (eq class "destructor")~}}[.small]#[destructor]# | ||
{{~else if (eq class "destructor")}}[.small]#[destructor]# | ||
{{~/if~}} | ||
{{else if (eq kind "field")~}} | ||
{{#if isVariant}}[.small]#[variant member]#{{/if~}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
union A | ||
{ | ||
int x; | ||
bool y; | ||
}; | ||
|
||
struct B | ||
{ | ||
union | ||
{ | ||
int x; | ||
bool y; | ||
}; | ||
|
||
int z; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mrdocs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://github.com/cppalliance/mrdocs/raw/develop/mrdocs.rnc"> | ||
<namespace id="//////////////////////////8="> | ||
<union name="A" id="rOga+mYntM7ytFb7bhJSklZ0r34="> | ||
<file path="union.cpp" line="1" class="def"/> | ||
<field name="x" id="Be23kXXQRAQHfKNTp2HOM2jouJo="> | ||
<file path="union.cpp" line="3" class="def"/> | ||
<attr id="is-variant"/> | ||
<type name="int"/> | ||
</field> | ||
<field name="y" id="HqUCV+CnE+akUirdwlf8maZxw40="> | ||
<file path="union.cpp" line="4" class="def"/> | ||
<attr id="is-variant"/> | ||
<type name="bool"/> | ||
</field> | ||
</union> | ||
<struct name="B" id="3JsK1DO0O+wZhv+0meptQrbs3fY="> | ||
<file path="union.cpp" line="7" class="def"/> | ||
<field name="x" id="QtOrWpj/+5ytPBCEoNlbW+uW/oA="> | ||
<file path="union.cpp" line="11" class="def"/> | ||
<attr id="is-variant"/> | ||
<type name="int"/> | ||
</field> | ||
<field name="y" id="8o+2/UVx4hIiDLQRYohp688sXmI="> | ||
<file path="union.cpp" line="12" class="def"/> | ||
<attr id="is-variant"/> | ||
<type name="bool"/> | ||
</field> | ||
<field name="z" id="zTVqdWL2ShJziu85kaeOk2wfYFs="> | ||
<file path="union.cpp" line="15" class="def"/> | ||
<type name="int"/> | ||
</field> | ||
</struct> | ||
</namespace> | ||
</mrdocs> |