aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_compile.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--LuaSL/src/LuaSL_compile.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/LuaSL/src/LuaSL_compile.c b/LuaSL/src/LuaSL_compile.c
index 9c301b8..a98c833 100644
--- a/LuaSL/src/LuaSL_compile.c
+++ b/LuaSL/src/LuaSL_compile.c
@@ -660,7 +660,7 @@ LSL_Leaf *addStatement(LuaSL_compiler *compiler, LSL_Leaf *lval, LSL_Type type,
660 stat->identifier = identifier->value.identifierValue; 660 stat->identifier = identifier->value.identifierValue;
661 if (left) 661 if (left)
662 { 662 {
663 LSL_Leaf *parens = addParenthesis(left, expr, LSL_PARENTHESIS_OPEN, right); 663 LSL_Leaf *parens = addParenthesis(left, expr, LSL_EXPRESSION, right);
664 664
665 if (parens) 665 if (parens)
666 stat->parenthesis = parens->value.parenthesis; 666 stat->parenthesis = parens->value.parenthesis;
@@ -1310,8 +1310,10 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state
1310{ 1310{
1311 boolean isBlock = FALSE; 1311 boolean isBlock = FALSE;
1312 1312
1313 switch (statement->type) 1313 if (statement)
1314 { 1314 {
1315 switch (statement->type)
1316 {
1315 case LSL_EXPRESSION : 1317 case LSL_EXPRESSION :
1316 { 1318 {
1317 break; 1319 break;
@@ -1389,7 +1391,7 @@ static void outputRawStatement(FILE *file, outputMode mode, LSL_Statement *state
1389 if (!LUASL_DIFF_CHECK) 1391 if (!LUASL_DIFF_CHECK)
1390 fprintf(file, "\n"); 1392 fprintf(file, "\n");
1391 } 1393 }
1392 1394 }
1393} 1395}
1394 1396
1395static void outputStatementToken(FILE *file, outputMode mode, LSL_Leaf *content) 1397static void outputStatementToken(FILE *file, outputMode mode, LSL_Leaf *content)
@@ -1414,11 +1416,11 @@ static void outputBlockToken(FILE *file, outputMode mode, LSL_Leaf *content)
1414 fprintf(file, "\n{\n"); 1416 fprintf(file, "\n{\n");
1415 if (content->value.blockValue) 1417 if (content->value.blockValue)
1416 { 1418 {
1417 LSL_Statement *statement = NULL; 1419 LSL_Statement *stat = NULL;
1418 1420
1419 EINA_CLIST_FOR_EACH_ENTRY(statement, &(content->value.blockValue->statements), LSL_Statement, statement) 1421 EINA_CLIST_FOR_EACH_ENTRY(stat, &(content->value.blockValue->statements), LSL_Statement, statement)
1420 { 1422 {
1421 outputRawStatement(file, mode, statement); 1423 outputRawStatement(file, mode, stat);
1422 } 1424 }
1423 } 1425 }
1424 if (LUASL_DIFF_CHECK) 1426 if (LUASL_DIFF_CHECK)