From eefb4ba8d166bcf54d4af5ea318d1efae769e461 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 15 May 2014 13:51:10 +1000 Subject: Some more list adding and concatenation fixes. --- src/LuaSL/LuaSL_compile.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/LuaSL/LuaSL_compile.c') diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index e31e157..492f234 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c @@ -478,7 +478,6 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, break; case ST_ADD : - // TODO - This doesn't work if the right side has been cast to a list. if (OT_listList == lval->basicType) { lval->basicType = OT_list; @@ -492,7 +491,13 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval, break; case ST_CONCATENATION : - if ((OT_list == lType) && (OT_list != rType)) + // TODO - This doesn't work if the right side has been cast to a list. + if (OT_listList == lval->basicType) + { + lval->basicType = OT_list; + lval->toKen = tokens[LSL_LIST_ADD_LIST - lowestToken]; + } + else if ((OT_list == lType) && (OT_list != rType)) { lval->basicType = OT_list; lval->toKen = tokens[LSL_LIST_CONCAT - lowestToken]; -- cgit v1.1