dmd.dmodule
Defines a package and module.
Specification: Modules
License
Source: dmodule.d
Documentation: https://dlang.org/phobos/dmd_dmodule.html
- 
  Declarationnothrow voidremoveHdrFilesAndFail(ref Paramparams, ref Modulesmodules);Remove generated .di files on error and exit 
- 
  DeclarationclassPackage: dmd.dsymbol.ScopeDsymbol;- 
  Declarationstatic DsymbolTableresolve(Identifier[]packages, Dsymbol*pparent, Package*ppkg);Input: packages[] the pkg1.pkg2 of pkg1.pkg2.modReturn Valuethe symbol table that mod should be inserted into Output: * pparentthe rightmost package, i.e. pkg2, or NULL if nopackages*ppkgthe leftmost package, i.e. pkg1, or NULL if nopackages
- 
  Declarationfinal const boolisAncestorPackageOf(const Packagepkg);Checks if pkgis a sub-package of thisDiscussionFor example, if this qualifies to 'a1.a2' and pkg- to 'a1.a2.a3', this function returns 'true'. If it is other way around or qualified package paths conflict function returns 'false'.ParametersPackagepkgpossible subpackage Return Valuesee description 
- 
  Declarationfinal voidresolvePKGunknown();Checks for the existence of a package.d to set isPkgMod appropriately if isPkgMod == PKG.unknown 
 
- 
  
- 
  DeclarationclassModule: dmd.dmodule.Package;- 
  Declarationstatic voiddeinitialize();Deinitializes the global state of the compiler. DiscussionThis can be used to restore the state set by _initto its original state.
- 
  Declarationconst(ubyte)[]src;Raw content of the file 
- 
  DeclarationDsymbol[void*]tagSymTab;ImportC: tag symbols that conflict with other symbols used as the index 
- 
  DeclarationboolselfImports();Return trueif module imports itself.
- 
  DeclarationboolrootImports();Return trueif module imports root module.
- 
  DeclarationModuleimportedFrom;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.
- 
  DeclarationFileNamesetOutfilename(const(char)[]name, const(char)[]dir, const(char)[]arg, const(char)[]ext);Combines things into output file namefor .html and .di files.Input: nameCommand linenamegiven for the file, NULL if nonedirCommand line directory given for the file, NULL if noneargName of the source fileextFilenameextension to use if 'name' is NULL global.params.preservePaths get output path fromargsrcfile Input file - output filenamemust not match input file
- 
  Declarationboolread(const ref Locloc);Reads the file from srcfileand loads the source buffer.DiscussionIf makefile module dependency is requested, we add this module to the list of dependencies from here. ParametersLoclocthe location Return Valuetrueif successful
- 
  DeclarationModuleparse();
 ModuleparseModule(AST)();syntactic parse
- 
  DeclarationintneedModuleInfo();Determine if we need to generate an instance of ModuleInfo for this Module. 
- 
  DeclarationvoidcheckImportDeprecation(const ref Locloc, Scope*sc);Print deprecation warning if we're deprecated, when this module is imported from scope sc.ParametersScope*scthe scope into which we are imported Loclocthe location of the import statement 
- 
  Declarationstatic voidaddDeferredSemantic(Dsymbols);Can't run semantic on snow, try again later.
- 
  Declarationstatic voidrunDeferredSemantic();Run semantic() on deferred symbols. 
- 
  Declarationnothrow intimports(Modulem);Recursively look at every module this module imports, returntrueif itimportsm. Can be used to detect circularimports.
- 
  Declarationuint[uint]ctfe_cov;coverage information from ctfe execution_count[line] 
- 
  Declarationnothrow voidfullyQualifiedName(ref OutBufferbuf);Writes this module's fully-qualified name to bufParametersOutBufferbufThe buffer to write to 
- 
  Declarationnothrow Escape*escapetable();Lazily initializes and returns the escape table. Turns out it eats a lot of memory. 
- 
  Declarationstatic ModuleloadCoreAtomic();A Singleton that loads core.atomic Return ValueModule of core.atomic, nullif couldn't find it
- 
  Declarationstatic ModuleloadStdMath();A Singleton that loads std.math Return ValueModule of std.math, nullif couldn't find it
 
- 
  
- 
  DeclarationstructModuleDeclaration;- 
  Declarationconst const(char)[]toString();Provide a human readable representation 
 
- 
  
- 
  DeclarationvoidgetLocalClasses(Modulemod, ref ClassDeclarationsaclasses);Create array of the local classes in the Module, suitable for inclusion in ModuleInfo ParametersModulemodthe Module ClassDeclarationsaclassesarray to fill in Return Valuearray of local classes