normed: everything except yarn_cmd.c and token_name.c

This commit is contained in:
maix0 2024-10-12 16:13:02 +02:00
parent 1ba7fc5f32
commit 8122ecfc95
6 changed files with 139 additions and 99 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/06 13:33:12 by maiboyer #+# #+# */
/* Updated: 2024/10/08 14:51:41 by maiboyer ### ########.fr */
/* Updated: 2024/10/12 15:54:49 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,7 +14,6 @@
#include "parser/token.h"
#include <stdio.h>
t_str token_name(t_token *token);
t_token token_clone(t_token *tok)
@ -34,7 +33,8 @@ t_token token_clone(t_token *tok)
ret.subtokens = vec_token_new(tok->subtokens.capacity, token_free);
i = 0;
while (i < tok->subtokens.len)
vec_token_push(&ret.subtokens, token_clone(&tok->subtokens.buffer[i++]));
vec_token_push(&ret.subtokens, token_clone(\
&tok->subtokens.buffer[i++]));
}
return (ret);
}