Skip to content

Commit 4b763d4

Browse files
author
Heitor Danilo
committed
refactor: removing the array initializer function
1 parent 1381a4c commit 4b763d4

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/token/init.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <string.h>
33

44
#include <langdef.h>
5-
65
#include <token/lib.h>
76

87
/**
@@ -25,18 +24,3 @@ struct Token *new_token(char *literal, byte code, int line, int column) {
2524

2625
return token;
2726
}
28-
29-
/**
30-
* Initializes a dynamic array of tokens.
31-
*
32-
* @return A pointer to the newly created token array.
33-
*/
34-
struct Tokens *init_token_arr() {
35-
struct Tokens *tokens_array = (struct Tokens *)malloc(sizeof(struct Tokens));
36-
37-
tokens_array->capacity = 10;
38-
tokens_array->size = 0;
39-
tokens_array->tokens = (struct Token **)malloc(tokens_array->capacity * sizeof(struct Token *));
40-
41-
return tokens_array;
42-
}

0 commit comments

Comments
 (0)