diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-09-25 11:44:59 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-09-25 11:44:59 +0100 |
commit | 4a7185fd4a25b1456737b8fa2ac6a770a3e1721e (patch) | |
tree | 65280034968b4b04e000b43bcb3b8b4e1856c21e /src/duk-libdom.c | |
parent | 5b0ac4502fd4407d51c165e0ea4ef814b3253fa9 (diff) | |
download | nsgenbind-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.c | 21 |
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( |