diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-28 08:04:47 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-28 08:04:47 +0530 |
commit | 7e01bb04dc51348635923ea34d35eb5f877be502 (patch) | |
tree | e168b52af79d93c2fe7167c6f34e3e7eb334c303 /src | |
parent | 65b984bbeb33d4bbbe8f8923f42a4fd2b77f8d76 (diff) |
Revert "lexer: hydrate lex_t->matches"
This reverts commit c99f7c4752f816e2a4dbff728fb7d1fb5d8fa103.
Diffstat (limited to 'src')
-rw-r--r-- | src/lexer.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/lexer.c b/src/lexer.c index 9810d2f..56802d1 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -33,44 +33,26 @@ lex(char *buffer) char *raw_content = strndup(buffer, match->offset); directive_t *raw_directive = malloc(sizeof(directive_t)); - key_match_t *raw_match = malloc(sizeof(key_match_t)); raw_directive->type = _RAW; raw_directive->operands = raw_content; - - raw_match->length = match->offset; - raw_match->offset = current_offset - match->length - match->offset; - list_add(directives, raw_directive); - list_add(matches, raw_match); free(raw_directive); - free(raw_match); } buffer += match->offset + match->length; list_add(directives, directive); - list_add(matches, match); } if (strlen(buffer) > 0) { char *raw_content = strdup(buffer); directive_t *raw_directive = malloc(sizeof(directive_t)); - key_match_t *raw_key = malloc(sizeof(key_match_t)); - raw_directive->type = _RAW; raw_directive->operands = raw_content; - - raw_key->length = strlen(buffer); - raw_key->offset = current_offset; - list_add(directives, raw_directive); - list_add(matches, raw_key); - - free(raw_directive); - free(raw_key); } out->directives = directives; |