Assuming the setup where you make a module syntax object and call strip-context 
on it, you can add a scope to all the user's identifiers after that so they're 
not considered “above” any of the language's identifiers. Make a function to do 
the marking:

(define marker (make-syntax-introducer #true))

Then walk the syntax object tree and replace each user identifier ‘id’ with 
(marker id 'add). Depending on your parsing setup, you could have a specific 
non-terminal for places a user identifier occurs and have a very generic syntax 
tree walker that looks for the non-terminal and adds the mark to the identifier.

If you make a second marker for all other identifiers you encounter, then none 
of the user's identifiers will be “under” the language's bindings, and error 
messages will be better if the user accidentally uses (without binding) one of 
the language's names.

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