[Issue 4899] Ddoc's warnings about stray parens should include file and line numbers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 21 07:39:06 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4899



--- Comment #3 from Johannes Pfau <johannespfau at gmail.com> 2010-09-21 07:38:26 PDT ---
OK, I can confirm that.
So the line information is missing if the comment is a module comment. The dmd
main function calls Module::gendocfile() which calls
DocComment::writeSections() directly. In this case the Module's loc member is
never set and therefore the line information is missing, I don't know how to
fix this though.

In case you're interested why the parenthesis error occurs:
The second line in the comment, "http://www.boost.org/LICENSE_1_0.txt)" is the
problem. Because of the colon dmd thinks you define a ddoc section named "http"
with content "//www.boost.org/LICENSE_1_0.txt)". Because parenthesis must be
closed in the section they were opened in the stray parenthesis error occurs.

Possible workarounds are:
1. Join those two lines into one
2. Section names cannot contain spaces, so move the 'at' to the second line
(See accompanying file LICENSE_1_0.txt or copy
at http://www.boost.org/LICENSE_1_0.txt)
3. Use a macro. _Every_ macro will work
(See accompanying file LICENSE_1_0.txt or copy at
$(LINK http://www.boost.org/LICENSE_1_0.txt))

(See accompanying file LICENSE_1_0.txt or copy at
$(TEXT http://www.boost.org/LICENSE_1_0.txt))
Macros:
  TEXT=$0

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list