From edc3d2fe0f5342457ed7f89d5678100efccb4d52 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 3 Feb 2012 13:55:05 +1000 Subject: Properly convert special asignments, and not equals. --- LuaSL/src/LuaSL_compile.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'LuaSL/src') 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) { if (OM_LUA == mode) { - if (LSL_TYPE & leaf->toKen->flags) + if ((LSL_ASSIGNMENT & leaf->toKen->flags) && (LSL_ASSIGNMENT_PLAIN != leaf->toKen->type)) + { + fprintf(file, " --[[%s]] = %s %.1s ", leaf->toKen->toKen, leaf->left->value.identifierValue->name.text, leaf->toKen->toKen); + } + else if (LSL_TYPE & leaf->toKen->flags) { if (MF_LOCAL & leaf->flags) fprintf(file, " local "); @@ -1534,6 +1538,8 @@ static void outputLeaf(FILE *file, outputMode mode, LSL_Leaf *leaf) } else if (LSL_CONCATENATE == leaf->toKen->type) fprintf(file, " .. "); + else if (LSL_NOT_EQUAL == leaf->toKen->type) + fprintf(file, " ~= "); else fprintf(file, "%s", leaf->toKen->toKen); } -- cgit v1.1