aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
index f129859..631aa54 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/CSCodeGenerator.cs
@@ -388,14 +388,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
388 private string GenerateStatement(Statement s) 388 private string GenerateStatement(Statement s)
389 { 389 {
390 string retstr = String.Empty; 390 string retstr = String.Empty;
391 391 bool printSemicolon = true;
392 // Jump label prints its own colon, we don't need a semicolon.
393 bool printSemicolon = !(s.kids.Top is JumpLabel);
394 392
395 retstr += Indent(); 393 retstr += Indent();
396 394
397 foreach (SYMBOL kid in s.kids) 395 if (0 < s.kids.Count)
398 retstr += GenerateNode(kid); 396 {
397 // Jump label prints its own colon, we don't need a semicolon.
398 printSemicolon = !(s.kids.Top is JumpLabel);
399
400 foreach (SYMBOL kid in s.kids)
401 retstr += GenerateNode(kid);
402 }
399 403
400 if (printSemicolon) 404 if (printSemicolon)
401 retstr += GenerateLine(";"); 405 retstr += GenerateLine(";");