aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-28 10:07:27 +1000
committerDavid Walter Seikel2012-01-28 10:07:27 +1000
commitf2b30eccfc6bf537233f9349c59ab9de3ac86317 (patch)
treedcd189c32189d0fb03ef8726f9121455dfa29c81 /LuaSL/src
parentNow I remember what that was for. Need caffeine. lol (diff)
downloadSledjHamr-f2b30eccfc6bf537233f9349c59ab9de3ac86317.zip
SledjHamr-f2b30eccfc6bf537233f9349c59ab9de3ac86317.tar.gz
SledjHamr-f2b30eccfc6bf537233f9349c59ab9de3ac86317.tar.bz2
SledjHamr-f2b30eccfc6bf537233f9349c59ab9de3ac86317.tar.xz
Document the other Clist use, and change it's name while I'm at it.
Diffstat (limited to 'LuaSL/src')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h6
-rw-r--r--LuaSL/src/LuaSL_compile.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 4ad5707..f2fccd0 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -254,8 +254,8 @@ struct _LSL_Function
254struct _LSL_FunctionCall 254struct _LSL_FunctionCall
255{ 255{
256 LSL_Function *function; 256 LSL_Function *function;
257 Eina_Inarray params; // Eina Inarray has not been released yet (Eina 1.2). 257 Eina_Inarray params; // Eina Inarray has not been released yet (Eina 1.2).
258 Eina_Clist functionCall; 258 Eina_Clist dangler; // Entry for function calls used before the function is defined.
259 LSL_Leaf *call; 259 LSL_Leaf *call;
260}; 260};
261 261
@@ -356,7 +356,7 @@ typedef struct
356#endif 356#endif
357 LSL_Leaf *lval; 357 LSL_Leaf *lval;
358 LSL_Block *currentBlock; 358 LSL_Block *currentBlock;
359 Eina_Clist danglingCalls; 359 Eina_Clist danglingCalls; // HEAD for function calls used before the function is defined.
360 int column, line; 360 int column, line;
361 int undeclared; 361 int undeclared;
362} LuaSL_compiler; 362} LuaSL_compiler;
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 9b13e62..c1a1a5e 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -577,7 +577,7 @@ LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Le
577 if (call) 577 if (call)
578 { 578 {
579 call->function = func->value.functionValue; 579 call->function = func->value.functionValue;
580 eina_clist_element_init(&(call->functionCall)); 580 eina_clist_element_init(&(call->dangler));
581 call->call = identifier; 581 call->call = identifier;
582 } 582 }
583 identifier->value.functionCallValue = call; 583 identifier->value.functionCallValue = call;
@@ -590,7 +590,7 @@ LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Le
590 // It may be declared later, so store it and check later. 590 // It may be declared later, so store it and check later.
591 if (call) 591 if (call)
592 { 592 {
593 eina_clist_add_tail(&(compiler->danglingCalls), &(call->functionCall)); 593 eina_clist_add_tail(&(compiler->danglingCalls), &(call->dangler));
594 call->call = identifier; 594 call->call = identifier;
595 } 595 }
596 identifier->basicType = OT_undeclared; 596 identifier->basicType = OT_undeclared;
@@ -1373,7 +1373,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
1373 { 1373 {
1374 LSL_FunctionCall *call = NULL; 1374 LSL_FunctionCall *call = NULL;
1375 1375
1376 EINA_CLIST_FOR_EACH_ENTRY(call, &(compiler.danglingCalls), LSL_FunctionCall, functionCall) 1376 EINA_CLIST_FOR_EACH_ENTRY(call, &(compiler.danglingCalls), LSL_FunctionCall, dangler)
1377 { 1377 {
1378 LSL_Leaf *func = findFunction(&(compiler), call->call->value.stringValue); 1378 LSL_Leaf *func = findFunction(&(compiler), call->call->value.stringValue);
1379 1379