From abf855c2d94c624cb82c4fe2183f5b5ca7c74fa8 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 2 Feb 2012 01:17:32 +1000 Subject: Fix up single statement "blocks". --- LuaSL/src/LuaSL_compile.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'LuaSL/src/LuaSL_compile.c') diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c index 236b2a6..0b56845 100644 --- a/LuaSL/src/LuaSL_compile.c +++ b/LuaSL/src/LuaSL_compile.c @@ -776,7 +776,12 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Leaf *flow, stat->type = flow->toKen->type; stat->expressions = expr; if (block) - stat->block = block->value.blockValue; + { + if (LSL_BLOCK_OPEN == block->toKen->type) + stat->block = block->value.blockValue; + else + stat->single = block->value.statementValue; + } eina_clist_element_init(&(stat->statement)); if (identifier) stat->identifier = identifier->value.identifierValue; @@ -1575,6 +1580,8 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state if (statement->block) outputRawBlock(file, mode, statement->block); + if (statement->single) + outputRawStatement(file, mode, statement->single); #if LUASL_DIFF_CHECK if ((statement->ignorable) && (statement->ignorable[0])) -- cgit v1.1