summaryrefslogtreecommitdiff
path: root/src/nsgenbind-ast.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2012-10-31 01:20:20 +0000
committerVincent Sanders <vince@kyllikki.org>2012-10-31 01:20:20 +0000
commit65e49e23019a97d51702077c82613c6c26e84033 (patch)
treef21ba90ba9dc08826ef687f9bd148e6345fd673a /src/nsgenbind-ast.c
parent26bbe37c6f0b99f23736380ba55f156f22bdaf06 (diff)
downloadnsgenbind-65e49e23019a97d51702077c82613c6c26e84033.tar.gz
nsgenbind-65e49e23019a97d51702077c82613c6c26e84033.tar.bz2
implement the "implements" webidl directive
Diffstat (limited to 'src/nsgenbind-ast.c')
-rw-r--r--src/nsgenbind-ast.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/nsgenbind-ast.c b/src/nsgenbind-ast.c
index e633439..c14f0df 100644
--- a/src/nsgenbind-ast.c
+++ b/src/nsgenbind-ast.c
@@ -100,7 +100,7 @@ genbind_node_find(struct genbind_node *node,
{
struct genbind_node *ret;
- if (node == NULL) {
+ if ((node == NULL) || (node == prev)) {
return NULL;
}
@@ -139,27 +139,21 @@ genbind_node_find_type_ident(struct genbind_node *node,
struct genbind_node *found_node;
struct genbind_node *ident_node;
- found_node = genbind_node_find(node,
- prev,
- genbind_cmp_node_type,
- (void *)type);
+ found_node = genbind_node_find_type(node, prev, type);
+
while (found_node != NULL) {
- ident_node = genbind_node_find(genbind_node_getnode(found_node),
+ ident_node = genbind_node_find_type(genbind_node_getnode(found_node),
NULL,
- genbind_cmp_node_type,
- (void *)GENBIND_NODE_TYPE_IDENT);
+ GENBIND_NODE_TYPE_IDENT);
if (ident_node != NULL) {
if (strcmp(ident_node->r.text, ident) == 0)
break;
}
/* look for next matching node */
- found_node = genbind_node_find(node,
- found_node,
- genbind_cmp_node_type,
- (void *)type);
+ found_node = genbind_node_find_type(node, found_node, type);
}
return found_node;