aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-15 23:41:42 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-15 23:57:18 -0300
commit63602a4fcf3e811e529ed5b7ba670764d29fc96b (patch)
tree08d38e640ac2698edbe840d0fb1db40368012717 /src/main.c
parenta3c06fb8f19df6ef612cf2d647d75f8c2bedca8b (diff)
downloadblogc-63602a4fcf3e811e529ed5b7ba670764d29fc96b.tar.gz
blogc-63602a4fcf3e811e529ed5b7ba670764d29fc96b.tar.bz2
blogc-63602a4fcf3e811e529ed5b7ba670764d29fc96b.zip
added source grammar
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 65e45ee..3dbf325 100644
--- a/src/main.c
+++ b/src/main.c
@@ -12,16 +12,18 @@
#include <stdio.h>
-#include "template-grammar.h"
+#include "source-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);
+ blogc_source_t *t = blogc_source_parse(
+ "\n \nBOLA: guda\n\t\n\n\n\n"
+ "CHUNDA: asd\n"
+ "----\n"
+ "{% block single_source %}\nbola\n\nzas\n");
+ printf("%s\n", t->content);
printf("Hello, World!\n");
return 0;
}