diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index e3013c9..fc38ef2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -30,10 +30,10 @@ using System.CodeDom.Compiler; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Globalization; | 31 | using System.Globalization; |
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Reflection; | ||
34 | using Microsoft.CSharp; | 33 | using Microsoft.CSharp; |
35 | using Microsoft.VisualBasic; | ||
36 | using Microsoft.JScript; | 34 | using Microsoft.JScript; |
35 | using Microsoft.VisualBasic; | ||
36 | using OpenSim.Region.Environment.Interfaces; | ||
37 | 37 | ||
38 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 38 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
39 | { | 39 | { |
@@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
62 | private bool WriteScriptSourceToDebugFile; | 62 | private bool WriteScriptSourceToDebugFile; |
63 | private bool CompileWithDebugInformation; | 63 | private bool CompileWithDebugInformation; |
64 | private bool CleanUpOldScriptsOnStartup; | 64 | private bool CleanUpOldScriptsOnStartup; |
65 | private System.Collections.Generic.Dictionary<string, Boolean> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase); | 65 | private Dictionary<string, bool> AllowedCompilers = new Dictionary<string, bool>(StringComparer.CurrentCultureIgnoreCase); |
66 | private System.Collections.Generic.Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase); | 66 | private Dictionary<string, enumCompileType> LanguageMapping = new Dictionary<string, enumCompileType>(StringComparer.CurrentCultureIgnoreCase); |
67 | 67 | ||
68 | private string FilePrefix; | 68 | private string FilePrefix; |
69 | private string ScriptEnginesPath = "ScriptEngines"; | 69 | private string ScriptEnginesPath = "ScriptEngines"; |
@@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
276 | if (enableCommanderLSL == true && l == enumCompileType.cs) | 276 | if (enableCommanderLSL == true && l == enumCompileType.cs) |
277 | { | 277 | { |
278 | foreach (KeyValuePair<string, | 278 | foreach (KeyValuePair<string, |
279 | OpenSim.Region.Environment.Interfaces.ICommander> com | 279 | ICommander> com |
280 | in m_scriptEngine.World.GetCommanders()) | 280 | in m_scriptEngine.World.GetCommanders()) |
281 | { | 281 | { |
282 | compileScript = com.Value.GenerateRuntimeAPI() + compileScript; | 282 | compileScript = com.Value.GenerateRuntimeAPI() + compileScript; |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 20c108d..0025b26 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -26,9 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Text.RegularExpressions; | 31 | using System.Text.RegularExpressions; |
31 | using System; | ||
32 | 32 | ||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | 33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL |
34 | { | 34 | { |
@@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
61 | public string Convert(string Script) | 61 | public string Convert(string Script) |
62 | { | 62 | { |
63 | quotes.Clear(); | 63 | quotes.Clear(); |
64 | string Return = System.String.Empty; | 64 | string Return = String.Empty; |
65 | Script = " \r\n" + Script; | 65 | Script = " \r\n" + Script; |
66 | 66 | ||
67 | // | 67 | // |
@@ -77,12 +77,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
77 | // temporarily replace quotes so we can work our magic on the script without | 77 | // temporarily replace quotes so we can work our magic on the script without |
78 | // always considering if we are inside our outside quotes's | 78 | // always considering if we are inside our outside quotes's |
79 | // TODO: Does this work on half-quotes in strings? ;) | 79 | // TODO: Does this work on half-quotes in strings? ;) |
80 | string _Script = System.String.Empty; | 80 | string _Script = String.Empty; |
81 | string C; | 81 | string C; |
82 | bool in_quote = false; | 82 | bool in_quote = false; |
83 | bool quote_replaced = false; | 83 | bool quote_replaced = false; |
84 | string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; | 84 | string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; |
85 | string quote = System.String.Empty; | 85 | string quote = String.Empty; |
86 | bool last_was_escape = false; | 86 | bool last_was_escape = false; |
87 | int quote_replaced_count = 0; | 87 | int quote_replaced_count = 0; |
88 | for (int p = 0; p < Script.Length; p++) | 88 | for (int p = 0; p < Script.Length; p++) |
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
101 | } | 101 | } |
102 | else | 102 | else |
103 | { | 103 | { |
104 | if (quote == System.String.Empty) | 104 | if (quote == String.Empty) |
105 | { | 105 | { |
106 | // We didn't replace quote, probably because of empty string? | 106 | // We didn't replace quote, probably because of empty string? |
107 | _Script += quote_replacement_string + | 107 | _Script += quote_replacement_string + |
@@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
111 | quotes.Add( | 111 | quotes.Add( |
112 | quote_replacement_string + | 112 | quote_replacement_string + |
113 | quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); | 113 | quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); |
114 | quote = System.String.Empty; | 114 | quote = String.Empty; |
115 | } | 115 | } |
116 | break; | 116 | break; |
117 | } | 117 | } |
@@ -155,10 +155,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
155 | // | 155 | // |
156 | int ilevel = 0; | 156 | int ilevel = 0; |
157 | int lastlevel = 0; | 157 | int lastlevel = 0; |
158 | string ret = System.String.Empty; | 158 | string ret = String.Empty; |
159 | string cache = System.String.Empty; | 159 | string cache = String.Empty; |
160 | bool in_state = false; | 160 | bool in_state = false; |
161 | string current_statename = System.String.Empty; | 161 | string current_statename = String.Empty; |
162 | for (int p = 0; p < Script.Length; p++) | 162 | for (int p = 0; p < Script.Length; p++) |
163 | { | 163 | { |
164 | C = Script.Substring(p, 1); | 164 | C = Script.Substring(p, 1); |
@@ -319,9 +319,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
319 | { | 319 | { |
320 | state_events.Add(statea, convertnametoFlag(eventa)); | 320 | state_events.Add(statea, convertnametoFlag(eventa)); |
321 | } | 321 | } |
322 | System.Console.WriteLine("State:" + statea + ", event: " + eventa); | 322 | Console.WriteLine("State:" + statea + ", event: " + eventa); |
323 | } | 323 | } |
324 | System.Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); | 324 | Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); |
325 | // Add namespace, class name and inheritance | 325 | // Add namespace, class name and inheritance |
326 | 326 | ||
327 | // Looking *ONLY* for state entry events | 327 | // Looking *ONLY* for state entry events |