possible d'assigner des variables avec des bquote genre 'echo a b c '

This commit is contained in:
wescande 2017-03-23 03:43:06 +01:00
parent 54f0610bd1
commit c4190fe0ac
2 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/09 22:03:48 by jhalford #+# #+# */ /* Created: 2017/02/09 22:03:48 by jhalford #+# #+# */
/* Updated: 2017/03/22 23:59:05 by jhalford ### ########.fr */ /* Updated: 2017/03/23 03:41:34 by wescande ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -36,7 +36,7 @@ int lexer_bquote(t_list **alst, t_lexer *lexer)
if (lexer->str[lexer->pos] == 0) if (lexer->str[lexer->pos] == 0)
return (push(&lexer->stack, BACKSLASH) ? 0 : 0); return (push(&lexer->stack, BACKSLASH) ? 0 : 0);
} }
token_append(token, lexer, back, back); token_append(token, lexer, back || token->type == TK_ASSIGNMENT_WORD, back);
lexer->pos++; lexer->pos++;
return (lexer_lex(alst, lexer)); return (lexer_lex(alst, lexer));
} }

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */ /* Created: 2016/12/03 12:07:11 by jhalford #+# #+# */
/* Updated: 2017/03/17 20:17:23 by jhalford ### ########.fr */ /* Updated: 2017/03/23 03:39:38 by wescande ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -27,7 +27,7 @@ int lexer_word(t_list **alst, t_lexer *lexer)
&& word_is_assignment((char *[]){token->data, (char *)token->esc})) && word_is_assignment((char *[]){token->data, (char *)token->esc}))
{ {
token->type = TK_ASSIGNMENT_WORD; token->type = TK_ASSIGNMENT_WORD;
token_append(token, lexer, 0, 0); token_append(token, lexer, 1, 0);
lexer->pos++; lexer->pos++;
} }
else else