here_doc: prepare handling for variable expansion in here_doc

This is waiting on #23 to be merged to work
This commit is contained in:
Khaïs COLIN 2025-03-11 13:45:49 +01:00
parent 47f449d804
commit d30a39d907
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 5 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/07 11:42:29 by khais #+# #+# */
/* Updated: 2025/03/11 13:42:05 by khais ### ########.fr */
/* Updated: 2025/03/11 13:45:09 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -109,6 +109,8 @@ int here_doc(t_worddesc *marker, int infd)
{
if (is_marker(line, marker))
return (finalize(outfd, filename));
if (!(marker->flags & (W_QUOTED | W_DQUOTE)))
ft_dprintf(STDERR_FILENO, "TODO: handle expansion\n");
line = output_line_and_next(infd, outfd, line);
}
ft_dprintf(STDERR_FILENO, "minishell: warning: here-document delimited by \

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/07 11:43:32 by khais #+# #+# */
/* Updated: 2025/03/11 13:37:00 by khais ### ########.fr */
/* Updated: 2025/03/11 13:45:45 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -110,5 +110,6 @@ int main(void) {
test_here_doc_only_end_marker();
test_here_doc_input_plus_end_marker();
test_here_doc_input_no_end_marker();
// TODO: expansion handling
return (0);
}