[RFC] [PATCH] Support arguments in template expandos (v3)
Dirkjan Ochtman
dirkjan at ochtman.nl
Thu May 28 07:59:48 CDT 2009
On Thu, May 28, 2009 at 2:11 PM, Rocco Rutte <pdmef at gmx.net> wrote:
> I've updated mine to current crew and templater refactorings, please let
> me know if I should send it to the list.
I maybe should've mentioned this earlier, but I've discussed with Matt
another proposal, which would be to implement the bare minimum in
syntax to support multi-argument functions. This would keep the
current {a|b|c} syntax separate and also introduce an {a(b, c(d, e, f,
g))} syntax, which we parse to a cacheable. It doesn't allow any
literals in the syntax, only references to locally available variables
and functions from templatefilters, which keeps it nicely simple. I
haven't implemented the parser yet, it would likely be a little slow
for the first parse, but hopefully be able to amortize that over all
calls to the same expression syntax.
Putting some of the templater syntax in C would maybe make it fast,
but it also makes it that much harder to modify. I don't think that's
desirable.
Cheers,
Dirkjan
More information about the Mercurial-devel
mailing list