diff options
author | Vincent Sanders <vince@kyllikki.org> | 2012-10-06 15:33:33 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2012-10-06 15:33:33 +0100 |
commit | f072d31de069e378af37a15d1e1433e5a9e15275 (patch) | |
tree | ad48d5491b9d7e1f17550550dfae07aaa3c3099e /src/jsapi-libdom.c | |
parent | d1ff941d4c2ef089eb671953a012d5ae550b0742 (diff) | |
download | nsgenbind-f072d31de069e378af37a15d1e1433e5a9e15275.tar.gz nsgenbind-f072d31de069e378af37a15d1e1433e5a9e15275.tar.bz2 |
add operation body output override
Diffstat (limited to 'src/jsapi-libdom.c')
-rw-r--r-- | src/jsapi-libdom.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/jsapi-libdom.c b/src/jsapi-libdom.c index 0ff8d5a..f5b9ed5 100644 --- a/src/jsapi-libdom.c +++ b/src/jsapi-libdom.c @@ -263,6 +263,7 @@ static int webidl_function_body_cb(struct webidl_node *node, void *ctx) { struct binding *binding = ctx; struct webidl_node *ident_node; + struct genbind_node *operation_node; ident_node = webidl_node_find(webidl_node_getnode(node), NULL, @@ -298,6 +299,24 @@ static int webidl_function_body_cb(struct webidl_node *node, void *ctx) JSAPI_SET_RVAL(cx, vp, JSVAL_VOID); */ + operation_node = genbind_node_find_type_ident(binding->gb_ast, + NULL, + GENBIND_NODE_TYPE_OPERATION, + webidl_node_gettext(ident_node)); + + if (operation_node != NULL) { + struct genbind_node *code_node; + + code_node = genbind_node_find_type(genbind_node_getnode(operation_node), + NULL, + GENBIND_NODE_TYPE_CBLOCK); + if (code_node != NULL) { + fprintf(binding->outfile, + "%s\n", + genbind_node_gettext(code_node)); + } + } + fprintf(binding->outfile, "}\n\n"); @@ -585,6 +604,9 @@ output_preamble(struct binding *binding) GENBIND_NODE_TYPE_PREAMBLE, webidl_preamble_cb, binding); + + fprintf(binding->outfile,"\n\n"); + return 0; } |