[Issue 4480] New: JSON: include location range, not just line numbers, for everything

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 17 10:09:52 PDT 2010


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

           Summary: JSON: include location range, not just line numbers,
                    for everything
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dhasenan at gmail.com


--- Comment #0 from Chris Wright <dhasenan at gmail.com> 2010-07-17 10:09:50 PDT ---
If you include the location range for everything in the json output, it's much
easier to implement navigate-to-declaration in an IDE. For example, if there is
code:

logger.trace(...);

json only outputs "line": 18.
But if it instead put: "range": { "start": {"line": 18, "col": 4}, "end":
{"line": 18, "col": 16}}

Then it's easier for an IDE to find the identifier under the cursor.

Similarly, IDEs often allow you to "fold" code -- collapse a declaration so you
don't have to see it, or collapse a function body or a block. Including a range
means the IDE doesn't need to parse D.

-- 
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