From 02c621b997024565426ec01f9cea262234ef664c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 3 Feb 2012 21:55:46 +1000 Subject: Make it easier to debug misplaced ends. --- LuaSL/src/LuaSL_compile.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'LuaSL') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index a72cab3..2ef8867 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -1743,13 +1743,16 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state outputRawStatement(file, mode, statement->elseBlock); if (LSL_IF == statement->type) { +#if 1 fprintf(file, " end\n"); -// fprintf(file, " end --[["); -// if (statement->parenthesis) -// outputRawParenthesisToken(file, mode, statement->parenthesis, ""); -// else -// outputLeaf(file, mode, statement->expressions); -// fprintf(file, "]]\n"); +#else + fprintf(file, " end --[["); + if (statement->parenthesis) + outputRawParenthesisToken(file, mode, statement->parenthesis, ""); + else + outputLeaf(file, mode, statement->expressions); + fprintf(file, "]]\n"); +#endif } return; } -- cgit v1.1