Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Parsing of "anonymous" functions
- X-seq: zsh-workers 32194
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Parsing of "anonymous" functions
- Date: Sat, 28 Dec 2013 12:07:30 -0800
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author