aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-02 03:41:16 +1000
committerDavid Walter Seikel2012-02-02 03:41:16 +1000
commite8c4953719a057bec2c1344633cf88c480948e40 (patch)
tree00a9cb075906708b7f97abc98518c686ff9ef893 /LuaSL/src
parentNumby magic. (diff)
downloadSledjHamr-e8c4953719a057bec2c1344633cf88c480948e40.zip
SledjHamr-e8c4953719a057bec2c1344633cf88c480948e40.tar.gz
SledjHamr-e8c4953719a057bec2c1344633cf88c480948e40.tar.bz2
SledjHamr-e8c4953719a057bec2c1344633cf88c480948e40.tar.xz
Fix up crements ignorables.
Diffstat (limited to 'LuaSL/src')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h3
-rw-r--r--LuaSL/src/LuaSL_compile.c12
2 files changed, 14 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 64832d2..8be8afd 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -224,7 +224,8 @@ struct _LSL_Parenthesis
224struct _LSL_Identifier // For variables and function parameters. 224struct _LSL_Identifier // For variables and function parameters.
225{ 225{
226 LSL_Text name; 226 LSL_Text name;
227 const char *sub; 227 Eina_Strbuf *ignorable;
228 const char *sub;
228 LSL_Leaf value; 229 LSL_Leaf value;
229}; 230};
230 231
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 73b43dd..ac4d779 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -495,6 +495,10 @@ LSL_Leaf *addCrement(LuaSL_compiler *compiler, LSL_Leaf *variable, LSL_Leaf *cre
495 if ((variable) && (crement)) 495 if ((variable) && (crement))
496 { 496 {
497 crement->value.identifierValue = variable->value.identifierValue; 497 crement->value.identifierValue = variable->value.identifierValue;
498#if LUASL_DIFF_CHECK
499 crement->value.identifierValue->ignorable = variable->ignorable;
500 variable->ignorable = NULL;
501#endif
498 crement->basicType = variable->basicType; 502 crement->basicType = variable->basicType;
499 crement->toKen = tokens[type - lowestToken]; 503 crement->toKen = tokens[type - lowestToken];
500 } 504 }
@@ -1698,12 +1702,20 @@ static void outputCrementsToken(FILE *file, outputMode mode, LSL_Leaf *content)
1698 case LSL_INCREMENT_PRE : 1702 case LSL_INCREMENT_PRE :
1699 { 1703 {
1700 fprintf(file, "%s", content->toKen->toKen); 1704 fprintf(file, "%s", content->toKen->toKen);
1705#if LUASL_DIFF_CHECK
1706 if (content->value.identifierValue->ignorable)
1707 fwrite(eina_strbuf_string_get(content->value.identifierValue->ignorable), 1, eina_strbuf_length_get(content->value.identifierValue->ignorable), file);
1708#endif
1701 outputText(file, &(content->value.identifierValue->name), FALSE); 1709 outputText(file, &(content->value.identifierValue->name), FALSE);
1702 break; 1710 break;
1703 } 1711 }
1704 case LSL_DECREMENT_POST : 1712 case LSL_DECREMENT_POST :
1705 case LSL_INCREMENT_POST : 1713 case LSL_INCREMENT_POST :
1706 { 1714 {
1715#if LUASL_DIFF_CHECK
1716 if (content->value.identifierValue->ignorable)
1717 fwrite(eina_strbuf_string_get(content->value.identifierValue->ignorable), 1, eina_strbuf_length_get(content->value.identifierValue->ignorable), file);
1718#endif
1707 outputText(file, &(content->value.identifierValue->name), FALSE); 1719 outputText(file, &(content->value.identifierValue->name), FALSE);
1708 fprintf(file, "%s", content->toKen->toKen); 1720 fprintf(file, "%s", content->toKen->toKen);
1709 break; 1721 break;