It turns out expanding the syntax object isn't the right approach. It seems 
easy enough for defining values and simple procedures, but as soon as you 
consider optional arguments and keyword arguments, the resulting expansion 
gets too complicated to analyze.

I don't see an easy way to do this, unless there is some hook that I am 
unaware of. For example, applications get piped through #%app and unbound 
identifiers get piped through #%top. If there is #%something that new 
identifiers get piped through, that would be what I want. But I don't think 
it exists.

So my next attempt will be to go back to the reader, and make it so that 
certain characters (like dot and +) are always treated as individual 
tokens. Meaning that (define foo+bar 42) will come out of the reader as 
(define foo + bar 42). The resulting error message should be good enough 
for my purposes, I think.

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