Compiler implementation of the D programming language.
This module contains high-level interfaces for interacting with DMD as a library.
Contains aggregated diagnostics information.
Number of errors diagnosed
Number of warnings diagnosed
true
if errors have been diagnosedtrue
if warnings have been diagnosedIndicates the checking state of various contracts.
Initial value
Never do checking
Always do checking
Only do checking in @safe
functions
Indicates which contracts should be checked or not.
Precondition checks (in contract).
Invariant checks.
Postcondition checks (out contract).
Array bound checks.
Assert checks.
Switch error checks.
Deinitializes the global variables of the DMD compiler.
This can be used to restore the state set by initDMD
to its original state. Useful if there's a need for multiple sessions of the DMD compiler in the same application.
Add import path to the global.path
.
const(char)[] path
| import to add |
Add string import path to global.filePath
.
const(char)[] path
| string import to add |
Searches for a dmd.conf
.
const(char)[] dmdFilePath
| path to the current DMD executable |
dmd.conf
, null
otherwise.Searches for a ldc2.conf
.
const(char)[] ldcFilePath
| path to the current LDC executable |
ldc2.conf
, null
otherwise.Detect the currently active compiler.
null
otherwise.Parses a dmd.conf
or ldc2.conf
config file and returns defined import paths.
const(char)[] iniFile
| iniFile to parse imports from |
const(char)[] execDir
| directory of the compiler binary |
iniFile
Finds a dmd.conf
and parses it for import paths. This depends on the $DMD
environment variable. If $DMD
is set to ldmd
, it will try to detect and parse a ldc2.conf
instead.
Parse a module from a string.
const(char)[] fileName
| file to parse |
const(char)[] code
| text to use instead of opening the file |
DiagnosticReporter diagnosticReporter
| the diagnostic reporter to use. By default a diagnostic reporter which prints to stderr will be used |
Run full semantic analysis on a module.
Pretty print a module.
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_frontend.html