-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to use currently defined reader macros with hy.read-many
and hy.read
#2292
Comments
hy.read-many
and hy.read
hy.read-many
and hy.read
This currently works: (defreader foo 3)
(setv reader (hy.reader.HyReader))
;; import all readers from current module into reader
(hy.eval (hy.read f"(require {__name__} :readers *)" :reader reader))
(hy.read "#foo" :reader reader) A slightly more direct solution is: (hy.macros.enable-readers None reader "ALL") since that's the only part of Is |
I'd say it isn't, currently. Originally Allie had intended it to be, the idea being that reader macros can be surprising, and so by calling |
I can make a PR to clean up and expose |
Maybe
Yes, I think just documenting it should suffice. |
Currently there is no (official) way to read code that uses reader macros defined by the active reader.
The text was updated successfully, but these errors were encountered: