[Petal] [IDEA] Hash with params
Evan Simpson
evan at 4-am.com
Thu Sep 11 11:52:48 BST 2003
Jean-Michel Hiver wrote:
> I was meaning for example x/prefix1:prefix2:stuff
That would depend on the implementation of 'prefix1', since it is
completely responsible for parsing its argument. If it wants to look
for '<name>:' and treat it as a sub-prefix, that's fine. I suppose that
in Petal it would be less of a problem to allow the path expression
parser handle stacked prefixes, since you can escape the second colon if
you want everything after the first colon passed to 'prefix1'.
>>That's not how we implement it, of course.
>
> ?
ZPTs compile all templates into a sort of bytecode, and create a
dictionary of defined macros and their slot names at compilation time.
When 'use-macro' is executed, the bytecode of the macro is called with
any 'fill-slot' bytecode for matching slot names as parameters. It's
all irrelevent to the model, though.
> b/ Expand the includes at run-time
So, you don't plan to support the use of macros inside of macros? We
use that all of the time.
Cheers,
Evan @ 4-am
More information about the Petal
mailing list