curly brace token only when followed by a ' ' space for #94

This commit is contained in:
Jack Halford 2017-03-12 23:07:22 +01:00
parent 9061e43bea
commit 51642beccd

View file

@ -19,7 +19,8 @@ int lexer_curly_braces(t_list **alst, t_lexer *lexer)
token = (*alst)->content;
if (token->type)
lexer_lex(&(*alst)->next, lexer);
if (lexer->str[lexer->pos] == '{')
if (lexer->str[lexer->pos] == '{'
&& lexer->str[lexer->pos + 1] == ' ')
{
token->type = TK_LBRACE;
push(&lexer->stack, PAREN);