Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.hdrgen
Generate D interface files.
Also used to convert AST nodes to D code in general, e.g. for error messages or printf debugging.
Authors:
License:
Source hdrgen.d
Documentation https://dlang.org/phobos/dmd_hdrgen.html
- void
genhdrfile
(Modulem
, booldoFuncBodies
, ref OutBufferbuf
); - Generate a header (.di) file for Module m.Parameters:
Module m
Module to generate header for bool doFuncBodies
generate function definitions rather than just declarations OutBuffer buf
buffer to write the data to - const(char)*
toChars
(const Statements
); - Turn a Statement into a string suitable for printf. Leaks memory.Parameters:
Statement s
Statement to convert Returns:0-terminated string - void
moduleToBuffer
(ref OutBufferbuf
, boolvcg_ast
, Modulem
); - Dumps the full contents of module
m
tobuf
.Parameters:OutBuffer buf
buffer to write to. bool vcg_ast
write out codegen ast Module m
module to visit all members of. - void
floatToBuffer
(Typetype
, const real_tvalue
, ref OutBufferbuf
, const boolallowHex
); - Formats
value
as a literal of typetype
intobuf
.Parameters:Type type
literal type (e.g. Tfloat) real_t value
value to print OutBuffer buf
target buffer bool allowHex
whether hex floating point literals may be used for greater accuracy - @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.
- const(char)*
visibilityToChars
(Visibility.Kindkind
);
pure nothrow @safe stringvisibilityToString
(Visibility.Kindkind
); - Returns:a human readable representation of
kind
- void
argExpTypesToCBuffer
(ref OutBufferbuf
, Expressions*arguments
); - Write out argument types to buf.
- const(char)*
parametersTypeToChars
(ParameterListpl
); - Pretty print function parameters.Parameters:
ParameterList pl
parameter list to print Returns:Null-terminated string representing parameters. - 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. Returns:Null-terminated string representing parameters. - string
EXPtoString
(EXPop
); - Convert EXP to char*.
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on Sun Nov 17 01:06:36 2024