On Wed, May 15, 2019 at 12:59 PM Stephen Chang wrote:
> > For the same reasons I would use a `let` around a code block -- it's an
> easy way to isolate computation and create reusable elements. What would a
> more normal way be when using syntax-parse?
>
> The #:with syntax-parse "pattern
> For the same reasons I would use a `let` around a code block -- it's an easy
> way to isolate computation and create reusable elements. What would a more
> normal way be when using syntax-parse?
The #:with syntax-parse "pattern directive" does the same thing, but
with less parens.
On Wed, May 15, 2019 at 11:48 AM Stephen Chang wrote:
> answer 1) You are missing a dot in (~@ propthing), ie this will work:
> (~@ . propthing)
>
Ah, nice I missed that in the docs. Thanks, Stephen.
> minor question) is there a reason you are using with-syntax with
> syntax-parse?
>
For
answer 1) You are missing a dot in (~@ propthing), ie this will work:
(~@ . propthing)
minor question) is there a reason you are using with-syntax with syntax-parse?
answer 2) You may want to try "attribute". It's somewhat like
"syntax", except it returns false when there are unbound patvars,
I'd like to find a general mechanism, when writing macro code, to say "If
this optional argument was supplied, generate this code. If not, generate
this other code", where "this other code" might be nothing at all. I feel
like this should be simple, but my brain is failing.
As an example,
5 matches
Mail list logo