norm: almost everything

This commit is contained in:
maix0 2024-10-12 16:22:37 +02:00
parent 8122ecfc95
commit 54a1041aa7
9 changed files with 311 additions and 264 deletions

View file

@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* yard_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/12 16:11:05 by maiboyer #+# #+# */
/* Updated: 2024/10/12 16:11:19 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "parser/token.h"
int _get_prec(t_token *token)
{
if (!token)
return (-1);
else if (token->type == TOK_PIPE)
return (2);
else if (token->type == TOK_AND || token->type == TOK_OR)
return (1);
return (0);
}