init parser

This commit is contained in:
hugogogo
2026-04-30 23:19:14 +02:00
parent 7a30dcc345
commit 512ba9b5f4
7 changed files with 70 additions and 13 deletions

View File

@@ -1,7 +1,4 @@
#include "lexer.h"
#include "libft.h"
#include "errors.h"
#include <stdbool.h>
// any single letter is a valid variable, like 'x' or 'y'
static bool token_is_variable(const char *input, int input_pos, int *token_size)
@@ -153,7 +150,7 @@ static bool token_is_equal(const char *input, int input_pos, int *token_size)
/**
* LEXER
*/
void lexerize(const char *input, token *tokens)
int lexerize(const char *input, token *tokens)
{
int token_count;
int input_pos;
@@ -222,4 +219,6 @@ void lexerize(const char *input, token *tokens)
tokens[token_count].type = TOKEN_END;
tokens[token_count].value_char = '\0';
return token_count;
}