diff --git a/42sh/src/lexer/lexer_number.c b/42sh/src/lexer/lexer_number.c index f429ca83..172700d5 100644 --- a/42sh/src/lexer/lexer_number.c +++ b/42sh/src/lexer/lexer_number.c @@ -6,7 +6,8 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/03 12:06:45 by jhalford #+# #+# */ -/* Updated: 2017/03/05 17:01:04 by ariard ### ########.fr */ +/* Updated: 2017/03/05 17:21:51 by ariard ### ########.fr */ +>>>>>>> origin/pda_execution /* */ /* ************************************************************************** */ @@ -26,14 +27,20 @@ int lexer_number(t_list **alst, t_lexer *lexer) return (lexer_lex(alst, lexer)); } else if (ft_isdigit(lexer->str[lexer->pos]) - && (ft_isdigit(lexer->str[lexer->pos + 1]) - || lexer->str[lexer->pos + 1] == '>' - || lexer->str[lexer->pos + 1] == '<')) + && ft_isdigit(lexer->str[lexer->pos + 1])) { token_append(token, lexer, 0, 0); lexer->pos++; return (lexer_number(alst, lexer)); } + else if (ft_isdigit(lexer->str[lexer->pos]) + && (lexer->str[lexer->pos + 1] == '>' + || lexer->str[lexer->pos + 1] == '<')) + { + token_append(token, lexer, 0, 0); + lexer->pos++; + return (lexer_lex(&(*alst)->next, lexer)); + } else { token->type = TK_WORD; @@ -41,6 +48,4 @@ int lexer_number(t_list **alst, t_lexer *lexer) lexer->pos++; return (lexer_lex(alst, lexer)); } - lexer->state = DEFAULT; - return (lexer_lex(alst, lexer)); } diff --git a/42sh/src/parser/add_redir.c b/42sh/src/parser/add_redir.c index 7a7472c5..10f66350 100644 --- a/42sh/src/parser/add_redir.c +++ b/42sh/src/parser/add_redir.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/03/05 17:14:30 by ariard ### ########.fr */ +/* Updated: 2017/03/05 17:22:24 by ariard ### ########.fr */ /* */ /* ************************************************************************** */