aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
diff options
context:
space:
mode:
authorMelanie2009-11-21 16:00:18 +0000
committerMelanie2009-11-21 16:00:18 +0000
commit0844e5951cac40120aa0e4407b79c0f8b171b0ec (patch)
treedbf0d59676a46a32d8c9992421c245b3f27e5af2 /OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
parentMerge branch 'careminster' into tests (diff)
parent* Hack to get avatar to land on prim. This is a big nasty hack that tricks ... (diff)
downloadopensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.zip
opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.gz
opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.bz2
opensim-SC_OLD-0844e5951cac40120aa0e4407b79c0f8b171b0ec.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index 41ecfd3..e427f50 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -722,8 +722,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
722 if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count) 722 if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count)
723 return retstr; 723 return retstr;
724 724
725 foreach (SYMBOL s in fls.kids) 725 for (int i = 0; i < fls.kids.Count; i++)
726 { 726 {
727 SYMBOL s = (SYMBOL)fls.kids[i];
728
729 // Statements surrounded by parentheses in for loops
730 //
731 // e.g. for ((i = 0), (j = 7); (i < 10); (++i))
732 //
733 // are legal in LSL but not in C# so we need to discard the parentheses
734 //
735 // The following, however, does not appear to be legal in LLS
736 //
737 // for ((i = 0, j = 7); (i < 10); (++i))
738 //
739 // As of Friday 20th November 2009, the Linden Lab simulators appear simply never to compile or run this
740 // script but with no debug or warnings at all! Therefore, we won't deal with this yet (which looks
741 // like it would be considerably more complicated to handle).
742 while (s is ParenthesisExpression)
743 s = (SYMBOL)s.kids.Pop();
744
727 retstr += GenerateNode(s); 745 retstr += GenerateNode(s);
728 if (0 < comma--) 746 if (0 < comma--)
729 retstr += Generate(", "); 747 retstr += Generate(", ");