Module

extern (C++) final
class Module : Package {}

Constructors

this
this(Loc loc, const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
Undocumented in source.
this
this(const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
Undocumented in source.

Members

Functions

accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
checkImportDeprecation
void checkImportDeprecation(Loc loc, Scope* sc)

Print deprecation warning if we're deprecated, when this module is imported from scope sc.

deleteObjFile
void deleteObjFile()
Undocumented in source. Be warned that the author may not have intended to support it.
fullyQualifiedName
void fullyQualifiedName(OutBuffer buf)

Writes this module's fully-qualified name to buf

importAll
void importAll(Scope* prevsc)
Undocumented in source. Be warned that the author may not have intended to support it.
imports
int imports(Module m)

Recursively look at every module this module imports, return true if it imports m. Can be used to detect circular imports.

isCoreModule
bool isCoreModule(Identifier ident)
Undocumented in source. Be warned that the author may not have intended to support it.
isModule
inout(Module) isModule()
Undocumented in source. Be warned that the author may not have intended to support it.
isPackageAccessible
bool isPackageAccessible(Package p, Visibility visibility, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
isRoot
bool isRoot()
Undocumented in source. Be warned that the author may not have intended to support it.
kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
loadSourceBuffer
bool loadSourceBuffer(Loc loc, File.ReadResult readResult)

Loads the source buffer from the given read result into this.srcBuffer.

needModuleInfo
int needModuleInfo()

Determine if we need to generate an instance of ModuleInfo for this Module.

parse
Module parse()
parseModule
Module parseModule()

syntactic parse

read
bool read(Loc loc)

Reads the file from srcfile and loads the source buffer.

rootImports
bool rootImports()

Return true if module imports root module.

search
Dsymbol search(Loc loc, Identifier ident, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
selfImports
bool selfImports()

Return true if module imports itself.

setDocfile
void setDocfile()
Undocumented in source. Be warned that the author may not have intended to support it.
setOutfilename
FileName setOutfilename(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 line name given for the file, NULL if none dir Command line directory given for the file, NULL if none arg Name of the source file ext File name extension to use if 'name' is NULL global.params.preservePaths get output path from arg srcfile Input file - output file name must not match input file

symtabInsert
Dsymbol symtabInsert(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

_init
void _init()
Undocumented in source. Be warned that the author may not have intended to support it.
addDeferredSemantic
void addDeferredSemantic(Dsymbol s)

Can't run semantic on s now, try again later.

addDeferredSemantic2
void addDeferredSemantic2(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
addDeferredSemantic3
void addDeferredSemantic3(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
clearCache
void clearCache()
Undocumented in source. Be warned that the author may not have intended to support it.
create
Module create(const(char)* filename, Identifier ident, int doDocComment, int doHdrGen)
Undocumented in source. Be warned that the author may not have intended to support it.
create
Module create(const(char)[] filename, Identifier ident, int doDocComment, int doHdrGen)
Undocumented in source. Be warned that the author may not have intended to support it.
deinitialize
void deinitialize()

Deinitializes the global state of the compiler.

load
Module load(Loc loc, Identifiers* packages, Identifier ident)
Undocumented in source. Be warned that the author may not have intended to support it.
load
Module load(Loc loc, Identifier[] packages, Identifier ident)
Undocumented in source. Be warned that the author may not have intended to support it.
runDeferredSemantic
void runDeferredSemantic()

Run semantic() on deferred symbols.

runDeferredSemantic2
void runDeferredSemantic2()
Undocumented in source. Be warned that the author may not have intended to support it.
runDeferredSemantic3
void runDeferredSemantic3()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

amodules
Modules amodules;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
deferred
Dsymbols deferred;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
deferred2
Dsymbols deferred2;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
deferred3
Dsymbols deferred3;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
dprogress
uint dprogress;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
moduleinfo
AggregateDeclaration moduleinfo;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
modules
DsymbolTable modules;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
rootModule
Module rootModule;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Variables

aimports
Modules aimports;
Undocumented in source.
arg
const(char)[] arg;
Undocumented in source.
contentImportedFiles
Strings contentImportedFiles;
Undocumented in source.
cov
Symbol* cov;
Undocumented in source.
covb
uint* covb;
Undocumented in source.
ctfe_cov
uint[uint] ctfe_cov;

coverage information from ctfe execution_countline

debugids
Identifiers* debugids;
Undocumented in source.
debugidsNot
Identifiers* debugidsNot;
Undocumented in source.
debuglevel
uint debuglevel;
Undocumented in source.
decldefs
Dsymbols* decldefs;
Undocumented in source.
docfile
FileName docfile;
Undocumented in source.
doppelganger
int doppelganger;
Undocumented in source.
errors
uint errors;
Undocumented in source.
escapetable
Escape* escapetable;
Undocumented in source.
hasAlwaysInlines
bool hasAlwaysInlines;
Undocumented in source.
hdrfile
FileName hdrfile;
Undocumented in source.
importedFrom
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.

insearch
int insearch;
Undocumented in source.
isDocFile
bool isDocFile;
Undocumented in source.
isHdrFile
bool isHdrFile;
Undocumented in source.
isPackageFile
bool isPackageFile;
Undocumented in source.
macrotable
MacroTable macrotable;
Undocumented in source.
md
ModuleDeclaration* md;
Undocumented in source.
namelen
size_t namelen;
Undocumented in source.
nameoffset
size_t nameoffset;
Undocumented in source.
needmoduleinfo
int needmoduleinfo;
Undocumented in source.
numlines
uint numlines;
Undocumented in source.
objfile
FileName objfile;
Undocumented in source.
pkg
Package pkg;
Undocumented in source.
rootimports
int rootimports;
Undocumented in source.
sctor
Symbol* sctor;
Undocumented in source.
sdtor
Symbol* sdtor;
Undocumented in source.
searchCacheFlags
int searchCacheFlags;
Undocumented in source.
searchCacheIdent
Identifier searchCacheIdent;
Undocumented in source.
searchCacheSymbol
Dsymbol searchCacheSymbol;
Undocumented in source.
selfimports
int selfimports;
Undocumented in source.
sfilename
Symbol* sfilename;
Undocumented in source.
sictor
Symbol* sictor;
Undocumented in source.
srcBuffer
FileBuffer* srcBuffer;
Undocumented in source.
srcfile
FileName srcfile;
Undocumented in source.
ssharedctor
Symbol* ssharedctor;
Undocumented in source.
sshareddtor
Symbol* sshareddtor;
Undocumented in source.
stest
Symbol* stest;
Undocumented in source.
versionids
Identifiers* versionids;
Undocumented in source.
versionidsNot
Identifiers* versionidsNot;
Undocumented in source.
versionlevel
uint versionlevel;
Undocumented in source.

Inherited Members

From Package

isPkgMod
PKG isPkgMod;
Undocumented in source.
tag
uint tag;
Undocumented in source.
mod
Module mod;
Undocumented in source.
kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(RootObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
resolve
DsymbolTable resolve(Identifier[] packages, Dsymbol* pparent, Package* ppkg)

Input: packages[] the pkg1.pkg2 of pkg1.pkg2.mod

isPackage
inout(Package) isPackage()
Undocumented in source. Be warned that the author may not have intended to support it.
isAncestorPackageOf
bool isAncestorPackageOf(Package pkg)

Checks if pkg is a sub-package of this

search
Dsymbol search(Loc loc, Identifier ident, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
isPackageMod
Module isPackageMod()
Undocumented in source. Be warned that the author may not have intended to support it.
resolvePKGunknown
void resolvePKGunknown()

Checks for the existence of a package.d to set isPkgMod appropriately if isPkgMod == PKG.unknown

Meta