aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-03 13:55:05 +1000
committerDavid Walter Seikel2012-02-03 13:55:05 +1000
commitedc3d2fe0f5342457ed7f89d5678100efccb4d52 (patch)
treeec4ea62310a1f913469cde4f4ed7b7de7829ca83 /LuaSL/src
parentActually Lua compile the result. (diff)
downloadSledjHamr-edc3d2fe0f5342457ed7f89d5678100efccb4d52.zip
SledjHamr-edc3d2fe0f5342457ed7f89d5678100efccb4d52.tar.gz
SledjHamr-edc3d2fe0f5342457ed7f89d5678100efccb4d52.tar.bz2
SledjHamr-edc3d2fe0f5342457ed7f89d5678100efccb4d52.tar.xz
Properly convert special asignments, and not equals.
Diffstat (limited to 'LuaSL/src')
-rw-r--r--LuaSL/src/LuaSL_compile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 48803af..1b3063c 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1526,7 +1526,11 @@ static void outputLeaf(FILE *file, outputMode mode, LSL_Leaf *leaf)
1526 { 1526 {
1527 if (OM_LUA == mode) 1527 if (OM_LUA == mode)
1528 { 1528 {
1529 if (LSL_TYPE & leaf->toKen->flags) 1529 if ((LSL_ASSIGNMENT & leaf->toKen->flags) && (LSL_ASSIGNMENT_PLAIN != leaf->toKen->type))
1530 {
1531 fprintf(file, " --[[%s]] = %s %.1s ", leaf->toKen->toKen, leaf->left->value.identifierValue->name.text, leaf->toKen->toKen);
1532 }
1533 else if (LSL_TYPE & leaf->toKen->flags)
1530 { 1534 {
1531 if (MF_LOCAL & leaf->flags) 1535 if (MF_LOCAL & leaf->flags)
1532 fprintf(file, " local "); 1536 fprintf(file, " local ");
@@ -1534,6 +1538,8 @@ static void outputLeaf(FILE *file, outputMode mode, LSL_Leaf *leaf)
1534 } 1538 }
1535 else if (LSL_CONCATENATE == leaf->toKen->type) 1539 else if (LSL_CONCATENATE == leaf->toKen->type)
1536 fprintf(file, " .. "); 1540 fprintf(file, " .. ");
1541 else if (LSL_NOT_EQUAL == leaf->toKen->type)
1542 fprintf(file, " ~= ");
1537 else 1543 else
1538 fprintf(file, "%s", leaf->toKen->toKen); 1544 fprintf(file, "%s", leaf->toKen->toKen);
1539 } 1545 }