www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11823] New: ddoc: __FILE__ and other built-in symbols with underscores should be specially parsed

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823

           Summary: ddoc: __FILE__ and other built-in symbols with
                    underscores should be specially parsed
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-12-26
05:03:14 PST ---
http://dlang.org/phobos/std_exception.html#.assertNotThrown

string file     The file where the error occurred. Defaults to _FILE__.

Note the "_FILE__" instead of "__FILE__". This is because ddoc has a special
feature allowing you to avoid highlighting symbols in the output, e.g.:

-----
/// This function foo is named _foo
void foo() { }
-----

This will highlight the first foo word but not the second.

However, for __FILE__ and other built-in symbols beginning with an underscore
ddoc should probably avoid interpreting the leading underscore as an attempt to
de-emphasize the symbol, and instead just output these symbols as-is.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
         AssignedTo|nobody puremagic.com        |andrej.mitrovich gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-01-30
02:21:15 PST ---
https://github.com/D-Programming-Language/dmd/pull/3180

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 30 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
           Severity|normal                      |enhancement


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 30 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823



--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2014-01-30
16:39:23 PST ---
I'm not sure this is the right approach. An alternative is to recognize
__FILE__, etc., as special.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 30 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823



--- Comment #3 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-01-30
23:56:50 PST ---
(In reply to comment #2)
 I'm not sure this is the right approach. An alternative is to recognize
 __FILE__, etc., as special.

Well according to the spec compiler-reserved symbols start with double underscores, so I picked that approach. I guess we could instead implement an isBuiltinSymbol check? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 30 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823



--- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2014-02-01 06:37:33 PST ---
(In reply to comment #3)
 (In reply to comment #2)
 I'm not sure this is the right approach. An alternative is to recognize
 __FILE__, etc., as special.

Well according to the spec compiler-reserved symbols start with double underscores, so I picked that approach. I guess we could instead implement an isBuiltinSymbol check?

Even if double-underscored symbols are reserved in language spec, users can use them in their own own responsibility. (currently dmd does not reject defining such names). Therefore I think isBuiltinSymbol check would be better, because it is more conservative way. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 01 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823



--- Comment #5 from github-bugzilla puremagic.com 2014-02-02 14:11:24 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/85464688ef3fcadbfe1537bcc72eb4b7ebdd9fca
Fixes Issue 11823 - Ddoc symbol with a double underscore prefix should be
specially parsed.

https://github.com/D-Programming-Language/dmd/commit/706dd3928d817fc05cc830a36b471cd0e094f9ae
Merge pull request #3180 from AndrejMitrovic/Fix11823

Issue 11823 - Ddoc symbol with a double underscore prefix should be specially
parsed.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11823


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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