From 9acb03e669e20180b9bc95ca02b21460761fef87 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 3 Jul 2016 03:25:12 +0200 Subject: template-parser: renderer: implemented 'else' support in templates yeah, this is stupid. after more than 320 commits and 26 releases, we finally support the 'else' statement in the template engine. I don't know if I'm dumb or what, but it took me that long to find a "simple" solution to this basic issue. yep, no more `{% ifdef FOO %}...{% endif %}{% ifndef FOO %}...{% endif %}` blocks. but seriously, who cares?! :/ --- src/debug.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/debug.c') diff --git a/src/debug.c b/src/debug.c index 767e1a5..7039608 100644 --- a/src/debug.c +++ b/src/debug.c @@ -55,6 +55,9 @@ blogc_debug_template(sb_slist_t *stmts) fprintf(stderr, "IF: %s %s %s", data->value, get_operator(data->op), data->value2); break; + case BLOGC_TEMPLATE_ELSE_STMT: + fprintf(stderr, "ELSE"); + break; case BLOGC_TEMPLATE_ENDIF_STMT: fprintf(stderr, "ENDIF"); break; -- cgit v1.2.3-18-g5258