Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev_loader' of github.com:nicknamemohaji/weeklyshell in…
Browse files Browse the repository at this point in the history
…to dev_loader
  • Loading branch information
nicknamemohaji committed Apr 5, 2024
2 parents cc6b0ae + 7b7f8b9 commit 6f96e5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codes/parser/parse_infix.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/* ::: :::::::: */
/* parse_infix.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dogwak <dogwak@student.42seoul.kr> +#+ +:+ +#+ */
/* By: dogwak <dogwak@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/28 13:35:01 by dogwak #+# #+# */
/* Updated: 2024/03/31 16:50:02 by dogwak ### ########.fr */
/* Updated: 2024/04/05 16:10:34 by dogwak ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -25,7 +25,7 @@ t_ast_node *parse_infix(t_parser *self, t_ast_node *left)
precede = get_precedence(self->pcur_token->type);
move_next_token(self);
exp->right = parse_expression(self, precede);
if (exp->right == NULL)
if (exp->right == NULL && self->pcur_token->type != END)
{
delete_ast_node(exp);
exp = NULL;
Expand Down

0 comments on commit 6f96e5f

Please sign in to comment.