From cef8c5e9d7ce49cc47e7ef1816465064d889d6d5 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Thu, 13 Sep 2007 11:11:08 +0000 Subject: Hiding evidence that I once was a VB coder (thanks to refactoring). Renamed member names to smallcapsy. --- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 9495888..3adb7e2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -8,21 +8,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public class LSL2CSConverter { //private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled); - private Dictionary DataTypes = new Dictionary(); - private Dictionary QUOTES = new Dictionary(); + private Dictionary dataTypes = new Dictionary(); + private Dictionary quotes = new Dictionary(); public LSL2CSConverter() { // Only the types we need to convert - DataTypes.Add("void", "void"); - DataTypes.Add("integer", "int"); - DataTypes.Add("float", "double"); - DataTypes.Add("string", "string"); - DataTypes.Add("key", "string"); - DataTypes.Add("vector", "LSL_Types.Vector3"); - DataTypes.Add("rotation", "LSL_Types.Quaternion"); - DataTypes.Add("list", "list"); - DataTypes.Add("null", "null"); + dataTypes.Add("void", "void"); + dataTypes.Add("integer", "int"); + dataTypes.Add("float", "double"); + dataTypes.Add("string", "string"); + dataTypes.Add("key", "string"); + dataTypes.Add("vector", "LSL_Types.Vector3"); + dataTypes.Add("rotation", "LSL_Types.Quaternion"); + dataTypes.Add("list", "list"); + dataTypes.Add("null", "null"); } @@ -74,7 +74,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL _Script += quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]); } // We just left a quote - QUOTES.Add(quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); + quotes.Add(quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); quote = ""; } break; @@ -189,10 +189,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL - foreach (string key in DataTypes.Keys) + foreach (string key in dataTypes.Keys) { string val; - DataTypes.TryGetValue(key, out val); + dataTypes.TryGetValue(key, out val); // Replace CAST - (integer) with (int) Script = Regex.Replace(Script, @"\(" + key + @"\)", @"(" + val + ")", RegexOptions.Compiled | RegexOptions.Multiline); @@ -217,10 +217,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // REPLACE BACK QUOTES - foreach (string key in QUOTES.Keys) + foreach (string key in quotes.Keys) { string val; - QUOTES.TryGetValue(key, out val); + quotes.TryGetValue(key, out val); Script = Script.Replace(key, "\"" + val + "\""); } -- cgit v1.1