--- a/gplate/gplate-template.c Tue Jan 01 09:28:42 2008 -0600
+++ b/gplate/gplate-template.c Tue Jan 01 21:53:25 2008 -0600
@@ -294,6 +294,7 @@
g_scanner_error(priv->scanner, "syntax error!");
+ printf("%p: code close\n", priv->scanner); gplate_template_pop_scope(tplate);
@@ -302,6 +303,7 @@
if(gplate_template_get_scope(tplate) ==
GPLATE_TEMPLATE_SCOPE_CODE)
+ printf("include keyword\n"); gplate_template_push_scope(tplate,
GPLATE_TEMPLATE_SCOPE_INCLUDE);
@@ -325,6 +327,8 @@
+ printf("%010p: unhandle type: %d\n", type); + printf("%010p: scope is: %u\n", priv->scanner, gplate_template_get_scope(tplate)); if(scope != GPLATE_TEMPLATE_SCOPE_NORMAL) {
@@ -336,9 +340,7 @@
g_string_append_printf(output, "%c", type);
- printf("scope is: %u\n", gplate_template_get_scope(tplate));
- printf("scope is: %u\n", gplate_template_get_scope(tplate));
g_string_append_printf(output, "%c", type);
--- a/tests/include1.gplate Tue Jan 01 09:28:42 2008 -0600
+++ b/tests/include1.gplate Tue Jan 01 21:53:25 2008 -0600
@@ -1,4 +1,4 @@
{% include include2.gplate %}
--- a/tests/test_syntax.c Tue Jan 01 09:28:42 2008 -0600
+++ b/tests/test_syntax.c Tue Jan 01 21:53:25 2008 -0600
@@ -101,7 +101,7 @@
output = gplate_template_process_file(tplate, "include1.gplate", NULL);
- ret = g_ascii_strcasecmp(output, "before include\ninside include\nafter include");
+ ret = g_ascii_strcasecmp(output, "before the include\ninside include\nafter the include"); printf("o:\n%s\n", output);