aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-09-15 05:23:30 +1000
committerDavid Walter Seikel2014-09-15 05:23:30 +1000
commitb812ef21ce228143b909128ff5ee8ba03043a5fe (patch)
treefa260555946672f4ffd1e7c909444e538e936dd0 /src/LuaSL
parentShut up die spam. (diff)
downloadSledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.zip
SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.gz
SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.bz2
SledjHamr-b812ef21ce228143b909128ff5ee8ba03043a5fe.tar.xz
Clean up some TODOs and comments.
Diffstat (limited to 'src/LuaSL')
-rw-r--r--src/LuaSL/LuaSL_compile.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c
index f1e7db1..13ebe1e 100644
--- a/src/LuaSL/LuaSL_compile.c
+++ b/src/LuaSL/LuaSL_compile.c
@@ -1,9 +1,6 @@
1 1
2#include "LuaSL.h" 2#include "LuaSL.h"
3 3
4/* TODO - problem de jour
5*/
6
7 4
8static void outputBitOp(FILE *file, outputMode mode, LSL_Leaf *leaf); 5static void outputBitOp(FILE *file, outputMode mode, LSL_Leaf *leaf);
9static void outputBlockToken(FILE *file, outputMode mode, LSL_Leaf *content); 6static void outputBlockToken(FILE *file, outputMode mode, LSL_Leaf *content);
@@ -433,8 +430,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
433 lType = left->basicType; 430 lType = left->basicType;
434 if (OT_undeclared == lType) 431 if (OT_undeclared == lType)
435 { 432 {
436// compiler->script.warningCount++;
437// sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column);
438 lval->basicType = OT_undeclared; 433 lval->basicType = OT_undeclared;
439 return lval; 434 return lval;
440 } 435 }
@@ -461,8 +456,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
461 rType = right->basicType; 456 rType = right->basicType;
462 if (OT_undeclared == rType) 457 if (OT_undeclared == rType)
463 { 458 {
464// compiler->script.warningCount++;
465// sendBack(compiler->compiler->client, compiler->compiler->SID, "compilerWarning(%d,%d,Undeclared identifier issue, deferring this until the second pass)", lval->line, lval->column);
466 lval->basicType = OT_undeclared; 459 lval->basicType = OT_undeclared;
467 return lval; 460 return lval;
468 } 461 }
@@ -865,8 +858,9 @@ LSL_Leaf *collectArguments(LuaSL_compiler *compiler, LSL_Leaf *list, LSL_Leaf *c
865 if (comma) 858 if (comma)
866 eina_inarray_push(&(call->params), comma); 859 eina_inarray_push(&(call->params), comma);
867 } 860 }
861 // Only stashing the pointer in the inarray, so that other pointers to the actual data are still valid.
862 // Specifically for variable declarations in the second pass.
868 eina_inarray_push(&(call->params), &arg); 863 eina_inarray_push(&(call->params), &arg);
869 // At this point, pointers to arg are not pointing to the one in call->params, AND arg is no longer needed.
870 } 864 }
871 } 865 }
872 } 866 }
@@ -2390,7 +2384,6 @@ void compileLSL(LuaCompiler *compiler)
2390 if (lcompiler->undeclared) 2384 if (lcompiler->undeclared)
2391 { 2385 {
2392 lcompiler->pass++; 2386 lcompiler->pass++;
2393// PW("A second pass is needed to check functions or variables that where used before they where declared. To avoid this second pass, don't do that.");
2394 if (eina_clist_count(&(lcompiler->danglingVars))) 2387 if (eina_clist_count(&(lcompiler->danglingVars)))
2395 { 2388 {
2396 struct _LSL_DanglingVar *dangleVar = NULL; 2389 struct _LSL_DanglingVar *dangleVar = NULL;
@@ -2429,7 +2422,6 @@ void compileLSL(LuaCompiler *compiler)
2429// TODO - Should clean up these clists. 2422// TODO - Should clean up these clists.
2430 2423
2431 secondPass(lcompiler, lcompiler->ast); 2424 secondPass(lcompiler, lcompiler->ast);
2432// PD("Second pass completed.");
2433 } 2425 }
2434 2426
2435 if (lcompiler->compiler->doConstants) 2427 if (lcompiler->compiler->doConstants)