aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 613aa32..89921cd 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -176,7 +176,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
176 { 176 {
177 // 0 => 1: Get last 177 // 0 => 1: Get last
178 Match m = 178 Match m =
179 Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", 179 //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{",
180 Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?<statename>[a-zA-Z_]+)[^a-zA-Z_\(\)]*{",
181
180 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 182 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
181 183
182 in_state = false; 184 in_state = false;
@@ -184,11 +186,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
184 { 186 {
185 // Go back to level 0, this is not a state 187 // Go back to level 0, this is not a state
186 in_state = true; 188 in_state = true;
187 current_statename = m.Groups[1].Captures[0].Value; 189 current_statename = m.Groups["statename"].Captures[0].Value;
188 //Console.WriteLine("Current statename: " + current_statename); 190 //Console.WriteLine("Current statename: " + current_statename);
189 cache = 191 cache =
192 //@"(?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){",
190 Regex.Replace(cache, 193 Regex.Replace(cache,
191 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){", 194 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){",
192 "${s1}${s2}", 195 "${s1}${s2}",
193 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 196 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
194 } 197 }
@@ -260,7 +263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
260 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)", 263 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)",
261 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 264 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
262 Script = 265 Script =
263 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)", 266 Regex.Replace(Script, @"<([^,>;)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)",
264 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 267 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
265 268
266 // Replace List []'s 269 // Replace List []'s