Blame


1 8e6adf95 2023-04-13 op {!
2 8e6adf95 2023-04-13 op #include <stdlib.h>
3 8e6adf95 2023-04-13 op
4 8e6adf95 2023-04-13 op #include "tmpl.h"
5 8e6adf95 2023-04-13 op
6 8e6adf95 2023-04-13 op int base(struct template *, const char *);
7 8e6adf95 2023-04-13 op
8 8e6adf95 2023-04-13 op !}
9 8e6adf95 2023-04-13 op
10 8e6adf95 2023-04-13 op {{ define base(struct template *tp, const char *title) }}
11 8e6adf95 2023-04-13 op {! char *foo = NULL; !}
12 8e6adf95 2023-04-13 op <!doctype html>
13 8e6adf95 2023-04-13 op <html>
14 8e6adf95 2023-04-13 op <head>
15 8e6adf95 2023-04-13 op <title>{{ title }}</title>
16 8e6adf95 2023-04-13 op </head>
17 8e6adf95 2023-04-13 op <body> {! /* TODO: frobnicate this line! */ !}
18 8e6adf95 2023-04-13 op <h1>{{ title }}</h1>
19 8e6adf95 2023-04-13 op {{ " | " }}
20 8e6adf95 2023-04-13 op {{ "other stuff" }}
21 8e6adf95 2023-04-13 op <script>
22 8e6adf95 2023-04-13 op function greet() {
23 8e6adf95 2023-04-13 op console.log("hello, world");
24 8e6adf95 2023-04-13 op }
25 8e6adf95 2023-04-13 op (function() {
26 8e6adf95 2023-04-13 op greet();
27 8e6adf95 2023-04-13 op })();
28 8e6adf95 2023-04-13 op </script>
29 8e6adf95 2023-04-13 op </body>
30 8e6adf95 2023-04-13 op </html>
31 8e6adf95 2023-04-13 op {{ finally }}
32 8e6adf95 2023-04-13 op {! free(foo); !}
33 8e6adf95 2023-04-13 op {{ end }}