{! #include #include #include "lists.h" int list(struct template *, struct tailhead *); !} {{ define base(struct template *tp, struct tailhead *head) }} {{ render list(tp, head) }} {{ end }} {{ define list(struct template *tp, struct tailhead *head) }} {! struct entry *np; int i; !} {{ if !TAILQ_EMPTY(head) }}

items:

{{ else }}

no items

{{ end }}

{{ for i = 0; i < 3; ++i }} hello{{ " " }} {{ end }} world!

{{ end }}