aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h2
-rw-r--r--LuaSL/src/LuaSL_compile.c22
2 files changed, 13 insertions, 11 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 1903188..18a4d81 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -223,7 +223,7 @@ struct _LSL_Statement
223 LSL_Block *block; 223 LSL_Block *block;
224 LSL_Type type; // Expression type. 224 LSL_Type type; // Expression type.
225#if LUASL_DIFF_CHECK 225#if LUASL_DIFF_CHECK
226 Eina_Strbuf *ignorableText; 226 Eina_Strbuf **ignorable; // Can be up to five of these I think.
227#endif 227#endif
228/* 228/*
229LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *left, LSL_Leaf *expr, LSL_Leaf *right, LSL_Leaf *block); 229LSL_Leaf *addStatement(LSL_Leaf *lval, LSL_Type type, LSL_Leaf *left, LSL_Leaf *expr, LSL_Leaf *right, LSL_Leaf *block);
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 92542c3..8bbffe0 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -700,6 +700,16 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type,
700 stat->parenthesis = parens->value.parenthesis; 700 stat->parenthesis = parens->value.parenthesis;
701 } 701 }
702 702
703 if (lval)
704 {
705#if LUASL_DIFF_CHECK
706 stat->ignorable = calloc(1, sizeof(Eina_Strbuf *));
707 stat->ignorable[0] = lval->ignorable;
708 lval->ignorable = NULL;
709#endif
710 lval->value.statementValue = stat;
711 }
712
703 switch (type) 713 switch (type)
704 { 714 {
705 case LSL_EXPRESSION : 715 case LSL_EXPRESSION :
@@ -759,14 +769,6 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type,
759 } 769 }
760 } 770 }
761 771
762 if (lval)
763 {
764#if LUASL_DIFF_CHECK
765 stat->ignorableText = lval->ignorableText;
766 lval->ignorableText = NULL;
767#endif
768 lval->value.statementValue = stat;
769 }
770 } 772 }
771 773
772 return lval; 774 return lval;
@@ -1376,8 +1378,8 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state
1376 outputRawBlock(file, mode, statement->block); 1378 outputRawBlock(file, mode, statement->block);
1377 1379
1378#if LUASL_DIFF_CHECK 1380#if LUASL_DIFF_CHECK
1379 if (statement->ignorableText) 1381 if ((statement->ignorable) && (statement->ignorable[0]))
1380 fwrite(eina_strbuf_string_get(statement->ignorableText), 1, eina_strbuf_length_get(statement->ignorableText), file); 1382 fwrite(eina_strbuf_string_get(statement->ignorable[0]), 1, eina_strbuf_length_get(statement->ignorable[0]), file);
1381#endif 1383#endif
1382 1384
1383 if (!isBlock) 1385 if (!isBlock)