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
void
genhdrfile
(Modulem
, ref OutBufferbuf
);Generate a header (.di) file for Module
m
.Parameters
Module
m
Module to generate header for
OutBuffer
buf
buffer to write the data to
-
Declaration
const(char)*
toChars
(const Statements
);Turn a Statement into a string suitable for printf. Leaks memory.
Parameters
Statement
s
Statement to convert
Return Value
0-terminated string
-
Declaration
void
moduleToBuffer
(ref OutBufferbuf
, Modulem
);Dumps the full contents of module
tom
.buf
Parameters
OutBuffer
buf
buffer to write to.
Module
m
module to visit all members of.
-
Declaration
void
floatToBuffer
(Typetype
, const real_tvalue
, ref OutBufferbuf
, const boolallowHex
);Formats
as a literal ofvalue
type
intotype
.buf
Parameters
Type
type
literal
type
(e.g. Tfloat)real_t
value
value
to printOutBuffer
buf
target buffer
bool
allowHex
whether hex floating point literals may be used for greater accuracy
-
Declaration
@safe string
stcToString
(ref StorageClassstc
);Pick off one of the storage classes from
stc
, and return a string representation of it.stc
is 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
void
argExpTypesToCBuffer
(ref OutBufferbuf
, Expressions*arguments
);Write out argument types to
buf
. -
Declaration
const(char)*
parametersTypeToChars
(ParameterListpl
);Pretty print function parameters.
Parameters
ParameterList
pl
parameter list to print
Return Value
Null-terminated string representing parameters.
-
Declaration
const(char)*
parameterToChars
(Parameterparameter
, TypeFunctiontf
, boolfullQual
);Pretty print function
parameter
.Parameters
Parameter
parameter
parameter
to print.TypeFunction
tf
TypeFunction which holds
parameter
.bool
fullQual
whether to fully qualify types.
Return Value
Null-terminated string representing parameters.
-
Declaration
string
EXPtoString
(EXPop
);Convert EXP to char*.