Ah, I think `(with-input-from-string "(+ 1 1)" (lambda () (eval (read))))` would do!
On Sunday, August 20, 2017 at 7:39:35 PM UTC+10, Ruslan Prokopchuk wrote:I want to parse and eval Scheme code represented as a string, in the same way as `load` does with files. But I can't find any parser being exposed (which output I could feed `eval` to achieve described result). What is the best way to execute Scheme code represented as string from my Chez Scheme program?
--
You received this message because you are subscribed to the Google Groups "chez-scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chez-scheme...@googlegroups.com.
To post to this group, send email to chez-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chez-scheme/a34eb35b-b91e-4c9d-8b2c-9f9963d01061%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.