Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: \} parse error in 3.0.3-test4



> Here's a parse error in 3.0.3-test4 which wasn't in 3.0.2:
> 
>     $ zsh-3.0.2 -fxc 'eval last=\$\{$#\}' foo bar
>     + eval last=${1}
>     + last=bar
> 
>     $ zsh-3.0.3-test4 -fxc 'eval last=\$\{$#\}' foo bar
>     + eval last=${1
>     foo: closing brace expected

Fix is included below.  This should be applied to zsh-3.0.3-test4 and
zsh-3.1.1.

Zoltan


*** Src/lex.c	1997/01/05 21:07:31	3.1.1.4
--- Src/lex.c	1997/01/28 23:27:21
***************
*** 986,992 ****
  	    cmdpop();
  	zerr("closing brace expected", NULL, 0);
      } else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! 	       peek == STRING && bptr[-1] == '}') {
  	/* hack to get {foo} command syntax work */
  	bptr--;
  	len--;
--- 986,992 ----
  	    cmdpop();
  	zerr("closing brace expected", NULL, 0);
      } else if (unset(IGNOREBRACES) && !sub && len > 1 &&
! 	       peek == STRING && bptr[-1] == '}' && bptr[-2] != Bnull) {
  	/* hack to get {foo} command syntax work */
  	bptr--;
  	len--;



Messages sorted by: Reverse Date, Date, Thread, Author