diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 3bdad4d..2226673 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -388,14 +388,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
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(";"); |