summaryrefslogtreecommitdiff
path: root/src/duk-libdom.c
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.c
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.c')
-rw-r--r--src/duk-libdom.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/duk-libdom.c b/src/duk-libdom.c
index 084a68f..ee7cc3b 100644
--- a/src/duk-libdom.c
+++ b/src/duk-libdom.c
@@ -228,25 +228,10 @@ output_private_header(struct ir *ir)
NULL,
GENBIND_NODE_TYPE_PRIVATE);
while (priv_node != NULL) {
- /* generate the private variable definition ensuring
- * the type is separated from the identifier with
- * either a * or space.
- */
- const char *type_cdata;
- char cdatae;
- type_cdata = genbind_node_gettext(
- genbind_node_find_type(
- genbind_node_getnode(priv_node),
- NULL,
- GENBIND_NODE_TYPE_TYPE));
-
- fprintf(privf, "\t%s", type_cdata);
- cdatae = type_cdata[strlen(type_cdata) - 1];
- if ((cdatae != '*') && (cdatae != ' ')) {
- fputc(' ', privf);
- }
+ fprintf(privf, "\t");
+
+ output_ctype(privf, priv_node, true);
- output_cdata(privf, priv_node, GENBIND_NODE_TYPE_IDENT);
fprintf(privf, ";\n");
priv_node = genbind_node_find_type(