Re: [racket-users] Pretty Printing for ASTs represented as structs

2020-08-16 Thread Jay McCarthy
I recommend defining the structs with `#:transparent` and just using `pretty-write` or `pretty-print`. Jay -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io Vincit qui se vincit. On Sun, Aug 16, 2020 at 4:48 PM Jeremy Siek wrote: > > Hi All, > > I'm looking

[racket-users] Pretty Printing for ASTs represented as structs

2020-08-16 Thread Jeremy Siek
Hi All, I'm looking into using Racket structs to represent abstract syntax trees. I've gotten as far as defining gen:custom-write properties, but have not yet figured out how to control indenting. Also, I'm not sure I'm just calling write-string, write, and newline in my gen:custom-write methods