ddmd.dmodule
Source: dmodule.d
- const(char)*
lookForSourceFile
(const(char)**path
, const(char)*filename
); - Look for the source file if it's different from
filename
. Look for .di, .d, directory, and along global.path
. Does not open the file.Output:
path
thepath
where the file was found if it was not the current directoryInput:
filename
as supplied by the user global.path
Returns:NULL if it's not different fromfilename
. - class
Package
: ddmd.dsymbol.ScopeDsymbol; -
- static DsymbolTable
resolve
(Identifiers*packages
, Dsymbol*pparent
, Package*ppkg
); Input:
packages
[] the pkg1.pkg2 of pkg1.pkg2.modReturns:the symbol table that mod should be inserted intoOutput: *
pparent
the rightmost package, i.e. pkg2, or NULL if nopackages
*ppkg
the leftmost package, i.e. pkg1, or NULL if nopackages
- final const bool
isAncestorPackageOf
(const Packagepkg
); - Checks if
pkg
is a sub-package of thisFor example, if this qualifies to 'a1.a2' andpkg
- to 'a1.a2.a3', this function returns 'true
'. If it is other way around or qualified package paths conflict function returns 'false
'.Parameters:Package pkg
possible subpackage Returns:see description
- class
Module
: ddmd.dmodule.Package; -
- uint
unitTestCounter
; - How many unit tests have been seen so far in this module. Makes it so the unit test name is reproducible regardless of whether it's compiled separately or all at once.
- bool
selfImports
(); - Return
true
if module imports itself. - bool
rootImports
(); - Return
true
if module imports root module. - File*
setOutfile
(const(char)*name
, const(char)*dir
, const(char)*arg
, const(char)*ext
); - Combines things into output file
name
for .html and .di files.Input:
name
Command linename
given for the file, NULL if nonedir
Command line directory given for the file, NULL if nonearg
Name of the source fileext
Filename
extension to use if 'name
' is NULL global.params.preservePaths get output path fromarg
srcfile Input file - output filename
must not match input file - int
needModuleInfo
(); - Determine if we need to generate an instance of ModuleInfo for this Module.
- static void
addDeferredSemantic
(Dsymbols
); - Can't run semantic on
s
now, try again later. - static void
runDeferredSemantic
(); - Run semantic() on deferred symbols.
- int
imports
(Modulem
); - Recursively look at every module this module
imports
, returntrue
if itimports
m
. Can be used to detect circularimports
.
- struct
ModuleDeclaration
;