diff options
author | Preston Pan <preston@nullring.xyz> | 2023-01-08 14:44:25 -0800 |
---|---|---|
committer | Preston Pan <preston@nullring.xyz> | 2023-01-08 14:44:25 -0800 |
commit | 87d82ead963c24d84a4f6e417b96b9bf73d132bb (patch) | |
tree | 096e60118f6e62508db653d5102d85e77b8d73e9 /src/lexer.c | |
parent | aa1dd020edb82f26dd5bc29378177cfcaa4c53ed (diff) |
fix memory problem
Diffstat (limited to 'src/lexer.c')
-rw-r--r-- | src/lexer.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/lexer.c b/src/lexer.c index e58197a..4e03a02 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -57,13 +57,6 @@ static bool is_valid_id_char(char c) { return true; } -static char *char_to_string(char c) { - char *s = (char *)malloc(2 * sizeof(char)); - s[0] = c; - s[1] = '\0'; - return s; -} - token_t *lexer_collect_bool(lexer_t *lexer) { lexer_move(lexer); if (lexer->c == 't') { @@ -158,7 +151,6 @@ start: return lexer_move_with( lexer, init_token(TOKEN_PERIOD, ".", lexer->row, lexer->col)); else { - printf("returns null\n"); return NULL; } } |