aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--LuaSL/src/LuaSL_compile.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 9abe55d..d750fc4 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -246,7 +246,15 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
246 lType = OT_nothing; 246 lType = OT_nothing;
247 else 247 else
248 { 248 {
249 lType = left->basicType; 249// if ((LSL_IDENTIFIER == left->token->type) && (left->value.identifierValue))
250// {
251// LSL_Leaf *var = findVariable(compiler, left->value.identifierValue->name);
252
253// if (var)
254// lType = var->basicType;
255// }
256// else
257 lType = left->basicType;
250 if (OT_vector < lType) 258 if (OT_vector < lType)
251 lType = allowed[lType].result; 259 lType = allowed[lType].result;
252 } 260 }
@@ -301,9 +309,15 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
301 const char *leftType = "", *rightType = ""; 309 const char *leftType = "", *rightType = "";
302 310
303 if (left) 311 if (left)
312 {
313printf("left token type %s\n", left->token->token);
304 leftType = allowed[left->basicType].name; 314 leftType = allowed[left->basicType].name;
315 }
305 if (right) 316 if (right)
317 {
318printf("right token type %s\n", right->token->token);
306 rightType = allowed[right->basicType].name; 319 rightType = allowed[right->basicType].name;
320 }
307 321
308 PE("Invalid operation [%s %s %s] @ line %d column %d", leftType, lval->token->token, rightType, lval->line, lval->column); 322 PE("Invalid operation [%s %s %s] @ line %d column %d", leftType, lval->token->token, rightType, lval->line, lval->column);
309 } 323 }