From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18294 invoked by alias); 30 Sep 2015 19:38:32 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36726 Received: (qmail 18997 invoked from network); 30 Sep 2015 19:38:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=JuUM15MC c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=hD80L64hAAAA:8 a=q2GGsy2AAAAA:8 a=Rh4kHuM4JNFuSNWY20EA:9 a=CjuIK1q_8ugA:10 Date: Wed, 30 Sep 2015 20:38:25 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Proof of concept: "static" parameter scope Message-ID: <20150930203825.307d3f8f@ntlworld.com> In-Reply-To: <20150925101540.5d2ded9c@pwslap01u.europe.root.pri> References: <150924192305.ZM2680@torch.brasslantern.com> <20150925101540.5d2ded9c@pwslap01u.europe.root.pri> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 25 Sep 2015 10:15:40 +0100 Peter Stephenson wrote: > On Thu, 24 Sep 2015 19:23:05 -0700 > Bart Schaefer wrote: > > Modules can't declare keywords, so this isn't able to support the new > > array assignment syntax used by "local" et al. However, the entry point > > is coded to match that call signature. > > I think the biggest issue with fixing this is it's going to change the > "features" interface to modules as we'll have to add a feature type that > defines a typeset-style interface (and a corresponding reserved word, > but I think we can tie the two together). I wonder if it's easier than that. If the builtin has the BINF_ASSIGN flag then the module code could do that automatically without the module needing to declare a different sort of feature. As long as the interface is correct, simply adding a reserved word with the token TYPESET should be enough. The trouble is it needs to know this early, because anything using this builtin with the assignment interface needs to be parsed properly. In particular, it would have to be registered as a reserved word at any point it wsa marked for autoload. But maybe an additional flag is good enough for that. pws