aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-16 09:27:47 +1000
committerDavid Walter Seikel2014-05-16 09:27:47 +1000
commite789f2c2023bd259ab4b3ac19298ae4e410f0215 (patch)
tree6938bfa45cc96f361501fbd880d96f8a0227ee0e /src
parentOops * 2, fix LSL.listAdd(). (diff)
downloadSledjHamr-e789f2c2023bd259ab4b3ac19298ae4e410f0215.zip
SledjHamr-e789f2c2023bd259ab4b3ac19298ae4e410f0215.tar.gz
SledjHamr-e789f2c2023bd259ab4b3ac19298ae4e410f0215.tar.bz2
SledjHamr-e789f2c2023bd259ab4b3ac19298ae4e410f0215.tar.xz
Fake result of LSL conditional wrapped function calls. Should fix this better some day.
Diffstat (limited to 'src')
-rw-r--r--src/LuaSL/LuaSL_compile.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c
index c1b119e..3791c94 100644
--- a/src/LuaSL/LuaSL_compile.c
+++ b/src/LuaSL/LuaSL_compile.c
@@ -559,19 +559,20 @@ else
559 * That's what this code and the matching code in addParenthesis() does. 559 * That's what this code and the matching code in addParenthesis() does.
560 */ 560 */
561 // TODO - Only got one of these in my test scripts, so leave all this debugging shit in until it's been tested more. 561 // TODO - Only got one of these in my test scripts, so leave all this debugging shit in until it's been tested more.
562 // Still need to fetch the "x" identifier out, so we can pass that onto the output code.
562 if (left) 563 if (left)
563 { 564 {
564 if (left->flags & MF_ASSIGNEXP) 565 if (left->flags & MF_ASSIGNEXP)
565 { 566 {
566//if ((left) && (right)) 567if ((left) && (right))
567// printf("%s %s %s\n", left->toKen->toKen, lval->toKen->toKen, right->toKen->toKen); 568 printf("%s %s %s\n", left->toKen->toKen, lval->toKen->toKen, right->toKen->toKen);
568//else if (left) 569else if (left)
569// printf("%s %s NORIGHT\n", left->toKen->toKen, lval->toKen->toKen); 570 printf("%s %s NORIGHT\n", left->toKen->toKen, lval->toKen->toKen);
570//else if (right) 571else if (right)
571// printf("NOLEFT %s %s\n", lval->toKen->toKen, right->toKen->toKen); 572 printf("NOLEFT %s %s\n", lval->toKen->toKen, right->toKen->toKen);
572//else 573else
573// printf("NOLEFT %s NORIGHT\n", lval->toKen->toKen); 574 printf("NOLEFT %s NORIGHT\n", lval->toKen->toKen);
574// printf("############################################################################## left\n"); 575 printf("############################################################################## left\n");
575 left->flags |= MF_WRAPFUNC; 576 left->flags |= MF_WRAPFUNC;
576 if (LSL_PARENTHESIS_OPEN == left->toKen->type) 577 if (LSL_PARENTHESIS_OPEN == left->toKen->type)
577 left->value.parenthesis->flags |= MF_WRAPFUNC; 578 left->value.parenthesis->flags |= MF_WRAPFUNC;
@@ -1539,7 +1540,8 @@ static void outputRawParenthesisToken(FILE *file, outputMode mode, LSL_Parenthes
1539 else 1540 else
1540 outputLeaf(file, mode, parenthesis->contents); 1541 outputLeaf(file, mode, parenthesis->contents);
1541 if ((OM_LUA == mode) && (MF_WRAPFUNC & parenthesis->flags)) 1542 if ((OM_LUA == mode) && (MF_WRAPFUNC & parenthesis->flags))
1542 fprintf(file, "; return x; end)() "); 1543 // TODO - Need to fetc the identifier before, but we only have one in my test code, so fake it.
1544 fprintf(file, "; return ix; end)() ");
1543 else 1545 else
1544 { 1546 {
1545#if LUASL_DIFF_CHECK 1547#if LUASL_DIFF_CHECK