ASCII art diagram converter: Difference between revisions
Content added Content deleted
(Updated D entry) |
(Updated D entry) |
||
Line 48: | Line 48: | ||
This solution generates anonymous struct code at compile-time, that can be mixed-in inside a struct or class. |
This solution generates anonymous struct code at compile-time, that can be mixed-in inside a struct or class. |
||
<lang d>string makeStructFromDiagram(in string rawDiagram) pure @safe { |
<lang d>string makeStructFromDiagram(in string rawDiagram) pure @safe { |
||
import std.conv: text |
import std.conv: text; |
||
import std.format: format; |
|||
import std.string: strip, splitLines, indexOf; |
import std.string: strip, splitLines, indexOf; |
||
import std.array: empty, popFront; |
import std.array: empty, popFront; |