diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-07-03 03:25:12 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-07-03 03:25:12 +0200 |
commit | 9acb03e669e20180b9bc95ca02b21460761fef87 (patch) | |
tree | 376d2c46c207daaf5b6c1939c805e4191f02a036 /src/debug.c | |
parent | 82995655dca72297155c5632029284dacbcccc87 (diff) | |
download | blogc-9acb03e669e20180b9bc95ca02b21460761fef87.tar.gz blogc-9acb03e669e20180b9bc95ca02b21460761fef87.tar.bz2 blogc-9acb03e669e20180b9bc95ca02b21460761fef87.zip |
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?! :/
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |