aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index bc6ce4f..031f00a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -433,9 +433,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
433 if (m_insertCoopTerminationChecks) 433 if (m_insertCoopTerminationChecks)
434 { 434 {
435 // We have to check in event functions as well because the user can manually call these. 435 // We have to check in event functions as well because the user can manually call these.
436 if (previousSymbol is GlobalFunctionDefinition 436 if (previousSymbol is GlobalFunctionDefinition
437 || previousSymbol is WhileStatement 437 || previousSymbol is WhileStatement
438 || previousSymbol is DoWhileStatement 438 || previousSymbol is DoWhileStatement
439 || previousSymbol is ForLoop 439 || previousSymbol is ForLoop
440 || previousSymbol is StateEvent) 440 || previousSymbol is StateEvent)
441 GenerateIndentedLine(m_coopTerminationCheck, sb); 441 GenerateIndentedLine(m_coopTerminationCheck, sb);
@@ -474,8 +474,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
474 { 474 {
475 // A non-braced single line do while structure cannot contain multiple statements. 475 // A non-braced single line do while structure cannot contain multiple statements.
476 // So to insert the termination check we change this to a braced control structure instead. 476 // So to insert the termination check we change this to a braced control structure instead.
477 if (previousSymbol is WhileStatement 477 if (previousSymbol is WhileStatement
478 || previousSymbol is DoWhileStatement 478 || previousSymbol is DoWhileStatement
479 || previousSymbol is ForLoop) 479 || previousSymbol is ForLoop)
480 { 480 {
481 transformToBlock = true; 481 transformToBlock = true;
@@ -530,7 +530,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
530 // This code checks for LSL of the following forms, and generates a 530 // This code checks for LSL of the following forms, and generates a
531 // warning if it finds them. 531 // warning if it finds them.
532 // 532 //
533 // list l = [ "foo" ]; 533 // list l = [ "foo" ];
534 // l = (l=[]) + l + ["bar"]; 534 // l = (l=[]) + l + ["bar"];
535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS) 535 // (produces l=["foo","bar"] in SL but l=["bar"] in OS)
536 // 536 //
@@ -758,7 +758,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
758 for (int i = 0; i < fls.kids.Count; i++) 758 for (int i = 0; i < fls.kids.Count; i++)
759 { 759 {
760 SYMBOL s = (SYMBOL)fls.kids[i]; 760 SYMBOL s = (SYMBOL)fls.kids[i];
761 761
762 // Statements surrounded by parentheses in for loops 762 // Statements surrounded by parentheses in for loops
763 // 763 //
764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i)) 764 // e.g. for ((i = 0), (j = 7); (i < 10); (++i))
@@ -774,7 +774,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
774 // like it would be considerably more complicated to handle). 774 // like it would be considerably more complicated to handle).
775 while (s is ParenthesisExpression) 775 while (s is ParenthesisExpression)
776 s = (SYMBOL)s.kids.Pop(); 776 s = (SYMBOL)s.kids.Pop();
777 777
778 GenerateNodeToSB(fls, s, sb); 778 GenerateNodeToSB(fls, s, sb);
779 if (0 < comma--) 779 if (0 < comma--)
780 Generate(", ", sb); 780 Generate(", ", sb);
@@ -891,9 +891,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
891 else if (value is OpenMetaverse.Quaternion) 891 else if (value is OpenMetaverse.Quaternion)
892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString()); 892 retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString());
893 else retval = id; 893 else retval = id;
894 894
895 Generate(retval, s, sb); 895 Generate(retval, s, sb);
896 return; 896 return;
897 } 897 }
898 } 898 }
899 899
@@ -911,7 +911,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
911 string modinvoke = null; 911 string modinvoke = null;
912 if (m_comms != null) 912 if (m_comms != null)
913 modinvoke = m_comms.LookupModInvocation(fc.Id); 913 modinvoke = m_comms.LookupModInvocation(fc.Id);
914 914
915 if (modinvoke != null) 915 if (modinvoke != null)
916 { 916 {
917 if (fc.kids[0] is ArgumentList) 917 if (fc.kids[0] is ArgumentList)
@@ -926,7 +926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
926 { 926 {
927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb); 927 Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb);
928 } 928 }
929 929
930 foreach (SYMBOL kid in fc.kids) 930 foreach (SYMBOL kid in fc.kids)
931 GenerateNodeToSB(fc, kid, sb); 931 GenerateNodeToSB(fc, kid, sb);
932 932
@@ -1124,7 +1124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
1124 { 1124 {
1125 Indent(sb); 1125 Indent(sb);
1126 sb.Append(s); 1126 sb.Append(s);
1127 1127
1128 if (null != sym) 1128 if (null != sym)
1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position)); 1129 m_positionMap.Add(new KeyValuePair<int, int>(m_CSharpLine, m_CSharpCol), new KeyValuePair<int, int>(sym.Line, sym.Position));
1130 1130