
agc
2021-6-28 10:30:27
@agc has joined the channel

jesse697
2021-6-29 04:58:26
I’m trying to find a way to use syntax/parse to match square brackets, like [
and ]
. I’d like to match, for example, syntax like (a [foo])
but not (a (foo))
. Maybe I’m asking too much?

sorawee
2021-6-29 05:00:31
That can be done. See the syntax property 'paren-shape

sorawee
2021-6-29 05:01:57
Alexis has a nice library that queries the syntax property for you already: https://docs.racket-lang.org/syntax-classes/index.html#%28form._%28%28lib._syntax%2Fparse%2Fclass%2Fparen-shape..rkt%29._~7ebrackets%29%29

jesse697
2021-6-29 05:02:35
awesome, thank you!