Bug 13384 – Support JSON output for new package(names) protection

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-27T15:17:09Z
Last change time
2024-12-13T18:25:04Z
Assigned to
No Owner
Creator
Kenji Hara
Moved to GitHub: dmd#17679 →

Comments

Comment #0 by k.hara.pg — 2014-08-27T15:17:09Z
From the github discussion: https://github.com/D-Programming-Language/dmd/pull/3906 This code: // test.d module a.b.c; package(a.b) void foo() {} With the command line: dmd -o- -X test.d Outputs test.json: [ { "name" : "a.b.c", "kind" : "module", "file" : "test.d", "members" : [ { "name" : "foo", "kind" : "function", "protection" : "package", "line" : 2, "char" : 19, "deco" : "FZv", "endline" : 2, "endchar" : 26 } ] } ] It does not contain information about the extra part of the package protection '(a.b)'. For backward compatibility, it would be better to keep the "protection" property as-is. For the extra part, I'd propose to add a new JSON property "protectionPackage". For example: ... "name" : "foo", "kind" : "function", "protection" : "package", "protectionPackage" : "a.b", // New! "line" : 2, ...
Comment #1 by robert.schadek — 2024-12-13T18:25:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17679 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB