[racket] Check Syntax arrows for #lang languages
I still need some refinement, but basically it works.
Thanks again,
Jens Axel
2012/7/3 Jens Axel Søgaard <jensaxel at soegaard.net>
> 2012/7/3 Robby Findler <robby at eecs.northwestern.edu>
>
>> This is the function you want, I think:
>>
>> +
>> +(define (sym->original-syntax sym srcloc)
>> + (define p (open-input-string (symbol->string sym)))
>> + (port-count-lines! p)
>> + (match-define (list source-name line column position span) srcloc)
>> + (set-port-next-location! p line column position)
>> + (read-syntax source-name p))
>
>
> Sneaky.
>
> Thanks!
>
> /Jens Axel
>
>
--
--
Jens Axel Søgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120703/19f620fc/attachment.html>