The CodeBuilder to use.
The name of the module to import.
An array of which symbols to import from the module.
builder
auto builder = new CodeBuilder(); // Import entire module builder.addImport("std.stdio"); builder.data.should.equal("import std.stdio;\n"); builder = new CodeBuilder(); // Just to keep the asserts clean to read. // Selective imports builder.addImport("std.stdio", ["readln"d, "writeln"d]); builder.data.should.equal("import std.stdio : readln, writeln;\n");
Creates an import statement.
Notes: If selection is null, then the entire module is imported. Otherwise, only the specified symbols are imported.