aboutsummaryrefslogtreecommitdiff
path: root/include/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lexer.h')
-rw-r--r--include/lexer.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/lexer.h b/include/lexer.h
index d93877e..0831e90 100644
--- a/include/lexer.h
+++ b/include/lexer.h
@@ -3,6 +3,8 @@
#include <list.h>
+#define DIRECTIVE_IS(key) strncmp(buffer + n, key, strlen(key)) == 0
+
typedef enum {
_RAW,
INCLUDE,
@@ -33,4 +35,18 @@ directive_t *find_directive(char *content, key_match_t *match);
key_match_t *find_next_key(char *buffer, size_t skip);
char *find_contentfor_value(list_t *content_headers, char *key);
+void lexer_handle_include(directive_t *directive,
+ key_match_t *match,
+ char *buffer,
+ size_t n);
+void lexer_handle_contentfor(directive_t *directive,
+ key_match_t *match,
+ char *buffer,
+ char *content,
+ size_t n);
+void lexer_handle_content(directive_t *directive,
+ key_match_t *match,
+ char *buffer,
+ size_t n);
+
#endif