aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-21 18:49:18 +1000
committerDavid Walter Seikel2012-01-21 18:49:18 +1000
commitab7fc23d648e15a71206f6f71e33168d1f684bb2 (patch)
treee5195e66b65b865da125e017ae70ec5b2bcd8d5d
parentA comment about function declarations. (diff)
downloadSledjHamr-ab7fc23d648e15a71206f6f71e33168d1f684bb2.zip
SledjHamr-ab7fc23d648e15a71206f6f71e33168d1f684bb2.tar.gz
SledjHamr-ab7fc23d648e15a71206f6f71e33168d1f684bb2.tar.bz2
SledjHamr-ab7fc23d648e15a71206f6f71e33168d1f684bb2.tar.xz
Standardise error messages.
-rw-r--r--LuaSL/src/LuaSL_compile.c4
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y4
2 files changed, 4 insertions, 4 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 0148444..06c55ef 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -313,7 +313,7 @@ LSL_Leaf *checkVariable(LuaSL_compiler *compiler, LSL_Leaf *identifier)
313 LSL_Leaf *var = findVariable(compiler, identifier->value.stringValue); 313 LSL_Leaf *var = findVariable(compiler, identifier->value.stringValue);
314 314
315 if (NULL == var) 315 if (NULL == var)
316 PE("NOT found %s @ line %d column %d!", identifier->value.stringValue, identifier->line, identifier->column); 316 PE("NOT found %s @ line %d, column %d!", identifier->value.stringValue, identifier->line, identifier->column);
317#ifdef LUASL_DEBUG 317#ifdef LUASL_DEBUG
318 else 318 else
319 PI("Found %s!", identifier->value.stringValue); 319 PI("Found %s!", identifier->value.stringValue);
@@ -428,7 +428,7 @@ LSL_Leaf *addOperation(LuaSL_compiler *compiler, LSL_Leaf *left, LSL_Leaf *lval,
428 rightType = allowed[right->basicType].name; 428 rightType = allowed[right->basicType].name;
429 } 429 }
430 430
431 PE("Invalid operation [%s(%s) %s %s(%s)] @ line %d column %d", leftType, leftToken, lval->token->token, rightType, rightToken, lval->line, lval->column); 431 PE("Invalid operation [%s(%s) %s %s(%s)] @ line %d, column %d!", leftType, leftToken, lval->token->token, rightType, rightToken, lval->line, lval->column);
432 } 432 }
433 } 433 }
434 434
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index 2ec890e..6e82578 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -223,14 +223,14 @@ expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [L
223{ 223{
224 gameGlobals *game = compiler->game; 224 gameGlobals *game = compiler->game;
225 225
226 PE("Giving up. Parser stack overflow @ line %d column %d.", yypMinor->yy0->line, yypMinor->yy0->column); // Gotta love consistancy, if it ever happens. 226 PE("Giving up. Parser stack overflow @ line %d, column %d!", yypMinor->yy0->line, yypMinor->yy0->column); // Gotta love consistancy, if it ever happens.
227} 227}
228 228
229%syntax_error 229%syntax_error
230{ 230{
231 gameGlobals *game = compiler->game; 231 gameGlobals *game = compiler->game;
232 232
233 PE("Syntax error @ line %d column %d.", yyminor.yy0->line, yyminor.yy0->column); 233 PE("Syntax error @ line %d, column %d!", yyminor.yy0->line, yyminor.yy0->column);
234} 234}
235 235
236 236