-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added the flag `--config` for all commands, which will set the configuration file * Added the global flag `--print-config`, which will print the default configuration file
- Loading branch information
1 parent
ed12453
commit ff01efe
Showing
8 changed files
with
100 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,7 +132,7 @@ struct Optional(T) | |
assert(b.empty); | ||
} | ||
|
||
T front() | ||
inout(T) front() inout | ||
{ | ||
return get; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module dlp.driver.commands.dlp_command; | ||
|
||
import dlp.driver.command : Command; | ||
|
||
mixin template StandardArguments() | ||
{ | ||
import dmd.target : Target; | ||
|
||
@("import-path|i", "Add <path> as an import path.") | ||
string[] importPaths; | ||
|
||
@("string-import-path", "Add <path> as a string import path.") | ||
string[] stringImportPaths; | ||
|
||
@("version", "Specify <version> version identifier.") | ||
string[] versionIdentifiers; | ||
|
||
@("config", "Use <filename> as the configuration file.") | ||
string configFilename; | ||
|
||
@("target-architecture", "Set <arch> as the target architecture [default].") | ||
Target.Architecture architecture; | ||
} | ||
|
||
abstract class DlpCommand(Arguments) : Command!Arguments | ||
{ | ||
override void beforeRun() | ||
{ | ||
import dmd.frontend : findConfigFilename; | ||
|
||
static struct TempConfig | ||
{ | ||
import dlp.commands.utility : StandardConfig; | ||
|
||
mixin StandardConfig; | ||
} | ||
|
||
arguments.configFilename = findConfigFilename(); | ||
arguments.architecture = TempConfig().architecture; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters