aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-03 13:36:13 +1000
committerDavid Walter Seikel2012-02-03 13:36:13 +1000
commit23647142170ae51bb6650024f03de2332117fb02 (patch)
treec76401b163eb4f570884c83df818db4cf16241ed
parentTake care of declerations without asignments. (diff)
downloadSledjHamr-23647142170ae51bb6650024f03de2332117fb02.zip
SledjHamr-23647142170ae51bb6650024f03de2332117fb02.tar.gz
SledjHamr-23647142170ae51bb6650024f03de2332117fb02.tar.bz2
SledjHamr-23647142170ae51bb6650024f03de2332117fb02.tar.xz
Don't put extra comma at end of function parameter list, Lua don't lik them there, but likes them in table definitions. shrugs
-rw-r--r--LuaSL/src/LuaSL_compile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index c06afc4..90f001e 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -1996,15 +1996,17 @@ static void outputFunctionCallToken(FILE *file, outputMode mode, LSL_Leaf *conte
1996 { 1996 {
1997 LSL_FunctionCall *call = content->value.functionCallValue; 1997 LSL_FunctionCall *call = content->value.functionCallValue;
1998 LSL_Leaf *param = NULL; 1998 LSL_Leaf *param = NULL;
1999 boolean first = TRUE;
1999 2000
2000 // TODO - should output it's own ignorable here. 2001 // TODO - should output it's own ignorable here.
2001 outputText(file, &(call->function->name), FALSE); // Don't output the function definitions ignorable. 2002 outputText(file, &(call->function->name), FALSE); // Don't output the function definitions ignorable.
2002 fprintf(file, "("); 2003 fprintf(file, "(");
2003 EINA_INARRAY_FOREACH((&(call->params)), param) 2004 EINA_INARRAY_FOREACH((&(call->params)), param)
2004 { 2005 {
2005 outputLeaf(file, mode, param); 2006 if ((OM_LUA == mode) && (!first))
2006 if (OM_LUA == mode)
2007 fprintf(file, ", "); 2007 fprintf(file, ", ");
2008 outputLeaf(file, mode, param);
2009 first = FALSE;
2008 } 2010 }
2009 fprintf(file, ")"); 2011 fprintf(file, ")");
2010 } 2012 }