risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
581 stars 24 forks source link

Capture comments in the Risor AST #196

Open myzie opened 4 months ago

myzie commented 4 months ago

Discussed in https://github.com/risor-io/risor/discussions/195

Originally posted by **alexaandru** February 28, 2024 At a quick glance I could not find them in there, which makes sense, the VM doesn't need them. However, the AST would also be very valuable for writing a tool for auto formatting, and currently, such a tool would lose the comments information, which obviously would be unacceptable.