merge resolved

This commit is contained in:
Antoine Riard 2017-03-05 17:23:02 +01:00
commit 1086d95d89
2 changed files with 12 additions and 7 deletions

View file

@ -6,7 +6,8 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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));
}

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 */
/* */
/* ************************************************************************** */