Updated parser to be more normed

This commit is contained in:
Maieul BOYER 2024-09-02 18:07:55 +02:00
parent 5e091fdf85
commit 62ac9f3813
No known key found for this signature in database
16 changed files with 166 additions and 131 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/01 19:36:53 by maiboyer #+# #+# */
/* Updated: 2024/09/01 19:54:13 by maiboyer ### ########.fr */
/* Updated: 2024/09/02 18:04:32 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -96,12 +96,7 @@ bool scan_heredoc_content_other(struct s_heredoc_scan_state *state)
if (state->lexer->get_column(state->lexer) == 0)
{
while (me_isspace(state->lexer->lookahead))
{
if (state->did_advance)
state->lexer->advance(state->lexer, false);
else
state->lexer->advance(state->lexer, true);
}
state->lexer->advance(state->lexer, !state->did_advance);
if (state->end_type != SIMPLE_HEREDOC_BODY)
{
state->lexer->result_symbol = state->middle_type;