dmd.frontend

Contains high-level interfaces for interacting with DMD as a library.

Members

Classes

DiagnosticReporter
class DiagnosticReporter

Interface for diagnostic reporting.

StderrDiagnosticReporter
class StderrDiagnosticReporter

Diagnostic reporter which prints the diagnostic messages to stderr.

Enums

ContractChecking
enum ContractChecking

Indicates the checking state of various contracts.

Functions

addImport
void addImport(const(char)[] path)

Add import path to the global.path.

addStringImport
void addStringImport(const(char)[] path)

Add string import path to global.filePath.

deinitializeDMD
void deinitializeDMD()

Deinitializes the global variables of the DMD compiler.

determineDefaultCompiler
string determineDefaultCompiler()

Detect the currently active compiler.

findDMDConfig
string findDMDConfig(const(char)[] dmdFilePath)

Searches for a dmd.conf.

findImportPaths
auto findImportPaths()

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.

findLDCConfig
string findLDCConfig(const(char)[] ldcFilePath)

Searches for a ldc2.conf.

fullSemantic
void fullSemantic(Module m)

Run full semantic analysis on a module.

parseImportPathsFromConfig
auto parseImportPathsFromConfig(const(char)[] iniFile, const(char)[] execDir)

Parses a dmd.conf or ldc2.conf config file and returns defined import paths.

parseModule
Tuple!(Module, "module_", Diagnostics, "diagnostics") parseModule(const(char)[] fileName, const(char)[] code)

Parse a module from a string.

prettyPrint
string prettyPrint(Module m)

Pretty print a module.

Structs

ContractChecks
struct ContractChecks

Indicates which contracts should be checked or not.

Diagnostics
struct Diagnostics

Contains aggregated diagnostics information.

Meta