diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-07-22 22:12:05 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-07-22 22:12:05 +0100 |
commit | d36c21c4f53270f9ba8137bb1e84a7de45fea0f3 (patch) | |
tree | 4adbd1bc49738ae348009b1be6ec54c43d038d8f /src/nsgenbind-ast.c | |
parent | 8bc392a91daf4cc1a27a8e6777af1a29ed24e3c4 (diff) | |
download | nsgenbind-d36c21c4f53270f9ba8137bb1e84a7de45fea0f3.tar.gz nsgenbind-d36c21c4f53270f9ba8137bb1e84a7de45fea0f3.tar.bz2 |
Load the WebIDL files specified in the binding
This loads the WebIDL specified in the bindings into an Abstract
Syntax Tree (AST) and performs the mixin operations for implements.
Additionally the specs now use a slightly extended IDL syntax. Instead
of wholesale implementing the second edition of the IDL spec the
parser has been updated to cope with iterator and Promise keywords as
those are the only changes used in the dom and html specifications.
A bug was also fixed in the lexer where negative int literals were
not recognised.
Diffstat (limited to 'src/nsgenbind-ast.c')
-rw-r--r-- | src/nsgenbind-ast.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/nsgenbind-ast.c b/src/nsgenbind-ast.c index 1b5f53c..c1acee1 100644 --- a/src/nsgenbind-ast.c +++ b/src/nsgenbind-ast.c @@ -20,6 +20,11 @@ #include "nsgenbind-ast.h" #include "options.h" +/** + * standard IO handle for parse trace logging. + */ +static FILE *genbind_parsetracef; + /* parser and lexer interface */ extern int nsgenbind_debug; extern int nsgenbind__flex_debug; @@ -448,23 +453,23 @@ static int genbind_ast_dump(FILE *dfile, struct genbind_node *node, int indent) /* exported interface documented in nsgenbind-ast.h */ int genbind_dump_ast(struct genbind_node *node) { - FILE *dumpf; + FILE *dumpf; - /* only dump AST to file if required */ - if (!options->debug) { - return 0; - } + /* only dump AST to file if required */ + if (!options->debug) { + return 0; + } - dumpf = genb_fopen("binding-ast", "w"); - if (dumpf == NULL) { - return 2; - } + dumpf = genb_fopen("binding-ast", "w"); + if (dumpf == NULL) { + return 2; + } - genbind_ast_dump(dumpf, node, 0); + genbind_ast_dump(dumpf, node, 0); - fclose(dumpf); + fclose(dumpf); - return 0; + return 0; } FILE *genbindopen(const char *filename) @@ -545,10 +550,6 @@ FILE *genbindopen(const char *filename) return genfile; } -/** - * standard IO handle for parse trace logging. - */ -static FILE *genbind_parsetracef; int genbind_parsefile(char *infilename, struct genbind_node **ast) { |