feat: adding the partentheses treatment (just the start)

This commit is contained in:
Raphael 2024-09-30 12:28:58 +02:00
parent e46b8b438b
commit 24d8bf5fc9
2 changed files with 30 additions and 1 deletions

29
parser/src/parentheses.c Normal file
View file

@ -0,0 +1,29 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parentheses.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/30 12:25:22 by rparodi #+# #+# */
/* Updated: 2024/09/30 12:28:26 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/vec/vec_token.h"
#include "parser/token.h"
#include "me/string/string.h"
#include "me/types.h"
#include <stdio.h>
char is_parentheses(char c, char next)
{
if (c == '(')
{
if (next == '(')
return (2);
else
return (1);
}
return (0);
}

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */
/* Updated: 2024/09/29 13:28:31 by rparodi ### ########.fr */
/* Updated: 2024/09/30 12:28:26 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */