aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-17 11:17:48 +1000
committerDavid Walter Seikel2012-01-17 11:17:48 +1000
commit8586c9dd0343adf94889cef468470101913caeaf (patch)
treec39b5ccad64bb3c8477bc124a523dfbc3748aa8a /LuaSL
parentChange how output and converting is done. (diff)
downloadSledjHamr-8586c9dd0343adf94889cef468470101913caeaf.zip
SledjHamr-8586c9dd0343adf94889cef468470101913caeaf.tar.gz
SledjHamr-8586c9dd0343adf94889cef468470101913caeaf.tar.bz2
SledjHamr-8586c9dd0343adf94889cef468470101913caeaf.tar.xz
Slightly better error message for invalid error message. Needs more work.
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.c b/LuaSL/src/LuaSL_LSL_tree.c
index fb35490..6a0988c 100644
--- a/LuaSL/src/LuaSL_LSL_tree.c
+++ b/LuaSL/src/LuaSL_LSL_tree.c
@@ -276,7 +276,16 @@ LSL_Leaf *addOperation(LSL_Leaf *left, LSL_Leaf *lval, LSL_Leaf *right)
276 } 276 }
277 } 277 }
278 if (OT_invalid == lval->basicType) 278 if (OT_invalid == lval->basicType)
279 fprintf(stderr, "Invalid operation [%s] type at line %d column %d\n", lval->token->token, lval->line, lval->column); 279 {
280 if ((left) && (right))
281 fprintf(stderr, "Invalid operation [%s %s %s] type at line %d column %d\n", left->token->token, lval->token->token, right->token->token, lval->line, lval->column);
282 else if (left)
283 fprintf(stderr, "Invalid operation [%s %s] type at line %d column %d\n", left->token->token, lval->token->token, lval->line, lval->column);
284 else if (left)
285 fprintf(stderr, "Invalid operation [%s %s] type at line %d column %d\n", lval->token->token, right->token->token, lval->line, lval->column);
286 else
287 fprintf(stderr, "Invalid operation [%s] type at line %d column %d\n", lval->token->token, lval->line, lval->column);
288 }
280 } 289 }
281 290
282 return lval; 291 return lval;