regenerated stuff

This commit is contained in:
maix0 2024-09-26 18:31:56 +02:00
parent c284eb3786
commit 2e811bcec2
61 changed files with 1022 additions and 1697 deletions

44
parser/src/token.c Normal file
View file

@ -0,0 +1,44 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* token.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/25 16:27:03 by rparodi #+# #+# */
/* Updated: 2024/09/26 17:56:08 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "parser/token.h"
#include "me/string/string.h"
#include "me/types.h"
#include <stdio.h>
t_error handle_quote(t_string raw, enum e_token actual, int *output)
{
(void)raw;
(void)actual;
(void)output;
dprintf(2, "\tNOT DONE\n");
return (ERROR);
}
t_error handle_arithmetic(t_string raw, enum e_token actual, int *output)
{
(void)raw;
(void)actual;
(void)output;
dprintf(2, "\tNOT DONE\n");
return (ERROR);
}
t_error tokeniser(t_string raw, enum e_token actual, int *output)
{
if (!raw.buf || raw.len == 0 || raw.capacity == 0)
return (ERROR);
if (handle_quote(raw, actual, output))
return (ERROR);
else if (handle_arithmetic(raw, actual, output))
return (ERROR);
return (NO_ERROR);
}