zig-metaprogramming-css-parser

Demoing the basics of metaprogramming in Zig by writing a very incomplete CSS parser.

Stars
15

Metaprogramming in Zig and parsing a bit of CSS

Minimal project to demonstrate metaprogramming in Zig to match parsed key-value pairs to struct field members and later print out the struct dynamically as well.

This was live-streamed on my Twitch.

The accompanying blog post is available here.

$ zig build-exe main.zig
$ ./main tests/basic.css
selector: div
  background: white