zsh-workers
 help / color / mirror / code / Atom feed
* Parsing of "anonymous" functions
@ 2013-12-28 20:07 Bart Schaefer
  2014-01-02 20:35 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2013-12-28 20:07 UTC (permalink / raw)
  To: zsh-workers

I just noticed this:

torch% ()()()()()()()()
function function function function function function function function> 

Did we really mean for this to be possible or should the parser be pickier
about requiring an "ordinary" command structure as the first thing after
the empty parens?

The same doesn't quite work with the "function" keyword:

torch% function function function function function
function function function> print $funcstack
torch% functions
function () {
        function () {
                () {
                        print $funcstack
                }
        }
}

(However, you can't easily execute the function named "function" as the
keyword always takes precedence.)

Anyway, just an oddity it seemed interesting to point out.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-02 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-28 20:07 Parsing of "anonymous" functions Bart Schaefer
2014-01-02 20:35 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).