/* * blogc: A blog compiler. * Copyright (C) 2015-2016 Rafael G. Martins * * This program can be distributed under the terms of the BSD License. * See the file LICENSE. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include "template-parser.h" #include "utils.h" #include "debug.h" static const char* get_operator(blogc_template_stmt_operator_t op) { if (op & BLOGC_TEMPLATE_OP_NEQ) return "!="; if (op & BLOGC_TEMPLATE_OP_EQ) { if (op & BLOGC_TEMPLATE_OP_LT) return "<="; else if (op & BLOGC_TEMPLATE_OP_GT) return ">="; return "=="; } if (op & BLOGC_TEMPLATE_OP_LT) return "<"; else if (op & BLOGC_TEMPLATE_OP_GT) return ">"; return ""; } void blogc_debug_template(sb_slist_t *stmts) { for (sb_slist_t *tmp = stmts; tmp != NULL; tmp = tmp->next) { blogc_template_stmt_t *data = tmp->data; fprintf(stderr, "DEBUG: