diff options
author | Danny van Kooten <dannyvankooten@users.noreply.github.com> | 2020-03-12 15:07:09 +0100 |
---|---|---|
committer | Danny van Kooten <dannyvankooten@users.noreply.github.com> | 2020-03-12 15:07:09 +0100 |
commit | 791e03d8199fa1177f970f45a8a436912d229d1c (patch) | |
tree | bd24f5ad87bca8e932e9db8176d46a31d578c43c /src/template.c | |
parent | a39e8c713e0a8ea9f2f8e455c1ce2b4d0c3f5115 (diff) | |
download | unja-791e03d8199fa1177f970f45a8a436912d229d1c.tar.gz unja-791e03d8199fa1177f970f45a8a436912d229d1c.zip |
add vector type
Diffstat (limited to 'src/template.c')
-rw-r--r-- | src/template.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/template.c b/src/template.c index c88d90a..e5296c8 100644 --- a/src/template.c +++ b/src/template.c @@ -30,7 +30,6 @@ int eval(char *dest, mpc_ast_t* t, struct hashmap *ctx) { printf("%s: %s\n", t->tag, t->contents); if (strstr(t->tag, "content|var")) { - printf("Key: %s\n", t->contents); char *value = (char *) hashmap_get(ctx, t->children[1]->contents); if (value == NULL) { return 1; @@ -42,7 +41,7 @@ int eval(char *dest, mpc_ast_t* t, struct hashmap *ctx) { if (strstr(t->tag, "content|for")) { char *tmp_key = t->children[2]->contents; char *iterator_key = t->children[4]->contents; - struct list *list = hashmap_get(ctx, iterator_key); + struct vector *list = hashmap_get(ctx, iterator_key); for (int i=0; i < list->size; i++) { hashmap_insert(ctx, tmp_key, list->values[i]); eval(dest, t->children[6], ctx); |