Closed Sean1708 closed 8 years ago
Might be worth having a .parse()
method as well which parses the file, adds the includes but does not add an include guard or extern "C"
declaration.
Might be worth putting the includes in in the parse::
functions since they are absolutely required in all circumstances.
Although maybe we should have an option to exclude the #include <stdint.h>
and #include <stdbool.h>
for the people who are working in a pre-C99 environment and ensure they only use libc::
types.
Allows the inclusion of custom includes, macros and static functions.
Maybe have a
prepend(&mut self, &str)
andappend(&mut self, &str)
.Probably best to move the boilerplate generation (include-guards, inlcludes, etc) into
.compile_to_string()
so we don't have to pass more stuff to theparse::
functions. Plus they never really should have been in a parsing function anyway.