summaryrefslogtreecommitdiff
path: root/src/jsapi-libdom.c
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-09-13 17:33:21 +0100
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-09-13 17:33:21 +0100
commitdeadfe6cfb87ee537ed38e0ce87601f492078aab (patch)
tree9a3178955ae42f3ee7d7223fbb71d505b16fa6f7 /src/jsapi-libdom.c
parenteeaa03bf10aa41656b798ef8df7f42140c66e766 (diff)
downloadnsgenbind-deadfe6cfb87ee537ed38e0ce87601f492078aab.tar.gz
nsgenbind-deadfe6cfb87ee537ed38e0ce87601f492078aab.tar.bz2
add debug dump to webidl
Diffstat (limited to 'src/jsapi-libdom.c')
-rw-r--r--src/jsapi-libdom.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/src/jsapi-libdom.c b/src/jsapi-libdom.c
index d1ac37c..0f4ebc4 100644
--- a/src/jsapi-libdom.c
+++ b/src/jsapi-libdom.c
@@ -9,7 +9,9 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include <stdbool.h>
+#include "options.h"
#include "genjsbind-ast.h"
#include "webidl-ast.h"
#include "jsapi-libdom.h"
@@ -17,35 +19,6 @@
#define HDR_COMMENT_SEP "\n * "
#define HDR_COMMENT_PREABLE "Generated by nsgenjsapi"
-/*
-#define HDR_COMMENT_SEP_LEN 4
-
-int genbind_header_comment(char *comment)
-{
- char *fullstr;
- int fulllen;
- fulllen = strlen(genbind_ast->hdr_comments) +
- strlen(comment) + HDR_COMMENT_SEP_LEN + 1;
- fullstr = malloc(fulllen);
- snprintf(fullstr, fulllen, "%s"HDR_COMMENT_SEP"%s", genbind_ast->hdr_comments , comment);
- free(genbind_ast->hdr_comments);
- free(comment);
- genbind_ast->hdr_comments = fullstr;
-
- return 0;
-}
-
-{
- if (webidl_parsefile($2) != 0) {
- YYABORT;
-}
-}
-*/
- /* initialise root IDL node */
-/* webidl_root =
-
-*/
-
static int webidl_hdrcomments_cb(struct genbind_node *node, void *ctx)
{
FILE *outfile = ctx;
@@ -109,6 +82,10 @@ int jsapi_libdom_output(char *outfilename, struct genbind_node *genbind_ast)
return 5;
}
+ if (options->verbose) {
+ webidl_ast_dump(webidl_ast);
+ }
+
/* open output file */
if (outfilename == NULL) {
outfile = stdout;