* Programmatically expand macros
@ 2020-06-16 17:58 Linus Björnstam
2020-06-19 10:14 ` Catonano
2020-06-20 15:53 ` Stefan Israelsson Tampe
0 siblings, 2 replies; 3+ messages in thread
From: Linus Björnstam @ 2020-06-16 17:58 UTC (permalink / raw)
To: guile-user
Hi!
Is there any simple way to programmatically expand a macro? I already have a PoC that uses syntax-local-binding, but that is quite complex.
Say I have a macro called (hej body ...), can I in any simple way expand (body ...) so that all macros within are expanded? Without relying on syntax-local-value and doing it all myself, that is.
Best regards
Linus Björnstam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Programmatically expand macros
2020-06-16 17:58 Programmatically expand macros Linus Björnstam
@ 2020-06-19 10:14 ` Catonano
2020-06-20 15:53 ` Stefan Israelsson Tampe
1 sibling, 0 replies; 3+ messages in thread
From: Catonano @ 2020-06-19 10:14 UTC (permalink / raw)
To: Linus Björnstam; +Cc: Guile User
Hi Linus
Il giorno mar 16 giu 2020 alle ore 19:59 Linus Björnstam <
linus.internet@fastmail.se> ha scritto:
> Hi!
>
> Is there any simple way to programmatically expand a macro? I already have
> a PoC that uses syntax-local-binding, but that is quite complex.
>
> Say I have a macro called (hej body ...), can I in any simple way expand
> (body ...) so that all macros within are expanded? Without relying on
> syntax-local-value and doing it all myself, that is.
>
No, Guile has no such facility
There was a previous discussion of this, here
https://lists.gnu.org/archive/html/guile-user/2018-05/msg00019.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Programmatically expand macros
2020-06-16 17:58 Programmatically expand macros Linus Björnstam
2020-06-19 10:14 ` Catonano
@ 2020-06-20 15:53 ` Stefan Israelsson Tampe
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Israelsson Tampe @ 2020-06-20 15:53 UTC (permalink / raw)
To: Linus Björnstam; +Cc: Guile User
There is a small macro tool that will expand the arguments before calling
the macros body. Forgot its name. This is closest you get with what you are
asking for. Its a really cool macrology based on syntax rules. Its included
in guile standard.
On Tue, 16 Jun 2020, 19:59 Linus Björnstam, <linus.internet@fastmail.se>
wrote:
> Hi!
>
> Is there any simple way to programmatically expand a macro? I already have
> a PoC that uses syntax-local-binding, but that is quite complex.
>
> Say I have a macro called (hej body ...), can I in any simple way expand
> (body ...) so that all macros within are expanded? Without relying on
> syntax-local-value and doing it all myself, that is.
>
> Best regards
> Linus Björnstam
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-20 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 17:58 Programmatically expand macros Linus Björnstam
2020-06-19 10:14 ` Catonano
2020-06-20 15:53 ` Stefan Israelsson Tampe
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 read-only IMAP folder(s) and NNTP newsgroup(s).