dmd.dmodule
Specification Modules
Source dmodule.d
Documentation https://dlang.org/phobos/dmd_dmodule.html
- nothrow voidremoveHdrFilesAndFail(ref Paramparams, ref Modulesmodules);
- Remove generated .di files on error and exit
- classPackage: dmd.dsymbol.ScopeDsymbol;
- 
- static DsymbolTableresolve(Identifier[]packages, Dsymbol*pparent, Package*ppkg);
- Input packages[] the pkg1.pkg2 of pkg1.pkg2.mod Returns:the symbol table that mod should be inserted into- Output *pparent the rightmost package, i.e. pkg2, or NULL if no packages *ppkg the leftmost package, i.e. pkg1, or NULL if no packages 
- final boolisAncestorPackageOf(const Packagepkg) const;
- Checks if pkg is a sub-package of thisFor 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'.Parameters:Package pkgpossible subpackage Returns:see description
- final voidresolvePKGunknown();
- Checks for the existence of a package.d to set isPkgMod appropriately if isPkgMod == PKG.unknown
 
- classModule: dmd.dmodule.Package;
- 
- static voiddeinitialize();
- Deinitializes the global state of the compiler.This can be used to restore the state set by _init to its original state.
- const(ubyte)[]src;
- Raw content of the file
- Dsymbol[void*]tagSymTab;
- ImportC tag symbols that conflict with other symbols used as the index 
- boolselfImports();
- Return true if module imports itself.
- boolrootImports();
- Return true if module imports root module.
- ModuleimportedFrom;
- 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.
- FileNamesetOutfilename(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 
- boolread(Locloc);
- Reads the file from srcfile and loads the source buffer.If makefile module dependency is requested, we add this module to the list of dependencies from here.Parameters:Loc locthe location Returns:true if successful
- Moduleparse();
 ModuleparseModule(AST)();
- syntactic parse
- intneedModuleInfo();
- Determine if we need to generate an instance of ModuleInfo for this Module.
- voidcheckImportDeprecation(Locloc, Scope*sc);
- Print deprecation warning if we're deprecated, when this module is imported from scope sc.Parameters:Scope* scthe scope into which we are imported Loc locthe location of the import statement 
- static voidaddDeferredSemantic(Dsymbols);
- Can't run semantic on s now, try again later.
- static voidrunDeferredSemantic();
- Run semantic() on deferred symbols.
- nothrow intimports(Modulem);
- Recursively look at every module this module imports, return true if it imports m. Can be used to detect circular imports.
- nothrow boolisCoreModule(Identifierident);
- Returns:Whether this module is in the core package and has nameident
- uint[uint]ctfe_cov;
- coverage information from ctfe execution_count[line]
- nothrow voidfullyQualifiedName(ref OutBufferbuf);
- Writes this module's fully-qualified name to bufParameters:OutBuffer bufThe buffer to write to 
- nothrow Escape*escapetable();
- Lazily initializes and returns the escape table. Turns out it eats a lot of memory.
- static ModuleloadCoreStdcConfig();
- A Singleton that loads core.stdc.configReturns:Module of core.stdc.config, null if couldn't find it
- static ModuleloadCoreAtomic();
- A Singleton that loads core.atomicReturns:Module of core.atomic, null if couldn't find it
- static ModuleloadStdMath();
- A Singleton that loads std.mathReturns:Module of std.math, null if couldn't find it
 
- structModuleDeclaration;
- 
- const(char)[]toString() const;
- Provide a human readable representation
 
- voidgetLocalClasses(Modulemod, ref ClassDeclarationsaclasses);
- Create array of the local classes in the Module, suitable for inclusion in ModuleInfoParameters:Module modthe Module ClassDeclarations aclassesarray to fill in Returns:array of local classes
- int_foreach(Scope*sc, Dsymbols*members, scope ForeachDgdg, size_t*pn= null);
- Expands attribute declarations in members in depth first order. Calls dg(size_t symidx, Dsymbol *sym) for each member. If dg returns !=0, stops and returns that value else returns 0. Use this function to avoid the O(N + N^2/2) complexity of calculating dim and calling N times getNth.Returns:last value returned by dg()
- FuncDeclarationfindGetMembers(ScopeDsymboldsym);
- Look for member of the form: const(MemberInfo)[] getMembers(string); Returns NULL if not found