> The objective here is to get a source/loc structure with call point from the 
> stx passed into the syntax transformer.  Is this what quote-srcloc is for?

I haven't had a need to use `quote-srcloc`. Although I don't know the
context of what you're trying to do, I wanted to check whether you
know about `syntax/loc`?

A colloquial Racket macro definition uses `syntax-case` or
`syntax-parse`, with patterns and templates (as opposed to "raw"
`datum->syntax`). Usually you specify the template using `syntax` or
its reader shorthand, `#'`. By substituting `syntax/loc`, you can
specify the source location of the resulting syntax object.

I wrote a couple of blog posts about my experience using `syntax/loc`:

  
http://www.greghendershott.com/2014/01/using-syntax-loc-and-unit-test-macros.html

  http://www.greghendershott.com/2014/01/using-syntax-loc.html

Apologies in advance if that's not helpful for what you're trying to do.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to