How can I use at-exp to include blew raw string:
package foo
}
import (
I write like this, but it cannot include the "}" character:
#lang at-exp racket/base
(define code @S{
package foo
}
import (
}
How to include special character like "{}" in the raw part.
Use @S|{...}| for that: since the closing part is }|, plain }s would not be special. Also, remember to use |@ instead of just @ for nested forms. And if you need another different quotation since you want to use }|s too, you can add more things between, as in @S|==={...}===|. See the documentation page for details (look for |{s, and see section 2.4.1).
As for what you've found: this is not the same. What you're doing there is a nested "{" string, which you can use for each unbalanced character. But that is much less convenient than the above alternative quotation syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With