aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-02 01:17:32 +1000
committerDavid Walter Seikel2012-02-02 01:17:32 +1000
commitabf855c2d94c624cb82c4fe2183f5b5ca7c74fa8 (patch)
treebec371c051c2408b8faa894a8990775bc2dcd9d3 /LuaSL/src/LuaSL_compile.c
parentOutput crements properly. (diff)
downloadSledjHamr-abf855c2d94c624cb82c4fe2183f5b5ca7c74fa8.zip
SledjHamr-abf855c2d94c624cb82c4fe2183f5b5ca7c74fa8.tar.gz
SledjHamr-abf855c2d94c624cb82c4fe2183f5b5ca7c74fa8.tar.bz2
SledjHamr-abf855c2d94c624cb82c4fe2183f5b5ca7c74fa8.tar.xz
Fix up single statement "blocks".
Diffstat (limited to 'LuaSL/src/LuaSL_compile.c')
-rw-r--r--LuaSL/src/LuaSL_compile.c9
1 files changed, 8 insertions, 1 deletions
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,
776 stat->type = flow->toKen->type; 776 stat->type = flow->toKen->type;
777 stat->expressions = expr; 777 stat->expressions = expr;
778 if (block) 778 if (block)
779 stat->block = block->value.blockValue; 779 {
780 if (LSL_BLOCK_OPEN == block->toKen->type)
781 stat->block = block->value.blockValue;
782 else
783 stat->single = block->value.statementValue;
784 }
780 eina_clist_element_init(&(stat->statement)); 785 eina_clist_element_init(&(stat->statement));
781 if (identifier) 786 if (identifier)
782 stat->identifier = identifier->value.identifierValue; 787 stat->identifier = identifier->value.identifierValue;
@@ -1575,6 +1580,8 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state
1575 1580
1576 if (statement->block) 1581 if (statement->block)
1577 outputRawBlock(file, mode, statement->block); 1582 outputRawBlock(file, mode, statement->block);
1583 if (statement->single)
1584 outputRawStatement(file, mode, statement->single);
1578 1585
1579#if LUASL_DIFF_CHECK 1586#if LUASL_DIFF_CHECK
1580 if ((statement->ignorable) && (statement->ignorable[0])) 1587 if ((statement->ignorable) && (statement->ignorable[0]))