summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2023-01-08 19:17:57 -0800
committerPreston Pan <preston@nullring.xyz>2023-01-08 19:17:57 -0800
commit43f11a93385c4848bfad49510bdea2849f241816 (patch)
treeaafe396ad077acc6be6bef1d77a65d517cd30cf4 /src/parser.c
parent19367a27472a06634424e56c1eb21e4f53da4e9e (diff)
add some frees; still need to fix high amounts of memory leakage
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/parser.c b/src/parser.c
index dc949fe..a6a5b82 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -46,33 +46,6 @@ parser_t *init_parser_copy_hash(lexer_t *lexer, hash_table_t *h) {
parser_t *init_parser(lexer_t *lexer) {
return init_parser_copy_hash(lexer, init_hash_table(100));
}
-/* parser_t *init_parser(lexer_t *lexer) { */
-/* parser_t *p = (parser_t *)malloc(sizeof(parser_t)); */
-/* if (p == NULL) */
-/* die("malloc on parser"); */
-
-/* p->i = 0; */
-/* p->tokens = malloc(sizeof(token_t *)); */
-/* p->symbol_table = init_hash_table(100); */
-/* p->finished = false; */
-/* if (p->tokens == NULL) */
-/* die("malloc on p->tokens"); */
-
-/* int size = 1; */
-/* token_t *t = lexer_collect_next(lexer); */
-/* p->tokens[size - 1] = t; */
-
-/* while (true) { */
-/* t = lexer_collect_next(lexer); */
-/* size++; */
-/* p->tokens = realloc(p->tokens, size * sizeof(token_t *)); */
-/* p->tokens[size - 1] = t; */
-/* if (t == NULL) */
-/* break; */
-/* } */
-/* p->size = size; */
-/* return p; */
-/* } */
void parser_move(parser_t *parser) {
if (parser->i != parser->size - 1)