diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-08-02 18:30:18 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-08-02 18:30:18 +0100 |
commit | cf89528fc6668e6d07b6e99db0069c9fe1f6e05d (patch) | |
tree | ba537f31127428c54b70d8cc9a190b3702f0f8b3 /src/webidl-ast.c | |
parent | 6fb336e6587d550bf4a8355e65923efb0bf14cab (diff) | |
download | nsgenbind-cf89528fc6668e6d07b6e99db0069c9fe1f6e05d.tar.gz nsgenbind-cf89528fc6668e6d07b6e99db0069c9fe1f6e05d.tar.bz2 |
Update the webidl parser to cope with specials and overloaded methods
Diffstat (limited to 'src/webidl-ast.c')
-rw-r--r-- | src/webidl-ast.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/webidl-ast.c b/src/webidl-ast.c index 75f969b..0e90767 100644 --- a/src/webidl-ast.c +++ b/src/webidl-ast.c @@ -285,6 +285,7 @@ webidl_node_getint(struct webidl_node *node) case WEBIDL_NODE_TYPE_MODIFIER: case WEBIDL_NODE_TYPE_TYPE_BASE: case WEBIDL_NODE_TYPE_LITERAL_INT: + case WEBIDL_NODE_TYPE_SPECIAL: return &node->r.number; default: @@ -386,6 +387,9 @@ static const char *webidl_node_type_to_str(enum webidl_node_type type) case WEBIDL_NODE_TYPE_EXTENDED_ATTRIBUTE: return "Extended Attribute"; + case WEBIDL_NODE_TYPE_SPECIAL: + return "Special"; + default: return "Unknown"; } @@ -414,10 +418,13 @@ static int webidl_ast_dump(FILE *dumpf, struct webidl_node *node, int indent) fprintf(dumpf, "\n"); webidl_ast_dump(dumpf, next, indent + 2); } else { - /* not txt or node has to be an int */ + /* not txt or node try an int */ value = webidl_node_getint(node); if (value != NULL) { fprintf(dumpf, ": %d\n", *value); + } else { + /* no value */ + fprintf(dumpf, "\n"); } } } else { |