unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: "Linus Björnstam" <linus.internet@fastmail.se>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Programmatically expand macros
Date: Sat, 20 Jun 2020 17:53:40 +0200	[thread overview]
Message-ID: <CAGua6m1i+8rJjB2EzBQZNb9jcc4xKH+dn2Bc_i=dJrv2mE+7Fg@mail.gmail.com> (raw)
In-Reply-To: <390878b4-f329-4a52-9ec5-1fb65bfd9256@www.fastmail.com>

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
>
>


      parent reply	other threads:[~2020-06-20 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGua6m1i+8rJjB2EzBQZNb9jcc4xKH+dn2Bc_i=dJrv2mE+7Fg@mail.gmail.com' \
    --to=stefan.itampe@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=linus.internet@fastmail.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).