From 23647142170ae51bb6650024f03de2332117fb02 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 3 Feb 2012 13:36:13 +1000 Subject: Don't put extra comma at end of function parameter list, Lua don't lik them there, but likes them in table definitions. shrugs --- LuaSL/src/LuaSL_compile.c | 6 ++++-- 1 file 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 { LSL_FunctionCall *call = content->value.functionCallValue; LSL_Leaf *param = NULL; + boolean first = TRUE; // TODO - should output it's own ignorable here. outputText(file, &(call->function->name), FALSE); // Don't output the function definitions ignorable. fprintf(file, "("); EINA_INARRAY_FOREACH((&(call->params)), param) { - outputLeaf(file, mode, param); - if (OM_LUA == mode) + if ((OM_LUA == mode) && (!first)) fprintf(file, ", "); + outputLeaf(file, mode, param); + first = FALSE; } fprintf(file, ")"); } -- cgit v1.1