From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16126 invoked from network); 4 Jun 2002 16:17:41 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Jun 2002 16:17:41 -0000 Received: (qmail 13621 invoked by alias); 4 Jun 2002 16:17:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17283 Received: (qmail 13596 invoked from network); 4 Jun 2002 16:17:27 -0000 To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: function parsing Date: Tue, 04 Jun 2002 17:18:19 +0100 From: Peter Stephenson Message-Id: <20020604161825.A65341C0B5@pwstephenson.fsnet.co.uk> % zsh -c 'function func { } this fails to cause a parse error' zsh: parse error near `this' % zsh -c 'func() { } this fails to cause a parse error' % I'm assuming the first is correct, since the second certainly isn't as the text is simply ignored. Index: Src/parse.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/parse.c,v retrieving revision 1.34 diff -u -r1.34 parse.c --- Src/parse.c 2 Jun 2002 18:03:20 -0000 1.34 +++ Src/parse.c 4 Jun 2002 16:09:07 -0000 @@ -1611,6 +1611,8 @@ ecbuf[p] = WCB_FUNCDEF(ecused - 1 - p); isfunc = 1; + isnull = 0; + break; } else break; isnull = 0; -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk