dmd.hdrgen
Generate D interface files.
Discussion
Also used to convert AST nodes to D code in general, e.g. for error messages or printf debugging.
License
Source: hdrgen.d
Documentation: https://dlang.org/phobos/dmd_hdrgen.html
-
Declaration
voidgenhdrfile(Modulem, ref OutBufferbuf);Generate a header (.di) file for Module
m.Parameters
ModulemModule to generate header for
OutBufferbufbuffer to write the data to
-
Declaration
const(char)*toChars(const Statements);Turn a Statement into a string suitable for printf. Leaks memory.
Parameters
StatementsStatement to convert
Return Value
0-terminated string
-
Declaration
voidmoduleToBuffer(ref OutBufferbuf, Modulem);Dumps the full contents of module
tom.bufParameters
OutBufferbufbuffer to write to.
Modulemmodule to visit all members of.
-
Declaration
voidfloatToBuffer(Typetype, const real_tvalue, ref OutBufferbuf, const boolallowHex);Formats
as a literal ofvaluetypeintotype.bufParameters
Typetypeliteral
type(e.g. Tfloat)real_tvaluevalueto printOutBufferbuftarget buffer
boolallowHexwhether hex floating point literals may be used for greater accuracy
-
Declaration
@safe stringstcToString(ref StorageClassstc);Pick off one of the storage classes from
stc, and return a string representation of it.stcis reduced by the one picked. -
Declaration
const(char)*visibilityToChars(Visibility.Kindkind);
pure nothrow @safe stringvisibilityToString(Visibility.Kindkind);Return Value
a human readable representation of
kind -
Declaration
voidargExpTypesToCBuffer(ref OutBufferbuf, Expressions*arguments);Write out argument types to
buf. -
Declaration
const(char)*parametersTypeToChars(ParameterListpl);Pretty print function parameters.
Parameters
ParameterListplparameter list to print
Return Value
Null-terminated string representing parameters.
-
Declaration
const(char)*parameterToChars(Parameterparameter, TypeFunctiontf, boolfullQual);Pretty print function
parameter.Parameters
Parameterparameterparameterto print.TypeFunctiontfTypeFunction which holds
parameter.boolfullQualwhether to fully qualify types.
Return Value
Null-terminated string representing parameters.
-
Declaration
stringEXPtoString(EXPop);Convert EXP to char*.