summaryrefslogtreecommitdiff
path: root/src/duk-libdom.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-09-25 11:44:59 +0100
committerVincent Sanders <vince@kyllikki.org>2015-09-25 11:44:59 +0100
commit4a7185fd4a25b1456737b8fa2ac6a770a3e1721e (patch)
tree65280034968b4b04e000b43bcb3b8b4e1856c21e /src/duk-libdom.h
parent5b0ac4502fd4407d51c165e0ea4ef814b3253fa9 (diff)
downloadnsgenbind-4a7185fd4a25b1456737b8fa2ac6a770a3e1721e.tar.gz
nsgenbind-4a7185fd4a25b1456737b8fa2ac6a770a3e1721e.tar.bz2
Make the binding parser understand c types
Instead of c types being opaque strings this makes the bindig parser understand them. This is necessary for extended attribute parsing in future but also makes the binding more easily understandable.
Diffstat (limited to 'src/duk-libdom.h')
-rw-r--r--src/duk-libdom.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/duk-libdom.h b/src/duk-libdom.h
index 79b440e..3b07009 100644
--- a/src/duk-libdom.h
+++ b/src/duk-libdom.h
@@ -56,4 +56,19 @@ int output_tool_prologue(FILE* outf);
*/
int output_cdata(FILE* outf, struct genbind_node *node, enum genbind_node_type nodetype);
+/**
+ * output a C variable type
+ *
+ * Used to output c type and optionlly identifier declarations for parameters
+ * and structure entries.
+ * If the optional identifier is output it is ensured the type is separated
+ * from the identifier with either a * or space.
+ *
+ * \param outf The file handle to write output.
+ * \param node The node to generate content for.
+ * \param identifier If the indentifier should be output.
+ * \return 0 on success.
+ */
+int output_ctype(FILE *outf, struct genbind_node *node, bool identifier);
+
#endif