aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
diff options
context:
space:
mode:
authorTedd Hansen2007-08-26 13:31:58 +0000
committerTedd Hansen2007-08-26 13:31:58 +0000
commitebb0099816299108b025b55e62ef1f15fe60c2f9 (patch)
tree5b663b915ad6536e50802c75beb6ac4b4a272f8f /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
parentBugfix for last commit, { instead of ( (diff)
downloadopensim-SC-ebb0099816299108b025b55e62ef1f15fe60c2f9.zip
opensim-SC-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.gz
opensim-SC-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.bz2
opensim-SC-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.xz
Run-time script errors are now shown in-world. No line number though, might require script to be compiled with (slow) debug information.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL')
-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] " +