diff --git a/src/parser/ast.c b/src/parser/ast.c
index a64178bdd6e35e6fce4f43b2db4dace1d899806a..dcfe7862bd0b73c891ea017796a28cc626cf0589 100644 (file)
--- a/src/parser/ast.c
+++ b/src/parser/ast.c
sdb_ast_fetch_t *fetch = SDB_AST_FETCH(obj);
if (fetch->hostname)
free(fetch->hostname);
+ if (fetch->parent)
+ free(fetch->parent);
if (fetch->name)
free(fetch->name);
fetch->hostname = fetch->name = NULL;
} /* sdb_ast_op_create */
sdb_ast_node_t *
-sdb_ast_iter_create(int kind, int op,
- sdb_ast_node_t *iter, sdb_ast_node_t *expr)
+sdb_ast_iter_create(int kind, sdb_ast_node_t *iter, sdb_ast_node_t *expr)
{
sdb_ast_iter_t *i;
i = SDB_AST_ITER(sdb_object_create(SDB_AST_OP_TO_STRING(kind), iter_type));
i->super.type = SDB_AST_TYPE_ITERATOR;
i->kind = kind;
- i->op = op;
i->iter = iter;
i->expr = expr;
return SDB_AST_NODE(i);
} /* sdb_ast_value_create */
sdb_ast_node_t *
-sdb_ast_fetch_create(int obj_type, char *hostname, char *name,
- sdb_ast_node_t *filter)
+sdb_ast_fetch_create(int obj_type, char *hostname,
+ int parent_type, char *parent, char *name,
+ bool full, sdb_ast_node_t *filter)
{
sdb_ast_fetch_t *fetch;
fetch = SDB_AST_FETCH(sdb_object_create("FETCH", fetch_type));
fetch->obj_type = obj_type;
fetch->hostname = hostname;
+ fetch->parent_type = parent_type;
+ fetch->parent = parent;
fetch->name = name;
+ fetch->full = full;
fetch->filter = filter;
return SDB_AST_NODE(fetch);
} /* sdb_ast_fetch_create */