aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h2
-rw-r--r--LuaSL/src/LuaSL_compile.c7
2 files changed, 1 insertions, 8 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 26e7ee8..561a2ff 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -270,7 +270,7 @@ struct _LSL_FunctionCall
270 LSL_Function *function; 270 LSL_Function *function;
271 Eina_Inarray params; // Eina Inarray has not been released yet (Eina 1.2). 271 Eina_Inarray params; // Eina Inarray has not been released yet (Eina 1.2).
272 Eina_Clist dangler; // Entry for function calls used before the function is defined. 272 Eina_Clist dangler; // Entry for function calls used before the function is defined.
273 LSL_Leaf *call; 273 LSL_Leaf *call; // This is to stash the details for dangling ones, to search later. The line and column details are needed for bitching, so we need the leaf.
274}; 274};
275 275
276struct _LSL_State 276struct _LSL_State
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 21f876c..7745f93 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -582,7 +582,6 @@ LSL_Leaf *addFunctionCall(LuaSL_compiler *compiler, LSL_Leaf *identifier, LSL_Le
582 { 582 {
583 call->function = func->value.functionValue; 583 call->function = func->value.functionValue;
584 eina_clist_element_init(&(call->dangler)); 584 eina_clist_element_init(&(call->dangler));
585 call->call = identifier;
586 } 585 }
587 identifier->value.functionCallValue = call; 586 identifier->value.functionCallValue = call;
588 // TODO - Put the params in call. 587 // TODO - Put the params in call.
@@ -1257,7 +1256,6 @@ static void outputFunctionCallToken(FILE *file, outputMode mode, LSL_Leaf *conte
1257 LSL_FunctionCall *call = content->value.functionCallValue; 1256 LSL_FunctionCall *call = content->value.functionCallValue;
1258 LSL_Function *func = call->function; 1257 LSL_Function *func = call->function;
1259 outputText(file, &(func->name), !(LSL_NOIGNORE & content->toKen->flags)); 1258 outputText(file, &(func->name), !(LSL_NOIGNORE & content->toKen->flags));
1260// fprintf(file, "%s(", func->name);
1261 fprintf(file, "("); 1259 fprintf(file, "(");
1262 // TODO - print params here. 1260 // TODO - print params here.
1263 fprintf(file, ")"); 1261 fprintf(file, ")");
@@ -1608,12 +1606,7 @@ boolean compileLSL(gameGlobals *game, char *script, boolean doConstants)
1608 LSL_Leaf *func = findFunction(&(compiler), call->call->value.stringValue); 1606 LSL_Leaf *func = findFunction(&(compiler), call->call->value.stringValue);
1609 1607
1610 if (func) 1608 if (func)
1611 {
1612 call->function = func->value.functionValue; 1609 call->function = func->value.functionValue;
1613 call->call->value.functionCallValue = call;
1614 call->call->toKen = tokens[LSL_FUNCTION_CALL - lowestToken];
1615 call->call->basicType = func->basicType;
1616 }
1617 else 1610 else
1618 PE("Undeclared function %s called @ line %d, column %d!", call->call->value.stringValue, call->call->line, call->call->column); 1611 PE("Undeclared function %s called @ line %d, column %d!", call->call->value.stringValue, call->call->line, call->call->column);
1619 } 1612 }