digitalmars.D.bugs - DDoc shows $(DDOC_MEMBERS when parentheses are mismatched.
- Don Clugston (5/5) Oct 27 2005 I came up with a nice small test case (2 lines :) ).
- Walter Bright (5/10) Oct 28 2005 That's right. It's not a bug in Ddoc, though. You need to match the pare...
- Don Clugston (14/28) Nov 02 2005 Agreed, the bug is in my comments. But DDoc doesn't help you much in
- Walter Bright (8/25) Nov 05 2005 parens.
I came up with a nice small test case (2 lines :) ). -------------------------------- /// Mismatched brackets ( void func() {} --------------------------------
Oct 27 2005
"Don Clugston" <dac nospam.com.au> wrote in message news:djqi7j$1ruc$1 digitaldaemon.com...I came up with a nice small test case (2 lines :) ). -------------------------------- /// Mismatched brackets ( void func() {} --------------------------------That's right. It's not a bug in Ddoc, though. You need to match the parens. To have mismatched ones, replace the mismatched ones with $(LPAREN) and $(RPAREN).
Oct 28 2005
Walter Bright wrote:"Don Clugston" <dac nospam.com.au> wrote in message news:djqi7j$1ruc$1 digitaldaemon.com...Agreed, the bug is in my comments. But DDoc doesn't help you much in tracking it down. The $(DDOC_MEMBERS shows up in front of the first function in the file, not above the function where the mismatch occured. It took me ages to work out what was causing it. It would be nice if DDoc produced an error message that was a bit less obscure. Ideally, an text output like 'DDOC ERROR: MISMATCHED PARENTHESES' appended to the end of any comment where sum[ ( ] - sum[)] is different at the beginning than at the end. Ideally with: mismatch = sum('(') - sum(')'); if (mimatch!=0) printf("DDOC ERROR: MISMATCHED PARENTHESES"); if (mismatch>0) for(int i=0; i!=mismatch; ++i) printf(")"); if (mismatch<0) for(int i=0; i!=mismatch; --i) printf("("); Not a big deal, but I wasted an hour on this.I came up with a nice small test case (2 lines :) ). -------------------------------- /// Mismatched brackets ( void func() {} --------------------------------That's right. It's not a bug in Ddoc, though. You need to match the parens. To have mismatched ones, replace the mismatched ones with $(LPAREN) and $(RPAREN).
Nov 02 2005
"Don Clugston" <dac nospam.com.au> wrote in message news:dk9teq$2687$1 digitaldaemon.com...Walter Bright wrote:parens.That's right. It's not a bug in Ddoc, though. You need to match theSorry about that. But once you know it does that, it becomes a no-brainer to recognize it and fix it. For example, I use microemacs for my programmer text editor. It has an indispensible "match parentheses" command, and I use that to find the errant ) or (. The match parentheses also works for <>, [], {}, and even #if / #elif / #else / #endif.To have mismatched ones, replace the mismatched ones with $(LPAREN) and $(RPAREN).Agreed, the bug is in my comments. But DDoc doesn't help you much in tracking it down. The $(DDOC_MEMBERS shows up in front of the first function in the file, not above the function where the mismatch occured. It took me ages to work out what was causing it. It would be nice if DDoc produced an error message that was a bit less obscure. Ideally, an text output like 'DDOC ERROR: MISMATCHED PARENTHESES' appended to the end of any comment where sum[ ( ] - sum[)] is different at the beginning than at the end. Ideally with: mismatch = sum('(') - sum(')'); if (mimatch!=0) printf("DDOC ERROR: MISMATCHED PARENTHESES"); if (mismatch>0) for(int i=0; i!=mismatch; ++i) printf(")"); if (mismatch<0) for(int i=0; i!=mismatch; --i) printf("("); Not a big deal, but I wasted an hour on this.
Nov 05 2005