diff options
-rw-r--r-- | LuaSL/src/LuaSL_compile.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index a9375d9..f3fddef 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c | |||
@@ -2280,8 +2280,18 @@ static void outputIdentifierToken(FILE *file, outputMode mode, LSL_Leaf *content | |||
2280 | outputText(file, &(content->value.identifierValue->name), !(LSL_NOIGNORE & content->toKen->flags)); | 2280 | outputText(file, &(content->value.identifierValue->name), !(LSL_NOIGNORE & content->toKen->flags)); |
2281 | if (OM_LUA == mode) | 2281 | if (OM_LUA == mode) |
2282 | { | 2282 | { |
2283 | // TODO - should output a default value depending on type. | 2283 | switch (content->basicType) |
2284 | fprintf(file, " = nil"); | 2284 | { |
2285 | case OT_bool : fprintf(file, " = false"); break; | ||
2286 | case OT_integer : fprintf(file, " = 0"); break; | ||
2287 | case OT_float : fprintf(file, " = 0.0"); break; | ||
2288 | case OT_key : fprintf(file, " = _LSL.NULL_KEY"); break; | ||
2289 | case OT_list : fprintf(file, " = {}"); break; | ||
2290 | case OT_rotation : fprintf(file, " = _LSL.ZERO_ROTATION"); break; | ||
2291 | case OT_string : fprintf(file, " = \"\""); break; | ||
2292 | case OT_vector : fprintf(file, " = _LSL.ZERO_VECTOR"); break; | ||
2293 | default : fprintf(file, " = nil"); break; | ||
2294 | } | ||
2285 | } | 2295 | } |
2286 | } | 2296 | } |
2287 | else | 2297 | else |