fix: Fixed ALL the code

This commit is contained in:
Gu://em_ 2026-01-10 19:57:36 +01:00
parent 03c35d5366
commit 97b7240286
10 changed files with 68 additions and 11 deletions

View file

@ -1,13 +1,16 @@
#include "lexer.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "io_backend/io_backend.h"
static char *end_last_token;
static ssize_t remaining_chars;
char *new_token(char *begin, size_t size)
char *new_token(char *begin, ssize_t size)
{
char *res = calloc(size + 1, sizeof(char));
if (res == NULL)
@ -56,6 +59,7 @@ char *get_token(void)
// skip blank char
// exit from loop
char *token = new_token(stream, i);
return token;
}
default:
break;
@ -64,4 +68,5 @@ char *get_token(void)
}
remaining_chars -= i;
return NULL;
}