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/Compiler.cs | 6 ++-- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 32 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 0cce317..a488b91 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -13,7 +13,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); - private static UInt64 ScriptCompileCounter = 0; + private static UInt64 scriptCompileCounter = 0; //private ICodeCompiler icc = codeProvider.CreateCompiler(); public string CompileFromFile(string LSOFileName) { @@ -49,8 +49,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // Output assembly name - ScriptCompileCounter++; - string OutFile = Path.Combine("ScriptEngines", "Script_" + ScriptCompileCounter + ".dll"); + scriptCompileCounter++; + string OutFile = Path.Combine("ScriptEngines", "Script_" + scriptCompileCounter + ".dll"); try { System.IO.File.Delete(OutFile); 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