diff options
author | Tedd Hansen | 2007-08-12 19:04:07 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-12 19:04:07 +0000 |
commit | ed1208d04378b2ef9928ed270c99f4f99f3a30d5 (patch) | |
tree | b801ad73f59f7c055fde2f3b75022735b1a8051d /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |
parent | ScriptManager now uses LSL-compiler. (diff) | |
download | opensim-SC-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.zip opensim-SC-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.gz opensim-SC-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.bz2 opensim-SC-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.xz |
ScriptEngine successfully compiles script, we are now even further than LSO was.
Also added C# script support.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 99fdb0d..6b0afa9 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
162 | // void dataserver(key query_id, string data) { | 162 | // void dataserver(key query_id, string data) { |
163 | //cache = Regex.Replace(cache, @"([^a-zA-Z_]\s*)((?!if|switch|for)[a-zA-Z_]+\s*\([^\)]*\)[^{]*{)", "$1" + "<STATE>" + "$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 163 | //cache = Regex.Replace(cache, @"([^a-zA-Z_]\s*)((?!if|switch|for)[a-zA-Z_]+\s*\([^\)]*\)[^{]*{)", "$1" + "<STATE>" + "$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
164 | //Console.WriteLine("Replacing using statename: " + current_statename); | 164 | //Console.WriteLine("Replacing using statename: " + current_statename); |
165 | cache = Regex.Replace(cache, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1" + current_statename + "_$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 165 | cache = Regex.Replace(cache, @"^(\s*)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1" + current_statename + "_$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
166 | } | 166 | } |
167 | 167 | ||
168 | ret += cache; | 168 | ret += cache; |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
195 | } | 195 | } |
196 | 196 | ||
197 | // Add "void" in front of functions that needs it | 197 | // Add "void" in front of functions that needs it |
198 | Script = Regex.Replace(Script, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 198 | Script = Regex.Replace(Script, @"^(\s*)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |
199 | 199 | ||
200 | // Replace <x,y,z> and <x,y,z,r> | 200 | // Replace <x,y,z> and <x,y,z,r> |
201 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | 201 | Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); |