digitalmars.D - Ddoc/parser behavior question
- Brian Schott (17/17) Jan 06 2016 Consider the following code:
- Jacob Carlborg (5/22) Jan 07 2016 Is it spelled out if one just do:
- Brian Schott (6/8) Jan 07 2016 Yes, but that's not my question. The behavior that I'm talking
- Jack Stouffer (4/19) Jan 07 2016 That looks intentional, and IMO is what makes sense. You have the
- Andrei Alexandrescu (3/26) Jan 07 2016 Could someone please contribute the appropriate bit/example in the docs?...
Consider the following code: /// doc1 int a, /// doc2 b, /// doc3 c; /// doc4 Ddoc's behavior is to generate this documentation: int a; doc1 doc2 int b; doc1 doc3 int c; doc1 doc4 This isn't really spelled out in the ddoc spec. Is this behavior intentional or just a coincidence?
Jan 06 2016
On 2016-01-07 03:14, Brian Schott wrote:Consider the following code: /// doc1 int a, /// doc2 b, /// doc3 c; /// doc4 Ddoc's behavior is to generate this documentation: int a; doc1 doc2 int b; doc1 doc3 int c; doc1 doc4 This isn't really spelled out in the ddoc spec. Is this behavior intentional or just a coincidence?Is it spelled out if one just do: int a; /// doc1 -- /Jacob Carlborg
Jan 07 2016
On Thursday, 7 January 2016 at 08:40:37 UTC, Jacob Carlborg wrote:Is it spelled out if one just do: int a; /// doc1Yes, but that's not my question. The behavior that I'm talking about is that the comment on the line before the line containing "int" is applied to all three variables, and that the comments following the commas and semicolons apply to the variables individually.
Jan 07 2016
On Thursday, 7 January 2016 at 02:14:50 UTC, Brian Schott wrote:Consider the following code: /// doc1 int a, /// doc2 b, /// doc3 c; /// doc4 Ddoc's behavior is to generate this documentation: int a; doc1 doc2 int b; doc1 doc3 int c; doc1 doc4That looks intentional, and IMO is what makes sense. You have the global comment for the declaration and individual comments for each.
Jan 07 2016
On 01/07/2016 12:25 PM, Jack Stouffer wrote:On Thursday, 7 January 2016 at 02:14:50 UTC, Brian Schott wrote:Could someone please contribute the appropriate bit/example in the docs? Thx! -- AndreiConsider the following code: /// doc1 int a, /// doc2 b, /// doc3 c; /// doc4 Ddoc's behavior is to generate this documentation: int a; doc1 doc2 int b; doc1 doc3 int c; doc1 doc4That looks intentional, and IMO is what makes sense. You have the global comment for the declaration and individual comments for each.
Jan 07 2016