This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Passing args with nested pmacros
- From: "Will Newton" <will dot newton at gmail dot com>
- To: cgen at sourceware dot org
- Date: Wed, 29 Aug 2007 14:57:39 +0100
- Subject: Passing args with nested pmacros
Hi all,
I'm trying to simplify some cgen macros and I would like to be able to
to map a pmacro over a list, but also pass the pmacro some other
arguments. e.g.
(define-pmacro (sub-macro item arg) ...)
(define-pmacro (top-level top-level-arg)
(.map (.pmacro (list-item) (sub-macro list-item top-level-arg))))
But this doesn't look like it's possible because .pmacro's don't do
lexical scoping. Is there any way to do what I want?
Thanks,