WIP IFS spliiting

This commit is contained in:
Maieul BOYER 2024-07-24 18:54:13 +02:00
parent de9a72e368
commit f56432b372
No known key found for this signature in database
18 changed files with 629 additions and 37 deletions

View file

@ -85,6 +85,6 @@ build_filelist:
@printf '%-78s\\\n' "SRC_FILES =" > Filelist.$(ANAME).mk
@tree src -ifF | rg 'src/(.*)\.c$$' --replace '$$1' | sed -re 's/^(.*)_([0-9]+)$$/\1|\2/g' | sort -t'|' --key=1,1 --key=2,2n | sed -e's/|/_/' | xargs printf '%-78s\\\n' >> Filelist.$(ANAME).mk
@echo "" >> Filelist.$(ANAME).mk
@echo -e "$(COL_GRAY) Populating $(COL_GREEN) Filelist.$(ANAME).mk$(END)"
@echo -e '$(COL_GRAY) Populating $(COL_GREEN) Filelist.$(ANAME).mk$(END)'
-include $(DEPS)

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/14 17:46:58 by maiboyer #+# #+# */
/* Updated: 2024/07/22 16:51:56 by rparodi ### ########.fr */
/* Updated: 2024/07/24 15:40:23 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -121,6 +121,8 @@ struct s_ast_raw_string
t_str str;
t_usize len;
t_ast_word_kind kind;
bool start;
bool end;
};
struct s_ast_word

View file

@ -342,6 +342,9 @@ t_ast_node ast_alloc(t_ast_node_kind kind)
{
ret->data.raw_string.len = 0;
ret->data.raw_string.str = NULL;
ret->data.raw_string.kind = AST_WORD_NO_QUOTE;
ret->data.raw_string.start = true;
ret->data.raw_string.end = true;
}
if (kind == AST_SUBSHELL)
{
@ -1683,6 +1686,8 @@ t_error build_sym_raw_string(t_parse_node self, t_const_str input, t_ast_node *o
temp->data.raw_string.str = temp_str;
temp->data.raw_string.len = str_len(temp_str);
temp->data.raw_string.kind = AST_WORD_SINGLE_QUOTE;
temp->data.raw_string.start = true;
temp->data.raw_string.end = true;
ret->data.word.kind = AST_WORD_SINGLE_QUOTE;
vec_ast_push(&ret->data.word.inner, temp);
return (*out = ret, NO_ERROR);