August 29, 2014 [Issue 13384] New: Support JSON output for new package(names) protection | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13384 Issue ID: 13384 Summary: Support JSON output for new package(names) protection Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nobody@puremagic.com Reporter: k.hara.pg@gmail.com >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, ... -- |
Copyright © 1999-2021 by the D Language Foundation