aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
diff options
context:
space:
mode:
authorTedd Hansen2008-02-10 21:55:26 +0000
committerTedd Hansen2008-02-10 21:55:26 +0000
commit78363c3bab589bf9696b4e81b447aab0e140445c (patch)
tree69b85b7b77d4094b7f312d6c47357d74ac3f65a7 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
parentBugfix on that last Quaternion/Vector patch (diff)
downloadopensim-SC_OLD-78363c3bab589bf9696b4e81b447aab0e140445c.zip
opensim-SC_OLD-78363c3bab589bf9696b4e81b447aab0e140445c.tar.gz
opensim-SC_OLD-78363c3bab589bf9696b4e81b447aab0e140445c.tar.bz2
opensim-SC_OLD-78363c3bab589bf9696b4e81b447aab0e140445c.tar.xz
Bugfix to state command:
"state default;" rewrite to "state ("default");"
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 984c184..07a31d0 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -193,7 +193,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
193 Regex.Replace(cache, 193 Regex.Replace(cache,
194 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){", 194 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){",
195 "${s1}${s2}", 195 "${s1}${s2}",
196 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 196 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);
197 } 197 }
198 ret += cache; 198 ret += cache;
199 cache = String.Empty; 199 cache = String.Empty;
@@ -214,7 +214,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
214 Regex.Replace(cache, 214 Regex.Replace(cache,
215 @"^(\s*)((?!(if|switch|for|while)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", 215 @"^(\s*)((?!(if|switch|for|while)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)",
216 @"$1public " + current_statename + "_event_$2", 216 @"$1public " + current_statename + "_event_$2",
217 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 217 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);
218 } 218 }
219 219
220 ret += cache; 220 ret += cache;
@@ -280,6 +280,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
280 Regex.Replace(Script, @"\((float|int)\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.Parse($2)", 280 Regex.Replace(Script, @"\((float|int)\)\s*([a-zA-Z0-9_.]+(\s*\([^\)]*\))?)", @"$1.Parse($2)",
281 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 281 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
282 282
283 // Replace "state STATENAME" with "state("statename")"
284 Script =
285 Regex.Replace(Script, @"(state)\s+([^;\n\r]+)([\r\n\s];)", "$1(\"$2\")$3",
286 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase);
283 287
284 // REPLACE BACK QUOTES 288 // REPLACE BACK QUOTES
285 foreach (string key in quotes.Keys) 289 foreach (string key in quotes.Keys)