diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-05-17 23:43:31 -0300 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2015-05-17 23:43:31 -0300 |
commit | 64e772c1125acadad8167fd5fd25b380f333ab86 (patch) | |
tree | f905c15fe3d3d703c4a7f8531a30482848132e6d /src/template-parser.h | |
parent | d7f5252a0d7c4c428bfbd560ce78b81073d3d6ec (diff) | |
download | blogc-64e772c1125acadad8167fd5fd25b380f333ab86.tar.gz blogc-64e772c1125acadad8167fd5fd25b380f333ab86.tar.bz2 blogc-64e772c1125acadad8167fd5fd25b380f333ab86.zip |
template-parser: convert "if" operator into enum
Diffstat (limited to 'src/template-parser.h')
-rw-r--r-- | src/template-parser.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/template-parser.h b/src/template-parser.h index b9213e2..809e3bc 100644 --- a/src/template-parser.h +++ b/src/template-parser.h @@ -23,11 +23,18 @@ typedef enum { BLOGC_TEMPLATE_CONTENT_STMT, } blogc_template_stmt_type_t; +typedef enum { + BLOGC_TEMPLATE_OP_NOT = 1 << 0, + BLOGC_TEMPLATE_OP_EQ = 1 << 1, + BLOGC_TEMPLATE_OP_LT = 1 << 2, + BLOGC_TEMPLATE_OP_GT = 1 << 3, +} blogc_template_stmt_operator_t; + typedef struct { blogc_template_stmt_type_t type; char *value; char *value2; - char *op; + blogc_template_stmt_operator_t op; } blogc_template_stmt_t; b_slist_t* blogc_template_parse(const char *src, size_t src_len, |