aboutsummaryrefslogtreecommitdiff
path: root/include/lexer.h
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-09 21:02:39 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-09 21:02:39 +0530
commitbcddd5c79306fcd7949c47f64d08400205463beb (patch)
tree82ec93d6c81e077705082487405b9db1d160d5ac /include/lexer.h
parentb365f7cdd0882c1fe974e9e08d607341876a0d34 (diff)
(lexer): parse_file->lex_file and must also add _RAW directives
Diffstat (limited to 'include/lexer.h')
-rw-r--r--include/lexer.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/lexer.h b/include/lexer.h
index 17a2825..ce761dd 100644
--- a/include/lexer.h
+++ b/include/lexer.h
@@ -1,7 +1,16 @@
#ifndef __LEXER_H
#define __LEXER_H
-typedef enum { INCLUDE, CONTENT, CONTENTFOR, ENDCONTENT, BODY } directive_e;
+#include <list.h>
+
+typedef enum {
+ _RAW,
+ INCLUDE,
+ CONTENT,
+ CONTENTFOR,
+ ENDCONTENT,
+ BODY
+} directive_e;
typedef struct {
unsigned int offset;
@@ -19,7 +28,7 @@ typedef struct {
unsigned int length;
} contentfor_operand_t;
-list_t *parse_file(char *content);
+list_t *lex_file(char *buffer);
directive_t *find_directive(char *content, key_match_t *match);
key_match_t *find_next_key(char *buffer);