aboutsummaryrefslogtreecommitdiffstats
path: root/src/template-parser.h
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-03 19:57:54 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-09-03 20:28:55 +0200
commit74ca21a41bcb5a49d19e65c9ba88f1f864cb7095 (patch)
tree4774587e47abc0ff20453abbf714b63c36697f26 /src/template-parser.h
parent30ae5fd4f65f48009e6956e42ccc2c9d9ad80901 (diff)
downloadblogc-74ca21a41bcb5a49d19e65c9ba88f1f864cb7095.tar.gz
blogc-74ca21a41bcb5a49d19e65c9ba88f1f864cb7095.tar.bz2
blogc-74ca21a41bcb5a49d19e65c9ba88f1f864cb7095.zip
*: big code reorganization.
- source and tests are now splitted by target - utils lib is now called common still pending move error.c from blogc to common
Diffstat (limited to 'src/template-parser.h')
-rw-r--r--src/template-parser.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/template-parser.h b/src/template-parser.h
deleted file mode 100644
index 19df6af..0000000
--- a/src/template-parser.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * blogc: A blog compiler.
- * Copyright (C) 2015-2016 Rafael G. Martins <rafael@rafaelmartins.eng.br>
- *
- * This program can be distributed under the terms of the BSD License.
- * See the file LICENSE.
- */
-
-#ifndef _TEMPLATE_PARSER_H
-#define _TEMPLATE_PARSER_H
-
-#include <stddef.h>
-#include "error.h"
-#include "utils.h"
-
-/*
- * note: whitespace cleaners are NOT added to ast. we fix strings right during
- * template parsing. renderer does not need to care about it, for the sake of
- * simplicity.
- */
-typedef enum {
- BLOGC_TEMPLATE_IFDEF_STMT = 1,
- BLOGC_TEMPLATE_IFNDEF_STMT,
- BLOGC_TEMPLATE_IF_STMT,
- BLOGC_TEMPLATE_ELSE_STMT,
- BLOGC_TEMPLATE_ENDIF_STMT,
- BLOGC_TEMPLATE_FOREACH_STMT,
- BLOGC_TEMPLATE_ENDFOREACH_STMT,
- BLOGC_TEMPLATE_BLOCK_STMT,
- BLOGC_TEMPLATE_ENDBLOCK_STMT,
- BLOGC_TEMPLATE_VARIABLE_STMT,
- BLOGC_TEMPLATE_CONTENT_STMT,
-} blogc_template_stmt_type_t;
-
-typedef enum {
- BLOGC_TEMPLATE_OP_NEQ = 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;
- blogc_template_stmt_operator_t op;
-} blogc_template_stmt_t;
-
-sb_slist_t* blogc_template_parse(const char *src, size_t src_len,
- blogc_error_t **err);
-void blogc_template_free_stmts(sb_slist_t *stmts);
-
-#endif /* _TEMPLATE_PARSER_H */