aboutsummaryrefslogtreecommitdiff
path: root/include/lexer.h
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-27 19:09:39 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-27 19:09:39 +0530
commite4743dfa97fdaed6f9bdddf742c5c6d1191dc1a1 (patch)
tree75d5ff5454425d76324d51fa45805033e19343d5 /include/lexer.h
parent3f87fe1fc65aafc7bb76fe6e34cd36f587794086 (diff)
lexer: lex() must also return matches
Diffstat (limited to 'include/lexer.h')
-rw-r--r--include/lexer.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/lexer.h b/include/lexer.h
index 4621f6f..f7cb6d2 100644
--- a/include/lexer.h
+++ b/include/lexer.h
@@ -38,7 +38,12 @@ typedef struct {
char *content;
} eachdo_operands_t;
-list_t *lex(char *buffer);
+typedef struct {
+ list_t *matches;
+ list_t *directives;
+} lex_t;
+
+lex_t *lex(char *buffer);
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);