Re: [PATCH] Support for C++ comments next to arguments of macro function
Albert <[email protected]> Sun, 10 Dec 2017 19:50:06 +0100
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CABOOx7YCjO_j2qV1BEoURyAjgOwZa18YfGPa0upVZ_ajNnb-ew@mail.gmail.com> |
--===============0740164388632278319==
Content-Type: multipart/alternative; boundary="f403045d62b6edf72f056000e220"
--f403045d62b6edf72f056000e220
Content-Type: text/plain; charset="UTF-8"
Dear Christian,
What happens in case of multi-line inline comments?
E.g.:
DECLARE_ENUM(Foo_t,
foo1 = 0x000000001, ///< First comment.
///< continuation of first comment
foo2 = 22, ///< Second comment.
///< continuation of second comment
foo3
);
Best Regards,
Albert
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Sun, Dec 10, 2017 at 7:10 PM, Christian Schoenebeck via Doxygen-develop <
[email protected]> wrote:
> Hi,
>
> please consider the attached patch for git, which allows code input like
> this
> to be processed correctly:
>
> #ifndef DECLARE_ENUM
> # define DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ }
> #endif
>
> DECLARE_ENUM(Foo_t,
> foo1 = 0x000000001, ///< First comment.
> foo2 = 22, ///< Second comment.
> foo3
> );
>
> The current general behavior of dropping all new line characters on macro
> expansion is preserved. Accordingly those C++ comments are automatically
> rewritten as inline C comments instead.
>
> Best regards,
> Christian Schoenebeck
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Doxygen-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/doxygen-develop
>
>
--f403045d62b6edf72f056000e220
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div>Dear Christian,<br><br></div>What happens i=
n case of multi-line inline comments?<br></div>E.g.:<br>DECLARE_ENUM(Foo_t,=
<br>
=C2=A0 =C2=A0 =C2=A0foo1 =3D 0x000000001, ///< First comment.<br></div>=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ///< contin=
uation of first comment<br><div>
=C2=A0 =C2=A0 =C2=A0foo2 =3D 22, ///< Second comment.</div><div>=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ///< continuation of second comment<br=
>
</div><div>
=C2=A0 =C2=A0=C2=A0 foo3<br>
=C2=A0);</div><div><br></div><div>Best Regards,</div><div><br></div><div>Al=
bert<br></div></div><div id=3D"DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style=3D"border-top:1px solid #d3d4de">
<tr>
<td style=3D"width:55px;padding-top:13px"><a href=3D"http://www.avg=
.com/email-signature?utm_medium=3Demail&utm_source=3Dlink&utm_campa=
ign=3Dsig-email&utm_content=3Dwebmail" target=3D"_blank"><img src=3D"ht=
tps://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" al=
t=3D"" width=3D"46" height=3D"29" style=3D"width: 46px; height: 29px;"></a>=
</td>
<td style=3D"width:470px;padding-top:12px;color:#41424e;font-size:13px;fo=
nt-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href=
=3D"http://www.avg.com/email-signature?utm_medium=3Demail&utm_source=3D=
link&utm_campaign=3Dsig-email&utm_content=3Dwebmail" target=3D"_bla=
nk" style=3D"color:#4453ea">www.avg.com</a>
</td>
</tr>
</table><a href=3D"#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width=3D"1" heigh=
t=3D"1"></a></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"=
>On Sun, Dec 10, 2017 at 7:10 PM, Christian Schoenebeck via Doxygen-develop=
<span dir=3D"ltr"><<a href=3D"mailto:[email protected].=
net" target=3D"_blank">[email protected]</a>></span>=
wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
please consider the attached patch for git, which allows code input like th=
is<br>
to be processed correctly:<br>
<br>
=C2=A0#ifndef DECLARE_ENUM<br>
=C2=A0# define DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ }<br>
=C2=A0#endif<br>
<br>
=C2=A0DECLARE_ENUM(Foo_t,<br>
=C2=A0 =C2=A0 =C2=A0foo1 =3D 0x000000001, ///< First comment.<br>
=C2=A0 =C2=A0 =C2=A0foo2 =3D 22, ///< Second comment.<br>
=C2=A0 =C2=A0 =C2=A0foo3<br>
=C2=A0);<br>
<br>
The current general behavior of dropping all new line characters on macro<b=
r>
expansion is preserved. Accordingly those C++ comments are automatically<br=
>
rewritten as inline C comments instead.<br>
<br>
Best regards,<br>
Christian Schoenebeck<br>------------------------------<wbr>---------------=
---------------<wbr>------------------<br>
Check out the vibrant tech community on one of the world's most<br>
engaging tech sites, Slashdot.org! <a href=3D"http://sdm.link/slashdot" rel=
=3D"noreferrer" target=3D"_blank">http://sdm.link/slashdot</a><br>_________=
_____________________<wbr>_________________<br>
Doxygen-develop mailing list<br>
<a href=3D"mailto:[email protected]">Doxygen-develop@li=
sts.<wbr>sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/doxygen-develop" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/<wbr>lists=
/listinfo/doxygen-develop</a><br>
<br></blockquote></div><br></div>
--f403045d62b6edf72f056000e220--
--===============0740164388632278319==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============0740164388632278319==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
--===============0740164388632278319==--