update: fixed expansion stuff
This commit is contained in:
parent
01c8e7cf2c
commit
3287b6a2a7
10 changed files with 133 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/03 22:07:25 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/10/03 22:08:14 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/10/05 13:00:52 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -22,6 +22,10 @@ void push_token_and_create_new(\
|
|||
t_vec_token *tokens, t_token *tok, enum e_token ttype, t_const_str s);
|
||||
void push_token_and_set_new(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, t_const_str s);
|
||||
void push_token_and_create_new_chr(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, char c);
|
||||
void push_token_and_set_new_chr(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, char c);
|
||||
|
||||
void push_token_and_create_new(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, t_const_str s)
|
||||
|
|
@ -44,3 +48,23 @@ void push_token_and_set_new(\
|
|||
*tok = token_new(ttype);
|
||||
string_push(&tok->string, s);
|
||||
}
|
||||
|
||||
void push_token_and_create_new_chr(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, char c)
|
||||
{
|
||||
char tmp[2];
|
||||
|
||||
tmp[0] = c;
|
||||
tmp[1] = '\0';
|
||||
push_token_and_create_new(tokens, tok, ttype, (t_const_str)&tmp);
|
||||
}
|
||||
|
||||
void push_token_and_set_new_chr(\
|
||||
t_vec_token *tokens, t_token *tok, enum e_token ttype, char c)
|
||||
{
|
||||
char tmp[2];
|
||||
|
||||
tmp[0] = c;
|
||||
tmp[1] = '\0';
|
||||
push_token_and_set_new(tokens, tok, ttype, (t_const_str)&tmp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue