aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: 65e45eeb0934c185d1a64508c88abfbc9897b0e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * blogc: A blog compiler.
 * Copyright (C) 2015 Rafael G. Martins <rafael@rafaelmartins.eng.br>
 *
 * This program can be distributed under the terms of the BSD License.
 * See the file COPYING.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */

#include <stdio.h>

#include "template-grammar.h"


int
main(int argc, char **argv)
{
    b_slist_t *t = blogc_template_parse(
        "<html>{{ BOLA }}</html>\n"
        "{% block single_source %}\n");
    printf("%s\n", (char*) ((blogc_template_stmt_t*)t->next->next->next->data)->value);
    printf("Hello, World!\n");
    return 0;
}