Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.dmodule
Compiler implementation of the
D programming language.
Authors:
License:
Source dmodule.d
Documentation https://dlang.org/phobos/dmd_dmodule.html
- class
Package
: dmd.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
: dmd.dmodule.Package; -
- static bool function(Module mod)
onImport
; - A callback function that is called once an imported module is parsed. If the callback returns
true
, then it tells the frontend that the driver intends on compiling the import. - bool
selfImports
(); - Return
true
if module imports itself. - bool
rootImports
(); - Return
true
if module imports root module. - Module
importedFrom
; - A root module is one that will be compiled all the way to object code. This field holds the root module that caused this module to be loaded. If this module is a root module, then it will be set to this. This is used to determine ownership of template instantiation.
- 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
. - void
fullyQualifiedName
(ref OutBufferbuf
); - Writes this module's fully-qualified name to
buf
Parameters:OutBuffer buf
The buffer to write to
- struct
ModuleDeclaration
;
Copyright © 1999-2018 by the D Language Foundation | Page generated by
Ddoc on Tue Mar 13 17:31:11 2018