diff options
Diffstat (limited to '')
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 7745f93..b10ae07 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -539,9 +539,12 @@ LSL_Leaf *addFunction(LuaSL_compiler *compiler, LSL_Leaf *type, LSL_Leaf *identi | |||
539 | func->name.ignorableText = identifier->ignorableText; | 539 | func->name.ignorableText = identifier->ignorableText; |
540 | identifier->toKen = tokens[LSL_FUNCTION - lowestToken]; | 540 | identifier->toKen = tokens[LSL_FUNCTION - lowestToken]; |
541 | identifier->value.functionValue = func; | 541 | identifier->value.functionValue = func; |
542 | func->type = type; | ||
543 | if (type) | 542 | if (type) |
543 | { | ||
544 | func->type.text = type->toKen->toKen; | ||
545 | func->type.ignorableText = type->ignorableText; | ||
544 | identifier->basicType = type->basicType; | 546 | identifier->basicType = type->basicType; |
547 | } | ||
545 | else | 548 | else |
546 | identifier->basicType = OT_nothing; | 549 | identifier->basicType = OT_nothing; |
547 | eina_hash_add(compiler->script.functions, func->name.text, identifier); | 550 | eina_hash_add(compiler->script.functions, func->name.text, identifier); |
@@ -1227,9 +1230,8 @@ static void outputFunctionToken(FILE *file, outputMode mode, LSL_Leaf *content) | |||
1227 | LSL_Leaf *param = NULL; | 1230 | LSL_Leaf *param = NULL; |
1228 | int first = TRUE; | 1231 | int first = TRUE; |
1229 | 1232 | ||
1230 | outputLeaf(file, mode, func->type); | 1233 | outputText(file, &(func->type), !(LSL_NOIGNORE & content->toKen->flags)); |
1231 | outputText(file, &(func->name), !(LSL_NOIGNORE & content->toKen->flags)); | 1234 | outputText(file, &(func->name), !(LSL_NOIGNORE & content->toKen->flags)); |
1232 | // fprintf(file, "%s(", func->name); | ||
1233 | // TODO - should print comma and parenthesis ignorables. | 1235 | // TODO - should print comma and parenthesis ignorables. |
1234 | fprintf(file, "("); | 1236 | fprintf(file, "("); |
1235 | EINA_INARRAY_FOREACH((&(func->vars)), param) | 1237 | EINA_INARRAY_FOREACH((&(func->vars)), param) |