aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index bbb9f06..bac8bde 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -13,15 +13,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
13 13
14 public LSL2CSConverter() 14 public LSL2CSConverter()
15 { 15 {
16
16 DataTypes.Add("void", "void"); 17 DataTypes.Add("void", "void");
17 DataTypes.Add("integer", "int"); 18 DataTypes.Add("integer", "System.Int32");
18 DataTypes.Add("float", "double"); 19 DataTypes.Add("float", "System.Double");
19 DataTypes.Add("string", "string"); 20 DataTypes.Add("string", "string");
20 DataTypes.Add("key", "string"); 21 DataTypes.Add("key", "System.String");
21 DataTypes.Add("vector", "LSL_Types.Vector3"); 22 DataTypes.Add("vector", "LSL_Types.Vector3");
22 DataTypes.Add("rotation", "LSL_Types.Quaternion"); 23 DataTypes.Add("rotation", "LSL_Types.Quaternion");
23 DataTypes.Add("list", "list"); 24 DataTypes.Add("list", "list");
24 DataTypes.Add("null", "null"); 25 DataTypes.Add("null", "null");
26
25 } 27 }
26 28
27 29
@@ -227,11 +229,29 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
227 229
228 230
229 // Add namespace, class name and inheritance 231 // Add namespace, class name and inheritance
232
230 Return = "" + 233 Return = "" +
231 "using System; " + 234 "using System; " +
232 "using System.Collections.Generic; " + 235 "using System.Collections.Generic; " +
233 "using System.Text; " + 236 "using System.Text; " +
234 "using OpenSim.Region.ScriptEngine.Common; " + 237 "using OpenSim.Region.ScriptEngine.Common; " +
238 "using integer = System.Int32; " +
239 "using key = System.String; ";
240
241 //// Make a Using out of DataTypes
242 //// Using integer = System.Int32;
243 //string _val;
244 //foreach (string key in DataTypes.Keys)
245 //{
246 // DataTypes.TryGetValue(key, out _val);
247 // if (key != _val)
248 // {
249 // Return += "using " + key + " = " + _val + "; ";
250 // }
251 //}
252
253
254 Return += "" +
235 "namespace SecondLife { "; 255 "namespace SecondLife { ";
236 Return += "" + 256 Return += "" +
237 //"[Serializable] " + 257 //"[Serializable] " +