42-archive/42sh/src/lexer/lexer_comment.c
ariard@student.42.fr 8d23821d69 after mege
2017-02-20 21:05:12 +01:00

23 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lexer_comment.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/07 12:15:59 by jhalford #+# #+# */
/* Updated: 2017/02/20 21:03:53 by ariard ### ########.fr */
/* */
/* ************************************************************************** */
#include "lexer.h"
int lexer_comment(t_list **alst, t_lexer *lexer)
{
t_token *token;
token = (*alst)->content;
if (lexer->str[lexer->pos] == '\n')
return (lexer_lex(&(*alst)->next, lexer));
return (lexer_comment(alst, lexer));
}