
sorawee
2022-5-22 19:32:04
I got extremely fed up with this YAML thing. Here’s a mini compiler from S-exp representation to YAML: https://github.com/sorawee/racket-ci
An example source: https://github.com/sorawee/racket-ci/blob/main/scanbuild.rkt An example output: https://github.com/sorawee/racket-ci/blob/main/out/scanbuild.yml The original file: https://github.com/sorawee/racket/blob/master/.github/workflows/scanbuild_static-analysis.yml
Everything is done using the syntax/parse
library. This allows validation via syntax class. Somewhat decent error reporting because syntax object has source location. Support reuses via meta function and syntax class.