Zemplate is a WIP zig templating engine.
The syntax is inspired by text/template from go.
{{.foo}}Pulls foo from struct and inserts it into the template.
if foo is { "foo": "bar" } the output would be
barIt also works with nested identifiers, {{.foo.bar}} with { "foo": { "bar": "baz" } } would output baz.
{{ range .foo }}- {{ .bar }}
{{ end }}if foo is {"foo": [{ "bar": "a" }, { "bar": "b" }, { "bar": "c" }]} then the output would be
- a
- b
- c
{{ if .foo }}{{ .bar }}{{ end }}if foo is {"foo": true, "bar": "hello world!"} then the output would be
hello world!I'm open to any and all contributions, be it from code-review, documentation or any form of critique, especially since this is my first zig project.